|
|
@@ -313,7 +313,7 @@ import Echart from '@/components/Echart/src/Echart.vue'
|
|
|
import echarts from '@/plugins/echarts'
|
|
|
import { formatDate } from '@/utils/formatTime'
|
|
|
import { nextTick } from 'vue'
|
|
|
-import { axios } from 'axios'
|
|
|
+import download from '@/utils/download'
|
|
|
|
|
|
/** 设备台账 列表 */
|
|
|
defineOptions({ name: 'IotDevicePms' })
|
|
|
@@ -423,13 +423,13 @@ const confirmExport = async () => {
|
|
|
deviceCode: queryParams.deviceCode,
|
|
|
deviceName: queryParams.deviceName,
|
|
|
|
|
|
- exportFields: JSON.stringify(selectedColumns.value)
|
|
|
+ exportFields: selectedColumns.value.join(',')
|
|
|
}
|
|
|
|
|
|
// 调用后端导出接口
|
|
|
- await IotDeviceApi.exportDeviceReport(exportParams)
|
|
|
+ const res = await IotDeviceApi.exportDeviceReport(exportParams)
|
|
|
|
|
|
- // download.excel(res, '设备报表.xls')
|
|
|
+ download.excel(res, '设备报表.xls')
|
|
|
exportDialogVisible.value = false
|
|
|
} catch (error) {
|
|
|
console.error('导出失败:', error)
|