|
@@ -2,7 +2,9 @@
|
|
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
|
|
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
|
|
<DeptTree class="w-1/3 xl:w-1/4" @select="handleSelect" />
|
|
<DeptTree class="w-1/3 xl:w-1/4" @select="handleSelect" />
|
|
<BasicTable @register="registerTable" class="w-2/3 xl:w-3/4" :searchInfo="searchInfo">
|
|
<BasicTable @register="registerTable" class="w-2/3 xl:w-3/4" :searchInfo="searchInfo">
|
|
- <template #toolbar> </template>
|
|
|
|
|
|
+ <template #toolbar>
|
|
|
|
+ <a-button type="primary" @click="handleExport">导出</a-button>
|
|
|
|
+ </template>
|
|
<template #action="{ record }">
|
|
<template #action="{ record }">
|
|
<TableAction
|
|
<TableAction
|
|
:actions="[
|
|
:actions="[
|
|
@@ -25,12 +27,17 @@
|
|
import { useModal } from '/@/components/Modal';
|
|
import { useModal } from '/@/components/Modal';
|
|
import { reactive } from 'vue';
|
|
import { reactive } from 'vue';
|
|
import DeptTree from '/@/views/system/user/components/DeptTree.vue';
|
|
import DeptTree from '/@/views/system/user/components/DeptTree.vue';
|
|
- import { getTeacherAwardStatisticsPage } from '/@/services/apis/TeacherAwardController';
|
|
|
|
|
|
+ import {
|
|
|
|
+ getTeacherAwardStatisticsPage,
|
|
|
|
+ postTeacherAwardExportQuery,
|
|
|
|
+ } from '/@/services/apis/TeacherAwardController';
|
|
import FormDetail from './detail.vue';
|
|
import FormDetail from './detail.vue';
|
|
|
|
+ import { formatToDate } from '/@/utils/dateUtil';
|
|
|
|
+ import { downloadByData } from '/@/utils/file/download';
|
|
|
|
|
|
const [registerModal, { openModal }] = useModal();
|
|
const [registerModal, { openModal }] = useModal();
|
|
|
|
|
|
- const [registerTable, { reload }] = useTable({
|
|
|
|
|
|
+ const [registerTable, { reload, getForm }] = useTable({
|
|
api: getTeacherAwardStatisticsPage,
|
|
api: getTeacherAwardStatisticsPage,
|
|
title: '教师获奖统计列表',
|
|
title: '教师获奖统计列表',
|
|
rowKey: 'id',
|
|
rowKey: 'id',
|
|
@@ -67,6 +74,14 @@
|
|
},
|
|
},
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+ const handleExport = async () => {
|
|
|
|
+ const postData = getForm().getFieldsValue();
|
|
|
|
+ downloadByData(
|
|
|
|
+ (await postTeacherAwardExportQuery({ ...postData, ...searchInfo })).data,
|
|
|
|
+ `教师获奖统计${formatToDate(new Date())}.xlsx`,
|
|
|
|
+ );
|
|
|
|
+ };
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="less"></style>
|
|
<style scoped lang="less"></style>
|