|
@@ -250,6 +250,7 @@ export default {
|
|
this.AssociatedPublicTap=true;
|
|
this.AssociatedPublicTap=true;
|
|
this.addElementForm.nodeName=this.from.title;
|
|
this.addElementForm.nodeName=this.from.title;
|
|
this.addElementForm.tableType=this.from.tableType+''
|
|
this.addElementForm.tableType=this.from.tableType+''
|
|
|
|
+ this.addElementForm.tableOwner = this.from.tableOwner+''
|
|
//清除数据
|
|
//清除数据
|
|
this.filterText1 = "";
|
|
this.filterText1 = "";
|
|
this.exceldata = [];
|
|
this.exceldata = [];
|
|
@@ -407,7 +408,7 @@ export default {
|
|
row.loading = true;
|
|
row.loading = true;
|
|
if (type == "关联") {
|
|
if (type == "关联") {
|
|
// saveRelation(row.id, this.from.id, this.tableData)
|
|
// saveRelation(row.id, this.from.id, this.tableData)
|
|
- savelinktableInfo({
|
|
|
|
|
|
+ this.savelinktableInfo({
|
|
linkids: row.id,
|
|
linkids: row.id,
|
|
tabId: this.from.id,
|
|
tabId: this.from.id,
|
|
type:1
|
|
type:1
|
|
@@ -420,9 +421,10 @@ export default {
|
|
row.loading = false;
|
|
row.loading = false;
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- cancelRelation({
|
|
|
|
- id: row.id,
|
|
|
|
- excelTabId: this.from.id,
|
|
|
|
|
|
+ this. savelinktableInfo({
|
|
|
|
+ linkids: row.id,
|
|
|
|
+ tabId: this.from.id,
|
|
|
|
+ type:4
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
row.checknd = false;
|
|
row.checknd = false;
|
|
@@ -470,21 +472,17 @@ export default {
|
|
if (this.addElementForm.wbsId) {
|
|
if (this.addElementForm.wbsId) {
|
|
console.log(this.tableData,'this.tableData');
|
|
console.log(this.tableData,'this.tableData');
|
|
if (this.activeName == "link") {
|
|
if (this.activeName == "link") {
|
|
- this.submitExcelRelationWbsTreeAndElement({
|
|
|
|
- excelTabId: this.from.id,
|
|
|
|
- elementList: this.tableData,
|
|
|
|
- submitStatus: 1,
|
|
|
|
- });
|
|
|
|
|
|
+ this.savelinktableInfo({
|
|
|
|
+ linkids: this.selectNodeIds,
|
|
|
|
+ tabId: this.from.id,
|
|
|
|
+ type:1
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
if (
|
|
if (
|
|
this.addElementForm.nodeName &&
|
|
this.addElementForm.nodeName &&
|
|
this.addElementForm.tableType &&
|
|
this.addElementForm.tableType &&
|
|
this.addElementForm.tableOwner
|
|
this.addElementForm.tableOwner
|
|
) {
|
|
) {
|
|
- // let nodeIds = this.$refs.tree.getCheckedKeys();
|
|
|
|
- // let nodeIds1 = this.$refs.treeall1.getCheckedKeys();
|
|
|
|
- // console.log(nodeIds,'nodeIds');
|
|
|
|
- // console.log(nodeIds1,'nodeIds1');
|
|
|
|
if( this.$refs.tree){
|
|
if( this.$refs.tree){
|
|
this.nodeIds = this.$refs.tree.getCheckedKeys();
|
|
this.nodeIds = this.$refs.tree.getCheckedKeys();
|
|
}
|
|
}
|
|
@@ -502,13 +500,11 @@ export default {
|
|
});
|
|
});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- savelinktableInfo({
|
|
|
|
|
|
+ this.selectNodeIds= this.selectNodeIds.join(',')
|
|
|
|
+ this.savelinktableInfo({
|
|
linkids: this.selectNodeIds,
|
|
linkids: this.selectNodeIds,
|
|
tabId: this.from.id,
|
|
tabId: this.from.id,
|
|
type:2
|
|
type:2
|
|
- }).then((res)=>{
|
|
|
|
- console.log(res,'添加元素表');
|
|
|
|
-
|
|
|
|
})
|
|
})
|
|
|
|
|
|
// this.submitExcelRelationWbsTreeAndElement({
|
|
// this.submitExcelRelationWbsTreeAndElement({
|
|
@@ -593,15 +589,27 @@ export default {
|
|
this.dataType = res.data;
|
|
this.dataType = res.data;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- async submitExcelRelationWbsTreeAndElement(da) {
|
|
|
|
- console.log(da,'新增元素信息表');
|
|
|
|
- //保存接口
|
|
|
|
- da.elementList.forEach((ele) => {
|
|
|
|
- ele.eName = ele.textInfo;
|
|
|
|
- ele.eType = ele.textElementType;
|
|
|
|
- ele.eAllowDeviation = ele.textDeviation;
|
|
|
|
- });
|
|
|
|
- const { data: res } = await submitExcelRelationWbsTreeAndElement(da);
|
|
|
|
|
|
+ // async submitExcelRelationWbsTreeAndElement(da) {
|
|
|
|
+ // console.log(da,'新增元素信息表');
|
|
|
|
+ // //保存接口
|
|
|
|
+ // da.elementList.forEach((ele) => {
|
|
|
|
+ // ele.eName = ele.textInfo;
|
|
|
|
+ // ele.eType = ele.textElementType;
|
|
|
|
+ // ele.eAllowDeviation = ele.textDeviation;
|
|
|
|
+ // });
|
|
|
|
+ // const { data: res } = await submitExcelRelationWbsTreeAndElement(da);
|
|
|
|
+ // if (res.code == 200) {
|
|
|
|
+ // this.$message({
|
|
|
|
+ // type: "success",
|
|
|
|
+ // message: "设置成功",
|
|
|
|
+ // });
|
|
|
|
+ // this.AssociatedPublicTap = false;
|
|
|
|
+ // this.AssociatedPublicClose();
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
|
|
+ async savelinktableInfo(da) {
|
|
|
|
+ console.log('新增元素表',da);
|
|
|
|
+ const { data: res } = await savelinktableInfo(da)
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
this.$message({
|
|
this.$message({
|
|
type: "success",
|
|
type: "success",
|