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 ac52b20..7c301fa 100644
--- a/src/app/data-collection/fire-force/fire-force.component.scss
+++ b/src/app/data-collection/fire-force/fire-force.component.scss
@@ -6,7 +6,6 @@
box-sizing: border-box;
padding: 10px;
font-size: 16px;
- // font-family: Source Han Sans CN;
font-weight: 400;
color: #000000;
}
@@ -123,7 +122,7 @@
height: 20px;
cursor: pointer;
font-size: 20px;
- vertical-align: text-top;
+ vertical-align: middle;
color: rgba(49, 46, 46, 0.144);
}
mat-icon:hover{
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 ba19d96..4b4d194 100644
--- a/src/app/data-collection/fire-force/fire-force.component.ts
+++ b/src/app/data-collection/fire-force/fire-force.component.ts
@@ -792,7 +792,9 @@ export class FireForceComponent implements OnInit {
this.isMasklayer = true
let formData = new FormData()
formData.append("file",file)
- this.http.post(`/api/Objects/PlanPlatform/FireForce/${this.selectedFireForce.id}`,formData).subscribe((data:any)=>{
+ let storageFolderId //要存储到服务器的文件夹id 一般为当前选中单位的id 如果新创建的话就存到public文件夹
+ this.selectedFireForce.id ? storageFolderId = this.selectedFireForce.id : storageFolderId = 'public'
+ this.http.post(`/api/Objects/PlanPlatform/FireForce/${storageFolderId}`,formData).subscribe((data:any)=>{
let obj = {
objectName:data.objectName,
fileName:data.fileName,
@@ -808,7 +810,9 @@ export class FireForceComponent implements OnInit {
} else if (file && fileSize>shardSize) { //上传文件>5MB时,分块上传
this.isMasklayerUploading = true
let data = {filename: file.name}
- this.http.post(`/api/NewMultipartUpload/PlanPlatform/FireForce/${this.selectedFireForce.id}`,{},{params:data}).subscribe((data:any)=>{ //初始化分段上传
+ let storageFolderId //要存储到服务器的文件夹id 一般为当前选中单位的id 如果新创建的话就存到public文件夹
+ this.selectedFireForce.id ? storageFolderId = this.selectedFireForce.id : storageFolderId = 'public'
+ this.http.post(`/api/NewMultipartUpload/PlanPlatform/FireForce/${storageFolderId}`,{},{params:data}).subscribe((data:any)=>{ //初始化分段上传
this.objectName = data.objectName
this.uploadId = data.uploadId
this.subsectionUploading()
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 3449db9..4eb6f15 100644
--- a/src/app/data-collection/linkage-forces/linkage-forces.component.scss
+++ b/src/app/data-collection/linkage-forces/linkage-forces.component.scss
@@ -6,7 +6,6 @@
box-sizing: border-box;
padding: 10px;
font-size: 16px;
- // font-family: Source Han Sans CN;
font-weight: 400;
color: #000000;
}
@@ -129,7 +128,7 @@
height: 20px;
cursor: pointer;
font-size: 20px;
- vertical-align: text-top;
+ vertical-align: middle;
color: rgba(49, 46, 46, 0.144);
}
mat-icon:hover{
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 22e7a19..77185f3 100644
--- a/src/app/data-collection/linkage-forces/linkage-forces.component.ts
+++ b/src/app/data-collection/linkage-forces/linkage-forces.component.ts
@@ -411,7 +411,6 @@ export class LinkageForcesComponent implements OnInit {
}else{
this.LinkageForceDetailInfo.location = null
}
- this.LinkageForceDetailInfo.relevantInfomationData = JSON.stringify(this.LinkageForceDetailInfo.relevantInfomationData)
let body = this.LinkageForceDetailInfo
if(this.LinkageForceDetailInfo.id){
this.http.put(`/api/LinkageForces/${this.LinkageForceDetailInfo.id}`,body).subscribe((data:any) =>{
@@ -563,7 +562,9 @@ export class LinkageForcesComponent implements OnInit {
let formData = new FormData()
formData.append("file",file)
//this.selectedFireForce.id 选择的组织机构的id
- this.http.post(`/api/Objects/PlanPlatform/LinkageForce/${this.LinkageForceDetailInfo.id}`,formData).subscribe((data:any)=>{
+ let storageFolderId //要存储到服务器的文件夹id 一般为当前选中单位的id 如果新创建的话就存到public文件夹
+ this.LinkageForceDetailInfo.id ? storageFolderId = this.LinkageForceDetailInfo.id : storageFolderId = 'public'
+ this.http.post(`/api/Objects/PlanPlatform/LinkageForce/${storageFolderId}`,formData).subscribe((data:any)=>{
// this.objectName = data.objectName
let obj = {
objectName:data.objectName,
@@ -580,7 +581,9 @@ export class LinkageForcesComponent implements OnInit {
} else if (file && fileSize>shardSize) { //上传文件>5MB时,分块上传
this.isMasklayerUploading = true
let data = {filename: file.name}
- this.http.post(`/api/NewMultipartUpload/PlanPlatform/LinkageForce/${this.LinkageForceDetailInfo.id}`,{},{params:data}).subscribe((data:any)=>{ //初始化分段上传
+ let storageFolderId //要存储到服务器的文件夹id 一般为当前选中单位的id 如果新创建的话就存到public文件夹
+ this.LinkageForceDetailInfo.id ? storageFolderId = this.LinkageForceDetailInfo.id : storageFolderId = 'public'
+ this.http.post(`/api/NewMultipartUpload/PlanPlatform/LinkageForce/${storageFolderId}`,{},{params:data}).subscribe((data:any)=>{ //初始化分段上传
this.objectName = data.objectName
this.uploadId = data.uploadId
this.subsectionUploading()
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 774617c..f0376c1 100644
--- a/src/app/data-collection/water-collection/water-collection.component.scss
+++ b/src/app/data-collection/water-collection/water-collection.component.scss
@@ -6,7 +6,6 @@
box-sizing: border-box;
padding: 10px;
font-size: 16px;
- // font-family: Source Han Sans CN;
font-weight: 400;
color: #000000;
}
diff --git a/src/app/gis-management/basic-info/basic-info.component.scss b/src/app/gis-management/basic-info/basic-info.component.scss
index 7e2a4bc..282cfe8 100644
--- a/src/app/gis-management/basic-info/basic-info.component.scss
+++ b/src/app/gis-management/basic-info/basic-info.component.scss
@@ -18,7 +18,6 @@ table { text-align: center; border-collapse: collapse; padding:2px;}
width: 100%;
height: 100%;
overflow-y: auto;
- // font-family: Source Han Sans CN;
color: #333333;
padding: 10px;
box-sizing: border-box;
@@ -31,7 +30,6 @@ table { text-align: center; border-collapse: collapse; padding:2px;}
p{
height: 14px;
font-size: 14px;
- // font-family: Source Han Sans CN;
font-weight: 400;
line-height: 14px;
color: #333333;
@@ -54,7 +52,6 @@ table { text-align: center; border-collapse: collapse; padding:2px;}
p{
height: 14px;
font-size: 14px;
- // font-family: Source Han Sans CN;
font-weight: 400;
line-height: 14px;
color: #333333;
diff --git a/src/app/gis-management/gis-labeling/shareUrl.scss b/src/app/gis-management/gis-labeling/shareUrl.scss
index 1c21446..dab5edb 100644
--- a/src/app/gis-management/gis-labeling/shareUrl.scss
+++ b/src/app/gis-management/gis-labeling/shareUrl.scss
@@ -8,7 +8,6 @@
position: relative;
.name{
font-size: 20px;
- // font-family: Source Han Sans CN;
font-weight: 400;
color: #FFFFFF;
}
@@ -37,7 +36,6 @@
line-height: 36px;
background: #EEF1F5;
font-size: 16px;
- // font-family: Source Han Sans CN;
font-weight: 400;
color: #333333;
opacity: 0.4;
diff --git a/src/app/key-unit/key-unit-management/key-unit-management.component.ts b/src/app/key-unit/key-unit-management/key-unit-management.component.ts
index 75909dc..660976b 100644
--- a/src/app/key-unit/key-unit-management/key-unit-management.component.ts
+++ b/src/app/key-unit/key-unit-management/key-unit-management.component.ts
@@ -568,7 +568,7 @@ export class KeyUnitManagementComponent implements OnInit {
//跳转查看基本信息页面
unitdetails(element){
- console.log(element)
+ // console.log(element)
sessionStorage.setItem("editable","0")
sessionStorage.setItem("companyName",element.name)
sessionStorage.setItem("companyId",element.id)
diff --git a/src/app/pages/lockscreen/lockscreen.component.scss b/src/app/pages/lockscreen/lockscreen.component.scss
index 041d3ab..932df87 100644
--- a/src/app/pages/lockscreen/lockscreen.component.scss
+++ b/src/app/pages/lockscreen/lockscreen.component.scss
@@ -22,7 +22,6 @@
width: 100%;
height: 100%;
color: #fff;
- font-family: Roboto, sans-serif;
background: url('../../../assets/images/background.jpg');
&::before {
position: fixed;
diff --git a/src/app/plan-audit/basic-info/basic-info.component.scss b/src/app/plan-audit/basic-info/basic-info.component.scss
index c44b0de..abf4034 100644
--- a/src/app/plan-audit/basic-info/basic-info.component.scss
+++ b/src/app/plan-audit/basic-info/basic-info.component.scss
@@ -18,7 +18,6 @@ table { text-align: center; border-collapse: collapse; padding:2px;}
width: 100%;
height: 760px;
overflow-y: auto;
- // font-family: Source Han Sans CN;
color: #333333;
padding: 10px;
box-sizing: border-box;
@@ -31,7 +30,6 @@ table { text-align: center; border-collapse: collapse; padding:2px;}
p{
height: 14px;
font-size: 14px;
- // font-family: Source Han Sans CN;
font-weight: 400;
line-height: 14px;
color: #333333;
@@ -54,7 +52,6 @@ table { text-align: center; border-collapse: collapse; padding:2px;}
p{
height: 14px;
font-size: 14px;
- // font-family: Source Han Sans CN;
font-weight: 400;
line-height: 14px;
color: #333333;
diff --git a/src/app/plan-audit/fireforce-audit/fireforce-audit.component.html b/src/app/plan-audit/fireforce-audit/fireforce-audit.component.html
index 070bd78..5744a5b 100644
--- a/src/app/plan-audit/fireforce-audit/fireforce-audit.component.html
+++ b/src/app/plan-audit/fireforce-audit/fireforce-audit.component.html
@@ -36,25 +36,25 @@
*
队站名称:
-
+
联系电话:
-
+
传真:
-
+
辖区面积:
-
+
@@ -69,17 +69,17 @@
地址:
-
+
经度:
-
+
纬度:
-
+
@@ -89,19 +89,19 @@
现役官兵人数:
-
+
政府专职消防员数:
-
+
消防文员数:
-
+
联系方式
@@ -110,25 +110,25 @@
总队长名称:
-
+
总队长联系方式:
-
+
总队政委姓名:
-
+
总队政委联系方式:
-
+
@@ -136,25 +136,25 @@
支队长姓名:
-
+
支队长联系方式:
-
+
支队政委姓名:
-
+
支队政委联系方式:
-
+
@@ -167,19 +167,19 @@
*
队站名称:
-
+
值班电话:
-
+
辖区面积:
-
+
@@ -194,17 +194,17 @@
地址:
-
+
经度:
-
+
纬度:
-
+
@@ -214,19 +214,19 @@
现役人数:
-
+
政府专职消防员数:
-
+
每日执勤人数:
-
+
联系方式
@@ -235,73 +235,73 @@
站长姓名:
-
+
站长联系方式:
-
+
指导员姓名:
-
+
指导员联系方式:
-
+
副指导员姓名:
-
+
副指导员联系方式:
-
+
副站长一姓名:
-
+
副站长一联系方式:
-
+
副站长二姓名:
-
+
副站长二联系方式:
-
+
副站长三姓名:
-
+
副站长三联系方式:
-
+
@@ -326,33 +326,33 @@
*
队伍名称:
-
+
管辖单位:
-
+
队长:
-
-
+
+
值班电话:
-
+
传真:
-
+
@@ -367,17 +367,17 @@
地址:
-
+
经度:
-
+
纬度:
-
+
@@ -388,20 +388,20 @@
每日执勤人数:
-
+
消防队员总人数:
-
+
执勤车辆数:
-
+
辆
@@ -410,7 +410,7 @@
灭火剂总量:
-
+
个
diff --git a/src/app/plan-audit/fireforce-audit/fireforce-audit.component.scss b/src/app/plan-audit/fireforce-audit/fireforce-audit.component.scss
index 516a831..6178b1b 100644
--- a/src/app/plan-audit/fireforce-audit/fireforce-audit.component.scss
+++ b/src/app/plan-audit/fireforce-audit/fireforce-audit.component.scss
@@ -132,6 +132,7 @@
margin-left: 5px;
border: 1px solid #EBEBEB;
border-radius: 5px;
+ font-family: Regular;
}
textarea{
width: 89%;
diff --git a/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.html b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.html
index 8ca918c..8aa823a 100644
--- a/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.html
+++ b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.html
@@ -1 +1,159 @@
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+ 请等待...
+
+
+
+ 下载中...({{progressBarValue}}%)
+
+
+
+
+
+
+
+
+
{{item.fileName}}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.scss b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.scss
index e69de29..5af678b 100644
--- a/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.scss
+++ b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.scss
@@ -0,0 +1,333 @@
+.box{
+ width: 100%;
+ height: 100%;
+ background-color: #F2F4F6;
+ display: flex;
+ box-sizing: border-box;
+ padding: 10px;
+ font-size: 16px;
+ font-family: Regular;
+ font-weight: 400;
+ color: #000000;
+}
+.mapbox{
+ flex: 1;
+ margin-left: 10px;
+ background-color: #fff;
+ display: flex;
+ overflow: hidden;
+ flex-direction: column;
+
+ #container{
+ width: 100%;
+ height: 220px;
+ }
+ .detailsbox{
+ width: 100%;
+ flex: 1;
+ position: relative;
+ .tabsbox{
+ width: 100%;
+ height: 40px;
+ overflow: hidden;
+ overflow-x: auto;
+ line-height: 40px;
+ display: flex;
+ justify-content: space-between;
+ font-size: 15px;
+ .tabs{
+ div{
+ float: left;
+ width: 120px;
+ text-align: center;
+ cursor: pointer;
+ color: #000000;
+ opacity: 0.4;
+ border-right: 1px solid #F2F4F6;
+ }
+ .selectedBtn{
+ background-color: #2196F3;
+ color: #fff;
+ opacity: 1;
+ }
+ }
+ .btnbox{
+ display: flex;
+ align-items: center;
+ .uploadAttachment{
+ display: inline-block;
+ margin-right: 20px;
+ width: 120px;
+ text-align: center;
+ height: 28px;
+ line-height: 28px;
+ position: relative;
+ button{
+ width: 100%;
+ height: 28px;
+ line-height: 28px;
+ mat-icon{
+ transform: rotate(25deg);
+ font-size: 20px;
+ width: 20px;
+ height: 20px;
+ }
+ }
+ .a-upload{
+ display: inline-block;
+ position: absolute;
+ left: 0;
+ top: 0;
+ display: inline-block;
+ width: 100%;
+ height: 100%;
+ opacity: 0;
+ input{
+ width: 100%;
+ height: 100%;
+ cursor: pointer;
+ }
+ }
+ }
+ span{
+ display: inline-block;
+ cursor: pointer;
+ color: #2196F3;
+ mat-icon{
+ vertical-align: sub;
+ font-size: 20px;
+ width: 20px;
+ height: 20px;
+ }
+ }
+ span:hover{
+ text-decoration: underline;
+ }
+ .submitAudit{
+ margin: 0 30px;
+ }
+ .close{
+ margin-right: 30px;
+ }
+ }
+ }
+ .contant{
+ width: 100%;
+ height:460px;
+ overflow-y: auto;
+ p{
+ color: #2196F3;
+ background-color: #F2F4F6;
+ height: 33px;
+ line-height: 33px;
+ box-sizing: border-box;
+ padding-left: 20px;
+ font-size: 15px;
+ }
+ span{
+ font-size: 15px;
+ }
+ input,select{
+ height: 30px;
+ line-height: 30px;
+ box-sizing: border-box;
+ padding: 0 12px;
+ width: 60%;
+ margin-left: 5px;
+ border: 1px solid #EBEBEB;
+ border-radius: 5px;
+ font-family: Regular;
+ }
+ textarea{
+ width: 89%;
+ margin-left: 5px;
+ height: 85%;
+ border: 1px solid #EBEBEB;
+ border-radius: 5px;
+ font-family: Regular;
+ }
+ .longinput{
+ width: 74%;
+ }
+ .unitDiv{
+ width: 60%;
+ position: relative;
+ input,select{
+ width: 100%;
+ box-sizing: border-box;
+ padding-right: 50px;
+ font-family: Regular;
+ }
+ .unit{
+ position: absolute;
+ right: 13px;
+ top: 4px;
+ color: #000000;
+ opacity: 0.4;
+ }
+ }
+ .smallwidth{
+ width: 30%;
+ }
+ // 相关资料
+ .fileDivBox{
+ position: relative;
+ float: left;
+ border: 1px solid #EBEBEB;
+ width: 160px;
+ height: 162px;
+ box-sizing: border-box;
+ padding: 16px 16px 0;
+ display: flex;
+ flex-direction: column;
+ margin: 12px;
+ align-items: center;
+ cursor: pointer;
+ .imgbox{
+ width: 134px;
+ height: 110px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ .thumbnailImg{
+ width: 134px;
+ height: 110px;
+ }
+ }
+
+ span{
+ width: 100%;
+ text-align: center;
+ margin-top: 5px;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ color: gray;
+ font-size: 14px;
+ }
+ .deleteFile{
+ position: absolute;
+ right: 0;
+ top: 0;
+ width: 18px;
+ height: 18px;
+ font-size: 18px;
+ display: none;
+ }
+ .btn{
+ position: absolute;
+ height: 30px;
+ line-height: 30px;
+ font-size: 14px;
+ display: none;
+ }
+ .btn1{
+ top: 37px;
+ }
+ .btn2{
+ top: 78px;
+ }
+ }
+ .fileDivBox:hover{
+ border: 1px solid #000;
+ .deleteFile{
+ display: block;
+
+ }
+ .deleteFile:hover{
+ color: red;
+ }
+ .btn{
+ display: block;
+ }
+ }
+ }
+ .masklayer{
+ position: absolute;
+ left: 0;
+ top: 0;
+ z-index: 2000;
+ width: 100%;
+ height: 100%;
+ background: rgba(0,0,0,0.2);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+ span{
+ font-size: 14px;
+ margin-top: 5px;
+ }
+ .progressbar{
+ width: 15%;
+ }
+ .cancelbtn{
+ height: 32px;
+ line-height: 32px;
+ font-size: 14px;
+ margin-top: 12px;
+ }
+ }
+ }
+}
+
+
+.addLinkageForceBox{
+ width: 530px;
+ height: 262px;
+ display: flex;
+ flex-direction: column;
+ .topbox{
+ width: 100%;
+ height: 40px;
+ line-height: 40px;
+ background-color: #2196F3;
+ text-align: center;
+ color: #FFFFFF;
+ font-size: 15px;
+ }
+ .contant{
+ flex: 1;
+ box-sizing: border-box;
+ padding:20px 30px;
+
+ div{
+ width:86px;
+ margin: 3px;
+ height: 36px;
+ float: left;
+ line-height: 36px;
+ text-align: center;
+ background-color: #F2F4F6;
+ font-size: 14px;
+ cursor: pointer;
+ border: 1px solid #fff;
+ border-radius: 4px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ img{
+ margin-right: 3px;
+ }
+ }
+ .selectedDiv{
+ background-color: #fff;
+ border: 1px solid #2196F3;
+ }
+ }
+ .btnbox{
+ width: 100%;
+ height: 50px;
+ box-sizing: border-box;
+ padding: 0px 30px;
+ display: flex;
+ align-items: flex-start;;
+ justify-content: center;
+ button{
+ width: 80px;
+ height: 36px;
+ line-height: 36px;
+ margin: 0 20px;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts
index 30643f6..50970b0 100644
--- a/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts
+++ b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts
@@ -1,5 +1,11 @@
+import { HttpClient } from '@angular/common/http';
import { Component, OnInit } from '@angular/core';
-
+import { ViewDetailsComponent } from '../view-details/view-details.component';
+import Viewer from 'viewerjs'
+import { MatSnackBar } from '@angular/material/snack-bar';
+import { MatDialog } from '@angular/material/dialog';
+declare var CryptoJS
+declare var AMap: any;
@Component({
selector: 'app-linkageforces-audit',
templateUrl: './linkageforces-audit.component.html',
@@ -7,9 +13,219 @@ import { Component, OnInit } from '@angular/core';
})
export class LinkageforcesAuditComponent implements OnInit {
- constructor() { }
+ constructor(public snackBar: MatSnackBar,private http:HttpClient,public dialog: MatDialog) { }
+ LinkageForceDetailInfo:any = {
+ id: "600a736de10e6bf0ec592522",
+ linkageForceType: 5,
+ createTime: "2021-01-22T14:40:45.258345",
+ creatorId: "5e8eced2aaca5f7c1025309b",
+ name: "交通",
+ phoneNumber: "13864340193",
+ faxNumber: "110",
+ remark: "这是备注",
+ address: "小高",
+ location: {
+ x: 117.913928,
+ y: 36.457997
+ },
+ administrativeRegion: "淄博",
+ contactName: "张三",
+ contactTitle: "119",
+ contactPhone: "112",
+ serviceContent: "为人民服务",
+ resourceRemark: "宇宙资源",
+ relevantInfomationData: "[{\"fileName\":\"楼层区域.png\",\"fileLength\":4079,\"objectName\":\"LinkageForce/undefined/601e3f957cea2c03587c4c78.png\"},{\"fileName\":\"完整度规划20200724.docx\",\"fileLength\":16480,\"objectName\":\"LinkageForce/undefined/601e3f997cea2c03587c4c79.docx\"},{\"fileName\":\"李志 《天空之城》.mp4\",\"fileLength\":56362628,\"objectName\":\"LinkageForce/undefined/601e3f9d7cea2c03587c4c7a.mp4\"}]",
+ integrityScore: 0.16666667
+ }
+ checkBoxList:any[] = [
+ {id:0,name:'安监',imgUrl:'/assets/linkageForces/安监.png',isChecked:false},
+ {id:1,name:'电力局',imgUrl:'/assets/linkageForces/电力局.png',isChecked:false},
+ {id:2,name:'公安',imgUrl:'/assets/linkageForces/公安.png',isChecked:false},
+ {id:3,name:'海事',imgUrl:'/assets/linkageForces/海事.png',isChecked:false},
+ {id:4,name:'环保局',imgUrl:'/assets/linkageForces/环保局.png',isChecked:false},
+ {id:5,name:'交通',imgUrl:'/assets/linkageForces/交通.png',isChecked:false},
+ {id:6,name:'民政',imgUrl:'/assets/linkageForces/民政.png',isChecked:false},
+ {id:7,name:'气象局',imgUrl:'/assets/linkageForces/气象局.png',isChecked:false},
+ {id:8,name:'燃气局',imgUrl:'/assets/linkageForces/燃气局.png',isChecked:false},
+ {id:9,name:'市政',imgUrl:'/assets/linkageForces/市政.png',isChecked:false},
+ {id:10,name:'水利',imgUrl:'/assets/linkageForces/水利.png',isChecked:false},
+ {id:11,name:'通信',imgUrl:'/assets/linkageForces/通信.png',isChecked:false},
+ {id:12,name:'医疗',imgUrl:'/assets/linkageForces/医疗.png',isChecked:false},
+ {id:13,name:'应急管理',imgUrl:'/assets/linkageForces/应急管理.png',isChecked:false},
+ {id:14,name:'住建',imgUrl:'/assets/linkageForces/住建.png',isChecked:false}
+ ]
+ AttachmentArr:any//附件
+ map:any
+ newPositionMarker:any
+ newPositionMarkerContent:any =
+ '' +
+ '

' +
+ '
'
ngOnInit(): void {
+ this.AttachmentArr = JSON.parse(this.LinkageForceDetailInfo.relevantInfomationData)
+ setTimeout(() => {
+ this.map = new AMap.Map('container', {
+ zoom:18
+ })
+
+ if(this.LinkageForceDetailInfo.location && this.LinkageForceDetailInfo.location.x){
+ this.map.setCenter([this.LinkageForceDetailInfo.location.x,this.LinkageForceDetailInfo.location.y]);
+ this.newPositionMarker = new AMap.Marker({
+ position: [this.LinkageForceDetailInfo.location.x,this.LinkageForceDetailInfo.location.y],
+ content: this.newPositionMarkerContent,
+ offset: new AMap.Pixel(-10, -12)
+ })
+ // 将 markers 添加到地图
+ this.map.add(this.newPositionMarker);
+ }else{
+ this.map.setCity('上海市');
+ }
+
+ }, 0);
+ }
+ objectName:any
+ progressBarValue:any = 0//分块上传进度
+ isMasklayer:boolean = false//圆圈遮罩层是否打开
+ isMasklayerDownload:boolean = false//下载进度条遮罩层是否打开
+ //下载
+ download (e) {
+ this.isMasklayerDownload = true //开启下载进度条
+ let file = e //传递过来的文件元数据
+ let fileSize = file.fileLength //下载文件的总大小
+ let shardSize = 3 * 1024 * 1024 //文件大小是否大于10MB
+ if (file && fileSize<=shardSize) { //<=3MB时直接下载
+ this.progressBarValue = 60
+ this.http.get(`/api/Objects/PlanPlatform/${e.objectName}`,{responseType: 'blob'},).subscribe(data=>{
+ let url = window.URL.createObjectURL(new Blob([data])); //createObjectURL创建一个下载Blob的url地址
+ let link = document.createElement("a");
+ link.style.display = "none";
+ link.href = url;
+ let fileName = e.fileName ? e.fileName : e.objectName.split('/')[e.objectName.split('/').length-1]
+ link.setAttribute("download", fileName);
+ document.body.appendChild(link);
+ link.click();
+ this.isMasklayerDownload = false //关闭下载进度条
+ this.progressBarValue = 0 //初始化进度条
+ })
+ } else if (file && fileSize>shardSize) { //>3MB时分块下载
+ this.blockingDownload(e) //分段下载
+ }
+
}
+ //分段下载并合并
+ async blockingDownload (e) {
+ let file = e //传递过来的文件元数据
+ let fileSize = file.fileLength //下载文件的总大小
+ let shardSize = 3 * 1024 * 1024 //3MB一个分片
+ let allSlice = Math.ceil(fileSize / shardSize) //总文件/3MB===共分多少段
+ let allFile:any = [] //所有的file分段
+
+ for (let i=0;i{
+ this.http.get(`/api/Objects/PlanPlatform/${e.objectName}`,{headers:{'range':`bytes= ${start}-${end}`},responseType:'blob'}).subscribe(data=>{
+ result(data) })
+ })
+ allFile.push(result)
+ // this.progressBarValue = Number((i/allSlice).toFixed(2))*100 //文件进度数
+ this.progressBarValue = this.accMul(Number((i/allSlice).toFixed(2))*100,1,0)
+ if (allFile.length === allSlice) { //合并文件输出给浏览器
+ let url = window.URL.createObjectURL(new Blob(allFile)); //createObjectURL创建一个下载Blob的url地址
+ let link = document.createElement("a");
+ link.style.display = "none";
+ link.href = url;
+ let fileName = e.fileName ? e.fileName : e.objectName.split('/')[e.objectName.split('/').length-1]
+ link.setAttribute("download", fileName);
+ document.body.appendChild(link);
+ link.click();
+ this.isMasklayerDownload = false //关闭下载进度条
+ this.progressBarValue = 0 //初始化进度条
+ }
+ } //for循环结束
+
+ }
+ //js乘法
+ accMul(arg1,arg2,fix) {
+ if(!parseInt(fix)==fix)
+ {
+ return;
+ }
+ var m=0,s1=arg1.toString(),s2=arg2.toString();
+ try{m+=s1.split(".")[1].length}catch(e){}
+ try{m+=s2.split(".")[1].length}catch(e){}
+ if(m>fix){
+ return (Math.round(Number(s1.replace(".",""))*Number(s2.replace(".",""))/Math.pow(10,m-fix))/Math.pow(10,fix));
+ }else if(m<=fix){
+ return (Number(s1.replace(".",""))*Number(s2.replace(".",""))/Math.pow(10,m)).toFixed(fix);
+ }else{
+ return (arg1*arg2).toFixed(fix).toString();
+ }
+ }
+ //当前点击tab页面第几个
+ tabIndex:any = 1
+ selectedTab(index){
+ this.tabIndex = index
+ }
+ //点击文件
+ clickFile(item){
+ let suffix = item.fileName.split('.')[item.fileName.split('.').length-1]
+ if(suffix == 'png' || suffix == 'jpg' || suffix == 'JPG'){
+ let dom = document.getElementById(`viewerjs`)
+ let pObjs = dom.childNodes;
+ let node = document.createElement("img")
+ node.style.display = "none";
+ node.src = "/api/Objects/PlanPlatform/" + item.objectName;
+ node.id = 'img'
+ dom.appendChild(node)
+ setTimeout(() => {
+ let viewer = new Viewer(document.getElementById(`viewerjs`), {
+ hidden:()=>{
+ dom.removeChild(pObjs[0]);
+ viewer.destroy();
+ }
+ });
+ node.click();
+ }, 0);
+ }
+ if(suffix == 'docx' || suffix == 'doc' || suffix == 'pdf'){
+ let fetchUrl = item.objectName
+ let docIdWordArray = CryptoJS.enc.Utf8.parse(`PlanPlatform/` + fetchUrl);
+ let docId = CryptoJS.enc.Base64.stringify(docIdWordArray);
+
+ let jwt = sessionStorage.getItem("token");
+ let rawJwt = CryptoJS.enc.Base64.parse(jwt.split('.')[1]);
+ let identityJson = CryptoJS.enc.Utf8.stringify(rawJwt);
+ let identityJsonparse=JSON.parse(identityJson)
+ let json={
+ doc: {
+ docId: docId,
+ title: item.fileName,
+ fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl
+ },
+ user: {
+ uid: identityJsonparse.sub,
+ nickName: identityJsonparse.name,
+ 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(ViewDetailsComponent, {//调用open方法打开对话框并且携带参数过去
+ data: {item:item,type:"video"},
+ id:'videodialog'
+ });
+ dialogRef.afterClosed().subscribe();
+ }
+ }
}
diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.html b/src/app/plan-audit/wait-examineer/wait-examineer.component.html
index 524a57a..2c3a4ea 100644
--- a/src/app/plan-audit/wait-examineer/wait-examineer.component.html
+++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.html
@@ -130,17 +130,6 @@
-
-
-->
-
+
diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
index 358f65d..f9de17b 100644
--- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
+++ b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
@@ -76,7 +76,11 @@ export class EntryPlanLookComponent implements OnInit {
}
//跳转单位信息
lookUnitData(){
- window.open(`/keyUnit/viewunitinfo?id=${this.route.snapshot.queryParams.unitId}`)
+ sessionStorage.setItem("editable","0")
+ sessionStorage.setItem("companyName",this.route.snapshot.queryParams.unitName)
+ sessionStorage.setItem("companyId",this.route.snapshot.queryParams.unitId)
+ // sessionStorage.setItem(element.id,JSON.stringify(element.companyIntegrityScore))
+ window.open(`/keyUnit/viewunitinfo?id=${this.route.snapshot.queryParams.unitId}&usci=${this.route.snapshot.queryParams.usci}`)
}
//分页事件
changePage(e){
@@ -89,8 +93,6 @@ export class EntryPlanLookComponent implements OnInit {
]
// this.getCompanyData()
this.isoperation = this.route.snapshot.queryParams.operation
-
-
this.unitdata.unitname = this.route.snapshot.queryParams.unitName
this.unitdata.organizationName = this.route.snapshot.queryParams.orName
this.unitdata.unittype = this.route.snapshot.queryParams.unitType
diff --git a/src/app/plan-management/entry-plan/entry-plan.component.ts b/src/app/plan-management/entry-plan/entry-plan.component.ts
index a5f720a..d5d4151 100644
--- a/src/app/plan-management/entry-plan/entry-plan.component.ts
+++ b/src/app/plan-management/entry-plan/entry-plan.component.ts
@@ -320,10 +320,9 @@ export class EntryPlanComponent implements OnInit {
operation=true
//查看预案按钮跳转
routerTo(element){
- // console.log(element)
this.level=='0'?this.operation=false:true
sessionStorage.setItem("companyName",element.company.name)
- window.open(`/planManagement/entryPlandetail?unitId=${element.company.id}&unitTypeId=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].id}&operation=${this.operation}&pagetype=entryplan&unitName=${element.company.name}&orName=${element.company.organizationName}&unitType=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].name}&unitAdd=${element.company.address}`);
+ window.open(`/planManagement/entryPlandetail?unitId=${element.company.id}&unitTypeId=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].id}&operation=${this.operation}&pagetype=entryplan&unitName=${element.company.name}&orName=${element.company.organizationName}&unitType=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].name}&unitAdd=${element.company.address}&usci=${element.company.usci}`);
}
//查询
onSubmit (value) {
diff --git a/src/app/ui/collection-tools-building/addPlaneFigure.html b/src/app/ui/collection-tools-building/addPlaneFigure.html
index 930bf81..75e4722 100644
--- a/src/app/ui/collection-tools-building/addPlaneFigure.html
+++ b/src/app/ui/collection-tools-building/addPlaneFigure.html
@@ -18,7 +18,7 @@
-
+
diff --git a/src/app/ui/collection-tools-building/collection-tools.component.ts b/src/app/ui/collection-tools-building/collection-tools.component.ts
index 44c36d1..071ddff 100644
--- a/src/app/ui/collection-tools-building/collection-tools.component.ts
+++ b/src/app/ui/collection-tools-building/collection-tools.component.ts
@@ -1220,7 +1220,7 @@ export class CollectionToolsBuildingComponent implements OnInit {
//选择建筑
checkedBuilding(item,index){
if (this.checkedBuildingIndex!=index) {
-
+ this.canvasData.selectPanelPoint = new DisposalNodeData();
if (this.canvasData.isChange) { //true 数据被改动
let isTrue = confirm('是否保存当前编辑数据')
if (isTrue) { //先保存数据 在切换
@@ -1721,12 +1721,25 @@ export class CollectionToolsBuildingComponent implements OnInit {
Panel: this.beforeOneCheckedBuilding,
buildingData: e,
}
- let dialogRef = this.dialog.open(editPlaneFigureBuildingComponent,{data});
+ let dialogRef = this.dialog.open(editPlaneFigureBuildingComponent,{disableClose: true,hasBackdrop: false,position: {left:'150px',top:'200px'},data});
+ dialogRef.keydownEvents().subscribe(data=>{
+ if (data.key === 'Enter') {
+ this.canvas.refreshBackgroundImage()
+ }
+ })
dialogRef.afterClosed().subscribe(data=>{
if (data =='总平面图') {
- this.renovateSitePlan()
+ let isSuccess = this.renovateSitePlan()
+ isSuccess.then(res=>{
+ this.canvas.refreshBackgroundImage()
+ })
} else if (data =='建筑') {
- this.renovateBuilding()
+ let isSuccess= this.renovateBuilding()
+ isSuccess.then(res=>{
+ this.canvas.refreshBackgroundImage()
+ })
+ } else if (data == '更新背景图') {
+ this.canvas.refreshBackgroundImage()
}
})
}
@@ -1917,47 +1930,58 @@ export class CollectionToolsBuildingComponent implements OnInit {
let file = e.target.files[0] || null //获取上传的文件
let fileSize = file.size || null //上传文件的总大小
let maxSize = 5 * 1024 * 1024 //5MB一个分片
+ let tenSize = 10 * 1024 * 1024 //10MB限制
if (file && fileSize<=maxSize) { //上传文件<=5MB时
let formData = new FormData()
formData.append("file",file)
this.http.post(`/api/Objects/WebPlan2D/${sessionStorage.getItem('companyId')}`,formData).subscribe((data:any)=>{
- this.renovateBaseMap(data.objectName,item)
+ this.renovateBaseMap('/api/Objects/WebPlan2D/' + data.objectName,item)
})
+ } else if (file && fileSize>maxSize && fileSize10MB时
+ let upload = this.canvasData.sectionUpload(sessionStorage.getItem('companyId'),file)
+ upload.then(res=>{ this.renovateBaseMap('/api/Objects/PlanPlatform/' + res,item) })
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
- this.snackBar.open('上传底图需小于5MB','确定',config);
+ this.snackBar.open('上传底图需小于10MB','确定',config);
}
}
//封装 替换底图 function
renovateBaseMap (e,item) {
- item.imageUrl = '/api/Objects/WebPlan2D/' + e
- if (this.checkedBuildingIndex ==-1) { //总平面图
- this.http.put(`/api/SitePlans/${item.id}`,item).subscribe(data=>{
- let isSuccess = this.renovateSitePlan()
- isSuccess.then(res=>{
- this.canvas.refreshBackgroundImage(item.imageUrl,item.imageAngle)
+ let that = this
+ let img = new Image()
+ img.src = e
+ img.onload = function () {
+ item.imageUrl = e
+ item.imageWidth = img.width
+ item.imageHeight = img.height
+ if (that.checkedBuildingIndex ==-1) { //总平面图
+ that.http.put(`/api/SitePlans/${item.id}`,item).subscribe(data=>{
+ let isSuccess = that.renovateSitePlan()
+ isSuccess.then(res=>{
+ that.canvas.refreshBackgroundImage()
+ })
+ const config = new MatSnackBarConfig();
+ config.verticalPosition = 'top';
+ config.duration = 3000
+ that.snackBar.open('上传底图成功','确定',config);
})
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('上传底图成功','确定',config);
- })
- } else { //楼层/区域
- this.http.put(`/api/BuildingAreas/${item.id}`,item,{params:this.params}).subscribe(data=>{
- let isSuccess = this.renovateBuilding()
- isSuccess.then(res=>{
- this.canvas.refreshBackgroundImage(item.imageUrl,item.imageAngle)
+ } else { //楼层/区域
+ that.http.put(`/api/BuildingAreas/${item.id}`,item,{params:that.params}).subscribe(data=>{
+ let isSuccess = that.renovateBuilding()
+ isSuccess.then(res=>{
+ that.canvas.refreshBackgroundImage()
+ })
+ const config = new MatSnackBarConfig();
+ config.verticalPosition = 'top';
+ config.duration = 3000
+ that.snackBar.open('上传底图成功','确定',config);
})
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('上传底图成功','确定',config);
- })
- }
+ } //else
+ } //onload
}
//封装 刷新总平面图 数据
diff --git a/src/app/ui/collection-tools-building/editPlaneFigure.html b/src/app/ui/collection-tools-building/editPlaneFigure.html
index a0f8016..e847c2a 100644
--- a/src/app/ui/collection-tools-building/editPlaneFigure.html
+++ b/src/app/ui/collection-tools-building/editPlaneFigure.html
@@ -19,7 +19,7 @@
-
+
@@ -27,11 +27,22 @@
+
+
+
+
+
+
+
+
+
按Enter键可浏览图片效果
+
+
-
+
diff --git a/src/app/ui/collection-tools-building/leftFunctionalDomain.ts b/src/app/ui/collection-tools-building/leftFunctionalDomain.ts
index 1190a74..8046b6f 100644
--- a/src/app/ui/collection-tools-building/leftFunctionalDomain.ts
+++ b/src/app/ui/collection-tools-building/leftFunctionalDomain.ts
@@ -2,6 +2,8 @@ import { Component, OnInit, Inject } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
+import { CanvasShareDataService } from 'src/app/canvas-share-data.service';
+import { EventManager } from '@angular/platform-browser';
@Component({
selector: 'app-leftFunctionalDomain-building',
@@ -31,7 +33,7 @@ export class leftFunctionalDomainBuildingComponent implements OnInit {
companyId: sessionStorage.getItem('companyId'),
name: e.name,
order: this.data.order,
- area:e.area,
+ area:Number(e.area),
details:e.details,
enabled: true,
modifiedTime: new Date(),
@@ -45,7 +47,7 @@ export class leftFunctionalDomainBuildingComponent implements OnInit {
buildingId: this.data.Panel.id,
name: e.name,
order: this.data.order,
- area:e.area,
+ area:Number(e.area),
details:e.details,
enabled: true,
modifiedTime: new Date(),
@@ -68,20 +70,84 @@ export class leftFunctionalDomainBuildingComponent implements OnInit {
})
export class editPlaneFigureBuildingComponent implements OnInit {
- constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) { }
+ constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public canvasData: CanvasShareDataService,private eventManager: EventManager,) { }
ngOnInit(): void {
this.name = this.data.buildingData.name || ''
this.checked = this.data.buildingData.isRefugeStorey || false
this.area = this.data.buildingData.area || 0
this.details = this.data.buildingData.details || ''
+ this.imgWidth = this.data.buildingData.imageWidth || 0
+ this.imgHeight = this.data.buildingData.imageHeight || 0
+ this.oldWidth = JSON.parse(JSON.stringify(this.data.buildingData.imageWidth || 0))
+ this.oldHeight = JSON.parse(JSON.stringify(this.data.buildingData.imageHeight || 0))
+ if (this.imgWidth==0 && this.imgHeight==0 && this.data.buildingData.imageUrl) {
+ let that = this
+ let img = new Image()
+ img.src = this.data.buildingData.imageUrl
+ img.onload = function () {
+ that.imgWidth = img.width
+ that.imgHeight = img.height
+ that.imgScale = Number((that.imgWidth/that.imgHeight))
+ }
+ } else {
+ this.imgScale = Number((this.imgWidth/this.imgHeight))
+ }
+
+ this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => {
+ if (event.keyCode === 13) {
+ event.preventDefault();
+ }
+ });
}
+ oldWidth:number; //原图片宽
+ oldHeight:number; //原图片高
+
params = {companyId: sessionStorage.getItem('companyId')}
name:any; //name
checked:boolean = false;//是否为避难层
area:number; //面积
details:string; //详情
+
+ imgWidth:number; //图片宽度
+ imgHeight:number; //图片高度
+ isItEqual:boolean = true; //是否等比
+ imgScale:number; //图片 宽高比例
+
+ //图片 宽高变化时
+ inputChange (e) {
+ if (this.isItEqual) {
+ if (e == 0) { //需要改高度
+ this.imgHeight = Math.round(this.imgWidth / this.imgScale)
+ this.canvasData.selectStorey.imageWidth = this.imgWidth
+ this.canvasData.selectStorey.imageHeight = this.imgHeight
+ } else { //需要改宽度
+ this.imgWidth = Math.round(this.imgHeight * this.imgScale)
+ this.canvasData.selectStorey.imageWidth = this.imgWidth
+ this.canvasData.selectStorey.imageHeight = this.imgHeight
+ }
+ } else {
+ this.canvasData.selectStorey.imageWidth = this.imgWidth
+ this.canvasData.selectStorey.imageHeight = this.imgHeight
+ }
+ }
+
+ //重新计算 宽高比例
+ setImgScale (e) {
+ e.checked? this.imgScale = Number((this.imgWidth/this.imgHeight)) : null
+ }
+
+ //关闭
+ close () {
+ if (this.oldWidth === this.imgWidth && this.oldHeight === this.imgHeight) {
+ this.dialogRef.close()
+ } else {
+ this.canvasData.selectStorey.imageWidth = this.oldWidth
+ this.canvasData.selectStorey.imageHeight = this.oldHeight
+ this.dialogRef.close('更新背景图');
+ }
+ }
//提交表单修改平面图
onSubmit (e) {
@@ -92,6 +158,8 @@ export class editPlaneFigureBuildingComponent implements OnInit {
name: e.name,
cadUrl: this.data.buildingData.cadUrl,
imageUrl: this.data.buildingData.imageUrl,
+ imageWidth: this.imgWidth,
+ imageHeight: this.imgHeight,
imageAngle: this.data.buildingData.imageAngle,
order: this.data.buildingData.order,
area:e.area,
@@ -110,6 +178,8 @@ export class editPlaneFigureBuildingComponent implements OnInit {
name: e.name,
cadUrl: this.data.buildingData.cadUrl,
imageUrl: this.data.buildingData.imageUrl,
+ imageWidth: this.imgWidth,
+ imageHeight: this.imgHeight,
imageAngle: this.data.buildingData.imageAngle,
order: this.data.buildingData.order,
area:e.area,
diff --git a/src/app/ui/collection-tools-building/panel.scss b/src/app/ui/collection-tools-building/panel.scss
index f0ae073..fe2f0b7 100644
--- a/src/app/ui/collection-tools-building/panel.scss
+++ b/src/app/ui/collection-tools-building/panel.scss
@@ -120,7 +120,7 @@
//hover时显示右边操作栏
.sitePlanContent:hover {
#rightOperate {
- display: block;
+ opacity: 1;
}
}
//右边操作栏
@@ -134,7 +134,8 @@
border-radius: 0 100px 100px 0;
background-color: #F0F4F7;
// #F0F4F7 cdced1
- display: none;
+ opacity: 0;
+ transition: opacity 0.5s ease-out;
.functionButton {
height: 25%;
line-height: 25px;
@@ -272,6 +273,12 @@
width: 100%;
}
}
+.image {
+ .mat-form-field {
+ margin-right: 15px;
+ width: 30%;
+ }
+}
.submitBottom {
display: flex;
flex-direction: row;
diff --git a/src/app/ui/collection-tools-plan/addPlaneFigure.html b/src/app/ui/collection-tools-plan/addPlaneFigure.html
index 605e5e5..5fd4ff9 100644
--- a/src/app/ui/collection-tools-plan/addPlaneFigure.html
+++ b/src/app/ui/collection-tools-plan/addPlaneFigure.html
@@ -29,7 +29,7 @@
-
+
diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.ts b/src/app/ui/collection-tools-plan/collection-tools.component.ts
index e23c11c..1baff01 100644
--- a/src/app/ui/collection-tools-plan/collection-tools.component.ts
+++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts
@@ -1221,7 +1221,7 @@ export class CollectionToolsPlanComponent implements OnInit {
//选择建筑
checkedBuilding(item,index){
if (this.checkedBuildingIndex!=index) {
-
+ this.canvasData.selectPanelPoint = new DisposalNodeData();
if (this.canvasData.isChange) { //true 数据被改动
let isTrue = confirm('是否保存当前编辑数据')
if (isTrue) { //先保存数据 在切换
@@ -1731,12 +1731,25 @@ export class CollectionToolsPlanComponent implements OnInit {
Panel: this.beforeOneCheckedBuilding,
buildingData: e,
}
- let dialogRef = this.dialog.open(editPlaneFigureComponentPlan,{data});
+ let dialogRef = this.dialog.open(editPlaneFigureComponentPlan,{disableClose: true,hasBackdrop: false,position: {left:'150px',top:'200px'},data});
+ dialogRef.keydownEvents().subscribe(data=>{
+ if (data.key === 'Enter') {
+ this.canvas.refreshBackgroundImage()
+ }
+ })
dialogRef.afterClosed().subscribe(data=>{
if (data =='总平面图') {
- this.renovateSitePlan()
+ let isSuccess = this.renovateSitePlan()
+ isSuccess.then(res=>{
+ this.canvas.refreshBackgroundImage()
+ })
} else if (data =='建筑') {
- this.renovateBuilding()
+ let isSuccess= this.renovateBuilding()
+ isSuccess.then(res=>{
+ this.canvas.refreshBackgroundImage()
+ })
+ } else if (data == '更新背景图') {
+ this.canvas.refreshBackgroundImage()
}
})
}
@@ -1927,47 +1940,58 @@ export class CollectionToolsPlanComponent implements OnInit {
let file = e.target.files[0] || null //获取上传的文件
let fileSize = file.size || null //上传文件的总大小
let maxSize = 5 * 1024 * 1024 //5MB一个分片
+ let tenSize = 10 * 1024 * 1024 //10MB限制
if (file && fileSize<=maxSize) { //上传文件<=5MB时
let formData = new FormData()
formData.append("file",file)
this.http.post(`/api/Objects/WebPlan2D/${sessionStorage.getItem('companyId')}`,formData).subscribe((data:any)=>{
- this.renovateBaseMap(data.objectName,item)
+ this.renovateBaseMap('/api/Objects/WebPlan2D/' + data.objectName,item)
})
+ } else if (file && fileSize>maxSize && fileSize10MB时
+ let upload = this.canvasData.sectionUpload(sessionStorage.getItem('companyId'),file)
+ upload.then(res=>{ this.renovateBaseMap('/api/Objects/PlanPlatform/' + res,item) })
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
- this.snackBar.open('上传底图需小于5MB','确定',config);
+ this.snackBar.open('上传底图需小于10MB','确定',config);
}
}
//封装 替换底图 function
renovateBaseMap (e,item) {
- item.imageUrl = '/api/Objects/WebPlan2D/' + e
- if (this.checkedBuildingIndex ==-1) { //总平面图
- this.http.put(`/api/SitePlans/${item.id}`,item).subscribe(data=>{
- let isSuccess = this.renovateSitePlan()
- isSuccess.then(res=>{
- this.canvas.refreshBackgroundImage(item.imageUrl,item.imageAngle)
+ let that = this
+ let img = new Image()
+ img.src = e
+ img.onload = function () {
+ item.imageUrl = e
+ item.imageWidth = img.width
+ item.imageHeight = img.height
+ if (that.checkedBuildingIndex ==-1) { //总平面图
+ that.http.put(`/api/SitePlans/${item.id}`,item).subscribe(data=>{
+ let isSuccess = that.renovateSitePlan()
+ isSuccess.then(res=>{
+ that.canvas.refreshBackgroundImage()
+ })
+ const config = new MatSnackBarConfig();
+ config.verticalPosition = 'top';
+ config.duration = 3000
+ that.snackBar.open('上传底图成功','确定',config);
})
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('上传底图成功','确定',config);
- })
- } else { //楼层/区域
- this.http.put(`/api/BuildingAreas/${item.id}`,item,{params:this.params}).subscribe(data=>{
- let isSuccess = this.renovateBuilding()
- isSuccess.then(res=>{
- this.canvas.refreshBackgroundImage(item.imageUrl,item.imageAngle)
+ } else { //楼层/区域
+ that.http.put(`/api/BuildingAreas/${item.id}`,item,{params:that.params}).subscribe(data=>{
+ let isSuccess = that.renovateBuilding()
+ isSuccess.then(res=>{
+ that.canvas.refreshBackgroundImage()
+ })
+ const config = new MatSnackBarConfig();
+ config.verticalPosition = 'top';
+ config.duration = 3000
+ that.snackBar.open('上传底图成功','确定',config);
})
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('上传底图成功','确定',config);
- })
- }
+ } //else
+ } //onload
}
//封装 刷新总平面图 数据
diff --git a/src/app/ui/collection-tools-plan/editPlaneFigure.html b/src/app/ui/collection-tools-plan/editPlaneFigure.html
index a0f8016..e847c2a 100644
--- a/src/app/ui/collection-tools-plan/editPlaneFigure.html
+++ b/src/app/ui/collection-tools-plan/editPlaneFigure.html
@@ -19,7 +19,7 @@
-
+
@@ -27,11 +27,22 @@
+
+
+
+
+
+
+
+
+
按Enter键可浏览图片效果
+
+
-
+
diff --git a/src/app/ui/collection-tools-plan/leftFunctionalDomain.ts b/src/app/ui/collection-tools-plan/leftFunctionalDomain.ts
index bce9606..c8e18ea 100644
--- a/src/app/ui/collection-tools-plan/leftFunctionalDomain.ts
+++ b/src/app/ui/collection-tools-plan/leftFunctionalDomain.ts
@@ -2,6 +2,8 @@ import { Component, OnInit, Inject } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
+import { CanvasShareDataService } from 'src/app/canvas-share-data.service';
+import { EventManager } from '@angular/platform-browser';
@Component({
selector: 'app-leftFunctionalDomain-plan',
@@ -60,7 +62,7 @@ export class leftFunctionalDomainComponentPlan implements OnInit {
companyId: sessionStorage.getItem('companyId'),
name: e.name,
order: this.data.order,
- area:e.area,
+ area:Number(e.area),
details:e.details,
enabled: true,
modifiedTime: new Date(),
@@ -75,7 +77,7 @@ export class leftFunctionalDomainComponentPlan implements OnInit {
buildingId: this.data.Panel.id,
name: e.name,
order: this.data.order,
- area:e.area,
+ area:Number(e.area),
details:e.details,
enabled: true,
modifiedTime: new Date(),
@@ -106,21 +108,85 @@ export class leftFunctionalDomainComponentPlan implements OnInit {
})
export class editPlaneFigureComponentPlan implements OnInit {
- constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) { }
+ constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public canvasData: CanvasShareDataService,private eventManager: EventManager,) { }
ngOnInit(): void {
this.name = this.data.buildingData.name || ''
this.checked = this.data.buildingData.isRefugeStorey || false
this.area = this.data.buildingData.area || 0
this.details = this.data.buildingData.details || ''
+ this.imgWidth = this.data.buildingData.imageWidth || 0
+ this.imgHeight = this.data.buildingData.imageHeight || 0
+ this.oldWidth = JSON.parse(JSON.stringify(this.data.buildingData.imageWidth || 0))
+ this.oldHeight = JSON.parse(JSON.stringify(this.data.buildingData.imageHeight || 0))
+ if (this.imgWidth==0 && this.imgHeight==0 && this.data.buildingData.imageUrl) {
+ let that = this
+ let img = new Image()
+ img.src = this.data.buildingData.imageUrl
+ img.onload = function () {
+ that.imgWidth = img.width
+ that.imgHeight = img.height
+ that.imgScale = Number((that.imgWidth/that.imgHeight))
+ }
+ } else {
+ this.imgScale = Number((this.imgWidth/this.imgHeight))
+ }
+
+ this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => {
+ if (event.keyCode === 13) {
+ event.preventDefault();
+ }
+ });
}
+ oldWidth:number; //原图片宽
+ oldHeight:number; //原图片高
+
params = {companyId: sessionStorage.getItem('companyId')}
name:any; //name
checked:boolean = false;//是否为避难层
area:number; //面积
details:string; //详情
+ imgWidth:number; //图片宽度
+ imgHeight:number; //图片高度
+ isItEqual:boolean = true; //是否等比
+ imgScale:number; //图片 宽高比例
+
+ //图片 宽高变化时
+ inputChange (e) {
+ if (this.isItEqual) {
+ if (e == 0) { //需要改高度
+ this.imgHeight = Math.round(this.imgWidth / this.imgScale)
+ this.canvasData.selectStorey.imageWidth = this.imgWidth
+ this.canvasData.selectStorey.imageHeight = this.imgHeight
+ } else { //需要改宽度
+ this.imgWidth = Math.round(this.imgHeight * this.imgScale)
+ this.canvasData.selectStorey.imageWidth = this.imgWidth
+ this.canvasData.selectStorey.imageHeight = this.imgHeight
+ }
+ } else {
+ this.canvasData.selectStorey.imageWidth = this.imgWidth
+ this.canvasData.selectStorey.imageHeight = this.imgHeight
+ }
+ }
+
+ //重新计算 宽高比例
+ setImgScale (e) {
+ e.checked? this.imgScale = Number((this.imgWidth/this.imgHeight)) : null
+ }
+
+ //关闭
+ close () {
+ if (this.oldWidth === this.imgWidth && this.oldHeight === this.imgHeight) {
+ this.dialogRef.close()
+ } else {
+ this.canvasData.selectStorey.imageWidth = this.oldWidth
+ this.canvasData.selectStorey.imageHeight = this.oldHeight
+ this.dialogRef.close('更新背景图');
+ }
+ }
+
//提交表单修改平面图
onSubmit (e) {
if (!this.data.isBuilding) { //总平面图 修改平面图
@@ -130,6 +196,8 @@ export class editPlaneFigureComponentPlan implements OnInit {
name: e.name,
cadUrl: this.data.buildingData.cadUrl,
imageUrl: this.data.buildingData.imageUrl,
+ imageWidth: this.imgWidth,
+ imageHeight: this.imgHeight,
imageAngle: this.data.buildingData.imageAngle,
order: this.data.buildingData.order,
area:e.area,
@@ -148,6 +216,8 @@ export class editPlaneFigureComponentPlan implements OnInit {
name: e.name,
cadUrl: this.data.buildingData.cadUrl,
imageUrl: this.data.buildingData.imageUrl,
+ imageWidth: this.imgWidth,
+ imageHeight: this.imgHeight,
imageAngle: this.data.buildingData.imageAngle,
order: this.data.buildingData.order,
area:e.area,
diff --git a/src/app/ui/collection-tools-plan/panel.scss b/src/app/ui/collection-tools-plan/panel.scss
index 11200e8..6cf4814 100644
--- a/src/app/ui/collection-tools-plan/panel.scss
+++ b/src/app/ui/collection-tools-plan/panel.scss
@@ -120,7 +120,7 @@
//hover时显示右边操作栏
.sitePlanContent:hover {
#rightOperate {
- display: block;
+ opacity: 1;
}
}
//右边操作栏
@@ -134,7 +134,8 @@
border-radius: 0 100px 100px 0;
background-color: #F0F4F7;
// #F0F4F7 cdced1
- display: none;
+ opacity: 0;
+ transition: opacity 0.5s ease-out;
.functionButton {
height: 25%;
line-height: 25px;
@@ -297,6 +298,12 @@
cursor: pointer
}
}
+.image {
+ .mat-form-field {
+ margin-right: 15px;
+ width: 30%;
+ }
+}
.submitBottom {
display: flex;
flex-direction: row;
diff --git a/src/app/ui/collection-tools/addPlaneFigure.html b/src/app/ui/collection-tools/addPlaneFigure.html
index 930bf81..75e4722 100644
--- a/src/app/ui/collection-tools/addPlaneFigure.html
+++ b/src/app/ui/collection-tools/addPlaneFigure.html
@@ -18,7 +18,7 @@
-
+
diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts
index 204c9eb..b7d32ae 100644
--- a/src/app/ui/collection-tools/collection-tools.component.ts
+++ b/src/app/ui/collection-tools/collection-tools.component.ts
@@ -1229,7 +1229,7 @@ export class CollectionToolsComponent implements OnInit {
//选择建筑
checkedBuilding(item,index){
if (this.checkedBuildingIndex!=index) {
-
+ this.canvasData.selectPanelPoint = new DisposalNodeData();
if (this.canvasData.isChange) { //true 数据被改动
let isTrue = confirm('是否保存当前编辑数据')
if (isTrue) { //先保存数据 在切换
@@ -1785,12 +1785,25 @@ export class CollectionToolsComponent implements OnInit {
Panel: this.beforeOneCheckedBuilding,
buildingData: e,
}
- let dialogRef = this.dialog.open(editPlaneFigureComponent,{data});
+ let dialogRef = this.dialog.open(editPlaneFigureComponent,{disableClose: true,hasBackdrop: false,position: {left:'150px',top:'200px'},data});
+ dialogRef.keydownEvents().subscribe(data=>{
+ if (data.key === 'Enter') {
+ this.canvas.refreshBackgroundImage()
+ }
+ })
dialogRef.afterClosed().subscribe(data=>{
if (data =='总平面图') {
- this.renovateSitePlan()
+ let isSuccess = this.renovateSitePlan()
+ isSuccess.then(res=>{
+ this.canvas.refreshBackgroundImage()
+ })
} else if (data =='建筑') {
- this.renovateBuilding()
+ let isSuccess= this.renovateBuilding()
+ isSuccess.then(res=>{
+ this.canvas.refreshBackgroundImage()
+ })
+ } else if (data == '更新背景图') {
+ this.canvas.refreshBackgroundImage()
}
})
}
@@ -1981,47 +1994,58 @@ export class CollectionToolsComponent implements OnInit {
let file = e.target.files[0] || null //获取上传的文件
let fileSize = file.size || null //上传文件的总大小
let maxSize = 5 * 1024 * 1024 //5MB一个分片
+ let tenSize = 10 * 1024 * 1024 //10MB限制
if (file && fileSize<=maxSize) { //上传文件<=5MB时
let formData = new FormData()
formData.append("file",file)
this.http.post(`/api/Objects/WebPlan2D/${sessionStorage.getItem('companyId')}`,formData).subscribe((data:any)=>{
- this.renovateBaseMap(data.objectName,item)
+ this.renovateBaseMap('/api/Objects/WebPlan2D/' + data.objectName,item)
})
+ } else if (file && fileSize>maxSize && fileSize10MB时
+ let upload = this.canvasData.sectionUpload(sessionStorage.getItem('companyId'),file)
+ upload.then(res=>{ this.renovateBaseMap('/api/Objects/PlanPlatform/' + res,item) })
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
- this.snackBar.open('上传底图需小于5MB','确定',config);
+ this.snackBar.open('上传底图需小于10MB','确定',config);
}
}
//封装 替换底图 function
renovateBaseMap (e,item) {
- item.imageUrl = '/api/Objects/WebPlan2D/' + e
- if (this.checkedBuildingIndex ==-1) { //总平面图
- this.http.put(`/api/SitePlans/${item.id}`,item).subscribe(data=>{
- let isSuccess = this.renovateSitePlan()
- isSuccess.then(res=>{
- this.canvas.refreshBackgroundImage(item.imageUrl,item.imageAngle)
+ let that = this
+ let img = new Image()
+ img.src = e
+ img.onload = function () {
+ item.imageUrl = e
+ item.imageWidth = img.width
+ item.imageHeight = img.height
+ if (that.checkedBuildingIndex ==-1) { //总平面图
+ that.http.put(`/api/SitePlans/${item.id}`,item).subscribe(data=>{
+ let isSuccess = that.renovateSitePlan()
+ isSuccess.then(res=>{
+ that.canvas.refreshBackgroundImage()
+ })
+ const config = new MatSnackBarConfig();
+ config.verticalPosition = 'top';
+ config.duration = 3000
+ that.snackBar.open('上传底图成功','确定',config);
})
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('上传底图成功','确定',config);
- })
- } else { //楼层/区域
- this.http.put(`/api/BuildingAreas/${item.id}`,item,{params:this.params}).subscribe(data=>{
- let isSuccess = this.renovateBuilding()
- isSuccess.then(res=>{
- this.canvas.refreshBackgroundImage(item.imageUrl,item.imageAngle)
+ } else { //楼层/区域
+ that.http.put(`/api/BuildingAreas/${item.id}`,item,{params:that.params}).subscribe(data=>{
+ let isSuccess = that.renovateBuilding()
+ isSuccess.then(res=>{
+ that.canvas.refreshBackgroundImage()
+ })
+ const config = new MatSnackBarConfig();
+ config.verticalPosition = 'top';
+ config.duration = 3000
+ that.snackBar.open('上传底图成功','确定',config);
})
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('上传底图成功','确定',config);
- })
- }
+ } //else
+ } //onload
}
//封装 刷新总平面图 数据
diff --git a/src/app/ui/collection-tools/editPlaneFigure.html b/src/app/ui/collection-tools/editPlaneFigure.html
index a0f8016..e847c2a 100644
--- a/src/app/ui/collection-tools/editPlaneFigure.html
+++ b/src/app/ui/collection-tools/editPlaneFigure.html
@@ -19,7 +19,7 @@
-
+
@@ -27,11 +27,22 @@
+
+
+
+
+
+
+
+
+
按Enter键可浏览图片效果
+
+
-
+
diff --git a/src/app/ui/collection-tools/leftFunctionalDomain.ts b/src/app/ui/collection-tools/leftFunctionalDomain.ts
index 6323465..b13a965 100644
--- a/src/app/ui/collection-tools/leftFunctionalDomain.ts
+++ b/src/app/ui/collection-tools/leftFunctionalDomain.ts
@@ -2,6 +2,8 @@ import { Component, OnInit, Inject } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
+import { EventManager } from '@angular/platform-browser';
+import { CanvasShareDataService } from 'src/app/canvas-share-data.service';
@Component({
selector: 'app-leftFunctionalDomain',
@@ -31,7 +33,7 @@ export class leftFunctionalDomainComponent implements OnInit {
companyId: sessionStorage.getItem('companyId'),
name: e.name,
order: this.data.order,
- area:e.area,
+ area:Number(e.area),
details:e.details,
enabled: true,
modifiedTime: new Date(),
@@ -45,7 +47,7 @@ export class leftFunctionalDomainComponent implements OnInit {
buildingId: this.data.Panel.id,
name: e.name,
order: this.data.order,
- area:e.area,
+ area:Number(e.area),
details:e.details,
enabled: true,
modifiedTime: new Date(),
@@ -68,21 +70,85 @@ export class leftFunctionalDomainComponent implements OnInit {
})
export class editPlaneFigureComponent implements OnInit {
- constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) { }
+ constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public canvasData: CanvasShareDataService,private eventManager: EventManager,) { }
ngOnInit(): void {
this.name = this.data.buildingData.name || ''
this.checked = this.data.buildingData.isRefugeStorey || false
this.area = this.data.buildingData.area || 0
this.details = this.data.buildingData.details || ''
+ this.imgWidth = this.data.buildingData.imageWidth || 0
+ this.imgHeight = this.data.buildingData.imageHeight || 0
+ this.oldWidth = JSON.parse(JSON.stringify(this.data.buildingData.imageWidth || 0))
+ this.oldHeight = JSON.parse(JSON.stringify(this.data.buildingData.imageHeight || 0))
+ if (this.imgWidth==0 && this.imgHeight==0 && this.data.buildingData.imageUrl) {
+ let that = this
+ let img = new Image()
+ img.src = this.data.buildingData.imageUrl
+ img.onload = function () {
+ that.imgWidth = img.width
+ that.imgHeight = img.height
+ that.imgScale = Number((that.imgWidth/that.imgHeight))
+ }
+ } else {
+ this.imgScale = Number((this.imgWidth/this.imgHeight))
+ }
+
+ this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => {
+ if (event.keyCode === 13) {
+ event.preventDefault();
+ }
+ });
}
+ oldWidth:number; //原图片宽
+ oldHeight:number; //原图片高
+
params = {companyId: sessionStorage.getItem('companyId')}
name:any; //name
checked:boolean = false;//是否为避难层
area:number; //面积
details:string; //详情
+ imgWidth:number; //图片宽度
+ imgHeight:number; //图片高度
+ isItEqual:boolean = true; //是否等比
+ imgScale:number; //图片 宽高比例
+
+ //图片 宽高变化时
+ inputChange (e) {
+ if (this.isItEqual) {
+ if (e == 0) { //需要改高度
+ this.imgHeight = Math.round(this.imgWidth / this.imgScale)
+ this.canvasData.selectStorey.imageWidth = this.imgWidth
+ this.canvasData.selectStorey.imageHeight = this.imgHeight
+ } else { //需要改宽度
+ this.imgWidth = Math.round(this.imgHeight * this.imgScale)
+ this.canvasData.selectStorey.imageWidth = this.imgWidth
+ this.canvasData.selectStorey.imageHeight = this.imgHeight
+ }
+ } else {
+ this.canvasData.selectStorey.imageWidth = this.imgWidth
+ this.canvasData.selectStorey.imageHeight = this.imgHeight
+ }
+ }
+
+ //重新计算 宽高比例
+ setImgScale (e) {
+ e.checked? this.imgScale = Number((this.imgWidth/this.imgHeight)) : null
+ }
+
+ //关闭
+ close () {
+ if (this.oldWidth === this.imgWidth && this.oldHeight === this.imgHeight) {
+ this.dialogRef.close()
+ } else {
+ this.canvasData.selectStorey.imageWidth = this.oldWidth
+ this.canvasData.selectStorey.imageHeight = this.oldHeight
+ this.dialogRef.close('更新背景图');
+ }
+ }
+
//提交表单修改平面图
onSubmit (e) {
if (!this.data.isBuilding) { //总平面图 修改平面图
@@ -92,6 +158,8 @@ export class editPlaneFigureComponent implements OnInit {
name: e.name,
cadUrl: this.data.buildingData.cadUrl,
imageUrl: this.data.buildingData.imageUrl,
+ imageWidth: this.imgWidth,
+ imageHeight: this.imgHeight,
imageAngle: this.data.buildingData.imageAngle,
order: this.data.buildingData.order,
area:e.area,
@@ -110,6 +178,8 @@ export class editPlaneFigureComponent implements OnInit {
name: e.name,
cadUrl: this.data.buildingData.cadUrl,
imageUrl: this.data.buildingData.imageUrl,
+ imageWidth: this.imgWidth,
+ imageHeight: this.imgHeight,
imageAngle: this.data.buildingData.imageAngle,
order: this.data.buildingData.order,
area:e.area,
diff --git a/src/app/ui/collection-tools/panel.scss b/src/app/ui/collection-tools/panel.scss
index a127a5b..dc0e63c 100644
--- a/src/app/ui/collection-tools/panel.scss
+++ b/src/app/ui/collection-tools/panel.scss
@@ -120,7 +120,7 @@
//hover时显示右边操作栏
.sitePlanContent:hover {
#rightOperate {
- display: block;
+ opacity: 1;
}
}
//右边操作栏
@@ -134,7 +134,8 @@
border-radius: 0 100px 100px 0;
background-color: #F0F4F7;
// #F0F4F7 cdced1
- display: none;
+ opacity: 0;
+ transition: opacity 0.5s ease-out;
.functionButton {
height: 25%;
line-height: 25px;
@@ -157,12 +158,9 @@
flex-direction: column;
overflow: hidden;
padding-bottom: 10px;
- // border-top: 1px dashed #999;
}
-
-
-// 基本信息/想定作业 切换
+//基本信息/想定作业 切换
.scenarioAssignment {
overflow-y: auto;
}
@@ -276,6 +274,12 @@
width: 100%;
}
}
+.image {
+ .mat-form-field {
+ margin-right: 15px;
+ width: 30%;
+ }
+}
.submitBottom {
display: flex;
flex-direction: row;
diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts
index bee4eed..fae03ae 100644
--- a/src/app/working-area/working-area.component.ts
+++ b/src/app/working-area/working-area.component.ts
@@ -162,7 +162,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
* 重大调整-主版本号增加
* 日期变更-日期版本号增加
*/
- public VERSION = '1.2.1.20210207_beta';
+ public VERSION = '1.2.2.20210220_beta';
/**
* 数据初始化
*/
@@ -992,24 +992,41 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
if (imageUrl === undefined || imageUrl === null || imageUrl === '') {
this.backgroundImage.texture = this.backgroundTexture;
} else {
- this.backgroundImage.texture = await PIXI.Texture.fromURL(imageUrl);
+ // this.backgroundImage.texture = await PIXI.Texture.fromURL(imageUrl);
+ if (imageWidth !== undefined
+ && imageWidth !== null
+ && imageWidth !== 0
+ && imageHeight !== undefined
+ && imageHeight !== null
+ && imageHeight !== 0) {
+ // console.log(imageWidth, imageHeight);
+ // this.backgroundImage.width = imageWidth;
+ // this.backgroundImage.height = imageHeight;
+ this.backgroundImage.texture =
+ await PIXI.Texture.fromURL(imageUrl + '?x-oss-process=image/resize,m_fixed,h_' + imageHeight + ',w_' + imageWidth); // 图片处理
+ } else {
+ // this.backgroundImage.width = this.backgroundImage.texture.width;
+ // this.backgroundImage.height = this.backgroundImage.texture.height;
+ this.backgroundImage.texture =
+ await PIXI.Texture.fromURL(imageUrl); // 请求原图
+ }
}
this.backgroundImage.angle = imageAngle;
- if (imageWidth !== undefined
- && imageWidth !== null
- && imageWidth !== 0
- && imageHeight !== undefined
- && imageHeight !== null
- && imageHeight !== 0) {
- console.log(imageWidth, imageHeight);
- this.backgroundImage.width = imageWidth;
- this.backgroundImage.height = imageHeight;
- } else {
- this.backgroundImage.width = this.backgroundImage.texture.width;
- this.backgroundImage.height = this.backgroundImage.texture.height;
- }
+ // if (imageWidth !== undefined
+ // && imageWidth !== null
+ // && imageWidth !== 0
+ // && imageHeight !== undefined
+ // && imageHeight !== null
+ // && imageHeight !== 0) {
+ // console.log(imageWidth, imageHeight);
+ // this.backgroundImage.width = imageWidth;
+ // this.backgroundImage.height = imageHeight;
+ // } else {
+ // this.backgroundImage.width = this.backgroundImage.texture.width;
+ // this.backgroundImage.height = this.backgroundImage.texture.height;
+ // }
this.backgroundImage.x = this.backgroundImage.width / 2;
this.backgroundImage.y = this.backgroundImage.height / 2;