Browse Source

[新增]完善页面ui(剩余重点部位图片查看)

master
邵佳豪 4 years ago
parent
commit
5da3594e99
  1. 27
      src/app/key-unit/basicinfo/basicinfo.component.html
  2. 81
      src/app/key-unit/basicinfo/basicinfo.component.scss
  3. 26
      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. 2
      src/app/key-unit/fire-fighting-device/previewImg.html
  10. 17
      src/app/key-unit/key-site/key-site.component.html
  11. 4
      src/app/key-unit/key-site/key-site.component.scss
  12. 22
      src/app/key-unit/key-site/key-site.component.ts
  13. 7
      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. 21
      src/app/ui/know-route/know-route.component.html
  18. 69
      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 -->
<mat-accordion>
<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-icon style="position: absolute;right:30px;">keyboard_arrow_down</mat-icon>
<mat-icon class="topicon">keyboard_arrow_down</mat-icon>
</mat-panel-title>
</mat-expansion-panel-header>
<div class="topbox">
@ -64,10 +64,10 @@
</div>
</div>
</div>
<div class="inputbox" style="width: 700px;">
<div class="inputbox longlonginput">
<span style="color: red;">*</span>
<span>辖区中队:</span>
<mat-form-field style="width: 538px;">
<mat-form-field class="longinput">
<input matInput id="organization" name="organization" type='text'
required minlength="1"
[(ngModel)]="selectedorganization"
@ -95,10 +95,10 @@
</mat-tree-node>
</mat-tree>
</div>
<div class="inputbox" style="width: 700px;">
<div class="inputbox longlonginput">
<span style="color: red;">*</span>
<span>单位地址:</span>
<mat-form-field style="width: 538px;">
<mat-form-field class="longinput">
<input matInput id="unitaddress" name="unitaddress" type='text'
required minlength="1"
[(ngModel)]="unitinfo.address"
@ -107,8 +107,8 @@
</div>
<div class="uploadimg" (click)="lookmaster()">
<span>单位照片:</span>
<div class="uploadingimg">
<img [src]="imgsrc" alt="" style="width: 299px; height: 170px;" >
<div class="uploadingimg" id="viewerjs">
<img [src]="imgsrc" alt="" [attr.data-original]="imgsrc.split('?')[0]">
</div>
<mat-spinner *ngIf="isspinner" diameter= 50></mat-spinner>
</div>
@ -119,9 +119,6 @@
<button *ngIf="pattern" type="submit" color="primary" class="submit1" mat-button mat-raised-button>保存</button>
</div>
</div>
<!-- <div class="mainright" (click)="closeorganizationbox()"> -->
<!-- 地图预留位置 -->
<!-- </div> -->
</div>
</form>
</div>
@ -160,7 +157,7 @@
<div *ngFor="let item of item.buildingBasicGroups;let www = index" style="float: left;">
<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>
<!-- 如果类型是文本 -->
@ -201,7 +198,7 @@
<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: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>
<input matInput type='text' name="{{key}}1CustomData"
required
@ -241,7 +238,7 @@
<span style="color: red;">*</span>
</div>
<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>
@ -486,7 +483,7 @@
<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: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>
<input matInput type='text' name="{{key}}1CustomData"
required

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

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

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

@ -20,7 +20,7 @@ import * as _ from 'lodash';
// import Swiper from 'swiper';
import { LookMaster } from './lookmaster.component'
import { Router,ActivatedRoute } from '@angular/router'
import Viewer from 'viewerjs';
@Component({
selector: 'app-basicinfo',
templateUrl: './basicinfo.component.html',
@ -89,7 +89,15 @@ export class BasicinfoComponent implements OnInit {
pattern:any
unitId : any //当前单位id
gallery
ngOnInit(): void {
setTimeout(() => {
if(document.getElementById('viewerjs')){
this.gallery = new Viewer(document.getElementById('viewerjs'),{
url: 'data-original'
});
}
}, 0);
if(localStorage.getItem("pattern") == "edit"){
this.pattern = true
}else if(localStorage.getItem("pattern") == "look"){
@ -869,14 +877,14 @@ export class BasicinfoComponent implements OnInit {
}
//查看单位大图
lookmaster(){
const dialogRef = this.dialog.open(LookMaster, {//调用open方法打开对话框并且携带参数过去
width: '800px',
height:'640px',
data: {img:this.imgsrc}
});
dialogRef.afterClosed().subscribe(
// const dialogRef = this.dialog.open(LookMaster, {//调用open方法打开对话框并且携带参数过去
// width: '800px',
// height:'640px',
// data: {img:this.imgsrc}
// });
// dialogRef.afterClosed().subscribe(
);
// );
}
//上传文件
startUploading() {
@ -897,6 +905,7 @@ export class BasicinfoComponent implements OnInit {
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('上传成功','确定',config);
this.gallery.update()
})
} else if (file && fileSize >= shardSize) { //上传文件>5MB时,分块上传
@ -980,6 +989,7 @@ export class BasicinfoComponent implements OnInit {
this.isspinner = false
this.PartNumberETag = []
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>
<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">
<mat-icon title="创建" (click)='addCompanyGrouping(item)'>add_circle_outline</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-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-expansion-panel-header>
<div *ngFor="let items of item.propertyInfos" class="InputField">
@ -99,7 +99,7 @@
<div class="contentBox">
<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">
<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>
@ -167,7 +167,7 @@
<mat-expansion-panel>
<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-expansion-panel-header>
<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;
cursor:pointer;
}
.titlename{
font-size: 0.175781rem;
}
//可展开面板每一行css
@ -118,9 +120,9 @@ textarea {
//img图片列表页面
.imageList {
width: 100%;
height: 100%;
overflow-y: auto;
width: 7.617188rem;
height: 5.859375rem;
// overflow-y: auto;
.imageListBox {
width: 100%;
height: 90%;
@ -128,8 +130,8 @@ textarea {
flex-direction: row;
flex-wrap: wrap;
.imagesBox {
width: 300px;
height: 200px;
width: 2.929688rem;
height: 1.953125rem;
margin: 0 11px 0 11px;
display: inline-block;
img {
@ -137,9 +139,13 @@ textarea {
width: auto;
height: auto;
max-width: 100%;
height: 170px;
height: 1.660156rem;
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
if (data.images.length) {
let dialogRef = this.dialog.open(ImagesData,{width:'1350px',height:'700px',data}); //打开图片弹窗
let dialogRef = this.dialog.open(ImagesData,{data}); //打开图片弹窗
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
@ -473,7 +473,7 @@ export class FireFightingDeviceComponent implements OnInit {
data.images.push(elements)} });
});
if (data.images.length) {
let dialogRef = this.dialog.open(ImagesData,{width:'1350px',height:'700px',data}); //打开图片弹窗
let dialogRef = this.dialog.open(ImagesData,{data}); //打开图片弹窗
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
@ -535,7 +535,7 @@ export class FireFightingDeviceComponent implements OnInit {
});
});
if (data.images.length) {
let dialogRef = this.dialog.open(ImagesData,{width:'1350px',height:'700px',data}); //打开图片弹窗
let dialogRef = this.dialog.open(ImagesData,{data}); //打开图片弹窗
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';

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

@ -1,8 +1,8 @@
<div class="imageList">
<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">
<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>
</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 {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import Swiper from 'swiper';
import Viewer from 'viewerjs';
@Component({
@ -13,21 +13,25 @@ import Swiper from 'swiper';
export class ImagesData {
constructor(private http: HttpClient,public dialogRef: MatDialogRef<ImagesData>,@Inject(MAT_DIALOG_DATA) public data,public dialog: MatDialog) {}
gallery
ngOnInit(): void {
this.data.images.forEach(element => {
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) {
let data = {
allImages:this.data.images,
imgIndex: index}
let dialogRef = this.dialog.open(previewBigImg,
{width: '1600px',
height:'900px',data});
// let data = {
// allImages:this.data.images,
// imgIndex: index}
// let dialogRef = this.dialog.open(previewBigImg,
// {data});
}
}

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

@ -1,3 +1,4 @@
<div class="imgdetailstwo">
<div mat-dialog-title>图片详情</div>
<div class="swiper-container">
<div class="swiper-wrapper">
@ -15,3 +16,4 @@
<div class="previewImgBottom">
<button type="button" mat-icon-button (click)='rotate()'><mat-icon>refresh</mat-icon></button>
</div>
</div>

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

@ -45,10 +45,10 @@
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</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 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>
<p class="tips">
<textarea [disabled]="!isEditPattern" [(ngModel)]="companyInput" maxlength="5000"></textarea>
@ -58,11 +58,11 @@
</div>
</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 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">
<ng-container matColumnDef="mainname">
<th mat-header-cell *matHeaderCellDef>重点部位名称</th>
@ -97,16 +97,19 @@
<ng-container matColumnDef="img">
<th mat-header-cell *matHeaderCellDef>图片</th>
<td mat-cell *matCellDef="let element">
<a href="javascript:void(0);" (click)='seeImg(element.imageUrls)' style="color: blue;">查看图片</a>
<a href="javascript:void(0);" (click)='seeImg(element.imageUrls,key)' style="color: blue;">查看图片</a>
<div id="viewerjs{{key}}" style="display: none;" >
<img *ngFor="let i of element.imageUrls" [src]="i" alt=""(click)="xxx()">
</div>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</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 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>
<p class="tips">
<textarea [disabled]="!isEditPattern" [(ngModel)]="item.companyInput" maxlength="5000"></textarea>

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

@ -56,3 +56,7 @@ table {
height: 30px;
margin: 20px auto;
}
.imgdialog{
width: 800px;
height: 650px;
}

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

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

@ -1,3 +1,5 @@
<div class="imgdialog">
<div mat-dialog-title>图片详情</div>
<div class="swiper-container">
<div class="swiper-wrapper">
@ -12,7 +14,4 @@
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
</div>
<!--
<div class="previewImgBottom">
<button type="button" mat-icon-button (click)='rotate()'><mat-icon>refresh</mat-icon></button>
</div> -->
</div>

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

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

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

@ -401,9 +401,9 @@
<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>
<span title="{{node.name}}" [ngClass]="{'treeText': !node.isTemplate}">
{{node.name}}
@ -413,7 +413,7 @@
</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
matTreeNodeToggle
[attr.aria-label]="'toggle ' + node.name">

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

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

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

@ -8,27 +8,28 @@
-->
<div class="box">
<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 class="button" (click)="savaClick()">保存</button>
</div>
<div class="addRoute">
<span>添加路线:</span>
<input type="text" > <!-- [(ngModel)]="knowRoute" -->
<span class="floot" [ngClass]="{'beijicolor': chooseid ==key}" (click)="knowroutwClick($event,key,item)" *ngFor="let item of uploadSucced; let key=index">{{item.name}}-></span>
<span style="margin-left: 8%;">添加路线:</span>
<input onfocus=this.blur() type="text" >
<span class="floot" [ngClass]="{'beijicolor': chooseid ==key}" (click)="knowroutwClick(key,item)" *ngFor="let item of uploadSucced; let key=index">{{item.name}}-></span>
</div>
<div class="bottomAll" >
<div class="bottomAll" *ngIf="showorfalse == 'show'">
<div class="upload">
<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 class="image" >
<input *ngIf="inputShow" id="selectedfile" (change)="filechange($event)" type="file" name="imgFile" accept=".jpg,.png,.jpeg,.gif,.webp">
</div>
<div class="remarks">
<span>备注:</span><br>
<textarea name="" id="" cols="50" rows="10" [(ngModel)]="textareazhi"></textarea>
<div style="font-size: 16px;">备注:</div>
<textarea name="" id="" cols="50" rows="10" [(ngModel)]="uploadSucced[chooseid].smark"></textarea>
</div>
</div>
</div>

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

@ -3,9 +3,10 @@
height: 100%;
//添加熟悉部位
.addbw{
height: 0.488281rem;
height: 0.976563rem;
line-height: 0.976563rem;
width: 100%;
margin: 0.488281rem 0.78125rem;
button{
margin-left: 0.097656rem;
}
@ -24,9 +25,8 @@
}
//添加路线
.addRoute{
width: 100%;
height: 1.464844rem;
margin: 0.488281rem 0.78125rem;
height: 0.976563rem;
line-height: 0.976563rem;
position:relative;
white-space: nowrap;
input{
@ -58,57 +58,50 @@
//底部div
.bottomAll{
width: 100%;
height: 30%;
//margin-top: 0.976563rem;
height: 230px;
margin-top: 0.488281rem;
display: flex;
.upload{
width: 50%;
height: 100%;
position: relative;
flex: 1;
display: flex;
justify-content: center;
.uploadingimg{
width: 40%;
height: 30%;
// background: url('../../../assets/images/upload2.png') no-repeat center center;
width: 70%;
height: 75%;
top: 0.058594rem;
position: absolute;
left: 0.488281rem;
//top: 0.097656rem;
bottom: 80px;
//border: 1px dashed gray;
left: 8%;
border-radius:3px;
img{
margin-left: 0.195313rem;
margin-top: 0.097656rem;
}
width: 100%;
height: 100%;
}
}
.image{
// position: absolute;
// top: 199px;
// left: 160px;
// width: 299px;
// height: 170px;
input{
width: 2.929688rem;
height: 1.708984rem;
width: 70%;
height: 75%;
left: 8%;
top: 0.058594rem;
position: absolute;
left: 0.683594rem;
bottom: 0.78125rem;
border-radius:3px;
input{
width: 100%;
height: 100%;
opacity: 0;
margin-top: 0.048828rem;
cursor: pointer;
}
// opacity:0;
}
}
.remarks{
width: 50%;
height: 50%;
flex: 1;
input{
height: 0.488281rem;
width: 0.488281rem;
width: 30%;
height: 30%;
}
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) { }
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.imgsrc = `/api/Objects/PlanPlatform/${this.imgUrl}?x-oss-process=image/resize,m_fill,h_170,w_299`
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.inputShow=false
//this.uploadSucced[this.chooseid].smark=this.textareazhi
console.log(this.uploadSucced)
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
@ -97,95 +95,40 @@ export class KnowRouteComponent implements OnInit {
})
} 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){
this.showorfalse = "show"
this.knowRoute.push({name:event.target.innerHTML,idnum:"🠖"})
this.uploadSucced.push({name:item.name,src:"",smark:""})
console.log(this.uploadSucced)
}
clickName
savekey
uploadSucced:any = JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx")) || []//上传成功暂存对象
gallery
//熟悉路线点击事件
knowroutwClick(event,key,item){
knowroutwClick(key,item){
this.showorfalse = "show"
this.chooseid=key
setTimeout(() => {
if(document.getElementById('viewerjs')){
this.gallery = new Viewer(document.getElementById('viewerjs'),{
url: 'data-original'
});
}
}, 0);
this.showorfalse="show"
this.uploadSucced[key].smark = this.textareazhi
this.chooseid=key
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!=""){
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.textareazhi=JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx"))[key].smark
this.inputShow=false
}else if(this.uploadSucced[key].src!=""){
this.imgsrc=this.uploadSucced[key].src
this.inputShow=false
}
else{
}else{
this.imgsrc="../../../assets/images/upload.jpg"
this.textareazhi=""
this.inputShow=true
@ -193,10 +136,11 @@ export class KnowRouteComponent implements OnInit {
}
//保存点击事件
savaClick(){
this.uploadSucced[this.chooseid].smark=this.textareazhi
localStorage.setItem(sessionStorage.getItem("companyId")+"xxx",JSON.stringify(this.uploadSucced))
alert("保存成功")
console.log(JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx")) )
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('保存成功','确定',config);
}
}

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

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

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

@ -3,6 +3,7 @@ table{
width: 85%;
height: 80%;
margin-top: 5%;
overflow-y: auto;
border-collapse: collapse;
td{
position: relative;
@ -27,7 +28,7 @@ table{
}
.image{
height: 100%;
width: 299px;
width: 2.919922rem;
}
.deleteicon{
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{
width: 7.441406rem;
height: 5.761719rem;
// overflow-y: auto;
.title{
span{
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())
});
// this.map.setCity('南宁市')
this.map.add(Arr);//火源标点

2
src/styles.scss

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