Browse Source

提交设备统计的导出

wangqin
yyl 10 months ago
parent
commit
20bc05b393
  1. 8
      ruoyi-ui/src/api/MonthlyEquipment/index.js
  2. 41
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue

8
ruoyi-ui/src/api/MonthlyEquipment/index.js

@ -43,9 +43,7 @@ export function getSystemStatusList(query) {
//设备状态列表按类型 //设备状态列表按类型
export function getSystemStatusExport(query) { export function getSystemStatusExport(query) {
//system/status/export //system/status/export
return download('/system/status/export',query,"file.xlsx"); //return download('/system/status/export',query,"file.xlsx");
// return request.post('/system/status/export',{ return request.post('/system/status/export?startTime='+query.startTime+"&time="+ query.time +"&type="+query.type,{},{ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
// ...query responseType: 'blob'})
// },{ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
// responseType: 'blob'})
} }

41
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue

@ -455,28 +455,25 @@ import * as echarts from "echarts";
}, },
// //
SystemStatusExport(){ SystemStatusExport(){
download(
"/fault/list/exportFaultReport", getSystemStatusExport({
{ faultId: row.id }, startTime:this.startTime,
"file.xlsx"); time:this.time,
// getSystemStatusExport({ type:this.typeQuery,
// startTime:this.startTime, }).then((res)=>{
// time:this.time, console.log(res);
// type:this.typeQuery, const url = window.URL.createObjectURL(new Blob([res]))
// }).then((res)=>{ let link = document.createElement('a')
// console.log(res); link.style.display = 'none'
// const url = window.URL.createObjectURL(new Blob([res])) link.href = url
// let link = document.createElement('a') link.setAttribute('download', '设备统计信息.xlsx')
// link.style.display = 'none' document.body.appendChild(link)
// link.href = url link.click()
// link.setAttribute('download', '.xlsx') URL.revokeObjectURL(link.href) // URL
// document.body.appendChild(link) document.body.removeChild(link)
// link.click() link = null
// URL.revokeObjectURL(link.href) // URL
// document.body.removeChild(link) })
// link = null
// })
}, },
queryChartList(){ queryChartList(){

Loading…
Cancel
Save