Showing
1 changed file
with
9 additions
and
0 deletions
| ... | ... | @@ -68,6 +68,7 @@ |
| 68 | 68 | import 'jsoneditor/dist/jsoneditor.min.css'; |
| 69 | 69 | import { QuestionCircleOutlined } from '@ant-design/icons-vue'; |
| 70 | 70 | import ClearAlarm from './ClearAlarm.vue'; |
| 71 | + import { useMessage } from '/@/hooks/web/useMessage'; | |
| 71 | 72 | |
| 72 | 73 | const props = defineProps({ |
| 73 | 74 | actionIndex: { |
| ... | ... | @@ -99,6 +100,8 @@ |
| 99 | 100 | const refItem = { |
| 100 | 101 | clearRuleRefs: ref([]), |
| 101 | 102 | }; |
| 103 | + const { createMessage } = useMessage(); | |
| 104 | + | |
| 102 | 105 | const emit = defineEmits(['deleteAction', 'getActionFormArr']); |
| 103 | 106 | const options = computed(() => { |
| 104 | 107 | return [ |
| ... | ... | @@ -133,6 +136,12 @@ |
| 133 | 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 | 145 | return { |
| 137 | 146 | ...getFieldsValue(), |
| 138 | 147 | doContext: unref(jsonInstance.value)?.get(), | ... | ... |