|
|
@@ -298,6 +298,7 @@
|
|
|
updateSecurityExamineIssueRepeal,
|
|
|
deleteSecurityExamineIssue,
|
|
|
querySecurityExamineIssueAdvanced,
|
|
|
+ exportMonthlyDeduction,
|
|
|
} from '@/api/evaluationSystem';
|
|
|
import type { QuerySecurityExamineIssueParams, EvaluationSystemItem } from '@/api/evaluationSystem';
|
|
|
import { ElMessage } from 'element-plus';
|
|
|
@@ -305,6 +306,7 @@
|
|
|
import { downloadFile } from '@/views/disaster/utils';
|
|
|
import PreviewOnline from '@/views/disaster/components/PreviewOnline.vue';
|
|
|
import { FILE_TYPE_ICON } from '@/components/UploadFiles/constants';
|
|
|
+ import { downloadByData } from '@/utils/file/download';
|
|
|
|
|
|
const route = useRoute();
|
|
|
const router = useRouter();
|
|
|
@@ -550,9 +552,23 @@
|
|
|
handleSearch();
|
|
|
};
|
|
|
|
|
|
- const handleExport = () => {
|
|
|
- // TODO: 导出当前筛选结果
|
|
|
- console.log('export evaluation target list', tableQuery);
|
|
|
+ const handleExport = async () => {
|
|
|
+ try {
|
|
|
+ const exportParams = {
|
|
|
+ psemId: evaluationId.value,
|
|
|
+ deductionTitle: tableQuery.queryParam.deductionTitle || undefined,
|
|
|
+ status: tableQuery.queryParam.status === '' ? '' : Number(tableQuery.queryParam.status),
|
|
|
+ };
|
|
|
+ const response = await exportMonthlyDeduction(exportParams);
|
|
|
+ if (response) {
|
|
|
+ const fileName = `考核下发对象_${new Date().toISOString().split('T')[0]}.xlsx`;
|
|
|
+ downloadByData(response, fileName);
|
|
|
+ ElMessage.success('导出成功');
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ console.error('导出月度扣分失败:', e);
|
|
|
+ ElMessage.error(e?.message || e?.data || '导出失败,请重试');
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const handleBatchDelete = () => {
|