diff --git a/src/military/task/taskAdmin/index.jsx b/src/military/task/taskAdmin/index.jsx index 5b3592f8c..f2ad6e641 100644 --- a/src/military/task/taskAdmin/index.jsx +++ b/src/military/task/taskAdmin/index.jsx @@ -47,6 +47,7 @@ export default Form.create()(({ form, showNotification, match, history, state }) const [pulicReview, setPublicReview] = useState(false); const [rules, setRules] = useState(undefined); const [selectedExperts, setSelectedExperts] = useState(undefined); + const [publicTaskId, setPublicTaskId] = useState(undefined); useEffect(()=>{ setCurPage(hashDate(hash) || 1); @@ -429,7 +430,7 @@ export default Form.create()(({ form, showNotification, match, history, state }) okText: '确定', cancelText: '取消', onOk() { - publishExpertsAndRules(record.id).then(response=>{ + publishExpertsAndRules(publicTaskId).then(response=>{ if(response && response.message==="发布成功"){ setReload(Math.random()); } @@ -456,6 +457,7 @@ export default Form.create()(({ form, showNotification, match, history, state }) 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); }