From 2b183237458e586779042349589d9947cf283d80 Mon Sep 17 00:00:00 2001 From: 100011797 <2642441182@qq.com> Date: Wed, 15 Mar 2023 11:39:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9C=BA=E6=99=AF=E8=81=94=E5=8A=A8-?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E9=85=8D=E7=BD=AE-options=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/notice/config.ts | 4 +- src/views/Northbound/AliCloud/index.vue | 4 +- src/views/Northbound/DuerOS/index.vue | 4 +- src/views/edge/Device/index.vue | 22 +- .../rule-engine/Scene/Save/Timer/index.vue | 18 +- .../Scene/Save/action/Delay/index.vue | 6 +- .../Scene/Save/action/Device/Product.vue | 16 +- .../Save/action/Device/actions/EditTable.vue | 7 +- .../action/Device/actions/WriteProperty.vue | 4 +- .../Save/action/Device/actions/index.vue | 5 +- .../Save/action/Device/device/Device.vue | 6 +- .../Scene/Save/action/Device/device/index.vue | 8 +- .../Scene/Save/action/ListItem/Item.vue | 14 +- .../Save/action/Modal/ActionTypeComponent.vue | 4 +- .../Scene/Save/action/Modal/index.vue | 8 +- .../Scene/Save/action/Notify/NotifyConfig.vue | 63 +- .../Save/action/Notify/NotifyTemplate.vue | 30 +- .../Scene/Save/action/Notify/NotifyWay.vue | 7 +- .../action/Notify/VariableDefinitions.vue | 43 +- .../Scene/Save/action/Notify/index.vue | 79 +- .../action/Notify/variableItem/BuildIn.vue | 20 +- .../action/Notify/variableItem/InputFile.vue | 8 +- .../Save/action/Notify/variableItem/Org.vue | 3 +- .../Save/action/Notify/variableItem/Tag.vue | 12 +- .../Save/action/Notify/variableItem/User.vue | 195 +- .../rule-engine/Scene/Save/action/index.vue | 51 +- .../Save/components/ShakeLimit/index.vue | 8 +- yarn.lock | 11855 ++++++++-------- 28 files changed, 6499 insertions(+), 6005 deletions(-) diff --git a/src/api/notice/config.ts b/src/api/notice/config.ts index d3e4854a..31432454 100644 --- a/src/api/notice/config.ts +++ b/src/api/notice/config.ts @@ -42,7 +42,7 @@ export default { // 不分页-列表 queryListNoPaging: (data: any) => post(`/notifier/config/_query/no-paging?paging=false`, data), // - queryDingTalkUsers: (id: string) => get(`/notifier/dingtalk/corp/${id}/users?sorts[0].name='name'&sorts[0].order=asc`), + queryDingTalkUsers: (id: string) => get(`/notifier/dingtalk/corp/${id}/users?sorts[0].name="name"&sorts[0].order=asc`), // - queryWechatUsers: (id: string) => get(`/notifier/wechat/corp/${id}/users?sorts[0].name='name'&sorts[0].order=asc`), + queryWechatUsers: (id: string) => get(`/notifier/wechat/corp/${id}/users?sorts[0].name="name"&sorts[0].order=asc`), } \ No newline at end of file diff --git a/src/views/Northbound/AliCloud/index.vue b/src/views/Northbound/AliCloud/index.vue index b97b262a..ec33051d 100644 --- a/src/views/Northbound/AliCloud/index.vue +++ b/src/views/Northbound/AliCloud/index.vue @@ -149,8 +149,8 @@ const columns = [ }, { title: '说明', - dataIndex: 'describe', - key: 'describe', + dataIndex: 'description', + key: 'description', search: { type: 'string', }, diff --git a/src/views/Northbound/DuerOS/index.vue b/src/views/Northbound/DuerOS/index.vue index ffebf7f8..7d4b4f02 100644 --- a/src/views/Northbound/DuerOS/index.vue +++ b/src/views/Northbound/DuerOS/index.vue @@ -191,8 +191,8 @@ const columns = [ }, { title: '说明', - dataIndex: 'describe', - key: 'describe', + dataIndex: 'description', + key: 'description', }, { title: '状态', diff --git a/src/views/edge/Device/index.vue b/src/views/edge/Device/index.vue index b14641ab..11c53a0a 100644 --- a/src/views/edge/Device/index.vue +++ b/src/views/edge/Device/index.vue @@ -144,7 +144,7 @@ diff --git a/src/views/rule-engine/Scene/Save/action/Delay/index.vue b/src/views/rule-engine/Scene/Save/action/Delay/index.vue index 8bc0657a..5845c728 100644 --- a/src/views/rule-engine/Scene/Save/action/Delay/index.vue +++ b/src/views/rule-engine/Scene/Save/action/Delay/index.vue @@ -7,7 +7,7 @@ @ok="onOk" :maskClosable="false" > - - + diff --git a/src/views/rule-engine/Scene/Save/action/Device/Product.vue b/src/views/rule-engine/Scene/Save/action/Device/Product.vue index 9f88a95d..f51b9990 100644 --- a/src/views/rule-engine/Scene/Save/action/Device/Product.vue +++ b/src/views/rule-engine/Scene/Save/action/Device/Product.vue @@ -1,12 +1,12 @@ diff --git a/src/views/rule-engine/Scene/Save/action/Device/actions/EditTable.vue b/src/views/rule-engine/Scene/Save/action/Device/actions/EditTable.vue index e0774a9b..1481ff82 100644 --- a/src/views/rule-engine/Scene/Save/action/Device/actions/EditTable.vue +++ b/src/views/rule-engine/Scene/Save/action/Device/actions/EditTable.vue @@ -15,13 +15,16 @@ diff --git a/src/views/rule-engine/Scene/Save/action/Device/actions/WriteProperty.vue b/src/views/rule-engine/Scene/Save/action/Device/actions/WriteProperty.vue index b1ed87ed..d4ac0fba 100644 --- a/src/views/rule-engine/Scene/Save/action/Device/actions/WriteProperty.vue +++ b/src/views/rule-engine/Scene/Save/action/Device/actions/WriteProperty.vue @@ -1,6 +1,6 @@ diff --git a/src/views/rule-engine/Scene/Save/action/Device/actions/index.vue b/src/views/rule-engine/Scene/Save/action/Device/actions/index.vue index 5697da00..c4f27a45 100644 --- a/src/views/rule-engine/Scene/Save/action/Device/actions/index.vue +++ b/src/views/rule-engine/Scene/Save/action/Device/actions/index.vue @@ -1,6 +1,6 @@ - + @@ -211,6 +211,7 @@ watch( watch( () => props.values?.message, (newVal) => { + console.log(newVal) if (newVal?.messageType) { modelRef.message = newVal; if (newVal.messageType === 'INVOKE_FUNCTION' && newVal.functionId) { diff --git a/src/views/rule-engine/Scene/Save/action/Device/device/Device.vue b/src/views/rule-engine/Scene/Save/action/Device/device/Device.vue index 0dd67d5a..00eb1e33 100644 --- a/src/views/rule-engine/Scene/Save/action/Device/device/Device.vue +++ b/src/views/rule-engine/Scene/Save/action/Device/device/Device.vue @@ -1,12 +1,12 @@ - 点击配置执行动作 + 点击配置执行动作
{{ name + 1 }}
- +
-
+ diff --git a/src/views/rule-engine/Scene/Save/action/Notify/NotifyConfig.vue b/src/views/rule-engine/Scene/Save/action/Notify/NotifyConfig.vue index c1bfb504..400070dc 100644 --- a/src/views/rule-engine/Scene/Save/action/Notify/NotifyConfig.vue +++ b/src/views/rule-engine/Scene/Save/action/Notify/NotifyConfig.vue @@ -1,5 +1,5 @@ @@ -100,7 +85,7 @@ const props = defineProps({ }, }); -const emit = defineEmits(['update:value']); +const emit = defineEmits(['update:value', 'change']); const getLogo = (type: string, provider: string) => { return MSG_TYPE[type].find((f: any) => f.value === provider)?.logo; @@ -140,17 +125,39 @@ const columns = [ }, ]; +const query = (e: Record) => + ConfigApi.list({ + ...e, + terms: [ + ...e?.terms, + { + terms: [ + { + termType: 'eq', + column: 'type', + value: props.notifyType, + }, + ], + }, + ], + sorts: [ + { name: 'id', value: props.value }, + { name: 'createTime', order: 'desc' }, + ], + }); + const handleSearch = (_params: any) => { params.value = _params; }; -const cancelSelect = () => { - _selectedRowKeys.value = []; +const onSelectChange = (keys: string[]) => { + _selectedRowKeys.value = [...keys]; }; const handleClick = (dt: any) => { _selectedRowKeys.value = [dt.id]; emit('update:value', dt.id); + emit('change', { provider: dt?.provider }); }; watch( @@ -176,7 +183,7 @@ watch( padding-left: 0px; } -.logo{ +.logo { width: 88px; height: 88px; } diff --git a/src/views/rule-engine/Scene/Save/action/Notify/NotifyTemplate.vue b/src/views/rule-engine/Scene/Save/action/Notify/NotifyTemplate.vue index be71b31c..3905faf3 100644 --- a/src/views/rule-engine/Scene/Save/action/Notify/NotifyTemplate.vue +++ b/src/views/rule-engine/Scene/Save/action/Notify/NotifyTemplate.vue @@ -1,5 +1,5 @@ @@ -85,7 +85,7 @@ const props = defineProps({ }, }); -const emit = defineEmits(['update:value']); +const emit = defineEmits(['update:value', 'change']); const getLogo = (type: string, provider: string) => { return MSG_TYPE[type].find((f: any) => f.value === provider)?.logo; @@ -129,13 +129,14 @@ const handleSearch = (_params: any) => { params.value = _params; }; -const cancelSelect = () => { - _selectedRowKeys.value = []; -}; - const handleClick = (dt: any) => { _selectedRowKeys.value = [dt.id]; emit('update:value', dt.id); + emit('change', { templateName: dt?.name }); +}; + +const onSelectChange = (keys: string[]) => { + _selectedRowKeys.value = [...keys]; }; const handleData = async (e: any) => { @@ -178,8 +179,7 @@ watch(