diff --git a/src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts b/src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts index a07ce50..4189176 100644 --- a/src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts +++ b/src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts @@ -478,15 +478,13 @@ export class FireFightingDeviceComponent implements OnInit { for (const key in object) { if (Object.prototype.hasOwnProperty.call(object, key)) { const element = object[key]; - if(element.total || element.details){ - body.push({ - buildingId: item.buildingId, - groupName: groupName, - facilityName: element.name, - count: element.total, - description: element.details - }) - } + body.push({ + buildingId: item.buildingId, + groupName: groupName, + facilityName: element.name, + count: element.total || '', + description: element.details || '' + }) } } return body diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html index 6009892..154cded 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html @@ -1,16 +1,13 @@
-
+
-
- 1.封面 -
- {{key + 2}}.{{item.groupName}} + {{key + 1}}.{{item.groupName}}
-
-
-
+ +
+
重点图示 @@ -129,9 +130,7 @@
- +

交通水源

@@ -158,8 +157,7 @@
-

{{TwoDPlan.name}}

@@ -170,12 +168,13 @@
-
-
+
+
建筑列表
-
+
{{item.name}}
@@ -183,111 +182,114 @@
- -
-

- 预案编号: -

-

{{planName}}

-
    -
  • -
    - 对象名称: -
    -
    - {{unitData.name}} -
    -
  • -
  • -
    - 单位性质: -
    -
    - {{unitData.buildingTypes[0].name}} -
    -
  • -
  • -
    - *预案级别: -
    -
    - - Ⅴ级 - - - Ⅲ级 - -
    -
  • -
  • -
    - *灾害类型: -
    -
    - -
    -
  • -
  • -
    - 防火级别: -
    -
    - -
    -
  • -
  • -
    - 防火管辖: -
    -
    - {{unitData.organizationName}} -
    -
  • -
  • -
    - 灭火责任队站: -
    -
    - -
    -
  • -
  • -
    - 制作人职务/姓名: -
    -
    - - -
    -
  • -
  • -
    - 审核人职务/姓名: -
    -
    - -
    -
  • -
  • -
    - 审核时间: -
    -
    - -
    -
  • -
-
-
+
+ +
+

+ 预案编号: +

+

{{item.attribute.planName}}

+
    +
  • +
    + 对象名称: +
    +
    + {{item.attribute.objName}} +
    +
  • +
  • +
    + 单位性质: +
    +
    + {{item.attribute.unitNature}} +
    +
  • +
  • +
    + *预案级别: +
    +
    + + Ⅴ级 + + + Ⅲ级 + +
    +
  • +
  • +
    + *灾害类型: +
    +
    + +
    +
  • +
  • +
    + 防火级别: +
    +
    + +
    +
  • +
  • +
    + 防火管辖: +
    +
    + {{item.attribute.fireproofingAdminister}} +
    +
  • +
  • +
    + 灭火责任队站: +
    +
    + +
    +
  • +
  • +
    + 制作人职务/姓名: +
    +
    + + +
    +
  • +
  • +
    + 审核人职务/姓名: +
    +
    + + +
    +
  • +
  • +
    + 审核时间: +
    +
    + +
    +
  • +
+
-
+ *ngIf="item.groupName!='单位概况'&&item.groupName!='交通水源'&&item.groupName!='重点图示'&&item.groupName!='预案附件'&&item.groupName!='特别警示'&&item.groupName!='处置要点'&&item.groupName!='封面'"> +
{{item.groupName}}
@@ -341,7 +343,11 @@
-
+
+
+ {{item.groupName}} +
@@ -354,7 +360,7 @@
-
+
@@ -363,13 +369,16 @@
-
+
+
+ {{item.groupName}} +
@@ -377,7 +386,8 @@
- +
@@ -388,16 +398,23 @@
+
+ {{item.groupName}} +
- +
+
+ 单位基本信息 +
{{buildingName}}
@@ -412,13 +429,16 @@
{{attack.head}} - - + +
- @@ -433,17 +453,17 @@ -
+
+
- - + +
- +
diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss index 1306561..16d6a3b 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss @@ -69,12 +69,12 @@ } } } + .contentbox { height: 100%; box-sizing: border-box; padding-top: 66px; overflow-y: auto; - .leftbox { position: fixed; width: 14%; @@ -229,6 +229,7 @@ padding: 10px 10px 0; .cover { width: 100%; + min-height: 780px; input, select { border: 1px solid #ebebeb; @@ -236,6 +237,9 @@ height: 28px; line-height: 28px; } + input{ + width: 140px; + } p { height: 28px; line-height: 28px; @@ -627,6 +631,22 @@ margin: 10px 0; } } + .titleItem{ + width: 100%; + height: 36px; + line-height: 36px; + background-color: #2196F3; + text-align: center; + color: white; + } } } + .noPadding{ + padding-top: 10px; + } + .quitPreview{ + position: fixed; + top: 10px; + right: 15px; + } } diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts index 697d2a7..16d14fa 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts @@ -22,13 +22,9 @@ export class CreatePlanOnlineFiveComponent implements OnInit { constructor(private http: HttpClient, private route: ActivatedRoute, public snackBar: MatSnackBar, public dialog: MatDialog) { } - planName: string //预案名称 planLevel: string//预案级别 ngOnInit(): void { - this.planName = this.route.snapshot.queryParams.planName this.planLevel = this.route.snapshot.queryParams.planCategory - console.log('级别', this.planLevel) - this.getTemplateData() this.getUnitData() this.getAllBuildings() this.tree = { @@ -64,7 +60,8 @@ export class CreatePlanOnlineFiveComponent implements OnInit { data.items.forEach(element => { if (element.id == this.route.snapshot.queryParams.companyId) { this.unitData = element - console.log('单位列表信息', this.unitData) + // console.log('单位列表信息', this.unitData) + this.getTemplateData() } }); }) @@ -73,7 +70,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { selectedItem: string = '封面' clickTitleItem(item) { this.addNumber = -1 - item == '封面' ? this.selectedItem = '封面' : this.selectedItem = item.groupName + this.selectedItem = item.groupName if (this.selectedItem == '重点图示') { this.getAllBuildings() this.getSitePlan() @@ -96,7 +93,6 @@ export class CreatePlanOnlineFiveComponent implements OnInit { this.TwoDPlanList = data.items.filter((item) => { return item.planType == 1 }) - console.log(this.TwoDPlanList) }) } @@ -110,12 +106,12 @@ export class CreatePlanOnlineFiveComponent implements OnInit { let companyId = this.unitId this.http.get('/api/RealityImageGroups', { params: { - companyId: '5e9964caa760a059e84512e9' + companyId: this.route.snapshot.queryParams.companyId } }).subscribe((data: any) => { this.allRealPicture = data this.getAllRealPicture().then(() => { - console.log('实景图', this.allRealPicture) + // console.log('实景图', this.allRealPicture) }) }) } @@ -146,12 +142,39 @@ export class CreatePlanOnlineFiveComponent implements OnInit { planTemplateData: any //获得模板信息 getTemplateData() { - this.http.get(`/api/PlanComponents/${this.route.snapshot.queryParams.planId}/WebText`).subscribe(data => { - console.log('预案内容',data) - // this.planTemplateData = JSON.parse(data.webdata).filter(item => - // item.completed == true - // ) - console.log(this.planTemplateData) + this.http.get(`/api/PlanComponents/${this.route.snapshot.queryParams.planId}/WebText`).subscribe((data: any) => { + // console.log('预案内容', data) + this.planTemplateData = JSON.parse(data.webTextData).filter(item => + item.completed == true + ) + // console.log(this.planTemplateData) + if (this.planTemplateData[0].groupName != '封面') { + let obj = { + completed: true, + groupName: "封面", + attribute: { + planNumber: '', + planName: this.route.snapshot.queryParams.planName, + objName: this.unitData.name, + unitNature: this.unitData.buildingTypes[0].name, + planLevel: '', + disasterType: '0', + fireproofingLevel: '', + fireproofingAdminister: this.unitData.organizationName, + putOutFireAdminister: '', + producer: { + name: '', + duty: '' + }, + verifier: { + name: '', + duty: '' + }, + auditTime: '' + } + } + this.planTemplateData.unshift(obj) + } this.planTemplateData.forEach(element => { if (element.groupName == '重点图示') { if (!element.attribute) { @@ -277,7 +300,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { } this.buildingName = this.allBuildings[0].name this.group = this.planTemplateData[0].building[this.clicki].body - console.log(this.planTemplateData) + // console.log(this.planTemplateData) }) } //获取总平面图 @@ -292,11 +315,11 @@ export class CreatePlanOnlineFiveComponent implements OnInit { openPlan(item, index, type?: string) { sessionStorage.setItem("gisplan", 'look') sessionStorage.setItem("companyId", this.unitId) - console.log(item) - if(type == '预案'){ + // console.log(item) + if (type == '预案') { sessionStorage.setItem("planId", item.id) sessionStorage.setItem("companyId", this.route.snapshot.queryParams.companyId) - sessionStorage.setItem("buildingTypeId",this.route.snapshot.queryParams.unitTypeId) + sessionStorage.setItem("buildingTypeId", this.route.snapshot.queryParams.unitTypeId) sessionStorage.setItem("editable", "0") sessionStorage.setItem("planName", item.name) sessionStorage.setItem("orName", item.name) @@ -346,7 +369,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { this.planTemplateData[key].attribute[i].tabletr[this.addNumber].tabletd.push('') } } - console.log(this.planTemplateData) + // console.log(this.planTemplateData) } //灾情设定表格删除一行 delTd(key, i) { @@ -391,7 +414,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { } } - console.log(this.planTemplateData) + // console.log(this.planTemplateData) } } //单位概况删除一行 @@ -454,6 +477,15 @@ export class CreatePlanOnlineFiveComponent implements OnInit { }) }) } + + //预览 + pattern:string = 'edit' + preview(){ + this.pattern = 'look' + } + quitPreview(){ + this.pattern = 'edit' + } }