1
This commit is contained in:
parent
a1a9c0cb13
commit
ab41d55a7d
@ -0,0 +1,112 @@
|
|||||||
|
package com.ruoyi.base.controller;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.base.domain.BaseApp;
|
||||||
|
import com.ruoyi.base.service.IBaseAppService;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app版本管理Controller
|
||||||
|
*
|
||||||
|
* @author vinjor-m
|
||||||
|
* @date 2025-08-25
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/base/app")
|
||||||
|
public class BaseAppController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IBaseAppService baseAppService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询app版本管理列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:app:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public AjaxResult list(BaseApp baseApp,
|
||||||
|
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize)
|
||||||
|
{
|
||||||
|
Page<BaseApp> page = new Page<>(pageNum, pageSize);
|
||||||
|
IPage<BaseApp> list = baseAppService.queryListPage(baseApp,page);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出app版本管理列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:app:export')")
|
||||||
|
@Log(title = "app版本管理", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, BaseApp baseApp)
|
||||||
|
{
|
||||||
|
List<BaseApp> list = baseAppService.list();
|
||||||
|
ExcelUtil<BaseApp> util = new ExcelUtil<BaseApp>(BaseApp.class);
|
||||||
|
util.exportExcel(response, list, "app版本管理数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取app版本管理详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:app:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||||
|
{
|
||||||
|
return success(baseAppService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增app版本管理
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:app:add')")
|
||||||
|
@Log(title = "app版本管理", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody BaseApp baseApp)
|
||||||
|
{
|
||||||
|
return toAjax(baseAppService.save(baseApp));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改app版本管理
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:app:edit')")
|
||||||
|
@Log(title = "app版本管理", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody BaseApp baseApp)
|
||||||
|
{
|
||||||
|
return toAjax(baseAppService.updateById(baseApp));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除app版本管理
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:app:remove')")
|
||||||
|
@Log(title = "app版本管理", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable String[] ids)
|
||||||
|
{
|
||||||
|
List<String> list = new ArrayList<>(Arrays.asList(ids));
|
||||||
|
return toAjax(baseAppService.removeByIds(list));
|
||||||
|
}
|
||||||
|
}
|
@ -5,13 +5,11 @@ import cn.hutool.json.JSONObject;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ruoyi.base.domain.BaseApp;
|
||||||
import com.ruoyi.base.domain.BaseInquiry;
|
import com.ruoyi.base.domain.BaseInquiry;
|
||||||
import com.ruoyi.base.domain.BasePic;
|
import com.ruoyi.base.domain.BasePic;
|
||||||
import com.ruoyi.base.domain.BaseSiteInfo;
|
import com.ruoyi.base.domain.BaseSiteInfo;
|
||||||
import com.ruoyi.base.service.IBaseInquiryService;
|
import com.ruoyi.base.service.*;
|
||||||
import com.ruoyi.base.service.IBaseNationalService;
|
|
||||||
import com.ruoyi.base.service.IBasePicService;
|
|
||||||
import com.ruoyi.base.service.IBaseSiteInfoService;
|
|
||||||
import com.ruoyi.busi.domain.*;
|
import com.ruoyi.busi.domain.*;
|
||||||
import com.ruoyi.busi.service.*;
|
import com.ruoyi.busi.service.*;
|
||||||
import com.ruoyi.busi.utils.CommonUtils;
|
import com.ruoyi.busi.utils.CommonUtils;
|
||||||
@ -75,6 +73,8 @@ public class WebController extends BaseController {
|
|||||||
private CommonUtils commonUtils;
|
private CommonUtils commonUtils;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysDictDataService dictDataService;
|
private ISysDictDataService dictDataService;
|
||||||
|
@Autowired
|
||||||
|
private IBaseAppService appService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导航栏接口--所有分类
|
* 导航栏接口--所有分类
|
||||||
@ -376,8 +376,6 @@ public class WebController extends BaseController {
|
|||||||
@GetMapping("/inquirySet")
|
@GetMapping("/inquirySet")
|
||||||
public R<BaseInquiry> inquirySet(@RequestParam(required = true) String tenantId, HttpServletRequest request) {
|
public R<BaseInquiry> inquirySet(@RequestParam(required = true) String tenantId, HttpServletRequest request) {
|
||||||
String ip = CommonUtils.getIpAddr(request);
|
String ip = CommonUtils.getIpAddr(request);
|
||||||
System.out.println(ip);
|
|
||||||
System.out.println(CommonUtils.getAddr(ip));
|
|
||||||
return R.ok(baseInquiryService.getInquiry(tenantId));
|
return R.ok(baseInquiryService.getInquiry(tenantId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -498,4 +496,10 @@ public class WebController extends BaseController {
|
|||||||
public R<String> getCatgIdApp(@RequestParam(required = true) String catgName) {
|
public R<String> getCatgIdApp(@RequestParam(required = true) String catgName) {
|
||||||
return R.ok(dictDataService.selectDictLabel(APP_MENU_KEY,catgName));
|
return R.ok(dictDataService.selectDictLabel(APP_MENU_KEY,catgName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询最新版本APP")
|
||||||
|
@GetMapping("/getNewApp")
|
||||||
|
public R<BaseApp> getNewApp() {
|
||||||
|
return R.ok(appService.selectNewApp());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.ruoyi.base.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.*;
|
||||||
|
import com.ruoyi.common.core.domain.DlBaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app版本管理对象 dl_base_app
|
||||||
|
*
|
||||||
|
* @author vinjor-m
|
||||||
|
* @date 2025-08-25
|
||||||
|
*/
|
||||||
|
@TableName("dl_base_app")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class BaseApp extends DlBaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
@TableId(type = IdType.ASSIGN_UUID)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 版本 */
|
||||||
|
@Excel(name = "版本")
|
||||||
|
private BigDecimal version;
|
||||||
|
|
||||||
|
/** app包下载地址 */
|
||||||
|
@Excel(name = "app包下载地址")
|
||||||
|
private String apkUrl;
|
||||||
|
|
||||||
|
/** 本次升级描述 */
|
||||||
|
@Excel(name = "本次升级描述")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
}
|
@ -81,6 +81,14 @@ public class BaseSiteInfo extends DlBaseEntity
|
|||||||
@Excel(name = "站点logo")
|
@Excel(name = "站点logo")
|
||||||
@ApiModelProperty("站点logo")
|
@ApiModelProperty("站点logo")
|
||||||
private String logo;
|
private String logo;
|
||||||
|
/** 站点logo-移动端 */
|
||||||
|
@Excel(name = "站点logo-移动端")
|
||||||
|
@ApiModelProperty("站点logo-移动端")
|
||||||
|
private String mobileLogo;
|
||||||
|
/** 询盘logo */
|
||||||
|
@Excel(name = "询盘logo")
|
||||||
|
@ApiModelProperty("询盘logo")
|
||||||
|
private String formLogo;
|
||||||
|
|
||||||
/** 站点二维码(或手机访问二维码) */
|
/** 站点二维码(或手机访问二维码) */
|
||||||
@Excel(name = "站点二维码", readConverterExp = "或=手机访问二维码")
|
@Excel(name = "站点二维码", readConverterExp = "或=手机访问二维码")
|
||||||
|
@ -0,0 +1,21 @@
|
|||||||
|
package com.ruoyi.base.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ruoyi.base.domain.BaseApp;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app版本管理Mapper接口
|
||||||
|
*
|
||||||
|
* @author vinjor-m
|
||||||
|
* @date 2025-08-25
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface BaseAppMapper extends BaseMapper<BaseApp>
|
||||||
|
{
|
||||||
|
IPage<BaseApp> queryListPage(@Param("entity") BaseApp entity, Page<BaseApp> page);
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.ruoyi.base.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ruoyi.base.domain.BaseApp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app版本管理Service接口
|
||||||
|
*
|
||||||
|
* @author vinjor-m
|
||||||
|
* @date 2025-08-25
|
||||||
|
*/
|
||||||
|
public interface IBaseAppService extends IService<BaseApp>
|
||||||
|
{
|
||||||
|
IPage<BaseApp> queryListPage(BaseApp pageReqVO, Page<BaseApp> page);
|
||||||
|
|
||||||
|
BaseApp selectNewApp();
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
package com.ruoyi.base.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.ruoyi.common.core.domain.DlBaseEntity;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ruoyi.base.mapper.BaseAppMapper;
|
||||||
|
import com.ruoyi.base.domain.BaseApp;
|
||||||
|
import com.ruoyi.base.service.IBaseAppService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app版本管理Service业务层处理
|
||||||
|
*
|
||||||
|
* @author vinjor-m
|
||||||
|
* @date 2025-08-25
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BaseAppServiceImpl extends ServiceImpl<BaseAppMapper,BaseApp> implements IBaseAppService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private BaseAppMapper baseAppMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<BaseApp> queryListPage(BaseApp pageReqVO, Page<BaseApp> page) {
|
||||||
|
return baseAppMapper.queryListPage(pageReqVO, page);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BaseApp selectNewApp() {
|
||||||
|
LambdaQueryWrapper<BaseApp> queryWrapper = new LambdaQueryWrapper<BaseApp>().orderByDesc(BaseApp::getVersion).orderByDesc(DlBaseEntity::getCreateTime);
|
||||||
|
List<BaseApp> list = this.list(queryWrapper);
|
||||||
|
return list.isEmpty()?null:list.get(0);
|
||||||
|
}
|
||||||
|
}
|
@ -57,9 +57,9 @@ spring:
|
|||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
# 单个文件大小
|
# 单个文件大小
|
||||||
max-file-size: 10MB
|
max-file-size: 100MB
|
||||||
# 设置总上传的文件大小
|
# 设置总上传的文件大小
|
||||||
max-request-size: 20MB
|
max-request-size: 100MB
|
||||||
# 服务模块
|
# 服务模块
|
||||||
devtools:
|
devtools:
|
||||||
restart:
|
restart:
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.base.mapper.BaseAppMapper">
|
||||||
|
|
||||||
|
<resultMap type="BaseApp" id="BaseAppResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="version" column="version" />
|
||||||
|
<result property="apkUrl" column="apk_url" />
|
||||||
|
<result property="content" column="content" />
|
||||||
|
<result property="creator" column="creator" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updater" column="updater" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectBaseAppVo">
|
||||||
|
select id, version, apk_url, content, creator, create_time, updater, update_time, del_flag from dl_base_app
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="queryListPage" parameterType="BaseApp" resultMap="BaseAppResult">
|
||||||
|
<include refid="selectBaseAppVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="entity.version != null "> and version like concat('%', #{entity.version}, '%')</if>
|
||||||
|
</where>
|
||||||
|
order by create_time desc
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -16,6 +16,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="address" column="address" />
|
<result property="address" column="address" />
|
||||||
<result property="icon" column="icon" />
|
<result property="icon" column="icon" />
|
||||||
<result property="logo" column="logo" />
|
<result property="logo" column="logo" />
|
||||||
|
<result property="mobileLogo" column="mobile_logo" />
|
||||||
|
<result property="formLogo" column="form_logo" />
|
||||||
<result property="qrCode" column="qr_code" />
|
<result property="qrCode" column="qr_code" />
|
||||||
<result property="contactUs" column="contact_us" />
|
<result property="contactUs" column="contact_us" />
|
||||||
<result property="companyInfo" column="company_info" />
|
<result property="companyInfo" column="company_info" />
|
||||||
@ -29,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectBaseSiteInfoVo">
|
<sql id="selectBaseSiteInfoVo">
|
||||||
select id, company_name, fax_number, brand_name, tel, email, teams, copyright, address, icon, logo, qr_code, contact_us,company_info,company_info_app, tenant_id, creator, create_time, updater, update_time, del_flag from dl_base_site_info
|
select id, company_name, fax_number, brand_name, tel, email, teams, copyright, address, icon, logo,mobile_logo,form_logo, qr_code, contact_us,company_info,company_info_app, tenant_id, creator, create_time, updater, update_time, del_flag from dl_base_site_info
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="queryListPage" parameterType="BaseSiteInfo" resultMap="BaseSiteInfoResult">
|
<select id="queryListPage" parameterType="BaseSiteInfo" resultMap="BaseSiteInfoResult">
|
||||||
|
44
dl_vue/src/api/base/app.js
Normal file
44
dl_vue/src/api/base/app.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询app版本管理列表
|
||||||
|
export function listApp(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/app/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询app版本管理详细
|
||||||
|
export function getApp(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/app/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增app版本管理
|
||||||
|
export function addApp(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/app',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改app版本管理
|
||||||
|
export function updateApp(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/app',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除app版本管理
|
||||||
|
export function delApp(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/app/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
242
dl_vue/src/views/base/app/index.vue
Normal file
242
dl_vue/src/views/base/app/index.vue
Normal file
@ -0,0 +1,242 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form @submit.native.prevent :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="版本" prop="version">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.version"
|
||||||
|
placeholder="请输入版本"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['base:app:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="appList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="index" width="60" label="序号" align="center"/>
|
||||||
|
<el-table-column label="版本" align="center" prop="version" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag>{{ parseFloat(scope.row.version).toFixed(1) }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="app包" align="center" prop="apkUrl" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<file-upload v-model="scope.row.apkUrl" :limit="1" :fileType="fileType" :fileSize="50" :disabled="true" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="本次升级描述" align="center" prop="content" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['base:app:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['base:app:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改app版本管理对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="版本" prop="version">
|
||||||
|
<el-input type="number" v-model="form.version" placeholder="请输入版本" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="app包" prop="apkUrl">
|
||||||
|
<file-upload v-model="form.apkUrl" :limit="1" :fileType="fileType" :fileSize="50"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="本次升级描述" prop="content">
|
||||||
|
<el-input v-model="form.content" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listApp, getApp, delApp, addApp, updateApp } from "@/api/base/app";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "App",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
fileType:['apk'],
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// app版本管理表格数据
|
||||||
|
appList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
version: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
version: [
|
||||||
|
{ required: true, message: '请输入版本号', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
apkUrl: [
|
||||||
|
{ required: true, message: '请上传程序包', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询app版本管理列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listApp(this.queryParams).then(response => {
|
||||||
|
this.appList = response.data.records;
|
||||||
|
this.total = response.data.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
version: null,
|
||||||
|
apkUrl: null,
|
||||||
|
content: null,
|
||||||
|
creator: null,
|
||||||
|
createTime: null,
|
||||||
|
updater: null,
|
||||||
|
updateTime: null,
|
||||||
|
delFlag: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加app版本管理";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getApp(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改app版本管理";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateApp(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addApp(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除app版本管理编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delApp(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('base/app/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `app_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -61,17 +61,29 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="站点icon" prop="icon">
|
<el-form-item label="站点icon" prop="icon">
|
||||||
<image-upload v-model="form.icon"/>
|
<image-upload v-model="form.icon" :limit="1" :fileType="fileTypeIcon"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="站点logo" prop="logo">
|
<el-form-item label="站点logo" prop="logo">
|
||||||
<image-upload v-model="form.logo"/>
|
<image-upload v-model="form.logo" :limit="1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="站点logo-移动端" prop="mobileLogo">
|
||||||
|
<image-upload v-model="form.mobileLogo" :limit="1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="询盘logo" prop="formLogo">
|
||||||
|
<image-upload v-model="form.formLogo" :limit="1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="站点二维码" prop="qrCode">
|
<el-form-item label="站点二维码" prop="qrCode">
|
||||||
<image-upload v-model="form.qrCode"/>
|
<image-upload v-model="form.qrCode" :limit="1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -119,6 +131,7 @@ export default {
|
|||||||
name: 'Info',
|
name: 'Info',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
fileTypeIcon:['ico'],
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
id: null,
|
id: null,
|
||||||
@ -132,6 +145,8 @@ export default {
|
|||||||
address: null,
|
address: null,
|
||||||
icon: null,
|
icon: null,
|
||||||
logo: null,
|
logo: null,
|
||||||
|
mobileLogo: null,
|
||||||
|
formLogo: null,
|
||||||
qrCode: null,
|
qrCode: null,
|
||||||
contactUs: null,
|
contactUs: null,
|
||||||
companyInfo: null,
|
companyInfo: null,
|
||||||
@ -164,6 +179,12 @@ export default {
|
|||||||
logo: [
|
logo: [
|
||||||
{ required: true, message: '请上传站点logo', trigger: 'blur' }
|
{ required: true, message: '请上传站点logo', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
|
mobileLogo: [
|
||||||
|
{ required: true, message: '请上传站点logo', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
formLogo: [
|
||||||
|
{ required: true, message: '请上传询盘logo', trigger: 'blur' }
|
||||||
|
],
|
||||||
qrCode: [
|
qrCode: [
|
||||||
{ required: true, message: '请上传站点二维码', trigger: 'blur' }
|
{ required: true, message: '请上传站点二维码', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user