|
|
@@ -43,13 +43,18 @@ const lineObj = ref(null);
|
|
|
const iconImage = new URL("@/assets/images/home/Point.png",import.meta.url);
|
|
|
|
|
|
const getCarInfoList = () => {
|
|
|
- listCarInfo({pageSzie:1000}).then(res=>{
|
|
|
- for (var index in res.rows) {
|
|
|
- var obj = res.rows[index].location;
|
|
|
+ listCarInfo({}).then(res=>{
|
|
|
+ for (var index in res.rows) {
|
|
|
+ try {
|
|
|
+ var obj = res.rows[index].location;
|
|
|
// console.log(obj.toString())
|
|
|
- var location = formatGCJ(obj.lng,obj.lat);
|
|
|
+ var location = formatGCJ(obj.lng, obj.lat);
|
|
|
+ if(res.rows[index].carNum.indexOf("JYA798")!= -1) alert("1")
|
|
|
// console.log(location.toString())
|
|
|
addMarker(location, res.rows[index], '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png', 'location')
|
|
|
+
|
|
|
+ } catch (e) { }
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
@@ -57,12 +62,14 @@ const getCarInfoList = () => {
|
|
|
|
|
|
const getDictsData = (param) => {
|
|
|
getDicts(param).then(res => {
|
|
|
- for (var index in res.data) {
|
|
|
- var obj = res.data[index].dictValue.split(",");
|
|
|
- // console.log(obj.toString())
|
|
|
- var location = formatGCJ(Number(obj[0]), Number(obj[1]));
|
|
|
- // console.log(location.toString())
|
|
|
- addMarker(location, res.data[index], '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png', 'location')
|
|
|
+ for (var index in res.data) {
|
|
|
+ try {
|
|
|
+ var obj = res.data[index].dictValue.split(",");
|
|
|
+ // console.log(obj.toString())
|
|
|
+ var location = formatGCJ(Number(obj[0]), Number(obj[1]));
|
|
|
+ // console.log(location.toString())
|
|
|
+ addMarker(location, res.data[index], '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png', 'location')
|
|
|
+ } catch (e) { }
|
|
|
}
|
|
|
})
|
|
|
}
|