From 9f5c219912d276e57401c573f7ea28e11f5eed94 Mon Sep 17 00:00:00 2001 From: "2782522198@qq.com" <2782522198@qq.com> Date: Tue, 26 Mar 2024 20:39:28 +0800 Subject: [PATCH 1/2] =?UTF-8?q?update=20login=20=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/home/components/LoginForm.tsx | 1 + src/pages/home/index.scss | 81 ++++++++++++++++++++++++- src/pages/home/index.tsx | 39 ++++++------ 3 files changed, 102 insertions(+), 19 deletions(-) diff --git a/src/pages/home/components/LoginForm.tsx b/src/pages/home/components/LoginForm.tsx index 92abbdf..bc1b3bc 100644 --- a/src/pages/home/components/LoginForm.tsx +++ b/src/pages/home/components/LoginForm.tsx @@ -71,6 +71,7 @@ function LoginForm(props: loginFormProp) { return (
+
登录 通用比赛管理评审系统
{ // console.log(validateCodeId) return ( + -
+
{/*
*/} @@ -155,7 +156,8 @@ const Home = () => { <> ) : ( -
+ {/*注释多余的Icon*/} + {/*
@@ -163,7 +165,7 @@ const Home = () => {
-
+
*/}
{userProfile.name}
@@ -181,21 +183,24 @@ const Home = () => {
- setCollapsed(value)} - width={200} - className="site-layout-background sidebar" - > - {userState === 'offline' ? ( + {userState === 'offline' ? + - ) : ( + : + setCollapsed(value)} + width={200} + className="site-layout-background sidebar" + > - )} - - - + + } + {userState === 'offline' ? '' : { > - + } ) From 4c13fbb60c9775eee6c713201bcf4d36496506b2 Mon Sep 17 00:00:00 2001 From: "2782522198@qq.com" <2782522198@qq.com> Date: Tue, 26 Mar 2024 23:00:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix=20=E5=89=8D=E7=AB=AF=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/admin.ts | 4 +-- src/api/judge.ts | 28 +++++++++---------- src/api/user.ts | 14 +++++----- src/components/TopBar/index.tsx | 12 ++++---- src/pages/home/components/menu/AdminMenu.tsx | 12 ++++---- .../home/components/menu/ApproveMenu.tsx | 12 ++++---- src/pages/home/components/menu/JudgeMenu.tsx | 12 ++++---- .../home/components/menu/UnLoginMenu.tsx | 6 ++-- src/pages/home/components/menu/UserMenu.tsx | 8 +++--- src/pages/home/index.tsx | 5 ++-- src/pages/registerDetail/index.tsx | 14 +++++----- src/pages/reviewApprover/index.tsx | 6 ++-- src/pages/reviewJudge/index.tsx | 6 ++-- src/pages/workDetail/index.tsx | 12 ++++---- src/pages/workDetail/schema_example2.json | 26 ++++++++--------- src/store/formTemplate.ts | 22 +++++++-------- 16 files changed, 99 insertions(+), 100 deletions(-) diff --git a/src/api/admin.ts b/src/api/admin.ts index 19ef9c8..aa3e40d 100644 --- a/src/api/admin.ts +++ b/src/api/admin.ts @@ -112,8 +112,8 @@ export const assignJudge = (formData: FormData) => { } /** - * 导出作品(分配评委) - * 导出作品后用于分配评委 导出的是一个 excel 文件 + * 导出项目(分配评委) + * 导出项目后用于分配评委 导出的是一个 excel 文件 * @param competitionId 活动Id * @return axios对象 */ diff --git a/src/api/judge.ts b/src/api/judge.ts index 8fbfbe3..078923f 100644 --- a/src/api/judge.ts +++ b/src/api/judge.ts @@ -2,8 +2,8 @@ import axios from 'axios' import { apis } from '.' /** - * 提交作品审核列表 - * @param workId 作品 id + * 提交项目审核列表 + * @param workId 项目 id * @param accept 是否通过 值为 true 或 false (接口文档里类型标的是integer? * @param opinion 对通过情况的说明 * @return axios 对象 @@ -36,7 +36,7 @@ export const getJudgeCompetitionList = (page: number) => { } /** - * 获取审核作品列表 + * 获取审核项目列表 * @param comId 比赛 id * @param page 当前页数 * @return axios 对象 @@ -53,8 +53,8 @@ export const getJudgeWorkList = (comId: number, page: number) => { } /** - * 获取审核作品信息 - * @param workId 作品id + * 获取审核项目信息 + * @param workId 项目id * @return axios 对象 */ export const getJudgeWorkInfo = (workId: number) => { @@ -83,7 +83,7 @@ export const getScoreCompetitionList = (page: number) => { } /** - * 获取评分作品列表 + * 获取评分项目列表 * @param comId 比赛 id * @param page 当前页数 * @return axios 对象 @@ -100,8 +100,8 @@ export const getScoreWorkList = (comId: number, page: number) => { } /** - * 获取评分作品信息 - * @param workId 作品id + * 获取评分项目信息 + * @param workId 项目id * @return axios 对象 */ export const getScoreWork = (workId: number) => { @@ -117,8 +117,8 @@ export const getScoreWork = (workId: number) => { }) } /** - * 获取评分作品总数 - * @param workId 作品id + * 获取评分项目总数 + * @param workId 项目id * @return axios 对象 */ export const getScoreWorkTotal = (workId: number) => { @@ -132,8 +132,8 @@ export const getScoreWorkTotal = (workId: number) => { } /** - * 获取审批作品总数 - * @param workId 作品id + * 获取审批项目总数 + * @param workId 项目id * @return axios 对象 */ export const getJudgeWorkTotal = (workId: number) => { @@ -147,8 +147,8 @@ export const getJudgeWorkTotal = (workId: number) => { } /** - * 提交作品评分信息 - * @param workId 作品 id + * 提交项目评分信息 + * @param workId 项目 id * @param score 评的分 0 ~ 100 * @param opinion 评语 * @return axios 对象 diff --git a/src/api/user.ts b/src/api/user.ts index a5b1f1b..9149799 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -102,11 +102,11 @@ export const getTeamInfo = (competitionId: number) => { } /** - * 上传审批作品 + * 上传审批项目 * @param competitionId 比赛 id * @param name 输入框名 - * @param introduce 作品介绍 - * @param file 评审作品 仅允许zip格式 + * @param introduce 项目介绍 + * @param file 评审项目 仅允许zip格式 * @returns axios对象 */ export const uploadWork = (competitionId: number, input: string, file: File, onProgress: any) => { @@ -125,7 +125,7 @@ export const uploadWork = (competitionId: number, input: string, file: File, onP } /** - * 删除评审作品 + * 删除评审项目 * @param competitionId 比赛Id * @returns axios对象 */ @@ -140,7 +140,7 @@ export const deleteWork = (competitionId: number) => { } /** - * 获取已提交作品信息 + * 获取已提交项目信息 * @param competitionId 比赛Id * @returns axios对象 */ @@ -152,7 +152,7 @@ export const getWorkInfo = (competitionId: number) => { } /** - * 获取作品资料表单 + * 获取项目资料表单 * @param competitionId 比赛Id * @returns axios对象 */ @@ -164,7 +164,7 @@ export const getWorkSchema = (competitionId: number) => { } /** - * 提交作品资料表单 + * 提交项目资料表单 * @param competitionId 比赛Id * @param data 没写描述 * @returns axios对象 diff --git a/src/components/TopBar/index.tsx b/src/components/TopBar/index.tsx index 83e7621..61d0fb3 100644 --- a/src/components/TopBar/index.tsx +++ b/src/components/TopBar/index.tsx @@ -13,15 +13,15 @@ function TopBar(props?: { activity?: string }) { window.history.back() } const breadcrumbNameMap: Record = { - '/activity': '活动广场', + '/activity': '比赛入口', '/inbox': '收件箱', - '/manage': '活动管理', - '/create': '创建活动', + '/manage': '比赛管理', + '/create': '创建比赛', '/account': '我的帐号', - '/review': '活动评审', + '/review': '比赛评审', '/list': '比赛', - '/detail': '活动列表', - '/register': '活动报名', + '/detail': '比赛列表', + '/register': '比赛报名', '/register-detail': '报名参加详情', '/notice': '发布公告', '/work-detail': '项目提交信息', diff --git a/src/pages/home/components/menu/AdminMenu.tsx b/src/pages/home/components/menu/AdminMenu.tsx index 5668a0e..f63c44d 100644 --- a/src/pages/home/components/menu/AdminMenu.tsx +++ b/src/pages/home/components/menu/AdminMenu.tsx @@ -1,4 +1,4 @@ -import { DashboardOutlined } from '@ant-design/icons' +import { DashboardOutlined, MessageOutlined, SendOutlined, SettingOutlined } from '@ant-design/icons' import { useRecoilValue } from 'recoil' import { userInboxPointState } from '../../../../store/userInboxState' import { Menu } from 'antd' @@ -16,14 +16,14 @@ function AdminMenu(props: any) { }> 我的账号 - }> + }> 收件箱 {point === 'on' ? : <>} - }> - 活动广场 + }> + 比赛入口 - }> - 活动管理 + }> + 比赛管理 ) diff --git a/src/pages/home/components/menu/ApproveMenu.tsx b/src/pages/home/components/menu/ApproveMenu.tsx index 0111b28..9608638 100644 --- a/src/pages/home/components/menu/ApproveMenu.tsx +++ b/src/pages/home/components/menu/ApproveMenu.tsx @@ -1,4 +1,4 @@ -import { DashboardOutlined } from '@ant-design/icons' +import { DashboardOutlined, MessageOutlined, SendOutlined, SettingOutlined } from '@ant-design/icons' import { useRecoilValue } from 'recoil' import { userInboxPointState } from '../../../../store/userInboxState' import { Menu } from 'antd' @@ -16,14 +16,14 @@ function ApproveMenu(props: any) { }> 我的账号 - }> + }> 收件箱{point === 'on' ? : <>} - }> - 活动广场 + }> + 比赛入口 - }> - 活动评审 + }> + 比赛评审 ) diff --git a/src/pages/home/components/menu/JudgeMenu.tsx b/src/pages/home/components/menu/JudgeMenu.tsx index f9bd42d..d933fe3 100644 --- a/src/pages/home/components/menu/JudgeMenu.tsx +++ b/src/pages/home/components/menu/JudgeMenu.tsx @@ -1,4 +1,4 @@ -import { DashboardOutlined } from '@ant-design/icons' +import { DashboardOutlined, MessageOutlined, SendOutlined, SettingOutlined } from '@ant-design/icons' import { useRecoilValue } from 'recoil' import { userInboxPointState } from '../../../../store/userInboxState' import { Menu } from 'antd' @@ -15,14 +15,14 @@ function JudgeMenu(props: any) { }> 我的账号 - }> + }> 收件箱{point === 'on' ? : <>} - }> - 活动广场 + }> + 比赛入口 - }> - 活动评审 + }> + 比赛评审 ) diff --git a/src/pages/home/components/menu/UnLoginMenu.tsx b/src/pages/home/components/menu/UnLoginMenu.tsx index 77529c9..a0d2c94 100644 --- a/src/pages/home/components/menu/UnLoginMenu.tsx +++ b/src/pages/home/components/menu/UnLoginMenu.tsx @@ -1,6 +1,6 @@ import React from 'react' import { Menu } from 'antd' -import { DashboardOutlined } from '@ant-design/icons' +import { DashboardOutlined, SendOutlined } from '@ant-design/icons' function UnLoginMenu(props: any) { return ( - }> - 活动广场 + }> + 比赛入口 ) diff --git a/src/pages/home/components/menu/UserMenu.tsx b/src/pages/home/components/menu/UserMenu.tsx index b5a752f..281bed7 100644 --- a/src/pages/home/components/menu/UserMenu.tsx +++ b/src/pages/home/components/menu/UserMenu.tsx @@ -1,4 +1,4 @@ -import { DashboardOutlined } from '@ant-design/icons' +import { DashboardOutlined, MessageOutlined, SendOutlined, SettingOutlined } from '@ant-design/icons' import { useRecoilValue } from 'recoil' import { userInboxPointState } from '../../../../store/userInboxState' import { Menu } from 'antd' @@ -16,11 +16,11 @@ function UserMenu(props: any) { }> 我的账号 - }> + }> 收件箱{point === 'on' ? : <>} - }> - 活动广场 + }> + 比赛入口 ) diff --git a/src/pages/home/index.tsx b/src/pages/home/index.tsx index 61d7489..1c3a699 100644 --- a/src/pages/home/index.tsx +++ b/src/pages/home/index.tsx @@ -144,7 +144,7 @@ const Home = () => { return ( -
+ {userState === 'offline' ? '' :
{/*
*/} @@ -181,11 +181,10 @@ const Home = () => { )}
-
+
} {userState === 'offline' ? diff --git a/src/pages/registerDetail/index.tsx b/src/pages/registerDetail/index.tsx index 9324c2b..8803cbc 100644 --- a/src/pages/registerDetail/index.tsx +++ b/src/pages/registerDetail/index.tsx @@ -102,10 +102,10 @@ function RegisterDetail() { getWorkInfo(Number(id)).then((res) => { // console.log(res) setWorkData(res.data.data) - if (res.data.errMsg === '您还未上传作品') { + if (res.data.errMsg === '您还未上传项目') { notification.warning({ - message: '您还未上传作品', - description: '请记得提交您的作品哦,否则无法正常参赛', + message: '您还未上传项目', + description: '请记得提交您的项目哦,否则无法正常参赛', placement: 'topRight', top: 150, duration: 5, @@ -317,11 +317,11 @@ function RegisterDetail() { 修改报名信息
-
作品提交信息
+
项目提交信息
{workData?.length === 0 || workData === null || workData === undefined || beforeSubmitTime === true ? ( - + ) : ( workData?.map((item, index) => { if (item.isFile) { @@ -353,13 +353,13 @@ function RegisterDetail() { afterSubmitTime ? ( <>
   已经超过提交时间
) : ( ) ) : ( diff --git a/src/pages/reviewApprover/index.tsx b/src/pages/reviewApprover/index.tsx index 08bddca..dc60141 100644 --- a/src/pages/reviewApprover/index.tsx +++ b/src/pages/reviewApprover/index.tsx @@ -18,7 +18,7 @@ const ReviewApprover: React.FC = (props) => { // 定义显示数据 const { TextArea } = Input - // 获取作品id + // 获取项目id const { id } = useParams() console.log(id) @@ -211,7 +211,7 @@ const ReviewApprover: React.FC = (props) => { - +
@@ -241,7 +241,7 @@ const ReviewApprover: React.FC = (props) => {
-

作品展示

+

项目展示

{dataList.accessories.map((item: any, index: number) => { return ( diff --git a/src/pages/reviewJudge/index.tsx b/src/pages/reviewJudge/index.tsx index 9b98ce5..8ff6786 100644 --- a/src/pages/reviewJudge/index.tsx +++ b/src/pages/reviewJudge/index.tsx @@ -11,7 +11,7 @@ import { DownloadOutlined } from '@ant-design/icons' const { Link } = Anchor const ReviewJudge: React.FC = (props) => { - // 获取作品id + // 获取项目id const { id } = useParams() console.log(id) @@ -167,7 +167,7 @@ const ReviewJudge: React.FC = (props) => { // getContainer={() => document.querySelector('.message')} > - +
@@ -193,7 +193,7 @@ const ReviewJudge: React.FC = (props) => {
{/*

指导老师:{dataList.texts}

*/} -
作品展示
+
项目展示
{dataList.texts.map((item: any, index: number) => { return ( diff --git a/src/pages/workDetail/index.tsx b/src/pages/workDetail/index.tsx index 1879da6..adbdcfa 100644 --- a/src/pages/workDetail/index.tsx +++ b/src/pages/workDetail/index.tsx @@ -144,7 +144,7 @@ function WorkDetail() { key: 'loading', }) setErrCode(3) - setErrMsg('该比赛没有作品提交表单') + setErrMsg('该比赛没有项目提交表单') setMessageSent(true) setMessageStatus('error') } @@ -187,12 +187,12 @@ function WorkDetail() { console.log(res) setWorkData(res.data.data) if (res.data.data === null) { - if (res.data.errMsg === '您还未上传作品' && JSON.stringify(remoteSchema) !== '{}') { + if (res.data.errMsg === '您还未上传项目' && JSON.stringify(remoteSchema) !== '{}') { setLoading(false) clearTimeout(stillLoading) clearTimeout(loadingError) message.info({ - content: '💡 请填写你的作品信息', + content: '💡 请填写你的项目信息', key: 'loading', }) } @@ -463,14 +463,14 @@ function WorkDetail() {
-
作品提交信息
+
项目提交信息
{messageSent === true ? ( messageStatus === 'success' ? ( 返回比赛详情 @@ -497,7 +497,7 @@ function WorkDetail() {
红色星号(* - )代表该选项必填,为了保证您顺利参赛,请按照比赛举办方要求仔细填写本表单提交作品信息 + )代表该选项必填,为了保证您顺利参赛,请按照比赛举办方要求仔细填写本表单提交项目信息