forked from Gitlink/forgeplus-react
修改注册
This commit is contained in:
parent
9238d9ecf1
commit
7e3fc9a412
|
@ -45,7 +45,7 @@
|
|||
.ant-btn-primary {
|
||||
background-color: #4154f1;
|
||||
border-color: #4154f1;
|
||||
&:hover {
|
||||
&:hover,&:active,&:focus {
|
||||
background-color: #5d6eff;
|
||||
border-color: #5d6eff;
|
||||
}
|
||||
|
|
|
@ -27,6 +27,8 @@ export default Form.create()(({ match, history, showNotification, form, current_
|
|||
const [honorList, setHonorList] = useState([]);
|
||||
const [honorIds, setHonorIds] = useState();
|
||||
|
||||
const [reload, setReload] = useState();
|
||||
|
||||
// 获取列表
|
||||
useEffect(() => {
|
||||
let params = {};
|
||||
|
@ -85,7 +87,7 @@ export default Form.create()(({ match, history, showNotification, form, current_
|
|||
}
|
||||
}
|
||||
});
|
||||
}, []);
|
||||
}, [reload]);
|
||||
|
||||
function getFiles(ids) {
|
||||
let idArr = ids.split(',');
|
||||
|
@ -171,8 +173,10 @@ export default Form.create()(({ match, history, showNotification, form, current_
|
|||
academicAchievements: achievementIds,
|
||||
honors: honorIds,
|
||||
userId: current_user.user_id,
|
||||
status: -1,
|
||||
};
|
||||
if (lastRegister) {
|
||||
|
||||
if (lastRegister && [2,3].includes(lastRegister.status)) {
|
||||
expertUpdate({
|
||||
...params,
|
||||
id: lastRegister.id
|
||||
|
@ -210,6 +214,7 @@ export default Form.create()(({ match, history, showNotification, form, current_
|
|||
if (res && res.message && (res.message.indexOf("成功") > -1 || res.message.indexOf("更新") > -1)) {
|
||||
showNotification("操作成功");
|
||||
setSubmitConfirmValue(false);
|
||||
setReload(Math.random());
|
||||
} else {
|
||||
showNotification(res && res.message || "操作失败");
|
||||
}
|
||||
|
@ -218,7 +223,7 @@ export default Form.create()(({ match, history, showNotification, form, current_
|
|||
return (
|
||||
<div className="centerbox detail">
|
||||
<div className="navigation">
|
||||
<span>专家评审系统</span> > <span>登记专家资料</span>
|
||||
<span>专家评审系统</span> > <span>{lastRegister && lastRegister.status === -1 ? "您的资料正在审核,请稍候" : "登记专家资料"}</span>
|
||||
</div>
|
||||
<div className='center_flex'>
|
||||
<div className='register_left'>
|
||||
|
@ -445,9 +450,12 @@ export default Form.create()(({ match, history, showNotification, form, current_
|
|||
</div>
|
||||
</Form>
|
||||
<div className='buts'>
|
||||
<button className="but41_fill mr20" disabled={lastRegister && lastRegister.status === '-1'} onClick={() => expertRegisterSubmit(true)}>提交资料</button>
|
||||
<button className="but41_border mr20" disabled={lastRegister && lastRegister.status === '-1'} onClick={draft}>保存资料</button>
|
||||
<button className="butE3_border" onClick={() => setCancelConfirmValue(true)}>取消</button>
|
||||
{/* <button className="but41_fill mr20" disabled={lastRegister && lastRegister.status === -1} onClick={() => expertRegisterSubmit(true)}>提交资料</button>
|
||||
<button className="but41_border mr20" disabled={lastRegister && lastRegister.status === -1} onClick={draft}>保存资料</button>
|
||||
<button className="butE3_border" onClick={() => setCancelConfirmValue(true)}>取消</button> */}
|
||||
<Button className="but41_fill mr20" type="primary" disabled={lastRegister && lastRegister.status === -1} onClick={() => expertRegisterSubmit(true)}>提交资料</Button>
|
||||
<Button className="but41_border mr20" disabled={lastRegister && lastRegister.status === -1} onClick={draft}>保存资料</Button>
|
||||
<Button className="butE3_border" onClick={() => setCancelConfirmValue(true)}>取消</Button>
|
||||
|
||||
<Modal
|
||||
title="提交资料"
|
||||
|
|
|
@ -12,11 +12,10 @@ const { Option } = Select;
|
|||
const { Search } = Input;
|
||||
|
||||
function SelectExpert(props) {
|
||||
console.log('选择专家', props);
|
||||
const { form, location } = props;
|
||||
const { history, showNotification, form, location } = props;
|
||||
const { getFieldDecorator, setFieldsValue, getFieldsValue } = form;
|
||||
const { taskRecord } = location && location.state;
|
||||
console.log('信息',taskRecord);
|
||||
console.log('信息', taskRecord);
|
||||
|
||||
// const TaskDetail = (
|
||||
// <div>
|
||||
|
@ -148,16 +147,16 @@ function SelectExpert(props) {
|
|||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
onOk() {
|
||||
registerCheck({
|
||||
expertId: record.id,
|
||||
isPassed: checkStatus,
|
||||
userId: record.userId,
|
||||
}).then(res => {
|
||||
if (res.message === 'success') {
|
||||
showNotification('操作成功!');
|
||||
setReload(Math.random());
|
||||
}
|
||||
});
|
||||
// registerCheck({
|
||||
// expertId: record.id,
|
||||
// isPassed: checkStatus,
|
||||
// userId: record.userId,
|
||||
// }).then(res => {
|
||||
// if (res.message === 'success') {
|
||||
// showNotification('操作成功!');
|
||||
// setReload(Math.random());
|
||||
// }
|
||||
// });
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -254,7 +253,7 @@ function SelectExpert(props) {
|
|||
{professionalType.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>)}
|
||||
</Select>)}
|
||||
</Form.Item>
|
||||
<Form.Item label="评审领域:">
|
||||
{getFieldDecorator('reviewAreaSel', {})(
|
||||
|
@ -263,7 +262,7 @@ function SelectExpert(props) {
|
|||
{reviewArea.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>)}
|
||||
</Select>)}
|
||||
</Form.Item>
|
||||
</Form>
|
||||
<button className="butE3_border ml120 mb25" onClick={() => {
|
||||
|
@ -274,7 +273,8 @@ function SelectExpert(props) {
|
|||
searchInput: '',
|
||||
expertType: 'all',
|
||||
reviewAreaSel: 'all'
|
||||
});}}>清除</button>
|
||||
});
|
||||
}}>清除</button>
|
||||
</div>
|
||||
<Paginationtable
|
||||
loading={loading}
|
||||
|
@ -284,9 +284,10 @@ function SelectExpert(props) {
|
|||
setCurPage={setCurPage}
|
||||
current={curPage}
|
||||
// rowSelection={selectExperts ? rowSelection : null}
|
||||
rowSelection={ rowSelection}
|
||||
rowSelection={rowSelection}
|
||||
expandedRowRender={record => <p style={{ margin: 0 }}>{record.graduatedFrom}</p>}
|
||||
expandIconColumnIndex={10}
|
||||
expandIconColumnIndex={5}
|
||||
expandIconAsCell={false}
|
||||
/>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
|
|
Loading…
Reference in New Issue