diff --git a/src/api/devices/devices.js b/src/api/devices/devices.js index c0ccf11..72d2d30 100644 --- a/src/api/devices/devices.js +++ b/src/api/devices/devices.js @@ -74,3 +74,14 @@ export function gethistory(deviceId) { // } }) } + +//获取上传固件记录 +export function getgjhis(version) { + return request({ + url: `iot/ota/meta`, + method: 'get', + params:{ + version + } + }) +} \ No newline at end of file diff --git a/src/api/home.js b/src/api/home.js index 8396ab8..7f63348 100644 --- a/src/api/home.js +++ b/src/api/home.js @@ -47,4 +47,4 @@ export function equguiji(deviceId,start,end) { end } }) -} \ No newline at end of file +} diff --git a/src/views/devices/devices/index.vue b/src/views/devices/devices/index.vue index 89a9323..8108847 100644 --- a/src/views/devices/devices/index.vue +++ b/src/views/devices/devices/index.vue @@ -513,12 +513,27 @@
- --> + + + +
文件拖拽到这儿 或者 点击上传 @@ -819,9 +834,12 @@ import { addDevices, updateDevices, getreadata, - gethistory + gethistory, + getgjhis } from "@/api/devices/devices" +import { getToken } from '@/utils/auth' + import * as echarts from 'echarts' import { nextTick } from "vue" @@ -877,6 +895,10 @@ const data = reactive({ const { queryParams, form, rules } = toRefs(data) +const Token = `Bearer ${getToken()}` + +const uploadUrl = `${import.meta.env.VITE_APP_BASE_API}/iot/ota/upload` + /** 查询BBOX管理列表 */ function getList() { loading.value = true @@ -1577,7 +1599,12 @@ let cflist = ref([]) }) }) - }else if(n.index == 6){ + }else if(n.index == 3){ + //获取上传固件记录 + getgjhis(1).then(rps => { + + }) + }else if(n.index == 5){ //月充放时长 nextTick(() => { dcyxztchart(dcyxChart.value,['2025-02','2025-03','2025-04','2025-05','2025-06','2025-07','2025-08','2025-09','2025-10','2025-11','2025-12','2026-01'],[60,80,76,90,89,79,100,95,60,80,76,90,],'电池运行状态','#2363a5','h')