From 05e128172855c644c0bdf69993ae05c71b1f205d Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Mon, 30 Jan 2023 17:06:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=90=8C=E6=AD=A5=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/notice/config.ts | 6 +- src/components/AIcon/index.tsx | 1 + src/views/notice/Config/SyncUser/index.vue | 373 ++++++++++++++++++++- src/views/notice/Config/index.vue | 16 +- 4 files changed, 386 insertions(+), 10 deletions(-) diff --git a/src/api/notice/config.ts b/src/api/notice/config.ts index ccdebc7c..c75aa1f5 100644 --- a/src/api/notice/config.ts +++ b/src/api/notice/config.ts @@ -16,9 +16,9 @@ export default { debug: (data: any, configId: string, templateId: string) => post(`/notifier/${configId}/${templateId}/_send`, data), getHistory: (data: any, id: string) => post(`/notify/history/config/${id}/_query`, data), // 获取所有平台用户 - getPlatformUsers: () => post(`/user/_query/no-paging`, { paging: false }), + getPlatformUsers: () => post(`/user/_query/no-paging`, { paging: false }), // 钉钉部门 - dingTalkDept: (id: string) => get(`/notifier/dingtalk/corp/${id}/departments/tree`), + dingTalkDept: (id: string) => get(`/notifier/dingtalk/corp/${id}/departments/tree`), // 钉钉部门人员 getDingTalkUsers: (configId: string, deptId: string) => get(`/notifier/dingtalk/corp/${configId}/${deptId}/users`), // 钉钉已经绑定的人员 @@ -26,7 +26,7 @@ export default { // 钉钉绑定用户 dingTalkBindUser: (data: any, id: string) => patch(`/user/third-party/dingTalk_dingTalkMessage/${id}`, data), // 微信部门 - weChatDept: (id: string) => get(`/notifier/wechat/corp/${id}/departments`), + weChatDept: (id: string) => get(`/notifier/wechat/corp/${id}/departments`), // 微信部门人员 getWeChatUsers: (configId: string, deptId: string) => get(`/notifier/wechat/corp/${configId}/${deptId}/users`), // 微信已经绑定的人员 diff --git a/src/components/AIcon/index.tsx b/src/components/AIcon/index.tsx index 58efea27..13a2dcc7 100644 --- a/src/components/AIcon/index.tsx +++ b/src/components/AIcon/index.tsx @@ -39,6 +39,7 @@ const iconKeys = [ 'ArrowDownOutlined', 'SmallDashOutlined', 'TeamOutlined', + 'SearchOutlined', ] const Icon = (props: {type: string}) => { diff --git a/src/views/notice/Config/SyncUser/index.vue b/src/views/notice/Config/SyncUser/index.vue index a3e86cd8..f6f76166 100644 --- a/src/views/notice/Config/SyncUser/index.vue +++ b/src/views/notice/Config/SyncUser/index.vue @@ -1,13 +1,374 @@ - - + diff --git a/src/views/notice/Config/index.vue b/src/views/notice/Config/index.vue index 73edffce..801f8b39 100644 --- a/src/views/notice/Config/index.vue +++ b/src/views/notice/Config/index.vue @@ -362,6 +362,18 @@ const getActions = ( downloadObject(data, `通知配置`); }, }, + { + key: 'sync', + text: '同步用户', + tooltip: { + title: '同步用户', + }, + icon: 'TeamOutlined', + onClick: () => { + syncVis.value = true; + currentConfig.value = data; + }, + }, { key: 'delete', text: '删除', @@ -380,7 +392,9 @@ const getActions = ( icon: 'DeleteOutlined', }, ]; - return actions; + if (data.provider === 'dingTalkMessage' || data.provider === 'corpMessage') + return actions; + return actions.filter((i: ActionsType) => i.key !== 'sync'); };