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) {
//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'})
}

41
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(){

Loading…
Cancel
Save