fix:修改枚举 添加数据隔离

This commit is contained in:
zhaohy
2024-07-25 15:39:32 +08:00
parent 6478070bd8
commit 7aa949bdcf
13 changed files with 210 additions and 341 deletions

View File

@@ -96,7 +96,7 @@
<a-select
v-model:value="infoObject.alarmList[index - 1].logic"
style="width: 70px; margin-left: 12px"
:options="ljOptions" />
:options="logicEnum" />
<span style="line-height: 32px; margin-left: 32px">{{ `数值${index}:` }}</span>
<a-input
style="width: 65px; margin-left: 6px"
@@ -139,7 +139,7 @@
import { device, group } from '/@/api/deviceManage';
import { energyAlarms } from '/@/api/alarmManagement/alarmSettings/energyAlarm';
import { http } from '/nerv-lib/util';
import { dict } from '/@/api';
import { dict, getEnum } from '/@/api';
const visible = ref(false);
//父级数据
@@ -256,13 +256,7 @@
);
};
//逻辑
const ljOptions = ref<SelectProps['options']>([
{ value: 0, label: '≥' },
{ value: 1, label: '>' },
{ value: 2, label: '≤' },
{ value: 3, label: '<' },
{ value: 4, label: '=' },
]);
const logicEnum = ref<SelectProps['options']>([]);
//开关
const clickSwitch = () => {
if (infoObject.value.enableRules === 1) {
@@ -273,6 +267,8 @@
};
//父调子 页面显示方法
const toggle = async (value: any, info: any) => {
let menu = await getEnum({ params: { enumType: 'LogicEnum' } });
logicEnum.value = menu.data;
// 数据来源
let energyType = await dict({ params: { dicKey: 'ENERGY_TYPE' } });
if (energyType.data.data) {