Commit a4128d62 authored by 李鹏 's avatar 李鹏

dict

parent a1ef092e
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
@click="changeUseRow(row)" @click="changeUseRow(row)"
:labels="['否', '是']" :labels="['否', '是']"
:values="[2, 1]" :values="[2, 1]"
:disabled="nodeClassifyId === 3 && row.built_in === 1"
v-model="row.status"></bg-switch> v-model="row.status"></bg-switch>
</template> </template>
<template v-slot:action="{ row }"> <template v-slot:action="{ row }">
...@@ -405,6 +406,8 @@ const getTableRows = () => { ...@@ -405,6 +406,8 @@ const getTableRows = () => {
}; // 获取表格数据 }; // 获取表格数据
const changeUseRow = (row) => { const changeUseRow = (row) => {
//预警规则类型且为内置数据的不可编辑删除
if (row.class === 3 && row.built_in == 1) return;
axios.put(`/v1/api/dict/status?id=${row.id}&status=${row.status}`).then((res) => { axios.put(`/v1/api/dict/status?id=${row.id}&status=${row.status}`).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
ElMessage.success(res.data.msg); ElMessage.success(res.data.msg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment