Merge branch 'master' of http://122.51.230.86:3000/dianliang/dl_vue
This commit is contained in:
commit
d9783adf8a
@ -1,44 +1,44 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 查询基础配置-账户配置、小程序配置的内容列表
|
// 查询基础配置-账户配置、小程序配置的内容列表
|
||||||
export function listBaseConfig(query) {
|
export function listConfig(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/baseConfig/list',
|
url: '/base/config/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询基础配置-账户配置、小程序配置的内容详细
|
// 查询基础配置-账户配置、小程序配置的内容详细
|
||||||
export function getBaseConfig(id) {
|
export function getConfig(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/baseConfig/' + id,
|
url: '/base/config/' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增基础配置-账户配置、小程序配置的内容
|
// 新增基础配置-账户配置、小程序配置的内容
|
||||||
export function addBaseConfig(data) {
|
export function addConfig(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/baseConfig',
|
url: '/base/config',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改基础配置-账户配置、小程序配置的内容
|
// 修改基础配置-账户配置、小程序配置的内容
|
||||||
export function updateBaseConfig(data) {
|
export function updateConfig(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/baseConfig',
|
url: '/base/config',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除基础配置-账户配置、小程序配置的内容
|
// 删除基础配置-账户配置、小程序配置的内容
|
||||||
export function delBaseConfig(id) {
|
export function delConfig(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/baseConfig/' + id,
|
url: '/base/config/' + id,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
@ -9,22 +9,6 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</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-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
@ -39,7 +23,7 @@
|
|||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['base:baseConfig:add']"
|
v-hasPermi="['base:config:add']"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -50,7 +34,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
:disabled="single"
|
:disabled="single"
|
||||||
@click="handleUpdate"
|
@click="handleUpdate"
|
||||||
v-hasPermi="['base:baseConfig:edit']"
|
v-hasPermi="['base:config:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -61,7 +45,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['base:baseConfig:remove']"
|
v-hasPermi="['base:config:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -71,19 +55,17 @@
|
|||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['base:baseConfig:export']"
|
v-hasPermi="['base:config:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</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 type="selection" width="55" align="center" />
|
||||||
<el-table-column label="唯一主键" align="center" prop="id" />
|
<el-table-column label="唯一主键" align="center" prop="id" />
|
||||||
<el-table-column label="唯一编码" align="center" prop="code" />
|
<el-table-column label="唯一编码" align="center" prop="code" />
|
||||||
<el-table-column label="json字符串" align="center" prop="jsonStr" />
|
<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">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -91,14 +73,14 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['base:baseConfig:edit']"
|
v-hasPermi="['base:config:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['base:baseConfig:remove']"
|
v-hasPermi="['base:config:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -121,15 +103,6 @@
|
|||||||
<el-form-item label="json字符串" prop="jsonStr">
|
<el-form-item label="json字符串" prop="jsonStr">
|
||||||
<el-input v-model="form.jsonStr" type="textarea" placeholder="请输入内容" />
|
<el-input v-model="form.jsonStr" type="textarea" placeholder="请输入内容" />
|
||||||
</el-form-item>
|
</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>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
@ -140,10 +113,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listBaseConfig, getBaseConfig, delBaseConfig, addBaseConfig, updateBaseConfig } from "@/api/base/baseConfig";
|
import { listConfig, getConfig, delConfig, addConfig, updateConfig } from "@/api/base/config";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "BaseConfig",
|
name: "Config",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@ -159,7 +132,7 @@ export default {
|
|||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 基础配置-账户配置、小程序配置的内容表格数据
|
// 基础配置-账户配置、小程序配置的内容表格数据
|
||||||
baseConfigList: [],
|
configList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
@ -170,8 +143,6 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
code: null,
|
code: null,
|
||||||
jsonStr: null,
|
jsonStr: null,
|
||||||
creator: null,
|
|
||||||
updater: null,
|
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
@ -187,8 +158,8 @@ export default {
|
|||||||
/** 查询基础配置-账户配置、小程序配置的内容列表 */
|
/** 查询基础配置-账户配置、小程序配置的内容列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listBaseConfig(this.queryParams).then(response => {
|
listConfig(this.queryParams).then(response => {
|
||||||
this.baseConfigList = response.rows;
|
this.configList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
@ -238,7 +209,7 @@ export default {
|
|||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids
|
const id = row.id || this.ids
|
||||||
getBaseConfig(id).then(response => {
|
getConfig(id).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改基础配置-账户配置、小程序配置的内容";
|
this.title = "修改基础配置-账户配置、小程序配置的内容";
|
||||||
@ -249,13 +220,13 @@ export default {
|
|||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateBaseConfig(this.form).then(response => {
|
updateConfig(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addBaseConfig(this.form).then(response => {
|
addConfig(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -268,7 +239,7 @@ export default {
|
|||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$modal.confirm('是否确认删除基础配置-账户配置、小程序配置的内容编号为"' + ids + '"的数据项?').then(function() {
|
this.$modal.confirm('是否确认删除基础配置-账户配置、小程序配置的内容编号为"' + ids + '"的数据项?').then(function() {
|
||||||
return delBaseConfig(ids);
|
return delConfig(ids);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
@ -276,9 +247,9 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('base/baseConfig/export', {
|
this.download('base/config/export', {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `baseConfig_${new Date().getTime()}.xlsx`)
|
}, `config_${new Date().getTime()}.xlsx`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
Loading…
Reference in New Issue
Block a user