Browse Source

[新建]审核记录查看全景图

zhuzhou
chenjingyu 4 years ago
parent
commit
5fa3d3ccc8
  1. 10
      src/app/app-routing.module.ts
  2. 4
      src/app/plan-audit/plan-audit-routing.module.ts
  3. 12
      src/app/plan-audit/plan-pass/plan-pass.component.html
  4. 7
      src/app/plan-audit/plan-record/plan-record.component.html
  5. 6
      src/app/plan-audit/plan-record/plan-record.component.scss
  6. 80
      src/app/plan-audit/plan-record/plan-record.component.ts
  7. 20
      src/app/plan-audit/wait-examineer/wait-examineer.component.html
  8. 5
      src/app/plan-audit/wait-examineer/wait-examineer.component.scss
  9. 90
      src/app/plan-audit/wait-examineer/wait-examineer.component.ts
  10. 7
      src/app/plan-management/entry-plan-look/entry-plan-look.component.ts

10
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 { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from '@angular/router';
import { LoginComponent } from './pages/login/login.component'; import { LoginComponent } from './pages/login/login.component';
import { NavigationComponent } from './navigation/navigation.component'; import { NavigationComponent } from './navigation/navigation.component';
import {HomeComponent} from './home/home.component' import {HomeComponent} from './home/home.component'
import { PlanPassComponent } from '../app/plan-audit/plan-pass/plan-pass.component';
//路由守卫 //路由守卫
import {AuthGuard} from './auth.guard' import {AuthGuard} from './auth.guard'
@ -29,6 +38,7 @@ const routes: Routes = [
{path:'login',component:LoginComponent}, {path:'login',component:LoginComponent},
{path:'getNoMToken',component:MTokenK1Component, canActivate: [AuthGuard],}, //K1秘钥验证失败是跳转页面 {path:'getNoMToken',component:MTokenK1Component, canActivate: [AuthGuard],}, //K1秘钥验证失败是跳转页面
{ path: 'planAudit/planpass', component: PlanPassComponent },
]; ];
@NgModule({ @NgModule({

4
src/app/plan-audit/plan-audit-routing.module.ts

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-12-24 10:59:48 * @Date: 2020-12-24 10:59:48
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-12-28 09:11:45 * @LastEditTime: 2021-02-02 15:48:12
*/ */
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from '@angular/router';
@ -17,7 +17,7 @@ import { WaitExamineerComponent } from './wait-examineer/wait-examineer.componen
const routes: Routes = [ const routes: Routes = [
{ path: 'detachmentLevel', component: DetachmentLevelComponent }, { path: 'detachmentLevel', component: DetachmentLevelComponent },
{ path: 'planaudit', component: PlanAuditComponent }, { path: 'planaudit', component: PlanAuditComponent },
{ path: 'planpass', component: PlanPassComponent }, //{ path: 'planpass', component: PlanPassComponent },
{ path: 'planrecord', component: PlanRecordComponent },//预案审核记录 { path: 'planrecord', component: PlanRecordComponent },//预案审核记录
{ path: 'waitexamineer', component: WaitExamineerComponent },//预案待审核 { path: 'waitexamineer', component: WaitExamineerComponent },//预案待审核
]; ];

12
src/app/plan-audit/plan-pass/plan-pass.component.html

@ -1,3 +1,11 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-01-18 11:13:26
* @LastEditors: sueRimn
* @LastEditTime: 2021-02-02 10:43:42
-->
<div style="height: 100%; overflow: hidden; display: flex; flex-direction: column;"> <div style="height: 100%; overflow: hidden; display: flex; flex-direction: column;">
<mat-accordion> <mat-accordion>
@ -21,9 +29,9 @@
<span>单位地址: </span> <span>单位地址: </span>
<span>{{compantData.address?compantData.address : '暂无数据'}}</span> <span>{{compantData.address?compantData.address : '暂无数据'}}</span>
</div> </div>
<div> <!-- <div>
<button mat-raised-button color="primary" (click)='toExamine()' *ngIf="type != 6">审核</button> <button mat-raised-button color="primary" (click)='toExamine()' *ngIf="type != 6">审核</button>
</div> </div> -->
</div> </div>
</mat-expansion-panel-header> </mat-expansion-panel-header>

7
src/app/plan-audit/plan-record/plan-record.component.html

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-12-25 10:19:31 * @Date: 2020-12-25 10:19:31
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-01-28 13:41:39 * @LastEditTime: 2021-02-02 15:58:22
--> -->
<div class="box"> <div class="box">
<div class="boxleft"> <div class="boxleft">
@ -118,7 +118,7 @@
</div> </div>
<div class="boxright"> <div class="boxright">
<mat-tab-group *ngIf="!wordShow" style="flex: 1;overflow-y: auto;" [selectedIndex]="selected.value" (selectedIndexChange)="selected.setValue($event)"> <mat-tab-group *ngIf="showtype==3" style="flex: 1;overflow-y: auto;" [selectedIndex]="selected.value" (selectedIndexChange)="selected.setValue($event)">
<mat-tab label="基本信息"> <mat-tab label="基本信息">
<ng-template matTabContent> <ng-template matTabContent>
@ -172,8 +172,9 @@
</mat-tab> --> </mat-tab> -->
</mat-tab-group> </mat-tab-group>
<div class="word" *ngIf="wordShow"> <div class="word" *ngIf="showtype==0||showtype==2">
<iframe [src]='iframeSrc'></iframe> <iframe [src]='iframeSrc'></iframe>
</div> </div>
<div id="viewer" *ngIf="showtype==1"></div>
</div> </div>
</div> </div>

6
src/app/plan-audit/plan-record/plan-record.component.scss

@ -74,8 +74,14 @@
width: 97%; width: 97%;
margin: 30px 10px 10px 10px; margin: 30px 10px 10px 10px;
overflow-y: auto; overflow-y: auto;
border: medium none;
} }
} }
#viewer{
margin: 30px 10px 10px 10px;
width: 97%;
height: 94%;
}
} }
} }
th,td{ th,td{

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

@ -4,13 +4,14 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-12-25 10:19:31 * @Date: 2020-12-25 10:19:31
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-01-29 15:45:34 * @LastEditTime: 2021-02-02 15:57:09
*/ */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormControl } from '@angular/forms'; import { FormControl } from '@angular/forms';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { HttpClient } from '@angular/common/http' import { HttpClient } from '@angular/common/http'
import { DomSanitizer } from '@angular/platform-browser'; import { DomSanitizer } from '@angular/platform-browser';
import { Viewer } from 'photo-sphere-viewer';
declare var CryptoJS declare var CryptoJS
@Component({ @Component({
@ -71,6 +72,8 @@ export class PlanRecordComponent implements OnInit {
endtime//结束时间 endtime//结束时间
count//一共多少条 count//一共多少条
tableDate tableDate
showPvt=false//全景图是否显示
showtype=0//0:word,1:全景图,2:二维三维,3:重点单位
//获取表格数据 //获取表格数据
getAlltabledate(){ getAlltabledate(){
@ -119,36 +122,57 @@ export class PlanRecordComponent implements OnInit {
//表格点击事件 //表格点击事件
tableClick(e,item){ tableClick(e,item){
//e.target.parentElement.bgColor='#2196F3' //e.target.parentElement.bgColor='#2196F3'
//console.log(e,item)
let filename:string let filename:string
let fetchUrl let fetchUrl
this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{ this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{
fetchUrl=data.attachmentUrls[0] if(data.planType!=2&&data.planType!=1){
this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{ fetchUrl=data.attachmentUrls[0]
filename=data.fileName var index=fetchUrl.indexOf("\/")
let json={ if(fetchUrl.substr(0,index)=='psw'){
doc: { this.showtype=1
docId: item.id, window.setTimeout(()=>{
title: filename, const viewer = new Viewer({
//title: filename, container: document.querySelector('#viewer'),
fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl panorama:'/api/Objects/PlanPlatform/'+ fetchUrl,
},
user: { });
uid: "test", })
nickName: "test",
avatar: "", }else{
privilege: [ this.showtype=0
'FILE_READ','FILE_DOWNLOAD', 'FILE_PRINT' this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{
], filename=data.fileName
}, let json={
} doc: {
var stringjson=JSON.stringify(json) docId: item.id,
var wordArray = CryptoJS.enc.Utf8.parse(stringjson); title: filename,
var base64 = CryptoJS.enc.Base64.stringify(wordArray); //title: filename,
this.src=`http://121.5.10.84/apps/editor/openPreview?data=${base64}` fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl
this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); },
//window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) 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`)
}
}) })
} }

20
src/app/plan-audit/wait-examineer/wait-examineer.component.html

@ -77,17 +77,19 @@
</div> </div>
<div class="boxright"> <div class="boxright">
<div class="righthead"> <div class="righthead">
<div class="rightheadone">
<button mat-raised-button color="primary" (click)="buttonChange()" *ngIf="!wordShow"><img src="../../../assets/images/preview.png" style="margin-right: 3px;margin-bottom: 3px;">{{isallDate?'显示变更数据':'显示完整数据'}} </button>
<button mat-raised-button *ngIf="isallDate" style="background-color: #FFCC00; color: #FFFFFF;" (click)="preview()"><img src="../../../assets/images/change.png" style="margin-bottom: 2px;" > 预览得分</button>
</div>
<div class="rightheadtwo"> <div class="rightheadtwo">
<button mat-raised-button style="color: #FFFFFF;background-color: #FF7161;float: right;" (click)='refuse()'>拒绝</button> <button mat-raised-button style="color: #FFFFFF;background-color: #FF7161;float: right;" (click)='refuse()'>拒绝</button>
<button mat-raised-button style="color: #FFFFFF;background-color: #38D984;float: right;" (click)='agree()'>同意</button> <button mat-raised-button style="color: #FFFFFF;background-color: #38D984;float: right;" (click)='agree()'>同意</button>
</div> </div>
<div class="rightheadone" *ngIf="showtype==3">
<button mat-raised-button color="primary" (click)="buttonChange()"><img src="../../../assets/images/preview.png" style="margin-right: 3px;margin-bottom: 3px;display: none;">{{isallDate?'显示变更数据':'显示完整数据'}} </button>
<button mat-raised-button *ngIf="isallDate" style="background-color: #FFCC00; color: #FFFFFF;" (click)="preview()"><img src="../../../assets/images/change.png" style="margin-bottom: 2px;" > 预览得分</button>
</div>
</div> </div>
<mat-tab-group *ngIf="isallDate&&wordShow==false&&!showAllimg" style="flex: 1;overflow-y: auto;margin-top: 10px;" [selectedIndex]="selected.value" (selectedIndexChange)="selected.setValue($event)"> <mat-tab-group *ngIf="showtype==3" style="flex: 1;overflow-y: auto;margin-top: 10px;" [selectedIndex]="selected.value" (selectedIndexChange)="selected.setValue($event)">
<mat-tab label="基本信息"> <mat-tab label="基本信息">
<ng-template matTabContent> <ng-template matTabContent>
@ -141,7 +143,7 @@
</mat-tab> --> </mat-tab> -->
</mat-tab-group> </mat-tab-group>
<div id="firefacilities" *ngIf="!isallDate&&wordShow==false&&!showAllimg" style="margin: 10px;"> <div id="firefacilities" *ngIf="showtype==3" style="margin: 10px;">
<mat-accordion class="tableContent" > <mat-accordion class="tableContent" >
<mat-expansion-panel expanded style="box-shadow: 0 0 black;border: 1px solid #EEF1F5;"> <mat-expansion-panel expanded style="box-shadow: 0 0 black;border: 1px solid #EEF1F5;">
<mat-expansion-panel-header collapsedHeight ='40px' expandedHeight='40px' class="panelhead" style="background-color: #2196F3;"> <mat-expansion-panel-header collapsedHeight ='40px' expandedHeight='40px' class="panelhead" style="background-color: #2196F3;">
@ -240,14 +242,14 @@
</mat-expansion-panel> </mat-expansion-panel>
</mat-accordion> </mat-accordion>
</div> </div>
<div class="word" *ngIf="wordShow"> <div class="word" *ngIf="showtype==0||showtype==2">
<iframe [src]='iframeSrc'></iframe> <iframe [src]='iframeSrc'></iframe>
</div> </div>
<div id="viewer" *ngIf="showAllimg"></div> <div id="viewer" *ngIf="showtype==1"></div>
</div> </div>
</div> </div>
<div class="echarts" *ngIf="previewshow" ><!-- [style.display]="previewshow==true?'block':'none'" --> <div class="echarts" *ngIf="showtype==3" ><!-- [style.display]="previewshow==true?'block':'none'" -->
<div class="bar" id="indexbar" ></div> <div class="bar" id="indexbar" ></div>
<div class="zhu" id="zhu" ></div> <div class="zhu" id="zhu" ></div>
</div> </div>

5
src/app/plan-audit/wait-examineer/wait-examineer.component.scss

@ -80,6 +80,7 @@
.righthead{ .righthead{
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: row-reverse;
button{ button{
margin-left: 10px; margin-left: 10px;
font-size: 16px; font-size: 16px;
@ -87,11 +88,12 @@
.rightheadone{ .rightheadone{
width: 50%; width: 50%;
margin-top: 20px; margin-top: 20px;
margin-right: 7%;
} }
.rightheadtwo{ .rightheadtwo{
width: 40%; width: 40%;
margin-top: 20px; margin-top: 20px;
margin-left: 6%; margin-right: 2%;
} }
} }
.word{ .word{
@ -103,6 +105,7 @@
width: 97%; width: 97%;
margin: 10px 10px 10px 10px; margin: 10px 10px 10px 10px;
overflow-y: auto; overflow-y: auto;
border: medium none;
} }
} }
#viewer{ #viewer{

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

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-12-25 16:13:50 * @Date: 2020-12-25 16:13:50
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-01-29 15:45:27 * @LastEditTime: 2021-02-02 15:05:56
*/ */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormControl } from '@angular/forms'; import { FormControl } from '@angular/forms';
@ -80,7 +80,6 @@ export class WaitExamineerComponent implements OnInit {
this.indexbar.dispose() */ this.indexbar.dispose() */
} }
wordShow=true
iframeSrc iframeSrc
src='' src=''
@ -102,7 +101,7 @@ export class WaitExamineerComponent implements OnInit {
chuorzhong//判断初审还是终审 chuorzhong//判断初审还是终审
radioid//选中的id radioid//选中的id
shenheTable=[]//选中要审核的对象 shenheTable=[]//选中要审核的对象
showAllimg=false showtype=0//0:word,1:全景图,2:二维三维,3:重点单位
//获取表格数据 //获取表格数据
getAlltabledate(){ getAlltabledate(){
@ -146,52 +145,61 @@ export class WaitExamineerComponent implements OnInit {
//radio点击事件 //radio点击事件
radioClick(e,item){ radioClick(e,item){
//e.target.parentElement.bgColor='#2196F3' //e.target.parentElement.bgColor='#2196F3'
//console.log(e,item) console.log(e,item)
let filename:string let filename:string
let fetchUrl let fetchUrl
this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{ this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{
fetchUrl=data.attachmentUrls[0] console.log(data)
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,
}); 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{ }else{
this.wordShow=true this.showtype=2
this.showAllimg=false this.src=`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`
this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{ this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
filename=data.fileName //window.open(`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`)
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(e.checked){ if(e.checked){

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

@ -103,16 +103,17 @@ export class EntryPlanLookComponent implements OnInit {
lookPlan(e){ lookPlan(e){
if(e.planMode == 0){ if(e.planMode == 0){
console.log(e.attachmentUrls) 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, { const dialogRef = this.dialog.open(PsViewer, {
width: '1500px', width: '1500px',
height:'800px', height:'800px',
data: e.attachmentUrls[0] 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)=='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 filename:string
let fetchUrl=e.attachmentUrls[0] let fetchUrl=e.attachmentUrls[0]
this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{ this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{

Loading…
Cancel
Save