mirror of
https://github.com/dataease/dataease.git
synced 2026-05-23 22:08:34 +08:00
feat: 用户权限可被收回
This commit is contained in:
@@ -940,6 +940,7 @@ export default {
|
||||
datasetAuth: '数据集权限',
|
||||
chartAuth: '视图权限',
|
||||
panelAuth: '仪表盘权限',
|
||||
menuAuth: '菜单和操作权限',
|
||||
deptHead: '所有组织',
|
||||
roleHead: '所有角色',
|
||||
userHead: '所有用户',
|
||||
@@ -947,6 +948,7 @@ export default {
|
||||
datasetAuthHead: '所有数据',
|
||||
chartAuthHead: '所有视图',
|
||||
panelAuthHead: '所有仪表盘',
|
||||
menuAuthHead: '所有菜单和操作',
|
||||
view: '查看',
|
||||
use: '使用',
|
||||
export: '导出',
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</el-input>
|
||||
</div>
|
||||
<el-tabs v-model="sourceActiveName" :class="{'de-search-header': showSourceSearchInput}" @tab-click="handleClick">
|
||||
<el-tab-pane v-for="(sourceInfo, index) in sourceInfoArray" :key="index" :lazy="true" :label="sourceInfo.tabName" :name="sourceInfo.authType">
|
||||
<el-tab-pane v-for="(sourceInfo, index) in sourceInfoTabs" :key="index" :lazy="true" :label="sourceInfo.tabName" :name="sourceInfo.authType">
|
||||
<lazy-tree
|
||||
v-if="authCondition"
|
||||
:active-name="sourceActiveName"
|
||||
@@ -86,26 +86,39 @@ export default {
|
||||
tabName: this.$t('auth.linkAuth'),
|
||||
head: this.$t('auth.linkAuthHead'),
|
||||
direction: 'source',
|
||||
authType: 'link'
|
||||
authType: 'link',
|
||||
authTargets: 'dept,role,user'
|
||||
},
|
||||
{
|
||||
tabName: this.$t('auth.datasetAuth'),
|
||||
head: this.$t('auth.datasetAuthHead'),
|
||||
direction: 'source',
|
||||
authType: 'dataset'
|
||||
authType: 'dataset',
|
||||
authTargets: 'dept,role,user'
|
||||
},
|
||||
{
|
||||
tabName: this.$t('auth.chartAuth'),
|
||||
head: this.$t('auth.linkAuthHead'),
|
||||
direction: 'source',
|
||||
authType: 'chart'
|
||||
authType: 'chart',
|
||||
authTargets: 'dept,role,user'
|
||||
},
|
||||
{
|
||||
tabName: this.$t('auth.panelAuth'),
|
||||
head: this.$t('auth.panelAuthHead'),
|
||||
direction: 'source',
|
||||
authType: 'panel'
|
||||
}],
|
||||
authType: 'panel',
|
||||
authTargets: 'dept,role,user'
|
||||
}
|
||||
// ,
|
||||
// {
|
||||
// tabName: this.$t('auth.menuAuth'),
|
||||
// head: this.$t('auth.menuAuthHead'),
|
||||
// direction: 'source',
|
||||
// authType: 'menu',
|
||||
// authTargets: 'role'
|
||||
// }
|
||||
],
|
||||
targetActiveName: null,
|
||||
sourceActiveName: null,
|
||||
showSourceSearchInput: false,
|
||||
@@ -116,6 +129,17 @@ export default {
|
||||
authCondition: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
sourceInfoTabs() {
|
||||
const tabs = []
|
||||
this.sourceInfoArray.forEach(item => {
|
||||
if (item.authTargets.indexOf(this.targetActiveName) > -1) {
|
||||
tabs.push(item)
|
||||
}
|
||||
})
|
||||
return tabs
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.targetActiveName = this.targetInfoArray[0].authType
|
||||
this.sourceActiveName = this.sourceInfoArray[0].authType
|
||||
|
||||
Reference in New Issue
Block a user