diff --git a/src/App.js b/src/App.js index 8675a955..e93931c9 100644 --- a/src/App.js +++ b/src/App.js @@ -123,9 +123,21 @@ const AboutUs = Loadable({ loading: Loading, }) -const Teaching = Loadable({ - loader : () => import("./forge/TeachingPractice/Teaching"), - loading: Loading, +// const Teaching = Loadable({ +// loader : () => import("./forge/TeachingPractice/Teaching"), +// loading: Loading, +// }); + +// 首页 +const HomePage = Loadable({ + loader: () => import('./home'), + loading: Loading, +}); + +// 管理页面 +const Managements = Loadable({ + loader: () => import('./military/managements'), + loading: Loading, }) // const CreateMerge = Loadable({ // loader: () => import('./forge/Merge/NewMerge'), @@ -386,6 +398,11 @@ class App extends Component { path="/register" render={(props) =>} > + {/*管理页面*/} + + + {/*403*/} + {/* 忘记密码 */} {/* 教学实践 */} - } - > + > */} {/* 组织 */} { const [current,setCurrent]=useState(JSON.parse(sessionStorage.adminRouter||'[]')); + const [title,setTitle]=useState(''); + function handleClick (e){ + console.log(e) setCurrent([e.key]); + setTitle(e.item.props.title); sessionStorage.setItem( 'adminRouter',JSON.stringify([e.key])); }; const projectMenu = useMemo(() => { return - 项目管理后台 + 项目管理后台 }); @@ -35,109 +39,98 @@ export default props => { 应征投稿协议内容 - 延期任务处理 - {/* 协议签订凭证上传 */} - 支付报酬凭证上传 + 延期任务处理 + 支付报酬凭证上传 - 创客任务列表 + 创客任务列表 }); const competitionMenu = useMemo(() => { - return - 竞赛列表 - 评审任务列表 + return + 竞赛列表 + 赛区配置 + 竞赛评审列表 }); - // const expertMenu = useMemo(() => { - // return - // 专家注册审核 - // 专家库 - // - // }); - const userMenu = useMemo(() => { return - 用户列表 - 主体信息列表 - 试用授权列表 - 自动授权列表 - 专家注册列表 - 专家库列表 + 用户列表 + 主体信息列表 + 试用授权列表 + 自动授权列表 + 专家注册列表 + 专家库列表 }); const forumMenu = useMemo(() => { return - 帖子 - 申请删帖 - 回复 - 版块配置 - 禁言列表 - 版主审批 + 帖子 + 申请删帖 + 回复 + 版块配置 + 禁言列表 + 版主审批 }); const checkMenu = useMemo(() => { return - 企业认证 - {/* 开源项目 */} - 统筹任务发布审批 - 自主任务发布审批 - 成果/评论审批 - 成果上传申诉审批 - 公示期成果申诉审批 - 协议审批 - 成果举报申诉 - 评选佐证材料 + 企业认证 + 开源项目 + 统筹任务发布审批 + 自主任务发布审批 + 成果/评论审批 + 成果上传申诉审批 + 公示期成果申诉审批 + 协议审批 + 成果举报申诉 + 评选佐证材料 }); const limitsMenu = useMemo(() => { return - 权限组配置 - 权限操作配置 + 权限组配置 + 权限操作配置 }); const configMenu = useMemo(() => { return - 关于我们 - 首页版块 - 合作伙伴 + 关于我们 + 首页版块 + 合作伙伴 }); - + console.log(title); return (
-
+
项目
-
+
创客
-
竞赛
+
竞赛
- {/* -
专家
-
*/} - -
用户
+
用户
@@ -145,7 +138,7 @@ export default props => { -
审批
+
审批
diff --git a/src/military/components/adminRouter/index.scss b/src/military/components/adminRouter/index.scss index 954e3e35..05cd3c52 100644 --- a/src/military/components/adminRouter/index.scss +++ b/src/military/components/adminRouter/index.scss @@ -11,6 +11,9 @@ box-sizing: border-box; position: relative; cursor: pointer; + &.active{ + color: #4154f1; + } &::after { content: ""; position: absolute; diff --git a/src/military/expert.js b/src/military/expert.js index c338755d..c626c860 100644 --- a/src/military/expert.js +++ b/src/military/expert.js @@ -16,10 +16,10 @@ const Review = Loadable({ loading: Loading, }); -const AdminRouter = Loadable({ - loader: () => import("./expert/adminRouter"), - loading: Loading, -}); +// const AdminRouter = Loadable({ +// loader: () => import("./expert/adminRouter"), +// loading: Loading, +// }); // const ReviewTasks = Loadable({ // loader: () => import("./expert/reviewTasks"), @@ -56,12 +56,12 @@ const Expert = (propsTransmit) => { > {/* 管理员管理 */} - ( )} - > + > */} ( diff --git a/src/military/managements.js b/src/military/managements.js new file mode 100644 index 00000000..905ea7bf --- /dev/null +++ b/src/military/managements.js @@ -0,0 +1,227 @@ +import React, { useEffect, useState } from "react"; + +import { Route, Switch } from "react-router-dom"; +import { withRouter } from "react-router"; +import { SnackbarHOC } from "educoder"; +import { CNotificationHOC } from "../modules/courses/common/CNotificationHOC"; +import { TPMIndexHOC } from "../modules/tpm/TPMIndexHOC"; +import Loadable from "react-loadable"; +import Loading from "../Loading"; +import AdminRouter from "./components/adminRouter"; +import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC"; +import './index.scss'; + +{/* 任务管理审核 */} +const TaskManage = Loadable({ + loader: () => import("./task/taskManage"), + loading: Loading, +}); + +{/* 成果管理审核 */} +const PaperManage = Loadable({ + loader: () => import("./task/paperManage"), + loading: Loading, +}); + +{/* 成果申诉管理审核 */} +const PaperComplain = Loadable({ + loader: () => import("./task/paperComplain"), + loading: Loading, +}); + +const ProofManage = Loadable({ + loader: () => import("./task/proofManage"), + loading: Loading, +}); + +const PublicityComplain = Loadable({ + loader: () => import("./task/publicityComplain"), + loading: Loading, +}); + +const AgreementManage = Loadable({ + loader: () => import("./task/agreementManage"), + loading: Loading, +}); + +const PayProof = Loadable({ + loader: () => import("./task/payProof"), + loading: Loading, +}); + +const TaskAdmin = Loadable({ + loader: () => import("./task/taskAdmin"), + loading: Loading, +}); + +const DelayManage = Loadable({ + loader: () => import("./task/delayManage"), + loading: Loading, +}); + + + +// 专家库 +const ExpertList = Loadable({ + loader: () => import("./expert/expertList"), + loading: Loading, +}); +// 专家审核 +const RegisterList = Loadable({ + loader: () => import("./expert/registerList"), + loading: Loading, +}); +//创客任务评审规则 +const ReviewRules = Loadable({ + loader : () => import("./expert/reviewRules"), + loading: Loading, +}); +//创客任务选择评审专家 +const SelectExpert = Loadable({ + loader: () => import("./expert/selectExpert"), + loading: Loading, +}); +//创客任务评审结果查看 +const ReviewResult = Loadable({ + loader: () => import("./expert/reviewResult"), + loading: Loading, +}); +//竞赛评审任务列表 +const CompetitionList = Loadable({ + loader: () => import("./expert/competionList"), + loading: Loading, +}) + +const Managements = (propsF) => { + + return ( +
+ + + {/* 任务管理审核 */} + ( + + )} + > + + {/* 成果管理审核 */} + ( + + )} + > + + {/* 成果申诉管理审核 */} + ( + + )} + > + + {/* 公示期成果申诉管理审核 */} + ( + + )} + > + + {/* 佐证管理审核 */} + ( + + )} + > + + {/* 管理员协议审核 */} + ( + + )} + > + + {/* 管理员上传支付凭证 */} + ( + + )} + > + + {/* 管理员任务列表 */} + ( + + )} + > + + {/* 延期管理 */} + ( + + )} + > + + + + {/* 专家审核 */} + ( + + )} + > + {/* 专家库列表 */} + ( + + )} + > + {/* 创客任务评审规则 */} + ( + + )} + > + {/* 创客任务选择评审专家 */} + ( + + )} + > + {/* 创客任务评审结果查看 */} + ( + + )} + > + {/* 竞赛评审任务列表 */} + ( + + )} + > + +
+ ); +} + +export default withRouter( + ImageLayerOfCommentHOC({ + imgSelector: ".imageLayerParent img, .imageLayerParent .imageTarget", + parentSelector: ".newMain", + })(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Managements)))) +); diff --git a/src/military/task.js b/src/military/task.js index 2cd35a11..39bdce8f 100644 --- a/src/military/task.js +++ b/src/military/task.js @@ -32,10 +32,10 @@ const MyTask = Loadable({ }); -const TaskAdminRouter = Loadable({ - loader: () => import("./task/taskAdminRouter"), - loading: Loading, -}); +// const TaskAdminRouter = Loadable({ +// loader: () => import("./task/taskAdminRouter"), +// loading: Loading, +// }); @@ -90,12 +90,12 @@ const Index = (propsTransmit) => { >
{/* 管理员管理 */} - ( )} - > + > */} {/* 任务列表 */} { diff --git a/src/modules/user/LoginRegisterComponent.js b/src/modules/user/LoginRegisterComponent.js index a6ba6570..f4a6d97f 100644 --- a/src/modules/user/LoginRegisterComponent.js +++ b/src/modules/user/LoginRegisterComponent.js @@ -1,6 +1,7 @@ import React, {Component} from 'react'; import {setmiyah,broadcastChannelPostMessage} from 'educoder'; import {Tabs, Input, Checkbox, Button, notification,Menu} from 'antd'; +import { Base64 } from 'js-base64'; import passopen from '../../../src/images/login/passopen.png'; import passoff from '../../../src/images/login/passoff.png'; import axios from 'axios'; @@ -351,7 +352,7 @@ class LoginRegisterComponent extends Component { var url = "/accounts/login.json"; axios.post(url, { login: this.state.login, - password: this.state.password, + password: Base64.encode(this.state.password), }).then((response) => { if (response === undefined) {