|
@@ -224,8 +224,10 @@ export default {
|
|
|
watch: {
|
|
|
//监听上级组织数据
|
|
|
dataList: {
|
|
|
- handler () {
|
|
|
- this.setStatus.push(true);
|
|
|
+ handler (val) {
|
|
|
+ const arr = [val];
|
|
|
+ this.decompose(arr);
|
|
|
+ this.data = arr;
|
|
|
},
|
|
|
deep: true,
|
|
|
},
|
|
@@ -242,25 +244,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
deep: true,
|
|
|
- },
|
|
|
- Status: {
|
|
|
- handler () {
|
|
|
- this.setStatus.push(true);
|
|
|
- },
|
|
|
- deep: true
|
|
|
- },
|
|
|
- setStatus: {
|
|
|
- handler (arr) {
|
|
|
- if (arr && arr.length >= 2) {
|
|
|
- const flag = Number(this.Status);
|
|
|
- const val = this.dataList;
|
|
|
- if (!flag) {
|
|
|
- this.decompose([val]);
|
|
|
- }
|
|
|
- this.data = [val];
|
|
|
- }
|
|
|
- },
|
|
|
- deep: true
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
@@ -416,7 +399,7 @@ export default {
|
|
|
//获取指定数据
|
|
|
decompose (data, id) {
|
|
|
for (let i = 0; i < data.length; i++) {
|
|
|
- data[i]['disabled'] = true;
|
|
|
+ data[i]['status'] == 1 ? '' : data[i]['disabled'] = true;
|
|
|
if (data[i].children && data[i].children.length > 0) {
|
|
|
this.decompose(data[i].children, id);
|
|
|
}
|