From fb8dcf45d95271072d403c355473e5f1ee9840b6 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Thu, 28 Jan 2021 14:50:55 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E9=87=87=E9=9B=86=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=A2=9E=E5=8A=A0=E5=85=B3=E9=97=AD=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fire-force/fire-force.component.html | 1 + .../fire-force/fire-force.component.scss | 6 ++- .../fire-force/fire-force.component.ts | 34 +++++++++--- .../linkage-forces.component.html | 1 + .../linkage-forces.component.scss | 6 ++- .../linkage-forces.component.ts | 33 ++++++++++-- .../water-collection.component.html | 1 + .../water-collection.component.scss | 5 +- .../water-collection.component.ts | 7 ++- .../meet-plan/meet-plan.component.ts | 54 +++++++++---------- src/styles.scss | 5 +- 11 files changed, 104 insertions(+), 49 deletions(-) diff --git a/src/app/data-collection/fire-force/fire-force.component.html b/src/app/data-collection/fire-force/fire-force.component.html index 90520a6..b421cd5 100644 --- a/src/app/data-collection/fire-force/fire-force.component.html +++ b/src/app/data-collection/fire-force/fire-force.component.html @@ -144,6 +144,7 @@ save保存 open_in_browser提交审核 + close关闭 diff --git a/src/app/data-collection/fire-force/fire-force.component.scss b/src/app/data-collection/fire-force/fire-force.component.scss index 2865ab8..ac52b20 100644 --- a/src/app/data-collection/fire-force/fire-force.component.scss +++ b/src/app/data-collection/fire-force/fire-force.component.scss @@ -339,7 +339,7 @@ cursor: pointer; color: #2196F3; mat-icon{ - vertical-align: text-top; + vertical-align: sub; font-size: 20px; width: 20px; height: 20px; @@ -351,7 +351,9 @@ .submitAudit{ margin: 0 30px; } - + .close{ + margin-right: 30px; + } } } .contant{ diff --git a/src/app/data-collection/fire-force/fire-force.component.ts b/src/app/data-collection/fire-force/fire-force.component.ts index 9764080..d9a0245 100644 --- a/src/app/data-collection/fire-force/fire-force.component.ts +++ b/src/app/data-collection/fire-force/fire-force.component.ts @@ -9,6 +9,7 @@ import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree' import { NzTreeNode } from 'ng-zorro-antd/tree'; import { TreeService } from 'src/app/http-interceptors/tree.service'; import Viewer from 'viewerjs' +import CryptoJS from 'crypto-js/crypto-js' declare var AMap: any; @Component({ @@ -678,7 +679,11 @@ export class FireForceComponent implements OnInit { } - + close(){ + this.selectedFireForceLevel = null + this.selectedFireForceId = null + this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null + } map:any placeSearch:any//构造地点查询类 isMapLabel:boolean = false //是否已经标记坐标 @@ -1002,10 +1007,9 @@ export class FireForceComponent implements OnInit { //点击文件 clickFile(item){ - console.log(item) + // console.log(item) let suffix = item.fileName.split('.')[item.fileName.split('.').length-1] if(suffix == 'png' || suffix == 'jpg' || suffix == 'JPG'){ - console.log('这是图片') let dom = document.getElementById(`viewerjs`) let pObjs = dom.childNodes; let node = document.createElement("img") @@ -1024,10 +1028,26 @@ export class FireForceComponent implements OnInit { }, 0); } if(suffix == 'docx' || suffix == 'doc' || suffix == 'pdf'){ - let config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('暂不支持查看','确定',config); + let fetchUrl = item.objectName + let json={ + doc: { + docId: new Date(), + title: item.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); + window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) } if(suffix == 'mp4'){ const dialogRef = this.dialog.open(ViewDetails, {//调用open方法打开对话框并且携带参数过去 diff --git a/src/app/data-collection/linkage-forces/linkage-forces.component.html b/src/app/data-collection/linkage-forces/linkage-forces.component.html index 632b6a9..339d4a4 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.html +++ b/src/app/data-collection/linkage-forces/linkage-forces.component.html @@ -119,6 +119,7 @@ save保存 open_in_browser提交审核 + close关闭 diff --git a/src/app/data-collection/linkage-forces/linkage-forces.component.scss b/src/app/data-collection/linkage-forces/linkage-forces.component.scss index 355c8ae..3449db9 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.scss +++ b/src/app/data-collection/linkage-forces/linkage-forces.component.scss @@ -302,7 +302,7 @@ cursor: pointer; color: #2196F3; mat-icon{ - vertical-align: text-top; + vertical-align: sub; font-size: 20px; width: 20px; height: 20px; @@ -314,7 +314,9 @@ .submitAudit{ margin: 0 30px; } - + .close{ + margin-right: 30px; + } } } .contant{ diff --git a/src/app/data-collection/linkage-forces/linkage-forces.component.ts b/src/app/data-collection/linkage-forces/linkage-forces.component.ts index e130b0a..39dc785 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.ts +++ b/src/app/data-collection/linkage-forces/linkage-forces.component.ts @@ -10,6 +10,7 @@ import { NzTreeNode } from 'ng-zorro-antd/tree'; import { TreeService } from 'src/app/http-interceptors/tree.service'; import Viewer from 'viewerjs' import Swiper from 'swiper'; +import CryptoJS from 'crypto-js/crypto-js' declare var AMap: any; @Component({ selector: 'app-linkage-forces', @@ -446,7 +447,13 @@ export class LinkageForcesComponent implements OnInit { } - + //关闭 + close(){ + this.LinkageForceDetailInfo={} + // this.LinkageForceDetailInfo.id = null + console.log(this.LinkageForceDetailInfo) + this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null + } map:any placeSearch:any//构造地点查询类 isMapLabel:boolean = false //是否已经标记坐标 @@ -792,10 +799,26 @@ export class LinkageForcesComponent implements OnInit { }, 0); } if(suffix == 'docx' || suffix == 'doc' || suffix == 'pdf'){ - let config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('暂不支持查看','确定',config); + let fetchUrl = item.objectName + let json={ + doc: { + docId: new Date(), + title: item.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); + window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) } if(suffix == 'mp4'){ const dialogRef = this.dialog.open(ViewDetails2, {//调用open方法打开对话框并且携带参数过去 diff --git a/src/app/data-collection/water-collection/water-collection.component.html b/src/app/data-collection/water-collection/water-collection.component.html index 763a772..0d5405e 100644 --- a/src/app/data-collection/water-collection/water-collection.component.html +++ b/src/app/data-collection/water-collection/water-collection.component.html @@ -81,6 +81,7 @@
save保存 open_in_browser提交审核 + close关闭
diff --git a/src/app/data-collection/water-collection/water-collection.component.scss b/src/app/data-collection/water-collection/water-collection.component.scss index c0707dd..be9e19f 100644 --- a/src/app/data-collection/water-collection/water-collection.component.scss +++ b/src/app/data-collection/water-collection/water-collection.component.scss @@ -246,7 +246,7 @@ cursor: pointer; color: #2196F3; mat-icon{ - vertical-align: text-top; + vertical-align: sub; font-size: 20px; width: 20px; height: 20px; @@ -258,6 +258,9 @@ .submitAudit{ margin: 0 30px; } + .close{ + margin-right: 30px; + } } } .contant{ diff --git a/src/app/data-collection/water-collection/water-collection.component.ts b/src/app/data-collection/water-collection/water-collection.component.ts index 153eba2..6dc648d 100644 --- a/src/app/data-collection/water-collection/water-collection.component.ts +++ b/src/app/data-collection/water-collection/water-collection.component.ts @@ -434,7 +434,12 @@ export class WaterCollectionComponent implements OnInit { } } - + //关闭 + close(){ + this.selectedWaterTypeIndex = null + this.selectedLiIndex = null + this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null + } map:any placeSearch:any//构造地点查询类 isMapLabel:boolean = false //是否已经标记坐标 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 f15cea0..286cc16 100644 --- a/src/app/plan-management/meet-plan/meet-plan.component.ts +++ b/src/app/plan-management/meet-plan/meet-plan.component.ts @@ -170,36 +170,30 @@ export class MeetPlanComponent implements OnInit { //查看预案 openPlan(element){ let filename:string - let fetchUrl=element.attachmentUrls[0] - this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{ - filename=data.fileName - let json={ - doc: { - docId: element.id, - title: filename, - //title: filename, - fetchUrl: "http://39.106.78.171:8000/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); - - //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}`) - }) - - + let fetchUrl = element.attachmentUrls[0] + this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{ + filename=data.fileName + let json={ + doc: { + docId: element.id, + title: filename, + //title: filename, + fetchUrl: "http://39.106.78.171:8000/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); + window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) + }) } //下载↓ diff --git a/src/styles.scss b/src/styles.scss index 6e9b18a..f69d5a0 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -13,7 +13,10 @@ html,body{ margin:0 auto; padding:0; overflow: hidden; - font-family: Regular + font-family: Regular; + textarea{ + font-family: Regular + } } ul,ol,dl,li,dt,dd,p,form,input,h1,h2,h3,h4,h5,h6,section,article,aside,header,footer,nav,figure,time,mark,main,canvas{ margin:0;