设备管理-导出

This commit is contained in:
bb_pan 2025-10-27 09:46:27 +08:00
parent 0a97ae9147
commit 01bb842ed6
1 changed files with 14 additions and 0 deletions

View File

@ -85,6 +85,7 @@
已选择 {{ selectList.length }} 条需更改数据
</span>
<el-button icon="el-icon-upload2" size="mini" @click="handleSynch">检验报告同步</el-button>
<el-button icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
</el-form-item>
</el-form>
@ -520,6 +521,7 @@ import { downloadFile, downloadFileData } from '@/utils/download'
import { getToken } from '@/utils/auth'
import QRCode from 'qrcodejs2'
import html2canvas from 'html2canvas'
import { formatTime } from '@/utils/bonus'
export default {
name: 'Device',
@ -1178,6 +1180,18 @@ export default {
this.getList();
});
},
//
handleExport() {
try {
let fileName = `设备管理_${formatTime(new Date())}.xLsx`
let url = '/material/ma_machine/export'
const params = { ...this.queryParams }
console.log('🚀 ~ 导出 ~ params:', params)
this.download(url, params, fileName)
} catch (error) {
console.log('导出数据失败', error)
}
},
//
handleSelectionChange(validSelection) {
this.selectList = validSelection;