|
@@ -310,10 +310,7 @@ export default defineComponent({
|
|
|
resetForm();
|
|
|
getDevData();
|
|
|
if (row) {
|
|
|
- setType(true);
|
|
|
-
|
|
|
alarm.common.detail(row.id).then((res: any) => {
|
|
|
-
|
|
|
state.requestParams = res.data.condition.triggerCondition;
|
|
|
let product_key = res.data.productKey;
|
|
|
res.data.performAction.action.forEach(function (value: { sendGateway: any; noticeConfig: number; }, index: string | number) {
|
|
@@ -344,6 +341,7 @@ export default defineComponent({
|
|
|
state.typeData = res.list || [];
|
|
|
});
|
|
|
}
|
|
|
+ setType(true);
|
|
|
});
|
|
|
}
|
|
|
state.isShowDialog = true;
|
|
@@ -534,7 +532,7 @@ export default defineComponent({
|
|
|
const setType = (notResetDeviceKey?: boolean) => {
|
|
|
!notResetDeviceKey && (state.ruleForm.deviceKey = '')
|
|
|
|
|
|
- api.common.getdevList({ productKey: state.ruleForm.deviceKey }).then((res: any) => {
|
|
|
+ api.common.getdevList({ productKey: state.ruleForm.productKey }).then((res: any) => {
|
|
|
state.sourceData = res.device;
|
|
|
});
|
|
|
alarm.common.trigger_type(state.ruleForm.productKey).then((res: any) => {
|
|
@@ -582,7 +580,7 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
alarm.common.trigger_params(form).then((res: any) => {
|
|
|
- state.triData = res.list || [];
|
|
|
+ state.triData = res?.list || [];
|
|
|
});
|
|
|
}
|
|
|
|