Browse Source

[完善]完善保存到已有节点

dev
邵佳豪 4 years ago
parent
commit
88019cd240
  1. 2
      src/app/ui/collection-tools-plan/collection-tools.component.html
  2. 2
      src/app/ui/collection-tools/collection-tools.component.html
  3. 9
      src/app/ui/collection-tools/save.ts

2
src/app/ui/collection-tools-plan/collection-tools.component.html

@ -291,7 +291,7 @@
</div>
</div>
<div class="colorDiv" *ngIf="isEditPattern && pattern && canvasAssetObj.GameMode == 0">
<div class="colorDiv" *ngIf="isEditPattern">
<ul>
<li (click)="selectcolor(item,key)" class="colorLi" *ngFor="let item of colors,let key=index" [style]="{'background-color':item}"></li>
</ul>

2
src/app/ui/collection-tools/collection-tools.component.html

@ -291,7 +291,7 @@
</div>
</div>
<div class="colorDiv" *ngIf="isEditPattern && pattern && canvasAssetObj.GameMode == 0">
<div class="colorDiv" *ngIf="isEditPattern">
<ul>
<li (click)="selectcolor(item,key)" class="colorLi" *ngFor="let item of colors,let key=index" [style]="{'background-color':item}"></li>
</ul>

9
src/app/ui/collection-tools/save.ts

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

Loading…
Cancel
Save