专家评审-竞赛

This commit is contained in:
unknown 2022-01-25 10:04:19 +08:00
parent 4b31ec629a
commit 8f92f99d84
11 changed files with 507 additions and 64 deletions

View File

@ -47,6 +47,7 @@ export default props => {
const competitionMenu = useMemo(() => {
return <Menu>
<Menu.Item><a target="_blank" rel="noopener noreferrer" href={`${main_web_site_url}/admin/competitions/list`}>竞赛列表</a></Menu.Item>
<Menu.Item><Link to="/expert/admin/competition">评审任务列表</Link></Menu.Item>
</Menu>
});

View File

@ -30,6 +30,11 @@ const ReviewResult = Loadable({
loader: () => import("./reviewResult"),
loading: Loading,
});
//竞赛评审任务列表
const CompetitionList = Loadable({
loader: () => import("./competionList"),
loading: Loading,
})
const AdminPage = (propsF) => {
@ -72,6 +77,13 @@ const AdminPage = (propsF) => {
<ReviewResult {...propsF} {...props} />
)}
></Route>
{/* 竞赛评审任务列表 */}
<Route
path="/expert/admin/competition"
render={(props) => (
<CompetitionList {...propsF} {...props} />
)}
></Route>
</Switch>
</React.Fragment>
);

View File

@ -227,4 +227,13 @@ export function selectExpertList(params) {
method: 'get',
params
});
}
//竞赛任务列表
export function getCompetitionList(params) {
return fetch({
url: `/api/competitionExpert/getCompetitionList`,
method: 'get',
params
});
}

View File

@ -1,11 +1,341 @@
import React from "react";
import { Button, message, Modal, Select, Tooltip } from "antd";
import React, { useEffect, useMemo, useState } from "react";
import Link from "react-router-dom/Link";
import { publishExpertsAndRules } from "src/military/task/api";
import PaginationTable from "../../components/paginationTable";
import { expertReviewArr } from "../../task/static";
import { getCompetitionList, getRules, selectExpertList } from "../api";
import './index.scss';
function Competition(){
// current_status 1 2 3 4 5 6
function Competition(props){
const {mygetHelmetapi} = props;
const {main_web_site_url} = mygetHelmetapi;
const [loading, setLoading] = useState(false);
const [curPage, setCurPage] = useState(1);
//
const [expertReview,setExpertReview] = useState(undefined);
//
const [total, setTotal] = useState()
//
const [competitionList, setCompetitionList] = useState(undefined);
//
const [lookRules, setLookRules] = useState(false);
const [lookExperts, setLookExperts] = useState(false);
const [pulicReview, setPublicReview] = useState(false);
const [rules, setRules] = useState(undefined);
const [selectedExperts, setSelectedExperts] = useState(undefined);
const [publicTaskId, setPublicTaskId] = useState(undefined);
const [reload, setReload] = useState(undefined);
//
const columns = useMemo(() => {
return [
{
title: "序号",
dataIndex: "index",
width: 50,
align: "center",
},
{
title: "竞赛主标题",
dataIndex: "title",
key: "title",
align: "center",
render:(text, record)=>{
return <Tooltip title={`标识: ${record.identifier}, 竞赛副标题: ${record.subtitle}`}><a href={`${main_web_site_url}/competitions/${record.identifier}/home`} target="_blank" className="primary-link">{text}</a></Tooltip>
}
},
{
title: <Select
className="column-select"
showArrow
defaultValue={' '}
onChange={(value)=>{setExpertReview(value);setCurPage(1);}}
>
<Option key={' '} >专家评审</Option>
<Option key={true} >已提交评审</Option>
<Option key={false} >未提交评审</Option>
</Select>,
dataIndex: 'is_expert_audit',
align: "center",
render: (text, record) => {
return <Select
className="column-select"
showArrow
defaultValue={text?1:-1}
// onChange={(key) => { changeExpertReviewStatus(key, record.id) }}
disabled={record.current_status >3 || record.assignRuleAndExperts}
>
{
expertReviewArr.map(item => {
return <Option key={item.dicItemCode} value={item.dicItemCode}>{item.dicItemName}</Option>
})
}
</Select>
}
},
{
title: "开始时间",
dataIndex: "start_time",
key: "startTime",
align: "center",
},
{
title: "截止时间",
dataIndex: "end_time",
key: "endTime",
align: "center",
},
{
title: "报名人数",
dataIndex: "team_members_count",
key: "teamMembersCount",
align: "center",
},
{
title: '评审规则',
dataIndex: 'current_status',
key: "rules",
render: (text, record) => {
return record.assignRuleAndExperts ? <Button size='small' type="primary" onClick={()=>{viewRules(record)}}>查看</Button> : record.is_expert_audit && text<4 ? <Link className="primary-link" to={`/expert/admin/task/review/rules/${2}/${record.id}/?identifier=${record.identifier}&status=${record.current_status}&name=${record.title}&reviewStartTime=${record.end_time}&reviewEndTime=${record.review_time}`}>编辑</Link> : <span className='gary_span'>编辑</span>
}
},
{
title: '专家选取',
dataIndex: 'current_status',
key: "experts",
render: (text, record) => {
return record.assignRuleAndExperts ? <Button size='small' type="primary" onClick={()=>{viewExperts(record)}}>查看</Button> : record.is_expert_audit && text<4 ? <Link className="primary-link" to={`/expert/admin/task/review/select/${2}/${record.id}/?identifier=${record.identifier}&name=${record.title}`}>选择</Link> : <span className='gary_span'>选择</span>
}
},
{
title: '评审任务',
dataIndex: 'current_status',
key: "review",
render: (text, record) => {
return record.assignRuleAndExperts ? <span className='gary_span'>已发布</span> : record.is_expert_audit && text<4 ? <Button size='small' type="primary" onClick={()=>{publishTaskReview(record)}}>发布</Button> : <span className='gary_span'>发布</span>
}
},
{
title: '评审结果',
dataIndex: 'assignRuleAndExperts',
key: "results",
render: (text, record) => {
return text ? <Link className="primary-link" to={`/expert/admin/task/review/results/${2}/${record.id}/#status=${record.current_status}&identifier=${record.identifier}&name=${record.title}`}>查看</Link>:<span className='gary_span'>查看</span>
}
}
];
}, [competitionList, curPage]);
//
const columnsExperts = useMemo(() => {
return [
{
title: '编号',
dataIndex: 'index',
width: 80,
align: 'center',
},
{
title: '专家姓名',
dataIndex: 'expertName',
key: 'expertName',
width: 120,
},
{
title: '手机号码',
dataIndex: 'phone',
width: 130,
key: 'phone',
},
{
title: '最高学历',
dataIndex: 'highestDegree',
key: 'highestDegree',
},
{
title: '专业职称',
dataIndex: 'professionalTitle',
},
{
title: '专家类别',
dataIndex: 'expertType',
},
{
title: '评审领域',
dataIndex: 'reviewAreas',
align: 'center',
width: 260,
},
{
title: '专家评分',
dataIndex: 'expertScore',
align: 'center',
render:(text,record)=>{
return record.expertScore || '--';
}
}
];
}, []);
//
function publishTaskReview(record){
if(!record.ruleEdited || !record.expertSelected){
message.error("请先编辑评审规则以及选取评选专家再发布此任务");
}else{
getRules({containerId: record.id, containerType: 2, statusString: 3}).then(response=>{
if(response && response.message === "success"){
setRules(response.data);
}
})
selectExpertList({containerId: record.id, containerType: 2, pageSize: 10000, curPage: 1}).then(response=>{
if(response && response.message === "success" && Array.isArray(response.data.rows)){
let index = 1;
for (const item of response.data.rows) {
item.reviewAreas = `${item.reviewAreaOne} ${item.reviewAreaTwo ? `${item.reviewAreaTwo}`:''} ${item.reviewAreaThree ? `${item.reviewAreaThree}`:''}`;
item.index = (index++) + (curPage > 1 ? (curPage - 1) * 10 : 0);
}
setPublicTaskId(record.id);
setSelectedExperts(response.data.rows);
setPublicReview(true);
}
});
}
}
//
function viewRules(record){
getRules({containerId: record.id, containerType: 2, statusString: '-1,1,2'}).then(response=>{
if(response && response.message === "success"){
setRules(response.data);
setLookRules(true);
}
});
}
//
function viewExperts(record){
selectExpertList({containerId: record.id, containerType: 2, pageSize: 10000, curPage: 1,}).then(response=>{
if(response && response.message === "success" && Array.isArray(response.data.rows)){
let index = 1;
for (const item of response.data.rows) {
item.reviewAreas = `${item.reviewAreaOne} ${item.reviewAreaTwo ? `${item.reviewAreaTwo}`:''} ${item.reviewAreaThree ? `${item.reviewAreaThree}`:''}`;
item.index = (index++) + (curPage > 1 ? (curPage - 1) * 10 : 0);
}
setSelectedExperts(response.data.rows);
setLookExperts(true);
}
});
}
//
useEffect(()=>{
setLoading(true);
const params = {
curPage,
pageSize: 10,
isExpertAudit: expertReview
}
getCompetitionList(params).then(response=>{
if(response && response.message === "success"){
response.data.map((item, i)=>{
item.index = ++i;
item.start_time = item.start_time.replace('T', ' ').substring(0,16);
item.end_time = item.end_time.replace('T', ' ').substring(0,16);
})
setCompetitionList(response.data || []);
setTotal(response.total);
}
}).finally(()=>{
setLoading(false);
})
}, [curPage, expertReview, reload])
//lookRules,lookExperts,pulicReview
useEffect(()=>{
//
lookRules && rules && Modal.info({
className: 'publishReview',
title: "评审规则",
content:
<React.Fragment>
<div>{rules && rules.rule}</div>
<p>评分标准</p>
<div>
{rules.criterias.map(item=>{return <p key={Math.random()}>{item}</p>})}
</div>
<p>评审时间</p>
<div>{rules.reviewData}</div>
</React.Fragment>
,
});
lookRules && setLookRules(false);
//
lookExperts && selectedExperts && Modal.info({
className: 'publishReview',
title: "已选取评审专家",
content:
<PaginationTable
dataSource={selectedExperts}
columns={columnsExperts}
scroll={{ y: 395 }}/>,
});
lookExperts && setLookExperts(false);
//
pulicReview && rules && selectedExperts && Modal.confirm({
className: 'publishReview',
title: "发布评审任务",
centered: true,
content:
<React.Fragment>
<div className='tip'>
<i className='iconfont icon-erciqueren_icon'></i>
<span className='publicTitle'>确定发布此评审任务确定发布后评审规则与评审专家信息将无法重新编辑</span>
</div>
<p>评审规则</p>
<div>{rules && rules.rule}</div>
<p>评分标准</p>
<div>
{rules.criterias.map(item=>{return <p key={Math.random()}>{item}</p>})}
</div>
<p>评审时间</p>
<div>{rules.reviewData}</div>
<p>已选取评审专家</p>
<PaginationTable
dataSource={selectedExperts}
columns={columnsExperts}
scroll={{ y: 230 }}/>
</React.Fragment>
,
okText: '确定',
cancelText: '取消',
onOk() {
publishExpertsAndRules(publicTaskId, 2).then(response=>{
if(response && response.message==="发布成功"){
setReload(Math.random());
}
})
},
});
pulicReview && setPublicReview(false);
},[lookRules,lookExperts,pulicReview])
return(
<div className="expert_review_system centerbox">
aaa
</div>)
<div className="centerbox">
<PaginationTable
loading={loading}
dataSource={competitionList}
columns={columns}
total={total}
setCurPage={setCurPage}
current={curPage}
/>
</div>
)
}
export default Competition;

View File

@ -0,0 +1,57 @@
a.primary-link{
color: #4154f1;
&:hover{
opacity: 0.8;
}
}
.gary_span{
color: rgba(176, 176, 176, 1);
}
// 发布评审任务弹框样式
.publishReview{
width: 1050px !important;
.ant-modal-body{
padding: 0;
}
.ant-modal-confirm-btns {
margin: 15px 35px 10px;
}
.ant-modal-confirm-title{
border-bottom: 1px solid #eeeeee;
padding: 20px 25px;
background: #f2f2ff;
font-size: 18px;
}
.ant-modal-confirm-body > .anticon{
display: none;
}
.ant-modal-confirm-body > .anticon + .ant-modal-confirm-title + .ant-modal-confirm-content{
margin-left: 0;
}
.ant-modal-confirm-content{
&>p{
font-size: 16px;
color: #333333;
border-bottom: 1px solid #eeeeee;
padding: 10px 35px;
font-weight: bold;
}
&>div{
padding: 10px 45px;
}
.tip{
padding: 10px 35px;
i{
color: #ca0002;
}
.publicTitle {
font-size: 15px;
margin-left: 3px;
}
}
}
.pagination-table .ant-table-tbody > tr > td{
padding: 3px 8px;
}
}

View File

@ -7,7 +7,7 @@ import sucess from '../image/sucess.svg';
import './index.scss';
import '../../index.scss';
function GradesModal({ setVisible, visible, taskId, opsDetail }) {
function GradesModal({ setVisible, visible, taskId, opsDetail, containerType }) {
// table
const [loading, setLoading] = useState(false);
const [dataList, setDataList] = useState([]);
@ -111,12 +111,12 @@ function GradesModal({ setVisible, visible, taskId, opsDetail }) {
opsType: opsDetail && opsDetail.opsType,
orderBy: 'gradesAverageDesc',
containerId: taskId,
containerType: 1,
containerType,
};
//
const paramsRule = {
containerId: taskId,
containerType: 1,
containerType,
statusString: '-1,1',
};
taskId && getRules(paramsRule).then(response=>{

View File

@ -9,9 +9,11 @@ import './index.scss';
import '../index.scss';
import { queryString } from "educoder";
function ReviewResult({ history, match }) {
const taskId = match.params.containerId;
let {status, name, taskModeId} = queryString.parse(window.location.hash.slice(1));
function ReviewResult({ history, match, mygetHelmetapi}) {
const {main_web_site_url} = mygetHelmetapi;
//ididcontainerType12
const {containerId, containerType} = match.params;
let {identifier, 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);
@ -48,22 +50,26 @@ function ReviewResult({ history, match }) {
render: (text, record) => {
return <a className="lookDetail" onClick={()=>{detail(record)}}>查看明细</a>
}
},
{
}
];
//
if(containerType == 1){
columns.splice(4, 0, {
title: '是否胜出',
ket: 'isWin',
align: 'center',
render: (text, record) => {
return record.isWin ? <div className="sucess df"><img src={sucess}/>胜出</div> : status == 4 ? <Checkbox onChange={(e)=>{changeIsWin(record.applicantInfo.id, e.target.checked)}}>胜出</Checkbox> : '未胜出';
}
}
];
});
}
useEffect(()=>{
//
const params = {
containerId: taskId,
containerType: 1,
containerId,
containerType,
orderBy: 'finalGradesDesc'
}
getFinalScoreRankingList(params).then(response=>{
@ -71,9 +77,9 @@ function ReviewResult({ history, match }) {
//finalGrades null 0
let index = 1;
response.data.map(item=>{item.id = index++;setResult(item.finalGrades) })
status >4 ? getWinnersAndPublicists({
containerId: taskId,
containerType: 1
containerType == 1 && status >4 ? getWinnersAndPublicists({
containerId,
containerType
}).then(res=>{
if(res && res.message === "success"){
response.data.map(item=>{
@ -103,7 +109,8 @@ function ReviewResult({ history, match }) {
message.error("还没有到评审结束时间,不能公示结果! ");
return;
}
if(winIds && winIds.length>0){
containerType == 2 && setOpenResultVisible(true);
if(containerType ==1 && winIds && winIds.length>0){
taskModeId == 1 && winIds.length >1 ? message.error("此任务是单人悬赏模式, 只能设置一个中标者 ! ") : setOpenResultVisible(true);
}
}
@ -117,7 +124,7 @@ function ReviewResult({ history, match }) {
setErrorMessage('请输入数字!');
}else if(openRange && (openRange.indexOf('.')!==-1 || openRange.indexOf('-')!==-1)){
setErrorMessage('请输入正整数!');
}else if(openRange && openRange < winIds.length){
}else if(openRange && containerType == 1 && openRange < winIds.length){
setErrorMessage('公示范围不能少于获胜人数!');
}else if(openRange && openRange > dataList.length){
setErrorMessage('公示范围超过应征者总数!');
@ -125,23 +132,24 @@ function ReviewResult({ history, match }) {
ids[ids.length] = dataList.filter(item=>item.id<=openRange).map(i=>i.applicantInfo.id);
}
let params = {
containerId : taskId,
containerType: 1,
containerId,
containerType,
id: 0,
publicityUserIds : ids.toString(),
winUserIds:winIds.toString()
publicityUserIds : ids.toString()
};
containerType==1 && (params[`winUserIds`] = winIds.toString());
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);
if(containerType==1){
window.location.href=`${window.location.href.replace('status=4','status=5')}`;
status = 5;
setGoNum(-2);
}
setOpenResultVisible(false);
}
})
}
return (
<div className="expert_review_system centerbox">
<div className="head_title mb20">
@ -149,8 +157,12 @@ function ReviewResult({ history, match }) {
<span className="font-16 font-w">评审结果</span>
<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>
<p className="mt10"><span className="font-w">{containerType ==1 ? '任务':'竞赛'}名称</span><span className="ml10">{decodeURI(name)}</span></p>
<p className="mt10 pb20">
<span className="font-w color-grey3">{containerType ==1 ? '任务':'竞赛'}链接</span>
{containerType == 1 && <Link className="taskLink ml10" target="_blank" to={`/task/taskDetail/${containerId}`} >{`${window.location.origin}/task/taskDetail/${containerId}`}</Link>}
{containerType == 2 && <a href={`${main_web_site_url}/competitions/${identifier}/home`} target="_blank" className="taskLink ml10">{`${main_web_site_url}/competitions/${identifier}/home`}</a>}
</p>
</div>
{status > 3 ? <React.Fragment>
<p className="font-16 font-w mb10">应征者排名</p>
@ -160,7 +172,7 @@ function ReviewResult({ history, match }) {
scroll={{ y: 384 }}
/>
<div className="openResult">
{status == 4 && <button className={(winIds && taskModeId == 1 && winIds.length >1) || result === null ? 'disableBut': 'but41_fill'} onClick={openResult}>公示结果</button>}
{status == 4 && <button className={(containerType ==1 && winIds && taskModeId == 1 && winIds.length >1) || result === null ? 'disableBut': 'but41_fill'} onClick={openResult}>公示结果</button>}
</div>
</React.Fragment>:<div className="nodata font-20">暂无数据此任务暂未进入成果评选阶段</div>}
<Modal
@ -181,8 +193,9 @@ function ReviewResult({ history, match }) {
<GradesModal
visible={visible}
setVisible={setVisible}
taskId={taskId}
taskId={containerId}
opsDetail={opsDetail}
containerType={containerType}
/>
</div>
)

View File

@ -10,28 +10,37 @@ import { queryString } from "educoder";
const {RangePicker} = DatePicker;
function ReviewRules({form, history, match}) {
const id = match.params.containerId;
const {name, status, createdAt, collectingEndTime, choosingDays} = queryString.parse(window.location.search.slice(1));
function ReviewRules({form, history, match, mygetHelmetapi}) {
const {main_web_site_url} = mygetHelmetapi;
//ididcontainerType12
const {containerId, containerType} = match.params;
const {identifier, name, status, createdAt, collectingEndTime, choosingDays, reviewStartTime, reviewEndTime} = queryString.parse(window.location.search.slice(1));
const { getFieldDecorator,setFieldsValue } = form;
//
const [ initValue, setInitValue] = useState(false);
const disabledDate = (current) =>{
if(status == 1){
const start = new Date((new Date(createdAt.replace("%20", " "))/1000 - 86400)*1000);
return current && current < moment(start).endOf('day');
}else if(status == 3){
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');
if(containerType == 1){
//
if(status == 1){
const start = new Date((new Date(createdAt.replace("%20", " "))/1000 - 86400)*1000);
return current && current < moment(start).endOf('day');
}else if(status == 3){
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');
}
}else{
//
const start = new Date((new Date(reviewStartTime.replace("%20", " "))/1000 - 86400)*1000);
return current && current < moment(start).endOf('day') || current > moment(new Date(reviewEndTime.replace("%20", " "))).endOf('day');
}
}
useEffect(()=>{
//
const params = {
containerId: id,
containerType: 1,
containerId,
containerType,
statusString: 3,
};
getRules(params).then(response=>{
@ -48,9 +57,9 @@ function ReviewRules({form, history, match}) {
form.validateFields((err, values) => {
if (!err) {
let data = {
containerId: id,
containerId,
containerName: decodeURI(name),
containerType: 1,
containerType,
criteriaOne: values.criteriaOne,
reviewStartOn: values.reviewDate[0].format('YYYY-MM-DD HH:mm:ss'),
reviewEndOn: values.reviewDate[1].format('YYYY-MM-DD HH:mm:ss'),
@ -62,6 +71,7 @@ function ReviewRules({form, history, match}) {
status: 3
}
if(initValue){
//
updateRules({...data, id: initValue.id}).then(response=>{
if(response && response.message === '更新成功'){
message.success('更新成功');
@ -71,6 +81,7 @@ function ReviewRules({form, history, match}) {
}
})
}else{
//
editRules(data).then(response=>{
if(response && response.message === '成功'){
message.success('保存成功');
@ -93,8 +104,12 @@ function ReviewRules({form, history, match}) {
<span className="font-16 font-w color-grey3">任务信息</span>
<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.origin}/task/taskDetail/${id}`}</Link></p>
<p className="mt10"><span className="font-w color-grey3">{containerType ==1 ? '任务':'竞赛'}名称</span><span className="ml10 color-grey3">{decodeURI(name)}</span></p>
<p className="mt10 pb20">
<span className="font-w color-grey3">{containerType ==1 ? '任务':'竞赛'}链接</span>
{containerType == 1 && <Link className="taskLink ml10" target="_blank" to={`/task/taskDetail/${containerId}`} >{`${window.location.origin}/task/taskDetail/${containerId}`}</Link>}
{containerType == 2 && <a href={`${main_web_site_url}/competitions/${identifier}/home`} target="_blank" className="taskLink ml10">{`${main_web_site_url}/competitions/${identifier}/home`}</a>}
</p>
</div>
<Form className="pt10">
<Form.Item

View File

@ -13,9 +13,11 @@ const { Option } = Select;
const { Search } = Input;
function SelectExpert(props) {
const { history, form, current_user, match } = props;
const taskId = match.params.containerId;
const { name} = queryString.parse(window.location.search.slice(1));
const { history, form, current_user, match, mygetHelmetapi } = props;
const {main_web_site_url} = mygetHelmetapi;
//ididcontainerType12
const {containerId, containerType} = match.params;
const {identifier, name} = queryString.parse(window.location.search.slice(1));
const { getFieldDecorator, setFieldsValue } = form;
const [reload, setReload] = useState();
const [loading, setLoading] = useState(false);
@ -139,8 +141,12 @@ function SelectExpert(props) {
return <div>
<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.origin}/task/taskDetail/${taskId}`}</Link></p>
<p className="mt10"><span className="font-w color-grey3">{containerType ==1 ? '任务':'竞赛'}名称</span><span className="ml10 color-grey3">{decodeURI(name)}</span></p>
<p className="mt10 pb20">
<span className="font-w color-grey3">{containerType ==1 ? '任务':'竞赛'}链接</span>
{containerType == 1 && <Link className="taskLink ml10" target="_blank" to={`/task/taskDetail/${containerId}`} >{`${window.location.origin}/task/taskDetail/${containerId}`}</Link>}
{containerType == 2 && <a href={`${main_web_site_url}/competitions/${identifier}/home`} target="_blank" className="taskLink ml10">{`${main_web_site_url}/competitions/${identifier}/home`}</a>}
</p>
</div>
}
@ -148,8 +154,8 @@ function SelectExpert(props) {
useEffect(()=>{
setLoading(true);
const params = {
containerId: taskId,
containerType: 1,
containerId,
containerType,
curPage:curPage,
pageSize: 10000,
curPage: 1,
@ -197,8 +203,8 @@ function SelectExpert(props) {
useEffect(()=>{
setLoading(true);
const params = {
containerId: taskId,
containerType: 1,
containerId,
containerType,
curPage,
pageSize,
}
@ -253,9 +259,9 @@ function SelectExpert(props) {
const SelectExperts = (id) =>{
const params = {
assignorId: parseInt(current_user.user_id),
containerId: taskId,
containerId,
containerName: decodeURI(name),
containerType: 1,
containerType,
expertIds: id.toString(),
status: 3
}

View File

@ -592,9 +592,9 @@ export function addExpertReview(taskId,expertReview){
}
//发布评审任务
export function publishExpertsAndRules(taskId){
export function publishExpertsAndRules(taskId, containerType){
return fetch({
url: `/api/taskRuleCriteria/publishExpertsAndRules?containerId=${taskId}&containerType=1&status=-1`,
url: `/api/taskRuleCriteria/publishExpertsAndRules?containerId=${taskId}&containerType=${containerType}&status=-1`,
method: 'put'
})
}

View File

@ -430,7 +430,7 @@ export default Form.create()(({ form, showNotification, match, history, state })
okText: '确定',
cancelText: '取消',
onOk() {
publishExpertsAndRules(publicTaskId).then(response=>{
publishExpertsAndRules(publicTaskId,1).then(response=>{
if(response && response.message==="发布成功"){
setReload(Math.random());
}