chenjingyu 4 years ago
parent
commit
a0fb590e45
  1. 3
      src/app/data-collection/fire-force/fire-force.component.scss
  2. 8
      src/app/data-collection/fire-force/fire-force.component.ts
  3. 3
      src/app/data-collection/linkage-forces/linkage-forces.component.scss
  4. 9
      src/app/data-collection/linkage-forces/linkage-forces.component.ts
  5. 1
      src/app/data-collection/water-collection/water-collection.component.scss
  6. 3
      src/app/gis-management/basic-info/basic-info.component.scss
  7. 2
      src/app/gis-management/gis-labeling/shareUrl.scss
  8. 2
      src/app/key-unit/key-unit-management/key-unit-management.component.ts
  9. 1
      src/app/pages/lockscreen/lockscreen.component.scss
  10. 3
      src/app/plan-audit/basic-info/basic-info.component.scss
  11. 106
      src/app/plan-audit/fireforce-audit/fireforce-audit.component.html
  12. 1
      src/app/plan-audit/fireforce-audit/fireforce-audit.component.scss
  13. 160
      src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.html
  14. 333
      src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.scss
  15. 220
      src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts
  16. 17
      src/app/plan-audit/wait-examineer/wait-examineer.component.html
  17. 8
      src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
  18. 3
      src/app/plan-management/entry-plan/entry-plan.component.ts
  19. 2
      src/app/ui/collection-tools-building/addPlaneFigure.html
  20. 80
      src/app/ui/collection-tools-building/collection-tools.component.ts
  21. 15
      src/app/ui/collection-tools-building/editPlaneFigure.html
  22. 76
      src/app/ui/collection-tools-building/leftFunctionalDomain.ts
  23. 11
      src/app/ui/collection-tools-building/panel.scss
  24. 2
      src/app/ui/collection-tools-plan/addPlaneFigure.html
  25. 80
      src/app/ui/collection-tools-plan/collection-tools.component.ts
  26. 15
      src/app/ui/collection-tools-plan/editPlaneFigure.html
  27. 76
      src/app/ui/collection-tools-plan/leftFunctionalDomain.ts
  28. 11
      src/app/ui/collection-tools-plan/panel.scss
  29. 2
      src/app/ui/collection-tools/addPlaneFigure.html
  30. 80
      src/app/ui/collection-tools/collection-tools.component.ts
  31. 15
      src/app/ui/collection-tools/editPlaneFigure.html
  32. 76
      src/app/ui/collection-tools/leftFunctionalDomain.ts
  33. 16
      src/app/ui/collection-tools/panel.scss
  34. 47
      src/app/working-area/working-area.component.ts

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

8
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()

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

9
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()

1
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;
}

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

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

2
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)

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

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

106
src/app/plan-audit/fireforce-audit/fireforce-audit.component.html

@ -36,25 +36,25 @@
<span style="color: red;">*</span>
队站名称:
</span>
<input [(ngModel)]="FireForceDetailInfo.stationName" type="text" style="width:88%;">
<input readonly [(ngModel)]="FireForceDetailInfo.stationName" type="text" style="width:88%;">
</mat-grid-tile>
<mat-grid-tile colspan='2' rowspan='1'>
<span>
联系电话:
</span>
<input [(ngModel)]="FireForceDetailInfo.phoneNumber" type="text">
<input readonly [(ngModel)]="FireForceDetailInfo.phoneNumber" type="text">
</mat-grid-tile>
<mat-grid-tile colspan='2' rowspan='1'>
<span>
传真:
</span>
<input [(ngModel)]="FireForceDetailInfo.faxNumber" type="text">
<input readonly [(ngModel)]="FireForceDetailInfo.faxNumber" type="text">
</mat-grid-tile>
<mat-grid-tile colspan='2' rowspan='1'>
<span>
辖区面积:
</span>
<input [(ngModel)]="FireForceDetailInfo.jurisdictionArea" type="text">
<input readonly [(ngModel)]="FireForceDetailInfo.jurisdictionArea" type="text">
</mat-grid-tile>
<mat-grid-tile colspan='6' rowspan='2'>
<span>
@ -69,17 +69,17 @@
<span>
地址:
</span>
<input [(ngModel)]="FireForceDetailInfo.address" type="text" style="width:76%;">
<input readonly [(ngModel)]="FireForceDetailInfo.address" type="text" style="width:76%;">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
经度:
</span>
<input [(ngModel)]="FireForceDetailInfo.location.x" disabled type="text" style="width: 26%;margin-right: 6%;">
<input readonly [(ngModel)]="FireForceDetailInfo.location.x" disabled type="text" style="width: 26%;margin-right: 6%;">
<span>
纬度:
</span>
<input [(ngModel)]="FireForceDetailInfo.location.y" disabled type="text" style="width: 26%;margin-right: 6%;">
<input readonly [(ngModel)]="FireForceDetailInfo.location.y" disabled type="text" style="width: 26%;margin-right: 6%;">
</mat-grid-tile>
</mat-grid-list>
@ -89,19 +89,19 @@
<span>
现役官兵人数:
</span>
<input [(ngModel)]="ZongpersonCountData[0].PropertyValue" type="text">
<input readonly [(ngModel)]="ZongpersonCountData[0].PropertyValue" type="text">
</mat-grid-tile>
<mat-grid-tile colspan='2' rowspan='1'>
<span>
政府专职消防员数:
</span>
<input [(ngModel)]="ZongpersonCountData[1].PropertyValue" type="text">
<input readonly [(ngModel)]="ZongpersonCountData[1].PropertyValue" type="text">
</mat-grid-tile>
<mat-grid-tile colspan='2' rowspan='1'>
<span>
消防文员数:
</span>
<input [(ngModel)]="ZongpersonCountData[2].PropertyValue" type="text">
<input readonly [(ngModel)]="ZongpersonCountData[2].PropertyValue" type="text">
</mat-grid-tile>
</mat-grid-list>
<p>联系方式</p>
@ -110,25 +110,25 @@
<span>
总队长名称:
</span>
<input type="text" [(ngModel)]="ZongcontactData[0].PropertyValue">
<input readonly type="text" [(ngModel)]="ZongcontactData[0].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
总队长联系方式:
</span>
<input type="text" [(ngModel)]="ZongcontactData[1].PropertyValue">
<input readonly type="text" [(ngModel)]="ZongcontactData[1].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
总队政委姓名:
</span>
<input type="text" [(ngModel)]="ZongcontactData[2].PropertyValue">
<input readonly type="text" [(ngModel)]="ZongcontactData[2].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
总队政委联系方式:
</span>
<input type="text" [(ngModel)]="ZongcontactData[3].PropertyValue">
<input readonly type="text" [(ngModel)]="ZongcontactData[3].PropertyValue">
</mat-grid-tile>
</mat-grid-list>
<mat-grid-list cols="6" rowHeight="40px" *ngIf="selectedFireForceLevel == 1">
@ -136,25 +136,25 @@
<span>
支队长姓名:
</span>
<input type="text" [(ngModel)]="ZhicontactData[0].PropertyValue">
<input readonly type="text" [(ngModel)]="ZhicontactData[0].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
支队长联系方式:
</span>
<input type="text" [(ngModel)]="ZhicontactData[1].PropertyValue">
<input readonly type="text" [(ngModel)]="ZhicontactData[1].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
支队政委姓名:
</span>
<input type="text" [(ngModel)]="ZhicontactData[2].PropertyValue">
<input readonly type="text" [(ngModel)]="ZhicontactData[2].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
支队政委联系方式:
</span>
<input type="text" [(ngModel)]="ZhicontactData[3].PropertyValue">
<input readonly type="text" [(ngModel)]="ZhicontactData[3].PropertyValue">
</mat-grid-tile>
</mat-grid-list>
</div>
@ -167,19 +167,19 @@
<span style="color: red;">*</span>
队站名称:
</span>
<input type="text" style="width:81%;" [(ngModel)]="FireForceDetailInfo.stationName">
<input readonly type="text" style="width:81%;" [(ngModel)]="FireForceDetailInfo.stationName">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
值班电话:
</span>
<input type="text" [(ngModel)]="FireForceDetailInfo.phoneNumber">
<input readonly type="text" [(ngModel)]="FireForceDetailInfo.phoneNumber">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
辖区面积:
</span>
<input type="text" [(ngModel)]="FireForceDetailInfo.jurisdictionArea">
<input readonly type="text" [(ngModel)]="FireForceDetailInfo.jurisdictionArea">
</mat-grid-tile>
<mat-grid-tile colspan='6' rowspan='2'>
<span>
@ -194,17 +194,17 @@
<span>
地址:
</span>
<input [(ngModel)]="FireForceDetailInfo.address" type="text" style="width:76%;">
<input readonly [(ngModel)]="FireForceDetailInfo.address" type="text" style="width:76%;">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
经度:
</span>
<input [(ngModel)]="FireForceDetailInfo.location.x" disabled type="text" style="width: 26%;margin-right: 6%;">
<input readonly [(ngModel)]="FireForceDetailInfo.location.x" disabled type="text" style="width: 26%;margin-right: 6%;">
<span>
纬度:
</span>
<input [(ngModel)]="FireForceDetailInfo.location.y" disabled type="text" style="width: 26%;margin-right: 6%;">
<input readonly [(ngModel)]="FireForceDetailInfo.location.y" disabled type="text" style="width: 26%;margin-right: 6%;">
</mat-grid-tile>
</mat-grid-list>
@ -214,19 +214,19 @@
<span>
现役人数:
</span>
<input type="text" [(ngModel)]="DaZhongpersonCountData[0].PropertyValue">
<input readonly type="text" [(ngModel)]="DaZhongpersonCountData[0].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='2' rowspan='1'>
<span>
政府专职消防员数:
</span>
<input type="text" [(ngModel)]="DaZhongpersonCountData[1].PropertyValue">
<input readonly type="text" [(ngModel)]="DaZhongpersonCountData[1].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='2' rowspan='1'>
<span>
每日执勤人数:
</span>
<input type="text" [(ngModel)]="DaZhongpersonCountData[2].PropertyValue">
<input readonly type="text" [(ngModel)]="DaZhongpersonCountData[2].PropertyValue">
</mat-grid-tile>
</mat-grid-list>
<p>联系方式</p>
@ -235,73 +235,73 @@
<span>
站长姓名:
</span>
<input type="text" [(ngModel)]="DaZhongcontactData[0].PropertyValue">
<input readonly type="text" [(ngModel)]="DaZhongcontactData[0].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
站长联系方式:
</span>
<input type="text" [(ngModel)]="DaZhongcontactData[1].PropertyValue">
<input readonly type="text" [(ngModel)]="DaZhongcontactData[1].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
指导员姓名:
</span>
<input type="text" [(ngModel)]="DaZhongcontactData[2].PropertyValue">
<input readonly type="text" [(ngModel)]="DaZhongcontactData[2].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
指导员联系方式:
</span>
<input type="text" [(ngModel)]="DaZhongcontactData[3].PropertyValue">
<input readonly type="text" [(ngModel)]="DaZhongcontactData[3].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
副指导员姓名:
</span>
<input type="text" [(ngModel)]="DaZhongcontactData[4].PropertyValue">
<input readonly type="text" [(ngModel)]="DaZhongcontactData[4].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
副指导员联系方式:
</span>
<input type="text" [(ngModel)]="DaZhongcontactData[5].PropertyValue">
<input readonly type="text" [(ngModel)]="DaZhongcontactData[5].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
副站长一姓名:
</span>
<input type="text" [(ngModel)]="DaZhongcontactData[6].PropertyValue">
<input readonly type="text" [(ngModel)]="DaZhongcontactData[6].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
副站长一联系方式:
</span>
<input type="text" [(ngModel)]="DaZhongcontactData[7].PropertyValue">
<input readonly type="text" [(ngModel)]="DaZhongcontactData[7].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
副站长二姓名:
</span>
<input type="text" [(ngModel)]="DaZhongcontactData[8].PropertyValue">
<input readonly type="text" [(ngModel)]="DaZhongcontactData[8].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
副站长二联系方式:
</span>
<input type="text" [(ngModel)]="DaZhongcontactData[9].PropertyValue">
<input readonly type="text" [(ngModel)]="DaZhongcontactData[9].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
副站长三姓名:
</span>
<input type="text" [(ngModel)]="DaZhongcontactData[10].PropertyValue">
<input readonly type="text" [(ngModel)]="DaZhongcontactData[10].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
副站长三联系方式:
</span>
<input type="text" [(ngModel)]="DaZhongcontactData[11].PropertyValue">
<input readonly type="text" [(ngModel)]="DaZhongcontactData[11].PropertyValue">
</mat-grid-tile>
</mat-grid-list>
</div>
@ -326,33 +326,33 @@
<span style="color: red;">*</span>
队伍名称:
</span>
<input type="text" [(ngModel)]="FireForceDetailInfo.stationName">
<input readonly type="text" [(ngModel)]="FireForceDetailInfo.stationName">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
管辖单位:
</span>
<!-- <input disabled [(ngModel)]="superior.name" class="smallwidth" type="text" placeholder="名称">
<input disabled [(ngModel)]="superior.code" class="smallwidth" type="text" placeholder="编号"> -->
<!-- <input readonly disabled [(ngModel)]="superior.name" class="smallwidth" type="text" placeholder="名称">
<input readonly disabled [(ngModel)]="superior.code" class="smallwidth" type="text" placeholder="编号"> -->
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
队长:
</span>
<input [(ngModel)]="othercontactData[0].PropertyValue" class="smallwidth" type="text" placeholder="姓名">
<input [(ngModel)]="othercontactData[1].PropertyValue" class="smallwidth" type="text" placeholder="联系方式">
<input readonly [(ngModel)]="othercontactData[0].PropertyValue" class="smallwidth" type="text" placeholder="姓名">
<input readonly [(ngModel)]="othercontactData[1].PropertyValue" class="smallwidth" type="text" placeholder="联系方式">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
值班电话:
</span>
<input [(ngModel)]="FireForceDetailInfo.phoneNumber" type="text">
<input readonly [(ngModel)]="FireForceDetailInfo.phoneNumber" type="text">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
传真:
</span>
<input [(ngModel)]="FireForceDetailInfo.faxNumber" type="text">
<input readonly [(ngModel)]="FireForceDetailInfo.faxNumber" type="text">
</mat-grid-tile>
<mat-grid-tile colspan='6' rowspan='2'>
<span>
@ -367,17 +367,17 @@
<span>
地址:
</span>
<input [(ngModel)]="FireForceDetailInfo.address" type="text" style="width:76%;">
<input readonly [(ngModel)]="FireForceDetailInfo.address" type="text" style="width:76%;">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
经度:
</span>
<input [(ngModel)]="FireForceDetailInfo.location.x" disabled type="text" style="width: 26%;margin-right: 6%;">
<input readonly [(ngModel)]="FireForceDetailInfo.location.x" disabled type="text" style="width: 26%;margin-right: 6%;">
<span>
纬度:
</span>
<input [(ngModel)]="FireForceDetailInfo.location.y" disabled type="text" style="width: 26%;margin-right: 6%;">
<input readonly [(ngModel)]="FireForceDetailInfo.location.y" disabled type="text" style="width: 26%;margin-right: 6%;">
</mat-grid-tile>
</mat-grid-list>
@ -388,20 +388,20 @@
<span>
每日执勤人数:
</span>
<input type="text" [(ngModel)]="otherpersonCountData[0].PropertyValue">
<input readonly type="text" [(ngModel)]="otherpersonCountData[0].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
消防队员总人数:
</span>
<input type="text" [(ngModel)]="otherpersonCountData[1].PropertyValue">
<input readonly type="text" [(ngModel)]="otherpersonCountData[1].PropertyValue">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
执勤车辆数:
</span>
<div class="unitDiv">
<input type="text" [(ngModel)]="otherpersonCountData[2].PropertyValue">
<input readonly type="text" [(ngModel)]="otherpersonCountData[2].PropertyValue">
<span class="unit"></span>
</div>
</mat-grid-tile>
@ -410,7 +410,7 @@
灭火剂总量:
</span>
<div class="unitDiv">
<input type="text" [(ngModel)]="otherpersonCountData[3].PropertyValue">
<input readonly type="text" [(ngModel)]="otherpersonCountData[3].PropertyValue">
<span class="unit"></span>
</div>
</mat-grid-tile>

1
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%;

160
src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.html

@ -1 +1,159 @@
<!-- 联动力量审核 -->
<!-- 联动力量审核 -->
<div class="box" style="width: 100%;height: 100%;overflow: hidden;">
<div class="mapbox" id="linkageForcesSwiper">
<div id="container"></div>
<div class="detailsbox" *ngIf="LinkageForceDetailInfo.linkageForceType || LinkageForceDetailInfo.linkageForceType == '0'">
<div class="masklayer" *ngIf="isMasklayer">
<mat-spinner [diameter]='30'></mat-spinner>
<span>请等待...</span>
</div>
<div class="masklayer" *ngIf="isMasklayerDownload">
<mat-progress-bar class="progressbar" mode="determinate" [value]="progressBarValue"></mat-progress-bar>
<span>下载中...({{progressBarValue}}%)</span>
</div>
<div class="tabsbox">
<div class="tabs">
<div (click)="selectedTab(1)" [ngClass]="{'selectedBtn': tabIndex == 1}">
<span>详情</span>
</div>
<div (click)="selectedTab(2)" [ngClass]="{'selectedBtn': tabIndex == 2}">
<span>相关资料</span>
</div>
</div>
</div>
<!-- 详情 -->
<div class="contant" *ngIf="tabIndex == 1">
<div>
<p>基本信息</p>
<mat-grid-list cols="6" rowHeight="40px">
<mat-grid-tile colspan='3' rowspan='1'>
<span>
<span style="color: red;">*</span>
类型:
</span>
<select disabled style="width: 67.7%;" [(ngModel)]="LinkageForceDetailInfo.linkageForceType">
<option *ngFor="let item of checkBoxList" [value]="item.id">{{item.name}}</option>
</select>
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
<span style="color: red;">*</span>
名称:
</span>
<input readonly type="text" style="width: 63%;" [(ngModel)]="LinkageForceDetailInfo.name">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
单位联系电话:
</span>
<input readonly type="text" [(ngModel)]="LinkageForceDetailInfo.phoneNumber">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
单位传真:
</span>
<input readonly type="text" [(ngModel)]="LinkageForceDetailInfo.faxNumber">
</mat-grid-tile>
<mat-grid-tile colspan='6' rowspan='2'>
<span>
备注:
</span>
<textarea readonly [(ngModel)]="LinkageForceDetailInfo.remark" style="height: 80%;width: 84.5%;" name="" id="" cols="30" rows="10"></textarea>
</mat-grid-tile>
</mat-grid-list>
<p>位置信息</p>
<mat-grid-list cols="6" rowHeight="40px">
<mat-grid-tile colspan='3' rowspan='1'>
<span>
行政区:
</span>
<input readonly type="text" style="width: 26%;margin-right: 6%;" [(ngModel)]="LinkageForceDetailInfo.administrativeRegion">
<span>
地址:
</span>
<input readonly type="text" style="width: 26%;margin-right: 6%;" [(ngModel)]="LinkageForceDetailInfo.address">
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='1'>
<span>
经度:
</span>
<input readonly [(ngModel)]="LinkageForceDetailInfo.location.x" disabled type="text" style="width: 26%;margin-right: 6%;">
<span>
纬度:
</span>
<input readonly [(ngModel)]="LinkageForceDetailInfo.location.y" disabled type="text" style="width: 26%;margin-right: 6%;">
</mat-grid-tile>
</mat-grid-list>
<p>联系人</p>
<mat-grid-list cols="6" rowHeight="40px">
<mat-grid-tile colspan='2' rowspan='1'>
<span>
联系人:
</span>
<input readonly type="text" [(ngModel)]="LinkageForceDetailInfo.contactName">
</mat-grid-tile>
<mat-grid-tile colspan='2' rowspan='1'>
<span>
职务:
</span>
<input readonly type="text" [(ngModel)]="LinkageForceDetailInfo.contactTitle">
</mat-grid-tile>
<mat-grid-tile colspan='2' rowspan='1'>
<span>
电话:
</span>
<input readonly type="text" [(ngModel)]="LinkageForceDetailInfo.contactPhone">
</mat-grid-tile>
</mat-grid-list>
<p>应急信息</p>
<mat-grid-list cols="6" rowHeight="40px">
<mat-grid-tile colspan='3' rowspan='2'>
<span>
服务内容:
</span>
<textarea readonly style="height: 80%;width: 70%;" name="" id="" cols="30" rows="10" [(ngModel)]="LinkageForceDetailInfo.serviceContent"></textarea>
</mat-grid-tile>
<mat-grid-tile colspan='3' rowspan='2'>
<span>
资源说明:
</span>
<textarea readonly style="height: 80%;width: 70%;" name="" id="" cols="30" rows="10" [(ngModel)]="LinkageForceDetailInfo.resourceRemark"></textarea>
</mat-grid-tile>
</mat-grid-list>
</div>
</div>
<!-- 相关资料 -->
<div class="contant" *ngIf="tabIndex == 2">
<div class="fileDivBox" *ngFor="let item of AttachmentArr" >
<div class="imgbox">
<img *ngIf="item.fileName.split('.')[item.fileName.split('.').length-1] == 'png'
|| item.fileName.split('.')[item.fileName.split('.').length-1] == 'jpg'
|| item.fileName.split('.')[item.fileName.split('.').length-1] == 'JPG'"
class="thumbnailImg" src="/api/Objects/PlanPlatform/{{item.objectName}}" alt="">
<img *ngIf="item.fileName.split('.')[item.fileName.split('.').length-1] == 'docx'
|| item.fileName.split('.')[item.fileName.split('.').length-1] == 'doc'"
class="thumbnailImg" src="/assets/images/word.jpg" alt="">
<img *ngIf="item.fileName.split('.')[item.fileName.split('.').length-1] == 'pdf'"
class="thumbnailImg" src="/assets/images/pdf.jpg" alt="">
<img *ngIf="item.fileName.split('.')[item.fileName.split('.').length-1] == 'txt'"
class="thumbnailImg" src="/assets/images/txt.jpg" alt="">
<img *ngIf="item.fileName.split('.')[item.fileName.split('.').length-1] == 'mp4'"
class="thumbnailImg" src="/assets/images/vedio.jpg" alt="">
</div>
<span [title]="item.fileName">{{item.fileName}}</span>
<button (click)="clickFile(item)" class="btn btn1" mat-flat-button color="primary">查看</button>
<button (click)="download (item)" class="btn btn2" mat-flat-button color="primary">下载</button>
</div>
</div>
</div>
</div>
</div>
<div id="viewerjs" style="display:none">
</div>

333
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;
}
}
}

220
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 =
'<div class="custom-content-marker">' +
' <img style="width:20px;height:24px" src="/assets/images/定位.png">' +
'</div>'
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<allSlice;i++) {
let start = i * shardSize //每次下载文件开始位置
let end = Math.min(fileSize, start + shardSize-1); //每次下载文件结束为止
let result = await new Promise ((result,reject)=>{
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();
}
}
}

17
src/app/plan-audit/wait-examineer/wait-examineer.component.html

@ -130,17 +130,6 @@
<app-cad-draw></app-cad-draw>
</ng-template>
</mat-tab>
<!-- <mat-tab label="六熟悉">
<ng-template matTabContent>
六熟悉
</ng-template>
</mat-tab>
<mat-tab label="实战演练">
<ng-template matTabContent>
实战演练
</ng-template>
</mat-tab> -->
</mat-tab-group>
<div id="firefacilities" *ngIf="showtype==3 && !isallDate" style="margin: 10px;">
<mat-accordion class="tableContent" >
@ -280,12 +269,12 @@
<app-water-audit></app-water-audit>
</div> -->
<!-- 消防力量审核 -->
<!-- <div class="fireForceAudit">
<div class="fireForceAudit">
<app-fireforce-audit></app-fireforce-audit>
</div> -->
</div>
<!-- 联动力量审核 -->
<!-- <div class="LinkageForcesAudit">
<app-linkageforces-audit></app-linkageforces-audit>
</div> -->
</div>
</div>

8
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

3
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) {

2
src/app/ui/collection-tools-building/addPlaneFigure.html

@ -18,7 +18,7 @@
<div class="keyMargin">
<mat-form-field>
<input matInput name="area" type="number" required ngModel placeholder="面积 (平方米)">
<input matInput name="area" type="number" ngModel placeholder="面积 (平方米)">
</mat-form-field>
</div>

80
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 && fileSize<tenSize) { //上传文件>10MB时
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
}
//封装 刷新总平面图 数据

15
src/app/ui/collection-tools-building/editPlaneFigure.html

@ -19,7 +19,7 @@
<div class="keyMargin">
<mat-form-field>
<input matInput name="area" type="number" required [(ngModel)]="area" placeholder="面积 (平方米)">
<input matInput name="area" type="number" [(ngModel)]="area" placeholder="面积 (平方米)">
</mat-form-field>
</div>
@ -27,11 +27,22 @@
<textarea name="details" [(ngModel)]="details" placeholder="详情"></textarea>
</div>
<div class="keyMargin image">
<mat-form-field>
<input matInput name="imageWidth" type="number" [(ngModel)]="imgWidth" placeholder="宽" (input)='inputChange(0)'>
</mat-form-field>
<mat-form-field>
<input matInput name="imageHeight" type="number" [(ngModel)]="imgHeight" placeholder="高" (input)='inputChange(1)'>
</mat-form-field>
<label><mat-checkbox color="primary" [(ngModel)]="isItEqual" name="isItEqual" (change)='setImgScale($event)'></mat-checkbox>长宽等比</label>
<p style="font-size: 12px; margin-bottom: 25px;">按Enter键可浏览图片效果</p>
</div>
<div class="submitBottom">
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid">
确定
</button>
<button mat-raised-button mat-dialog-close>取消</button>
<button mat-raised-button (click)='close()' type="button">取消</button>
</div>
</form>

76
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<any>,@Inject(MAT_DIALOG_DATA) public data) { }
constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef<any>,@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,

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

2
src/app/ui/collection-tools-plan/addPlaneFigure.html

@ -29,7 +29,7 @@
<div class="keyMargin">
<mat-form-field>
<input matInput name="area" type="number" required ngModel placeholder="面积 (平方米)">
<input matInput name="area" type="number" ngModel placeholder="面积 (平方米)">
</mat-form-field>
</div>

80
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 && fileSize<tenSize) { //上传文件>10MB时
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
}
//封装 刷新总平面图 数据

15
src/app/ui/collection-tools-plan/editPlaneFigure.html

@ -19,7 +19,7 @@
<div class="keyMargin">
<mat-form-field>
<input matInput name="area" type="number" required [(ngModel)]="area" placeholder="面积 (平方米)">
<input matInput name="area" type="number" [(ngModel)]="area" placeholder="面积 (平方米)">
</mat-form-field>
</div>
@ -27,11 +27,22 @@
<textarea name="details" [(ngModel)]="details" placeholder="详情"></textarea>
</div>
<div class="keyMargin image">
<mat-form-field>
<input matInput name="imageWidth" type="number" [(ngModel)]="imgWidth" placeholder="宽" (input)='inputChange(0)'>
</mat-form-field>
<mat-form-field>
<input matInput name="imageHeight" type="number" [(ngModel)]="imgHeight" placeholder="高" (input)='inputChange(1)'>
</mat-form-field>
<label><mat-checkbox color="primary" [(ngModel)]="isItEqual" name="isItEqual" (change)='setImgScale($event)'></mat-checkbox>长宽等比</label>
<p style="font-size: 12px; margin-bottom: 25px;">按Enter键可浏览图片效果</p>
</div>
<div class="submitBottom">
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid">
确定
</button>
<button mat-raised-button mat-dialog-close>取消</button>
<button mat-raised-button (click)='close()' type="button">取消</button>
</div>
</form>

76
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<any>,@Inject(MAT_DIALOG_DATA) public data) { }
constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef<any>,@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,

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

2
src/app/ui/collection-tools/addPlaneFigure.html

@ -18,7 +18,7 @@
<div class="keyMargin">
<mat-form-field>
<input matInput name="area" type="number" required ngModel placeholder="面积 (平方米)">
<input matInput name="area" type="number" ngModel placeholder="面积 (平方米)">
</mat-form-field>
</div>

80
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 && fileSize<tenSize) { //上传文件>10MB时
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
}
//封装 刷新总平面图 数据

15
src/app/ui/collection-tools/editPlaneFigure.html

@ -19,7 +19,7 @@
<div class="keyMargin">
<mat-form-field>
<input matInput name="area" type="number" required [(ngModel)]="area" placeholder="面积 (平方米)">
<input matInput name="area" type="number" [(ngModel)]="area" placeholder="面积 (平方米)">
</mat-form-field>
</div>
@ -27,11 +27,22 @@
<textarea name="details" [(ngModel)]="details" placeholder="详情"></textarea>
</div>
<div class="keyMargin image">
<mat-form-field>
<input matInput name="imageWidth" type="number" [(ngModel)]="imgWidth" placeholder="宽" (input)='inputChange(0)'>
</mat-form-field>
<mat-form-field>
<input matInput name="imageHeight" type="number" [(ngModel)]="imgHeight" placeholder="高" (input)='inputChange(1)'>
</mat-form-field>
<label><mat-checkbox color="primary" [(ngModel)]="isItEqual" name="isItEqual" (change)='setImgScale($event)'></mat-checkbox>长宽等比</label>
<p style="font-size: 12px; margin-bottom: 25px;">按Enter键可浏览图片效果</p>
</div>
<div class="submitBottom">
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid">
确定
</button>
<button mat-raised-button mat-dialog-close>取消</button>
<button mat-raised-button (click)='close()' type="button">取消</button>
</div>
</form>

76
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<any>,@Inject(MAT_DIALOG_DATA) public data) { }
constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef<any>,@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,

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

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

Loading…
Cancel
Save