|
@@ -617,7 +617,8 @@ export default {
|
|
|
|
|
|
],
|
|
|
nowref:{},
|
|
|
- finalWbsid:''
|
|
|
+ finalWbsid:'',
|
|
|
+ finalIds:''
|
|
|
|
|
|
}
|
|
|
},
|
|
@@ -899,9 +900,10 @@ export default {
|
|
|
saveWbsTree () {
|
|
|
let obj = {};
|
|
|
let ids = this.$refs.treetotree.getTreeAllId('rightTree');
|
|
|
- if(this.finalWbsid.length>0){
|
|
|
- this.wbsId=this.finalWbsid
|
|
|
- }
|
|
|
+ // if(this.finalWbsid.length>0){
|
|
|
+ // this.wbsId=this.finalWbsid
|
|
|
+ // }
|
|
|
+ console.log(this.finalIds,'finalIds');
|
|
|
obj = {
|
|
|
wbsId: this.wbsId,
|
|
|
projectId: this.projectForm.id,
|
|
@@ -911,16 +913,18 @@ export default {
|
|
|
|
|
|
|
|
|
console.log(this.wbsId,'this.wbsId最终');
|
|
|
+ console.log(this.projectForm,'projectForm');
|
|
|
if (this.wbsId.toString().indexOf(',') >= 0) {
|
|
|
//私有库
|
|
|
obj.referenceType = "private";
|
|
|
let ids = this.wbsId.toString().split(',');
|
|
|
- obj.wbsId = ids[0];
|
|
|
+ obj.wbsId = this.finalWbsid;
|
|
|
obj.referencePrivateWbsProjectId = ids[1];
|
|
|
obj.primaryKeyId = this.leftTreeData[0].primaryKeyId;
|
|
|
} else {
|
|
|
//公有库
|
|
|
obj.referenceType = "public";
|
|
|
+ obj.wbsId = this.finalWbsid;
|
|
|
}
|
|
|
|
|
|
return submitWbsTreeInProject(obj);
|
|
@@ -1426,6 +1430,7 @@ export default {
|
|
|
//初始化征拆
|
|
|
async treeInitLar () {
|
|
|
let refId = this.selectData.referenceWbsTemplateIdLar;
|
|
|
+ console.log(refId,'refId');
|
|
|
//引用被删会出现 wbsType -1
|
|
|
if (refId && refId > 0 && Number(this.projectForm.wbsType) > 0) {
|
|
|
//有引用id,回显
|
|
@@ -1460,6 +1465,7 @@ export default {
|
|
|
if (this.projectForm.referenceWbsTemplateTypeLar == 'private') {
|
|
|
//私有
|
|
|
let list = arr[1].options;
|
|
|
+ console.log(list,'list');
|
|
|
for (let i = 0; i < list.length; i++) {
|
|
|
if (list[i].pkeyId == refId) {
|
|
|
WbsId = list[i].wbsId + ',' + list[i].projectId;
|
|
@@ -1563,6 +1569,7 @@ export default {
|
|
|
// 私有库右边树形数据是通过 pkeyId 查询的
|
|
|
let ids = refId.toString().split(",");
|
|
|
console.log(ids,'ids111111');
|
|
|
+ this.finalIds=ids
|
|
|
if (ids.length > 1) {
|
|
|
refId = ids[0]
|
|
|
let list = this.treeList[1].options;
|