From ce37640c757ccb9fb0ea02d6c538c9a844265557 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Sat, 06 Dec 2025 17:27:32 +0800
Subject: [PATCH] Merge branch 'feature/v8.0/8.0.4' into prod
---
src/views/authority/role.vue | 43 ++++++++++++++++++++++++++++++++++++++-----
1 files changed, 38 insertions(+), 5 deletions(-)
diff --git a/src/views/authority/role.vue b/src/views/authority/role.vue
index 65400e6..85811e3 100644
--- a/src/views/authority/role.vue
+++ b/src/views/authority/role.vue
@@ -14,9 +14,19 @@
</avue-crud>
<el-dialog title="角色权限配置" append-to-body v-model="box" width="345px">
<el-tabs type="border-card">
- <el-tab-pane label="菜单权限">
+ <el-tab-pane label="后台管理">
<el-tree :data="menuGrantList" show-checkbox node-key="id" ref="treeMenu" :default-checked-keys="menuTreeObj"
:props="props">
+ </el-tree>
+ </el-tab-pane>
+ <el-tab-pane label="移动app">
+ <el-tree :data="menuGrantListApp" show-checkbox node-key="id" ref="treeMenuApp" :default-checked-keys="menuTreeObjApp"
+ :props="props">
+ </el-tree>
+ </el-tab-pane>
+ <el-tab-pane label="大屏菜单">
+ <el-tree :data="menuGrantListOld" show-checkbox node-key="id" ref="treeMenuApp" :default-checked-keys="menuTreeObjOld"
+ :props="props">
</el-tree>
</el-tab-pane>
<!-- <el-tab-pane label="数据权限">
@@ -76,10 +86,14 @@
value: 'key',
},
menuGrantList: [],
+ menuGrantListApp: [],
+ menuGrantListOld: [],
dataScopeGrantList: [],
apiScopeGrantList: [],
apiGrantList: [],
menuTreeObj: [],
+ menuTreeObjApp: [],
+ menuTreeObjOld: [],
dataScopeTreeObj: [],
apiScopeTreeObj: [],
selectionList: [],
@@ -94,7 +108,9 @@
tip: false,
simplePage: true,
searchShow: true,
- searchMenuSpan: 6,
+ searchGutter: 30,
+ searchMenuPosition: 'left',
+ searchMenuSpan: 4,
tree: true,
border: true,
index: true,
@@ -111,6 +127,7 @@
label: '角色名称',
prop: 'roleName',
search: true,
+ searchSpan: 4,
span: 24,
rules: [
{
@@ -147,6 +164,7 @@
label: '角色别名',
prop: 'roleAlias',
search: true,
+ searchSpan: 4,
span: 24,
rules: [
{
@@ -226,11 +244,12 @@
},
submit () {
const menuList = this.$refs.treeMenu.getCheckedKeys()
+ const menuListApp = this.$refs.treeMenuApp.getCheckedKeys()
// const dataScopeList = this.$refs.treeDataScope.getCheckedKeys();
const dataScopeList = []
// const apiScopeList = this.$refs.treeApiScope.getCheckedKeys();
const apiScopeList = []
- grant(this.idsArray, menuList, dataScopeList, apiScopeList).then(() => {
+ grant(this.idsArray, [...menuList,...menuListApp], dataScopeList, apiScopeList).then(() => {
this.box = false
this.$message({
type: 'success',
@@ -320,7 +339,7 @@
this.menuTreeObj = []
this.dataScopeTreeObj = []
this.apiScopeTreeObj = []
- grantTree().then(res => {
+ grantTree({sysType: 1}).then(res => {
this.menuGrantList = res.data.data.menu
this.dataScopeGrantList = res.data.data.dataScope
this.apiScopeGrantList = res.data.data.apiScope
@@ -328,6 +347,20 @@
this.menuTreeObj = res.data.data.menu
this.dataScopeTreeObj = res.data.data.dataScope
this.apiScopeTreeObj = res.data.data.apiScope
+ this.box = true
+ })
+ })
+ grantTree({sysType: 3}).then(res => {
+ this.menuGrantListApp = res.data.data.menu
+ getRole(this.ids).then(res => {
+ this.menuTreeObjApp = res.data.data.menu
+ this.box = true
+ })
+ })
+ grantTree({sysType: 2}).then(res => {
+ this.menuGrantListOld = res.data.data.menu
+ getRole(this.ids).then(res => {
+ this.menuTreeObjOld = res.data.data.menu
this.box = true
})
})
@@ -374,4 +407,4 @@
},
}
</script>
-<style scoped lang="scss"></style>
\ No newline at end of file
+<style scoped lang="scss"></style>
--
Gitblit v1.9.3