Browse Source

[合并]合并冲突

zhuzhou
邵佳豪 4 years ago
parent
commit
1636f76e6c
  1. 4
      angular.json
  2. 1
      package.json
  3. 2
      src/app/data-collection/fire-force/fire-force.component.ts
  4. 2
      src/app/data-collection/linkage-forces/linkage-forces.component.ts
  5. 2
      src/app/external-links-plan/external-links-plan.component.ts
  6. 2
      src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts
  7. 2
      src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts
  8. 2
      src/app/plan-audit/plan-record/plan-record.component.ts
  9. 53
      src/app/plan-audit/wait-examineer/wait-examineer.component.ts
  10. 47
      src/app/plan-management/entry-plan-look/entry-plan-look.component.scss
  11. 113
      src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
  12. 29
      src/app/plan-management/entry-plan-look/previewImg.html
  13. 4
      src/app/plan-management/meet-plan/meet-plan.component.ts
  14. 4
      src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts
  15. 3
      src/app/plan-management/plan-management.module.ts
  16. 2
      src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts
  17. 2
      src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts
  18. 4
      src/app/statistic-analysis/all-plan/all-plan.component.ts
  19. 8
      src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.html
  20. 27
      src/app/statistic-analysis/real-monitoring/real-monitoring.component.ts
  21. 35
      src/app/ui/plan-template/addKeyname.html
  22. 77
      src/app/ui/plan-template/addKeyname.scss
  23. 34
      src/app/ui/plan-template/plan-template.component.html
  24. 97
      src/app/ui/plan-template/plan-template.component.scss
  25. 25
      src/app/ui/plan-template/plan-template.component.spec.ts
  26. 81
      src/app/ui/plan-template/plan-template.component.ts
  27. 10
      src/app/ui/ui-routing.module.ts
  28. 15
      src/app/ui/ui.module.ts
  29. BIN
      src/assets/images/add.png
  30. BIN
      src/assets/images/deleteblue.png
  31. BIN
      src/assets/images/deletehui.png
  32. BIN
      src/assets/images/updatehui.png

4
angular.json

@ -67,8 +67,8 @@
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
"maximumWarning": "16kb",
"maximumError": "32kb"
}
]
}

1
package.json

@ -5,6 +5,7 @@
"ng": "ng",
"start": "ng serve --proxy-config proxy.config.json --open",
"build": "ng build",
"publish": "ng build --prod --verbose",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"

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

@ -1137,7 +1137,7 @@ export class FireForceComponent implements OnInit {
doc: {
docId: new Date(),
title: item.fileName,
fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+fetchUrl
},
user: {
uid: "test",

2
src/app/data-collection/linkage-forces/linkage-forces.component.ts

@ -871,7 +871,7 @@ export class LinkageForcesComponent implements OnInit {
doc: {
docId: new Date(),
title: item.fileName,
fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+fetchUrl
},
user: {
uid: "test",

2
src/app/external-links-plan/external-links-plan.component.ts

@ -87,7 +87,7 @@ export class ExternalLinksPlanComponent implements OnInit {
docId: docId,
title: filename,
//title: filename,
fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/` + this.fetchUrl
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/` + this.fetchUrl
},
user: {
uid: identityJsonparse.sub,

2
src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts

@ -172,7 +172,7 @@ export class FireforceAuditComponent implements OnInit {
doc: {
docId: docId,
title: item.fileName,
fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+fetchUrl
},
user: {
uid: identityJsonparse.sub,

2
src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts

@ -182,7 +182,7 @@ export class LinkageforcesAuditComponent implements OnInit {
doc: {
docId: docId,
title: item.fileName,
fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+fetchUrl
},
user: {
uid: identityJsonparse.sub,

2
src/app/plan-audit/plan-record/plan-record.component.ts

@ -246,7 +246,7 @@ export class PlanRecordComponent implements OnInit {
docId: docId,
title: filename,
//title: filename,
fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+this.fetchUrl
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+this.fetchUrl
},
user: {
uid: identityJsonparse.sub,

53
src/app/plan-audit/wait-examineer/wait-examineer.component.ts

@ -281,32 +281,33 @@ export class WaitExamineerComponent implements OnInit {
let jwt = sessionStorage.getItem("token");
let rawJwt = CryptoJS.enc.Base64.parse(jwt.split('.')[1]);
let identityJson = CryptoJS.enc.Utf8.stringify(rawJwt);
let identityJsonparse = JSON.parse(identityJson)
let filename: string
this.http.get(`/api/ObjectMetadata/PlanPlatform/${this.fetchUrl}`).subscribe((data: any) => {
filename = data.fileName
let json = {
doc: {
docId: docId,
title: filename,
//title: filename,
fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/` + this.fetchUrl
},
user: {
uid: identityJsonparse.sub,
nickName: identityJsonparse.name,
avatar: "",
privilege: [
'FILE_READ', 'FILE_DOWNLOAD', 'FILE_PRINT'
],
},
}
var stringjson = JSON.stringify(json)
var wordArray = CryptoJS.enc.Utf8.parse(stringjson);
var base64 = CryptoJS.enc.Base64.stringify(wordArray);
this.src = `http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
})
let identityJsonparse=JSON.parse(identityJson)
let filename:string
this.http.get(`/api/ObjectMetadata/PlanPlatform/${this.fetchUrl}`).subscribe((data:any)=>{
filename=data.fileName
let json={
doc: {
docId: docId,
title: filename,
//title: filename,
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+this.fetchUrl
},
user: {
uid: identityJsonparse.sub,
nickName: identityJsonparse.name,
avatar: "",
privilege: [
'FILE_READ','FILE_DOWNLOAD', 'FILE_PRINT'
],
},
}
var stringjson=JSON.stringify(json)
var wordArray = CryptoJS.enc.Utf8.parse(stringjson);
var base64 = CryptoJS.enc.Base64.stringify(wordArray);
this.src=`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`
this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
//window.open(`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`)
})
}
//查看按钮跳转
lookNew() {

47
src/app/plan-management/entry-plan-look/entry-plan-look.component.scss

@ -125,3 +125,50 @@
.mat-dialog-container{
padding: 0;
}
//预览图片旋转角度
.rotateA {transform: rotate(90deg) scale(0.75);}
.rotateB {transform: rotate(180deg)}
.rotateC {transform: rotate(270deg) scale(0.75);}
@media screen and (max-width:1200px){
.bigimgbox{
width: 880px;
height: 580px;
//预览图片
.previewImgBox {
width: 800px;
height: 475px;
text-align: center;
}
}
}
@media screen and (min-width:1200px) and (max-width:1400px){
.bigimgbox{
width:880px;
height: 610px;
//预览图片
.previewImgBox {
width: 800px;
height: 500px;
text-align: center;
}
}
}
@media screen and (min-width:1400px){
.bigimgbox{
width:1110px;
height: 860px;
//预览图片
.previewImgBox {
width: 900px;
height: 100%;
text-align: center;
}
.previewImgBottom {
text-align: center;
height: 30px;
margin: 20px auto;
}
}
}

113
src/app/plan-management/entry-plan-look/entry-plan-look.component.ts

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient,HttpHeaders } from '@angular/common/http'
import { HttpClient,HttpHeaders,HttpErrorResponse } from '@angular/common/http'
import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
import { MatPaginator } from '@angular/material/paginator';
import { FlatTreeControl } from '@angular/cdk/tree';
@ -13,6 +13,7 @@ import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import { async } from '@angular/core/testing';
import { Viewer } from 'photo-sphere-viewer';
import {STEPPER_GLOBAL_OPTIONS} from '@angular/cdk/stepper';
import Swiper from 'swiper';
declare var CryptoJS
@Component({
selector: 'app-entry-plan-look',
@ -103,7 +104,7 @@ export class EntryPlanLookComponent implements OnInit {
}
//查看预案
lookPlan(e){
if(e.planType == 16||e.planType == 4){
if(e.planType == 16||e.planType == 4||e.planType == 8){
// console.log(e.attachmentUrls)
var index=e.attachmentUrls[0].indexOf("\/")
if(e.attachmentUrls[0].substr(0,index)=='psw'){
@ -112,6 +113,12 @@ export class EntryPlanLookComponent implements OnInit {
height:'800px',
data: e.attachmentUrls[0]
});
}else if(e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='JPG'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='png'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='jpeg'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='jpg'){
let data = e
const dialogRef = this.dialog.open(ImgDetails, {//调用open方法打开对话框并且携带参数过去
data:data.attachmentUrls,
});
dialogRef.afterClosed().subscribe();
}
else /* if(e.attachmentUrls[0].substr(e.attachmentUrls[0].length-4,e.attachmentUrls[0].length-1)=='docx'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='pdf'
||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='doc'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='DOC'
@ -177,16 +184,48 @@ export class EntryPlanLookComponent implements OnInit {
}
//编辑预案
editPlan(e){
if(e.planMode == 2){ //如果是在线编辑
let id = e.id
sessionStorage.setItem("planId",id)
sessionStorage.setItem("companyId",this.companyId)
sessionStorage.setItem("buildingTypeId",this.unittypeId)
sessionStorage.setItem("editable","1")
sessionStorage.setItem("planName",e.name)
let companyId = sessionStorage.getItem("companyId")
window.open(`/keyUnit/editunitinfo?id=${companyId}&orName=${this.route.snapshot.queryParams.orName}&orId=${this.route.snapshot.queryParams.orId}`);
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
let isTrue = confirm('编辑后审核状态会成为未审核状态,您确定要编辑吗')
if (isTrue){
if(e.planType == 1){ //如果是在线编辑
let id = e.id
sessionStorage.setItem("planId",id)
sessionStorage.setItem("companyId",this.companyId)
sessionStorage.setItem("buildingTypeId",this.unittypeId)
sessionStorage.setItem("editable","1")
sessionStorage.setItem("planName",e.name)
let companyId = sessionStorage.getItem("companyId")
window.open(`/keyUnit/editunitinfo?id=${companyId}&orName=${this.route.snapshot.queryParams.orName}&orId=${this.route.snapshot.queryParams.orId}`);
}
else if(e.planType==16){
this.lookPlan(e)
// let body={
// // id:e.planId,
// // resetAudit:true
// ""
// }
let body = JSON.stringify("");
let resetAudit=true
let headers = new HttpHeaders({
'Content-Type': 'text/json'
});
let options = {
headers
};
this.http.put(`/api/PlanComponents/${e.id}?resetAudit=${resetAudit}`, body, options).subscribe(data=>{
this.getAllPlanComponents()
},err => {
this.snackBar.open(err,'确定',config);
})
}
else{
this.snackBar.open('只有二维预案和文本预案可以编辑!','确定',config);
}
}
}
allPlanComponents:any //所有预案组件
companyId : any //新建预案需要使用的id
@ -250,6 +289,7 @@ export class EntryPlanLookComponent implements OnInit {
}
//删除预案
deletePlan(plandata){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
@ -259,8 +299,6 @@ export class EntryPlanLookComponent implements OnInit {
this.http.delete(`/api/PlanComponents2D/${plandata.id}`).subscribe(data=>{
this.snackBar.open('删除成功!','确定',config);
this.getAllPlanComponents()
},err => {
this.snackBar.open(err,'确定',config);
})
}else{
this.http.delete(`/api/PlanComponents/${plandata.id}`).subscribe(data=>{
@ -269,8 +307,6 @@ export class EntryPlanLookComponent implements OnInit {
config.duration = 3000
this.snackBar.open('删除成功!','确定',config);
this.getAllPlanComponents()
},err => {
this.snackBar.open(err,'确定',config);
})
}
}
@ -990,6 +1026,8 @@ export class AddPlanone {
//下载文件弹出框
@Component({
selector: 'downloadfile',
@ -1112,3 +1150,48 @@ export class PsViewer{
});
}
}
//普通图片弹窗
@Component({
selector: 'imgdetails',
templateUrl: './previewImg.html',
styleUrls: ['./entry-plan-look.component.scss']
})
export class ImgDetails{
constructor(private http:HttpClient,public dialog: MatDialog,public dialogRef: MatDialogRef<ImgDetails>,
@Inject(MAT_DIALOG_DATA) public data) { }
testSwiper: Swiper;
ngOnInit(): void {
//console.log(this.data)
this.allImages = []
this.data.forEach(element => {
element = `/api/Objects/PlanPlatform/${element}?x-oss-process=image/auto-orient,1`
this.allImages.push(element)
});
//this.allImages.push(`${this.data.attachmentUrls[0]}?x-oss-process=image/auto-orient,1`)
}
ngAfterViewInit() {
this.testSwiper = new Swiper('.swiper-container', {
lazy: true,
direction: 'horizontal',
loop: false,
// 如果需要前进后退按钮
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
}
});
}
allImages:any; //展示所有的图片
rotationAngle:number=0; //旋转角度
//旋转图片
rotate () {
this.rotationAngle = this.rotationAngle+90
if (this.rotationAngle === 360) {this.rotationAngle = 0}
}
}

29
src/app/plan-management/entry-plan-look/previewImg.html

@ -0,0 +1,29 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-05-18 15:09:43
* @LastEditors: sueRimn
* @LastEditTime: 2021-05-18 15:25:35
-->
<div class="bigimgbox">
<!-- <div mat-dialog-title>图片详情</div> -->
<div class="swiper-container">
<div class="swiper-wrapper">
<div *ngFor="let item of allImages" class="swiper-slide previewImgBox">
<img [ngClass]="{'rotateA':rotationAngle==90,'rotateB':rotationAngle==180,'rotateC':rotationAngle==270}" class="swiper-lazy"
[attr.data-src]="item">
<div class="swiper-lazy-preloader"></div>
</div>
</div>
<!-- 如果需要导航按钮 -->
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
</div>
<div class="previewImgBottom">
<button type="button" mat-icon-button (click)='rotate()'><mat-icon>refresh</mat-icon></button>
</div>
</div>

4
src/app/plan-management/meet-plan/meet-plan.component.ts

@ -217,7 +217,7 @@ export class MeetPlanComponent implements OnInit {
//查看预案
openPlan(element){
//fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl
//fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+fetchUrl
let filename:string
let fetchUrl = element.attachmentUrls[0]
let docIdWordArray = CryptoJS.enc.Utf8.parse(`PlanPlatform/` + fetchUrl);
@ -232,7 +232,7 @@ export class MeetPlanComponent implements OnInit {
doc: {
docId: docId,
title: filename,
fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl,
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+fetchUrl,
},
user: {
uid: identityJsonparse.sub,

4
src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-12-24 14:15:10
* @LastEditors: sueRimn
* @LastEditTime: 2021-03-31 14:12:46
* @LastEditTime: 2021-05-14 17:09:58
*/
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'
@ -241,7 +241,7 @@ export class OnetwoEntryPlanComponent implements OnInit {
doc: {
docId: docId,
title: filename,
fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl,
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+fetchUrl,
},
user: {
uid: identityJsonparse.sub,

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

@ -64,13 +64,14 @@ import { MaintainUpComponent } from './maintain-up/maintain-up.component'
import { GkPsViewer } from './pass-plan/pass-plan.component'
import { GkhtmlPsViewer }from './open-plan/open-plan.component';
import { ReinforcePlanComponent } from './reinforce-plan/reinforce-plan.component'
import { ImgDetails } from './entry-plan-look/entry-plan-look.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],
typeAuditResult, MaintainUpComponent,GkPsViewer,GkhtmlPsViewer,UnitInfo, ReinforcePlanComponent, state,ImgDetails],
imports: [
CommonModule,
PlanManagementRoutingModule,

2
src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts

@ -232,7 +232,7 @@ export class AddUnitOneComponent implements OnInit {
}
this.res+='</tbody>'
this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">'+allCountbi.toFixed(2)+'%</td></tfoot>'
this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">100%</td></tfoot>'
this.res+='</table></div></div>'
return this.res
}

2
src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts

@ -426,7 +426,7 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
if (item.echart.containPixel('grid',pointInPixel)){
let xIndex=item.echart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
if(this.zhiorbuild=='zhi'){
if((this.data.level=='0'||this.data.level=='1')&&this.tabledata[0].buildingTypes[xIndex].organizations.length>=1){
if((this.data.level=='0'||this.data.level=='1')&&this.tabledata[0].buildingTypes[xIndex].organizations.length>1){
//总队,支队跳转
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_typeDetails'],{queryParams:{'organizationName':option.xAxis.data[xIndex],'buildingTypeName':this.headname,'id':this.lastId,'zhuId':option.xAxis.id[xIndex],'type':this.zhiorbuild=='zhi'?'zhi':'build'}})
}

4
src/app/statistic-analysis/all-plan/all-plan.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-03-15 11:32:30
* @LastEditors: sueRimn
* @LastEditTime: 2021-04-28 15:33:00
* @LastEditTime: 2021-05-17 17:19:25
*/
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'
@ -82,7 +82,7 @@ export class AllPlanComponent implements OnInit {
//查看详情
lookPlan(e){
if(e.planType == 16||e.planType == 4){
if(e.planType == 16||e.planType == 4||e.planType == 8){
var index=e.attachmentUrls[0].indexOf("\/")
if(e.attachmentUrls[0].substr(0,index)=='psw'){
const dialogRef = this.dialog.open(PsViewer, {

8
src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.html

@ -87,21 +87,21 @@
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
</div>
<!-- <div class="queryField" *ngIf="!padMore&&!pcMore">
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">预案级别:</label>
<mat-form-field>
<mat-select placeholder='请选择预案级别' [(ngModel)]="planCategory" name="planCategory" [multiple]="true">
<mat-option value=6>应急预案(国家级)</mat-option>
<!-- <mat-option value=6>应急预案(国家级)</mat-option>
<mat-option value=7>应急预案(市级)</mat-option>
<mat-option value=8>类型预案</mat-option>
<mat-option value=1>Ⅰ级预案</mat-option>
<mat-option value=2>Ⅱ级预案</mat-option>
<mat-option value=2>Ⅱ级预案</mat-option> -->
<mat-option value=3>Ⅲ级预案</mat-option>
<mat-option value=4>Ⅳ级预案</mat-option>
<mat-option value=5>Ⅴ级预案</mat-option>
</mat-select>
</mat-form-field>
</div> -->
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">审核时间:</label>

27
src/app/statistic-analysis/real-monitoring/real-monitoring.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-05-08 09:42:43
* @LastEditors: sueRimn
* @LastEditTime: 2021-05-13 14:24:42
* @LastEditTime: 2021-05-19 14:46:30
*/
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
@ -112,6 +112,22 @@ export class RealMonitoringComponent implements OnInit {
}
await this.EchartsData.getData(param, '/api/StatisticsAnalysis/Plans/AuditApproved/PlanTypes')
this.rightbTable = JSON.parse(JSON.stringify(this.EchartsData.allDate))
console.log(this.rightbTable)
this.rightbTable[0].planTypeStatistics.planTypes.forEach((value,index,array) => {
if(array[index].planTypeName=='Plan2D'){
this.indexData.push({name:'二维预案',value:array[index].count})
}else if(array[index].planTypeName=='Plan3D'){
//array[index].planTypeName=='三维预案'
this.indexData.push({name:'三维预案',value:array[index].count})
}else if(array[index].planTypeName=='Other'){
//array[index].planTypeName=='其他预案'
this.indexData.push({name:'其他预案',value:array[index].count})
}else if(array[index].planTypeName=='PlanText'){
//array[index].planTypeName=='文本预案'
this.indexData.push({name:'文本预案',value:array[index].count})
}
});
console.log(this.indexData)
this.leftzhuzhuangtu()
this.rightbingtu()
@ -270,7 +286,7 @@ export class RealMonitoringComponent implements OnInit {
}
//中间右侧饼图
indexData = [{ name: '二维预案', 'value': 1 }, { name: '三维预案', 'value': 1 }]//所有数据
indexData = []//所有数据
lengthdata = ['二维预案', '三维预案', '文本预案', '其他预案']
rightbingtu() {
this.rightbing = echarts.init(document.getElementById('rightecharts'), 'walden');
@ -327,12 +343,13 @@ export class RealMonitoringComponent implements OnInit {
}
},
},
data: [
/* data: [
{ value: this.rightbTable[0].planTypeStatistics.planTypes[0] != undefined ? this.rightbTable[0].planTypeStatistics.planTypes[0].count : 0, name: '二维预案' },
{ value: this.rightbTable[0].planTypeStatistics.planTypes[1] != undefined ? this.rightbTable[0].planTypeStatistics.planTypes[1].count : 0, name: '三维预案' },
{ value: this.rightbTable[0].planTypeStatistics.planTypes[2] != undefined ? this.rightbTable[0].planTypeStatistics.planTypes[2].count : 0, name: '其他预案' },
{ value: this.rightbTable[0].planTypeStatistics.planTypes[3] != undefined ? this.rightbTable[0].planTypeStatistics.planTypes[3].count : 0, name: '文本预案' }
],
], */
data:this.indexData,
emphasis: {
itemStyle: {
shadowBlur: 10,
@ -428,7 +445,7 @@ export class RealMonitoringComponent implements OnInit {
data: this.EchartsData.qipao(this.tiaoshiPao, this.zhiNumData, this.zhiNameData)
},
//barWidth :'38',
barWidth :'38',
//label: this.topTextlabel
}]
};

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

@ -0,0 +1,35 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-05-20 16:11:57
* @LastEditors: sueRimn
* @LastEditTime: 2021-05-20 17:05:21
-->
<div class="box">
<div class="top">
<span style="font-size: 20px;">新增预案模板</span>
</div>
<div class="queryField">
<label style="margin-right: 10px;">预案名称:</label>
<mat-form-field class="example-full-width">
<input matInput placeholder="请输入预案名称" name="companyName" autocomplete="off" [(ngModel)]="unitname" required>
</mat-form-field>
</div>
<div class="queryField">
<label style="margin-right: 10px;">预案级别:</label>
<mat-form-field>
<mat-select placeholder='请选择预案级别' name="unittype" [(ngModel)]="level" required>
<mat-option value="Ⅲ级">Ⅲ级</mat-option>
<mat-option value="Ⅳ级">Ⅳ级</mat-option>
<mat-option value="Ⅴ级">Ⅴ级</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="bottom">
<button mat-raised-button color="primary" (click)='newplan()'>确定</button>
<button mat-raised-button style="margin-left: 50px;" (click)="close()">取消</button>
</div>
</div>

77
src/app/ui/plan-template/addKeyname.scss

@ -0,0 +1,77 @@
.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;
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;
}
}

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

@ -0,0 +1,34 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-05-19 15:50:20
* @LastEditors: sueRimn
* @LastEditTime: 2021-05-20 17:03:52
-->
<div class="box">
<div class="boxleft">
<div class="lefthead">
<div class="leftheadone">
<span>预案列表</span>
</div>
<div class="leftheadtwo" (click)='addKeyunit()'>
<img src="../../../assets/images/add.png">
<span>新增</span>
</div>
</div>
<div class="leftbox">
<div class="leftbody" *ngFor="let item of newleftTabledata">
<div class="bodyname">
<span>{{item.name}}</span>
</div>
<div class="bodycz">
<span>{{item.level}}</span>
<img src="../../../assets/images/updatehui.png">
<img src="../../../assets/images/deletehui.png">
</div>
</div>
</div>
</div>
<div class="boxright"></div>
</div>

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

@ -0,0 +1,97 @@
/*
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-05-19 15:50:20
* @LastEditors: sueRimn
* @LastEditTime: 2021-05-20 15:46:44
*/
.box{
height: 97%;
width: 100%;
padding: 10px;
background-color: #F7F8FA;
display: flex;
.boxleft{
width: 20%;
height: 100%;
background-color: #FFFFFF;
display: flex;
flex-direction: column;
.lefthead{
height: 50px;
width: 100%;
display: flex;
border-bottom: 1px solid #F7F8FA;
span{
font-size: 16px;
}
.leftheadone{
width: 40%;
height: 100%;
span{
margin: 10px 10px;
height: 50px;
line-height: 50px;
}
}
.leftheadtwo{
width: 20%;
height: 100%;
margin-left: 50%;
cursor: pointer;
img{
position: relative;
top: 2px;
}
span{
//margin-left: 70%;
//margin: 10px 10px;
height: 50px;
line-height: 50px;
}
}
}
.leftbox{
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
.leftbody{
width: 100%;
height: 40px;
display: flex;
.bodyname{
height: 40px;
width: 60%;
span{
font-size: 16px;
height: 40px;
line-height: 40px;
margin-left: 10px;
}
}
.bodycz{
height: 40px;
width: 40%;
img{
margin-left: 10px;
}
span{
color: #B2BEC7;
font-size: 16px;
height: 40px;
line-height: 40px;
margin-left: 30%;
}
}
}
}
}
.boxright{
margin-left: 10px;
height: 100%;
width: 78%;
background-color: #FFFFFF;
}
}

25
src/app/ui/plan-template/plan-template.component.spec.ts

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PlanTemplateComponent } from './plan-template.component';
describe('PlanTemplateComponent', () => {
let component: PlanTemplateComponent;
let fixture: ComponentFixture<PlanTemplateComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PlanTemplateComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PlanTemplateComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

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

@ -0,0 +1,81 @@
/*
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-05-19 15:50:20
* @LastEditors: sueRimn
* @LastEditTime: 2021-05-20 17:02:03
*/
import { Component, Inject, OnInit } 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';
@Component({
selector: 'app-plan-template',
templateUrl: './plan-template.component.html',
styleUrls: ['./plan-template.component.scss']
})
export class PlanTemplateComponent implements OnInit {
constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) { }
ngOnInit(): void {
}
//获取左侧单位信息
newleftTabledata=[]
getLeftdata(){
/* this.http.get("/api/PlanTemplate").subscribe((data:any)=>{
this.leftTabledata=data
console.log(this.leftTabledata)
}) */
}
//新建预案弹窗
addKeyunit(){
const dialogRef = this.dialog.open(addPlanname, {//调用open方法打开对话框并且携带参数过去
width: '340px',
height:'330px',
disableClose:true
});
dialogRef.afterClosed().subscribe(result => {
this.newleftTabledata.push(result)
console.log(this.newleftTabledata);
});
}
}
//新建预案
@Component({
selector: 'addPlanname',
templateUrl: './addKeyname.html',
styleUrls: ['./addKeyname.scss']
})
export class addPlanname{
constructor(private http: HttpClient,public dialogRef: MatDialogRef<addPlanname>,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {}
unitname//预案名称
level//预案级别
//取消按钮
close(){
this.dialogRef.close();
}
newplan(){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
if(this.unitname==undefined||this.unitname==''){
this.snackBar.open('请输入预案名称!','确定',config);
}
else if(this.level==undefined||this.level==''){
this.snackBar.open('请输入预案级别!','确定',config);
}else{
let planData={
name:this.unitname,
level:this.level
}
this.dialogRef.close(planData)
}
}
}

10
src/app/ui/ui-routing.module.ts

@ -1,3 +1,11 @@
/*
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-01-29 15:54:45
* @LastEditors: sueRimn
* @LastEditTime: 2021-05-20 10:14:47
*/
import { Routes, RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { UiComponent } from './ui.component';
@ -15,6 +23,7 @@ import {UnitInformationComponent} from './unit-information/unit-information.comp
import { EnterpriseuserComponent } from './enterpriseuser/enterpriseuser.component';
import { FireFightingFacilitiesFormworkComponent } from './fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component'
import { CollectionToolsComponent } from './collection-tools/collection-tools.component';
import { PlanTemplateComponent } from './plan-template/plan-template.component'
@ -34,6 +43,7 @@ const routes: Routes = [
{ path: 'enterpriseuser', component:EnterpriseuserComponent },
{ path: 'fireFightingFacilitiesFormwork', component:FireFightingFacilitiesFormworkComponent },
{ path: 'collectionTools', component:CollectionToolsComponent },
{ path: 'PlanTemplate', component:PlanTemplateComponent },
];
@NgModule({

15
src/app/ui/ui.module.ts

@ -83,9 +83,20 @@ import { saveOneDialog, saveTwoDialog } from './collection-tools/save';
import { CollectionToolsPlanComponent, CreateBuildingPlan, EditBuildingPlan } from './collection-tools-plan/collection-tools.component';
import { editPlaneFigureComponentPlan, leftFunctionalDomainComponentPlan } from './collection-tools-plan/leftFunctionalDomain';
import {CollectionToolsBuildingComponent,CreateBuildingBuilding,EditBuildingBuilding} from './collection-tools-building/collection-tools.component'
import {leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent} from './collection-tools-building/leftFunctionalDomain'
import {leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent} from './collection-tools-building/leftFunctionalDomain';
import { PlanTemplateComponent } from './plan-template/plan-template.component'
import { addPlanname } from './plan-template/plan-template.component'
@NgModule({
declarations: [UiComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent,IsnoPipe,ConfirmpswDirective,DialogOverviewExampleDialog,CreateAuthority,CreateRole,TimePipe,CreateNewUser,EditNewUser,allRoles,EditRole,CreateOrganization,EditOrganization,seeInformation,EditUser,editorialUnit,FireProtectionElementsComponent,Establish,EditingFireControl,FireFightingTemplateComponent, NavmenusComponent,CreateMenus,EditMenus,NewFireFighting,EditFireClassification, MaterialBankComponent, UnitInformationComponent,AddMatLibrary,EditMatLibrary,attributeComponent,AddOriginalCopy,addAttributeComponent,editAttribute,EditOriginalCopy,SelectOriginalCopy,EditUnitInfo,AddUnitInfo,AddGroups,EditGroup, EnterpriseuserComponent,AddEnterpriserUser,addUnitAttributeComponent,editUnitAttribute,seeenterpriseuser,editenterpriseuser, FireFightingFacilitiesFormworkComponent,addFireFightingFacilitiesFormworkComponent,editFireFightingFacilitiesFormworkComponent,addBuiltInComponent,addBuiltInAttributeComponent,addOptionalComponent,addOptionalAttributeComponent,editBuiltInAttributeComponent,editOptionalAttributeComponent, CollectionToolsComponent,WorkingAreaComponent,CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,saveOneDialog,saveTwoDialog,addDisposalNodeComponent,editDisposalNodeComponent,CollectionToolsPlanComponent,CreateBuildingPlan,EditBuildingPlan,leftFunctionalDomainComponentPlan,editPlaneFigureComponentPlan,addOffices,editOffices,addBGCDisposalNodeComponent,CollectionToolsBuildingComponent,CreateBuildingBuilding,EditBuildingBuilding,leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent,Organization],
declarations: [UiComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent,
IsnoPipe,ConfirmpswDirective,DialogOverviewExampleDialog,CreateAuthority,CreateRole,TimePipe,CreateNewUser,EditNewUser,allRoles,EditRole,CreateOrganization,EditOrganization,
seeInformation,EditUser,editorialUnit,FireProtectionElementsComponent,Establish,EditingFireControl,FireFightingTemplateComponent, NavmenusComponent,CreateMenus,EditMenus,
NewFireFighting,EditFireClassification, MaterialBankComponent, UnitInformationComponent,AddMatLibrary,EditMatLibrary,attributeComponent,AddOriginalCopy,addAttributeComponent,
editAttribute,EditOriginalCopy,SelectOriginalCopy,EditUnitInfo,AddUnitInfo,AddGroups,EditGroup, EnterpriseuserComponent,AddEnterpriserUser,addUnitAttributeComponent,editUnitAttribute,
seeenterpriseuser,editenterpriseuser, FireFightingFacilitiesFormworkComponent,addFireFightingFacilitiesFormworkComponent,editFireFightingFacilitiesFormworkComponent,addBuiltInComponent,
addBuiltInAttributeComponent,addOptionalComponent,addOptionalAttributeComponent,editBuiltInAttributeComponent,editOptionalAttributeComponent, CollectionToolsComponent,WorkingAreaComponent,
CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,saveOneDialog,saveTwoDialog,addDisposalNodeComponent,editDisposalNodeComponent,CollectionToolsPlanComponent,
CreateBuildingPlan,EditBuildingPlan,leftFunctionalDomainComponentPlan,editPlaneFigureComponentPlan,addOffices,editOffices,addBGCDisposalNodeComponent,CollectionToolsBuildingComponent,CreateBuildingBuilding,
EditBuildingBuilding,leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent,Organization, PlanTemplateComponent,addPlanname],
imports: [
CommonModule,

BIN
src/assets/images/add.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

BIN
src/assets/images/deleteblue.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 B

BIN
src/assets/images/deletehui.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

BIN
src/assets/images/updatehui.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Loading…
Cancel
Save