forked from Gitlink/forgeplus-react
This commit is contained in:
parent
660c655bc1
commit
16b89ea2f3
|
@ -91,6 +91,15 @@ export function getScoringDetails(params) {
|
|||
});
|
||||
}
|
||||
|
||||
// 查看最终得分排行
|
||||
export function getFinalScoreRankingList(params) {
|
||||
return fetch({
|
||||
url: `/api/expertScoringDetails/getFinalScoreRankingList`,
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 查看单个竞赛/任务的所有评分细则
|
||||
export function getOpsScoringDetails(params) {
|
||||
return fetch({
|
||||
|
|
|
@ -256,11 +256,11 @@ function RegisterList({ showNotification }) {
|
|||
content: <div className="import-important">
|
||||
{resData.successMessage && <div>
|
||||
<p>导入成功:</p>
|
||||
<p dangerouslySetInnerHTML={{ __html: resData.successMessage }}></p>
|
||||
<p dangerouslySetInnerHTML={{ __html: `导入成功! 登录账号为手机号码,默认密码为12345678` }} className="mess"></p>
|
||||
</div>}
|
||||
{resData.failMessage && <div>
|
||||
<p>导入失败:</p>
|
||||
<p dangerouslySetInnerHTML={{ __html: resData.failMessage }}></p>
|
||||
<p dangerouslySetInnerHTML={{ __html: resData.failMessage }} className="mess fail"></p>
|
||||
</div>}
|
||||
</div>,
|
||||
});
|
||||
|
|
|
@ -18,13 +18,21 @@
|
|||
.btn-group{
|
||||
display: flex;
|
||||
}
|
||||
.import-important{
|
||||
span{
|
||||
color: #df0002;
|
||||
}
|
||||
.import-important{
|
||||
text-align: left;
|
||||
.mess{
|
||||
padding-left: 20px;
|
||||
&.fail{
|
||||
height: 300px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
span{
|
||||
color: #df0002;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.upload-modal{
|
||||
.ant-modal-body{
|
||||
text-align: center;
|
||||
|
|
|
@ -61,7 +61,7 @@ function ReviewTasks({ form, showNotification, match, history }) {
|
|||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
render: (text, record) => {
|
||||
return text === -1 ? <span className="red">未审核</span> : <span>已审核</span>
|
||||
return text === -1 ? <span className="red">未评审</span> : <span>已评审</span>
|
||||
}
|
||||
},
|
||||
];
|
||||
|
|
|
@ -144,7 +144,7 @@ function ReviewTasks({ showNotification, match, history, current_user }) {
|
|||
}
|
||||
|
||||
useEffect(() => {
|
||||
getRules({ containerId, containerType, statusString: -1 }).then(response => {
|
||||
getRules({ containerId, containerType}).then(response => {
|
||||
if (response && response.message === "success") {
|
||||
setRules(response.data);
|
||||
}
|
||||
|
@ -231,7 +231,6 @@ function ReviewTasks({ showNotification, match, history, current_user }) {
|
|||
let params = {
|
||||
containerId,
|
||||
containerType,
|
||||
isDistinct: false,
|
||||
expertId: current_user.expertId,
|
||||
};
|
||||
current_user.expertId && getScoringDetails(params).then(res => {
|
||||
|
|
|
@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react";
|
|||
import Link from "react-router-dom/Link";
|
||||
import PaginationTable from "src/military/components/paginationTable";
|
||||
import GradesModal from "./gradesModal";
|
||||
import { getScoringDetails, getWinnersAndPublicists, selectWinnersAndPublicists } from "../api";
|
||||
import { getFinalScoreRankingList, getWinnersAndPublicists, selectWinnersAndPublicists } from "../api";
|
||||
import { Checkbox, Input, message, Modal } from "antd";
|
||||
import sucess from './image/sucess.svg';
|
||||
import './index.scss';
|
||||
|
@ -61,11 +61,9 @@ function ReviewResult({ history, match }) {
|
|||
const params = {
|
||||
containerId: taskId,
|
||||
containerType: 1,
|
||||
isDistinct: true,
|
||||
expertId: -1,
|
||||
orderBy: 'finalGradesDesc'
|
||||
}
|
||||
getScoringDetails(params).then(response=>{
|
||||
getFinalScoreRankingList(params).then(response=>{
|
||||
if(response && Array.isArray(response.data)){
|
||||
//finalGrades 最终得分为null 未到评审时间 0 专家未评审任务
|
||||
let index = 1;
|
||||
|
@ -111,12 +109,12 @@ function ReviewResult({ history, match }) {
|
|||
function onOk(){
|
||||
setErrorMessage("若未填写此排名,则公示所有名次");
|
||||
if(!openRange){
|
||||
setErrorMessage('请输入公示范围!');
|
||||
}else if(isNaN(openRange)){
|
||||
setOpenRange(dataList.length+'');
|
||||
}else if(openRange && isNaN(openRange)){
|
||||
setErrorMessage('请输入数字!');
|
||||
}else if(openRange.indexOf('.')!==-1 || openRange.indexOf('-')!==-1){
|
||||
}else if(openRange && (openRange.indexOf('.')!==-1 || openRange.indexOf('-')!==-1)){
|
||||
setErrorMessage('请输入正整数!');
|
||||
}else if(openRange > dataList.length){
|
||||
}else if(openRange && openRange > dataList.length){
|
||||
setErrorMessage('公示范围超过应征者总数!');
|
||||
}else{
|
||||
const ids = [];
|
||||
|
@ -131,6 +129,7 @@ function ReviewResult({ history, match }) {
|
|||
selectWinnersAndPublicists(params).then(response=>{
|
||||
if(response && response.message === "success"){
|
||||
message.success("操作成功");
|
||||
setOpenResultVisible(false);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -144,7 +143,7 @@ function ReviewResult({ history, match }) {
|
|||
<button className="but41_border goback_but" onClick={()=>{history.goBack()}}>返回上一页</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.host}/task/taskDetail/${taskId}`}</Link></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>
|
||||
</div>
|
||||
{status > 3 ? <React.Fragment>
|
||||
<p className="font-16 font-w mb10">应征者排名</p>
|
||||
|
|
|
@ -12,16 +12,18 @@ const {RangePicker} = DatePicker;
|
|||
|
||||
function ReviewRules({form, history, match}) {
|
||||
const id = match.params.taskId;
|
||||
const {name, status, createdAt, collectingEndTime, collectingDays} = queryString.parse(window.location.search.slice(1));
|
||||
const {name, status, createdAt, collectingEndTime, choosingDays} = queryString.parse(window.location.search.slice(1));
|
||||
const { getFieldDecorator,setFieldsValue } = form;
|
||||
//是否有初始值
|
||||
const [ initValue, setInitValue] = useState(false);
|
||||
const disabledDate = (current) =>{
|
||||
if(status == 1){
|
||||
return current && current < moment(createdAt.replace("%20", " ")).endOf('day');
|
||||
const start = new Date((new Date(createdAt.replace("%20", " "))/1000 - 86400)*1000);
|
||||
return current && current < moment(start).endOf('day');
|
||||
}else if(status == 3){
|
||||
const endDate = new Date((new Date(collectingEndTime.replace("%20", " "))/1000 + 86400*collectingDays)*1000);
|
||||
return current && current < moment(collectingEndTime.replace("%20", " ")).endOf('day') || current > moment(endDate).endOf('day');
|
||||
const start = new Date((new Date(collectingEndTime.replace("%20", " "))/1000 - 86400)*1000);
|
||||
const endDate = new Date((new Date(collectingEndTime.replace("%20", " "))/1000 + 86400*(choosingDays))*1000);
|
||||
return current && current < moment(start).endOf('day') || current > moment(endDate).endOf('day');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,7 +94,7 @@ function ReviewRules({form, history, match}) {
|
|||
<button className="but41_border goback_but" onClick={()=>{history.goBack()}}>返回上一页</button>
|
||||
</div>
|
||||
<p className="mt10"><span className="font-w color-grey3">任务名称</span><span className="ml10 color-grey3">{decodeURI(name)}</span></p>
|
||||
<p className="mt10 pb20"><span className="font-w color-grey3">任务链接</span><Link className="taskLink ml10" target="_blank" to={`/task/taskDetail/${id}`} >{`${window.location.host}/task/taskDetail/${id}`}</Link></p>
|
||||
<p className="mt10 pb20"><span className="font-w color-grey3">任务链接</span><Link className="taskLink ml10" target="_blank" to={`/task/taskDetail/${id}`} >{`${window.location.origin}/task/taskDetail/${id}`}</Link></p>
|
||||
</div>
|
||||
<Form className="pt10">
|
||||
<Form.Item
|
||||
|
@ -105,7 +107,7 @@ function ReviewRules({form, history, match}) {
|
|||
)}
|
||||
</Form.Item>
|
||||
<p className="rules_bar"></p>
|
||||
<p className="font-16 criteria_title mt25 mb10"><span className="font-w">评分标准</span><span className="ml5 be_carful">注:管理员可设置1-5个评分项及对应评分标准,每个评分项固定设置为100分</span></p>
|
||||
<p className="font-16 criteria_title mt25 mb10"><span className="font-w">评分标准</span><span className="ml5 be_carful font-14">注:管理员可设置1-5个评分项及对应评分标准,每个评分项固定设置为100分</span></p>
|
||||
<Form.Item
|
||||
label="评分标准一"
|
||||
>
|
||||
|
|
|
@ -140,7 +140,7 @@ function SelectExpert(props) {
|
|||
<div className="box"></div>
|
||||
<p className="font-16 pt15 font-w color-grey3">任务信息</p>
|
||||
<p className="mt10"><span className="font-w color-grey3">任务名称</span><span className="ml10 color-grey3">{decodeURI(name)}</span></p>
|
||||
<p className="mt10 pb20"><span className="font-w color-grey3">任务链接</span><Link className="taskLink ml10" target="_blank" to={`/task/taskDetail/${taskId}`} >{`${window.location.host}/task/taskDetail/${taskId}`}</Link></p>
|
||||
<p className="mt10 pb20"><span className="font-w color-grey3">任务链接</span><Link className="taskLink ml10" target="_blank" to={`/task/taskDetail/${taskId}`} >{`${window.location.origin}/task/taskDetail/${taskId}`}</Link></p>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
|
|
@ -224,7 +224,7 @@ export default Form.create()(({ form, showNotification, match, history, state })
|
|||
title: '评审规则',
|
||||
dataIndex: 'ruleEditedCount',
|
||||
render: (text, record) => {
|
||||
return record.assignRuleAndExperts ? <Button size='small' type="primary" onClick={()=>{viewRules(record)}}>查看</Button> : record.expertReview && (record.status === 1 || record.status === 3) ? <Link className="line_1 primary-link" to={`/expert/admin/task/review/rules/${record.id}/?status=${record.status}&name=${record.name}&createdAt=${record.createdAt}&collectingEndTime=${record.collectingEndTime}&collectingDays=${record.collectingDays}`}>编辑</Link> : <span className='gary_span'>编辑</span>
|
||||
return record.assignRuleAndExperts ? <Button size='small' type="primary" onClick={()=>{viewRules(record)}}>查看</Button> : record.expertReview && (record.status === 1 || record.status === 3) ? <Link className="line_1 primary-link" to={`/expert/admin/task/review/rules/${record.id}/?status=${record.status}&name=${record.name}&createdAt=${record.createdAt}&collectingEndTime=${record.collectingEndTime}&choosingDays=${record.choosingDays}`}>编辑</Link> : <span className='gary_span'>编辑</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -238,7 +238,7 @@ export default Form.create()(({ form, showNotification, match, history, state })
|
|||
title: '评审任务',
|
||||
dataIndex: 'expertReview1',
|
||||
render: (text, record) => {
|
||||
return record.expertReview && record.status < 4 && record.status !== 2 ? !record.assignRuleAndExperts ? <Button size='small' type="primary" onClick={()=>{publishTaskReview(record)}}>发布</Button> : <span className='gary_span'>已发布</span> :<span className='gary_span'>发布</span>
|
||||
return record.assignRuleAndExperts ? <span className='gary_span'>已发布</span> : record.expertReview && record.status < 4 && record.status !== 2 ? <Button size='small' type="primary" onClick={()=>{publishTaskReview(record)}}>发布</Button> : <span className='gary_span'>发布</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue