fix:修改部分功能bug
This commit is contained in:
parent
a232a4826d
commit
59f3f8c908
@ -606,7 +606,7 @@ function changeArea(data, refresh) {
|
|||||||
loadeTime = Date.now();
|
loadeTime = Date.now();
|
||||||
if (!refresh) {
|
if (!refresh) {
|
||||||
if (mapDataIndex > -1) {
|
if (mapDataIndex > -1) {
|
||||||
console.log(mapData_opt);
|
console.log(mapData_opt, "mapData_opt");
|
||||||
|
|
||||||
loadMapData(mapData_opt[mapDataIndex]);
|
loadMapData(mapData_opt[mapDataIndex]);
|
||||||
return;
|
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) {
|
function loadMapData(data) {
|
||||||
const {
|
console.log(data, "loadMapData");
|
||||||
bikeData: { arrData },
|
const { bikeData } = data;
|
||||||
} = data;
|
if (!bikeData || bikeData["arrData"]?.length == 0) {
|
||||||
arrMakers = arrData;
|
initMapData();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
arrMakers = bikeData["arrData"];
|
||||||
const countData = showMarker();
|
const countData = showMarker();
|
||||||
showCountData(countData);
|
showCountData(countData);
|
||||||
loadMapBikeData(showBike.value, data);
|
loadMapBikeData(showBike.value, data);
|
||||||
@ -1000,6 +1015,7 @@ function showMarker_HD(lx, maxcnt) {
|
|||||||
let arrPoints = [];
|
let arrPoints = [];
|
||||||
let ordercnt = 0;
|
let ordercnt = 0;
|
||||||
let changeBattery = []; //需要换电车辆
|
let changeBattery = []; //需要换电车辆
|
||||||
|
console.log(arrMakers);
|
||||||
|
|
||||||
arrMakers.map((item, index) => {
|
arrMakers.map((item, index) => {
|
||||||
item = {
|
item = {
|
||||||
@ -1242,8 +1258,6 @@ onMounted(() => {
|
|||||||
latitude: lat,
|
latitude: lat,
|
||||||
longitude: lng,
|
longitude: lng,
|
||||||
};
|
};
|
||||||
console.log(amapsdk);
|
|
||||||
|
|
||||||
map.reverseGeocoder(
|
map.reverseGeocoder(
|
||||||
amapsdk,
|
amapsdk,
|
||||||
lng,
|
lng,
|
||||||
|
|||||||
@ -706,10 +706,6 @@ const contentText = ref({
|
|||||||
contentnomore: "",
|
contentnomore: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
const showClick = () => {
|
|
||||||
modelShow.value = !modelShow.value;
|
|
||||||
};
|
|
||||||
|
|
||||||
const navButtonGroup = reactive([
|
const navButtonGroup = reactive([
|
||||||
{
|
{
|
||||||
text: "自动测试",
|
text: "自动测试",
|
||||||
@ -741,6 +737,11 @@ const initStatus = () => {
|
|||||||
navButtonGroup[0].disable = true;
|
navButtonGroup[0].disable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const showClick = () => {
|
||||||
|
modelShow.value = !modelShow.value;
|
||||||
|
initStatus();
|
||||||
|
};
|
||||||
|
|
||||||
const bikeCodeScanChange = (data) => {
|
const bikeCodeScanChange = (data) => {
|
||||||
initStatus();
|
initStatus();
|
||||||
api.callEbikeInfo("getBikeINfoData?bikeCode=" + data).then((res) => {
|
api.callEbikeInfo("getBikeINfoData?bikeCode=" + data).then((res) => {
|
||||||
@ -864,8 +865,6 @@ const recursionExecDetection = () => {
|
|||||||
ecuSn: ebikeInfo.value.ecuSn,
|
ecuSn: ebikeInfo.value.ecuSn,
|
||||||
},
|
},
|
||||||
(res) => {
|
(res) => {
|
||||||
console.log(urlList.value[0]["url"]);
|
|
||||||
|
|
||||||
if (res.code !== 200) {
|
if (res.code !== 200) {
|
||||||
showModelMessage(res.message);
|
showModelMessage(res.message);
|
||||||
}
|
}
|
||||||
@ -908,6 +907,11 @@ const recursionExecDetection = () => {
|
|||||||
} else {
|
} else {
|
||||||
detectionInfo.value[urlList.value[0]["url"]].detectionState = "error";
|
detectionInfo.value[urlList.value[0]["url"]].detectionState = "error";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//如果设备不在线直接不进行后面的操作
|
||||||
|
if (res.data.code != 200 && urlList.value[0]["url"] === "online")
|
||||||
|
return;
|
||||||
|
|
||||||
urlList.value.shift();
|
urlList.value.shift();
|
||||||
if (urlList.value.length > 0) {
|
if (urlList.value.length > 0) {
|
||||||
recursionExecDetection();
|
recursionExecDetection();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user