Browse Source

[完善]代码格式缩进

master
邵佳豪 3 years ago
parent
commit
7b5f74c10c
  1. 976
      src/app/ui/collection-tools-read/collection-tools.component.ts
  2. 2
      src/app/ui/collection-tools/addDisposalNode.html
  3. 4
      src/app/ui/collection-tools/addPlaneFigure.html
  4. 32
      src/app/ui/collection-tools/collection-tools.component.html
  5. 247
      src/app/ui/collection-tools/collection-tools.component.scss
  6. 5
      src/app/ui/collection-tools/editBuilding.html
  7. 2
      src/app/ui/collection-tools/editDisposalNode.html
  8. 6
      src/app/ui/collection-tools/editPlaneFigure.html
  9. 27
      src/app/ui/collection-tools/examinationQuestions.html
  10. 507
      src/app/ui/collection-tools/examinationQuestions.ts
  11. 66
      src/app/ui/collection-tools/leftFunctionalDomain.ts
  12. 86
      src/app/ui/collection-tools/panel.scss
  13. 534
      src/app/ui/collection-tools/save.ts
  14. 6
      src/app/ui/collection-tools/saveOne.html
  15. 19
      src/app/ui/collection-tools/saveTwo.html
  16. 6
      src/app/ui/collection-tools/uploadDisposalNodes.html
  17. 41
      src/app/ui/collection-tools/uploadQuestions.html
  18. 11
      src/app/ui/collection-tools/viewdetails.html

976
src/app/ui/collection-tools-read/collection-tools.component.ts

File diff suppressed because it is too large Load Diff

2
src/app/ui/collection-tools/addDisposalNode.html

@ -14,7 +14,7 @@
<div class="submitBottom">
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid">
确定
确定
</button>
<button mat-raised-button mat-dialog-close>取消</button>
</div>

4
src/app/ui/collection-tools/addPlaneFigure.html

@ -13,7 +13,7 @@
</div>
<div class="keyMargin" *ngIf="data.isBuilding">
<mat-checkbox name="isRefugeStorey" [(ngModel)]="checked">是否为避难层</mat-checkbox>
<mat-checkbox name="isRefugeStorey" [(ngModel)]="checked">是否为避难层</mat-checkbox>
</div>
<div class="keyMargin">
@ -28,7 +28,7 @@
<div class="submitBottom">
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid">
确定
确定
</button>
<button mat-raised-button mat-dialog-close>取消</button>
</div>

32
src/app/ui/collection-tools/collection-tools.component.html

@ -164,8 +164,7 @@
<div style="width: 3px;height: 100%;position: absolute;left: 0;cursor: e-resize;z-index: 1000;"
(mousedown)="rightDivMouseDown($event)"></div>
<!-- 属性 -->
<div id="property" class="property"
style="height: 100%;background-color: white;">
<div id="property" class="property" style="height: 100%;background-color: white;">
<div class="titleS">
<mat-icon>info</mat-icon>属性
</div>
@ -258,8 +257,7 @@
<p>{{item.PropertyName}}<span style="font-size: 14px;"
*ngIf="item.PhysicalUnit">({{item.PhysicalUnit}})</span></p>
<input type="number" class="biginput" [value]="item.PropertyValue"
(input)="assetInputChange(item,$event)"
[disabled]="canvasAssetObj.GameMode == 0 && !pattern">
(input)="assetInputChange(item,$event)" [disabled]="canvasAssetObj.GameMode == 0 && !pattern">
</div>
<!-- 图片数量 -->
<div *ngIf="item.PropertyType == 4" style="height: 140px;">
@ -267,11 +265,10 @@
<p style="width: 40%;display: inline-block;">{{item.PropertyName}}</p>
<span style="width: 26%;text-align:right;font-size: 13px;">{{imagesArr.length ? imagesArr.length : 0}}
/ {{item.PropertyValue}}</span>
<input [disabled]="canvasAssetObj.GameMode == 0 && !pattern" *ngIf="isImgNumCss"
accept="image/*" (change)="selectFile($event)" type="file"
<input [disabled]="canvasAssetObj.GameMode == 0 && !pattern" *ngIf="isImgNumCss" accept="image/*"
(change)="selectFile($event)" type="file"
style="width: 33%;position: absolute;right: 10px;top: 1px;opacity: 0;z-index: 100;cursor: pointer;height: 21px;">
<div
*ngIf="canvasAssetObj.GameMode != 0"
<div *ngIf="canvasAssetObj.GameMode != 0"
style="width: 33%;height: 21px;line-height: 21px;text-align: center;position: absolute;right: 10px;top: 1px;z-index: 99;border: 1px solid rgb(208, 211, 214);border-radius: 2px;font-size: 13px;cursor: pointer;"
(click)="imgNumBeyond()">添加</div>
@ -287,7 +284,8 @@
<!-- 如果需要导航按钮 -->
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
<span *ngIf="canvasAssetObj.GameMode != 0" style="position: absolute;right: 2px;top: 2px;cursor: pointer;z-index: 200;">
<span *ngIf="canvasAssetObj.GameMode != 0"
style="position: absolute;right: 2px;top: 2px;cursor: pointer;z-index: 200;">
<mat-icon class="hoverred" (click)="deleteImg()">delete</mat-icon>
</span>
</div>
@ -296,8 +294,7 @@
<!-- 方向 -->
<div *ngIf="item.PropertyType == 5" class="selectDiv">
<p style="display: inline-block;">{{item.PropertyName}}</p>
<select (change)="direction(item,$event)"
[disabled]="canvasAssetObj.GameMode == 0 && !pattern">
<select (change)="direction(item,$event)" [disabled]="canvasAssetObj.GameMode == 0 && !pattern">
<option value="0" [selected]="item.PropertyValue ==0"></option>
<option value="1" [selected]="item.PropertyValue ==1">西</option>
<option value="2" [selected]="item.PropertyValue ==2"></option>
@ -311,18 +308,15 @@
<!-- 布尔值 是1或否0 -->
<div *ngIf="item.PropertyType == 6">
<p>{{item.PropertyName}}</p>
<input [disabled]="canvasAssetObj.GameMode == 0 && !pattern"
[checked]="item.PropertyValue == 1" class="input" type="radio" name="radio"
(click)="assetRadioChange(item,'1')"><span></span>
<input [disabled]="canvasAssetObj.GameMode == 0 && !pattern"
[checked]="item.PropertyValue == 0" class="input" type="radio" name="radio"
(click)="assetRadioChange(item,'0')"><span></span>
<input [disabled]="canvasAssetObj.GameMode == 0 && !pattern" [checked]="item.PropertyValue == 1"
class="input" type="radio" name="radio" (click)="assetRadioChange(item,'1')"><span></span>
<input [disabled]="canvasAssetObj.GameMode == 0 && !pattern" [checked]="item.PropertyValue == 0"
class="input" type="radio" name="radio" (click)="assetRadioChange(item,'0')"><span></span>
</div>
<!-- 供给区域 -->
<div *ngIf="item.PropertyType == 7" class="selectDiv">
<p style="display: inline-block;">{{item.PropertyName}}</p>
<select (change)="supplyArea(item,$event)"
[disabled]="canvasAssetObj.GameMode == 0 && !pattern">
<select (change)="supplyArea(item,$event)" [disabled]="canvasAssetObj.GameMode == 0 && !pattern">
<option value="0" [selected]="item.PropertyValue ==0">全部</option>
<option value="1" [selected]="item.PropertyValue ==1">高区</option>
<option value="2" [selected]="item.PropertyValue ==2">中区</option>

247
src/app/ui/collection-tools/collection-tools.component.scss

@ -1,7 +1,10 @@
@import './panel.scss';
::-webkit-scrollbar {
display: none; /* Chrome Safari */
display: none;
/* Chrome Safari */
}
.content {
width: 100%;
height: 100%;
@ -10,7 +13,8 @@
padding: 3px;
display: flex;
flex-direction: column;
.buildingbtnchecked{
.buildingbtnchecked {
background-color: #07CDCF;
color: white;
}
@ -23,9 +27,10 @@
height: 46px;
min-height: 46px;
display: flex;
align-items:center;
align-items: center;
background-color: #fff;
box-shadow: inset 0px -3px 5px 0px rgb(165, 163, 163);
.headerTitle {
width: 235px;
overflow: hidden;
@ -35,9 +40,11 @@
font-size: 20px;
font-weight: 550;
}
.headerCenter {
flex: 1;
overflow: hidden;
input {
width: 99%;
height: 30px;
@ -45,19 +52,22 @@
border-radius: 5px;
}
}
.headerRight {
width: 350px;
overflow: hidden;
box-sizing: border-box;
padding-left: 10px;
button {
font-size: 14px;
color: #07CDCF;
color: #07CDCF;
background-color: #fff;
border: none;
outline: none;
cursor:pointer;
cursor: pointer;
}
.mat-icon {
font-size: 22px;
vertical-align: middle;
@ -69,14 +79,16 @@
//头部操作栏
.headerOperate {
img {
width: 24px;
width: 24px;
height: 24px;
vertical-align: middle;
margin-left: 1px;
}
span{
span {
font-size: 18px;
}
flex: 5%;
display: flex;
align-items:center;
@ -84,15 +96,18 @@
box-sizing: border-box;
margin: 3px 0;
background-color: white;
button{
button {
border: 0.5px solid rgb(208, 211, 214);
margin: 0 2px;
}
.editdeletebtn{
.editdeletebtn {
display: none;
}
.bigeditdeletebtn:hover{
.editdeletebtn{
.bigeditdeletebtn:hover {
.editdeletebtn {
display: inline-block;
}
}
@ -101,9 +116,10 @@
//功能区
// icon统一样式
.mat-icon {
cursor:pointer;
cursor: pointer;
vertical-align: middle;
}
//左右两侧功能栏 统一样式
.publicCss {
border-radius: 5px;
@ -111,14 +127,17 @@
height: 100%;
top: 0;
}
.functionalDomain {
flex: 1;
overflow: hidden;
.functionalDomainContent {
position: relative;
width: 100%;
height: 100%;
}
.centerBuildingDiv {
position: absolute;
max-width: 400px;
@ -127,6 +146,7 @@
z-index: 150;
display: flex;
}
.functionalDomainLeft {
background-color: #fff;
display: flex;
@ -138,7 +158,8 @@
width: 235px;
left: 0;
z-index: 111;
.leftDragDiv{
.leftDragDiv {
position: absolute;
right: 0;
height: 100%;
@ -147,20 +168,23 @@
cursor: e-resize;
}
}
.functionalDomainRight {
z-index: 111;
margin-right: 0px;
transition: margin-right 0.5s;
transition: margin-right 0.5s;
border: 1px solid #cacdd1;
width: 235px;
min-width: 235px;
right: 0;
}
//右边导航栏显示隐藏
//右边导航栏显示隐藏
.togglePanel2 {
margin-right: -2000px;
transition: margin-right 1s;
transition: margin-right 1s;
}
//左侧导航栏显示隐藏
.togglePanel {
margin-left: -2000px;
@ -177,19 +201,26 @@
border-radius: 5px;
box-sizing: border-box;
padding: 5px 0;
.centerTotalHeader {
height: 30px;
line-height: 30px;
box-sizing: border-box;
padding: 0 5px;
font-size: 14px;
.above:hover {cursor: move;;}
.above:hover {
cursor: move;
;
}
.above {
font-size: 24px;
color: rgb(175, 164, 164);
margin: 0 10px 0 10px;
}
}
.everyTotal {
width: 100%;
height: 30px;
@ -197,43 +228,60 @@
box-sizing: border-box;
padding: 0 5px;
margin: 3px 0;
cursor:pointer;
cursor: pointer;
font-size: 16px;
}
}
//中间建筑/楼层
//右边操作栏
.titleS{
.titleS {
width: 100%;
height: 35px;
line-height: 35px;
padding-left: 5px;
box-sizing: border-box;
color: #07CDCF;
.mat-icon {vertical-align: middle; margin-right: 5px; font-size: 22px;}
.mat-icon {
vertical-align: middle;
margin-right: 5px;
font-size: 22px;
}
}
input {
border: none;
outline: none;
background-color: #d6dddf;
box-sizing: border-box;
padding-left: 5px;
}
input { border: none; outline: none; background-color: #d6dddf; box-sizing: border-box; padding-left: 5px; }
//右侧属性
.property{
.property {
display: flex;
flex-flow: column;
.siteproperty{
.siteproperty {
height: 100%;
overflow-y: auto;
p{
p {
color: #9c9fa5;
padding-left: 5px;
}
.siteproperty_size{
.siteproperty_size {
background-color: #F2F5F6;
width: 93%;
margin: 0 auto;
border-radius: 3px;
min-height: 21px;
}
.rightAttribute{
.rightAttribute {
width: 12%;
height: 99.5%;
position: absolute;
@ -243,56 +291,70 @@ input { border: none; outline: none; background-color: #d6dddf; box-sizing: bord
border: 2px solid #464646;
}
}
.assetsproperty{
.assetsproperty {
overflow-y: auto;
height: 100%;
p{
p {
color: #9c9fa5;
margin:1px 0 3px 8px;
margin: 1px 0 3px 8px;
font-size: 14px;
}
span{
span {
font-size: 15px;
}
input{
input {
height: 24px;
border-radius: 3px;
}
.biginput{
.biginput {
display: block;
width: 88%;
margin: 0 auto;
}
.smallinput{
.smallinput {
display: block;
width: 19%;
margin-left: 14px;
}
.textarea{
.textarea {
display: block;
width: 88%;
height: 50px;
margin: 0 auto;
}
.swiper-button-next{
.swiper-button-next {
right: 6px;
}
.swiper-button-prev{
.swiper-button-prev {
left: 6px;
}
.swiper-container{
.swiper-container {
// --swiper-theme-color: #ff6600;/* 设置Swiper风格 */
// --swiper-navigation-color: #00ff33;/* 单独设置按钮颜色 */
--swiper-navigation-size:20px;/* 设置按钮大小 */
--swiper-navigation-size: 20px;
/* 设置按钮大小 */
}
.hoverred:hover{
.hoverred:hover {
color: rgb(187, 28, 28);
}
.selectDiv{
.selectDiv {
height: 21px;
position: relative;
margin-bottom: 5px;
select{
select {
width: 98px;
height: 22px;
vertical-align: middle;
@ -303,17 +365,20 @@ input { border: none; outline: none; background-color: #d6dddf; box-sizing: bord
border-radius: 2px;
}
}
.colorBigDiv{
.colorBigDiv {
width: 88%;
margin-left: 8px;
.colorBigTemplateDiv{
span{
.colorBigTemplateDiv {
span {
color: #9c9fa5;
font-size: 14px;
height: 26px;
line-height: 26px;
}
.colorTemplateDiv{
.colorTemplateDiv {
width: 65%;
height: 22px;
display: inline-block;
@ -321,29 +386,32 @@ input { border: none; outline: none; background-color: #d6dddf; box-sizing: bord
margin-left: 26px;
}
}
.colorDiv{
.colorLi{
.colorDiv {
.colorLi {
width: 24px;
height: 24px;
list-style: none;
float: left;
border: 2px solid white;
}
.coloractive{
.coloractive {
border: 2px solid black;
}
}
}
}
}
//右侧消防要素
.firecategories{
.firecategories {
position: relative;
display: flex;
flex-flow: column;
.firecategoriesTree{
.firecategoriesTree {
overflow-y: auto;
height: 100%;
}
@ -353,12 +421,15 @@ input { border: none; outline: none; background-color: #d6dddf; box-sizing: bord
div:focus {
outline: none;
}
//没有图片时显示无图片背景图
.noImgCss{
.noImgCss {
background: url(../../../assets/images/noImg.png) no-repeat center center;
background-size: 88% 100%;/*按比例缩放*/
background-size: 88% 100%;
/*按比例缩放*/
}
.input{
.input {
width: 18px;
height: 18px;
vertical-align: middle;
@ -367,27 +438,32 @@ div:focus {
}
// tree
.isLookCss{
.isLookCss {
margin-left: auto;
color: #07CDCF;
.icongray{
.icongray {
color: #D9D0DC;
}
}
.mat-tree-node{
.mat-tree-node {
padding-right: 3px;
min-height: 30px;
height: 30px;
font-size: 12px;
cursor: pointer;
}
.treeNode:hover{
.treeNode:hover {
background-color: #ccebf8;
}
.isLookPattern{
.isLookPattern {
display: none;
}
.treeText{
.treeText {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
@ -395,49 +471,57 @@ div:focus {
width: 65px;
}
.bigBox{
.bigBox {
width: 700px;
height: 40px;
position: absolute;
overflow: hidden;
right: 0;
}
.weatherBox{
.weatherBox {
height: 40px;
width: 700px;
line-height: 40px;
position: absolute;
right: 0;
transition: right linear .5s;
.openbtn{
.openbtn {
font-size: 45px;
height: 45px;
width: 40px;
}
.name{
.name {
font-size: 16px;
vertical-align: middle;
margin-left: 3px;
}
input{
input {
width: 140px;
height: 22px;
margin-left: 3px;
}
select{
select {
width: 96px;
height: 25px;
margin-left: 3px;
vertical-align: middle;
}
}
.open{
.open {
right: 0px;
}
.close{
right:-622px;
.close {
right: -622px;
}
.bottomCss{
.bottomCss {
position: absolute;
left: 232px;
right: 0px;
@ -447,7 +531,8 @@ div:focus {
z-index: 111;
background-color: white;
border: 1px solid #464646;
.dragDiv{
.dragDiv {
width: 100%;
height: 3px;
position: absolute;
@ -455,10 +540,12 @@ div:focus {
z-index: 111;
cursor: n-resize;
}
.title{
.title {
height: 35px;
background-color: #464646;
div{
div {
background-color: #464646;
float: left;
width: 80px;
@ -467,14 +554,16 @@ div:focus {
padding-left: 5px;
cursor: pointer;
}
.detailsAndattentBtn{
.detailsAndattentBtn {
background-color: #595959;
}
}
.body{
textarea{
.body {
textarea {
width: 100%;
border-radius: 0px;
}
}
}
}
}

5
src/app/ui/collection-tools/editBuilding.html

@ -3,7 +3,8 @@
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container">
<div mat-dialog-content>
<mat-form-field>
<input type="text" matInput [(ngModel)]="defaultName" required name="propertyName" placeholder="建筑名称" autocomplete="off">
<input type="text" matInput [(ngModel)]="defaultName" required name="propertyName" placeholder="建筑名称"
autocomplete="off">
</mat-form-field>
</div>
<div mat-dialog-content>
@ -14,7 +15,7 @@
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
<div mat-dialog-actions>
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid">确定</button>
<button mat-raised-button mat-dialog-close>取消</button>

2
src/app/ui/collection-tools/editDisposalNode.html

@ -13,7 +13,7 @@
<div class="submitBottom">
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid">
确定
确定
</button>
<button mat-raised-button mat-dialog-close>取消</button>
</div>

6
src/app/ui/collection-tools/editPlaneFigure.html

@ -1,5 +1,5 @@
<div class="functionalDomainContent">
<div mat-dialog-title>
<label *ngIf="!data.isBuilding">编辑平面图</label>
<label *ngIf="data.isBuilding">编辑楼层/区域</label>
@ -14,7 +14,7 @@
</div>
<div class="keyMargin" *ngIf="data.isBuilding">
<mat-checkbox name="isRefugeStorey" [(ngModel)]="checked">是否为避难层</mat-checkbox>
<mat-checkbox name="isRefugeStorey" [(ngModel)]="checked">是否为避难层</mat-checkbox>
</div>
<div class="keyMargin">
@ -29,7 +29,7 @@
<div class="submitBottom">
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid">
确定
确定
</button>
<button mat-raised-button mat-dialog-close>取消</button>
</div>

27
src/app/ui/collection-tools/examinationQuestions.html

@ -1,30 +1,21 @@
<div style="min-width: 240px;" >
<div style="min-width: 240px;">
<div style="text-align: center;font-weight: 550;">消防设施考题设定</div>
<div id="nodeTree" style="max-height: 300px;overflow-y: auto; margin: 25px 0;">
<!-- 消防列表树 -->
<nz-tree
#nzTreeComponent3
[nzData]="renderData"
nzCheckable
nzMultiple
[nzCheckedKeys]="defaultCheckedKeys"
[nzExpandedKeys]="defaultExpandedKeys"
[nzSelectedKeys]="defaultSelectedKeys"
(nzClick)="nzEvent($event)"
(nzExpandChange)="nzEvent($event)"
(nzCheckBoxChange)="nzEvent($event)"
[nzTreeTemplate]="nzTreeTemplate3"
>
<nz-tree #nzTreeComponent3 [nzData]="renderData" nzCheckable nzMultiple [nzCheckedKeys]="defaultCheckedKeys"
[nzExpandedKeys]="defaultExpandedKeys" [nzSelectedKeys]="defaultSelectedKeys" (nzClick)="nzEvent($event)"
(nzExpandChange)="nzEvent($event)" (nzCheckBoxChange)="nzEvent($event)" [nzTreeTemplate]="nzTreeTemplate3">
</nz-tree>
<ng-template #nzTreeTemplate3 let-node let-origin="origin">
<div class="treeNodeTemplate">
<label class="overflowText textNode">{{node.origin.name || node.origin.Name}}</label>
</div>
<div class="treeNodeTemplate">
<label class="overflowText textNode">{{node.origin.name || node.origin.Name}}</label>
</div>
</ng-template>
<!-- 消防列表树 -->
</div>
<div style="text-align: center;">
<button mat-stroked-button style="margin-right: 15px;border: none;background: #07CDCF;color: #fff;" (click)='submit()'>确定</button>
<button mat-stroked-button style="margin-right: 15px;border: none;background: #07CDCF;color: #fff;"
(click)='submit()'>确定</button>
<button mat-stroked-button style="margin-left: 15px;border: none;background: #dfe0e0;" mat-dialog-close>取消</button>
</div>
</div>

507
src/app/ui/collection-tools/examinationQuestions.ts

@ -2,10 +2,10 @@ import { Component, OnInit, Inject, ViewChild } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import {CanvasShareDataService,DisposalNodeData} from '../../canvas-share-data.service' //引入服务
import { CanvasShareDataService, DisposalNodeData } from '../../canvas-share-data.service' //引入服务
import { FlatTreeControl } from '@angular/cdk/tree';
import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
import { NzFormatBeforeDropEvent, NzFormatEmitEvent,NzTreeComponent } from 'ng-zorro-antd/tree';
import { NzFormatBeforeDropEvent, NzFormatEmitEvent, NzTreeComponent } from 'ng-zorro-antd/tree';
import { ActivatedRoute } from '@angular/router';
@Component({
@ -15,137 +15,138 @@ import { ActivatedRoute } from '@angular/router';
})
export class examinationQuestions {
constructor(private http:HttpClient, public dialog: MatDialog, public snackBar: MatSnackBar, public dialogRef: MatDialogRef<any>,
@Inject(MAT_DIALOG_DATA) public data) {}
constructor(private http: HttpClient, public dialog: MatDialog, public snackBar: MatSnackBar, public dialogRef: MatDialogRef<any>,
@Inject(MAT_DIALOG_DATA) public data) { }
@ViewChild('nzTreeComponent3', { static: false }) nzTreeComponent!: NzTreeComponent;
@ViewChild('nzTreeComponent3', { static: false }) nzTreeComponent!: NzTreeComponent;
defaultCheckedKeys = []; //指定选中复选框的树节点 key值
defaultExpandedKeys = []; //展开指定的树节点 key值
defaultSelectedKeys = []; //指定选中的树节点 key值
renderData:any
ngOnInit(): void {
this.renderData = this.data.treeData
if(JSON.parse(sessionStorage.getItem('tree型数据')) && JSON.parse(sessionStorage.getItem('tree型数据'))[this.data.buildFloorData.floorData.id]){
this.defaultCheckedKeys = JSON.parse(sessionStorage.getItem('tree型数据'))[this.data.buildFloorData.floorData.id]
}
this.data.treeData.forEach(element => {
if(element.isTemplate){
element.isLeaf = false
}else{
element.isLeaf = true
}
if(element.children && element.children.length != 0){
element.children.forEach(ele => {
if(ele.isTemplate){
ele.isLeaf = false
}else{
ele.isLeaf = true
}
if(ele.children && ele.children.length != 0){
ele.children.forEach(item => {
if(item.isTemplate){
item.isLeaf = false
}else{
item.isLeaf = true
}
});
}})
}
})
defaultCheckedKeys = []; //指定选中复选框的树节点 key值
defaultExpandedKeys = []; //展开指定的树节点 key值
defaultSelectedKeys = []; //指定选中的树节点 key值
renderData: any
ngOnInit(): void {
this.renderData = this.data.treeData
if (JSON.parse(sessionStorage.getItem('tree型数据')) && JSON.parse(sessionStorage.getItem('tree型数据'))[this.data.buildFloorData.floorData.id]) {
this.defaultCheckedKeys = JSON.parse(sessionStorage.getItem('tree型数据'))[this.data.buildFloorData.floorData.id]
}
this.data.treeData.forEach(element => {
if (element.isTemplate) {
element.isLeaf = false
} else {
element.isLeaf = true
}
if (element.children && element.children.length != 0) {
element.children.forEach(ele => {
if (ele.isTemplate) {
ele.isLeaf = false
} else {
ele.isLeaf = true
}
if (ele.children && ele.children.length != 0) {
ele.children.forEach(item => {
if (item.isTemplate) {
item.isLeaf = false
} else {
item.isLeaf = true
}
});
}
})
}
})
}
nzEvent($event){
console.log($event)
}
nzEvent($event) {
console.log($event)
}
//提交
submit () {
//提交
submit() {
let oldTreeData = this.nzTreeComponent.getCheckedNodeList()
let oldTreeData = this.nzTreeComponent.getCheckedNodeList()
// console.log(oldTreeData)
let alltreedata = JSON.parse(sessionStorage.getItem("tree型数据"))
let keyArr = []
oldTreeData.forEach(element => {
keyArr.push(element.origin.key)
})
if(alltreedata){
//如果已经保存过当前楼层则替换
alltreedata[this.data.buildFloorData.floorData.id] = keyArr
sessionStorage.setItem('tree型数据',JSON.stringify(alltreedata))
}else{
alltreedata = {}
alltreedata[this.data.buildFloorData.floorData.id] = keyArr
sessionStorage.setItem('tree型数据',JSON.stringify(alltreedata))
}
// console.log(oldTreeData)
let alltreedata = JSON.parse(sessionStorage.getItem("tree型数据"))
let keyArr = []
oldTreeData.forEach(element => {
keyArr.push(element.origin.key)
})
if (alltreedata) {
//如果已经保存过当前楼层则替换
alltreedata[this.data.buildFloorData.floorData.id] = keyArr
sessionStorage.setItem('tree型数据', JSON.stringify(alltreedata))
} else {
alltreedata = {}
alltreedata[this.data.buildFloorData.floorData.id] = keyArr
sessionStorage.setItem('tree型数据', JSON.stringify(alltreedata))
}
let checkList = [] //只存真实素材
for (const key in this.data.oldRealData.data) {
let element = this.data.oldRealData.data[key]
let isChecked = (this.nzTreeComponent.getTreeNodeByKey(key)).isChecked
isChecked? checkList.push(element) : null
}
//存储真实素材数据
let basicAssetsId = []
if(checkList && checkList.length != 0){
checkList.forEach(item => {
basicAssetsId.push(item.TemplateId)
})
}
basicAssetsId = Array.from(new Set(basicAssetsId))
console.log(123,this.data.buildFloorData)
let obj = {
name:this.data.buildFloorData.buildingData.name + '-' + this.data.buildFloorData.floorData.name,
key:this.data.buildFloorData.floorData.id,
buildingId:this.data.buildFloorData.buildingData.id,
children:checkList,
basicAssetsId:basicAssetsId
}
let data = JSON.parse(sessionStorage.getItem("消防设施"+sessionStorage.getItem('paperId')))
let checkList = [] //只存真实素材
for (const key in this.data.oldRealData.data) {
let element = this.data.oldRealData.data[key]
let isChecked = (this.nzTreeComponent.getTreeNodeByKey(key)).isChecked
isChecked ? checkList.push(element) : null
}
//存储真实素材数据
let basicAssetsId = []
if (checkList && checkList.length != 0) {
checkList.forEach(item => {
basicAssetsId.push(item.TemplateId)
})
}
basicAssetsId = Array.from(new Set(basicAssetsId))
console.log(123, this.data.buildFloorData)
let obj = {
name: this.data.buildFloorData.buildingData.name + '-' + this.data.buildFloorData.floorData.name,
key: this.data.buildFloorData.floorData.id,
buildingId: this.data.buildFloorData.buildingData.id,
children: checkList,
basicAssetsId: basicAssetsId
}
let data = JSON.parse(sessionStorage.getItem("消防设施" + sessionStorage.getItem('paperId')))
if(data && data.length != 0){
console.log(1)
let ind = null
data.forEach((item,index) => {
if(item.key == obj.key){
ind = index + 1
}
})
if(ind){
if(checkList.length != 0){
data[ind - 1].children = checkList
}else{
data.splice(ind - 1,1)
}
}else{
data.push(obj)
if (data && data.length != 0) {
console.log(1)
let ind = null
data.forEach((item, index) => {
if (item.key == obj.key) {
ind = index + 1
}
})
if (ind) {
if (checkList.length != 0) {
data[ind - 1].children = checkList
} else {
data.splice(ind - 1, 1)
}
sessionStorage.setItem("消防设施"+sessionStorage.getItem('paperId'),JSON.stringify(data))
}else{
console.log(2)
data = []
data[0] = obj
sessionStorage.setItem("消防设施"+sessionStorage.getItem('paperId'),JSON.stringify(data))
} else {
data.push(obj)
}
sessionStorage.setItem("消防设施" + sessionStorage.getItem('paperId'), JSON.stringify(data))
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('当层消防设施考题设置完成','确定',config);
this.dialogRef.close()
} else {
console.log(2)
data = []
data[0] = obj
sessionStorage.setItem("消防设施" + sessionStorage.getItem('paperId'), JSON.stringify(data))
}
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('当层消防设施考题设置完成', '确定', config);
this.dialogRef.close()
}
}
@ -157,150 +158,150 @@ export class examinationQuestions {
})
export class uploadQuestions {
constructor(private http:HttpClient, public dialog: MatDialog, public snackBar: MatSnackBar, public dialogRef: MatDialogRef<any>,
@Inject(MAT_DIALOG_DATA) public data,private route:ActivatedRoute) {}
defaultCheckedKeys = []; //指定选中复选框的树节点 key值
defaultExpandedKeys = []; //展开指定的树节点 key值
defaultSelectedKeys = []; //指定选中的树节点 key值
renderData:any
ngOnInit(): void {
let data = JSON.parse(sessionStorage.getItem("消防设施"+sessionStorage.getItem('paperId')))
data ? data.forEach(item => {
let realData = item.children
let allFireElements = JSON.parse(JSON.stringify(this.data.allFireElements))
item.children = this.processingData(allFireElements,realData)
}) :null
this.renderData = data
this.getProfiles()
this.nodeInit()
}
constructor(private http: HttpClient, public dialog: MatDialog, public snackBar: MatSnackBar, public dialogRef: MatDialogRef<any>,
@Inject(MAT_DIALOG_DATA) public data, private route: ActivatedRoute) { }
//处理数据 将消防要素模板与真实素材结合
processingData(allFireElements,realData){
allFireElements[allFireElements.length-1].children = []
realData.forEach(item => {
item.isLeaf = true
let noMatch = allFireElements.find( every=> every.id === item.FireElementId )
if (!noMatch) {
allFireElements[allFireElements.length-1].children.push(item)
}
})
let treeData = [] //tree型 处理完成后的数据
allFireElements.forEach(element => {
element.key = element.id
element.name != '其他' ? element.children = [] : null
if(realData){
realData.forEach(item => {
if(element.id == item.FireElementId){
element.children.push(item)
}
})
defaultCheckedKeys = []; //指定选中复选框的树节点 key值
defaultExpandedKeys = []; //展开指定的树节点 key值
defaultSelectedKeys = []; //指定选中的树节点 key值
renderData: any
ngOnInit(): void {
let data = JSON.parse(sessionStorage.getItem("消防设施" + sessionStorage.getItem('paperId')))
data ? data.forEach(item => {
let realData = item.children
let allFireElements = JSON.parse(JSON.stringify(this.data.allFireElements))
item.children = this.processingData(allFireElements, realData)
}) : null
this.renderData = data
this.getProfiles()
this.nodeInit()
}
//处理数据 将消防要素模板与真实素材结合
processingData(allFireElements, realData) {
allFireElements[allFireElements.length - 1].children = []
realData.forEach(item => {
item.isLeaf = true
let noMatch = allFireElements.find(every => every.id === item.FireElementId)
if (!noMatch) {
allFireElements[allFireElements.length - 1].children.push(item)
}
})
let treeData = [] //tree型 处理完成后的数据
allFireElements.forEach(element => {
element.key = element.id
element.name != '其他' ? element.children = [] : null
if (realData) {
realData.forEach(item => {
if (element.id == item.FireElementId) {
element.children.push(item)
}
})
}
allFireElements.forEach(item => { if (item.parentId == element.id) { element.children.push(item) } });
});
allFireElements.forEach(element => {
if (!element.parentId) { treeData.push(element) }
});
function recursionFilterEmpty(originalList, result) {
for (let i = 0, length = originalList.length; i < length; i++) {
const item = originalList[i];
if (item.PropertyInfos) {
// 最内层
result.push(item);
} else if (item.children && item.children.length) {
const newChildren = [];
// 递归调用,底层的真实数据会全部 push  newChildren 
recursionFilterEmpty(item.children, newChildren);
if (newChildren.length) {
// 替换原始数据
item.children = newChildren;
// 子项有真实的数据,就保留这一项
result.push(item);
} // 如果没有这一项就会被删除
}
allFireElements.forEach(item => { if (item.parentId == element.id) {element.children.push(item)} });
});
allFireElements.forEach(element => {
if (!element.parentId) { treeData.push(element) }
});
function recursionFilterEmpty(originalList, result) {
      for(let i = 0, length = originalList.length; i < length; i++) {
          const item = originalList[i];
          if (item.PropertyInfos) {
              // 最内层
              result.push(item);
          } else if (item.children && item.children.length) {
              const newChildren = [];
              // 递归调用,底层的真实数据会全部 push  newChildren 
              recursionFilterEmpty(item.children, newChildren);
              if (newChildren.length) {
                  // 替换原始数据
                  item.children = newChildren;
                  // 子项有真实的数据,就保留这一项
                  result.push(item);
              } // 如果没有这一项就会被删除
          }
      }
  }
  function filterEmpty(listData) {
      const result = [];
      recursionFilterEmpty(listData, result);
      return result;
  }
return filterEmpty(treeData)
}
}
function filterEmpty(listData) {
const result = [];
recursionFilterEmpty(listData, result);
return result;
}
return filterEmpty(treeData)
}
//获取登录账号的个人资料
Profiles:any
getProfiles(){
this.http.get('/api/ExamAccounts/Profiles').subscribe(data => {
this.Profiles = data
})
}
//获取登录账号的个人资料
Profiles: any
getProfiles() {
this.http.get('/api/ExamAccounts/Profiles').subscribe(data => {
this.Profiles = data
})
}
nodeTreeData:any = []; //处置节点tree
//节点初始化
nodeInit () {
let treeData = []
this.data.node.forEach(element => {
element.title = element.name //name
element.key = element.id //id
element.children = [] //children
if (element.sitePlanId || element.buildingAreaId) { //是数据节点
element.isLeaf = true
element.isDataNode = true
} else { //不是数据节点
element.isLeaf = false
element.isDataNode = false
}
this.data.node.forEach(item=>{
item.parentId === element.id? element.children.push(item) : null
})
});
this.data.node.forEach(element=>{
!element.parentId? treeData.push(element) : null
nodeTreeData: any = []; //处置节点tree
//节点初始化
nodeInit() {
let treeData = []
this.data.node.forEach(element => {
element.title = element.name //name
element.key = element.id //id
element.children = [] //children
if (element.sitePlanId || element.buildingAreaId) { //是数据节点
element.isLeaf = true
element.isDataNode = true
} else { //不是数据节点
element.isLeaf = false
element.isDataNode = false
}
this.data.node.forEach(item => {
item.parentId === element.id ? element.children.push(item) : null
})
this.nodeTreeData = [...treeData]
}
});
this.data.node.forEach(element => {
!element.parentId ? treeData.push(element) : null
})
this.nodeTreeData = [...treeData]
}
nzEvent($event){
console.log($event)
nzEvent($event) {
console.log($event)
}
//上传
submit() {
console.log(this.data.question)
let body: any = {
id: this.route.snapshot.queryParams.paperplanId,
paperId: sessionStorage.getItem('paperId'),
planComponentId: sessionStorage.getItem('planId'),
examPlanType: this.route.snapshot.queryParams.openType == 1 ? 0 : 1,
creatorId: this.Profiles.id,
modifiedTime: new Date(),
isPublic: true,
title: this.route.snapshot.queryParams.planName,
mainPoint: this.data.question.keynote,
score: 0,
examFacilityAssetsData: sessionStorage.getItem('消防设施' + sessionStorage.getItem('paperId')) ? sessionStorage.getItem('消防设施' + sessionStorage.getItem('paperId')) : null,
examDisposalNodesData: sessionStorage.getItem('examNodeList') ? sessionStorage.getItem('examNodeList') : null,
companyId: sessionStorage.getItem('companyId')
}
//上传
submit () {
console.log(this.data.question)
let body:any = {
id: this.route.snapshot.queryParams.paperplanId,
paperId: sessionStorage.getItem('paperId'),
planComponentId: sessionStorage.getItem('planId'),
examPlanType: this.route.snapshot.queryParams.openType == 1 ? 0 : 1,
creatorId: this.Profiles.id,
modifiedTime: new Date(),
isPublic: true,
title: this.route.snapshot.queryParams.planName,
mainPoint: this.data.question.keynote,
score: 0,
examFacilityAssetsData: sessionStorage.getItem('消防设施' + sessionStorage.getItem('paperId')) ? sessionStorage.getItem('消防设施' + sessionStorage.getItem('paperId')) : null,
examDisposalNodesData: sessionStorage.getItem('examNodeList') ? sessionStorage.getItem('examNodeList') : null,
companyId:sessionStorage.getItem('companyId')
}
this.http.put(`/api/PaperPlans/${this.route.snapshot.queryParams.paperplanId}`,body).subscribe(data => {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('设置完成,页面将于一秒后关闭','确定',config);
setTimeout(() => {
window.close()
}, 1000);
})
this.http.put(`/api/PaperPlans/${this.route.snapshot.queryParams.paperplanId}`, body).subscribe(data => {
}
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('设置完成,页面将于一秒后关闭', '确定', config);
setTimeout(() => {
window.close()
}, 1000);
})
}
}
@ -314,26 +315,26 @@ export class uploadQuestions {
})
export class uploadDisposalNodes {
constructor(private http:HttpClient, public dialog: MatDialog, public snackBar: MatSnackBar, public dialogRef: MatDialogRef<any>,
@Inject(MAT_DIALOG_DATA) public data) {}
constructor(private http: HttpClient, public dialog: MatDialog, public snackBar: MatSnackBar, public dialogRef: MatDialogRef<any>,
@Inject(MAT_DIALOG_DATA) public data) { }
@ViewChild('nzTreeComponent', { static: false }) nzTreeComponent!: NzTreeComponent;
ngOnInit(): void {
this.treeData = [...this.data.treeData]
}
treeData:any = []; //tree
treeData: any = []; //tree
//提交 保存考试节点
submit () {
submit() {
let checkList = []
this.data.oldTreeData.forEach(element => {
let isChecked = (this.nzTreeComponent.getTreeNodeByKey(element.id)).isChecked
isChecked? checkList.push(element) : null
isChecked ? checkList.push(element) : null
});
let galfList = this.nzTreeComponent.getHalfCheckedNodeList()
this.data.oldTreeData.forEach(element => {
galfList.forEach(elements => {
element.id == elements.origin.id? checkList.push(element) : null
element.id == elements.origin.id ? checkList.push(element) : null
});
});
if (checkList.length) {
@ -342,7 +343,7 @@ export class uploadDisposalNodes {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请选择节点','确定',config);
this.snackBar.open('请选择节点', '确定', config);
}
}

66
src/app/ui/collection-tools/leftFunctionalDomain.ts

@ -11,7 +11,7 @@ import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
export class leftFunctionalDomainComponent implements OnInit {
constructor(
private http:HttpClient,
private http: HttpClient,
public dialog: MatDialog,
public snackBar: MatSnackBar,
public dialogRef: MatDialogRef<any>,
@ -21,22 +21,22 @@ export class leftFunctionalDomainComponent implements OnInit {
}
params = {companyId: sessionStorage.getItem('companyId')}
checked:boolean = false;//是否为避难层
params = { companyId: sessionStorage.getItem('companyId') }
checked: boolean = false;//是否为避难层
//提交表单创建平面图
onSubmit (e) {
onSubmit(e) {
if (!this.data.isBuilding) { //总平面图 创建平面图
let data = {
companyId: sessionStorage.getItem('companyId'),
name: e.name,
order: this.data.order,
area:e.area,
details:e.details,
area: e.area,
details: e.details,
enabled: true,
modifiedTime: new Date(),
}
this.http.post('/api/SitePlans',data).subscribe(data=>{
this.http.post('/api/SitePlans', data).subscribe(data => {
this.dialogRef.close('总平面图');
})
} else { //建筑 创建楼层/区域
@ -45,12 +45,12 @@ export class leftFunctionalDomainComponent implements OnInit {
buildingId: this.data.Panel.id,
name: e.name,
order: this.data.order,
area:e.area,
details:e.details,
area: e.area,
details: e.details,
enabled: true,
modifiedTime: new Date(),
}
this.http.post('/api/BuildingAreas',data,{params:this.params}).subscribe(data=>{
this.http.post('/api/BuildingAreas', data, { params: this.params }).subscribe(data => {
this.dialogRef.close('建筑');
})
}
@ -68,7 +68,7 @@ export class leftFunctionalDomainComponent implements OnInit {
})
export class editPlaneFigureComponent implements OnInit {
constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef<any>,@Inject(MAT_DIALOG_DATA) public data) { }
constructor(private http: HttpClient, public dialog: MatDialog, public snackBar: MatSnackBar, public dialogRef: MatDialogRef<any>, @Inject(MAT_DIALOG_DATA) public data) { }
ngOnInit(): void {
this.name = this.data.buildingData.name || ''
@ -77,14 +77,14 @@ export class editPlaneFigureComponent implements OnInit {
this.details = this.data.buildingData.details || ''
}
params = {companyId: sessionStorage.getItem('companyId')}
name:any; //name
checked:boolean = false;//是否为避难层
area:number; //面积
details:string; //详情
params = { companyId: sessionStorage.getItem('companyId') }
name: any; //name
checked: boolean = false;//是否为避难层
area: number; //面积
details: string; //详情
//提交表单修改平面图
onSubmit (e) {
onSubmit(e) {
if (!this.data.isBuilding) { //总平面图 修改平面图
let data = {
companyId: sessionStorage.getItem('companyId'),
@ -94,12 +94,12 @@ export class editPlaneFigureComponent implements OnInit {
imageUrl: this.data.buildingData.imageUrl,
imageAngle: this.data.buildingData.imageAngle,
order: this.data.buildingData.order,
area:e.area,
details:e.details,
area: e.area,
details: e.details,
enabled: this.data.buildingData.enabled,
modifiedTime: new Date(),
}
this.http.put(`/api/SitePlans/${this.data.buildingData.id}`,data).subscribe(data=>{
this.http.put(`/api/SitePlans/${this.data.buildingData.id}`, data).subscribe(data => {
this.dialogRef.close('总平面图');
})
} else { //建筑 修改楼层/区域
@ -112,12 +112,12 @@ export class editPlaneFigureComponent implements OnInit {
imageUrl: this.data.buildingData.imageUrl,
imageAngle: this.data.buildingData.imageAngle,
order: this.data.buildingData.order,
area:e.area,
details:e.details,
area: e.area,
details: e.details,
enabled: this.data.buildingData.enabled,
modifiedTime: new Date(),
}
this.http.put(`/api/BuildingAreas/${this.data.buildingData.id}`,data,{params:this.params}).subscribe(data=>{
this.http.put(`/api/BuildingAreas/${this.data.buildingData.id}`, data, { params: this.params }).subscribe(data => {
this.dialogRef.close('建筑');
})
}
@ -137,15 +137,15 @@ export class editPlaneFigureComponent implements OnInit {
})
export class addDisposalNodeComponent implements OnInit {
constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef<any>,@Inject(MAT_DIALOG_DATA) public data) { }
constructor(private http: HttpClient, public dialog: MatDialog, public snackBar: MatSnackBar, public dialogRef: MatDialogRef<any>, @Inject(MAT_DIALOG_DATA) public data) { }
ngOnInit(): void {
}
//提交表单
onSubmit (e) {
onSubmit(e) {
this.data.name = e.name
this.http.post('/api/DisposalNodes',this.data).subscribe(data=>{
this.http.post('/api/DisposalNodes', this.data).subscribe(data => {
this.dialogRef.close('success');
})
}
@ -162,17 +162,17 @@ export class addDisposalNodeComponent implements OnInit {
})
export class editDisposalNodeComponent implements OnInit {
constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef<any>,@Inject(MAT_DIALOG_DATA) public data) { }
constructor(private http: HttpClient, public dialog: MatDialog, public snackBar: MatSnackBar, public dialogRef: MatDialogRef<any>, @Inject(MAT_DIALOG_DATA) public data) { }
ngOnInit(): void {
this.nodeName = JSON.parse(JSON.stringify( this.data.name || '' ))
this.nodeName = JSON.parse(JSON.stringify(this.data.name || ''))
}
nodeName:string;
nodeName: string;
//提交表单
onSubmit (e) {
onSubmit(e) {
this.data.name = e.name
this.http.put(`/api/DisposalNodes/${this.data.id}`,this.data).subscribe(data=>{
this.http.put(`/api/DisposalNodes/${this.data.id}`, this.data).subscribe(data => {
this.dialogRef.close(e.name);
})
}

86
src/app/ui/collection-tools/panel.scss

@ -5,7 +5,7 @@
//平面图 素材库 公共样式 头部
.planarGraphHeader{
.planarGraphHeader {
height: 35px;
min-height: 35px;
cursor: pointer;
@ -20,6 +20,7 @@
color: #fff;
background: #07CDCF;
}
//平面图头部字体图标样式
.hover {
width: 18px;
@ -27,11 +28,19 @@
margin-left: 90px;
border: 1px solid #999;
border-radius: 3px;
.mat-icon {font-size: 18px; color: #999;}
.mat-icon {
font-size: 18px;
color: #999;
}
}
.hover:hover {
.hover:hover {
background-color: #4DA5FA;
.mat-icon {color: #fff;}
.mat-icon {
color: #fff;
}
}
//平面图
@ -42,6 +51,7 @@
line-height: 35px;
box-sizing: border-box;
padding: 0 10px 0 25px;
.mat-icon {
font-size: 20px;
}
@ -58,11 +68,13 @@
text-align: center;
position: relative;
overflow: hidden;
img{
width: 20px;
img {
width: 20px;
height: 20px;
}
}
//替换底图 inputfile
.a-upload {
display: block;
@ -74,6 +86,7 @@
text-align: center;
position: relative;
overflow: hidden;
input {
position: absolute;
width: 20px;
@ -83,11 +96,13 @@
opacity: 0;
}
}
.a-upload:hover {
.mat-icon {
color: #fff;
}
}
//上传底图 inputfile
#a-uploadImg {
display: block;
@ -100,6 +115,7 @@
border-radius: 5px;
border: 1px solid #999;
z-index: 999;
input {
position: absolute;
width: 300px;
@ -108,11 +124,13 @@
top: 0;
opacity: 0;
}
img {
width: 100%;
height: auto;
}
}
#a-uploadImg:hover {
border: 5px solid skyblue;
}
@ -123,8 +141,9 @@
display: block;
}
}
//右边操作栏
#rightOperate{
#rightOperate {
width: 50px;
height: 100px;
position: absolute;
@ -135,16 +154,20 @@
background-color: #F0F4F7;
// #F0F4F7 cdced1
display: none;
.functionButton {
height: 25%;
line-height: 25px;
}
.bigFunctionIcon {
font-size: 24px;
}
.functionIcon {
color: #999;
}
.functionIcon:hover {
color: #4DA5FA;
}
@ -165,29 +188,37 @@
.scenarioAssignment {
overflow-y: auto;
}
.selectEditMode {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
}
.materialBankDIV{
.materialBankDIV {
flex: 1;
overflow-x: hidden;
overflow-y: auto;
}
// 基本信息/想定作业 切换
//处置预案
#terrNodePublic {
height: 35px;
line-height: 35px;
display: flex;
.textNode {flex: 1;}
.textNode {
flex: 1;
}
}
//字体图标
.planIconDiv {
display: inline-block;
.mat-icon{
.mat-icon {
font-size: 20px;
width: 20px;
height: 20px;
@ -201,21 +232,29 @@
.mat-expansion-panel-header {
height: 40px !important;
}
//素材库溢出隐藏
#materialBank {
margin: 1px 0;
}
//素材库图片flex
.mat-expansion-panel-header {background-color: #d6f4f5;}
#panelLibrary .text{
.mat-expansion-panel-header {
background-color: #d6f4f5;
}
#panelLibrary .text {
box-sizing: border-box;
margin-left: 10px;
}
.panelLibraryFlex {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between; /* 水平居中 */
justify-content: space-between;
/* 水平居中 */
.imgBox {
width: 70px;
height: 100px;
@ -223,15 +262,17 @@
text-align: center;
border-radius: 3px;
margin: 5px 0;
img {
width: 70px;
height: auto;
max-height: 70px;
cursor:pointer;
cursor: pointer;
}
p {
font-size: 12px;
cursor:pointer;
cursor: pointer;
}
}
}
@ -239,24 +280,28 @@
//文本溢出
.overflowText {
overflow: hidden;
text-overflow:ellipsis;
text-overflow: ellipsis;
white-space: nowrap;
}
// 楼层/区域 是避难层时
.isRefugeStorey {
color: #FF8678;
background-color: #fff;
}
//选中平面图时
.selectSitePlan {
color: #fff;
background-color: #07CDCF;
}
//选中素材库图片时
.selectImg {
color: #fff;
background-color: #4DA5FA;
}
//选中 处置节点时
.selectanelPoint {
background-color: #F4C235;
@ -268,24 +313,29 @@
.keyMargin {
width: 100%;
margin: 5px 0;
.mat-form-field {
width: 100%;
}
}
.submitBottom {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between; /* 水平居中 */
justify-content: space-between;
/* 水平居中 */
}
.functionalDomainContent {
width: 300px;
height: 100%;
textarea {
border-radius: 5px;
border: 1px solid #999;
width: 100%;
height: 120px;
resize:none;
resize: none;
}
}

534
src/app/ui/collection-tools/save.ts

@ -2,303 +2,305 @@ import { Component, OnInit, Inject } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import {CanvasShareDataService,DisposalNodeData} from '../../canvas-share-data.service' //引入服务
import { CanvasShareDataService, DisposalNodeData } from '../../canvas-share-data.service' //引入服务
// 保存想定作业第一个弹窗
@Component({
selector: 'dialog-overview-example-dialog',
templateUrl: 'saveOne.html',
styleUrls: ['./collection-tools.component.scss']
selector: 'dialog-overview-example-dialog',
templateUrl: 'saveOne.html',
styleUrls: ['./collection-tools.component.scss']
})
export class saveOneDialog {
constructor(
private http:HttpClient,
public dialog: MatDialog,
public snackBar: MatSnackBar,
public dialogRef: MatDialogRef<saveOneDialog>,
@Inject(MAT_DIALOG_DATA) public data) {}
constructor(
private http: HttpClient,
public dialog: MatDialog,
public snackBar: MatSnackBar,
public dialogRef: MatDialogRef<saveOneDialog>,
@Inject(MAT_DIALOG_DATA) public data) { }
onNoClick(): void {
this.dialogRef.close()
}
allDisposalNode = this.data.allDisposalNode
onNoClick(): void {
this.dialogRef.close()
}
allDisposalNode = this.data.allDisposalNode
saveType(type){
this.dialogRef.close()
const dialogRef = this.dialog.open(saveTwoDialog, {
data: {type: type,
allDisposalNode: this.data.allDisposalNode,
selectedBuildingData:this.data.selectedBuildingData,
selectedSiteData:this.data.selectedSiteData,
siteOrbuilding:this.data.siteOrbuilding,
disasterId:this.data.disasterId}
});
dialogRef.afterClosed().subscribe(result => {
});
}
saveType(type) {
this.dialogRef.close()
const dialogRef = this.dialog.open(saveTwoDialog, {
data: {
type: type,
allDisposalNode: this.data.allDisposalNode,
selectedBuildingData: this.data.selectedBuildingData,
selectedSiteData: this.data.selectedSiteData,
siteOrbuilding: this.data.siteOrbuilding,
disasterId: this.data.disasterId
}
});
dialogRef.afterClosed().subscribe(result => {
});
}
}
// 保存想定作业第二个弹窗
// 保存想定作业第二个弹窗
@Component({
selector: 'dialog-overview-example-dialog',
templateUrl: 'saveTwo.html',
styleUrls: ['./collection-tools.component.scss']
selector: 'dialog-overview-example-dialog',
templateUrl: 'saveTwo.html',
styleUrls: ['./collection-tools.component.scss']
})
export class saveTwoDialog {
constructor(
private http:HttpClient,
public dialogRef: MatDialogRef<saveTwoDialog>,
public canvasData: CanvasShareDataService,
public snackBar: MatSnackBar,
@Inject(MAT_DIALOG_DATA) public data) {}
type = this.data.type
allDisposalNode = this.data.allDisposalNode
allPlanDisposalNode = []
allRootDisposalNode = [{name:"根节点",id:null}]
allDisposalNodeChild = []
ngOnInit(): void {
//所有非数据节点
this.allDisposalNode.forEach(item => {
if(!item.sitePlanId && !item.buildingAreaId){
this.allPlanDisposalNode.push(item)
}
})
export class saveTwoDialog {
//所有一级节点
this.allDisposalNode.forEach(item => {
if(!item.parentId){
this.allRootDisposalNode.push(item)
constructor(
private http: HttpClient,
public dialogRef: MatDialogRef<saveTwoDialog>,
public canvasData: CanvasShareDataService,
public snackBar: MatSnackBar,
@Inject(MAT_DIALOG_DATA) public data) { }
type = this.data.type
allDisposalNode = this.data.allDisposalNode
allPlanDisposalNode = []
allRootDisposalNode = [{ name: "根节点", id: null }]
allDisposalNodeChild = []
ngOnInit(): void {
//所有非数据节点
this.allDisposalNode.forEach(item => {
if (!item.sitePlanId && !item.buildingAreaId) {
this.allPlanDisposalNode.push(item)
}
})
//所有一级节点
this.allDisposalNode.forEach(item => {
if (!item.parentId) {
this.allRootDisposalNode.push(item)
}
})
this.allDisposalNodeChild = JSON.parse(JSON.stringify(this.allDisposalNode))
this.allDisposalNodeChild.forEach(item => {
item.children = []
this.allDisposalNodeChild.forEach(i => {
if (i.parentId == item.id) {
item.children.push(i)
}
})
this.allDisposalNodeChild = JSON.parse(JSON.stringify(this.allDisposalNode))
this.allDisposalNodeChild.forEach(item => {
item.children = []
this.allDisposalNodeChild.forEach(i => {
if(i.parentId == item.id){
item.children.push(i)
}
})
})
})
}
onNoClick(): void {
this.dialogRef.close();
}
nodeItem
itemChildNum = 0 //点击处置节点子数据节点的数量
clickNode(item) {
console.log(item)
this.nodeItem = item
this.allDisposalNodeChild.forEach(item => {
if (item.id == this.nodeItem.id) {
this.itemChildNum = item.children.length
}
})
}
selectedBuildingData = this.data.selectedBuildingData
selectedSiteData = this.data.selectedSiteData
onSubmit(value, type) {
// console.log(type)
let name = this.selectedBuildingData.name + '-' + this.selectedSiteData.name
//如果保存到已有节点
var postdata = {
id: "",
name: name,
level: 0,
order: this.itemChildNum,
description: "",
notes: "",
weather: null,
airTemperature: null,
windDirection: null,
windScale: null,
imageNames: null,
imageUrls: null,
parentId: this.nodeItem ? this.nodeItem.id : null,
examDisasterId: this.data.disasterId,
ExamPlanComponentId: sessionStorage.getItem('planId') || '',
companyId: this.data.siteOrbuilding == -1 ? sessionStorage.getItem('companyId') : null,
sitePlanId: this.data.siteOrbuilding == -1 ? this.selectedSiteData.id : null,
buildingId: this.selectedBuildingData.id || null,
buildingAreaId: this.data.siteOrbuilding != -1 ? this.selectedSiteData.id : null,
disposalNodeType: 0
}
onNoClick(): void {
this.dialogRef.close();
}
nodeItem
itemChildNum = 0 //点击处置节点子数据节点的数量
clickNode(item){
console.log(item)
this.nodeItem = item
this.allDisposalNodeChild.forEach(item => {
if(item.id == this.nodeItem.id){
this.itemChildNum = item.children.length
if (type == 'old') {
let istrue = this.canvasData.findDisposalNode(this.nodeItem.id, name)
let putdata = this.nodeItem
putdata.weather = this.canvasData.selectPanelPointBaseData.weather
putdata.airTemperature = Number(this.canvasData.selectPanelPointBaseData.airTemperature)
putdata.windScale = Number(this.canvasData.selectPanelPointBaseData.windScale)
putdata.windDirection = Number(this.canvasData.selectPanelPointBaseData.windDirection)
putdata.description = this.canvasData.selectPanelPointBaseData.description
putdata.notes = this.canvasData.selectPanelPointBaseData.notes
if (istrue) {//如果该处置节点下已有同名数据节点 则只修改 2个接口
new Promise((resolve, reject) => {
// this.http.put(`/api/DisposalNodes/${value.nodeId}`,putdata).subscribe(data => {
resolve("更新处置节点成功,将天气 节点详情等信息保存到点击的节点")
// })
}).then((values) => {
this.canvasData.sendMessage('send a message');//发布一条消息
// 保存平面图数据到当前节点
let postdata = JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint))
postdata.Data = JSON.stringify(postdata.Data)
this.http.post(`/api/ExamDisposalNodeData`, postdata).subscribe(data => {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('保存成功', '确定', config)
}, err => {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('保存失败', '确定', config)
})
this.dialogRef.close();
this.canvasData.sendMessage('send a message');//发布一条消息
})
} else {//需要3个接口
new Promise((resolve, reject) => {
// this.http.put(`/api/DisposalNodes/${value.nodeId}`,putdata).subscribe(data => {
resolve("更新处置节点成功,将天气 节点详情等信息保存到点击的节点")
// })
}).then((values) => {
console.log(values)
postdata.level = putdata.level + 1
new Promise((resolve, reject) => {
this.http.post(`/api/ExamDisposalNodes`, postdata).subscribe(data => {
resolve(data)
})
}).then((data: any) => {
console.log(7788, data)
let objData = {
id: "",
data: JSON.stringify(this.canvasData.selectPanelPoint.Data) || null,
version: this.canvasData.selectPanelPoint.Version || "2.0",
ExamDisposalNodeId: data.id,
ExamPlanComponentId: sessionStorage.getItem("planId"),
}
this.http.post(`/api/ExamDisposalNodeData`, objData).subscribe(data => {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('保存成功', '确定', config)
}, err => {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('保存失败', '确定', config)
})
this.dialogRef.close();
this.canvasData.sendMessage('send a message');//发布一条消息
})
})
}
} else {//如果保存到新建节点
let dispositionNodeData //处置节点data
let order
let oneLevelNum = []
//将order赋值为所有一级节点最后一个+1
this.allDisposalNode.forEach(item => {
if (!item.parentId) {
oneLevelNum.push(item)
}
})
}
if (oneLevelNum.length == 0) {
order = 0
} else {
order = oneLevelNum[oneLevelNum.length - 1].order + 1
}
selectedBuildingData = this.data.selectedBuildingData
selectedSiteData = this.data.selectedSiteData
onSubmit(value,type){
// console.log(type)
let name = this.selectedBuildingData.name + '-' + this.selectedSiteData.name
//如果保存到已有节点
var postdata = {
id: "",
name: name,
level: 0,
order: this.itemChildNum,
description: "",
notes: "",
if (this.nodeItem) {//如果点击了下拉选择框
if (this.nodeItem.id != null) {
this.allDisposalNodeChild.forEach(item => {
if (item.id == this.nodeItem.id) {
order = item.children.length
}
})
}
}
dispositionNodeData = {
id: null,
name: value.name,
level: this.nodeItem && this.nodeItem.id != null ? this.nodeItem.level + 1 : 0,
order: order,
description: null,
notes: null,
weather: null,
airTemperature: null,
windDirection: null,
windScale: null,
airTemperature: 0,
windDirection: 0,
windScale: 0,
imageNames: null,
imageUrls: null,
parentId: this.nodeItem ? this.nodeItem.id : null,
parentId: this.nodeItem ? this.nodeItem.id : null,
examDisasterId: this.data.disasterId,
ExamPlanComponentId: sessionStorage.getItem('planId') || '',
companyId: this.data.siteOrbuilding == -1 ? sessionStorage.getItem('companyId') : null,
sitePlanId: this.data.siteOrbuilding==-1 ? this.selectedSiteData.id : null,
buildingId: this.selectedBuildingData.id || null,
buildingAreaId: this.data.siteOrbuilding!=-1 ? this.selectedSiteData.id : null,
disposalNodeType:0
companyId: null,
sitePlanId: null,
buildingId: null,
buildingAreaId: null,
disposalNodeType: 0
}
if(type == 'old'){
let istrue = this.canvasData.findDisposalNode(this.nodeItem.id,name)
let putdata = this.nodeItem
putdata.weather = this.canvasData.selectPanelPointBaseData.weather
putdata.airTemperature = Number(this.canvasData.selectPanelPointBaseData.airTemperature)
putdata.windScale = Number(this.canvasData.selectPanelPointBaseData.windScale)
putdata.windDirection = Number(this.canvasData.selectPanelPointBaseData.windDirection)
putdata.description = this.canvasData.selectPanelPointBaseData.description
putdata.notes = this.canvasData.selectPanelPointBaseData.notes
if(istrue){//如果该处置节点下已有同名数据节点 则只修改 2个接口
new Promise((resolve,reject)=>{
// this.http.put(`/api/DisposalNodes/${value.nodeId}`,putdata).subscribe(data => {
resolve("更新处置节点成功,将天气 节点详情等信息保存到点击的节点")
// })
}).then((values)=>{
this.canvasData.sendMessage('send a message');//发布一条消息
// 保存平面图数据到当前节点
let postdata =JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint))
postdata.Data = JSON.stringify(postdata.Data)
this.http.post(`/api/ExamDisposalNodeData`,postdata).subscribe(data => {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('保存成功','确定',config)
},err=>{
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('保存失败','确定',config)
})
this.dialogRef.close();
this.canvasData.sendMessage('send a message');//发布一条消息
})
}else{//需要3个接口
new Promise((resolve,reject)=>{
// this.http.put(`/api/DisposalNodes/${value.nodeId}`,putdata).subscribe(data => {
resolve("更新处置节点成功,将天气 节点详情等信息保存到点击的节点")
// })
}).then((values)=>{
console.log(values)
postdata.level = putdata.level + 1
new Promise((resolve,reject) => {
this.http.post(`/api/ExamDisposalNodes`,postdata).subscribe(data => {
resolve(data)
})
}).then((data:any)=>{
console.log(7788,data)
let objData = {
id: "",
data: JSON.stringify(this.canvasData.selectPanelPoint.Data) || null,
version: this.canvasData.selectPanelPoint.Version || "2.0",
ExamDisposalNodeId: data.id,
ExamPlanComponentId: sessionStorage.getItem("planId"),
}
this.http.post(`/api/ExamDisposalNodeData`,objData).subscribe(data => {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('保存成功','确定',config)
},err=>{
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('保存失败','确定',config)
})
this.dialogRef.close();
this.canvasData.sendMessage('send a message');//发布一条消息
})
})
}
}else{//如果保存到新建节点
let dispositionNodeData //处置节点data
let order
let oneLevelNum = []
//将order赋值为所有一级节点最后一个+1
this.allDisposalNode.forEach(item => {
if(!item.parentId){
oneLevelNum.push(item)
}
dispositionNodeData.weather = this.canvasData.selectPanelPointBaseData.weather
dispositionNodeData.airTemperature = Number(this.canvasData.selectPanelPointBaseData.airTemperature)
dispositionNodeData.windScale = Number(this.canvasData.selectPanelPointBaseData.windScale)
dispositionNodeData.windDirection = Number(this.canvasData.selectPanelPointBaseData.windDirection)
dispositionNodeData.description = this.canvasData.selectPanelPointBaseData.description
dispositionNodeData.notes = this.canvasData.selectPanelPointBaseData.notes
//1.先创建一个处置节点 然后 .then 2.创建数据节点到刚创建的处置节点 3.然后拿着创建好的数据节点的id 将平面图data保存
new Promise((resolve, reject) => {
this.http.post("/api/ExamDisposalNodes", dispositionNodeData).subscribe((data: any) => {
resolve(data.id)
})
if(oneLevelNum.length == 0){
order = 0
}else{
order = oneLevelNum[oneLevelNum.length - 1].order + 1
}
if(this.nodeItem){//如果点击了下拉选择框
if(this.nodeItem.id != null){
this.allDisposalNodeChild.forEach(item => {
if(item.id == this.nodeItem.id){
order = item.children.length
}
})
}).then((id) => {
let dataNodeData
console.log("qnm", id)
new Promise((resolve, reject) => {
postdata.parentId = id
postdata.level = dispositionNodeData.level + 1
this.http.post("/api/ExamDisposalNodes", postdata).subscribe((data: any) => {
resolve(data)
})
}).then((data: any) => {
// 保存平面图数据到当前节点
// console.log(6666,data)
// let postdata =JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint))
// postdata.Data = JSON.stringify(postdata.Data)
console.log('处置素材', this.canvasData.selectPanelPoint.Data)
let objData = {
id: null,
data: JSON.stringify(this.canvasData.selectPanelPoint.Data) || null,
version: this.canvasData.selectPanelPoint.Version || "2.0",
ExamDisposalNodeId: data.id,
ExamPlanComponentId: sessionStorage.getItem("planId"),
}
}
dispositionNodeData = {
id: null,
name: value.name,
level: this.nodeItem && this.nodeItem.id != null ? this.nodeItem.level + 1 : 0,
order: order,
description: null,
notes: null,
weather: null,
airTemperature: 0,
windDirection: 0,
windScale: 0,
imageNames: null,
imageUrls: null,
parentId: this.nodeItem ? this.nodeItem.id : null,
examDisasterId: this.data.disasterId,
ExamPlanComponentId: sessionStorage.getItem('planId') || '',
companyId: null,
sitePlanId: null,
buildingId: null,
buildingAreaId: null,
disposalNodeType:0
}
dispositionNodeData.weather = this.canvasData.selectPanelPointBaseData.weather
dispositionNodeData.airTemperature = Number(this.canvasData.selectPanelPointBaseData.airTemperature)
dispositionNodeData.windScale = Number(this.canvasData.selectPanelPointBaseData.windScale)
dispositionNodeData.windDirection = Number(this.canvasData.selectPanelPointBaseData.windDirection)
dispositionNodeData.description = this.canvasData.selectPanelPointBaseData.description
dispositionNodeData.notes = this.canvasData.selectPanelPointBaseData.notes
//1.先创建一个处置节点 然后 .then 2.创建数据节点到刚创建的处置节点 3.然后拿着创建好的数据节点的id 将平面图data保存
new Promise((resolve,reject) => {
this.http.post("/api/ExamDisposalNodes",dispositionNodeData).subscribe((data:any) => {
resolve(data.id)
})
}).then((id) => {
let dataNodeData
console.log("qnm",id)
new Promise((resolve,reject) => {
postdata.parentId = id
postdata.level = dispositionNodeData.level + 1
this.http.post("/api/ExamDisposalNodes",postdata).subscribe((data:any) => {
resolve(data)
})
}).then((data:any) => {
// 保存平面图数据到当前节点
// console.log(6666,data)
// let postdata =JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint))
// postdata.Data = JSON.stringify(postdata.Data)
console.log('处置素材',this.canvasData.selectPanelPoint.Data)
let objData = {
id: null,
data: JSON.stringify(this.canvasData.selectPanelPoint.Data) || null,
version: this.canvasData.selectPanelPoint.Version || "2.0",
ExamDisposalNodeId: data.id,
ExamPlanComponentId: sessionStorage.getItem("planId"),
}
this.http.post(`/api/ExamDisposalNodeData`,objData).subscribe(data => {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('保存成功','确定',config)
},err=>{
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('保存失败','确定',config)
})
this.dialogRef.close();
this.canvasData.sendMessage("send a message")
this.http.post(`/api/ExamDisposalNodeData`, objData).subscribe(data => {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('保存成功', '确定', config)
}, err => {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('保存失败', '确定', config)
})
this.dialogRef.close();
this.canvasData.sendMessage("send a message")
})
}
})
}
}
}

6
src/app/ui/collection-tools/saveOne.html

@ -1,5 +1,7 @@
<div style="text-align: center; margin-bottom: 25px; font-weight: 550;">处置节点保存</div>
<div style="display: flex;">
<button mat-stroked-button style="margin-right: 15px; color: #fff; background-color: #07CDCF; border: none;" (click)="saveType('new')">新建节点并保存</button>
<button mat-stroked-button style="margin-left: 15px; color: #fff; background-color: #FF8678; border: none;" (click)="saveType('old')">保存到已有节点</button>
<button mat-stroked-button style="margin-right: 15px; color: #fff; background-color: #07CDCF; border: none;"
(click)="saveType('new')">新建节点并保存</button>
<button mat-stroked-button style="margin-left: 15px; color: #fff; background-color: #FF8678; border: none;"
(click)="saveType('old')">保存到已有节点</button>
</div>

19
src/app/ui/collection-tools/saveTwo.html

@ -5,22 +5,21 @@
<div mat-dialog-content>
<mat-form-field>
<input type="text" matInput ngModel
required name="name" placeholder="节点名称" autocomplete="off">
<input type="text" matInput ngModel required name="name" placeholder="节点名称" autocomplete="off">
</mat-form-field>
</div>
<div mat-dialog-content>
<mat-form-field>
<mat-select [(value)]="allRootDisposalNode[0].name" required placeholder="父节点名称">
<mat-option *ngFor="let item of allRootDisposalNode" [value]="item.name" (click)="clickNode(item)">
<mat-option *ngFor="let item of allRootDisposalNode" [value]="item.name"
(click)="clickNode(item)">
{{item.name}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
<div mat-dialog-actions>
<button mat-raised-button color="primary" type="submit"
[disabled]="!form.form.valid">
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid">
确定
</button>
<button mat-raised-button mat-dialog-close>取消</button>
@ -35,15 +34,15 @@
<div mat-dialog-content>
<mat-form-field>
<mat-select required ngModel placeholder="父节点名称" name="nodeId">
<mat-option *ngFor="let item of allPlanDisposalNode" [value]="item.id" (click)="clickNode(item)">
<mat-option *ngFor="let item of allPlanDisposalNode" [value]="item.id"
(click)="clickNode(item)">
{{item.name}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
<div mat-dialog-actions>
<button mat-raised-button color="primary" type="submit"
[disabled]="!form.form.valid">
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid">
确定
</button>
<button mat-raised-button mat-dialog-close>取消</button>

6
src/app/ui/collection-tools/uploadDisposalNodes.html

@ -1,5 +1,6 @@
<div id="disposalNodeTree">
<div style="max-height: 500px;overflow-x: hidden;overflow-y: auto;margin-bottom: 25px;width: 330px;padding-right: 10px;">
<div
style="max-height: 500px;overflow-x: hidden;overflow-y: auto;margin-bottom: 25px;width: 330px;padding-right: 10px;">
<nz-tree #nzTreeComponent [nzData]="treeData" nzCheckable nzMultiple [nzTreeTemplate]="nzTreeTemplate"></nz-tree>
<ng-template #nzTreeTemplate let-node let-origin="origin">
<div id="terrNodePublic">
@ -8,7 +9,8 @@
</ng-template>
</div>
<div style="text-align: center;">
<button mat-stroked-button style="margin-right: 15px;border: none;background: #07CDCF;color: #fff;" (click)='submit()'>确定</button>
<button mat-stroked-button style="margin-right: 15px;border: none;background: #07CDCF;color: #fff;"
(click)='submit()'>确定</button>
<button mat-stroked-button style="margin-left: 15px;border: none;background: #dfe0e0;" mat-dialog-close>取消</button>
</div>
</div>

41
src/app/ui/collection-tools/uploadQuestions.html

@ -2,50 +2,39 @@
<div style="text-align: center;font-weight: 550;">上传</div>
<div style="padding-left: 10px; font-size: 14px; font-weight: 550;margin: 5px 0;">考试要点</div>
<div style="margin-bottom: 25px;">
<textarea style="width: 100%;background-color: #dfe0e0;border: none;outline: none;height: 50px;border-radius: 5px;resize: none;" placeholder="请填写考试要点" [(ngModel)]="data.question.keynote"></textarea>
<textarea
style="width: 100%;background-color: #dfe0e0;border: none;outline: none;height: 50px;border-radius: 5px;resize: none;"
placeholder="请填写考试要点" [(ngModel)]="data.question.keynote"></textarea>
</div>
<div style="padding-left: 10px; font-size: 14px; font-weight: 550;margin: 5px 0;">考核消防设施</div>
<div style="max-height: 200px;overflow-y: auto;margin-bottom: 25px;">
<!-- 消防列表树 -->
<nz-tree
#nzTreeComponent
[nzData]="renderData"
nzMultiple
[nzCheckedKeys]="defaultCheckedKeys"
[nzExpandedKeys]="defaultExpandedKeys"
[nzSelectedKeys]="defaultSelectedKeys"
(nzClick)="nzEvent($event)"
(nzExpandChange)="nzEvent($event)"
(nzCheckBoxChange)="nzEvent($event)"
[nzTreeTemplate]="nzTreeTemplate"
>
<nz-tree #nzTreeComponent [nzData]="renderData" nzMultiple [nzCheckedKeys]="defaultCheckedKeys"
[nzExpandedKeys]="defaultExpandedKeys" [nzSelectedKeys]="defaultSelectedKeys" (nzClick)="nzEvent($event)"
(nzExpandChange)="nzEvent($event)" (nzCheckBoxChange)="nzEvent($event)" [nzTreeTemplate]="nzTreeTemplate">
</nz-tree>
<ng-template #nzTreeTemplate let-node let-origin="origin">
<div class="treeNodeTemplate">
<label class="overflowText textNode">{{node.origin.name || node.origin.Name}}</label>
</div>
<div class="treeNodeTemplate">
<label class="overflowText textNode">{{node.origin.name || node.origin.Name}}</label>
</div>
</ng-template>
<!-- 消防列表树 -->
</div>
<div style="padding-left: 10px; font-size: 14px; font-weight: 550;margin: 5px 0;">考核处置节点</div>
<div style="max-height: 200px;overflow-y: auto;margin-bottom: 25px;">
<!-- 消防列表树 -->
<nz-tree
#nzTreeComponent
[nzData]="nodeTreeData"
nzMultiple
[nzTreeTemplate]="nzTreeTemplate"
>
<nz-tree #nzTreeComponent [nzData]="nodeTreeData" nzMultiple [nzTreeTemplate]="nzTreeTemplate">
</nz-tree>
<ng-template #nzTreeTemplate let-node let-origin="origin">
<div class="treeNodeTemplate">
<label class="overflowText textNode">{{node.origin.name || node.origin.Name}}</label>
</div>
<div class="treeNodeTemplate">
<label class="overflowText textNode">{{node.origin.name || node.origin.Name}}</label>
</div>
</ng-template>
<!-- 消防列表树 -->
</div>
<div style="text-align: center;">
<button mat-stroked-button style="margin-right: 15px;border: none;background: #07CDCF;color: #fff;" (click)='submit()'>确定</button>
<button mat-stroked-button style="margin-right: 15px;border: none;background: #07CDCF;color: #fff;"
(click)='submit()'>确定</button>
<button mat-stroked-button style="margin-left: 15px;border: none;background: #dfe0e0;" mat-dialog-close>取消</button>
</div>
</div>

11
src/app/ui/collection-tools/viewdetails.html

@ -1,8 +1,11 @@
<div style="position: relative;width: 1400px;height: 800px;line-height: 800px;" class="swiper-container">
<div style="position: absolute;right: -2px;top: -392px;cursor: pointer;z-index: 999;width: 24px;height: 24px;" (click)="closeDialog()">
<span><mat-icon>clear</mat-icon></span>
<div style="position: absolute;right: -2px;top: -392px;cursor: pointer;z-index: 999;width: 24px;height: 24px;"
(click)="closeDialog()">
<span>
<mat-icon>clear</mat-icon>
</span>
</div>
<div class="swiper-wrapper">
<div class="swiper-slide" style="text-align: center;" *ngFor="let img of imagesArr">
<img id="bigimg" (mousewheel)="zoomimg($event)" style="
@ -18,7 +21,7 @@
margin: auto;" [src]="img.PropertyValue" alt="">
</div>
</div>
<!-- 如果需要导航按钮 -->
<!-- 如果需要导航按钮 -->
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
Loading…
Cancel
Save