perf: 全局组织下角色详情不能添加成员

This commit is contained in:
“huailei000”
2023-02-14 19:43:33 +08:00
committed by huailei
parent 2e6bb9ab66
commit 065d6f7ba8

View File

@@ -8,13 +8,14 @@
/>
</el-col>
<el-col :md="10" :sm="24">
<RelationCard ref="userRelation" v-bind="relationConfig" />
<RelationCard v-if="!loading" ref="userRelation" v-bind="relationConfig" />
</el-col>
</el-row>
</template>
<script>
import { ListTable, RelationCard } from '@/components'
import { mapGetters } from 'vuex'
export default {
components: {
@@ -96,6 +97,17 @@ export default {
}
}
}
},
computed: {
...mapGetters(['currentOrg', 'currentOrgIsRoot'])
},
created() {
try {
const scope = this.$route.query['scope']
this.relationConfig.disabled = !this.$hasPerm(`rbac.add_${this.object.scope.value}rolebinding`) || (scope === 'org' && this.currentOrgIsRoot)
} finally {
this.loading = false
}
}
}
</script>