|
|
|
@ -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方法打开对话框并且携带参数过去
|
|
|
|
|