From 7c0519888a643c0f092c7c1acc4eb2b58ced6223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=95=E9=87=91=E6=B3=BD?= <1098696801@qq.com> Date: Fri, 4 Feb 2022 17:21:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96=EF=BC=8C?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8=E5=8A=A0=E2=80=9C=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E2=80=9D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/magic-api/api/后台/用户管理/列表.ms | 84 ++++++++++++++++++- magic-boot-ui/src/assets/magic-boot.svg | 1 - .../src/components/MagicBoot/mb-search.vue | 4 +- .../src/components/MagicBoot/mb-select.vue | 8 +- .../src/components/MagicBoot/mb-table.vue | 2 +- .../src/views/system/role/role-list.vue | 12 +-- .../src/views/system/user/user-form.vue | 4 +- .../src/views/system/user/user-list.vue | 15 ++++ 8 files changed, 112 insertions(+), 18 deletions(-) delete mode 100644 magic-boot-ui/src/assets/magic-boot.svg diff --git a/data/magic-api/api/后台/用户管理/列表.ms b/data/magic-api/api/后台/用户管理/列表.ms index 6a766d3..b854663 100644 --- a/data/magic-api/api/后台/用户管理/列表.ms +++ b/data/magic-api/api/后台/用户管理/列表.ms @@ -5,7 +5,7 @@ "groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a", "name" : "列表", "createTime" : null, - "updateTime" : 1642173275899, + "updateTime" : 1643965494984, "lock" : "0", "method" : "GET", "path" : "/list", @@ -14,15 +14,88 @@ "requestBody" : "", "headers" : [ ], "paths" : [ ], - "responseBody" : null, + "responseBody" : "{\n \"code\": 402,\n \"message\": \"凭证已过期\",\n \"data\": null,\n \"timestamp\": 1643964929030,\n \"executeTime\": null\n}", "description" : null, "requestBodyDefinition" : null, - "responseBodyDefinition" : null, + "responseBodyDefinition" : { + "name" : "", + "value" : "", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ { + "name" : "code", + "value" : "402", + "description" : "", + "required" : false, + "dataType" : "Integer", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, { + "name" : "message", + "value" : "凭证已过期", + "description" : "", + "required" : false, + "dataType" : "String", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, { + "name" : "data", + "value" : "null", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, { + "name" : "timestamp", + "value" : "1643964929030", + "description" : "", + "required" : false, + "dataType" : "Long", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, { + "name" : "executeTime", + "value" : "null", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + } ] + }, "optionMap" : { } } ================================ return db.page(""" select + distinct su.id, su.username, su.name, @@ -30,10 +103,13 @@ return db.page(""" su.phone, su.create_date, su.office_id, - so.name office_name + so.name office_name, + (select group_concat(sr.name) from sys_role sr left join sys_user_role sur on sr.id = sur.role_id where sr.is_del = 0 and sur.user_id = su.id) roles from sys_user su left join sys_office so on su.office_id = so.id + left join sys_user_role sur on su.id = sur.user_id where su.is_del = 0 + ?{roleId, and sur.role_id in(#{roleId.split(',')})} ?{officeId, and su.office_id in(#{officeId.split(',')})} ?{username, and su.username like concat('%',#{username},'%')} ?{name, and su.name like concat('%',#{name},'%')} diff --git a/magic-boot-ui/src/assets/magic-boot.svg b/magic-boot-ui/src/assets/magic-boot.svg deleted file mode 100644 index d09e350..0000000 --- a/magic-boot-ui/src/assets/magic-boot.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/magic-boot-ui/src/components/MagicBoot/mb-search.vue b/magic-boot-ui/src/components/MagicBoot/mb-search.vue index 2f67465..144c530 100644 --- a/magic-boot-ui/src/components/MagicBoot/mb-search.vue +++ b/magic-boot-ui/src/components/MagicBoot/mb-search.vue @@ -70,9 +70,9 @@ export default { reset() { for(var key in this.where){ if(this.where[key] instanceof Object){ - this.where[key].value = '' + this.where[key].value = null }else{ - this.where[key] = '' + this.where[key] = null } } this.$nextTick(() => this.$emit('search')) diff --git a/magic-boot-ui/src/components/MagicBoot/mb-select.vue b/magic-boot-ui/src/components/MagicBoot/mb-select.vue index 6c4d924..f9432f0 100644 --- a/magic-boot-ui/src/components/MagicBoot/mb-select.vue +++ b/magic-boot-ui/src/components/MagicBoot/mb-select.vue @@ -1,6 +1,6 @@