|
|
@ -18,7 +18,6 @@ |
|
|
|
<el-tree class="form_item" |
|
|
|
ref="tree" |
|
|
|
node-key="orgId" |
|
|
|
:default-checked-keys="publishAgency" |
|
|
|
style="background-color:#f7f7f7" |
|
|
|
:props="props" |
|
|
|
:data="treeData" |
|
|
@ -104,6 +103,10 @@ |
|
|
|
@click="stopPublishProject"> |
|
|
|
停止发布 |
|
|
|
</el-button> |
|
|
|
<!-- <el-button type="danger" |
|
|
|
@click="disableditem"> |
|
|
|
禁用 |
|
|
|
</el-button> --> |
|
|
|
</el-col> |
|
|
|
<!-- <el-col :span="12"> |
|
|
|
<el-button type="warning" |
|
|
@ -199,17 +202,23 @@ export default { |
|
|
|
} else { |
|
|
|
this.publishClient = '未知' |
|
|
|
} |
|
|
|
|
|
|
|
// this.processSelTreeData(this.selTreeData) |
|
|
|
this.publishAgency = res.data.orgList || [] |
|
|
|
|
|
|
|
|
|
|
|
// this.processSelTreeData(this.selTreeData) |
|
|
|
this.$refs.selTree.setCheckedKeys(this.publishAgency) |
|
|
|
this.processSelTreeData(this.selTreeData) |
|
|
|
// this.$refs.selTree.setCheckedNodes(this.publishAgency) |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
disableditem () { |
|
|
|
this.processSelTreeData(this.selTreeData) |
|
|
|
}, |
|
|
|
|
|
|
|
processSelTreeData (array) { |
|
|
|
|
|
|
|
array.forEach(element => { |
|
|
@ -218,6 +227,8 @@ export default { |
|
|
|
this.processSelTreeData(element.subOrgList) |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
console.log(this.selTreeData) |
|
|
|
}, |
|
|
|
|
|
|
|
//解析树选择的数据 |
|
|
@ -240,15 +251,15 @@ export default { |
|
|
|
resursionTree (orgArray, orgId) { |
|
|
|
for (let i = 0; i < orgArray.length; i++) { |
|
|
|
let item = orgArray[i] |
|
|
|
// debugger |
|
|
|
|
|
|
|
if (item && item.orgId === orgId) { |
|
|
|
// debugger |
|
|
|
|
|
|
|
this.selAgencyList.push(orgArray[i]) |
|
|
|
orgArray[i] = {} |
|
|
|
break |
|
|
|
|
|
|
|
} else if (item.subOrgList && item.subOrgList.length > 0) { |
|
|
|
// debugger |
|
|
|
|
|
|
|
this.resursionTree(item.subOrgList, orgId) |
|
|
|
|
|
|
|
} |
|
|
|