Merge branch 'expert_review' of https://code.gitlink.org.cn/durian/forgeplus-react into dev_military_osredm

This commit is contained in:
何童崇 2022-01-18 15:18:30 +08:00
commit 65d4066468
7 changed files with 28 additions and 9 deletions

View File

@ -25,7 +25,7 @@ if (isDev) {
}
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
window.location.search.indexOf('debug=s') !== -1 ? 'student' :
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin'
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'a'
}
function clearAllCookie() {
cookie.remove('_educoder_session', { path: '/' });

View File

@ -11,6 +11,9 @@ import { reportPaper, thumbUpPaper, commentAdd, confirmReceipt } from '../../api
import { paperCheckStatusArr } from '../../static';
import { httpUrl } from '../../fetch';
import winpng from '../../image/winner.png';
import win1 from '../../image/win1.svg';
import win2 from '../../image/win2.svg';
import win3 from '../../image/win3.svg';
import './index.scss';
const { TextArea } = Input;
@ -21,7 +24,7 @@ for (const item of paperCheckStatusArr) {
}
export default Form.create()((props) => {
const { list, curPage, total, changePage, loading, applyStatusAllNameArr, reloadList, showNotification, current_user, form, detailStatus } = props;
const { list, curPage, total, changePage, loading, applyStatusAllNameArr, reloadList, showNotification, current_user, form, detailStatus, expertReview } = props;
const { getFieldDecorator, validateFields, setFieldsValue } = form;
const [page, setPage] = useState(1);
const pageSize = props.pageSize || 10;
@ -145,22 +148,22 @@ export default Form.create()((props) => {
<React.Fragment>
{
list.map((item,i) => {
const winReview = [5,6,7,8].includes(detailStatus) && expertReview && item.reviewFinalGrades!==null;
return (
<div className="fileComments df" key={item.id}>
<img alt="头像加载失败" src={item.user && getImageUrl(item.user.logo)} width="50" height="50" className="bor-radius-all mr20" />
<div className="flex1">
<ul>
<li className="fl pr">
<li className="fl pr taskReview">
<span className={item.user.nickname === "******" ? "font-16 mr20 color-grey3" : "user-box font-16 mr20 color-grey3 clickable"} onClick={() => { item.user.nickname === "******" ? "" : goUser(item.user.login) }}>
{item.user.nickname || item.user.login}
</span>
<span className="color-grey9">{timeAgo(item.createdAt)}</span>
{item.status === 2 ? <img alt="胜出" className="mr5" src={winpng} /> : <span className="color-blue ml10">{item.checkStatus !== 1 ? paperCheckStatus[item.checkStatus] : applyStatusAllNameArr[item.status]}</span>}
{[5,6,7,8].includes(detailStatus) && item.reviewFinalGrades!==null &&<span className='paper-grades'>评审得分<span className='paper-grades-num'>{item.reviewFinalGrades}</span></span>}
{[5,6,7,8].includes(detailStatus) && i<3&& <i className={`iconfont icon-a-${i+1}`}></i>}
{winReview && <span className='paper-grades'>评审得分<span className='paper-grades-num'>{item.reviewFinalGrades}</span></span>}
{winReview && i ==0 && <span className='winReview'><img src={win1}/>第一名</span>}
{winReview && i ==1 && <span className='winReview'><img src={win2}/>第二名</span>}
{winReview && i ==2 && <span className='winReview'><img src={win3}/>第三名</span>}
</li>
<li className="fr">
{((item.needComplain && detailStatus === 3) || (detailStatus === 5 && item.publicTaskComplain && item.checkStatus === 1 && item.status !== 2)) && (current_user.login === item.user.login) &&

View File

@ -54,3 +54,15 @@
color: #FF0000;
}
}
.taskReview{
width: 100%;
.winReview{
position: absolute;
right: 0px;
color: #ff5f00;
font-size: 18px;
img{
margin-right: 8px;
}
}
}

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1642486539996" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="25781" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M447.520033 0H123.673469l227.98441 446.09641H675.320648z" fill="#F72426" p-id="25782"></path><path d="M576.85911 0L349.058494 446.09641h323.715282L900.73193 0z" fill="#F72426" p-id="25783"></path><path d="M512.189571 225.962667A393.846154 393.846154 0 1 0 905.85193 619.651282c0-217.403077-176.259282-393.662359-393.662359-393.662359z m0 719.740718c-180.066462 0-326.052103-145.985641-326.052102-326.104616 0-180.066462 145.985641-326.052103 326.052102-326.052102 180.092718 0 326.078359 145.985641 326.078359 326.078359 0 180.092718-145.985641 326.078359-326.078359 326.078359z" fill="#F9E310" p-id="25784"></path><path d="M512.189571 293.546667C332.149366 293.546667 186.163725 439.532308 186.163725 619.651282c0 180.092718 145.985641 326.078359 326.052103 326.078359 180.092718 0 326.078359-145.985641 326.078359-326.104615 0-180.066462-145.985641-326.052103-326.078359-326.052103z m0 602.847179a276.926359 276.926359 0 1 1 276.374975-276.76882c0 152.733538-123.641436 276.637538-276.374975 276.926359v-0.183795z" fill="#F7931E" p-id="25785"></path><path d="M512.189571 342.882462a276.926359 276.926359 0 1 0 276.374975 276.742564c0-152.707282-123.667692-276.558769-276.374975-276.742564z m44.032 412.094359h-44.950974v-219.188513a152.891077 152.891077 0 0 1-62.464 33.240615V524.077949a165.677949 165.677949 0 0 0 39.095795-16.068923c12.550564-7.509333 24.155897-16.541538 34.527179-26.860308h33.792v273.854359z" fill="#FFA357" p-id="25786"></path></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1642486397508" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="25397" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M447.520033 0H123.673469l227.98441 446.09641H675.320648z" fill="#F72426" p-id="25398"></path><path d="M576.85911 0L349.058494 446.09641h323.715282L900.73193 0z" fill="#F72426" p-id="25399"></path><path d="M512.189571 225.962667A393.846154 393.846154 0 1 0 905.85193 619.651282c0-217.403077-176.259282-393.662359-393.662359-393.662359z m0 719.740718c-180.066462 0-326.052103-145.985641-326.052102-326.104616 0-180.066462 145.985641-326.052103 326.052102-326.052102 180.092718 0 326.078359 145.985641 326.078359 326.078359 0 180.092718-145.985641 326.078359-326.078359 326.078359z" fill="#A2A2A2" p-id="25400"></path><path d="M512.189571 293.546667C332.149366 293.546667 186.163725 439.532308 186.163725 619.651282c0 180.092718 145.985641 326.078359 326.052103 326.078359 180.092718 0 326.078359-145.985641 326.078359-326.104615 0-180.066462-145.985641-326.052103-326.078359-326.052103z m0 602.847179a276.926359 276.926359 0 1 1 276.374975-276.76882c0 152.733538-123.641436 276.637538-276.374975 276.926359v-0.183795z" fill="#CACACA" p-id="25401"></path><path d="M255.927007 513.496615a276.926359 276.926359 0 1 0 532.637539 106.128411c0-152.707282-123.667692-276.558769-276.374975-276.742564a276.926359 276.926359 0 0 0-256.262564 170.614153z" fill="#989898" p-id="25402"></path><path d="M638.771725 761.435897v-45.371076h-168.723692c7.089231-18.432 28.829538-39.699692 65.220923-63.803077 33.555692-22.685538 56.713846-40.644923 69.947077-54.35077 21.740308-24.103385 33.083077-50.569846 33.083077-79.872 0-29.774769-10.397538-53.878154-30.72-72.782769-20.795077-18.904615-47.734154-27.884308-79.872-27.884308-35.918769 0-65.220923 11.815385-86.961231 36.391385-21.267692 22.685538-32.137846 52.932923-32.610462 90.742154h51.515077c0.945231-27.411692 6.616615-47.734154 17.959385-61.912615 10.870154-14.651077 26.939077-21.740308 48.206769-21.740308 19.849846 0 35.446154 4.726154 45.843693 14.178461 10.397538 9.452308 15.596308 23.630769 15.596307 42.535385 0 19.849846-8.034462 38.281846-23.158154 55.296-9.452308 9.924923-25.521231 22.685538-48.206769 38.754462-38.281846 26.466462-63.803077 46.788923-76.091077 61.44-22.685538 25.521231-33.555692 54.823385-33.555692 88.379076h232.526769z" fill="#FFFFFF" p-id="25403"></path></svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1642486410992" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="25589" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M447.520033 0H123.673469l227.98441 446.09641H675.320648z" fill="#F72426" p-id="25590"></path><path d="M576.85911 0L349.058494 446.09641h323.715282L900.73193 0z" fill="#F72426" p-id="25591"></path><path d="M512.189571 225.962667A393.846154 393.846154 0 1 0 905.85193 619.651282c0-217.403077-176.259282-393.662359-393.662359-393.662359z m0 719.740718c-180.066462 0-326.052103-145.985641-326.052102-326.104616 0-180.066462 145.985641-326.052103 326.052102-326.052102 180.092718 0 326.078359 145.985641 326.078359 326.078359 0 180.092718-145.985641 326.078359-326.078359 326.078359z" fill="#FFAE05" p-id="25592"></path><path d="M512.189571 293.546667C332.149366 293.546667 186.163725 439.532308 186.163725 619.651282c0 180.092718 145.985641 326.078359 326.052103 326.078359 180.092718 0 326.078359-145.985641 326.078359-326.104615 0-180.066462-145.985641-326.052103-326.078359-326.052103z m0 602.847179a276.926359 276.926359 0 1 1 276.374975-276.76882c0 152.733538-123.641436 276.637538-276.374975 276.926359v-0.183795z" fill="#FF7327" p-id="25593"></path><path d="M255.927007 513.496615a276.926359 276.926359 0 1 0 532.637539 106.128411c0-152.707282-123.667692-276.558769-276.374975-276.742564a276.926359 276.926359 0 0 0-256.262564 170.614153z" fill="#F69D5A" p-id="25594"></path><path d="M523.926187 768.052513c35.918769 0 65.693538-10.397538 88.379077-30.247385 21.267692-19.849846 32.137846-45.371077 32.137846-76.563692 0-19.849846-5.671385-36.391385-17.014154-49.152-10.397538-12.288-25.521231-21.740308-45.371077-27.884308 36.864-12.288 55.768615-37.336615 55.768615-74.200615 0-28.829538-10.397538-51.515077-30.247384-68.056616-20.795077-16.541538-47.734154-24.576-81.762462-24.576-33.083077 0-60.022154 8.979692-80.817231 27.884308-22.212923 18.904615-34.500923 44.898462-37.336615 78.454154h50.569846c1.890462-20.795077 8.979692-36.391385 20.322462-46.788923 11.342769-10.397538 27.411692-15.596308 47.734154-15.596308 19.849846 0 35.446154 4.253538 45.843692 13.705846 9.452308 8.979692 14.651077 21.740308 14.651077 38.754462s-5.671385 30.247385-16.068923 39.227077c-10.397538 8.979692-25.993846 13.705846-46.788923 13.705846h-24.103385v38.754462h24.576c22.212923 0 39.227077 4.726154 50.569846 14.178461 12.288 9.452308 18.432 24.103385 18.432 43.953231 0 17.014154-6.144 30.72-17.486769 42.062769-13.233231 12.288-30.72 18.904615-52.460308 18.904615-19.849846 0-35.918769-5.671385-48.206769-17.014153-14.178462-12.288-21.267692-29.774769-22.212923-52.460308h-51.987692c2.835692 37.809231 16.068923 66.638769 39.699692 86.488615 20.795077 17.486769 48.679385 26.466462 83.180308 26.466462z" fill="#FFFFFF" p-id="25595"></path></svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -77,7 +77,7 @@ export default Form.create()(
}
setDetailData(data || {});
if(data && data.assignRuleAndExperts){
getRules({ containerId: data.id, containerType: 1, statusString: '-1,1', }).then(response=>{
getRules({ containerId: data.id, containerType: 1, statusString: '-1,1,2', }).then(response=>{
response && setPublishedReviewRules(response.data || undefined);
})
}
@ -507,6 +507,7 @@ export default Form.create()(
showNotification={showNotification}
detailStatus={detailData.status}
agreementSigning={detailData.agreementSigning}
expertReview={detailData.expertReview}
/>
</div>