forked from Gitlink/forgeplus-react
Merge branch 'dev_military_osredm' of http://106.75.45.236:3000/tongChong/forgeplus-react into expert_review
This commit is contained in:
commit
1082b4af1e
|
@ -154,7 +154,7 @@ module.exports = {
|
|||
{
|
||||
libraryName: "antd",
|
||||
libraryDirectory: "es",
|
||||
style: "css",
|
||||
style: true,
|
||||
},
|
||||
],
|
||||
],
|
||||
|
@ -212,6 +212,23 @@ module.exports = {
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.less$/,
|
||||
use: [{
|
||||
loader: 'style-loader',
|
||||
}, {
|
||||
loader: 'css-loader', // translates CSS into CommonJS
|
||||
}, {
|
||||
loader: 'less-loader', // compiles Less to CSS
|
||||
options: {
|
||||
modifyVars: {
|
||||
'primary-color': '#4154f1',
|
||||
'link-color': '#4154f1',
|
||||
},
|
||||
javascriptEnabled: true,
|
||||
},
|
||||
}]
|
||||
},
|
||||
// "file" loader makes sure those assets get served by WebpackDevServer.
|
||||
// When you `import` an asset, you get its (virtual) filename.
|
||||
// In production, they would get copied to the `build` folder.
|
||||
|
|
|
@ -148,7 +148,7 @@ module.exports = {
|
|||
{
|
||||
libraryName: "antd",
|
||||
libraryDirectory: "es",
|
||||
style: "css",
|
||||
style: true,
|
||||
},
|
||||
],
|
||||
],
|
||||
|
@ -211,6 +211,23 @@ module.exports = {
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.less$/,
|
||||
use: [{
|
||||
loader: 'style-loader',
|
||||
}, {
|
||||
loader: 'css-loader', // translates CSS into CommonJS
|
||||
}, {
|
||||
loader: 'less-loader', // compiles Less to CSS
|
||||
options: {
|
||||
modifyVars: {
|
||||
'primary-color': '#4154f1',
|
||||
'link-color': '#4154f1',
|
||||
},
|
||||
javascriptEnabled: true,
|
||||
},
|
||||
}]
|
||||
},
|
||||
// "file" loader makes sure assets end up in the `build` folder.
|
||||
// When you `import` an asset, you get its filename.
|
||||
// This loader doesn't use a "test" so it will catch all modules
|
||||
|
|
|
@ -198,6 +198,8 @@
|
|||
"concat": "^1.0.3",
|
||||
"cross-env": "^7.0.3",
|
||||
"happypack": "^5.0.1",
|
||||
"less": "^3.9.0",
|
||||
"less-loader": "^4.1.0",
|
||||
"mockjs": "^1.1.0",
|
||||
"node-sass": "^4.12.0",
|
||||
"optimize-css-assets-webpack-plugin": "^5.0.3",
|
||||
|
|
|
@ -82,7 +82,7 @@ export function getExpertTasks(params) {
|
|||
});
|
||||
}
|
||||
|
||||
// 查看单个竞赛/任务的评分细则
|
||||
// 查看竞赛/任务的评分细则
|
||||
export function getScoringDetails(params) {
|
||||
return fetch({
|
||||
url: `/api/expertScoringDetails/getExpertScoringDetailsList`,
|
||||
|
@ -91,6 +91,15 @@ export function getScoringDetails(params) {
|
|||
});
|
||||
}
|
||||
|
||||
// 查看单个竞赛/任务的所有评分细则
|
||||
export function getOpsScoringDetails(params) {
|
||||
return fetch({
|
||||
url: `/api/expertScoringDetails/getOpsExpertScoringDetailsList`,
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化评分细则
|
||||
export function initScoringDetails(data){
|
||||
return fetch({
|
||||
|
|
|
@ -64,7 +64,6 @@ function RegisterList({ showNotification }) {
|
|||
dataIndex: 'workplace',
|
||||
key: 'workplace',
|
||||
// width: 250,
|
||||
|
||||
},
|
||||
{
|
||||
title: '单位类别',
|
||||
|
@ -82,7 +81,7 @@ function RegisterList({ showNotification }) {
|
|||
title: '专业职称',
|
||||
dataIndex: 'professionalTitle',
|
||||
key: 'professionalTitle',
|
||||
width: 100,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '职称职级',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useEffect, useState, useCallback } from 'react';
|
||||
import { Button, Icon, Form, Modal, Input, Select } from 'antd';
|
||||
import { Button, Icon, Form, Modal, Input, Select, message } from 'antd';
|
||||
import Upload from '../../components/Upload';
|
||||
import { unitType, natureOfWork, highestEducation, positionLevel, professionalType, reviewArea } from '../../static';
|
||||
import { expertRegister, getCurrentExpert, getFile, expertUpdate } from '../../api';
|
||||
|
@ -39,7 +39,10 @@ export default Form.create()(({ match, history, showNotification, form, current_
|
|||
let params = {};
|
||||
getCurrentExpert(params).then(async res => {
|
||||
if (res && res.data && res.data.length) {
|
||||
let lastRegister = res.data.pop();
|
||||
let lastRegister = res.data[0];
|
||||
if (res.data.length > 1 && res.data[0].status === 1) {
|
||||
lastRegister = res.data[1];
|
||||
}
|
||||
let params = {
|
||||
bankAccount: lastRegister.bankAccount || "",
|
||||
bankName: lastRegister.bankName || "",
|
||||
|
@ -72,27 +75,23 @@ export default Form.create()(({ match, history, showNotification, form, current_
|
|||
|
||||
// 回写文件
|
||||
if (lastRegister.resume) {
|
||||
let resume = await getFiles(lastRegister.resume);
|
||||
setResumeList(resume);
|
||||
setResumeList(lastRegister.resumeAttachments);
|
||||
setResumeIds(lastRegister.resume);
|
||||
|
||||
}
|
||||
|
||||
if (lastRegister.titleCertificate) {
|
||||
let titleCertificate = await getFiles(lastRegister.titleCertificate);
|
||||
setTitleCertList(titleCertificate);
|
||||
setTitleCertList(lastRegister.titleCertificateAttachments);
|
||||
setTitleCertIds(lastRegister.titleCertificate);
|
||||
}
|
||||
|
||||
if (lastRegister.academicAchievements) {
|
||||
let academicAchievements = await getFiles(lastRegister.academicAchievements);
|
||||
console.log(academicAchievements);
|
||||
setAchievementList(academicAchievements);
|
||||
setAchievementList(lastRegister.academicAchievementsAttachments);
|
||||
setAchievementIds(lastRegister.academicAchievements);
|
||||
}
|
||||
|
||||
if (lastRegister.honors) {
|
||||
let honors = await getFiles(lastRegister.honors);
|
||||
setHonorList(honors);
|
||||
setHonorList(lastRegister.honorsAttachments);
|
||||
setHonorIds(lastRegister.honors);
|
||||
}
|
||||
} else {
|
||||
|
@ -234,11 +233,11 @@ export default Form.create()(({ match, history, showNotification, form, current_
|
|||
|
||||
function dealBack(res) {
|
||||
if (res && res.message && (res.message.indexOf("成功") > -1 || res.message.indexOf("更新") > -1)) {
|
||||
showNotification("操作成功");
|
||||
message.success("保存成功")
|
||||
setSubmitConfirmValue(false);
|
||||
setReload(Math.random());
|
||||
} else {
|
||||
showNotification(res && res.message || "操作失败");
|
||||
message.error(res && res.message || "保存失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -255,327 +254,324 @@ export default Form.create()(({ match, history, showNotification, form, current_
|
|||
<div className='register_right'>
|
||||
{
|
||||
lastRegister && lastRegister.status === -1 && <p className='advance checking'>
|
||||
您的资料正在审核,请耐心等待!
|
||||
<i className="iconfont icon-shijianicon font-15 mr10 ver-middle"></i>您的资料正在审核,请耐心等待!
|
||||
</p>
|
||||
}
|
||||
{
|
||||
lastRegister && lastRegister.status === 2 && <p className='advance fail'>
|
||||
您提交的资料已被拒绝,请完善资料后重新提交
|
||||
{lastRegister.reviewerAdvice&&<div >拒绝原因:{lastRegister.reviewerAdvice}</div>}
|
||||
<i className="iconfont icon-sousuo_shanchuicon font-15 mr10 ver-middle"></i>您提交的资料已被拒绝,请完善资料后重新提交
|
||||
{lastRegister.reviewerAdvice && <div className='ml25'>拒绝原因:{lastRegister.reviewerAdvice}</div>}
|
||||
</p>
|
||||
}
|
||||
{
|
||||
lastRegister && lastRegister.status === 1 && <p className='advance succeed'>
|
||||
您的资料已审核通过,已成为专家!若修改资料,修改后需要管理员重新审核,审核过程中不会影响您的专家身份
|
||||
<i className="iconfont icon-duigou font-15 mr10 ver-middle"></i>您的资料已审核通过,已成为专家!若修改资料,修改后需要管理员重新审核,审核过程中不会影响您的专家身份
|
||||
</p>
|
||||
}
|
||||
|
||||
<div className='user-title'>专家资料</div>
|
||||
<Form>
|
||||
{
|
||||
helper('姓名',
|
||||
'expertName',
|
||||
[{ required: true, message: "姓名不能为空" },
|
||||
{ max: 20, message: '长度不能超过20个字符' }],
|
||||
<Input
|
||||
placeholder="请输入您的姓名"
|
||||
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('手机号码',
|
||||
'phone',
|
||||
[{ required: true, message: "手机号码不能为空" },
|
||||
{
|
||||
validator: (rule, val, callback) => {
|
||||
const pattern = /^((\+)?86|((\+)?86)?)0?1[3456789]\d{9}$/;
|
||||
if (pattern.test(val)) {
|
||||
callback();
|
||||
} else {
|
||||
callback('请输入正确的手机号码!');
|
||||
}
|
||||
|
||||
<div className='user-title'>专家资料</div>
|
||||
<Form className='register-form'>
|
||||
{
|
||||
helper('姓名',
|
||||
'expertName',
|
||||
[{ required: true, message: "姓名不能为空" },
|
||||
{ max: 20, message: '长度不能超过20个字符' }],
|
||||
<Input
|
||||
placeholder="请输入您的姓名"
|
||||
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('手机号码',
|
||||
'phone',
|
||||
[{ required: true, message: "手机号码不能为空" },
|
||||
{
|
||||
validator: (rule, val, callback) => {
|
||||
const pattern = /^((\+)?86|((\+)?86)?)0?1[3456789]\d{9}$/;
|
||||
if (pattern.test(val)) {
|
||||
callback();
|
||||
} else {
|
||||
callback('请输入正确的手机号码!');
|
||||
}
|
||||
}],
|
||||
<Input
|
||||
placeholder="请输入您的手机号码"
|
||||
disabled={forbidden}
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('工作单位',
|
||||
'workplace',
|
||||
[{ required: true, message: "工作单位不能为空" },
|
||||
{ max: 50, message: '长度不能超过50个字符' }
|
||||
}
|
||||
}],
|
||||
<Input
|
||||
placeholder="请输入您的手机号码"
|
||||
disabled={forbidden}
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('工作单位',
|
||||
'workplace',
|
||||
[{ required: true, message: "工作单位不能为空" },
|
||||
{ max: 50, message: '长度不能超过50个字符' }
|
||||
],
|
||||
<Input
|
||||
placeholder="请输入您的工作单位"
|
||||
disabled={forbidden}
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('单位类别',
|
||||
'workplaceType',
|
||||
[{ required: true, message: "请选择单位类别" }],
|
||||
<Select disabled={forbidden} placeholder="请选择" dropdownClassName="expert_register">
|
||||
{unitType.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</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('专业职称',
|
||||
'professionalTitle',
|
||||
[{ required: true, message: "专业职称不能为空" },
|
||||
{ max: 50, message: '长度不能超过50个字符' }],
|
||||
<Input
|
||||
placeholder="请输入您的专业职称"
|
||||
disabled={forbidden}
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('职称职级',
|
||||
'titleRank',
|
||||
[{ required: true, message: "请选择职称职级" }],
|
||||
<Select disabled={forbidden} placeholder="请选择" dropdownClassName="expert_register">
|
||||
{positionLevel.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</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',
|
||||
[{ required: true, message: "请选择评审领域" }],
|
||||
<Select
|
||||
disabled={forbidden}
|
||||
placeholder="请选择"
|
||||
dropdownClassName="expert_register"
|
||||
onChange={(value) => { setReviewAreaOne(value) }}
|
||||
>
|
||||
{reviewArea.map(item => {
|
||||
return <Option key={item.value} value={item.value}
|
||||
disabled={item.value === reviewAreaTwo || item.value === reviewAreaThree}
|
||||
>{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('评审领域3',
|
||||
'reviewAreaThree', [],
|
||||
<Select
|
||||
disabled={forbidden}
|
||||
placeholder="请选择"
|
||||
dropdownClassName="expert_register"
|
||||
onChange={(value) => { setReviewAreaThree(value) }}
|
||||
>
|
||||
{reviewArea.map(item => {
|
||||
return <Option key={item.value} value={item.value}
|
||||
disabled={item.value === reviewAreaTwo || item.value === reviewAreaOne}
|
||||
>{item.label}</Option>
|
||||
})}
|
||||
</Select>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('毕业院校',
|
||||
'graduatedFrom', [{ max: 50, message: '长度不能超过50个字符' }],
|
||||
<Input
|
||||
placeholder="请输入您的毕业院校"
|
||||
disabled={forbidden}
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('院校专业',
|
||||
'major', [{ 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(!val){
|
||||
callback();
|
||||
return
|
||||
}
|
||||
if (_IDRe18.test(val) || _IDre15.test(val)) {
|
||||
callback();
|
||||
}
|
||||
else {
|
||||
callback('请输入正确的身份证号码!');
|
||||
}
|
||||
<Input
|
||||
placeholder="请输入您的工作单位"
|
||||
disabled={forbidden}
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('单位类别',
|
||||
'workplaceType',
|
||||
[{ required: true, message: "请选择单位类别" }],
|
||||
<Select disabled={forbidden} placeholder="请选择" dropdownClassName="expert_register">
|
||||
{unitType.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</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('专业职称',
|
||||
'professionalTitle',
|
||||
[{ required: true, message: "专业职称不能为空" },
|
||||
{ max: 50, message: '长度不能超过50个字符' }],
|
||||
<Input
|
||||
placeholder="请输入您的专业职称"
|
||||
disabled={forbidden}
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('职称职级',
|
||||
'titleRank',
|
||||
[{ required: true, message: "请选择职称职级" }],
|
||||
<Select disabled={forbidden} placeholder="请选择" dropdownClassName="expert_register">
|
||||
{positionLevel.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</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',
|
||||
[{ required: true, message: "请选择评审领域" }],
|
||||
<Select
|
||||
disabled={forbidden}
|
||||
placeholder="请选择"
|
||||
dropdownClassName="expert_register"
|
||||
onChange={(value) => { setReviewAreaOne(value) }}
|
||||
>
|
||||
{reviewArea.map(item => {
|
||||
return <Option key={item.value} value={item.value}
|
||||
disabled={item.value === reviewAreaTwo || item.value === reviewAreaThree}
|
||||
>{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('评审领域3',
|
||||
'reviewAreaThree', [],
|
||||
<Select
|
||||
disabled={forbidden}
|
||||
placeholder="请选择"
|
||||
dropdownClassName="expert_register"
|
||||
onChange={(value) => { setReviewAreaThree(value) }}
|
||||
>
|
||||
{reviewArea.map(item => {
|
||||
return <Option key={item.value} value={item.value}
|
||||
disabled={item.value === reviewAreaTwo || item.value === reviewAreaOne}
|
||||
>{item.label}</Option>
|
||||
})}
|
||||
</Select>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('毕业院校',
|
||||
'graduatedFrom', [{ max: 50, message: '长度不能超过50个字符' }],
|
||||
<Input
|
||||
placeholder="请输入您的毕业院校"
|
||||
disabled={forbidden}
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('院校专业',
|
||||
'major', [{ 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 (!val) {
|
||||
callback();
|
||||
return
|
||||
}
|
||||
}],
|
||||
<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 {
|
||||
callback('请输入正确的邮箱地址!');
|
||||
}
|
||||
if (_IDRe18.test(val) || _IDre15.test(val)) {
|
||||
callback();
|
||||
}
|
||||
}],
|
||||
<Input
|
||||
placeholder="请输入您的常用邮箱地址"
|
||||
disabled={forbidden}
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('开户银行',
|
||||
'bankName', [{ max: 50, message: '长度不能超过50个字符' }],
|
||||
<Input
|
||||
placeholder="请输入您的开户银行"
|
||||
disabled={forbidden}
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('银行账号',
|
||||
'bankAccount', [{ max: 50, message: '长度不能超过50个字符' }],
|
||||
<Input
|
||||
placeholder="请输入您的银行卡号"
|
||||
disabled={forbidden}
|
||||
/>
|
||||
)
|
||||
}
|
||||
<Form.Item className="upload-form" label="个人简介">
|
||||
<Upload
|
||||
load={uploadResume}
|
||||
size={100}
|
||||
showNotification={showNotification}
|
||||
fileList={resumeList}
|
||||
else {
|
||||
callback('请输入正确的身份证号码!');
|
||||
}
|
||||
}
|
||||
}],
|
||||
<Input
|
||||
placeholder="请输入您的身份证号码"
|
||||
disabled={forbidden}
|
||||
count={1}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item className="upload-form" label="职称证明">
|
||||
<Upload
|
||||
load={uploadTitleCert}
|
||||
size={100}
|
||||
showNotification={showNotification}
|
||||
fileList={titleCertList}
|
||||
)
|
||||
}
|
||||
{
|
||||
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 {
|
||||
callback('请输入正确的邮箱地址!');
|
||||
}
|
||||
}
|
||||
}],
|
||||
<Input
|
||||
placeholder="请输入您的常用邮箱地址"
|
||||
disabled={forbidden}
|
||||
count={1}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item className="upload-form" label="学术成果">
|
||||
<Upload
|
||||
load={uploadAchievement}
|
||||
size={100}
|
||||
showNotification={showNotification}
|
||||
fileList={achievementList}
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('开户银行',
|
||||
'bankName', [{ max: 50, message: '长度不能超过50个字符' }],
|
||||
<Input
|
||||
placeholder="请输入您的开户银行"
|
||||
disabled={forbidden}
|
||||
count={1}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item className="upload-form" label="荣誉称号">
|
||||
<Upload
|
||||
load={uploadHonor}
|
||||
size={100}
|
||||
showNotification={showNotification}
|
||||
fileList={honorList}
|
||||
)
|
||||
}
|
||||
{
|
||||
helper('银行账号',
|
||||
'bankAccount', [{ max: 50, message: '长度不能超过50个字符' }],
|
||||
<Input
|
||||
placeholder="请输入您的银行卡号"
|
||||
disabled={forbidden}
|
||||
count={1}
|
||||
/>
|
||||
</Form.Item>
|
||||
)
|
||||
}
|
||||
<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}
|
||||
size={100}
|
||||
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="荣誉称号">
|
||||
<Upload
|
||||
load={uploadHonor}
|
||||
size={100}
|
||||
showNotification={showNotification}
|
||||
fileList={honorList}
|
||||
disabled={forbidden}
|
||||
count={1}
|
||||
/>
|
||||
</Form.Item>
|
||||
<div className='hint'>提示:个人简介、职称证明、学术成果、荣誉称号都只能上传一个文件,建议上传zip或rar格式的压缩文件</div>
|
||||
</Form>
|
||||
<div className='buts'>
|
||||
{/* <button className="but41_fill mr20" disabled={forbidden} onClick={() => expertRegisterSubmit(true)}>提交资料</button>
|
||||
<button className="but41_border mr20" disabled={forbidden} onClick={draft}>保存资料</button>
|
||||
<button className="butE3_border" onClick={() => setCancelConfirmValue(true)}>取消</button> */}
|
||||
<Button className="but41_fill mr20" type="primary" disabled={forbidden} onClick={() => expertRegisterSubmit(true)}>提交资料</Button>
|
||||
<Button className="but41_border mr20" disabled={forbidden} onClick={draft}>保存资料</Button>
|
||||
<Button className="but41_fill mr20" type="primary" disabled={forbidden} onClick={() => expertRegisterSubmit(true)}>{lastRegister && lastRegister.status === 1 ? '修改' : '提交'}资料</Button>
|
||||
{(!lastRegister || lastRegister.status !== 1) && <Button className="but41_border mr20" disabled={forbidden} onClick={draft}>保存资料</Button>}
|
||||
<Button className="butE3_border" onClick={cancel}>取消</Button>
|
||||
|
||||
<Modal
|
||||
title="提交资料"
|
||||
title={`${lastRegister && lastRegister.status === 1 ? '修改' : '提交'}资料`}
|
||||
visible={submitConfirmValue}
|
||||
onOk={expertRegisterOk}
|
||||
onCancel={() => setSubmitConfirmValue(false)}
|
||||
wrapClassName="expert_modal submit"
|
||||
closeIcon={<Icon className='iconfont icon-guanbi1' />}
|
||||
>
|
||||
<p className='weight_bold'>资料提交后无法修改,将等待管理员审核,</p>
|
||||
<p className='ml30'>确认提交?</p>
|
||||
<p className=''>资料提交后无法修改,将等待管理员审核,</p>
|
||||
<p className=''>确认{lastRegister && lastRegister.status === 1 ? '修改' : '提交'}?</p>
|
||||
</Modal>
|
||||
|
||||
<Modal
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
background: white;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-weight: 400;
|
||||
}
|
||||
.fail {
|
||||
background: #ffefef;
|
||||
border: 1px solid #ff3838;
|
||||
|
@ -37,49 +40,52 @@
|
|||
background-color: white;
|
||||
padding: 1em 0;
|
||||
}
|
||||
.ant-form-item {
|
||||
display: inline-block;
|
||||
width: 44%;
|
||||
margin: 1em 2.5% 0;
|
||||
}
|
||||
.hint {
|
||||
margin: 1em 3% 0 4%;
|
||||
color: #999;
|
||||
}
|
||||
.upload-form {
|
||||
display: inline-flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.register-form {
|
||||
.ant-form-item {
|
||||
display: inline-block;
|
||||
width: 44%;
|
||||
margin: 1em 2.5% 0;
|
||||
}
|
||||
.hint {
|
||||
margin: 1em 3% 0 4%;
|
||||
color: #999;
|
||||
}
|
||||
.upload-form {
|
||||
display: inline-flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.ant-form-item-label {
|
||||
width: 6em;
|
||||
line-height: 2.8em;
|
||||
}
|
||||
.ant-form-item-required::before {
|
||||
position: relative;
|
||||
top: -1px;
|
||||
content: url("./image/required.svg");
|
||||
}
|
||||
.ant-form-item-control-wrapper {
|
||||
width: 70%;
|
||||
display: inline-block;
|
||||
}
|
||||
.ant-input,
|
||||
.ant-select-selection {
|
||||
// width: 30.1em;
|
||||
box-shadow: none;
|
||||
&:focus,
|
||||
&:hover {
|
||||
.ant-form-item-label {
|
||||
width: 6em;
|
||||
line-height: 2.8em;
|
||||
}
|
||||
.ant-form-item-required::before {
|
||||
position: relative;
|
||||
top: -1px;
|
||||
content: url("./image/required.svg");
|
||||
}
|
||||
.ant-form-item-control-wrapper {
|
||||
width: 70%;
|
||||
display: inline-block;
|
||||
}
|
||||
.ant-input,
|
||||
.ant-select-selection {
|
||||
// width: 30.1em;
|
||||
box-shadow: none;
|
||||
&:focus,
|
||||
&:hover {
|
||||
border: 1px solid #4154f1 !important;
|
||||
}
|
||||
}
|
||||
.ant-input,
|
||||
.ant-input .ant-input-suffix {
|
||||
background-color: #ffffff !important;
|
||||
}
|
||||
.ant-select-open .ant-select-selection {
|
||||
border: 1px solid #4154f1 !important;
|
||||
}
|
||||
}
|
||||
.ant-input,
|
||||
.ant-input .ant-input-suffix {
|
||||
background-color: #ffffff !important;
|
||||
}
|
||||
.ant-select-open .ant-select-selection {
|
||||
border: 1px solid #4154f1 !important;
|
||||
}
|
||||
|
||||
.but41_border {
|
||||
margin-bottom: 0.6em;
|
||||
padding: 0 0.5em;
|
||||
|
|
|
@ -4,7 +4,7 @@ import { Link } from "react-router-dom";
|
|||
import { formatDuring } from 'educoder';
|
||||
import Paginationtable from "../../../components/paginationTable";
|
||||
import { getExpertTasks } from "../../api";
|
||||
import { taskType } from "../../static";
|
||||
import { taskType, expertTaskStatus } from "../../static";
|
||||
import { httpUrl } from '../../fetch';
|
||||
|
||||
import './index.scss';
|
||||
|
@ -24,7 +24,8 @@ function ReviewTasks({ form, showNotification, match, history }) {
|
|||
|
||||
const [searchObj, setSearchObj] = useState({
|
||||
containerName: '',
|
||||
containerType: 1
|
||||
containerType: 1,
|
||||
statusString:-1,
|
||||
});
|
||||
|
||||
|
||||
|
@ -73,14 +74,13 @@ function ReviewTasks({ form, showNotification, match, history }) {
|
|||
...searchObj,
|
||||
pageSize,
|
||||
curPage,
|
||||
statusString: '1,-1',
|
||||
};
|
||||
getExpertTasks(params).then(res => {
|
||||
for(const item of res.data.rows){
|
||||
if( new Date(item.reviewEndOn)>new Date()){
|
||||
item.surplus=formatDuring((new Date(item.reviewEndOn)-new Date())/1000);
|
||||
}else{
|
||||
item.surplus='- -';
|
||||
for (const item of res.data.rows) {
|
||||
if (new Date(item.reviewEndOn) > new Date()) {
|
||||
item.surplus = formatDuring((new Date(item.reviewEndOn) - new Date()) / 1000);
|
||||
} else {
|
||||
item.surplus = '- -';
|
||||
}
|
||||
}
|
||||
setDataList(res.data.rows || []);
|
||||
|
@ -91,7 +91,7 @@ function ReviewTasks({ form, showNotification, match, history }) {
|
|||
|
||||
|
||||
function onSearch() {
|
||||
let values = getFieldsValue(['containerName', 'containerType']);
|
||||
let values = getFieldsValue(['containerName', 'containerType', 'statusString']);
|
||||
setSearchObj(values);
|
||||
}
|
||||
|
||||
|
@ -99,10 +99,12 @@ function ReviewTasks({ form, showNotification, match, history }) {
|
|||
setFieldsValue({
|
||||
containerName: '',
|
||||
containerType: 1,
|
||||
statusString: -1,
|
||||
});
|
||||
setSearchObj({
|
||||
containerName: '',
|
||||
containerType: 1,
|
||||
statusString: -1,
|
||||
});
|
||||
setCurPage(1);
|
||||
}
|
||||
|
@ -126,6 +128,7 @@ function ReviewTasks({ form, showNotification, match, history }) {
|
|||
"containerName",
|
||||
[{ max: 20, message: '长度不能超过20个字符' }],
|
||||
<Input
|
||||
style={{ width: "250px" }}
|
||||
placeholder="输入任务名称进行检索"
|
||||
/>
|
||||
)}
|
||||
|
@ -135,7 +138,7 @@ function ReviewTasks({ form, showNotification, match, history }) {
|
|||
"containerType",
|
||||
[],
|
||||
<Select
|
||||
style={{ width: "200px" }}
|
||||
style={{ width: "250px" }}
|
||||
placeholder="所有领域"
|
||||
dropdownClassName="expert_register"
|
||||
// onChange={(value) => { setSearchReviewArea(value) }}
|
||||
|
@ -147,6 +150,22 @@ function ReviewTasks({ form, showNotification, match, history }) {
|
|||
1
|
||||
)}
|
||||
|
||||
{helper(
|
||||
"任务状态",
|
||||
"statusString",
|
||||
[],
|
||||
<Select
|
||||
style={{ width: "250px" }}
|
||||
placeholder="所有领域"
|
||||
dropdownClassName="expert_register"
|
||||
>
|
||||
{expertTaskStatus.map(item => {
|
||||
return <Option key={item.value} value={item.value}>{item.label}</Option>
|
||||
})}
|
||||
</Select>,
|
||||
-1
|
||||
)}
|
||||
|
||||
<div className="button-div">
|
||||
<Button className="mr10" type="primary" onClick={onSearch}>搜索</Button>
|
||||
<Button className="mr10" onClick={clearSearch}>清除</Button>
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
padding-bottom: 1rem;
|
||||
.search-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 0;
|
||||
padding: 1rem 2rem;
|
||||
// align-items: center;
|
||||
.ant-form-item {
|
||||
min-width: 36%;
|
||||
width: 36%;
|
||||
margin:0;
|
||||
width: 48%;
|
||||
margin-bottom:1rem;
|
||||
}
|
||||
.ant-col{
|
||||
display: inline-block;
|
||||
|
@ -25,6 +25,7 @@
|
|||
font-weight: bold;
|
||||
}
|
||||
.button-div {
|
||||
margin-left:.25rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.pagination-table{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useState, useCallback, useMemo, useEffect } from "react";
|
||||
import { Tabs, Button, Form, InputNumber, Modal } from 'antd';
|
||||
import { Tabs, Button, Form, InputNumber, Modal, Tooltip,} from 'antd';
|
||||
import { Link } from "react-router-dom";
|
||||
import Paginationtable from "../../../components/paginationTable";
|
||||
import { Info, Confirm } from '../../../components/ModalFun';
|
||||
|
@ -53,6 +53,10 @@ function ReviewTasks({ showNotification, match, history, current_user }) {
|
|||
title: '投稿详情',
|
||||
dataIndex: 'opsContent',
|
||||
key: 'opsContent',
|
||||
className:'text-tooltip',
|
||||
render:(text,record,index)=>{
|
||||
return <Tooltip overlayClassName="expert-tooltip" title={text} placement="top">{text}</Tooltip>
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '附件下载',
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
position: absolute;
|
||||
z-index: 1;
|
||||
right: 1rem;
|
||||
bottom: -108%;
|
||||
bottom: -52px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -157,7 +157,32 @@
|
|||
.ant-modal-body{
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.ant-form-item{
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.ant-form-explain, .ant-form-extra{
|
||||
margin-top: 0;
|
||||
}
|
||||
.ant-modal-footer{
|
||||
padding-bottom: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.expert-tooltip{
|
||||
.ant-tooltip-inner{
|
||||
background-color: #fff;
|
||||
color: #333;
|
||||
}
|
||||
.ant-tooltip-arrow::before{
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.text-tooltip{
|
||||
span{
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import { expertList, registerCheck } from "../api";
|
|||
import { httpUrl } from '../fetch';
|
||||
|
||||
import './index.scss';
|
||||
import '../index.scss';
|
||||
const { Search, TextArea } = Input;
|
||||
|
||||
function RegisterList({ showNotification, form }) {
|
||||
|
@ -47,7 +48,6 @@ function RegisterList({ showNotification, form }) {
|
|||
title: '工作单位',
|
||||
dataIndex: 'workplace',
|
||||
key: 'workplace',
|
||||
width: 350,
|
||||
},
|
||||
{
|
||||
title: '单位类别',
|
||||
|
@ -62,7 +62,7 @@ function RegisterList({ showNotification, form }) {
|
|||
{
|
||||
title: '专业职称',
|
||||
dataIndex: 'professionalTitle',
|
||||
width: 100,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '职称职级',
|
||||
|
|
|
@ -56,4 +56,9 @@ export const reviewArea = [
|
|||
export const taskType = [
|
||||
{ value: 1, label: "创客评审任务" },
|
||||
{ value: 2, label: "竞赛评审任务" },
|
||||
];
|
||||
|
||||
export const expertTaskStatus = [
|
||||
{ value: -1, label: "待评审" },
|
||||
{ value: 1, label: "已评审" },
|
||||
];
|
|
@ -259,6 +259,10 @@
|
|||
.button-div {
|
||||
margin-right: 1.5rem;
|
||||
}
|
||||
|
||||
.link{
|
||||
color:#4154f1;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1200px) {
|
||||
|
|
Loading…
Reference in New Issue