Showing
1 changed file
with
9 additions
and
0 deletions
@@ -68,6 +68,7 @@ | @@ -68,6 +68,7 @@ | ||
68 | import 'jsoneditor/dist/jsoneditor.min.css'; | 68 | import 'jsoneditor/dist/jsoneditor.min.css'; |
69 | import { QuestionCircleOutlined } from '@ant-design/icons-vue'; | 69 | import { QuestionCircleOutlined } from '@ant-design/icons-vue'; |
70 | import ClearAlarm from './ClearAlarm.vue'; | 70 | import ClearAlarm from './ClearAlarm.vue'; |
71 | + import { useMessage } from '/@/hooks/web/useMessage'; | ||
71 | 72 | ||
72 | const props = defineProps({ | 73 | const props = defineProps({ |
73 | actionIndex: { | 74 | actionIndex: { |
@@ -99,6 +100,8 @@ | @@ -99,6 +100,8 @@ | ||
99 | const refItem = { | 100 | const refItem = { |
100 | clearRuleRefs: ref([]), | 101 | clearRuleRefs: ref([]), |
101 | }; | 102 | }; |
103 | + const { createMessage } = useMessage(); | ||
104 | + | ||
102 | const emit = defineEmits(['deleteAction', 'getActionFormArr']); | 105 | const emit = defineEmits(['deleteAction', 'getActionFormArr']); |
103 | const options = computed(() => { | 106 | const options = computed(() => { |
104 | return [ | 107 | return [ |
@@ -133,6 +136,12 @@ | @@ -133,6 +136,12 @@ | ||
133 | schedule: item.alarmScheduleRef.scheduleData, | 136 | schedule: item.alarmScheduleRef.scheduleData, |
134 | }; | 137 | }; |
135 | }); | 138 | }); |
139 | + //TODO-fengtao-设备验证 | ||
140 | + const validate = getFieldsValue(); | ||
141 | + if (validate.device == 'PART') { | ||
142 | + if (validate.deviceId == undefined) return createMessage.error('请选择设备'); | ||
143 | + } | ||
144 | + //TODO-fengtao-设备验证 | ||
136 | return { | 145 | return { |
137 | ...getFieldsValue(), | 146 | ...getFieldsValue(), |
138 | doContext: unref(jsonInstance.value)?.get(), | 147 | doContext: unref(jsonInstance.value)?.get(), |