| | |
| | | <basic-container> |
| | | <div style="height: calc(100vh - 142px);!important;"> |
| | | <div class="headerCon" style="display: flex; flex-wrap: wrap;margin-bottom: 5px"> |
| | | <el-button v-if="permissionList.TreeAddStatus" plain size="small" type="primary" @click="TreeAdd">添加 |
| | | <el-button plain size="small" type="primary" @click="TreeAdd">添加 |
| | | </el-button> |
| | | <el-button v-if="permissionList.TreeEditStatus" plain size="small" type="primary" @click="TreeEdit">修改 |
| | | </el-button> |
| | |
| | | <el-button v-if="permissionList.classifyAuth" plain size="small" |
| | | style="width: 56px;text-align: center;padding-left: 3px" type="primary" |
| | | @click="classifyAuthHandler">分类授权 |
| | | </el-button> |
| | | <el-button v-if="permissionList.classifyAuth" plain size="small" |
| | | style="width: 56px;text-align: center;padding-left: 3px" type="primary" |
| | | @click="dataAuthHandler">数据授权 |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧树--> |
| | |
| | | :classifyData="classifyData" |
| | | :visible.sync="classifyAuthVisible" |
| | | ></classify-auth-dialog> |
| | | <!-- 数据授权对话框 --> |
| | | <data-auth-dialog |
| | | :classifyData="classifyData" |
| | | :visible.sync="dataAuthVisible" |
| | | ></data-auth-dialog> |
| | | </basic-container> |
| | | </el-aside> |
| | | <el-main> |
| | |
| | | BtmdialogVisible: false, |
| | | SelectOption: [ |
| | | { |
| | | value: 'name', |
| | | label: '中文名称' |
| | | value: 'id', |
| | | label: '英文名称', |
| | | }, |
| | | { |
| | | value: 'id', |
| | | label: '英文名称' |
| | | value: 'name', |
| | | label: '中文名称' |
| | | } |
| | | |
| | | ], |
| | | btmSelectOption: [ |
| | | { |
| | |
| | | TreeAddFormVisible: false, |
| | | //分类授权对话框 |
| | | classifyAuthVisible: false, |
| | | //数据授权对话框 |
| | | dataAuthVisible: false, |
| | | //当前点击项 |
| | | nodeClickList: "", |
| | | ClonenodeClickList: "", |
| | |
| | | this.classifyData = this.nodeClickList; |
| | | this.classifyAuthVisible = true; |
| | | }, |
| | | // 数据授权对话框打开 |
| | | dataAuthHandler() { |
| | | if (this.nodeClickList.oid === '' || this.nodeClickList.oid === undefined) { |
| | | this.$message.warning('请至少选择一条数据!') |
| | | return; |
| | | } |
| | | this.classifyData = this.nodeClickList; |
| | | this.dataAuthVisible = true; |
| | | }, |
| | | flowingDependHandler() { |
| | | if (this.nodeClickList.length <= 0) { |
| | | this.$message.warning('请至少选择一条数据!') |
| | |
| | | getAttr() { |
| | | this.loading = true; |
| | | return new Promise((resolve, reject) => { |
| | | getAtrrList() |
| | | let conditionMaps = {}; |
| | | conditionMaps["conditionMap[authType]"] = "classify_auth"; |
| | | // 分类授权中是否具备查看权限 |
| | | conditionMaps["conditionMap[menuCode]"] = "classify_view"; |
| | | getAtrrList(conditionMaps) |
| | | .then(res => { |
| | | this.Treedata = res.data; |
| | | this.CloneTreedata = res.data; |
| | |
| | | }, |
| | | //树点击事件 |
| | | async nodeClick(data) { |
| | | getAuthButtonList({classifyId: data.oid}).then(res => { |
| | | getAuthButtonList({classifyId: data.oid,code: "classifyTree",authType: "classify_auth"}).then(res => { |
| | | this.btnAuthList = res.data.data; |
| | | }).catch(error => { |
| | | console.log(error) |