diff --git a/src/api/vehicle/instance.js b/src/api/vehicle/instance.js index 61dcf46..e8fb4dd 100644 --- a/src/api/vehicle/instance.js +++ b/src/api/vehicle/instance.js @@ -7,15 +7,65 @@ export function instanceList(params) { data: params }) } + +/** + * 客户端连接 + * @param vin + * @returns {*} + */ export function instanceClientInit(vin) { return request({ url: `/vehicle/instance/client/init/${vin}`, method: 'post' }) } + +/** + * 客户端关闭 + * @param vin + * @returns {*} + */ export function instanceClientClose(vin) { return request({ url: `/vehicle/instance/client/close/${vin}`, method: 'post' }) } + +/** + * 客户端关闭 + * @param vin + * @returns {*} + */ +export function instanceCheckPosition(vin, positionCode) { + return request({ + url: `/vehicle/instance/position/check`, + method: 'post', + data: { 'vin': vin, 'positionCode': positionCode } + }) +} + +/** + * 车辆报文控制 + * @param vin + * @returns {*} + */ +export function instanceMsg(vin, msgCode) { + return request({ + url: `/vehicle/instance/msg`, + method: 'post', + data: { 'vin': vin, 'msgCode': msgCode} + }) +} +/** + * 车辆档位 + * @param vin + * @returns {*} + */ +export function instanceGear(vin, gear) { + return request({ + url: `/vehicle/instance/gear`, + method: 'post', + data: { 'vin': vin, 'gear': gear} + }) +} diff --git a/src/api/vehicle/position.js b/src/api/vehicle/position.js new file mode 100644 index 0000000..561fa64 --- /dev/null +++ b/src/api/vehicle/position.js @@ -0,0 +1,8 @@ +import request from '@/utils/request' + +export function positionList() { + return request({ + url: '/vehicle/position/list', + method: 'get' + }) +} diff --git a/src/views/vehicle/index.vue b/src/views/vehicle/index.vue index e449931..a7ba4ee 100644 --- a/src/views/vehicle/index.vue +++ b/src/views/vehicle/index.vue @@ -15,29 +15,33 @@ - - kooriookami + + + + + + {{vehicle.positionLength}} - - 18100000000 + + + + + + + P档只上报,不模拟 - - 苏州市 + + + + + + - - 学校 + + {{vehicle.mileage}}