Browse Source

fix:消毒记录可以多选导出而不是导出全部

master
白凤吉 1 week ago
parent
commit
da483f5c91
  1. 14
      src/components/audit/History.vue

14
src/components/audit/History.vue

@ -87,14 +87,14 @@ 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: 'exportAllRecord',
params: {},
fnName: 'exportRecord',
params: selectedRecords.value.map(item => item.name),
} }
syncSendCmd(exportParams) syncSendCmd(exportParams)
.then((res) => { .then((res) => {
@ -122,7 +122,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">

Loading…
Cancel
Save