浏览代码

fix: change prize export

DESKTOP-USV654P\pc 1 周之前
父节点
当前提交
53f118535d

+ 1 - 1
Makefile

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

+ 6 - 2
src/services/apis/TeacherAwardController.ts

@@ -11,11 +11,15 @@ import { ErrorMessageMode } from '/#/axios';
             ;
 
 
-            /** 教师获奖详情页 GET /teacher/teacherAward/detail-page */
+            /** 教师获奖详情页 POST /teacher/teacherAward/detail-export-query */
+export async function postTeacherAwardDetailExportQuery(params:API.PageInput_12
+,mode: ErrorMessageMode = 'modal'){ return defHttp.download<string>
+        ({url: '/teacher/teacherAward/detail-export-query',responseType:'blob',method:'POST', data:params},{errorMessageMode:mode});}
+/** 教师获奖详情页 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
+export async function postTeacherAwardExportQuery(params:API.PageInput_13
 ,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 */

+ 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_13
+export async function postWfRoomStayOvernightExportQuery(params:API.PageInput_14
 ,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_14
+export async function postWfSubscriptionExportQuery(params:API.PageInput_15
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.download<string>
         ({url: '/ledger/wfSubscription/export-query',responseType:'blob',method:'POST', data:params},{errorMessageMode:mode});}
 /** 物品申购台账列表(分页) GET /ledger/wfSubscription/page */

+ 55 - 2
src/services/typing.d.ts

@@ -2107,6 +2107,8 @@ type AddEvaluateItemDto = {
 evaluateTemplateId?: string;
 /** 输入框是否为空 */
 inputNotNull?: number;
+/** 选项内容 */
+optionJson?: string;
 /** 题目名称 */
 problem?: string;
 /** 题目分数(最小为0,只能整数) */
@@ -2115,6 +2117,8 @@ score?: number;
 sortCode?: number;
 /** 标题名称 */
 topic?: string;
+/** 题目类型 */
+type?: string;
 }
 
 type AddEvaluateManageDto = {
@@ -2162,6 +2166,8 @@ type AddEvaluateResultDto = {
 evaluateItemId?: string;
 /** 建议/意见 */
 opinion?: string;
+/** 选项 */
+optionContent?: string;
 /** 评价分数 */
 score?: number;
 }
@@ -7696,6 +7702,7 @@ icon?: string;
 isDefault?: boolean;
 isUse?: boolean;
 name?: string;
+redirectUrl?: string;
 }
 
 type CadreDeptPageVo = {
@@ -9349,6 +9356,8 @@ evaluateTemplateId?: string;
 id?: string;
 /** 输入框是否为空 */
 inputNotNull?: number;
+/** 选项内容 */
+optionJson?: string;
 /** 题目名称 */
 problem?: string;
 /** 题目分数(最小为0,只能整数) */
@@ -9357,6 +9366,8 @@ score?: number;
 sortCode?: number;
 /** 标题名称 */
 topic?: string;
+/** 题目类型 */
+type?: string;
 }
 
 type EvaluateManageBodyVo = {
@@ -9408,6 +9419,10 @@ id?: string;
 inputNotNull?: number;
 /** 建议/意见 */
 opinion?: string;
+/** 选项 */
+optionContent?: string;
+/** 选项内容 */
+optionJson?: string;
 /** 题目名称 */
 problem?: string;
 /** 题目分数(最小为0,只能整数) */
@@ -9416,6 +9431,8 @@ score?: number;
 sortCode?: number;
 /** 标题名称 */
 topic?: string;
+/** 题目类型 */
+type?: string;
 }
 
 type EvaluateManagePageVo = {
@@ -9534,6 +9551,8 @@ actualScore?: number;
 evaluateManageItem?: string;
 /** 建议/意见 */
 opinion?: string;
+/** 选项内容 */
+optionJson?: string;
 /** 题目名称 */
 problem?: string;
 /** 题目分数(最小为0,只能整数) */
@@ -10463,6 +10482,16 @@ way?: number;
 year?: number;
 }
 
+type ImportConfig = {
+fieldName?: string;
+label?: string;
+/** 是否必填 */
+required?: boolean;
+/** 排序码 */
+sortCode?: number;
+width?: number;
+}
+
 type InitYearDto = {
 /** 年 */
 year?: number;
@@ -10713,6 +10742,8 @@ type ListConfig = {
 buttonConfigs?: ButtonConfig[];
 columnConfigs?: ColumnConfig[];
 defaultOrder?: boolean;
+importConfigs?: ImportConfig[];
+importTemplateName?: string;
 isLeftMenu?: boolean;
 isPage?: boolean;
 leftMenuConfig?: LeftMenuConfig;
@@ -11901,6 +11932,28 @@ titleColor?: string;
 
 /** 分页入参 */
 type PageInput_12 = {
+/** 申请人 */
+applicantUserId?: string;
+/** 申请人 */
+applicantUserIdCn?: string;
+/** 排序字段 */
+field?: string;
+/** 是否论文(1:是 0:否) */
+isThesis?: number;
+/** 关键词 */
+keyword?: string;
+/** 当前页标 */
+limit?: number;
+/** 排序方式 asc  desc */
+order?: string;
+/** 每页大小 */
+size?: number;
+/** 完整的奖项名称 */
+wholeCompetitionName?: string;
+}
+
+/** 分页入参 */
+type PageInput_13 = {
 /** 获奖日期-结束 */
 awardDateEnd?: string;
 /** 获奖日期-开始 */
@@ -11924,7 +11977,7 @@ userName?: string;
 }
 
 /** 分页入参 */
-type PageInput_13 = {
+type PageInput_14 = {
 /** 班级 */
 className?: string;
 /** 结束时间 */
@@ -11950,7 +12003,7 @@ userName?: string;
 }
 
 /** 分页入参 */
-type PageInput_14 = {
+type PageInput_15 = {
 /** 结束时间 */
 endDate?: string;
 /** 排序字段 */

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

@@ -1,7 +1,9 @@
 <template>
   <PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
     <BasicTable @register="registerTable">
-      <template #toolbar> </template>
+      <template #toolbar>
+        <a-button type="primary" @click="handleExport">导出</a-button>
+      </template>
       <template #action="{ record }">
         <TableAction
           :actions="[
@@ -25,9 +27,14 @@
   import { PageWrapper } from '/@/components/Page';
   import { useTable, BasicTable, TableAction } from '/@/components/Table';
   import { tableColumns, searchFormSchema } from './data.config';
-  import { getTeacherAwardDetailPage } from '/@/services/apis/TeacherAwardController';
+  import {
+    getTeacherAwardDetailPage,
+    postTeacherAwardDetailExportQuery,
+  } from '/@/services/apis/TeacherAwardController';
+  import { formatToDate } from '/@/utils/dateUtil';
+  import { downloadByData } from '/@/utils/file/download';
 
-  const [registerTable] = useTable({
+  const [registerTable, { getForm }] = useTable({
     api: getTeacherAwardDetailPage,
     title: '教师获奖登记列表',
     rowKey: 'id',
@@ -49,6 +56,14 @@
     //   fixed: 'right',
     // },
   });
+
+  const handleExport = async () => {
+    const postData = getForm().getFieldsValue();
+    downloadByData(
+      (await postTeacherAwardDetailExportQuery({ ...postData })).data,
+      `教师获奖${formatToDate(new Date())}.zip`,
+    );
+  };
 </script>
 
 <style scoped lang="less"></style>

+ 1 - 1
src/views/prize/statistics/index.vue

@@ -79,7 +79,7 @@
     const postData = getForm().getFieldsValue();
     downloadByData(
       (await postTeacherAwardExportQuery({ ...postData, ...searchInfo })).data,
-      `教师获奖统计${formatToDate(new Date())}.zip`,
+      `教师获奖统计${formatToDate(new Date())}.xlsx`,
     );
   };
 </script>