|
@@ -1,7 +1,7 @@
|
|
|
<!--
|
|
|
* @Author: your name
|
|
|
* @Date: 2021-11-29 11:26:07
|
|
|
- * @LastEditTime: 2022-03-16 15:27:34
|
|
|
+ * @LastEditTime: 2022-03-17 11:40:21
|
|
|
* @LastEditors: your name
|
|
|
* @Description:新增组织
|
|
|
* @FilePath: \Foshan4A2.0\src\views\authorityManagement\components\authorityPower.vue
|
|
@@ -52,7 +52,7 @@
|
|
|
</div>
|
|
|
<div class="power-content flex-wrap">
|
|
|
<div class="flex1 part">
|
|
|
- <Organization :defaultProps="defaultProps" :data="data" nodekey="OrganId" :checkedKeys="checkedKeys" title="上级组织" />
|
|
|
+ <Organization :defaultProps="defaultProps" :data="data" nodekey="OrganId" @getTreeData="getTreeData" :checkedKeys="checkedKeys" :orgList="orgList" title="上级组织" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -129,6 +129,7 @@ export default {
|
|
|
checkRoles: [], //选中的角色
|
|
|
checkTrees: [], //上级权限选中树数据
|
|
|
rulesObj: {}, //权限规则数据
|
|
|
+ orgList: []
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -140,7 +141,7 @@ export default {
|
|
|
handler (val) {
|
|
|
const arr = [val];
|
|
|
this.decompose(arr, this.AppId);
|
|
|
- this.data = [this.dataObj];
|
|
|
+ this.data = arr
|
|
|
this.checkedKeys = [this.AppId];
|
|
|
},
|
|
|
deep: true,
|
|
@@ -159,6 +160,15 @@ export default {
|
|
|
this.getOrganTree();
|
|
|
},
|
|
|
methods: {
|
|
|
+ //获取选中的树数据
|
|
|
+ getTreeData (arr) {
|
|
|
+ if (arr.length === 1) {
|
|
|
+ const { OrganId } = arr[0];
|
|
|
+ this.AppId = OrganId;
|
|
|
+ } else if (arr.length === 0) {
|
|
|
+ this.AppId = -1
|
|
|
+ }
|
|
|
+ },
|
|
|
//获取指定数据
|
|
|
decompose (data, id) {
|
|
|
for (let i = 0; i < data.length; i++) {
|