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}"> <!-- <div (click)="selectedTab(2)" [ngClass]="{'selectedBtn': tabIndex == 2}">
<span>车辆装备</span> <span>车辆装备</span>
</div> --> </div> -->
<div (click)="selectedTab(3)" [ngClass]="{'selectedBtn': tabIndex == 3}"> <!-- <div (click)="selectedTab(3)" [ngClass]="{'selectedBtn': tabIndex == 3}">
<span>相关资料</span> <span>相关资料</span>
</div> </div> -->
</div> </div>
<div class="btnbox"> <div class="btnbox">
<div class="uploadAttachment" *ngIf="tabIndex == 3"> <div class="uploadAttachment" *ngIf="tabIndex == 3">
@ -145,7 +145,7 @@
</a> </a>
</div> </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 == 2" style="color: red;">删除</span>
<span *ngIf="selectedFireForce.contentVerify.operation == 0" >新增</span> <span *ngIf="selectedFireForce.contentVerify.operation == 0" >新增</span>
<span *ngIf="selectedFireForce.contentVerify.operation == 1" >更新</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="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="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> <span class="close" (click)="close()"><mat-icon>close</mat-icon>关闭</span>
</div> </div>
</div> </div>
@ -214,9 +214,9 @@
纬度: 纬度:
</span> </span>
<input [(ngModel)]="positionLngLat.y" disabled type="text" style="width: 26%;margin-right: 6%;"> <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>位置 <mat-icon style="width: 20px;height: 20px;font-size: 20px;">place</mat-icon>位置
</button> </button> -->
</mat-grid-tile> </mat-grid-tile>
</mat-grid-list> </mat-grid-list>
@ -342,9 +342,9 @@
纬度: 纬度:
</span> </span>
<input [(ngModel)]="positionLngLat.y" disabled type="text" style="width: 26%;margin-right: 6%;"> <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>位置 <mat-icon style="width: 20px;height: 20px;font-size: 20px;">place</mat-icon>位置
</button> </button> -->
</mat-grid-tile> </mat-grid-tile>
</mat-grid-list> </mat-grid-list>
@ -477,10 +477,10 @@
</mat-grid-tile> </mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'> <mat-grid-tile colspan='3' rowspan='1'>
<span> <span>
长: 长:
</span> </span>
<input [(ngModel)]="othercontactData[0].PropertyValue" class="smallwidth" type="text" placeholder="姓名"> <input [(ngModel)]="othercontactData[2].PropertyValue" class="smallwidth" type="text" placeholder="姓名">
<input [(ngModel)]="othercontactData[1].PropertyValue" class="smallwidth" type="text" placeholder="联系方式"> <input [(ngModel)]="othercontactData[3].PropertyValue" class="smallwidth" type="text" placeholder="联系方式">
</mat-grid-tile> </mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'> <mat-grid-tile colspan='3' rowspan='1'>
<span> <span>
@ -488,6 +488,13 @@
</span> </span>
<input [(ngModel)]="FireForceDetailInfo.phoneNumber" type="text"> <input [(ngModel)]="FireForceDetailInfo.phoneNumber" type="text">
</mat-grid-tile> </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'> <mat-grid-tile colspan='3' rowspan='1'>
<span> <span>
传真: 传真:
@ -518,9 +525,9 @@
纬度: 纬度:
</span> </span>
<input [(ngModel)]="positionLngLat.y" disabled type="text" style="width: 26%;margin-right: 6%;"> <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>位置 <mat-icon style="width: 20px;height: 20px;font-size: 20px;">place</mat-icon>位置
</button> </button> -->
</mat-grid-tile> </mat-grid-tile>
</mat-grid-list> </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 { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree'; import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
import { Console } from 'console';
import { TreeService } from 'src/app/http-interceptors/tree.service'; import { TreeService } from 'src/app/http-interceptors/tree.service';
import Viewer from 'viewerjs' import Viewer from 'viewerjs'
declare var CryptoJS declare var CryptoJS
@ -158,22 +159,23 @@ export class FireForceComponent implements OnInit {
data.relevantInfomationData ? this.AttachmentArr = JSON.parse(data.relevantInfomationData) : null data.relevantInfomationData ? this.AttachmentArr = JSON.parse(data.relevantInfomationData) : null
if(node.forceType == 0 && node.level == 0){ if(node.forceType == 0 && node.level == 0){
this.ZongpersonCountData = JSON.parse(data.personCountData) this.ZongpersonCountData = JSON.parse(data.personCountData) || this.ZongpersonCountData
this.ZongcontactData = JSON.parse(data.contactData) this.ZongcontactData = JSON.parse(data.contactData) || this.ZongcontactData
} }
if(node.forceType == 0 && node.level == 1){ if(node.forceType == 0 && node.level == 1){
this.ZongpersonCountData = JSON.parse(data.personCountData) this.ZongpersonCountData = JSON.parse(data.personCountData) || this.ZongpersonCountData
this.ZhicontactData = JSON.parse(data.contactData) this.ZhicontactData = JSON.parse(data.contactData) || this.ZhicontactData
} }
if(node.forceType == 0 && (node.level == 2 || node.level == 3)){ if(node.forceType == 0 && (node.level == 2 || node.level == 3)){
this.DaZhongpersonCountData = JSON.parse(data.personCountData) this.DaZhongpersonCountData = JSON.parse(data.personCountData) || this.DaZhongpersonCountData
this.DaZhongcontactData = JSON.parse(data.contactData) this.DaZhongcontactData = JSON.parse(data.contactData) || this.DaZhongcontactData
} }
if(node.forceType != 0){ if(node.forceType != 0){
this.otherpersonCountData = JSON.parse(data.personCountData) this.otherpersonCountData = JSON.parse(data.personCountData) || this.otherpersonCountData
this.othercontactData = JSON.parse(data.contactData) this.othercontactData = JSON.parse(data.contactData) || this.otherpersonCountData
} }
}) })
} }
//寻找管辖单位 //寻找管辖单位
this.allFireForceList.forEach(item => { this.allFireForceList.forEach(item => {
@ -328,25 +330,25 @@ export class FireForceComponent implements OnInit {
//相关资料 //相关资料
data.relevantInfomationData ? this.AttachmentArr = JSON.parse(data.relevantInfomationData) : null data.relevantInfomationData ? this.AttachmentArr = JSON.parse(data.relevantInfomationData) : null
if(node.forceType == 0 && node.level == 0){ if (node.forceType == 0 && node.level == 0) {
this.ZongpersonCountData = JSON.parse(data.personCountData) this.ZongpersonCountData = JSON.parse(data.personCountData) || this.ZongpersonCountData
this.ZongcontactData = JSON.parse(data.contactData) this.ZongcontactData = JSON.parse(data.contactData) || this.ZongcontactData
} }
if(node.forceType == 0 && node.level == 1){ if (node.forceType == 0 && node.level == 1) {
this.ZongpersonCountData = JSON.parse(data.personCountData) this.ZongpersonCountData = JSON.parse(data.personCountData) || this.ZongpersonCountData
this.ZhicontactData = JSON.parse(data.contactData) this.ZhicontactData = JSON.parse(data.contactData) || this.ZhicontactData
} }
if(node.forceType == 0 && (node.level == 2 || node.level == 3)){ if (node.forceType == 0 && (node.level == 2 || node.level == 3)) {
this.DaZhongpersonCountData = JSON.parse(data.personCountData) this.DaZhongpersonCountData = JSON.parse(data.personCountData) || this.DaZhongpersonCountData
this.DaZhongcontactData = JSON.parse(data.contactData) this.DaZhongcontactData = JSON.parse(data.contactData) || this.DaZhongcontactData
} }
if(node.forceType != 0){ if (node.forceType != 0) {
this.otherpersonCountData = JSON.parse(data.personCountData) this.otherpersonCountData = JSON.parse(data.personCountData) || this.otherpersonCountData
this.othercontactData = JSON.parse(data.contactData) this.othercontactData = JSON.parse(data.contactData) || this.othercontactData
} }
}) })
}else{ } else {
this.map.setCity('上海市'); this.map.setCity('上海市');
} }
@ -514,6 +516,10 @@ export class FireForceComponent implements OnInit {
//其他消防力量联系方式 //其他消防力量联系方式
othercontactData:any = [ othercontactData:any = [
{PropertyName :'队长',PropertyValue:''}, {PropertyName :'队长',PropertyValue:''},
{PropertyName :'联系方式',PropertyValue:''},
{PropertyName :'站长',PropertyValue:''},
{PropertyName :'联系方式',PropertyValue:''},
{PropertyName :'负责人',PropertyValue:''},
{PropertyName :'联系方式',PropertyValue:''} {PropertyName :'联系方式',PropertyValue:''}
] ]
//其他消防力量人员数量 //其他消防力量人员数量
@ -584,6 +590,10 @@ export class FireForceComponent implements OnInit {
] ]
this.othercontactData = [ this.othercontactData = [
{PropertyName :'队长',PropertyValue:''}, {PropertyName :'队长',PropertyValue:''},
{PropertyName :'联系方式',PropertyValue:''},
{PropertyName :'站长',PropertyValue:''},
{PropertyName :'联系方式',PropertyValue:''},
{PropertyName :'负责人',PropertyValue:''},
{PropertyName :'联系方式',PropertyValue:''} {PropertyName :'联系方式',PropertyValue:''}
] ]
this.otherpersonCountData = [ this.otherpersonCountData = [
@ -721,7 +731,7 @@ export class FireForceComponent implements OnInit {
this.newselectedFireForceId = data.id this.newselectedFireForceId = data.id
this.selectedFireForce = data this.selectedFireForce = data
let body = this.FireForceDetailInfo let body = this.FireForceDetailInfo
body.personCountData = JSON.stringify(this.otherpersonCountData) body.personCountData = JSON.stringify(this.otherpersonCountData)
body.contactData = JSON.stringify(this.othercontactData) body.contactData = JSON.stringify(this.othercontactData)
body.dutyForceData = null body.dutyForceData = null
this.http.put(`/api/FireForceDetail/1/${data.id}`,body).subscribe(data2 => { this.http.put(`/api/FireForceDetail/1/${data.id}`,body).subscribe(data2 => {

Loading…
Cancel
Save