diff --git a/ruoyi-ui/src/api/MonthlyEquipment/index.js b/ruoyi-ui/src/api/MonthlyEquipment/index.js index 1286246f..bb6cc820 100644 --- a/ruoyi-ui/src/api/MonthlyEquipment/index.js +++ b/ruoyi-ui/src/api/MonthlyEquipment/index.js @@ -43,9 +43,7 @@ export function getSystemStatusList(query) { //设备状态列表按类型 export function getSystemStatusExport(query) { //system/status/export - return download('/system/status/export',query,"file.xlsx"); - // return request.post('/system/status/export',{ - // ...query - // },{ headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, - // responseType: 'blob'}) + //return download('/system/status/export',query,"file.xlsx"); + return request.post('/system/status/export?startTime='+query.startTime+"&time="+ query.time +"&type="+query.type,{},{ headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + responseType: 'blob'}) } \ No newline at end of file diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue index 9eb67db3..aeae40f4 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue @@ -455,28 +455,25 @@ import * as echarts from "echarts"; }, //导出 SystemStatusExport(){ - download( - "/fault/list/exportFaultReport", - { faultId: row.id }, - "file.xlsx"); - // getSystemStatusExport({ - // startTime:this.startTime, - // time:this.time, - // type:this.typeQuery, - // }).then((res)=>{ - // console.log(res); - // const url = window.URL.createObjectURL(new Blob([res])) - // let link = document.createElement('a') - // link.style.display = 'none' - // link.href = url - // link.setAttribute('download', '学生信息列表.xlsx') - // document.body.appendChild(link) - // link.click() - // URL.revokeObjectURL(link.href) // 释放URL 对象 - // document.body.removeChild(link) - // link = null - - // }) + + getSystemStatusExport({ + startTime:this.startTime, + time:this.time, + type:this.typeQuery, + }).then((res)=>{ + console.log(res); + const url = window.URL.createObjectURL(new Blob([res])) + let link = document.createElement('a') + link.style.display = 'none' + link.href = url + link.setAttribute('download', '设备统计信息.xlsx') + document.body.appendChild(link) + link.click() + URL.revokeObjectURL(link.href) // 释放URL 对象 + document.body.removeChild(link) + link = null + + }) }, queryChartList(){