| | |
| | | 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" |
| | | :TreeNode="TreeEditObj" |
| | | ></data-auth-dialog> |
| | | </basic-container> |
| | | </el-aside> |
| | | <el-main> |
| | |
| | | TreeAddFormVisible: false, |
| | | //分类授权对话框 |
| | | classifyAuthVisible: false, |
| | | //数据授权对话框 |
| | | dataAuthVisible: false, |
| | | //当前点击项 |
| | | nodeClickList: "", |
| | | ClonenodeClickList: "", |
| | |
| | | index: true, |
| | | border: true, |
| | | columnBtn: false, |
| | | height: 180, |
| | | height: 150, |
| | | refreshBtn:false, |
| | | addBtn: this.Formlist.length <= 0 && this.nodeClickList != "", |
| | | editBtn: false, |
| | | delBtn: false, |
| | |
| | | } |
| | | 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) { |
| | |
| | | getAttr() { |
| | | this.loading = true; |
| | | return new Promise((resolve, reject) => { |
| | | getAtrrList() |
| | | let conditionMaps = {}; |
| | | conditionMaps["conditionMap[authType]"] = "classify_auth"; |
| | | conditionMaps["conditionMap[buttonCode]"] = "classifyTree"; |
| | | // 分类授权中是否具备查看权限 |
| | | 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) |