|
@ -72,18 +72,24 @@ const onDelHistory = () => { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
const onExportHistory = () => { |
|
|
const onExportHistory = () => { |
|
|
if (!selectedRecords.value.length) { |
|
|
|
|
|
FtMessage.warning('请选择要导出的数据') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// if (!selectedRecords.value.length) { |
|
|
|
|
|
// FtMessage.warning('请选择要导出的数据') |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
const exportParams = { |
|
|
const exportParams = { |
|
|
className: 'DisinfectionLogsService', |
|
|
className: 'DisinfectionLogsService', |
|
|
fnName: 'exportRecord', |
|
|
|
|
|
params: { |
|
|
|
|
|
logNames: selectedRecords.value.map(item => item.name), |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
fnName: 'exportAllRecord', |
|
|
|
|
|
params: {}, |
|
|
} |
|
|
} |
|
|
syncSendCmd(exportParams) |
|
|
syncSendCmd(exportParams) |
|
|
|
|
|
.then((res) => { |
|
|
|
|
|
if (res.ackcode === 0) { |
|
|
|
|
|
FtMessage.success('导出成功') |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.catch((error) => { |
|
|
|
|
|
console.error('导出记录失败:', error) |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const handleSelectionChange = (rows: Setting.History[]) => { |
|
|
const handleSelectionChange = (rows: Setting.History[]) => { |
|
@ -101,7 +107,7 @@ const deleteBtnVisible = computed(() => { |
|
|
<template> |
|
|
<template> |
|
|
<div> |
|
|
<div> |
|
|
<div class="history-export"> |
|
|
<div class="history-export"> |
|
|
<bt-button type="primary" button-text="导出" @click="onExportHistory" /> |
|
|
|
|
|
|
|
|
<bt-button type="primary" button-text="全部导出" @click="onExportHistory" /> |
|
|
<bt-button v-if="deleteBtnVisible" type="primary" button-text="删除" @click="onDelHistory" /> |
|
|
<bt-button v-if="deleteBtnVisible" type="primary" button-text="删除" @click="onDelHistory" /> |
|
|
</div> |
|
|
</div> |
|
|
<div class="history-table"> |
|
|
<div class="history-table"> |
|
|