Browse Source

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

temp
zhaohy 4 months ago
parent
commit
7aa949bdcf
  1. 14
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue
  2. 93
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue
  3. 26
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue
  4. 85
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue
  5. 32
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts
  6. 32
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts
  7. 32
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts
  8. 20
      hx-ai-intelligent/src/view/alarmManagement/energyAlarm/status.vue
  9. 73
      hx-ai-intelligent/src/view/alarmManagement/energyAlarm/ts/config.ts
  10. 20
      hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue
  11. 71
      hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts
  12. 13
      hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/status.vue
  13. 40
      hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/ts/config.ts

14
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue

@ -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) {

93
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue

@ -18,7 +18,7 @@
placeholder="请选择告警频率"
style="width: 100%"
allowClear
:options="alarmFrequencyData"
:options="AlarmFrequencyEnum"
@change="handleChangeAlarmFrequency" />
</a-form-item>
<a-form-item v-if="infoObject.alarmFrequency === 2" name="repetitions" label="重复次数">
@ -45,7 +45,7 @@
placeholder="请选择优先级"
style="width: 100%"
allowClear
:options="priorityData" />
:options="PriorityEnum" />
</a-form-item>
<a-form-item label="监测频率" name="monitorFrequency">
<a-select
@ -53,7 +53,7 @@
placeholder="请选择监测频率"
style="width: 100%"
allowClear
:options="monitorFrequencyData" />
:options="MonitorFrequencyEnumm" />
</a-form-item>
<a-form-item label="启用规则">
<a-switch
@ -79,6 +79,7 @@
import { NsMessage } from '/nerv-lib/component';
import { http } from '/nerv-lib/util';
import { energyAlarms } from '/@/api/alarmManagement/alarmSettings/energyAlarm';
import { getAllEnum } from '/@/api';
const visible = ref(false);
//
@ -104,70 +105,11 @@
});
const formRef = ref();
const emit = defineEmits(['editObject']);
const alarmFrequencyData = ref([
{
label: '单次',
value: 1,
},
{
label: '重复',
value: 2,
},
{
label: '累计',
value: 3,
},
]);
const priorityData = ref([
{
label: '紧急',
value: 1,
},
{
label: '重要',
value: 2,
},
{
label: '一般',
value: 3,
},
]);
const intervalDurationUnitData = ref([
{
label: '分',
value: 1,
},
{
label: '时',
value: 2,
},
{
label: '天',
value: 3,
},
]);
const monitorFrequencyData = ref([
{
label: '小时',
value: 1,
},
{
label: '每日',
value: 2,
},
{
label: '每周',
value: 3,
},
{
label: '月度',
value: 4,
},
{
label: '年度',
value: 5,
},
]);
//
const AlarmFrequencyEnum = ref([]);
const PriorityEnum = ref([]);
const intervalDurationUnitData = ref([]);
const MonitorFrequencyEnumm = ref([]);
const rules = {
alarmTitle: [
{
@ -220,12 +162,29 @@
priority: [{ required: true, message: '请选择优先级', trigger: 'change' }],
monitorTimeUnit: [{ required: true, message: '请选择监测时长单位', trigger: 'change' }],
};
const getMenu = async () => {
let menu = await getAllEnum({
params: [
'PriorityEnum',
'MonitorFrequencyEnumm',
'AlarmFrequencyEnum',
'IntervalDurationUnitEnum',
],
});
PriorityEnum.value = menu.data.PriorityEnum;
MonitorFrequencyEnumm.value = menu.data.MonitorFrequencyEnumm;
AlarmFrequencyEnum.value = menu.data.AlarmFrequencyEnum;
intervalDurationUnitData.value = menu.data.IntervalDurationUnitEnum;
};
const toggle = (value: any) => {
//
getMenu();
//
if (value) {
infoObject.value = value;
} else {
infoObject.value = {
orgId: null,
alarmTitle: null,
alarmFrequency: null,
priority: null,

26
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue

@ -84,7 +84,7 @@
placeholder="请选择取值类型"
allow-clear
style="width: 100%"
:options="qzOptions" />
:options="valueTypeEnum" />
</a-form-item>
<a-form-item label="异常描述" name="abnormalDescription">
<a-textarea
@ -114,7 +114,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"
@ -158,6 +158,7 @@
import { device } from '/@/api/deviceManage';
import { deviceAlarms } from '/@/api/alarmManagement/alarmSettings/deviceAlarms';
import { http } from '/nerv-lib/util';
import { getAllEnum } from '/@/api';
const visible = ref(false);
//
@ -241,18 +242,9 @@
);
};
//
const qzOptions = ref<SelectProps['options']>([
{ value: 1, label: '实时值' },
{ value: 2, label: '平均值' },
]);
const valueTypeEnum = ref<SelectProps['options']>();
//
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 = () => {
@ -299,10 +291,16 @@
}
return null; // null
};
const getMenu = async () => {
let menu = await getAllEnum({ params: ['LogicEnum', 'ValueTypeEnum'] });
logicEnum.value = menu.data.LogicEnum;
valueTypeEnum.value = menu.data.ValueTypeEnum;
};
//
const toggle = async (value: any, info: any) => {
equipmentAlarm.value = info;
//
getMenu();
//
await http
.post(device.queryDeviceTree, { orgId: orgId.value, pageNum: 1, pageSize: 10 })

85
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue

@ -24,7 +24,7 @@
placeholder="请选择监测时长单位"
style="width: 100%"
allowClear
:options="monitorTimeUnitData" />
:options="MonitorTimeUnitEnum" />
</a-form-item>
<a-form-item label="告警频率" name="alarmFrequency">
<a-select
@ -32,7 +32,7 @@
placeholder="请选择告警频率"
style="width: 100%"
allowClear
:options="alarmFrequencyData"
:options="AlarmFrequencyEnum"
@change="handleChangeAlarmFrequency" />
</a-form-item>
<a-form-item v-if="infoObject.alarmFrequency === 2" name="repetitions" label="重复次数">
@ -49,7 +49,7 @@
placeholder="请选择间隔时长单位"
style="width: 80px"
allowClear
:options="intervalDurationUnitData" />
:options="IntervalDurationUnitEnum" />
</template>
</ns-input-number>
</a-form-item>
@ -59,7 +59,7 @@
placeholder="请选择优先级"
style="width: 100%"
allowClear
:options="priorityData" />
:options="PriorityEnum" />
</a-form-item>
<a-form-item label="启用规则">
<a-switch
@ -85,6 +85,7 @@
import { NsMessage } from '/nerv-lib/component';
import { http } from '/nerv-lib/util';
import { deviceAlarms } from '/@/api/alarmManagement/alarmSettings/deviceAlarms';
import { getAllEnum } from '/@/api';
const visible = ref(false);
//id
@ -107,63 +108,27 @@
});
const formRef = ref();
const emit = defineEmits(['editObject']);
const alarmFrequencyData = ref([
{
label: '单次',
value: 1,
},
{
label: '重复',
value: 2,
},
{
label: '累计',
value: 3,
},
]);
const monitorTimeUnitData = ref([
{
label: '分',
value: 1,
},
{
label: '时',
value: 2,
},
{
label: '天',
value: 3,
},
]);
const intervalDurationUnitData = ref([
{
label: '分',
value: 1,
},
{
label: '时',
value: 2,
},
{
label: '天',
value: 3,
},
]);
const priorityData = ref([
{
label: '紧急',
value: 1,
},
{
label: '重要',
value: 2,
},
{
label: '一般',
value: 3,
},
]);
const AlarmFrequencyEnum = ref([]);
const MonitorTimeUnitEnum = ref([]);
const IntervalDurationUnitEnum = ref([]);
const PriorityEnum = ref([]);
const getMenu = async () => {
let menu = await getAllEnum({
params: [
'PriorityEnum',
'MonitorTimeUnitEnum',
'AlarmFrequencyEnum',
'IntervalDurationUnitEnum',
],
});
PriorityEnum.value = menu.data.PriorityEnum;
MonitorTimeUnitEnum.value = menu.data.MonitorTimeUnitEnum;
AlarmFrequencyEnum.value = menu.data.AlarmFrequencyEnum;
IntervalDurationUnitEnum.value = menu.data.IntervalDurationUnitEnum;
};
const toggle = (value: any) => {
//
getMenu();
//
if (value) {
infoObject.value = value;

32
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts

@ -2,6 +2,7 @@ import { http } from '/nerv-lib/util';
import { NsMessage } from '/nerv-lib/component';
import { energyAlarms } from '/@/api/alarmManagement/alarmSettings/energyAlarm';
import { ref } from 'vue';
import { getEnum } from '/@/api';
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
@ -159,24 +160,23 @@ export const energyAlarmConfigs = (
{
field: 'priority',
label: '告警优先级',
component: 'NsSelect',
component: 'nsSelectApi',
// dynamicParams: {
// id: 'deviceName', //帮定上级联动数据
// },
componentProps: {
placeholder: '请选择告警优先级',
api: () => getEnum({ params: { enumType: 'PriorityEnum' } }),
immediate: true,
allowClear: true,
options: [
{
label: '紧急',
value: 1,
},
{
label: '重要',
value: 2,
},
{
label: '一般',
value: 3,
},
],
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择告警优先级',
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
// autoSelectFirst: true,
},
},
{

32
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts

@ -2,6 +2,7 @@ import { http } from '/nerv-lib/util';
import { NsMessage } from '/nerv-lib/component';
import { deviceAlarms } from '/@/api/alarmManagement/alarmSettings/deviceAlarms';
import { ref } from 'vue';
import { getEnum } from '/@/api';
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
@ -158,24 +159,23 @@ export const equipmentAlarmTableConfig = (
{
field: 'priority',
label: '告警优先级',
component: 'NsSelect',
component: 'nsSelectApi',
// dynamicParams: {
// id: 'deviceName', //帮定上级联动数据
// },
componentProps: {
placeholder: '请选择告警优先级',
api: () => getEnum({ params: { enumType: 'PriorityEnum' } }),
immediate: true,
allowClear: true,
options: [
{
label: '紧急',
value: 1,
},
{
label: '重要',
value: 2,
},
{
label: '一般',
value: 3,
},
],
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择告警优先级',
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
// autoSelectFirst: true,
},
},
{

32
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts

@ -1,5 +1,6 @@
import { notificationManagementApi } from '/@/api/alarmManagement/alarmSettings/notificationManagements';
import { ref } from 'vue';
import { getEnum } from '/@/api';
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
@ -91,24 +92,23 @@ export const notificationtableConfig = (notificationManagements: any) => {
{
field: 'priority',
label: '告警优先级',
component: 'NsSelect',
component: 'nsSelectApi',
// dynamicParams: {
// id: 'deviceName', //帮定上级联动数据
// },
componentProps: {
placeholder: '请选择告警优先级',
api: () => getEnum({ params: { enumType: 'PriorityEnum' } }),
immediate: true,
allowClear: true,
options: [
{
label: '紧急',
value: 1,
},
{
label: '重要',
value: 2,
},
{
label: '一般',
value: 3,
},
],
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择告警优先级',
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
// autoSelectFirst: true,
},
},
{

20
hx-ai-intelligent/src/view/alarmManagement/energyAlarm/status.vue

@ -56,6 +56,7 @@
import { NsMessage } from '/nerv-lib/component';
import { http } from '/nerv-lib/util';
import { energyAlarmApi } from '/@/api/alarmManagement/energyAlarm';
import { getEnum } from '/@/api';
export default defineComponent({
components: { NsSteps },
@ -125,21 +126,10 @@
const toggle = async (data) => {
energyAlarm.value = { ...data };
visible.value = true;
if (energyAlarm.value.createWorkOrder === 1) {
stateOptions.value = [
{ value: 1, label: '待处理' },
{ value: 2, label: '处理中' },
{ value: 3, label: '已完成' },
{ value: 4, label: '超时' },
{ value: 5, label: '已关闭' },
];
} else {
stateOptions.value = [
{ value: 1, label: '待处理' },
{ value: 2, label: '处理中' },
{ value: 3, label: '已完成' },
{ value: 5, label: '已关闭' },
];
let states = await getEnum({ params: { enumType: 'AlarmLogStateEnum' } });
stateOptions.value = states.data;
if (energyAlarm.value.createWorkOrder !== 1) {
stateOptions.value = stateOptions.value.filter((item) => item.value !== 4);
}
await http
.post(energyAlarmApi.getSelectAlarmEnergyConsumptionLogStatusProcess, {

73
hx-ai-intelligent/src/view/alarmManagement/energyAlarm/ts/config.ts

@ -1,6 +1,7 @@
import { energyAlarmApi } from '/@/api/alarmManagement/energyAlarm';
import { dict } from '/@/api';
import { ref } from 'vue';
import { getEnum } from '/@/api';
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
@ -24,7 +25,7 @@ const tableKeyMap = [
},
{
title: '类型',
dataIndex: 'priority',
dataIndex: 'dataSourcesTypeName',
},
{
title: '优先级',
@ -107,55 +108,45 @@ export const notificationtableConfig = (look: any, status: any) => {
{
field: 'priority',
label: '优先级',
component: 'NsSelect',
component: 'nsSelectApi',
// dynamicParams: {
// id: 'deviceName', //帮定上级联动数据
// },
componentProps: {
placeholder: '请选择告警优先级',
api: () => getEnum({ params: { enumType: 'PriorityEnum' } }),
immediate: true,
allowClear: true,
options: [
{
label: '紧急',
value: 1,
},
{
label: '重要',
value: 2,
},
{
label: '一般',
value: 3,
},
],
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择告警优先级',
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
// autoSelectFirst: true,
},
},
{
field: 'alarmLogState',
label: '状态',
component: 'NsSelect',
component: 'nsSelectApi',
// dynamicParams: {
// id: 'deviceName', //帮定上级联动数据
// },
componentProps: {
placeholder: '请选择状态',
api: () => getEnum({ params: { enumType: 'AlarmLogStateEnum' } }),
immediate: true,
allowClear: true,
options: [
{
label: '待处理',
value: 1,
},
{
label: '处理中',
value: 2,
},
{
label: '已完成',
value: 3,
},
{
label: '超时',
value: 4,
},
{
label: '关闭',
value: 5,
},
],
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择状态',
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
// autoSelectFirst: true,
},
},
{

20
hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue

@ -56,6 +56,7 @@
import { NsMessage } from '/nerv-lib/component';
import { http } from '/nerv-lib/util';
import { equipmentAlarmApi } from '/@/api/alarmManagement/equipmentAlarm';
import { getEnum } from '/@/api';
export default defineComponent({
components: { NsSteps },
@ -126,21 +127,10 @@
const toggle = async (data) => {
equipmentAlarm.value = { ...data };
visible.value = true;
if (equipmentAlarm.value.createWorkOrder === 1) {
stateOptions.value = [
{ value: 1, label: '待处理' },
{ value: 2, label: '处理中' },
{ value: 3, label: '已完成' },
{ value: 4, label: '超时' },
{ value: 5, label: '已关闭' },
];
} else {
stateOptions.value = [
{ value: 1, label: '待处理' },
{ value: 2, label: '处理中' },
{ value: 3, label: '已完成' },
{ value: 5, label: '已关闭' },
];
let states = await getEnum({ params: { enumType: 'AlarmLogStateEnum' } });
stateOptions.value = states.data;
if (equipmentAlarm.value.createWorkOrder !== 1) {
stateOptions.value = stateOptions.value.filter((item) => item.value !== 4);
}
await http
.post(equipmentAlarmApi.getSelectAlarmEquipmentLogStatusProcess, {

71
hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts

@ -1,5 +1,6 @@
import { equipmentAlarmApi } from '/@/api/alarmManagement/equipmentAlarm';
import { ref } from 'vue';
import { getEnum } from '/@/api';
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
@ -88,55 +89,45 @@ export const notificationtableConfig = (look: any, status: any) => {
{
field: 'priority',
label: '优先级',
component: 'NsSelect',
component: 'nsSelectApi',
// dynamicParams: {
// id: 'deviceName', //帮定上级联动数据
// },
componentProps: {
placeholder: '请选择告警优先级',
api: () => getEnum({ params: { enumType: 'PriorityEnum' } }),
immediate: true,
allowClear: true,
options: [
{
label: '紧急',
value: 1,
},
{
label: '重要',
value: 2,
},
{
label: '一般',
value: 3,
},
],
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择告警优先级',
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
// autoSelectFirst: true,
},
},
{
field: 'alarmLogState',
label: '状态',
component: 'NsSelect',
component: 'nsSelectApi',
// dynamicParams: {
// id: 'deviceName', //帮定上级联动数据
// },
componentProps: {
placeholder: '请选择状态',
api: () => getEnum({ params: { enumType: 'AlarmLogStateEnum' } }),
immediate: true,
allowClear: true,
options: [
{
label: '待处理',
value: 1,
},
{
label: '处理中',
value: 2,
},
{
label: '已完成',
value: 3,
},
{
label: '超时',
value: 4,
},
{
label: '关闭',
value: 5,
},
],
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择状态',
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
// autoSelectFirst: true,
},
},
{

13
hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/status.vue

@ -47,6 +47,7 @@
import { defineComponent } from 'vue';
import { ref } from 'vue';
import NsSteps from '/@/components/ns-steps.vue';
import { getEnum } from '/@/api';
export default defineComponent({
components: { NsSteps },
@ -54,13 +55,7 @@
setup() {
const visible = ref(false);
const infoObject = ref({});
const stateOptions = ref([
{ value: 1, label: '待处理' },
{ value: 2, label: '处理中' },
{ value: 3, label: '已完成' },
{ value: 4, label: '超时' },
{ value: 5, label: '已关闭' },
]);
const stateOptions = ref();
const logList = ref([
{ realName: '李四', state: 3, createTime: '2024-03-10 10:00:00', remarks: '完成' },
{ realName: '王五', state: 5, createTime: '2024-03-10 10:00:00' },
@ -78,7 +73,9 @@
const btnClick = () => {
visible.value = false;
};
const toggle = (data) => {
const toggle = async (data) => {
let states = await getEnum({ params: { enumType: 'AlarmLogStateEnum' } });
stateOptions.value = states.data;
infoObject.value = { ...logList.value[0] };
let stateMap = {
1: '待处理',

40
hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/ts/config.ts

@ -1,5 +1,6 @@
import { gatewayAlarmApi } from '/@/api/alarmManagement/gatewayAlarm';
import { ref } from 'vue';
import { getEnum } from '/@/api';
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
@ -104,32 +105,23 @@ export const notificationtableConfig = (look: any, status: any) => {
{
field: 'alarmLogState',
label: '状态',
component: 'NsSelect',
component: 'nsSelectApi',
// dynamicParams: {
// id: 'deviceName', //帮定上级联动数据
// },
componentProps: {
placeholder: '请选择状态',
api: () => getEnum({ params: { enumType: 'AlarmLogStateEnum' } }),
immediate: true,
allowClear: true,
options: [
{
label: '待处理',
value: 1,
},
{
label: '处理中',
value: 2,
},
{
label: '已完成',
value: 3,
},
{
label: '超时',
value: 4,
},
{
label: '关闭',
value: 5,
},
],
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择状态',
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
// autoSelectFirst: true,
},
},
{

Loading…
Cancel
Save