From 5fa3d3ccc85f1d75071231c17cb2e492c0cd1968 Mon Sep 17 00:00:00 2001 From: chenjingyu Date: Tue, 2 Feb 2021 16:01:41 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=BB=BA]=E5=AE=A1=E6=A0=B8=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=9F=A5=E7=9C=8B=E5=85=A8=E6=99=AF=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/app-routing.module.ts | 10 ++ .../plan-audit/plan-audit-routing.module.ts | 4 +- .../plan-pass/plan-pass.component.html | 12 ++- .../plan-record/plan-record.component.html | 7 +- .../plan-record/plan-record.component.scss | 6 ++ .../plan-record/plan-record.component.ts | 80 ++++++++++------ .../wait-examineer.component.html | 20 ++-- .../wait-examineer.component.scss | 5 +- .../wait-examineer.component.ts | 94 ++++++++++--------- .../entry-plan-look.component.ts | 7 +- 10 files changed, 154 insertions(+), 91 deletions(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a704b1f..0c8811d 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,8 +1,17 @@ +/* + * @Descripttion: + * @version: + * @Author: sueRimn + * @Date: 2021-01-11 14:48:03 + * @LastEditors: sueRimn + * @LastEditTime: 2021-02-02 15:22:22 + */ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { LoginComponent } from './pages/login/login.component'; import { NavigationComponent } from './navigation/navigation.component'; import {HomeComponent} from './home/home.component' +import { PlanPassComponent } from '../app/plan-audit/plan-pass/plan-pass.component'; //路由守卫 import {AuthGuard} from './auth.guard' @@ -29,6 +38,7 @@ const routes: Routes = [ {path:'login',component:LoginComponent}, {path:'getNoMToken',component:MTokenK1Component, canActivate: [AuthGuard],}, //K1秘钥验证失败是跳转页面 + { path: 'planAudit/planpass', component: PlanPassComponent }, ]; @NgModule({ diff --git a/src/app/plan-audit/plan-audit-routing.module.ts b/src/app/plan-audit/plan-audit-routing.module.ts index 11d4b12..b217fd5 100644 --- a/src/app/plan-audit/plan-audit-routing.module.ts +++ b/src/app/plan-audit/plan-audit-routing.module.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-12-24 10:59:48 * @LastEditors: sueRimn - * @LastEditTime: 2020-12-28 09:11:45 + * @LastEditTime: 2021-02-02 15:48:12 */ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; @@ -17,7 +17,7 @@ import { WaitExamineerComponent } from './wait-examineer/wait-examineer.componen const routes: Routes = [ { path: 'detachmentLevel', component: DetachmentLevelComponent }, { path: 'planaudit', component: PlanAuditComponent }, - { path: 'planpass', component: PlanPassComponent }, + //{ path: 'planpass', component: PlanPassComponent }, { path: 'planrecord', component: PlanRecordComponent },//预案审核记录 { path: 'waitexamineer', component: WaitExamineerComponent },//预案待审核 ]; diff --git a/src/app/plan-audit/plan-pass/plan-pass.component.html b/src/app/plan-audit/plan-pass/plan-pass.component.html index 1d7588e..d584782 100644 --- a/src/app/plan-audit/plan-pass/plan-pass.component.html +++ b/src/app/plan-audit/plan-pass/plan-pass.component.html @@ -1,3 +1,11 @@ +
@@ -21,9 +29,9 @@ 单位地址: {{compantData.address?compantData.address : '暂无数据'}}
-
+
diff --git a/src/app/plan-audit/plan-record/plan-record.component.html b/src/app/plan-audit/plan-record/plan-record.component.html index da065f3..01c7c8f 100644 --- a/src/app/plan-audit/plan-record/plan-record.component.html +++ b/src/app/plan-audit/plan-record/plan-record.component.html @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-12-25 10:19:31 * @LastEditors: sueRimn - * @LastEditTime: 2021-01-28 13:41:39 + * @LastEditTime: 2021-02-02 15:58:22 -->
@@ -118,7 +118,7 @@
- + @@ -172,8 +172,9 @@ --> -
+
+
diff --git a/src/app/plan-audit/plan-record/plan-record.component.scss b/src/app/plan-audit/plan-record/plan-record.component.scss index 8698bd7..7762377 100644 --- a/src/app/plan-audit/plan-record/plan-record.component.scss +++ b/src/app/plan-audit/plan-record/plan-record.component.scss @@ -74,8 +74,14 @@ width: 97%; margin: 30px 10px 10px 10px; overflow-y: auto; + border: medium none; } } + #viewer{ + margin: 30px 10px 10px 10px; + width: 97%; + height: 94%; + } } } th,td{ 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 4eff72d..5950e7b 100644 --- a/src/app/plan-audit/plan-record/plan-record.component.ts +++ b/src/app/plan-audit/plan-record/plan-record.component.ts @@ -4,13 +4,14 @@ * @Author: sueRimn * @Date: 2020-12-25 10:19:31 * @LastEditors: sueRimn - * @LastEditTime: 2021-01-29 15:45:34 + * @LastEditTime: 2021-02-02 15:57:09 */ import { Component, OnInit } from '@angular/core'; import { FormControl } from '@angular/forms'; import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { HttpClient } from '@angular/common/http' import { DomSanitizer } from '@angular/platform-browser'; +import { Viewer } from 'photo-sphere-viewer'; declare var CryptoJS @Component({ @@ -71,6 +72,8 @@ export class PlanRecordComponent implements OnInit { endtime//结束时间 count//一共多少条 tableDate + showPvt=false//全景图是否显示 + showtype=0//0:word,1:全景图,2:二维三维,3:重点单位 //获取表格数据 getAlltabledate(){ @@ -119,36 +122,57 @@ export class PlanRecordComponent implements OnInit { //表格点击事件 tableClick(e,item){ //e.target.parentElement.bgColor='#2196F3' - //console.log(e,item) let filename:string let fetchUrl this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{ - fetchUrl=data.attachmentUrls[0] - this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{ - filename=data.fileName - let json={ - doc: { - docId: item.id, - title: filename, - //title: filename, - fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl - }, - user: { - uid: "test", - nickName: "test", - 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/apps/editor/openPreview?data=${base64}` - this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); - //window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) - }) + if(data.planType!=2&&data.planType!=1){ + fetchUrl=data.attachmentUrls[0] + var index=fetchUrl.indexOf("\/") + if(fetchUrl.substr(0,index)=='psw'){ + this.showtype=1 + window.setTimeout(()=>{ + const viewer = new Viewer({ + container: document.querySelector('#viewer'), + panorama:'/api/Objects/PlanPlatform/'+ fetchUrl, + + }); + }) + + }else{ + this.showtype=0 + this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{ + filename=data.fileName + let json={ + doc: { + docId: item.id, + title: filename, + //title: filename, + fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl + }, + user: { + uid: "test", + nickName: "test", + 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/apps/editor/openPreview?data=${base64}` + this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); + //window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) + }) + } + }else{ + this.showtype=2 + this.src=`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1` + this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); + //window.open(`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`) + } + }) } diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.html b/src/app/plan-audit/wait-examineer/wait-examineer.component.html index fde7857..25fc4c6 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.html +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.html @@ -77,17 +77,19 @@
-
- - -
+
+
+ + +
+
- + @@ -141,7 +143,7 @@ --> -
+
@@ -240,14 +242,14 @@
-
+
-
+
-
+
diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.scss b/src/app/plan-audit/wait-examineer/wait-examineer.component.scss index f454837..db3f6a9 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.scss +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.scss @@ -80,6 +80,7 @@ .righthead{ width: 100%; display: flex; + flex-direction: row-reverse; button{ margin-left: 10px; font-size: 16px; @@ -87,11 +88,12 @@ .rightheadone{ width: 50%; margin-top: 20px; + margin-right: 7%; } .rightheadtwo{ width: 40%; margin-top: 20px; - margin-left: 6%; + margin-right: 2%; } } .word{ @@ -103,6 +105,7 @@ width: 97%; margin: 10px 10px 10px 10px; overflow-y: auto; + border: medium none; } } #viewer{ 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 3b62b11..2bbe878 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-12-25 16:13:50 * @LastEditors: sueRimn - * @LastEditTime: 2021-01-29 15:45:27 + * @LastEditTime: 2021-02-02 15:05:56 */ import { Component, OnInit } from '@angular/core'; import { FormControl } from '@angular/forms'; @@ -80,7 +80,6 @@ export class WaitExamineerComponent implements OnInit { this.indexbar.dispose() */ } - wordShow=true iframeSrc src='' @@ -102,7 +101,7 @@ export class WaitExamineerComponent implements OnInit { chuorzhong//判断初审还是终审 radioid//选中的id shenheTable=[]//选中要审核的对象 - showAllimg=false + showtype=0//0:word,1:全景图,2:二维三维,3:重点单位 //获取表格数据 getAlltabledate(){ @@ -146,52 +145,61 @@ export class WaitExamineerComponent implements OnInit { //radio点击事件 radioClick(e,item){ //e.target.parentElement.bgColor='#2196F3' - //console.log(e,item) + console.log(e,item) let filename:string let fetchUrl this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{ - fetchUrl=data.attachmentUrls[0] - if(fetchUrl.substr(0,3)=='psw'){ - this.wordShow=false - this.showAllimg=true - window.setTimeout(()=>{ - const viewer = new Viewer({ - container: document.querySelector('#viewer'), - panorama:'/api/Objects/PlanPlatform/'+ fetchUrl, - - }); - }) - + console.log(data) + + if(data.planType!=2&&data.planType!=1){ + fetchUrl=data.attachmentUrls[0] + var index=fetchUrl.indexOf("\/") + if(fetchUrl.substr(0,index)=='psw'){ + this.showtype=1 + window.setTimeout(()=>{ + const viewer = new Viewer({ + container: document.querySelector('#viewer'), + panorama:'/api/Objects/PlanPlatform/'+ fetchUrl, + + }); + }) + + }else{ + this.showtype=0 + this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{ + filename=data.fileName + let json={ + doc: { + docId: item.id, + title: filename, + //title: filename, + fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl + }, + user: { + uid: "test", + nickName: "test", + 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/apps/editor/openPreview?data=${base64}` + this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); + //window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) + }) + } }else{ - this.wordShow=true - this.showAllimg=false - this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{ - filename=data.fileName - let json={ - doc: { - docId: item.id, - title: filename, - //title: filename, - fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl - }, - user: { - uid: "test", - nickName: "test", - 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/apps/editor/openPreview?data=${base64}` - this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); - //window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) - }) + this.showtype=2 + this.src=`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1` + this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); + //window.open(`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`) } + }) if(e.checked){ 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 6ceecda..3a8e0dc 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 @@ -103,16 +103,17 @@ export class EntryPlanLookComponent implements OnInit { lookPlan(e){ if(e.planMode == 0){ console.log(e.attachmentUrls) - if(e.attachmentUrls[0].substr(0,3)=='psw'){ + 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' + 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)=='txt'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='JPG') */{ let filename:string let fetchUrl=e.attachmentUrls[0] this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{