-
应急队伍详情
+
{{popData.teamname || '应急队伍'}}详情
×
diff --git a/src/components/feature/WzxqyfbModule/Yjwzmapselect.vue b/src/components/feature/WzxqyfbModule/Yjwzmapselect.vue
index 6e95a50d822054f11873db7003d9e6ed0bc4e059..30ba8141aca97eb79e9834e24aee9d8a931a4078 100644
--- a/src/components/feature/WzxqyfbModule/Yjwzmapselect.vue
+++ b/src/components/feature/WzxqyfbModule/Yjwzmapselect.vue
@@ -133,7 +133,7 @@ export default class YjwzMapSelect extends Vue {
this.updateMaterial();
this.inertval = setInterval(() => {
this.updateMaterial();
- }, 5000);
+ }, 60000);
}
private getComponent() {
diff --git a/src/gis/eventsituation/material/Material.ts b/src/gis/eventsituation/material/Material.ts
index 69686b2b0be629b5edcf04628daa145e387efbb7..c590ae0fe61923ae04bdd751d0af2e1839276516 100644
--- a/src/gis/eventsituation/material/Material.ts
+++ b/src/gis/eventsituation/material/Material.ts
@@ -439,21 +439,32 @@ const component = componentBase.extend({
* 根据行政区划等级和中心点改变地图视野
* @param level 要查询的行政区划等级
* @param center 选中行政区划的中心点,例:[116,39]
+ * @param districtCode 行政区划编码
*/
- panTo(level: any, center: any) {
- const zoomLevelMap = this.options.symbolConfig.zoom_level_map;
- const zoom = Object.keys(zoomLevelMap).find((item: any) => zoomLevelMap[item] === level * 1);
- this.map.zoomTo(zoom);
+ panTo(level: any, center: any, districtCode: any) {
+ if (!level || !center) {
+ return;
+ }
+ if (typeof (center) === 'object' && center.lng) {
+ center = [center.lng, center.lat];
+ }
- if (center) {
- if (typeof (center) === 'object') {
- center = [center.lng, center.lat];
- }
- const geo = new g2.sfs.Point({ x: center[0] * 1, y: center[1] * 1 });
- const pos = level === "4" ? center : null
- this.panLogic.setPosition(pos)
+ this.districtCode = districtCode;
+ const districtLevel = districtCode ? this.panLogic.getDistrictLevel(districtCode) : 4;
+
+ if (districtCode && districtLevel < 4) {
+ this.panLogic.fit(districtCode, true).catch((err: any) => console.warn(err));
+ } else {
+ const zoomLevelMap = this.options.symbolConfig.zoom_level_map;
+ const zoom = Object.keys(zoomLevelMap).find((item: any) => zoomLevelMap[item] === level * 1);
+ this.map.zoomTo(zoom);
+
+ const geo = new g2.sfs.Point({ x: center[0], y: center[1] });
this.map.setCenter(geo);
}
+ // 当前行政区划等级为4的时候显示定位点
+ const pos = districtLevel * 1 === 4 ? center : null
+ this.panLogic.setPosition(pos)
},
setCenter(center: any) {
diff --git a/src/gis/eventsituation/sicknessdistribute/SicknessDistribute.ts b/src/gis/eventsituation/sicknessdistribute/SicknessDistribute.ts
index eb74581c76ffb272b531c57947ddfa9a023307c8..e3c38d7d6fcae55c77cace6e66d45fb4536374d8 100644
--- a/src/gis/eventsituation/sicknessdistribute/SicknessDistribute.ts
+++ b/src/gis/eventsituation/sicknessdistribute/SicknessDistribute.ts
@@ -249,7 +249,8 @@ const component = componentBase.extend({
},
buildStyle: () => {
return {
- declutter: true
+ declutter: true,
+ declutterDistance: 2
}
}
});