From 8d874e27a6b8945d4abd1fdd8def32d3ff0b332f Mon Sep 17 00:00:00 2001 From: 100011797 <2642441182@qq.com> Date: Mon, 24 Jul 2023 17:57:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E8=AE=A2=E9=98=85?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=96=87=E5=AD=97=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/device/Product/Save/index.vue | 2 +- .../NoticeRule/components/Auth/index.vue | 21 ++++- .../NoticeRule/components/Item/index.vue | 94 ++++++++++--------- .../NoticeRule/components/Role/index.vue | 2 +- .../Save/components/NotifyConfig.vue | 2 +- .../Save/components/NotifyTemplate.vue | 2 +- .../components/Save/components/NotifyWay.vue | 4 +- .../NoticeRule/components/Save/index.vue | 23 +++-- 8 files changed, 92 insertions(+), 58 deletions(-) diff --git a/src/views/device/Product/Save/index.vue b/src/views/device/Product/Save/index.vue index d8ad9cc1..9d2e7409 100644 --- a/src/views/device/Product/Save/index.vue +++ b/src/views/device/Product/Save/index.vue @@ -164,7 +164,7 @@ const deviceList = ref([ label: '网关子设备', value: 'childrenDevice', iconUrl: getImage('/device-type-2.png'), - tooltip: '作为网关的子设备,有网关代理连接到物联网平台', + tooltip: '作为网关的子设备,由网关代理连接到物联网平台', }, { label: '网关设备', diff --git a/src/views/system/NoticeRule/components/Auth/index.vue b/src/views/system/NoticeRule/components/Auth/index.vue index f987ffb4..5d61cae3 100644 --- a/src/views/system/NoticeRule/components/Auth/index.vue +++ b/src/views/system/NoticeRule/components/Auth/index.vue @@ -6,6 +6,10 @@ @cancel="emit('close')" @ok="onSave" > +
+ + 通过角色控制【{{ name }}】的所有的通知方式可被哪些用户订阅。 +
@@ -20,6 +24,10 @@ const props = defineProps({ type: Array as PropType, default: () => [], }, + name: { + type: String, + default: '' + } }); const _selectedRowKeys = ref([]); @@ -31,4 +39,15 @@ watchEffect(() => { const onSave = () => { emit('save', _selectedRowKeys.value); }; - \ No newline at end of file + + + \ No newline at end of file diff --git a/src/views/system/NoticeRule/components/Item/index.vue b/src/views/system/NoticeRule/components/Item/index.vue index 661ecd06..b4c49b9e 100644 --- a/src/views/system/NoticeRule/components/Item/index.vue +++ b/src/views/system/NoticeRule/components/Item/index.vue @@ -22,7 +22,7 @@ @@ -346,49 +348,53 @@ const onSwitchChange = (e: boolean) => { if (_checked) { onAction(e); } else { - Modal.confirm({ - title: e - ? '开启后默认平台所有用户都能接收到该通知' - : '关闭后平台所有用户都不能接收到该通知', - cancelText: '取消', - okText: e ? '确认开启' : '确认关闭', - content: h( - 'div', - { - style: { - display: 'flex', - justifyContent: 'flex-end', - marginTop: '20px', - }, - }, - [ - h( - Checkbox, - { - onChange: (_e: any) => { - LocalStore.set( - user.userInfos?.username, - e - ? { - ..._value, - open: _e.target?.checked, - } - : { - ..._value, - close: _e.target?.checked, - }, - ); - }, + if (e) { + onAction(e); + } else { + Modal.confirm({ + title: e + ? '开启后默认平台所有用户都能接收到该通知' + : '关闭后平台所有用户都不能接收到该通知', + cancelText: '取消', + okText: e ? '确认开启' : '确认关闭', + content: h( + 'div', + { + style: { + display: 'flex', + justifyContent: 'flex-end', + marginTop: '20px', }, - '不再提示', - ), - ], - ), - onOk() { - onAction(e); - }, - onCancel() {}, - }); + }, + [ + h( + Checkbox, + { + onChange: (_e: any) => { + LocalStore.set( + user.userInfos?.username, + e + ? { + ..._value, + open: _e.target?.checked, + } + : { + ..._value, + close: _e.target?.checked, + }, + ); + }, + }, + '不再提示', + ), + ], + ), + onOk() { + onAction(e); + }, + onCancel() {}, + }); + } } }; @@ -489,7 +495,7 @@ const onSave = (_data: any) => { .box-item-add { cursor: pointer; - background-color: #F7F8FA; + background-color: #f7f8fa; width: 54px; height: 54px; display: flex; diff --git a/src/views/system/NoticeRule/components/Role/index.vue b/src/views/system/NoticeRule/components/Role/index.vue index 4b1010af..7188b5ed 100644 --- a/src/views/system/NoticeRule/components/Role/index.vue +++ b/src/views/system/NoticeRule/components/Role/index.vue @@ -70,7 +70,7 @@ - + 钉钉群机器人类型的配置在当前页面将被过滤 -
+
已规定固定收信人的模板在当前页面将被过滤
-
+
{ iconUrl: iconMap.get(item.id), }; }); + emit('update:value', options.value?.[0]?.value); + emit('update:name', options.value?.[0]?.label); + emit('change', {label: options.value?.[0]?.label, value: options.value?.[0]?.value}); } loading.value = false; }); - notifyType.value = props.value; }); diff --git a/src/views/system/NoticeRule/components/Save/index.vue b/src/views/system/NoticeRule/components/Save/index.vue index a4c3d280..fca7e00c 100644 --- a/src/views/system/NoticeRule/components/Save/index.vue +++ b/src/views/system/NoticeRule/components/Save/index.vue @@ -11,11 +11,12 @@