This commit is contained in:
zlwu committed 2026-06-14 17:20:52 +08:00
1 parent a79aee2614
commit 427bcb1551
274 files changed
+59416 -38342

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -62,6 +62,18 @@
>
批量删除
</el-button>
<ArtExcelExport
type="default"
:data="batchExportData"
:list-total="pagination.total"
:load-all-data="loadAllAppointmentsForExport"
:filename="appointmentExportFilename"
sheet-name="展馆预约"
:columns="appointmentExportColumns"
auto-index
>
<el-icon><Download /></el-icon>导出 Excel
</ArtExcelExport>
</div>
</div>
@@ -249,9 +261,10 @@
</template>
<script setup lang="ts">
import { Plus, Close, Check, View, Calendar, RefreshLeft, Search, More, Edit, Delete } from '@element-plus/icons-vue'
import { Plus, Close, Check, View, Calendar, RefreshLeft, Search, More, Edit, Delete, Download } from '@element-plus/icons-vue'
import SystemViewDialog from '@/components/business/system-view-dialog/index.vue'
import { withFullscreenLoading, fullscreenLoadingText } from '@/utils/fullscreen-loading'
import { fetchAllPagedRecords } from '@/utils/fetch-paged-list'
import {
fetchExhibitionAppointmentList,
fetchCreateExhibitionAppointment,
@@ -319,6 +332,47 @@
selectedRows.value = rows
}
const appointmentExportFilename = 'exhibition_appointment_export'
const appointmentExportColumns = {
appointmentNo: { title: '预约编号' },
visitOrg: { title: '来访单位' },
contactName: { title: '联系人' },
visitDate: { title: '到访日期' },
visitorCount: { title: '人数' },
remark: { title: '备注' },
createTime: { title: '创建时间' }
} as const
const mapAppointmentExportRow = (row: AppointmentRow) => ({
appointmentNo: row.appointmentNo,
visitOrg: row.visitOrg,
contactName: row.contactName,
visitDate: row.visitDate,
visitorCount: row.visitorCount,
remark: row.remark,
createTime: row.createTime
})
const batchExportData = computed(() => {
const sel = selectedRows.value || []
if (sel.length === 0) return []
return sel.map(mapAppointmentExportRow)
})
const loadAllAppointmentsForExport = async () => {
const all = await fetchAllPagedRecords((page, pageSize) =>
fetchExhibitionAppointmentList({
page,
pageSize,
keyword: searchForm.keyword || undefined,
visitDateStart: visitDateRange.value?.[0] || undefined,
visitDateEnd: visitDateRange.value?.[1] || undefined
})
)
return all.map((row) => mapAppointmentExportRow(row as AppointmentRow))
}
const viewSections = computed(() => {
if (!viewRow.value) return []
const row = viewRow.value