前台展示优化

This commit is contained in:
zhanghan11 2024-05-13 16:54:12 +08:00
parent 06d6c22f9f
commit be463380e1
3 changed files with 33 additions and 33 deletions

View File

@ -1,44 +1,44 @@
import request from '@/utils/request' import request from "@/utils/request";
// 查询警规则配置列表 // 查询警规则配置列表
export function listConfig(query) { export function listConfig(query) {
return request({ return request({
url: '/ipc/config/list', url: "/ipc/config/list",
method: 'get', method: "get",
params: query params: query,
}) });
} }
// 查询警规则配置详细 // 查询警规则配置详细
export function getConfig(id) { export function getConfig(id) {
return request({ return request({
url: '/ipc/config/' + id, url: "/ipc/config/" + id,
method: 'get' method: "get",
}) });
} }
// 新增警规则配置 // 新增警规则配置
export function addConfig(data) { export function addConfig(data) {
return request({ return request({
url: '/ipc/config', url: "/ipc/config",
method: 'post', method: "post",
data: data data: data,
}) });
} }
// 修改警规则配置 // 修改警规则配置
export function updateConfig(data) { export function updateConfig(data) {
return request({ return request({
url: '/ipc/config', url: "/ipc/config",
method: 'put', method: "put",
data: data data: data,
}) });
} }
// 删除警规则配置 // 删除警规则配置
export function delConfig(id) { export function delConfig(id) {
return request({ return request({
url: '/ipc/config/' + id, url: "/ipc/config/" + id,
method: 'delete' method: "delete",
}) });
} }

View File

@ -104,7 +104,7 @@ export default {
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// //
configList: [], configList: [],
// //
title: "报警规则选择", title: "报警规则选择",
@ -172,7 +172,7 @@ export default {
console.log(error); console.log(error);
}); });
}, },
/** 查询警规则配置列表 */ /** 查询警规则配置列表 */
getList() { getList() {
this.loading = true; this.loading = true;
this.queryParams.partKey = this.partKey; this.queryParams.partKey = this.partKey;

View File

@ -217,7 +217,7 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改警规则配置对话框 --> <!-- 添加或修改警规则配置对话框 -->
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
@ -383,13 +383,13 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item <el-form-item
label="规则值显示" label="规则描述"
prop="referenceName" prop="referenceName"
> >
<el-input <el-input
type="textarea" type="textarea"
v-model="form.referenceName" v-model="form.referenceName"
placeholder="请输入规则值显示" placeholder="请输入规则描述"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -446,7 +446,7 @@ export default {
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// //
configList: [], configList: [],
// //
title: "", title: "",
@ -560,7 +560,7 @@ export default {
console.log(error); console.log(error);
}); });
}, },
/** 查询警规则配置列表 */ /** 查询警规则配置列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listConfig(this.queryParams).then((response) => { listConfig(this.queryParams).then((response) => {
@ -607,7 +607,7 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加警规则配置"; this.title = "添加警规则配置";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
@ -616,7 +616,7 @@ export default {
getConfig(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 = "修改警规则配置";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */