|
@@ -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() {
|