diff --git a/src/common/RouterUtil.js b/src/common/RouterUtil.js index 39cf06960..9adedfadc 100644 --- a/src/common/RouterUtil.js +++ b/src/common/RouterUtil.js @@ -19,12 +19,12 @@ export function goUser(login) { localStorage.chromesetting && JSON.parse(localStorage.chromesetting).main_web_site_url; window.location.href = `${main_web_site_url}/accounts/${login}`; -// window.location.href = `/${login}`; } -export function goUserMes(login) { +export function goUserMes(user_id) { const main_web_site_url = localStorage.chromesetting && JSON.parse(localStorage.chromesetting).main_web_site_url; - window.location.href = `${main_web_site_url}/accounts/${login}`; + const login =sessionStorage.current_user &&JSON.parse(sessionStorage.current_user).login; + window.location.href = `${main_web_site_url}/users/${login}/message_detail?user_id=${user_id}`; } diff --git a/src/military/components/adminRouter/index.jsx b/src/military/components/adminRouter/index.jsx index 54e2bf430..2328006a8 100644 --- a/src/military/components/adminRouter/index.jsx +++ b/src/military/components/adminRouter/index.jsx @@ -1,4 +1,4 @@ -import React, { useMemo,useState } from 'react'; +import React, { useEffect, useMemo,useState } from 'react'; import { Link } from "react-router-dom"; import { Menu, Dropdown, } from 'antd'; @@ -7,11 +7,14 @@ import './index.scss'; const { SubMenu } = Menu; export default props => { - + const {current_user}=props; const main_web_site_url =localStorage.chromesetting&& JSON.parse(localStorage.chromesetting).main_web_site_url; const current_main_site_url =localStorage.chromesetting&& JSON.parse(localStorage.chromesetting).current_main_site_url; const noticeUrl =localStorage.chromesetting&& JSON.parse(localStorage.chromesetting).api_urls.notice; - + useEffect(()=>{ + sessionStorage.setItem('current_user',JSON.stringify(current_user)); + },[current_user.login]); + const [current,setCurrent]=useState(JSON.parse(sessionStorage.adminRouter||'[]')); const [title,setTitle]=useState(''); diff --git a/src/military/expert.js b/src/military/expert.js index c626c8606..5bad4b7c5 100644 --- a/src/military/expert.js +++ b/src/military/expert.js @@ -16,15 +16,6 @@ const Review = Loadable({ loading: Loading, }); -// const AdminRouter = Loadable({ -// loader: () => import("./expert/adminRouter"), -// loading: Loading, -// }); - -// const ReviewTasks = Loadable({ -// loader: () => import("./expert/reviewTasks"), -// loading: Loading, -// }) const ExpertUser = Loadable({ loader: () => import("./expert/expertUser"), loading: Loading, @@ -54,14 +45,7 @@ const Expert = (propsTransmit) => { )} > - - {/* 管理员管理 */} - {/* ( - - )} - > */} + ( diff --git a/src/military/expert/adminRouter.js b/src/military/expert/adminRouter.js deleted file mode 100644 index 61d467f9d..000000000 --- a/src/military/expert/adminRouter.js +++ /dev/null @@ -1,92 +0,0 @@ -import React from "react"; - -import { Route, Switch } from "react-router-dom"; -import Loadable from "react-loadable"; -import Loading from "../../Loading"; -import AdminRouter from "../components/adminRouter"; - -// 专家库 -const ExpertList = Loadable({ - loader: () => import("./expertList"), - loading: Loading, -}); -// 专家审核 -const RegisterList = Loadable({ - loader: () => import("./registerList"), - loading: Loading, -}); -//创客任务评审规则 -const ReviewRules = Loadable({ - loader : () => import("./reviewRules"), - loading: Loading, -}); -//创客任务选择评审专家 -const SelectExpert = Loadable({ - loader: () => import("./selectExpert"), - loading: Loading, -}); -//创客任务评审结果查看 -const ReviewResult = Loadable({ - loader: () => import("./reviewResult"), - loading: Loading, -}); -//竞赛评审任务列表 -const CompetitionList = Loadable({ - loader: () => import("./competionList"), - loading: Loading, -}) - -const AdminPage = (propsF) => { - - return ( - - - - {/* 专家审核 */} - ( - - )} - > - {/* 专家库列表 */} - ( - - )} - > - {/* 创客任务评审规则 */} - ( - - )} - > - {/* 创客任务选择评审专家 */} - ( - - )} - > - {/* 创客任务评审结果查看 */} - ( - - )} - > - {/* 竞赛评审任务列表 */} - ( - - )} - > - - - ); -} -// } -export default AdminPage; diff --git a/src/military/expert/competionList/index.jsx b/src/military/expert/competionList/index.jsx index e09efba10..b723f7d22 100644 --- a/src/military/expert/competionList/index.jsx +++ b/src/military/expert/competionList/index.jsx @@ -114,7 +114,7 @@ function Competition(props){ dataIndex: 'current_status', key: "rules", render: (text, record) => { - return record.assignRuleAndExperts ? : record.is_expert_audit && text<4 ? 编辑 : 编辑 + return record.assignRuleAndExperts ? : record.is_expert_audit && text<4 ? 编辑 : 编辑 } }, { @@ -122,7 +122,7 @@ function Competition(props){ dataIndex: 'current_status', key: "experts", render: (text, record) => { - return record.assignRuleAndExperts ? : record.is_expert_audit && text<4 ? 选择 : 选择 + return record.assignRuleAndExperts ? : record.is_expert_audit && text<4 ? 选择 : 选择 } }, { @@ -138,7 +138,7 @@ function Competition(props){ dataIndex: 'assignRuleAndExperts', key: "results", render: (text, record) => { - return text ? 查看:查看 + return text ? 查看:查看 } } ]; diff --git a/src/military/expert/expertList/index.jsx b/src/military/expert/expertList/index.jsx index 89c86e8f6..bf5e163a4 100644 --- a/src/military/expert/expertList/index.jsx +++ b/src/military/expert/expertList/index.jsx @@ -373,7 +373,7 @@ function RegisterList({ showNotification }) { row.id} diff --git a/src/military/managements.js b/src/military/managements.js index 905ea7bf3..098b8f023 100644 --- a/src/military/managements.js +++ b/src/military/managements.js @@ -174,7 +174,7 @@ const Managements = (propsF) => { {/* 专家审核 */} ( )} diff --git a/src/military/task.js b/src/military/task.js index 39bdce8f4..84f58a2fe 100644 --- a/src/military/task.js +++ b/src/military/task.js @@ -32,13 +32,6 @@ const MyTask = Loadable({ }); -// const TaskAdminRouter = Loadable({ -// loader: () => import("./task/taskAdminRouter"), -// loading: Loading, -// }); - - - const Index = (propsTransmit) => { // 开发时,从代理的位置获取用户信息 const [currentUser, setCurrentUser] = useState(propsTransmit.current_user); diff --git a/src/military/task/components/adminRouter/index.jsx b/src/military/task/components/adminRouter/index.jsx deleted file mode 100644 index 944de3759..000000000 --- a/src/military/task/components/adminRouter/index.jsx +++ /dev/null @@ -1,138 +0,0 @@ -import React, { useMemo } from 'react'; -import { Menu, Dropdown, } from 'antd'; -import { current_main_site_url, main_web_site_url } from '../../static'; - -import './index.scss'; - -const { SubMenu } = Menu; - -export default props => { - - const projectMenu = useMemo(() => { - return - 项目管理后台 - - }); - - const taskMenu = useMemo(() => { - return - - 任务领域 - 行业信息 - 职位信息 - 需求导入模板 - 签订协议内容 - 应征投稿协议内容 - - - 延期任务处理 - {/* 协议签订凭证上传 */} - 支付报酬凭证上传 - - - 任务列表 - 创意征集评论 - - }); - - const competitionMenu = useMemo(() => { - return - 竞赛列表 - - }); - - const userMenu = useMemo(() => { - return - 用户列表 - 主体信息列表 - 试用授权列表 - 自动授权列表 - - }); - - const forumMenu = useMemo(() => { - return - 帖子 - 申请删帖 - 回复 - 版块配置 - 禁言列表 - 版主审批 - - }); - - - const checkMenu = useMemo(() => { - return - 企业认证 - 开源项目 - 统筹任务发布审批 - 自主任务发布审批 - 成果上传申诉审批 - 公示期成果申诉审批 - 协议审批 - 成果举报申诉 - 评选佐证材料 - - }); - - - const limitsMenu = useMemo(() => { - return - 权限组配置 - 权限操作配置 - - }); - - - const configMenu = useMemo(() => { - return - 关于我们 - 首页版块 - 合作伙伴 - - }); - - - return ( -
- -
- 项目 -
-
- - -
- 创客 -
-
- - -
竞赛
-
- - -
用户
-
- - -
论坛交流
-
- - -
审批
-
- - -
权限管理
-
- - -
网站配置
-
- - -
- ) -} \ No newline at end of file diff --git a/src/military/task/components/adminRouter/index.scss b/src/military/task/components/adminRouter/index.scss deleted file mode 100644 index 954e3e35c..000000000 --- a/src/military/task/components/adminRouter/index.scss +++ /dev/null @@ -1,24 +0,0 @@ -.managements_menus { - background: #fff; - border: 1px solid #eee; - - .drop-div { - position: relative; - float: left; - width: 108px; - text-align: center; - padding: 15px 0px; - box-sizing: border-box; - position: relative; - cursor: pointer; - &::after { - content: ""; - position: absolute; - right: 1px; - top: 20px; - width: 1px; - height: 20px; - background-color: #ddd; - } - } -} diff --git a/src/military/task/components/itemAgreementManage/index.jsx b/src/military/task/components/itemAgreementManage/index.jsx index 9219d4a5a..56f1ca80e 100644 --- a/src/military/task/components/itemAgreementManage/index.jsx +++ b/src/military/task/components/itemAgreementManage/index.jsx @@ -100,7 +100,7 @@ export default Form.create()((props) => { { item.status === 2 && - { goUserMes(item.user.login) }}>私信 + { goUserMes(item.user.id) }}>私信 { agreeClick(item) }}>同意 { refuseClick(item) }}>驳回 diff --git a/src/military/task/components/itemDelayManage/index.jsx b/src/military/task/components/itemDelayManage/index.jsx index 92088f8d4..3bd9aacb6 100644 --- a/src/military/task/components/itemDelayManage/index.jsx +++ b/src/military/task/components/itemDelayManage/index.jsx @@ -152,7 +152,7 @@ export default Form.create()((props) => { { item.cancelStatus === 0 && - { goUserMes(item.user.login) }}>私信 + { goUserMes(item.user.id) }}>私信 { delayClick(item) }}>延期 { closeClick(item) }}>关闭 diff --git a/src/military/task/components/itemPayProof/index.jsx b/src/military/task/components/itemPayProof/index.jsx index 4e71b8167..8cdabebc4 100644 --- a/src/military/task/components/itemPayProof/index.jsx +++ b/src/military/task/components/itemPayProof/index.jsx @@ -62,7 +62,7 @@ export default Form.create()((props) => { {timeAgo(item.createdAt)} 发布方式: {item.task && item.task.publishMode === 1 ? '统筹任务' : '自主提交'} - { item.user && goUserMes(item.user.login) }}>私信 + { item.user && goUserMes(item.user.id) }}>私信
diff --git a/src/military/task/components/itemProofManage/index.jsx b/src/military/task/components/itemProofManage/index.jsx index 74255d811..4de3b8459 100644 --- a/src/military/task/components/itemProofManage/index.jsx +++ b/src/military/task/components/itemProofManage/index.jsx @@ -91,7 +91,7 @@ export default (props) => { { item.taskResultProof.status === 2 && - { goUserMes(item.user.login) }}>私信 + { goUserMes(item.user.id) }}>私信 { agreeClick(item) }}>同意 { refuseClick(item) }}>拒绝 diff --git a/src/military/task/components/itemPublicityComplain/index.jsx b/src/military/task/components/itemPublicityComplain/index.jsx index 08ad81bd4..4a176b575 100644 --- a/src/military/task/components/itemPublicityComplain/index.jsx +++ b/src/military/task/components/itemPublicityComplain/index.jsx @@ -78,7 +78,7 @@ export default Form.create()((props) => { { goUser(item.user.login) }}>{item.user && (item.user.nickname || item.user.login)} {timeAgo(item.createdAt)} - { goUserMes(item.user.login) }}>私信 + { goUserMes(item.user.id) }}>私信 {item.status === 2 && { deal(item) }}>处理} diff --git a/src/military/task/components/itemTaskManage/index.jsx b/src/military/task/components/itemTaskManage/index.jsx index fc5601d66..74df438ee 100644 --- a/src/military/task/components/itemTaskManage/index.jsx +++ b/src/military/task/components/itemTaskManage/index.jsx @@ -95,7 +95,7 @@ export default (props) => { { item.status === 1 && - { goUserMes(item.user.login) }}>私信 + { goUserMes(item.user.id) }}>私信 { agreeClick(item.id) }}>同意 { refuseClick(item.id) }}>拒绝 diff --git a/src/military/task/taskAdmin/index.jsx b/src/military/task/taskAdmin/index.jsx index 8241c23a6..4829b6068 100644 --- a/src/military/task/taskAdmin/index.jsx +++ b/src/military/task/taskAdmin/index.jsx @@ -232,14 +232,14 @@ export default Form.create()(({ form, showNotification, match, history, state }) title: '评审规则', dataIndex: 'ruleEditedCount', render: (text, record) => { - return record.assignRuleAndExperts ? : record.expertReview && (record.status === 1 || record.status === 3) ? 编辑 : 编辑 + return record.assignRuleAndExperts ? : record.expertReview && (record.status === 1 || record.status === 3) ? 编辑 : 编辑 } }, { title: '专家选取', dataIndex: 'expertSelectedCount', render: (text, record) => { - return record.assignRuleAndExperts ? : record.expertReview && (record.status === 1 || record.status === 3) ? 选择 : 选择 + return record.assignRuleAndExperts ? : record.expertReview && (record.status === 1 || record.status === 3) ? 选择 : 选择 } }, { @@ -253,7 +253,7 @@ export default Form.create()(({ form, showNotification, match, history, state }) title: '评审结果', dataIndex: 'expertReview2', render: (text, record) => { - return record.assignRuleAndExperts ? 查看:查看 + return record.assignRuleAndExperts ? 查看:查看 } }, { diff --git a/src/military/task/taskAdminRouter.js b/src/military/task/taskAdminRouter.js deleted file mode 100644 index e6badd65e..000000000 --- a/src/military/task/taskAdminRouter.js +++ /dev/null @@ -1,136 +0,0 @@ -import React from "react"; - -import { Route, Switch } from "react-router-dom"; -import Loadable from "react-loadable"; -import Loading from "../../Loading"; -import AdminRouter from "../components/adminRouter"; - - -const TaskManage = Loadable({ - loader: () => import("./taskManage"), - loading: Loading, -}); - -const PaperManage = Loadable({ - loader: () => import("./paperManage"), - loading: Loading, -}); - -const PaperComplain = Loadable({ - loader: () => import("./paperComplain"), - loading: Loading, -}); - -const ProofManage = Loadable({ - loader: () => import("./proofManage"), - loading: Loading, -}); - -const PublicityComplain = Loadable({ - loader: () => import("./publicityComplain"), - loading: Loading, -}); - -const AgreementManage = Loadable({ - loader: () => import("./agreementManage"), - loading: Loading, -}); - -const PayProof = Loadable({ - loader: () => import("./payProof"), - loading: Loading, -}); - -const TaskAdmin = Loadable({ - loader: () => import("./taskAdmin"), - loading: Loading, -}); - -const DelayManage = Loadable({ - loader: () => import("./delayManage"), - loading: Loading, -}); - -const AdminPage = (propsF) => { - - return ( - - - - {/* 任务管理审核 */} - ( - - )} - > - - {/* 成果管理审核 */} - ( - - )} - > - - {/* 成果申诉管理审核 */} - ( - - )} - > - - {/* 公示期成果申诉管理审核 */} - ( - - )} - > - - {/* 佐证管理审核 */} - ( - - )} - > - - {/* 管理员协议审核 */} - ( - - )} - > - - {/* 管理员上传支付凭证 */} - ( - - )} - > - - {/* 管理员任务列表 */} - ( - - )} - > - - {/* 延期管理 */} - ( - - )} - > - - - ); -} -// } -export default AdminPage;