邵佳豪 3 years ago
parent
commit
98d6621799
  1. 2
      src/app/key-unit/key-unit-management/resultcompanyPlan.html
  2. 18
      src/app/pipes/boolean.pipe.ts
  3. 10
      src/app/plan-audit/plan-record/plan-record.component.html
  4. 28
      src/app/plan-audit/plan-record/plan-record.component.ts
  5. 2
      src/app/plan-audit/wait-examineer/wait-examineer.component.html
  6. 7
      src/app/plan-audit/wait-examineer/wait-examineer.component.scss
  7. 16
      src/app/plan-audit/wait-examineer/wait-examineer.component.ts
  8. 354
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html
  9. 165
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss
  10. 504
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts
  11. 34
      src/app/plan-management/create-plan-online-five/updatal.html
  12. 3
      src/app/plan-management/plan-management.module.ts
  13. 153
      src/app/statistic-analysis/combined-query/combined-query.component.html
  14. 265
      src/app/statistic-analysis/combined-query/combined-query.component.scss
  15. 25
      src/app/statistic-analysis/combined-query/combined-query.component.spec.ts
  16. 567
      src/app/statistic-analysis/combined-query/combined-query.component.ts
  17. 4
      src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.html
  18. 4
      src/app/statistic-analysis/statistic-analysis-routing.module.ts
  19. 5
      src/app/statistic-analysis/statistic-analysis.module.ts
  20. 4
      src/app/ui/plan-template/Disaster.html
  21. 120
      src/app/ui/plan-template/plan-template.component.html
  22. 44
      src/app/ui/plan-template/plan-template.component.scss
  23. 831
      src/app/ui/plan-template/plan-template.component.ts
  24. 34
      src/app/ui/plan-template/updatal.html
  25. 17
      src/app/ui/plan-template/zdyaddgroup.html
  26. 6
      src/app/ui/ui.module.ts
  27. 4
      src/app/working-area/model/axLegend.ts
  28. 3
      src/app/working-area/working-area.component.ts
  29. BIN
      src/assets/images/addyello.png
  30. BIN
      src/assets/images/delyello.png
  31. BIN
      src/assets/images/downyello.png
  32. BIN
      src/assets/images/uoyello.png
  33. BIN
      src/assets/images/updatabai.png
  34. BIN
      src/assets/images/updateyello.png

2
src/app/key-unit/key-unit-management/resultcompanyPlan.html

@ -11,7 +11,7 @@
</div>
<div class="auditDiv">
<p>预案名称:{{planName}}</p>
<p>单位名称:{{planName}}</p>
<p>提交时间:{{createTime| date:'yyyy-MM-dd HH:mm:ss'||''}}</p>
<p>发起申请:{{organizationName ||''}}</p>
<mat-divider></mat-divider>

18
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 '文本预案'
}
}
}

10
src/app/plan-audit/plan-record/plan-record.component.html

@ -186,12 +186,12 @@
</mat-tab-group>
</div>
<div class="word" *ngIf="showtype==0||bianzhi">
<!-- <div class="shadow" *ngIf="!iftrue">
<div class="word" *ngIf="showtype==0">
<div class="shadow" *ngIf="!iftrue">
<mat-spinner></mat-spinner>
</div> -->
<button mat-raised-button color="primary" style="float: right;margin-top: 10px;margin-right: 15px;" (click)='lookNew()'>查看详情</button>
<iframe [src]='iframeSrc'></iframe>
</div>
<button mat-raised-button color="primary" style="float: right;margin-top: 10px;margin-right: 15px;" *ngIf="showtype == 0||bianzhi" (click)='lookNew()'>查看详情</button>
<iframe [src]='iframeSrc' (load)='ifranmeLoad()' id="myiframe"></iframe>
</div>
<div id="viewer" *ngIf="showtype==1"></div>
<div class="twoD" *ngIf="showtype==2">

28
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) || [],
@ -185,13 +184,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 +213,8 @@ export class PlanRecordComponent implements OnInit {
} else {
this.lookWord()
}
}
} else {
this.organizationName = item.organizationName
this.planData = data
@ -221,7 +225,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 +252,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 +275,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) {

2
src/app/plan-audit/wait-examineer/wait-examineer.component.html

@ -57,7 +57,7 @@
</form>
<div class="tablediv">
<table cellspacing="0" cellpadding="0" style="margin-top: 10px;">
<table cellspacing="0" cellpadding="0" style="margin-top: 10px;margin-bottom: 5px;">
<thead>
<th style="width: 15%;">类型</th>
<th style="width: 10%;">预案类型</th>

7
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;

16
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) {
@ -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() {

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

@ -11,6 +11,10 @@
</div>
</div>
<div class="btnbox">
<button mat-stroked-button *ngIf="zaixianDr" (click)='upload()'>
<mat-icon>cloud_upload</mat-icon> 导入
</button>
<input type="file" style="display: none;" id="up" accept=".docx" (change)='fileSc($event)'>
<button mat-stroked-button (click)="preview()">
<mat-icon>visibility</mat-icon> 预览
</button>
@ -23,7 +27,9 @@
<mat-icon>visibility</mat-icon> 退出预览
</button>
<div class="contentbox" [ngClass]="{'noPadding': pattern == 'look'}">
<div class="shadow" *ngIf="iftrue">
<mat-spinner></mat-spinner>
</div>
<div class="leftbox"
*ngIf="pattern == 'edit' && (selectedItem == '重点图示' || selectedItem == '交通水源' || selectedItem == '预案附件' || selectedItem == '单位概况')||(selectedItem!='灾情设定'&&selectedItem!='力量调集'&&selectedItem!='组织指挥'&&selectedItem!='作战行动'&&selectedItem!='社会联动'&&selectedItem!='勤务保障'&&selectedItem!='特别警示'&&selectedItem!='辅助决策'&&selectedItem!='处置要点'&&tuTrue)">
<div *ngIf="selectedItem == '重点图示'||(selectedItem!='灾情设定'&&selectedItem!='力量调集'&&selectedItem!='组织指挥'&&selectedItem!='作战行动'&&selectedItem!='社会联动'&&selectedItem!='勤务保障'&&selectedItem!='特别警示'&&selectedItem!='辅助决策'&&selectedItem!='处置要点'&&tuTrue)" class="leftKeyImg">
@ -258,8 +264,8 @@
</div>
</div>
<div class="mainbox" id="mainbox">
<div class="mainbox" id="mainbox" *ngIf="!iftrue">
<!-- 模板页面 -->
<div *ngFor="let item of planTemplateData;let key = index">
<div *ngIf="(selectedItem == item.groupName || pattern == 'look')&&item.groupName!='新建'">
@ -428,12 +434,11 @@
</div>
</div>
<div class="centerBox"
*ngIf="item.groupName!='单位概况'&&item.groupName!='交通水源'&&item.groupName!='重点图示'&&item.groupName!='预案附件'&&item.groupName!='特别警示'&&item.groupName!='处置要点'&&item.groupName!='封面'&&item.new==undefined">
<div class="titleItem" style="width: 100%;
background-color: #2196F3;
text-align: center;
color: white;">
<span>{{item.groupName}}</span>
*ngIf="item.groupName!='单位概况'&&item.groupName!='交通水源'&&item.groupName!='重点图示'&&item.groupName!='预案附件'&&item.groupName!='封面'">
<div class="titleItem">
<span *ngIf="item.new==undefined">{{item.groupName}}</span>
<input type="text" placeholder="请输入内容" [(ngModel)]="item.headName" *ngIf="item.new!=undefined">
<img src="../../../assets/images/add.png" (click)='addAttribute(item.groupName)' *ngIf="pattern == 'edit'&&item.new!=undefined">
</div>
<div class="boxBody" *ngFor="let element of item.attribute;let i=index" style="height: 100%;
@ -441,18 +446,19 @@
display: flex;
flex-direction: column;">
<div class="boxBodyHead" style="width: 100%;
height: 40pt;
height: 40px;
background-color: #FFFBE8;
text-align: center;">
<span style="font-size: 16px;
text-align: center;
height: 40pt;
line-height: 40pt;
height: 40px;
line-height: 40px;
color: #b99a00;">{{element.headName}}</span>
<img src="../../../assets/images/deleteblue.png" *ngIf="element.level==1&&pattern == 'edit'"
(click)='delTd(key,i)'>
<img src="../../../assets/images/add.png" *ngIf="element.level==1&&pattern == 'edit'"
(click)='addTd(key,i)'>
<img src="../../../assets/images/delyello.png" *ngIf="pattern == 'edit'" (click)='delTd(key,i)'>
<img src="../../../assets/images/downyello.png" *ngIf="item.new!=undefined&&i<item.attribute.length-1" (click)='downPai(key,i)'>
<img src="../../../assets/images/uoyello.png" *ngIf="item.new!=undefined&&i>0" (click)='upPai(key,i)'>
<img src="../../../assets/images/updateyello.png" *ngIf="(element.level==1||element.level==2)&&pattern == 'edit'" (click)='updataHl(key,i)'>
<img src="../../../assets/images/addyello.png" *ngIf="element.level==1&&pattern == 'edit'" (click)='addTd(key,i)'>
</div>
<div class="body">
<!--表格类型-->
@ -476,14 +482,16 @@
</th>
</thead>
<tbody *ngIf="pattern == 'edit'">
<tr *ngFor="let itemtr of element.tabletr">
<tr *ngFor="let itemtr of element.tabletr;let tri=index">
<td
*ngFor="let itemtd of itemtr.tabletd;let tabletdi=index;TrackBy:trackByFn">
<input type="text" placeholder="请输入"
[(ngModel)]="itemtr.tabletd[tabletdi]">
</td>
<img src="../../../assets/images/deletered.png" (click)='delTd(key,i,tri)'>
</tr>
</tbody>
<tbody *ngIf="pattern == 'look'">
<tr *ngFor="let itemtr of element.tabletr">
@ -561,7 +569,7 @@
</div>
</div>
</div>
<div class="centerBox" *ngIf="item.new!=undefined">
<!-- <div class="centerBox" *ngIf="item.new!=undefined">
<div class="titleItem" >
<input type="text" placeholder="请输入内容" [(ngModel)]="item.headName">
<img src="../../../assets/images/add.png" (click)='addAttribute(item.groupName,key)' *ngIf="pattern == 'edit'">
@ -570,13 +578,13 @@
<div class="attackLeft" [style.width]="pattern == 'edit'?'70%':'100%'">
<div class="attackleftHead">
<input type="text" placeholder="请输入内容" [(ngModel)]="element.headName">
<img src="../../../assets/images/deleteblue.png" *ngIf="element.level==1&&pattern == 'edit'"
<img src="../../../assets/images/delyello.png" *ngIf="element.level==1&&pattern == 'edit'"
(click)='delTd(key,attributei)'>
<img src="../../../assets/images/add.png" *ngIf="element.level==1&&pattern == 'edit'"
<img src="../../../assets/images/addyello.png" *ngIf="element.level==1&&pattern == 'edit'"
(click)='addTd(key,attributei)' style="margin-left: 6px;">
</div>
<div class="attackleftTable">
<!--表格类型-->
<table *ngIf="element.level==1">
<thead>
<th *ngFor="let itemth of element.tableth;let tablethi=index;TrackBy:trackByFn"><input type="text"
@ -593,9 +601,9 @@
</tr>
</tbody>
</table>
<!--文本区域-->
<textarea *ngIf="element.level==3" [(ngModel)]="element.tableth"></textarea>
<!--输入框-->
<div class="inputtext" *ngIf="element.level==2">
<div class="inputj" style="height: 100%;width: 100%;"
*ngFor="let itemth of element.tableth;let tablethi=index;TrackBy:trackByFn">
@ -607,7 +615,7 @@
</div>
</div>
</div>
<!--图片-->
<div style="height: 100%;width: 100%;" *ngIf="element.level==4">
<div class="keyImg">
<div style="border: 1px solid #e8e9e9;width: 100%;" class="keyImgItem">
@ -649,15 +657,15 @@
</div>
</div>
</div>
</div> -->
<div class="keyImg"
*ngIf="item.groupName == '重点图示' || item.groupName == '交通水源' || item.groupName == '预案附件'">
<div class="titleItem" style="width: 100%;
<!-- <div class="titleItem" style="width: 100%;
background-color: #2196F3;
text-align: center;
color: white;">
<span>{{item.groupName}}</span>
</div>
</div> -->
<div style="border: 1px solid #e8e9e9;width: 100%;" class="keyImgItem"
*ngFor="let i of item.attribute;let key = index">
<div class="keyImgTitle" style="height: 30px;
@ -701,79 +709,7 @@
</button>
</div>
</div>
<div class="disposalPoint" *ngIf="item.groupName == '处置要点'">
<div class="titleItem" style="width: 100%;
background-color: #2196F3;
text-align: center;
color: white;">
<span>{{item.groupName}}</span>
</div>
<div class="disposalPointItem" *ngFor="let i of item.attribute;let key = index">
<div class="disposalPointTitle">
<input *ngIf="pattern == 'edit'" type="text" placeholder="请输入分组名称" [(ngModel)]="i.name">
<div *ngIf="pattern == 'look'" style="
width: 100%;
height: 30px;
background: #e8f4fe;
color: #2196f3;
border: 0;
box-sizing: border-box;
padding: 0 5px;"> {{ i.name }} </div>
<mat-icon class="deleteItem" *ngIf="key != 0 && pattern == 'edit'" (click)="deleteItem(item,key)">delete
</mat-icon>
</div>
<div class="disposalPointTextarea">
<textarea *ngIf="pattern == 'edit'" [(ngModel)]="i.cantent" style="resize: none;"
placeholder="请填写自定义内容" name="" id="" cols="30" rows="10"></textarea>
<div style="width: 100%;height: auto;vertical-align: top;
box-sizing: border-box;
padding: 5px;" *ngIf="pattern == 'look'">
{{i.cantent}}
</div>
</div>
</div>
<!-- 增加分组 -->
<div class="addDisposalPointItem" *ngIf="pattern == 'edit'">
<button mat-flat-button color="primary" (click)="addDisposalPointItem(item)">
增加分组
</button>
</div>
</div>
<div class="disposalPoint" *ngIf="item.groupName == '特别警示'">
<div class="titleItem" style="width: 100%;
background-color: #2196F3;
text-align: center;
color: white;">
<span>{{item.groupName}}</span>
</div>
<div class="disposalPointItem" *ngFor="let i of item.attribute;let key = index">
<div class="disposalPointTitle">
<input *ngIf="pattern == 'edit'" type="text" placeholder="请输入分组名称" [(ngModel)]="i.name">
<div *ngIf="pattern == 'look'" style="
width: 100%;
height: 30px;
background: #e8f4fe;
color: #2196f3;
border: 0;
box-sizing: border-box;
padding: 0 5px;"> {{ i.name }} </div>
</div>
<div class="disposalPointTextarea">
<textarea *ngIf="pattern == 'edit'" [(ngModel)]="i.cantent" style="resize: none;"
placeholder="请填写自定义内容" name="" id="" cols="30" rows="10"></textarea>
<div style="width: 100%;height: auto;vertical-align: top;
box-sizing: border-box;
padding: 5px;" *ngIf="pattern == 'look'">
{{i.cantent}}
</div>
</div>
</div>
</div>
<div class="unit" *ngIf="item.groupName == '单位概况'" style="width: 100%;
height: 100%;
display: flex;
flex-direction: column;
overflow-y: auto;">
<div class="unit" *ngIf="item.groupName == '单位概况'">
<div *ngFor="let itemunit of item.building;let uniti=index"> <!-- style="border-bottom: 3px solid #999;" -->
<div *ngIf="itemunit.completed">
<div class="unithead" style=" height: 40px;
@ -802,8 +738,7 @@
color: #ffffff;">{{element.surveyName}}</span>
<!-- <img src="../../../assets/images/deletered.png" > -->
<img src="../../../assets/images/addbai.png"
(click)='unitadd(element.surveyName,uniti,1)'
*ngIf="pattern == 'edit'&&(element.surveyName=='功能分区'||element.surveyName=='重点部位')">
(click)='unitadd(element.surveyName,uniti,elei)' *ngIf="pattern == 'edit'&&element.surveyName!='进攻通道'">
</div>
<div class="body">
<!-- 进攻通道 -->
@ -868,39 +803,15 @@
</div>
<!-- 单位和建筑信息 -->
<div class="building" *ngIf="element.surveyName=='单位基本信息'">
<div *ngFor="let info of element.attinf">
<div class="building" *ngIf="element.surveyName=='单位基本信息'||element.surveyName=='建筑信息'">
<div *ngFor="let info of element.attinf;let infoi=index">
<div *ngIf="info.completed" class="onetext">
<input type="text" placeholder="请输入内容" style="width: 30%;background-color: #e8e9e9;text-align: center;" [(ngModel)]="info.propertyName" readonly *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #FFFFFF;" [(ngModel)]="info.value" *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 30%;background-color: #F9F9F9;text-align: center;" [(ngModel)]="info.propertyName" *ngIf="pattern == 'edit'" [readonly]='info.zdy==undefined'>
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #FFFFFF;" [(ngModel)]="info.propertyValue" *ngIf="pattern == 'edit'">
<!-- <input type="text" style="width: 30%;background-color: #FFFFFF;color: #999;" [(ngModel)]="info.olddata" *ngIf="pattern == 'edit'&&oldData" readonly> -->
<!-- <span style="width: 30%;background-color: #FFFFFF;color: #999;" *ngIf="pattern == 'edit'&&oldData">{{info.olddata||'无原数据'}}</span> -->
<input type="text" style="width: 30%;background-color: #FFFFFF;color: #999;" *ngIf="pattern == 'edit'&&oldData" readonly [value]="info.olddata||'无原数据'">
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;">
<tr>
<th style="border: 1px solid #999;
height: 40px;
width: 40%;
font-size: 16px;
text-align: center;">{{info.propertyName}}</th>
<td style="border: 1px solid #999;
height: 40px;
width: 60%;
font-size: 16px;
text-align: center;">{{info.value}}</td>
</tr>
</table>
</div>
</div>
</div>
<div class="building" *ngIf="element.surveyName=='建筑信息'">
<div *ngFor="let info of element.attinf">
<div *ngIf="info.completed" class="onetext">
<input type="text" placeholder="请输入内容" style="width: 30%;background-color: #e8e9e9;text-align: center;" [(ngModel)]="info.propertyName" readonly *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #FFFFFF;" [(ngModel)]="info.propertyValue" *ngIf="pattern == 'edit'">
<!-- <input type="text" style="width: 30%;background-color: #FFFFFF;color: #999;" [(ngModel)]="info.olddata" *ngIf="pattern == 'edit'&&oldData" readonly> -->
<!-- <span style="width: 30%;background-color: #FFFFFF;color: #999;" *ngIf="pattern == 'edit'&&oldData">{{info.olddata||'无原数据'}}</span> -->
<input type="text" style="width: 30%;background-color: #FFFFFF;color: #999;" *ngIf="pattern == 'edit'&&oldData" readonly [value]="info.olddata||'无原数据'">
<input type="text" style="width: 27%;background-color: #FFFFFF;color: #999;" *ngIf="pattern == 'edit'&&oldData" [value]="info.olddata||'无原数据'" readonly>
<img style="float: right;" src="../../../assets/images/deletered.png" *ngIf="pattern == 'edit'&&info.zdy" (click)='unitDel(element.surveyName,uniti,infoi)'>
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;">
<tr>
<th style="border: 1px solid #999;
@ -914,8 +825,9 @@
font-size: 16px;
text-align: center;">{{info.propertyValue}}</td>
</tr>
</table>
</table>
</div>
</div>
</div>
<!-- 消防设施 -->
@ -926,17 +838,19 @@
width: 100%;
background-color: #FFFBE8;
text-align: center;">
<span style="font-size: 16px;
text-align: center;
height: 40px;
line-height: 40px;
color: #b99a00;">{{attack.name}}</span>
<input type="text" placeholder="请输入内容" [(ngModel)]="attack.name" [readonly]='attack.zdy==undefined'>
<img src="../../../assets/images/delyello.png" *ngIf="pattern == 'edit'&&attack.zdy!=undefined"
(click)='unitDel(element.surveyName,uniti,attacki)'>
<img src="../../../assets/images/addyello.png"
*ngIf="pattern == 'edit'&&attack.zdy!=undefined"
(click)='unitadd(element.surveyName,uniti,attacki,0)'>
</div>
<div class="fileBody">
<div *ngFor="let info of attack.facilityItems">
<div *ngFor="let info of attack.facilityItems;let filenum=index">
<div *ngIf="info.completed" class="onetext">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #e8e9e9;text-align: center;" [(ngModel)]="info.name" readonly *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 60%;background-color: #FFFFFF;" [(ngModel)]="info.value" *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #F9F9F9;text-align: center;" [(ngModel)]="info.name" *ngIf="pattern == 'edit'" [readonly]='info.zdy==undefined'>
<input type="text" placeholder="请输入内容" style="width: 57%;background-color: #FFFFFF;" [(ngModel)]="info.value" *ngIf="pattern == 'edit'">
<img src="../../../assets/images/deletered.png" *ngIf="pattern == 'edit'&&info.zdy" (click)='unitDel(element.surveyName,uniti,attacki,filenum)'>
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;">
<tr>
<th style="border: 1px solid #999;
@ -950,7 +864,7 @@
font-size: 16px;
text-align: center;">{{info.value}}</td>
</tr>
</table>
</table>
</div>
</div>
</div>
@ -961,9 +875,10 @@
</div>
<!-- 四周毗邻 -->
<div class="fouradj" *ngIf="element.surveyName=='四周毗邻'">
<div class="fourTexttwo" *ngFor="let info of element.attinf">
<input type="text" placeholder="请输入内容" style="width: 30%;background-color: #e8e9e9;text-align: center;" [(ngModel)]="info.name" readonly *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 70%;background-color: #FFFFFF;" [(ngModel)]="info.value" *ngIf="pattern == 'edit'">
<div class="fourTexttwo" *ngFor="let info of element.attinf;let infoi=index">
<input type="text" placeholder="请输入内容" style="width: 30%;background-color: #F9F9F9;text-align: center;" [(ngModel)]="info.name" *ngIf="pattern == 'edit'" [readonly]='info.zdy==undefined'>
<input type="text" placeholder="请输入内容" style="width: 65%;background-color: #FFFFFF;" [(ngModel)]="info.value" *ngIf="pattern == 'edit'">
<img style="position: relative;bottom: 30px;left: 347px;" src="../../../assets/images/deletered.png" (click)='unitDel(element.surveyName,uniti,infoi)' *ngIf="pattern == 'edit'&&info.zdy">
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;">
<tr>
<th style="border: 1px solid #999;
@ -977,13 +892,13 @@
font-size: 16px;
text-align: center;">{{info.value}}</td>
</tr>
</table>
</table>
</div>
</div>
<!-- 功能分区 -->
<div class="fouradj" *ngIf="element.surveyName=='功能分区'">
<div class="onetext" *ngFor="let info of element.attinf;let infoi=index">
<input type="text" placeholder="请输入内容" style="width: 30%;background-color: #e8e9e9;text-align: center;" [(ngModel)]="info.name" *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 30%;background-color: #F9F9F9;text-align: center;" [(ngModel)]="info.name" *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 67%;background-color: #FFFFFF;" [(ngModel)]="info.value" *ngIf="pattern == 'edit'">
<img src="../../../assets/images/deletered.png" (click)='unitDel(element.surveyName,uniti,infoi)' *ngIf="pattern == 'edit'">
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;">
@ -999,7 +914,7 @@
font-size: 16px;
text-align: center;">{{info.value}}</td>
</tr>
</table>
</table>
</div>
</div>
<!-- 重点部位 -->
@ -1021,7 +936,7 @@
<div class="partsBody">
<div class="duohang">
<div class="duohangHalf">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #e8e9e9;text-align: center;" [(ngModel)]="parts.body[0].name" *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #F9F9F9;text-align: center;" [(ngModel)]="parts.body[0].name" *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 60%;background-color: #FFFFFF;" [(ngModel)]="parts.body[0].value" *ngIf="pattern == 'edit'">
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;">
<tr>
@ -1041,7 +956,7 @@
</table>
</div>
<div class="duohangHalf">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #e8e9e9;text-align: center;"[(ngModel)]="parts.body[1].name" *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #F9F9F9;text-align: center;"[(ngModel)]="parts.body[1].name" *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 60%;background-color: #FFFFFF;" [(ngModel)]="parts.body[1].value" *ngIf="pattern == 'edit'">
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;">
<tr>
@ -1066,7 +981,7 @@
</div>
<div class="duohang">
<div class="duohangHalf">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #e8e9e9;text-align: center;" [(ngModel)]="parts.body[2].name" *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #F9F9F9;text-align: center;" [(ngModel)]="parts.body[2].name" *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 60%;background-color: #FFFFFF;" [(ngModel)]="parts.body[2].value" *ngIf="pattern == 'edit'">
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;">
<tr>
@ -1088,7 +1003,7 @@
</table>
</div>
<div class="duohangHalf">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #e8e9e9;text-align: center;" [(ngModel)]="parts.body[3].name" *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #F9F9F9;text-align: center;" [(ngModel)]="parts.body[3].name" *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 60%;background-color: #FFFFFF;" [(ngModel)]="parts.body[3].value" *ngIf="pattern == 'edit'">
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;">
<tr>
@ -1111,7 +1026,7 @@
</div>
</div>
<div class="danhang">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #e8e9e9;text-align: center;" [(ngModel)]="parts.body[4].name" *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #F9F9F9;text-align: center;" [(ngModel)]="parts.body[4].name" *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 60%;background-color: #FFFFFF;" [(ngModel)]="parts.body[4].value" *ngIf="pattern == 'edit'">
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;">
<tr>
@ -1136,6 +1051,139 @@
</div>
</div>
<!--自定义新增-->
<div class="centerBox"
*ngIf="element.surveyName!='单位基本信息'&&element.surveyName!='建筑信息'&&element.surveyName!='四周毗邻'&&element.surveyName!='消防设施'&&element.surveyName!='进攻通道'&&element.surveyName!='重点部位'&&element.surveyName!='功能分区'">
<div class="boxBody" *ngFor="let element of element.attinf;let i=index" style="height: 100%;
width: 100%;
display: flex;
flex-direction: column;">
<div class="boxBodyHead" style="width: 100%;
height: 40px;
background-color: #FFFBE8;
text-align: center;">
<span style="font-size: 16px;
text-align: center;
height: 40px;
line-height: 40px;
color: #b99a00;">{{element.headName}}</span>
<img src="../../../assets/images/delyello.png" *ngIf="pattern == 'edit'"
(click)='delTd(key,i)'>
<img src="../../../assets/images/updateyello.png" *ngIf="(element.level==1||element.level==2)&&pattern == 'edit'"
(click)='updataHl(key,uniti,elei,i)'>
<img src="../../../assets/images/addyello.png" *ngIf="element.level==1&&pattern == 'edit'"
(click)='unitNewadd(key,uniti,elei,i)'>
</div>
<div class="body">
<!--表格类型-->
<table *ngIf="element.level==1" style="width: 100%;border-collapse: collapse;">
<thead *ngIf="pattern == 'edit'">
<th *ngFor="let itemth of element.tableth;let tablethi=index;TrackBy:trackByFn" style="border: 1px solid #999;
height: 40px;
font-size: 16px;
text-align: center;">
<input type="text" placeholder="请输入内容"
[(ngModel)]="element.tableth[tablethi]" >
</th>
</thead>
<thead *ngIf="pattern == 'look'">
<th *ngFor="let itemth of element.tableth;let tablethi=index;TrackBy:trackByFn" style="border: 1px solid #999;
height: 40px;
font-size: 16px;
text-align: center;" >
{{element.tableth[tablethi]}}
<!-- <textarea [value]="element.tableth[tablethi]" disabled style="width: 100%;height: 100%;"></textarea> -->
</th>
</thead>
<tbody *ngIf="pattern == 'edit'">
<tr *ngFor="let itemtr of element.tabletr;let tri=index">
<td
*ngFor="let itemtd of itemtr.tabletd;let tabletdi=index;TrackBy:trackByFn">
<input type="text" placeholder="请输入"
[(ngModel)]="itemtr.tabletd[tabletdi]">
</td>
<img src="../../../assets/images/deletered.png" (click)='delTd(key,uniti,elei,i,tri)'>
</tr>
</tbody>
<tbody *ngIf="pattern == 'look'">
<tr *ngFor="let itemtr of element.tabletr">
<td *ngFor="let itemtd of itemtr.tabletd;let tabletdi=index;TrackBy:trackByFn" style="border: 1px solid #999;
height: 40px;
font-size: 16px;
text-align: center;">
{{itemtr.tabletd[tabletdi]}}
</td>
</tr>
</tbody>
</table>
<!--文本区域-->
<textarea style="width: 99%;height: 100px;" *ngIf="element.level==3&&pattern == 'edit'"
[(ngModel)]="element.tableth"></textarea>
<div style="height: 100px;width: 98%; border: 1px solid #000000;" *ngIf="element.level==3&&pattern == 'look'">{{element.tableth||''}}</div>
<!--输入框-->
<div class="inputtext" *ngIf="element.level==2">
<div class="inputj" style="height: 100%;width: 100%;"
*ngFor="let itemth of element.tableth;let tablethi=index;TrackBy:trackByFn">
<div style="height: 100%;width: 100%;"
*ngFor="let itemthj of element.tableth[tablethi];let tablethj=index;TrackBy:trackByFn">
<input type="text" placeholder="请输入内容"
style="background-color: #E8E9E9;width: 25%;text-align: center;"
[(ngModel)]="itemthj.head" *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 75%;"
[(ngModel)]="itemthj.body" *ngIf="pattern == 'edit'">
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;">
<tr>
<th style="border: 1px solid #999;
height: 40px;
font-size: 16px;
text-align: center; white-space:pre-wrap; width: 185px;">
{{itemthj.head}}
</th>
<td style="border: 1px solid #999;
height: 40px;
font-size: 16px;
text-align: center;white-space:pre-wrap;width: 185px;">
{{itemthj.body}}
</td>
</tr>
</table>
</div>
</div>
</div>
<!--树形图-->
<!-- <div style="height: 300px;width: 100%;" *ngIf="element.level==4">
<tree-diagram [data]="element.tableth"></tree-diagram>
</div> -->
<div class="keyImg" *ngIf="element.level==4">
<div class="keyImgImg">
<div style="margin-top: 10px;
text-align: center;
position: relative;" class="imgbox" *ngFor="let imgUrl of element.tableth.json;let imgkey = index">
<mat-icon *ngIf="pattern == 'edit'" class="deleteImg"
(click)="deleteImgItem(element.tableth.json,imgkey)">delete
</mat-icon>
<img style="max-width: 100%;
width: auto;
height: auto;" [src]="imgUrl" alt="">
</div>
<div class="uploadBtn" *ngIf="pattern == 'edit'&&element.tableth.json.length<=0">
<button mat-stroked-button>
<mat-icon>add</mat-icon>上传图片
</button>
<input (change)="filechange($event,element)" type="file" name="" id="">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

165
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 */
}
@ -58,6 +86,11 @@
position: absolute;
right: 24px;
top: 7px;
input {
width: 100%;
height: 22px;
line-height: 22px;
border-radius: 3px;}
button {
margin-left: 10px;
mat-icon {
@ -74,6 +107,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%;
@ -238,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{
@ -396,6 +441,7 @@
min-height: 97%;
box-sizing: border-box;
padding: 10px 10px 0;
.cover {
width: 100%;
min-height: 780px;
@ -477,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%;
@ -497,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;
@ -713,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%;
@ -728,6 +770,8 @@
.attack {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
.attackhead {
width: 100%;
height: 40px;
@ -740,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%;
@ -799,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;
@ -818,23 +861,23 @@
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{
width: 100%;
height: 100%;
.fileHead{
height: 40px;
height: 42px;
width: 100%;
background-color: #FFFBE8;
text-align: center;
span {
font-size: 16px;
text-align: center;
@ -842,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%;
@ -875,16 +928,21 @@
}
}
.fourTexttwo{
height: 40px;
height: 42px;
width: 50%;
border-bottom: 1px solid #F2F4F5;
border-bottom: 1px solid #E8E9E9;
input{
height: 40px;
//width: 60%;
font-size: 16px;
border: none;
outline: none;
}
img{
height: 20px;
width: 20px;
position: relative;
//top: 12px;
}
}
}
@ -906,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%;
@ -922,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%;
@ -1007,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;
@ -1026,6 +1078,9 @@
top: 4px;
cursor: pointer;
}
span{
margin-left: 20px;
}
}
.attack {
width: 100%;
@ -1211,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%;
@ -1231,6 +1279,7 @@
width: 100%;
border-collapse: collapse;
//background-color: #E8E9E9;
}
th {
//background-color: #E8E9E9;
@ -1242,7 +1291,7 @@
background-color: #e8e9e9;
text-align: center;
height: 100%;
width: 100%;
width: 95%;
font-size: 16px;
border: none;
outline: none;

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

@ -56,11 +56,13 @@ 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') {
this.pattern = 'look'
this.blockyl = false
this.clickTitleItem('单位概况')
} else {
this.pattern = 'edit'
}
@ -157,6 +159,13 @@ 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.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)
this.getTemplateData()
}
@ -227,7 +236,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
})
this.buData = JSON.parse(JSON.stringify(this.buData))
console.log(this.buData)
this.buData.forEach((pvalue, pindex, parr) => {
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
@ -245,6 +254,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
selectedContent:any
async clickTitleItem(item) {
//this.planTemplateData[key].new=true
this.selectedContent = item
this.addNumber = -1
this.yinruData = {
@ -343,7 +353,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,14 +371,14 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
});
});
}
}
});
// console.log(this.planTemplateData)
} /* else if (this.selectedItem == '单位概况') {
//this.getAllBuildings()
} */ else if (this.selectedItem == '') {
console.log(this.planTemplateData)
} else if (this.selectedItem == '预案附件') {
this.getTwoDPlanList()
}else if(this.selectedItem == '新建'){
const dialogRef = this.dialog.open(newTitle, {//调用open方法打开对话框并且携带参数过去
@ -385,7 +396,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)
});
}
}
@ -413,7 +424,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
drop(event: CdkDragDrop<string[]>) {
moveItemInArray(this.planTemplateData, event.previousIndex, event.currentIndex);
console.log('拖拽标题', this.planTemplateData)
//console.log('拖拽标题', this.planTemplateData)
}
//获取建筑信息
@ -599,11 +610,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<element.attribute.length;i++){
if(element.attribute[i].level!=undefined&&element.attribute[i].level==1){
element.attribute[i].lieNumber=element.attribute[i].tableth.length
}
}
}
});
console.log(this.planTemplateData)
})
@ -1110,7 +1137,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
})
}
console.log(this.planTemplateData)
//console.log(this.planTemplateData)
}
//单位相关数据
unitId: any = this.route.snapshot.queryParams.companyId
@ -1185,15 +1212,22 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
trackByFn(index) {
return index
}
//灾情设定表格增加一行
//四种类型增加一行
addNumber = -1
addTd(key, i) {
this.addNumber++
if (this.planTemplateData[key].attribute[i].tabletr == undefined) {
this.planTemplateData[key].attribute[i].tabletr = []
}
this.planTemplateData[key].attribute[i].tabletr.push({ tabletd: [] })
for (var j = 0; j < this.planTemplateData[key].attribute[i].tableth.length; j++) {
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';
config.duration = 3000
this.snackBar.open('请先编辑列!', '确定', config);
}else{
if(this.planTemplateData[key].attribute[i].tabletr == undefined){
this.planTemplateData[key].attribute[i].tabletr = []
}
this.planTemplateData[key].attribute[i].tabletr.push({ tabletd: [] })
for(var j = 0; j < this.planTemplateData[key].attribute[i].tableth.length; j++) {
if (this.planTemplateData[key].attribute[i].tabletr != undefined) {
this.planTemplateData[key].attribute[i].tabletr[this.planTemplateData[key].attribute[i].tabletr.length - 1].tabletd.push('')
}
@ -1201,23 +1235,127 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
this.planTemplateData[key].attribute[i].tabletr[this.addNumber].tabletd.push('')
}
}
}
// console.log(this.planTemplateData)
}
//灾情设定表格删除一行
delTd(key, i) {
//四种类型删除一行
delTd(key, i,tri?:number,uniti?:number,elei?:number) {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
if (this.planTemplateData[key].attribute[i].tabletr != undefined) {
this.planTemplateData[key].attribute[i].tabletr.splice(this.planTemplateData[key].attribute[i].tabletr.length - 1, 1)
this.addNumber--
if (this.planTemplateData[key].attribute[i].tabletr.length == 0) {
this.addNumber = -1
let isTrue = confirm('您确定要删除该条信息吗')
if(isTrue){
if(tri==undefined){
this.planTemplateData[key].attribute.splice(i,1)
}else{
if(uniti==undefined&&elei==undefined){
this.planTemplateData[key].attribute[i].tabletr.splice(tri,1)
}else{
this.planTemplateData[key].building[i].body[tri].attinf[uniti].tabletr.splice(elei,1)
}
}
} else {
this.snackBar.open('请先增加一行!', '确定', config);
}
}
//修改多行文本,表格行列数量
updataHl(...num:number[]){
const dialogRef = this.dialog.open(updataHl, {//调用open方法打开对话框并且携带参数过去
width: '340px',
height:'350px',
disableClose:true,
data:JSON.parse(JSON.stringify(num.length<3? this.planTemplateData[num[0]].attribute[num[1]]:this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]]))
});
dialogRef.afterClosed().subscribe(result => {
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<result.lieNumber){
//表格类型新增列数
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.push('')
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.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.length<result.hNumber){
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.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.push([{body: '', head: ''}])
}
}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.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].length<result.lieNumber){
for(let a=value[index].length;a<result.lieNumber;a++){
value[index].push({body: '', head: ''})
}
}else{
for(let a=value[index].length;a>result.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
@ -1229,61 +1367,119 @@ 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){
console.log(bodyi)
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[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';
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: '' }] })
}
console.log(this.planTemplateData)
//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)
}
}
});
}
//分段上传
@ -1333,6 +1529,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
pattern: string = 'edit'
preview() {
this.pattern = 'look'
this.clickTitleItem('单位概况')
}
quitPreview() {
this.pattern = 'edit'
@ -1395,13 +1592,13 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
oldData = false
clickoldData() {
this.oldData = !this.oldData
}
//新增功能(社会联动等引用)
searchType = '0'
//打开自定义新增具体内容
tuTrue=false
addAttribute(groupName,key){
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',
height:'450px',
@ -1409,26 +1606,38 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
data:this.planTemplateData
});
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<result.hNumber;i++){
array[index].attribute[array[index].attribute.length-1].tableth.push([{head:'',body:''}])
for(var j=0;j<result.lieNumber-1;j++){
if(surveyName==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(let i=0;i<result.hNumber;i++){
array[index].attribute[array[index].attribute.length-1].tableth.push([{head:'',body:''}])
for(var j=0;j<result.lieNumber-1;j++){
array[index].attribute[array[index].attribute.length-1].tableth[i].push({head:'',body:''})
}
}
}
}
})
}
else{
this.planTemplateData[index].building[attacki].body[bi].attinf.push(result)
if(result.level==2){
for(var i=0;i<result.hNumber;i++){
this.planTemplateData[index].building[attacki].body[bi].attinf[this.planTemplateData[index].building[attacki].body[bi].attinf.length-1].tableth.push([{head:'',body:''}])
for(var j=0;j<result.lieNumber-1;j++){
this.planTemplateData[index].building[attacki].body[bi].attinf[this.planTemplateData[index].building[attacki].body[bi].attinf.length-1].tableth[i].push({head:'',body:''})
}
}
}
})
}
if(result.level=='4'){
this.tuTrue=true
this.getAllBuildings()
@ -1480,6 +1689,105 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
showTu(key){
this.planTemplateData[key].new=true
}
//上传
upload() {
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 type=this.unitData.buildingTypes[0].name=='高层建筑'?1:this.unitData.buildingTypes[0].name=='居民小区'?2:this.unitData.buildingTypes[0].name=='厂房'?3
:(this.unitData.buildingTypes[0].name=='商市场'||this.unitData.buildingTypes[0].name=='医院'||this.unitData.buildingTypes[0].name=='学校'
||this.unitData.buildingTypes[0].name=='宾馆'||this.unitData.buildingTypes[0].name=='娱乐场所'||this.unitData.buildingTypes[0].name=='餐饮业'
||this.unitData.buildingTypes[0].name=='影剧院'||this.unitData.buildingTypes[0].name=='展览建筑'||this.unitData.buildingTypes[0].name=='养老院'
||this.unitData.buildingTypes[0].name=='会议中心')?4:this.unitData.buildingTypes[0].name=='储罐类'?'StorageTankFivePlan':this.unitData.buildingTypes[0].name=='化工生产'?'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){
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=''
})
}
//消防设施新增一条数据
zdyXf(groupName){
const dialogRef = this.dialog.open(disaster, {//调用open方法打开对话框并且携带参数过去
width: '340px',
height:'450px',
disableClose:true,
data:this.planTemplateData
});
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<result.hNumber;i++){
array[index].attribute[array[index].attribute.length-1].tableth.push([{head:'',body:''}])
for(var j=0;j<result.lieNumber-1;j++){
array[index].attribute[array[index].attribute.length-1].tableth[i].push({head:'',body:''})
}
}
}
}
})
if(result.level=='4'){
this.tuTrue=true
this.getAllBuildings()
this.getSitePlan()
this.getRealPicture()
}
}
console.log(this.planTemplateData)
});
}
}
@ -1654,10 +1962,42 @@ export class disaster{
tableth:this.level==1||this.level==2?[]:this.level==3?'':tree,
lieNumber:this.lieNumber,
hNumber:this.hNumber,
imgArr: []
imgArr: [],
zdy:true
}
this.dialogRef.close(attrubute);
}
}
}
//修改表格,都行文本行列
@Component({
selector: 'updataHl',
templateUrl: './updatal.html',
styleUrls: ['./addKeyname.scss']
})
export class updataHl{
constructor(private http: HttpClient,public dialogRef: MatDialogRef<updataHl>,@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);
}
}

34
src/app/plan-management/create-plan-online-five/updatal.html

@ -0,0 +1,34 @@
<div class="box">
<div class="top">
<span style="font-size: 20px;">修改内容</span>
</div>
<div class="queryField">
<label style="margin-right: 10px;">名称:</label>
<!-- <mat-form-field class="example-full-width">
<input matInput placeholder="请输入表头名称" [(ngModel)]="headName" autocomplete="off" readonly>
</mat-form-field> -->
<span>{{headName}}</span>
</div>
<div class="queryField" *ngIf="level==1">
<label style="margin-right: 10px;">列数:</label>
<mat-form-field class="example-full-width">
<input matInput type="number" [(ngModel)]="data.tableth.length" autocomplete="off" required [min]="lieNumber">
</mat-form-field>
</div>
<div class="queryField" *ngIf="level==2">
<label style="margin-right: 10px;">列数:</label>
<mat-form-field class="example-full-width">
<input matInput type="number" [(ngModel)]="data.tableth[0].length" autocomplete="off" required [min]="lieNumber">
</mat-form-field>
</div>
<div class="queryField" *ngIf="level==2">
<label style="margin-right: 10px;">行数:</label>
<mat-form-field class="example-full-width">
<input matInput type="number" [(ngModel)]="data.tableth.length" autocomplete="off" required [min]="hNumber">
</mat-form-field>
</div>
<div class="bottom">
<button mat-raised-button color="primary" (click)='newdisaster()'>确定</button>
<button mat-raised-button style="margin-left: 50px;" (click)='close()'>取消</button>
</div>
</div>

3
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,

153
src/app/statistic-analysis/combined-query/combined-query.component.html

@ -0,0 +1,153 @@
<!-- 报表统计 -->
<div style="height: 100%;overflow: auto;">
<mat-tab-group style="height: 100%;" [selectedIndex]="selected.value" (selectedIndexChange)="selectedIndexChange($event)">
<mat-tab *ngFor="let item of lable" [label]="item">
<ng-template matTabContent>
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm">
<div class="header">
<div class="queryBox">
<div class="queryField ordiv">
<label style="margin-right: 10px;">消防救援站:</label>
<mat-form-field class="example-full-width">
<input readonly matInput placeholder="请选择消防救援站" autocomplete="off" *ngIf="preparelevels==0" [(ngModel)]="js" name="js"
(focus)="openorganizationbox()">
<input readonly matInput placeholder="请选择消防救援站" autocomplete="off" *ngIf="preparelevels==1" [(ngModel)]="yuanjs" name="js"
(focus)="openorganizationbox()">
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" color="primary" *ngIf="preparelevels==0" [(ngModel)]="jscheck" name="jscheck">包含下级</mat-checkbox>
<mat-checkbox style="margin-left: 6px;" color="primary" *ngIf="preparelevels==1" [(ngModel)]="yuanjscheck" name="jscheck">包含下级</mat-checkbox>
<div class="organizationbox" *ngIf="isorganizationbox">
<div (click)="closediv()" class="closediv">
<mat-icon>clear</mat-icon>
</div>
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)='add(node)' class="organizationlist">
<button type="button" mat-icon-button disabled></button>
<li>{{node.name}}</li>
</mat-tree-node>
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)='add(node)'
class="organizationlist">
<button type="button" mat-icon-button matTreeNodeToggle [attr.aria-label]="'toggle ' + node.name">
<mat-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-icon>
</button>
<li>{{node.name}}</li>
</mat-tree-node>
</mat-tree>
</div>
</div>
<div class="queryField" >
<label style="margin-right: 10px;">时间查询:</label>
<mat-form-field class="example-full-width">
<input type="date" matInput name="addtime" autocomplete="off" [(ngModel)]="dwaddtime" *ngIf="preparelevels==0">
<input type="date" matInput name="addtime" autocomplete="off" [(ngModel)]="yuanaddtime" *ngIf="preparelevels==1">
</mat-form-field>
<!-- <mat-icon aria-hidden="false" style="position: relative;right: 120px;top: 5px;">arrow forward</mat-icon> -->
<span style="margin-left: 15px;">🠊</span>
<mat-form-field class="example-full-width" style="margin-left: 10px;">
<input type="date" matInput name="endtime" autocomplete="off" [(ngModel)]="dwendtime" *ngIf="preparelevels==0">
<input type="date" matInput name="endtime" autocomplete="off" [(ngModel)]="yuanendtime" *ngIf="preparelevels==1">
</mat-form-field>
</div>
<div class="queryField" *ngIf="preparelevels==1">
<label style="margin-right: 10px;">预案类型:</label>
<mat-form-field>
<mat-select [(ngModel)]="reservePlanType" name="reservePlanType" placeholder='请选择预案类型' [multiple]="true">
<mat-option value=1>二维预案</mat-option>
<mat-option value=2>三维预案</mat-option>
<mat-option value=4>其他预案</mat-option>
<mat-option value=16>文本预案</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="preparelevels==0">
<label style="margin-right: 10px;">单位类型:</label>
<mat-form-field>
<mat-select placeholder='请选择单位类型' [(ngModel)]="unittype" name="unittype" [multiple]="true">
<mat-option *ngFor="let unit of allunittype" [value]="unit.id">
{{unit.name}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="preparelevels==0">
<label style="margin-right: 10px;">单位状态:</label>
<mat-form-field>
<mat-select required [(ngModel)]="preparelevel" name="preparelevel" placeholder='请选择单位状态' [multiple]="true">
<mat-option [value]='preparelevel[0]'>新增</mat-option>
<mat-option [value]='preparelevel[1]||2'>维护更新</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="preparelevels==1">
<label style="margin-right: 10px;">预案级别:</label>
<mat-form-field>
<mat-select placeholder='请选择预案级别' [(ngModel)]="planCategory" name="planCategory" [multiple]="true">
<mat-option value=1>Ⅰ级预案</mat-option>
<mat-option value=2>Ⅱ级预案</mat-option>
<mat-option value=3>Ⅲ级预案</mat-option>
<mat-option value=4>Ⅳ级预案</mat-option>
<mat-option value=5>Ⅴ级预案</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="preparelevels==0">
<label style="margin-right: 10px;">按总数排序:</label>
<mat-form-field>
<mat-select placeholder='请选择排序方式' [(ngModel)]="integritySort" name="integritySort">
<mat-option value=1>从高到低</mat-option>
<mat-option value=0>从低到高</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="preparelevels==1">
<label style="margin-right: 10px;">按总数排序:</label>
<mat-form-field>
<mat-select placeholder='请选择排序方式' [(ngModel)]="yuanintegritySort" name="integritySort">
<mat-option value=1>从高到低</mat-option>
<mat-option value=0>从低到高</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="preparelevels==0||preparelevels==1">
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
<button mat-raised-button style="margin-left: 25px;" color="primary" (click)='export()'>导出</button>
</div>
</div>
</div>
</form>
<mat-divider></mat-divider>
<div class="body">
<div class="tablebox" id="table">
<table cellpadding="0" cellspacing="0" *ngIf="preparelevels==0&&!tableDataNull">
<thead>
<th *ngFor="let item of displayedColumns;let i=index">{{item}}</th>
</thead>
<tbody>
<tr *ngFor="let element of tabledataSource">
<td *ngFor="let eletd of element.name">{{eletd}}</td>
</tr>
</tbody>
</table>
<table cellpadding="0" cellspacing="0" *ngIf="preparelevels==1&&!tableDataNull">
<thead>
<th *ngFor="let item of yuanColumns;let i=index">{{item}}</th>
</thead>
<tbody>
<tr *ngFor="let element of yuanTable">
<td *ngFor="let eletd of element.name">{{eletd}}</td>
</tr>
</tbody>
</table>
<span *ngIf="tableDataNull">暂无数据</span>
</div>
</div>
</ng-template>
</mat-tab>
</mat-tab-group>
</div>

265
src/app/statistic-analysis/combined-query/combined-query.component.scss

@ -0,0 +1,265 @@
.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{
height: 100%;
width: 100%;
.buttonbox{
padding-left: 50px;
button{
margin:0 10px
}
}
.tablebox{
height: 620px;
overflow-y: auto;
//margin-bottom: 15px;
table{
width: 100%;
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%;
// 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;
}
}

25
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<CombinedQueryComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CombinedQueryComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CombinedQueryComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

567
src/app/statistic-analysis/combined-query/combined-query.component.ts

@ -0,0 +1,567 @@
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';
import { timeStamp } from 'console';
@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<any>(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[] = ['组织名称', '总数'];//, 'addtime', 'plantype', 'auditStatus', 'openRange', 'projectlevel', 'operation'
yuanColumns:string[]=['组织名称', '总数'];
allorganizations: any //所有组织机构
allunittype: any //所有单位类型
tabledataSource=[] //单位表格数据
yuanTable=[]//预案表格数据
excelData:any
url
findTj=0//查询条件
preparelevels:Number=0
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 //存储所有预案信息
lable=['单位查询','预案查询']
selected = new FormControl(0); //选项卡实例
//判断选了哪一个
selectedIndexChange(e){
this.selected.setValue(e)
this.preparelevels=Number(e)
this.getAllPlanInfo()
}
//获得所有预案或单位信息
tableDataNull=false
async getAllPlanInfo() {
/* this.planCategory=new Array<number>();
this.reservePlanType=new Array<number>(); */
let paramsdata:any={
QueryMode:this.preparelevels,
OrganizationId:this.jsId||'',
HasChildren:this.jscheck||'',
TimeIntervalStart:this.dwaddtime||'',
TimeIntervalEnd:this.dwendtime||'',
BuildingTypeIds:this.unittype||[],
CompanyStatuses:this.preparelevel||[],
SortBy:'totalCount',
SortType:this.integritySort
}
let yuandata={
QueryMode:this.preparelevels,
OrganizationId:this.yuanjsId||'',
HasChildren:this.yuanjscheck||'',
TimeIntervalStart:this.yuanaddtime||'',
TimeIntervalEnd:this.yuanendtime||'',
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)
this.excelData=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!=null){
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]}]
if(this.planCategory.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)
}
})
}
if(this.reservePlanType.length!=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)
}
});
}
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<value[0].name.length;a++){
value[i].name.push(0)
}
}
})
this.yuanTable.forEach((yuan,yuani,yuanval)=>{
this.yuanColumns.forEach((th,thi,thvalu)=>{
data.forEach((element,i,value) => {
//预案级别数据
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
}
});
}
});
})
})
}
}
//this.tabledataSource=data
console.log(this.yuanColumns)
console.log(this.yuanTable)
resolve(this.excelData)
}
)
})
}
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
}
)
}
dwaddtime//单位查询开始时间
dwendtime//单位结束时间
yuanaddtime//预案查询开始时间
yuanendtime//预案查询结束时间
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
if(this.preparelevels==0){
this.js = node.name
this.jsId = node.id
}else if(this.preparelevels==1){
this.yuanjs=node.name
this.yuanjsId=node.id
}
}
//关闭辖区中队隐藏框
closeorganizationbox() {
this.isorganizationbox = false
}
//打开辖区中队隐藏框
openorganizationbox() {
this.isorganizationbox = true
}
//关闭出现的组织机构div
closediv() {
this.isorganizationbox = false
}
//查询
onSubmit(e) {
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
if(this.dwendtime<this.dwaddtime||this.yuanaddtime>this.yuanendtime){
this.snackBar.open('开始时间不能早于结束时间', '确定', config);
}
this.getAllPlanInfo();
}
companyName: any //单位名称
js: any //单位所选组织机构
jsId: any //单位所选组织机构的id
jscheck: boolean //单位所选组织机构勾选框
yuanjs: any //预案所选组织机构
yuanjsId: any //预案所选组织机构的id
yuanjscheck: boolean //预案所选组织机构勾选框
unittype=[] //单位类型
reservePlanType=[] //预案类型
preparelevel=[1] //单位状态
plcheck: boolean //编制级别勾选框
planCategory=[] //预案级别
integritySort=1 //单位排序字段
yuanintegritySort=1 //预案排序字段
//重置
reset() {
if(this.preparelevels==0){
this.js = ''
this.jsId = ''
this.jscheck = false
this.unittype = []
this.preparelevel = [0]
this.dwaddtime = ''
this.dwendtime = ''
}else if(this.preparelevels==1){
this.yuanaddtime=''
this.yuanendtime=''
this.yuanjs=''
this.yuanjsId=''
this.yuanjscheck=false
this.reservePlanType = []
this.planCategory = []
}
//重新获取初始化列表
this.getAllPlanInfo();
}
exal(){
var uri = 'data:application/vnd.ms-excel;base64,',
template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>',
base64 = function(s) {
return window.btoa(unescape(encodeURIComponent(s)))
},
format = function(s, c) {
return s.replace(/{(\w+)}/g, function(m, p) {
return c[p];
})
}
return function(table, name) {
if (!table.nodeType) table = document.getElementById(table);
var ctx = {
worksheet: name || 'Worksheet',
table: table.innerHTML
};
window.location.href = uri + base64(format(template, ctx));
}
}
export(){
const httpOptions = {
responseType: 'blob' as 'json'
};
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', '报表统计'+'.xls');
link.style.visibility = 'hidden';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
})
}
}

4
src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.html

@ -30,10 +30,10 @@
<app-indexCondition *ngIf="selectedBtn=='tiaojian'"></app-indexCondition>
<div class="echartsbox" >
<div id="pie" >
<div id="pie">
</div>
<div id="pieTwo" ></div>
<div id="pieTwo"></div>
</div>
</div>

4
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({

5
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,

4
src/app/ui/plan-template/Disaster.html

@ -21,10 +21,10 @@
</mat-select>
</mat-form-field>
</div>
<div class="queryField">
<div class="queryField" *ngIf="level!=2">
<label style="margin-right: 10px;">名称:</label>
<mat-form-field class="example-full-width">
<input matInput placeholder="请输入表头名称" [(ngModel)]="headName" autocomplete="off" required>
<input matInput placeholder="请输入表头名称" [(ngModel)]="headName" autocomplete="off">
</mat-form-field>
</div>
<div class="queryField" *ngIf="level==2">

120
src/app/ui/plan-template/plan-template.component.html

@ -19,7 +19,7 @@
</div>
<div class="leftbox">
<div class="leftbox">
<div class="leftbody" [ngClass]="{'selectedTr':item.buildingTypeId==buildingTypeId&&item.planCategory==planCategory}" *ngFor="let item of newleftTabledata;let i=index" (click)='planClick(item)'>
<div class="leftbody" [ngClass]="{'selectedTr':item.buildingTypeId == buildingTypeId&&item.planCategory==planCategory}" *ngFor="let item of newleftTabledata;let i=index" (click)='planClick(item)'>
<div class="bodyname">
<span>{{item.unitname}}</span>
</div>
@ -40,15 +40,15 @@
<span>{{unitName}}</span>
</div>
<div class="rightheadtwo">
<button mat-raised-button color="primary" style="margin-right: 20px;" (click)='save()'>保存</button>
<button mat-raised-button color="primary" style="margin-right: 10px;" (click)='addGroupClick()' >新增分组</button>
<button mat-raised-button color="primary" style="margin-right: 10px;" (click)='zdyaddGroup()' >自定义分组</button>
</div>
</div>
<div class="rightbody">
<mat-accordion *ngFor="let item of group;let zi=index;TrackBy:trackByFn" multi>
<mat-accordion *ngFor="let item of group;let zi=index;TrackBy:trackByFn" multi >
<!-- 基本信息 -->
<mat-expansion-panel (opened)="openpan(zi)" (closed)='closepan()' *ngIf="item.completed" style="box-shadow: 0 0 black;border: 1px solid #EEF1F5;" MatAccordionTogglePosition='after'>
<mat-expansion-panel (opened)="openpan(zi)" (closed)='closepan()' *ngIf="item.completed" style="box-shadow: 0 0 black;border: 1px solid #EEF1F5;" expanded hideToggle disabled><!-- expanded hideToggle disabled -->
<mat-expansion-panel-header collapsedHeight='40px' expandedHeight='40px' class="panelhead">
<mat-panel-title class="paneltitle">
<div style="width: 100%;height: 100%;display: flex;">
@ -60,9 +60,13 @@
<div class="caozuotwo">
<img src="../../../assets/images/toppaixu.png" alt="" style="height: 15px;position: relative;top: 3px;" (click)='topPai(zi)' *ngIf="zi!=0">
<img src="../../../assets/images/downpaixu.png" alt="" style="height: 15px;position: relative;top: 3px;left: 1px;" (click)='downPai(zi)'*ngIf="zi!=group.length-1">
<div *ngIf="item.groupName!='预案附件'&&item.groupName!='交通水源'&&item.groupName!='重点图示'" class="addinfo" (click)='addAttribute(item.groupName)'>
<div *ngIf="item.groupName=='单位概况'" class="addinfo" (click)='zdyaddAttribute()'>
<img src="../../../assets/images/update.png" style="height: 15px;margin-top: 4px;margin-left: 5px;">
<span style="margin-left: 2px;">编辑</span>
<span style="margin-left: 2px;">自定义</span>
</div>
<div *ngIf="item.groupName!='预案附件'&&item.groupName!='交通水源'&&item.groupName!='重点图示'" class="addinfo" (click)='addAttribute(zi,item.groupName)'>
<img [src]="item.groupName=='单位概况'?'../../../assets/images/update.png':'../../../assets/images/add.png'" style="height: 15px;margin-top: 4px;margin-left: 5px;">
<span style="margin-left: 2px;">{{item.groupName=='单位概况'?'编辑':'新增'}}</span>
</div>
<div class="delinfo" (click)='deleteGroup(item.groupName)'>
<img src="../../../assets/images/deleteblue.png" style="margin-left: 10px;height: 15px;margin-top: 4px;">
@ -87,8 +91,10 @@
</div>
<div class="caozuo">
<button mat-raised-button color="#ECF6FF" (click)='delAttribute(item.groupName,element.surveyName)'><img src="../../../assets/images/deletehui.png"> 删除</button>
<button mat-raised-button color="primary" style="margin-right: 10px;" (click)='addAttInfo(element.surveyName)'
*ngIf="item.groupName=='单位概况'&&(element.surveyName=='单位基本信息'||element.surveyName=='建筑信息'||element.surveyName=='进攻通道'||element.surveyName=='消防设施')"><img src="../../../assets/images/addbai.png"> 编辑</button>
<button mat-raised-button color="primary" style="margin-right: 10px;" (click)='addAttInfo(element.surveyName,suri)'
*ngIf="item.groupName=='单位概况'&&(element.surveyName!='四周毗邻'&&element.surveyName!='重点部位'&&element.surveyName!='功能分区')&&element.zdy==undefined"><img src="../../../assets/images/updatabai.png"> 编辑</button>
<button mat-raised-button color="primary" style="margin-right: 10px;" (click)='addAttInfo(element.surveyName,suri)'
*ngIf="element.zdy!=undefined"><img src="../../../assets/images/addbai.png"> 新建</button>
<img src="../../../assets/images/downpaixu.png" alt="" style="height: 15px;position: relative;top: 15px;left: 1px;margin-right: 5px;float: right;" (click)='zaiDown(zi,suri)'>
<img src="../../../assets/images/toppaixu.png" alt="" style="height: 15px;position: relative;top: 15px;float: right;" (click)='zaiTop(zi,suri)'>
</div>
@ -169,7 +175,7 @@
(click)='delattAndfileOne(item.groupName,element.surveyName,i)'><img
src="../../../assets/images/deletehui.png"> 删除</button>
<button mat-raised-button color="primary" style="margin-right: 10px;"
(click)='fileAdd(attinf.facilityItems,i)'><img src="../../../assets/images/addbai.png">
(click)='fileAdd(attinf.facilityItems,i)'><img src="../../../assets/images/updatabai.png">
编辑</button>
<img src="../../../assets/images/downpaixu.png" alt="" style="height: 15px;margin-right: 8px;float: right;position: relative;top: 17px;" (click)='threeDown(zi,suri,i)'>
<img src="../../../assets/images/toppaixu.png" alt="" style="height: 15px;float: right;position: relative;top: 17px;" (click)='threeTop(zi,suri,i)'>
@ -194,7 +200,7 @@
<td *ngIf="facilityItems.completed!=null&&facilityItems.completed" style="width: 30%;">
<img src="../../../assets/images/toppaixu.png" alt="" style="height: 15px;margin-right: 2px;position: relative;top: 2px;" (click)='fileTop(zi,suri,i,f)'>
<img src="../../../assets/images/downpaixu.png" alt="" style="height: 15px;margin-right: 5px;position: relative;top: 2px;" (click)='fileDown(zi,suri,i,f)'>
<span style="color: #FF5D4A;margin-left: 4px;cursor: pointer;" (click)='fileDel(i,f)'>删除</span>
<span style="color: #FF5D4A;margin-left: 4px;cursor: pointer;" (click)='fileDel(suri,i,f)'>删除</span>
</td>
</tr>
</tbody>
@ -208,7 +214,19 @@
<div class="attack" *ngFor="let attackitem of element.attinf;let i=index">
<div class="attackLeft">
<div class="attackleftHead">
<input type="text" [(ngModel)]='attackitem.head' placeholder="请输入内容">
<div class="headName">
<input type="text" [(ngModel)]='attackitem.head' placeholder="请输入内容">
</div>
<div class="rightButton">
<img src="../../../assets/images/toppaixu.png" alt="" (click)='threeTop(zi,suri,i)'>
<img src="../../../assets/images/downpaixu.png" alt="" (click)='threeDown(zi,suri,i)'>
<button mat-raised-button color="primary" style="margin-left: 10px;" (click)='updataHl(zi,suri,i)'><img
src="../../../assets/images/updatabai.png"> 编辑</button>
<button mat-raised-button color="#ECF6FF" style="margin-left: 10px;"
(click)='delattAndfileOne(item.groupName,element.surveyName,i)'><img
src="../../../assets/images/deletehui.png"> 删除</button>
</div>
</div>
<div class="attackleftTable">
<table>
@ -219,29 +237,78 @@
</table>
</div>
</div>
<div class="attackRight">
<div class="rightButton">
<img src="../../../assets/images/toppaixu.png" alt="" style="height: 15px;margin-right: 2px;position: relative;top: 2px;" (click)='threeTop(zi,suri,i)'>
<img src="../../../assets/images/downpaixu.png" alt="" style="height: 15px;margin-right: 5px;position: relative;top: 2px;" (click)='threeDown(zi,suri,i)'>
<button mat-raised-button color="primary" (click)='attackAdd(element.surveyName,i,8)'><img
src="../../../assets/images/addbai.png"> 新增</button>
<button mat-raised-button color="#ECF6FF" style="margin-left: 10px;"
(click)='delattAndfileOne(item.groupName,element.surveyName,i)'><img
src="../../../assets/images/deletehui.png"> 删除</button>
</div>
</div>
<!--自定义属性-->
<div class="disaster" *ngIf="element.zdy!=undefined ">
<div class="attack" *ngFor="let zdy of element.attinf;let attributei=index">
<div class="attackLeft">
<div class="attackleftHead">
<div class="headName">
<input type="text" [placeholder]="zdy.level!=2&&zdy.level!=1?'请输入内容':''" [(ngModel)]="zdy.headName">
</div>
<div class="rightButton">
<img src="../../../assets/images/toppaixu.png" alt="" style="height: 15px;position: relative;top: 3px;" (click)='adyTop(suri,attributei)'>
<img src="../../../assets/images/downpaixu.png" alt="" style="height: 15px;position: relative;top: 3px;left: 1px;margin-right: 5px;" (click)='adyDown(suri,attributei)'>
<button mat-raised-button color="primary" (click)='updataHl(zi,suri,attributei)'
*ngIf="zdy.level==1||zdy.level==2"><img src="../../../assets/images/updatabai.png"> 编辑</button>
<button mat-raised-button color="#ECF6FF" style="margin-left: 10px;"
(click)='zdyDelDisaster(suri,attributei)'><img src="../../../assets/images/deletehui.png">
删除</button>
</div>
</div>
<div class="attackleftTable">
<!--表格类型-->
<table *ngIf="zdy.level==1">
<thead>
<th *ngFor="let itemth of zdy.tableth;let tablethi=index;TrackBy:trackByFn"><input type="text"
placeholder="请输入内容" [(ngModel)]="zdy.tableth[tablethi]"></th>
</thead>
</table>
<!--文本区域-->
<textarea *ngIf="zdy.level==3" [(ngModel)]="zdy.tableth"></textarea>
<!--输入框-->
<div class="inputtext" *ngIf="zdy.level==2">
<div class="inputj" style="height: 100%;width: 100%;"
*ngFor="let itemth of zdy.tableth;let tablethi=index;TrackBy:trackByFn">
<div style="height: 100%;width: 100%;"
*ngFor="let itemthj of zdy.tableth[tablethi];let tablethj=index;TrackBy:trackByFn">
<input type="text" placeholder="请输入内容" style="background-color: #E8E9E9;width: 20%;text-align: center;"
[(ngModel)]="itemthj.head">
<input type="text" placeholder="请输入内容" style="width: 80%;" [(ngModel)]="itemthj.body">
</div>
</div>
</div>
<!--树形图-->
<!-- <div style="height: 500px;width: 100%;" *ngIf="element.level==4">
<tree-diagram [data]="element.tableth" ></tree-diagram>
</div> -->
</div>
</div>
</div>
</div>
</mat-expansion-panel>
</mat-accordion>
</div>
</div>
<!--灾情设定及其他-->
<div class="disaster" *ngIf="item.groupName!='单位概况'">
<div class="attack" *ngFor="let element of item.attribute;let attributei=index">
<div class="attackLeft">
<div class="attackleftHead">
<input type="text" placeholder="请输入内容" [(ngModel)]="element.headName">
<div class="headName">
<input type="text" placeholder="请输入内容" [(ngModel)]="element.headName">
</div>
<div class="rightButton">
<img src="../../../assets/images/toppaixu.png" alt="" style="height: 15px;position: relative;top: 3px;left: 1px;" (click)='zaiTop(zi,attributei)'>
<img src="../../../assets/images/downpaixu.png" alt="" style="height: 15px;position: relative;top: 3px;margin-left: 5px;" (click)='zaiDown(zi,attributei)'>
<button mat-raised-button color="primary" style="margin-left: 15px;" (click)='updataHl(zi,attributei)'
*ngIf="element.level==1||element.level==2"><img src="../../../assets/images/updatabai.png"> 编辑</button>
<button mat-raised-button color="#ECF6FF" style="margin-left: 10px;"
(click)='delDisaster(item.groupName,attributei)'><img src="../../../assets/images/deletehui.png">
删除</button>
</div>
</div>
<div class="attackleftTable">
<!--表格类型-->
@ -271,8 +338,7 @@
</div> -->
</div>
</div>
<div class="attackRight">
<div class="rightButton">
<!-- <div class="rightButton">
<img src="../../../assets/images/toppaixu.png" alt="" style="height: 15px;position: relative;top: 3px;" (click)='zaiTop(zi,attributei)'>
<img src="../../../assets/images/downpaixu.png" alt="" style="height: 15px;position: relative;top: 3px;left: 1px;margin-right: 5px;" (click)='zaiDown(zi,attributei)'>
<button mat-raised-button color="primary" (click)='attackAdd(item.groupName,attributei,element.level)'
@ -280,8 +346,8 @@
<button mat-raised-button color="#ECF6FF" style="margin-left: 10px;"
(click)='delDisaster(item.groupName,attributei)'><img src="../../../assets/images/deletehui.png">
删除</button>
</div>
</div>
</div> -->
</div>
</div>
</mat-expansion-panel>

44
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%;

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

File diff suppressed because it is too large Load Diff

34
src/app/ui/plan-template/updatal.html

@ -0,0 +1,34 @@
<div class="box">
<div class="top">
<span style="font-size: 20px;">修改内容</span>
</div>
<div class="queryField">
<label style="margin-right: 10px;">名称:</label>
<!-- <mat-form-field class="example-full-width">
<input matInput placeholder="请输入表头名称" [(ngModel)]="headName" autocomplete="off" readonly>
</mat-form-field> -->
<span>{{headName}}</span>
</div>
<div class="queryField" *ngIf="level==1||level==undefined">
<label style="margin-right: 10px;">列数:</label>
<mat-form-field class="example-full-width">
<input matInput type="number" [(ngModel)]="data.tableth.length" autocomplete="off" required min="0" required>
</mat-form-field>
</div>
<div class="queryField" *ngIf="level==2">
<label style="margin-right: 10px;">列数:</label>
<mat-form-field class="example-full-width">
<input matInput type="number" [(ngModel)]="data.tableth[0].length" autocomplete="off" required min="1" required>
</mat-form-field>
</div>
<div class="queryField" *ngIf="level==2">
<label style="margin-right: 10px;">行数:</label>
<mat-form-field class="example-full-width">
<input matInput type="number" [(ngModel)]="data.tableth.length" autocomplete="off" required min="1" required>
</mat-form-field>
</div>
<div class="bottom">
<button mat-raised-button color="primary" (click)='newdisaster()'>确定</button>
<button mat-raised-button style="margin-left: 50px;" (click)='close()'>取消</button>
</div>
</div>

17
src/app/ui/plan-template/zdyaddgroup.html

@ -0,0 +1,17 @@
<div class="box">
<div class="top">
<span>自定义新增</span>
</div>
<div class="center">
<div class="group" >
<label style="margin-right: 10px;">自定义名称:</label>
<mat-form-field class="example-full-width">
<input matInput placeholder="请输入自定义名称" autocomplete="off" [(ngModel)]="groupName" required>
</mat-form-field>
</div>
</div>
<div class="bottom">
<button mat-raised-button color="primary" (click)='newGroup()' style="margin-left: 50px;">确定</button>
<button mat-raised-button style="margin-left: 20px;" (click)="close()">取消</button>
</div>
</div>

6
src/app/ui/ui.module.ts

@ -93,6 +93,10 @@ 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'
import { updataHl} from './plan-template/plan-template.component'
@NgModule({
declarations: [UiComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent,
@ -104,7 +108,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,updataHl],
imports: [
CommonModule,

4
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();

3
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',
},
],
@ -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);
}
}

BIN
src/assets/images/addyello.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

BIN
src/assets/images/delyello.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

BIN
src/assets/images/downyello.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

BIN
src/assets/images/uoyello.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

BIN
src/assets/images/updatabai.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

BIN
src/assets/images/updateyello.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

Loading…
Cancel
Save