This commit is contained in:
PQZ 2025-03-17 14:58:55 +08:00
commit d9783adf8a
2 changed files with 28 additions and 57 deletions

View File

@ -1,44 +1,44 @@
import request from '@/utils/request'
// 查询基础配置-账户配置、小程序配置的内容列表
export function listBaseConfig(query) {
export function listConfig(query) {
return request({
url: '/base/baseConfig/list',
url: '/base/config/list',
method: 'get',
params: query
})
}
// 查询基础配置-账户配置、小程序配置的内容详细
export function getBaseConfig(id) {
export function getConfig(id) {
return request({
url: '/base/baseConfig/' + id,
url: '/base/config/' + id,
method: 'get'
})
}
// 新增基础配置-账户配置、小程序配置的内容
export function addBaseConfig(data) {
export function addConfig(data) {
return request({
url: '/base/baseConfig',
url: '/base/config',
method: 'post',
data: data
})
}
// 修改基础配置-账户配置、小程序配置的内容
export function updateBaseConfig(data) {
export function updateConfig(data) {
return request({
url: '/base/baseConfig',
url: '/base/config',
method: 'put',
data: data
})
}
// 删除基础配置-账户配置、小程序配置的内容
export function delBaseConfig(id) {
export function delConfig(id) {
return request({
url: '/base/baseConfig/' + id,
url: '/base/config/' + id,
method: 'delete'
})
}

View File

@ -9,22 +9,6 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建人" prop="creator">
<el-input
v-model="queryParams.creator"
placeholder="请输入创建人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="更新人" prop="updater">
<el-input
v-model="queryParams.updater"
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>
@ -39,7 +23,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['base:baseConfig:add']"
v-hasPermi="['base:config:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
@ -50,7 +34,7 @@
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['base:baseConfig:edit']"
v-hasPermi="['base:config:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
@ -61,7 +45,7 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['base:baseConfig:remove']"
v-hasPermi="['base:config:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
@ -71,19 +55,17 @@
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['base:baseConfig:export']"
v-hasPermi="['base:config:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="baseConfigList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="唯一主键" align="center" prop="id" />
<el-table-column label="唯一编码" align="center" prop="code" />
<el-table-column label="json字符串" align="center" prop="jsonStr" />
<el-table-column label="创建人" align="center" prop="creator" />
<el-table-column label="更新人" align="center" prop="updater" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -91,14 +73,14 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['base:baseConfig:edit']"
v-hasPermi="['base:config:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['base:baseConfig:remove']"
v-hasPermi="['base:config:remove']"
>删除</el-button>
</template>
</el-table-column>
@ -121,15 +103,6 @@
<el-form-item label="json字符串" prop="jsonStr">
<el-input v-model="form.jsonStr" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="创建人" prop="creator">
<el-input v-model="form.creator" placeholder="请输入创建人" />
</el-form-item>
<el-form-item label="更新人" prop="updater">
<el-input v-model="form.updater" placeholder="请输入更新人" />
</el-form-item>
<el-form-item label="是否删除(0未删除|1已删除)" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入是否删除(0未删除|1已删除)" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -140,10 +113,10 @@
</template>
<script>
import { listBaseConfig, getBaseConfig, delBaseConfig, addBaseConfig, updateBaseConfig } from "@/api/base/baseConfig";
import { listConfig, getConfig, delConfig, addConfig, updateConfig } from "@/api/base/config";
export default {
name: "BaseConfig",
name: "Config",
data() {
return {
//
@ -159,7 +132,7 @@ export default {
//
total: 0,
// -
baseConfigList: [],
configList: [],
//
title: "",
//
@ -170,8 +143,6 @@ export default {
pageSize: 10,
code: null,
jsonStr: null,
creator: null,
updater: null,
},
//
form: {},
@ -187,8 +158,8 @@ export default {
/** 查询基础配置-账户配置、小程序配置的内容列表 */
getList() {
this.loading = true;
listBaseConfig(this.queryParams).then(response => {
this.baseConfigList = response.rows;
listConfig(this.queryParams).then(response => {
this.configList = response.rows;
this.total = response.total;
this.loading = false;
});
@ -238,7 +209,7 @@ export default {
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getBaseConfig(id).then(response => {
getConfig(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改基础配置-账户配置、小程序配置的内容";
@ -249,13 +220,13 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateBaseConfig(this.form).then(response => {
updateConfig(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addBaseConfig(this.form).then(response => {
addConfig(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
@ -268,7 +239,7 @@ export default {
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除基础配置-账户配置、小程序配置的内容编号为"' + ids + '"的数据项?').then(function() {
return delBaseConfig(ids);
return delConfig(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
@ -276,9 +247,9 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download('base/baseConfig/export', {
this.download('base/config/export', {
...this.queryParams
}, `baseConfig_${new Date().getTime()}.xlsx`)
}, `config_${new Date().getTime()}.xlsx`)
}
}
};