From 7026e123ee895d17a7d14c82cc50a3fb1d9c03b2 Mon Sep 17 00:00:00 2001
From: lzhe <181968431@qq.com>
Date: 星期一, 03 六月 2024 23:02:05 +0800
Subject: [PATCH] Merge branch 'master' of http://www.beijingsoft.cn:9090/r/smart-web
---
src/views/console/authority/role/index.vue | 45 ++++++++++++++++++---------------------------
1 files changed, 18 insertions(+), 27 deletions(-)
diff --git a/src/views/console/authority/role/index.vue b/src/views/console/authority/role/index.vue
index 6531ec2..557a1cc 100644
--- a/src/views/console/authority/role/index.vue
+++ b/src/views/console/authority/role/index.vue
@@ -29,7 +29,7 @@
<div class="treeMain">
<el-tabs tab-position="left" class="demo-tabs" v-model="menuActiveName" @tab-click="menuHandleClick">
<el-tab-pane v-for="item in menuGrantList" :label="item.title" :name="item.title">
- <el-tree v-if="showtree" :data="treeData" :props="{ label: 'title',children: 'children'}" node-key="id" show-checkbox @check-change="treeHandleCheckChange" :default-checked-keys="treeCheck" default-expand-all />
+ <el-tree ref="tree" v-if="showtree" :data="treeData" :props="{ label: 'title',children: 'children'}" node-key="id" show-checkbox @check-change="treeHandleCheckChange" :default-checked-keys="treeCheck" default-expand-all />
</el-tab-pane>
</el-tabs>
<div class="roleSubmit"><el-button type="primary" :loading="submitIsSaveing" @click="roleSubmit()">淇� 瀛�</el-button></div>
@@ -130,28 +130,16 @@
var obj = {
apiScopeIds: [],
dataScopeIds: [],
- menuIds: ["1519970491499069442", "1519971258746322945", "1519972116229832706", "1519972350729175041"],
+ menuIds: this.$refs.tree[0].getCheckedKeys(),
roleIds: [this.tableLiId]
}
- // 0: "1519970491499069442"
- // 1: "1519971258746322945"
- // 2: "1519972116229832706"
- // 3: "1519972350729175041"
- // 4: "1519972501539569666"
- // 5: "1123598815738675201"
- // 6: "1483632111746801666"
- // 7: "1470274120439566338"
- // 8: "1503966666579030018"
- // 9: "1529388585562615809"
- // 10: "1529365139944321026"
- // this.$HTTP.post(`/api/blade-system/role/grant`,obj).then(res=> {
- // this.isSaveing = false;
- // if(res.code == 200) {
- // this.userVisible = false;
- // this.$message.success("鎿嶄綔鎴愬姛");
- // this.getBladeList(this.tableLiId); //鑾峰彇浜哄憳鍒楄〃
- // }
- // })
+ this.isSaveing = true;
+ this.$HTTP.post(`/api/blade-system/role/grant`,obj).then(res=> {
+ this.isSaveing = false;
+ if(res.code == 200) {
+ this.$message.success("鎿嶄綔鎴愬姛");
+ }
+ })
},
menuHandleClick(tab, event) {
this.setTreeList(this.menuGrantList,event.target.innerText); //tree
@@ -234,7 +222,11 @@
if(res.code == 200) {
this.userVisible = false;
this.$message.success("鎿嶄綔鎴愬姛");
- this.getBladeList(this.tableLiId); //鑾峰彇浜哄憳鍒楄〃
+ this.$HTTP.get(`/api/blade-user/${this.tableLiId}/list`).then(res=> {
+ if(res.code == 200) {
+ this.roleHeaderList = res.data;
+ }
+ })
}
})
},
@@ -275,7 +267,6 @@
res.data[0].active = true;
this.tableData = res.data;
this.getBladeList(this.tableData[0],0); //榛樿绗竴涓鑹茶幏
- console.log(this.tableData[0],this.tableData[0].id)
}
})
},
@@ -378,7 +369,7 @@
line-height: 41px;
font-size: 14px;
text-align: center;
- background-color: #3b8e8e;
+ background-color: #409eff;
color: #fff;
}
.rolePage .roleContainer ul {
@@ -398,7 +389,7 @@
}
.rolePage .roleContainer ul li .active {
font-weight: bold;
- color: #3b8e8e;
+ color: #409eff;
}
.rolePage .roleContainer ul li:hover {
background-color: #f5f7fa;
@@ -420,7 +411,7 @@
.role-main-title {
padding: 6px 10px;
font-size: 14px;
- background-color: #d8e8d8;
+ background-color: #9dc7f2;
margin-bottom: 8px;
border-radius: 2px;
}
@@ -440,7 +431,7 @@
text-overflow: ellipsis;
}
.role-main-header ul li.titleActive {
- border: 1px solid #3b8e8e;
+ border: 1px solid #409eff;
}
.role-main-header ul li.role-header-add {
display: inline-block;
--
Gitblit v1.9.3