Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue into dev

 Conflicts:
	ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java
	ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
	ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
	ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
	ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java
	ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java
	ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java
	ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
	ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
	ruoyi-ui/src/api/system/role.js
	ruoyi-ui/src/api/system/user.js
	ruoyi-ui/src/assets/styles/ruoyi.scss
	ruoyi-ui/src/router/index.js
	ruoyi-ui/src/views/system/role/index.vue
	ruoyi-ui/src/views/system/user/index.vue
This commit is contained in:
疯狂的狮子li
2021-07-06 12:01:05 +08:00
18 changed files with 991 additions and 29 deletions

View File

@ -124,7 +124,7 @@
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
<el-button
size="mini"
type="text"
@ -132,13 +132,6 @@
@click="handleUpdate(scope.row)"
v-hasPermi="['system:role:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-circle-check"
@click="handleDataScope(scope.row)"
v-hasPermi="['system:role:edit']"
>数据权限</el-button>
<el-button
size="mini"
type="text"
@ -146,6 +139,17 @@
@click="handleDelete(scope.row)"
v-hasPermi="['system:role:remove']"
>删除</el-button>
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)">
<span class="el-dropdown-link">
<i class="el-icon-d-arrow-right el-icon--right"></i>更多
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="handleDataScope" icon="el-icon-circle-check"
v-hasPermi="['system:role:edit']">数据权限</el-dropdown-item>
<el-dropdown-item command="handleAuthUser" icon="el-icon-user"
v-hasPermi="['system:role:edit']">分配用户</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
@ -469,6 +473,19 @@ export default {
this.single = selection.length!=1
this.multiple = !selection.length
},
// 更多操作触发
handleCommand(command, row) {
switch (command) {
case "handleDataScope":
this.handleDataScope(row);
break;
case "handleAuthUser":
this.handleAuthUser(row);
break;
default:
break;
}
},
// 树权限(展开/折叠)
handleCheckedTreeExpand(value, type) {
if (type == 'menu') {
@ -548,6 +565,11 @@ export default {
this.title = "分配数据权限";
});
},
/** 分配用户操作 */
handleAuthUser: function(row) {
const roleId = row.roleId;
this.$router.push("/auth/user/" + roleId);
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {