|
|
|
@ -52,7 +52,7 @@ |
|
|
|
</a-card> |
|
|
|
|
|
|
|
<!-- 统计表格 --> |
|
|
|
<a-card title="季度服务统计" size="small" class="table-card"> |
|
|
|
<a-card title="季/年度服务统计" size="small" class="table-card"> |
|
|
|
<a-table |
|
|
|
:columns="columns" |
|
|
|
:dataSource="tableData" |
|
|
|
@ -201,10 +201,43 @@ function handleReset() { |
|
|
|
} |
|
|
|
|
|
|
|
// 导出Excel |
|
|
|
function handleExport() { |
|
|
|
message.info('导出功能开发中...'); |
|
|
|
// 这里调用导出API |
|
|
|
// await serviceApplicationsApi.exportQuarterStatistics(queryForm); |
|
|
|
async function handleExport() { |
|
|
|
try { |
|
|
|
// 构建导出参数,包含页面输入的查询条件 |
|
|
|
const exportParams = { |
|
|
|
quarter: queryForm.quarter, |
|
|
|
year: queryForm.year, |
|
|
|
lawyerName: queryForm.lawyerName, |
|
|
|
firmName: queryForm.firmName |
|
|
|
}; |
|
|
|
|
|
|
|
// 调用导出接口 |
|
|
|
const response = await serviceApplicationsApi.exportLawyer(exportParams); |
|
|
|
|
|
|
|
// 处理文件下载 |
|
|
|
if (response && response.data) { |
|
|
|
// 创建下载链接 |
|
|
|
const blob = new Blob([response.data], { type: 'application/vnd.ms-excel' }); |
|
|
|
const url = window.URL.createObjectURL(blob); |
|
|
|
const link = document.createElement('a'); |
|
|
|
link.href = url; |
|
|
|
|
|
|
|
// 生成文件名 |
|
|
|
const fileName = `季度服务统计_${queryForm.year || '全部'}_${queryForm.quarter ? '第' + queryForm.quarter + '季度' : '全部'}.xlsx`; |
|
|
|
link.download = fileName; |
|
|
|
|
|
|
|
// 触发下载 |
|
|
|
document.body.appendChild(link); |
|
|
|
link.click(); |
|
|
|
document.body.removeChild(link); |
|
|
|
window.URL.revokeObjectURL(url); |
|
|
|
|
|
|
|
message.success('导出成功'); |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
message.error('导出失败'); |
|
|
|
console.error('导出失败:', error); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 分页变化 |
|
|
|
|