mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2025-02-21 02:12:50 +08:00
用户管理优化
This commit is contained in:
parent
c954eb5eed
commit
2041a7ef4c
@ -5,7 +5,7 @@
|
||||
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
|
||||
"name" : "列表",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1642086792944,
|
||||
"updateTime" : 1642173275899,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"path" : "/list",
|
||||
@ -29,10 +29,12 @@ return db.page("""
|
||||
su.is_login,
|
||||
su.phone,
|
||||
su.create_date,
|
||||
su.office_id
|
||||
su.office_id,
|
||||
so.name office_name
|
||||
from sys_user su
|
||||
left join sys_office so on su.office_id = so.id
|
||||
where su.is_del = 0
|
||||
?{officeId, and su.office_id = #{officeId}}
|
||||
?{officeId, and su.office_id in(#{officeId.split(',')})}
|
||||
?{username, and su.username like concat('%',#{username},'%')}
|
||||
?{name, and su.name like concat('%',#{name},'%')}
|
||||
?{isLogin, and su.is_login = #{isLogin}}
|
||||
|
@ -5,7 +5,7 @@
|
||||
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
|
||||
"name" : "所有机构",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1642085289368,
|
||||
"updateTime" : 1642134606249,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"path" : "/offices",
|
||||
@ -14,7 +14,7 @@
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": {\n \"list\": [{\n \"id\": \"4c37a80226134bce8bc91c8fc04a7d2f\",\n \"label\": \"马小东公司\",\n \"pid\": \"0\",\n \"children\": [{\n \"id\": \"81b5493cdb31477f9ceea85b2cd08f15\",\n \"label\": \"马小东子公司\",\n \"pid\": \"4c37a80226134bce8bc91c8fc04a7d2f\",\n \"children\": null\n }, {\n \"id\": \"31b365008f994e93850186126fce87cb\",\n \"label\": \"马小东子公司2\",\n \"pid\": \"4c37a80226134bce8bc91c8fc04a7d2f\",\n \"children\": null\n }]\n }, {\n \"id\": \"935126327e2a4f90b3f485f818f61ea5\",\n \"label\": \"吕金泽公司\",\n \"pid\": \"0\",\n \"children\": [{\n \"id\": \"1ae0299fc79b43c6b0ae2e14756ec41a\",\n \"label\": \"吕金泽子公司\",\n \"pid\": \"935126327e2a4f90b3f485f818f61ea5\",\n \"children\": null\n }]\n }],\n \"total\": 2\n },\n \"timestamp\": 1642085263335,\n \"executeTime\": 52\n}",
|
||||
"responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": {\n \"list\": [{\n \"id\": \"4c37a80226134bce8bc91c8fc04a7d2f\",\n \"label\": \"<font color=\\\"yellow\\\">马小东公司</font>\",\n \"pid\": \"0\",\n \"children\": [{\n \"id\": \"81b5493cdb31477f9ceea85b2cd08f15\",\n \"label\": \"<font color=\\\"yellow\\\">马小东子公司</font>\",\n \"pid\": \"4c37a80226134bce8bc91c8fc04a7d2f\",\n \"children\": []\n }, {\n \"id\": \"31b365008f994e93850186126fce87cb\",\n \"label\": \"<font color=\\\"yellow\\\">马小东子公司2</font>\",\n \"pid\": \"4c37a80226134bce8bc91c8fc04a7d2f\",\n \"children\": []\n }]\n }, {\n \"id\": \"935126327e2a4f90b3f485f818f61ea5\",\n \"label\": \"<font color=\\\"yellow\\\">吕金泽公司</font>\",\n \"pid\": \"0\",\n \"children\": [{\n \"id\": \"1ae0299fc79b43c6b0ae2e14756ec41a\",\n \"label\": \"<font color=\\\"yellow\\\">吕金泽子公司</font>\",\n \"pid\": \"935126327e2a4f90b3f485f818f61ea5\",\n \"children\": []\n }]\n }],\n \"total\": 2\n },\n \"timestamp\": 1642134574553,\n \"executeTime\": 5\n}",
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : {
|
||||
@ -99,7 +99,7 @@
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "label",
|
||||
"value" : "马小东公司",
|
||||
"value" : "<font color=\\\"yellow\\\">马小东公司</font>",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
@ -157,7 +157,7 @@
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "label",
|
||||
"value" : "马小东子公司",
|
||||
"value" : "<font color=\\\"yellow\\\">马小东子公司</font>",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
@ -181,10 +181,10 @@
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "children",
|
||||
"value" : "null",
|
||||
"value" : "",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Object",
|
||||
"dataType" : "Array",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
@ -210,7 +210,7 @@
|
||||
} ]
|
||||
}, {
|
||||
"name" : "timestamp",
|
||||
"value" : "1642085263335",
|
||||
"value" : "1642134574553",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Long",
|
||||
@ -222,7 +222,7 @@
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "executeTime",
|
||||
"value" : "52",
|
||||
"value" : "5",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
|
@ -5,7 +5,7 @@
|
||||
"groupId" : "8295fc13678d4144bf7363c465247a50",
|
||||
"name" : "列表",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1641731964401,
|
||||
"updateTime" : 1642134990129,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"path" : "/tree",
|
||||
@ -14,10 +14,298 @@
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": {\n \"list\": [{\n \"id\": \"4c37a80226134bce8bc91c8fc04a7d2f\",\n \"name\": \"<font color=\\\"yellow\\\">马小东公司</font>\",\n \"pid\": \"0\",\n \"type\": \"2\",\n \"sort\": 10,\n \"code\": \"mxd\",\n \"children\": [{\n \"id\": \"81b5493cdb31477f9ceea85b2cd08f15\",\n \"name\": \"<font color=\\\"yellow\\\">马小东子公司</font>\",\n \"pid\": \"4c37a80226134bce8bc91c8fc04a7d2f\",\n \"type\": null,\n \"sort\": 10,\n \"code\": \"mxdz\",\n \"children\": []\n }, {\n \"id\": \"31b365008f994e93850186126fce87cb\",\n \"name\": \"<font color=\\\"yellow\\\">马小东子公司2</font>\",\n \"pid\": \"4c37a80226134bce8bc91c8fc04a7d2f\",\n \"type\": null,\n \"sort\": 20,\n \"code\": \"mxdzz\",\n \"children\": []\n }]\n }, {\n \"id\": \"935126327e2a4f90b3f485f818f61ea5\",\n \"name\": \"<font color=\\\"yellow\\\">吕金泽公司</font>\",\n \"pid\": \"0\",\n \"type\": null,\n \"sort\": 20,\n \"code\": \"ljz\",\n \"children\": [{\n \"id\": \"1ae0299fc79b43c6b0ae2e14756ec41a\",\n \"name\": \"<font color=\\\"yellow\\\">吕金泽子公司</font>\",\n \"pid\": \"935126327e2a4f90b3f485f818f61ea5\",\n \"type\": null,\n \"sort\": 10,\n \"code\": \"ljzz\",\n \"children\": []\n }]\n }],\n \"total\": 2\n },\n \"timestamp\": 1642134812650,\n \"executeTime\": 9\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" : "200",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "message",
|
||||
"value" : "success",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "data",
|
||||
"value" : "",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Object",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ {
|
||||
"name" : "list",
|
||||
"value" : "",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Array",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ {
|
||||
"name" : "",
|
||||
"value" : "",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Object",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ {
|
||||
"name" : "id",
|
||||
"value" : "4c37a80226134bce8bc91c8fc04a7d2f",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "name",
|
||||
"value" : "<font color=\\\"yellow\\\">马小东公司</font>",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "pid",
|
||||
"value" : "0",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "type",
|
||||
"value" : "2",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "sort",
|
||||
"value" : "10",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "code",
|
||||
"value" : "mxd",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "children",
|
||||
"value" : "",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Array",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ {
|
||||
"name" : "",
|
||||
"value" : "",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Object",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ {
|
||||
"name" : "id",
|
||||
"value" : "81b5493cdb31477f9ceea85b2cd08f15",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "name",
|
||||
"value" : "<font color=\\\"yellow\\\">马小东子公司</font>",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "pid",
|
||||
"value" : "4c37a80226134bce8bc91c8fc04a7d2f",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "type",
|
||||
"value" : "null",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Object",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "sort",
|
||||
"value" : "10",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "code",
|
||||
"value" : "mxdz",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "children",
|
||||
"value" : "",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Array",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
} ]
|
||||
} ]
|
||||
} ]
|
||||
}, {
|
||||
"name" : "total",
|
||||
"value" : "2",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
}, {
|
||||
"name" : "timestamp",
|
||||
"value" : "1642134812650",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Long",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "executeTime",
|
||||
"value" : "9",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : { }
|
||||
}
|
||||
================================
|
||||
|
@ -12,17 +12,11 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="left">
|
||||
<pd-tree url="office/tree" :el="{ 'expand-on-click-node': false }" :checked="false" @node-click="nodeClick(arguments)" />
|
||||
<pd-tree url="office/tree" :el="{ 'expand-on-click-node': false,'show-checkbox': true }" :search="true" :checked="false" @check-change="checkChange" />
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="filter-container">
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="组织机构">
|
||||
<el-input v-model="officeName" placeholder="组织机构" style="width: 200px;" class="filter-item" />
|
||||
</el-form-item>
|
||||
<el-button class="filter-item" icon="el-icon-delete" @click="resetOffice">
|
||||
清除
|
||||
</el-button>
|
||||
<el-form-item label="登录名称">
|
||||
<el-input v-model="tableOptions.where.username" placeholder="登录名称" style="width: 200px;" class="filter-item" />
|
||||
</el-form-item>
|
||||
@ -88,6 +82,10 @@ export default {
|
||||
title: '姓名/昵称',
|
||||
sortable: 'custom'
|
||||
},
|
||||
{
|
||||
field: 'officeName',
|
||||
title: '所属机构'
|
||||
},
|
||||
{
|
||||
field: 'phone',
|
||||
title: '手机号',
|
||||
@ -98,7 +96,7 @@ export default {
|
||||
field: 'isLogin',
|
||||
title: '禁止登录',
|
||||
type: 'switch',
|
||||
width: 200,
|
||||
width: 100,
|
||||
change: (row) => {
|
||||
this.$get('/user/change/login/status', {
|
||||
id: row.id,
|
||||
@ -142,25 +140,16 @@ export default {
|
||||
},
|
||||
dialogStatus: '',
|
||||
downloadLoading: false,
|
||||
ids: [],
|
||||
officeName: ''
|
||||
ids: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
this.tableOptions.where = {}
|
||||
this.officeName = ''
|
||||
this.$nextTick(() => this.reloadTable())
|
||||
},
|
||||
resetOffice() {
|
||||
this.officeName = ''
|
||||
this.tableOptions.where.officeId = ''
|
||||
this.reloadTable()
|
||||
},
|
||||
nodeClick(nodes) {
|
||||
var node = nodes[0]
|
||||
this.officeName = node.name
|
||||
this.tableOptions.where.officeId = node.id
|
||||
checkChange(values) {
|
||||
this.tableOptions.where.officeId = values
|
||||
this.reloadTable()
|
||||
},
|
||||
selectionChange(columns) {
|
||||
|
Loading…
Reference in New Issue
Block a user