陈鹏飞 4 years ago
parent
commit
c702024500
  1. 27
      src/app/key-unit/basicinfo/basicinfo.component.html
  2. 81
      src/app/key-unit/basicinfo/basicinfo.component.scss
  3. 28
      src/app/key-unit/basicinfo/basicinfo.component.ts
  4. 8
      src/app/key-unit/fire-fighting-device/fire-fighting-device.component.html
  5. 20
      src/app/key-unit/fire-fighting-device/fire-fighting-device.component.scss
  6. 6
      src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts
  7. 4
      src/app/key-unit/fire-fighting-device/imagesdata.component.html
  8. 20
      src/app/key-unit/fire-fighting-device/imagesdata.component.ts
  9. 28
      src/app/key-unit/fire-fighting-device/previewImg.html
  10. 19
      src/app/key-unit/key-site/key-site.component.html
  11. 19
      src/app/key-unit/key-site/key-site.component.scss
  12. 13
      src/app/key-unit/key-site/key-site.component.ts
  13. 31
      src/app/key-unit/key-site/keysiteimgs.component.html
  14. 5
      src/app/ui/add-six-familiar/add-six-familiar.component.scss
  15. 6
      src/app/ui/collection-tools/collection-tools.component.html
  16. 2
      src/app/ui/home/home.component.ts
  17. 23
      src/app/ui/know-route/know-route.component.html
  18. 75
      src/app/ui/know-route/know-route.component.scss
  19. 82
      src/app/ui/know-route/know-route.component.ts
  20. 2
      src/app/ui/photoofthescene/photoofthescene.component.html
  21. 3
      src/app/ui/photoofthescene/photoofthescene.component.scss
  22. 8
      src/app/ui/photoofthescene/photoofthescene.component.ts
  23. 1
      src/app/ui/water-road/water-road.component.scss
  24. 1
      src/app/ui/water-road/water-road.component.ts
  25. 2
      src/styles.scss

27
src/app/key-unit/basicinfo/basicinfo.component.html

@ -2,10 +2,10 @@
<!-- header --> <!-- header -->
<mat-accordion> <mat-accordion>
<mat-expansion-panel expanded hideToggle > <mat-expansion-panel expanded hideToggle >
<mat-expansion-panel-header style="color: black;"> <mat-expansion-panel-header style="color: black;position: relative;" >
<mat-panel-title> <mat-panel-title>
单位信息 单位信息
<mat-icon style="position: absolute;right:30px;">keyboard_arrow_down</mat-icon> <mat-icon class="topicon">keyboard_arrow_down</mat-icon>
</mat-panel-title> </mat-panel-title>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<div class="topbox"> <div class="topbox">
@ -64,10 +64,10 @@
</div> </div>
</div> </div>
</div> </div>
<div class="inputbox" style="width: 700px;"> <div class="inputbox longlonginput">
<span style="color: red;">*</span> <span style="color: red;">*</span>
<span>辖区中队:</span> <span>辖区中队:</span>
<mat-form-field style="width: 538px;"> <mat-form-field class="longinput">
<input matInput id="organization" name="organization" type='text' <input matInput id="organization" name="organization" type='text'
required minlength="1" required minlength="1"
[(ngModel)]="selectedorganization" [(ngModel)]="selectedorganization"
@ -95,10 +95,10 @@
</mat-tree-node> </mat-tree-node>
</mat-tree> </mat-tree>
</div> </div>
<div class="inputbox" style="width: 700px;"> <div class="inputbox longlonginput">
<span style="color: red;">*</span> <span style="color: red;">*</span>
<span>单位地址:</span> <span>单位地址:</span>
<mat-form-field style="width: 538px;"> <mat-form-field class="longinput">
<input matInput id="unitaddress" name="unitaddress" type='text' <input matInput id="unitaddress" name="unitaddress" type='text'
required minlength="1" required minlength="1"
[(ngModel)]="unitinfo.address" [(ngModel)]="unitinfo.address"
@ -107,8 +107,8 @@
</div> </div>
<div class="uploadimg" (click)="lookmaster()"> <div class="uploadimg" (click)="lookmaster()">
<span>单位照片:</span> <span>单位照片:</span>
<div class="uploadingimg"> <div class="uploadingimg" id="viewerjs">
<img [src]="imgsrc" alt="" style="width: 299px; height: 170px;" > <img [src]="imgsrc" alt="" [attr.data-original]="imgsrc.split('?')[0]">
</div> </div>
<mat-spinner *ngIf="isspinner" diameter= 50></mat-spinner> <mat-spinner *ngIf="isspinner" diameter= 50></mat-spinner>
</div> </div>
@ -119,9 +119,6 @@
<button *ngIf="pattern" type="submit" color="primary" class="submit1" mat-button mat-raised-button>保存</button> <button *ngIf="pattern" type="submit" color="primary" class="submit1" mat-button mat-raised-button>保存</button>
</div> </div>
</div> </div>
<!-- <div class="mainright" (click)="closeorganizationbox()"> -->
<!-- 地图预留位置 -->
<!-- </div> -->
</div> </div>
</form> </form>
</div> </div>
@ -160,7 +157,7 @@
<div *ngFor="let item of item.buildingBasicGroups;let www = index" style="float: left;"> <div *ngFor="let item of item.buildingBasicGroups;let www = index" style="float: left;">
<h1 style="font-size: 22px;">{{item.name}}</h1> <h1 style="font-size: 22px;">{{item.name}}</h1>
<div class="houseinfoinput" *ngFor="let i of item.propertyInfos" style="float: left;margin-left: 250px;position: relative;"> <div class="houseinfoinput" *ngFor="let i of item.propertyInfos" style="float: left;position: relative;">
<span>{{i.propertyName}}<span *ngIf="i.physicalUnit">({{i.physicalUnit}})</span></span> <span>{{i.propertyName}}<span *ngIf="i.physicalUnit">({{i.physicalUnit}})</span></span>
<!-- 如果类型是文本 --> <!-- 如果类型是文本 -->
@ -201,7 +198,7 @@
<div *ngIf="item.isCustomData" style="position: relative;"> <div *ngIf="item.isCustomData" style="position: relative;">
<button *ngIf="pattern" style="position: absolute;left: 0;" type="button" mat-icon-button (click)="addCustomData(item)" class="addCustomData"><mat-icon style="font-size: 38px;">add_circle_outline</mat-icon></button> <button *ngIf="pattern" style="position: absolute;left: 0;" type="button" mat-icon-button (click)="addCustomData(item)" class="addCustomData"><mat-icon style="font-size: 38px;">add_circle_outline</mat-icon></button>
<button *ngIf="pattern" style="position: absolute;left:60px;" type="button" mat-icon-button (click)="deleteCustomData(item)" class="deleteCustomData"><mat-icon style="font-size: 38px;">remove_circle_outline</mat-icon></button> <button *ngIf="pattern" style="position: absolute;left:60px;" type="button" mat-icon-button (click)="deleteCustomData(item)" class="deleteCustomData"><mat-icon style="font-size: 38px;">remove_circle_outline</mat-icon></button>
<div class="houseinfoinput" style="float: left;margin-left: 250px;" *ngFor="let i of item.buildingCustomData.customProperties;let key = index"> <div class="houseinfoinput" style="float: left;" *ngFor="let i of item.buildingCustomData.customProperties;let key = index">
<mat-form-field> <mat-form-field>
<input matInput type='text' name="{{key}}1CustomData" <input matInput type='text' name="{{key}}1CustomData"
required required
@ -241,7 +238,7 @@
<span style="color: red;">*</span> <span style="color: red;">*</span>
</div> </div>
<h1 style="font-size: 22px;">{{item.buildingBasicGroups[0].name}}</h1> <h1 style="font-size: 22px;">{{item.buildingBasicGroups[0].name}}</h1>
<div class="houseinfoinput" *ngFor="let i of item.buildingBasicGroups[0].propertyInfos;let smkey = index" style="float: left;margin-left: 250px;position: relative;"> <div class="houseinfoinput" *ngFor="let i of item.buildingBasicGroups[0].propertyInfos;let smkey = index" style="float: left;position: relative;">
<span>{{i.propertyName}} <span *ngIf="i.physicalUnit">({{i.physicalUnit}})</span></span> <span>{{i.propertyName}} <span *ngIf="i.physicalUnit">({{i.physicalUnit}})</span></span>
@ -486,7 +483,7 @@
<div *ngIf="item.isCustomData" style="position: relative;"> <div *ngIf="item.isCustomData" style="position: relative;">
<button *ngIf="pattern" style="position: absolute;left: 0;font-size: 11px;" type="button" mat-icon-button (click)="addCustomData(item)" class="addCustomData"><mat-icon style="font-size: 38px;">add_circle_outline</mat-icon></button> <button *ngIf="pattern" style="position: absolute;left: 0;font-size: 11px;" type="button" mat-icon-button (click)="addCustomData(item)" class="addCustomData"><mat-icon style="font-size: 38px;">add_circle_outline</mat-icon></button>
<button *ngIf="pattern" style="position: absolute;left:60px;" type="button" mat-icon-button (click)="deleteCustomData(item)" class="deleteCustomData"><mat-icon style="font-size: 38px;">remove_circle_outline</mat-icon></button> <button *ngIf="pattern" style="position: absolute;left:60px;" type="button" mat-icon-button (click)="deleteCustomData(item)" class="deleteCustomData"><mat-icon style="font-size: 38px;">remove_circle_outline</mat-icon></button>
<div class="houseinfoinput" style="float: left;margin-left: 250px;" *ngFor="let i of item.buildingCustomData.customProperties;let key = index"> <div class="houseinfoinput" style="float: left;" *ngFor="let i of item.buildingCustomData.customProperties;let key = index">
<mat-form-field> <mat-form-field>
<input matInput type='text' name="{{key}}1CustomData" <input matInput type='text' name="{{key}}1CustomData"
required required

81
src/app/key-unit/basicinfo/basicinfo.component.scss

@ -1,29 +1,39 @@
.topicon{
position: absolute;
right: 0.097656rem;
}
.topbox{ .topbox{
height: 485px; height: 4.882813rem;
width: 100%; width: 100%;
// border-bottom: 1px solid black; overflow: auto;
.mainbox{ .mainbox{
height: 100%; height: 100%;
position: relative; position: relative;
.mainleft{ .mainleft{
width:800px; width:7.8125rem;
height: 100%; height: 100%;
// background-color: yellow;
float: left; float: left;
.inputbox{ .inputbox{
width: 343px; width: 3.349609rem;
height: 58px; height: 0.566406rem;
margin:2px 6px; margin:2px 6px;
float: left; float: left;
text-align: end; text-align: end;
} }
.longlonginput{
width: 6.835938rem;
}
.longinput{
width: 5.253906rem;
}
.organizationbox{ .organizationbox{
width:538px; width:5.253906rem;
height: 200px; height: 1.953125rem;
background: white; background: white;
position: absolute; position: absolute;
top: 164px; top: 1.601563rem;
left:166px; left: 1.621094rem;
z-index: 100; z-index: 100;
border: 1px solid grey; border: 1px solid grey;
overflow: auto; overflow: auto;
@ -39,67 +49,47 @@
} }
} }
.addbtn{ .addbtn{
width: 695px; width: 6.787109rem;
position: absolute; position: absolute;
bottom: -495px;
text-align: center; text-align: center;
margin-bottom:20px;
button{ button{
margin: 0 4px; margin: 0 4px;
} }
} }
.uploadimg{ .uploadimg{
width: 400px; width: 3.90625rem;
height: 200px; height: 1.953125rem;
float: left; float: left;
margin-top:12px; margin-top:12px;
position: relative; position: relative;
margin-left: 80px; margin-left: 0.78125rem;
cursor: pointer; cursor: pointer;
span{ span{
float: left; float: left;
} }
// img{
// float: left;
// }
.uploadingimg{ .uploadingimg{
width: 299px; width: 2.919922rem;
height: 170px; height: 1.660156rem;
// background: url('../../../assets/images/upload2.png') no-repeat center center;
position: absolute; position: absolute;
top: 0px; top: 0px;
left: 79px; left: 0.771484rem;
border: 1px dashed gray; border: 1px dashed gray;
border-radius:3px; border-radius:3px;
img{
width: 2.919922rem;
height: 1.660156rem;
}
} }
} }
.image{ .image{
// position: absolute;
// top: 199px;
// left: 160px;
// width: 299px;
// height: 170px;
input{ input{
// width: 299px; width: 1.855469rem;
// height: 170px; margin-top: 1.5625rem;
width: 190px;
margin-top: 160px;
cursor: pointer; cursor: pointer;
} }
// opacity:0;
} }
} }
.mainright{
float: left;
width: 600px;
height: 400px;
// position: absolute;
// right: 170px;
}
} }
} }
.bottombox{ .bottombox{
@ -145,10 +135,11 @@
margin-left: 180px; margin-left: 180px;
} }
.houseinfoinput{ .houseinfoinput{
width: 393px; width: 4.937891rem;
text-align: end; text-align: end;
margin-left:240px; margin-left:1.953125rem;
} }
} }
} }

28
src/app/key-unit/basicinfo/basicinfo.component.ts

@ -20,7 +20,7 @@ import * as _ from 'lodash';
// import Swiper from 'swiper'; // import Swiper from 'swiper';
import { LookMaster } from './lookmaster.component' import { LookMaster } from './lookmaster.component'
import { Router,ActivatedRoute } from '@angular/router' import { Router,ActivatedRoute } from '@angular/router'
import Viewer from 'viewerjs';
@Component({ @Component({
selector: 'app-basicinfo', selector: 'app-basicinfo',
templateUrl: './basicinfo.component.html', templateUrl: './basicinfo.component.html',
@ -89,7 +89,15 @@ export class BasicinfoComponent implements OnInit {
pattern:any pattern:any
unitId : any //当前单位id unitId : any //当前单位id
gallery
ngOnInit(): void { ngOnInit(): void {
setTimeout(() => {
if(document.getElementById('viewerjs')){
this.gallery = new Viewer(document.getElementById('viewerjs'),{
url: 'data-original'
});
}
}, 0);
if(localStorage.getItem("pattern") == "edit"){ if(localStorage.getItem("pattern") == "edit"){
this.pattern = true this.pattern = true
}else if(localStorage.getItem("pattern") == "look"){ }else if(localStorage.getItem("pattern") == "look"){
@ -869,14 +877,14 @@ export class BasicinfoComponent implements OnInit {
} }
//查看单位大图 //查看单位大图
lookmaster(){ lookmaster(){
const dialogRef = this.dialog.open(LookMaster, {//调用open方法打开对话框并且携带参数过去 // const dialogRef = this.dialog.open(LookMaster, {//调用open方法打开对话框并且携带参数过去
width: '800px', // width: '800px',
height:'640px', // height:'640px',
data: {img:this.imgsrc} // data: {img:this.imgsrc}
}); // });
dialogRef.afterClosed().subscribe( // dialogRef.afterClosed().subscribe(
); // );
} }
//上传文件 //上传文件
startUploading() { startUploading() {
@ -897,6 +905,7 @@ export class BasicinfoComponent implements OnInit {
config.verticalPosition = 'top'; config.verticalPosition = 'top';
config.duration = 3000 config.duration = 3000
this.snackBar.open('上传成功','确定',config); this.snackBar.open('上传成功','确定',config);
this.gallery.update()
}) })
} else if (file && fileSize >= shardSize) { //上传文件>5MB时,分块上传 } else if (file && fileSize >= shardSize) { //上传文件>5MB时,分块上传
@ -980,6 +989,7 @@ export class BasicinfoComponent implements OnInit {
this.isspinner = false this.isspinner = false
this.PartNumberETag = [] this.PartNumberETag = []
this.uploader.clearQueue(); //清空input控件文件 this.uploader.clearQueue(); //清空input控件文件
this.gallery.update()
}) })
} }
//删除具体建筑 //删除具体建筑

8
src/app/key-unit/fire-fighting-device/fire-fighting-device.component.html

@ -5,7 +5,7 @@
<p style="width: 100%; margin: 30px auto; text-align: center;font-size: 16px;" *ngIf="!companyBuiltInGrouping.length">暂无数据,请完善单位基本信息</p> <p style="width: 100%; margin: 30px auto; text-align: center;font-size: 16px;" *ngIf="!companyBuiltInGrouping.length">暂无数据,请完善单位基本信息</p>
<div style="width: 100%;margin-top: 25px;" *ngFor="let item of companyBuiltInGrouping;let key = index"> <div style="width: 100%;margin-top: 25px;" *ngFor="let item of companyBuiltInGrouping;let key = index">
<h3 style="text-align: center;font-weight: 550;">{{item.name}}</h3> <h3 class="titlename" style="text-align: center;font-weight: 550;">{{item.name}}</h3>
<div style="margin-bottom: 10px;" *ngIf="isEditPattern"> <div style="margin-bottom: 10px;" *ngIf="isEditPattern">
<mat-icon title="创建" (click)='addCompanyGrouping(item)'>add_circle_outline</mat-icon> <mat-icon title="创建" (click)='addCompanyGrouping(item)'>add_circle_outline</mat-icon>
<mat-icon title="保存" style="margin-left: 25px;" (click)='editCompanyGrouping(item)'>description</mat-icon> <mat-icon title="保存" style="margin-left: 25px;" (click)='editCompanyGrouping(item)'>description</mat-icon>
@ -73,7 +73,7 @@
<mat-expansion-panel> <mat-expansion-panel>
<mat-expansion-panel-header> <mat-expansion-panel-header>
<h3 style="text-align: center;font-weight: 550;">{{item.name}}</h3> <h3 class="titlename" style="text-align: center;font-weight: 550;">{{item.name}}</h3>
<mat-icon *ngIf="isEditPattern" title="保存" style="margin-left: 25px;" (click)='editCompanyOptional($event,item)'>description</mat-icon> <mat-icon *ngIf="isEditPattern" title="保存" style="margin-left: 25px;" (click)='editCompanyOptional($event,item)'>description</mat-icon>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<div *ngFor="let items of item.propertyInfos" class="InputField"> <div *ngFor="let items of item.propertyInfos" class="InputField">
@ -99,7 +99,7 @@
<div class="contentBox"> <div class="contentBox">
<div style="width: 100%;margin-top: 25px;" *ngFor="let item of newItem.buildingFacilityGroups"> <div style="width: 100%;margin-top: 25px;" *ngFor="let item of newItem.buildingFacilityGroups">
<h3 style="text-align: center;font-weight: 550;">{{item.name}}</h3> <h3 class="titlename" style="text-align: center;font-weight: 550;">{{item.name}}</h3>
<div style="margin-bottom: 10px;" *ngIf="isEditPattern"> <div style="margin-bottom: 10px;" *ngIf="isEditPattern">
<mat-icon title="创建" (click)='addBuildingGrouping(newItem,item)'>add_circle_outline</mat-icon> <mat-icon title="创建" (click)='addBuildingGrouping(newItem,item)'>add_circle_outline</mat-icon>
<mat-icon title="保存" style="margin-left: 25px;" (click)='editBuildingGrouping(newItem,item)'>description</mat-icon> <mat-icon title="保存" style="margin-left: 25px;" (click)='editBuildingGrouping(newItem,item)'>description</mat-icon>
@ -167,7 +167,7 @@
<mat-expansion-panel> <mat-expansion-panel>
<mat-expansion-panel-header> <mat-expansion-panel-header>
<h3 style="text-align: center;font-weight: 550;">{{item.name}}</h3> <h3 class="titlename" style="text-align: center;font-weight: 550;">{{item.name}}</h3>
<mat-icon *ngIf="isEditPattern" title="保存" style="margin-left: 25px;" (click)='editBuildingOptional($event,item)'>description</mat-icon> <mat-icon *ngIf="isEditPattern" title="保存" style="margin-left: 25px;" (click)='editBuildingOptional($event,item)'>description</mat-icon>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<div *ngFor="let items of item.propertyInfos" class="InputField"> <div *ngFor="let items of item.propertyInfos" class="InputField">

20
src/app/key-unit/fire-fighting-device/fire-fighting-device.component.scss

@ -14,7 +14,9 @@
color: black; color: black;
cursor:pointer; cursor:pointer;
} }
.titlename{
font-size: 0.175781rem;
}
//可展开面板每一行css //可展开面板每一行css
@ -118,9 +120,9 @@ textarea {
//img图片列表页面 //img图片列表页面
.imageList { .imageList {
width: 100%; width: 7.617188rem;
height: 100%; height: 5.859375rem;
overflow-y: auto; // overflow-y: auto;
.imageListBox { .imageListBox {
width: 100%; width: 100%;
height: 90%; height: 90%;
@ -128,8 +130,8 @@ textarea {
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
.imagesBox { .imagesBox {
width: 300px; width: 2.929688rem;
height: 200px; height: 1.953125rem;
margin: 0 11px 0 11px; margin: 0 11px 0 11px;
display: inline-block; display: inline-block;
img { img {
@ -137,9 +139,13 @@ textarea {
width: auto; width: auto;
height: auto; height: auto;
max-width: 100%; max-width: 100%;
height: 170px; height: 1.660156rem;
cursor:pointer; cursor:pointer;
} }
} }
} }
} }
.imgdetailstwo{
width: 7.617188rem;
height: 5.859375rem;
}

6
src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts

@ -447,7 +447,7 @@ export class FireFightingDeviceComponent implements OnInit {
}); //newDate }); //newDate
if (data.images.length) { if (data.images.length) {
let dialogRef = this.dialog.open(ImagesData,{width:'1350px',height:'700px',data}); //打开图片弹窗 let dialogRef = this.dialog.open(ImagesData,{data}); //打开图片弹窗
} else { } else {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
@ -473,7 +473,7 @@ export class FireFightingDeviceComponent implements OnInit {
data.images.push(elements)} }); data.images.push(elements)} });
}); });
if (data.images.length) { if (data.images.length) {
let dialogRef = this.dialog.open(ImagesData,{width:'1350px',height:'700px',data}); //打开图片弹窗 let dialogRef = this.dialog.open(ImagesData,{data}); //打开图片弹窗
} else { } else {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
@ -535,7 +535,7 @@ export class FireFightingDeviceComponent implements OnInit {
}); });
}); });
if (data.images.length) { if (data.images.length) {
let dialogRef = this.dialog.open(ImagesData,{width:'1350px',height:'700px',data}); //打开图片弹窗 let dialogRef = this.dialog.open(ImagesData,{data}); //打开图片弹窗
} else { } else {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';

4
src/app/key-unit/fire-fighting-device/imagesdata.component.html

@ -1,8 +1,8 @@
<div class="imageList"> <div class="imageList">
<div mat-dialog-title *ngIf="data">{{data.name}}</div> <div mat-dialog-title *ngIf="data">{{data.name}}</div>
<div class="imageListBox"> <div class="imageListBox" id="viewerjs">
<div class="imagesBox" *ngFor="let item of data.images;let key = index"> <div class="imagesBox" *ngFor="let item of data.images;let key = index">
<img [src]='item.newImageUrl' (click)='seeImage(key)'> <img [src]='item.newImageUrl' [attr.data-original]="item.newImageUrl.split('?')[0]" (click)='seeImage(key)'>
<label style="display: inline-block;width: 100%;text-align: center;">{{item.propertyName}}</label> <label style="display: inline-block;width: 100%;text-align: center;">{{item.propertyName}}</label>
</div> </div>
</div> </div>

20
src/app/key-unit/fire-fighting-device/imagesdata.component.ts

@ -2,7 +2,7 @@ import { Component, OnInit, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog'; import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import Swiper from 'swiper'; import Swiper from 'swiper';
import Viewer from 'viewerjs';
@Component({ @Component({
@ -13,21 +13,25 @@ import Swiper from 'swiper';
export class ImagesData { export class ImagesData {
constructor(private http: HttpClient,public dialogRef: MatDialogRef<ImagesData>,@Inject(MAT_DIALOG_DATA) public data,public dialog: MatDialog) {} constructor(private http: HttpClient,public dialogRef: MatDialogRef<ImagesData>,@Inject(MAT_DIALOG_DATA) public data,public dialog: MatDialog) {}
gallery
ngOnInit(): void { ngOnInit(): void {
this.data.images.forEach(element => { this.data.images.forEach(element => {
element.newImageUrl = `${element.propertyValue}?x-oss-process=image/resize,m_fill,h_170,w_299` element.newImageUrl = `${element.propertyValue}?x-oss-process=image/resize,m_fill,h_170,w_299`
}); });
setTimeout(() => {
this.gallery = new Viewer(document.getElementById('viewerjs'),{
url: 'data-original'
});
}, 0);
} }
//查看大图 //查看大图
seeImage (index) { seeImage (index) {
let data = { // let data = {
allImages:this.data.images, // allImages:this.data.images,
imgIndex: index} // imgIndex: index}
let dialogRef = this.dialog.open(previewBigImg, // let dialogRef = this.dialog.open(previewBigImg,
{width: '1600px', // {data});
height:'900px',data});
} }
} }

28
src/app/key-unit/fire-fighting-device/previewImg.html

@ -1,17 +1,19 @@
<div mat-dialog-title>图片详情</div> <div class="imgdetailstwo">
<div class="swiper-container"> <div mat-dialog-title>图片详情</div>
<div class="swiper-wrapper"> <div class="swiper-container">
<div class="swiper-slide previewImgBox" *ngFor="let item of allImages"> <div class="swiper-wrapper">
<img [attr.data-src]="item.previewImageUrl" class="swiper-lazy" [ngClass]="{'rotateA':rotationAngle==90,'rotateB':rotationAngle==180,'rotateC':rotationAngle==270}"> <div class="swiper-slide previewImgBox" *ngFor="let item of allImages">
<div class="swiper-lazy-preloader"></div> <img [attr.data-src]="item.previewImageUrl" class="swiper-lazy" [ngClass]="{'rotateA':rotationAngle==90,'rotateB':rotationAngle==180,'rotateC':rotationAngle==270}">
<div class="swiper-lazy-preloader"></div>
</div>
</div> </div>
</div>
<!-- 如果需要导航按钮 --> <!-- 如果需要导航按钮 -->
<div class="swiper-button-prev"></div> <div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div> <div class="swiper-button-next"></div>
</div> </div>
<div class="previewImgBottom"> <div class="previewImgBottom">
<button type="button" mat-icon-button (click)='rotate()'><mat-icon>refresh</mat-icon></button> <button type="button" mat-icon-button (click)='rotate()'><mat-icon>refresh</mat-icon></button>
</div>
</div> </div>

19
src/app/key-unit/key-site/key-site.component.html

@ -45,10 +45,10 @@
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table> </table>
<p style="text-align: center;font-size: 20px;" *ngIf="!allCompanyPosition.length">暂无数据,请前往平面图进行相关数据录入</p> <p style="text-align: center;font-size: 18px;" *ngIf="!allCompanyPosition.length">暂无数据,请前往平面图进行相关数据录入</p>
</div> </div>
<div style="margin-top: 25px; text-align: left;"> <div style="margin-top: 25px; text-align: left;">
<h3 style="text-align: center;font-weight: 550;font-size: 20px;">重点提示</h3> <h3 style="text-align: center;font-weight: 550;font-size: 18px;">重点提示</h3>
<mat-icon *ngIf="isEditPattern" title="保存" style="margin-left: 11%; cursor: pointer;" (click)='Preservation()'>description</mat-icon> <mat-icon *ngIf="isEditPattern" title="保存" style="margin-left: 11%; cursor: pointer;" (click)='Preservation()'>description</mat-icon>
<p class="tips"> <p class="tips">
<textarea [disabled]="!isEditPattern" [(ngModel)]="companyInput" maxlength="5000"></textarea> <textarea [disabled]="!isEditPattern" [(ngModel)]="companyInput" maxlength="5000"></textarea>
@ -58,11 +58,11 @@
</div> </div>
</mat-tab> </mat-tab>
<mat-tab label="{{item.name}}" *ngFor="let item of allBuilding"> <mat-tab label="{{item.name}}" *ngFor="let item of allBuilding;let key = index">
<div class="contentBox"> <div class="contentBox">
<div style="margin-top: 25px;"> <div style="margin-top: 25px;">
<h3 style="text-align: center;font-weight: 550;font-size: 20px;">重点部位情况</h3> <h3 style="text-align: center;font-weight: 550;font-size: 18px;">重点部位情况</h3>
<table mat-table [dataSource]="item.position"> <table mat-table [dataSource]="item.position">
<ng-container matColumnDef="mainname"> <ng-container matColumnDef="mainname">
<th mat-header-cell *matHeaderCellDef>重点部位名称</th> <th mat-header-cell *matHeaderCellDef>重点部位名称</th>
@ -96,17 +96,20 @@
</ng-container> </ng-container>
<ng-container matColumnDef="img"> <ng-container matColumnDef="img">
<th mat-header-cell *matHeaderCellDef>图片</th> <th mat-header-cell *matHeaderCellDef>图片</th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element;let x = index">
<a href="javascript:void(0);" (click)='seeImg(element.imageUrls)' style="color: blue;">查看图片</a> <a href="javascript:void(0);" style="color: blue;" (click)='seeImg(element.imageUrls)'>查看图片</a>
<!-- <div id="viewerjs{{key}}" style="display: none;" >
<img *ngFor="let i of element.imageUrls" [src]="i" alt="">
</div> -->
</td> </td>
</ng-container> </ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table> </table>
<p style="text-align: center;font-size: 20px;" *ngIf="!item.position.length">暂无数据,请前往平面图进行相关数据录入</p> <p style="text-align: center;font-size: 18px;" *ngIf="!item.position.length">暂无数据,请前往平面图进行相关数据录入</p>
</div> </div>
<div style="margin-top: 25px; text-align: left;"> <div style="margin-top: 25px; text-align: left;">
<h3 style="text-align: center;font-weight: 550;font-size: 20px;">重点提示</h3> <h3 style="text-align: center;font-weight: 550;font-size: 18px;">重点提示</h3>
<mat-icon *ngIf="isEditPattern" title="保存" style="margin-left: 11%;cursor: pointer;" (click)='PreservationBuilding(item)'>description</mat-icon> <mat-icon *ngIf="isEditPattern" title="保存" style="margin-left: 11%;cursor: pointer;" (click)='PreservationBuilding(item)'>description</mat-icon>
<p class="tips"> <p class="tips">
<textarea [disabled]="!isEditPattern" [(ngModel)]="item.companyInput" maxlength="5000"></textarea> <textarea [disabled]="!isEditPattern" [(ngModel)]="item.companyInput" maxlength="5000"></textarea>

19
src/app/key-unit/key-site/key-site.component.scss

@ -42,8 +42,8 @@ table {
.rotateC {transform: rotate(270deg) scale(0.75);} .rotateC {transform: rotate(270deg) scale(0.75);}
//预览图片 //预览图片
.previewImgBox { .previewImgBox {
width: 800px; width: 6.835938rem;
height: 650px; height: 5.566406rem;
text-align: center; text-align: center;
img{ img{
width: auto; width: auto;
@ -51,8 +51,13 @@ table {
max-width: 100%; max-width: 100%;
max-height: 100%;} max-height: 100%;}
} }
.previewImgBottom { .previewImgBottom {
text-align: center; text-align: center;
height: 30px; height: 30px;
margin: 20px auto; margin: 20px auto;
} }
.imgdialog{
width: 6.835938rem;
height: 5.859375rem;
overflow-y: auto;
}

13
src/app/key-unit/key-site/key-site.component.ts

@ -4,7 +4,7 @@ import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dial
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { KeySiteImgs } from './keysiteimgs.component' import { KeySiteImgs } from './keysiteimgs.component'
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import Viewer from 'viewerjs';
@Component({ @Component({
@ -66,6 +66,7 @@ export class KeySiteComponent implements OnInit {
element.companyInput = null }) //建筑重点提示数据 element.companyInput = null }) //建筑重点提示数据
this.getAllBuildingPositon() this.getAllBuildingPositon()
this.getAllBuildingTips() this.getAllBuildingTips()
console.log(111,this.allBuilding)
} }
}) })
} }
@ -151,9 +152,13 @@ export class KeySiteComponent implements OnInit {
if (e.length) { if (e.length) {
let data = e let data = e
const dialogRef = this.dialog.open(KeySiteImgs, {//调用open方法打开对话框并且携带参数过去 const dialogRef = this.dialog.open(KeySiteImgs, {//调用open方法打开对话框并且携带参数过去
width: '820px', data});
height:'670px',data});
dialogRef.afterClosed().subscribe(); dialogRef.afterClosed().subscribe();
// var image = new Viewer(document.getElementById(`viewerjs${key}`),{
// url: 'data-original'
// });
// document.getElementById('viewerjs').click();
this.xxx()
} else { } else {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
@ -161,7 +166,9 @@ export class KeySiteComponent implements OnInit {
this.snackBar.open('暂无图片数据','确定',config); this.snackBar.open('暂无图片数据','确定',config);
} }
} }
xxx(){
}
//封装方法获取更新当前tab页重点提示 //封装方法获取更新当前tab页重点提示
toUpdate (e) { toUpdate (e) {
let id = {buildingId:e.id} let id = {buildingId:e.id}

31
src/app/key-unit/key-site/keysiteimgs.component.html

@ -1,18 +1,17 @@
<div mat-dialog-title>图片详情</div>
<div class="swiper-container">
<div class="swiper-wrapper">
<div *ngFor="let item of allImages" class="swiper-slide previewImgBox">
<img [ngClass]="{'rotateA':rotationAngle==90,'rotateB':rotationAngle==180,'rotateC':rotationAngle==270} " class="swiper-lazy"
[attr.data-src]="item">
<div class="swiper-lazy-preloader"></div>
</div>
</div>
<!-- 如果需要导航按钮 --> <div class="imgdialog">
<div class="swiper-button-prev"></div> <div mat-dialog-title>图片详情</div>
<div class="swiper-button-next"></div> <div class="swiper-container">
<div class="swiper-wrapper">
<div *ngFor="let item of allImages" class="swiper-slide previewImgBox">
<img [ngClass]="{'rotateA':rotationAngle==90,'rotateB':rotationAngle==180,'rotateC':rotationAngle==270} " class="swiper-lazy"
[attr.data-src]="item">
<div class="swiper-lazy-preloader"></div>
</div>
</div>
<!-- 如果需要导航按钮 -->
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
</div>
</div> </div>
<!--
<div class="previewImgBottom">
<button type="button" mat-icon-button (click)='rotate()'><mat-icon>refresh</mat-icon></button>
</div> -->

5
src/app/ui/add-six-familiar/add-six-familiar.component.scss

@ -76,6 +76,11 @@
line-height: 0.195313rem; line-height: 0.195313rem;
font-size: 0.15625rem; font-size: 0.15625rem;
} }
button{
height: 0.322266rem;
line-height: 0.292969rem;
text-align: center;
}
} }
.listbox{ .listbox{
height: 5.3rem; height: 5.3rem;

6
src/app/ui/collection-tools/collection-tools.component.html

@ -401,9 +401,9 @@
<div class="firecategoriesTree"> <div class="firecategoriesTree">
<!-- 消防列表树写在这里 --> <!-- 消防列表树写在这里 -->
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl" cdkDropList [cdkDropListData]="dataSource" (cdkDropListDropped)="drop($event)"> <mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
<mat-tree-node cdkDrag cdkDragDisabled="false" [ngClass]="{'isLookPattern': !node.isLookPattern && !isEditPattern}" *matTreeNodeDef="let node;" matTreeNodePadding cdkTreeNodePaddingIndent='26' (click)="clickTreeNode(node)" class="treeNode"> <mat-tree-node [ngClass]="{'isLookPattern': !node.isLookPattern && !isEditPattern}" *matTreeNodeDef="let node;" matTreeNodePadding cdkTreeNodePaddingIndent='26' (click)="clickTreeNode(node)" class="treeNode">
<button mat-icon-button disabled></button> <button mat-icon-button disabled></button>
<span title="{{node.name}}" [ngClass]="{'treeText': !node.isTemplate}"> <span title="{{node.name}}" [ngClass]="{'treeText': !node.isTemplate}">
{{node.name}} {{node.name}}
@ -413,7 +413,7 @@
</mat-tree-node> </mat-tree-node>
<mat-tree-node cdkDrag cdkDragDisabled="false" [ngClass]="{'isLookPattern': !node.isLookPattern && !isEditPattern}" *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)="clickTreeNode(node)"class="treeNode" > <mat-tree-node [ngClass]="{'isLookPattern': !node.isLookPattern && !isEditPattern}" *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)="clickTreeNode(node)"class="treeNode" >
<button mat-icon-button <button mat-icon-button
matTreeNodeToggle matTreeNodeToggle
[attr.aria-label]="'toggle ' + node.name"> [attr.aria-label]="'toggle ' + node.name">

2
src/app/ui/home/home.component.ts

@ -66,7 +66,7 @@ export class HomeComponent implements OnInit {
//查看详情 //查看详情
viewDetails () { viewDetails () {
localStorage.setItem("pattern","look") localStorage.setItem("pattern","look")
this.router.navigate([`/trainingrecordinfo`],{queryParams:{'id':'5fa4d863f8eb762cb03c6a72'}}) this.router.navigate([`/trainingrecordinfo`],{queryParams:{'id':'5eabd9ce8f12f09a6a24f53e'}})
console.log('查看详情') console.log('查看详情')
} }

23
src/app/ui/know-route/know-route.component.html

@ -8,27 +8,28 @@
--> -->
<div class="box"> <div class="box">
<div class="addbw"> <div class="addbw">
<span>添加熟悉部位:</span> <span style="margin-left: 8%;">添加熟悉部位:</span>
<button *ngFor="let item of knowBw; let key=index" (click)="addRoute($event,item)">{{item.name}}</button> <button *ngFor="let item of knowBw; let key=index" (click)="addRoute($event,item)">{{item.name}}</button>
<button class="button" (click)="savaClick()">保存</button> <button class="button" (click)="savaClick()">保存</button>
</div> </div>
<div class="addRoute"> <div class="addRoute">
<span>添加路线:</span> <span style="margin-left: 8%;">添加路线:</span>
<input type="text" > <!-- [(ngModel)]="knowRoute" --> <input onfocus=this.blur() type="text" >
<span class="floot" [ngClass]="{'beijicolor': chooseid ==key}" (click)="knowroutwClick($event,key,item)" *ngFor="let item of uploadSucced; let key=index">{{item.name}}-></span> <span class="floot" [ngClass]="{'beijicolor': chooseid ==key}" (click)="knowroutwClick(key,item)" *ngFor="let item of uploadSucced; let key=index">{{item.name}}-></span>
</div> </div>
<div class="bottomAll" > <div class="bottomAll" *ngIf="showorfalse == 'show'">
<div class="upload"> <div class="upload">
<div class="uploadingimg" id="viewerjs"> <div class="uploadingimg" id="viewerjs">
<img [src]="imgsrc" [attr.data-original]="imgsrc.split('?')[0]" alt="" style="width: 299px; height: 170px;" > <img [src]="imgsrc" [attr.data-original]="imgsrc.split('?')[0]" alt="">
</div>
<div class="image" *ngIf="inputShow">
<input id="selectedfile" (change)="filechange($event)" type="file" name="imgFile" accept=".jpg,.png,.jpeg,.gif,.webp">
</div> </div>
</div> </div>
<div class="image" >
<input *ngIf="inputShow" id="selectedfile" (change)="filechange($event)" type="file" name="imgFile" accept=".jpg,.png,.jpeg,.gif,.webp">
</div>
<div class="remarks"> <div class="remarks">
<span>备注:</span><br> <div style="font-size: 16px;">备注:</div>
<textarea name="" id="" cols="50" rows="10" [(ngModel)]="textareazhi"></textarea> <textarea name="" id="" cols="50" rows="10" [(ngModel)]="uploadSucced[chooseid].smark"></textarea>
</div> </div>
</div> </div>
</div> </div>

75
src/app/ui/know-route/know-route.component.scss

@ -3,9 +3,10 @@
height: 100%; height: 100%;
//添加熟悉部位 //添加熟悉部位
.addbw{ .addbw{
height: 0.488281rem; height: 0.976563rem;
line-height: 0.976563rem;
width: 100%; width: 100%;
margin: 0.488281rem 0.78125rem;
button{ button{
margin-left: 0.097656rem; margin-left: 0.097656rem;
} }
@ -24,9 +25,8 @@
} }
//添加路线 //添加路线
.addRoute{ .addRoute{
width: 100%; height: 0.976563rem;
height: 1.464844rem; line-height: 0.976563rem;
margin: 0.488281rem 0.78125rem;
position:relative; position:relative;
white-space: nowrap; white-space: nowrap;
input{ input{
@ -58,57 +58,50 @@
//底部div //底部div
.bottomAll{ .bottomAll{
width: 100%; width: 100%;
height: 30%; height: 230px;
//margin-top: 0.976563rem; margin-top: 0.488281rem;
display: flex; display: flex;
.upload{ .upload{
width: 50%; position: relative;
height: 100%; flex: 1;
display: flex;
justify-content: center;
.uploadingimg{ .uploadingimg{
width: 40%; width: 70%;
height: 30%; height: 75%;
// background: url('../../../assets/images/upload2.png') no-repeat center center; top: 0.058594rem;
position: absolute; position: absolute;
left: 0.488281rem; left: 8%;
//top: 0.097656rem;
bottom: 80px;
//border: 1px dashed gray;
border-radius:3px; border-radius:3px;
img{ img{
margin-left: 0.195313rem; width: 100%;
margin-top: 0.097656rem; height: 100%;
} }
} }
} .image{
.image{ width: 70%;
// position: absolute; height: 75%;
// top: 199px; left: 8%;
// left: 160px; top: 0.058594rem;
// width: 299px;
// height: 170px;
input{
width: 2.929688rem;
height: 1.708984rem;
position: absolute; position: absolute;
left: 0.683594rem; border-radius:3px;
bottom: 0.78125rem; input{
opacity: 0; width: 100%;
margin-top: 0.048828rem; height: 100%;
cursor: pointer; opacity: 0;
cursor: pointer;
}
} }
// opacity:0;
} }
.remarks{ .remarks{
width: 50%; flex: 1;
height: 50%;
input{ input{
height: 0.488281rem; width: 30%;
width: 0.488281rem; height: 30%;
} }
textarea{ textarea{
margin-left: 0.195313rem;
} }
} }
} }

82
src/app/ui/know-route/know-route.component.ts

@ -21,7 +21,7 @@ export class KnowRouteComponent implements OnInit {
constructor(public snackBar: MatSnackBar,private http: HttpClient) { } constructor(public snackBar: MatSnackBar,private http: HttpClient) { }
ngOnInit(): void { ngOnInit(): void {
// this.uploadSucced = JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx")) || []
} }
@ -84,11 +84,9 @@ export class KnowRouteComponent implements OnInit {
this.imgUrl = data.objectName this.imgUrl = data.objectName
this.imgsrc = `/api/Objects/PlanPlatform/${this.imgUrl}?x-oss-process=image/resize,m_fill,h_170,w_299` this.imgsrc = `/api/Objects/PlanPlatform/${this.imgUrl}?x-oss-process=image/resize,m_fill,h_170,w_299`
console.log(this.imgsrc) console.log(this.imgsrc)
//localStorage.setItem(this.clickName,this.imgsrc)
//this.uploadSucced.push({name:this.clickName,src:this.imgsrc,smark})
this.uploadSucced[this.chooseid].src=this.imgsrc this.uploadSucced[this.chooseid].src=this.imgsrc
this.inputShow=false this.inputShow=false
//this.uploadSucced[this.chooseid].smark=this.textareazhi
console.log(this.uploadSucced) console.log(this.uploadSucced)
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
@ -97,95 +95,40 @@ export class KnowRouteComponent implements OnInit {
}) })
} else if (file && fileSize >= shardSize) { //上传文件>5MB时,分块上传 } else if (file && fileSize >= shardSize) { //上传文件>5MB时,分块上传
/* let data = { filename: file.name }
this.http.post(`/api/NewMultipartUpload/PlanPlatform/${this.unitinfo.id}`, {}, { params: data }).subscribe((data: any) => { //初始化分段上传
this.objectName = data.objectName
this.uploadId = data.uploadId
this.subsectionUploading()
}) */
} }
} }
//开始分块上传
async subsectionUploading () {
let file = this.file || null //获取上传的文件
let fileSize = file.size || null //上传文件的总大小
let shardSize = 5 * 1024 * 1024 //5MB一个分片
let allSlice = Math.ceil(fileSize / shardSize) //总文件/5MB===共分多少段
for (let i = 0;i < allSlice;i++) { //循环分段上传
let start = i * shardSize //切割文件开始位置
let end = Math.min(fileSize, start + shardSize); //切割文件结束位置
let formData = new FormData()
formData.append("file",file.slice(start, end))
// 同步写法实现异步调用
let result = await new Promise((resolve, reject) => {
// await 需要后面返回一个 promise 对象
this.http.post(`/api/MultipartUpload/PlanPlatform/${this.objectName}?uploadId=${this.uploadId}&partNumber=${i+1}`,formData).subscribe((data:any)=>{
let msg = {
"partNumber":data.partNumber || null,
"eTag": data.eTag || null
}
resolve(msg) // 调用 promise 内置方法处理成功
})
});
this.PartNumberETag.push(result)
if (this.PartNumberETag.length === allSlice) {
this.endUploading()
}
}
}
//完成分块上传
endUploading() {
let data = this.PartNumberETag
let paramsData = { uploadId: this.uploadId }
this.http.post(`/api/CompleteMultipartUpload/PlanPlatform/${this.objectName}`, data, { params: paramsData }).subscribe(data => {
this.imgsrc = `/api/Objects/PlanPlatform/${this.objectName}?x-oss-process=image/resize,m_fill,h_170,w_299`
this.isspinner = false
this.PartNumberETag = []
})
}
//熟悉部位点击事件 //熟悉部位点击事件
addRoute(event,item){ addRoute(event,item){
this.showorfalse = "show"
this.knowRoute.push({name:event.target.innerHTML,idnum:"🠖"}) this.knowRoute.push({name:event.target.innerHTML,idnum:"🠖"})
this.uploadSucced.push({name:item.name,src:"",smark:""}) this.uploadSucced.push({name:item.name,src:"",smark:""})
console.log(this.uploadSucced)
} }
clickName
savekey savekey
uploadSucced:any = JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx")) || []//上传成功暂存对象 uploadSucced:any = JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx")) || []//上传成功暂存对象
gallery gallery
//熟悉路线点击事件 //熟悉路线点击事件
knowroutwClick(event,key,item){ knowroutwClick(key,item){
this.showorfalse = "show"
this.chooseid=key
setTimeout(() => { setTimeout(() => {
if(document.getElementById('viewerjs')){ if(document.getElementById('viewerjs')){
this.gallery = new Viewer(document.getElementById('viewerjs'),{ this.gallery = new Viewer(document.getElementById('viewerjs'),{
url: 'data-original' url: 'data-original'
}); });
} }
}, 0); }, 0);
this.showorfalse="show" if( JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx"))
this.uploadSucced[key].smark = this.textareazhi && JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx"))[key]
this.chooseid=key && JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx"))[key].src!=""){
this.clickName=item.name+key+sessionStorage.getItem("companyId")
//console.log("sss"+JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx"))[key].src)
/* if(JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx"))[key]){
} */
if( JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx"))&& JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx"))[key] && JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx"))[key].src!=""){
this.imgsrc=JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx"))[key].src this.imgsrc=JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx"))[key].src
this.textareazhi=JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx"))[key].smark this.textareazhi=JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx"))[key].smark
this.inputShow=false this.inputShow=false
}else if(this.uploadSucced[key].src!=""){ }else if(this.uploadSucced[key].src!=""){
this.imgsrc=this.uploadSucced[key].src this.imgsrc=this.uploadSucced[key].src
this.inputShow=false this.inputShow=false
} }else{
else{
this.imgsrc="../../../assets/images/upload.jpg" this.imgsrc="../../../assets/images/upload.jpg"
this.textareazhi="" this.textareazhi=""
this.inputShow=true this.inputShow=true
@ -193,10 +136,11 @@ export class KnowRouteComponent implements OnInit {
} }
//保存点击事件 //保存点击事件
savaClick(){ savaClick(){
this.uploadSucced[this.chooseid].smark=this.textareazhi
localStorage.setItem(sessionStorage.getItem("companyId")+"xxx",JSON.stringify(this.uploadSucced)) localStorage.setItem(sessionStorage.getItem("companyId")+"xxx",JSON.stringify(this.uploadSucced))
alert("保存成功") const config = new MatSnackBarConfig();
console.log(JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx")) ) config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('保存成功','确定',config);
} }
} }

2
src/app/ui/photoofthescene/photoofthescene.component.html

@ -2,7 +2,7 @@
<table > <table >
<tr> <tr>
<td> <td>
<div class="noImg" *ngIf="!unitImg"> <div class="noImg" *ngIf="!unitImg" (click)="dialog()">
<div> <div>
<img class="camera" src="../../../assets/images/camera.png" alt=""> <img class="camera" src="../../../assets/images/camera.png" alt="">
</div> </div>

3
src/app/ui/photoofthescene/photoofthescene.component.scss

@ -3,6 +3,7 @@ table{
width: 85%; width: 85%;
height: 80%; height: 80%;
margin-top: 5%; margin-top: 5%;
overflow-y: auto;
border-collapse: collapse; border-collapse: collapse;
td{ td{
position: relative; position: relative;
@ -27,7 +28,7 @@ table{
} }
.image{ .image{
height: 100%; height: 100%;
width: 299px; width: 2.919922rem;
} }
.deleteicon{ .deleteicon{
position: absolute; position: absolute;

8
src/app/ui/photoofthescene/photoofthescene.component.ts

@ -170,4 +170,12 @@ export class PhotoofthesceneComponent implements OnInit {
// }) // })
} }
} }
dialog(){
if(localStorage.getItem("pattern")=="look"){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('查看模式无法上传','确定',config);
}
}
} }

1
src/app/ui/water-road/water-road.component.scss

@ -42,6 +42,7 @@
.dialogbox{ .dialogbox{
width: 7.441406rem; width: 7.441406rem;
height: 5.761719rem; height: 5.761719rem;
// overflow-y: auto;
.title{ .title{
span{ span{
font-size: 16px; font-size: 16px;

1
src/app/ui/water-road/water-road.component.ts

@ -82,7 +82,6 @@ export class WaterRoadComponent implements OnInit {
console.log(e.lnglat.getLng() + ',' + e.lnglat.getLat()) console.log(e.lnglat.getLng() + ',' + e.lnglat.getLat())
}); });
// this.map.setCity('南宁市')
this.map.add(Arr);//火源标点 this.map.add(Arr);//火源标点

2
src/styles.scss

@ -83,5 +83,5 @@ table td.mat-footer-cell:last-of-type{
height: 100%; height: 100%;
} }
.mat-tab-body-content{ .mat-tab-body-content{
overflow: hidden!important; overflow-x: hidden!important;
} }
Loading…
Cancel
Save