|
@@ -3,7 +3,7 @@
|
|
|
<BasicTable @register="registerTable" :searchInfo="searchInfo">
|
|
|
<template #toolbar>
|
|
|
<a-button type="primary" @click="handelAjd">调整班级</a-button>
|
|
|
- <a-button type="primary">导出</a-button>
|
|
|
+ <a-button type="primary" @click="handelExport">导出</a-button>
|
|
|
</template>
|
|
|
</BasicTable>
|
|
|
<FormAdjust @register="registerModal" @success="handleSuccess" />
|
|
@@ -14,9 +14,14 @@
|
|
|
import { reactive, watch } from 'vue';
|
|
|
import { BasicTable, useTable } from '/@/components/Table';
|
|
|
import { table4Columns, searchForm4Schema } from '../data.config';
|
|
|
- import { getBandingTaskClassClassStudent } from '/@/services/apis/BandingTaskClassController';
|
|
|
+ import {
|
|
|
+ getBandingTaskClassClassStudent,
|
|
|
+ getBandingTaskClassExport,
|
|
|
+ } from '/@/services/apis/BandingTaskClassController';
|
|
|
import FormAdjust from './adjust.vue';
|
|
|
import { useModal } from '/@/components/Modal';
|
|
|
+ import { formatToDateTime } from '/@/utils/dateUtil';
|
|
|
+ import { downloadByData } from '/@/utils/file/download';
|
|
|
|
|
|
const [registerModal, { openModal }] = useModal();
|
|
|
|
|
@@ -77,6 +82,12 @@
|
|
|
reload();
|
|
|
};
|
|
|
|
|
|
+ const handelExport = async () => {
|
|
|
+ // const postData = getForm().getFieldsValue();
|
|
|
+ const data = await getBandingTaskClassExport({});
|
|
|
+ downloadByData(data.data, `学生列表${formatToDateTime(new Date(), 'YYYYMMDDHHmmss')}.xlsx`);
|
|
|
+ };
|
|
|
+
|
|
|
defineExpose({ validateStep, reloadStep });
|
|
|
</script>
|
|
|
|