其他配置
parent
777e9a8827
commit
1b6003de82
@ -0,0 +1,62 @@
|
||||
package com.flossom.hzMapper.mapper;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxOtherSetting;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 其他配置Mapper接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2023-12-13
|
||||
*/
|
||||
public interface WxOtherSettingMapper {
|
||||
/**
|
||||
* 查询其他配置
|
||||
*
|
||||
* @param id 其他配置主键
|
||||
* @return 其他配置
|
||||
*/
|
||||
public WxOtherSetting selectWxOtherSettingById(Long id);
|
||||
|
||||
/**
|
||||
* 查询其他配置列表
|
||||
*
|
||||
* @param wxOtherSetting 其他配置
|
||||
* @return 其他配置集合
|
||||
*/
|
||||
public List<WxOtherSetting> selectWxOtherSettingList(WxOtherSetting wxOtherSetting);
|
||||
|
||||
/**
|
||||
* 新增其他配置
|
||||
*
|
||||
* @param wxOtherSetting 其他配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxOtherSetting(WxOtherSetting wxOtherSetting);
|
||||
|
||||
/**
|
||||
* 修改其他配置
|
||||
*
|
||||
* @param wxOtherSetting 其他配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxOtherSetting(WxOtherSetting wxOtherSetting);
|
||||
|
||||
/**
|
||||
* 删除其他配置
|
||||
*
|
||||
* @param id 其他配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxOtherSettingById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除其他配置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxOtherSettingByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
<?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.flossom.hzMapper.mapper.WxOtherSettingMapper">
|
||||
|
||||
<resultMap type="WxOtherSetting" id="WxOtherSettingResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="skipAppid" column="skip_appid" />
|
||||
<result property="skipPath" column="skip_path" />
|
||||
<result property="sysVersion" column="sys_version" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWxOtherSettingVo">
|
||||
select id, skip_appid, skip_path, sys_version, status, create_by, create_time, update_by, update_time, remark from wx_other_setting
|
||||
</sql>
|
||||
|
||||
<select id="selectWxOtherSettingList" parameterType="WxOtherSetting" resultMap="WxOtherSettingResult">
|
||||
<include refid="selectWxOtherSettingVo"/>
|
||||
<where>
|
||||
<if test="skipAppid != null and skipAppid != ''"> and skip_appid = #{skipAppid}</if>
|
||||
<if test="skipPath != null and skipPath != ''"> and skip_path = #{skipPath}</if>
|
||||
<if test="sysVersion != null and sysVersion != ''"> and sys_version = #{sysVersion}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWxOtherSettingById" parameterType="Long" resultMap="WxOtherSettingResult">
|
||||
<include refid="selectWxOtherSettingVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertWxOtherSetting" parameterType="WxOtherSetting">
|
||||
insert into wx_other_setting
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="skipAppid != null">skip_appid,</if>
|
||||
<if test="skipPath != null">skip_path,</if>
|
||||
<if test="sysVersion != null">sys_version,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="skipAppid != null">#{skipAppid},</if>
|
||||
<if test="skipPath != null">#{skipPath},</if>
|
||||
<if test="sysVersion != null">#{sysVersion},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWxOtherSetting" parameterType="WxOtherSetting">
|
||||
update wx_other_setting
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="skipAppid != null">skip_appid = #{skipAppid},</if>
|
||||
<if test="skipPath != null">skip_path = #{skipPath},</if>
|
||||
<if test="sysVersion != null">sys_version = #{sysVersion},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWxOtherSettingById" parameterType="Long">
|
||||
delete from wx_other_setting where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWxOtherSettingByIds" parameterType="String">
|
||||
delete from wx_other_setting where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,99 @@
|
||||
package com.flossom.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxOtherSetting;
|
||||
import com.flossom.common.core.utils.poi.ExcelUtil;
|
||||
import com.flossom.common.core.web.controller.BaseController;
|
||||
import com.flossom.common.core.web.domain.AjaxResult;
|
||||
import com.flossom.common.core.web.page.TableDataInfo;
|
||||
import com.flossom.common.log.annotation.Log;
|
||||
import com.flossom.common.log.enums.BusinessType;
|
||||
import com.flossom.common.security.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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.flossom.system.service.IWxOtherSettingService;
|
||||
|
||||
/**
|
||||
* 其他配置Controller
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2023-12-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/otherSetting")
|
||||
public class WxOtherSettingController extends BaseController {
|
||||
@Autowired
|
||||
private IWxOtherSettingService wxOtherSettingService;
|
||||
|
||||
/**
|
||||
* 查询其他配置列表
|
||||
*/
|
||||
@RequiresPermissions("system:otherSetting:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WxOtherSetting wxOtherSetting) {
|
||||
startPage();
|
||||
List<WxOtherSetting> list = wxOtherSettingService.selectWxOtherSettingList(wxOtherSetting);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出其他配置列表
|
||||
*/
|
||||
@RequiresPermissions("system:otherSetting:export")
|
||||
@Log(title = "其他配置", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WxOtherSetting wxOtherSetting) {
|
||||
List<WxOtherSetting> list = wxOtherSettingService.selectWxOtherSettingList(wxOtherSetting);
|
||||
ExcelUtil<WxOtherSetting> util = new ExcelUtil<WxOtherSetting>(WxOtherSetting.class);
|
||||
util.exportExcel(response, list, "其他配置数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取其他配置详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:otherSetting:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(wxOtherSettingService.selectWxOtherSettingById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增其他配置
|
||||
*/
|
||||
@RequiresPermissions("system:otherSetting:add")
|
||||
@Log(title = "其他配置", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WxOtherSetting wxOtherSetting) {
|
||||
return toAjax(wxOtherSettingService.insertWxOtherSetting(wxOtherSetting));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改其他配置
|
||||
*/
|
||||
@RequiresPermissions("system:otherSetting:edit")
|
||||
@Log(title = "其他配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WxOtherSetting wxOtherSetting) {
|
||||
return toAjax(wxOtherSettingService.updateWxOtherSetting(wxOtherSetting));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除其他配置
|
||||
*/
|
||||
@RequiresPermissions("system:otherSetting:remove")
|
||||
@Log(title = "其他配置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(wxOtherSettingService.deleteWxOtherSettingByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.flossom.system.service;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxOtherSetting;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 其他配置Service接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2023-12-13
|
||||
*/
|
||||
public interface IWxOtherSettingService {
|
||||
/**
|
||||
* 查询其他配置
|
||||
*
|
||||
* @param id 其他配置主键
|
||||
* @return 其他配置
|
||||
*/
|
||||
public WxOtherSetting selectWxOtherSettingById(Long id);
|
||||
|
||||
/**
|
||||
* 查询其他配置列表
|
||||
*
|
||||
* @param wxOtherSetting 其他配置
|
||||
* @return 其他配置集合
|
||||
*/
|
||||
public List<WxOtherSetting> selectWxOtherSettingList(WxOtherSetting wxOtherSetting);
|
||||
|
||||
/**
|
||||
* 新增其他配置
|
||||
*
|
||||
* @param wxOtherSetting 其他配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxOtherSetting(WxOtherSetting wxOtherSetting);
|
||||
|
||||
/**
|
||||
* 修改其他配置
|
||||
*
|
||||
* @param wxOtherSetting 其他配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxOtherSetting(WxOtherSetting wxOtherSetting);
|
||||
|
||||
/**
|
||||
* 批量删除其他配置
|
||||
*
|
||||
* @param ids 需要删除的其他配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxOtherSettingByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除其他配置信息
|
||||
*
|
||||
* @param id 其他配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxOtherSettingById(Long id);
|
||||
}
|
||||
@ -0,0 +1,90 @@
|
||||
package com.flossom.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxOtherSetting;
|
||||
import com.flossom.common.core.utils.DateUtils;
|
||||
import com.flossom.hzMapper.mapper.WxOtherSettingMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.flossom.system.service.IWxOtherSettingService;
|
||||
|
||||
/**
|
||||
* 其他配置Service业务层处理
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2023-12-13
|
||||
*/
|
||||
@Service
|
||||
public class WxOtherSettingServiceImpl implements IWxOtherSettingService {
|
||||
@Autowired
|
||||
private WxOtherSettingMapper wxOtherSettingMapper;
|
||||
|
||||
/**
|
||||
* 查询其他配置
|
||||
*
|
||||
* @param id 其他配置主键
|
||||
* @return 其他配置
|
||||
*/
|
||||
@Override
|
||||
public WxOtherSetting selectWxOtherSettingById(Long id) {
|
||||
return wxOtherSettingMapper.selectWxOtherSettingById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询其他配置列表
|
||||
*
|
||||
* @param wxOtherSetting 其他配置
|
||||
* @return 其他配置
|
||||
*/
|
||||
@Override
|
||||
public List<WxOtherSetting> selectWxOtherSettingList(WxOtherSetting wxOtherSetting) {
|
||||
return wxOtherSettingMapper.selectWxOtherSettingList(wxOtherSetting);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增其他配置
|
||||
*
|
||||
* @param wxOtherSetting 其他配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWxOtherSetting(WxOtherSetting wxOtherSetting) {
|
||||
wxOtherSetting.setCreateTime(DateUtils.getNowDate());
|
||||
return wxOtherSettingMapper.insertWxOtherSetting(wxOtherSetting);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改其他配置
|
||||
*
|
||||
* @param wxOtherSetting 其他配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWxOtherSetting(WxOtherSetting wxOtherSetting) {
|
||||
wxOtherSetting.setUpdateTime(DateUtils.getNowDate());
|
||||
return wxOtherSettingMapper.updateWxOtherSetting(wxOtherSetting);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除其他配置
|
||||
*
|
||||
* @param ids 需要删除的其他配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWxOtherSettingByIds(Long[] ids) {
|
||||
return wxOtherSettingMapper.deleteWxOtherSettingByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除其他配置信息
|
||||
*
|
||||
* @param id 其他配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWxOtherSettingById(Long id) {
|
||||
return wxOtherSettingMapper.deleteWxOtherSettingById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询其他配置列表
|
||||
export function listOtherSetting(query) {
|
||||
return request({
|
||||
url: '/system/otherSetting/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询其他配置详细
|
||||
export function getOtherSetting(id) {
|
||||
return request({
|
||||
url: '/system/otherSetting/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增其他配置
|
||||
export function addOtherSetting(data) {
|
||||
return request({
|
||||
url: '/system/otherSetting',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改其他配置
|
||||
export function updateOtherSetting(data) {
|
||||
return request({
|
||||
url: '/system/otherSetting',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除其他配置
|
||||
export function delOtherSetting(id) {
|
||||
return request({
|
||||
url: '/system/otherSetting/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,285 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="商城跳转appid" prop="skipAppid">
|
||||
<el-input
|
||||
v-model="queryParams.skipAppid"
|
||||
placeholder="请输入商城跳转appid"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商城路径" prop="skipPath">
|
||||
<el-input
|
||||
v-model="queryParams.skipPath"
|
||||
placeholder="请输入商城路径"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="系统版本" prop="sysVersion">
|
||||
<el-input
|
||||
v-model="queryParams.sysVersion"
|
||||
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="['system:otherSetting:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:otherSetting:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:otherSetting:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:otherSetting:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="otherSettingList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="${comment}" align="center" prop="id" />
|
||||
<el-table-column label="商城跳转appid" align="center" prop="skipAppid" />
|
||||
<el-table-column label="商城路径" align="center" prop="skipPath" />
|
||||
<el-table-column label="系统版本" align="center" prop="sysVersion" />
|
||||
<el-table-column label="状态" align="center" prop="status" />
|
||||
<el-table-column label="${comment}" align="center" prop="remark" />
|
||||
<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="['system:otherSetting:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:otherSetting: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"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改其他配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="商城跳转appid" prop="skipAppid">
|
||||
<el-input v-model="form.skipAppid" placeholder="请输入商城跳转appid" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商城路径" prop="skipPath">
|
||||
<el-input v-model="form.skipPath" placeholder="请输入商城路径" />
|
||||
</el-form-item>
|
||||
<el-form-item label="系统版本" prop="sysVersion">
|
||||
<el-input v-model="form.sysVersion" placeholder="请输入系统版本" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入${comment}" />
|
||||
</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 { listOtherSetting, getOtherSetting, delOtherSetting, addOtherSetting, updateOtherSetting } from "@/api/system/otherSetting";
|
||||
|
||||
export default {
|
||||
name: "OtherSetting",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 其他配置表格数据
|
||||
otherSettingList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
skipAppid: null,
|
||||
skipPath: null,
|
||||
sysVersion: null,
|
||||
status: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询其他配置列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listOtherSetting(this.queryParams).then(response => {
|
||||
this.otherSettingList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
skipAppid: null,
|
||||
skipPath: null,
|
||||
sysVersion: null,
|
||||
status: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: 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 = "添加其他配置";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getOtherSetting(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改其他配置";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateOtherSetting(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addOtherSetting(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除其他配置编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delOtherSetting(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/otherSetting/export', {
|
||||
...this.queryParams
|
||||
}, `otherSetting_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Loading…
Reference in New Issue