Sfoglia il codice sorgente

fix: change teacher prize statistics export

DESKTOP-USV654P\pc 1 settimana fa
parent
commit
95ec0bb475

+ 1 - 1
Makefile

@@ -12,7 +12,7 @@ build:
 
 commit:
 	git add . && \
-	git commit --no-verify -m "fix: change timetable"
+	git commit --no-verify -m "fix: change teacher prize statistics export"
 
 checkPre:
 	git checkout pre

+ 4 - 0
src/services/apis/TeacherAwardController.ts

@@ -14,6 +14,10 @@ import { ErrorMessageMode } from '/#/axios';
             /** 教师获奖详情页 GET /teacher/teacherAward/detail-page */
 export async function getTeacherAwardDetailPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.TeacherAwardDetailPageVo>>
         ({url: '/teacher/teacherAward/detail-page', params:params},{errorMessageMode:mode});}
+/** 导出 POST /teacher/teacherAward/export-query */
+export async function postTeacherAwardExportQuery(params:API.PageInput_12
+,mode: ErrorMessageMode = 'modal'){ return defHttp.download<string>
+        ({url: '/teacher/teacherAward/export-query',responseType:'blob',method:'POST', data:params},{errorMessageMode:mode});}
 /** 教师获奖统计 GET /teacher/teacherAward/statistics-page */
 export async function getTeacherAwardStatisticsPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.TeacherAwardStatisticsPageVo>>
         ({url: '/teacher/teacherAward/statistics-page', params:params},{errorMessageMode:mode});}

+ 1 - 1
src/services/apis/WfRoomStayOvernightController.ts

@@ -23,7 +23,7 @@ export async function putRoomWfRoomStayOvernight(params:API.UpdateWfRoomStayOver
 export async function deleteRoomWfRoomStayOvernight(params:string[],mode: ErrorMessageMode = 'modal'){ return defHttp.delete<any>
         ({url: '/room/wfRoomStayOvernight', data:params},{errorMessageMode:mode});}
 /** 导出 POST /room/wfRoomStayOvernight/export-query */
-export async function postWfRoomStayOvernightExportQuery(params:API.PageInput_12
+export async function postWfRoomStayOvernightExportQuery(params:API.PageInput_13
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.download<string>
         ({url: '/room/wfRoomStayOvernight/export-query',responseType:'blob',method:'POST', data:params},{errorMessageMode:mode});}
 /** 根据id查询留校住宿申请信息 GET /room/wfRoomStayOvernight/info */

+ 1 - 1
src/services/apis/WfSubscriptionController.ts

@@ -16,7 +16,7 @@ export async function postLedgerWfSubscription(params:API.AddWfSubscriptionDto
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
         ({url: '/ledger/wfSubscription', data:params},{errorMessageMode:mode});}
 /** 导出 POST /ledger/wfSubscription/export-query */
-export async function postWfSubscriptionExportQuery(params:API.PageInput_13
+export async function postWfSubscriptionExportQuery(params:API.PageInput_14
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.download<string>
         ({url: '/ledger/wfSubscription/export-query',responseType:'blob',method:'POST', data:params},{errorMessageMode:mode});}
 /** 物品申购台账列表(分页) GET /ledger/wfSubscription/page */

+ 32 - 5
src/services/typing.d.ts

@@ -5820,7 +5820,7 @@ name?: string;
 
 type BasePersonnelLabourCapitalMonthPageVo = {
 /** 总计 */
-amount?: number;
+amount?: string;
 /** 部门 */
 dept?: string;
 /** 月工资明细 */
@@ -5918,7 +5918,7 @@ personnelNameColumn?: number;
 
 type BasePersonnelLabourCapitalYearPageVo = {
 /** 金额 */
-amount?: number;
+amount?: string;
 /** 部门 */
 dept?: string;
 /** 主键 */
@@ -5926,13 +5926,13 @@ id?: string;
 /** 月份 */
 month?: number;
 /** 月金额 */
-monthAmount?: number;
+monthAmount?: string;
 /** 姓名 */
 name?: string;
 /** 项目名称 */
 project?: string;
 /** 年金额 */
-yearAmount?: number;
+yearAmount?: string;
 }
 
 type BaseStudentAssessmentCategoryListVo = {
@@ -10858,8 +10858,11 @@ status?: number;
 }
 
 type MaterialTaskAssignListDto = {
+/** 部门id */
+deptId?: string;
 /** 材料提交任务(material_task) */
 materialTaskId?: string;
+/** 姓名 */
 name?: string;
 state?: number;
 }
@@ -11898,6 +11901,30 @@ titleColor?: string;
 
 /** 分页入参 */
 type PageInput_12 = {
+/** 获奖日期-结束 */
+awardDateEnd?: string;
+/** 获奖日期-开始 */
+awardDateStart?: string;
+/** 部门id */
+deptId?: string;
+/** 排序字段 */
+field?: string;
+/** 关键词 */
+keyword?: string;
+/** 当前页标 */
+limit?: number;
+/** 姓名 */
+name?: string;
+/** 排序方式 asc  desc */
+order?: string;
+/** 每页大小 */
+size?: number;
+/** 用户名 */
+userName?: string;
+}
+
+/** 分页入参 */
+type PageInput_13 = {
 /** 班级 */
 className?: string;
 /** 结束时间 */
@@ -11923,7 +11950,7 @@ userName?: string;
 }
 
 /** 分页入参 */
-type PageInput_13 = {
+type PageInput_14 = {
 /** 结束时间 */
 endDate?: string;
 /** 排序字段 */

+ 18 - 3
src/views/prize/statistics/index.vue

@@ -2,7 +2,9 @@
   <PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
     <DeptTree class="w-1/3 xl:w-1/4" @select="handleSelect" />
     <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 }">
         <TableAction
           :actions="[
@@ -25,12 +27,17 @@
   import { useModal } from '/@/components/Modal';
   import { reactive } from '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 { formatToDate } from '/@/utils/dateUtil';
+  import { downloadByData } from '/@/utils/file/download';
 
   const [registerModal, { openModal }] = useModal();
 
-  const [registerTable, { reload }] = useTable({
+  const [registerTable, { reload, getForm }] = useTable({
     api: getTeacherAwardStatisticsPage,
     title: '教师获奖统计列表',
     rowKey: 'id',
@@ -67,6 +74,14 @@
       },
     });
   };
+
+  const handleExport = async () => {
+    const postData = getForm().getFieldsValue();
+    downloadByData(
+      (await postTeacherAwardExportQuery({ ...postData, ...searchInfo })).data,
+      `教师获奖统计${formatToDate(new Date())}.xlsx`,
+    );
+  };
 </script>
 
 <style scoped lang="less"></style>