diff --git a/.env.development b/.env.development index 99ac41a..22cab23 100644 --- a/.env.development +++ b/.env.development @@ -5,8 +5,8 @@ VUE_APP_TITLE = 共享电动车管理系统 ENV = 'development' # 共享电动车管理系统/开发环境 -# VUE_APP_BASE_API = 'https://dche.ccttiot.com/prod-api' -VUE_APP_BASE_API = 'http://192.168.2.75:8088' +VUE_APP_BASE_API = 'https://dche.ccttiot.com/prod-api' +# VUE_APP_BASE_API = 'http://192.168.2.75:8088' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/src/api/system/device.js b/src/api/system/device.js index 2dc7388..d095bd8 100644 --- a/src/api/system/device.js +++ b/src/api/system/device.js @@ -139,4 +139,11 @@ export function getDeviceBySn(sn){ method: 'get' }) } +// 根据运营区id查询设备 +export function getDeviceLists(areaId){ + return request({ + url: '/app/allVehicleByArea?areaId='+areaId, + method: 'get' + }) +} diff --git a/src/components/Map/location/LocationMap.vue b/src/components/Map/location/LocationMap.vue index 4d31b7e..d9f5c81 100644 --- a/src/components/Map/location/LocationMap.vue +++ b/src/components/Map/location/LocationMap.vue @@ -13,6 +13,7 @@ import { debounce } from '@/utils' import AreaTextSelect from '@/components/AreaTextSelect/index.vue' import { getArea } from '@/api/system/area' import { listParking } from '@/api/system/parking' +import { getDeviceBySn } from '@/api/system/device' export default { name: "LocationMap", components: { AreaTextSelect }, @@ -45,10 +46,7 @@ export default { type: String, default: '' }, - areaId: { - type: Number, - default: '' - }, + }, data() { return { @@ -68,11 +66,18 @@ export default { noParkingList:[], noridingList:[], labels: [], + areaId:'' } }, mounted() { // this.initAMap(); - this.getAreas(this.areaId) + // this.getAreas(this.areaId) + + getDeviceBySn(this.deviceSn).then(response => { + this.areaId=response.data.areaId + console.log(response,'responseresponse'); + this.getAreas(this.areaId) + }); }, beforeDestroy() { console.log("轨迹=====组件将被销毁"); diff --git a/src/views/system/area/areaSet.vue b/src/views/system/area/areaSet.vue index 90730ae..96899e5 100644 --- a/src/views/system/area/areaSet.vue +++ b/src/views/system/area/areaSet.vue @@ -37,6 +37,7 @@ placeholder="请选择运营商" /> + - 修改 +