修改issue

This commit is contained in:
何童崇 2021-12-31 13:12:48 +08:00
parent 6fe3928a6e
commit 1ca9f66c27
7 changed files with 274 additions and 197 deletions

View File

@ -3,7 +3,7 @@ import { Upload, Button } from 'antd';
import { appendFileSizeToUploadFileAll } from 'educoder';
import { httpUrl } from '../fetch';
function Uploads({ className, size, actionUrl, fileList, showNotification, load, accept, disabled }) {
function Uploads({ className, size, actionUrl, fileList, showNotification, load, accept, disabled,count }) {
const [files, setFiles] = useState(undefined);
useEffect(() => {
@ -49,6 +49,9 @@ function Uploads({ className, size, actionUrl, fileList, showNotification, load,
function handleChange(info) {
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let fileList = info.fileList;
if(count){
fileList = fileList.slice(-count);
}
setFiles(appendFileSizeToUploadFileAll(fileList));
if (info.file.response) {
for (let i = 0; i < fileList.length; i++) {

View File

@ -10,6 +10,7 @@ import { httpUrl } from '../fetch';
import './index.scss';
import '../index.scss';
import { Link } from "react-router-dom";
const { Search } = Input;
const Option = Select.Option;
@ -30,11 +31,11 @@ function RegisterList({ showNotification }) {
const [download, setDownload] = useState();
const [downloading, setDownloading] = useState(false);
function onShowSizeChange(current, pageSize){
function onShowSizeChange(current, pageSize) {
setCurPage(current);
setPageSize(pageSize);
}
console.log(pageSize);
const columns = useMemo(() => {
return [{
@ -132,27 +133,49 @@ function RegisterList({ showNotification }) {
title: '银行账号',
dataIndex: 'bankAccount',
},
// {
// title: '',
// dataIndex: 'resume',
// width:200
// },
// {
// title: '',
// dataIndex: 'titleCertificate',
// },
// {
// title: '',
// dataIndex: 'academicAchievements',
// },
// {
// title: '',
// dataIndex: 'honors',
// },
{
title: '个人简介',
dataIndex: 'resumeAttachments',
render: (text, record) => {
return text && text.map(item => {
return <a className="link" onClick={()=>{downFile(item.id)}}>{item.fileName}</a>
})
}
},
{
title: '职称证明',
dataIndex: 'titleCertificateAttachments',
render: (text, record) => {
return text && text.map(item => {
return <a className="link" onClick={()=>{downFile(item.id)}}>{item.fileName}</a>
})
}
},
{
title: '学术成果',
dataIndex: 'academicAchievementsAttachments',
render: (text, record) => {
return text && text.map(item => {
return <a className="link" onClick={()=>{downFile(item.id)}}>{item.fileName}</a>
})
}
},
{
title: '荣誉称号',
dataIndex: 'honorsAttachments',
render: (text, record) => {
return text && text.map(item => {
return <a className="link" onClick={()=>{downFile(item.id)}}>{item.fileName}</a>
})
}
},
];
}, []);
function downFile(id) {
let url = httpUrl + '/busiAttachments/download/' + id;
window.open(url);
}
//
useEffect(() => {
@ -317,7 +340,7 @@ function RegisterList({ showNotification }) {
total={total}
setCurPage={setCurPage}
current={curPage}
scroll={{ x: 2300 }}
scroll={{ x: 2700 }}
onShowSizeChange={onShowSizeChange}
showSizeChanger
/>

View File

@ -18,8 +18,8 @@ const ReviewTasks = Loadable({
})
const ExpertUser = (props) => {
const functional = props.match.params.functional;
const ExpertUser = (propsF) => {
const functional = propsF.match.params.functional;
return (
<div className="centerbox detail">
<div className="navigation">
@ -32,19 +32,19 @@ const ExpertUser = (props) => {
<Link to="/expert/user/register" className={`${functional === 'register' && 'active'}`}>登记专家资料</Link>
<Link to="/expert/user/tasks" className={`${functional === 'tasks' && 'active'}`}>我的评审任务</Link>
</div>
<Switch {...props}>
<Switch {...propsF}>
<Route
path="/expert/user/register"
render={(props) => (
<Register {...props} />
<Register {...props} {...propsF}/>
)}
></Route>
<Route
path="/expert/user/tasks"
render={(props) => (
<ReviewTasks {...props} />
<ReviewTasks {...props} {...propsF}/>
)}
></Route>

View File

@ -39,7 +39,6 @@
}
.register_right {
flex: auto;
background-color: white;
margin-left: 2em;
}
}

View File

@ -61,6 +61,10 @@ export default Form.create()(({ match, history, showNotification, form, current_
workplaceType: lastRegister.workplaceType || "",
}
setReviewAreaOne(lastRegister.reviewAreaOne);
setReviewAreaTwo(lastRegister.reviewAreaTwo);
setReviewAreaThree(lastRegister.reviewAreaThree);
setFieldsValue(params);
setExpertRegisterValues(params);
setLastRegister(lastRegister);
@ -180,7 +184,7 @@ export default Form.create()(({ match, history, showNotification, form, current_
titleCertificate: titleCertIds,
academicAchievements: achievementIds,
honors: honorIds,
userId: current_user.user_id,
userId: current_user && current_user.user_id,
status: -1,
};
@ -247,6 +251,7 @@ export default Form.create()(({ match, history, showNotification, form, current_
{
lastRegister && lastRegister.status === 2 && <p className='fail'>
您提交的资料已被拒绝请完善资料后重新提交
{lastRegister.reviewerAdvice&&<span className='advance'>拒绝原因{lastRegister.reviewerAdvice}</span>}
</p>
}
{
@ -257,10 +262,10 @@ export default Form.create()(({ match, history, showNotification, form, current_
{
(!lastRegister || (lastRegister && lastRegister.status === 3)) && <p>专家资料</p>
}
<Form>
<div className='expert_Register_form'>
{/* <div className='expert_Register_form'> */}
{
helper('姓名',
'expertName',
@ -271,6 +276,17 @@ export default Form.create()(({ match, history, showNotification, form, current_
disabled={forbidden}
/>
)
}
{
helper('最高学历',
'highestDegree',
[{ required: true, message: '请选择最高学历' }],
<Select disabled={forbidden} placeholder="请选择" dropdownClassName="expert_register">
{highestEducation.map(item => {
return <Option key={item.value} value={item.value}>{item.label}</Option>
})}
</Select>
)
}
{
helper('手机号码',
@ -291,6 +307,16 @@ export default Form.create()(({ match, history, showNotification, form, current_
disabled={forbidden}
/>
)
}
{
helper('工作单位',
'workplace',
[{ required: true, message: "工作单位不能为空" }],
<Input
placeholder="请输入您的工作单位"
disabled={forbidden}
/>
)
}
{
helper('单位类别',
@ -302,6 +328,17 @@ export default Form.create()(({ match, history, showNotification, form, current_
})}
</Select>
)
}
{
helper('工作性质',
'workNature',
[{ required: true, message: "请选择工作性质" }],
<Select disabled={forbidden} placeholder="请选择" dropdownClassName="expert_register">
{natureOfWork.map(item => {
return <Option key={item.value} value={item.value}>{item.label}</Option>
})}
</Select>
)
}
{
helper('专业职称',
@ -314,124 +351,6 @@ export default Form.create()(({ match, history, showNotification, form, current_
/>
)
}
{
helper('专家类别',
'expertType',
[{ required: true, message: "请选择专家类别" }],
<Select disabled={forbidden} placeholder="请选择" dropdownClassName="expert_register">
{professionalType.map(item => {
return <Option key={item.value} value={item.value}>{item.label}</Option>
})}
</Select>
)
}
{
helper('评审领域2',
'reviewAreaTwo', [],
<Select
disabled={forbidden}
placeholder="请选择"
dropdownClassName="expert_register"
onChange={(value) => { setReviewAreaTwo(value) }}
>
{reviewArea.map(item => {
return <Option key={item.value} value={item.value}
disabled={item.value === reviewAreaOne || item.value === reviewAreaThree}
>{item.label}</Option>
})}
</Select>
)
}
{
helper('毕业院校',
'graduatedFrom', [{ max: 50, message: '长度不能超过50个字符' }],
<Input
placeholder="请输入您的毕业院校"
disabled={forbidden}
/>
)
}
{
helper('身份证号',
'idNumber', [{
validator: (rule, val, callback) => {
let _IDRe18 = /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
let _IDre15 = /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/
//
if (_IDRe18.test(val) || _IDre15.test(val)) {
callback();
} else {
callback('请输入正确的身份证号码!');
}
}
}],
<Input
placeholder="请输入您的身份证号码"
disabled={forbidden}
/>
)
}
{
helper('开户银行',
'bankName', [{ max: 50, message: '长度不能超过50个字符' }],
<Input
placeholder="请输入您的开户银行"
disabled={forbidden}
/>
)
}
<Form.Item className="upload-form" label="个人简介">
<Upload
load={uploadResume}
size={100}
showNotification={showNotification}
fileList={resumeList}
disabled={forbidden}
/>
</Form.Item>
<Form.Item className="upload-form" label="学术成果">
<Upload
load={uploadAchievement}
size={100}
showNotification={showNotification}
fileList={achievementList}
disabled={forbidden}
/>
</Form.Item>
</div>
<div className='expert_Register_form ml80'>
{
helper('最高学历',
'highestDegree',
[{ required: true, message: '请选择最高学历' }],
<Select disabled={forbidden} 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="请输入您的工作单位"
disabled={forbidden}
/>
)
}
{
helper('工作性质',
'workNature',
[{ required: true, message: "请选择工作性质" }],
<Select disabled={forbidden} placeholder="请选择" dropdownClassName="expert_register">
{natureOfWork.map(item => {
return <Option key={item.value} value={item.value}>{item.label}</Option>
})}
</Select>
)
}
{
helper('职称职级',
'titleRank',
@ -443,6 +362,17 @@ export default Form.create()(({ match, history, showNotification, form, current_
</Select>
)
}
{
helper('专家类别',
'expertType',
[{ required: true, message: "请选择专家类别" }],
<Select disabled={forbidden} placeholder="请选择" dropdownClassName="expert_register">
{professionalType.map(item => {
return <Option key={item.value} value={item.value}>{item.label}</Option>
})}
</Select>
)
}
{
helper('评审领域1',
'reviewAreaOne',
@ -462,6 +392,23 @@ export default Form.create()(({ match, history, showNotification, form, current_
)
}
{
helper('评审领域2',
'reviewAreaTwo', [],
<Select
disabled={forbidden}
placeholder="请选择"
dropdownClassName="expert_register"
onChange={(value) => { setReviewAreaTwo(value) }}
>
{reviewArea.map(item => {
return <Option key={item.value} value={item.value}
disabled={item.value === reviewAreaOne || item.value === reviewAreaThree}
>{item.label}</Option>
})}
</Select>
)
}
{
helper('评审领域3',
'reviewAreaThree', [],
<Select
@ -478,6 +425,15 @@ export default Form.create()(({ match, history, showNotification, form, current_
</Select>
)
}
{
helper('毕业院校',
'graduatedFrom', [{ max: 50, message: '长度不能超过50个字符' }],
<Input
placeholder="请输入您的毕业院校"
disabled={forbidden}
/>
)
}
{
helper('院校专业',
'major', [{ max: 50, message: '长度不能超过50个字符' }],
@ -488,10 +444,39 @@ export default Form.create()(({ match, history, showNotification, form, current_
)
}
{
helper('身份证号',
'idNumber', [{
validator: (rule, val, callback) => {
let _IDRe18 = /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
let _IDre15 = /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/
//
if(!val){
callback();
return
}
if (_IDRe18.test(val) || _IDre15.test(val)) {
callback();
}
else {
callback('请输入正确的身份证号码!');
}
}
}],
<Input
placeholder="请输入您的身份证号码"
disabled={forbidden}
/>
)
}
{
helper('邮箱地址',
'expertEmail', [{
validator: (rule, val, callback) => {
const pattern = /^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
if(!val){
callback();
return;
}
if (pattern.test(val)) {
callback();
} else {
@ -505,6 +490,15 @@ export default Form.create()(({ match, history, showNotification, form, current_
/>
)
}
{
helper('开户银行',
'bankName', [{ max: 50, message: '长度不能超过50个字符' }],
<Input
placeholder="请输入您的开户银行"
disabled={forbidden}
/>
)
}
{
helper('银行账号',
'bankAccount', [{ max: 50, message: '长度不能超过50个字符' }],
@ -514,6 +508,17 @@ export default Form.create()(({ match, history, showNotification, form, current_
/>
)
}
<div className='hint'>提示个人简介职称证明学术成果荣誉称号都只能上传一个文件建议上传zip或rar格式的压缩文件</div>
<Form.Item className="upload-form" label="个人简介">
<Upload
load={uploadResume}
size={100}
showNotification={showNotification}
fileList={resumeList}
disabled={forbidden}
count={1}
/>
</Form.Item>
<Form.Item className="upload-form" label="职称证明">
<Upload
load={uploadTitleCert}
@ -521,6 +526,17 @@ export default Form.create()(({ match, history, showNotification, form, current_
showNotification={showNotification}
fileList={titleCertList}
disabled={forbidden}
count={1}
/>
</Form.Item>
<Form.Item className="upload-form" label="学术成果">
<Upload
load={uploadAchievement}
size={100}
showNotification={showNotification}
fileList={achievementList}
disabled={forbidden}
count={1}
/>
</Form.Item>
<Form.Item className="upload-form" label="荣誉称号">
@ -530,9 +546,10 @@ export default Form.create()(({ match, history, showNotification, form, current_
showNotification={showNotification}
fileList={honorList}
disabled={forbidden}
count={1}
/>
</Form.Item>
</div>
{/* </div> */}
</Form>
<div className='buts'>
{/* <button className="but41_fill mr20" disabled={forbidden} onClick={() => expertRegisterSubmit(true)}></button>

View File

@ -9,15 +9,19 @@
}
.register_right {
flex: auto;
background-color: white;
margin-left: 2em;
& > p {
border-bottom: 1px solid #eeeeee;
padding: 0.5em 2em;
color: #181818;
font-size: 0.8em;
font-weight: bold;
}
p {
border-bottom: 1px solid #eeeeee;
padding: 0.5em 2em;
color: #181818;
font-size: 0.8em;
font-weight: bold;
margin-bottom: 1em !important;
background: white;
.advance{
margin-left: 2em;
}
}
.fail {
background: #ffefef;
@ -36,17 +40,28 @@
color: green;
}
.ant-form {
display: flex;
padding: 1em 2em 1.5em;
// display: flex;
// padding: 1em 2em 1.5em;
background-color: white;
}
.expert_Register_form {
width: 43.5%;
&.ml80 {
margin-left: 120px;
}
.ant-form-item {
display: flex;
}
.ant-form-item{
display: inline-block;
width: 44%;
margin:0 2.5% 1em 2.5%;
}
.hint{
margin:0 3% 1em 4%;
}
// .expert_Register_form {
// width: 43.5%;
// &.ml80 {
// margin-left: 120px;
// }
.upload-form{
display: inline-flex;
align-items: flex-start;
}
.ant-form-item-label {
width: 6em;
line-height: 2.8em;
@ -69,31 +84,22 @@
border: 1px solid #4154f1 !important;
}
}
tr td:first-child .ant-row.ant-form-item {
margin-right: 9em;
}
& .ant-input,
.ant-input,
.ant-input .ant-input-suffix {
background-color: #ffffff !important;
}
& .ant-select-open .ant-select-selection {
.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 {
.but41_border {
margin-bottom: 0.6em;
padding: 0 0.5em;
}
& .ant-cascader-menu-item:hover {
.ant-cascader-menu-item:hover {
background: #f2f3ff;
}
}
& .buts {
// }
.buts {
font-size: 0.7em;
padding: 1.5em 2em;
background-color: #f5f5f5;

View File

@ -3,6 +3,7 @@ import { Input, Select, Button, Form, Modal } from 'antd';
import Paginationtable from "../../components/paginationTable";
import { Confirm } from '../../components/ModalFun';
import { expertList, registerCheck } from "../api";
import { httpUrl } from '../fetch';
import './index.scss';
const { Search, TextArea } = Input;
@ -115,19 +116,42 @@ function RegisterList({ showNotification, form }) {
title: '银行账号',
dataIndex: 'bankAccount',
},
// {
// title: '',
// dataIndex: 'titleCertificate',
// },
// {
// title: '',
// dataIndex: 'academicAchievements',
// },
// {
// title: '',
// dataIndex: 'honors',
// },
{
title: '个人简介',
dataIndex: 'resumeAttachments',
render: (text, record) => {
return text && text.map(item => {
return <a className="link" onClick={()=>{downFile(item.id)}}>{item.fileName}</a>
})
}
},
{
title: '职称证明',
dataIndex: 'titleCertificateAttachments',
render: (text, record) => {
return text && text.map(item => {
return <a className="link" onClick={()=>{downFile(item.id)}}>{item.fileName}</a>
})
}
},
{
title: '学术成果',
dataIndex: 'academicAchievementsAttachments',
render: (text, record) => {
return text && text.map(item => {
return <a className="link" onClick={()=>{downFile(item.id)}}>{item.fileName}</a>
})
}
},
{
title: '荣誉称号',
dataIndex: 'honorsAttachments',
render: (text, record) => {
return text && text.map(item => {
return <a className="link" onClick={()=>{downFile(item.id)}}>{item.fileName}</a>
})
}
},
{
title: '操作',
dataIndex: 'action',
@ -143,6 +167,11 @@ function RegisterList({ showNotification, form }) {
];
}, []);
function downFile(id) {
let url = httpUrl + '/busiAttachments/download/' + id;
window.open(url);
}
function onShowSizeChange(current, pageSize){
setCurPage(current);
setPageSize(pageSize);
@ -243,7 +272,7 @@ function RegisterList({ showNotification, form }) {
total={total}
setCurPage={setCurPage}
current={curPage}
scroll={{ x: 2300 }}
scroll={{ x: 2700 }}
onShowSizeChange={onShowSizeChange}
showSizeChanger
/>