Commit afa5d685fb343fb0d90c418845fefff45a1fb86f

Authored by ww
1 parent dc4b1142

fix: DEFECT-774 device info not update on scene the linkage switch org

... ... @@ -17,10 +17,13 @@
17 17 <!-- <Divider orientation="left">触发器</Divider> -->
18 18 <Divider orientation="left"
19 19 ><a-tooltip>
20   - <template #title>场景联动触发的首要条件,"触发器"之间的关系为或,“执行条件”与“触发器”之间的关系为且。</template>
21   - 触发器<QuestionCircleOutlined :style="{fontSize: '14px',marginLeft:'5px'}"/>
22   - </a-tooltip></Divider
23   - >
  20 + <template #title
  21 + >场景联动触发的首要条件,"触发器"之间的关系为或,“执行条件”与“触发器”之间的关系为且。</template
  22 + >
  23 + 触发器<QuestionCircleOutlined
  24 + :style="{ fontSize: '14px', marginLeft: '5px' }"
  25 + /> </a-tooltip
  26 + ></Divider>
24 27 <div>
25 28 <template v-for="(item, index) in triggerData" :key="item">
26 29 <TriggerOrCondition
... ... @@ -44,11 +47,14 @@
44 47 <!-- 执行条件-begin -->
45 48 <Divider orientation="left"
46 49 ><a-tooltip>
47   - <template #title>场景联动触发的次要条件,"执行条件"之间的关系为或,
48   -“执行条件”与“触发器”之间的关系为且。</template>
49   - 执行条件<QuestionCircleOutlined :style="{fontSize: '14px',marginLeft:'5px'}"/>
50   - </a-tooltip></Divider
51   - >
  50 + <template #title
  51 + >场景联动触发的次要条件,"执行条件"之间的关系为或,
  52 + “执行条件”与“触发器”之间的关系为且。</template
  53 + >
  54 + 执行条件<QuestionCircleOutlined
  55 + :style="{ fontSize: '14px', marginLeft: '5px' }"
  56 + /> </a-tooltip
  57 + ></Divider>
52 58 <div>
53 59 <template v-for="(item, index) in conditionData" :key="item">
54 60 <TriggerOrCondition
... ... @@ -72,10 +78,13 @@
72 78 <!-- 执行动作-begin -->
73 79 <Divider orientation="left"
74 80 ><a-tooltip>
75   - <template #title>触发器和执行条件都满足时,场景联动会做什么,例如:设备联动、告警通知等。</template>
76   - 执行动作<QuestionCircleOutlined :style="{fontSize: '14px',marginLeft:'5px'}"/>
77   - </a-tooltip></Divider
78   - >
  81 + <template #title
  82 + >触发器和执行条件都满足时,场景联动会做什么,例如:设备联动、告警通知等。</template
  83 + >
  84 + 执行动作<QuestionCircleOutlined
  85 + :style="{ fontSize: '14px', marginLeft: '5px' }"
  86 + /> </a-tooltip
  87 + ></Divider>
79 88 <div>
80 89 <template v-for="(item, index) in actionData" :key="item">
81 90 <Action
... ... @@ -110,7 +119,7 @@
110 119 import { BasicForm, useForm } from '/@/components/Form';
111 120 import { genTriggerOrConditionData, genActionData } from './config/formatData.ts';
112 121 import { Divider } from 'ant-design-vue';
113   - import { PlusOutlined,QuestionCircleOutlined } from '@ant-design/icons-vue';
  122 + import { PlusOutlined, QuestionCircleOutlined } from '@ant-design/icons-vue';
114 123 import { useMessage } from '/@/hooks/web/useMessage';
115 124 import {
116 125 screenLinkPageAddApi,
... ... @@ -543,11 +552,11 @@
543 552 const alarmConfigList = ref([]);
544 553 watch(organizationId, async (newValue: string) => {
545 554 if (!newValue) return;
546   - const { items } = await screenLinkPageByDeptIdGetDevice({ organizationId: newValue });
  555 + const { items = [] } = await screenLinkPageByDeptIdGetDevice({ organizationId: newValue });
547 556 //TODO fengtao
548 557 getMasterDeviceList.value = await byOganizationIdGetMasterDevice(newValue);
549 558 //TODO fengtao
550   - deviceList.value = items.map((item) => ({ label: item.name, value: item.tbDeviceId }));
  559 + deviceList.value = (items || []).map((item) => ({ label: item.name, value: item.tbDeviceId }));
551 560 //TODO fengtao
552 561 orgId.value = newValue;
553 562 //TODO fengtao
... ... @@ -682,7 +691,7 @@
682 691 //TODO-fengtao
683 692 ///移除选择框默认样式(24px)否则超出默认宽度会造成页面样式错乱
684 693 :deep(.ant-select-selector) {
685   - padding-right: 0px !important;
  694 + padding-right: 0 !important;
686 695 }
687 696
688 697 :deep(.ant-select-selection-overflow) {
... ...
... ... @@ -6,7 +6,7 @@ module.exports = {
6 6 'selector-pseudo-class-no-unknown': [
7 7 true,
8 8 {
9   - ignorePseudoClasses: ['global'],
  9 + ignorePseudoClasses: ['global', 'deep'],
10 10 },
11 11 ],
12 12 'selector-pseudo-element-no-unknown': [
... ...