fix:修改部分功能bug
This commit is contained in:
parent
a232a4826d
commit
59f3f8c908
@ -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,
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user