| 
@@ -99,7 +99,6 @@ | 
 | 
@@ -99,7 +99,6 @@ | 
| 
99
 | 
     screenLinkPageByDeptIdGetDevice,
 | 
99
 | 
     screenLinkPageByDeptIdGetDevice,
 | 
| 
100
 | 
     getOrganizationAlarmConfig,
 | 
100
 | 
     getOrganizationAlarmConfig,
 | 
| 
101
 | 
     byOganizationIdGetMasterDevice,
 | 
101
 | 
     byOganizationIdGetMasterDevice,
 | 
| 
102
 | 
-    getAttribute,
 | 
 | 
   | 
| 
103
 | 
   } from '/@/api/ruleengine/ruleengineApi';
 | 
102
 | 
   } from '/@/api/ruleengine/ruleengineApi';
 | 
| 
104
 | 
   import TriggerOrCondition from './cpns/Trigger-Condition.vue';
 | 
103
 | 
   import TriggerOrCondition from './cpns/Trigger-Condition.vue';
 | 
| 
105
 | 
   import Action from './cpns/Action.vue';
 | 
104
 | 
   import Action from './cpns/Action.vue';
 | 
 | 
@@ -107,8 +106,8 @@ | 
 | 
@@ -107,8 +106,8 @@ | 
| 
107
 | 
   import { formatToDateTime } from '/@/utils/dateUtil';
 | 
106
 | 
   import { formatToDateTime } from '/@/utils/dateUtil';
 | 
| 
108
 | 
 
 | 
107
 | 
 
 | 
| 
109
 | 
   const emit = defineEmits(['register', 'success']);
 | 
108
 | 
   const emit = defineEmits(['register', 'success']);
 | 
| 
110
 | 
-
 | 
 | 
   | 
| 
111
 | 
   const provideOrgid = ref('');
 | 
109
 | 
   const provideOrgid = ref('');
 | 
| 
 | 
   | 
110
 | 
+
 | 
| 
112
 | 
   const { createMessage } = useMessage();
 | 
111
 | 
   const { createMessage } = useMessage();
 | 
| 
113
 | 
   const triggerData = ref([]);
 | 
112
 | 
   const triggerData = ref([]);
 | 
| 
114
 | 
   const conditionData = ref([]);
 | 
113
 | 
   const conditionData = ref([]);
 | 
 | 
@@ -125,8 +124,6 @@ | 
 | 
@@ -125,8 +124,6 @@ | 
| 
125
 | 
   let getConditionFormValue = ref([]);
 | 
124
 | 
   let getConditionFormValue = ref([]);
 | 
| 
126
 | 
   let getActionFormValue = ref([]);
 | 
125
 | 
   let getActionFormValue = ref([]);
 | 
| 
127
 | 
   const editEntryIdData = ref([]);
 | 
126
 | 
   const editEntryIdData = ref([]);
 | 
| 
128
 | 
-  const editEntryIdExcludeDoActionData = ref([]);
 | 
 | 
   | 
| 
129
 | 
-  let editAttrIdData = [];
 | 
 | 
   | 
| 
130
 | 
   const editAlarmConfigData = ref([]);
 | 
127
 | 
   const editAlarmConfigData = ref([]);
 | 
| 
131
 | 
   const isUpdate = ref(false);
 | 
128
 | 
   const isUpdate = ref(false);
 | 
| 
132
 | 
   const id = ref(undefined);
 | 
129
 | 
   const id = ref(undefined);
 | 
 | 
@@ -158,31 +155,24 @@ | 
 | 
@@ -158,31 +155,24 @@ | 
| 
158
 | 
       await setFieldsValue(data.record);
 | 
155
 | 
       await setFieldsValue(data.record);
 | 
| 
159
 | 
       id.value = recordId;
 | 
156
 | 
       id.value = recordId;
 | 
| 
160
 | 
       tenantId.value = recordTenantId;
 | 
157
 | 
       tenantId.value = recordTenantId;
 | 
| 
 | 
   | 
158
 | 
+      //TODO-fengtao-把组织id传给子组件
 | 
| 
161
 | 
       provideOrgid.value = organizationId;
 | 
159
 | 
       provideOrgid.value = organizationId;
 | 
| 
 | 
   | 
160
 | 
+      //TODO-fengtao获取当前执行动作下的设备(master那个接口)
 | 
| 
 | 
   | 
161
 | 
+      getMasterDeviceList.value = await byOganizationIdGetMasterDevice(organizationId);
 | 
| 
 | 
   | 
162
 | 
+      //TODO-fengtao
 | 
| 
162
 | 
       // 获取当前组织下的设备列表
 | 
163
 | 
       // 获取当前组织下的设备列表
 | 
| 
163
 | 
-      const options = await byOganizationIdGetMasterDevice(organizationId);
 | 
 | 
   | 
| 
164
 | 
-      const optionsExcludeDoAction = await screenLinkPageByDeptIdGetDevice({ organizationId });
 | 
164
 | 
+      const options = await screenLinkPageByDeptIdGetDevice({
 | 
| 
 | 
   | 
165
 | 
+        organizationId,
 | 
| 
 | 
   | 
166
 | 
+      });
 | 
| 
165
 | 
       // 获取当前组织下的告警配置
 | 
167
 | 
       // 获取当前组织下的告警配置
 | 
| 
166
 | 
       const alarmConfig = await getOrganizationAlarmConfig({ organizationId });
 | 
168
 | 
       const alarmConfig = await getOrganizationAlarmConfig({ organizationId });
 | 
| 
167
 | 
-      // 获取当前组织下的属性列表
 | 
 | 
   | 
| 
168
 | 
-      const attrList = await getAttribute(
 | 
 | 
   | 
| 
169
 | 
-        organizationId,
 | 
 | 
   | 
| 
170
 | 
-        triggers.map((m) => m.entityId).join(',')
 | 
 | 
   | 
| 
171
 | 
-      );
 | 
 | 
   | 
| 
172
 | 
-      watchAttrList.value = await getAttribute(organizationId, null);
 | 
 | 
   | 
| 
173
 | 
 
 | 
169
 | 
 
 | 
| 
174
 | 
       // 生成回显时对应得组件数量
 | 
170
 | 
       // 生成回显时对应得组件数量
 | 
| 
175
 | 
       triggerData.value = [...new Array(triggers.length).keys()];
 | 
171
 | 
       triggerData.value = [...new Array(triggers.length).keys()];
 | 
| 
176
 | 
       conditionData.value = [...new Array(doConditions.length).keys()];
 | 
172
 | 
       conditionData.value = [...new Array(doConditions.length).keys()];
 | 
| 
177
 | 
       actionData.value = [...new Array(doActions.length).keys()];
 | 
173
 | 
       actionData.value = [...new Array(doActions.length).keys()];
 | 
| 
178
 | 
       // 回显设备列表
 | 
174
 | 
       // 回显设备列表
 | 
| 
179
 | 
-      editEntryIdData.value = options.map((item) => {
 | 
 | 
   | 
| 
180
 | 
-        return {
 | 
 | 
   | 
| 
181
 | 
-          value: item.id,
 | 
 | 
   | 
| 
182
 | 
-          label: item.name,
 | 
 | 
   | 
| 
183
 | 
-        };
 | 
 | 
   | 
| 
184
 | 
-      });
 | 
 | 
   | 
| 
185
 | 
-      editEntryIdExcludeDoActionData.value = optionsExcludeDoAction.items.map((item) => {
 | 
175
 | 
+      editEntryIdData.value = options.items.map((item) => {
 | 
| 
186
 | 
         return {
 | 
176
 | 
         return {
 | 
| 
187
 | 
           value: item.tbDeviceId,
 | 
177
 | 
           value: item.tbDeviceId,
 | 
| 
188
 | 
           label: item.name,
 | 
178
 | 
           label: item.name,
 | 
 | 
@@ -195,17 +185,11 @@ | 
 | 
@@ -195,17 +185,11 @@ | 
| 
195
 | 
         };
 | 
185
 | 
         };
 | 
| 
196
 | 
       });
 | 
186
 | 
       });
 | 
| 
197
 | 
       deviceList.value = editEntryIdData.value;
 | 
187
 | 
       deviceList.value = editEntryIdData.value;
 | 
| 
198
 | 
-      deviceExcludeDoAction.value = editEntryIdExcludeDoActionData.value;
 | 
 | 
   | 
| 
199
 | 
-
 | 
 | 
   | 
| 
200
 | 
-      //回显属性列表
 | 
 | 
   | 
| 
201
 | 
-      editAttrIdData = attrList;
 | 
 | 
   | 
| 
202
 | 
       nextTick(() => {
 | 
188
 | 
       nextTick(() => {
 | 
| 
203
 | 
-        setEditFields(skipUnwrap.triggerItemRefs, editEntryIdExcludeDoActionData);
 | 
 | 
   | 
| 
204
 | 
-        setEditFields(skipUnwrap.conditionItemRefs, editEntryIdExcludeDoActionData);
 | 
189
 | 
+        setEditFields(skipUnwrap.triggerItemRefs, editEntryIdData);
 | 
| 
 | 
   | 
190
 | 
+        setEditFields(skipUnwrap.conditionItemRefs, editEntryIdData);
 | 
| 
205
 | 
         setEditFields(skipUnwrap.actionItemRefs, editEntryIdData);
 | 
191
 | 
         setEditFields(skipUnwrap.actionItemRefs, editEntryIdData);
 | 
| 
206
 | 
         setEditAlarmConfig(skipUnwrap.actionItemRefs, editAlarmConfigData);
 | 
192
 | 
         setEditAlarmConfig(skipUnwrap.actionItemRefs, editAlarmConfigData);
 | 
| 
207
 | 
-        setEditAttr(skipUnwrap.triggerItemRefs, editAttrIdData);
 | 
 | 
   | 
| 
208
 | 
-        setEditAttr(skipUnwrap.conditionItemRefs, editAttrIdData);
 | 
 | 
   | 
| 
209
 | 
       });
 | 
193
 | 
       });
 | 
| 
210
 | 
 
 | 
194
 | 
 
 | 
| 
211
 | 
       const map = {
 | 
195
 | 
       const map = {
 | 
 | 
@@ -216,6 +200,7 @@ | 
 | 
@@ -216,6 +200,7 @@ | 
| 
216
 | 
       // 回显触发器数据---此处是个闭包!
 | 
200
 | 
       // 回显触发器数据---此处是个闭包!
 | 
| 
217
 | 
       triggers.forEach((trigger, index) => {
 | 
201
 | 
       triggers.forEach((trigger, index) => {
 | 
| 
218
 | 
         nextTick(async () => {
 | 
202
 | 
         nextTick(async () => {
 | 
| 
 | 
   | 
203
 | 
+          const selectDeviceId = ref('');
 | 
| 
219
 | 
           // 回显启用规则
 | 
204
 | 
           // 回显启用规则
 | 
| 
220
 | 
           unref(skipUnwrap.triggerItemRefs)[index].currentIndex =
 | 
205
 | 
           unref(skipUnwrap.triggerItemRefs)[index].currentIndex =
 | 
| 
221
 | 
             map[trigger.triggerCondition.schedule.type];
 | 
206
 | 
             map[trigger.triggerCondition.schedule.type];
 | 
 | 
@@ -223,15 +208,12 @@ | 
 | 
@@ -223,15 +208,12 @@ | 
| 
223
 | 
           unref(skipUnwrap.triggerItemRefs)[index].isUpdate = true;
 | 
208
 | 
           unref(skipUnwrap.triggerItemRefs)[index].isUpdate = true;
 | 
| 
224
 | 
           unref(skipUnwrap.triggerItemRefs)[index].alarmScheduleRef.scheduleData =
 | 
209
 | 
           unref(skipUnwrap.triggerItemRefs)[index].alarmScheduleRef.scheduleData =
 | 
| 
225
 | 
             trigger.triggerCondition.schedule;
 | 
210
 | 
             trigger.triggerCondition.schedule;
 | 
| 
226
 | 
-          const getAttrKeyOption = trigger?.triggerCondition?.condition?.condition?.map(
 | 
 | 
   | 
| 
227
 | 
-            (m) => m.key.key
 | 
 | 
   | 
| 
228
 | 
-          );
 | 
 | 
   | 
| 
229
 | 
           unref(skipUnwrap.triggerItemRefs)[index].setFieldsFormValueFun({
 | 
211
 | 
           unref(skipUnwrap.triggerItemRefs)[index].setFieldsFormValueFun({
 | 
| 
230
 | 
             triggered: trigger?.triggerCondition?.condition?.spec?.type,
 | 
212
 | 
             triggered: trigger?.triggerCondition?.condition?.spec?.type,
 | 
| 
231
 | 
             device: trigger?.entityType,
 | 
213
 | 
             device: trigger?.entityType,
 | 
| 
232
 | 
             triggerType: trigger?.triggerType,
 | 
214
 | 
             triggerType: trigger?.triggerType,
 | 
| 
233
 | 
             type1: trigger?.triggerCondition?.condition?.condition[0]?.key?.type,
 | 
215
 | 
             type1: trigger?.triggerCondition?.condition?.condition[0]?.key?.type,
 | 
| 
234
 | 
-            type2: getAttrKeyOption,
 | 
216
 | 
+            type2: trigger?.triggerCondition?.condition?.condition[0]?.key?.key,
 | 
| 
235
 | 
             operationType: trigger?.triggerCondition?.condition?.condition[0]?.valueType,
 | 
217
 | 
             operationType: trigger?.triggerCondition?.condition?.condition[0]?.valueType,
 | 
| 
236
 | 
             detail: trigger?.triggerCondition?.alarmDetails,
 | 
218
 | 
             detail: trigger?.triggerCondition?.alarmDetails,
 | 
| 
237
 | 
             entityId: trigger?.entityId,
 | 
219
 | 
             entityId: trigger?.entityId,
 | 
 | 
@@ -239,6 +221,15 @@ | 
 | 
@@ -239,6 +221,15 @@ | 
| 
239
 | 
             time: trigger?.triggerCondition?.condition?.spec?.predicate?.defaultValue,
 | 
221
 | 
             time: trigger?.triggerCondition?.condition?.spec?.predicate?.defaultValue,
 | 
| 
240
 | 
             timeUnit: trigger?.triggerCondition?.condition?.spec?.unit,
 | 
222
 | 
             timeUnit: trigger?.triggerCondition?.condition?.spec?.unit,
 | 
| 
241
 | 
           });
 | 
223
 | 
           });
 | 
| 
 | 
   | 
224
 | 
+          if (trigger.entityId != undefined) {
 | 
| 
 | 
   | 
225
 | 
+            selectDeviceId.value = trigger?.entityId;
 | 
| 
 | 
   | 
226
 | 
+          }
 | 
| 
 | 
   | 
227
 | 
+          //fengtao-把设备id回传给子组件
 | 
| 
 | 
   | 
228
 | 
+          unref(skipUnwrap.triggerItemRefs)[index].updateFieldAttributeFunc(
 | 
| 
 | 
   | 
229
 | 
+            selectDeviceId.value,
 | 
| 
 | 
   | 
230
 | 
+            provideOrgid.value
 | 
| 
 | 
   | 
231
 | 
+          );
 | 
| 
 | 
   | 
232
 | 
+          //fengtao
 | 
| 
242
 | 
           // 设置值operationType
 | 
233
 | 
           // 设置值operationType
 | 
| 
243
 | 
           unref(skipUnwrap.triggerItemRefs)[index].operationType =
 | 
234
 | 
           unref(skipUnwrap.triggerItemRefs)[index].operationType =
 | 
| 
244
 | 
             trigger.triggerCondition?.condition.condition[0].valueType;
 | 
235
 | 
             trigger.triggerCondition?.condition.condition[0].valueType;
 | 
 | 
@@ -298,15 +289,12 @@ | 
 | 
@@ -298,15 +289,12 @@ | 
| 
298
 | 
           unref(skipUnwrap.conditionItemRefs)[index].isUpdate = true;
 | 
289
 | 
           unref(skipUnwrap.conditionItemRefs)[index].isUpdate = true;
 | 
| 
299
 | 
           unref(skipUnwrap.conditionItemRefs)[index].alarmScheduleRef.scheduleData =
 | 
290
 | 
           unref(skipUnwrap.conditionItemRefs)[index].alarmScheduleRef.scheduleData =
 | 
| 
300
 | 
             condition.triggerCondition.schedule;
 | 
291
 | 
             condition.triggerCondition.schedule;
 | 
| 
301
 | 
-          const getAttrKeyOption = condition?.triggerCondition?.condition?.condition?.map(
 | 
 | 
   | 
| 
302
 | 
-            (m) => m.key.key
 | 
 | 
   | 
| 
303
 | 
-          );
 | 
 | 
   | 
| 
304
 | 
           unref(skipUnwrap.conditionItemRefs)[index].setFieldsFormValueFun({
 | 
292
 | 
           unref(skipUnwrap.conditionItemRefs)[index].setFieldsFormValueFun({
 | 
| 
305
 | 
             triggered: condition?.triggerCondition?.condition?.spec?.type,
 | 
293
 | 
             triggered: condition?.triggerCondition?.condition?.spec?.type,
 | 
| 
306
 | 
             device: condition?.entityType,
 | 
294
 | 
             device: condition?.entityType,
 | 
| 
307
 | 
             triggerType: condition?.triggerType,
 | 
295
 | 
             triggerType: condition?.triggerType,
 | 
| 
308
 | 
             type1: condition?.triggerCondition?.condition?.condition[0]?.key?.type,
 | 
296
 | 
             type1: condition?.triggerCondition?.condition?.condition[0]?.key?.type,
 | 
| 
309
 | 
-            type2: getAttrKeyOption,
 | 
297
 | 
+            type2: condition?.triggerCondition?.condition?.condition[0]?.key?.key,
 | 
| 
310
 | 
             operationType: condition?.triggerCondition?.condition?.condition[0]?.valueType,
 | 
298
 | 
             operationType: condition?.triggerCondition?.condition?.condition[0]?.valueType,
 | 
| 
311
 | 
             detail: condition?.triggerCondition?.alarmDetails,
 | 
299
 | 
             detail: condition?.triggerCondition?.alarmDetails,
 | 
| 
312
 | 
             entityId: condition?.entityId,
 | 
300
 | 
             entityId: condition?.entityId,
 | 
 | 
@@ -493,11 +481,9 @@ | 
 | 
@@ -493,11 +481,9 @@ | 
| 
493
 | 
   // 设置设备的options
 | 
481
 | 
   // 设置设备的options
 | 
| 
494
 | 
   const setEditFields = (linkAge, deviceList) => {
 | 
482
 | 
   const setEditFields = (linkAge, deviceList) => {
 | 
| 
495
 | 
     unref(linkAge).map((item) => {
 | 
483
 | 
     unref(linkAge).map((item) => {
 | 
| 
496
 | 
-      if (item.isTriggerAndConditionFlag == 'isTriggerAndConditionFlag') {
 | 
 | 
   | 
| 
497
 | 
-        item.updateExcludeActionFieldDeviceId(deviceList);
 | 
 | 
   | 
| 
498
 | 
-      } else {
 | 
 | 
   | 
| 
499
 | 
-        item.updateFieldDeviceId(deviceList);
 | 
 | 
   | 
| 
500
 | 
-      }
 | 
484
 | 
+      //TODO-fengtao
 | 
| 
 | 
   | 
485
 | 
+      item.updateFieldDeviceId(deviceList, orgId, isUpdate, getMasterDeviceList);
 | 
| 
 | 
   | 
486
 | 
+      //TODO-fengtao
 | 
| 
501
 | 
     });
 | 
487
 | 
     });
 | 
| 
502
 | 
   };
 | 
488
 | 
   };
 | 
| 
503
 | 
   // 设置告警配置options
 | 
489
 | 
   // 设置告警配置options
 | 
 | 
@@ -506,29 +492,21 @@ | 
 | 
@@ -506,29 +492,21 @@ | 
| 
506
 | 
       item.updateEditFieldAlarmConfig(alarmConfigList);
 | 
492
 | 
       item.updateEditFieldAlarmConfig(alarmConfigList);
 | 
| 
507
 | 
     });
 | 
493
 | 
     });
 | 
| 
508
 | 
   };
 | 
494
 | 
   };
 | 
| 
509
 | 
-  //设置设备属性的options
 | 
 | 
   | 
| 
510
 | 
-  const setEditAttr = (linkAge, attrList) => {
 | 
 | 
   | 
| 
511
 | 
-    unref(linkAge).map((item) => {
 | 
 | 
   | 
| 
512
 | 
-      item.updateFieldAttr(attrList);
 | 
 | 
   | 
| 
513
 | 
-    });
 | 
 | 
   | 
| 
514
 | 
-  };
 | 
 | 
   | 
| 
515
 | 
-
 | 
 | 
   | 
| 
516
 | 
   // 监听组织变化更新设备列表
 | 
495
 | 
   // 监听组织变化更新设备列表
 | 
| 
517
 | 
   const deviceList = ref([]);
 | 
496
 | 
   const deviceList = ref([]);
 | 
| 
 | 
   | 
497
 | 
+  const getMasterDeviceList = ref([]);
 | 
| 
 | 
   | 
498
 | 
+  const orgId = ref('');
 | 
| 
518
 | 
   const alarmConfigList = ref([]);
 | 
499
 | 
   const alarmConfigList = ref([]);
 | 
| 
519
 | 
-  const watchAttrList = ref([]);
 | 
 | 
   | 
| 
520
 | 
-  const deviceExcludeDoAction = ref([]);
 | 
 | 
   | 
| 
521
 | 
   watch(organizationId, async (newValue: string) => {
 | 
500
 | 
   watch(organizationId, async (newValue: string) => {
 | 
| 
522
 | 
     if (!newValue) return;
 | 
501
 | 
     if (!newValue) return;
 | 
| 
523
 | 
-    provideOrgid.value = newValue;
 | 
 | 
   | 
| 
524
 | 
-    const items = await byOganizationIdGetMasterDevice(newValue);
 | 
 | 
   | 
| 
525
 | 
-    const itemExcludeDoAction = await screenLinkPageByDeptIdGetDevice({ organizationId: newValue });
 | 
 | 
   | 
| 
526
 | 
-    deviceExcludeDoAction.value = itemExcludeDoAction.items.map((item) => ({
 | 
 | 
   | 
| 
527
 | 
-      label: item.name,
 | 
 | 
   | 
| 
528
 | 
-      value: item.tbDeviceId,
 | 
 | 
   | 
| 
529
 | 
-    }));
 | 
 | 
   | 
| 
530
 | 
-    deviceList.value = items.map((item) => ({ label: item.name, value: item.id }));
 | 
 | 
   | 
| 
531
 | 
-    watchAttrList.value = await getAttribute(newValue, null);
 | 
502
 | 
+    const { items } = await screenLinkPageByDeptIdGetDevice({ organizationId: newValue });
 | 
| 
 | 
   | 
503
 | 
+    //TODO fengtao
 | 
| 
 | 
   | 
504
 | 
+    getMasterDeviceList.value = await byOganizationIdGetMasterDevice(newValue);
 | 
| 
 | 
   | 
505
 | 
+    //TODO fengtao
 | 
| 
 | 
   | 
506
 | 
+    deviceList.value = items.map((item) => ({ label: item.name, value: item.tbDeviceId }));
 | 
| 
 | 
   | 
507
 | 
+    //TODO fengtao
 | 
| 
 | 
   | 
508
 | 
+    orgId.value = newValue;
 | 
| 
 | 
   | 
509
 | 
+    //TODO fengtao
 | 
| 
532
 | 
     setFields(skipUnwrap.triggerItemRefs, true);
 | 
510
 | 
     setFields(skipUnwrap.triggerItemRefs, true);
 | 
| 
533
 | 
     setFields(skipUnwrap.conditionItemRefs, true);
 | 
511
 | 
     setFields(skipUnwrap.conditionItemRefs, true);
 | 
| 
534
 | 
     setFields(skipUnwrap.actionItemRefs, true);
 | 
512
 | 
     setFields(skipUnwrap.actionItemRefs, true);
 | 
 | 
@@ -541,12 +519,9 @@ | 
 | 
@@ -541,12 +519,9 @@ | 
| 
541
 | 
   function setFields(linkAge, isOrganizationChange = false) {
 | 
519
 | 
   function setFields(linkAge, isOrganizationChange = false) {
 | 
| 
542
 | 
     unref(linkAge).map((item) => {
 | 
520
 | 
     unref(linkAge).map((item) => {
 | 
| 
543
 | 
       isOrganizationChange && item.resetFieldsValueFunc();
 | 
521
 | 
       isOrganizationChange && item.resetFieldsValueFunc();
 | 
| 
544
 | 
-      if (item.isTriggerAndConditionFlag == 'isTriggerAndConditionFlag') {
 | 
 | 
   | 
| 
545
 | 
-        item.updateExcludeActionFieldDeviceId(deviceExcludeDoAction);
 | 
 | 
   | 
| 
546
 | 
-        item.updateFieldAttr(watchAttrList);
 | 
 | 
   | 
| 
547
 | 
-      } else {
 | 
 | 
   | 
| 
548
 | 
-        item.updateFieldDeviceId(deviceList);
 | 
 | 
   | 
| 
549
 | 
-      }
 | 
522
 | 
+      //TODO fengtao
 | 
| 
 | 
   | 
523
 | 
+      item.updateFieldDeviceId(deviceList, orgId, isUpdate, getMasterDeviceList);
 | 
| 
 | 
   | 
524
 | 
+      //TODO fengtao
 | 
| 
550
 | 
     });
 | 
525
 | 
     });
 | 
| 
551
 | 
   }
 | 
526
 | 
   }
 | 
| 
552
 | 
   function setAlarmConfig(linkAge, isOrganizationChange = false) {
 | 
527
 | 
   function setAlarmConfig(linkAge, isOrganizationChange = false) {
 | 
 | 
@@ -609,7 +584,20 @@ | 
 | 
@@ -609,7 +584,20 @@ | 
| 
609
 | 
         id: unref(id),
 | 
584
 | 
         id: unref(id),
 | 
| 
610
 | 
         tenantId: unref(tenantId),
 | 
585
 | 
         tenantId: unref(tenantId),
 | 
| 
611
 | 
       };
 | 
586
 | 
       };
 | 
| 
612
 | 
-
 | 
587
 | 
+      //TODO fengtao---修改之前如果是新增,如果条件筛选页面打开,但没填值,还是可以新增成功
 | 
| 
 | 
   | 
588
 | 
+      const typeBoolean = postAddOrEditData?.triggers?.some((f) => {
 | 
| 
 | 
   | 
589
 | 
+        let type = false;
 | 
| 
 | 
   | 
590
 | 
+        f?.triggerCondition?.condition?.condition?.some((s) => {
 | 
| 
 | 
   | 
591
 | 
+          if (s?.predicate?.value?.defaultValue == undefined) {
 | 
| 
 | 
   | 
592
 | 
+            type = true;
 | 
| 
 | 
   | 
593
 | 
+          } else {
 | 
| 
 | 
   | 
594
 | 
+            type = false;
 | 
| 
 | 
   | 
595
 | 
+          }
 | 
| 
 | 
   | 
596
 | 
+        });
 | 
| 
 | 
   | 
597
 | 
+        return type;
 | 
| 
 | 
   | 
598
 | 
+      });
 | 
| 
 | 
   | 
599
 | 
+      if (typeBoolean) return createMessage.error('请填写条件筛选');
 | 
| 
 | 
   | 
600
 | 
+      //TODO fengtao
 | 
| 
613
 | 
       await screenLinkPageAddApi(postAddOrEditData, unref(isUpdate));
 | 
601
 | 
       await screenLinkPageAddApi(postAddOrEditData, unref(isUpdate));
 | 
| 
614
 | 
       createMessage.success(`${unref(isUpdate) ? '编辑' : '新增'}成功`);
 | 
602
 | 
       createMessage.success(`${unref(isUpdate) ? '编辑' : '新增'}成功`);
 | 
| 
615
 | 
       closeDrawer();
 | 
603
 | 
       closeDrawer();
 | 
 | 
@@ -659,8 +647,14 @@ | 
 | 
@@ -659,8 +647,14 @@ | 
| 
659
 | 
 </script>
 | 
647
 | 
 </script>
 | 
| 
660
 | 
 
 | 
648
 | 
 
 | 
| 
661
 | 
 <style lang="less" scoped>
 | 
649
 | 
 <style lang="less" scoped>
 | 
| 
662
 | 
-  ///统一下拉选择框宽度,否则超出默认宽度会造成页面样式错乱
 | 
 | 
   | 
| 
663
 | 
-  :deep(.ant-select-selector) {
 | 
 | 
   | 
| 
664
 | 
-    max-width: 14.2rem;
 | 
650
 | 
+  //TODO-fengtao
 | 
| 
 | 
   | 
651
 | 
+  ///移除选择框默认样式(24px)否则超出默认宽度会造成页面样式错乱
 | 
| 
 | 
   | 
652
 | 
+  ::v-deep(.ant-select-selector) {
 | 
| 
 | 
   | 
653
 | 
+    padding-right: 0px !important;
 | 
| 
 | 
   | 
654
 | 
+  }
 | 
| 
 | 
   | 
655
 | 
+
 | 
| 
 | 
   | 
656
 | 
+  ::v-deep(.ant-select-selection-overflow) {
 | 
| 
 | 
   | 
657
 | 
+    max-width: 10vw !important;
 | 
| 
665
 | 
   }
 | 
658
 | 
   }
 | 
| 
 | 
   | 
659
 | 
+  //TODO-fengtao
 | 
| 
666
 | 
 </style> | 
660
 | 
 </style> |