From 89310a6c8d7b88f4fa40cdd4508ae78f537ee336 Mon Sep 17 00:00:00 2001 From: easy <1358086367@qq.com> Date: Sat, 4 Mar 2023 11:10:59 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/User/components/EditUserDialog.vue | 2 + src/views/system/User/index.vue | 111 +++++++++++++++--- 2 files changed, 98 insertions(+), 15 deletions(-) diff --git a/src/views/system/User/components/EditUserDialog.vue b/src/views/system/User/components/EditUserDialog.vue index c61c9c78..23c0b36f 100644 --- a/src/views/system/User/components/EditUserDialog.vue +++ b/src/views/system/User/components/EditUserDialog.vue @@ -232,6 +232,8 @@ const dialog = reactive({ */ changeVisible: (type: modalType, defaultForm: formType) => { dialog.setTitle(type); + console.log(defaultForm); + form.getUserInfo(defaultForm.id || '', type); dialog.type = type; dialog.visible = type !== ''; diff --git a/src/views/system/User/index.vue b/src/views/system/User/index.vue index 017106c0..cada0829 100644 --- a/src/views/system/User/index.vue +++ b/src/views/system/User/index.vue @@ -1,11 +1,11 @@ @@ -121,6 +112,96 @@ import { message } from 'ant-design-vue'; const permission = 'system/User'; +const columns = [ + { + title: '名称', + dataIndex: 'name', + key: 'name', + ellipsis: true, + search: { + type: 'string', + }, + }, + { + title: '用户名', + dataIndex: 'username', + key: 'username', + ellipsis: true, + fixed: 'left', + search: { + type: 'string', + }, + }, + { + title: '用户类型', + dataIndex: 'type', + key: 'type', + ellipsis: true, + fixed: 'left', + search: { + type: 'select', + options: () => + new Promise((resolve) => { + getUserType_api().then((resp: any) => { + resolve( + resp.result.map((item: dictType) => ({ + label: item.name, + value: item.id, + })), + ); + }); + }), + }, + scopedSlots: true, + }, + { + title: '状态', + dataIndex: 'status', + key: 'status', + ellipsis: true, + search: { + rename: 'status', + type: 'select', + options: [ + { + label: '启用', + value: 1, + }, + { + label: '禁用', + value: 0, + }, + ], + }, + scopedSlots: true, + }, + { + title: '手机号', + dataIndex: 'telephone', + key: 'telephone', + ellipsis: true, + fixed: 'left', + search: { + type: 'string', + }, + }, + { + title: '邮箱', + dataIndex: 'email', + key: 'email', + ellipsis: true, + fixed: 'left', + search: { + type: 'string', + }, + }, + { + title: '操作', + dataIndex: 'action', + key: 'action', + scopedSlots: true, + }, +]; const query = { columns: [ {