修改issue

This commit is contained in:
unknown 2022-01-17 13:37:26 +08:00
parent b7c4cc2f9b
commit 4e7d47a43f
4 changed files with 17 additions and 7 deletions

View File

@ -109,6 +109,8 @@ function GradesModal({ setVisible, visible, opsId, opsType, taskId }) {
opsId,
opsType,
orderBy: '',
containerId: taskId,
containerType: 1,
};
//
const paramsRule = {
@ -145,6 +147,7 @@ function GradesModal({ setVisible, visible, opsId, opsType, taskId }) {
dataSource={dataList}
columns={columns}
pagination={false}
scroll={{ y: 384 }}
/>
</Modal>
)

View File

@ -11,13 +11,14 @@ import { queryString } from "educoder";
function ReviewResult({ history, match }) {
const {taskId} = match.params;
const {status, name, taskModeId} = queryString.parse(window.location.search.slice(1));
let {status, name, taskModeId} = queryString.parse(window.location.hash.slice(1));
const [dataList, setDateList] = useState(undefined);
const [openResultVisible, setOpenResultVisible] = useState(false);
const [winIds, setWinIds] = useState(undefined);
const [openRange, setOpenRange] = useState(undefined);
const [errorMessage,setErrorMessage] = useState();
const [result, setResult] = useState(undefined);
const [goNum, setGoNum] = useState(-1);
//
const [opsId, setOpsId] = useState();
@ -33,6 +34,9 @@ function ReviewResult({ history, match }) {
title: '应征者',
dataIndex: 'applicantInfo.nickname',
key: 'expertName',
render: (text, record) => {
return text === null ? record.applicantInfo.login : text
}
},
{
title: '平均得分',
@ -51,7 +55,7 @@ function ReviewResult({ history, match }) {
ket: 'isWin',
align: 'center',
render: (text, record) => {
return status == 4 ? <Checkbox onChange={(e)=>{changeIsWin(record.applicantInfo.id, e.target.checked)}}>胜出</Checkbox> : record.isWin ? <div className="sucess df"><img src={sucess}/>胜出</div>:'未胜出';
return record.isWin ? <div className="sucess df"><img src={sucess}/>胜出</div> : status == 4 ? <Checkbox onChange={(e)=>{changeIsWin(record.applicantInfo.id, e.target.checked)}}>胜出</Checkbox> : '未胜出';
}
}
];
@ -82,7 +86,7 @@ function ReviewResult({ history, match }) {
}):setDateList(response.data)
}
})
},[])
},[status])
function detail(item){
setOpsId(item.opsId);
@ -130,6 +134,9 @@ function ReviewResult({ history, match }) {
ids.length!=0 && selectWinnersAndPublicists(params).then(response=>{
if(response && response.message === "success"){
message.success("操作成功");
window.location.href=`${window.location.href.replace('status=4','status=5')}`;
status = 5;
setGoNum(-2);
setOpenResultVisible(false);
}
})
@ -140,7 +147,7 @@ function ReviewResult({ history, match }) {
<div className="head_title mb20">
<div className="df pb10 pt10">
<span className="font-16 font-w">评审结果</span>
<button className="but41_border goback_but" onClick={()=>{history.goBack()}}>返回上一页</button>
<button className="but41_border goback_but" onClick={()=>{history.go(goNum)}}>返回上一页</button>
</div>
<p className="mt10"><span className="font-w">任务名称</span><span className="ml10">{decodeURI(name)}</span></p>
<p className="mt10 pb20"><span className="font-w">任务链接</span><Link className="taskLink ml10" target="_blank" to={`/task/taskDetail/${taskId}`} >{`${window.location.origin}/task/taskDetail/${taskId}`}</Link></p>
@ -150,7 +157,7 @@ function ReviewResult({ history, match }) {
<PaginationTable
dataSource= {dataList}
columns= {columns}
scroll={{ y: 400 }}
scroll={{ y: 384 }}
/>
<div className="openResult">
{status == 4 && <button className={(winIds && taskModeId == 1 && winIds.length >1) || result === null ? 'disableBut': 'but41_fill'} onClick={openResult}>公示结果</button>}

View File

@ -87,7 +87,7 @@ span.list-gray {
background: #bababa;
}
.ant-pagination {
.center-content .ant-pagination {
margin: 2rem auto;
text-align: center;
}

View File

@ -245,7 +245,7 @@ export default Form.create()(({ form, showNotification, match, history, state })
title: '评审结果',
dataIndex: 'expertReview2',
render: (text, record) => {
return record.assignRuleAndExperts ? <Link className="line_1 primary-link" to={`/expert/admin/task/review/results/${record.id}/?status=${record.status}&name=${record.name}&taskModeId=${record.taskModeId}`}>查看</Link>:<span className='gary_span'>查看</span>
return record.assignRuleAndExperts ? <Link className="line_1 primary-link" to={`/expert/admin/task/review/results/${record.id}/#status=${record.status}&name=${record.name}&taskModeId=${record.taskModeId}`}>查看</Link>:<span className='gary_span'>查看</span>
}
},
{