From 088f3299cb8ec1010bbb7dc06cc3ae40bc76f775 Mon Sep 17 00:00:00 2001
From: SHAOJIAHAO <55341701@qq.com>
Date: Sat, 20 Mar 2021 15:51:38 +0800
Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E4=BF=AE=E6=94=B9=E6=B5=8B?=
=?UTF-8?q?=E8=AF=95=E5=87=BA=E7=9A=84bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../fire-force/fire-force.component.ts | 11 +++++++---
.../linkage-forces.component.ts | 1 +
.../water-collection.component.html | 1 +
.../water-collection.component.ts | 10 +++++++++
.../gis-labeling/gis-labeling.component.html | 3 ++-
.../gis-labeling/gis-labeling.component.ts | 22 ++++++-------------
6 files changed, 29 insertions(+), 19 deletions(-)
diff --git a/src/app/data-collection/fire-force/fire-force.component.ts b/src/app/data-collection/fire-force/fire-force.component.ts
index 2c5373a..7df5cb5 100644
--- a/src/app/data-collection/fire-force/fire-force.component.ts
+++ b/src/app/data-collection/fire-force/fire-force.component.ts
@@ -543,7 +543,7 @@ export class FireForceComponent implements OnInit {
//新增消防力量
selectedFireForceTypeIndex:any//新增消防力量名称
addFireForce(){
- if(this.selectedFireForceId){
+ if(this.selectedFireForceId && this.selectedFireForce.forceType == 0){
const dialogRef = this.dialog.open(AddFireForce, {
data: {},
id:'addWater'
@@ -563,7 +563,12 @@ export class FireForceComponent implements OnInit {
}
}
);
- }else{
+ }else if(this.selectedFireForceId && this.selectedFireForce.forceType != 0){
+ let config = new MatSnackBarConfig();
+ config.verticalPosition = 'top';
+ config.duration = 3000
+ this.snackBar.open('该选中机构无法增加其他机构','确定',config);
+ } else{
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
@@ -586,7 +591,6 @@ export class FireForceComponent implements OnInit {
// console.log('删除原文件成功')
})
});
-
}
this.FireForceDetailInfo.jurisdictionArea = Number(this.FireForceDetailInfo.jurisdictionArea)
this.FireForceDetailInfo.relevantInfomationData = JSON.stringify(this.AttachmentArr)
@@ -724,6 +728,7 @@ export class FireForceComponent implements OnInit {
this.selectedFireForceLevel = null
this.selectedFireForceId = null
this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null
+ this.isGisTopBox = false
}
map:any
placeSearch:any//构造地点查询类
diff --git a/src/app/data-collection/linkage-forces/linkage-forces.component.ts b/src/app/data-collection/linkage-forces/linkage-forces.component.ts
index a4814be..84647be 100644
--- a/src/app/data-collection/linkage-forces/linkage-forces.component.ts
+++ b/src/app/data-collection/linkage-forces/linkage-forces.component.ts
@@ -496,6 +496,7 @@ export class LinkageForcesComponent implements OnInit {
close(){
this.LinkageForceDetailInfo={}
this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null
+ this.isGisTopBox = false
}
map:any
placeSearch:any//构造地点查询类
diff --git a/src/app/data-collection/water-collection/water-collection.component.html b/src/app/data-collection/water-collection/water-collection.component.html
index ae19685..862522f 100644
--- a/src/app/data-collection/water-collection/water-collection.component.html
+++ b/src/app/data-collection/water-collection/water-collection.component.html
@@ -6,6 +6,7 @@
列表过滤
+
diff --git a/src/app/data-collection/water-collection/water-collection.component.ts b/src/app/data-collection/water-collection/water-collection.component.ts
index fa2076f..29e3e8b 100644
--- a/src/app/data-collection/water-collection/water-collection.component.ts
+++ b/src/app/data-collection/water-collection/water-collection.component.ts
@@ -386,6 +386,15 @@ export class WaterCollectionComponent implements OnInit {
{PropertyName :'备注',PropertyValue:''}
]
}
+
+ //重置搜索
+ reset(){
+ this.searchForm = {
+ name:'',
+ integrityNum:''
+ }
+ this.getAllWaterData()
+ }
//新增水源
selectedWaterTypeIndex:any//新增水源类型
addWater(){
@@ -493,6 +502,7 @@ export class WaterCollectionComponent implements OnInit {
this.selectedWaterTypeIndex = null
this.selectedLiIndex = null
this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null
+ this.isGisTopBox = false
}
map:any
placeSearch:any//构造地点查询类
diff --git a/src/app/gis-management/gis-labeling/gis-labeling.component.html b/src/app/gis-management/gis-labeling/gis-labeling.component.html
index 60f2b04..36afe0e 100644
--- a/src/app/gis-management/gis-labeling/gis-labeling.component.html
+++ b/src/app/gis-management/gis-labeling/gis-labeling.component.html
@@ -6,7 +6,8 @@
-
+
+
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 2fb7fe3..498da37 100644
--- a/src/app/gis-management/gis-labeling/gis-labeling.component.ts
+++ b/src/app/gis-management/gis-labeling/gis-labeling.component.ts
@@ -149,11 +149,6 @@ export class GisLabelingComponent implements OnInit {
this.http.get("/api/Companies",{params:paramsdata}).subscribe((data:any) => {
this.createUnitMarker(data.items)
})
- }else if(!this.mapPattern){
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请切换2D模式使用此功能','确定',config);
}else{
this.circle.setRadius(Number(this.unitAreaDefault))
this.circle.setCenter(this.markers[0]._position)
@@ -355,7 +350,6 @@ export class GisLabelingComponent implements OnInit {
WaterSourceTypes : this.selectedWaterList
}
this.http.get("/api/WaterSources",{params:paramsdata}).subscribe((data:any) => {
- console.log('所有水源',data)
this.createwaterMarker(data.items)
})
}else{
@@ -364,11 +358,6 @@ export class GisLabelingComponent implements OnInit {
config.duration = 3000
this.snackBar.open('请勾选想要显示的水源类型','确定',config);
}
- }else if(!this.mapPattern){
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请切换2D模式使用此功能','确定',config);
}else{
this.circleofwater.setRadius(Number(this.waterAreaDefault))
this.circleofwater.setCenter(this.markers[0]._position)
@@ -391,7 +380,6 @@ export class GisLabelingComponent implements OnInit {
WaterSourceTypes : this.selectedWaterList
}
this.http.get("/api/WaterSources",{params:paramsdata}).subscribe((data:any) => {
- console.log('所有水源',data)
this.createwaterMarker(data.items)
})
}else{
@@ -411,7 +399,6 @@ export class GisLabelingComponent implements OnInit {
WaterSourceTypes :this.selectedWaterList
}
this.http.get("/api/WaterSources",{params:paramsdata}).subscribe((data:any) => {
- console.log('所有水源',data)
this.createwaterMarker(data.items)
})
}else{
@@ -426,9 +413,7 @@ export class GisLabelingComponent implements OnInit {
//取消显示水源
resetWater(){
this.watertForm.reset()
-
this.watertForm.controls.areaWater.setValue('-1')
-
this.map.remove(this.circleofwater)
this.waterCluster.setData([])
}
@@ -574,6 +559,8 @@ export class GisLabelingComponent implements OnInit {
//地图2D 3D切换
mapPattern:boolean = true//默认是2D
mapPatternChange(type){
+ this.unitCluster = null
+ this.waterCluster = null
if(type == '2D'){
this.mapPattern = true
var layer = new AMap.createDefaultLayer({
@@ -586,7 +573,9 @@ export class GisLabelingComponent implements OnInit {
this.map = new AMap.Map('map',{
layers:[layer], //当只想显示标准图层时layers属性可缺省,
});
+ this.map.setCity('上海市');
}else{
+ this.unitCluster ? this.unitCluster.setData([]) : null
this.mapPattern = false
this.map = new AMap.Map('map',{
viewMode: '3D',
@@ -595,6 +584,7 @@ export class GisLabelingComponent implements OnInit {
features: ['bg', 'road', 'point','building'],
mapStyle: 'amap://styles/light',
});
+ this.map.setCity('上海市');
}
this.satelliteModel = false
this.loadModel = false
@@ -738,6 +728,8 @@ export class GisLabelingComponent implements OnInit {
clear () {
this.allCompany = []
this.searchText = ''
+ this.markers ? this.markers.forEach((element,index) => { this.map.remove(element);}) : null
+ this.infoWindow ? this.map.remove(this.infoWindow) : null
}
selectedUnit:any//当前打开的单位