|
@@ -16,8 +16,11 @@
|
|
|
import { downloadByData } from '/@/utils/file/download';
|
|
|
import { formatToDate } from '/@/utils/dateUtil';
|
|
|
import { useModal } from '/@/components/Modal';
|
|
|
+ import FormImport from '/@/views/sys/import/index.vue';
|
|
|
+ import { postTextbookWarehouseRecordDetailImport } from '/@/services/apis/TextbookWarehouseRecordDetailController';
|
|
|
const [formReg, {}] = useDrawer();
|
|
|
const [formDetailReg, { openModal }] = useModal();
|
|
|
+ const [registerImportModal, { openModal: openImportModal }] = useModal();
|
|
|
const selectedRowKeysList = ref<string[] | number[]>([]);
|
|
|
const [registerTable, { reload }] = useTable({
|
|
|
api: getTextbookWarehouseRecordPage,
|
|
@@ -70,18 +73,34 @@
|
|
|
baseData: { id: record.id },
|
|
|
});
|
|
|
};
|
|
|
+
|
|
|
+ const handelImport = () => {
|
|
|
+ openImportModal(true, {
|
|
|
+ baseData: {
|
|
|
+ title: '教材导入',
|
|
|
+ upload: postTextbookWarehouseRecordDetailImport,
|
|
|
+ params: {},
|
|
|
+ errorName: '教材导入错误记录',
|
|
|
+ // templatePath:
|
|
|
+ // 'https://zhxy.cqtlzjzx.com/minio/static/resources/%E7%99%BD%E5%90%8D%E5%8D%95%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx',
|
|
|
+ // templateName: '教材导入模板',
|
|
|
+ },
|
|
|
+ });
|
|
|
+ };
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
|
|
|
<BasicTable @register="registerTable">
|
|
|
<template #toolbar>
|
|
|
+ <a-button type="primary" @click="handelImport"> 教材导入 </a-button>
|
|
|
<a-button
|
|
|
type="primary"
|
|
|
:disabled="!selectedRowKeysList.length"
|
|
|
@click="handleExport(false)"
|
|
|
- >导出指定记录</a-button
|
|
|
>
|
|
|
+ 导出指定记录
|
|
|
+ </a-button>
|
|
|
<a-button type="primary" @click="handleExport(true)">导出全部记录</a-button>
|
|
|
</template>
|
|
|
<template #action="{ record }">
|
|
@@ -97,6 +116,7 @@
|
|
|
</BasicTable>
|
|
|
<formEdit @register="formReg" @success="reload" />
|
|
|
<FormDetail @register="formDetailReg" />
|
|
|
+ <FormImport @register="registerImportModal" @success="reload" />
|
|
|
</PageWrapper>
|
|
|
</template>
|
|
|
|