Merge branch 'pre_dev_military' of http://106.75.45.236:3000/Gitlink/forgeplus-react into dev_military_admin

This commit is contained in:
何童崇 2022-07-08 15:49:27 +08:00
commit 7532fabbca
6 changed files with 25 additions and 16 deletions

4
package-lock.json generated
View File

@ -19534,15 +19534,13 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
"dev": true,
"optional": true
"dev": true
},
"is-glob": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
"integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
"dev": true,
"optional": true,
"requires": {
"is-extglob": "^2.1.1"
}

View File

@ -130,6 +130,7 @@ function Introduce({ history: { location: { pathname } }, qzDetail, match }) {
><Button size="small" className="mr5">驳回</Button></Popconfirm>}
{text === 1 && <Button type="primary" size="small" onClick={() => { reject(record.user_id, 2) }}>通过</Button>}
{text === 2 && <Button type="link" size="small" >已通过</Button>}
{text === 3 && <Button size="small" disabled>已通过</Button>}
</Fragment>
}
}

View File

@ -37,7 +37,7 @@ function Rank({ isLocal, match }) {
dataIndex: 'leader',
},
{
title: '三元组个数',
title: '重复三元组个数',
dataIndex: 'other_score_1',
className: 'textCenter',
},

View File

@ -97,7 +97,8 @@ service.interceptors.response.use(
message: "提示",
description: res.data.message || '无权限!',
});
if(window.location.port !== "3007"){
if(window.location.port !== "3007" && !res.config.url.startsWith('/api/tasks/getTask/')){
// console.log(res);
window.location.href="/403";
}
return Promise.reject('error');

View File

@ -29,7 +29,7 @@ for (const item of applyStatusAllArr) {
export default Form.create()(
forwardRef((props, ref) => {
const { match, current_user, form, history, showNotification, mygetHelmetapi } = props;
const { match, current_user, form, history, showNotification, mygetHelmetapi ,showLoginDialog} = props;
const id = match.params.taskId;
const { getFieldDecorator, validateFields, setFieldsValue } = form;
@ -57,6 +57,11 @@ export default Form.create()(
//
const [publishedReviewRules, setPublishedReviewRules] = useState(undefined);
useEffect(()=>{
!current_user.login&&showLoginDialog();
},[current_user.login]);
//
useEffect(() => {
getTaskCategory().then(data => {
@ -87,21 +92,21 @@ export default Form.create()(
//
useEffect(() => {
current_user.user_id && id && checkAgreement(id).then(res => {
current_user.login && id && checkAgreement(id).then(res => {
if (res && res.data && res.data.status === 1) {
setSignAgreement(true);
}
})
}, [current_user.user_id]);
}, [current_user.login]);
//
useEffect(() => {
current_user.user_id && id && checkHavePaper(id).then(res => {
current_user.login && id && checkHavePaper(id).then(res => {
if (res && res.data && res.data.status === 1) {
setIsPaper(true);
}
})
}, [current_user.user_id]);
}, [current_user.login]);
const taskLimit = useMemo(() => {
if (current_user.admin) {
@ -114,7 +119,7 @@ export default Form.create()(
//
useEffect(() => {
applyModal && getAgreement(1).then(res => {
applyModal&&current_user.login && getAgreement(1).then(res => {
if (res && res.data) {
setApplyContent({
title: res.data.title,
@ -122,12 +127,12 @@ export default Form.create()(
});
}
});
}, [applyModal]);
}, [applyModal,current_user.login]);
//
useEffect(() => {
//
if (detailData.id) {
if (detailData.id && current_user.login) {
setLoading(true);
let params = {
taskId: id,
@ -150,7 +155,7 @@ export default Form.create()(
setTotal(data.total);
});
}
}, [id, status, curPage, reload, relaodChildList, detailData]);
}, [id, status, curPage, reload, relaodChildList, detailData ,current_user.login]);
//
@ -473,10 +478,14 @@ export default Form.create()(
</React.Fragment>}
</div>
{!current_user.enterpriseCertification && <div className="edu-back-white padding30 mt20 font-16 text-center mb50">
{!current_user.enterpriseCertification && current_user.login &&<div className="edu-back-white padding30 mt20 font-16 text-center mb50">
<a onClick={goUserProfiles} className="color-blue_41">请先完善主体信息</a>
</div>}
{!current_user.login &&<div className="edu-back-white padding30 mt20 font-16 text-center mb50">
<span className="color-blue_41">创客任务仅限登录用户查看请先注册登录红山开源账号</span>
</div>}
{current_user.enterpriseCertification && detailData.status === 3 && (!detailData.exceptClosedBoolean) && signContent()}
<div className="applyList edu-back-white padding30 mt20">

View File

@ -11,7 +11,7 @@ class Shixunauthority extends Component {
{/*mt100 mb100*/}
<img src={getImageUrl("images/warn/pic_403.jpg")} />
<p className="font-18 mt40">
您可以稍后尝试&nbsp;<a href="/"
无权限您可以登录或切换账号后尝试&nbsp;<a href="/"
className="color-blue">返回首页</a>
{/* &nbsp;
<a target="_blank"