diff --git a/src/assets/avatar-logo.png b/src/assets/avatar-logo.png new file mode 100644 index 0000000..eabe86f Binary files /dev/null and b/src/assets/avatar-logo.png differ diff --git a/src/assets/avatar-title.png b/src/assets/avatar-title.png new file mode 100644 index 0000000..5fc7f53 Binary files /dev/null and b/src/assets/avatar-title.png differ diff --git a/src/assets/avatar.jpg b/src/assets/avatar.jpg deleted file mode 100644 index 9602360..0000000 Binary files a/src/assets/avatar.jpg and /dev/null differ diff --git a/src/components/TopBar/index.tsx b/src/components/TopBar/index.tsx index 61d0fb3..2c06680 100644 --- a/src/components/TopBar/index.tsx +++ b/src/components/TopBar/index.tsx @@ -2,6 +2,7 @@ import { RollbackOutlined } from '@ant-design/icons' import { Breadcrumb, Button } from 'antd' import React, { Fragment } from 'react' import { useLocation, Link } from 'react-router-dom' + import './index.scss' /** @@ -9,6 +10,8 @@ import './index.scss' */ function TopBar(props?: { activity?: string }) { // let processedExtraBreadcrumbItems = [] + const role = localStorage.getItem('userState') + const reviewValue = role === 'judge' ? '比赛审核' : '比赛评审' const handleGoBack = () => { window.history.back() } @@ -18,8 +21,8 @@ function TopBar(props?: { activity?: string }) { '/manage': '比赛管理', '/create': '创建比赛', '/account': '我的帐号', - '/review': '比赛评审', - '/list': '比赛', + '/review': reviewValue, + '/list': '项目列表', '/detail': '比赛列表', '/register': '比赛报名', '/register-detail': '报名参加详情', @@ -32,7 +35,6 @@ function TopBar(props?: { activity?: string }) { const pathSnippets = location.pathname.split('/').filter((i) => i) const extraBreadcrumbItems = pathSnippets.map((item, index) => { const url = `/${pathSnippets.slice(0, index + 1).join('/')}` - // console.log(url) if (!isNaN(Number(pathSnippets[index])) && props?.activity !== undefined) { return ( @@ -47,6 +49,13 @@ function TopBar(props?: { activity?: string }) { ) } }) + + //筛选出面包屑内容为空的Item (无activity) + const filterBreadcrumbItems = + extraBreadcrumbItems.filter(item => + item.props.children.props.children !== undefined) + + // if (props?.activity !== null) { // processedExtraBreadcrumbItems = extraBreadcrumbItems.slice(0, 1) // // console.log(extraBreadcrumbItems.slice(0,1)) @@ -70,7 +79,7 @@ function TopBar(props?: { activity?: string }) { 主页 , - ].concat(extraBreadcrumbItems) + ].concat(filterBreadcrumbItems) // .concat(moreExtraBreadcrumbItems()) return (
diff --git a/src/index.tsx b/src/index.tsx index c1b98fc..9791d40 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -8,8 +8,8 @@ import 'antd/dist/antd.min.css' import App from './App' import reportWebVitals from './reportWebVitals' import { BrowserTracing } from '@sentry/tracing' -import { LoadingOutlined } from '@ant-design/icons' -import { Spin } from 'antd' +// import { LoadingOutlined } from '@ant-design/icons' +// import { Spin } from 'antd' Sentry.setContext('用户信息', { 姓名: '' + localStorage.getItem('approval-system-name'), diff --git a/src/pages/activityDetail/index.tsx b/src/pages/activityDetail/index.tsx index 1b4e072..b4f609c 100644 --- a/src/pages/activityDetail/index.tsx +++ b/src/pages/activityDetail/index.tsx @@ -136,7 +136,7 @@ function ActivityDetail() { return '报名' } case 'judge': - return '审批' + return '审核' case 'approver': return '评审' default: diff --git a/src/pages/create/Components/reviewerSet/index.tsx b/src/pages/create/Components/reviewerSet/index.tsx index 7f76a63..8ce172a 100644 --- a/src/pages/create/Components/reviewerSet/index.tsx +++ b/src/pages/create/Components/reviewerSet/index.tsx @@ -34,10 +34,10 @@ const ReviewSet: React.FC = (props) => { return (
- 审批者学号 + 审核者学号 { setValue(index, e.target.value) @@ -46,12 +46,12 @@ const ReviewSet: React.FC = (props) => { />
- 审批学院代号 + 审核学院代号 {value.key === -1 ? ( { setReviewSettings((pre) => { @@ -729,7 +729,7 @@ function Create() {
) : ( <> -
如需添加审批者请点击左方按钮
+
如需添加审核者请点击左方按钮
)}
diff --git a/src/pages/edit/index.tsx b/src/pages/edit/index.tsx index 5dc38c5..e6e4a79 100644 --- a/src/pages/edit/index.tsx +++ b/src/pages/edit/index.tsx @@ -560,10 +560,10 @@ const Edit: React.FC = () => {
{competitionInfo.is_review === 1 ? (
- 默认审批者 + 默认审核者 { setReviewSettings((pre) => { @@ -577,7 +577,7 @@ const Edit: React.FC = () => {
) : ( <> -
如需添加审批者请点击左方按钮
+
如需添加审核者请点击左方按钮
)}
diff --git a/src/pages/home/components/userProfile.tsx b/src/pages/home/components/userProfile.tsx index 2a8c5d7..f9e1c45 100644 --- a/src/pages/home/components/userProfile.tsx +++ b/src/pages/home/components/userProfile.tsx @@ -1,5 +1,5 @@ import React from 'react' -import avatar from "../../../assets/avatar.jpg" +import avatar from "../../../assets/avatar-logo.png" type userProfileType = { code: string //学号 @@ -10,7 +10,7 @@ const UserProfile: React.FC = (props) => { const { code, name, logout } = props return (
- avatar + avatar
{code} {name} diff --git a/src/pages/home/index.tsx b/src/pages/home/index.tsx index 3182e8b..43b9cde 100644 --- a/src/pages/home/index.tsx +++ b/src/pages/home/index.tsx @@ -12,7 +12,7 @@ import './index.scss' import { login } from '../../api/public' import { getUserProfile } from '../../api/user' import LogoSvg from "../../assets/Logo.svg" -import avatar from "../../assets/avatar.jpg" +import avatar from "../../assets/avatar-title.png" import Footer from './components/SASTlogo' const { Header, Content, Sider } = Layout @@ -169,7 +169,7 @@ const Home = () => {
*/}
- avatar + avatar
{userProfile.name}
diff --git a/src/pages/manage/index.tsx b/src/pages/manage/index.tsx index c040a1f..62f0ab5 100644 --- a/src/pages/manage/index.tsx +++ b/src/pages/manage/index.tsx @@ -171,7 +171,7 @@ const Manage: React.FC = () => {
{/*

活动管理

*/}
@@ -182,14 +182,14 @@ const Manage: React.FC = () => { 开始日期 结束日期 比赛简介 - 审批人员 - 活动状态 + 审核人员 + 比赛状态 已报名队伍 已提交材料数 - 审批完毕数 + 审核完毕数 导出Excel 发布公告 - 管理活动 + 管理比赛
{isLoading ? ( @@ -198,8 +198,8 @@ const Manage: React.FC = () => { ) : ( pageState.records.map((value, index) => { diff --git a/src/pages/notice/index.tsx b/src/pages/notice/index.tsx index eab48d6..0ecdfa3 100644 --- a/src/pages/notice/index.tsx +++ b/src/pages/notice/index.tsx @@ -230,7 +230,7 @@ function Notice() { 公开 选手 评委 - 审批人 + 审核人
diff --git a/src/pages/review/index.tsx b/src/pages/review/index.tsx index 590bff0..c6517e1 100644 --- a/src/pages/review/index.tsx +++ b/src/pages/review/index.tsx @@ -140,7 +140,7 @@ const JudgeReview: React.FC = (props) => { }, { key: '3', - title: '待审批数', + title: '待审核数', render(value, record, index) { return ( @@ -151,17 +151,17 @@ const JudgeReview: React.FC = (props) => { }, { key: '4', - title: '已审批数', + title: '已审核数', dataIndex: 'completedNum', }, { key: '5', - title: '审批开始日期', + title: '审核开始日期', dataIndex: 'startDate', }, { key: '6', - title: '审批截止日期', + title: '审核截止日期', dataIndex: 'endDate', }, { @@ -172,7 +172,7 @@ const JudgeReview: React.FC = (props) => { @@ -191,7 +191,7 @@ const JudgeReview: React.FC = (props) => {
-

活动审批

+

活动审核

columns={columns} diff --git a/src/pages/reviewJudge/index.tsx b/src/pages/reviewJudge/index.tsx index fc3f32f..eefe04a 100644 --- a/src/pages/reviewJudge/index.tsx +++ b/src/pages/reviewJudge/index.tsx @@ -147,10 +147,10 @@ const ReviewJudge: React.FC = (props) => { // document.querySelector('.navigation').addEventListener('scroll', handleScroll) return (
- +
-

审批

+

审核