1
lzhe
2024-04-07 5049f13dfeeaa089fac16e69b02a31605f4d4112
1
已修改1个文件
37 ■■■■■ 文件已修改
src/views/console/authority/role/index.vue 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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)
                    }
                })
            },