forked from Gitlink/forgeplus-react
合并谢思代码
This commit is contained in:
commit
9238d9ecf1
|
@ -3,7 +3,7 @@ import { Table, Pagination } from 'antd';
|
|||
import './index.scss';
|
||||
|
||||
export default (props) => {
|
||||
const { loading, dataSource, columns, handleRow, total, setCurPage, current } =props;
|
||||
const { loading, dataSource, columns, handleRow, total, setCurPage, current, rowSelection, expandedRowRender, expandIconColumnIndex } =props;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
|
@ -14,6 +14,9 @@ export default (props) => {
|
|||
columns={columns}
|
||||
pagination={false}
|
||||
onRow={handleRow}
|
||||
rowSelection={rowSelection}
|
||||
expandedRowRender={expandedRowRender}
|
||||
expandIconColumnIndex={expandIconColumnIndex}
|
||||
{...props}
|
||||
/>
|
||||
{total > 10 &&
|
||||
|
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
@ -50,3 +50,68 @@
|
|||
border-color: #5d6eff;
|
||||
}
|
||||
}
|
||||
|
||||
//弹出确认框样式
|
||||
.expert_modal .ant-modal-content{
|
||||
width: 550px;
|
||||
height: 318px;
|
||||
& .ant-modal-header{
|
||||
padding: 0.6em 2.1em;
|
||||
background: #F2F2FF;
|
||||
& .ant-modal-title {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
& .ant-modal-body{
|
||||
padding-left: 120px;
|
||||
& p{
|
||||
font-size: 16px;
|
||||
color: #666666;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
line-height: 2.9em;
|
||||
}
|
||||
& .weight_bold{
|
||||
font-weight: bold;
|
||||
}
|
||||
& .warning::before{
|
||||
content: url('./image/warning.svg');
|
||||
width: 32px;
|
||||
position: relative;
|
||||
top: 11px;
|
||||
left: -15px;
|
||||
}
|
||||
}
|
||||
& .ant-btn{
|
||||
padding: 0 1.3em;
|
||||
height: 2.55em;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
color: #404660;
|
||||
border: 1px solid #E3E7ED;
|
||||
width: 7em;
|
||||
&:hover{
|
||||
background-color: #F8F8F8;
|
||||
border: 1px solid #E3E7ED;
|
||||
}
|
||||
&:active{
|
||||
background-color: #F3F3F3;
|
||||
border: 1px solid #E3E7ED;
|
||||
}
|
||||
}
|
||||
& .ant-btn.ant-btn-primary{
|
||||
color: white;
|
||||
background-color: #4154F1;
|
||||
margin-left: 2.5em;
|
||||
&:hover{
|
||||
background-color: #5D6EFF;
|
||||
}
|
||||
&:active{
|
||||
background-color: #374BF2;
|
||||
}
|
||||
}
|
||||
& .ant-modal-footer {margin-top: 15px; }
|
||||
}
|
||||
.expert_modal.submit .ant-modal-body{
|
||||
padding-left: 0;
|
||||
text-align: center;
|
||||
}
|
|
@ -226,257 +226,224 @@ export default Form.create()(({ match, history, showNotification, form, current_
|
|||
</div>
|
||||
<div className='register_right'>
|
||||
<p>专家资料</p>
|
||||
<div>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
{
|
||||
helper('姓名',
|
||||
'expertName',
|
||||
[{ required: true, message: "姓名不能为空" }],
|
||||
<Input
|
||||
placeholder="请输入您的姓名"
|
||||
/>
|
||||
)
|
||||
<Form>
|
||||
<div className='expert_Register_form'>
|
||||
{
|
||||
helper('姓名',
|
||||
'expertName',
|
||||
[{ required: true, message: "姓名不能为空" }],
|
||||
<Input
|
||||
placeholder="请输入您的姓名"
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('手机号码',
|
||||
'phone',
|
||||
[{ required: true, message: "手机号码不能为空" },
|
||||
{
|
||||
validator: (rule, val, callback) => {
|
||||
const pattern = /^((\+)?86|((\+)?86)?)0?1[3458]\d{9}$/;
|
||||
if (pattern.test(val)) {
|
||||
callback();
|
||||
} else {
|
||||
callback('请输入正确的手机号码!');
|
||||
}
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
{
|
||||
helper('最高学历',
|
||||
'highestDegree',
|
||||
[{ required: true, message: '请选择最高学历' }],
|
||||
<Select placeholder="请选择" dropdownClassName="expert_register">
|
||||
{highestEducation.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>
|
||||
)
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{
|
||||
helper('手机号码',
|
||||
'phone',
|
||||
[{ required: true, message: "手机号码不能为空" },
|
||||
{
|
||||
validator: (rule, val, callback) => {
|
||||
const pattern = /^((\+)?86|((\+)?86)?)0?1[3458]\d{9}$/;
|
||||
if (pattern.test(val)) {
|
||||
callback();
|
||||
} else {
|
||||
callback('请输入正确的手机号码!');
|
||||
}
|
||||
}
|
||||
}],
|
||||
<Input
|
||||
placeholder="请输入您的手机号码"
|
||||
/>
|
||||
)
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
{
|
||||
helper('工作单位',
|
||||
'workplace',
|
||||
[{ required: true, message: "工作单位不能为空" }],
|
||||
<Input
|
||||
placeholder="请输入您的工作单位"
|
||||
/>
|
||||
)
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{
|
||||
helper('单位类别',
|
||||
'workplaceType',
|
||||
[{ required: true, message: "请选择单位类别" }],
|
||||
<Select placeholder="请选择" dropdownClassName="expert_register">
|
||||
{unitType.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>
|
||||
)
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
{
|
||||
helper('工作性质',
|
||||
'workNature',
|
||||
[{ required: true, message: "请选择工作性质" }],
|
||||
<Select placeholder="请选择" dropdownClassName="expert_register">
|
||||
{natureOfWork.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>
|
||||
)
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{helper('专业职称',
|
||||
'professionalTitle',
|
||||
[{ required: true, message: "专业职称不能为空" }],
|
||||
<Input
|
||||
placeholder="请输入您的专业职称"
|
||||
/>)}
|
||||
</td>
|
||||
<td>
|
||||
{helper('职称职级',
|
||||
'titleRank',
|
||||
[{ required: true, message: "请选择职称职级" }],
|
||||
<Select placeholder="请选择" dropdownClassName="expert_register">
|
||||
{positionLevel.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>
|
||||
)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{helper('专业类别',
|
||||
'expertType',
|
||||
[{ required: true, message: "请选择专业类别" }],
|
||||
<Select placeholder="请选择" dropdownClassName="expert_register">
|
||||
{professionalType.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>
|
||||
)}
|
||||
</td>
|
||||
<td>
|
||||
{helper('评审领域1',
|
||||
'reviewAreaOne',
|
||||
[{ required: true, message: "请选择评审领域" }],
|
||||
<Select placeholder="请选择" dropdownClassName="expert_register">
|
||||
{reviewArea.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>
|
||||
)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{helper('评审领域2',
|
||||
'"reviewAreaTwo', [],
|
||||
<Select placeholder="请选择" dropdownClassName="expert_register">
|
||||
{reviewArea.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>)}
|
||||
</td>
|
||||
<td>
|
||||
{helper('评审领域3',
|
||||
'reviewAreaThree', [],
|
||||
<Select placeholder="请选择" dropdownClassName="expert_register">
|
||||
{reviewArea.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{helper('毕业院校',
|
||||
'graduatedFrom', [],
|
||||
<Input
|
||||
placeholder="请输入您的毕业院校"
|
||||
/>)}
|
||||
</td>
|
||||
<td>
|
||||
{helper('院校专业',
|
||||
'major', [],
|
||||
<Input
|
||||
placeholder="请输入您的专业"
|
||||
/>)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{helper('身份证号',
|
||||
'idNumber', [],
|
||||
<Input
|
||||
placeholder="请输入您的身份证号码"
|
||||
/>)}
|
||||
</td>
|
||||
<td>
|
||||
{helper('邮箱地址',
|
||||
'expertEmail', [],
|
||||
<Input
|
||||
placeholder="请输入您的常用邮箱地址"
|
||||
/>)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{helper('开户银行',
|
||||
'bankName', [],
|
||||
<Input
|
||||
placeholder="请输入您的开户银行"
|
||||
/>)}
|
||||
</td>
|
||||
<td>
|
||||
{helper('银行账号',
|
||||
'bankAccount', [],
|
||||
<Input
|
||||
placeholder="请输入您的银行卡号"
|
||||
/>)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<Form.Item className="upload-form" label="上传个人简介">
|
||||
<Upload
|
||||
load={uploadResume}
|
||||
size={50}
|
||||
showNotification={showNotification}
|
||||
fileList={resumeList}
|
||||
/>
|
||||
</Form.Item>
|
||||
</td>
|
||||
<td>
|
||||
<Form.Item className="upload-form" label="职称证明">
|
||||
<Upload
|
||||
load={uploadTitleCert}
|
||||
size={50}
|
||||
showNotification={showNotification}
|
||||
fileList={titleCertList}
|
||||
/>
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<Form.Item className="upload-form" label="学术成果">
|
||||
<Upload
|
||||
load={uploadAchievement}
|
||||
size={50}
|
||||
showNotification={showNotification}
|
||||
fileList={achievementList}
|
||||
/>
|
||||
</Form.Item>
|
||||
</td>
|
||||
<td>
|
||||
<Form.Item className="upload-form" label="荣誉称号">
|
||||
<Upload
|
||||
load={uploadHonor}
|
||||
size={50}
|
||||
showNotification={showNotification}
|
||||
fileList={honorList}
|
||||
/>
|
||||
</Form.Item>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}],
|
||||
<Input
|
||||
placeholder="请输入您的手机号码"
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('单位类别',
|
||||
'workplaceType',
|
||||
[{ required: true, message: "请选择单位类别" }],
|
||||
<Select placeholder="请选择" dropdownClassName="expert_register">
|
||||
{unitType.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('专业职称',
|
||||
'professionalTitle',
|
||||
[{ required: true, message: "专业职称不能为空" }],
|
||||
<Input
|
||||
placeholder="请输入您的专业职称"
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('专业类别',
|
||||
'expertType',
|
||||
[{ required: true, message: "请选择专业类别" }],
|
||||
<Select placeholder="请选择" dropdownClassName="expert_register">
|
||||
{professionalType.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('评审领域2',
|
||||
'"reviewAreaTwo', [],
|
||||
<Select placeholder="请选择" dropdownClassName="expert_register">
|
||||
{reviewArea.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('毕业院校',
|
||||
'graduatedFrom', [],
|
||||
<Input
|
||||
placeholder="请输入您的毕业院校"
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('身份证号',
|
||||
'idNumber', [],
|
||||
<Input
|
||||
placeholder="请输入您的身份证号码"
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('开户银行',
|
||||
'bankName', [],
|
||||
<Input
|
||||
placeholder="请输入您的开户银行"
|
||||
/>
|
||||
)
|
||||
}
|
||||
<Form.Item className="upload-form" label="上传个人简介">
|
||||
<Upload
|
||||
load={uploadResume}
|
||||
size={50}
|
||||
showNotification={showNotification}
|
||||
fileList={resumeList}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item className="upload-form" label="学术成果">
|
||||
<Upload
|
||||
load={uploadAchievement}
|
||||
size={50}
|
||||
showNotification={showNotification}
|
||||
fileList={achievementList}
|
||||
/>
|
||||
</Form.Item>
|
||||
</div>
|
||||
<div className='expert_Register_form ml80'>
|
||||
{
|
||||
helper('最高学历',
|
||||
'highestDegree',
|
||||
[{ required: true, message: '请选择最高学历' }],
|
||||
<Select placeholder="请选择" dropdownClassName="expert_register">
|
||||
{highestEducation.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('工作单位',
|
||||
'workplace',
|
||||
[{ required: true, message: "工作单位不能为空" }],
|
||||
<Input
|
||||
placeholder="请输入您的工作单位"
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('工作性质',
|
||||
'workNature',
|
||||
[{ required: true, message: "请选择工作性质" }],
|
||||
<Select placeholder="请选择" dropdownClassName="expert_register">
|
||||
{natureOfWork.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('职称职级',
|
||||
'titleRank',
|
||||
[{ required: true, message: "请选择职称职级" }],
|
||||
<Select placeholder="请选择" dropdownClassName="expert_register">
|
||||
{positionLevel.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('评审领域1',
|
||||
'reviewAreaOne',
|
||||
[{ required: true, message: "请选择评审领域" }],
|
||||
<Select placeholder="请选择" dropdownClassName="expert_register">
|
||||
{reviewArea.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('评审领域3',
|
||||
'reviewAreaThree', [],
|
||||
<Select placeholder="请选择" dropdownClassName="expert_register">
|
||||
{reviewArea.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('院校专业',
|
||||
'major', [],
|
||||
<Input
|
||||
placeholder="请输入您的专业"
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('邮箱地址',
|
||||
'expertEmail', [],
|
||||
<Input
|
||||
placeholder="请输入您的常用邮箱地址"
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('银行账号',
|
||||
'bankAccount', [],
|
||||
<Input
|
||||
placeholder="请输入您的银行卡号"
|
||||
/>
|
||||
)
|
||||
}
|
||||
<Form.Item className="upload-form" label="职称证明">
|
||||
<Upload
|
||||
load={uploadTitleCert}
|
||||
size={50}
|
||||
showNotification={showNotification}
|
||||
fileList={titleCertList}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item className="upload-form" label="荣誉称号">
|
||||
<Upload
|
||||
load={uploadHonor}
|
||||
size={50}
|
||||
showNotification={showNotification}
|
||||
fileList={honorList}
|
||||
/>
|
||||
</Form.Item>
|
||||
</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>
|
||||
|
|
|
@ -22,44 +22,46 @@
|
|||
font-size: 0.8em;
|
||||
font-weight: bold;
|
||||
}
|
||||
& > div {
|
||||
.ant-form{
|
||||
display: flex;
|
||||
padding: 1em 2em 1.5em;
|
||||
& > table {
|
||||
& .ant-form-item-required::before {
|
||||
position: relative;
|
||||
top: -1px;
|
||||
content: url("./image/required.svg");
|
||||
}
|
||||
& .ant-input,
|
||||
.ant-select-selection {
|
||||
width: 30.1em;
|
||||
box-shadow: none;
|
||||
&:focus,
|
||||
&:hover {
|
||||
border: 1px solid #4154f1 !important;
|
||||
}
|
||||
}
|
||||
& tr td:first-child .ant-row.ant-form-item {
|
||||
margin-right: 9em;
|
||||
}
|
||||
& .ant-input,
|
||||
.ant-input .ant-input-suffix {
|
||||
background-color: #ffffff !important;
|
||||
}
|
||||
& .ant-select-open .ant-select-selection {
|
||||
border: 1px solid #4154f1 !important;
|
||||
}
|
||||
& .ant-form-item {
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
& td > p {
|
||||
margin: 0.3em 0 0.6em !important;
|
||||
}
|
||||
& .but41_border {
|
||||
margin-bottom: 0.6em;
|
||||
padding: 0 0.5em;
|
||||
}
|
||||
.expert_Register_form {
|
||||
width: 43.5%;
|
||||
&.ml80{
|
||||
margin-left: 120px;
|
||||
}
|
||||
.ant-form-item-required::before{
|
||||
position: relative;
|
||||
top: -1px;
|
||||
content: url('./image/required.svg');
|
||||
}
|
||||
.ant-input, .ant-select-selection{
|
||||
width: 30.1em;
|
||||
box-shadow: none;
|
||||
&:focus, &:hover{
|
||||
border: 1px solid #4154F1 !important;
|
||||
}
|
||||
}
|
||||
tr td:first-child .ant-row.ant-form-item{
|
||||
margin-right: 9em;
|
||||
}
|
||||
& .ant-input, .ant-input .ant-input-suffix {
|
||||
background-color: #FFFFFF !important;
|
||||
}
|
||||
& .ant-select-open .ant-select-selection{
|
||||
border: 1px solid #4154F1 !important;
|
||||
}
|
||||
& .ant-form-item{
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
& td>p{
|
||||
margin: 0.3em 0 0.6em !important;
|
||||
}
|
||||
& .but41_border{
|
||||
margin-bottom: 0.6em;
|
||||
padding: 0 0.5em;
|
||||
}
|
||||
& .ant-cascader-menu-item:hover {
|
||||
background: #f2f3ff;
|
||||
}
|
||||
|
@ -79,67 +81,3 @@
|
|||
.ant-select-dropdown-menu-item-active:not(.ant-select-dropdown-menu-item-disabled) {
|
||||
background-color: #f2f3ff;
|
||||
}
|
||||
.expert_modal .ant-modal-content {
|
||||
width: 550px;
|
||||
height: 318px;
|
||||
& .ant-modal-header {
|
||||
padding: 0.6em 2.1em;
|
||||
background: #f2f2ff;
|
||||
& .ant-modal-title {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
& .ant-modal-body {
|
||||
padding-left: 120px;
|
||||
& p {
|
||||
font-size: 16px;
|
||||
color: #666666;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
line-height: 2.9em;
|
||||
}
|
||||
& .weight_bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
& .warning::before {
|
||||
content: url("./image/warning.svg");
|
||||
width: 32px;
|
||||
position: relative;
|
||||
top: 11px;
|
||||
left: -15px;
|
||||
}
|
||||
}
|
||||
& .ant-btn {
|
||||
padding: 0 1.3em;
|
||||
height: 2.55em;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
color: #404660;
|
||||
border: 1px solid #e3e7ed;
|
||||
width: 7em;
|
||||
&:hover {
|
||||
background-color: #f8f8f8;
|
||||
border: 1px solid #e3e7ed;
|
||||
}
|
||||
&:active {
|
||||
background-color: #f3f3f3;
|
||||
border: 1px solid #e3e7ed;
|
||||
}
|
||||
}
|
||||
& .ant-btn.ant-btn-primary {
|
||||
color: white;
|
||||
background-color: #4154f1;
|
||||
margin-left: 2.5em;
|
||||
&:hover,
|
||||
&:active,
|
||||
&:focus {
|
||||
background-color: #5d6eff;
|
||||
}
|
||||
}
|
||||
& .ant-modal-footer {
|
||||
margin-top: 15px;
|
||||
}
|
||||
}
|
||||
.expert_modal.submit .ant-modal-body {
|
||||
padding-left: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ function RegisterList({ showNotification }) {
|
|||
dataIndex: 'professionalYears',
|
||||
},
|
||||
{
|
||||
title: '专业类别',
|
||||
title: '专家类别',
|
||||
dataIndex: 'expertType',
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1,13 +1,22 @@
|
|||
import React, { Component, useCallback } from "react";
|
||||
import { Tabs, Input, Select } from 'antd';
|
||||
import { unitType, reviewArea } from '../static.js';
|
||||
import React, { useState, useEffect, useMemo } from "react";
|
||||
import { Tabs, Input, Select, Button, Modal, Form } from 'antd';
|
||||
import { professionalType, reviewArea } from '../static.js';
|
||||
import { expertList } from "../api.js";
|
||||
import Paginationtable from "../../components/paginationTable";
|
||||
import './index.scss';
|
||||
import '../index.scss';
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
const { TabPane } = Tabs;
|
||||
const { Option } = Select;
|
||||
const { Search } = Input;
|
||||
|
||||
function SelectExpert() {
|
||||
function SelectExpert(props) {
|
||||
console.log('选择专家', props);
|
||||
const { form, location } = props;
|
||||
const { getFieldDecorator, setFieldsValue, getFieldsValue } = form;
|
||||
const { taskRecord } = location && location.state;
|
||||
console.log('信息',taskRecord);
|
||||
|
||||
// const TaskDetail = (
|
||||
// <div>
|
||||
|
@ -15,7 +24,143 @@ function SelectExpert() {
|
|||
// <p className="mt10">任务名称</p>
|
||||
// <p className="mt10 pb20">任务链接</p>
|
||||
// </div>
|
||||
// )
|
||||
// )
|
||||
const [reload, setReload] = useState();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [curPage, setCurPage] = useState(1);
|
||||
const [dataList, setDataList] = useState([]);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [pageSize, setPageSize] = useState(10);
|
||||
const [searchInput, setSearchInput] = useState('');
|
||||
const [expertType, setExpertType] = useState('');
|
||||
const [reviewAreaSel, setReviewAreaSel] = useState('');
|
||||
//是否支持多选
|
||||
const [selectExperts, setSelectExperts] = useState(false);
|
||||
//专家多选确认框
|
||||
const [okConfirmExps, setOkConfirmExps] = useState(false);
|
||||
//专家多选-选择个数
|
||||
const [selectExpertCount, setSelectExpertCount] = useState(0);
|
||||
//随机抽取专家确认框
|
||||
const [okConfirmExtract, setOkConfirmExtract] = useState(false);
|
||||
//批量删除专家
|
||||
const [deleteExperts, setDeleteExperts] = useState(false);
|
||||
|
||||
const columns = useMemo(() => {
|
||||
return [
|
||||
{
|
||||
title: '编号',
|
||||
dataIndex: 'index',
|
||||
width: 80,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '专家姓名',
|
||||
dataIndex: 'expertName',
|
||||
key: 'expertName',
|
||||
},
|
||||
{
|
||||
title: '手机号码',
|
||||
dataIndex: 'phone',
|
||||
width: 150,
|
||||
key: 'phone',
|
||||
},
|
||||
{
|
||||
title: '最高学历',
|
||||
dataIndex: 'highestDegree',
|
||||
key: 'highestDegree',
|
||||
},
|
||||
{
|
||||
title: '专业职称',
|
||||
dataIndex: 'professionalTitle',
|
||||
},
|
||||
{
|
||||
title: '专家类别',
|
||||
dataIndex: 'expertType',
|
||||
},
|
||||
{
|
||||
title: '评审领域',
|
||||
dataIndex: 'reviewAreas',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '专家评分',
|
||||
dataIndex: 'expertScore',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
width: 180,
|
||||
align: 'center',
|
||||
render: (text, record) => {
|
||||
return <React.Fragment>
|
||||
<Button className="mr5 font-12" type="primary" size="small" onClick={() => { check(record, '1') }}>专家详情</Button>
|
||||
<Button className="mr5 font-12" type="danger" size="small" onClick={() => { check(record, '2') }}>已添加</Button>
|
||||
</React.Fragment>
|
||||
}
|
||||
}
|
||||
];
|
||||
}, []);
|
||||
|
||||
const rowSelection = {
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
setSelectExpertCount(selectedRows.length);
|
||||
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows, selectedRows.length);
|
||||
},
|
||||
getCheckboxProps: record => ({
|
||||
name: record.name,
|
||||
}),
|
||||
};
|
||||
|
||||
// const SelectExpertsBus = (
|
||||
// <button className="but41_fill" onClick={() => setSelectExperts(false)}>取消</button>
|
||||
// )
|
||||
|
||||
// 获取列表
|
||||
useEffect(() => {
|
||||
setLoading(true);
|
||||
let params = {
|
||||
searchInput,
|
||||
expertType: expertType === 'all' ? '' : expertType,
|
||||
reviewArea: reviewAreaSel === 'all' ? '' : reviewAreaSel,
|
||||
pageSize,
|
||||
curPage,
|
||||
statusString: '1',
|
||||
};
|
||||
expertList(params).then(data => {
|
||||
if (data && Array.isArray(data.rows)) {
|
||||
let index = 1;
|
||||
for (const item of data.rows) {
|
||||
item.reviewAreas = `${item.reviewAreaOne} ${item.reviewAreaTwo && `、`} ${item.reviewAreaTwo} ${item.reviewAreaThree && `、`} ${item.reviewAreaThree} `;
|
||||
item.index = (index++) + (curPage > 1 ? (curPage - 1) * 10 : 0);
|
||||
}
|
||||
}
|
||||
setDataList(data.rows || []);
|
||||
setLoading(false);
|
||||
setTotal(data.total);
|
||||
});
|
||||
}, [curPage, reload, searchInput, expertType, reviewAreaSel]);
|
||||
|
||||
function check(record, checkStatus) {
|
||||
Modal.confirm({
|
||||
title: "警告",
|
||||
content: checkStatus == '1' ? "确认通过吗?通过后该用户将成为专家库的一员" : "确认拒绝吗?拒绝后该用户此次不能成为专家",
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
onOk() {
|
||||
registerCheck({
|
||||
expertId: record.id,
|
||||
isPassed: checkStatus,
|
||||
userId: record.userId,
|
||||
}).then(res => {
|
||||
if (res.message === 'success') {
|
||||
showNotification('操作成功!');
|
||||
setReload(Math.random());
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="centerbox select_expert">
|
||||
|
@ -24,47 +169,127 @@ function SelectExpert() {
|
|||
<TabPane tab="已选专家" key='0'>
|
||||
<div>
|
||||
<div className="box"></div>
|
||||
<p className="font-16">任务信息</p>
|
||||
<p className="mt10">任务名称</p>
|
||||
<p className="mt10 pb20">任务链接</p>
|
||||
<p className="font-16 pt15">任务信息</p>
|
||||
<p className="mt10">任务名称<span className="ml10">{taskRecord.name}</span></p>
|
||||
<p className="mt10 pb20">任务链接<Link className="taskLink ml10" target="_blank" to={`/task/taskDetail/${taskRecord.id}`} >{`/task/taskDetail/${taskRecord.id}`}</Link></p>
|
||||
</div>
|
||||
<div className="df mb20">
|
||||
<p className="font-16">已选取评审专家</p>
|
||||
<div>
|
||||
{!deleteExperts && <button className="but41_fill" onClick={() => setDeleteExperts(true)}>批量删除</button>}
|
||||
{deleteExperts && <button className="butE3_border" onClick={() => setDeleteExperts(false)}>取消</button>}
|
||||
{deleteExperts && <button className="but41_fill ml20" onClick={() => selectExpertCount !== 0 && setOkConfirmExps(true)}>添加</button>}
|
||||
<Modal
|
||||
title="批量添加"
|
||||
visible={okConfirmExps}
|
||||
onOk={() => { history.go(-1) }}
|
||||
onCancel={() => setOkConfirmExps(false)}
|
||||
wrapClassName="expert_modal"
|
||||
>
|
||||
<p className='weight_bold warning'>您确定要添加选中的{selectExpertCount}个专家吗?</p>
|
||||
<p className='ml30'>此操作将添加选中的{selectExpertCount}个专家,请进行确认</p>
|
||||
</Modal>
|
||||
</div>
|
||||
</div>
|
||||
<Paginationtable
|
||||
loading={loading}
|
||||
dataSource={dataList}
|
||||
columns={columns}
|
||||
total={total}
|
||||
setCurPage={setCurPage}
|
||||
current={curPage}
|
||||
rowSelection={selectExperts ? rowSelection : null}
|
||||
/>
|
||||
</TabPane>
|
||||
<TabPane tab="专家选取" key='1'>
|
||||
<div>
|
||||
<div className="box"></div>
|
||||
<p className="font-16">任务信息</p>
|
||||
<p className="mt10">任务名称</p>
|
||||
<p className="mt10 pb20">任务链接</p>
|
||||
<p className="font-16 pt15">任务信息</p>
|
||||
<p className="mt10">任务名称<span className="ml10">{taskRecord.name}</span></p>
|
||||
<p className="mt10 pb20">任务链接<Link className="taskLink ml10" target="_blank" to={`/task/taskDetail/${taskRecord.id}`} >{`/task/taskDetail/${taskRecord.id}`}</Link></p>
|
||||
</div>
|
||||
<div className="df">
|
||||
<p>添加评审专家</p>
|
||||
<div className="df mb20">
|
||||
<p className="font-16">添加评审专家</p>
|
||||
<div>
|
||||
<button className="but41_fill">批量添加</button>
|
||||
<button className="but41_fill">随机抽取</button>
|
||||
{!selectExperts && <button className="but41_fill" onClick={() => setSelectExperts(true)}>批量添加</button>}
|
||||
{selectExperts && <button className="butE3_border" onClick={() => setSelectExperts(false)}>取消</button>}
|
||||
{selectExperts && <button className="but41_fill ml20" onClick={() => selectExpertCount !== 0 && setOkConfirmExps(true)}>添加</button>}
|
||||
<button className="but41_fill ml20" onClick={() => setOkConfirmExtract(true)}>随机抽取</button>
|
||||
<Modal
|
||||
title="批量添加"
|
||||
visible={okConfirmExps}
|
||||
onOk={() => { history.go(-1) }}
|
||||
onCancel={() => setOkConfirmExps(false)}
|
||||
wrapClassName="expert_modal"
|
||||
>
|
||||
<p className='weight_bold warning'>您确定要添加选中的{selectExpertCount}个专家吗?</p>
|
||||
<p className='ml30'>此操作将添加选中的{selectExpertCount}个专家,请进行确认</p>
|
||||
</Modal>
|
||||
|
||||
<Modal
|
||||
title="随机抽取"
|
||||
visible={okConfirmExtract}
|
||||
onOk={() => { history.go(-1) }}
|
||||
onCancel={() => setOkConfirmExtract(false)}
|
||||
wrapClassName="expert_modal extract"
|
||||
>
|
||||
<span>请输入数量:</span><Input placeholder="请输入"></Input>
|
||||
</Modal>
|
||||
</div>
|
||||
</div>
|
||||
<div className="df">
|
||||
查询条件:<Input style={{ width: 220 }}></Input>
|
||||
专家类别:
|
||||
<Select placeholder="所有类别" style={{ width: 220 }}>
|
||||
<Option value='all'>所有类别</Option>
|
||||
{unitType.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>
|
||||
评审领域:
|
||||
<Select style={{ width: 220 }}>
|
||||
<Option value='all'>所有领域</Option>
|
||||
{reviewArea.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>
|
||||
<button className="but41_fill ml80">查询</button>
|
||||
<button className="butE3_border">清除</button>
|
||||
<div className="df search">
|
||||
<Form className="df">
|
||||
<Form.Item label="查询条件:">
|
||||
{getFieldDecorator('searchInput', {})(<Search
|
||||
maxLength={20}
|
||||
style={{ width: "200px" }}
|
||||
placeholder="请输入专家全名或手机号"
|
||||
onSearch={(value) => { setSearchInput(value); setCurPage(1); }}
|
||||
/>)}
|
||||
</Form.Item>
|
||||
<Form.Item label="专家类别:">
|
||||
{getFieldDecorator('expertType', {})(
|
||||
<Select placeholder="所有类别" style={{ width: 220 }} onChange={(value) => { setExpertType(value) }}>
|
||||
<Option value='all'>所有类别</Option>
|
||||
{professionalType.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>)}
|
||||
</Form.Item>
|
||||
<Form.Item label="评审领域:">
|
||||
{getFieldDecorator('reviewAreaSel', {})(
|
||||
<Select placeholder="所有领域" style={{ width: 220 }} onChange={value => setReviewAreaSel(value)}>
|
||||
<Option value='all'>所有领域</Option>
|
||||
{reviewArea.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>)}
|
||||
</Form.Item>
|
||||
</Form>
|
||||
<button className="butE3_border ml120 mb25" onClick={() => {
|
||||
setSearchInput('');
|
||||
setExpertType('');
|
||||
setReviewAreaSel('');
|
||||
setFieldsValue({
|
||||
searchInput: '',
|
||||
expertType: 'all',
|
||||
reviewAreaSel: 'all'
|
||||
});}}>清除</button>
|
||||
</div>
|
||||
<Paginationtable
|
||||
loading={loading}
|
||||
dataSource={dataList}
|
||||
columns={columns}
|
||||
total={total}
|
||||
setCurPage={setCurPage}
|
||||
current={curPage}
|
||||
// rowSelection={selectExperts ? rowSelection : null}
|
||||
rowSelection={ rowSelection}
|
||||
expandedRowRender={record => <p style={{ margin: 0 }}>{record.graduatedFrom}</p>}
|
||||
expandIconColumnIndex={10}
|
||||
/>
|
||||
</TabPane>
|
||||
|
||||
</Tabs>
|
||||
</div>)
|
||||
}
|
||||
export default SelectExpert;
|
||||
export default Form.create()(SelectExpert);
|
|
@ -1,4 +1,6 @@
|
|||
.centerbox.select_expert{
|
||||
margin: -10px auto;
|
||||
padding-top: 16px;
|
||||
background: white;
|
||||
.title_one, .ant-tabs-nav-wrap, .ant-tabs .ant-tabs-top-content{
|
||||
padding: 0 2em;
|
||||
|
@ -12,5 +14,39 @@
|
|||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
&.ant-form{
|
||||
width: 78vw;
|
||||
}
|
||||
}
|
||||
.search{
|
||||
.ant-form-item{
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
.ant-pagination{
|
||||
text-align: right;
|
||||
margin: 20px 0;
|
||||
}
|
||||
.ant-table-thead > tr > th, .ant-table-tbody > tr > td{
|
||||
padding: 16px 0 16px 10px;
|
||||
}
|
||||
.ml120{
|
||||
margin-left: 120px;
|
||||
width: 6em;
|
||||
}
|
||||
.taskLink{color:#4154F1}
|
||||
}
|
||||
.expert_modal.extract{
|
||||
.ant-modal-content {
|
||||
width: 387px;
|
||||
height: 230px;
|
||||
.ant-modal-body {
|
||||
padding: 3.5vh 2.1em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.ant-input{
|
||||
width: 12vw;
|
||||
}
|
||||
}
|
|
@ -242,7 +242,7 @@ export default Form.create()(({ form, showNotification, match, history }) => {
|
|||
title: '专家选取',
|
||||
dataIndex: 'expertSelectedCount',
|
||||
render: (text, record) => {
|
||||
return record.expertReview ? '' : <Link className="line_1 primary-link" to='/expert/admin/task/review/select'>选择</Link>
|
||||
return record.expertReview ? '' : <Link className="line_1 primary-link" to={{ pathname: '/expert/admin/task/review/select', state: { 'taskRecord': record } }}>选择</Link>
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue