From 2f3e22fb3ed28fc9310ecd94525d69c0ed9de380 Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Tue, 6 Jun 2023 18:51:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E8=BF=9B=E5=BA=A6=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/types/cpicxim/RankingListItem.ts | 18 ++++++++++ .../web/task_schedule/src/utils/api/config.ts | 3 ++ code/web/task_schedule/src/utils/ranking.ts | 35 +++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 code/web/task_schedule/src/types/cpicxim/RankingListItem.ts create mode 100644 code/web/task_schedule/src/utils/ranking.ts diff --git a/code/web/task_schedule/src/types/cpicxim/RankingListItem.ts b/code/web/task_schedule/src/types/cpicxim/RankingListItem.ts new file mode 100644 index 0000000..bf331ea --- /dev/null +++ b/code/web/task_schedule/src/types/cpicxim/RankingListItem.ts @@ -0,0 +1,18 @@ +/* + * @Author: Kane + * @Date: 2023-06-06 17:44:48 + * @LastEditors: Kane + * @FilePath: /task_schedule/src/types/cpicxim/RankingListItem.ts + * @Description: 排行榜元素 + * + * Copyright (c) ${2022} by Kane, All Rights Reserved. + */ + +interface RankingListItem +{ + index: number; + callerName: string; + appraiseValue: string; +}; + +export { type RankingListItem }; diff --git a/code/web/task_schedule/src/utils/api/config.ts b/code/web/task_schedule/src/utils/api/config.ts index a5061b2..966b99e 100644 --- a/code/web/task_schedule/src/utils/api/config.ts +++ b/code/web/task_schedule/src/utils/api/config.ts @@ -14,4 +14,7 @@ export const API_URL = { URL_LOGIN_CALLER: "http://222.76.244.118:11101/desktop_archievement_backend/account/query_telsaler_info.do", // URL_DEPARTMENT_ARCHIEVEMENT: import.meta.env.VITE_URL_DEPARTMENT_ARCHIEVEMENT, URL_DEPARTMENT_ARCHIEVEMENT: "http://222.76.244.118:11101/desktop_archievement_backend/archievement/query_department_archievement.do", + + // URL_RANKINGLIST: "http://localhost:8080/desktop_archievement_backend/archievement/query_ranking_list.do", + URL_RANKINGLIST: "http://222.76.244.118:11101/desktop_archievement_backend/archievement/query_ranking_list.do", }; diff --git a/code/web/task_schedule/src/utils/ranking.ts b/code/web/task_schedule/src/utils/ranking.ts new file mode 100644 index 0000000..a592a9c --- /dev/null +++ b/code/web/task_schedule/src/utils/ranking.ts @@ -0,0 +1,35 @@ +/* + * @Author: Kane + * @Date: 2023-06-06 17:40:31 + * @LastEditors: Kane + * @FilePath: /task_schedule/src/utils/ranking.ts + * @Description: 排行榜相关的代码 + * + * Copyright (c) ${2022} by Kane, All Rights Reserved. + */ +import { service as instance } from "./api/request.js"; +import { API_URL } from "./api/config.js"; +import { type RankingListItem } from "../types/cpicxim/RankingListItem.js"; + +/** + * 用于请求排行榜数据请求参数 + */ +interface RankingListRequest +{ + departmentCode: string; + year: string; + month: string; +}; + +interface RankingListResponse +{ + success: boolean; + message: string; + departmentCode: string; + year: string; + month: string; + attachingRankingList: RankingListItem[]; + renewalRankintList: RankingListItem[]; +}; + +export { type RankingListRequest, type RankingListResponse };