chenjingyu 4 years ago
parent
commit
3f2f536e01
  1. 4
      src/app/data-collection/fire-force/fire-force.component.ts
  2. 4
      src/app/data-collection/linkage-forces/linkage-forces.component.ts
  3. 4
      src/app/external-links-plan/external-links-plan.component.ts
  4. 4
      src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts
  5. 4
      src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts
  6. 6
      src/app/plan-audit/plan-record/plan-record.component.ts
  7. 6
      src/app/plan-audit/wait-examineer/wait-examineer.component.ts
  8. 4
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html
  9. 4
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts
  10. 4
      src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
  11. 6
      src/app/plan-management/meet-plan/meet-plan.component.ts
  12. 4
      src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts
  13. 4
      src/app/plan-management/open-plan/open-plan.component.ts
  14. 4
      src/app/plan-management/pass-plan/pass-plan.component.ts
  15. 4
      src/app/plan-management/type-plan/type-plan.component.ts
  16. 4
      src/app/statistic-analysis/all-plan/all-plan.component.ts
  17. 4
      src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.ts
  18. 20
      src/app/ui/collection-tools-plan/collection-tools.component.html
  19. 522
      src/app/ui/collection-tools-plan/collection-tools.component.ts
  20. 8
      src/index.html

4
src/app/data-collection/fire-force/fire-force.component.ts

@ -1147,7 +1147,7 @@ export class FireForceComponent implements OnInit {
doc: {
docId: new Date(),
title: item.fileName,
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+fetchUrl
fetchUrl: `http://172.18.0.1:8000/api/Objects/PlanPlatform/`+fetchUrl
},
user: {
uid: "test",
@ -1161,7 +1161,7 @@ export class FireForceComponent implements OnInit {
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:80/apps/editor/openPreview?data=${base64}`)
window.open(`http://10.81.73.39:18080/apps/editor/openPreview?data=${base64}`)
}
if(suffix == 'mp4'){
const dialogRef = this.dialog.open(ViewDetails, {//调用open方法打开对话框并且携带参数过去

4
src/app/data-collection/linkage-forces/linkage-forces.component.ts

@ -871,7 +871,7 @@ export class LinkageForcesComponent implements OnInit {
doc: {
docId: new Date(),
title: item.fileName,
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+fetchUrl
fetchUrl: `http://172.18.0.1:8000/api/Objects/PlanPlatform/`+fetchUrl
},
user: {
uid: "test",
@ -885,7 +885,7 @@ export class LinkageForcesComponent implements OnInit {
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:80/apps/editor/openPreview?data=${base64}`)
window.open(`http://10.81.73.39:18080/apps/editor/openPreview?data=${base64}`)
}
if(suffix == 'mp4'){
const dialogRef = this.dialog.open(ViewDetails2, {//调用open方法打开对话框并且携带参数过去

4
src/app/external-links-plan/external-links-plan.component.ts

@ -87,7 +87,7 @@ export class ExternalLinksPlanComponent implements OnInit {
docId: docId,
title: filename,
//title: filename,
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/` + this.fetchUrl
fetchUrl: `http://172.18.0.1:8000/api/Objects/PlanPlatform/` + this.fetchUrl
},
user: {
uid: identityJsonparse.sub,
@ -101,7 +101,7 @@ export class ExternalLinksPlanComponent implements OnInit {
var stringjson = JSON.stringify(json)
var wordArray = CryptoJS.enc.Utf8.parse(stringjson);
var base64 = CryptoJS.enc.Base64.stringify(wordArray);
this.src = `http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`
this.src = `http://10.81.73.39:18080/apps/editor/openPreview?data=${base64}`
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
this.showType = 0
})

4
src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts

@ -172,7 +172,7 @@ export class FireforceAuditComponent implements OnInit {
doc: {
docId: docId,
title: item.fileName,
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+fetchUrl
fetchUrl: `http://172.18.0.1:8000/api/Objects/PlanPlatform/`+fetchUrl
},
user: {
uid: identityJsonparse.sub,
@ -186,7 +186,7 @@ export class FireforceAuditComponent implements OnInit {
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:80/apps/editor/openPreview?data=${base64}`)
window.open(`http://10.81.73.39:18080/apps/editor/openPreview?data=${base64}`)
}
if(suffix == 'mp4'){
const dialogRef = this.dialog.open(ViewDetailsComponent, {//调用open方法打开对话框并且携带参数过去

4
src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts

@ -182,7 +182,7 @@ export class LinkageforcesAuditComponent implements OnInit {
doc: {
docId: docId,
title: item.fileName,
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+fetchUrl
fetchUrl: `http://172.18.0.1:8000/api/Objects/PlanPlatform/`+fetchUrl
},
user: {
uid: identityJsonparse.sub,
@ -196,7 +196,7 @@ export class LinkageforcesAuditComponent implements OnInit {
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:80/apps/editor/openPreview?data=${base64}`)
window.open(`http://10.81.73.39:18080/apps/editor/openPreview?data=${base64}`)
}
if(suffix == 'mp4'){
const dialogRef = this.dialog.open(ViewDetailsComponent, {//调用open方法打开对话框并且携带参数过去

6
src/app/plan-audit/plan-record/plan-record.component.ts

@ -246,7 +246,7 @@ export class PlanRecordComponent implements OnInit {
docId: docId,
title: filename,
//title: filename,
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+this.fetchUrl
fetchUrl: `http://172.18.0.1:8000/api/Objects/PlanPlatform/`+this.fetchUrl
},
user: {
uid: identityJsonparse.sub,
@ -260,9 +260,9 @@ export class PlanRecordComponent implements OnInit {
var stringjson=JSON.stringify(json)
var wordArray = CryptoJS.enc.Utf8.parse(stringjson);
var base64 = CryptoJS.enc.Base64.stringify(wordArray);
this.src=`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`
this.src=`http://10.81.73.39:18080/apps/editor/openPreview?data=${base64}`
this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
//window.open(`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`)
//window.open(`http://10.81.73.39:18080/apps/editor/openPreview?data=${base64}`)
})
}
//查看按钮跳转

6
src/app/plan-audit/wait-examineer/wait-examineer.component.ts

@ -317,7 +317,7 @@ export class WaitExamineerComponent implements OnInit {
docId: docId,
title: filename,
//title: filename,
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+this.fetchUrl
fetchUrl: `http://172.18.0.1:8000/api/Objects/PlanPlatform/`+this.fetchUrl
},
user: {
uid: identityJsonparse.sub,
@ -331,9 +331,9 @@ export class WaitExamineerComponent implements OnInit {
var stringjson=JSON.stringify(json)
var wordArray = CryptoJS.enc.Utf8.parse(stringjson);
var base64 = CryptoJS.enc.Base64.stringify(wordArray);
this.src=`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`
this.src=`http://10.81.73.39:18080/apps/editor/openPreview?data=${base64}`
this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
//window.open(`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`)
//window.open(`http://10.81.73.39:18080/apps/editor/openPreview?data=${base64}`)
})
}
//查看按钮跳转

4
src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html

@ -39,7 +39,7 @@
<div class="contentitem" *ngFor="let item of sitePlanItems">
<div>
<img (click)="openPlan(item,-1)"
[src]="item.imageUrl ? item.imageUrl+'?x-oss-process=image/resize,m_fill,h_100,w_100' : '../../../assets/images/noImg.png'"
[src]="item.imageUrl && item.imageUrl != 'null' ? item.imageUrl+'?x-oss-process=image/resize,m_fill,h_100,w_100' : '/assets/images/2D.jpg'"
alt="">
</div>
<p>{{item.name}}</p>
@ -312,7 +312,7 @@
</button>
</div>
</div>
<div class="disposalPoint" *ngIf="item.groupName == '预案附件'">
<div class="disposalPoint" *ngIf="item.groupName == '处置要点'">
<div class="disposalPointItem" *ngFor="let i of item.attribute;let key = index">
<div class="disposalPointTitle">
<input type="text" placeholder="请输入分组名称" [(ngModel)]="i.name">

4
src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts

@ -136,7 +136,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
element.attribute = [{ name: '', imgArr: [] }]
}
}
if (element.groupName == '预案附件') {
if (element.groupName == '处置要点') {
if (!element.attribute) {
element.attribute = [{ name: '', content: '' }]
}
@ -254,6 +254,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
openPlan(item, index) {
sessionStorage.setItem("gisplan", 'look')
sessionStorage.setItem("companyId", this.unitId)
// console.log(item)
let data = { select: item, key: index, allBuildings: this.allBuildings }
let width = Math.round(document.body.clientWidth * 0.8) + 'px'
let height = Math.round(document.body.clientHeight * 0.9) + 'px'
@ -439,6 +440,7 @@ export class OpenPlanToolDialog {
}
this.http.get("/api/Buildings", { params: { companyId: this.route.snapshot.queryParams.companyId } }).subscribe((data: any) => {
this.plan.allBuildings = data
this.plan.isGis = this.data.select.isGis
this.plan.seekPanelPoint(parameter)
})
}

4
src/app/plan-management/entry-plan-look/entry-plan-look.component.ts

@ -139,7 +139,7 @@ export class EntryPlanLookComponent implements OnInit {
doc: {
docId: docId,
title: filename,
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/` + fetchUrl,
fetchUrl: `http://172.18.0.1:8000/api/Objects/PlanPlatform/` + fetchUrl,
},
user: {
uid: identityJsonparse.sub,
@ -155,7 +155,7 @@ export class EntryPlanLookComponent implements OnInit {
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:80/apps/editor/openPreview?data=${base64}`)
window.open(`http://10.81.73.39:18080/apps/editor/openPreview?data=${base64}`)
})
}
}

6
src/app/plan-management/meet-plan/meet-plan.component.ts

@ -217,7 +217,7 @@ export class MeetPlanComponent implements OnInit {
//查看预案
openPlan(element){
//fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+fetchUrl
//fetchUrl: `http://172.18.0.1:8000/api/Objects/PlanPlatform/`+fetchUrl
let filename:string
let fetchUrl = element.attachmentUrls[0]
let docIdWordArray = CryptoJS.enc.Utf8.parse(`PlanPlatform/` + fetchUrl);
@ -232,7 +232,7 @@ export class MeetPlanComponent implements OnInit {
doc: {
docId: docId,
title: filename,
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+fetchUrl,
fetchUrl: `http://172.18.0.1:8000/api/Objects/PlanPlatform/`+fetchUrl,
},
user: {
uid: identityJsonparse.sub,
@ -248,7 +248,7 @@ export class MeetPlanComponent implements OnInit {
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:80/apps/editor/openPreview?data=${base64}`)
window.open(`http://10.81.73.39:18080/apps/editor/openPreview?data=${base64}`)
})
}

4
src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts

@ -241,7 +241,7 @@ export class OnetwoEntryPlanComponent implements OnInit {
doc: {
docId: docId,
title: filename,
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+fetchUrl,
fetchUrl: `http://172.18.0.1:8000/api/Objects/PlanPlatform/`+fetchUrl,
},
user: {
uid: identityJsonparse.sub,
@ -257,7 +257,7 @@ export class OnetwoEntryPlanComponent implements OnInit {
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:80/apps/editor/openPreview?data=${base64}`)
window.open(`http://10.81.73.39:18080/apps/editor/openPreview?data=${base64}`)
})

4
src/app/plan-management/open-plan/open-plan.component.ts

@ -222,7 +222,7 @@ export class OpenPlanComponent implements OnInit {
doc: {
docId: docId,
title: filename,
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+fetchUrl,
fetchUrl: `http://172.18.0.1:8000/api/Objects/PlanPlatform/`+fetchUrl,
},
user: {
uid: identityJsonparse.sub,
@ -236,7 +236,7 @@ export class OpenPlanComponent implements OnInit {
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:80/apps/editor/openPreview?data=${base64}`)
window.open(`http://10.81.73.39:18080/apps/editor/openPreview?data=${base64}`)
})
}
}

4
src/app/plan-management/pass-plan/pass-plan.component.ts

@ -369,7 +369,7 @@ export class PassPlanComponent implements OnInit {
doc: {
docId: docId,
title: filename,
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+fetchUrl,
fetchUrl: `http://172.18.0.1:8000/api/Objects/PlanPlatform/`+fetchUrl,
},
user: {
uid: identityJsonparse.sub,
@ -383,7 +383,7 @@ export class PassPlanComponent implements OnInit {
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:80/apps/editor/openPreview?data=${base64}`)
window.open(`http://10.81.73.39:18080/apps/editor/openPreview?data=${base64}`)
})
}
}

4
src/app/plan-management/type-plan/type-plan.component.ts

@ -222,7 +222,7 @@ export class TypePlanComponent implements OnInit {
doc: {
docId: docId,
title: filename,
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+fetchUrl,
fetchUrl: `http://172.18.0.1:8000/api/Objects/PlanPlatform/`+fetchUrl,
},
user: {
uid: identityJsonparse.sub,
@ -238,7 +238,7 @@ export class TypePlanComponent implements OnInit {
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:80/apps/editor/openPreview?data=${base64}`)
window.open(`http://10.81.73.39:18080/apps/editor/openPreview?data=${base64}`)
})

4
src/app/statistic-analysis/all-plan/all-plan.component.ts

@ -108,7 +108,7 @@ export class AllPlanComponent implements OnInit {
doc: {
docId: docId,
title: filename,
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+fetchUrl,
fetchUrl: `http://172.18.0.1:8000/api/Objects/PlanPlatform/`+fetchUrl,
},
user: {
uid: identityJsonparse.sub,
@ -122,7 +122,7 @@ export class AllPlanComponent implements OnInit {
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:80/apps/editor/openPreview?data=${base64}`)
window.open(`http://10.81.73.39:18080/apps/editor/openPreview?data=${base64}`)
})
}
}

4
src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.ts

@ -370,7 +370,7 @@ export class PlanAnalysisBySynthesisComponent implements OnInit {
doc: {
docId: docId,
title: filename,
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/` + fetchUrl,
fetchUrl: `http://172.18.0.1:8000/api/Objects/PlanPlatform/` + fetchUrl,
},
user: {
uid: identityJsonparse.sub,
@ -384,7 +384,7 @@ export class PlanAnalysisBySynthesisComponent implements OnInit {
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:80/apps/editor/openPreview?data=${base64}`)
window.open(`http://10.81.73.39:18080/apps/editor/openPreview?data=${base64}`)
})
}
}

20
src/app/ui/collection-tools-plan/collection-tools.component.html

@ -35,21 +35,11 @@
<img src="/assets/images/czsf.png" alt="">
重置缩放
</span>
<ng-container *ngIf="!isGis; else elseTemplate">
<span title="导出图片" class="zoom" (click)="takeScreenshot()">
<mat-icon>image</mat-icon>
导出图片
</span>
</ng-container>
<ng-template #elseTemplate>
<span title="导出图片" class="zoom" (click)="takeScreenshotGis()">
<mat-icon>image</mat-icon>
导出图片
</span>
</ng-template>
<span title="导出图片" class="zoom" (click)="takeScreenshot()">
<mat-icon>image</mat-icon>
导出图片
</span>
<span class="rightSave">
<!-- <mat-icon title="查看/编辑模式" (click)="lookpat()" *ngIf="isEditPattern">tv</mat-icon>
<mat-icon title="查看/编辑模式" (click)="editpat()" *ngIf="!isEditPattern && isediticon">create</mat-icon> -->

522
src/app/ui/collection-tools-plan/collection-tools.component.ts

@ -86,7 +86,7 @@ export class CollectionToolsPlanComponent implements OnInit {
gallery//viewerJs实例
//设置属性框
setAssetsProperty(obj) {
console.log('传进来的属性信息', obj)
// console.log('传进来的属性信息', obj)
//初始化viewerJs实例
setTimeout(() => {
obj.PropertyInfos.forEach(item => {
@ -165,7 +165,11 @@ export class CollectionToolsPlanComponent implements OnInit {
resetZoom() {
this.canvas.resetCamera2D()
}
//放大图标
iconScale() {
let number = Number(this.selected)
this.canvas.setIconScale(number)
}
//消防要素div边框高度调节
firecategoriesDivMouseDown(e) {
@ -185,7 +189,6 @@ export class CollectionToolsPlanComponent implements OnInit {
document.onmouseup = null;
}
}
//左侧div边框宽度调节
leftDivMouseDown(e) {
document.onmousemove = (ev) => {
@ -202,8 +205,6 @@ export class CollectionToolsPlanComponent implements OnInit {
document.onmouseup = null;
}
}
//右侧div边框宽度调节
rightDivMouseDown(e) {
document.onmousemove = (ev) => {
@ -221,12 +222,10 @@ export class CollectionToolsPlanComponent implements OnInit {
}
}
//放大图标
iconScale() {
let number = Number(this.selected)
this.canvas.setIconScale(number)
//判断是否是数字类型
myIsNaN(value) {
return typeof value === 'number' && !isNaN(value);
}
//素材宽度输入框改变
assetWidthIunput() {
this.canvasAssetObj.Width = this.assetWidth
@ -236,7 +235,6 @@ export class CollectionToolsPlanComponent implements OnInit {
}
}
//素材高度输入框改变
assetHeightIunput() {
this.canvasAssetObj.Height = this.assetHeight
@ -245,7 +243,6 @@ export class CollectionToolsPlanComponent implements OnInit {
this.canvas.refreshIcon(this.canvasAssetObj.Id)
}
}
//素材角度输入框改变
assetAngleIunput() {
this.canvasAssetObj.Angle = this.sliderValue
@ -254,7 +251,6 @@ export class CollectionToolsPlanComponent implements OnInit {
this.canvas.refreshIcon(this.canvasAssetObj.Id)
}
}
//素材厚度输入框改变
assetThicknessIunput() {
this.canvasAssetObj.Thickness = this.sliderValueThickness
@ -263,7 +259,6 @@ export class CollectionToolsPlanComponent implements OnInit {
this.canvas.refreshIcon(this.canvasAssetObj.Id)
}
}
//素材是否高亮改变----->本地操作行为
assetHighLightIunput() {
// console.log(this.isHighLight,this.canvasAssetObj)
@ -272,10 +267,6 @@ export class CollectionToolsPlanComponent implements OnInit {
// this.canvas.setHighlight(arr)
}
//判断是否是数字类型
myIsNaN(value) {
return typeof value === 'number' && !isNaN(value);
}
//动态属性素材input框值改变
assetInputChange(i, e) {
let index = this.canvasAssetObj.PropertyInfos.findIndex((item) => {
@ -414,7 +405,6 @@ export class CollectionToolsPlanComponent implements OnInit {
config.duration = 3000
this.snackBar.open('图片数量已达上限', '确定', config);
}
//删除素材属性图片
deleteImg() {
if (this.imagesArr.length == 0) {
@ -486,8 +476,110 @@ export class CollectionToolsPlanComponent implements OnInit {
}//多个素材共同属性
multipleAssetData: any//当前多选的素材
firstMultipleAssetData: any//当前多选的第一个素材
//多选宽度共同改变
multipleAssetWidthInput() {
this.multipleAssetData.forEach(item => {
item.assetData.Width = this.multipleAsset.Width
this.canvas.refreshIcon(item.assetData.Id)
this.canvasData.isChange = true
})
}
//多选高度共同改变
multipleAssetHeightInput() {
this.multipleAssetData.forEach(item => {
item.assetData.Height = this.multipleAsset.Height
this.canvas.refreshIcon(item.assetData.Id)
this.canvasData.isChange = true
})
}
//多选角度共同改变
multipleAssetAngleInput() {
this.multipleAssetData.forEach(item => {
item.assetData.Angle = this.multipleAsset.Angle
this.canvas.refreshIcon(item.assetData.Id)
this.canvasData.isChange = true
})
}
//多选厚度共同改变
multipleAssetThicknessInput() {
this.multipleAssetData.forEach(item => {
item.assetData.Thickness = this.multipleAsset.Thickness
this.canvas.refreshIcon(item.assetData.Id)
this.canvasData.isChange = true
})
}
//多选颜色共同改变
multipleSelectedcolor: any
multipleAssetSelectcolor(item, key) {
//在当前透明度基础上改变颜色
this.multipleSelectedcolor = item
this.multipleAssetData.forEach(item => {
item.assetData.Color = this.multipleSelectedcolor
this.canvasData.isChange = true
this.canvas.refreshIcon(item.assetData.Id)
})
}
//多选颜色滑竿改变
multipleColorDivSliderChange() {
let colorOpacity = Math.round(255 * this.colorDivSliderValue * 0.01)
//根据滑竿值改变16进制颜色后两位
function replacepos(text, start, stop, replacetext) {
let mystr = text.substring(0, stop - 1) + replacetext + text.substring(stop + 1);
return mystr;
}
this.multipleAssetData.forEach(item => {
this.multipleSelectedcolor = replacepos(this.multipleSelectedcolor, 7, 8, colorOpacity.toString(16))
item.assetData.Color = this.multipleSelectedcolor
this.canvasData.isChange = true
this.canvas.refreshIcon(item.assetData.Id)
})
}
//多选状态动态属性素材input框值改变
multipleAssetInputChange(i, e) {
e.stopPropagation()
setTimeout(() => {
this.multipleAssetData.forEach(item => {
item.assetData.PropertyInfos.forEach(element => {
if (element.PropertyName == i.PropertyName) {
if (this.myIsNaN(i.PropertyValue)) {
i.PropertyValue = String(i.PropertyValue)
}
element.PropertyValue = i.PropertyValue
this.canvas.refreshIcon(item.assetData.Id)
this.canvasData.isChange = true
}
})
})
}, 0);
}
//多选状态动态属性素材radio框值改变
multipleAssetRadioChange(i, value) {
// e.stopPropagation()
this.multipleAssetData.forEach(item => {
// console.log(item)
item.assetData.PropertyInfos.forEach(element => {
if (element.PropertyName == i.PropertyName) {
element.PropertyValue = value
this.canvas.refreshIcon(item.assetData.Id)
this.canvasData.isChange = true
}
})
})
}
//多选状态动态属性素材下拉框值改变
multipleSupplyArea(i, e) {
e.stopPropagation()
this.multipleAssetData.forEach(item => {
item.assetData.PropertyInfos.forEach(element => {
if (element.PropertyName == i.PropertyName) {
element.PropertyValue = i.PropertyValue
this.canvas.refreshIcon(item.assetData.Id)
this.canvasData.isChange = true
}
})
})
}
ngOnInit(): void {
let _this = this
AxMessageSystem.addListener('selectionChanged', () => {
if (this.canvas.selection.size() == 1) {//如果是单选
@ -588,118 +680,16 @@ export class CollectionToolsPlanComponent implements OnInit {
// 删除建筑数据
delete this.canvasData.originalcompanyBuildingData.data[this.clickId];
console.log('originalcompanyBuildingData', this.canvasData.originalcompanyBuildingData)
console.log('originaleveryStoreyData', this.canvasData.originaleveryStoreyData)
// console.log('originalcompanyBuildingData', this.canvasData.originalcompanyBuildingData)
// console.log('originaleveryStoreyData', this.canvasData.originaleveryStoreyData)
}
}
//多选宽度共同改变
multipleAssetWidthInput() {
this.multipleAssetData.forEach(item => {
item.assetData.Width = this.multipleAsset.Width
this.canvas.refreshIcon(item.assetData.Id)
this.canvasData.isChange = true
})
}
//多选高度共同改变
multipleAssetHeightInput() {
this.multipleAssetData.forEach(item => {
item.assetData.Height = this.multipleAsset.Height
this.canvas.refreshIcon(item.assetData.Id)
this.canvasData.isChange = true
})
}
//多选角度共同改变
multipleAssetAngleInput() {
this.multipleAssetData.forEach(item => {
item.assetData.Angle = this.multipleAsset.Angle
this.canvas.refreshIcon(item.assetData.Id)
this.canvasData.isChange = true
})
}
//多选厚度共同改变
multipleAssetThicknessInput() {
this.multipleAssetData.forEach(item => {
item.assetData.Thickness = this.multipleAsset.Thickness
this.canvas.refreshIcon(item.assetData.Id)
this.canvasData.isChange = true
})
}
//多选颜色共同改变
multipleSelectedcolor: any
multipleAssetSelectcolor(item, key) {
//在当前透明度基础上改变颜色
this.multipleSelectedcolor = item
this.multipleAssetData.forEach(item => {
item.assetData.Color = this.multipleSelectedcolor
this.canvasData.isChange = true
this.canvas.refreshIcon(item.assetData.Id)
})
}
//多选颜色滑竿改变
multipleColorDivSliderChange() {
let colorOpacity = Math.round(255 * this.colorDivSliderValue * 0.01)
//根据滑竿值改变16进制颜色后两位
function replacepos(text, start, stop, replacetext) {
let mystr = text.substring(0, stop - 1) + replacetext + text.substring(stop + 1);
return mystr;
}
this.multipleAssetData.forEach(item => {
this.multipleSelectedcolor = replacepos(this.multipleSelectedcolor, 7, 8, colorOpacity.toString(16))
item.assetData.Color = this.multipleSelectedcolor
this.canvasData.isChange = true
this.canvas.refreshIcon(item.assetData.Id)
})
}
//多选状态动态属性素材input框值改变
multipleAssetInputChange(i, e) {
e.stopPropagation()
setTimeout(() => {
this.multipleAssetData.forEach(item => {
item.assetData.PropertyInfos.forEach(element => {
if (element.PropertyName == i.PropertyName) {
if (this.myIsNaN(i.PropertyValue)) {
i.PropertyValue = String(i.PropertyValue)
}
element.PropertyValue = i.PropertyValue
this.canvas.refreshIcon(item.assetData.Id)
this.canvasData.isChange = true
}
})
})
}, 0);
}
//多选状态动态属性素材radio框值改变
multipleAssetRadioChange(i, value) {
// e.stopPropagation()
this.multipleAssetData.forEach(item => {
// console.log(item)
item.assetData.PropertyInfos.forEach(element => {
if (element.PropertyName == i.PropertyName) {
element.PropertyValue = value
this.canvas.refreshIcon(item.assetData.Id)
this.canvasData.isChange = true
}
})
})
}
//多选状态动态属性素材下拉框值改变
multipleSupplyArea(i, e) {
e.stopPropagation()
this.multipleAssetData.forEach(item => {
item.assetData.PropertyInfos.forEach(element => {
if (element.PropertyName == i.PropertyName) {
element.PropertyValue = i.PropertyValue
this.canvas.refreshIcon(item.assetData.Id)
this.canvasData.isChange = true
}
})
})
}
ngAfterViewInit(): void {
//不是gis模块平面图
if (this.router.url.indexOf("gis") == -1) {
if (this.router.url.indexOf("gis") == -1 && this.router.url.indexOf("createplanonlinefive") == -1) {
this.getSitePlan()
}
}
@ -719,7 +709,11 @@ export class CollectionToolsPlanComponent implements OnInit {
}
//截图
takeScreenshot() {
this.canvas.takeScreenshot();
if (!this.isGis) {
this.canvas.takeScreenshot();
} else {
this.takeScreenshotGis()
}
}
canvasImg
takeScreenshotGis() {
@ -763,11 +757,6 @@ export class CollectionToolsPlanComponent implements OnInit {
this.canvas.setNameVisible(this.basicInfo, 0)
}
//点击想定作业名称
wantToWorkClick() {
this.wantToWork = !this.wantToWork
this.canvas.setNameVisible(this.wantToWork, 1)
}
isEditPattern: boolean = true //是否为编辑模式
//进入编辑模式
@ -1129,7 +1118,6 @@ export class CollectionToolsPlanComponent implements OnInit {
})
}
//创建建筑
createBuilding() {
let data = {
@ -1248,7 +1236,6 @@ export class CollectionToolsPlanComponent implements OnInit {
}
}
}
storeyData //将建筑素材和当前楼层素材合二为一
//处理 tree 数据结构
handleTreeData(storeyData) {
@ -1294,7 +1281,6 @@ export class CollectionToolsPlanComponent implements OnInit {
this.treeControl.expandAll()
}
//点击树节点
clickTreeNode(node) {
if (this.canvasData.originalcompanyBuildingData.data[node.id]) {
@ -1338,15 +1324,12 @@ export class CollectionToolsPlanComponent implements OnInit {
//点击数节点的显示隐藏icon
clickLookItem(node) {
//修改真实素材islook属性
for (let key in this.storeyData.data) {
if (key == node.id) {
this.storeyData.data[key].isLook = !this.storeyData.data[key].isLook
}
}
//所有消防要素模板变化islook值
if (node.isTemplate) {
this.allFireElements.forEach(item => {
@ -1355,7 +1338,6 @@ export class CollectionToolsPlanComponent implements OnInit {
})
}
//子节点跟随父节点的islook变化
if (node.children && node.children.length != 0) {
node.children.forEach(item => {
@ -1368,7 +1350,6 @@ export class CollectionToolsPlanComponent implements OnInit {
})
}
const nodes = this.treeControl.dataNodes;
const expandNodes = [];
nodes.forEach((item) => {
@ -1376,9 +1357,7 @@ export class CollectionToolsPlanComponent implements OnInit {
expandNodes.push(item.id);
}
});
this.dataSource.data = [...this.dataSource.data]
let newNodes = this.treeControl.dataNodes;
newNodes = newNodes.filter(n => {
return expandNodes.indexOf(n.id) >= 0;
@ -1409,6 +1388,7 @@ export class CollectionToolsPlanComponent implements OnInit {
//封装 刷新 tree 数据
async renovateTreeData(isRefresh: boolean = true) {
// this.allFireElements[this.allFireElements.length-1].children = []
console.log(888, this.selectingSitePlan)
if (!this.selectingSitePlan.isGis) {
isRefresh ? await this.canvas.refresh() : null
this.canvas.setNameVisible(this.basicInfo, 0)
@ -1441,8 +1421,7 @@ export class CollectionToolsPlanComponent implements OnInit {
}
map: any
toLoadGis() {
// console.log(666666, this.selectingSitePlan)
console.log(666666, this.isGis)
this.map = new AMap.Map('planContainer', {
viewMode: '2D', // 默认使用 2D 模式,如果希望使用带有俯仰角的 3D 模式,请设置 viewMode: '3D',
zoom: 11, //初始化地图层级
@ -2308,260 +2287,6 @@ export class CollectionToolsPlanComponent implements OnInit {
}
//处置预案
allFirePlan: any = []; //所有灾情
selectDisposalNode: string = ''; //当前点击tree节点 css选中样式
//获取所有灾情
getAllFirePlan() {
let params = { componentId: sessionStorage.getItem('planId') }
this.http.get('/api/Disasters', { params: params }).subscribe((data: any) => {
if (!data.length) { //该 单位没有灾情时
let msg = {
name: '灾情',
modifiedTime: new Date(),
planComponentId: sessionStorage.getItem('planId')
}
this.http.post('/api/Disasters', msg).subscribe(data => {
this.allFirePlan.push(data)
let params = { disasterId: this.allFirePlan[0].id || '' }
this.http.get('/api/DisposalNodes', { params: params }).subscribe(data => { //所有处置节点
this.canvasData.allDisposalNode = data
})
})
} else { //单位 有灾情时
this.allFirePlan = data
let params = { disasterId: this.allFirePlan[0].id || '' }
this.http.get('/api/DisposalNodes', { params: params }).subscribe(data => { //所有处置节点
this.canvasData.allDisposalNode = data
})
}
})
}
//获取所有处置节点
getDisposalNode() {
this.selectDisposalNode = ''
let params = { disasterId: this.allFirePlan[0].id || '' }
this.http.get('/api/DisasterData/Markers', { params: params }).subscribe(data => { //灾情标签信息
this.canvasData.allNodeMarkers = data
this.mateFireForce()
})
this.http.get('/api/DisposalNodes', { params: params }).subscribe(data => { //处置节点
this.canvasData.allDisposalNode = data
this.handleHybridTree()
})
}
treeData: any = []; //渲染tree处理完成数据
defaultExpandedKeys: any = []; //首次渲染 tree展开状态
//处理 节点 Tree数据
handleHybridTree() {
this.defaultExpandedKeys = []
let treeData = []
let data = JSON.parse(JSON.stringify(this.canvasData.allDisposalNode || []))
data.forEach(element => {
this.defaultExpandedKeys.push(element.id)
element.title = element.name //name
element.key = element.id //id
element.children = [] //children
if (element.sitePlanId || element.buildingAreaId) { //是数据节点
element.isLeaf = true
element.isDataNode = true
} else { //不是数据节点
element.isLeaf = false
element.isDataNode = false
}
data.forEach(item => {
item.parentId === element.id ? element.children.push(item) : null
})
});
data.forEach(element => {
!element.parentId ? treeData.push(element) : null
})
this.treeData = [...treeData]
this.defaultExpandedKeys = [...this.defaultExpandedKeys]
}
//刷新 treeData 保存已展开节点
refurbishTreeData() {
this.defaultExpandedKeys = []
let params = { disasterId: this.allFirePlan[0].id || '' }
this.http.get('/api/DisposalNodes', { params: params }).subscribe(nodeData => { //处置节点
this.canvasData.allDisposalNode = nodeData
let oldTreeData = this.nzTreeComponent.getExpandedNodeList()
oldTreeData.forEach(item => {
this.defaultExpandedKeys.push(item.key)
})
let treeData = []
let data = JSON.parse(JSON.stringify(this.canvasData.allDisposalNode || []))
data.forEach(element => {
element.title = element.name //name
element.key = element.id //id
element.children = [] //children
if (element.sitePlanId || element.buildingAreaId) { //是数据节点
element.isLeaf = true
element.isDataNode = true
} else { //不是数据节点
element.isLeaf = false
element.isDataNode = false
}
data.forEach(item => {
item.parentId === element.id ? element.children.push(item) : null
})
});
data.forEach(element => {
!element.parentId ? treeData.push(element) : null
})
this.treeData = [...treeData]
this.defaultExpandedKeys = [...this.defaultExpandedKeys]
})
}
sitePlanIcon = { fire: 0, force: 0 } // 总平面图 火源/力量 图标 是否展示
//刷新 建筑楼层 匹配 火源/力量 图标
mateFireForce() {
let data = this.canvasData.allNodeMarkers.markers || {}
for (let key in data) { //遍历 火/力量 图标
this.sitePlanData.forEach(element => { //楼层
if (element.id == key) { // 相匹配时
data[key].fireCount != 0 ? element.fire = 1 : element.fire = 0
data[key].forceCount != 0 ? element.force = 1 : element.force = 0
}
});
this.allBuildings.forEach(element => { //建筑
if (element.id == key) { // 相匹配时
data[key].fireCount != 0 ? element.fire = 1 : element.fire = 0
data[key].forceCount != 0 ? element.force = 1 : element.force = 0
}
});
if (this.params.companyId == key) { //总平面图时
data[key].fireCount != 0 ? this.sitePlanIcon.fire = 1 : this.sitePlanIcon.fire = 0
data[key].forceCount != 0 ? this.sitePlanIcon.force = 1 : this.sitePlanIcon.force = 0
}
}
let buildingMSG = this.canvasData.allNodeMarkers.highlightMarkers || {}
for (let key in buildingMSG) {
if (key === this.canvasData.selectPanelPoint.DisposalNodeId) {
for (let keys in buildingMSG[key]) {
this.sitePlanData.forEach(element => { //楼层
if (element.id === keys) {
buildingMSG[key][keys].fireCount != 0 ? element.fire = 2 : null
buildingMSG[key][keys].forceCount != 0 ? element.force = 2 : null
}
});
this.allBuildings.forEach(element => { //建筑
if (element.id === keys) { // 相匹配时
buildingMSG[key][keys].fireCount != 0 ? element.fire = 2 : null
buildingMSG[key][keys].forceCount != 0 ? element.force = 2 : null
}
});
if (this.params.companyId === keys) { //总平面图时
buildingMSG[key][keys].fireCount != 0 ? this.sitePlanIcon.fire = 2 : null
buildingMSG[key][keys].forceCount != 0 ? this.sitePlanIcon.force = 2 : null
}
}
}
}
}
// 切换 基本信息时 刷新 删除 建筑楼层 自定义属性
mateDeleteCustomize() {
this.canvasData.selectPanelPointBaseData = { description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: '' }
this.defaultExpandedKeys = []
this.sitePlanIcon = { fire: 0, force: 0 }
this.sitePlanData.forEach(element => { //楼层
delete element.fire
delete element.force
});
this.allBuildings.forEach(element => { //建筑
delete element.fire
delete element.force
});
}
//计算差异
countValue(e) {
e.stopPropagation()
let params = { disasterId: this.allFirePlan[0].id || '' }
this.http.get('/api/DisasterData/Diffs', { params: params }).subscribe(data => {
this.canvasData.allNodeMarkers = data
this.mateFireForce()
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('计算差异完成', '确定', config);
})
}
//复制 处置预案 节点
copyPanelPoint(e, item, treeData) {
e.stopPropagation()
if (confirm(`确定要复制 ${item.title} ?`)) {
let params = { id: item.origin.id }
let order
if (item.level == 0) {
treeData.length ? order = treeData[treeData.length - 1].order + 1 : order = 0
} else {
let parent = item.getParentNode() //获取父节点
parent.origin.children.length ? order = parent.origin.children[parent.origin.children.length - 1].order + 1 : order = 0
}
let data = {
name: item.title + '(副本)',
level: item.level,
order: order,
description: '',
disasterId: item.origin.disasterId || '',
parentId: item.origin.parentId || null,
planComponentId: item.origin.planComponentId || '',
}
this.http.post('/api/DisposalNodes/Clone', data, { params: params }).subscribe(data => {
this.refurbishTreeData()
})
} //isTrue
}
//删除 处置预案 节点
deletePanelPoint(e, item) {
e.stopPropagation()
if (confirm(`确定要删除 ${item.name} ?`)) {
this.http.delete(`/api/DisposalNodes/${item.id}`).subscribe(data => {
this.refurbishTreeData()
})
}
}
//点击 处置Tree节点
selectanelPoint(e) {
if (!e.buildingAreaId && !e.sitePlanId) { //当前节点 不是 数据节点 时
let msg = this.canvasData.findDisposalNode(e.id)
this.canvasData.selectPanelPointBaseData = msg
this.selectDisposalNode == msg.id ? this.selectDisposalNode = '' : this.selectDisposalNode = msg.id //选中 节点
} else if (e.buildingAreaId || e.sitePlanId) { //当前节点 是 数据节点 时
let msg = this.canvasData.findDisposalNode(e.parentId)
this.canvasData.selectPanelPointBaseData = msg
this.selectDisposalNode = e.parentId //选中 节点
if (this.canvasData.selectPanelPoint.DisposalNodeId != e.id) { //选择节点 不是当前节点时
let params = { nodeId: e.id }
let parameter = { //查询 节点 对应 建筑/楼层 index,id
buildingIndex: e.sitePlanId ? -1 : this.allBuildings.findIndex(item => { return item.id === e.buildingId }), //总平面图/建筑 index
storeyId: e.sitePlanId ? e.sitePlanId : e.buildingAreaId, //楼层id
}
this.http.get('/api/DisposalNodeData', { params: params }).subscribe(data => {
this.canvasData.selectPanelPoint = this.canvasData.deserialize(JSON.stringify(data || new DisposalNodeData())) //选择 当前 节点
this.canvasData.selectPanelPoint.Data = this.canvasData.deserialize(this.canvasData.selectPanelPoint.Data)
this.seekPanelPoint(parameter)
})
} //if
} //else if
}
//查找 数据节点 对应 建筑/楼层
seekPanelPoint(paramsData) {
this.checkedBuildingIndex = paramsData.buildingIndex
@ -2576,7 +2301,6 @@ export class CollectionToolsPlanComponent implements OnInit {
this.selectingSitePlan = this.sitePlanData[index] || {}
this.canvasData.selectStorey = this.sitePlanData[index] || {} //服务中 存一份数据
this.selectSitePlanIndex = index
Promise.all([fireData, planData]).then((res) => {
this.getSitePlanStorey(this.selectingSitePlan) //获取 平面图 楼层数据
})

8
src/index.html

@ -22,10 +22,10 @@
<app-root></app-root>
</body>
<!-- <script src="http://10.81.73.39:8000/webapi/maps?v=2.0&key=e4b359dc7b03f9418b7497f807131346&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="http://10.81.73.39:8000/webapi/ui/1.1/main.js"></script> -->
<script src="https://webapi.amap.com/maps?v=2.0&key=e4b359dc7b03f9418b7497f807131346&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="https://webapi.amap.com/ui/1.1/main.js"></script>
<script src="http://10.81.73.39:8000/webapi/maps?v=2.0&key=e4b359dc7b03f9418b7497f807131346&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="http://10.81.73.39:8000/webapi/ui/1.1/main.js"></script>
<!-- <script src="https://webapi.amap.com/maps?v=2.0&key=e4b359dc7b03f9418b7497f807131346&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="https://webapi.amap.com/ui/1.1/main.js"></script> -->
<script src="/assets/html2canvas.js"></script>
</html>

Loading…
Cancel
Save