From 2a86de88f052b7f119a9de4495b44a2b4ca5f51e Mon Sep 17 00:00:00 2001 From: your name Date: Fri, 17 Sep 2021 10:31:47 +0800 Subject: [PATCH 01/26] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E9=A2=84=E6=A1=88?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E8=87=AA=E5=AE=9A=E4=B9=89=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plan-template.component.html | 65 ++++- .../plan-template/plan-template.component.ts | 276 ++++++++++++++++-- src/app/ui/plan-template/zdyaddgroup.html | 17 ++ src/app/ui/ui.module.ts | 5 +- 4 files changed, 333 insertions(+), 30 deletions(-) create mode 100644 src/app/ui/plan-template/zdyaddgroup.html diff --git a/src/app/ui/plan-template/plan-template.component.html b/src/app/ui/plan-template/plan-template.component.html index 6adc72b..de4d98b 100644 --- a/src/app/ui/plan-template/plan-template.component.html +++ b/src/app/ui/plan-template/plan-template.component.html @@ -40,15 +40,15 @@ {{unitName}}
- +
- + - +
@@ -60,7 +60,11 @@
-
+
+ + 自定义 +
+
编辑
@@ -87,8 +91,8 @@
- +
@@ -232,7 +236,54 @@
- + +
+
+
+
+ +
+
+ + + + + +
+ + + +
+
+
+ + +
+
+
+ + +
+
+
+
+ + + + +
+
+
+
diff --git a/src/app/ui/plan-template/plan-template.component.ts b/src/app/ui/plan-template/plan-template.component.ts index b64a32d..ee2855a 100644 --- a/src/app/ui/plan-template/plan-template.component.ts +++ b/src/app/ui/plan-template/plan-template.component.ts @@ -265,8 +265,31 @@ export class PlanTemplateComponent implements OnInit { }) }); } - console.log(this.newleftTabledata) + } + //自定义新增分组 + zdyaddGroup(){ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + if(this.unitName==undefined){ + this.snackBar.open('请选择预案模板!','确定',config); + }else{ + const dialogRef = this.dialog.open(zdyaddGroup, {//调用open方法打开对话框并且携带参数过去 + width: '340px', + height:'200px', + disableClose:true, + data:this.newleftTabledata[this.leftclicki].data==null?null:this.newleftTabledata[this.leftclicki].data==0?null:this.newleftTabledata[this.leftclicki].data + }); + dialogRef.afterClosed().subscribe(result => { + console.log(result) + if(result!=undefined){ + this.newleftTabledata[this.leftclicki].data.push({groupName:result,completed: true,attribute:[],zdy:true}) + } + + }); + } + } //删除分组 deleteGroup(groupName){ @@ -283,7 +306,9 @@ export class PlanTemplateComponent implements OnInit { } //新增属性 groupName - addAttribute(groupName){ + ziint=0 + addAttribute(zi,groupName){ + this.ziint=zi this.groupPanle=true this.groupName=groupName if(groupName=='单位概况'){ @@ -348,6 +373,26 @@ export class PlanTemplateComponent implements OnInit { this.groupPanle=true this.accordion.closeAll() } + //自定义新增属性 + zdyaddAttribute(){ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + const dialogRef = this.dialog.open(zdyaddattinf, {//调用open方法打开对话框并且携带参数过去 + width: '340px', + height:'200px', + disableClose:true, + data:this.newleftTabledata[this.leftclicki].data==null?null:this.newleftTabledata[this.leftclicki].data==0?null:this.newleftTabledata[this.leftclicki].data + }); + dialogRef.afterClosed().subscribe(result => { + console.log(result) + if(result!=undefined){ + this.newleftTabledata[this.leftclicki].data[0].attribute.push({completed: true, surveyName: result,zdy:true,attinf:[]}) + } + console.log(this.group) + }); + this.accordion.closeAll() + } //删除具体属性 delAttribute(groupName,surveyName){ let isTrue = confirm('您确定要删除吗') @@ -367,13 +412,49 @@ export class PlanTemplateComponent implements OnInit { } //新增属性信息 danweiInfTable=[] - addAttInfo(surveyName){ - if(surveyName=='进攻通道'){ - if(this.group[0].attribute[4].attinf==undefined){ - this.group[0].attribute[4].attinf=[] - this.group[0].attribute[4].attinf.push({head:'',tableth:[],completed:true}) - }else{ - this.group[0].attribute[4].attinf.push({head:'',tableth:[],completed:true}) + addAttInfo(surveyName,suri){ + if(surveyName!='单位基本信息'&&surveyName!='建筑信息'&&surveyName!='四周毗邻'&&surveyName!='消防设施'&&surveyName!='重点部位'&&surveyName!='功能分区'){ + if(surveyName=='进攻通道'){ + if(this.group[0].attribute[suri].attinf==undefined){ + this.group[0].attribute[suri].attinf=[] + this.group[0].attribute[suri].attinf.push({head:'',tableth:[],completed:true}) + }else{ + this.group[0].attribute[suri].attinf.push({head:'',tableth:[],completed:true}) + } + } + else{ + const dialogRef = this.dialog.open(zdydisaster, {//调用open方法打开对话框并且携带参数过去 + width: '340px', + height:'450px', + disableClose:true, + data:this.group + }); + dialogRef.afterClosed().subscribe(result => { + console.log(result) + if(result!=undefined){ + this.group[0].attribute.forEach((value,index,array)=>{ + if(array[index].surveyName==surveyName){ + if(array[index].attinf==undefined){ + array[index].attinf=[] + array[index].attinf.push(result) + }else{ + array[index].attinf.push(result) + } + if(result.level==2){ + for(var i=0;i { - console.log(result) + //console.log(result) if(result!=undefined){ this.newleftTabledata[this,this.leftclicki].data.forEach((value,index,array)=>{ if(value.groupName=='单位概况'){ @@ -463,7 +544,27 @@ export class PlanTemplateComponent implements OnInit { } } - //进攻通道 + //单位概况自定义新增表格数据 + zdyattackAdd(suri,i,level){ + /* this.group[0].attribute.forEach((value,index,array)=>{ + if (array[index].groupName==name) { + if(level==1){ + this.group[index].attribute[i].tableth.push('') + }else if(level==2){ + this.group[index].attribute[i].tableth.push({head:'',body:''}) + } + } + }) */ + this.group[0].attribute[suri].attinf[i].tableth.push('') + } + //单位概况自定义删除一条数据 + zdyDelDisaster(suri,attributei){ + let isTrue = confirm('您确定要删除该条信息吗') + if(isTrue){ + this.group[0].attribute[suri].attinf.splice(attributei,1) + } + + } //进攻通道,灾情设定及其他增加表格数据 attackAdd(name,i,level){ @@ -624,15 +725,14 @@ export class PlanTemplateComponent implements OnInit { } //第二层向上排序 zaiTop(zi,attributei){ + console.log(zi,attributei) var temp if(attributei!=0){ for (let index = attributei-1; index >=0; index--) { - if(this.group[zi].attribute[index].completed){ - temp=this.group[zi].attribute[index] + temp=this.group[zi].attribute[index] this.group[zi].attribute[index]=this.group[zi].attribute[attributei] this.group[zi].attribute[attributei]=temp - return - } + return } @@ -644,12 +744,10 @@ export class PlanTemplateComponent implements OnInit { var temp if (attributei!=this.group[zi].attribute.length-1) { for (let index = attributei+1; index < this.group[zi].attribute.length; index++) { - if(this.group[zi].attribute[index].completed){ - temp=this.group[zi].attribute[index] - this.group[zi].attribute[index]=this.group[zi].attribute[attributei] - this.group[zi].attribute[attributei]=temp - return - } + temp=this.group[zi].attribute[index] + this.group[zi].attribute[index]=this.group[zi].attribute[attributei] + this.group[zi].attribute[attributei]=temp + return } @@ -720,6 +818,38 @@ export class PlanTemplateComponent implements OnInit { } } + //单位概况自定义内容向上排序 + adyTop(suri,attributei){ + var temp + if(attributei!=0){ + for (let index = attributei-1; index >=0; index--) { + if(this.group[0].attribute[suri].completed){ + temp=this.group[0].attribute[suri].attinf[index] + this.group[0].attribute[suri].attinf[index]=this.group[0].attribute[suri].attinf[attributei] + this.group[0].attribute[suri].attinf[attributei]=temp + return + } + + } + + } + } + //自定义单位概况内容乡下排序 + adyDown(suri,attributei){ + var temp + if (attributei!=this.group[0].attribute[suri].attinf.length-1) { + for (let index = attributei+1; index < this.group[0].attribute[suri].attinf.length; index++) { + if(this.group[0].attribute[suri].completed){ + temp=this.group[0].attribute[suri].attinf[index] + this.group[0].attribute[suri].attinf[index]=this.group[0].attribute[suri].attinf[attributei] + this.group[0].attribute[suri].attinf[attributei]=temp + return + } + + } + + } + } } //新建预案 @Component({ @@ -930,6 +1060,35 @@ export class addGroup{ } } +//自定义新增分组 +@Component({ + selector: 'zdyaddGroup', + templateUrl: './zdyaddgroup.html', + styleUrls: ['./addgroup.scss'] +}) +export class zdyaddGroup{ + constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {} + ngOnInit(): void{ + //console.log(this.data) + } + groupName + //取消按钮 + close(){ + this.dialogRef.close(); + } + //确定提交 + newGroup(){ + console.log(this.groupName) + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + if(this.groupName==''||this.groupName==undefined){ + this.snackBar.open('请输入分组名称!','确定',config); + }else{ + this.dialogRef.close(this.groupName); + } + } +} //单位概况新增弹窗 @Component({ selector: 'adddwsurvey', @@ -971,6 +1130,35 @@ defineClick(){ this.dialogRef.close(this.addwsurvey) } } +//单位概况自定义新增弹窗 +@Component({ + selector: 'zdyaddattinf', + templateUrl: './zdyaddgroup.html', + styleUrls: ['./addgroup.scss'] +}) +export class zdyaddattinf{ + constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {} + ngOnInit(): void{ + //console.log(this.data) + } + groupName + //取消按钮 + close(){ + this.dialogRef.close(); + } + //确定提交 + newGroup(){ + console.log(this.groupName) + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + if(this.groupName==''||this.groupName==undefined){ + this.snackBar.open('请输入属性名称!','确定',config); + }else{ + this.dialogRef.close(this.groupName); + } + } +} //编辑单位概况单位基本信息属性信息弹窗 @Component({ selector: 'addattinf', @@ -1087,7 +1275,51 @@ defineClick(){ this.addAttinfBuild:this.data.surveyName=='消防设施'?this.addAttinfFile:this.facilityItems) } } - +//单位概况自定义新增四个分类 +@Component({ + selector: 'zdydisaster', + templateUrl: './Disaster.html', + styleUrls: ['./addKeyname.scss'] +}) +export class zdydisaster{ + constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {} + ngOnInit(): void{ + console.log(this.data) + } + level//类型 + headName//表头名称 + lieNumber//列数 + hNumber//行数 + //取消按钮 + close(){ + this.dialogRef.close(); + } + //确定按钮 + newdisaster(){ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + if(this.level==undefined||this.level==''){ + this.snackBar.open('请选择类型!','确定',config); + }else if(this.headName==undefined||this.headName==''){ + this.snackBar.open('请输入表头名称!','确定',config); + }else{ + let tree={ + json:[], + name: '' + } + let attrubute={ + headName:this.headName, + level:this.level, + tableth:this.level==1||this.level==2?[]:this.level==3?'':tree, + lieNumber:this.lieNumber, + hNumber:this.hNumber + } + this.dialogRef.close(attrubute); + } + + } +} //灾情设定弹窗 @Component({ selector: 'disaster', diff --git a/src/app/ui/plan-template/zdyaddgroup.html b/src/app/ui/plan-template/zdyaddgroup.html new file mode 100644 index 0000000..bf7bcd5 --- /dev/null +++ b/src/app/ui/plan-template/zdyaddgroup.html @@ -0,0 +1,17 @@ +
+
+ 自定义新增 +
+
+
+ + + + +
+
+
+ + +
+
\ No newline at end of file diff --git a/src/app/ui/ui.module.ts b/src/app/ui/ui.module.ts index 089dffd..d9b669c 100644 --- a/src/app/ui/ui.module.ts +++ b/src/app/ui/ui.module.ts @@ -93,6 +93,9 @@ import { addattinf } from './plan-template/plan-template.component' import { disaster } from './plan-template/plan-template.component' import { BrowserModule } from '@angular/platform-browser'; import { TreeDiagramModule } from './ng-tree-diagram/src/ng-tree-diagram'; +import { zdyaddGroup } from './plan-template/plan-template.component' +import { zdyaddattinf } from './plan-template/plan-template.component' +import { zdydisaster } from './plan-template/plan-template.component' @NgModule({ declarations: [UiComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent, @@ -104,7 +107,7 @@ import { TreeDiagramModule } from './ng-tree-diagram/src/ng-tree-diagram'; addBuiltInAttributeComponent, addOptionalComponent, addOptionalAttributeComponent, editBuiltInAttributeComponent, editOptionalAttributeComponent, CollectionToolsComponent, WorkingAreaComponent, CreateBuilding, EditBuilding, leftFunctionalDomainComponent, editPlaneFigureComponent, saveOneDialog, saveTwoDialog, addDisposalNodeComponent, editDisposalNodeComponent, CollectionToolsPlanComponent, CreateBuildingPlan, EditBuildingPlan, leftFunctionalDomainComponentPlan, editPlaneFigureComponentPlan, addOffices, editOffices, addBGCDisposalNodeComponent, CollectionToolsBuildingComponent, CreateBuildingBuilding, - EditBuildingBuilding, leftFunctionalDomainBuildingComponent, editPlaneFigureBuildingComponent, Organization, PlanTemplateComponent, addPlanname, upPlanname, addGroup, adddwsurvey, addattinf,disaster], + EditBuildingBuilding, leftFunctionalDomainBuildingComponent, editPlaneFigureBuildingComponent, Organization, PlanTemplateComponent, addPlanname, upPlanname, addGroup, adddwsurvey, addattinf,disaster,zdyaddGroup,zdyaddattinf,zdydisaster], imports: [ CommonModule, From a8f29be4e3513c979e2a37b5d37483abd586b809 Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Fri, 17 Sep 2021 13:52:11 +0800 Subject: [PATCH 02/26] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E9=A2=84=E6=A1=88?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E8=87=AA=E5=AE=9A=E4=B9=89=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/ui/plan-template/plan-template.component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/ui/plan-template/plan-template.component.ts b/src/app/ui/plan-template/plan-template.component.ts index ee2855a..db69a86 100644 --- a/src/app/ui/plan-template/plan-template.component.ts +++ b/src/app/ui/plan-template/plan-template.component.ts @@ -401,7 +401,12 @@ export class PlanTemplateComponent implements OnInit { if (array[index].groupName==groupName) { array[index].attribute.forEach((element,i) => { if(element.surveyName==surveyName){ - array[index].attribute[i].completed=false + if(array[index].attribute[i].zdy!=undefined){ + array[index].attribute.splice(i,1) + }else{ + array[index].attribute[i].completed=false + } + } }); } From ffcb0e1d231e1c23db50a70cd04b250ae71c7ed6 Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Wed, 22 Sep 2021 10:29:39 +0800 Subject: [PATCH 03/26] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E4=BA=94=E7=BA=A7?= =?UTF-8?q?=E9=A2=84=E6=A1=88=E5=9C=A8=E7=BA=BF=E7=BC=96=E5=88=B6=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E6=8C=89=E9=92=AE=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../create-plan-online-five.component.html | 139 ++++++++++++++++++ .../create-plan-online-five.component.scss | 5 + .../create-plan-online-five.component.ts | 13 +- 3 files changed, 156 insertions(+), 1 deletion(-) diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html index 0722c08..c4b1dad 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html @@ -11,6 +11,10 @@
+ + @@ -1136,6 +1140,141 @@
+ +
+ + +
+ +
+ + + + + + + + + + + + + + + + + + +
+ +
+ {{element.tableth[tablethi]}} + +
+ + +
+ {{itemtr.tabletd[tabletdi]}} +
+ + +
{{element.tableth||''}}
+ +
+
+
+ + + + + + + + +
+ {{itemthj.head}} + + {{itemthj.body}} +
+
+
+
+ + + +
+ +
+
+ delete + + +
+
+ + +
+
+
+ +
+
+
diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss index 9a7c908..9fe0dc3 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss @@ -58,6 +58,11 @@ position: absolute; right: 24px; top: 7px; + input { + width: 100%; + height: 22px; + line-height: 22px; + border-radius: 3px;} button { margin-left: 10px; mat-icon { 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 0abb294..cbf8c99 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 @@ -56,6 +56,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { planLevel: string//预案级别 blockyl = true + zaixianDr=false ngOnInit(): void { this.planLevel = this.route.snapshot.queryParams.planCategory if (this.route.snapshot.queryParams.pattern == 'false') { @@ -157,6 +158,9 @@ export class CreatePlanOnlineFiveComponent implements OnInit { data.items.forEach(element => { if (element.id == this.route.snapshot.queryParams.companyId) { this.unitData = element + if(this.unitData.buildingTypes[0].name=='高层建筑'&&this.planLevel=='5'){ + this.zaixianDr=true + } //console.log('单位列表信息', this.unitData) this.getTemplateData() } @@ -343,7 +347,8 @@ export class CreatePlanOnlineFiveComponent implements OnInit { //console.log(this.buildZong) let index = this.getArrayIndex(this.planTemplateData,'单位概况') this.planTemplateData[index].building.forEach(element => { - element.body[0].attinf[0].value = element.body[0].attinf[0].olddata = this.unitData.usci + if(element.body[0].completed){ + element.body[0].attinf[0].value = element.body[0].attinf[0].olddata = this.unitData.usci element.body[0].attinf[1].value = element.body[0].attinf[1].olddata = this.unitData.buildingTypes[0].name element.body[0].attinf[2].value = element.body[0].attinf[2].olddata = this.unitData.contacts element.body[0].attinf[3].value = element.body[0].attinf[3].olddata = this.unitData.phone @@ -360,6 +365,8 @@ export class CreatePlanOnlineFiveComponent implements OnInit { }); }); } + } + }); @@ -1480,6 +1487,10 @@ export class CreatePlanOnlineFiveComponent implements OnInit { showTu(key){ this.planTemplateData[key].new=true } + //上传 + upload() { + document.getElementById('up').click() + } } From 50ca61b8f867f05eb648e0d62ef00a559ec0aa70 Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Wed, 22 Sep 2021 16:22:05 +0800 Subject: [PATCH 04/26] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E8=BF=9B=E6=94=BB?= =?UTF-8?q?=E9=80=9A=E9=81=93flex=E6=94=B9=E4=B8=BA=E4=B8=8A=E4=B8=8B?= =?UTF-8?q?=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../create-plan-online-five.component.html | 4 ++-- .../create-plan-online-five.component.scss | 2 ++ .../create-plan-online-five.component.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html index c4b1dad..f1823c6 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html @@ -12,9 +12,9 @@
- + diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss index 9fe0dc3..b6bfc31 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss @@ -733,6 +733,8 @@ .attack { width: 100%; height: 100%; + display: flex; + flex-direction: column; .attackhead { width: 100%; height: 40px; 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 cbf8c99..348d3e3 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 @@ -371,7 +371,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { }); - // console.log(this.planTemplateData) + console.log(this.planTemplateData) } /* else if (this.selectedItem == '单位概况') { //this.getAllBuildings() } */ else if (this.selectedItem == '预案附件') { From e37dde65b506957408ba82194ed2aa13e638711a Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Fri, 24 Sep 2021 15:54:27 +0800 Subject: [PATCH 05/26] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E4=BA=94=E7=BA=A7?= =?UTF-8?q?=E9=AB=98=E5=B1=82=E5=9C=A8=E7=BA=BF=E7=BC=96=E5=88=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0word=E5=AF=B9=E6=8E=A5=E5=90=8E=E7=AB=AF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../create-plan-online-five.component.html | 9 ++- .../create-plan-online-five.component.scss | 17 +++++ .../create-plan-online-five.component.ts | 62 +++++++++++++++++-- 3 files changed, 80 insertions(+), 8 deletions(-) diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html index f1823c6..2b4e290 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html @@ -14,7 +14,7 @@ - + @@ -27,7 +27,9 @@ visibility 退出预览
- +
+ +
@@ -262,7 +264,8 @@
-
+
+
diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss index b6bfc31..e03f010 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss @@ -79,6 +79,22 @@ box-sizing: border-box; padding-top: 66px; overflow-y: auto; + .shadow{ + height: 95%; + width: 97%; + margin: 10px 10px 10px 10px; + /* position:absolute; + left:0; + top:0; */ + z-index:998; + background-color:#FFFFFF; + opacity:0.6; + mat-spinner{ + position: relative; + top: 40%; + left: 45%; + } + } .leftbox { position: fixed; width: 14%; @@ -401,6 +417,7 @@ min-height: 97%; box-sizing: border-box; padding: 10px 10px 0; + .cover { width: 100%; min-height: 780px; 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 348d3e3..d21a440 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 @@ -230,7 +230,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { }) this.buData = JSON.parse(JSON.stringify(this.buData)) - console.log(this.buData) + //console.log(this.buData) this.buData.forEach((pvalue, pindex, parr) => { if (parr[pindex].length > 0) { parr[pindex].forEach((nval, nindex, narr) => { @@ -392,7 +392,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { //delete this.planTemplateData[this.planTemplateData.length-3] } //JSON.parse(JSON.stringify(this.planTemplateData)) - console.log(this.planTemplateData) + //console.log(this.planTemplateData) }); } } @@ -420,7 +420,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { drop(event: CdkDragDrop) { moveItemInArray(this.planTemplateData, event.previousIndex, event.currentIndex); - console.log('拖拽标题', this.planTemplateData) + //console.log('拖拽标题', this.planTemplateData) } //获取建筑信息 @@ -1117,7 +1117,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { }) } - console.log(this.planTemplateData) + //console.log(this.planTemplateData) } //单位相关数据 unitId: any = this.route.snapshot.queryParams.companyId @@ -1340,6 +1340,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { pattern: string = 'edit' preview() { this.pattern = 'look' + this.clickTitleItem('单位概况') } quitPreview() { this.pattern = 'edit' @@ -1489,7 +1490,58 @@ export class CreatePlanOnlineFiveComponent implements OnInit { } //上传 upload() { - document.getElementById('up').click() + let isTrue = confirm('上传新文件后可能会覆盖原有数据,您确定要继续上传吗') + if(isTrue){ + document.getElementById('up').click() + } + } + //在线文档上传接口 + fileData + iftrue=false + fileSc(e){ + this.iftrue=true + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + let formData = new FormData() + formData.append("file", e.target.files[0]) + let fileData={ + type:1, + file:formData + } + this.http.post(`/api/OfficeExtract/ExtractWordPlan?type=1`,formData).subscribe((data:any)=>{ + console.log(data) + if(data==null){ + this.snackBar.open('解析失败,请确定好格式再重新上传!', '确定', config); + }else{ + this.fileData=JSON.parse(JSON.stringify(data)) + this.fileData.forEach((value,index,array) => { + if(value.groupName=='交通水源'||value.groupName=='重点图示'){ + value.attribute.forEach(element => { + element.imgArr[0]=element.imgArr[0].slice(25,element.imgArr[0].length) + }); + } + this.planTemplateData.forEach((pvalue,pindex,parr) => { + if(parr[1].building==undefined){ + if(array[index].groupName==parr[pindex].groupName){ + parr[pindex].attribute=array[index].attribute + } + }else{ + if(array[index].groupName==parr[pindex].groupName&&pindex!=1){ + parr[pindex].attribute=array[index].attribute + }else if(array[index].groupName==parr[pindex].groupName&&pindex==1){ + parr[pindex].building[0].body=array[index].attribute + } + } + }); + + }); + //console.log(this.fileData) + this.snackBar.open('解析成功!', '确定', config); + } + this.iftrue=false + e.target.value='' + }) } } From 9e9e42ee8309ccd814a2d1f10538bfbc83a5a21e Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Fri, 22 Oct 2021 17:10:22 +0800 Subject: [PATCH 06/26] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E5=9C=A8=E7=BA=BF?= =?UTF-8?q?=E7=BC=96=E5=88=B6word=E5=A4=9A=E8=A1=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E8=A1=8C=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resultcompanyPlan.html | 2 +- .../create-plan-online-five.component.html | 240 ++++------ .../create-plan-online-five.component.scss | 131 +++--- .../create-plan-online-five.component.ts | 413 ++++++++++++++---- .../create-plan-online-five/updatal.html | 34 ++ .../plan-management/plan-management.module.ts | 3 +- .../plan-template.component.html | 8 +- src/assets/images/addyello.png | Bin 0 -> 447 bytes src/assets/images/delyello.png | Bin 0 -> 328 bytes src/assets/images/downyello.png | Bin 0 -> 339 bytes src/assets/images/uoyello.png | Bin 0 -> 342 bytes src/assets/images/updatabai.png | Bin 0 -> 298 bytes src/assets/images/updateyello.png | Bin 0 -> 328 bytes 13 files changed, 528 insertions(+), 303 deletions(-) create mode 100644 src/app/plan-management/create-plan-online-five/updatal.html create mode 100644 src/assets/images/addyello.png create mode 100644 src/assets/images/delyello.png create mode 100644 src/assets/images/downyello.png create mode 100644 src/assets/images/uoyello.png create mode 100644 src/assets/images/updatabai.png create mode 100644 src/assets/images/updateyello.png diff --git a/src/app/key-unit/key-unit-management/resultcompanyPlan.html b/src/app/key-unit/key-unit-management/resultcompanyPlan.html index 4159eb7..4cfb2ac 100644 --- a/src/app/key-unit/key-unit-management/resultcompanyPlan.html +++ b/src/app/key-unit/key-unit-management/resultcompanyPlan.html @@ -11,7 +11,7 @@
-

预案名称:{{planName}}

+

单位名称:{{planName}}

提交时间:{{createTime| date:'yyyy-MM-dd HH:mm:ss'||''}}

发起申请:{{organizationName ||''}}

diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html index 2b4e290..bd0a257 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html @@ -266,7 +266,6 @@
-
@@ -435,12 +434,11 @@
-
- {{item.groupName}} + *ngIf="item.groupName!='单位概况'&&item.groupName!='交通水源'&&item.groupName!='重点图示'&&item.groupName!='预案附件'&&item.groupName!='封面'"> +
+ {{item.groupName}} + +
{{element.headName}} - - + + + + +
@@ -483,14 +482,16 @@ - + + + @@ -568,7 +569,7 @@
-
+ +
- + - +
@@ -614,7 +615,7 @@
- +
@@ -656,15 +657,15 @@
-
+
-->
-
{{item.groupName}} -
+
-->
-
- {{item.groupName}} -
-
-
- -
{{ i.name }}
- delete - -
-
- -
- {{i.cantent}} -
-
-
- -
- -
-
-
-
- {{item.groupName}} -
-
-
- -
{{ i.name }}
-
-
- -
- {{i.cantent}} -
-
-
-
-
+
{{element.surveyName}} + (click)='unitadd(element.surveyName,uniti,elei)' *ngIf="element.surveyName!='进攻通道'">
@@ -875,14 +803,15 @@
-
-
+
+
- + - + + -
{{info.value}}
-
-
-
-
-
-
- - - - - - - - - - -
{{info.propertyName}}{{info.propertyValue}}
+
+
@@ -933,17 +838,19 @@ width: 100%; background-color: #FFFBE8; text-align: center;"> - {{attack.name}} + + +
-
+
- - + + + -
{{info.value}}
+
@@ -968,9 +875,10 @@
-
- - +
+ + + -
{{info.value}}
+
- + @@ -1006,7 +914,7 @@ font-size: 16px; text-align: center;">{{info.value}} -
+
@@ -1028,7 +936,7 @@
- + @@ -1048,7 +956,7 @@
- + @@ -1073,7 +981,7 @@
- +
@@ -1095,7 +1003,7 @@
- + @@ -1118,7 +1026,7 @@
- +
@@ -1146,31 +1054,28 @@
- +
- + + +
@@ -1193,13 +1098,14 @@ - + + @@ -1277,7 +1183,7 @@ - + diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss index e03f010..37d7deb 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss @@ -1,6 +1,34 @@ * { scrollbar-width: none; /* Firefox */ } +//黄色标题右侧添加删除按钮样式封装 +@mixin amg(){ + img { + cursor: pointer; + width: 18px; + height: 18px; + float: right; + margin-top: 10px; + margin-right: 10px; + } +} +//span标签通用 +@mixin span { + text-align: center; + font-size: 16px; + color: #2196F3; + height: 40px; + line-height: 40px; +} +//input标签 +@mixin input($backgroudcolor) { + height: 100%; + width: 100%; + font-size: 16px; + border: none; + outline: none; + background-color: $backgroudcolor; +} ::-webkit-scrollbar { display: none; /* Chrome Safari */ } @@ -259,11 +287,7 @@ text-align: center; background-color: #e1f1ff; span{ - text-align: center; - font-size: 16px; - color: #2196F3; - height: 40px; - line-height: 40px; + @include span() } } .newBody{ @@ -499,14 +523,7 @@ line-height: 40px; color: #b99a00; } - img { - cursor: pointer; - width: 20px; - height: 20px; - float: right; - margin-top: 10px; - margin-right: 10px; - } + @include amg() } .body { width: 100%; @@ -519,6 +536,16 @@ width: 100%; border-collapse: collapse; //background-color: #E8E9E9; + img{ + /* position: relative; + bottom: 30px; + left: 700px; */ + float: right; + width: 30px; + height: 26px; + margin-top: 12px; + cursor: pointer; + } } th { //background-color: #E8E9E9; @@ -735,14 +762,7 @@ line-height: 40px; color: #ffffff; } - img { - cursor: pointer; - width: 20px; - height: 20px; - float: right; - margin-top: 10px; - margin-right: 10px; - } + @include amg() } .body { width: 100%; @@ -764,14 +784,15 @@ line-height: 40px; color: #b99a00; } - img { + /* img { cursor: pointer; width: 20px; height: 20px; float: right; margin-top: 10px; margin-right: 10px; - } + } */ + @include amg() } .attackbody { width: 100%; @@ -823,15 +844,13 @@ width: 100%; display: flex; flex-direction: column; - - } .onetext{ - height: 40px; + height: 42px; width: 100%; - border-bottom: 1px solid #F2F4F5; + border-bottom: 1px solid #E8E9E9; span{ - height: 40px; + height: 100%; width: 40%; font-size: 16px; background-color: #F2F4F5; @@ -842,13 +861,13 @@ font-size: 16px; border: none; outline: none; - border-bottom: 1px solid #F2F4F5; + //border-bottom: 1px solid #E8E9E9; } img{ height: 20px; width: 20px; position: relative; - top: 10px; + top: 12px; } } .file{ @@ -858,7 +877,7 @@ height: 40px; width: 100%; background-color: #FFFBE8; - text-align: center; + span { font-size: 16px; text-align: center; @@ -866,6 +885,16 @@ line-height: 40px; color: #b99a00; } + input{ + height: 40px; + background-color: #FFFBE8; + font-size: 16px; + border: none; + outline: none; + color: #b99a00; + text-align: center; + } + @include amg() } .fileBody{ height: 100%; @@ -908,7 +937,12 @@ font-size: 16px; border: none; outline: none; - + } + img{ + height: 20px; + width: 20px; + position: relative; + //top: 12px; } } } @@ -930,14 +964,7 @@ background-color: #FFFBE8; color: #b99a00; } - img { - cursor: pointer; - width: 20px; - height: 20px; - float: right; - margin-top: 10px; - margin-right: 10px; - } + @include amg() } .partsBody{ width: 100%; @@ -1031,13 +1058,14 @@ width: 100%; height: 36px; line-height: 36px; - background-color: #e1f1ff; - text-align: center; - color: white; + background-color: #e8f4fe; + //text-align: center; + color: #2196F3; input { background-color: #e1f1ff; color: #2196F3; - text-align: center; + //text-align: center; + margin-left: 20px; height: 100%; width: 90%; font-size: 16px; @@ -1050,6 +1078,9 @@ top: 4px; cursor: pointer; } + span{ + margin-left: 20px; + } } .attack { width: 100%; @@ -1235,14 +1266,7 @@ line-height: 40px; color: #b99a00; } - img { - cursor: pointer; - width: 20px; - height: 20px; - float: right; - margin-top: 10px; - margin-right: 10px; - } + @include amg() } .body { width: 100%; @@ -1255,6 +1279,7 @@ width: 100%; border-collapse: collapse; //background-color: #E8E9E9; + } th { //background-color: #E8E9E9; @@ -1266,7 +1291,7 @@ background-color: #e8e9e9; text-align: center; height: 100%; - width: 100%; + width: 95%; font-size: 16px; border: none; outline: none; 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 d21a440..e0cca1e 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 @@ -62,6 +62,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { if (this.route.snapshot.queryParams.pattern == 'false') { this.pattern = 'look' this.blockyl = false + this.clickTitleItem('单位概况') } else { this.pattern = 'edit' } @@ -249,6 +250,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { selectedContent:any async clickTitleItem(item) { //this.planTemplateData[key].new=true + this.selectedContent = item this.addNumber = -1 this.yinruData = { @@ -372,9 +374,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { console.log(this.planTemplateData) - } /* else if (this.selectedItem == '单位概况') { - //this.getAllBuildings() - } */ else if (this.selectedItem == '预案附件') { + } else if (this.selectedItem == '预案附件') { this.getTwoDPlanList() }else if(this.selectedItem == '新建'){ const dialogRef = this.dialog.open(newTitle, {//调用open方法打开对话框并且携带参数过去 @@ -606,11 +606,27 @@ export class CreatePlanOnlineFiveComponent implements OnInit { element.attribute = [{ name: '特别警示', content: '' }] } } + if(element.groupName=='三位概况'){ + this.clickTitleItem('单位概况') + } }); if(this.planLevel=='4'){ this.planTemplateData.push({completed: true,groupName: '新建'}) } - + this.planTemplateData.forEach(element => { + if(element.attribute!=undefined){ + /* element.attribute.forEach((item,index,value) => { + if(value[index].level!=undefined&&value[index].level==1){ + value[index].lieNumber=value[index].tableth.length + } + }); */ + for(let i=0;i { + if(result!=undefined){ + //外层四种类型编辑行跟列 + if((num.length<3? this.planTemplateData[num[0]].attribute[num[1]]:this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]]).level==1){ + //表格类型编辑列数 + if((num.length<3? this.planTemplateData[num[0]].attribute[num[1]]:this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]]).tabletr==undefined){ + (num.length<3? this.planTemplateData[num[0]].attribute[num[1]]:this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]]).tabletr = [] + } + if((num.length<3? this.planTemplateData[num[0]].attribute[num[1]]:this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]]).tableth.length { + element.tabletd.push('') + }); + } + + } + }else{ + //表格类型减少列数 + for(let i=(num.length<3? this.planTemplateData[num[0]].attribute[num[1]]:this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]]).tableth.length;i>result.lieNumber;i--){ + (num.length<3? this.planTemplateData[num[0]].attribute[num[1]]:this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]]).tableth.splice(i-1,1) + if((num.length<3? this.planTemplateData[num[0]].attribute[num[1]]:this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]]).tabletr!=undefined){ + (num.length<3? this.planTemplateData[num[0]].attribute[num[1]]:this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]]).tabletr.forEach((element) => { + element.tabletd.splice(element.tabletd.length-1,1) + }); + } + } + } + }else if((num.length<3? this.planTemplateData[num[0]].attribute[num[1]]:this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]]).level==2){ + //多行文本编辑行列 + if((num.length<3? this.planTemplateData[num[0]].attribute[num[1]]:this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]]).tableth.lengthresult.hNumber;i--){ + (num.length<3? this.planTemplateData[num[0]].attribute[num[1]]:this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]]).tableth.splice(i-1,1) + } + } + + (num.length<3? this.planTemplateData[num[0]].attribute[num[1]]:this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]]).tableth.forEach((element,index,value) => { + if(value[index].lengthresult.lieNumber;a--){ + value[index].splice(index-1,1) + } + } + + }); + + } + + console.log(this.planTemplateData) + } + + }); + } + //新建内容向上排序 + upPai(zi,attributei){ + var temp + if(attributei!=0){ + for (let index = attributei-1; index >=0; index--) { + temp=this.planTemplateData[zi].attribute[index] + this.planTemplateData[zi].attribute[index]=this.planTemplateData[zi].attribute[attributei] + this.planTemplateData[zi].attribute[attributei]=temp + return + } + + } + } + //新建内容向下排序 + downPai(zi,attributei){ + var temp + if (attributei!=this.planTemplateData[zi].attribute.length-1) { + for (let index = attributei+1; index < this.planTemplateData[zi].attribute.length; index++) { + temp=this.planTemplateData[zi].attribute[index] + this.planTemplateData[zi].attribute[index]=this.planTemplateData[zi].attribute[attributei] + this.planTemplateData[zi].attribute[attributei]=temp + return + + } + + } } //单位概况左侧建筑点击事件 buildingName @@ -1236,61 +1363,117 @@ export class CreatePlanOnlineFiveComponent implements OnInit { // console.log(item, this.clicki) } //单位概况增加一行 - unitadd(surveyName, attacki, i) { -  let index = this.getArrayIndex(this.planTemplateData,'单位概况') - + unitadd(surveyName, attacki, i,fileNum?:number) { + let index = this.getArrayIndex(this.planTemplateData,'单位概况') this.addNumber++ - if (surveyName == '进攻通道') { - if (this.planTemplateData[index].building[attacki].body[4].attinf[i].tabletr == undefined) { - this.planTemplateData[index].building[attacki].body[4].attinf[i].tabletr = [] - } - this.planTemplateData[index].building[attacki].body[4].attinf[i].tabletr.push({ tabletd: [] }) - for (var j = 0; j < this.planTemplateData[index].building[attacki].body[4].attinf[i].tableth.length; j++) { - if (this.planTemplateData[index].building[attacki].body[4].attinf[i].tabletr != undefined) { - this.planTemplateData[index].building[attacki].body[4].attinf[i].tabletr[this.planTemplateData[index].building[attacki].body[4].attinf[i].tabletr.length - 1].tabletd.push('') - } - else { - this.planTemplateData[index].building[attacki].body[4].attinf[i].tabletr[this.addNumber].tabletd.push('') + this.planTemplateData[index].building[attacki].body.forEach((value,bodyi,arr)=>{ + if(surveyName==arr[bodyi].surveyName){ + if(arr[bodyi].zdy==undefined){ + if (surveyName == '进攻通道') { + if (this.planTemplateData[index].building[attacki].body[bodyi].attinf[i].tabletr == undefined) { + this.planTemplateData[index].building[attacki].body[bodyi].attinf[i].tabletr = [] + } + this.planTemplateData[index].building[attacki].body[bodyi].attinf[i].tabletr.push({ tabletd: [] }) + for (var j = 0; j < this.planTemplateData[index].building[attacki].body[bodyi].attinf[i].tableth.length; j++) { + if (this.planTemplateData[index].building[attacki].body[bodyi].attinf[i].tabletr != undefined) { + this.planTemplateData[index].building[attacki].body[bodyi].attinf[i].tabletr[this.planTemplateData[index].building[attacki].body[4].attinf[i].tabletr.length - 1].tabletd.push('') + } + else { + this.planTemplateData[index].building[attacki].body[bodyi].attinf[i].tabletr[this.addNumber].tabletd.push('') + } + } + + // console.log(this.planTemplateData) + } + else if (surveyName == '功能分区') { + // console.log(attacki) + this.planTemplateData[index].building[attacki].body[bodyi].attinf.push({ name: '', value: '' }) + } else if (surveyName == '重点部位') { + this.planTemplateData[index].building[attacki].body[bodyi].attinf.push({ heafName: '', body: [{ name: '重点部位名称', value: '' }, { name: '重点部位所在位置', value: '' }, { name: '建筑结构', value: '' }, { name: '使用性质', value: '' }, { name: '主要危险性', value: '' }] }) + } + else if(surveyName == '单位基本信息'||surveyName == '建筑信息'){ + this.planTemplateData[index].building[attacki].body[bodyi].attinf.push({ propertyName: '', value: '',completed:true,zdy:true }) + } else if(surveyName == '四周毗邻'){ + this.planTemplateData[index].building[attacki].body[bodyi].attinf.push({ name: '', value: '',completed:true,zdy:false }) + this.planTemplateData[index].building[attacki].body[bodyi].attinf.push({ name: '', value: '',completed:true,zdy:true }) + }else if(surveyName == '消防设施'){ + if(fileNum==0){ + this.planTemplateData[index].building[attacki].body[bodyi].attinf[i].facilityItems.push({ name: '', value: '',completed:true,zdy:true}) + }else{ + this.planTemplateData[index].building[attacki].body[bodyi].attinf.push({ propertyName: '', value: '',completed:true,zdy:true,facilityItems:[] }) + } + + } + }else{ + this.addAttribute(surveyName,attacki,i,1,surveyName) } + + } + }) + console.log(this.planTemplateData) + } + //单位概况自定义表格新增一行 + unitNewadd(...num:number[]){ + console.log(num) + if (this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]].tableth == undefined) { + //this.planTemplateData[key].attribute[i].tabletr = [] + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('请先编辑列!', '确定', config); + }else{ + if(this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]].tabletr == undefined){ + this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]].tabletr = [] + } + this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]].tabletr.push({ tabletd: [] }) + for(var j = 0; j < this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]].tableth.length; j++) { + if (this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]].tabletr != undefined) { + this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]].tabletr[this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]].tabletr.length - 1].tabletd.push('') + } + else { + this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]].tabletr[this.addNumber].tabletd.push('') } - - // console.log(this.planTemplateData) } - else if (surveyName == '功能分区') { - // console.log(attacki) - this.planTemplateData[index].building[attacki].body[6].attinf.push({ name: '', value: '' }) - } else if (surveyName == '重点部位') { - this.planTemplateData[index].building[attacki].body[5].attinf.push({ heafName: '', body: [{ name: '重点部位名称', value: '' }, { name: '重点部位所在位置', value: '' }, { name: '建筑结构', value: '' }, { name: '使用性质', value: '' }, { name: '主要危险性', value: '' }] }) } + //this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]].push() } //单位概况删除一行 - unitDel(surveyName, attacki, i) { + unitDel(surveyName, attacki, i,fileNum?:number) { let index = this.getArrayIndex(this.planTemplateData,'单位概况') const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 let isTrue = confirm('您确定要删除该条信息吗') - if (surveyName == '进攻通道') { - if (isTrue) { - if (this.planTemplateData[index].building[attacki].body[4].attinf[i].tabletr != undefined) { - this.planTemplateData[index].building[attacki].body[4].attinf[i].tabletr.splice(this.planTemplateData[index].building[attacki].body[4].attinf[i].tabletr.length - 1, 1) - this.addNumber-- - if (this.planTemplateData[index].building[attacki].body[4].attinf[i].tabletr.length == 0) { - this.addNumber = -1 + this.planTemplateData[index].building[attacki].body.forEach((value,bodyi,arr) => { + if(surveyName==arr[bodyi].surveyName){ + if (surveyName == '进攻通道') { + if (isTrue) { + if (this.planTemplateData[index].building[attacki].body[bodyi].attinf[i].tabletr != undefined) { + this.planTemplateData[index].building[attacki].body[bodyi].attinf[i].tabletr.splice(this.planTemplateData[index].building[attacki].body[4].attinf[i].tabletr.length - 1, 1) + this.addNumber-- + if (this.planTemplateData[index].building[attacki].body[bodyi].attinf[i].tabletr.length == 0) { + this.addNumber = -1 + } + } else { + this.snackBar.open('请先增加一行!', '确定', config); + } } - } else { - this.snackBar.open('请先增加一行!', '确定', config); + } else if (surveyName == '功能分区'||surveyName=='重点部位'||surveyName=='单位基本信息'||surveyName=='建筑信息'||surveyName=='消防设施') { + if (isTrue) { + if(surveyName=='消防设施'&&fileNum!=undefined){ + this.planTemplateData[index].building[attacki].body[bodyi].attinf[i].facilityItems.splice(fileNum,1) + }else{ + this.planTemplateData[index].building[attacki].body[bodyi].attinf.splice(i, 1) + } + + } + }else if(surveyName == '四周毗邻'){ + this.planTemplateData[index].building[attacki].body[bodyi].attinf.splice(i, 1) + this.planTemplateData[index].building[attacki].body[bodyi].attinf.splice(i-1, 1) } } - } else if (surveyName == '功能分区') { - if (isTrue) { - this.planTemplateData[index].building[attacki].body[6].attinf.splice(i, 1) - } - } else if (surveyName == '重点部位') { - if (isTrue) { - this.planTemplateData[index].building[attacki].body[5].attinf.splice(i, 1) - } - } + }); + } //分段上传 @@ -1403,13 +1586,13 @@ export class CreatePlanOnlineFiveComponent implements OnInit { oldData = false clickoldData() { this.oldData = !this.oldData - } //新增功能(社会联动等引用) searchType = '0' //打开自定义新增具体内容 tuTrue=false - addAttribute(groupName,key){ + addAttribute(groupName,attacki?:any, i?:any,fileNum?:any,surveyName?:string){ + let index = this.getArrayIndex(this.planTemplateData,'单位概况') const dialogRef = this.dialog.open(disaster, {//调用open方法打开对话框并且携带参数过去 width: '340px', height:'450px', @@ -1419,24 +1602,29 @@ export class CreatePlanOnlineFiveComponent implements OnInit { dialogRef.afterClosed().subscribe(result => { console.log(result) if(result!=undefined){ - this.planTemplateData.forEach((value,index,array)=>{ - if(array[index].groupName==groupName){ - if(array[index].attribute==undefined){ - array[index].attribute=[] - array[index].attribute.push(result) - }else{ - array[index].attribute.push(result) - } - if(result.level==2){ - for(var i=0;i{ + if(array[index].groupName==groupName){ + if(array[index].attribute==undefined){ + array[index].attribute=[] + array[index].attribute.push(result) + }else{ + array[index].attribute.push(result) + } + if(result.level==2){ + for(var i=0;i { + console.log(result) + if(result!=undefined){ + this.planTemplateData.forEach((value,index,array)=>{ + if(array[index].groupName==groupName){ + if(array[index].attribute==undefined){ + array[index].attribute=[] + array[index].attribute.push(result) + }else{ + array[index].attribute.push(result) + } + if(result.level==2){ + for(var i=0;i,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {} + ngOnInit(): void{ + JSON.parse(JSON.stringify(this.data)) + this.level=Number(this.data.level) + console.log(this.data) + } + level//类型 + headName=this.data.headName//表头名称 + lieNumber=this.data.zdy!=undefined?0:this.data.lieNumber//最小列数 + hNumber=this.data.zdy!=undefined?0:this.data.hNumber//行数 + //取消按钮 + close(){ + this.dialogRef.close(); + } + //确定按钮 + newdisaster(){ + console.log(this.data) + let result={ + lieNumber:this.level==2? this.data.tableth[0].length:this.data.tableth.length, + hNumber:this.data.tableth.length + } + this.dialogRef.close(result); + } } \ No newline at end of file diff --git a/src/app/plan-management/create-plan-online-five/updatal.html b/src/app/plan-management/create-plan-online-five/updatal.html new file mode 100644 index 0000000..0a3b90b --- /dev/null +++ b/src/app/plan-management/create-plan-online-five/updatal.html @@ -0,0 +1,34 @@ +
+
+ 修改内容 +
+
+ + + {{headName}} +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/plan-management/plan-management.module.ts b/src/app/plan-management/plan-management.module.ts index 9266f39..969afe1 100644 --- a/src/app/plan-management/plan-management.module.ts +++ b/src/app/plan-management/plan-management.module.ts @@ -72,12 +72,13 @@ import { KeyUnitModule } from '../key-unit/key-unit.module'; import { yinYong } from './create-plan-online-five/create-plan-online-five.component' import { newTitle } from './create-plan-online-five/create-plan-online-five.component' import { disaster } from './create-plan-online-five/create-plan-online-five.component' +import { updataHl } from './create-plan-online-five/create-plan-online-five.component' @NgModule({ declarations: [EntryPlanComponent, PassPlanComponent, OpenPlanComponent, EntryPlanLookComponent, AddPlanone, PlanType, AuditSatus, PlanLevel, DownloadFile, AuditResult, ChangeName, WebLookComponent, OnetwoEntryPlanComponent, newunitComponent, MeetPlanComponent, newunitMeet, TypePlanComponent, newunitType, PsViewer, onetwoAuditResult, meetAuditResult, typeAuditResult, MaintainUpComponent, GkPsViewer, GkhtmlPsViewer, UnitInfo, ReinforcePlanComponent, state, ImgDetails, CreatePlanOnlineFiveComponent, CreatePlanOnlineThreeComponent, - OpenPlanToolDialog,yinYong,newTitle,disaster], + OpenPlanToolDialog,yinYong,newTitle,disaster,updataHl], imports: [ CommonModule, PlanManagementRoutingModule, diff --git a/src/app/ui/plan-template/plan-template.component.html b/src/app/ui/plan-template/plan-template.component.html index de4d98b..4ddb7d7 100644 --- a/src/app/ui/plan-template/plan-template.component.html +++ b/src/app/ui/plan-template/plan-template.component.html @@ -19,7 +19,7 @@
-
+
{{item.unitname}}
@@ -66,7 +66,7 @@
- 编辑 + {{item.groupName=='单位概况'?'编辑':'新增'}}
@@ -92,7 +92,7 @@
+ *ngIf="item.groupName=='单位概况'&&(element.surveyName!='四周毗邻'&&element.surveyName!='重点部位'&&element.surveyName!='功能分区')"> 编辑
@@ -173,7 +173,7 @@ (click)='delattAndfileOne(item.groupName,element.surveyName,i)'> 删除 diff --git a/src/assets/images/addyello.png b/src/assets/images/addyello.png new file mode 100644 index 0000000000000000000000000000000000000000..dc78a140f0064fe724b1ee01eff342a57a7ead2f GIT binary patch literal 447 zcmV;w0YLtVP)Px$c}YY;R5(wql)+KLKoo|*mj<*Gu>#;i;HDLT2f}z#D-bF$SK>jaKs`C(B6JWs zumml@JZCpqTw+ul*_oZmyxn}e@89=+p=LbY(h{XF(4d%RWNM}`?+sa2e-l5jNND76 zBhcE!m9_mAj$BM(8NgL1B6G0~$UqdHfkR-05{Dxm{DaadCkU576L=M9JD3Ie5P`E! z#H=o57h5C@6z+VO1*M72xmgEEr;G{EaLA-0gN2ziyAf?M!Uk$nT7{9PP5D=vpyo4- z*wWL#KrXZ;oian{qnuVXDK~!)Dm1%CnHx}MUZn2C-$34aCid#eIvf@CVl@%2e-ayI z5{?*``|U*v5M*J*@&7>kNKIMqPi*)6t{$q|?EL&Y6{M-7Qrw#Aw)OYfBFYls;7={0 zyot~<{kGk-CCsFW5O;?>R-0CZ3+oOZq%a3>l+7EL-R)MKRXATV@m2oLpm)y87aQ?` p_5pGR*3_I26~2_^0kb+|`v55C%mY|98L0pO002ovPDHLkV1lKR!M6Ya literal 0 HcmV?d00001 diff --git a/src/assets/images/delyello.png b/src/assets/images/delyello.png new file mode 100644 index 0000000000000000000000000000000000000000..2294fb198893915f92725fb55186eae6ea07f5bc GIT binary patch literal 328 zcmV-O0k{5%P)Px$0!c(cR5(xVl)X{IKoEt$rwT*`lz>W*69f@1!48l@=m67!Q;7gdFcFp$xdf{d zS8&UmJYr-l8<~t5F1oq5`)>E`k2rFc1#`he7dCjiNtyP!sPFOPg*Y%OgLfGlZ(|}7 z+&MA2y=VR1Ppg87iOW5}7y}W;oPceEIYPuEut6;L>>ahryaBF`r8wx_sJ~Jx3k>5q z$(RjsE^}sxrzEA}_(Mdig2l9GqI)0<8vK!*1#SiJ;NQu}Ct) zR%{nAZpUM=M&7x4B^*t6BhtN}RkfeG`>cpgk)0$mSWAa1qL0vwSP&o1+HbaiQ70LZ a|L7A)pU2lo60wB<0000Px$4M{{nR5(w~lQC|>KoCXWkl;2PA)Fu_AvBKYas!~i5gnWWj^Ga26n0KQOha;m za09pjHHclbmK-ev)^ZbNtCeQ-^yklf!FpN5D?;McX}0_97Be1e_jK)^Yk$#fa6yPx$5J^NqR5(wqlRZ+xKoo$#M`mcn6X+4}2HGTa906@MZ9IV-fzAmO#uHE?G{Oz= z1nLd2bR6e7n@OBC(M@37YX9E1?|r)~IBl7dAq*qKaXGzA8Ph@Cebv4wui^w)$jFW( zLq5N_xpU&{l=@z>wrVDxk%T^FaT0 z6dE=*xo<~Bi9bNrQ77QpD;my1!`2J3fYp@#r_lQi7AQLlY0PLZ*_C%xbJP}gup?Ej z2QicKphiazDTz>b)a^34xMJ5D^e?5gg*4vU;~l;C59TgVluZ;fu6sXy#N3J07*qoM6N<$f~EY8Jpcdz literal 0 HcmV?d00001 diff --git a/src/assets/images/updatabai.png b/src/assets/images/updatabai.png new file mode 100644 index 0000000000000000000000000000000000000000..f009270e71cb3eaa97ea0624ec23118d494510ce GIT binary patch literal 298 zcmV+_0oDGAP)ihx70_i#CgG(zqdOjO^1tHB=aZReh$XbD?r$!lo6SDOqvIE= wn`&Lp{Px$0!c(cR5(wi)4OrPKoEf8f0;2couCd336G2tAc3I^Tm}#zN+4n&5gi~ppaeU$ z8Lj6SNuxXQIE3QePy0H-^NUtAe*cI}c>RNRd&GA!ReYQR5~T65i#>%bL|Kb)P*?#L z_7HNB?u4PKXun|SVt1i?ND2iC5sD-UL4V5mCgh8V(CUnd4PJt(ASI|OVnOd97POla zBQ#Og*>>E)7H8t#-*raYC9RqgDQtRU23gR4LB5?wNM2C}p?q~G%wDM^`>9(|Sc5PT z8lr^ePM%d_L1_y|t8eAU7qNzI+OwbwXLGSWkNW08`X-jPwwp6k;j=1m%~Lj#-_JXe aa{336A*%M}Cdd~60000 Date: Tue, 26 Oct 2021 11:47:44 +0800 Subject: [PATCH 07/26] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E9=A2=84=E6=A1=88?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F=E8=B7=9F?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../create-plan-online-five.component.html | 8 +- .../plan-template.component.html | 75 +++++---- .../plan-template.component.scss | 44 +++-- .../plan-template/plan-template.component.ts | 151 ++++++++++++++++++ src/app/ui/plan-template/updatal.html | 34 ++++ src/app/ui/ui.module.ts | 3 +- 6 files changed, 268 insertions(+), 47 deletions(-) create mode 100644 src/app/ui/plan-template/updatal.html diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html index bd0a257..284a9e3 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html @@ -806,7 +806,7 @@
- + @@ -838,7 +838,7 @@ width: 100%; background-color: #FFFBE8; text-align: center;"> - +
- +
- +
@@ -876,7 +876,7 @@
- +
diff --git a/src/app/ui/plan-template/plan-template.component.html b/src/app/ui/plan-template/plan-template.component.html index 4ddb7d7..9877f42 100644 --- a/src/app/ui/plan-template/plan-template.component.html +++ b/src/app/ui/plan-template/plan-template.component.html @@ -65,7 +65,7 @@ 自定义
- + {{item.groupName=='单位概况'?'编辑':'新增'}}
@@ -212,7 +212,19 @@
- +
+ +
+
+ + + + +
+
@@ -223,17 +235,7 @@
-
-
- - - - -
-
+
@@ -241,7 +243,18 @@
- +
+ +
+
+ + + + +
@@ -271,28 +284,29 @@
-->
-
-
- - - - -
-
-
+
- +
+ +
+
+ + + + +
+
@@ -322,8 +336,7 @@
-->
-
-
+ +
diff --git a/src/app/ui/plan-template/plan-template.component.scss b/src/app/ui/plan-template/plan-template.component.scss index f310b98..e5ab3c3 100644 --- a/src/app/ui/plan-template/plan-template.component.scss +++ b/src/app/ui/plan-template/plan-template.component.scss @@ -253,25 +253,46 @@ display: flex; flex-direction: row; .attackLeft { - width: 70%; + width: 100%; display: flex; flex-direction: column; .attackleftHead { width: 100%; - height: 40px; + height: 50px; //background-color: #ffd91d; background-color: #FFFBE8; - opacity: 0.7; - input { - background-color: #FFFBE8; - color: #B99A00; - text-align: center; + display: flex; + .headName{ + width: 80%; height: 100%; - width: 100%; - font-size: 16px; - border: none; - outline: none; + input { + background-color: #FFFBE8; + color: #B99A00; + text-align: center; + height: 100%; + width: 100%; + font-size: 16px; + border: none; + outline: none; + } + } + .rightButton{ + height: 100%; + width: 20%; + float: right; + cursor: pointer; + img{ + line-height: 50px; + } + button{ + font-size: 16px; + margin-top: 8px; + } + /* margin-top: 20px; + margin-right: 8%; */ + //margin-left: 40%; } + } .attackleftTable { width: 100%; @@ -316,6 +337,7 @@ } } } + } .attackRight { width: 30%; diff --git a/src/app/ui/plan-template/plan-template.component.ts b/src/app/ui/plan-template/plan-template.component.ts index db69a86..10f65ad 100644 --- a/src/app/ui/plan-template/plan-template.component.ts +++ b/src/app/ui/plan-template/plan-template.component.ts @@ -855,6 +855,126 @@ export class PlanTemplateComponent implements OnInit { } } + ////修改多行文本,表格行列数量 + updataHl(...num:number[]){ + const dialogRef = this.dialog.open(updataHl, {//调用open方法打开对话框并且携带参数过去 + width: '340px', + height:'350px', + disableClose:true, + data:JSON.parse(JSON.stringify(num.length<=2? this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]]:this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].attinf[num[2]])) + }); + dialogRef.afterClosed().subscribe(result => { + if(result!=undefined){ + if(num.length<=2){ + //外层四种类型编辑行跟列 + if(this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].level==1){ + //表格类型编辑列数 + if(this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].tabletr==undefined){ + this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].tabletr = [] + } + if(this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].tableth.length { + element.tabletd.push('') + }); + } + + } + }else{ + //表格类型减少列数 + for(let i=this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].tableth.length;i>result.lieNumber;i--){ + this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].tableth.splice(i-1,1) + if(this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].tabletr!=undefined){ + this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].tabletr.forEach((element) => { + element.tabletd.splice(element.tabletd.length-1,1) + }); + } + } + } + }else if(this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].level==2){ + //多行文本编辑行列 + if(this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].tableth.lengthresult.hNumber;i--){ + this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].tableth.splice(i-1,1) + } + } + + this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].tableth.forEach((element,index,value) => { + if(value[index].lengthresult.lieNumber;a--){ + value[index].splice(index-1,1) + } + } + + }); + + } + }else if(num.length<=3){ + //进攻通道跟单位概况自定义 + //表格类型编辑列数 + if(this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].attinf[num[2]].level==1||this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].attinf[num[2]].level==undefined){ + if(this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].attinf[num[2]].tableth.length { + element.tabletd.push('') + }); + } */ + + } + }else{ + //表格类型减少列数 + for(let i=this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].attinf[num[2]].tableth.length;i>result.lieNumber;i--){ + this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].attinf[num[2]].tableth.splice(i-1,1) + + } + } + } + else if(this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].attinf[num[2]].level==2){ + //多行文本编辑行列 + if(this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].attinf[num[2]].tableth.lengthresult.hNumber;i--){ + this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].attinf[num[2]].tableth.splice(i-1,1) + } + } + + this.newleftTabledata[this.leftclicki].data[num[0]].attribute[num[1]].attinf[num[2]].tableth.forEach((element,index,value) => { + if(value[index].lengthresult.lieNumber;a--){ + value[index].splice(index-1,1) + } + } + + }); + + } + } + console.log(this.newleftTabledata) + } + + }); + } } //新建预案 @Component({ @@ -1370,3 +1490,34 @@ export class disaster{ } } +//修改表格跟多行文本 +@Component({ + selector: 'updataHl', + templateUrl: './updatal.html', + styleUrls: ['./addKeyname.scss'] +}) +export class updataHl{ + constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {} + ngOnInit(): void{ + JSON.parse(JSON.stringify(this.data)) + this.level=this.data.level + console.log(this.data,this.level) + } + level//类型 + headName=this.data.headName||this.data.head//表头名称 + lieNumber=this.data.zdy!=undefined?0:this.data.lieNumber//最小列数 + hNumber=this.data.zdy!=undefined?0:this.data.hNumber//行数 + //取消按钮 + close(){ + this.dialogRef.close(); + } + //确定按钮 + newdisaster(){ + console.log(this.data) + let result={ + lieNumber:this.level==2? this.data.tableth[0].length:this.data.tableth.length, + hNumber:this.data.tableth.length + } + this.dialogRef.close(result); + } +} \ No newline at end of file diff --git a/src/app/ui/plan-template/updatal.html b/src/app/ui/plan-template/updatal.html new file mode 100644 index 0000000..b3f7e64 --- /dev/null +++ b/src/app/ui/plan-template/updatal.html @@ -0,0 +1,34 @@ +
+
+ 修改内容 +
+
+ + + {{headName}} +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/ui/ui.module.ts b/src/app/ui/ui.module.ts index d9b669c..b55b2a3 100644 --- a/src/app/ui/ui.module.ts +++ b/src/app/ui/ui.module.ts @@ -96,6 +96,7 @@ import { TreeDiagramModule } from './ng-tree-diagram/src/ng-tree-diagram'; import { zdyaddGroup } from './plan-template/plan-template.component' import { zdyaddattinf } from './plan-template/plan-template.component' import { zdydisaster } from './plan-template/plan-template.component' +import { updataHl} from './plan-template/plan-template.component' @NgModule({ declarations: [UiComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent, @@ -107,7 +108,7 @@ import { zdydisaster } from './plan-template/plan-template.component' addBuiltInAttributeComponent, addOptionalComponent, addOptionalAttributeComponent, editBuiltInAttributeComponent, editOptionalAttributeComponent, CollectionToolsComponent, WorkingAreaComponent, CreateBuilding, EditBuilding, leftFunctionalDomainComponent, editPlaneFigureComponent, saveOneDialog, saveTwoDialog, addDisposalNodeComponent, editDisposalNodeComponent, CollectionToolsPlanComponent, CreateBuildingPlan, EditBuildingPlan, leftFunctionalDomainComponentPlan, editPlaneFigureComponentPlan, addOffices, editOffices, addBGCDisposalNodeComponent, CollectionToolsBuildingComponent, CreateBuildingBuilding, - EditBuildingBuilding, leftFunctionalDomainBuildingComponent, editPlaneFigureBuildingComponent, Organization, PlanTemplateComponent, addPlanname, upPlanname, addGroup, adddwsurvey, addattinf,disaster,zdyaddGroup,zdyaddattinf,zdydisaster], + EditBuildingBuilding, leftFunctionalDomainBuildingComponent, editPlaneFigureBuildingComponent, Organization, PlanTemplateComponent, addPlanname, upPlanname, addGroup, adddwsurvey, addattinf,disaster,zdyaddGroup,zdyaddattinf,zdydisaster,updataHl], imports: [ CommonModule, From a5a0830f291cb8865baf1f0c84007d755a66e51a Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Tue, 26 Oct 2021 16:47:31 +0800 Subject: [PATCH 08/26] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../combined-query.component.html | 164 +++++++++ .../combined-query.component.scss | 233 +++++++++++++ .../combined-query.component.spec.ts | 25 ++ .../combined-query.component.ts | 317 ++++++++++++++++++ .../statistic-analysis-routing.module.ts | 4 +- .../statistic-analysis.module.ts | 5 +- 6 files changed, 745 insertions(+), 3 deletions(-) create mode 100644 src/app/statistic-analysis/combined-query/combined-query.component.html create mode 100644 src/app/statistic-analysis/combined-query/combined-query.component.scss create mode 100644 src/app/statistic-analysis/combined-query/combined-query.component.spec.ts create mode 100644 src/app/statistic-analysis/combined-query/combined-query.component.ts diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.html b/src/app/statistic-analysis/combined-query/combined-query.component.html new file mode 100644 index 0000000..8560622 --- /dev/null +++ b/src/app/statistic-analysis/combined-query/combined-query.component.html @@ -0,0 +1,164 @@ + +
+
+
+
+
+ 单位 + 预案 +
+
+ + + + + 包含下级 +
+
+ clear +
+ + + +
  • {{node.name}}
  • +
    + + +
  • {{node.name}}
  • +
    +
    +
    +
    +
    + + + + + + 🠊 + + + +
    +
    + + + + 文本预案 + 二维预案 + 三维预案 + 其他预案 + + + +
    +
    + + + + + {{unit.name}} + + + +
    + +
    + + + + 新增 + 维护更新 + + +
    + +
    + + + + 应急预案(国家级) + 应急预案(市级) + 类型预案 + Ⅰ级预案 + Ⅱ级预案 + Ⅲ级预案 + Ⅳ级预案 + Ⅴ级预案 + + +
    + + +
    + + +
    +
    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + +
    组织名称{{element.name}}单位类型{{element.creatorName}}预案级别{{element.planCategory==1?'Ⅰ级预案':element.planCategory==2?'Ⅱ级预案': + element.planCategory==3?'Ⅲ级预案':element.planCategory==4?'Ⅳ级预案':element.planCategory==5?'Ⅴ级预案':element.planCategory==8?'类型预案':'应急预案'}} +
    + +
    +
    +
    diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.scss b/src/app/statistic-analysis/combined-query/combined-query.component.scss new file mode 100644 index 0000000..6b834aa --- /dev/null +++ b/src/app/statistic-analysis/combined-query/combined-query.component.scss @@ -0,0 +1,233 @@ +.header { + width: 100%; + padding: 12px 10px; + box-sizing: border-box; + .queryBox { + box-sizing: border-box; + padding: 5px 0 0 5px; + // margin-left: 50px; + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-items:center; + // justify-content:center; + .queryField { + //margin: 0 10px; + input { + width: 180px; + height: 22px; + line-height: 22px; + border-radius: 3px; + } + @media screen and (min-device-width:1400px){ + margin: 3px 20px; + } + @media screen and (max-device-width:1400px)and (min-device-width:1200px){ + margin: 3px 10px; + mat-form-field{ + width: 180px; + } + } + @media screen and (max-device-width:1200px){ + margin: 3px 0 3px 10px; + mat-form-field{ + width: 120px; + } + } + + } + + + } //queryBox + .butclass{ + button{ + width: 80px;height: 36px; + font-size: 16px; + } +} + .ordiv{ + position: relative; + .organizationbox{ + width:450px; + height: 200px; + background: white; + position: absolute; + top: 48px; + left: 77px; + z-index: 999; + border: 1px solid grey; + overflow-y: auto; + li{ + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + mat-tree-node{ + cursor: pointer; + white-space:pre; + } + mat-tree-node:hover{ + background: rgba(225, 225, 225, 0.8); + } + .closediv{ + z-index: 100; + position: absolute; + right: 0; + top: 0; + width: 30px; + height: 30px; + cursor: pointer; + line-height: 30px; + text-align: center; + } + .closediv:hover{ + background:rgba(225, 225, 225, 0.8); + } + } + + } + } + .body{ + .buttonbox{ + padding-left: 50px; + button{ + margin:0 10px + } + } + .tablebox{ + table{ + width: 100%; + // margin-left: 2%; + margin-top: 15px; + } + mat-paginator{ + width:100%; + // margin-left: 2%; + // margin-top: 30px; + } + } + } + .mat-header-cell{ + text-align: center; +} +.mat-cell{ + text-align: center; + +} + +//完整度 +.integrityDiv{ + width: 180px; + height: 30px; + background-color: #e2e7ee; + // background-image: linear-gradient(to right, #e2e7ee ,#FF4500, #FF8C00,#32cd32); + margin: 0 auto; + position: relative; + .integrityNum{ + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + color: black; + font-weight: 800; + font-size: 15px; + cursor: default; + } + .integrityColorDiv{ + height: 100%; + } + .integrityDetails{ + position: absolute; + display: none; + width: 350px; + height:280px; + border: 1px solid rgba(0, 0, 0, 0.22); + background-color: white; + .integrityDetailsTop{ + width: 100%; + height: 23px; + line-height:23px; + border-bottom: 1px solid rgba(0, 0, 0, 0.22); + margin-bottom: 1px; + font-size: 14px; + span{ + display: inline-block; + text-align: center; + font-weight: 800; + } + .span1{ + width: 25%; + } + .span2{ + width: 60%; + } + .span3{ + width: 15%; + } + } + .integrityDetailsBody{ + ul{ + li{ + width: 100%; + height: 23px; + line-height: 23px; + margin: 3px 0; + div{ + float: left; + font-size: 13px; + } + .name{ + width: 25%; + height: 100%; + } + .colorDiv{ + width: 60%; + height: 100%; + position: relative; + .colorDivBac{ + width: 90%; + height: 100%; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); + background-color: #dfe5ec; + border-radius: 5px; + .colorDivCon{ + border-radius: 5px; + height: 100%; + background-color: #2398f1; + } + } + span{ + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); + // color: white; + font-weight: 600; + } + } + .number{ + width: 15%; + height: 100%; + } + } + } + + } + } + .bottomposition{ + top: 2px; + left: 188px; + } + .topposition{ + top: -252px; + left: 188px; + } +} +.integrityDiv:hover{ + .integrityDetails{ + display: block; + } +} \ No newline at end of file diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.spec.ts b/src/app/statistic-analysis/combined-query/combined-query.component.spec.ts new file mode 100644 index 0000000..9b36c52 --- /dev/null +++ b/src/app/statistic-analysis/combined-query/combined-query.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CombinedQueryComponent } from './combined-query.component'; + +describe('CombinedQueryComponent', () => { + let component: CombinedQueryComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ CombinedQueryComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CombinedQueryComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.ts b/src/app/statistic-analysis/combined-query/combined-query.component.ts new file mode 100644 index 0000000..64c28e4 --- /dev/null +++ b/src/app/statistic-analysis/combined-query/combined-query.component.ts @@ -0,0 +1,317 @@ +import { Component, OnInit, ViewChild, Inject } from '@angular/core'; +import { HttpClient } from '@angular/common/http' +import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree'; +import { MatPaginator } from '@angular/material/paginator'; +import { FlatTreeControl } from '@angular/cdk/tree'; +import { FormControl } from '@angular/forms'; +import { Router, ActivatedRoute } from '@angular/router' +import { PageEvent } from '@angular/material/paginator'; +import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; +import { TreeService } from '../../http-interceptors/tree.service' +import { Viewer } from 'photo-sphere-viewer'; + +@Component({ + selector: 'app-combined-query', + templateUrl: './combined-query.component.html', + styleUrls: ['./combined-query.component.scss'] +}) +export class CombinedQueryComponent implements OnInit { + + constructor(private http: HttpClient, private router: Router, private route: ActivatedRoute, private tree: TreeService, public dialog: MatDialog, public snackBar: MatSnackBar) { } + + ngOnInit(): void { + if (window.matchMedia("(max-width: 1400px)").matches) { + this.pcMore = false + this.padMore = true + this.pcfind = false + this.padjt = true + } else { + this.pcfind = true + this.pcMore = true + this.padMore = false + this.padjt = false + } + this.getunitdata(); + this.getOrganizations(); + this.getUnittype(); + this.getAllPlanInfo(); + let level = sessionStorage.getItem("level"); + this.url = window.location.href.substring(window.location.href.length - 1, window.location.href.length) + } + private _transformer = (node, level: number) => { //初始化tree + return { + expandable: !!node.children && node.children.length > 0, + name: node.name, + level: level, + id: node.id, + parentId: node.parentId, + children: node.children + }; + } + treeControl = new FlatTreeControl(node => node.level, node => node.expandable); + treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children); + dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener); + myControl = new FormControl(); + hasChild = (_: number, node: any) => node.expandable; + displayedColumns: string[] = ['planname', 'addpeople', 'level'];//, 'addtime', 'plantype', 'auditStatus', 'openRange', 'projectlevel', 'operation' + allorganizations: any //所有组织机构 + allunittype: any //所有单位类型 + tabledataSource: any //表格数据 + url + findTj=0//查询条件 + + preparelevels: any + pcMore//pc更多 + pcput = false//pc收起 + pcfind//pc查询 + padjt = false + padMore = true//pad收缩控制 + padput = false//pad收起按钮 + imgsrcopen = "../../../assets/images/routdown2.png" + imgsrcdown = "../../../assets/images/routup2.png" + pcInfo() { + this.pcMore = !this.pcMore + this.pcput = !this.pcput + } + padInfo() { + this.padMore = !this.padMore + this.padput = !this.padput + } + + allPlanInfo: any //存储所有预案信息 + //获得所有预案信息 + getAllPlanInfo() { + + } + + colorRgb(sColor) { + var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; + var sColor = sColor.toLowerCase(); + if (sColor && reg.test(sColor)) { + if (sColor.length === 4) { + var sColorNew = "#"; + for (var i = 1; i < 4; i += 1) { + sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1)); + } + sColor = sColorNew; + } + //处理六位的颜色值 + var sColorChange = []; + for (var i = 1; i < 7; i += 2) { + sColorChange.push(parseInt("0x" + sColor.slice(i, i + 2))); + } + return sColorChange; + } else { + return sColor; + } + } + colorHex(rgb) { + var _this = rgb; + var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; + if (/^(rgb|RGB)/.test(_this)) { + var aColor = _this.replace(/(?:(|)|rgb|RGB)*/g, "").split(","); + var strHex = "#"; + for (var i = 0; i < aColor.length; i++) { + var hex: any = Number(aColor[i]).toString(16); + hex = hex < 10 ? 0 + '' + hex : hex;// 保证每个rgb的值为2位 + if (hex === "0") { + hex += hex; + } + strHex += hex; + } + if (strHex.length !== 7) { + strHex = _this; + } + return strHex; + } else if (reg.test(_this)) { + var aNum = _this.replace(/#/, "").split(""); + if (aNum.length === 6) { + return _this; + } else if (aNum.length === 3) { + var numHex = "#"; + for (var i = 0; i < aNum.length; i += 1) { + numHex += (aNum[i] + aNum[i]); + } + return numHex; + } + } else { + return _this; + } + } + + gradientColor(startColor, endColor, step) { + let _this = this + let startRGB = _this.colorRgb(startColor);//转换为rgb数组模式 + let startR = startRGB[0]; + let startG = startRGB[1]; + let startB = startRGB[2]; + + let endRGB = _this.colorRgb(endColor); + let endR = endRGB[0]; + let endG = endRGB[1]; + let endB = endRGB[2]; + + let sR = (endR - startR) / step;//总差值 + let sG = (endG - startG) / step; + let sB = (endB - startB) / step; + + var colorArr = []; + for (var i = 0; i < step; i++) { + //计算每一步的hex值 + var hex = _this.colorHex('rgb(' + parseInt((sR * i + startR)) + ',' + parseInt((sG * i + startG)) + ',' + parseInt((sB * i + startB)) + ')'); + colorArr.push(hex); + } + return colorArr; + } + integrity(width) { + let _this = this + + let style: any = {} + style.width = width + '%'; + if (width < 30) { + let colorArr = this.gradientColor('#D50000', '#E53935', 30); + for (let i = 0; i < 30; i++) { + if (i == width) { + style.background = colorArr[i] + } + } + } + if (width >= 30 && width < 60) { + let colorArr = this.gradientColor('#FF9800', '#E65100', 30); + for (let i = 30; i < 60; i++) { + if (i == width) { + style.background = colorArr[i - 30] + } + } + } + if (width >= 60) { + let colorArr = this.gradientColor('#81C784', '#2E7D32', 41); + for (let i = 60; i <= 100; i++) { + if (i == width) { + style.background = colorArr[i - 60] + } + } + } + return style + } + integrityDetails(width, zong) { + let style: any = {} + style.width = (width / zong) * 100 + '%'; + return style + } + + + + //得到当前单位信息 + getunitdata() { + this.http.get("/api/Account/Profiles").subscribe( + (data: any) => { + this.organizationName = data.organizationName + } + ) + } + addtime//开始时间 + endtime//结束时间 + integrityScoreMin//完整度最小值 + integrityScoreMax//完整度最大值 + organizationName: any //当前单位组织机构名称 + treedata: any //组织机构树型数据 + newArr: any = [] + newallorganizations: any //用于存储在原始数据基础上的每个机构增加children字段 + //得到当前单位所在组织机构的tree型数据 + getpresentOrganization() { + this.newallorganizations = this.allorganizations + this.newallorganizations.forEach(item => { + item.children = [] + this.newallorganizations.forEach(element => { + if (element.parentId == item.id) { + item.children.push(element) + } + }); + }); + this.http.get("/api/Account/Profiles").subscribe( + (data: any) => { + this.organizationName = data.organizationName + if (this.organizationName) { + this.newallorganizations.forEach(item => { + if (item.name == this.organizationName) { + this.dataSource.data = [item] + } + }); + } else { + this.dataSource.data = this.tree.toTree(this.treedata); + } + } + ) + + } + //获得所有组织机构 + getOrganizations() { + this.http.get('/api/Organizations').subscribe( + (data: any) => { + this.allorganizations = data + this.treedata = this.tree.toTree(data); + this.getpresentOrganization(); + } + ) + } + + //获得所有单位类型 + getUnittype() { + this.http.get('/api/BuildingTypes/Simple').subscribe( + data => { + this.allunittype = data + } + ) + } + //辖区中队div是否显示 + isorganizationbox: boolean = false + //点击辖区中队树,将选择的辖区中队添加到变量 + add(node) { + this.isorganizationbox = false + this.js = node.name + this.jsId = node.id + } + //关闭辖区中队隐藏框 + closeorganizationbox() { + this.isorganizationbox = false + } + //打开辖区中队隐藏框 + openorganizationbox() { + this.isorganizationbox = true + } + //关闭出现的组织机构div + closediv() { + this.isorganizationbox = false + } + //查询 + onSubmit(e) { + this.getAllPlanInfo(); + } + companyName: any //单位名称 + js: any //所选组织机构 + jsId: any //所选组织机构的id + jscheck: boolean //所选组织机构勾选框 + unittype: any //单位类型 + reservePlanType: any //预案类型 + preparelevel: any //编制级别 + plcheck: boolean //编制级别勾选框 + planCategory = []//预案级别 + //重置 + reset() { + this.companyName = '' + this.js = '' + this.jsId = '' + this.jscheck = false + this.unittype = '' + this.reservePlanType = '' + this.preparelevel = '' + this.addtime = '' + this.endtime = '' + this.plcheck = false + //重新获取初始化列表 + this.planCategory = [] + this.getAllPlanInfo(); + } +} diff --git a/src/app/statistic-analysis/statistic-analysis-routing.module.ts b/src/app/statistic-analysis/statistic-analysis-routing.module.ts index 1720cad..b3dd69c 100644 --- a/src/app/statistic-analysis/statistic-analysis-routing.module.ts +++ b/src/app/statistic-analysis/statistic-analysis-routing.module.ts @@ -37,6 +37,7 @@ import { CompangInfoComponent } from './compang-info/compang-info.component' import { AllPlanComponent } from './all-plan/all-plan.component' import { PlanAnalysisBySynthesisComponent } from './plan-analysis-by-synthesis/plan-analysis-by-synthesis.component'; import { RealMonitoringComponent } from './real-monitoring/real-monitoring.component' +import { CombinedQueryComponent } from './combined-query/combined-query.component' const routes: Routes = [ { path: 'statePageOne', component: PageOneComponent }, @@ -71,7 +72,8 @@ const routes: Routes = [ { path: 'CompangInfo', component: CompangInfoComponent }, { path: 'AllPlan', component: AllPlanComponent }, { path: 'PlanAnalysisBySynthesis', component: PlanAnalysisBySynthesisComponent }, - { path: 'RealMonitoring', component: RealMonitoringComponent } + { path: 'RealMonitoring', component: RealMonitoringComponent }, + { path :'CombinedQuery',component:CombinedQueryComponent} ]; @NgModule({ diff --git a/src/app/statistic-analysis/statistic-analysis.module.ts b/src/app/statistic-analysis/statistic-analysis.module.ts index fc7d228..f8a1607 100644 --- a/src/app/statistic-analysis/statistic-analysis.module.ts +++ b/src/app/statistic-analysis/statistic-analysis.module.ts @@ -74,7 +74,8 @@ import { PsViewer }from './all-plan/all-plan.component'; import { GkPsViewer2, PlanAnalysisBySynthesisComponent } from './plan-analysis-by-synthesis/plan-analysis-by-synthesis.component' import { PlanManagementModule } from '../plan-management/plan-management.module'; import { RealMonitoringComponent } from './real-monitoring/real-monitoring.component'; -import { lookunit }from './all-plan/all-plan.component' +import { lookunit }from './all-plan/all-plan.component'; +import { CombinedQueryComponent } from './combined-query/combined-query.component' @NgModule({ declarations: [GkPsViewer2,PageOneComponent, PageTwoTimeComponent, PageTwoNameComponent, PageZhongDuiDetailsComponent, @@ -84,7 +85,7 @@ import { lookunit }from './all-plan/all-plan.component' BuildingTypeTwoReverseComponent, BuildingTypeThreeDetailsComponent, AddUnitOneComponent, AddUnitTwoTypeStatisticsComponent, AddUnitTwoTypeDetailsComponent, AddUnitTwoTimeComponent,AddUnitThreeLineDetailsComponent,AddUnitThreeBarDetailsComponent, HomeComponent, DeleteThereLineDetailsComponent, PageThereComponent, PageThereYearComponent, DeleteTwoNewaddComponent, - CompangInfoComponent, AllPlanComponent,PsViewer, RealMonitoringComponent,PlanAnalysisBySynthesisComponent,lookunit], + CompangInfoComponent, AllPlanComponent,PsViewer, RealMonitoringComponent,PlanAnalysisBySynthesisComponent,lookunit, CombinedQueryComponent], imports: [ CommonModule, StatisticAnalysisRoutingModule, From 5e49eb257637d4bda359388ee5daea7b997064ce Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Fri, 29 Oct 2021 11:35:04 +0800 Subject: [PATCH 09/26] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../combined-query.component.html | 263 ++++++++---------- .../combined-query.component.ts | 102 ++++++- 2 files changed, 209 insertions(+), 156 deletions(-) diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.html b/src/app/statistic-analysis/combined-query/combined-query.component.html index 8560622..30db40c 100644 --- a/src/app/statistic-analysis/combined-query/combined-query.component.html +++ b/src/app/statistic-analysis/combined-query/combined-query.component.html @@ -1,164 +1,123 @@ - +
    -
    -
    -
    -
    - 单位 - 预案 -
    -
    - - - - - 包含下级 -
    -
    - clear -
    - - - -
  • {{node.name}}
  • -
    - - -
  • {{node.name}}
  • -
    -
    -
    -
    -
    - - - - - - 🠊 - - - -
    -
    - - - - 文本预案 - 二维预案 - 三维预案 - 其他预案 - - - -
    -
    - - - - - {{unit.name}} - - - -
    - -
    - - - - 新增 - 维护更新 - - -
    - -
    - - - - 应急预案(国家级) - 应急预案(市级) - 类型预案 - Ⅰ级预案 - Ⅱ级预案 - Ⅲ级预案 - Ⅳ级预案 - Ⅴ级预案 - - -
    - - -
    - - -
    -
    - -
    -
    - + + + +
    +
    +
    +
    + + + + + 包含下级 +
    +
    + clear +
    + + + +
  • {{node.name}}
  • +
    + + +
  • {{node.name}}
  • +
    +
    +
    +
    +
    + + + + + + 🠊 + + + +
    +
    + + + + 文本预案 + 二维预案 + 三维预案 + 其他预案 + + + +
    +
    + + + + + {{unit.name}} + + + +
    + +
    + + + + 新增 + 维护更新 + + +
    + +
    + + + + 应急预案(国家级) + 应急预案(市级) + 类型预案 + Ⅰ级预案 + Ⅱ级预案 + Ⅲ级预案 + Ⅳ级预案 + Ⅴ级预案 + + +
    +
    + + + +
    +
    +
    + +
    +
    - - - - - +
    组织名称
    + + - - - - - - - - - -
    {{item}} {{element.name}} 单位类型{{element.creatorName}}预案级别{{element.planCategory==1?'Ⅰ级预案':element.planCategory==2?'Ⅱ级预案': - element.planCategory==3?'Ⅲ级预案':element.planCategory==4?'Ⅳ级预案':element.planCategory==5?'Ⅴ级预案':element.planCategory==8?'类型预案':'应急预案'}} -
    +
    +
    + +
    diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.ts b/src/app/statistic-analysis/combined-query/combined-query.component.ts index 64c28e4..5a37e7e 100644 --- a/src/app/statistic-analysis/combined-query/combined-query.component.ts +++ b/src/app/statistic-analysis/combined-query/combined-query.component.ts @@ -54,14 +54,14 @@ export class CombinedQueryComponent implements OnInit { dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener); myControl = new FormControl(); hasChild = (_: number, node: any) => node.expandable; - displayedColumns: string[] = ['planname', 'addpeople', 'level'];//, 'addtime', 'plantype', 'auditStatus', 'openRange', 'projectlevel', 'operation' + displayedColumns: string[] = ['组织名称', 'addpeople', 'level'];//, 'addtime', 'plantype', 'auditStatus', 'openRange', 'projectlevel', 'operation' allorganizations: any //所有组织机构 allunittype: any //所有单位类型 tabledataSource: any //表格数据 url findTj=0//查询条件 - preparelevels: any + preparelevels:Number=0 pcMore//pc更多 pcput = false//pc收起 pcfind//pc查询 @@ -80,9 +80,35 @@ export class CombinedQueryComponent implements OnInit { } allPlanInfo: any //存储所有预案信息 - //获得所有预案信息 + lable=['单位查询','预案查询'] + selected = new FormControl(0); //选项卡实例 + //判断选了哪一个 + selectedIndexChange(e){ + this.selected.setValue(e) + console.log(e) + this.preparelevels=Number(e) + } + //获得所有预案或单位信息 getAllPlanInfo() { - + let paramsdata:any={ + QueryMode:this.preparelevels, + OrganizationId:this.jsId||'', + HasChildren:this.jscheck||'', + TimeIntervalStart:this.addtime||'', + TimeIntervalEnd:this.endtime||'', + BuildingTypeIds:this.unittype||'', + } + this.http.get("/api/StatisticsAnalysis/ReportTable", { params: paramsdata }).subscribe((data: any) => { + console.log(data) + this.tabledataSource=data + if(this.preparelevels==0){ + this.tabledataSource.forEach(element => { + this.displayedColumns.push(element) + }); + } + + } + ) } colorRgb(sColor) { @@ -287,6 +313,12 @@ export class CombinedQueryComponent implements OnInit { } //查询 onSubmit(e) { + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + if(this,this.endtime { + // // 文件名中有中文 则对文件名进行转码 + const link = document.createElement('a'); + const blob = new Blob([data], {type: 'application/vnd.ms-excel'}); + link.setAttribute('href', window.URL.createObjectURL(blob)); + link.setAttribute('download', '报表统计'+'.xls'); + link.style.visibility = 'hidden'; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + }) + } + + + } From 33af6afb9ed5c040983c0913da0663840d850e79 Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Sat, 30 Oct 2021 15:33:23 +0800 Subject: [PATCH 10/26] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1json=E5=AD=97=E6=AE=B5=E9=81=8D=E5=8E=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/pipes/boolean.pipe.ts | 18 +++ .../combined-query.component.html | 29 +++- .../combined-query.component.scss | 33 ++++- .../combined-query.component.ts | 133 ++++++++++++++++-- 4 files changed, 196 insertions(+), 17 deletions(-) diff --git a/src/app/pipes/boolean.pipe.ts b/src/app/pipes/boolean.pipe.ts index 025507f..a2e8c63 100644 --- a/src/app/pipes/boolean.pipe.ts +++ b/src/app/pipes/boolean.pipe.ts @@ -63,3 +63,21 @@ export class differentContentTitle implements PipeTransform { } } +@Pipe({ name: 'yuan' }) +export class yuan implements PipeTransform { + transform(value: string): string { + if (value == 'LevelOne') { + return '一级预案' + } else if (value == 'LevelTwo') { + return '二级预案' + } else if (value == 'LevelThree') { + return '三级预案' + }else if (value == 'LevelFour') { + return '四级预案' + }else if (value == 'LevelFive') { + return '五级预案' + }else if (value == 'PlanText') { + return '文本预案' + } + } +} diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.html b/src/app/statistic-analysis/combined-query/combined-query.component.html index 30db40c..f78fac7 100644 --- a/src/app/statistic-analysis/combined-query/combined-query.component.html +++ b/src/app/statistic-analysis/combined-query/combined-query.component.html @@ -72,8 +72,8 @@ - 新增 - 维护更新 + 新增 + 维护更新
    @@ -82,9 +82,6 @@ - 应急预案(国家级) - 应急预案(市级) - 类型预案 Ⅰ级预案 Ⅱ级预案 Ⅲ级预案 @@ -105,13 +102,33 @@
    - + +
    + + + + + + + + +
    {{item}}
    {{eletd}}
    + + + + + + + + +
    {{item}}
    {{eletd}}
    diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.scss b/src/app/statistic-analysis/combined-query/combined-query.component.scss index 6b834aa..a82c777 100644 --- a/src/app/statistic-analysis/combined-query/combined-query.component.scss +++ b/src/app/statistic-analysis/combined-query/combined-query.component.scss @@ -88,6 +88,10 @@ } } .body{ + height: 100%; + width: 100%; + overflow-y: auto; + overflow-x: auto; .buttonbox{ padding-left: 50px; button{ @@ -97,8 +101,35 @@ .tablebox{ table{ width: 100%; - // margin-left: 2%; + background-color: white; margin-top: 15px; + table-layout: fixed; + thead,tr{ + border-bottom: 1px solid grey; + } + th { + border-bottom: 1px solid #999; + //width: 30%; + font-size: 16px; + text-align: center; + height: 60px; + line-height: 60px; + } + td { + + height: 50px; + line-height: 50px; + text-align: center; + font-size: 16px; + margin-left: 3px; + border-bottom: 1px solid #999; + .spantext{ + margin-left: 7px; + } + .buleColor{ + color: #2196f3; + } + } } mat-paginator{ width:100%; diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.ts b/src/app/statistic-analysis/combined-query/combined-query.component.ts index 5a37e7e..2204428 100644 --- a/src/app/statistic-analysis/combined-query/combined-query.component.ts +++ b/src/app/statistic-analysis/combined-query/combined-query.component.ts @@ -54,10 +54,12 @@ export class CombinedQueryComponent implements OnInit { dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener); myControl = new FormControl(); hasChild = (_: number, node: any) => node.expandable; - displayedColumns: string[] = ['组织名称', 'addpeople', 'level'];//, 'addtime', 'plantype', 'auditStatus', 'openRange', 'projectlevel', 'operation' + displayedColumns: string[] = ['组织名称', '总数'];//, 'addtime', 'plantype', 'auditStatus', 'openRange', 'projectlevel', 'operation' + yuanColumns:string[]=['组织名称', '总数']; allorganizations: any //所有组织机构 allunittype: any //所有单位类型 - tabledataSource: any //表格数据 + tabledataSource=[] //单位表格数据 + yuanTable=[]//预案表格数据 url findTj=0//查询条件 @@ -85,7 +87,6 @@ export class CombinedQueryComponent implements OnInit { //判断选了哪一个 selectedIndexChange(e){ this.selected.setValue(e) - console.log(e) this.preparelevels=Number(e) } //获得所有预案或单位信息 @@ -97,16 +98,128 @@ export class CombinedQueryComponent implements OnInit { TimeIntervalStart:this.addtime||'', TimeIntervalEnd:this.endtime||'', BuildingTypeIds:this.unittype||'', + CompanyStatus:this.preparelevel||'' } - this.http.get("/api/StatisticsAnalysis/ReportTable", { params: paramsdata }).subscribe((data: any) => { + let yuandata={ + QueryMode:this.preparelevels, + OrganizationId:this.jsId||'', + HasChildren:this.jscheck||'', + TimeIntervalStart:this.addtime||'', + TimeIntervalEnd:this.endtime||'', + PlanCategory:this.planCategory||'', + PlanType:this.reservePlanType||'' + } + this.http.get("/api/StatisticsAnalysis/ReportTable", { params:this.preparelevels==0? paramsdata:yuandata }).subscribe((data: any) => { console.log(data) - this.tabledataSource=data + //this.tabledataSource=data if(this.preparelevels==0){ - this.tabledataSource.forEach(element => { - this.displayedColumns.push(element) + this.tabledataSource=[] + this.displayedColumns=['组织名称', '总数'] + data.forEach((element,i,value) => { + this.tabledataSource.push({name:[element.orgName,element.companyStatistics.totalCount]}) + if(value[0].companyStatistics.buildingTypesCounts.length>0){ + value[i].companyStatistics.buildingTypesCounts.forEach((build,bi,bvalue) => { + if(i==0){ + this.displayedColumns.push(value[0].companyStatistics.buildingTypesCounts[bi].buildingTypeName||'111') + this.tabledataSource[0].name.push(value[0].companyStatistics.buildingTypesCounts[bi].count) + }else{ + this.tabledataSource[i].name.push(bvalue[bi].count) + } + /* this.tabledataSource.forEach((td,ti,tval)=>{ + tval[ti].name.push(item.count) + }) */ + }); + + } }); } - + else if(this.preparelevels==1){ + this.yuanColumns=['组织名称', '总数'] + this.yuanTable=[{name:[0,0]}] + //console.log(this.planCategory,this.reservePlanType) + if(this.planCategory.length==0&&this.reservePlanType.length!=0){ + this.yuanColumns.push('Ⅰ级预案','Ⅱ级预案','Ⅲ级预案','Ⅳ级预案','Ⅴ级预案') + this.yuanTable[0].name.push(0,0,0,0,0) + this.reservePlanType.forEach(element => { + if(element==1){ + this.yuanColumns.push('二维预案') + this.yuanTable[0].name.push(0) + }else if(element==2){ + this.yuanColumns.push('三维预案') + this.yuanTable[0].name.push(0) + }else if(element==4){ + this.yuanColumns.push('其他预案') + this.yuanTable[0].name.push(0) + }else if(element==16){ + this.yuanColumns.push('文本预案') + this.yuanTable[0].name.push(0) + } + }); + }else if(this.planCategory.length!=0&&this.reservePlanType.length==0){ + this.yuanColumns.push('文本预案','二维预案','三维预案','其他预案') + this.yuanTable[0].name.push(0,0,0,0) + }this.planCategory.forEach(element=>{ + if(element==1){ + this.yuanColumns.push('Ⅰ级预案') + this.yuanTable[0].name.push(0) + }else if(element==2){ + this.yuanColumns.push('Ⅱ级预案') + this.yuanTable[0].name.push(0) + }else if(element==3){ + this.yuanColumns.push('Ⅲ级预案') + this.yuanTable[0].name.push(0) + }else if(element==4){ + this.yuanColumns.push('Ⅳ级预案') + this.yuanTable[0].name.push(0) + }else if(element==5){ + this.yuanColumns.push('Ⅴ级预案') + this.yuanTable[0].name.push(0) + } + }) + console.log(this.yuanTable) + data.forEach((element,i,value) => { + if(i==0){ + this.yuanTable[0].name[0]=value[0].orgName + this.yuanTable[0].name[1]=value[0].planStatistics.totalCount + }else{ + this.yuanTable.push({name:[value[i].orgName,value[i].planStatistics.totalCount]}) + } + + /* if(value[0].planStatistics.planCategoryStatistics.planCategories.length>0){ + value[i].planStatistics.planCategoryStatistics.planCategories.forEach((build,bi,bvalue) => { + if(i==0){ + this.yuanColumns.push(value[0].planStatistics.planCategoryStatistics.planCategories[bi].planCategoryName) + this.yuanTable[0].name.push(value[0].planStatistics.planCategoryStatistics.planCategories[bi].count) + }else{ + this.yuanTable[i].name.push(bvalue[bi].count) + } + }); + + } */ + /* if(value[0].planStatistics.planTypeStatistics.length>0){ + value[i].planStatistics.planTypeStatistics.forEach((build,bi,bvalue) => { + if(i==0){ + this.yuanColumns.push(value[0].planStatistics.planTypeStatistics[bi].planCategoryName) + this.yuanTable[0].name.push(value[0].planStatistics.planCategoryStatistics[bi].count) + }else{ + this.yuanTable[i].name.push(bvalue[bi].count) + } + }); + } */ + }); + this.yuanTable.forEach((element,i,value)=>{ + if(i>0){ + for(let a=value[i].name.length;a{ + + }) + } + console.log(this.yuanColumns) + console.log(this.yuanTable) } ) } @@ -326,7 +439,7 @@ export class CombinedQueryComponent implements OnInit { jsId: any //所选组织机构的id jscheck: boolean //所选组织机构勾选框 unittype: any //单位类型 - reservePlanType: any //预案类型 + reservePlanType=[] //预案类型 preparelevel: any //编制级别 plcheck: boolean //编制级别勾选框 planCategory = []//预案级别 @@ -337,7 +450,7 @@ export class CombinedQueryComponent implements OnInit { this.jsId = '' this.jscheck = false this.unittype = '' - this.reservePlanType = '' + this.reservePlanType = [] this.preparelevel = '' this.addtime = '' this.endtime = '' From d2cc541be2fd37c8e3892d45538902dcfbe77e89 Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Mon, 1 Nov 2021 10:52:51 +0800 Subject: [PATCH 11/26] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E6=95=B0=E6=8D=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../combined-query.component.html | 17 +- .../combined-query.component.scss | 4 +- .../combined-query.component.ts | 199 ++++++++++++------ .../plan-template/plan-template.component.ts | 2 +- 4 files changed, 144 insertions(+), 78 deletions(-) diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.html b/src/app/statistic-analysis/combined-query/combined-query.component.html index f78fac7..8cf2246 100644 --- a/src/app/statistic-analysis/combined-query/combined-query.component.html +++ b/src/app/statistic-analysis/combined-query/combined-query.component.html @@ -9,10 +9,13 @@
    - + - 包含下级 + 包含下级 + 包含下级
    clear @@ -34,15 +37,17 @@
    -
    +
    - + + 🠊 - + +
    @@ -101,7 +106,7 @@
    -
    +
    - - +
    + +
    diff --git a/src/app/plan-audit/plan-record/plan-record.component.ts b/src/app/plan-audit/plan-record/plan-record.component.ts index cc6a04c..a3f5d6d 100644 --- a/src/app/plan-audit/plan-record/plan-record.component.ts +++ b/src/app/plan-audit/plan-record/plan-record.component.ts @@ -185,13 +185,16 @@ export class PlanRecordComponent implements OnInit { this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data: any) => { this.companyId = data.companyId this.companyName = data.companyName - if (data.planMode == 2) { - this.bianzhi = true - this.src = `/planManagement/createplanonlinefive?navIsOpen=false&companyId=${data.companyId}&planName=${data.name}&unitName=${data.companyName}&planCategory=${data.planCategory}&planId=${data.id}&unitTypeId=${data.company.buildingTypes[0].id}&orName=${data.company.organizationName}&orId=${data.company.organizationId}&pattern=false` - //this.src=`/keyUnit/viewunitinfoplan?id=${data.companyId}&orName=${data.company.organizationId}&orId=${data.company.organizationName}` - } else { - this.bianzhi = false + //this.bianzhi = false if (data.planType != 2 && data.planType != 1) { + if (data.planMode == 2) { + this.showtype = 0 + this.bianzhi = true + this.src = `/CreatePlanOnlineFive?navIsOpen=false&companyId=${data.companyId}&planName=${data.name}&unitName=${data.companyName}&planCategory=${data.planCategory}&planId=${data.id}&unitTypeId=${data.company.buildingTypes[0].id}&orName=${data.company.organizationName}&orId=${data.company.organizationId}&pattern=false` + this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src); + //this.src=`/keyUnit/viewunitinfoplan?id=${data.companyId}&orName=${data.company.organizationId}&orId=${data.company.organizationName}` + } else{ + this.bianzhi = false this.fetchUrl = data.attachmentUrls[0] var index = this.fetchUrl.indexOf("\/") if (this.fetchUrl.substr(0, index) == 'psw') { @@ -211,6 +214,8 @@ export class PlanRecordComponent implements OnInit { } else { this.lookWord() } + } + } else { this.organizationName = item.organizationName this.planData = data @@ -221,7 +226,7 @@ export class PlanRecordComponent implements OnInit { //this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); //window.open(`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`) } - } + @@ -248,16 +253,15 @@ export class PlanRecordComponent implements OnInit { //毕升 lookWord() { this.showtype = 0 - let src let suffix = this.fetchUrl.split('.')[this.fetchUrl.split('.').length - 1].toLowerCase() if (suffix == 'docx' || suffix == 'doc') { let arr = this.fetchUrl.split('.') arr[arr.length - 1] = 'pdf' - src = `/api/Objects/PlanPlatform/` + arr.join('.') + this.src = `/api/Objects/PlanPlatform/` + arr.join('.') } else if (suffix == 'pdf') { - src = `/api/Objects/PlanPlatform/` + this.fetchUrl + this.src = `/api/Objects/PlanPlatform/` + this.fetchUrl } - this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(src); + this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src); } //查看按钮跳转 lookNew() { @@ -272,7 +276,6 @@ export class PlanRecordComponent implements OnInit { this.compantData = { name: '', buildingTypes: [], address: '' } this.planType = this.planData.planMode let data = this.planData - // console.log(data) if (data.planType == 1) { this.twoOrthree = 2 } else if (data.planType == 2) { diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.html b/src/app/plan-audit/wait-examineer/wait-examineer.component.html index 300f880..22d0fed 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.html +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.html @@ -57,7 +57,7 @@
    - +
    diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.scss b/src/app/plan-audit/wait-examineer/wait-examineer.component.scss index 57c2287..8b8e8ec 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.scss +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.scss @@ -11,8 +11,9 @@ background-color: #ffffff; display: flex; flex-direction: column; - overflow: auto; + //overflow: auto; .lefthead { + height: 30%; display: flex; flex-direction: column; .headdiv { @@ -131,13 +132,13 @@ } .tablediv { width: 100%; - height: 100%; + height: 70%; .tbodycss { @media screen and (min-device-width: 1400px) { overflow-y: auto; } - height: 650px; + height: 600px; width: 100%; .selectedTr { background-color: #b3d3ee; diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts index dfb6ac5..88c8066 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts @@ -357,16 +357,16 @@ export class WaitExamineerComponent implements OnInit { lookWord() { console.log('lookWord') this.showtype = 0 - let src + //let src let suffix = this.fetchUrl.split('.')[this.fetchUrl.split('.').length - 1].toLowerCase() if (suffix == 'docx' || suffix == 'doc') { let arr = this.fetchUrl.split('.') arr[arr.length - 1] = 'pdf' - src = `/api/Objects/PlanPlatform/` + arr.join('.') + this.src = `/api/Objects/PlanPlatform/` + arr.join('.') } else if (suffix == 'pdf') { - src = `/api/Objects/PlanPlatform/` + this.fetchUrl + this.src = `/api/Objects/PlanPlatform/` + this.fetchUrl } - this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(src); + this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src); } //查看按钮跳转 lookNew() { diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.ts b/src/app/statistic-analysis/combined-query/combined-query.component.ts index 692e926..96af8a3 100644 --- a/src/app/statistic-analysis/combined-query/combined-query.component.ts +++ b/src/app/statistic-analysis/combined-query/combined-query.component.ts @@ -563,14 +563,12 @@ export class CombinedQueryComponent implements OnInit { const httpOptions = { responseType: 'blob' as 'json' }; - let formData = new FormData() - console.log('000') - this.http.post(`/api/StatisticsAnalysis/Excel?queryMode=${this.preparelevels}`,this.excelData).subscribe((data:any) => { + this.http.post(`/api/StatisticsAnalysis/Excel?queryMode=${this.preparelevels}`,this.excelData,httpOptions).subscribe((data:any) => { // // 文件名中有中文 则对文件名进行转码 const link = document.createElement('a'); const blob = new Blob([data], {type: 'application/vnd.ms-excel'}); link.setAttribute('href', window.URL.createObjectURL(blob)); - link.setAttribute('download', '统计信息'+'.xlsx'); + link.setAttribute('download', '统计信息'+'.xls'); link.style.visibility = 'hidden'; document.body.appendChild(link); link.click(); From dac791648ebb7f3d0af595a74523155b480f8d9a Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Tue, 2 Nov 2021 10:53:26 +0800 Subject: [PATCH 13/26] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E8=BF=94=E5=9B=9E=E5=80=BC=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plan-record/plan-record.component.ts | 1 - .../wait-examineer.component.ts | 8 +- .../combined-query.component.html | 14 +- .../combined-query.component.ts | 281 +++++++++--------- 4 files changed, 151 insertions(+), 153 deletions(-) diff --git a/src/app/plan-audit/plan-record/plan-record.component.ts b/src/app/plan-audit/plan-record/plan-record.component.ts index a3f5d6d..546791b 100644 --- a/src/app/plan-audit/plan-record/plan-record.component.ts +++ b/src/app/plan-audit/plan-record/plan-record.component.ts @@ -96,7 +96,6 @@ export class PlanRecordComponent implements OnInit { //获取表格数据 getAlltabledate() { - let paramsdata: any = { Operation: this.level || [], ContentType: Number(this.projectlevel) || [], diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts index 88c8066..9440632 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts @@ -179,14 +179,14 @@ export class WaitExamineerComponent implements OnInit { bianzhi = false radioClick(e, item) { this.selectedItem = item - console.log(item) + //console.log(item) // console.log('当前选择的信息',JSON.parse(this.selectedItem.differentContent) ) if (item.contentType == 11 && this.selectedItem.differentContent) { let differentContent = JSON.parse(this.selectedItem.differentContent) - console.log('差异信息', differentContent) + //console.log('差异信息', differentContent) // 单位信息 @@ -222,7 +222,7 @@ export class WaitExamineerComponent implements OnInit { this.differentContentOfBuildingsInfo.childrens.forEach(element => { element.difData = resolveDiff(element.childrens) }); - console.log('建筑信息', this.differentContentOfBuildingsInfo) + //console.log('建筑信息', this.differentContentOfBuildingsInfo) //功能分区 let differentContentOfFunction = JSON.parse(JSON.stringify(differentContent.filter(item => item.propertyName == 'buildings')[0])) this.differentContentOfFunction = [] @@ -296,7 +296,7 @@ export class WaitExamineerComponent implements OnInit { }) } else { this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data: any) => { - console.log('预案信息',data) + //console.log('预案信息',data) this.companyId = data.companyId this.companyName = data.companyName if (data.planType != 2 && data.planType != 1) { diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.html b/src/app/statistic-analysis/combined-query/combined-query.component.html index 8cf2246..b97bed7 100644 --- a/src/app/statistic-analysis/combined-query/combined-query.component.html +++ b/src/app/statistic-analysis/combined-query/combined-query.component.html @@ -107,15 +107,7 @@
    - -
    类型 预案类型
    +
    @@ -125,7 +117,7 @@
    {{item}}
    - +
    @@ -135,7 +127,7 @@
    {{item}}
    - + 暂无数据
    diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.ts b/src/app/statistic-analysis/combined-query/combined-query.component.ts index 96af8a3..6c357a9 100644 --- a/src/app/statistic-analysis/combined-query/combined-query.component.ts +++ b/src/app/statistic-analysis/combined-query/combined-query.component.ts @@ -92,6 +92,7 @@ export class CombinedQueryComponent implements OnInit { this.getAllPlanInfo() } //获得所有预案或单位信息 + tableDataNull=false async getAllPlanInfo() { let paramsdata:any={ QueryMode:this.preparelevels, @@ -99,161 +100,167 @@ export class CombinedQueryComponent implements OnInit { HasChildren:this.jscheck||'', TimeIntervalStart:this.dwaddtime||'', TimeIntervalEnd:this.dwendtime||'', - BuildingTypeIds:this.unittype||'', + BuildingTypeIds:this.unittype||[], CompanyStatus:this.preparelevel||'' } let yuandata={ QueryMode:this.preparelevels, OrganizationId:this.jsId||'', - HasChildren:this.jscheck||'', + HasChildren:this.yuanjscheck||'', TimeIntervalStart:this.yuanaddtime||'', TimeIntervalEnd:this.yuanendtime||'', - PlanCategory:this.planCategory||'', - PlanType:this.reservePlanType||'' + PlanCategory:this.planCategory||[], + PlanType:this.reservePlanType||[] } let result = await new Promise((resolve, reject)=>{ this.http.get("/api/StatisticsAnalysis/ReportTable", { params:this.preparelevels==0? paramsdata:yuandata }).subscribe((data: any) => { - console.log(data) - //this.tabledataSource=data - if(this.preparelevels==0){ - //单位查询 - this.tabledataSource=[] - this.displayedColumns=['组织名称', '总数'] - data.forEach((element,i,value) => { - this.tabledataSource.push({name:[element.orgName,element.companyStatistics.totalCount]}) - if(value[0].companyStatistics.buildingTypesCounts.length>0){ - value[i].companyStatistics.buildingTypesCounts.forEach((build,bi,bvalue) => { - if(i==0){ - this.displayedColumns.push(value[0].companyStatistics.buildingTypesCounts[bi].buildingTypeName) - this.tabledataSource[0].name.push(value[0].companyStatistics.buildingTypesCounts[bi].count) - }else{ - this.tabledataSource[i].name.push(bvalue[bi].count) + //console.log(data) + if(data.length==0){ + this.tableDataNull=true + }else{ + this.tableDataNull=false + if(this.preparelevels==0){ + //单位查询 + this.tabledataSource=[] + this.displayedColumns=['组织名称', '总数'] + data.forEach((element,i,value) => { + this.tabledataSource.push({name:[element.orgName,element.companyStatistics.totalCount]}) + if(value[0].companyStatistics.buildingTypesCounts.length>0){ + value[i].companyStatistics.buildingTypesCounts.forEach((build,bi,bvalue) => { + if(i==0){ + this.displayedColumns.push(value[0].companyStatistics.buildingTypesCounts[bi].buildingTypeName) + this.tabledataSource[0].name.push(value[0].companyStatistics.buildingTypesCounts[bi].count) + }else{ + this.tabledataSource[i].name.push(bvalue[bi].count) + } + /* this.tabledataSource.forEach((td,ti,tval)=>{ + tval[ti].name.push(item.count) + }) */ + }); + + } + }); + } + else if(this.preparelevels==1){ + //预案查询 + this.yuanColumns=['组织名称', '总数'] + this.yuanTable=[{name:[0,0]}] + //console.log(this.planCategory,this.reservePlanType) + if(this.planCategory.length==0&&this.reservePlanType.length!=0){ + this.yuanColumns.push('Ⅰ级预案','Ⅱ级预案','Ⅲ级预案','Ⅳ级预案','Ⅴ级预案') + this.yuanTable[0].name.push(0,0,0,0,0) + this.reservePlanType.forEach(element => { + if(element==1){ + this.yuanColumns.push('二维预案') + this.yuanTable[0].name.push(0) + }else if(element==2){ + this.yuanColumns.push('三维预案') + this.yuanTable[0].name.push(0) + }else if(element==4){ + this.yuanColumns.push('其他预案') + this.yuanTable[0].name.push(0) + }else if(element==16){ + this.yuanColumns.push('文本预案') + this.yuanTable[0].name.push(0) + } + }); + }else if(this.planCategory.length!=0&&this.reservePlanType.length==0){ + this.yuanColumns.push('文本预案','二维预案','三维预案','其他预案') + this.yuanTable[0].name.push(0,0,0,0) + this.planCategory.forEach(element=>{ + if(element==1){ + this.yuanColumns.push('Ⅰ级预案') + this.yuanTable[0].name.push(0) + }else if(element==2){ + this.yuanColumns.push('Ⅱ级预案') + this.yuanTable[0].name.push(0) + }else if(element==3){ + this.yuanColumns.push('Ⅲ级预案') + this.yuanTable[0].name.push(0) + }else if(element==4){ + this.yuanColumns.push('Ⅳ级预案') + this.yuanTable[0].name.push(0) + }else if(element==5){ + this.yuanColumns.push('Ⅴ级预案') + this.yuanTable[0].name.push(0) + } + }) + }else if(this.planCategory.length!=0&&this.reservePlanType.length!=0){ + this.planCategory.forEach(element=>{ + if(element==1){ + this.yuanColumns.push('Ⅰ级预案') + this.yuanTable[0].name.push(0) + }else if(element==2){ + this.yuanColumns.push('Ⅱ级预案') + this.yuanTable[0].name.push(0) + }else if(element==3){ + this.yuanColumns.push('Ⅲ级预案') + this.yuanTable[0].name.push(0) + }else if(element==4){ + this.yuanColumns.push('Ⅳ级预案') + this.yuanTable[0].name.push(0) + }else if(element==5){ + this.yuanColumns.push('Ⅴ级预案') + this.yuanTable[0].name.push(0) + } + }) + this.reservePlanType.forEach(element => { + if(element==1){ + this.yuanColumns.push('二维预案') + this.yuanTable[0].name.push(0) + }else if(element==2){ + this.yuanColumns.push('三维预案') + this.yuanTable[0].name.push(0) + }else if(element==4){ + this.yuanColumns.push('其他预案') + this.yuanTable[0].name.push(0) + }else if(element==16){ + this.yuanColumns.push('文本预案') + this.yuanTable[0].name.push(0) } - /* this.tabledataSource.forEach((td,ti,tval)=>{ - tval[ti].name.push(item.count) - }) */ }); - } - }); - } - else if(this.preparelevels==1){ - //预案查询 - this.yuanColumns=['组织名称', '总数'] - this.yuanTable=[{name:[0,0]}] - //console.log(this.planCategory,this.reservePlanType) - if(this.planCategory.length==0&&this.reservePlanType.length!=0){ - this.yuanColumns.push('Ⅰ级预案','Ⅱ级预案','Ⅲ级预案','Ⅳ级预案','Ⅴ级预案') - this.yuanTable[0].name.push(0,0,0,0,0) - this.reservePlanType.forEach(element => { - if(element==1){ - this.yuanColumns.push('二维预案') - this.yuanTable[0].name.push(0) - }else if(element==2){ - this.yuanColumns.push('三维预案') - this.yuanTable[0].name.push(0) - }else if(element==4){ - this.yuanColumns.push('其他预案') - this.yuanTable[0].name.push(0) - }else if(element==16){ - this.yuanColumns.push('文本预案') - this.yuanTable[0].name.push(0) + //console.log(this.yuanTable) + data.forEach((element,i,value) => { + if(i==0){ + this.yuanTable[0].name[0]=value[0].orgName + this.yuanTable[0].name[1]=value[0].planStatistics.totalCount + }else{ + this.yuanTable.push({name:[value[i].orgName,value[i].planStatistics.totalCount]}) } }); - }else if(this.planCategory.length!=0&&this.reservePlanType.length==0){ - this.yuanColumns.push('文本预案','二维预案','三维预案','其他预案') - this.yuanTable[0].name.push(0,0,0,0) - this.planCategory.forEach(element=>{ - if(element==1){ - this.yuanColumns.push('Ⅰ级预案') - this.yuanTable[0].name.push(0) - }else if(element==2){ - this.yuanColumns.push('Ⅱ级预案') - this.yuanTable[0].name.push(0) - }else if(element==3){ - this.yuanColumns.push('Ⅲ级预案') - this.yuanTable[0].name.push(0) - }else if(element==4){ - this.yuanColumns.push('Ⅳ级预案') - this.yuanTable[0].name.push(0) - }else if(element==5){ - this.yuanColumns.push('Ⅴ级预案') - this.yuanTable[0].name.push(0) - } - }) - }else if(this.planCategory.length!=0&&this.reservePlanType.length!=0){ - this.planCategory.forEach(element=>{ - if(element==1){ - this.yuanColumns.push('Ⅰ级预案') - this.yuanTable[0].name.push(0) - }else if(element==2){ - this.yuanColumns.push('Ⅱ级预案') - this.yuanTable[0].name.push(0) - }else if(element==3){ - this.yuanColumns.push('Ⅲ级预案') - this.yuanTable[0].name.push(0) - }else if(element==4){ - this.yuanColumns.push('Ⅳ级预案') - this.yuanTable[0].name.push(0) - }else if(element==5){ - this.yuanColumns.push('Ⅴ级预案') - this.yuanTable[0].name.push(0) + this.yuanTable.forEach((element,i,value)=>{ + if(i>0){ + for(let a=value[i].name.length;a { - if(element==1){ - this.yuanColumns.push('二维预案') - this.yuanTable[0].name.push(0) - }else if(element==2){ - this.yuanColumns.push('三维预案') - this.yuanTable[0].name.push(0) - }else if(element==4){ - this.yuanColumns.push('其他预案') - this.yuanTable[0].name.push(0) - }else if(element==16){ - this.yuanColumns.push('文本预案') - this.yuanTable[0].name.push(0) - } - }); - } - //console.log(this.yuanTable) - data.forEach((element,i,value) => { - if(i==0){ - this.yuanTable[0].name[0]=value[0].orgName - this.yuanTable[0].name[1]=value[0].planStatistics.totalCount - }else{ - this.yuanTable.push({name:[value[i].orgName,value[i].planStatistics.totalCount]}) - } - }); - this.yuanTable.forEach((element,i,value)=>{ - if(i>0){ - for(let a=value[i].name.length;a{ - this.yuanColumns.forEach((th,thi,thvalu)=>{ - data.forEach((element,i,value) => { - //预案级别数据 - value[i].planStatistics.planCategoryStatistics.planCategories.forEach((jibie,ji,jval) => { - if(thvalu[thi].indexOf(jval[ji].planCategoryName)!=-1&&yuani==i){ - yuanval[yuani].name[thi]=jval[ji].count - } - }); - //预案类型数据 - value[i].planStatistics.planTypeStatistics.planTypes.forEach((planlx,lxi,lxval) => { - if(thvalu[thi].indexOf(lxval[lxi].planTypeName)!=-1&&yuani==i){ - yuanval[yuani].name[thi]=lxval[lxi].count - } + this.yuanTable.forEach((yuan,yuani,yuanval)=>{ + this.yuanColumns.forEach((th,thi,thvalu)=>{ + data.forEach((element,i,value) => { + //预案级别数据 + value[i].planStatistics.planCategoryStatistics.planCategories.forEach((jibie,ji,jval) => { + if(thvalu[thi].indexOf(jval[ji].planCategoryName)!=-1&&yuani==i){ + yuanval[yuani].name[thi]=jval[ji].count + } + }); + //预案类型数据 + value[i].planStatistics.planTypeStatistics.planTypes.forEach((planlx,lxi,lxval) => { + if(thvalu[thi].indexOf(lxval[lxi].planTypeName)!=-1&&yuani==i){ + yuanval[yuani].name[thi]=lxval[lxi].count + } + }); }); - }); + }) + }) - - }) + } } - console.log(this.yuanColumns) - console.log(this.yuanTable) + //this.tabledataSource=data + + //console.log(this.yuanColumns) + //console.log(this.yuanTable) this.excelData=data resolve(this.excelData) } @@ -487,7 +494,7 @@ export class CombinedQueryComponent implements OnInit { yuanjs: any //预案所选组织机构 yuanjsId: any //预案所选组织机构的id yuanjscheck: boolean //预案所选组织机构勾选框 - unittype: any //单位类型 + unittype=[] //单位类型 reservePlanType=[] //预案类型 preparelevel: any //编制级别 plcheck: boolean //编制级别勾选框 @@ -498,7 +505,7 @@ export class CombinedQueryComponent implements OnInit { this.js = '' this.jsId = '' this.jscheck = false - this.unittype = '' + this.unittype = [] this.preparelevel = '' this.dwaddtime = '' From bc10e1030781f3b0e0ed76c6caa314f7fabfa50a Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Fri, 5 Nov 2021 09:09:17 +0800 Subject: [PATCH 14/26] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=8C=89=E9=9C=80=E6=9F=A5=E8=AF=A2=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../combined-query.component.html | 28 +++- .../combined-query.component.scss | 5 +- .../combined-query.component.ts | 122 +++++++----------- 3 files changed, 74 insertions(+), 81 deletions(-) diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.html b/src/app/statistic-analysis/combined-query/combined-query.component.html index b97bed7..be0d92f 100644 --- a/src/app/statistic-analysis/combined-query/combined-query.component.html +++ b/src/app/statistic-analysis/combined-query/combined-query.component.html @@ -54,10 +54,10 @@ - 文本预案 二维预案 三维预案 其他预案 + 文本预案 @@ -72,17 +72,15 @@
    -
    - - 新增 - 维护更新 + + 新增 + 维护更新
    -
    @@ -95,6 +93,24 @@
    +
    + + + + 从高到低 + 从低到高 + + +
    +
    + + + + 从高到低 + 从低到高 + + +
    diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.scss b/src/app/statistic-analysis/combined-query/combined-query.component.scss index 675c92b..70a7520 100644 --- a/src/app/statistic-analysis/combined-query/combined-query.component.scss +++ b/src/app/statistic-analysis/combined-query/combined-query.component.scss @@ -90,8 +90,6 @@ .body{ height: 100%; width: 100%; - overflow-y: auto; - overflow-x: auto; .buttonbox{ padding-left: 50px; button{ @@ -99,7 +97,8 @@ } } .tablebox{ - height: 100%; + height: 620px; + overflow-y: auto; //margin-bottom: 15px; table{ width: 100%; diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.ts b/src/app/statistic-analysis/combined-query/combined-query.component.ts index 6c357a9..a15b602 100644 --- a/src/app/statistic-analysis/combined-query/combined-query.component.ts +++ b/src/app/statistic-analysis/combined-query/combined-query.component.ts @@ -10,6 +10,7 @@ import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dial import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { TreeService } from '../../http-interceptors/tree.service' import { Viewer } from 'photo-sphere-viewer'; +import { timeStamp } from 'console'; @Component({ selector: 'app-combined-query', @@ -94,6 +95,8 @@ export class CombinedQueryComponent implements OnInit { //获得所有预案或单位信息 tableDataNull=false async getAllPlanInfo() { + /* this.planCategory=new Array(); + this.reservePlanType=new Array(); */ let paramsdata:any={ QueryMode:this.preparelevels, OrganizationId:this.jsId||'', @@ -101,31 +104,42 @@ export class CombinedQueryComponent implements OnInit { TimeIntervalStart:this.dwaddtime||'', TimeIntervalEnd:this.dwendtime||'', BuildingTypeIds:this.unittype||[], - CompanyStatus:this.preparelevel||'' + CompanyStatus:this.preparelevel||[], + SortBy:'totalCount', + SortType:this.integritySort } let yuandata={ QueryMode:this.preparelevels, - OrganizationId:this.jsId||'', + OrganizationId:this.yuanjsId||'', HasChildren:this.yuanjscheck||'', TimeIntervalStart:this.yuanaddtime||'', TimeIntervalEnd:this.yuanendtime||'', - PlanCategory:this.planCategory||[], - PlanType:this.reservePlanType||[] + PlanCategories:this.planCategory||[], + PlanTypes:this.reservePlanType||[], + SortBy:'totalCount', + SortType:this.yuanintegritySort } let result = await new Promise((resolve, reject)=>{ this.http.get("/api/StatisticsAnalysis/ReportTable", { params:this.preparelevels==0? paramsdata:yuandata }).subscribe((data: any) => { - //console.log(data) + console.log(data) if(data.length==0){ this.tableDataNull=true }else{ this.tableDataNull=false if(this.preparelevels==0){ //单位查询 + if(this.preparelevel.length==0){ + //必须选择单位状态 + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('请选择单位状态', '确定', config); + }else{ this.tabledataSource=[] this.displayedColumns=['组织名称', '总数'] data.forEach((element,i,value) => { this.tabledataSource.push({name:[element.orgName,element.companyStatistics.totalCount]}) - if(value[0].companyStatistics.buildingTypesCounts.length>0){ + if(value[0].companyStatistics.buildingTypesCounts!=null){ value[i].companyStatistics.buildingTypesCounts.forEach((build,bi,bvalue) => { if(i==0){ this.displayedColumns.push(value[0].companyStatistics.buildingTypesCounts[bi].buildingTypeName) @@ -140,52 +154,30 @@ export class CombinedQueryComponent implements OnInit { } }); + } } else if(this.preparelevels==1){ //预案查询 this.yuanColumns=['组织名称', '总数'] this.yuanTable=[{name:[0,0]}] - //console.log(this.planCategory,this.reservePlanType) - if(this.planCategory.length==0&&this.reservePlanType.length!=0){ - this.yuanColumns.push('Ⅰ级预案','Ⅱ级预案','Ⅲ级预案','Ⅳ级预案','Ⅴ级预案') - this.yuanTable[0].name.push(0,0,0,0,0) + if(this.reservePlanType.length!=0){ this.reservePlanType.forEach(element => { if(element==1){ - this.yuanColumns.push('二维预案') + this.yuanColumns.push('二维') this.yuanTable[0].name.push(0) }else if(element==2){ - this.yuanColumns.push('三维预案') + this.yuanColumns.push('三维') this.yuanTable[0].name.push(0) }else if(element==4){ - this.yuanColumns.push('其他预案') + this.yuanColumns.push('其他') this.yuanTable[0].name.push(0) }else if(element==16){ - this.yuanColumns.push('文本预案') + this.yuanColumns.push('文本') this.yuanTable[0].name.push(0) } }); - }else if(this.planCategory.length!=0&&this.reservePlanType.length==0){ - this.yuanColumns.push('文本预案','二维预案','三维预案','其他预案') - this.yuanTable[0].name.push(0,0,0,0) - this.planCategory.forEach(element=>{ - if(element==1){ - this.yuanColumns.push('Ⅰ级预案') - this.yuanTable[0].name.push(0) - }else if(element==2){ - this.yuanColumns.push('Ⅱ级预案') - this.yuanTable[0].name.push(0) - }else if(element==3){ - this.yuanColumns.push('Ⅲ级预案') - this.yuanTable[0].name.push(0) - }else if(element==4){ - this.yuanColumns.push('Ⅳ级预案') - this.yuanTable[0].name.push(0) - }else if(element==5){ - this.yuanColumns.push('Ⅴ级预案') - this.yuanTable[0].name.push(0) - } - }) - }else if(this.planCategory.length!=0&&this.reservePlanType.length!=0){ + } + if(this.planCategory.length!=0){ this.planCategory.forEach(element=>{ if(element==1){ this.yuanColumns.push('Ⅰ级预案') @@ -204,23 +196,8 @@ export class CombinedQueryComponent implements OnInit { this.yuanTable[0].name.push(0) } }) - this.reservePlanType.forEach(element => { - if(element==1){ - this.yuanColumns.push('二维预案') - this.yuanTable[0].name.push(0) - }else if(element==2){ - this.yuanColumns.push('三维预案') - this.yuanTable[0].name.push(0) - }else if(element==4){ - this.yuanColumns.push('其他预案') - this.yuanTable[0].name.push(0) - }else if(element==16){ - this.yuanColumns.push('文本预案') - this.yuanTable[0].name.push(0) - } - }); } - //console.log(this.yuanTable) + data.forEach((element,i,value) => { if(i==0){ this.yuanTable[0].name[0]=value[0].orgName @@ -240,17 +217,22 @@ export class CombinedQueryComponent implements OnInit { this.yuanColumns.forEach((th,thi,thvalu)=>{ data.forEach((element,i,value) => { //预案级别数据 - value[i].planStatistics.planCategoryStatistics.planCategories.forEach((jibie,ji,jval) => { - if(thvalu[thi].indexOf(jval[ji].planCategoryName)!=-1&&yuani==i){ - yuanval[yuani].name[thi]=jval[ji].count - } - }); - //预案类型数据 - value[i].planStatistics.planTypeStatistics.planTypes.forEach((planlx,lxi,lxval) => { + if(value[i].planStatistics.planCategoryStatistics!=null){ + value[i].planStatistics.planCategoryStatistics.planCategories.forEach((jibie,ji,jval) => { + if(thvalu[thi].indexOf(jval[ji].planCategoryName)!=-1&&yuani==i){ + yuanval[yuani].name[thi]=jval[ji].count + } + }); + } + if(value[i].planStatistics.planTypeStatistics!=null){ + //预案类型数据 + value[i].planStatistics.planTypeStatistics.planTypes.forEach((planlx,lxi,lxval) => { if(thvalu[thi].indexOf(lxval[lxi].planTypeName)!=-1&&yuani==i){ yuanval[yuani].name[thi]=lxval[lxi].count } }); + } + }); }) @@ -259,8 +241,8 @@ export class CombinedQueryComponent implements OnInit { } //this.tabledataSource=data - //console.log(this.yuanColumns) - //console.log(this.yuanTable) + console.log(this.yuanColumns) + console.log(this.yuanTable) this.excelData=data resolve(this.excelData) } @@ -482,7 +464,7 @@ export class CombinedQueryComponent implements OnInit { let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - if(this.dwendtimethis.yuanendtime){ this.snackBar.open('开始时间不能早于结束时间', '确定', config); } this.getAllPlanInfo(); @@ -496,9 +478,11 @@ export class CombinedQueryComponent implements OnInit { yuanjscheck: boolean //预案所选组织机构勾选框 unittype=[] //单位类型 reservePlanType=[] //预案类型 - preparelevel: any //编制级别 + preparelevel=[1] //单位状态 plcheck: boolean //编制级别勾选框 - planCategory = []//预案级别 + planCategory=[] //预案级别 + integritySort=1 //单位排序字段 + yuanintegritySort=1 //预案排序字段 //重置 reset() { if(this.preparelevels==0){ @@ -506,8 +490,7 @@ export class CombinedQueryComponent implements OnInit { this.jsId = '' this.jscheck = false this.unittype = [] - - this.preparelevel = '' + this.preparelevel = [0] this.dwaddtime = '' this.dwendtime = '' }else if(this.preparelevels==1){ @@ -523,11 +506,6 @@ export class CombinedQueryComponent implements OnInit { //重新获取初始化列表 this.getAllPlanInfo(); } - //导出 - tableToexcel(){ - this.exal()(document.getElementById("table"), "导出表格") - } - exal(){ var uri = 'data:application/vnd.ms-excel;base64,', @@ -575,7 +553,7 @@ export class CombinedQueryComponent implements OnInit { const link = document.createElement('a'); const blob = new Blob([data], {type: 'application/vnd.ms-excel'}); link.setAttribute('href', window.URL.createObjectURL(blob)); - link.setAttribute('download', '统计信息'+'.xls'); + link.setAttribute('download', '报表统计'+'.xls'); link.style.visibility = 'hidden'; document.body.appendChild(link); link.click(); From 87d47efbd09ff54a8f245634028264345ac78e33 Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Mon, 8 Nov 2021 17:16:26 +0800 Subject: [PATCH 15/26] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E6=A5=BC=E4=BA=94=E7=BA=A7=E9=A2=84=E6=A1=88=E9=80=82=E9=85=8D?= =?UTF-8?q?word=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../create-plan-online-five.component.html | 2 +- .../create-plan-online-five.component.ts | 29 ++++++++----- .../combined-query.component.ts | 41 ++++++++++--------- .../plan-template/plan-template.component.ts | 20 ++++++++- 4 files changed, 59 insertions(+), 33 deletions(-) diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html index 284a9e3..769e37c 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html @@ -807,7 +807,7 @@
    - + 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 e0cca1e..6988466 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 @@ -159,7 +159,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { data.items.forEach(element => { if (element.id == this.route.snapshot.queryParams.companyId) { this.unitData = element - if(this.unitData.buildingTypes[0].name=='高层建筑'&&this.planLevel=='5'){ + if((this.unitData.buildingTypes[0].name=='高层建筑'||this.unitData.buildingTypes[0].name=='居民楼')&&this.planLevel=='5'){ this.zaixianDr=true } //console.log('单位列表信息', this.unitData) @@ -1212,7 +1212,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { addNumber = -1 addTd(key, i) { this.addNumber++ - if (this.planTemplateData[key].attribute[i].tableth == undefined) { + if (this.planTemplateData[key].attribute[i].tableth == undefined||this.planTemplateData[key].attribute[i].tableth.length==0) { //this.planTemplateData[key].attribute[i].tabletr = [] const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; @@ -1368,6 +1368,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { this.addNumber++ this.planTemplateData[index].building[attacki].body.forEach((value,bodyi,arr)=>{ if(surveyName==arr[bodyi].surveyName){ + console.log(bodyi) if(arr[bodyi].zdy==undefined){ if (surveyName == '进攻通道') { if (this.planTemplateData[index].building[attacki].body[bodyi].attinf[i].tabletr == undefined) { @@ -1415,7 +1416,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { //单位概况自定义表格新增一行 unitNewadd(...num:number[]){ console.log(num) - if (this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]].tableth == undefined) { + if (this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]].tableth == undefined||this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]].tableth.length==0) { //this.planTemplateData[key].attribute[i].tabletr = [] const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; @@ -1591,7 +1592,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { searchType = '0' //打开自定义新增具体内容 tuTrue=false - addAttribute(groupName,attacki?:any, i?:any,fileNum?:any,surveyName?:string){ + addAttribute(groupName,attacki?:any, bi?:any,fileNum?:any,surveyName?:string){ let index = this.getArrayIndex(this.planTemplateData,'单位概况') const dialogRef = this.dialog.open(disaster, {//调用open方法打开对话框并且携带参数过去 width: '340px', @@ -1600,7 +1601,6 @@ export class CreatePlanOnlineFiveComponent implements OnInit { data:this.planTemplateData }); dialogRef.afterClosed().subscribe(result => { - console.log(result) if(result!=undefined){ if(surveyName==undefined){ this.planTemplateData.forEach((value,index,array)=>{ @@ -1612,10 +1612,10 @@ export class CreatePlanOnlineFiveComponent implements OnInit { array[index].attribute.push(result) } if(result.level==2){ - for(var i=0;i{ + this.http.post(`/api/OfficeExtract/ExtractWordPlan?type=${type}`,formData).subscribe((data:any)=>{ console.log(data) if(data==null){ this.snackBar.open('解析失败,请确定好格式再重新上传!', '确定', config); diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.ts b/src/app/statistic-analysis/combined-query/combined-query.component.ts index a15b602..c1b1950 100644 --- a/src/app/statistic-analysis/combined-query/combined-query.component.ts +++ b/src/app/statistic-analysis/combined-query/combined-query.component.ts @@ -122,6 +122,7 @@ export class CombinedQueryComponent implements OnInit { let result = await new Promise((resolve, reject)=>{ this.http.get("/api/StatisticsAnalysis/ReportTable", { params:this.preparelevels==0? paramsdata:yuandata }).subscribe((data: any) => { console.log(data) + this.excelData=data if(data.length==0){ this.tableDataNull=true }else{ @@ -160,42 +161,42 @@ export class CombinedQueryComponent implements OnInit { //预案查询 this.yuanColumns=['组织名称', '总数'] this.yuanTable=[{name:[0,0]}] - if(this.reservePlanType.length!=0){ - this.reservePlanType.forEach(element => { + if(this.planCategory.length!=0){ + this.planCategory.forEach(element=>{ if(element==1){ - this.yuanColumns.push('二维') + this.yuanColumns.push('Ⅰ级') this.yuanTable[0].name.push(0) }else if(element==2){ - this.yuanColumns.push('三维') + this.yuanColumns.push('Ⅱ级') + this.yuanTable[0].name.push(0) + }else if(element==3){ + this.yuanColumns.push('Ⅲ级') this.yuanTable[0].name.push(0) }else if(element==4){ - this.yuanColumns.push('其他') + this.yuanColumns.push('Ⅳ级') this.yuanTable[0].name.push(0) - }else if(element==16){ - this.yuanColumns.push('文本') + }else if(element==5){ + this.yuanColumns.push('Ⅴ级') this.yuanTable[0].name.push(0) } - }); + }) } - if(this.planCategory.length!=0){ - this.planCategory.forEach(element=>{ + if(this.reservePlanType.length!=0){ + this.reservePlanType.forEach(element => { if(element==1){ - this.yuanColumns.push('Ⅰ级预案') + this.yuanColumns.push('二维') this.yuanTable[0].name.push(0) }else if(element==2){ - this.yuanColumns.push('Ⅱ级预案') - this.yuanTable[0].name.push(0) - }else if(element==3){ - this.yuanColumns.push('Ⅲ级预案') + this.yuanColumns.push('三维') this.yuanTable[0].name.push(0) }else if(element==4){ - this.yuanColumns.push('Ⅳ级预案') + this.yuanColumns.push('其他') this.yuanTable[0].name.push(0) - }else if(element==5){ - this.yuanColumns.push('Ⅴ级预案') + }else if(element==16){ + this.yuanColumns.push('文本') this.yuanTable[0].name.push(0) } - }) + }); } data.forEach((element,i,value) => { @@ -243,7 +244,7 @@ export class CombinedQueryComponent implements OnInit { console.log(this.yuanColumns) console.log(this.yuanTable) - this.excelData=data + resolve(this.excelData) } ) diff --git a/src/app/ui/plan-template/plan-template.component.ts b/src/app/ui/plan-template/plan-template.component.ts index 9bb15b0..6bc8b7a 100644 --- a/src/app/ui/plan-template/plan-template.component.ts +++ b/src/app/ui/plan-template/plan-template.component.ts @@ -227,6 +227,7 @@ export class PlanTemplateComponent implements OnInit { } //右侧新增分组点击事件 addGroupClick(){ + var temp const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 @@ -246,6 +247,19 @@ export class PlanTemplateComponent implements OnInit { }); dialogRef.afterClosed().subscribe(result => { console.log(result,this.newleftTabledata) + /* if(result.length>this.newleftTabledata[this.leftclicki].data.length){ + this.newleftTabledata[this.leftclicki].data.forEach((item,i,value)=>{ + result.forEach((element,ri,rval) => { + if(value[i].groupName==rval[ri].groupName){ + console.log('000') + } + }); + }) + + this.newleftTabledata[this.leftclicki].data.push(result) + } */ + //this.newleftTabledata[this.leftclicki].data.push({groupName: '预案附件', completed: false}) + console.log(result) this.newleftTabledata.forEach((value,index,array)=>{ if(array[index].buildingTypeId==this.buildingTypeId&&array[index].planCategory==this.planCategory){ if(result!=undefined){ @@ -253,7 +267,8 @@ export class PlanTemplateComponent implements OnInit { //添加分组名称 if(array[index].data==null||array[index].data.length==0){ array[index].data=result - }else{ + } + else{ array[index].data[i].completed=rarr[i].completed } @@ -298,7 +313,8 @@ export class PlanTemplateComponent implements OnInit { if(isTrue){ this.group.forEach((element,index,array)=>{ if(array[index].groupName==groupName){ - this.group.splice(index,1) + //this.group.splice(index,1) + array[index].completed=false } }) } From 6a3408c554af005b54c89e082a519bd15d4ed1b2 Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Fri, 12 Nov 2021 16:39:09 +0800 Subject: [PATCH 16/26] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E9=A2=84=E6=A1=88?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=BA=BA=E5=91=98=E5=AF=86=E9=9B=86=E4=BA=94?= =?UTF-8?q?=E7=BA=A7=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../create-plan-online-five.component.html | 4 +- .../create-plan-online-five.component.scss | 10 +- .../create-plan-online-five.component.ts | 12 +- .../combined-query.component.ts | 2 +- .../scheduled-updates.component.html | 4 +- .../plan-template.component.html | 2 + .../plan-template/plan-template.component.ts | 237 ++++++++++++++++++ 7 files changed, 259 insertions(+), 12 deletions(-) diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html index 769e37c..2387bf2 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html @@ -738,7 +738,7 @@ color: #ffffff;">{{element.surveyName}} + (click)='unitadd(element.surveyName,uniti,elei)' *ngIf="pattern == 'edit'&&element.surveyName!='进攻通道'">
    @@ -823,7 +823,7 @@ height: 40px; width: 60%; font-size: 16px; - text-align: center;">{{info.value}} + text-align: center;">{{info.propertyValue}}
    diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss index 37d7deb..f5573d9 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss @@ -874,7 +874,7 @@ width: 100%; height: 100%; .fileHead{ - height: 40px; + height: 42px; width: 100%; background-color: #FFFBE8; @@ -928,9 +928,9 @@ } } .fourTexttwo{ - height: 40px; + height: 42px; width: 50%; - border-bottom: 1px solid #F2F4F5; + border-bottom: 1px solid #E8E9E9; input{ height: 40px; //width: 60%; @@ -973,9 +973,9 @@ flex-direction: column; .duohang{ width: 100%; - height: 40px; + height: 42px; display: flex; - //border-bottom: 1px solid #FFFFFF; + border-bottom: 1px solid #E8E9E9; .duohangHalf{ height: 40px; width: 50%; 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 6988466..6fa5a75 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 @@ -159,7 +159,11 @@ export class CreatePlanOnlineFiveComponent implements OnInit { data.items.forEach(element => { if (element.id == this.route.snapshot.queryParams.companyId) { this.unitData = element - if((this.unitData.buildingTypes[0].name=='高层建筑'||this.unitData.buildingTypes[0].name=='居民楼')&&this.planLevel=='5'){ + if((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.unitData.buildingTypes[0].name=='会议中心')&&this.planLevel=='5'){ this.zaixianDr=true } //console.log('单位列表信息', this.unitData) @@ -1701,7 +1705,11 @@ export class CreatePlanOnlineFiveComponent implements OnInit { config.duration = 3000 let formData = new FormData() formData.append("file", e.target.files[0]) - let type=this.unitData.buildingTypes[0].name=='高层建筑'?1:2 + 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:5 let fileData={ type:this.unitData.buildingTypes[0].name=='高层建筑'?1:2, file:formData diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.ts b/src/app/statistic-analysis/combined-query/combined-query.component.ts index c1b1950..6cb7d81 100644 --- a/src/app/statistic-analysis/combined-query/combined-query.component.ts +++ b/src/app/statistic-analysis/combined-query/combined-query.component.ts @@ -104,7 +104,7 @@ export class CombinedQueryComponent implements OnInit { TimeIntervalStart:this.dwaddtime||'', TimeIntervalEnd:this.dwendtime||'', BuildingTypeIds:this.unittype||[], - CompanyStatus:this.preparelevel||[], + CompanyStatuses:this.preparelevel||[], SortBy:'totalCount', SortType:this.integritySort } diff --git a/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.html b/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.html index d1c0b0b..dec496c 100644 --- a/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.html +++ b/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.html @@ -30,10 +30,10 @@
    -
    +
    -
    +
    \ No newline at end of file diff --git a/src/app/ui/plan-template/plan-template.component.html b/src/app/ui/plan-template/plan-template.component.html index 9877f42..9ad49ec 100644 --- a/src/app/ui/plan-template/plan-template.component.html +++ b/src/app/ui/plan-template/plan-template.component.html @@ -93,6 +93,8 @@ +
    diff --git a/src/app/ui/plan-template/plan-template.component.ts b/src/app/ui/plan-template/plan-template.component.ts index 6bc8b7a..17dfbde 100644 --- a/src/app/ui/plan-template/plan-template.component.ts +++ b/src/app/ui/plan-template/plan-template.component.ts @@ -652,6 +652,243 @@ export class PlanTemplateComponent implements OnInit { const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 + let linshi=[ + { + "attribute": [ + { + "attinf": [ + { + "value": "", + "olddata": "", + "completed": false, + "propertyName": "统一社会信用代码", + "propertyType": 0 + }, + { + "value": "", + "olddata": "", + "completed": false, + "propertyName": "单位类型", + "propertyType": 0 + }, + { + "value": "", + "olddata": "", + "completed": true, + "propertyName": "单位地址", + "propertyType": 0, + "analysisWord": { + "valueAxis": [ 1, 1 ], + "tableIndex": 0, + "valueField": "propertyValue" + } + }, + { + "value": "", + "olddata": "", + "completed": true, + "propertyName": "联系人", + "propertyType": 0, + "analysisWord": { + "valueAxis": [ 1, 5 ], + "tableIndex": 0, + "valueField": "propertyValue" + } + }, + { + "value": "", + "olddata": "", + "completed": false, + "propertyName": "辖区中队", + "propertyType": 0 + }, + { + "value": "", + "olddata": "", + "completed": true, + "propertyName": "联系电话", + "propertyType": 0, + "analysisWord": { + "valueAxis": [ 1, 5 ], + "tableIndex": 0, + "valueField": "propertyValue" + } + } + ], + "completed": true, + "surveyName": "单位基本信息" + }, + { + "completed": false, + "surveyName": "建筑信息" + }, + { + "attinf": [ + { + "name": "东", + "value": "", + "analysisWord": { + "valueAxis": [ 2, 2 ], + "tableIndex": 0, + "valueField": "value" + } + }, + { + "name": "西", + "value": "", + "analysisWord": { + "valueAxis": [ 2, 4 ], + "tableIndex": 0, + "valueField": "value" + } + }, + { + "name": "南", + "value": "", + "analysisWord": { + "valueAxis": [ 3, 2 ], + "tableIndex": 0, + "valueField": "value" + } + }, + { + "name": "北", + "value": "", + "analysisWord": { + "valueAxis": [ 3, 4 ], + "tableIndex": 0, + "valueField": "value" + } + } + ], + "completed": true, + "surveyName": "四周毗邻" + }, + { + "completed": false, + "surveyName": "消防设施" + }, + { + "completed": false, + "surveyName": "进攻通道" + }, + { + "attinf": [ + { + "body": [ + { + "name": "重点部位名称", + "value": "" + }, + { + "name": "重点部位所在位置", + "value": "" + }, + { + "name": "建筑结构", + "value": "" + }, + { + "name": "使用性质", + "value": "" + }, + { + "name": "主要危险性", + "value": "" + } + ], + "heafName": "" + } + ], + "completed": false, + "surveyName": "重点部位" + }, + { + "attinf": [ + { + "name": "", + "value": "" + } + ], + "completed": false, + "surveyName": "功能分区" + }, + { + "zdy": true, + "attinf": [ + { + "level": "3", + "tableth": "", + "headName": "备注详情", + "analysisWord": { + "valueAxis": [ 4, 1 ], + "tableIndex": 0, + "valueField": "tableth" + } + } + ], + "completed": true, + "surveyName": "备注" + } + ], + "completed": true, + "groupName": "单位概况" + }, + { + "completed": false, + "groupName": "灾情设定" + }, + { + "completed": false, + "groupName": "力量调集" + }, + { + "completed": false, + "groupName": "组织指挥" + }, + { + "completed": false, + "groupName": "作战行动" + }, + { + "completed": false, + "groupName": "社会联动" + }, + { + "completed": false, + "groupName": "勤务保障" + }, + { + "completed": false, + "groupName": "特别警示" + }, + { + "completed": false, + "groupName": "辅助决策" + }, + { + "completed": true, + "groupName": "交通水源", + "manualWord": { + "valueAxis": [ 1, 6 ], + "KeyAxis": [ 0, 6 ], + "tableIndex": 0 + } + }, + { + "completed": true, + "groupName": "重点图示" + }, + { + "completed": false, + "groupName": "处置要点" + }, + { + "completed": false, + "groupName": "预案附件" + } + ] + let body={ id:this.Id, basicCategoryId:this.newleftTabledata[this.leftclicki].basicCategoryId, From c441e4a6fe54edc1505f2f4b84a018a025f79a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Sat, 13 Nov 2021 14:52:07 +0800 Subject: [PATCH 17/26] =?UTF-8?q?PropertyType=20=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BAint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/working-area/working-area.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index e6bd50e..37f98d6 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -1239,7 +1239,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV RuleValue: '', PhysicalUnit: '', PropertyName: '列', - PropertyType: '2', + PropertyType: 2, PropertyValue: '2', }, ], From 7d35abb8c1620243c4861013ddc5fdf0311719bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Sat, 13 Nov 2021 14:59:19 +0800 Subject: [PATCH 18/26] =?UTF-8?q?PropertyType=20=20=E5=B7=B2=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E7=9A=84=E5=80=BC=E7=B1=BB=E5=9E=8B=E8=BD=AC=E6=8D=A2?= =?UTF-8?q?=E4=B8=BAint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/working-area/working-area.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 37f98d6..7c2db23 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -1274,6 +1274,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.emit('createIcon', axLegend); } else { const axLegend = new AxLegend(data, this, shapeMap); + axLegend.assetData.PropertyInfos[0].PropertyType = Number(axLegend.assetData.PropertyInfos[0].PropertyType); axLegend.assetData.PropertyInfos[0].PropertyValue = String(axLegend.assetData.PropertyInfos[0].PropertyValue); } } From 42b253ce9925e8ea118a73c25443c0da1f3418a1 Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Fri, 19 Nov 2021 10:31:40 +0800 Subject: [PATCH 19/26] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E9=A2=84=E6=A1=88?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=BB=BA=E7=AD=91=E4=BF=A1=E6=81=AF=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plan-template/plan-template.component.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/app/ui/plan-template/plan-template.component.ts b/src/app/ui/plan-template/plan-template.component.ts index 17dfbde..1a94a53 100644 --- a/src/app/ui/plan-template/plan-template.component.ts +++ b/src/app/ui/plan-template/plan-template.component.ts @@ -481,8 +481,8 @@ export class PlanTemplateComponent implements OnInit { }else{ this.attPanle=true const dialogRef = this.dialog.open(addattinf, {//调用open方法打开对话框并且携带参数过去 - width: '240px', - height:'400px', + width: '290px', + height:'440px', disableClose:true, data:{newleftTabledata:this.newleftTabledata,surveyName:surveyName,leftclicki:this.leftclicki} }); @@ -1589,12 +1589,15 @@ getattinf(){ categoryId:this.data.newleftTabledata[this.data.leftclicki].basicCategoryId } this.http.get("/api/BasicGroups",{params:paramsdata}).subscribe((data:any)=>{ - this.addAttinfBuild=data[0].propertyInfos + data.forEach(buildDate => { + this.addAttinfBuild.push(...buildDate.propertyInfos) + + }); this.addAttinfBuild.forEach(element => { element.completed=false element.olddata=element.propertyValue }); - console.log(this.addAttinfBuild) + //console.log(this.addAttinfBuild) }) }else if(value.surveyName=='建筑信息'&&value.attinf!=undefined){ this.addAttinfBuild=value.attinf @@ -1602,18 +1605,19 @@ getattinf(){ categoryId:this.data.newleftTabledata[this.data.leftclicki].basicCategoryId } this.http.get("/api/BasicGroups",{params:paramsdata}).subscribe((data:any)=>{ - this.addAttinfBuild=data[0].propertyInfos + data.forEach((buildDate,buildi,buildarr) => { + this.addAttinfBuild.push(...buildarr[buildi].propertyInfos) + }); this.addAttinfBuild.forEach((element,ei,earr) => { value.attinf.forEach((elattinf,fi,farr) => { if(earr[ei].propertyName==farr[fi].propertyName){ earr[ei].completed=farr[fi].completed } - }); element.olddata=element.propertyValue }); - console.log(this.addAttinfBuild) + //console.log(this.addAttinfBuild) }) }else if(value.surveyName=='消防设施'&&value.attinf==undefined){ let paramsdata:any ={ From 2b8019a7bb27c75ad9e31660323ede4cb7ea24a5 Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Fri, 19 Nov 2021 16:09:15 +0800 Subject: [PATCH 20/26] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E9=A2=84=E6=A1=88?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86=E5=BB=BA=E7=AD=91=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E9=80=89=E6=8B=A9=E9=80=89=E4=B8=8D=E4=B8=AD=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plan-template/plan-template.component.ts | 36 ++++++++++++------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/src/app/ui/plan-template/plan-template.component.ts b/src/app/ui/plan-template/plan-template.component.ts index 1a94a53..19a83ea 100644 --- a/src/app/ui/plan-template/plan-template.component.ts +++ b/src/app/ui/plan-template/plan-template.component.ts @@ -1554,7 +1554,7 @@ export class addattinf{ {propertyName:'单位地址',completed:false,propertyType:0,value:'',olddata:''}, /* {propertyName:'单位照片',completed:false,propertyType:0,value:''} *///,default:'-',must:'是',danwei:'-' ] -addAttinfBuild +addAttinfBuild=[] addAttinfFile facilityItems ngOnInit(): void{ @@ -1563,6 +1563,8 @@ ngOnInit(): void{ } //获取弹窗信息 getattinf(){ + this.data.newleftTabledata=JSON.parse(JSON.stringify(this.data.newleftTabledata)) + this.data.newleftTabledata=JSON.parse(JSON.stringify(this.data.newleftTabledata)) if(this.data.facilityItems==undefined){ this.data.newleftTabledata[this.data.leftclicki].data.forEach(element => { if(element.groupName=='单位概况'&&element.attribute!=undefined){ @@ -1585,6 +1587,7 @@ getattinf(){ }) } */ else if(value.surveyName=='建筑信息'&&value.attinf==undefined){ + this.addAttinfBuild=[] let paramsdata:any ={ categoryId:this.data.newleftTabledata[this.data.leftclicki].basicCategoryId } @@ -1600,25 +1603,32 @@ getattinf(){ //console.log(this.addAttinfBuild) }) }else if(value.surveyName=='建筑信息'&&value.attinf!=undefined){ + this.addAttinfBuild=value.attinf - let paramsdata:any ={ - categoryId:this.data.newleftTabledata[this.data.leftclicki].basicCategoryId - } - this.http.get("/api/BasicGroups",{params:paramsdata}).subscribe((data:any)=>{ - data.forEach((buildDate,buildi,buildarr) => { - this.addAttinfBuild.push(...buildarr[buildi].propertyInfos) - }); - this.addAttinfBuild.forEach((element,ei,earr) => { + this.addAttinfBuild=JSON.parse(JSON.stringify(this.addAttinfBuild)) + value.attinf.forEach((elattinf,fi,farr) => { - if(earr[ei].propertyName==farr[fi].propertyName){ - earr[ei].completed=farr[fi].completed + this.addAttinfBuild.forEach((element,ei,earr) => { + if(farr[fi].propertyName==earr[ei].propertyName){ + if(farr[fi].completed==true&&earr[ei].completed==false){ + farr[fi].completed=earr[ei].completed + } + } }); element.olddata=element.propertyValue }); - //console.log(this.addAttinfBuild) - }) + console.log(this.addAttinfBuild) + /* let paramsdata:any ={ + categoryId:this.data.newleftTabledata[this.data.leftclicki].basicCategoryId + } + this.http.get("/api/BasicGroups",{params:paramsdata}).subscribe((data:any)=>{ + data.forEach((buildDate,buildi,buildarr) => { + this.addAttinfBuild.push(...buildarr[buildi].propertyInfos) + }); + + }) */ }else if(value.surveyName=='消防设施'&&value.attinf==undefined){ let paramsdata:any ={ categoryId:this.data.newleftTabledata[this.data.leftclicki].facilityCategoryId From 69250b2e20030881df7aea385ff2692643aecffe Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Tue, 23 Nov 2021 08:35:21 +0800 Subject: [PATCH 21/26] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E9=80=89=E6=8B=A9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/plan-template/plan-template.component.html | 2 +- .../ui/plan-template/plan-template.component.ts | 15 +++++++++++---- src/app/ui/plan-template/updatal.html | 6 +++--- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/app/ui/plan-template/plan-template.component.html b/src/app/ui/plan-template/plan-template.component.html index 9ad49ec..57bef08 100644 --- a/src/app/ui/plan-template/plan-template.component.html +++ b/src/app/ui/plan-template/plan-template.component.html @@ -92,7 +92,7 @@
    + *ngIf="item.groupName=='单位概况'&&(element.surveyName!='四周毗邻'&&element.surveyName!='重点部位'&&element.surveyName!='功能分区')&&element.zdy==undefined"> 编辑 diff --git a/src/app/ui/plan-template/plan-template.component.ts b/src/app/ui/plan-template/plan-template.component.ts index 19a83ea..926f0bc 100644 --- a/src/app/ui/plan-template/plan-template.component.ts +++ b/src/app/ui/plan-template/plan-template.component.ts @@ -1484,10 +1484,11 @@ export class adddwsurvey{ ] ngOnInit(): void{ console.log(this.data) + this.data=JSON.parse(JSON.stringify(this.data)) this.data.forEach(element => { if(element.groupName=='单位概况'&&element.attribute!=undefined){ - //this.addwsurvey=element.attribute - element.attribute.forEach((datavalue,index,dataarr) => { + this.addwsurvey=element.attribute + /* element.attribute.forEach((datavalue,index,dataarr) => { this.addwsurvey.forEach((value,i,arr)=>{ if(dataarr[index].surveyName==arr[i].surveyName){ if(dataarr[index].completed==true&&arr[i].completed==false){ @@ -1495,9 +1496,10 @@ ngOnInit(): void{ } } }) - }); + }); */ } }); + console.log(this.addwsurvey) } //取消按钮 close(){ @@ -1695,7 +1697,12 @@ export class zdydisaster{ this.snackBar.open('请选择类型!','确定',config); }else if(this.headName==undefined||this.headName==''){ this.snackBar.open('请输入表头名称!','确定',config); - }else{ + }else if(this.lieNumber==0||this.lieNumber==undefined){ + this.snackBar.open('请输入列数!','确定',config); + }else if(this.hNumber==0||this.hNumber==undefined){ + this.snackBar.open('请输入行数!','确定',config); + } + else{ let tree={ json:[], name: '' diff --git a/src/app/ui/plan-template/updatal.html b/src/app/ui/plan-template/updatal.html index b3f7e64..5def8db 100644 --- a/src/app/ui/plan-template/updatal.html +++ b/src/app/ui/plan-template/updatal.html @@ -12,19 +12,19 @@
    - +
    - +
    - +
    From 1885a064dd302d87d90901f5c1bffadb52d4f649 Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Tue, 23 Nov 2021 09:24:49 +0800 Subject: [PATCH 22/26] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=A1=86=E7=B1=BB=E5=9E=8B=E5=8F=AF=E4=B8=8D=E5=A1=AB=E8=A1=A8?= =?UTF-8?q?=E5=A4=B4=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/ui/plan-template/plan-template.component.html | 2 +- src/app/ui/plan-template/plan-template.component.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/ui/plan-template/plan-template.component.html b/src/app/ui/plan-template/plan-template.component.html index 57bef08..ee56759 100644 --- a/src/app/ui/plan-template/plan-template.component.html +++ b/src/app/ui/plan-template/plan-template.component.html @@ -246,7 +246,7 @@
    - +
    diff --git a/src/app/ui/plan-template/plan-template.component.ts b/src/app/ui/plan-template/plan-template.component.ts index 926f0bc..395befc 100644 --- a/src/app/ui/plan-template/plan-template.component.ts +++ b/src/app/ui/plan-template/plan-template.component.ts @@ -1695,11 +1695,11 @@ export class zdydisaster{ config.duration = 3000 if(this.level==undefined||this.level==''){ this.snackBar.open('请选择类型!','确定',config); - }else if(this.headName==undefined||this.headName==''){ + }else if(this.level!=2&&(this.headName==undefined||this.headName=='')){ this.snackBar.open('请输入表头名称!','确定',config); - }else if(this.lieNumber==0||this.lieNumber==undefined){ + }else if(this.level==2&&(this.lieNumber==0||this.lieNumber==undefined) ){ this.snackBar.open('请输入列数!','确定',config); - }else if(this.hNumber==0||this.hNumber==undefined){ + }else if(this.level==2&&(this.lieNumber==0||this.lieNumber==undefined)){ this.snackBar.open('请输入行数!','确定',config); } else{ From 7768c8192ec10e00685d7f897fad3856341532d8 Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Tue, 23 Nov 2021 15:01:45 +0800 Subject: [PATCH 23/26] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E6=B6=88=E9=98=B2?= =?UTF-8?q?=E8=AE=BE=E6=96=BD=E6=9C=80=E5=86=85=E5=B1=82=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../create-plan-online-five.component.html | 6 +++--- .../create-plan-online-five.component.ts | 4 ++-- src/app/ui/plan-template/Disaster.html | 2 +- src/app/ui/plan-template/plan-template.component.html | 6 +++--- src/app/ui/plan-template/plan-template.component.ts | 11 ++++++----- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html index 2387bf2..d34426d 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html @@ -1130,9 +1130,9 @@
    - @@ -1149,7 +1149,7 @@ text-align: center;white-space:pre-wrap;width: 185px;"> {{itemthj.body}} - +
    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 6fa5a75..e26f521 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 @@ -163,7 +163,7 @@ 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.planLevel=='5'){ + ||this.unitData.buildingTypes[0].name=='会议中心'||this.unitData.buildingTypes[0].name=='储罐类')&&this.planLevel=='5'){ this.zaixianDr=true } //console.log('单位列表信息', this.unitData) @@ -1709,7 +1709,7 @@ 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:5 + ||this.unitData.buildingTypes[0].name=='会议中心')?4:this.unitData.buildingTypes[0].name=='储罐类'?'StorageTankFivePlan':'' let fileData={ type:this.unitData.buildingTypes[0].name=='高层建筑'?1:2, file:formData diff --git a/src/app/ui/plan-template/Disaster.html b/src/app/ui/plan-template/Disaster.html index a82bacd..ba05ce4 100644 --- a/src/app/ui/plan-template/Disaster.html +++ b/src/app/ui/plan-template/Disaster.html @@ -21,7 +21,7 @@
    -
    +
    diff --git a/src/app/ui/plan-template/plan-template.component.html b/src/app/ui/plan-template/plan-template.component.html index ee56759..8c64a86 100644 --- a/src/app/ui/plan-template/plan-template.component.html +++ b/src/app/ui/plan-template/plan-template.component.html @@ -200,7 +200,7 @@ - 删除 + 删除 @@ -274,9 +274,9 @@ *ngFor="let itemth of zdy.tableth;let tablethi=index;TrackBy:trackByFn">
    - - +
    diff --git a/src/app/ui/plan-template/plan-template.component.ts b/src/app/ui/plan-template/plan-template.component.ts index 395befc..783bbb0 100644 --- a/src/app/ui/plan-template/plan-template.component.ts +++ b/src/app/ui/plan-template/plan-template.component.ts @@ -558,10 +558,10 @@ export class PlanTemplateComponent implements OnInit { } //消防设施表格具体属性删除 - fileDel(i,f){ + fileDel(suri,i,f){ let isTrue = confirm('您确定要删除该条信息吗') if(isTrue){ - this.group[0].attribute[3].attinf[i].facilityItems[f].completed=false + this.group[0].attribute[suri].attinf[i].facilityItems[f].completed=false } } @@ -1565,9 +1565,10 @@ ngOnInit(): void{ } //获取弹窗信息 getattinf(){ - this.data.newleftTabledata=JSON.parse(JSON.stringify(this.data.newleftTabledata)) - this.data.newleftTabledata=JSON.parse(JSON.stringify(this.data.newleftTabledata)) + //this.data.newleftTabledata=JSON.parse(JSON.stringify(this.data.newleftTabledata)) + if(this.data.facilityItems==undefined){ + this.data.newleftTabledata=JSON.parse(JSON.stringify(this.data.newleftTabledata)) this.data.newleftTabledata[this.data.leftclicki].data.forEach(element => { if(element.groupName=='单位概况'&&element.attribute!=undefined){ element.attribute.forEach(value => { @@ -1651,7 +1652,7 @@ getattinf(){ } }); }else{ - this.facilityItems=this.data.facilityItems + this.facilityItems=JSON.parse(JSON.stringify(this.data.facilityItems)) console.log(this.facilityItems) /* this.facilityItems.forEach(element => { element.completed=false From 03c3df1ea66f34657acbc1355408d9ab71c222e7 Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Wed, 24 Nov 2021 11:29:27 +0800 Subject: [PATCH 24/26] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E5=BB=BA=E7=AD=91?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E4=BF=9D=E5=AD=98=E5=90=8E=E5=8F=AF=E8=AF=95?= =?UTF-8?q?=E8=AF=95=E6=9B=B4=E6=96=B0=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plan-template/plan-template.component.ts | 56 +++++++++++++------ 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/src/app/ui/plan-template/plan-template.component.ts b/src/app/ui/plan-template/plan-template.component.ts index 783bbb0..0e80b77 100644 --- a/src/app/ui/plan-template/plan-template.component.ts +++ b/src/app/ui/plan-template/plan-template.component.ts @@ -1557,6 +1557,7 @@ export class addattinf{ /* {propertyName:'单位照片',completed:false,propertyType:0,value:''} *///,default:'-',must:'是',danwei:'-' ] addAttinfBuild=[] +buildnewDate=[] addAttinfFile facilityItems ngOnInit(): void{ @@ -1564,14 +1565,14 @@ ngOnInit(): void{ this.getattinf() } //获取弹窗信息 -getattinf(){ +async getattinf(){ //this.data.newleftTabledata=JSON.parse(JSON.stringify(this.data.newleftTabledata)) if(this.data.facilityItems==undefined){ this.data.newleftTabledata=JSON.parse(JSON.stringify(this.data.newleftTabledata)) this.data.newleftTabledata[this.data.leftclicki].data.forEach(element => { if(element.groupName=='单位概况'&&element.attribute!=undefined){ - element.attribute.forEach(value => { + element.attribute.forEach(async value => { if(value.surveyName=='单位基本信息'&&value.attinf!=undefined){ //this.addAttinf=value.attinf value.attinf.forEach((datavalue,index,dataarr) => { @@ -1606,32 +1607,53 @@ getattinf(){ //console.log(this.addAttinfBuild) }) }else if(value.surveyName=='建筑信息'&&value.attinf!=undefined){ - + this.buildnewDate=[] this.addAttinfBuild=value.attinf this.addAttinfBuild=JSON.parse(JSON.stringify(this.addAttinfBuild)) - - value.attinf.forEach((elattinf,fi,farr) => { + 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) => { + //this.addAttinfBuild.push(...buildarr[buildi].propertyInfos) + this.buildnewDate.push(...buildarr[buildi].propertyInfos) + resolve(data) + }); + this.buildnewDate.forEach(element => { + element.completed=false + element.olddata=element.propertyValue + }); + }) + }) + /* value.attinf.forEach((elattinf,fi,farr) => { this.addAttinfBuild.forEach((element,ei,earr) => { if(farr[fi].propertyName==earr[ei].propertyName){ if(farr[fi].completed==true&&earr[ei].completed==false){ farr[fi].completed=earr[ei].completed } - } }); - element.olddata=element.propertyValue - }); + }); */ + let temp=0 + this.buildnewDate=JSON.parse(JSON.stringify(this.buildnewDate)) + this.buildnewDate.forEach((buildval,buindi,buildarr)=>{ + temp=0 + this.addAttinfBuild.forEach((addval,addi,addarr)=>{ + + if(buildval.propertyName==addval.propertyName){ + temp++ + } + }) + if(temp==0){ + console.log(buildval) + this.addAttinfBuild.push(buildval) + } + }) + console.log(this.buildnewDate) console.log(this.addAttinfBuild) - /* let paramsdata:any ={ - categoryId:this.data.newleftTabledata[this.data.leftclicki].basicCategoryId - } - this.http.get("/api/BasicGroups",{params:paramsdata}).subscribe((data:any)=>{ - data.forEach((buildDate,buildi,buildarr) => { - this.addAttinfBuild.push(...buildarr[buildi].propertyInfos) - }); - - }) */ + }else if(value.surveyName=='消防设施'&&value.attinf==undefined){ let paramsdata:any ={ categoryId:this.data.newleftTabledata[this.data.leftclicki].facilityCategoryId From c0e1e9822095907b624c162a19078032138f013c Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Fri, 26 Nov 2021 09:23:37 +0800 Subject: [PATCH 25/26] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E6=B6=88=E9=98=B2?= =?UTF-8?q?=E8=AE=BE=E6=96=BD=E8=B7=9F=E8=87=AA=E5=B7=B1=E7=9A=84=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../create-plan-online-five.component.ts | 13 ++-- src/app/ui/plan-template/Disaster.html | 2 +- .../plan-template.component.html | 4 +- .../plan-template/plan-template.component.ts | 74 +++++++++++++++---- 4 files changed, 69 insertions(+), 24 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 e26f521..01bf697 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 @@ -163,7 +163,7 @@ 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.planLevel=='5'){ + ||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) @@ -235,8 +235,8 @@ export class CreatePlanOnlineFiveComponent implements OnInit { }) this.buData = JSON.parse(JSON.stringify(this.buData)) - //console.log(this.buData) - this.buData.forEach((pvalue, pindex, parr) => { + console.log(this.buData) + this.buData[0].forEach((pvalue, pindex, parr) => { if (parr[pindex].length > 0) { parr[pindex].forEach((nval, nindex, narr) => { this.planTemplateData[index].building[pindex].body[5].attinf[0].body[0].value = nval.name @@ -1440,6 +1440,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { } } } + console.log(this.planTemplateData) //this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]].push() } //单位概况删除一行 @@ -1709,11 +1710,11 @@ 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':'' - let fileData={ + ||this.unitData.buildingTypes[0].name=='会议中心')?4:this.unitData.buildingTypes[0].name=='储罐类'?'StorageTankFivePlan':this.unitData.buildingTypes[0].name=='化工生产'?'hgFivePlan':'' + /* 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){ diff --git a/src/app/ui/plan-template/Disaster.html b/src/app/ui/plan-template/Disaster.html index ba05ce4..1b07d6e 100644 --- a/src/app/ui/plan-template/Disaster.html +++ b/src/app/ui/plan-template/Disaster.html @@ -24,7 +24,7 @@
    - +
    diff --git a/src/app/ui/plan-template/plan-template.component.html b/src/app/ui/plan-template/plan-template.component.html index 8c64a86..813f4ef 100644 --- a/src/app/ui/plan-template/plan-template.component.html +++ b/src/app/ui/plan-template/plan-template.component.html @@ -246,7 +246,7 @@
    - +
    @@ -274,7 +274,7 @@ *ngFor="let itemth of zdy.tableth;let tablethi=index;TrackBy:trackByFn">
    -
    diff --git a/src/app/ui/plan-template/plan-template.component.ts b/src/app/ui/plan-template/plan-template.component.ts index 0e80b77..9d2c261 100644 --- a/src/app/ui/plan-template/plan-template.component.ts +++ b/src/app/ui/plan-template/plan-template.component.ts @@ -1559,6 +1559,7 @@ export class addattinf{ addAttinfBuild=[] buildnewDate=[] addAttinfFile +filenewDate=[] facilityItems ngOnInit(): void{ console.log(this.data) @@ -1616,7 +1617,6 @@ async getattinf(){ let restlt=await new Promise((resolve) => { this.http.get("/api/BasicGroups",{params:paramsdata}).subscribe((data:any)=>{ data.forEach((buildDate,buildi,buildarr) => { - //this.addAttinfBuild.push(...buildarr[buildi].propertyInfos) this.buildnewDate.push(...buildarr[buildi].propertyInfos) resolve(data) }); @@ -1626,22 +1626,11 @@ async getattinf(){ }); }) }) - /* value.attinf.forEach((elattinf,fi,farr) => { - this.addAttinfBuild.forEach((element,ei,earr) => { - if(farr[fi].propertyName==earr[ei].propertyName){ - if(farr[fi].completed==true&&earr[ei].completed==false){ - farr[fi].completed=earr[ei].completed - } - } - }); - element.olddata=element.propertyValue - }); */ - let temp=0 this.buildnewDate=JSON.parse(JSON.stringify(this.buildnewDate)) + let temp=0 this.buildnewDate.forEach((buildval,buindi,buildarr)=>{ temp=0 this.addAttinfBuild.forEach((addval,addi,addarr)=>{ - if(buildval.propertyName==addval.propertyName){ temp++ } @@ -1650,7 +1639,19 @@ async getattinf(){ console.log(buildval) this.addAttinfBuild.push(buildval) } - }) + }) + this.addAttinfBuild.forEach((addval,addi,addarr)=>{ + temp=0 + this.buildnewDate.forEach((buildval,buindi,buildarr)=>{ + if(buildarr[buindi].propertyName==addarr[addi].propertyName){ + temp++ + } + }) + if(temp==0){ + console.log(addarr[addi]) + this.addAttinfBuild.splice(addi,1) + } + }) console.log(this.buildnewDate) console.log(this.addAttinfBuild) @@ -1668,7 +1669,50 @@ async getattinf(){ console.log(this.addAttinfFile) }) }else if(value.surveyName=='消防设施'&&value.attinf!=undefined){ + this.filenewDate=[] this.addAttinfFile=value.attinf + this.addAttinfFile=JSON.parse(JSON.stringify(this.addAttinfFile)) + let paramsdata:any ={ + categoryId:this.data.newleftTabledata[this.data.leftclicki].facilityCategoryId + } + let restlt=await new Promise((resolve) => { + this.http.get("/api/FacilityGroups",{params:paramsdata}).subscribe((data:any)=>{ + data.forEach((buildDate,buildi,buildarr) => { + this.filenewDate.push(buildDate) + resolve(data) + }); + this.filenewDate.forEach(element => { + element.completed=false + element.olddata=element.propertyValue + }); + }) + }) + this.filenewDate=JSON.parse(JSON.stringify(this.filenewDate)) + let temp=0 + this.filenewDate.forEach((buildval,buindi,buildarr)=>{ + temp=0 + this.filenewDate.forEach((addval,addi,addarr)=>{ + if(buildval.propertyName==addval.propertyName){ + temp++ + } + }) + if(temp==0){ + console.log(buildval) + this.filenewDate.push(buildval) + } + }) + this.filenewDate.forEach((addval,addi,addarr)=>{ + temp=0 + this.filenewDate.forEach((buildval,buindi,buildarr)=>{ + if(buildarr[buindi].propertyName==addarr[addi].propertyName){ + temp++ + } + }) + if(temp==0){ + console.log(addarr[addi]) + this.filenewDate.splice(addi,1) + } + }) } }); } @@ -1718,7 +1762,7 @@ export class zdydisaster{ config.duration = 3000 if(this.level==undefined||this.level==''){ this.snackBar.open('请选择类型!','确定',config); - }else if(this.level!=2&&(this.headName==undefined||this.headName=='')){ + }else if((this.level!=2&&this.level!=1)&&(this.headName==undefined||this.headName=='')){ this.snackBar.open('请输入表头名称!','确定',config); }else if(this.level==2&&(this.lieNumber==0||this.lieNumber==undefined) ){ this.snackBar.open('请输入列数!','确定',config); From 2ce1364309f5670a3bccca5c3c535b0a9eeaf17d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Fri, 26 Nov 2021 16:26:35 +0800 Subject: [PATCH 26/26] =?UTF-8?q?[=E4=BF=AE=E6=AD=A3]=20=E5=BD=93=E5=9B=BE?= =?UTF-8?q?=E4=BE=8B=E7=BC=A9=E6=94=BE=E4=B8=BAundefind=E6=97=B6=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E8=AE=BE=E7=BD=AE=E4=B8=BA1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/working-area/model/axLegend.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/working-area/model/axLegend.ts b/src/app/working-area/model/axLegend.ts index fd47146..51efe69 100644 --- a/src/app/working-area/model/axLegend.ts +++ b/src/app/working-area/model/axLegend.ts @@ -24,10 +24,10 @@ export class AxLegend extends AxShape { super(assetData, workingArea); this.angle = -this.workingArea.backgroundImage.angle; this.name = this.assetData.Id; - this.pivot.set(this.assetData.PivotX, this.assetData.PivotY); + this.pivot.set(this.assetData.PivotX == undefined ? 0 : this.assetData.PivotX, this.assetData.PivotY == undefined ? 0 : this.assetData.PivotY); this.x = this.assetData.Point.x; this.y = this.assetData.Point.y; - this.scale.set(this.assetData.Scale); + this.scale.set(this.assetData.Scale == undefined ? 1 : this.assetData.Scale); this.shapeMap = shapeMap; this.createPoint(); this.refresh();