Przeglądaj źródła

Merge branch 'ETA1.0.4'

cxmo 1 rok temu
rodzic
commit
8992163d9c

+ 13 - 9
src/views/system_manage/newAuthManage.vue

@@ -2,13 +2,16 @@
     <div class="authManage_container">
         <div class="auth_cont_top">
             <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>
-                </el-select>
+                </el-select> -->
             </div>
-            <el-button type="primary" style="marginRight:50px;width:140px;" @click="saveAuth" v-if="!isLook">确定
+            <el-button style="margin-left:auto;marginRight:50px;width:140px;" @click="$router.back()" v-if="!isLook">取消
+            </el-button>
+            <el-button type="primary" style="marginRight:50px;width:140px;" @click="saveAuth" v-if="!isLook">保存
             </el-button>
         </div>
         <div class="auth_bot">
@@ -38,6 +41,7 @@ export default {
             defaultCheckedKeys: [],
             loading: null, //loading
             isLook: false, //是否仅查看
+            Role:{},//角色
         };
     },
     watch: {
@@ -58,10 +62,11 @@ export default {
         getRoles() {
             departInterence.getRole().then(res => {
                 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 = this.roleList.find(i=>i.RoleId===this.role)||{}
                 }
             })
         },
@@ -120,10 +125,9 @@ export default {
         },
     },
     created() {
-        //只查看权限 不可编辑
         if (this.$route.query.id) {
             this.role = Number(this.$route.query.id);
-            this.isLook = true;
+            //this.isLook = true;
         }
     },
     mounted() {

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

@@ -4,8 +4,8 @@
 			<div>
 				<el-button v-permission="permissionBtn.sysDepartPermission.sysRole_addRole"
 					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>
 			<el-input
 				placeholder="角色搜索"
@@ -44,9 +44,12 @@
 				<el-table-column label="操作" align="center">
 					<template slot-scope="scope">
 						<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 class="editsty" @click.stop="editRole(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"
+								class="editsty" @click.stop="editRole(scope.row)" style="marginRight:20px;">编辑</span>
 							<span v-permission="permissionBtn.sysDepartPermission.sysRole_del"
 								class="deletesty" @click.stop="delRole(scope.row)">删除</span>
 						</div>
@@ -216,7 +219,8 @@ export default {
 					}else {
 						departInterence.editRole({
 							RoleId:Number(this.roleForm.role_id),
-							RoleName:this.roleForm.name
+							RoleName:this.roleForm.name,
+							RoleType:this.roleForm.roleType
 						}).then(res =>{
 							if(res.Ret === 200) {
 								this.$message.success(res.Msg);
@@ -235,6 +239,7 @@ export default {
 				title:'编辑角色',
 				name:item.RoleName,
 				role_id:item.RoleId,
+				roleType:item.RoleType
 			}
 		},
 		/*  删除角色*/