From e152ec17df4d62d92adda8949acd4858697fdedd Mon Sep 17 00:00:00 2001
From: "978184212@qq.com" <978184212@qq.com>
Date: Fri, 14 Aug 2026 16:44:42 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9C=B0=E5=9B=BE=E7=AD=89?=
=?UTF-8?q?=E9=80=9A=E7=94=A8=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
manifest.json | 2 +-
packDetail/pages/login/login.vue | 2 +-
packDetail1/pages/about/index.vue | 2 +-
pages.json | 2 +-
pages/index/index.vue | 12 +++-------
pages/maps/index.vue | 37 +++++++++----------------------
6 files changed, 17 insertions(+), 40 deletions(-)
diff --git a/manifest.json b/manifest.json
index 28dcf2a..1dbd2a7 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,5 +1,5 @@
{
- "name" : "稷山县县面源污染监测平台",
+ "name" : "稷山县面源污染监测平台",
"appid" : "__UNI__A58A5D7",
"description" : "",
"versionName" : "2.2.22",
diff --git a/packDetail/pages/login/login.vue b/packDetail/pages/login/login.vue
index 8289619..2b9a8e2 100644
--- a/packDetail/pages/login/login.vue
+++ b/packDetail/pages/login/login.vue
@@ -35,7 +35,7 @@
- Copyright © 稷山县县现代农业发展中心
+ Copyright © 稷山县农业农村局
- Copyright © 稷山县县现代农业发展中心
+ Copyright © 稷山县农业农村局
diff --git a/pages.json b/pages.json
index a4e49a2..ac35dd3 100644
--- a/pages.json
+++ b/pages.json
@@ -4,7 +4,7 @@
{
"path": "pages/index/index",
"style": {
- "navigationBarTitleText": "稷山县县小流域面源污染监测",
+ "navigationBarTitleText": "稷山县小流域面源污染监测",
"navigationStyle": "custom"
}
},
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 9a9b80d..c375dd9 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -335,15 +335,9 @@
},
// banner跳转
banlick(index){
- if (index==0) {
- uni.navigateTo({
- url: '/packDetail/pages/vidio/soilindex'
- })
- } else {
- uni.navigateTo({
- url: '/packDetail/pages/Site/index'
- })
- }
+ uni.navigateTo({
+ url: '/packDetail/pages/Site/index'
+ })
}
}
}
diff --git a/pages/maps/index.vue b/pages/maps/index.vue
index d6ac2bd..57fd6bc 100644
--- a/pages/maps/index.vue
+++ b/pages/maps/index.vue
@@ -11,16 +11,10 @@
畜禽污染监测站
-
-
-
- 农田污染监测站
-
-
- 企业监测点
+ 企业点位
@@ -62,9 +56,6 @@
{{ currentEnterprise.createTime || '-' }}
-
@@ -97,7 +88,6 @@
currentEnterprise: {},
currentMarkerId: null,
maxMarkerId: 0,
- // 添加调试开关
debugMode: true
};
},
@@ -139,14 +129,13 @@
this.allStationList.push(...this.cusLocationList);
this.allStationList.push(...this.soilStationList);
this.allStationList.forEach((item, index) => {
- item.id = index + 1; // 从1开始
+ item.id = index + 1;
});
this.issscd = false
this.isssscd = false
this.isSoilShow = false
- // 设置初始最大ID
this.maxMarkerId = this.allStationList.length + 1;
this.enterpriseRender();
@@ -168,7 +157,10 @@
if (res.data.data && res.data.data.result) {
this.enterpriseList = res.data.data.result;
this.renderEnterpriseMarkers();
- this.ensureAllMarkersVisible();
+ // 数据加载完成后调整地图视野显示全部点位
+ this.$nextTick(() => {
+ this.ensureAllMarkersVisible();
+ });
}
uni.hideLoading();
}).catch(err => {
@@ -187,7 +179,6 @@
return;
}
-
this.enterpriseList.forEach((item, index) => {
const lat = Number(item.entLat);
const lng = Number(item.entLong);
@@ -224,7 +215,6 @@
joinCluster: false,
zIndex: this.markersZIndex++,
enterpriseData: item,
- // 添加callout显示企业名称
callout: {
content: item.entName || '企业',
color: '#FFFFFF',
@@ -238,21 +228,17 @@
this.markers.push(markerItem);
});
-
},
markertap(e) {
const index = e.detail.markerId;
- // 查找匹配的marker
const marker = this.markers.find(m => Number(m.id) === Number(index));
-
if (!marker) {
console.warn('未找到对应的marker, ID:', index);
return;
}
-
if (marker.stationType === 'enterprise') {
this.currentEnterprise = marker.enterpriseData || {
entName: marker.stationName || '企业名称',
@@ -270,8 +256,8 @@
return;
}
- // 原有的监测站逻辑
- if (['orient', 'livestock'].includes(marker.stationType)) {
+ // 监测站逻辑
+ if (marker.stationType === 'livestock') {
uni.navigateTo({
url: `/packDetail/pages/Site/detail?item=${encodeURIComponent(JSON.stringify(marker))}`
})
@@ -282,7 +268,6 @@
}
},
- // 关闭企业信息弹窗
closePopup() {
this.showEnterprisePopup = false;
this.currentEnterprise = {};
@@ -424,7 +409,7 @@
try {
this.mapCtx.includePoints({
points: validPoints,
- padding: [80, 80, 80, 80]
+ padding: [120, 120, 120, 120]
});
} catch (e) {
console.error('调整地图视野异常:', e);
@@ -499,7 +484,7 @@
if (regionName === 'enterprise') {
markers = this.markers.filter(item => item.stationType === 'enterprise');
- } else if (regionName === 'orient' || regionName === 'livestock' || regionName === 'watershed') {
+ } else if (regionName === 'livestock') {
markers = this.markers.filter(item => item.stationType === regionName);
} else if (regionName === 'soil') {
markers = this.markers.filter(item => item.type === 'soil' || item.deviceType === 'soil');
@@ -527,7 +512,6 @@