整合代码

This commit is contained in:
小小 2025-04-29 16:45:27 +08:00
parent ed3309fcd1
commit ce945b24d3
2 changed files with 86 additions and 5 deletions

View File

@ -229,6 +229,9 @@
findIndex,
find
} from "lodash";
import {
useSelarea
} from "@/stores/selarea.js";
var qqmapsdk = new QQMapWX({
key: map.sdkKey
@ -295,6 +298,7 @@
const arrAreaData = ref(null); //
const mapData_opt = []; //
let selArea = null; //
const selAreaStore = useSelarea();
const showMore = ref(false); //
const showBike = ref(true); //
const showRegion = ref(false); //
@ -428,6 +432,7 @@
lat
} = data;
selArea = data;
selAreaStore.setValue(id);
const zoneId = id;
mapcenter.value = {
latitude: lat,
@ -445,7 +450,71 @@
uni.showLoading({
title: '加载中'
});
const params = {
map.getOperation(zoneId, (res) => {
uni.hideLoading();
if (!res) return;
const {
arrRegionID,
arrCircles,
arrPolygons,
arrData
} = res;
let mapdata = {
zoneId,
arrCircles,
arrPolygons,
arrData
};
polygons.value = arrPolygons;
circles.value = arrCircles;
mapDataIndex = mapDataIndex == -1 ? mapData_opt.length : mapDataIndex;
mapData_opt[mapDataIndex] = mapdata;
//
if (arrRegionID.length == 0) return;
map.getRegionData(arrRegionID, (res) => {
const {
arrData,
arrCircles,
arrPolygons
} = res;
mapdata = {
...mapdata,
regionData: {
arrData,
arrCircles,
arrPolygons
}
};
mapData_opt[mapDataIndex] = mapdata;
loadMapRegionData(showRegion.value, mapdata);
})
//
map.getBikeData(arrRegionID, (res) => {
const {
arrData,
arrPoints,
icnt,
icnt_0,
icnt_2
} = res;
mapdata = {
...mapdata,
bikeData: {
arrData,
arrPoints
}
};
mapData_opt[mapDataIndex] = mapdata;
q_cnt.value = icnt;
q_cnt0.value = icnt_0;
q_cnt2.value = icnt_2;
arrMakers = arrData;
loadMapBikeData(showBike.value, mapdata);
})
})
/* const params = {
zoneId
}
api.callOperateApi("ebikeRegion/getOperation", params, "get").then((res) => {
@ -544,7 +613,7 @@
showModelMessage(message);
}
});
*/
}
//
@ -702,9 +771,9 @@
}
//
function queryOrders(lx,index) {
selRight.value=index;
console.log("11111111111111111111",lx,index)
function queryOrders(lx, index) {
selRight.value = index;
console.log("11111111111111111111", lx, index)
showModelMessage("该功能暂未实现!");
}

View File

@ -0,0 +1,12 @@
import { defineStore } from 'pinia'
import {ref} from "vue";
export const useSelarea = defineStore('selarea', ()=>{
const data=ref('');
const setValue=(value)=>{
data.value=value;
}
return{ value:data.value, setValue};
},{
persist: true
})