修改地图等通用问题

This commit is contained in:
978184212@qq.com 2026-08-14 16:44:42 +08:00
parent 370172dd56
commit e152ec17df
6 changed files with 17 additions and 40 deletions

View File

@ -1,5 +1,5 @@
{
"name" : "稷山县面源污染监测平台",
"name" : "稷山县面源污染监测平台",
"appid" : "__UNI__A58A5D7",
"description" : "",
"versionName" : "2.2.22",

View File

@ -35,7 +35,7 @@
</view>
</view>
</view>
<text class="botmTetx">Copyright <text style="font-size: 30rpx;padding:0rpx 7rpx;"> © </text> 稷山县县现代农业发展中心</text>
<text class="botmTetx">Copyright <text style="font-size: 30rpx;padding:0rpx 7rpx;"> © </text> 稷山县农业农村局</text>
<!-- <view class="loginpage">
<image class="bigimg" src="../../static/dls.jpg" mode=""></image>
<view class="padding text-center margin-top">

View File

@ -23,7 +23,7 @@
</view>
</view> -->
</view>
<text class="botmTetx">Copyright <text style="font-size: 30rpx;padding:0rpx 7rpx;"> © </text> 稷山县县现代农业发展中心</text>
<text class="botmTetx">Copyright <text style="font-size: 30rpx;padding:0rpx 7rpx;"> © </text> 稷山县农业农村局</text>
</view>
</view>
</template>

View File

@ -4,7 +4,7 @@
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "稷山县小流域面源污染监测",
"navigationBarTitleText": "稷山县小流域面源污染监测",
"navigationStyle": "custom"
}
},

View File

@ -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'
})
}
}
}

View File

@ -11,16 +11,10 @@
畜禽污染监测站
</view>
</view>
<view class="zdxqitem" @click="switch2Change('orient')">
<image src="../../static/zhandian_nongtian_dingwei.png" mode=""></image>
<view class="textss">
农田污染监测站
</view>
</view>
<view class="zdxqitem" @click="switch2Change('enterprise')">
<image src="../../static/qiyebzIcon.png" mode="" style="width: 40rpx; height: 40rpx;"></image>
<view class="textss">
企业监测
企业点位
</view>
</view>
</view>
@ -62,9 +56,6 @@
<text class="value">{{ currentEnterprise.createTime || '-' }}</text>
</view>
</view>
<!-- <view class="popup-footer">
<button class="btn-detail" @click="goEnterpriseDetail">查看详情</button>
</view> -->
</view>
</view>
</view>
@ -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 @@
</script>
<style lang="scss">
/* 样式保持不变 */
.bgimg {
position: fixed;
top: 0;
@ -631,7 +615,6 @@
align-items: center;
}
/* 企业信息弹窗样式 */
.enterprise-popup {
position: fixed;
top: 0;