+
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)=>{