forked from Gitlink/forgeplus-react
修改公示效果、成果状态筛选等
This commit is contained in:
parent
86da295674
commit
ee7c95965d
|
@ -110,20 +110,23 @@ export const sortArr = [
|
|||
},
|
||||
];
|
||||
|
||||
|
||||
|
||||
// 任务成果状态
|
||||
export const applyStatusArr = [
|
||||
{ dicItemCode: "0,3,4", name: "待确认", dicItemName: "待确认" },
|
||||
// { dicItemCode: "0,3,4", name: "待确认", dicItemName: "待确认" },
|
||||
// { dicItemCode: "0", name: "待评选", dicItemName: "待评选" },
|
||||
{ dicItemCode: "1", name: "未采纳", dicItemName: "未采纳" },
|
||||
{ dicItemCode: "2", name: "评选胜出", dicItemName: "评选胜出" },
|
||||
];
|
||||
|
||||
// 任务成果状态
|
||||
export const applyStatusAllArr = [
|
||||
{ dicItemCode: "0", name: "待确认", dicItemName: "待确认" },
|
||||
{ dicItemCode: "0", name: "待评选", dicItemName: "待评选" },
|
||||
{ dicItemCode: "1", name: "未采纳", dicItemName: "未采纳" },
|
||||
{ dicItemCode: "2", name: "评选胜出", dicItemName: "评选胜出" },
|
||||
{ dicItemCode: "3", name: "待确认", dicItemName: "待确认" },
|
||||
{ dicItemCode: "4", name: "待确认", dicItemName: "待确认" },
|
||||
// { dicItemCode: "3", name: "待确认", dicItemName: "待确认" },
|
||||
// { dicItemCode: "4", name: "待确认", dicItemName: "待确认" },
|
||||
];
|
||||
|
||||
// 任务成果审核状态
|
||||
|
@ -133,6 +136,12 @@ export const paperCheckStatusArr = [
|
|||
{ dicItemCode: "0", name: "未通过", dicItemName: "未通过" },
|
||||
];
|
||||
|
||||
// 任务成果状态
|
||||
export const paperCheckSearchArr = [
|
||||
{ dicItemCode: "2", name: "待审核", dicItemName: "待审核" },
|
||||
{ dicItemCode: "1", name: "待评选", dicItemName: "待评选" },
|
||||
];
|
||||
|
||||
// 提示语数组
|
||||
export const paperCheckTextArr = [
|
||||
"您的成果审核未通过",
|
||||
|
|
|
@ -208,7 +208,8 @@ export default Form.create()(({ form, showNotification, match, history, state })
|
|||
>
|
||||
{
|
||||
showUserModeArr.map(item => {
|
||||
return <Option key={item.dicItemCode} value={item.dicItemCode}>{item.dicItemName}</Option>
|
||||
// 若创客任务在公示期及以后阶段,则不显示“自动公示”选项
|
||||
return <Option key={item.dicItemCode} value={item.dicItemCode} disabled={item.dicItemCode===1 && [5,6,7,8].includes(record.status)}>{item.dicItemName}</Option>
|
||||
})
|
||||
}
|
||||
</Select>
|
||||
|
|
|
@ -9,7 +9,7 @@ import StatusNav from '../../components/statusNav';
|
|||
import ItemListPaper from '../components/itemListPaper';
|
||||
import ProofModal from '../components/proofModal';
|
||||
import { getTaskDetail, getTaskCategory, getTaskPaper, makePublic, addPaper, getAgreement, agreement, checkAgreement, checkHavePaper, addExpertReview, followTask, unfollowTask } from '../api';
|
||||
import { taskModeIdArr, applyStatusArr, applyStatusAllArr, agreementContent, paperCheckTextArr, surplusTime } from '../static';
|
||||
import { taskModeIdArr, applyStatusArr, applyStatusAllArr,paperCheckSearchArr, agreementContent, paperCheckTextArr, surplusTime } from '../static';
|
||||
import { httpUrl } from '../fetch';
|
||||
import './index.scss';
|
||||
import { getRules } from 'src/military/expert/api';
|
||||
|
@ -45,6 +45,7 @@ export default Form.create()(
|
|||
const [paperUploadLoading, setPaperUploadLoading] = useState(false);
|
||||
|
||||
const [status, setStatus] = useState('');
|
||||
const [checkStatus, setCheckStatus] = useState('');
|
||||
const [curPage, setCurPage] = useState(1);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [dataList, setDataList] = useState([]);
|
||||
|
@ -140,6 +141,7 @@ export default Form.create()(
|
|||
pageSize: 10,
|
||||
curPage,
|
||||
status,
|
||||
checkStatus
|
||||
}
|
||||
getTaskPaper(params).then(data => {
|
||||
if (data && Array.isArray(data.rows)) {
|
||||
|
@ -155,7 +157,7 @@ export default Form.create()(
|
|||
setTotal(data.total);
|
||||
});
|
||||
}
|
||||
}, [id, status, curPage, reload, relaodChildList, detailData, current_user.login]);
|
||||
}, [id, status, checkStatus, curPage, reload, relaodChildList, detailData, current_user.login]);
|
||||
|
||||
|
||||
// 流程步骤显示,返回剩余时间
|
||||
|
@ -234,10 +236,19 @@ export default Form.create()(
|
|||
})
|
||||
}
|
||||
|
||||
function changeOptionId(option) {
|
||||
// function changeOptionId(option) {
|
||||
// setStatus(option.dicItemCode.toString() || '');
|
||||
// setCurPage(1);
|
||||
// }
|
||||
// 改变选项
|
||||
const changeOptionId = useCallback((option, type) => {
|
||||
if (type === 'applyStatus') {
|
||||
setStatus(option.dicItemCode.toString() || '');
|
||||
setCurPage(1);
|
||||
}
|
||||
} else if (type === 'checkStatus') {
|
||||
setCheckStatus(option.dicItemCode);
|
||||
}
|
||||
setCurPage(1);
|
||||
}, []);
|
||||
|
||||
// 签订协议
|
||||
function agreementSign() {
|
||||
|
@ -542,16 +553,25 @@ export default Form.create()(
|
|||
{detailData.status === 4 && dataList.length && (!detailData.isProofBoolean) && (!detailData.expertReview) && detailData.user && (current_user.admin || current_user.login === detailData.user.login) ?
|
||||
<a className="line_1 color-blue fr ml20" onClick={() => { setVisibleProofs(true) }}>上传佐证材料</a> : ''}
|
||||
{dataList.length > 0 && taskLimit && <a className="line_1 color-blue fr ml20" onClick={() => { window.open(`${httpUrl}/api/paper/papers/download/${id}`) }}>一键导出成果物 >></a>}
|
||||
{(!detailData.showUserStatus) && !detailData.expertReview && taskLimit && <a className="fr color-orange ml20" onClick={showUser}>应征者名单公示 >></a>}
|
||||
{/* 若后台为“手动公示”,则显示按钮,是否公示由雇主与管理员是否点击“应征者名单公示”按钮决定,同时必须有成果,非关闭状态 */}
|
||||
{!detailData.showUserStatus && !detailData.expertReview && taskLimit && detailData.showUserMode===2 && <a className="fr color-orange ml20" onClick={showUser}>应征者名单公示 >></a>}
|
||||
{/* [添加专家评审流程]按钮入口,仅管理员可见 */}
|
||||
{taskLimit && !detailData.expertReview && detailData.status < 4 && <a className="fr color-orange ml20" onClick={addExpertReviewModal}>添加专家评审流程</a>}
|
||||
</div>
|
||||
<StatusNav
|
||||
|
||||
{[5,6,7,8].includes(detailData.status)&&<StatusNav
|
||||
key={'applyStatus'}
|
||||
type={'applyStatus'}
|
||||
options={applyStatusArr}
|
||||
changeOptionId={changeOptionId}
|
||||
/>
|
||||
/>}
|
||||
|
||||
{[3,4].includes(detailData.status)&& <StatusNav
|
||||
key={'checkStatus'}
|
||||
type={'checkStatus'}
|
||||
options={paperCheckSearchArr}
|
||||
changeOptionId={changeOptionId}
|
||||
/> }
|
||||
|
||||
<ItemListPaper
|
||||
current_user={current_user}
|
||||
|
|
Loading…
Reference in New Issue