Browse Source

[新增]地下建筑,轨道交通五级模板导入

tangshan
陈敬瑜 3 years ago
parent
commit
14bc1f4035
  1. 2
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html
  2. 17
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts
  3. 2
      src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
  4. 8
      src/app/ui/plan-template/plan-template.component.ts

2
src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html

@ -3,7 +3,7 @@
<div class="titleitembox" cdkDropList cdkDropListOrientation="horizontal" (cdkDropListDropped)="drop($event)">
<div cdkDrag class="item" *ngFor="let item of planTemplateData;let key = index" (click)="clickTitleItem(item)"
[ngClass]="{'selectedItem': selectedItem == item.groupName||item.groupName=='新建'}" [title]="item.groupName"
[cdkDragDisabled]="item.groupName == '封面'">
[cdkDragDisabled]="item.groupName == '封面'" [style.display]="item.completed==true?'block':'none'">
<img src="../../../assets/images/add.png" *ngIf="item.groupName=='新建'">
{{item.groupName!='新建'?key + 1:''}}.{{item.groupName}}
<img style="height: 38%;" src="../../../assets/images/update.png" *ngIf="item.new!=undefined" (click)='upName(key,item.groupName)' >

17
src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts

@ -58,6 +58,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
blockyl = true
zaixianDr=false
ngOnInit(): void {
console.log(this.route.snapshot.queryParams.wordChange)
this.planLevel = this.route.snapshot.queryParams.planCategory
if (this.route.snapshot.queryParams.pattern == 'false') {
this.pattern = 'look'
@ -165,7 +166,8 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
||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=='会议中心'||this.unitData.buildingTypes[0].name=='储罐类'||this.unitData.buildingTypes[0].name=='化工生产')&&this.planLevel=='5'){
||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.planLevel=='5'){
this.zaixianDr=true
}
//console.log('单位列表信息', this.unitData)
@ -549,12 +551,14 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
planTemplateData: any
//获得模板信息
getTemplateData() {
//console.log(this.planTemplateData)
this.http.get(`/api/PlanComponents/${this.route.snapshot.queryParams.planId}/WebText`).subscribe((data: any) => {
//console.log('预案内容', data)
this.planTemplateData = JSON.parse(data.webTextData).filter(item =>
console.log('预案内容', data)
/* this.planTemplateData = JSON.parse(data.webTextData).filter(item =>
item.completed == true
)
//console.log(this.planTemplateData)
) */
this.planTemplateData=JSON.parse(data.webTextData)
console.log(this.planTemplateData)
if (this.planTemplateData[0].groupName != '封面') {
let obj = {
completed: true,
@ -1713,7 +1717,8 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
:(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':''
||this.unitData.buildingTypes[0].name=='会议中心')?4:this.unitData.buildingTypes[0].name=='储罐类'?'StorageTankFivePlan':
this.unitData.buildingTypes[0].name=='化工生产'?'ChemicalProductionFivePlan':this.unitData.buildingTypes[0].name=='轨道交通'?'MetroFivePlan':this.unitData.buildingTypes[0].name=='地下建筑'?'UndergroundBuildingFivePlan':''
this.http.post(`/api/OfficeExtract/ExtractWordPlan?type=${type}`,formData).subscribe((data:any)=>{
console.log(data)

2
src/app/plan-management/entry-plan-look/entry-plan-look.component.ts

@ -622,7 +622,7 @@ export class EntryPlanLookComponent implements OnInit {
})
})
planData=newyuan
window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.route.snapshot.queryParams.unitId}&planName=${planData.name}&unitName=${this.unitdata.unitname}&planCategory=${planData.planCategory}&planId=${planData.id}`)
window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.route.snapshot.queryParams.unitId}&planName=${planData.name}&unitName=${this.unitdata.unitname}&planCategory=${planData.planCategory}&planId=${planData.id}&&wordChange=true`)
this.getAllPlanComponents()
this.spinner=false
}

8
src/app/ui/plan-template/plan-template.component.ts

@ -1669,12 +1669,13 @@ async getattinf(){
//console.log(this.addAttinfBuild)
})
}else if(value.surveyName=='建筑信息'&&value.attinf!=undefined){
this.buildnewDate=[]
this.addAttinfBuild=value.attinf
this.buildnewDate=[] //接受接口返回的新数据
this.addAttinfBuild=value.attinf //模板传过来的数据
this.addAttinfBuild=JSON.parse(JSON.stringify(this.addAttinfBuild))
let paramsdata:any ={
categoryId:this.data.newleftTabledata[this.data.leftclicki].basicCategoryId
}
/* 请求接口,做差异化对比 */
let restlt=await new Promise((resolve) => {
this.http.get("/api/BasicGroups",{params:paramsdata}).subscribe((data:any)=>{
data.forEach((buildDate,buildi,buildarr) => {
@ -1688,6 +1689,7 @@ async getattinf(){
})
})
this.buildnewDate=JSON.parse(JSON.stringify(this.buildnewDate))
//差异化比较
let temp=0
this.buildnewDate.forEach((buildval,buindi,buildarr)=>{
temp=0
@ -1697,6 +1699,7 @@ async getattinf(){
}
})
if(temp==0){
//模板数据少于接口数据
console.log(buildval)
this.addAttinfBuild.push(buildval)
}
@ -1710,6 +1713,7 @@ async getattinf(){
})
if(temp==0){
console.log(addarr[addi])
//模板数据多了
this.addAttinfBuild.splice(addi,1)
}
})

Loading…
Cancel
Save