From 1b9fdd3afd4e92af9cf35f5b671c63d28154fb66 Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Mon, 29 Nov 2021 11:32:48 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E9=A2=84=E6=A1=88=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E4=BF=AE=E6=94=B9=E4=B8=A4=E4=B8=AA=E5=BB=BA=E7=AD=91?= =?UTF-8?q?=E5=8F=AA=E5=AF=BC=E5=85=A5=E4=B8=80=E4=B8=AA=E5=BB=BA=E7=AD=91?= =?UTF-8?q?=E7=9A=84=E4=BF=A1=E6=81=AF=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../create-plan-online-five.component.ts | 11 +++--- .../entry-plan-look.component.html | 1 + .../entry-plan-look.component.ts | 34 +++++++++++++++++-- 3 files changed, 38 insertions(+), 8 deletions(-) diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts index 7519825..c79a28e 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts @@ -235,7 +235,6 @@ export class CreatePlanOnlineFiveComponent implements OnInit { }) this.buData = JSON.parse(JSON.stringify(this.buData)) - console.log(this.buData) this.buData[0].forEach((pvalue, pindex, parr) => { if (parr[pindex].length > 0) { parr[pindex].forEach((nval, nindex, narr) => { @@ -1700,21 +1699,20 @@ export class CreatePlanOnlineFiveComponent implements OnInit { fileData iftrue=false fileSc(e){ + this.clickTitleItem(this.planTemplateData[1]) this.iftrue=true const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 let formData = new FormData() formData.append("file", e.target.files[0]) + console.log(formData) let type=this.unitData.buildingTypes[0].name=='高层建筑'?1:this.unitData.buildingTypes[0].name=='居民小区'?2:this.unitData.buildingTypes[0].name=='厂房'?3 :(this.unitData.buildingTypes[0].name=='商市场'||this.unitData.buildingTypes[0].name=='医院'||this.unitData.buildingTypes[0].name=='学校' ||this.unitData.buildingTypes[0].name=='宾馆'||this.unitData.buildingTypes[0].name=='娱乐场所'||this.unitData.buildingTypes[0].name=='餐饮业' ||this.unitData.buildingTypes[0].name=='影剧院'||this.unitData.buildingTypes[0].name=='展览建筑'||this.unitData.buildingTypes[0].name=='养老院' ||this.unitData.buildingTypes[0].name=='会议中心')?4:this.unitData.buildingTypes[0].name=='储罐类'?'StorageTankFivePlan':this.unitData.buildingTypes[0].name=='化工生产'?'ChemicalProductionFivePlan':'' - /* let fileData={ - type:this.unitData.buildingTypes[0].name=='高层建筑'?1:2, - file:formData - } */ + this.http.post(`/api/OfficeExtract/ExtractWordPlan?type=${type}`,formData).subscribe((data:any)=>{ console.log(data) if(data==null){ @@ -1729,6 +1727,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { } this.planTemplateData.forEach((pvalue,pindex,parr) => { if(parr[1].building==undefined){ + this.planTemplateData[index].building = [] if(array[index].groupName==parr[pindex].groupName){ parr[pindex].attribute=array[index].attribute } @@ -1740,7 +1739,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { } } }); - + }); //console.log(this.fileData) this.snackBar.open('解析成功!', '确定', config); diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.html b/src/app/plan-management/entry-plan-look/entry-plan-look.component.html index 64f92cd..9afe20c 100644 --- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.html +++ b/src/app/plan-management/entry-plan-look/entry-plan-look.component.html @@ -81,6 +81,7 @@