cxmo 1 年之前
父节点
当前提交
d8cca98836
共有 2 个文件被更改,包括 18 次插入12 次删除
  1. 12 8
      src/views/system_manage/newAuthManage.vue
  2. 6 4
      src/views/system_manage/roleManage.vue

+ 12 - 8
src/views/system_manage/newAuthManage.vue

@@ -2,12 +2,15 @@
     <div class="authManage_container">
     <div class="authManage_container">
         <div class="auth_cont_top">
         <div class="auth_cont_top">
             <div>
             <div>
-                <span>角色</span>
-                <el-select v-model="role" placeholder="请选择角色" style="width:360px;marginLeft:30px;">
+                <span>角色:</span>
+                <span>{{Role.RoleName}}</span>
+                <!-- <el-select v-model="role" placeholder="请选择角色" style="width:360px;marginLeft:30px;">
                     <el-option v-for="item in roleList" :key="item.RoleId" :label="item.RoleName" :value="item.RoleId">
                     <el-option v-for="item in roleList" :key="item.RoleId" :label="item.RoleName" :value="item.RoleId">
                     </el-option>
                     </el-option>
-                </el-select>
+                </el-select> -->
             </div>
             </div>
+            <el-button style="margin-left:auto;marginRight:50px;width:140px;" @click="saveAuth" v-if="!isLook">取消
+            </el-button>
             <el-button type="primary" style="marginRight:50px;width:140px;" @click="saveAuth" v-if="!isLook">确定
             <el-button type="primary" style="marginRight:50px;width:140px;" @click="saveAuth" v-if="!isLook">确定
             </el-button>
             </el-button>
         </div>
         </div>
@@ -38,6 +41,7 @@ export default {
             defaultCheckedKeys: [],
             defaultCheckedKeys: [],
             loading: null, //loading
             loading: null, //loading
             isLook: false, //是否仅查看
             isLook: false, //是否仅查看
+            Role:{},//角色
         };
         };
     },
     },
     watch: {
     watch: {
@@ -58,10 +62,11 @@ export default {
         getRoles() {
         getRoles() {
             departInterence.getRole().then(res => {
             departInterence.getRole().then(res => {
                 if (res.Ret === 200) {
                 if (res.Ret === 200) {
-                    this.roleList = res.Data.List;
-                    if (res.Data.List.length && !this.role) {
+                    this.roleList = res.Data.List||[];
+                    /* if (res.Data.List.length && !this.role) {
                         this.role = res.Data.List[0].RoleId
                         this.role = res.Data.List[0].RoleId
-                    }
+                    } */
+                    this.Role = this.roleList.find(i=>i.RoleId===this.role)||{}
                 }
                 }
             })
             })
         },
         },
@@ -120,10 +125,9 @@ export default {
         },
         },
     },
     },
     created() {
     created() {
-        //只查看权限 不可编辑
         if (this.$route.query.id) {
         if (this.$route.query.id) {
             this.role = Number(this.$route.query.id);
             this.role = Number(this.$route.query.id);
-            this.isLook = true;
+            //this.isLook = true;
         }
         }
     },
     },
     mounted() {
     mounted() {

+ 6 - 4
src/views/system_manage/roleManage.vue

@@ -4,8 +4,8 @@
 			<div>
 			<div>
 				<el-button v-permission="permissionBtn.sysDepartPermission.sysRole_addRole"
 				<el-button v-permission="permissionBtn.sysDepartPermission.sysRole_addRole"
 					type="primary" @click="addRole" style="marginRight:14px;">添加角色</el-button>
 					type="primary" @click="addRole" style="marginRight:14px;">添加角色</el-button>
-				<el-button v-permission="permissionBtn.sysDepartPermission.sysRole_settingAuth"
-					type="primary" @click="setAuth">设置权限</el-button>
+				<!-- <el-button v-permission="permissionBtn.sysDepartPermission.sysRole_settingAuth"
+					type="primary" @click="setAuth">设置权限</el-button> -->
 			</div>
 			</div>
 			<el-input
 			<el-input
 				placeholder="角色搜索"
 				placeholder="角色搜索"
@@ -44,8 +44,10 @@
 				<el-table-column label="操作" align="center">
 				<el-table-column label="操作" align="center">
 					<template slot-scope="scope">
 					<template slot-scope="scope">
 						<div style="color:#4099ef; font-size:24px;">
 						<div style="color:#4099ef; font-size:24px;">
-							<span v-permission="permissionBtn.sysDepartPermission.sysRole_settingAuth"
-								class="editsty" @click.stop="getAuthDetail(scope.row)" style="marginRight:20px;">查看权限</span>
+							<!-- <span v-permission="permissionBtn.sysDepartPermission.sysRole_settingAuth"
+								class="editsty" @click.stop="getAuthDetail(scope.row)" style="marginRight:20px;">查看权限</span> -->
+								<span v-permission="permissionBtn.sysDepartPermission.sysRole_settingAuth"
+									class="editsty" @click.stop="getAuthDetail(scope.row)" style="marginRight:20px;">设置权限</span>
 							<span v-permission="permissionBtn.sysDepartPermission.sysRole_addRole"
 							<span v-permission="permissionBtn.sysDepartPermission.sysRole_addRole"
 								class="editsty" @click.stop="editRole(scope.row)" style="marginRight:20px;">编辑</span>
 								class="editsty" @click.stop="editRole(scope.row)" style="marginRight:20px;">编辑</span>
 							<span v-permission="permissionBtn.sysDepartPermission.sysRole_del"
 							<span v-permission="permissionBtn.sysDepartPermission.sysRole_del"