Commit dd69f937 by 前端

修改获取设备信息接口地址

1 parent e4972848
...@@ -9,3 +9,8 @@ export const GER_REGIONAL_SEARCH = function(params = {}){ ...@@ -9,3 +9,8 @@ export const GER_REGIONAL_SEARCH = function(params = {}){
export const GER_REGIONAL_EXPORT = function(params = {}){ export const GER_REGIONAL_EXPORT = function(params = {}){
return request(params, '/trialdrive/regional/export', 'get') return request(params, '/trialdrive/regional/export', 'get')
} }
// 区域查车-查询设备定位信息
export const GER_REGIONAL_LOCATION = function(params = {}){
return request(params, '/trialdrive/regional/location', 'get')
}
\ No newline at end of file \ No newline at end of file
...@@ -159,8 +159,9 @@ import CitySelect from "@/components/area"; ...@@ -159,8 +159,9 @@ import CitySelect from "@/components/area";
import { import {
GER_REGIONAL_SEARCH, GER_REGIONAL_SEARCH,
GER_REGIONAL_EXPORT, GER_REGIONAL_EXPORT,
GER_REGIONAL_LOCATION
} from "@/api/services/zooneCar"; } from "@/api/services/zooneCar";
import { GET_DEVICEINFO_BYSNS } from "@/api/services/monitor"; // import { GET_DEVICEINFO_BYSNS } from "@/api/services/monitor";
import EventBus from "@/event-bus"; import EventBus from "@/event-bus";
import { showToast, deepClone } from "@/utils/utils.js"; import { showToast, deepClone } from "@/utils/utils.js";
import { Validator } from "@/common/validator"; import { Validator } from "@/common/validator";
...@@ -403,8 +404,12 @@ export default { ...@@ -403,8 +404,12 @@ export default {
async downloadExcel() { async downloadExcel() {
let params = this.getParams(); let params = this.getParams();
if (!params.leftLngLat) { if (!params.leftLngLat) {
showToast({
message: "请先划定区域",
});
return false; return false;
} }
this.dloading = true; this.dloading = true;
let res = await GER_REGIONAL_EXPORT(params); let res = await GER_REGIONAL_EXPORT(params);
this.dloading = false; this.dloading = false;
...@@ -446,7 +451,7 @@ export default { ...@@ -446,7 +451,7 @@ export default {
} }
params.sns = this.form.sn; params.sns = this.form.sn;
params.deviceCode = "gps"; params.deviceCode = "gps";
let res = await GET_DEVICEINFO_BYSNS(params); let res = await GER_REGIONAL_LOCATION(params);
let list = res.data || []; let list = res.data || [];
if (list.length <= 0) { if (list.length <= 0) {
showToast({ showToast({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!