diff --git a/angular.json b/angular.json index 7a7737c..d456ab4 100644 --- a/angular.json +++ b/angular.json @@ -67,8 +67,8 @@ }, { "type": "anyComponentStyle", - "maximumWarning": "6kb", - "maximumError": "10kb" + "maximumWarning": "16kb", + "maximumError": "32kb" } ] } diff --git a/package.json b/package.json index d15eb17..34713d6 100644 --- a/package.json +++ b/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" diff --git a/src/app/data-collection/fire-force/fire-force.component.ts b/src/app/data-collection/fire-force/fire-force.component.ts index cc567f7..9158905 100644 --- a/src/app/data-collection/fire-force/fire-force.component.ts +++ b/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", diff --git a/src/app/data-collection/linkage-forces/linkage-forces.component.ts b/src/app/data-collection/linkage-forces/linkage-forces.component.ts index 391c199..d1e6527 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.ts +++ b/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", diff --git a/src/app/external-links-plan/external-links-plan.component.ts b/src/app/external-links-plan/external-links-plan.component.ts index a3bffbf..60200de 100644 --- a/src/app/external-links-plan/external-links-plan.component.ts +++ b/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, diff --git a/src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts b/src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts index e691ce8..737bc3c 100644 --- a/src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts +++ b/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, diff --git a/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts index dc9b47e..2338e51 100644 --- a/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts +++ b/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, diff --git a/src/app/plan-audit/plan-record/plan-record.component.ts b/src/app/plan-audit/plan-record/plan-record.component.ts index fb5d6e4..5d1e0aa 100644 --- a/src/app/plan-audit/plan-record/plan-record.component.ts +++ b/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, diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts index 5ba1b6a..a7d1217 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts +++ b/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() { diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.scss b/src/app/plan-management/entry-plan-look/entry-plan-look.component.scss index 59234db..2826925 100644 --- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.scss +++ b/src/app/plan-management/entry-plan-look/entry-plan-look.component.scss @@ -124,4 +124,51 @@ } .mat-dialog-container{ padding: 0; - } \ No newline at end of file + } + //预览图片旋转角度 +.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; + } + } + +} \ No newline at end of file diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts index d2802ab..786cab4 100644 --- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts +++ b/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', @@ -1111,4 +1149,49 @@ 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, + @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} + } } \ No newline at end of file diff --git a/src/app/plan-management/entry-plan-look/previewImg.html b/src/app/plan-management/entry-plan-look/previewImg.html new file mode 100644 index 0000000..2eb4a8a --- /dev/null +++ b/src/app/plan-management/entry-plan-look/previewImg.html @@ -0,0 +1,29 @@ + + +
+ +
+
+
+ +
+
+
+ + +
+
+
+ +
+ +
+
diff --git a/src/app/plan-management/meet-plan/meet-plan.component.ts b/src/app/plan-management/meet-plan/meet-plan.component.ts index 8dab35f..a772605 100644 --- a/src/app/plan-management/meet-plan/meet-plan.component.ts +++ b/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, diff --git a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts index c5ed166..d73b847 100644 --- a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts +++ b/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, diff --git a/src/app/plan-management/plan-management.module.ts b/src/app/plan-management/plan-management.module.ts index 04b596f..0abed77 100644 --- a/src/app/plan-management/plan-management.module.ts +++ b/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, diff --git a/src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts b/src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts index 122da53..32e38a2 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts +++ b/src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts @@ -232,7 +232,7 @@ export class AddUnitOneComponent implements OnInit { } this.res+='' - this.res+='总计'+countall+''+allCountbi.toFixed(2)+'%' + this.res+='总计'+countall+'100%' this.res+='' return this.res } diff --git a/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts b/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts index 98ad815..606541e 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts +++ b/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'}}) } diff --git a/src/app/statistic-analysis/all-plan/all-plan.component.ts b/src/app/statistic-analysis/all-plan/all-plan.component.ts index a20df2f..3d71962 100644 --- a/src/app/statistic-analysis/all-plan/all-plan.component.ts +++ b/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, { diff --git a/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.html b/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.html index 8dfb1ae..329f4e5 100644 --- a/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.html +++ b/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.html @@ -87,21 +87,21 @@ 包含下级 - Ⅲ级预案 Ⅳ级预案 Ⅴ级预案 - --> +
diff --git a/src/app/statistic-analysis/real-monitoring/real-monitoring.component.ts b/src/app/statistic-analysis/real-monitoring/real-monitoring.component.ts index d375b00..979df59 100644 --- a/src/app/statistic-analysis/real-monitoring/real-monitoring.component.ts +++ b/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 }] }; diff --git a/src/app/ui/plan-template/addKeyname.html b/src/app/ui/plan-template/addKeyname.html new file mode 100644 index 0000000..0252f14 --- /dev/null +++ b/src/app/ui/plan-template/addKeyname.html @@ -0,0 +1,35 @@ + +
+
+ 新增预案模板 +
+
+ + + + +
+ + +
+ + + + Ⅲ级 + Ⅳ级 + Ⅴ级 + + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/ui/plan-template/addKeyname.scss b/src/app/ui/plan-template/addKeyname.scss new file mode 100644 index 0000000..9270aa9 --- /dev/null +++ b/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; + } +} diff --git a/src/app/ui/plan-template/plan-template.component.html b/src/app/ui/plan-template/plan-template.component.html new file mode 100644 index 0000000..5dfda59 --- /dev/null +++ b/src/app/ui/plan-template/plan-template.component.html @@ -0,0 +1,34 @@ + +
+
+
+
+ 预案列表 +
+
+ + 新增 +
+
+
+
+
+ {{item.name}} +
+
+ {{item.level}} + + +
+
+
+
+
+
diff --git a/src/app/ui/plan-template/plan-template.component.scss b/src/app/ui/plan-template/plan-template.component.scss new file mode 100644 index 0000000..a10162d --- /dev/null +++ b/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; + } +} \ No newline at end of file diff --git a/src/app/ui/plan-template/plan-template.component.spec.ts b/src/app/ui/plan-template/plan-template.component.spec.ts new file mode 100644 index 0000000..5e964c1 --- /dev/null +++ b/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; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ PlanTemplateComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PlanTemplateComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/ui/plan-template/plan-template.component.ts b/src/app/ui/plan-template/plan-template.component.ts new file mode 100644 index 0000000..3067ad3 --- /dev/null +++ b/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,@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) + } + } +} diff --git a/src/app/ui/ui-routing.module.ts b/src/app/ui/ui-routing.module.ts index 0ce7227..b8bf4c7 100644 --- a/src/app/ui/ui-routing.module.ts +++ b/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({ diff --git a/src/app/ui/ui.module.ts b/src/app/ui/ui.module.ts index 81d6c1c..0b8a357 100644 --- a/src/app/ui/ui.module.ts +++ b/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, diff --git a/src/assets/images/add.png b/src/assets/images/add.png new file mode 100644 index 0000000..3140227 Binary files /dev/null and b/src/assets/images/add.png differ diff --git a/src/assets/images/deleteblue.png b/src/assets/images/deleteblue.png new file mode 100644 index 0000000..dbb906a Binary files /dev/null and b/src/assets/images/deleteblue.png differ diff --git a/src/assets/images/deletehui.png b/src/assets/images/deletehui.png new file mode 100644 index 0000000..538aced Binary files /dev/null and b/src/assets/images/deletehui.png differ diff --git a/src/assets/images/updatehui.png b/src/assets/images/updatehui.png new file mode 100644 index 0000000..ee4b534 Binary files /dev/null and b/src/assets/images/updatehui.png differ