From 411104cfc1aaf64183a01aea5756f9d6c15f2083 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Sun, 16 Jan 2022 17:40:01 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gis-labeling/gis-labeling.component.ts | 90 ++++++++++--------- .../collection-tools.component.ts | 30 ++++--- .../collection-tools.component.ts | 4 +- .../collection-tools.component.ts | 4 +- 4 files changed, 67 insertions(+), 61 deletions(-) diff --git a/src/app/gis-management/gis-labeling/gis-labeling.component.ts b/src/app/gis-management/gis-labeling/gis-labeling.component.ts index c0f837f..6cb62ce 100644 --- a/src/app/gis-management/gis-labeling/gis-labeling.component.ts +++ b/src/app/gis-management/gis-labeling/gis-labeling.component.ts @@ -402,7 +402,7 @@ export class GisLabelingComponent implements OnInit { } this.unitCluster = MapFactory.MarkerClusterInstance(this.map, unitMarkerArrcluster, { gridSize: gridSize, // 设置网格像素大小 - maxZoom :15, + maxZoom: 15, render: render //自定义聚合点样式, 自定义非聚合点样式 }); this.unitCluster.on('click', (e) => { @@ -585,7 +585,7 @@ export class GisLabelingComponent implements OnInit { } this.fireForceCluster = MapFactory.MarkerClusterInstance(this.map, fireForceMarkerArrcluster, { gridSize: gridSize, // 设置网格像素大小 - maxZoom :15, + maxZoom: 15, render: render //自定义聚合点样式, 自定义非聚合点样式 }); @@ -735,7 +735,7 @@ export class GisLabelingComponent implements OnInit { this.linkageForcesCluster = MapFactory.MarkerClusterInstance(this.map, linkageForcesMarkerArrcluster, { gridSize: gridSize, // 设置网格像素大小 - maxZoom :15, + maxZoom: 15, render: render //自定义聚合点样式, 自定义非聚合点样式 }); @@ -910,7 +910,7 @@ export class GisLabelingComponent implements OnInit { // } this.waterCluster = MapFactory.MarkerClusterInstance(this.map, waterMarkerArrcluster, { gridSize: gridSize, // 设置网格像素大小 - maxZoom :15, + maxZoom: 15, render: render //自定义聚合点样式, 自定义非聚合点样式 }); @@ -1308,7 +1308,7 @@ export class GisLabelingComponent implements OnInit { //分享 share(e) { let data = { - url: 'https://www.baidu.com/', + url: 'https://', buildingType: e.buildingTypes[0].name, address: e.address } @@ -1577,7 +1577,8 @@ export class LookPlanDialog { ngOnInit() { - console.log(this.data) + sessionStorage.setItem("companyId", this.data.id) + console.log(this.data) this.getAllPlans() } //关闭弹窗 @@ -1639,53 +1640,56 @@ export class LookPlanDialog { } */ let companyId = sessionStorage.getItem("companyId") if (e.planType == 16 || e.planType == 4 || e.planType == 8) { - if (e.planType == 16&&e.attachmentUrls == null){ - window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${companyId}&planName=${e.name}&unitName=${this.data.name}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${this.data.buildingTypes[0].id}&orName=${this.data.organizationName}&pattern=false`) - }else{ - var index = e.attachmentUrls[0].indexOf("\/") - let fetchUrl = e.attachmentUrls[0] - //console.log(fetchUrl) - if (fetchUrl) { - let suffix = fetchUrl.split('.')[fetchUrl.split('.').length - 1].toLowerCase() - if (suffix == 'docx' || suffix == 'doc') { - let arr = fetchUrl.split('.') - arr[arr.length - 1] = 'pdf' - window.open(`/api/Objects/PlanPlatform/` + arr.join('.')) - } else if (suffix == 'pdf') { - window.open(`/api/Objects/PlanPlatform/` + fetchUrl) - } else { - let config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('该文件类型暂不支持在线查看', '确定', config); + if (e.planType == 16 && e.attachmentUrls == null) { + window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${companyId}&planName=${e.name}&unitName=${this.data.name}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${this.data.buildingTypes[0].id}&orName=${this.data.organizationName}&pattern=false`) + } else { + var index = e.attachmentUrls[0].indexOf("\/") + let fetchUrl = e.attachmentUrls[0] + //console.log(fetchUrl) + if (fetchUrl) { + let suffix = fetchUrl.split('.')[fetchUrl.split('.').length - 1].toLowerCase() + if (suffix == 'docx' || suffix == 'doc') { + let arr = fetchUrl.split('.') + arr[arr.length - 1] = 'pdf' + window.open(`/api/Objects/PlanPlatform/` + arr.join('.')) + } else if (suffix == 'pdf') { + window.open(`/api/Objects/PlanPlatform/` + fetchUrl) + } else { + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('该文件类型暂不支持在线查看', '确定', config); + } } - } - + } - - } - if (e.planType == 1) { //如果是在线编辑 + + } + if (e.planType == 1) { //如果是在线编辑 let id = e.id + console.log(e) + let companyId = sessionStorage.getItem("companyId") + sessionStorage.setItem("companyName", this.data.name) + sessionStorage.setItem("companyId", companyId) sessionStorage.setItem("planId", id) - //sessionStorage.setItem("companyId", companyId) sessionStorage.setItem("buildingTypeId", this.data.buildingTypes[0].id) sessionStorage.setItem("editable", "0") sessionStorage.setItem("planName", e.name) - let companyId = sessionStorage.getItem("companyId") - window.open(`/keyUnit/viewunitinfoplan?id=${companyId}`) - } - if (e.planType == 2) { //如果是跳转网页 + + window.open(`/keyUnit/viewunitinfoplan?id=${companyId}&orName=${this.data.organizationName}&orId=${this.data.organizationId}`) + } + if (e.planType == 2) { //如果是跳转网页 if (e.url.indexOf('app') == 0) { - window.location.href = e.url + window.location.href = e.url } else { - sessionStorage.setItem("url", e.url) - if ((e.url as string).includes('gis/threeDimensionalHome')) { //三维预案 - window.open(`${e.url}?unitId=${this.data.id}&unitName=${this.data.name}&editMode=false`) - } else { - window.open(`/planManagement/webLook`) - } + sessionStorage.setItem("url", e.url) + if ((e.url as string).includes('gis/threeDimensionalHome')) { //三维预案 + window.open(`${e.url}?unitId=${this.data.id}&unitName=${this.data.name}&editMode=false`) + } else { + window.open(`/planManagement/webLook`) + } } - } + } } //点击下载 diff --git a/src/app/ui/collection-tools-building/collection-tools.component.ts b/src/app/ui/collection-tools-building/collection-tools.component.ts index 1634663..590cf4c 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.ts +++ b/src/app/ui/collection-tools-building/collection-tools.component.ts @@ -479,7 +479,7 @@ export class CollectionToolsBuildingComponent implements OnInit { let _this = this let file = imgFile || null //获取上传的文件 let fileSize = file.size || null //上传文件的总大小 - let shardSize = 5 * 1024 * 1024 //5MB一个分片 + let shardSize = 10 * 1024 * 1024 //5MB一个分片 let companyId = sessionStorage.getItem("companyId") if (file && fileSize <= shardSize) { //上传文件<=5MB时 let formData = new FormData() @@ -542,7 +542,7 @@ export class CollectionToolsBuildingComponent implements OnInit { let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('上传图片文件不允许大于5mb', '确定', config); + this.snackBar.open('上传图片文件不允许大于10mb', '确定', config); } } @@ -632,6 +632,7 @@ export class CollectionToolsBuildingComponent implements OnInit { AxMessageSystem.addListener('selectionChanged', () => { if (this.canvas.selection.size() == 1) {//如果是单选 this.isMultipleAsset = false + console.log('单选', this.canvas.selection.first().assetData) this.setAssetsProperty(this.canvas.selection.first().assetData) } else if (this.canvas.selection.size()) { this.isShowProperty = true @@ -671,6 +672,7 @@ export class CollectionToolsBuildingComponent implements OnInit { }); }) }) + // console.log(666,_this.multipleAsset.PropertyInfos) } else if (this.canvas.selection.size() == 0) { this.isShowProperty = false } @@ -772,19 +774,20 @@ export class CollectionToolsBuildingComponent implements OnInit { //多选状态动态属性素材input框值改变 multipleAssetInputChange(i, e) { e.stopPropagation() - this.multipleAssetData.forEach(item => { - // console.log(item) - item.assetData.PropertyInfos.forEach(element => { - if (element.PropertyName == i.PropertyName) { - if (this.myIsNaN(i.PropertyValue)) { - i.PropertyValue = String(i.PropertyValue) + 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 } - element.PropertyValue = i.PropertyValue - this.canvas.refreshIcon(item.assetData.Id) - this.canvasData.isChange = true - } + }) }) - }) + }, 0); } //多选状态动态属性素材radio框值改变 multipleAssetRadioChange(i, value) { @@ -804,7 +807,6 @@ export class CollectionToolsBuildingComponent implements OnInit { multipleSupplyArea(i, e) { e.stopPropagation() this.multipleAssetData.forEach(item => { - // console.log(item) item.assetData.PropertyInfos.forEach(element => { if (element.PropertyName == i.PropertyName) { element.PropertyValue = i.PropertyValue diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.ts b/src/app/ui/collection-tools-plan/collection-tools.component.ts index 102b1b1..9de29bb 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -342,7 +342,7 @@ export class CollectionToolsPlanComponent implements OnInit { let _this = this let file = imgFile || null //获取上传的文件 let fileSize = file.size || null //上传文件的总大小 - let shardSize = 5 * 1024 * 1024 //5MB一个分片 + let shardSize = 10 * 1024 * 1024 //5MB一个分片 let companyId = sessionStorage.getItem("companyId") if (file && fileSize <= shardSize) { //上传文件<=5MB时 let formData = new FormData() @@ -405,7 +405,7 @@ export class CollectionToolsPlanComponent implements OnInit { let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('上传图片文件不允许大于5mb', '确定', config); + this.snackBar.open('上传图片文件不允许大于10mb', '确定', config); } } diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index 10e1867..c95c0c1 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -488,7 +488,7 @@ export class CollectionToolsComponent implements OnInit { let _this = this let file = imgFile || null //获取上传的文件 let fileSize = file.size || null //上传文件的总大小 - let shardSize = 5 * 1024 * 1024 //5MB一个分片 + let shardSize = 10 * 1024 * 1024 //5MB一个分片 let companyId = sessionStorage.getItem("companyId") if (file && fileSize <= shardSize) { //上传文件<=5MB时 let formData = new FormData() @@ -551,7 +551,7 @@ export class CollectionToolsComponent implements OnInit { let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('上传图片文件不允许大于5mb', '确定', config); + this.snackBar.open('上传图片文件不允许大于10mb', '确定', config); } }