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'); };