Browse Source

[修改] 适配接入的第三方微型消防站数据.

zhuzhou
翟荣基 4 years ago
parent
commit
e7bd2efeff
  1. 33
      src/app/data-collection/fire-force/fire-force.component.html
  2. 56
      src/app/data-collection/fire-force/fire-force.component.ts

33
src/app/data-collection/fire-force/fire-force.component.html

@ -130,9 +130,9 @@
<!-- <div (click)="selectedTab(2)" [ngClass]="{'selectedBtn': tabIndex == 2}">
<span>车辆装备</span>
</div> -->
<div (click)="selectedTab(3)" [ngClass]="{'selectedBtn': tabIndex == 3}">
<!-- <div (click)="selectedTab(3)" [ngClass]="{'selectedBtn': tabIndex == 3}">
<span>相关资料</span>
</div>
</div> -->
</div>
<div class="btnbox">
<div class="uploadAttachment" *ngIf="tabIndex == 3">
@ -145,7 +145,7 @@
</a>
</div>
<span class="state" *ngIf="selectedFireForce.contentVerify && selectedFireForce.contentVerify.verifyState == 3">(
<!-- <span class="state" *ngIf="selectedFireForce.contentVerify && selectedFireForce.contentVerify.verifyState == 3">(
<span *ngIf="selectedFireForce.contentVerify.operation == 2" style="color: red;">删除</span>
<span *ngIf="selectedFireForce.contentVerify.operation == 0" >新增</span>
<span *ngIf="selectedFireForce.contentVerify.operation == 1" >更新</span>
@ -155,7 +155,7 @@
<span class="submitAudit" *ngIf="!selectedFireForce.contentVerify || selectedFireForce.contentVerify.verifyState == 5 || selectedFireForce.contentVerify.verifyState == 4" (click)="submitAudit()"><mat-icon>open_in_browser</mat-icon>提交审核</span>
<span class="state" *ngIf="selectedFireForce.contentVerify && selectedFireForce.contentVerify.verifyState == 3" (click)="cancelAudit()">撤销审核</span>
<span class="save state" *ngIf="!selectedFireForce.contentVerify || selectedFireForce.contentVerify.verifyState == 5 || selectedFireForce.contentVerify.verifyState == 4" (click)="save()"><mat-icon>save</mat-icon>保存</span>
<span class="save state" *ngIf="!selectedFireForce.contentVerify || selectedFireForce.contentVerify.verifyState == 5 || selectedFireForce.contentVerify.verifyState == 4" (click)="save()"><mat-icon>save</mat-icon>保存</span> -->
<span class="close" (click)="close()"><mat-icon>close</mat-icon>关闭</span>
</div>
</div>
@ -214,9 +214,9 @@
纬度:
</span>
<input [(ngModel)]="positionLngLat.y" disabled type="text" style="width: 26%;margin-right: 6%;">
<button (click)="setPosition()" style="width:85px;text-align: center;" mat-flat-button color="primary">
<!-- <button (click)="setPosition()" style="width:85px;text-align: center;" mat-flat-button color="primary">
<mat-icon style="width: 20px;height: 20px;font-size: 20px;">place</mat-icon>位置
</button>
</button> -->
</mat-grid-tile>
</mat-grid-list>
@ -342,9 +342,9 @@
纬度:
</span>
<input [(ngModel)]="positionLngLat.y" disabled type="text" style="width: 26%;margin-right: 6%;">
<button (click)="setPosition()" style="width:85px;text-align: center;" mat-flat-button color="primary">
<!-- <button (click)="setPosition()" style="width:85px;text-align: center;" mat-flat-button color="primary">
<mat-icon style="width: 20px;height: 20px;font-size: 20px;">place</mat-icon>位置
</button>
</button> -->
</mat-grid-tile>
</mat-grid-list>
@ -477,10 +477,10 @@
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
长:
长:
</span>
<input [(ngModel)]="othercontactData[0].PropertyValue" class="smallwidth" type="text" placeholder="姓名">
<input [(ngModel)]="othercontactData[1].PropertyValue" class="smallwidth" type="text" placeholder="联系方式">
<input [(ngModel)]="othercontactData[2].PropertyValue" class="smallwidth" type="text" placeholder="姓名">
<input [(ngModel)]="othercontactData[3].PropertyValue" class="smallwidth" type="text" placeholder="联系方式">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
@ -488,6 +488,13 @@
</span>
<input [(ngModel)]="FireForceDetailInfo.phoneNumber" type="text">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
负责人:
</span>
<input [(ngModel)]="othercontactData[4].PropertyValue" class="smallwidth" type="text" placeholder="姓名">
<input [(ngModel)]="othercontactData[5].PropertyValue" class="smallwidth" type="text" placeholder="联系方式">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
传真:
@ -518,9 +525,9 @@
纬度:
</span>
<input [(ngModel)]="positionLngLat.y" disabled type="text" style="width: 26%;margin-right: 6%;">
<button (click)="setPosition()" style="width:85px;text-align: center;" mat-flat-button color="primary">
<!-- <button (click)="setPosition()" style="width:85px;text-align: center;" mat-flat-button color="primary">
<mat-icon style="width: 20px;height: 20px;font-size: 20px;">place</mat-icon>位置
</button>
</button> -->
</mat-grid-tile>
</mat-grid-list>

56
src/app/data-collection/fire-force/fire-force.component.ts

@ -6,6 +6,7 @@ import { Component, OnInit } from '@angular/core';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
import { Console } from 'console';
import { TreeService } from 'src/app/http-interceptors/tree.service';
import Viewer from 'viewerjs'
declare var CryptoJS
@ -158,22 +159,23 @@ export class FireForceComponent implements OnInit {
data.relevantInfomationData ? this.AttachmentArr = JSON.parse(data.relevantInfomationData) : null
if(node.forceType == 0 && node.level == 0){
this.ZongpersonCountData = JSON.parse(data.personCountData)
this.ZongcontactData = JSON.parse(data.contactData)
this.ZongpersonCountData = JSON.parse(data.personCountData) || this.ZongpersonCountData
this.ZongcontactData = JSON.parse(data.contactData) || this.ZongcontactData
}
if(node.forceType == 0 && node.level == 1){
this.ZongpersonCountData = JSON.parse(data.personCountData)
this.ZhicontactData = JSON.parse(data.contactData)
this.ZongpersonCountData = JSON.parse(data.personCountData) || this.ZongpersonCountData
this.ZhicontactData = JSON.parse(data.contactData) || this.ZhicontactData
}
if(node.forceType == 0 && (node.level == 2 || node.level == 3)){
this.DaZhongpersonCountData = JSON.parse(data.personCountData)
this.DaZhongcontactData = JSON.parse(data.contactData)
this.DaZhongpersonCountData = JSON.parse(data.personCountData) || this.DaZhongpersonCountData
this.DaZhongcontactData = JSON.parse(data.contactData) || this.DaZhongcontactData
}
if(node.forceType != 0){
this.otherpersonCountData = JSON.parse(data.personCountData)
this.othercontactData = JSON.parse(data.contactData)
this.otherpersonCountData = JSON.parse(data.personCountData) || this.otherpersonCountData
this.othercontactData = JSON.parse(data.contactData) || this.otherpersonCountData
}
})
}
//寻找管辖单位
this.allFireForceList.forEach(item => {
@ -328,25 +330,25 @@ export class FireForceComponent implements OnInit {
//相关资料
data.relevantInfomationData ? this.AttachmentArr = JSON.parse(data.relevantInfomationData) : null
if(node.forceType == 0 && node.level == 0){
this.ZongpersonCountData = JSON.parse(data.personCountData)
this.ZongcontactData = JSON.parse(data.contactData)
if (node.forceType == 0 && node.level == 0) {
this.ZongpersonCountData = JSON.parse(data.personCountData) || this.ZongpersonCountData
this.ZongcontactData = JSON.parse(data.contactData) || this.ZongcontactData
}
if(node.forceType == 0 && node.level == 1){
this.ZongpersonCountData = JSON.parse(data.personCountData)
this.ZhicontactData = JSON.parse(data.contactData)
if (node.forceType == 0 && node.level == 1) {
this.ZongpersonCountData = JSON.parse(data.personCountData) || this.ZongpersonCountData
this.ZhicontactData = JSON.parse(data.contactData) || this.ZhicontactData
}
if(node.forceType == 0 && (node.level == 2 || node.level == 3)){
this.DaZhongpersonCountData = JSON.parse(data.personCountData)
this.DaZhongcontactData = JSON.parse(data.contactData)
if (node.forceType == 0 && (node.level == 2 || node.level == 3)) {
this.DaZhongpersonCountData = JSON.parse(data.personCountData) || this.DaZhongpersonCountData
this.DaZhongcontactData = JSON.parse(data.contactData) || this.DaZhongcontactData
}
if(node.forceType != 0){
this.otherpersonCountData = JSON.parse(data.personCountData)
this.othercontactData = JSON.parse(data.contactData)
if (node.forceType != 0) {
this.otherpersonCountData = JSON.parse(data.personCountData) || this.otherpersonCountData
this.othercontactData = JSON.parse(data.contactData) || this.othercontactData
}
})
}else{
} else {
this.map.setCity('上海市');
}
@ -514,6 +516,10 @@ export class FireForceComponent implements OnInit {
//其他消防力量联系方式
othercontactData:any = [
{PropertyName :'队长',PropertyValue:''},
{PropertyName :'联系方式',PropertyValue:''},
{PropertyName :'站长',PropertyValue:''},
{PropertyName :'联系方式',PropertyValue:''},
{PropertyName :'负责人',PropertyValue:''},
{PropertyName :'联系方式',PropertyValue:''}
]
//其他消防力量人员数量
@ -584,6 +590,10 @@ export class FireForceComponent implements OnInit {
]
this.othercontactData = [
{PropertyName :'队长',PropertyValue:''},
{PropertyName :'联系方式',PropertyValue:''},
{PropertyName :'站长',PropertyValue:''},
{PropertyName :'联系方式',PropertyValue:''},
{PropertyName :'负责人',PropertyValue:''},
{PropertyName :'联系方式',PropertyValue:''}
]
this.otherpersonCountData = [
@ -721,7 +731,7 @@ export class FireForceComponent implements OnInit {
this.newselectedFireForceId = data.id
this.selectedFireForce = data
let body = this.FireForceDetailInfo
body.personCountData = JSON.stringify(this.otherpersonCountData)
body.personCountData = JSON.stringify(this.otherpersonCountData)
body.contactData = JSON.stringify(this.othercontactData)
body.dutyForceData = null
this.http.put(`/api/FireForceDetail/1/${data.id}`,body).subscribe(data2 => {

Loading…
Cancel
Save