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 c98c7ab..9719e05 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.html +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.html @@ -273,9 +273,9 @@ --> -
+
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 1daa1dc..de3a49e 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.scss +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.scss @@ -109,7 +109,7 @@ #viewer{ margin: 10px 10px 10px 10px; width: 97%; - height: 91%; + height: 93%; } .waterAudit,.fireForceAudit,.LinkageForcesAudit{ flex: 1; 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 4d2a428..14887f7 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-02-06 10:51:26 + * @LastEditTime: 2021-02-07 14:37:44 */ import { Component, Inject, OnInit } from '@angular/core'; import { FormControl } from '@angular/forms'; @@ -79,6 +79,7 @@ export class WaitExamineerComponent implements OnInit { ngOnDestroy () { /* this.indexbar.clear() this.indexbar.dispose() */ + } iframeSrc @@ -151,13 +152,16 @@ export class WaitExamineerComponent implements OnInit { this.getAlltabledate() } //radio点击事件 + viewer//全景图对象 radioClick(e,item){ //e.target.parentElement.bgColor='#2196F3' console.log(e,item) + this.organizationName='' this.id=item.id this.fetchUrl='' - + this.viewer={} this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{ + console.log(data) this.companyId=data.companyId this.companyName=data.companyName if(data.planType!=2&&data.planType!=1){ @@ -166,7 +170,7 @@ export class WaitExamineerComponent implements OnInit { if(this.fetchUrl.substr(0,index)=='psw'){ this.showtype=1 window.setTimeout(()=>{ - const viewer = new Viewer({ + this.viewer = new Viewer({ container: document.querySelector('#viewer'), panorama:'/api/Objects/PlanPlatform/'+ this.fetchUrl, @@ -178,7 +182,10 @@ export class WaitExamineerComponent implements OnInit { } }else{ this.organizationName=item.organizationName - this.getPlanData() + this.planData = data + this.handleData() + return + //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`) @@ -232,43 +239,40 @@ export class WaitExamineerComponent implements OnInit { //window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) }) } - getPlanData () { - let header = { - CompanyName: this.companyName || '', - //AuditStatus: this.id || '', - PageSize: '100', - } - console.log(header) - this.http.get('/api/PlanAudits',{params:header}).subscribe((data:any)=>{ - data.items.forEach(element => { - /* if (element.id===this.id) { - - } */ - this.planData = element - this.organizationName = element.committerOrganizationName - this.handleData() - return - }); - }) - } + //查看二维三维预案 thirdPartyURL planType + twoOrthree handleData () { + this.compantData={name:'',buildingTypes:[],address:''} this.planType = this.planData.planMode let data = this.planData - console.log(this.planData) + console.log(data) + if(data.planType==1){ + this.twoOrthree=2 + }else if(data.planType==2){ + this.twoOrthree=3 + } if (this.planData.planMode==0) { //预案planMode=0时, 查看word //this.lookWord() } else if (this.planData.planMode==1) { //预案planMode=1时, 解析文档 } else if (this.planData.planMode==2) { //预案planMode=2时, 跳查看页面组件 + this.showtype=2 + this.http.get(`/api/Plans/${data.companyId}`).subscribe((data:any)=>{ + data && data.company? this.compantData = data.company : null + }) sessionStorage.setItem("buildingTypeId", this.compantData.buildingTypes.length? this.compantData.buildingTypes[0].id: undefined); sessionStorage.setItem("companyId",this.companyId); sessionStorage.setItem("planId",this.id); sessionStorage.setItem("editable",'0'); - } else if (this.planData.planMode==3) { //预案planMode=3时, 第三方网址 + sessionStorage.setItem("planName",data.name) + let companyId = sessionStorage.getItem("companyId") + this.thirdPartyURL=this.sanitizer.bypassSecurityTrustResourceUrl(`/planAudit/planpass?id=${this.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`); + //window.open(`/keyUnit/viewunitinfoplan?id=${companyId}`) + } else if (this.planData.planMode==3) { //预案planMode=3时, 第三方网址' this.showtype=2 this.http.get(`/api/Plans/${data.companyId}`).subscribe((data:any)=>{ data && data.company? this.compantData = data.company : null @@ -281,7 +285,7 @@ export class WaitExamineerComponent implements OnInit { //打开三维预案弹窗 oopen3Dshow(){ - this.dialog.open(show3D,{width:'1550px',height:'850px',data:{url:this.thirdPartyURL}}); + this.dialog.open(show3D,{width:'1650px',height:'850px',data:{url:this.thirdPartyURL,twoOrthree:this.twoOrthree}}); } //变更数据和全部数据切换按钮 buttonChange(){ @@ -518,7 +522,7 @@ export class WaitExamineerComponent implements OnInit { export class show3D{ constructor(private sanitizer: DomSanitizer,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public dialog: MatDialog) {} ngOnInit(): void { - console.log(this.data.url.changingThisBreaksApplicationSecurity) + console.log(this.data) this.threedUrl=this.sanitizer.bypassSecurityTrustResourceUrl(this.data.url.changingThisBreaksApplicationSecurity) } threedUrl diff --git a/src/app/plan-management/entry-plan-look/auditresult.html b/src/app/plan-management/entry-plan-look/auditresult.html index e393c41..415d0ef 100644 --- a/src/app/plan-management/entry-plan-look/auditresult.html +++ b/src/app/plan-management/entry-plan-look/auditresult.html @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-12-24 10:59:48 * @LastEditors: sueRimn - * @LastEditTime: 2021-01-20 17:09:15 + * @LastEditTime: 2021-02-07 13:58:53 -->
审批结果 @@ -16,7 +16,7 @@

发起申请:{{commitOrganizationName }}

初审时间:{{data.element.firstAudittedTime| date:'yyyy-MM-dd HH:mm:ss'}}

-

初审机构:{{data.element.firstAuditorName}}

+

初审机构:{{data.element.firstAuditorOrganizationName}}

初审意见:{{data.element.firstAuditOpinion}}

初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':''}}

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 40594af..358f65d 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 @@ -899,6 +899,7 @@ export class AddPlanone { planType:Number(this.selectedPLanType), planMode: Number(this.defaultisshow), planLevel: PlanLevel, + planCategory:Number(this.selectedPLanLevel), url: "", attachmentUrls: null } 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 4de8762..5a24607 100644 --- a/src/app/plan-management/meet-plan/meet-plan.component.ts +++ b/src/app/plan-management/meet-plan/meet-plan.component.ts @@ -413,8 +413,10 @@ export class newunitMeet{ disasterType: this.reservePlanType, PlanLevel:PlanLevel, PlanMode:1, + planType:16, attachmentUrls:[`${this.objectName}`] } + console.log(body) this.http.post("/api/PlanComponentsMajor",body).subscribe((data:any)=>{ this.snackBar.open('创建成功!','确定',config); //console.log(data) @@ -505,6 +507,7 @@ export class newunitMeet{ disasterType: this.reservePlanType, PlanLevel:PlanLevel, PlanMode:1, + planType:16, attachmentUrls:[`${this.objectName}`] } this.http.post("/api/PlanComponentsMajor",body).subscribe((data:any)=>{ diff --git a/src/app/plan-management/meet-plan/resultmeetPlan.html b/src/app/plan-management/meet-plan/resultmeetPlan.html index 82110af..6916a79 100644 --- a/src/app/plan-management/meet-plan/resultmeetPlan.html +++ b/src/app/plan-management/meet-plan/resultmeetPlan.html @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-01-20 09:31:24 * @LastEditors: sueRimn - * @LastEditTime: 2021-01-20 17:09:00 + * @LastEditTime: 2021-02-07 13:58:01 -->
审批结果 @@ -16,7 +16,7 @@

发起申请:{{commitOrganizationName }}

初审时间:{{data.element.firstAudittedTime| date:'yyyy-MM-dd HH:mm:ss'}}

-

初审机构:{{data.element.firstAuditorName}}

+

初审机构:{{data.element.firstAuditorOrganizationName}}

初审意见:{{data.element.firstAuditOpinion}}

初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':''}}

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 329757d..3a92ba4 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-02-05 14:52:32 + * @LastEditTime: 2021-02-07 16:13:54 */ import { Component, OnInit, ViewChild, Inject } from '@angular/core'; import { HttpClient } from '@angular/common/http' @@ -436,6 +436,7 @@ export class newunitComponent{ disasterType: this.reservePlanType, PlanLevel:PlanLevel, PlanMode:1, + planType:16, attachmentUrls:[`${this.objectName}`] } this.http.post("/api/PlanComponentsMajor",body).subscribe((data:any)=>{ @@ -527,6 +528,7 @@ export class newunitComponent{ disasterType: this.reservePlanType, PlanLevel:PlanLevel, PlanMode:1, + planType:16, attachmentUrls:[`${this.objectName}`] } diff --git a/src/app/plan-management/onetwo-entry-plan/resultPlanonetwo.html b/src/app/plan-management/onetwo-entry-plan/resultPlanonetwo.html index 1b71f36..3c68db2 100644 --- a/src/app/plan-management/onetwo-entry-plan/resultPlanonetwo.html +++ b/src/app/plan-management/onetwo-entry-plan/resultPlanonetwo.html @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-01-20 09:31:24 * @LastEditors: sueRimn - * @LastEditTime: 2021-01-20 17:07:50 + * @LastEditTime: 2021-02-07 13:58:29 -->
审批结果 @@ -16,7 +16,7 @@

发起申请:{{commitOrganizationName }}

初审时间:{{data.element.firstAudittedTime| date:'yyyy-MM-dd HH:mm:ss'}}

-

初审机构:{{data.element.firstAuditorName}}

+

初审机构:{{data.element.firstAuditorOrganizationName}}

初审意见:{{data.element.firstAuditOpinion}}

初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':''}}

diff --git a/src/app/plan-management/open-plan/PsvShow.html b/src/app/plan-management/open-plan/PsvShow.html new file mode 100644 index 0000000..82a30af --- /dev/null +++ b/src/app/plan-management/open-plan/PsvShow.html @@ -0,0 +1,9 @@ + +
\ No newline at end of file diff --git a/src/app/plan-management/open-plan/open-plan.component.scss b/src/app/plan-management/open-plan/open-plan.component.scss index dc9f5c8..9b77e69 100644 --- a/src/app/plan-management/open-plan/open-plan.component.scss +++ b/src/app/plan-management/open-plan/open-plan.component.scss @@ -77,6 +77,9 @@ width: 100%; margin-top: 15px; } + th,td{ + text-align: center; + } mat-paginator{ width: 100%; } diff --git a/src/app/plan-management/open-plan/open-plan.component.ts b/src/app/plan-management/open-plan/open-plan.component.ts index bb8ce5e..0ece1d0 100644 --- a/src/app/plan-management/open-plan/open-plan.component.ts +++ b/src/app/plan-management/open-plan/open-plan.component.ts @@ -9,6 +9,8 @@ import { PageEvent } from '@angular/material/paginator'; import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { TreeService } from '../../http-interceptors/tree.service' +import { Viewer } from 'photo-sphere-viewer'; +declare var CryptoJS @Component({ selector: 'app-open-plan', templateUrl: './open-plan.component.html', @@ -161,9 +163,71 @@ export class OpenPlanComponent implements OnInit { ) } //跳转查看预案页面 公开预案 - routerTo(element){ - sessionStorage.setItem("companyName",element.companyName) - window.open(`/planAudit/planpass?id=${element.companyId}&companyName=${element.companyName}&auditPlanId=${element.id}&auditStatus=${element.auditStatus}&type=6&planType=2`); + routerTo(e){ + /* sessionStorage.setItem("companyName",element.companyName) + window.open(`/planAudit/planpass?id=${element.companyId}&companyName=${element.companyName}&auditPlanId=${element.id}&auditStatus=${element.auditStatus}&type=6&planType=2`); */ + + console.log(e) + if(e.planMode == 0||e.planMode == 1){ + //console.log(e.attachmentUrls) + var index=e.attachmentUrls[0].indexOf("\/") + if(e.attachmentUrls[0].substr(0,index)=='psw'){ + const dialogRef = this.dialog.open(GkhtmlPsViewer, { + 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_WRITE','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 == 2){ //如果是在线编辑 + let id = e.id + sessionStorage.setItem("planId",id) + sessionStorage.setItem("companyId",e.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}`); + } + if(e.planMode == 3){ //如果是跳转网页 + sessionStorage.setItem("url",e.url) + window.open(`/planManagement/webLook`) + } } //分页事件 chagePage(e){ @@ -219,3 +283,20 @@ export class OpenPlanComponent implements OnInit { } } + +@Component({ + selector: 'PsViewer', + templateUrl: './PsvShow.html', + styleUrls: ['./open-plan.component.scss'] +}) +export class GkhtmlPsViewer{ + 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, + + }); + } +} diff --git a/src/app/plan-management/pass-plan/PsvShow.html b/src/app/plan-management/pass-plan/PsvShow.html new file mode 100644 index 0000000..fdbdec8 --- /dev/null +++ b/src/app/plan-management/pass-plan/PsvShow.html @@ -0,0 +1,9 @@ + +
\ No newline at end of file diff --git a/src/app/plan-management/pass-plan/pass-plan.component.html b/src/app/plan-management/pass-plan/pass-plan.component.html index 326e79f..92a149b 100644 --- a/src/app/plan-management/pass-plan/pass-plan.component.html +++ b/src/app/plan-management/pass-plan/pass-plan.component.html @@ -139,6 +139,8 @@ 操作 {{url=='1'?'审核预案':'查看预案'}} + + diff --git a/src/app/plan-management/pass-plan/pass-plan.component.ts b/src/app/plan-management/pass-plan/pass-plan.component.ts index f0d0f94..ef1fdd8 100644 --- a/src/app/plan-management/pass-plan/pass-plan.component.ts +++ b/src/app/plan-management/pass-plan/pass-plan.component.ts @@ -9,6 +9,7 @@ import { PageEvent } from '@angular/material/paginator'; import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { TreeService } from '../../http-interceptors/tree.service' +import { Viewer } from 'photo-sphere-viewer'; declare var CryptoJS @Component({ selector: 'app-pass-plan', @@ -292,45 +293,91 @@ export class PassPlanComponent implements OnInit { ) } //跳转查看预案页面 审核通过预案 - routerTo(element){ - if(element.attachmentUrls[0].substr(element.attachmentUrls[0].length-4,element.attachmentUrls[0].length-1)=='docx'||element.attachmentUrls[0].substr(element.attachmentUrls[0].length-3,element.attachmentUrls[0].length)=='pdf' - ||element.attachmentUrls[0].substr(element.attachmentUrls[0].length-3,element.attachmentUrls[0].length)=='doc'||element.attachmentUrls[0].substr(element.attachmentUrls[0].length-3,element.attachmentUrls[0].length)=='DOC' - ||element.attachmentUrls[0].substr(element.attachmentUrls[0].length-3,element.attachmentUrls[0].length)=='txt'){ - let filename:string - let fetchUrl=element.attachmentUrls[0] - this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{ + routerTo(e){ + console.log(e) + if(e.planMode == 0||e.planMode == 1){ + //console.log(e.attachmentUrls) + var index=e.attachmentUrls[0].indexOf("\/") + if(e.attachmentUrls[0].substr(0,index)=='psw'){ + const dialogRef = this.dialog.open(GkPsViewer, { + 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: element.id, + doc: { + docId: docId, title: filename, - //title: filename, - fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl - }, - user: { - uid: "test", - nickName: "test", + 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' + 'FILE_READ','FILE_WRITE','FILE_DOWNLOAD', 'FILE_PRINT' ], }, - } - var stringjson=JSON.stringify(json) - var wordArray = CryptoJS.enc.Utf8.parse(stringjson); - var base64 = CryptoJS.enc.Base64.stringify(wordArray); - - //let base64Date=this.BASE64.encode(stringjson) - //let filedata= CryptoJS.enc.Base64.stringify(json) - console.log(base64) - window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) - }) - }else{ - sessionStorage.setItem("companyName",element.companyName) - window.open(`/planAudit/planpass?id=${element.companyId}&companyName=${element.companyName}&auditPlanId=${element.id}&auditStatus=${element.auditStatus}&type=6&planType=1`); + } + 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 == 2){ //如果是在线编辑 + let id = e.id + sessionStorage.setItem("planId",id) + sessionStorage.setItem("companyId",e.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}`); + } + if(e.planMode == 3){ //如果是跳转网页 + sessionStorage.setItem("url",e.url) + window.open(`/planManagement/webLook`) } } + + //预案公开 + openReserve (e) { + this.http.put(`/api/PlanAudits/${e.id}/Public`,[]).subscribe(data=>{ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('预案已公开','确定',config); + }) + } + + //预案取消公开 + closeReserve (e) { + this.http.put(`/api/PlanAudits/${e.id}/Unpublic`,[]).subscribe(data=>{ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('预案已取消公开','确定',config); + }) + } + //分页事件 chagePage(e){ this.PageNumber = e.pageIndex+1 @@ -390,3 +437,20 @@ export class PassPlanComponent implements OnInit { } } + +@Component({ + selector: 'PsViewer', + templateUrl: './PsvShow.html', + styleUrls: ['./pass-plan.component.scss'] +}) +export class GkPsViewer{ + 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, + + }); + } +} diff --git a/src/app/plan-management/plan-management.module.ts b/src/app/plan-management/plan-management.module.ts index 1728891..666913f 100644 --- a/src/app/plan-management/plan-management.module.ts +++ b/src/app/plan-management/plan-management.module.ts @@ -61,12 +61,15 @@ import { onetwoAuditResult } from './onetwo-entry-plan/onetwo-entry-plan.compone import { meetAuditResult }from './meet-plan/meet-plan.component'; import { typeAuditResult } from './type-plan/type-plan.component'; import { MaintainUpComponent } from './maintain-up/maintain-up.component' +import { GkPsViewer } from './pass-plan/pass-plan.component' +import { GkhtmlPsViewer }from './open-plan/open-plan.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], + WebLookComponent, OnetwoEntryPlanComponent,newunitComponent, MeetPlanComponent,newunitMeet, TypePlanComponent,newunitType,PsViewer,onetwoAuditResult,meetAuditResult, + typeAuditResult, MaintainUpComponent,GkPsViewer,GkhtmlPsViewer], imports: [ CommonModule, PlanManagementRoutingModule, diff --git a/src/app/plan-management/type-plan/resulttypePlan.html b/src/app/plan-management/type-plan/resulttypePlan.html index 94fbc01..fd65981 100644 --- a/src/app/plan-management/type-plan/resulttypePlan.html +++ b/src/app/plan-management/type-plan/resulttypePlan.html @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-01-20 09:31:24 * @LastEditors: sueRimn - * @LastEditTime: 2021-01-20 17:08:43 + * @LastEditTime: 2021-02-07 13:58:16 -->
审批结果 @@ -16,7 +16,7 @@

发起申请:{{commitOrganizationName }}

初审时间:{{data.element.firstAudittedTime| date:'yyyy-MM-dd HH:mm:ss'}}

-

初审机构:{{data.element.firstAuditorName}}

+

初审机构:{{data.element.firstAuditorOrganizationName}}

初审意见:{{data.element.firstAuditOpinion}}

初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':''}}

diff --git a/src/app/plan-management/type-plan/type-plan.component.ts b/src/app/plan-management/type-plan/type-plan.component.ts index a96af3f..cda585b 100644 --- a/src/app/plan-management/type-plan/type-plan.component.ts +++ b/src/app/plan-management/type-plan/type-plan.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-01-06 09:47:43 * @LastEditors: sueRimn - * @LastEditTime: 2021-02-06 09:12:05 + * @LastEditTime: 2021-02-07 16:13:27 */ import { Component, OnInit, ViewChild, Inject } from '@angular/core'; import { HttpClient } from '@angular/common/http' @@ -409,6 +409,7 @@ export class newunitType{ PlanLevel:PlanLevel, PlanMode:1, PlanType:8, + planType:16, attachmentUrls:[`${this.objectName}`] } this.http.post("/api/PlanComponentsMajor",body).subscribe((data:any)=>{ @@ -500,6 +501,7 @@ export class newunitType{ PlanLevel:PlanLevel, PlanMode:1, PlanType:8, + planType:16, attachmentUrls:[`${this.objectName}`] } diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 1c8b610..bee4eed 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -157,8 +157,12 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV * Beta版: 该版本相对于α版已有了很大的改进,消除了严重的错误,但还是存在着一些缺陷,需要经过多次测试来进一步消除,此版本主要的修改对像是软件的UI。 * RC版: 该版本已经相当成熟了,基本上不存在导致错误的BUG,与即将发行的正式版相差无几。 * Release版: 该版本意味“最终版本”,在前面版本的一系列测试版之后,终归会有一个正式版本,是最终交付用户使用的一个版本。该版本有时也称为标准版。一般情况下,Release不会以单词形式出现在软件封面上,取而代之的是符号®。 + * 修改-修订版本号增加 + * 新增-子版本号增加 + * 重大调整-主版本号增加 + * 日期变更-日期版本号增加 */ - public VERSION = '1.0.18.20210205_beta'; + public VERSION = '1.2.1.20210207_beta'; /** * 数据初始化 */ @@ -201,9 +205,9 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV if (this.allowEdit && this.canvasData.gameMode === axShape.assetData.GameMode) { // 删除图例对象 const temp = this.backgroundImage.getChildByName('图例') as AxLegend; - if ( temp !== undefined + if (temp !== undefined && temp !== null - && axShape.assetData.Name !== '图例') { + && axShape.assetData.Name !== '图例') { const itemLegend = new Legend(axShape.assetData.Name, axShape.assetData.ImageUrl, 1); temp.deleteItem(itemLegend); } @@ -241,15 +245,15 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV sayHello() { let _a; if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1) { - const args = [ - '\n %c 版本号 - ' + this.VERSION + '\n', - 'color: #ff66a5; background: #000000; padding:5px 0;', - ]; - (_a = window.console).log.apply(_a, args); + const args = [ + '\n %c 版本号 - ' + this.VERSION + '\n', + 'color: #ff66a5; background: #000000; padding:5px 0;', + ]; + (_a = window.console).log.apply(_a, args); } else if (window.console) { - window.console.log('\n %c 版本号 - ' + this.VERSION + '\n'); + window.console.log('\n %c 版本号 - ' + this.VERSION + '\n'); } -} + } /** * 页面初始化 */ @@ -305,8 +309,8 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV public resizeItem(size: number) { this.backgroundImage.children.forEach(item => { if (item instanceof AxShape) { - item.setItemScale(size); - item.drawBorder(size); + item.setItemScale(size); + item.drawBorder(size); } }); } @@ -353,18 +357,18 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.camera2D .clamp({ - left: -10000, - right: 10000, - top: -10000, - bottom: 10000, - }) + left: -10000, + right: 10000, + top: -10000, + bottom: 10000, + }) .drag() .pinch() .wheel() .clampZoom({ - minScale: 0.12, - maxScale: 16, - }) + minScale: 0.12, + maxScale: 16, + }) .decelerate(); this.camera2D.on('wheel', event => { @@ -373,7 +377,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.camera2D.on('pointerdown', event => { if (this.isCtrlKeyClicked === true - && event.data.button === 0) { + && event.data.button === 0) { this.rectToolGraphics.visible = true; this.initialScreenMousePos = this.backgroundImage.toLocal(this.mousePosition); this.finalScreenMousePos = this.backgroundImage.toLocal(this.mousePosition); @@ -384,7 +388,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.rectToolGraphics.visible = false; const shapes: AxShape[] = []; this.backgroundImage.children.forEach(item => { - if ( item instanceof AxShape + if (item instanceof AxShape && item instanceof AxPreviewImageShape === false) { // 判断2个矩形是否相交 const rect1 = this.rectToolGraphics.getBounds(); @@ -403,7 +407,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.rectToolGraphics.visible = false; const shapes: AxShape[] = []; this.backgroundImage.children.forEach(item => { - if ( item instanceof AxShape + if (item instanceof AxShape && item instanceof AxPreviewImageShape === false) { // 判断2个矩形是否相交 const rect1 = this.rectToolGraphics.getBounds(); @@ -419,7 +423,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV }); this.camera2D.on('pointermove', event => { if (this.isCtrlKeyClicked === true - && this.rectToolGraphics.visible === true) { + && this.rectToolGraphics.visible === true) { this.finalScreenMousePos = this.backgroundImage.toLocal(this.mousePosition); const init = this.initialScreenMousePos; @@ -468,8 +472,8 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV * 缩放适应 */ public zoomFit() { - const imageWidth = this.backgroundImage.texture.width; - const imageHeight = this.backgroundImage.texture.height; + const imageWidth = this.backgroundImage.width; + const imageHeight = this.backgroundImage.height; const appWidth = this.app.view.width - 470; const appHeight = this.app.view.height; const wScale = appWidth / imageWidth; @@ -561,9 +565,9 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV } } const temp = this.backgroundImage.getChildByName('图例') as AxLegend; - if ( temp !== undefined + if (temp !== undefined && temp !== null - && axShape.assetData.Name !== '图例') { + && axShape.assetData.Name !== '图例') { const itemLegend = new Legend(axShape.assetData.Name, axShape.assetData.ImageUrl, 1); temp.addItem(itemLegend); } @@ -660,7 +664,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV wall.allowEdit = this.allowEdit && this.canvasData.gameMode === wall.assetData.GameMode; } break; - } + } }); // this.emit('backgroundScale', this.backgroundImage.scale.x); } @@ -689,7 +693,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV const pipeline = new AxArrowConnector(nodeData[key][tempKey], this, false, true); pipeline.allowEdit = this.allowEdit && this.canvasData.gameMode === pipeline.assetData.GameMode; break; - } + } }); }); } @@ -701,7 +705,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.enterPaintEndButton.width = 60; this.enterPaintEndButton.height = 60; this.enterPaintEndButton.anchor.set(0.5); - this.enterPaintEndButton.position = new PIXI.Point(0, 0); + this.enterPaintEndButton.position = new PIXI.Point(0, 0); this.enterPaintEndButton.interactive = true; this.enterPaintEndButton.buttonMode = true; this.enterPaintEndButton @@ -737,7 +741,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV list.push(property); }); - const assetData = { + const assetData = { TemplateId: this.canvasData.selectTemplateData.id, CanConnect: this.canvasData.selectTemplateData.canConnect, Pipelines: new Array(), @@ -748,19 +752,19 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV FillMode: this.canvasData.selectTemplateData.fillMode, FireElementId: this.canvasData.selectTemplateData.fireElementId, FixedSize: this.canvasData.selectTemplateData.fixedSize, - Height : 32, - Width : 32, + Height: 32, + Width: 32, Id: ObjectID.default.generate(), ImageUrl: this.canvasData.selectTemplateData.imageUrl, InteractiveMode: this.canvasData.selectTemplateData.interactiveMode, - MultiPoint : null, + MultiPoint: null, Point: new PIXI.Point(this.previewImage.x, this.previewImage.y), - Name : this.canvasData.selectTemplateData.name, + Name: this.canvasData.selectTemplateData.name, PropertyInfos: list, - Border : this.canvasData.selectTemplateData.border, - DrawMode : this.canvasData.selectTemplateData.drawMode, - Thickness : this.canvasData.selectTemplateData.thickness, - IsFromBuilding : this.canvasData.selectTemplateData.isFromBuilding, + Border: this.canvasData.selectTemplateData.border, + DrawMode: this.canvasData.selectTemplateData.drawMode, + Thickness: this.canvasData.selectTemplateData.thickness, + IsFromBuilding: this.canvasData.selectTemplateData.isFromBuilding, GameMode: this.canvasData.gameMode, Tag: this.canvasData.selectTemplateData.tag }; @@ -860,61 +864,61 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV // this.paintingShape.refresh(); // } // } else { - this.previewLineSegment.visible = true; - this.enterPaintEndButton.position = this.circleShadow.position; - this.enterPaintEndButton.visible = true; - this.enterPaintEndButton.zIndex = this.backgroundImage.children.length; - this.currentClickPoint.position = new PIXI.Point(this.circleShadow.x, this.circleShadow.y); - this.paintPoints.push(new PIXI.Point(this.circleShadow.x, this.circleShadow.y)); - if (this.paintPoints.length < 2) { - return; - } - if (this.paintingShape === null) { - const jsonObject = JSON.parse(JSON.stringify(this.canvasData.selectTemplateData.propertyInfos)); - const propertyList = []; - jsonObject.forEach(element => { - const property = new PropertyInfo(element); - propertyList.push(property); - }); - const assetData2 = { - TemplateId: this.canvasData.selectTemplateData.id, - FloorId: this.canvasData.selectStorey.id, - Angle: this.canvasData.selectTemplateData.angle, - Color: this.canvasData.selectTemplateData.color, - Enabled: this.canvasData.selectTemplateData.enabled, - FillMode: this.canvasData.selectTemplateData.fillMode, - FireElementId: this.canvasData.selectTemplateData.fireElementId, - FixedSize: this.canvasData.selectTemplateData.fixedSize, - Height: 32, - Width: 32, - Id: ObjectID.default.generate(), - ImageUrl: this.canvasData.selectTemplateData.imageUrl, - InteractiveMode: this.canvasData.selectTemplateData.interactiveMode, - MultiPoint: JSON.parse(JSON.stringify(this.paintPoints)), - Point: new PIXI.Point(0, 0), - Name: this.canvasData.selectTemplateData.name, - PropertyInfos: propertyList, - Border: this.canvasData.selectTemplateData.border, - DrawMode: this.canvasData.selectTemplateData.drawMode, - Thickness: this.canvasData.selectTemplateData.thickness, - IsFromBuilding: this.canvasData.selectTemplateData.isFromBuilding, - GameMode: this.canvasData.gameMode, - Tag: this.canvasData.selectTemplateData.tag - }; - if (this.canvasData.selectTemplateData.name === '距离') { - this.paintingShape = new AxArrowConnector(assetData2, this, true, true); - } else if (this.canvasData.selectTemplateData.name === '普通墙' || this.canvasData.selectTemplateData.name === '承重墙') { - this.paintingShape = new AxArrowConnector(assetData2, this, false, false); - } else if (this.canvasData.selectTemplateData.name === '水带' ) { - this.paintingShape = new AxArrowConnector(assetData2, this, false, true); - } - } else { - this.paintingShape.assetData.MultiPoint = JSON.parse(JSON.stringify(this.paintPoints)); - this.paintingShape.redraw(); + this.previewLineSegment.visible = true; + this.enterPaintEndButton.position = this.circleShadow.position; + this.enterPaintEndButton.visible = true; + this.enterPaintEndButton.zIndex = this.backgroundImage.children.length; + this.currentClickPoint.position = new PIXI.Point(this.circleShadow.x, this.circleShadow.y); + this.paintPoints.push(new PIXI.Point(this.circleShadow.x, this.circleShadow.y)); + if (this.paintPoints.length < 2) { + return; + } + if (this.paintingShape === null) { + const jsonObject = JSON.parse(JSON.stringify(this.canvasData.selectTemplateData.propertyInfos)); + const propertyList = []; + jsonObject.forEach(element => { + const property = new PropertyInfo(element); + propertyList.push(property); + }); + const assetData2 = { + TemplateId: this.canvasData.selectTemplateData.id, + FloorId: this.canvasData.selectStorey.id, + Angle: this.canvasData.selectTemplateData.angle, + Color: this.canvasData.selectTemplateData.color, + Enabled: this.canvasData.selectTemplateData.enabled, + FillMode: this.canvasData.selectTemplateData.fillMode, + FireElementId: this.canvasData.selectTemplateData.fireElementId, + FixedSize: this.canvasData.selectTemplateData.fixedSize, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: this.canvasData.selectTemplateData.imageUrl, + InteractiveMode: this.canvasData.selectTemplateData.interactiveMode, + MultiPoint: JSON.parse(JSON.stringify(this.paintPoints)), + Point: new PIXI.Point(0, 0), + Name: this.canvasData.selectTemplateData.name, + PropertyInfos: propertyList, + Border: this.canvasData.selectTemplateData.border, + DrawMode: this.canvasData.selectTemplateData.drawMode, + Thickness: this.canvasData.selectTemplateData.thickness, + IsFromBuilding: this.canvasData.selectTemplateData.isFromBuilding, + GameMode: this.canvasData.gameMode, + Tag: this.canvasData.selectTemplateData.tag + }; + if (this.canvasData.selectTemplateData.name === '距离') { + this.paintingShape = new AxArrowConnector(assetData2, this, true, true); + } else if (this.canvasData.selectTemplateData.name === '普通墙' || this.canvasData.selectTemplateData.name === '承重墙') { + this.paintingShape = new AxArrowConnector(assetData2, this, false, false); + } else if (this.canvasData.selectTemplateData.name === '水带') { + this.paintingShape = new AxArrowConnector(assetData2, this, false, true); } + } else { + this.paintingShape.assetData.MultiPoint = JSON.parse(JSON.stringify(this.paintPoints)); + this.paintingShape.redraw(); + } // } // this.emit('backgroundScale', this.backgroundImage.scale.x); - break; + break; } } // else if (this.isCtrlKeyClicked === true) { @@ -934,13 +938,13 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV }) .on('pointerover', (event) => { if (this.previewImage !== null - && this.paintMode === PaintMode.singlePointIcon) { + && this.paintMode === PaintMode.singlePointIcon) { this.previewImage.visible = true; } }) .on('pointerout', (event) => { if (this.previewImage !== null - && this.paintMode === PaintMode.singlePointIcon) { + && this.paintMode === PaintMode.singlePointIcon) { this.previewImage.visible = false; } }); @@ -974,26 +978,43 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV /** * 刷新背景图 */ - public async refreshBackgroundImage(imageUrl: string = this.canvasData.selectStorey.imageUrl, imageAngle: number = this.canvasData.selectStorey.imageAngle): Promise { + public async refreshBackgroundImage( + imageUrl: string = this.canvasData.selectStorey.imageUrl, + imageAngle: number = this.canvasData.selectStorey.imageAngle, + imageWidth: number = this.canvasData.selectStorey.imageWidth, + imageHeight: number = this.canvasData.selectStorey.imageHeight, + ): Promise { if (imageAngle === undefined || imageAngle === null) { imageAngle = 0; } this.backgroundImage.scale.set(1); + // this.backgroundImage.pivot.set(0); if (imageUrl === undefined || imageUrl === null || imageUrl === '') { this.backgroundImage.texture = this.backgroundTexture; } else { this.backgroundImage.texture = await PIXI.Texture.fromURL(imageUrl); } + + this.backgroundImage.angle = imageAngle; + + if (imageWidth !== undefined + && imageWidth !== null + && imageWidth !== 0 + && imageHeight !== undefined + && imageHeight !== null + && imageHeight !== 0) { + console.log(imageWidth, imageHeight); + this.backgroundImage.width = imageWidth; + this.backgroundImage.height = imageHeight; + } else { + this.backgroundImage.width = this.backgroundImage.texture.width; + this.backgroundImage.height = this.backgroundImage.texture.height; + } + this.backgroundImage.x = this.backgroundImage.width / 2; this.backgroundImage.y = this.backgroundImage.height / 2; - this.backgroundImage.angle = imageAngle; this.resetCamera2D(); - // this.backgroundImage.children.forEach((item) => { - // if (item instanceof AxShape) { - // item.refresh(); - // } - // }); } /** * 刷新 @@ -1007,7 +1028,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV const itemList = []; this.backgroundImage.children.forEach(item => { if (item instanceof AxShape && item instanceof AxPreviewImageShape === false) { - itemList.push(item.name); + itemList.push(item.name); } }); @@ -1037,7 +1058,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV const itemList = []; this.backgroundImage.children.forEach(item => { if (item instanceof AxShape && item instanceof AxPreviewImageShape === false) { - itemList.push(item.name); + itemList.push(item.name); } }); @@ -1077,17 +1098,17 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV GameMode: this.canvasData.gameMode, PropertyInfos: [ { - Tag : '', - Order : 0, - Enabled : true, - Visible : true, - Required : false, - RuleName : '', - RuleValue : '', - PhysicalUnit : '', - PropertyName : '列', - PropertyType : 2, - PropertyValue : 2, + Tag: '', + Order: 0, + Enabled: true, + Visible: true, + Required: false, + RuleName: '', + RuleValue: '', + PhysicalUnit: '', + PropertyName: '列', + PropertyType: 2, + PropertyValue: 2, }, ], Scale: 1, @@ -1102,10 +1123,10 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV } else { if (item !== '图例') { shapeMap.set(this.canvasData.originaleveryStoreyData.data[item].Name, new Legend( - this.canvasData.originaleveryStoreyData.data[item].Name, - this.canvasData.originaleveryStoreyData.data[item].ImageUrl, - 1 - )); + this.canvasData.originaleveryStoreyData.data[item].Name, + this.canvasData.originaleveryStoreyData.data[item].ImageUrl, + 1 + )); } else { data = this.canvasData.originaleveryStoreyData.data[item]; } @@ -1172,7 +1193,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.previewLineSegment.clear(); this.previewLineSegment.lineStyle(1 / this.backgroundImage.scale.x, 0x00ff00, 1); this.previewLineSegment.moveTo(pointA.x, pointA.y); - this.previewLineSegment.lineTo(pointB.x, pointB.y ); + this.previewLineSegment.lineTo(pointB.x, pointB.y); } /** * 创建半径图标影子 @@ -1249,7 +1270,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.previewImage.visible = false; } // 重置组件状态 - if ( this.paintingIcon !== undefined + if (this.paintingIcon !== undefined && this.paintingIcon !== null) { this.backgroundImage.removeChild(this.paintingIcon); } @@ -1333,9 +1354,9 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV } break; case PaintMode.Pipeline: - this.emit('createIcon', this.paintingShape); - this.paintingShape = null; - break; + this.emit('createIcon', this.paintingShape); + this.paintingShape = null; + break; } this.paintPoints.splice(0, this.paintPoints.length); } @@ -1343,11 +1364,11 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV * 复制 */ public copy(): void { - this.copyData = []; - this.selection.all().forEach(item => { - const newData = JSON.parse(JSON.stringify(item.assetData)); - this.copyData.push(newData); - }); + this.copyData = []; + this.selection.all().forEach(item => { + const newData = JSON.parse(JSON.stringify(item.assetData)); + this.copyData.push(newData); + }); } /** * 粘贴 @@ -1359,7 +1380,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV item.Point = new PIXI.Point(item.Point.x + 5, item.Point.y + 5); const newData = JSON.parse(JSON.stringify(item)); newData.Id = ObjectID.default.generate(), - newData.CompanyId = companyId; + newData.CompanyId = companyId; newData.BuildingId = buildingId; newData.FloorId = floorId; newData.Point = new PIXI.Point(item.Point.x + 5, item.Point.y + 5); @@ -1417,7 +1438,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV const itemList = []; this.backgroundImage.children.forEach(item => { if (item instanceof AxShape && item instanceof AxPreviewImageShape === false) { - itemList.push(item.name); + itemList.push(item.name); } }); @@ -1446,7 +1467,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV const itemList = []; this.backgroundImage.children.forEach(item => { if (item instanceof AxShape && item instanceof AxPreviewImageShape === false) { - itemList.push(item.name); + itemList.push(item.name); } }); @@ -1474,7 +1495,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV const itemList = []; this.backgroundImage.children.forEach(item => { if (item instanceof AxShape && item instanceof AxPreviewImageShape === false) { - itemList.push(item.name); + itemList.push(item.name); } }); @@ -1532,7 +1553,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.selection.addArray(shape); this.selection.all().forEach(item => { this.setSelectEffect(item); - }); + }); AxMessageSystem.send(EVENT_SELECTION_CHANGED); } } @@ -1549,7 +1570,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV } this.selection.addArray(shape); this.selection.all().forEach(item => { - this.setSelectEffect(item); + this.setSelectEffect(item); }); AxMessageSystem.send(EVENT_SELECTION_CHANGED); }