diff --git a/sgzb-ui/package.json b/sgzb-ui/package.json index 9c81dd3e..d56089b1 100644 --- a/sgzb-ui/package.json +++ b/sgzb-ui/package.json @@ -50,6 +50,7 @@ "js-cookie": "3.0.1", "jsencrypt": "3.0.0-rc.1", "jszip": "^3.10.1", + "moment": "^2.30.1", "nprogress": "0.2.0", "qrcodejs2": "0.0.2", "quill": "1.3.7", diff --git a/sgzb-ui/src/api/store/iotManagement.js b/sgzb-ui/src/api/store/iotManagement.js index 04195084..197f4718 100644 --- a/sgzb-ui/src/api/store/iotManagement.js +++ b/sgzb-ui/src/api/store/iotManagement.js @@ -92,3 +92,7 @@ export function getRecordListAll(params = {}) { export const getIotDeviceLocationApi = (data) => { return request.post('/material/iotMachine/getLocation', data) } +/** 获取机具设备的行程信息 */ +export const getIotDeviceTripApi = (data) => { + return request.post('/material/iotMachine/searchItinerary', data) +} diff --git a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue index 9c348063..585d0914 100644 --- a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue +++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue @@ -21,17 +21,17 @@ 查询 @@ -44,15 +44,20 @@
-
1
-
+
{{ index + 1 }}
+
    -
  • 0KM
  • -
  • 22秒
  • -
  • 5KM/h
  • -
  • 0KM/h
  • +
  • {{ item.tripdistance }}KM
  • +
  • {{ item.drivingDuration }}秒
  • +
  • {{ item.maxspeed }}KM/h
  • +
  • {{ item.averagespeed }}KM/h
  • 里程
  • @@ -64,9 +69,9 @@
    - 2024-07-18 01:18:53 + {{ item.startTime }}
    -

    安徽省------

    +

    {{ item.startAddress }}

    @@ -77,9 +82,9 @@ " >终 - 2024-07-18 01:18:53 + {{ item.endTime }}
    -

    安徽省------

    +

    {{ item.endAddress }}

@@ -118,7 +123,11 @@ @@ -406,6 +473,7 @@ export default { margin: 0; list-style: none; display: flex; + align-items: center; li { flex: 1; text-align: center; diff --git a/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue b/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue index 3d8c0a95..5e5e4924 100644 --- a/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue +++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue @@ -224,9 +224,9 @@ @@ -853,13 +855,8 @@ export default { async handleMap(row) { this.deviceName = row.specificationType this.deviceType = row.maStatusName - // 获取绑定的iot设备 - const res = await getTypeListApi({ maCode: row.maCode }) + this.iotCode = row.iotCode - if (res.rows.length > 0) { - this.iotCode = res.rows[0].iotCode - } - // console.log(res, '获取的iot设备信息') this.mapDialogVisible = true }, handlePush() {