Commit 0bc245597dab5a80c9e66b676ac026c2209011dc

Authored by 谭毅彬
1 parent 580609fa

用户管理页多角色显示效果优化

Signed-off-by: TanYibin <5491541@qq.com>
ant-design-vue-jeecg/src/views/system/UserList.vue
... ... @@ -113,8 +113,8 @@
113 113 </a-tag>
114 114 </span>
115 115  
116   - <span slot="selectedRoles" slot-scope="selectedRoles" >
117   - <a-tag v-for="selectedRole in selectedRoles" :key="selectedRole" color=pink>
  116 + <span slot="selectedRoleList" slot-scope="selectedRoleList" >
  117 + <a-tag v-for="selectedRole in selectedRoleList" :key="selectedRole" color=pink>
118 118 {{ solutionRole(selectedRole) }}
119 119 </a-tag>
120 120 </span>
... ... @@ -132,19 +132,12 @@
132 132 </template>
133 133  
134 134 <span slot="action" slot-scope="text, record">
135   - <a v-has="'user:edit'" @click="handleEdit(record)">编辑</a>
136   -
137   - <a-divider type="vertical"/>
138   -
139   - <a-dropdown>
140   - <a class="ant-dropdown-link">
141   - 更多 <a-icon type="down"/>
142   - </a>
  135 + <a v-has="'user:edit'" @click="handleEdit(record)">编辑</a><a-divider type="vertical"/>
  136 + <a-dropdown><a class="ant-dropdown-link">更多<a-icon type="down"/></a>
143 137 <a-menu slot="overlay">
144 138 <a-menu-item>
145 139 <a href="javascript:;" @click="handleDetail(record)">详情</a>
146 140 </a-menu-item>
147   -
148 141 <a-menu-item>
149 142 <a href="javascript:;" @click="handleChangePassword(record.username)">密码</a>
150 143 </a-menu-item>
... ... @@ -266,9 +259,10 @@ export default {
266 259 {
267 260 title: '角色',
268 261 align: "center",
269   - dataIndex: 'selectedRoles',
270   - key: 'selectedRoles',
271   - scopedSlots: {customRender: 'selectedRoles'}
  262 + dataIndex: 'selectedRoleList',
  263 + key: 'selectedRoleList',
  264 + scopedSlots: {customRender: 'selectedRoleList'},
  265 + width: 200
272 266 },
273 267 // {
274 268 // title: '生日',
... ...
ant-design-vue-jeecg/src/views/system/config/AddressList.vue
... ... @@ -5,16 +5,6 @@
5 5 <a-form layout="inline" @keyup.enter.native="searchQuery">
6 6 <a-row :gutter="24">
7 7 <a-col :xl="6" :lg="7" :md="8" :sm="24">
8   - <a-form-item label="任务名称">
9   - <j-input placeholder="请输入任务名称" v-model="queryParam.remark"></j-input>
10   - </a-form-item>
11   - </a-col>
12   - <a-col :xl="6" :lg="7" :md="8" :sm="24">
13   - <a-form-item label="编码">
14   - <j-input placeholder="请输入编码" v-model="queryParam.param"></j-input>
15   - </a-form-item>
16   - </a-col>
17   - <a-col :xl="6" :lg="7" :md="8" :sm="24">
18 8 <a-form-item label="库区">
19 9 <a-select show-search placeholder="请选择库区" option-filter-prop="children" v-model="queryParam.zoneCode" >
20 10 <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code">
... ... @@ -24,6 +14,16 @@
24 14 </a-form-item>
25 15 </a-col>
26 16 <a-col :xl="6" :lg="7" :md="8" :sm="24">
  17 + <a-form-item label="接口名称">
  18 + <j-input placeholder="请输入接口名称" v-model="queryParam.remark"></j-input>
  19 + </a-form-item>
  20 + </a-col>
  21 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  22 + <a-form-item label="编码">
  23 + <j-input placeholder="请输入编码" v-model="queryParam.param"></j-input>
  24 + </a-form-item>
  25 + </a-col>
  26 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
27 27 <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
28 28 <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
29 29 <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/system/entity/SysUser.java
... ... @@ -190,6 +190,18 @@ public class SysUser implements Serializable {
190 190 * 多角色id,编辑用户的时候设置
191 191 */
192 192 private String selectedRoles;
  193 +
  194 + @TableField(exist = false)
  195 + private List<String> selectedRoleList;
  196 +
  197 + public void setSelectedRoles(String selectedRoles) {
  198 + if (!StringUtils.isEmpty(selectedRoles)) {
  199 + this.selectedRoles = selectedRoles;
  200 + this.selectedRoleList = Arrays.asList(selectedRoles.split(","));
  201 + } else {
  202 + this.selectedRoles = selectedRoles;
  203 + }
  204 + }
193 205  
194 206 /** 设备id uniapp推送用 */
195 207 private String clientId;
... ...