|
|
@ -102,7 +102,6 @@ export class saveOneDialog { |
|
|
|
selectedBuildingData = this.data.selectedBuildingData |
|
|
|
selectedBuildingData = this.data.selectedBuildingData |
|
|
|
selectedSiteData = this.data.selectedSiteData |
|
|
|
selectedSiteData = this.data.selectedSiteData |
|
|
|
onSubmit(value,type){ |
|
|
|
onSubmit(value,type){ |
|
|
|
// console.log(type)
|
|
|
|
|
|
|
|
let name = this.selectedBuildingData.name + '-' + this.selectedSiteData.name |
|
|
|
let name = this.selectedBuildingData.name + '-' + this.selectedSiteData.name |
|
|
|
//如果保存到已有节点
|
|
|
|
//如果保存到已有节点
|
|
|
|
var postdata = { |
|
|
|
var postdata = { |
|
|
@ -147,6 +146,8 @@ export class saveOneDialog { |
|
|
|
// 保存平面图数据到当前节点
|
|
|
|
// 保存平面图数据到当前节点
|
|
|
|
let postdata =JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint))
|
|
|
|
let postdata =JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint))
|
|
|
|
postdata.Data = JSON.stringify(postdata.Data) |
|
|
|
postdata.Data = JSON.stringify(postdata.Data) |
|
|
|
|
|
|
|
postdata.DisposalNodeId = istrue.id |
|
|
|
|
|
|
|
// console.log(111,istrue)
|
|
|
|
this.http.post(`/api/DisposalNodeData`,postdata).subscribe(data => { |
|
|
|
this.http.post(`/api/DisposalNodeData`,postdata).subscribe(data => { |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
@ -168,14 +169,14 @@ export class saveOneDialog { |
|
|
|
resolve("更新处置节点成功,将天气 节点详情等信息保存到点击的节点") |
|
|
|
resolve("更新处置节点成功,将天气 节点详情等信息保存到点击的节点") |
|
|
|
}) |
|
|
|
}) |
|
|
|
}).then((values)=>{ |
|
|
|
}).then((values)=>{ |
|
|
|
console.log(values) |
|
|
|
// console.log(values)
|
|
|
|
postdata.level = putdata.level + 1
|
|
|
|
postdata.level = putdata.level + 1
|
|
|
|
new Promise((resolve,reject) => { |
|
|
|
new Promise((resolve,reject) => { |
|
|
|
this.http.post(`/api/DisposalNodes`,postdata).subscribe(data => { |
|
|
|
this.http.post(`/api/DisposalNodes`,postdata).subscribe(data => { |
|
|
|
resolve(data) |
|
|
|
resolve(data) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}).then((data:any)=>{ |
|
|
|
}).then((data:any)=>{ |
|
|
|
console.log(7788,data) |
|
|
|
// console.log(7788,data)
|
|
|
|
let objData = { |
|
|
|
let objData = { |
|
|
|
id: "", |
|
|
|
id: "", |
|
|
|
data: JSON.stringify(this.canvasData.selectPanelPoint.Data) || null, |
|
|
|
data: JSON.stringify(this.canvasData.selectPanelPoint.Data) || null, |
|
|
@ -260,7 +261,7 @@ export class saveOneDialog { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}).then((id) => { |
|
|
|
}).then((id) => { |
|
|
|
let dataNodeData
|
|
|
|
let dataNodeData
|
|
|
|
console.log("qnm",id) |
|
|
|
// console.log("qnm",id)
|
|
|
|
new Promise((resolve,reject) => { |
|
|
|
new Promise((resolve,reject) => { |
|
|
|
postdata.parentId = id |
|
|
|
postdata.parentId = id |
|
|
|
postdata.level = dispositionNodeData.level + 1 |
|
|
|
postdata.level = dispositionNodeData.level + 1 |
|
|
|