|
@@ -11,7 +11,7 @@
|
|
|
import { useModal } from '/@/components/Modal';
|
|
|
import View from './components/view.vue';
|
|
|
import {
|
|
|
- getBaseClassCourseExport,
|
|
|
+ getBaseClassCourseClassCourseTextbookExportQuery,
|
|
|
getBaseClassCoursePage,
|
|
|
} from '/@/services/apis/BaseClassCourseController';
|
|
|
import { downloadFileByBlob } from '/@/utils/file/download';
|
|
@@ -24,7 +24,7 @@
|
|
|
const selectedRow = ref<any>([]);
|
|
|
const selectedRowKey = ref<any>([]);
|
|
|
const selectId = ref('');
|
|
|
- const [tableRef, { reload }] = useTable({
|
|
|
+ const [tableRef, { reload, getForm }] = useTable({
|
|
|
title: '班级课程记录表',
|
|
|
columns: tableColumns,
|
|
|
api: getBaseClassCoursePage,
|
|
@@ -80,10 +80,14 @@
|
|
|
};
|
|
|
|
|
|
const handleExport = async () => {
|
|
|
+ const postData = getForm().getFieldsValue();
|
|
|
try {
|
|
|
await downloadFileByBlob(
|
|
|
(
|
|
|
- await getBaseClassCourseExport({})
|
|
|
+ await getBaseClassCourseClassCourseTextbookExportQuery({
|
|
|
+ ...postData,
|
|
|
+ semester: selectId.value,
|
|
|
+ })
|
|
|
).data,
|
|
|
`班级课程记录表${new Date().toLocaleDateString().replace(/\//g, '-')}.xlsx`,
|
|
|
);
|
|
@@ -105,11 +109,12 @@
|
|
|
type="primary"
|
|
|
@click="handleEdit(false, null)"
|
|
|
:disabled="!selectId || !selectedRow.length"
|
|
|
- >批量设置</a-button
|
|
|
- >
|
|
|
- <a-button type="primary" class="ml-[12px]" :disabled="!selectId" @click="handleCopy"
|
|
|
- >复用课程</a-button
|
|
|
>
|
|
|
+ 批量设置
|
|
|
+ </a-button>
|
|
|
+ <a-button type="primary" class="ml-[12px]" :disabled="!selectId" @click="handleCopy">
|
|
|
+ 复用课程
|
|
|
+ </a-button>
|
|
|
<a-button type="primary" class="ml-[12px]" @click="handleImport">导入</a-button>
|
|
|
<a-button type="primary" class="ml-[12px]" @click="handleExport">导出</a-button>
|
|
|
</template>
|