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 1/3] =?UTF-8?q?feat:=20=E5=90=8C=E6=AD=A5=E7=94=A8?= =?UTF-8?q?=E6=88=B7=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'); }; diff --git a/src/views/device/Product/Save/index.vue b/src/views/device/Product/Save/index.vue new file mode 100644 index 00000000..1c928ba6 --- /dev/null +++ b/src/views/device/Product/Save/index.vue @@ -0,0 +1,386 @@ + + + + + diff --git a/src/views/device/Product/index.vue b/src/views/device/Product/index.vue new file mode 100644 index 00000000..c5d6d505 --- /dev/null +++ b/src/views/device/Product/index.vue @@ -0,0 +1,498 @@ + + + + + diff --git a/src/views/device/Product/typings.d.ts b/src/views/device/Product/typings.d.ts index d7b9c831..3cdffb00 100644 --- a/src/views/device/Product/typings.d.ts +++ b/src/views/device/Product/typings.d.ts @@ -177,3 +177,15 @@ type ObserverMetadata = { subscribe: (data: any) => void; next: (data: any) => void; }; + +// 部门 +export type DepartmentItem = { + id: string; + name: string; + path: string; + sortIndex: number; + level: number; + code: string; + parentId: string; + children: DepartmentItem[]; +}; \ No newline at end of file diff --git a/src/views/init-home/index.vue b/src/views/init-home/index.vue index 20585ac9..896f2983 100644 --- a/src/views/init-home/index.vue +++ b/src/views/init-home/index.vue @@ -801,7 +801,7 @@ const rulesFrom = ref({ { required: true, message: '请输入系统名称', - trigger: 'blur', + trigger: 'change', }, ], headerTheme: [ From 9a82577e9c9749cc0eeac4dc1f63e704a2b73851 Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Mon, 30 Jan 2023 17:30:12 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=E7=BB=91=E5=AE=9A=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/notice/Config/SyncUser/index.vue | 285 +++++++++++++-------- 1 file changed, 176 insertions(+), 109 deletions(-) diff --git a/src/views/notice/Config/SyncUser/index.vue b/src/views/notice/Config/SyncUser/index.vue index f6f76166..1fc23686 100644 --- a/src/views/notice/Config/SyncUser/index.vue +++ b/src/views/notice/Config/SyncUser/index.vue @@ -1,103 +1,125 @@