diff --git a/src/api/judge.ts b/src/api/judge.ts index 2d30d82..8fbfbe3 100644 --- a/src/api/judge.ts +++ b/src/api/judge.ts @@ -150,7 +150,7 @@ export const getJudgeWorkTotal = (workId: number) => { * 提交作品评分信息 * @param workId 作品 id * @param score 评的分 0 ~ 100 - * @param opinion 评价 + * @param opinion 评语 * @return axios 对象 */ export const uploadWorkScoreInfo = (workId: number, score: number, opinion: string) => { diff --git a/src/pages/account/index.tsx b/src/pages/account/index.tsx index a1712cc..32e9da2 100644 --- a/src/pages/account/index.tsx +++ b/src/pages/account/index.tsx @@ -155,18 +155,18 @@ function Main() { title: '姓名', content: `${userProfile[0].name}`, }, - grade: { - title: '年级', - content: `20${userProfile[0].code.charAt(1)}${userProfile[0].code.charAt(2)}级` - // }, - // faculty: { - // title: '学院', - // content: `${userProfile[0].college}`, - // }, - // major: { - // title: '专业', - // content: `${userProfile[0].major}`, - }, + // grade: { + // title: '年级', + // content: `20${userProfile[0].code.charAt(1)}${userProfile[0].code.charAt(2)}级` + // }, + // faculty: { + // title: '学院', + // content: `${userProfile[0].college}`, + // }, + // major: { + // title: '专业', + // content: `${userProfile[0].major}`, + // }, } // const [accountInfo, setAccountInfo] = useState>({ diff --git a/src/pages/create/Components/reviewerSet/index.tsx b/src/pages/create/Components/reviewerSet/index.tsx index 9cd37cb..c94d457 100644 --- a/src/pages/create/Components/reviewerSet/index.tsx +++ b/src/pages/create/Components/reviewerSet/index.tsx @@ -17,7 +17,6 @@ const a = [ '材料与工程学院', '化学与生命科学学院', '物联网学院', - '地理与生物信息学院', '现代邮政学院', '传媒与艺术学院', '管理学院', diff --git a/src/pages/home/index.tsx b/src/pages/home/index.tsx index ff7fe79..ce800f3 100644 --- a/src/pages/home/index.tsx +++ b/src/pages/home/index.tsx @@ -80,14 +80,6 @@ const Home = () => { } }) switch (res.data.data.role) { - case 3: - setUserState('admin') - localStorage.setItem('userState', 'admin') - break - case 2: - setUserState('approver') - localStorage.setItem('userState', 'approver') - break case 0: setUserState('user') localStorage.setItem('userState', 'user') @@ -96,6 +88,14 @@ const Home = () => { setUserState('judge') localStorage.setItem('userState', 'judge') break + case 2: + setUserState('approver') + localStorage.setItem('userState', 'approver') + break + case 3: + setUserState('admin') + localStorage.setItem('userState', 'admin') + break default: break } diff --git a/src/pages/register/index.tsx b/src/pages/register/index.tsx index cb00061..0583b95 100644 --- a/src/pages/register/index.tsx +++ b/src/pages/register/index.tsx @@ -323,7 +323,6 @@ function Register() { { label: '材料与工程学院', value: '材料与工程学院' }, { label: '化学与生命科学学院', value: '化学与生命科学学院' }, { label: '物联网学院', value: '物联网学院' }, - { label: '地理与生物信息学院', value: '地理与生物信息学院' }, { label: '现代邮政学院', value: '现代邮政学院' }, { label: '传媒与艺术学院', value: '传媒与艺术学院' }, { label: '管理学院', value: '管理学院' }, diff --git a/src/pages/review/index.scss b/src/pages/review/index.scss index aec245b..79c034f 100644 --- a/src/pages/review/index.scss +++ b/src/pages/review/index.scss @@ -12,7 +12,7 @@ .manage-content-table-title { margin: 3vh 0 2.5vh 0; line-height: 3.15vh; - font-size: 3.15vh; + font-size: 14px; color: rgba(0, 0, 0, 0.85); // text-shadow: 0 2px 4px; font-weight: normal; diff --git a/src/pages/reviewApprover/index.scss b/src/pages/reviewApprover/index.scss index 902746b..a5cc797 100644 --- a/src/pages/reviewApprover/index.scss +++ b/src/pages/reviewApprover/index.scss @@ -19,7 +19,7 @@ align-content: center; // margin: 3vh 0 1vh 0; line-height: 3.15vh; - font-size: 3.15vh; + font-size: 14px; color: rgba(0, 0, 0, 0.85); .manage-content-title { padding-top: 5px; @@ -78,6 +78,7 @@ height: 17px; line-height: 18px; padding: 10px 14px !important; + font-size: medium; } } .accessorices { @@ -107,7 +108,6 @@ line-height: 18px; padding: 10px 15px; font-size: 18px; - color: #999; } .ant-table-tbody > tr > td:first-child { color: rgba(0, 0, 0, 0.85); diff --git a/src/pages/reviewApprover/index.tsx b/src/pages/reviewApprover/index.tsx index 82d65d0..08bddca 100644 --- a/src/pages/reviewApprover/index.tsx +++ b/src/pages/reviewApprover/index.tsx @@ -99,44 +99,7 @@ const ReviewApprover: React.FC = (props) => { } // 处理提交事件 const handleSubmit = () => { - if (score! >= 0 && score! <= 100) { - if (opinion !== null) { - uploadWorkScoreInfo(Number(id), score!, opinion!).then(() => { - notification.info({ - message: '✅ 提交成功', - description: '自动返回列表', - top: 20, - placement: 'top', - }) - setTimeout(() => { - window.history.back() - }, 100) - - // navigate('/review/detail/' + (current + 1)) - // if (current === total) { - // setTimeout(() => { - // notification.info({ - // message: '😸️ 审批完成', - // description: '这是最后一个', - // top: 20, - // placement: 'top', - // }) - // }, 300) - // } else if (current > total) { - // navigate('/review/detail/' + total) - // } - }) - } else { - setTimeout(() => { - notification.info({ - message: 'x 提交失败', - description: '评价不能为空', - top: 20, - placement: 'top', - }) - }, 300) - } - } else { + if (score === null || score === undefined || score <= 0 || score <= 100) { setTimeout(() => { notification.info({ message: 'x 提交失败', @@ -145,7 +108,36 @@ const ReviewApprover: React.FC = (props) => { placement: 'top', }) }, 100) + return + } + if (opinion === null || opinion === undefined) { + setOpinion("") } + uploadWorkScoreInfo(Number(id), score, String(opinion)).then(() => { + notification.info({ + message: '✅ 提交成功', + description: '自动返回列表', + top: 20, + placement: 'top', + }) + setTimeout(() => { + window.history.back() + }, 100) + + // navigate('/review/detail/' + (current + 1)) + // if (current === total) { + // setTimeout(() => { + // notification.info({ + // message: '😸️ 审批完成', + // description: '这是最后一个', + // top: 20, + // placement: 'top', + // }) + // }, 300) + // } else if (current > total) { + // navigate('/review/detail/' + total) + // } + }) } useEffect(() => { // 请求数据,并把列表中的成员是否为队长布尔型换为字符串 @@ -157,7 +149,7 @@ const ReviewApprover: React.FC = (props) => { // console.log(result.memberList) for (let i = 0; i < res.data.data.memberList.length; i++) { - result.memberList[i].isCaptain = i === 0 ? '队长' : '队员' + result.memberList[i].isCaptain = i === 0 ? '负责人' : '团队成员' } setDataList(result) } else { @@ -179,19 +171,19 @@ const ReviewApprover: React.FC = (props) => { name: string } const columns: ColumnsType = [ - { - title: '职位', - dataIndex: 'isCaptain', - key: '1', - }, { title: '姓名', dataIndex: 'name', - key: '2', + key: '1', }, { title: '学号', dataIndex: 'code', + key: '2', + }, + { + title: '备注', + dataIndex: 'isCaptain', key: '3', }, ] @@ -224,24 +216,24 @@ const ReviewApprover: React.FC = (props) => {
-

队伍名称

-

队伍: {dataList.teamName}

+

队伍名称

+

{dataList.teamName}

-

参赛者信息

+

参赛者信息

- dataSource={dataList.memberList} columns={columns} /> + dataSource={dataList.memberList} columns={columns} bordered />

-

文字展示

+

文字展示

{dataList.texts.map((item: any, index: number) => { return (
  • - {item.input}:{item.content} + {item.input}: {item.content}
  • ) })} @@ -249,7 +241,7 @@ const ReviewApprover: React.FC = (props) => {
    -

    作品展示

    +

    作品展示

    {dataList.accessories.map((item: any, index: number) => { return ( @@ -313,7 +305,7 @@ const ReviewApprover: React.FC = (props) => { />
    - 评价: + 评语: