邵佳豪 3 years ago
parent
commit
f616ae24be
  1. 46
      src/app/plan-management/create-plan-online-five/Disaster.html
  2. 80
      src/app/plan-management/create-plan-online-five/addKeyname.scss
  3. 113
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html
  4. 173
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss
  5. 220
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts
  6. 27
      src/app/plan-management/create-plan-online-five/newTitle.html
  7. 5
      src/app/plan-management/plan-management.module.ts
  8. 3
      src/app/statistic-analysis/home/home.component.ts
  9. 38
      src/app/ui/plan-template/plan-template.component.html
  10. 16
      src/app/ui/plan-template/plan-template.component.scss
  11. 172
      src/app/ui/plan-template/plan-template.component.ts
  12. BIN
      src/assets/images/downpaixu.png
  13. BIN
      src/assets/images/routleft.png
  14. BIN
      src/assets/images/toppaixu.png

46
src/app/plan-management/create-plan-online-five/Disaster.html

@ -0,0 +1,46 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-06-02 15:15:15
* @LastEditors: sueRimn
* @LastEditTime: 2021-09-02 15:10:45
-->
<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>
<mat-select placeholder='请选择类型' name="level" [(ngModel)]="level" required>
<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-select>
</mat-form-field>
</div>
<div class="queryField">
<label style="margin-right: 10px;">名称:</label>
<mat-form-field class="example-full-width">
<input matInput placeholder="请输入表头名称" [(ngModel)]="headName" autocomplete="off" 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)]="lieNumber" autocomplete="off" required min="1">
</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)]="hNumber" autocomplete="off" required min="1">
</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>

80
src/app/plan-management/create-plan-online-five/addKeyname.scss

@ -0,0 +1,80 @@
.box{
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
}
.queryField {
margin: 3px 5px;
input {
width: 100%;
height: 18px;
line-height: 18px;
border-radius: 3px;}
button{
width: 140px;
font-size: 16px;
}
}
.top{
width: 100%;
margin-bottom: 20px;
span{
color: #2196F3;
margin-left: 100px;
font-size: 18px;
}
}
.bottom{
margin: 10% 30px;
/* margin-bottom: 10%;
margin-left: 30px;
margin-right: 30px; */
button{
width: 80px;
height: 36px;
font-size: 16px;
}
}
.fileinput-button {
width: 148px;
height: 36px;
top: 10px;
position: relative;
display: inline-block;
overflow: hidden;
background-color: #2196F3;
color: #FFFFFF;
font-size: 16px;
}
.fileinput-button input{
position: absolute;
right: 0px;
top: 0px;
opacity: 0;
-ms-filter: 'alpha(opacity=0)';
}
.uping{
display:flex;
.upclass{
margin-left: 3px;
height: 30px;
}
.progress{
position: relative;
top:3%
}
button{
width: 80px;
height: 30px;
font-size: 10px;
margin-top: 5px;
}
span{
font-size: 10px;
position: relative;
top: 8px;
}
}

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

@ -2,9 +2,12 @@
<div class="titlebox" *ngIf="pattern == 'edit'">
<div class="titleitembox" cdkDropList cdkDropListOrientation="horizontal" (cdkDropListDropped)="drop($event)">
<div cdkDrag class="item" *ngFor="let item of planTemplateData;let key = index" (click)="clickTitleItem(item)"
[ngClass]="{'selectedItem': selectedItem == item.groupName}" [title]="item.groupName"
[ngClass]="{'selectedItem': selectedItem == item.groupName||item.groupName=='新建'}" [title]="item.groupName"
[cdkDragDisabled]="item.groupName == '封面'">
{{key + 1}}.{{item.groupName}}
<img src="../../../assets/images/add.png" *ngIf="item.groupName=='新建'">
{{item.groupName!='新建'?key + 1:''}}.{{item.groupName}}
<img style="height: 38%;" src="../../../assets/images/update.png" *ngIf="item.new!=undefined" (click)='upName(key,item.groupName)' >
<img style="height: 38%;margin-left: 2px;" src="../../../assets/images/deleteblue.png" *ngIf="item.new!=undefined" (click)='delName(key)' >
</div>
</div>
<div class="btnbox">
@ -22,8 +25,8 @@
<div class="contentbox" [ngClass]="{'noPadding': pattern == 'look'}">
<div class="leftbox"
*ngIf="pattern == 'edit' && (selectedItem == '重点图示' || selectedItem == '交通水源' || selectedItem == '预案附件' || selectedItem == '单位概况')">
<div *ngIf="selectedItem == '重点图示'" class="leftKeyImg">
*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">
<div class="keyImgTitle">
重点图示
</div>
@ -259,7 +262,7 @@
<!-- 模板页面 -->
<div *ngFor="let item of planTemplateData;let key = index">
<div *ngIf="selectedItem == item.groupName || pattern == 'look'">
<div *ngIf="(selectedItem == item.groupName || pattern == 'look')&&item.groupName!='新建'">
<!-- 封面 -->
<div class="cover" *ngIf="item.groupName == '封面' && pattern == 'edit'" id="cover">
<p class="planNum">
@ -425,20 +428,21 @@
</div>
</div>
<div class="centerBox"
*ngIf="item.groupName!='单位概况'&&item.groupName!='交通水源'&&item.groupName!='重点图示'&&item.groupName!='预案附件'&&item.groupName!='特别警示'&&item.groupName!='处置要点'&&item.groupName!='封面'">
*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>
</div>
<div class="boxBody" *ngFor="let element of item.attribute;let i=index" style="height: 100%;
width: 100%;
display: flex;
flex-direction: column;">
<div class="boxBodyHead" style="width: 100%;
height: 40pt;
background-color: #FFD91D;
background-color: #FFFBE8;
text-align: center;">
<span style="font-size: 16px;
text-align: center;
@ -557,6 +561,95 @@
</div>
</div>
</div>
<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'">
</div>
<div class="attack" *ngFor="let element of item.attribute;let attributei=index">
<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'"
(click)='delTd(key,attributei)'>
<img src="../../../assets/images/add.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"
placeholder="请输入内容" [(ngModel)]="element.tableth[tablethi]"></th>
</thead>
<tbody *ngIf="pattern == 'edit'">
<tr *ngFor="let itemtr of element.tabletr">
<td
*ngFor="let itemtd of itemtr.tabletd;let tabletdi=index;TrackBy:trackByFn">
<input type="text" placeholder="请输入"
[(ngModel)]="itemtr.tabletd[tabletdi]">
</td>
</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">
<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: 40%;"
[(ngModel)]="itemthj.head">
<input type="text" placeholder="请输入内容" style="width: 60%;" [(ngModel)]="itemthj.body">
</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">
<div class="keyImgTitle" style="height: 30px;
position: relative;">
</div>
<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)="delImg(key,attributei,imgkey)">delete
</mat-icon>
<img style="max-width: 100%;
width: auto;
height: auto;" [src]="imgUrl" alt="">
</div>
<div class="uploadBtn" *ngIf="pattern == 'edit'">
<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 class="attackRight" *ngIf="pattern == 'edit'">
<div class="rightButton">
<button mat-raised-button color="primary" (click)='attackAdd(item.groupName,attributei,element.level)'
*ngIf="element.level==1"><img src="../../../assets/images/addbai.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>
</div>
<div class="keyImg"
*ngIf="item.groupName == '重点图示' || item.groupName == '交通水源' || item.groupName == '预案附件'">
<div class="titleItem" style="width: 100%;
@ -718,7 +811,7 @@
<div *ngFor="let attack of element.attinf;let attacki=index">
<div class="attackhead" style=" width: 100%;
height: 40px;
background-color: #ffd91d;
background-color: #FFFBE8;
text-align: center;">
<span style="font-size: 16px;
text-align: center;
@ -831,7 +924,7 @@
<div *ngIf="attack.completed">
<div class="fileHead" style="height: 40px;
width: 100%;
background-color: #ffd91d;
background-color: #FFFBE8;
text-align: center;">
<span style="font-size: 16px;
text-align: center;
@ -914,7 +1007,7 @@
<div *ngFor="let parts of element.attinf;let infoi=index">
<div class="partsHead" style="width: 100%;
height: 40px;
background-color: #ffd91d;
background-color: #FFFBE8;
text-align: center;">
<input type="text" placeholder="请输入内容" [(ngModel)]="parts.heafName" *ngIf="pattern == 'edit'">
<textarea [(ngModel)]="parts.heafName" *ngIf="pattern == 'look'" style="width: 100%;height: 100%;color: #b99a00;" disabled></textarea>

173
src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss

@ -40,6 +40,10 @@
white-space: nowrap; /*不换行*/
text-overflow: ellipsis; /*超出部分文字以...显示*/
user-select: none;
img{
position: relative;
top: 3px;
}
}
.item:hover {
background: #e8f4fe;
@ -464,7 +468,7 @@
.boxBodyHead {
width: 100%;
height: 40px;
background-color: #ffd91d;
background-color: #FFFBE8;
text-align: center;
span {
font-size: 16px;
@ -727,7 +731,7 @@
.attackhead {
width: 100%;
height: 40px;
background-color: #ffd91d;
background-color: #FFFBE8;
text-align: center;
span {
font-size: 16px;
@ -829,7 +833,7 @@
.fileHead{
height: 40px;
width: 100%;
background-color: #ffd91d;
background-color: #FFFBE8;
text-align: center;
span {
font-size: 16px;
@ -892,14 +896,14 @@
.partsHead{
width: 100%;
height: 40px;
background-color: #ffd91d;
background-color: #FFFBE8;
text-align: center;
input{
height: 40px;
font-size: 16px;
border: none;
outline: none;
background-color: #ffd91d;
background-color: #FFFBE8;
color: #b99a00;
}
img {
@ -1003,9 +1007,126 @@
width: 100%;
height: 36px;
line-height: 36px;
background-color: #2196F3;
background-color: #e1f1ff;
text-align: center;
color: white;
input {
background-color: #e1f1ff;
color: #2196F3;
text-align: center;
height: 100%;
width: 90%;
font-size: 16px;
border: none;
outline: none;
}
img{
height: 60%;
position: relative;
top: 4px;
cursor: pointer;
}
}
.attack {
width: 100%;
display: flex;
flex-direction: row;
.attackLeft {
width: 70%;
display: flex;
flex-direction: column;
.attackleftHead {
width: 100%;
height: 40px;
background-color: #FFFBE8;
input {
background-color: #FFFBE8;
color: #b99a00;
text-align: center;
height: 100%;
width: 90%;
font-size: 16px;
border: none;
outline: none;
}
img{
height: 50%;
position: relative;
top: 3px;
cursor: pointer;
}
}
.attackleftTable {
width: 100%;
thead,
table {
width: 100%;
border-collapse: collapse;
//background-color: #E8E9E9;
}
th {
//background-color: #E8E9E9;
border: 1px solid #999;
height: 40px;
font-size: 16px;
text-align: center;
input {
background-color: #e8e9e9;
text-align: center;
height: 100%;
width: 100%;
font-size: 16px;
border: none;
outline: none;
}
}
td {
border: 1px solid #999;
height: 40px;
font-size: 16px;
text-align: center;
input {
background-color: #ffffff;
text-align: center;
height: 100%;
width: 100%;
font-size: 16px;
border: none;
outline: none;
}
}
textarea {
width: 100%;
}
.inputtext {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
input {
//width: 100%;
height: 40px;
font-size: 16px;
border: none;
outline: none;
}
.inputj {
width: 100%;
height: 100%;
display: flex;
}
}
}
}
.attackRight {
width: 30%;
.rightButton{
float: right;
margin-top: 20px;
margin-right: 8%;
//margin-left: 40%;
}
}
}
}
.toolDiv{
@ -1081,7 +1202,7 @@
width: 100%;
height: 40px;
margin-top: 3%;
background-color: #ffd91d;
background-color: #FFFBE8;
text-align: center;
span {
font-size: 16px;
@ -1212,6 +1333,44 @@
}
}
}
.titlebox{
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
border-radius: 10px;
.top{
width: 100%;
height: 30px;
text-align: center;
span{
line-height: 30px;
}
}
.queryField{
width: 100%;
height: 50px;
input{
width: 260px;
height: 40px;
background: #F2F4F5;
border: 1px solid #E8E9E9;
border-radius: 6px;
margin-top: 10px;
outline: none;
}
}
.bottom{
width: 100%;
height: 100%;
button{
width: 100px;
height: 40px;
font-size: 16px;
margin-top: 20px;
}
}
}
.cdk-drag-preview {
height: 36px;

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

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-06-16 13:56:54
* @LastEditors: sueRimn
* @LastEditTime: 2021-08-27 15:27:29
* @LastEditTime: 2021-09-06 17:02:53
*/
import { HttpClient } from '@angular/common/http';
import { Component, Inject, OnInit, Renderer2, ViewChild, Input } from '@angular/core';
@ -66,6 +66,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
}
this.getUnitData()
this.getOrganizations()
}
zdysearch = ''
organizationName: any //当前单位组织机构名称
@ -243,6 +244,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
selectedItem: string = '封面'
selectedContent:any
async clickTitleItem(item) {
//this.planTemplateData[key].new=true
this.selectedContent = item
this.addNumber = -1
this.yinruData = {
@ -367,7 +369,46 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
//this.getAllBuildings()
} */ else if (this.selectedItem == '') {
this.getTwoDPlanList()
}else if(this.selectedItem == '新建'){
const dialogRef = this.dialog.open(newTitle, {//调用open方法打开对话框并且携带参数过去
width: '300px',
height:'190px',
disableClose:true,
data:{type:'新建',planTemplateData:this.planTemplateData}
});
dialogRef.afterClosed().subscribe(result => {
console.log(result)
if(result!=undefined){
//delete this.planTemplateData[this.planTemplateData.length-1]
this.planTemplateData[this.planTemplateData.length-1]={attribute:[],completed: true, groupName: result,new:false,headName:'自定义名称'}
this.planTemplateData.push({completed: true,groupName: '新建'})
//delete this.planTemplateData[this.planTemplateData.length-3]
}
//JSON.parse(JSON.stringify(this.planTemplateData))
console.log(this.planTemplateData)
});
}
}
//自定义模块改名
upName(index,name){
const dialogRef = this.dialog.open(newTitle, {//调用open方法打开对话框并且携带参数过去
width: '300px',
height:'190px',
disableClose:true,
data:{type:'修改',planName:name,planTemplateData:this.planTemplateData}
});
dialogRef.afterClosed().subscribe(result => {
this.planTemplateData[index].groupName=result
});
}
//自定义模块删除
delName(index){
let isTrue = confirm('您确定要删除该项吗')
if(isTrue){
this.planTemplateData.splice(index,1)
console.log(this.planTemplateData)
}
}
drop(event: CdkDragDrop<string[]>) {
@ -559,6 +600,11 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
}
}
});
if(this.planLevel=='4'){
this.planTemplateData.push({completed: true,groupName: '新建'})
}
console.log(this.planTemplateData)
})
}
@ -1035,9 +1081,10 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
imgArr.splice(imgkey, 1)
}
}
//重点图示上传图片
filechange(e, i) {
// console.log(i)
console.log(i)
let file = e.target.files[0] || null //获取上传的文件
let fileSize = file.size || null //上传文件的总大小
let maxSize = 5 * 1024 * 1024 //5MB一个分片
@ -1063,6 +1110,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
})
}
console.log(this.planTemplateData)
}
//单位相关数据
unitId: any = this.route.snapshot.queryParams.companyId
@ -1351,6 +1399,87 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
}
//新增功能(社会联动等引用)
searchType = '0'
//打开自定义新增具体内容
tuTrue=false
addAttribute(groupName,key){
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)
});
}
//自定义内容删除一条数据
delDisaster(name,i){
let isTrue = confirm('您确定要删除该条信息吗')
if(isTrue){
this.planTemplateData.forEach((value,index,array)=>{
if (array[index].groupName==name) {
this.planTemplateData[index].attribute.splice(i,1)
}
})
}
}
//自定义添加表格数据
attackAdd(name,i,level){
//console.log(name,i)
this.planTemplateData.forEach((value,index,array)=>{
if (array[index].groupName==name) {
if(level==1){
this.planTemplateData[index].attribute[i].tableth.push('')
}else if(level==2){
this.planTemplateData[index].attribute[i].tableth.push({head:'',body:''})
}
}
})
//console.log(this.newleftTabledata)
}
//自定义模块删除一张图片
delImg(key,attributei,imgkey){
let isDelete = window.confirm('确定要删除该分组吗?分组下内容将一同被删除!')
if (isDelete) {
this.planTemplateData[key].attribute[attributei].tableth.json.splice(imgkey,1)
}
}
//鼠标移入图片显示
showTu(key){
this.planTemplateData[key].new=true
}
}
@ -1445,3 +1574,90 @@ export class yinYong {
}
}
//新建模板
@Component({
selector: 'newTitle',
templateUrl: './newTitle.html',
styleUrls: ['./create-plan-online-five.component.scss']
})
export class newTitle{
constructor(private http: HttpClient,public dialogRef: MatDialogRef<newTitle>,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {}
ngOnInit(){
console.log(this.data)
if(this.data.planName!=undefined){
this.planname=this.data.planName
}
}
planname//预案名称
//取消按钮
close(){
this.dialogRef.close();
}
//确定按钮
planName(){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
if(this.planname==''||this.planname==undefined){
this.snackBar.open('请输入名称', '确定', config);
}else{
this.data.planTemplateData.forEach(element => {
if(element.groupName==this.planname){
this.snackBar.open('您输入的名称重复', '确定', config);
this.planname=undefined
this.dialogRef.close();
return
}
});
this.dialogRef.close(this.planname);
}
}
}
//新建模块新增具体内容
@Component({
selector: 'disaster',
templateUrl: './Disaster.html',
styleUrls: ['./addKeyname.scss']
})
export class disaster{
constructor(private http: HttpClient,public dialogRef: MatDialogRef<disaster>,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {}
ngOnInit(): void{
//console.log(this.data)
}
level//类型
headName//表头名称
lieNumber//列数
hNumber//行数
//取消按钮
close(){
this.dialogRef.close();
}
//确定按钮
newdisaster(){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
if(this.level==undefined||this.level==''){
this.snackBar.open('请选择类型!','确定',config);
}else if(this.headName==undefined||this.headName==''){
this.snackBar.open('请输入表头名称!','确定',config);
}else{
let tree={
json:[],
name: ''
}
let attrubute={
headName:this.headName,
level:this.level,
tableth:this.level==1||this.level==2?[]:this.level==3?'':tree,
lieNumber:this.lieNumber,
hNumber:this.hNumber,
imgArr: []
}
this.dialogRef.close(attrubute);
}
}
}

27
src/app/plan-management/create-plan-online-five/newTitle.html

@ -0,0 +1,27 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-09-03 15:03:40
* @LastEditors: sueRimn
* @LastEditTime: 2021-09-04 14:34:47
-->
<div class="titlebox">
<div class="top">
<span style="font-size: 20px;">{{data.type=='新建'?'新建':'更改'}}</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)]="planname" required>
</mat-form-field>
</div> -->
<div class="queryField">
<input type="text" placeholder="请输入名称" [(ngModel)]="planname">
</div>
<div class="bottom">
<button mat-raised-button color="primary" (click)='planName()'>确定</button>
<button mat-raised-button style="margin-left: 50px;" (click)="close()">取消</button>
</div>
</div>

5
src/app/plan-management/plan-management.module.ts

@ -70,11 +70,14 @@ import { UiModule } from '../ui/ui.module';
import { TreeDiagramModule } from '../ui/ng-tree-diagram/src/ng-tree-diagram';
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'
@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],
typeAuditResult, MaintainUpComponent, GkPsViewer, GkhtmlPsViewer, UnitInfo, ReinforcePlanComponent, state, ImgDetails, CreatePlanOnlineFiveComponent, CreatePlanOnlineThreeComponent,
OpenPlanToolDialog,yinYong,newTitle,disaster],
imports: [
CommonModule,
PlanManagementRoutingModule,

3
src/app/statistic-analysis/home/home.component.ts

@ -350,8 +350,11 @@ export class HomeComponent implements OnInit {
this.addydata = []
this.addtable = JSON.parse(JSON.stringify(this.emitService.allDate))
this.addtable[0].organizationStatistics.organizations.forEach((value, index, array) => {
if(array[index].organizationId!='5687316efa75479d96c0091a167a3b84'&&array[index].organizationName!='上海总队'){
this.addxdata.push(array[index].organizationName)
this.addydata.push(array[index].count)
}
});
let chartDwsjcjOptionsZhi = {
// 标题

38
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-07-02 14:46:11
* @LastEditTime: 2021-09-10 10:33:07
-->
<div class="box">
<div class="boxleft">
@ -48,20 +48,24 @@
<div class="rightbody">
<mat-accordion *ngFor="let item of group;let zi=index;TrackBy:trackByFn" multi>
<!-- 基本信息 -->
<mat-expansion-panel expanded (opened)='groupPanle=true' *ngIf="item.completed" style="box-shadow: 0 0 black;border: 1px solid #EEF1F5;" [disabled]='groupPanle==true'>
<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-header collapsedHeight='40px' expandedHeight='40px' class="panelhead">
<mat-panel-title class="paneltitle">
<div style="width: 100%;height: 100%;display: flex;">
<div class="groupName">
<!-- <img src="../../../assets/images/routleft.png" *ngIf="openKey!=zi">
<img src="../../../assets/images/routdown.png" *ngIf="openKey==zi" style="position: relative;bottom: 2px;"> -->
<span>{{item.groupName}}</span>
</div>
<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)'>
<img src="../../../assets/images/update.png" style="height: 15px;margin-top: 4px;">
<img src="../../../assets/images/update.png" style="height: 15px;margin-top: 4px;margin-left: 5px;">
<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;">
<img src="../../../assets/images/deleteblue.png" style="margin-left: 10px;height: 15px;margin-top: 4px;">
<span style="margin-left: 2px;">删除</span>
</div>
</div>
@ -73,7 +77,7 @@
</mat-expansion-panel-header>
<!--单位概况-->
<div class="accordingin" *ngIf="item.groupName=='单位概况'">
<mat-accordion *ngFor="let element of item.attribute">
<mat-accordion *ngFor="let element of item.attribute;let suri=index">
<mat-expansion-panel expanded *ngIf="element.completed" expanded style="box-shadow: 0 0 black;border: 1px solid #EEF1F5;height: 100%;" [disabled]='groupPanle==true'>
<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">
@ -85,6 +89,8 @@
<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>
<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>
</div>
@ -131,11 +137,14 @@
<th style="width: 30%;">操作</th>
</thead>
<tbody>
<tr *ngFor="let attinf of element.attinf">
<tr *ngFor="let attinf of element.attinf;let attfi=index">
<td *ngIf="attinf.completed" style="width: 30%;">{{attinf.propertyName}}</td>
<td *ngIf="attinf.completed" style="width: 30%;">
{{attinf.propertyType==0?'单行文本':attinf.propertyType==1?'多行文本':'数值'}}</td>
<td *ngIf="attinf.completed" style="width: 30%;"><span
<td *ngIf="attinf.completed" style="width: 30%;cursor: pointer;">
<img src="../../../assets/images/toppaixu.png" alt="" style="height: 15px;position: relative;top: 3px;" (click)='threeTop(zi,suri,attfi)'>
<img src="../../../assets/images/downpaixu.png" alt="" style="height: 15px;position: relative;top: 3px;left: 1px;margin-right: 1px;" (click)='threeDown(zi,suri,attfi)'>
<span
style="color: #FF5D4A;margin-left: 4px;cursor: pointer;"
(click)='delAttInfo(item.groupName,element.surveyName,attinf.propertyName)'> 删除</span></td>
</tr>
@ -149,7 +158,7 @@
style="box-shadow: 0 0 black;border: 1px solid #EEF1F5;height: 100%;"
[disabled]='groupPanle==true'>
<mat-expansion-panel-header collapsedHeight='50px' expandedHeight='50px' class="panelhead"
style="background-color: #FFD91D;">
style="background-color: #FFFBE8;">
<mat-panel-title class="paneltitle">
<div class="dwgk">
<div class="attname">
@ -162,6 +171,9 @@
<button mat-raised-button color="primary" style="margin-right: 10px;"
(click)='fileAdd(attinf.facilityItems,i)'><img src="../../../assets/images/addbai.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)'>
</div>
</div>
</mat-panel-title>
@ -180,8 +192,10 @@
<td *ngIf="facilityItems.completed!=null&&facilityItems.completed" style="width: 30%;">
文本类型</td>
<td *ngIf="facilityItems.completed!=null&&facilityItems.completed" style="width: 30%;">
<span style="color: #FF5D4A;margin-left: 4px;cursor: pointer;" (click)='fileDel(i,f)'>
删除</span></td>
<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>
</td>
</tr>
</tbody>
</table>
@ -207,6 +221,8 @@
</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;"
@ -257,6 +273,8 @@
</div>
<div class="attackRight">
<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)'
*ngIf="element.level==1"><img src="../../../assets/images/addbai.png"> 新增</button>
<button mat-raised-button color="#ECF6FF" style="margin-left: 10px;"

16
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-08-02 09:47:06
* @LastEditTime: 2021-09-08 14:38:47
*/
.box {
height: 100%;
@ -157,6 +157,7 @@
.panelhead {
background-color: #e1f1ff;
height: 50px;
margin-top: 10px;
.paneltitle {
width: 100%;
font-size: 16px;
@ -165,6 +166,9 @@
//justify-content: space-around;
.groupName {
width: 100px;
span{
margin-left: 3px;
}
}
.caozuotwo{
width: 100%;
@ -218,6 +222,7 @@
margin-top: 8px;
}
img {
cursor: pointer;
position: relative;
bottom: 2px;
}
@ -254,10 +259,12 @@
.attackleftHead {
width: 100%;
height: 40px;
background-color: #ffd91d;
//background-color: #ffd91d;
background-color: #FFFBE8;
opacity: 0.7;
input {
background-color: #ffd91d;
color: #b99a00;
background-color: #FFFBE8;
color: #B99A00;
text-align: center;
height: 100%;
width: 100%;
@ -316,6 +323,7 @@
float: right;
margin-top: 20px;
margin-right: 8%;
cursor: pointer;
//margin-left: 40%;
}
}

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

@ -4,16 +4,16 @@
* @Author: sueRimn
* @Date: 2021-05-31 10:40:01
* @LastEditors: sueRimn
* @LastEditTime: 2021-09-02 14:06:11
* @LastEditTime: 2021-09-09 15:09:39
*/
import { Component, Inject, OnInit,ViewEncapsulation } from '@angular/core';
import { Component, Inject, OnInit,ViewEncapsulation,ViewChild } from '@angular/core';
import { HttpClient } from '@angular/common/http'
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import {FlatTreeControl, NestedTreeControl} from '@angular/cdk/tree';
import {MatTreeFlatDataSource, MatTreeFlattener, MatTreeNestedDataSource} from '@angular/material/tree';
import {MatAccordion} from '@angular/material/expansion';
@Component({
selector: 'app-plan-template',
//encapsulation: ViewEncapsulation.None,
@ -21,7 +21,7 @@ import {MatTreeFlatDataSource, MatTreeFlattener, MatTreeNestedDataSource} from '
styleUrls: ['./plan-template.component.scss']
})
export class PlanTemplateComponent implements OnInit {
@ViewChild(MatAccordion) accordion: MatAccordion;
constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) {
@ -345,6 +345,8 @@ export class PlanTemplateComponent implements OnInit {
console.log(this.newleftTabledata)
});
}
this.groupPanle=true
this.accordion.closeAll()
}
//删除具体属性
delAttribute(groupName,surveyName){
@ -555,8 +557,170 @@ export class PlanTemplateComponent implements OnInit {
//单位基本信息和建筑信息表格
displayedColumns: string[] = ['name','level','default','must', 'danwei','operation'];
//展开按钮
openKey=100
openpan(key){
this.openKey=key
}
//展开的内容关闭
closepan(){
this.openKey=100
}
//向上排序
topPai(key){
var temp
if(key==0){
/* for(var i=this.group.length;i>0;i--){
if(this.group[i].completed){
temp=this.group[i]
this.group[i]=this.group[key]
for(var a=i-1;a<=0;a--){
var tempa
tempa=this.group[a-1]
this.group[a-1]=this.group[a]
this.group[a-1]=tempa
}
}
} */
}else if(key!=0){
for(var i=key-1;i>=0;i--){
if(this.group[i].completed){
temp=this.group[i]
this.group[i]=this.group[key]
this.group[key]=temp
return
}
}
}
//this.accordion.openAll()
}
//向下排序
downPai(key){
var temp
/* for (let index = this.group.length-1; index > this.group.length; index--) {
if(this.group[index].completed&&key==index){
return
}else{
}
} */
if(key!=this.group.length-1){
for (let index = key+1; index < this.group.length; index++) {
if(this.group[index].completed){
temp=this.group[index]
this.group[index]=this.group[key]
this.group[key]=temp
return
}
}
}
//this.accordion.openAll()
}
//第二层向上排序
zaiTop(zi,attributei){
var temp
if(attributei!=0){
for (let index = attributei-1; index >=0; index--) {
if(this.group[zi].attribute[index].completed){
temp=this.group[zi].attribute[index]
this.group[zi].attribute[index]=this.group[zi].attribute[attributei]
this.group[zi].attribute[attributei]=temp
return
}
}
}
//this.accordion.openAll()
}
//第二层向下排序
zaiDown(zi,attributei){
var temp
if (attributei!=this.group[zi].attribute.length-1) {
for (let index = attributei+1; index < this.group[zi].attribute.length; index++) {
if(this.group[zi].attribute[index].completed){
temp=this.group[zi].attribute[index]
this.group[zi].attribute[index]=this.group[zi].attribute[attributei]
this.group[zi].attribute[attributei]=temp
return
}
}
}
//this.accordion.openAll()
}
//单位概况第三层向上排序
threeTop(zi,attributei,attfi){
var temp
if(attfi!=0){
for (let index = attfi-1; index >=0; index--) {
if(this.group[zi].attribute[attributei].attinf[index].completed){
temp=this.group[zi].attribute[attributei].attinf[index]
this.group[zi].attribute[attributei].attinf[index]=this.group[zi].attribute[attributei].attinf[attfi]
this.group[zi].attribute[attributei].attinf[attfi]=temp
return
}
}
}
}
//单位概况第三层向下排序
threeDown(zi,attributei,attfi){
var temp
if (attfi!=this.group[zi].attribute[attributei].attinf.length-1) {
for (let index = attfi+1; index < this.group[zi].attribute[attributei].attinf.length; index++) {
if(this.group[zi].attribute[attributei].attinf[index].completed){
temp=this.group[zi].attribute[attributei].attinf[index]
this.group[zi].attribute[attributei].attinf[index]=this.group[zi].attribute[attributei].attinf[attfi]
this.group[zi].attribute[attributei].attinf[attfi]=temp
return
}
}
}
}
//消防设施表格向上排序
fileTop(zi,attributei,attfi,fi){
var temp
if(fi!=0){
for (let index = fi-1; index >=0; index--) {
if(this.group[zi].attribute[attributei].attinf[attfi].facilityItems[index].completed){
temp=this.group[zi].attribute[attributei].attinf[attfi].facilityItems[index]
this.group[zi].attribute[attributei].attinf[attfi].facilityItems[index]=this.group[zi].attribute[attributei].attinf[attfi].facilityItems[fi]
this.group[zi].attribute[attributei].attinf[attfi].facilityItems[fi]=temp
return
}
}
}
}
//消防设施表格向下排序
fileDown(zi,attributei,attfi,fi){
var temp
if (attfi!=this.group[zi].attribute[attributei].attinf[attfi].facilityItems.length-1) {
for (let index = fi+1; index < this.group[zi].attribute[attributei].attinf[attfi].facilityItems.length; index++) {
if(this.group[zi].attribute[attributei].attinf[attfi].facilityItems[index].completed){
temp=this.group[zi].attribute[attributei].attinf[attfi].facilityItems[index]
this.group[zi].attribute[attributei].attinf[attfi].facilityItems[index]=this.group[zi].attribute[attributei].attinf[attfi].facilityItems[fi]
this.group[zi].attribute[attributei].attinf[attfi].facilityItems[fi]=temp
return
}
}
}
}
}
//新建预案
@Component({
selector: 'addPlanname',

BIN
src/assets/images/downpaixu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

BIN
src/assets/images/routleft.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

BIN
src/assets/images/toppaixu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Loading…
Cancel
Save