diff --git a/src/views/iot/project/profileV2/ESceneManage/index.vue b/src/views/iot/project/profileV2/ESceneManage/index.vue index d87fbc7f..52cc51ba 100644 --- a/src/views/iot/project/profileV2/ESceneManage/index.vue +++ b/src/views/iot/project/profileV2/ESceneManage/index.vue @@ -1,6 +1,6 @@ @@ -295,12 +299,15 @@ - @@ -318,8 +325,7 @@ import DialogTemplate from "@/components/DialogTemplate"; import ESceneTriggers from "./ESceneTriggers/index"; import ETagCard from "@/components/Cards/ETagCard"; import ESceneAction from "./ESceneAction/index"; -import ELogging from './ELogging' - +import ELogging from "./ELogging"; export default { name: "ESceneManage", @@ -349,7 +355,13 @@ export default { }, }, }, - components: { DialogTemplate, ESceneTriggers, ETagCard, ESceneAction, ELogging }, + components: { + DialogTemplate, + ESceneTriggers, + ETagCard, + ESceneAction, + ELogging, + }, data() { return { queryParams: {}, @@ -484,13 +496,16 @@ export default { isTrue = false; } - if ( - e.actionType === "NOTIFIER" && - (!e.sceneActionNotifierContacts[0] || - !e.sceneActionNotifierContacts[0]["contactsRelList"]) - ) { - this.msgError("执行条件中有条件未选择联系人!"); - isTrue = false; + if (e.actionType === "NOTIFIER") { + let arr = e.sceneActionNotifierContacts.filter((v) => { + if ((!v["contactsRelList"]) || v["contactsRelList"].length <= 0) { + return v; + } + }); + if (arr && arr.length > 0) { + this.msgError("执行条件中有条件未选择联系人!"); + isTrue = false; + } } }); return isTrue;