|
@@ -65,7 +65,7 @@
|
|
|
<div style="height: 500px">
|
|
|
<el-form v-if="visible" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px" label-position="left">
|
|
|
<el-form-item label="所属租户" prop="tenant">
|
|
|
- <el-select style="width:100%" v-model="ruleForm.tenant" :disabled="userinfo.rList?!(userinfo.rList.filter(item=>item.roleId==1))[0]:''" placeholder="请选择">
|
|
|
+ <el-select style="width:100%" v-model="ruleForm.tenant" :disabled="(userinfo.rList?!(userinfo.rList.filter(item=>item.roleId==1))[0]:'')||disabled" placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in tenantList"
|
|
|
:key="item.id"
|
|
@@ -82,7 +82,7 @@
|
|
|
:row-key="functionList.id"
|
|
|
:data="functionList"
|
|
|
v-loading="loading"
|
|
|
- max-height="370"
|
|
|
+ max-height="330"
|
|
|
>
|
|
|
<el-table-column type="expand">
|
|
|
<template style="width:80%;" slot-scope="scope">
|
|
@@ -191,7 +191,7 @@ export default {
|
|
|
dataList: [],
|
|
|
multipleSelection: [],
|
|
|
expands:[],
|
|
|
-
|
|
|
+ disabled:false,
|
|
|
queryParams: {
|
|
|
size: 10,
|
|
|
current: 1,
|
|
@@ -208,7 +208,8 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getList()
|
|
|
- this.getFunctionList()
|
|
|
+ var a = ''
|
|
|
+ this.getFunctionList(a)
|
|
|
this.getTenantList()
|
|
|
},
|
|
|
computed: {
|
|
@@ -354,9 +355,11 @@ export default {
|
|
|
tenant:this.userinfo.tenantId,
|
|
|
function:[]
|
|
|
}
|
|
|
+ this.disabled=false
|
|
|
},
|
|
|
handleEdit(row) {
|
|
|
// console.log(row)
|
|
|
+ this.disabled=true
|
|
|
this.title = '编辑角色'
|
|
|
this.visible = true
|
|
|
this.ruleForm = { ...row }
|
|
@@ -364,7 +367,9 @@ export default {
|
|
|
this.checkList.push(row.permissionData[i].functionId)
|
|
|
}
|
|
|
this.permissionData = row.permissionData
|
|
|
-
|
|
|
+ if((this.userinfo.rList.filter(item=>item.roleId==1))[0]){
|
|
|
+ this.getFunctionList(row.tenant)
|
|
|
+ }
|
|
|
},
|
|
|
addpremissVisibale(val) {
|
|
|
this.permissTitle = '添加数据权限管理'
|
|
@@ -391,8 +396,8 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
|
|
|
- getFunctionList() {
|
|
|
- this.$api.getFuncListByTypeIsShow().then(response => {
|
|
|
+ getFunctionList(tenant) {
|
|
|
+ this.$api.getFuncListByTypeIsShow({tenant:tenant}).then(response => {
|
|
|
this.functionList = response.data
|
|
|
})
|
|
|
},
|