@@ -22,21 +22,23 @@
{{element.name}} |
- 修改时间 |
- {{element.modifiedTime|date:'yyyy-MM-dd'}} |
+ 添加时间 |
+ {{element.creationTime|date:'yyyy-MM-dd'}} |
- 消防救援站 |
- {{element.organizationName}} |
+ 预案级别 |
+ {{element.planCategory==1?'Ⅰ级预案':element.planCategory==2?'Ⅱ级预案':
+ element.planCategory==3?'Ⅲ级预案':element.planCategory==4?'Ⅳ级预案':element.planCategory==5?'Ⅴ级预案':element.planCategory==8?'类型预案':'应急预案'}} |
- 类型 |
- {{element.buildingTypes.length != 0 ? element.buildingTypes[0].name : ''}} |
+ 审核状态 |
+ {{element.auditStatus=='8'?'未提交审核':element.auditStatus=='1'?'审核中':element.auditStatus=='2'?'审核通过':element.auditStatus=='4'?
+ '审核退回':element.auditStatus=='16'?'初审通过':'初审驳回'}} |
操作 |
- 详情
+ 详情
|
|
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 89f0fe4..78cf94f 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-03-15 13:51:48
+ * @LastEditTime: 2021-03-17 10:30:42
*/
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'
@@ -18,6 +18,7 @@ import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dial
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { TreeService } from '../../http-interceptors/tree.service'
import { MatTableDataSource } from '@angular/material/table';
+import { Viewer } from 'photo-sphere-viewer';
declare var CryptoJS
@Component({
@@ -27,14 +28,15 @@ declare var CryptoJS
})
export class AllPlanComponent implements OnInit {
- constructor(private http: HttpClient,public snackBar: MatSnackBar,public route: ActivatedRoute,private router: Router) { }
+ constructor(private http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public route: ActivatedRoute,private router: Router) { }
ngOnInit(): void {
this.route.queryParams.subscribe(params => {
this.titlename = params['name'];
this.type = params['type'];
- this.jsId=params['jsid']
+ this.jsId=params['id']
});
+ this.getAlltabledate()
}
displayedColumns: string[] = ['unitname','modifiedTime','organizationName','buildingTypes','operation'];
tabledataSource
@@ -52,12 +54,113 @@ export class AllPlanComponent implements OnInit {
//分页事件
changePage(e){
this.PageNumber = e.pageIndex+1
- //this.getAlltabledate()
+ this.getAlltabledate()
}
//返回
goBack () {
history.go(-1)
//this.echartsData.statefulInspectionToggle = true
}
+ //获得所有预案
+ getAlltabledate(){
+ let paramtedate:any={
+ organizationId:this.jsId||'',
+ PlanStatus:this.type,
+ PageNumber: this.PageNumber || '1',
+ PageSize: this.pageSizeOptions[0]
+ }
+ this.http.get(`/api/Plans/Organizations`,{params:paramtedate}).subscribe((data:any)=>{
+ this.tabledataSource=data.items
+ console.log(this.tabledataSource)
+ })
+ }
+
+ //查看详情
+ lookPlan(e){
+ console.log(e)
+ if(e.planMode == 0){
+ console.log(e.attachmentUrls)
+ var index=e.attachmentUrls[0].indexOf("\/")
+ if(e.attachmentUrls[0].substr(0,index)=='psw'){
+ const dialogRef = this.dialog.open(PsViewer, {
+ width: '1500px',
+ height:'800px',
+ data: e.attachmentUrls[0]
+ });
+ }
+ 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'
+ ||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='txt'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='JPG') */{
+ let filename:string
+ let fetchUrl = e.attachmentUrls[0]
+ let docIdWordArray = CryptoJS.enc.Utf8.parse(`PlanPlatform/` + fetchUrl);
+ let docId = CryptoJS.enc.Base64.stringify(docIdWordArray);
+ 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)
+ this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{
+ filename=data.fileName
+ let json={
+ doc: {
+ docId: docId,
+ title: filename,
+ fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+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);
+ window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`)
+ })
+ }
+ }
+ if(e.planMode == 1){
+ const config = new MatSnackBarConfig();
+ config.verticalPosition = 'top';
+ config.duration = 3000
+ this.snackBar.open('查看导入word文件','确定',config);
+ }
+ 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","0")
+ sessionStorage.setItem("planName",e.name)
+ let companyId = sessionStorage.getItem("companyId")
+ window.open(`/keyUnit/viewunitinfoplan?id=${companyId}&orName=${this.route.snapshot.queryParams.orName}&orId=${this.route.snapshot.queryParams.orId}`);
+ }
+ if(e.planMode == 3){ //如果是跳转网页
+ sessionStorage.setItem("url",e.url)
+ window.open(`/planManagement/webLook`)
+ }
+ }
}
+
+//全景图弹出框
+@Component({
+ selector: 'PsViewer',
+ templateUrl: './Photo-Sphere-Viewer.html',
+ styleUrls: ['./all-plan.component.scss']
+})
+export class PsViewer{
+ constructor(private router:Router,private http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef
,@Inject(MAT_DIALOG_DATA) public data: any) {}
+ ngOnInit(): void {
+ console.log(this.data)
+ const viewer = new Viewer({
+ container: document.querySelector('#viewer'),
+ panorama:'/api/Objects/PlanPlatform/'+ this.data,
+
+ });
+ }
+}
\ No newline at end of file
diff --git a/src/app/statistic-analysis/echarts-data.service.ts b/src/app/statistic-analysis/echarts-data.service.ts
index 87b7d79..a4f766b 100644
--- a/src/app/statistic-analysis/echarts-data.service.ts
+++ b/src/app/statistic-analysis/echarts-data.service.ts
@@ -575,6 +575,7 @@ export class EchartsDataService {
zhiNameData = ["浦东支队","黄浦支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队","松江支队","金山支队","崇明支队"]
zhiNumData = [200,190,180,170,160,150,140,130,120,110,100,90,80,70]
+ isQuery=true
/**
diff --git a/src/app/statistic-analysis/state/page-one/page-one.component.ts b/src/app/statistic-analysis/state/page-one/page-one.component.ts
index 7897d67..422b4e1 100644
--- a/src/app/statistic-analysis/state/page-one/page-one.component.ts
+++ b/src/app/statistic-analysis/state/page-one/page-one.component.ts
@@ -4,12 +4,13 @@
* @Author: sueRimn
* @Date: 2020-09-01 15:24:39
* @LastEditors: sueRimn
- * @LastEditTime: 2021-03-15 11:19:36
+ * @LastEditTime: 2021-03-17 10:30:24
*/
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import {EchartsDataService,} from '../../echarts-data.service'
declare var echarts: any;
+declare var CryptoJS
@Component({
selector: 'app-page-one',
@@ -111,12 +112,18 @@ export class PageOneComponent implements OnInit {
]
};
this.indexBzt.on('click', (params) => {
+ /* 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) */
if(this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2'){
- this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name,'type':params.data.type}});
+ window.setTimeout(()=>{
+ this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name,'type':params.data.type}});
+ })
}
else if(this.echartsData.level=='3'){
//中队跳转
- this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1}});
+ this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':params.name,'id':null,'type':params.data.type}});
}
});
this.indexBzt.setOption(options);
diff --git a/src/app/statistic-analysis/state/page-there-year/page-there-year.component.ts b/src/app/statistic-analysis/state/page-there-year/page-there-year.component.ts
index 522bf39..bf869e7 100644
--- a/src/app/statistic-analysis/state/page-there-year/page-there-year.component.ts
+++ b/src/app/statistic-analysis/state/page-there-year/page-there-year.component.ts
@@ -131,13 +131,13 @@ export class PageThereYearComponent implements OnInit {
//提示框
tooltip: {
trigger: 'axis',
- formatter: (params)=>{
+ /* formatter: (params)=>{
if(params[0].seriesName == "year"){
return this.serviceData.tableTooltip(this.serviceData.monthTooltip,params[0].name)
}else{
return this.serviceData.tableTooltip(this.serviceData.tableDataZhi,params[0].name)
}
- },
+ }, */
position:this.serviceData.tableTooltipNoShow2
},
// x轴
diff --git a/src/app/statistic-analysis/state/page-there/page-there.component.ts b/src/app/statistic-analysis/state/page-there/page-there.component.ts
index a17b0f7..12fd22c 100644
--- a/src/app/statistic-analysis/state/page-there/page-there.component.ts
+++ b/src/app/statistic-analysis/state/page-there/page-there.component.ts
@@ -155,15 +155,15 @@ export class PageThereComponent implements OnInit {
title: {
text: headName,
left: "center",
- top: "0",
+ //bottom: "540",
textStyle: {
fontSize: 30
}
},
- /* grid: {
- //left: '5%',
- bottom:'5%'
- }, */
+ grid: {
+ top: 110,
+ //bottom: 10
+ },
xAxis: {
id:this.organizationId,
type: 'category',
@@ -183,9 +183,9 @@ export class PageThereComponent implements OnInit {
},
tooltip: {
trigger: 'item',
- formatter: (params)=>{
+ /* formatter: (params)=>{
return this.echartsData.biaogeTishi(params.name)
- },
+ }, */
position: this.echartsData.tableTooltipNoShowq
/* backgroundColor:'rgba(255,255,255,1)',
borderWidth:'1',
@@ -211,10 +211,10 @@ export class PageThereComponent implements OnInit {
if (this.zhutu.containPixel('grid',pointInPixel)) {
let xIndex=this.zhutu.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
/*事件处理代码书写位置*/
- if(this.echartsData.level=='0'||this.echartsData.level=='1'){
+ if((this.echartsData.level=='0'||this.echartsData.level=='1')&&this.tabledata[0].organizations[xIndex].subOrganizations.length>=1){
this.router.navigate(['/statisticanalysis/PageZhongDuiDetails'],{queryParams:{'level':this.option.xAxis.data[xIndex],'id':this.option.xAxis.id[xIndex],'type':this.type}});
}else{
- this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':params.name,'type':1}});
+ this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':this.option.xAxis.data[xIndex],'id':this.option.xAxis.id[xIndex],'type':this.type}});
}
}
diff --git a/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts b/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts
index 60a9103..61ef7dd 100644
--- a/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts
+++ b/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts
@@ -166,11 +166,12 @@ export class PageTwoNameComponent implements OnInit {
if (this.addEchart.containPixel('grid',pointInPixel)) {
let xIndex=this.addEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
/*事件处理代码书写位置*/
- if(this.data.level=='0'||this.data.level=='1'){
+ if((this.data.level=='0'||this.data.level=='1')&&this.tabledata[0].organizations[xIndex].subOrganizations.length>=1){
this.router.navigate(['/statisticanalysis/stataPageThere'],{queryParams:{'level':option.xAxis.data[xIndex],'headtext':_this.headname,'id':option.xAxis.id[xIndex],'type':this.type}});
}else{
- this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1,'jsid':option.xAxis.id[xIndex]}});
- }
+ this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':option.xAxis.data[xIndex],'id':option.xAxis.id[xIndex],'type':this.type}});
+ }
+ //this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':option.xAxis.data[xIndex],'id':option.xAxis.id[xIndex],'type':this.type}});
}
diff --git a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.html b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.html
index f5a6284..465c667 100644
--- a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.html
+++ b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.html
@@ -4,20 +4,20 @@
* @Author: sueRimn
* @Date: 2020-09-05 08:59:24
* @LastEditors: sueRimn
- * @LastEditTime: 2021-03-10 15:16:52
+ * @LastEditTime: 2021-03-17 08:49:56
-->