Browse Source

[完善]采集页面增加关闭按钮

zhuzhou
邵佳豪 4 years ago
parent
commit
fb8dcf45d9
  1. 1
      src/app/data-collection/fire-force/fire-force.component.html
  2. 6
      src/app/data-collection/fire-force/fire-force.component.scss
  3. 34
      src/app/data-collection/fire-force/fire-force.component.ts
  4. 1
      src/app/data-collection/linkage-forces/linkage-forces.component.html
  5. 6
      src/app/data-collection/linkage-forces/linkage-forces.component.scss
  6. 33
      src/app/data-collection/linkage-forces/linkage-forces.component.ts
  7. 1
      src/app/data-collection/water-collection/water-collection.component.html
  8. 5
      src/app/data-collection/water-collection/water-collection.component.scss
  9. 7
      src/app/data-collection/water-collection/water-collection.component.ts
  10. 54
      src/app/plan-management/meet-plan/meet-plan.component.ts
  11. 5
      src/styles.scss

1
src/app/data-collection/fire-force/fire-force.component.html

@ -144,6 +144,7 @@
<span class="save" (click)="save()"><mat-icon>save</mat-icon>保存</span>
<span class="submitAudit"><mat-icon>open_in_browser</mat-icon>提交审核</span>
<span class="close" (click)="close()"><mat-icon>close</mat-icon>关闭</span>
</div>
</div>
<!-- 详情 -->

6
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{

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

1
src/app/data-collection/linkage-forces/linkage-forces.component.html

@ -119,6 +119,7 @@
<span class="save" (click)="save()"><mat-icon>save</mat-icon>保存</span>
<span class="submitAudit"><mat-icon>open_in_browser</mat-icon>提交审核</span>
<span class="close" (click)="close()"><mat-icon>close</mat-icon>关闭</span>
</div>
</div>
<!-- 详情 -->

6
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{

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

1
src/app/data-collection/water-collection/water-collection.component.html

@ -81,6 +81,7 @@
<div class="btnbox">
<span class="save" (click)="save()"><mat-icon>save</mat-icon>保存</span>
<span class="submitAudit"><mat-icon>open_in_browser</mat-icon>提交审核</span>
<span class="close" (click)="close()"><mat-icon>close</mat-icon>关闭</span>
</div>
</div>
<div class="contant" >

5
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{

7
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 //是否已经标记坐标

54
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}`)
})
}
//下载↓

5
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;

Loading…
Cancel
Save