fix:修改部分功能bug

This commit is contained in:
5g0Wp7Zy 2025-07-24 14:42:36 +08:00
parent a232a4826d
commit 59f3f8c908
2 changed files with 31 additions and 13 deletions

View File

@ -606,7 +606,7 @@ function changeArea(data, refresh) {
loadeTime = Date.now();
if (!refresh) {
if (mapDataIndex > -1) {
console.log(mapData_opt);
console.log(mapData_opt, "mapData_opt");
loadMapData(mapData_opt[mapDataIndex]);
return;
@ -666,12 +666,27 @@ function changeArea(data, refresh) {
});
}
//
function initMapData() {
q_cnt0.value = 0;
q_cnt1.value = 0;
q_cnt2.value = 0;
markers.value = [];
polylines.value = [];
circles.value = [];
polygons.value = [];
arrMakers = [];
}
//
function loadMapData(data) {
const {
bikeData: { arrData },
} = data;
arrMakers = arrData;
console.log(data, "loadMapData");
const { bikeData } = data;
if (!bikeData || bikeData["arrData"]?.length == 0) {
initMapData();
return;
}
arrMakers = bikeData["arrData"];
const countData = showMarker();
showCountData(countData);
loadMapBikeData(showBike.value, data);
@ -1000,6 +1015,7 @@ function showMarker_HD(lx, maxcnt) {
let arrPoints = [];
let ordercnt = 0;
let changeBattery = []; //
console.log(arrMakers);
arrMakers.map((item, index) => {
item = {
@ -1242,8 +1258,6 @@ onMounted(() => {
latitude: lat,
longitude: lng,
};
console.log(amapsdk);
map.reverseGeocoder(
amapsdk,
lng,

View File

@ -706,10 +706,6 @@ const contentText = ref({
contentnomore: "",
});
const showClick = () => {
modelShow.value = !modelShow.value;
};
const navButtonGroup = reactive([
{
text: "自动测试",
@ -741,6 +737,11 @@ const initStatus = () => {
navButtonGroup[0].disable = true;
};
const showClick = () => {
modelShow.value = !modelShow.value;
initStatus();
};
const bikeCodeScanChange = (data) => {
initStatus();
api.callEbikeInfo("getBikeINfoData?bikeCode=" + data).then((res) => {
@ -864,8 +865,6 @@ const recursionExecDetection = () => {
ecuSn: ebikeInfo.value.ecuSn,
},
(res) => {
console.log(urlList.value[0]["url"]);
if (res.code !== 200) {
showModelMessage(res.message);
}
@ -908,6 +907,11 @@ const recursionExecDetection = () => {
} else {
detectionInfo.value[urlList.value[0]["url"]].detectionState = "error";
}
//线
if (res.data.code != 200 && urlList.value[0]["url"] === "online")
return;
urlList.value.shift();
if (urlList.value.length > 0) {
recursionExecDetection();