From f5aae8528f7445b39e51e8493a2bf70c02513e0b Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Fri, 10 Mar 2023 11:29:18 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E7=BB=84=E4=BB=B6=E6=9B=B4=E6=8D=A2?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/notice/Config/Debug/index.vue | 26 +++++++++++++++++++++- src/views/notice/Config/Detail/index.vue | 10 ++++----- src/views/notice/Config/SyncUser/index.vue | 18 ++++++++------- 3 files changed, 40 insertions(+), 14 deletions(-) diff --git a/src/views/notice/Config/Debug/index.vue b/src/views/notice/Config/Debug/index.vue index 8e9bc41f..7a7141ee 100644 --- a/src/views/notice/Config/Debug/index.vue +++ b/src/views/notice/Config/Debug/index.vue @@ -52,11 +52,30 @@ + + + @@ -78,6 +97,10 @@ import type { } from '@/views/notice/Template/types'; import { message } from 'ant-design-vue'; +import ToUser from '@/views/notice/Template/Detail/components/ToUser.vue'; +import ToOrg from '@/views/notice/Template/Detail/components/ToOrg.vue'; +import ToTag from '@/views/notice/Template/Detail/components/ToTag.vue'; + type Emits = { (e: 'update:visible', data: boolean): void; }; @@ -128,6 +151,7 @@ const getTemplateDetail = async () => { formData.value.templateDetailTable = result.variableDefinitions.map( (m: any) => ({ ...m, + type: m.expands ? m.expands.businessType : m.type, value: undefined, }), ); diff --git a/src/views/notice/Config/Detail/index.vue b/src/views/notice/Config/Detail/index.vue index aa914ade..897c12f1 100644 --- a/src/views/notice/Config/Detail/index.vue +++ b/src/views/notice/Config/Detail/index.vue @@ -393,11 +393,11 @@ const formRules = ref({ // webhook 'configuration.url': [ { required: true, message: '请输入Webhook' }, - { - pattern: - /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[j-z]{2,6}\/?/, - message: 'Webhook需要是一个合法的URL', - }, + // { + // pattern: + // /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[j-z]{2,6}\/?/, + // message: 'Webhook需要是一个合法的URL', + // }, ], description: [{ max: 200, message: '最多可输入200个字符' }], }); diff --git a/src/views/notice/Config/SyncUser/index.vue b/src/views/notice/Config/SyncUser/index.vue index 98781aa8..0856b041 100644 --- a/src/views/notice/Config/SyncUser/index.vue +++ b/src/views/notice/Config/SyncUser/index.vue @@ -156,6 +156,8 @@ watch( (val) => { if (val) { getDepartment(); + } else { + dataSource.value = []; } }, ); @@ -357,19 +359,19 @@ const getTableData = () => { const bindUser = bindUsers.find( (f: any) => f.thirdPartyUserId === deptUser.id, ); - if (bindUser) { - unBindUser = unBindUsers.find( - (f: any) => f.id === bindUser.userId, - ); - } + // if (bindUser) { + // unBindUser = unBindUsers.find( + // (f: any) => f.id === bindUser.userId, + // ); + // } dataSource.value.push({ thirdPartyUserId: deptUser.id, thirdPartyUserName: deptUser.name, - bindId: bindUser?.userId, - userId: unBindUser?.id, + bindId: bindUser?.id, + userId: bindUser?.userId, userName: unBindUser ? `${unBindUser.name}(${unBindUser.username})` - : '', + : bindUser?.providerName, status: { text: bindUser?.providerName ? '已绑定' : '未绑定', value: bindUser?.providerName ? 'success' : 'error',