邵佳豪 4 years ago
parent
commit
272ca75a94
  1. 33
      src/app/data-collection/fire-force/fire-force.component.html
  2. 56
      src/app/data-collection/fire-force/fire-force.component.ts
  3. 31
      src/app/data-collection/water-collection/water-collection.component.html
  4. 3
      src/app/data-collection/water-collection/water-collection.component.ts
  5. 12
      src/app/ui/plan-template/addKeyname.html
  6. 22
      src/app/ui/plan-template/addattinf.html
  7. 22
      src/app/ui/plan-template/addgroup.html
  8. 40
      src/app/ui/plan-template/addgroup.scss
  9. 22
      src/app/ui/plan-template/dwsurvey.html
  10. 98
      src/app/ui/plan-template/plan-template.component.html
  11. 134
      src/app/ui/plan-template/plan-template.component.scss
  12. 358
      src/app/ui/plan-template/plan-template.component.ts
  13. 43
      src/app/ui/plan-template/upPlan.html
  14. 7
      src/app/ui/ui.module.ts
  15. BIN
      src/assets/images/addbai.png

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 => {

31
src/app/data-collection/water-collection/water-collection.component.html

@ -113,6 +113,14 @@
</span>
<input [(ngModel)]="waterData.administrativeRegion" type="text">
</mat-grid-tile>
<!-- 上海数据导入后, 行政区字段无数据, 组织机构有数据 -->
<!-- 显示暂且维持不变 -->
<!-- <mat-grid-tile colspan='1' rowspan='1'>
<span>
组织机构:
</span>
<input [(ngModel)]="waterData.organizationName" type="text">
</mat-grid-tile> -->
<mat-grid-tile colspan='2' rowspan='1'>
<span>
水源归属:
@ -161,8 +169,7 @@
</span>
<select [(ngModel)]="fireCockData[0].PropertyValue">
<option value="0">可用</option>
<option value="1">维护</option>
<option value="2">损坏</option>
<option value="1">不可用</option>
</select>
</mat-grid-tile>
<mat-grid-tile colspan='2' rowspan='1'>
@ -172,6 +179,8 @@
<select [(ngModel)]="fireCockData[1].PropertyValue">
<option value="0">地上</option>
<option value="1">地下</option>
<option value="2">室内</option>
<option value="-1">其他</option>
</select>
</mat-grid-tile>
<mat-grid-tile colspan='2' rowspan='1'>
@ -179,10 +188,10 @@
管网形式:
</span>
<select [(ngModel)]="fireCockData[2].PropertyValue">
<option value="0">状管网</option>
<option value="1">状管网</option>
<option value="2">混合状管网</option>
<option value="3">其他</option>
<option value="0">状管网</option>
<option value="1">状管网</option>
<!-- <option value="2">混合状管网</option> -->
<option value="-1">其他</option>
</select>
</mat-grid-tile>
<mat-grid-tile colspan='2' rowspan='1'>
@ -190,14 +199,15 @@
管网直径:
</span>
<div class="unitDiv">
<select [(ngModel)]="fireCockData[3].PropertyValue">
<input type="text" [(ngModel)]="fireCockData[3].PropertyValue">
<!-- <select [(ngModel)]="fireCockData[3].PropertyValue">
<option value="0">100</option>
<option value="1">150</option>
<option value="2">200</option>
<option value="3">300</option>
<option value="4">350</option>
<option value="5">400</option>
</select>
</select> -->
<span class="unit">mm</span>
</div>
</mat-grid-tile>
@ -226,8 +236,9 @@
</span>
<select [(ngModel)]="fireCockData[6].PropertyValue">
<option value="0">内扣式</option>
<option value="1">卡式</option>
<option value="2">螺纹式</option>
<option value="1">螺纹式</option>
<option value="2">卡式</option>
<option value="3">其他</option>
</select>
</mat-grid-tile>
<mat-grid-tile colspan='2' rowspan='1'>

3
src/app/data-collection/water-collection/water-collection.component.ts

@ -355,7 +355,8 @@ export class WaterCollectionComponent implements OnInit {
location:{x:'',y:''},
detailData:'',//详细信息
createTime:'',
creatorId:''
creatorId:'',
organizationName:''
}
this.fireCockData = [
{PropertyName :'可用状态',PropertyValue:''},

12
src/app/ui/plan-template/addKeyname.html

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-05-20 16:11:57
* @LastEditors: sueRimn
* @LastEditTime: 2021-05-20 17:05:21
* @LastEditTime: 2021-05-24 09:52:10
-->
<div class="box">
<div class="top">
@ -21,13 +21,21 @@
<div class="queryField">
<label style="margin-right: 10px;">预案级别:</label>
<mat-form-field>
<mat-select placeholder='请选择预案级别' name="unittype" [(ngModel)]="level" required>
<mat-select placeholder='请选择预案级别' name="level" [(ngModel)]="level" required>
<mat-option value="Ⅲ级">Ⅲ级</mat-option>
<mat-option value="Ⅳ级">Ⅳ级</mat-option>
<mat-option value="Ⅴ级">Ⅴ级</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField">
<label style="margin-right: 10px;">单位类型:</label>
<mat-form-field>
<mat-select placeholder='请选择单位类型' name="unittype" [(ngModel)]="unittype" required>
<mat-option *ngFor="let unit of allunittype" [value]="unit.id">{{unit.name}}</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="bottom">
<button mat-raised-button color="primary" (click)='newplan()'>确定</button>
<button mat-raised-button style="margin-left: 50px;" (click)="close()">取消</button>

22
src/app/ui/plan-template/addattinf.html

@ -0,0 +1,22 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-05-26 14:54:36
* @LastEditors: sueRimn
* @LastEditTime: 2021-05-26 15:05:10
-->
<div class="box">
<div class="top">
<span>新增分组</span>
</div>
<div class="center">
<div class="group" *ngFor="let item of addAttinf">
<mat-checkbox class="example-margin" color='primary' [(ngModel)]="item.completed" >{{item.addAttinfName}}</mat-checkbox>
</div>
</div>
<div class="bottom">
<button mat-raised-button color="primary" (click)='defineClick()'>确定</button>
<button mat-raised-button style="margin-left: 20px;" (click)="close()">取消</button>
</div>
</div>

22
src/app/ui/plan-template/addgroup.html

@ -0,0 +1,22 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-05-24 10:08:22
* @LastEditors: sueRimn
* @LastEditTime: 2021-05-25 14:11:23
-->
<div class="box">
<div class="top">
<span>新增分组</span>
</div>
<div class="center">
<div class="group" *ngFor="let item of addgtoup">
<mat-checkbox class="example-margin" color='primary' [(ngModel)]="item.completed" >{{item.groupName}}</mat-checkbox>
</div>
</div>
<div class="bottom">
<button mat-raised-button color="primary" (click)='newGroup()'>确定</button>
<button mat-raised-button style="margin-left: 20px;" (click)="close()">取消</button>
</div>
</div>

40
src/app/ui/plan-template/addgroup.scss

@ -0,0 +1,40 @@
.box{
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
.top{
width: 100%;
height: 40px;
text-align: center;
span{
font-size: 18px;
}
}
.center{
width: 100%;
height: 75%;
.group{
height: 35px;
//margin-left: 20px;
.example-margin {
margin: 0 10px;
}
input{
top: 2px;
}
span{
margin-left: 8px;
}
}
}
.bottom{
width: 100%;
margin-top: 40px;
button{
width: 80px;
height: 36px;
font-size: 16px;
}
}
}

22
src/app/ui/plan-template/dwsurvey.html

@ -0,0 +1,22 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-05-25 15:43:12
* @LastEditors: sueRimn
* @LastEditTime: 2021-05-26 09:59:04
-->
<div class="box">
<div class="top">
<span>新增分组</span>
</div>
<div class="center">
<div class="group" *ngFor="let item of addwsurvey">
<mat-checkbox class="example-margin" color='primary' [(ngModel)]="item.completed" >{{item.surveyName}}</mat-checkbox>
</div>
</div>
<div class="bottom">
<button mat-raised-button color="primary" (click)='defineClick()'>确定</button>
<button mat-raised-button style="margin-left: 20px;" (click)="close()">取消</button>
</div>
</div>

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

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-05-19 15:50:20
* @LastEditors: sueRimn
* @LastEditTime: 2021-05-20 17:03:52
* @LastEditTime: 2021-05-26 16:41:51
-->
<div class="box">
<div class="boxleft">
@ -18,17 +18,105 @@
</div>
</div>
<div class="leftbox">
<div class="leftbody" *ngFor="let item of newleftTabledata">
<div class="leftbody" [ngClass]="{'selectedTr': item.name == planName}" *ngFor="let item of newleftTabledata;let i=index" (click)='planClick(item)'>
<div class="bodyname">
<span>{{item.name}}</span>
</div>
<div class="bodycz">
<span>{{item.level}}</span>
<img src="../../../assets/images/updatehui.png">
<img src="../../../assets/images/deletehui.png">
<img [src]="item.name == planName? '../../../assets/images/update.png':'../../../assets/images/updatehui.png'" (click)='upPlan(item,i)'>
<img [src]="item.name == planName? '../../../assets/images/deleteblue.png':'../../../assets/images/deletehui.png'" (click)='deletePlan(i)'>
</div>
</div>
</div>
</div>
<div class="boxright"></div>
<div class="boxright">
<div class="righthead">
<div class="rightheadone">
<span>{{planName}}</span>
</div>
<div class="rightheadtwo">
<button mat-raised-button color="primary" (click)='addGroupClick()' style="margin-left: 60%;">新增分组</button>
<button mat-raised-button color="primary" style="margin-left: 10px;">保存</button>
</div>
</div>
<div class="rightbody">
<mat-accordion *ngFor="let item of group" multi>
<!-- 基本信息 -->
<mat-expansion-panel *ngIf="item.completed" expanded style="box-shadow: 0 0 black;border: 1px solid #EEF1F5;">
<mat-expansion-panel-header collapsedHeight='40px' expandedHeight='40px' class="panelhead">
<mat-panel-title class="paneltitle">
<div class="groupName">
<span>{{item.groupName}}</span>
</div>
<div class="addinfo" (click)='addAttribute(item.groupName)'>
<img src="../../../assets/images/update.png" style="height: 15px;margin-top: 4px;">
<span style="margin-left: 2px;">编辑</span>
</div>
<div class="delinfo" (click)='deleteGroup(item.groupName)'>
<img src="../../../assets/images/deleteblue.png" style="margin-left: 20px;height: 15px;margin-top: 4px;">
<span style="margin-left: 2px;">删除</span>
</div>
</mat-panel-title>
</mat-expansion-panel-header>
<div class="accordingin">
<mat-accordion *ngFor="let element of item.attribute">
<mat-expansion-panel *ngIf="element.completed" expanded style="box-shadow: 0 0 black;border: 1px solid #EEF1F5;height: 100%;">
<mat-expansion-panel-header collapsedHeight='50px' expandedHeight='50px' class="panelhead" style="background-color: #FFFFFF;">
<mat-panel-title style="font-size: 16px;color:#000000;" class="paneltitle">
<div class="dwgk" *ngIf="item.groupName=='单位概况'">
<div class="attname" *ngIf="item.groupName=='单位概况'">
<span>{{element.surveyName}}</span>
</div>
<div class="caozuo" *ngIf="item.groupName=='单位概况'&&(element.surveyName=='单位基本信息'||element.surveyName=='建筑信息'||element.surveyName=='进攻通道'||element.surveyName=='消防设施')">
<button mat-raised-button color="#ECF6FF"><img src="../../../assets/images/deletehui.png" (click)='delAttribute(element.surveyName)'> 删除</button>
<button mat-raised-button color="primary" style="margin-right: 10px;" (click)='addAttInfo()'><img src="../../../assets/images/addbai.png"> 新增</button>
</div>
</div>
</mat-panel-title>
</mat-expansion-panel-header>
<div class="table">
<table mat-table class="mat-elevation-z8">
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef style="width: 20%;">名称</th>
<td mat-cell *matCellDef="let element">111</td>
</ng-container>
<ng-container matColumnDef="level">
<th mat-header-cell *matHeaderCellDef style="width: 20%;">类型</th>
<td mat-cell *matCellDef="let element">111</td>
</ng-container>
<ng-container matColumnDef="default">
<th mat-header-cell *matHeaderCellDef style="width: 10%;">默认值</th>
<td mat-cell *matCellDef="let element">111</td>
</ng-container>
<ng-container matColumnDef="must">
<th mat-header-cell *matHeaderCellDef style="width: 10%;">必填</th>
<td mat-cell *matCellDef="let element">111</td>
</ng-container>
<ng-container matColumnDef="danwei">
<th mat-header-cell *matHeaderCellDef style="width: 10%;">单位</th>
<td mat-cell *matCellDef="let element">111</td>
</ng-container>
<ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef style="width: 20%;">操作</th>
<td mat-cell *matCellDef="let element" style="white-space: nowrap;cursor: pointer;">
<span style="color: red;margin-left: 4px" > 删除</span>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
</div>
</mat-expansion-panel>
</mat-accordion>
</div>
</mat-expansion-panel>
</mat-accordion>
</div>
</div>
</div>

134
src/app/ui/plan-template/plan-template.component.scss

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-05-19 15:50:20
* @LastEditors: sueRimn
* @LastEditTime: 2021-05-20 15:46:44
* @LastEditTime: 2021-05-26 16:38:06
*/
.box{
height: 97%;
@ -22,12 +22,13 @@
height: 50px;
width: 100%;
display: flex;
justify-content: space-between;
border-bottom: 1px solid #F7F8FA;
span{
font-size: 16px;
}
.leftheadone{
width: 40%;
width: 60%;
height: 100%;
span{
margin: 10px 10px;
@ -36,19 +37,19 @@
}
}
.leftheadtwo{
width: 20%;
width: 30%;
height: 100%;
margin-left: 50%;
cursor: pointer;
img{
position: relative;
top: 2px;
}
span{
//margin-left: 70%;
margin-left: 2px;
//margin: 10px 10px;
height: 50px;
line-height: 50px;
color: #2196F3;
}
}
}
@ -57,13 +58,21 @@
width: 100%;
display: flex;
flex-direction: column;
.selectedTr{
background-color: #E1F1FF;
span{
color: #2196F3;
}
}
.leftbody{
width: 100%;
height: 40px;
display: flex;
justify-content: space-between;
cursor: pointer;
.bodyname{
height: 40px;
width: 60%;
width: 70%;
span{
font-size: 16px;
height: 40px;
@ -73,16 +82,17 @@
}
.bodycz{
height: 40px;
width: 40%;
width: 30%;
img{
margin-left: 10px;
cursor: pointer;
}
span{
color: #B2BEC7;
font-size: 16px;
height: 40px;
line-height: 40px;
margin-left: 30%;
//margin-left: 30%;
}
}
}
@ -93,5 +103,113 @@
height: 100%;
width: 78%;
background-color: #FFFFFF;
display: flex;
flex-direction: column;
.righthead{
height: 50px;
width: 100%;
display: flex;
justify-content: space-between;
border-bottom: 1px solid #F7F8FA;
span{
font-size: 16px;
}
.rightheadone{
width: 50%;
height: 100%;
span{
margin: 10px 10px;
height: 50px;
line-height: 50px;
}
}
.rightheadtwo{
width: 50%;
height: 100%;
button{
//margin-left: 70%;
margin-top: 5px;
}
}
}
.rightbody{
width: 100%;
overflow: auto;
.panelhead{
background-color: #E1F1FF;
height: 50px;
.paneltitle{
width: 100%;
font-size: 16px;
color: #2196F3;
display: flex;
//justify-content: space-around;
.groupName{
width: 100px;
}
.addinfo{
height: 100%;
width: 75px;
margin-left: 75%;
span{
position: relative;
bottom: 2px;
}
}
.delinfo{
height: 100%;
width: 75px;
span{
position: relative;
bottom: 2px;
}
}
.dwgk{
height: 100%;
width: 100%;
display: flex;
.attname{
height: 100%;
width: 40%;
span{
font-size: 16px;
line-height: 50px;
height: 50px;
}
}
.caozuo{
height: 100%;
width: 60%;
button{
font-size: 16px;
width: 80px;
height: 34px;
//margin-left: 20%;
float: right;
margin-top: 8px;
}
img{
position: relative;
bottom: 2px;
}
}
}
}
}
.table{
width: 100%;
table{
width: 100%;
font-size: 16px;
th{
height: 40px;
font-size: 16px;
text-align: center;
background-color: #F7F8FA;
}
}
}
}
}
}

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

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-05-19 15:50:20
* @LastEditors: sueRimn
* @LastEditTime: 2021-05-20 17:02:03
* @LastEditTime: 2021-05-26 16:58:15
*/
import { Component, Inject, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http'
@ -25,7 +25,11 @@ export class PlanTemplateComponent implements OnInit {
}
//获取左侧单位信息
newleftTabledata=[]
newleftTabledata=[
{name:"333",level:'Ⅲ级',unitid: "5e7c49e861550e2754d461ce",group:[]},//{groupName: "单位概况"}
{name:"444",level:'Ⅳ级',unitid: "5e7c49e861550e2754d461ce",group:[]}
]
group=[]
getLeftdata(){
/* this.http.get("/api/PlanTemplate").subscribe((data:any)=>{
this.leftTabledata=data
@ -34,17 +38,174 @@ export class PlanTemplateComponent implements OnInit {
}
//新建预案弹窗
addKeyunit(){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
const dialogRef = this.dialog.open(addPlanname, {//调用open方法打开对话框并且携带参数过去
width: '340px',
height:'380px',
disableClose:true,
data:{plandata:this.newleftTabledata}
});
dialogRef.afterClosed().subscribe(result => {
//console.log(result)
if(result!=undefined){
this.newleftTabledata.push(result)
for(var i=0;i<this.newleftTabledata.length-2;i++){
if(this.newleftTabledata[i].name==result.name){
this.newleftTabledata.splice(this.newleftTabledata.length-1,1)
}
}
}
});
}
//删除预案
deletePlan(i){
let isTrue = confirm('您确定要删除该条预案吗')
if(isTrue){
this.newleftTabledata.splice(i,1)
}
}
//修改预案名称和级别
upPlan(item,i){
const dialogRef = this.dialog.open(upPlanname, {//调用open方法打开对话框并且携带参数过去
width: '340px',
height:'330px',
disableClose:true
disableClose:true,
data:{item:item}
});
dialogRef.afterClosed().subscribe(result => {
this.newleftTabledata.push(result)
console.log(this.newleftTabledata);
console.log(result)
if(result!=undefined){
this.newleftTabledata[i].name=result.name
this.newleftTabledata[i].level=result.level
}
});
}
//左侧预案模板点击事件
planName
planClick(item){
//console.log(item)
this.planName=item.name
this.newleftTabledata.forEach((value,index,array)=>{
if(array[index].name==this.planName){
this.group=array[index].group
}
})
}
//右侧新增分组点击事件
addGroupClick(){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
if(this.planName==undefined){
this.snackBar.open('请选择预案模板!','确定',config);
}else{
this.newleftTabledata.forEach((value,index,array)=>{
if(array[index].name==this.planName){
this.group=array[index].group
}
})
const dialogRef = this.dialog.open(addGroup, {//调用open方法打开对话框并且携带参数过去
width: '240px',
height:'590px',
disableClose:true,
data:this.group
});
dialogRef.afterClosed().subscribe(result => {
//console.log(result,this.newleftTabledata)
this.newleftTabledata.forEach((value,index,array)=>{
if(array[index].name==this.planName){
if(result!=undefined){
result.forEach((valuer,i,rarr) => {
//console.log(valuer)
/* let groupName={
groupName:valuer
} */
//添加分组名称
array[index].group=rarr
});
}
//去重
for(var i=0;i<array[index].group.length;i++){
for(var j=i+1;j<array[index].group.length;j++){
if(array[index].group[i].groupName==array[index].group[j].groupName){
array[index].group.splice(j,1)
}
}
}
this.group=array[index].group
}
//console.log(this.group)
})
});
}
//console.log(this.newleftTabledata)
}
//删除分组
deleteGroup(groupName){
//console.log(this.group)
let isTrue = confirm('您确定要删除分组吗')
if(isTrue){
this.group.forEach((element,index,array)=>{
if(array[index].groupName==groupName){
this.group.splice(index,1)
}
})
}
}
//新增属性
addAttribute(groupName){
if(groupName=='单位概况'){
const dialogRef = this.dialog.open(adddwsurvey, {//调用open方法打开对话框并且携带参数过去
width: '240px',
height:'510px',
disableClose:true,
data:this.group
});
dialogRef.afterClosed().subscribe(result => {
//console.log(result)
if(result!=undefined){
this.group.forEach((value,index,array)=>{
if(array[index].groupName=='单位概况'){
array[index].attribute=result
}
})
}
//console.log(this.newleftTabledata)
});
}
}
//删除具体属性
delAttribute(surveyName){
}
//新增属性信息
addAttInfo(){
const dialogRef = this.dialog.open(addattinf, {//调用open方法打开对话框并且携带参数过去
width: '240px',
height:'400px',
disableClose:true,
data:this.group
});
dialogRef.afterClosed().subscribe(result => {
console.log(result)
if(result!=undefined){
/* this.group.forEach((value,index,array)=>{
if(array[index].groupName=='单位概况'){
array[index].attribute=result
}
}) */
}
console.log(this.newleftTabledata)
});
}
//单位基本信息和建筑信息表格
displayedColumns: string[] = ['name','level','default','must', 'danwei','operation'];
}
//新建预案
@ -57,11 +218,73 @@ export class addPlanname{
constructor(private http: HttpClient,public dialogRef: MatDialogRef<addPlanname>,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {}
unitname//预案名称
level//预案级别
unittype//单位类型
allunittype//所有单位信息
ngOnInit(): void {
this.getUnittype()
}
//获取单位类型
getUnittype(){
this.http.get("/api/BasicCategories").subscribe((data:any)=>{
this.allunittype=data
//console.log(data)
})
}
//取消按钮
close(){
this.dialogRef.close();
}
newplan(){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
if(this.unitname==undefined||this.unitname==''){
this.snackBar.open('请输入预案名称!','确定',config);
}
else if(this.level==undefined||this.level==''){
this.snackBar.open('请输入预案级别!','确定',config);
}else if(this.unittype==undefined||this.unittype==''){
this.snackBar.open('请选择单位类型!','确定',config);
}
else{
for(var i=0;i<this.data.plandata.length;i++){
if(this.data.plandata[i].name==this.unitname){
this.snackBar.open('预案名称重复,请重新建立预案模板!','确定',config);
this.unitname==''
this.level==''
this.unittype==''
}
}
let planData={
name:this.unitname,
level:this.level,
unitid:this.unittype,
group:[]
}
this.dialogRef.close(planData)
}
}
}
//修改预案名称和级别
@Component({
selector: 'upPlanname',
templateUrl: './upPlan.html',
styleUrls: ['./addKeyname.scss']
})
export class upPlanname{
constructor(private http: HttpClient,public dialogRef: MatDialogRef<addPlanname>,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {}
unitname=this.data.item.name//预案名称
level=this.data.item.level//预案级别
ngOnInit(): void{
/* this.unitname=this.data.name
this.level=this.data.level */
}
//取消按钮
close(){
this.dialogRef.close();
}
//确定按钮
upplan(){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
@ -79,3 +302,126 @@ export class addPlanname{
}
}
}
//新增分组
@Component({
selector: 'addGroup',
templateUrl: './addgroup.html',
styleUrls: ['./addgroup.scss']
})
export class addGroup{
constructor(private http: HttpClient,public dialogRef: MatDialogRef<addPlanname>,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {}
addgtoup=[
{groupName:'单位概况',completed:false},{groupName:'灾情设定',completed:false},{groupName:'力量调集',completed:false},
{groupName:'组织指挥',completed:false},{groupName:'作战行动',completed:false},{groupName:'社会联动',completed:false},
{groupName:'勤务保障',completed:false},{groupName:'特别警示',completed:false},{groupName:'辅助决策',completed:false},
{groupName:'交通水源',completed:false},{groupName:'重点图示',completed:false},{groupName:'预案附件',completed:false}
]
groupName=[]
ngOnInit(): void{
//console.log(this.data)
/* this.addgtoup.forEach((value,index,array)=>{
this.data.forEach(element => {
if(element.groupName==array[index].groupName){
array[index].completed=true
}
});
}) */
if(this.data.length>0){
this.addgtoup=this.data
}
}
//取消按钮
close(){
this.dialogRef.close();
}
//复选框点击事件
checkClick(e,item){
//console.log(e,item)
if (e.checked) {
this.groupName.push(item)
}else {
this.groupName.forEach((value,index,array)=>{
if(value==item){
this.groupName.splice(index,1)
}
})
}
//console.log(this.groupName)
}
//确定提交
newGroup(){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.addgtoup.forEach((value,index,arraay)=>{
if(arraay[index].completed){
this.groupName.push(arraay[index].groupName)
}
})
for(var i=0;i<this.groupName.length;i++){
for(var j=i+1;j<this.groupName.length;j++){
if(this.groupName[i]==this.groupName[j]){
this.groupName.splice(j,1)
}
}
}
this.dialogRef.close(this.addgtoup)
}
}
//单位概况新增弹窗
@Component({
selector: 'adddwsurvey',
templateUrl: './dwsurvey.html',
styleUrls: ['./addgroup.scss']
})
export class adddwsurvey{
constructor(private http: HttpClient,public dialogRef: MatDialogRef<addPlanname>,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {}
addwsurvey=[
{surveyName:'单位基本信息',completed:false},{surveyName:'建筑信息',completed:false},{surveyName:'四周毗邻',completed:false},
{surveyName:'消防设施',completed:false},{surveyName:'进攻通道',completed:false},{surveyName:'重点部位',completed:false},
{surveyName:'功能分区',completed:false},{surveyName:'行车路线',completed:false},{surveyName:'千米水源',completed:false},{surveyName:'实景图',completed:false}
]
ngOnInit(): void{
console.log(this.data)
this.data.forEach(element => {
if(element.groupName=='单位概况'&&element.attribute!=undefined){
this.addwsurvey=element.attribute
}
});
}
//取消按钮
close(){
this.dialogRef.close();
}
//确定按钮
defineClick(){
this.dialogRef.close(this.addwsurvey)
}
}
//编辑属性信息弹窗
@Component({
selector: 'addattinf',
templateUrl: './addattinf.html',
styleUrls: ['./addgroup.scss']
})
export class addattinf{
constructor(private http: HttpClient,public dialogRef: MatDialogRef<addPlanname>,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {}
addAttinf=[
{addAttinfName:'统一社会信用代码',completed:false,level:'单行文本',default:'-',must:'是',danwei:'-'},
{addAttinfName:'单位类型',completed:false,level:'单行文本',default:'-',must:'是',danwei:'-'},
{addAttinfName:'联系人',completed:false,level:'单行文本',default:'-',must:'是',danwei:'-'},
{addAttinfName:'联系电话',completed:false,level:'单行文本',default:'-',must:'是',danwei:'-'},
{addAttinfName:'辖区中队',completed:false,level:'单行文本',default:'-',must:'是',danwei:'-'},
{addAttinfName:'单位地址',completed:false,level:'单行文本',default:'-',must:'是',danwei:'-'},
{addAttinfName:'单位照片',completed:false,level:'单行文本',default:'-',must:'是',danwei:'-'}
]
//取消按钮
close(){
this.dialogRef.close();
}
//确定按钮
defineClick(){
this.dialogRef.close(this.addAttinf)
}
}

43
src/app/ui/plan-template/upPlan.html

@ -0,0 +1,43 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-05-21 10:43:28
* @LastEditors: sueRimn
* @LastEditTime: 2021-05-21 11:05:14
-->
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-05-20 16:11:57
* @LastEditors: sueRimn
* @LastEditTime: 2021-05-20 17:05:21
-->
<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="请输入预案名称" name="companyName" autocomplete="off" [(ngModel)]="unitname" required>
</mat-form-field>
</div>
<div class="queryField">
<label style="margin-right: 10px;">预案级别:</label>
<mat-form-field>
<mat-select placeholder='请选择预案级别' name="unittype" [(ngModel)]="level" required>
<mat-option value="Ⅲ级">Ⅲ级</mat-option>
<mat-option value="Ⅳ级">Ⅳ级</mat-option>
<mat-option value="Ⅴ级">Ⅴ级</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="bottom">
<button mat-raised-button color="primary" (click)='upplan()'>确定</button>
<button mat-raised-button style="margin-left: 50px;" (click)="close()">取消</button>
</div>
</div>

7
src/app/ui/ui.module.ts

@ -86,6 +86,11 @@ import {CollectionToolsBuildingComponent,CreateBuildingBuilding,EditBuildingBuil
import {leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent} from './collection-tools-building/leftFunctionalDomain';
import { PlanTemplateComponent } from './plan-template/plan-template.component'
import { addPlanname } from './plan-template/plan-template.component'
import { upPlanname } from './plan-template/plan-template.component'
import { addGroup } from './plan-template/plan-template.component'
import { adddwsurvey } from './plan-template/plan-template.component'
import { addattinf } from './plan-template/plan-template.component'
@NgModule({
declarations: [UiComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent,
IsnoPipe,ConfirmpswDirective,DialogOverviewExampleDialog,CreateAuthority,CreateRole,TimePipe,CreateNewUser,EditNewUser,allRoles,EditRole,CreateOrganization,EditOrganization,
@ -96,7 +101,7 @@ import { addPlanname } from './plan-template/plan-template.component'
addBuiltInAttributeComponent,addOptionalComponent,addOptionalAttributeComponent,editBuiltInAttributeComponent,editOptionalAttributeComponent, CollectionToolsComponent,WorkingAreaComponent,
CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,saveOneDialog,saveTwoDialog,addDisposalNodeComponent,editDisposalNodeComponent,CollectionToolsPlanComponent,
CreateBuildingPlan,EditBuildingPlan,leftFunctionalDomainComponentPlan,editPlaneFigureComponentPlan,addOffices,editOffices,addBGCDisposalNodeComponent,CollectionToolsBuildingComponent,CreateBuildingBuilding,
EditBuildingBuilding,leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent,Organization, PlanTemplateComponent,addPlanname],
EditBuildingBuilding,leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent,Organization, PlanTemplateComponent,addPlanname,upPlanname,addGroup,adddwsurvey,addattinf],
imports: [
CommonModule,

BIN
src/assets/images/addbai.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Loading…
Cancel
Save