forked from Gitlink/forgeplus-react
修复issue
This commit is contained in:
parent
02f414787a
commit
a630cbc9f4
|
@ -1,4 +1,11 @@
|
|||
.pagination-table {
|
||||
.ant-table {
|
||||
border: 1px solid #ececec;
|
||||
}
|
||||
.ant-table-thead tr th div {
|
||||
color: #181818;
|
||||
font-weight: 500;
|
||||
}
|
||||
.ant-table-wrapper {
|
||||
::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
|
@ -14,8 +21,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
.ant-pagination{
|
||||
margin-top:1.25rem;
|
||||
.ant-pagination {
|
||||
margin-top: 1.25rem;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
|
|
@ -121,6 +121,7 @@ const tableToExcel = (table, fileName, worksheet) => {
|
|||
newTable.appendChild(newTr);
|
||||
}
|
||||
}
|
||||
newTable.innerHTML = newTable.innerHTML.replace(/<td/g, "<td STYLE='MSO-NUMBER-FORMAT:\\@'");
|
||||
const ctx = {worksheet, table: newTable.innerHTML}; // 获取表单的名字和表单查询的内容
|
||||
const a = document.createElement("a"); // 虚拟一个a 标签
|
||||
// format()函数:通过格式操作使任意类型的数据转换成一个字符串
|
||||
|
|
|
@ -4,13 +4,12 @@ import cookie from 'react-cookies';
|
|||
import { exportExcel } from '../components/exportExcel.js';
|
||||
import Paginationtable from "../../components/paginationTable";
|
||||
import { Info } from '../../components/ModalFun';
|
||||
import { expertList, registerCheck } from "../api";
|
||||
import { expertList } from "../api";
|
||||
import { professionalType, reviewArea } from "../static";
|
||||
import { httpUrl } from '../fetch';
|
||||
|
||||
import './index.scss';
|
||||
import '../index.scss';
|
||||
import { Link } from "react-router-dom";
|
||||
const { Search } = Input;
|
||||
const Option = Select.Option;
|
||||
|
||||
|
@ -30,6 +29,7 @@ function RegisterList({ showNotification }) {
|
|||
const [dataAll, setDataAll] = useState([]);
|
||||
const [download, setDownload] = useState();
|
||||
const [downloading, setDownloading] = useState(false);
|
||||
const [visible, setVisible] = useState(false);
|
||||
|
||||
function onShowSizeChange(current, pageSize) {
|
||||
setCurPage(current);
|
||||
|
@ -69,103 +69,124 @@ function RegisterList({ showNotification }) {
|
|||
{
|
||||
title: '单位类别',
|
||||
dataIndex: 'workplaceType',
|
||||
key: 'workplaceType',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '工作性质',
|
||||
dataIndex: 'workNature',
|
||||
key: 'workNature',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '专业职称',
|
||||
dataIndex: 'professionalTitle',
|
||||
key: 'professionalTitle',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '职称职级',
|
||||
dataIndex: 'titleRank',
|
||||
key: 'titleRank',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '专家类别',
|
||||
dataIndex: 'expertType',
|
||||
key: 'expertType',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '评审领域1',
|
||||
dataIndex: 'reviewAreaOne',
|
||||
key: 'reviewAreaOne',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '评审领域2',
|
||||
dataIndex: 'reviewAreaTwo',
|
||||
key: 'reviewAreaTwo',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '评审领域3',
|
||||
dataIndex: 'reviewAreaThree',
|
||||
key: 'reviewAreaThree',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '毕业院校',
|
||||
dataIndex: 'graduatedFrom',
|
||||
key: 'graduatedFrom',
|
||||
},
|
||||
{
|
||||
title: '院校专业',
|
||||
dataIndex: 'major',
|
||||
key: 'major',
|
||||
},
|
||||
{
|
||||
title: '身份证号',
|
||||
dataIndex: 'idNumber',
|
||||
key: 'idNumber',
|
||||
width: 170,
|
||||
},
|
||||
{
|
||||
title: '邮箱地址',
|
||||
dataIndex: 'expertEmail',
|
||||
key: 'expertEmail',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: '开户银行',
|
||||
dataIndex: 'bankName',
|
||||
key: 'bankName',
|
||||
width: 110,
|
||||
},
|
||||
{
|
||||
title: '银行账号',
|
||||
dataIndex: 'bankAccount',
|
||||
key: 'bankAccount',
|
||||
render: (text, record) => {
|
||||
return '\t' + text
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '个人简介',
|
||||
dataIndex: 'resumeAttachments',
|
||||
key: 'resumeAttachments',
|
||||
render: (text, record) => {
|
||||
return text && text.map(item => {
|
||||
return <a className="link" onClick={()=>{downFile(item.id)}}>{item.fileName}</a>
|
||||
return <a key={item.id} className="link" onClick={() => { downFile(item.id) }}>{item.fileName}</a>
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '职称证明',
|
||||
dataIndex: 'titleCertificateAttachments',
|
||||
key: 'titleCertificateAttachments',
|
||||
render: (text, record) => {
|
||||
return text && text.map(item => {
|
||||
return <a className="link" onClick={()=>{downFile(item.id)}}>{item.fileName}</a>
|
||||
return <a key={item.id} className="link" onClick={() => { downFile(item.id) }}>{item.fileName}</a>
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '学术成果',
|
||||
dataIndex: 'academicAchievementsAttachments',
|
||||
key: 'academicAchievementsAttachments',
|
||||
render: (text, record) => {
|
||||
return text && text.map(item => {
|
||||
return <a className="link" onClick={()=>{downFile(item.id)}}>{item.fileName}</a>
|
||||
return <a key={item.id} className="link" onClick={() => { downFile(item.id) }}>{item.fileName}</a>
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '荣誉称号',
|
||||
dataIndex: 'honorsAttachments',
|
||||
key: 'honorsAttachments',
|
||||
render: (text, record) => {
|
||||
return text && text.map(item => {
|
||||
return <a className="link" onClick={()=>{downFile(item.id)}}>{item.fileName}</a>
|
||||
return <a key={item.id} className="link" onClick={() => { downFile(item.id) }}>{item.fileName}</a>
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -218,27 +239,6 @@ function RegisterList({ showNotification }) {
|
|||
}, [download]);
|
||||
|
||||
|
||||
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());
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function beforeUpload(file) {
|
||||
const isExcel = file.type.indexOf('xlsx') || file.type.indexOf('xls') || file.type.indexOf('sheet');
|
||||
if (!isExcel) {
|
||||
|
@ -266,8 +266,12 @@ function RegisterList({ showNotification }) {
|
|||
</div>,
|
||||
});
|
||||
setReload(Math.random());
|
||||
setVisible(false);
|
||||
}
|
||||
}
|
||||
if(info.file.status === 'error'){
|
||||
showNotification(info.file.response.message || '系统错误');
|
||||
}
|
||||
}
|
||||
|
||||
const upload = {
|
||||
|
@ -323,11 +327,12 @@ function RegisterList({ showNotification }) {
|
|||
</Form.Item>
|
||||
</div>
|
||||
<div className="btn-group">
|
||||
<Upload
|
||||
{/* <Upload
|
||||
{...upload}
|
||||
>
|
||||
<button className="but41_fill">导入</button>
|
||||
</Upload>
|
||||
</Upload> */}
|
||||
<Button type="primary" className="ml10 but41_fill" onClick={() => { setVisible(true) }}>导入</Button>
|
||||
<Button loading={downloading} className="ml10 but41_fill" onClick={() => { setDownload(Math.random()) }}>导出</Button>
|
||||
|
||||
{/* <ExportExcel tableClass=".ant-table-scroll" fileName="专家列表" /> */}
|
||||
|
@ -351,7 +356,26 @@ function RegisterList({ showNotification }) {
|
|||
columns={columns}
|
||||
dataSource={dataAll}
|
||||
pagination={false}
|
||||
rowKey={(row) => row.id}
|
||||
/>
|
||||
|
||||
|
||||
<Modal
|
||||
title="上传"
|
||||
visible={visible}
|
||||
// onOk={refuse}
|
||||
onCancel={() => { setVisible(false) }}
|
||||
className="upload-modal"
|
||||
footer={<Button onClick={() => { setVisible(false) }}>取消</Button>}
|
||||
>
|
||||
<Upload
|
||||
{...upload}
|
||||
>
|
||||
<button className="but41_fill">导入</button>
|
||||
</Upload>
|
||||
<p className="link" onClick={() => { window.open(httpUrl + '/busiAttachments/download/883') }}>专家注册表模板.xlsx</p>
|
||||
<p className='hint'>提示:只能在导入模版上增减数据,才能导入成功!</p>
|
||||
</Modal>
|
||||
</div>)
|
||||
}
|
||||
export default RegisterList;
|
|
@ -24,3 +24,15 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.upload-modal{
|
||||
.ant-modal-body{
|
||||
text-align: center;
|
||||
}
|
||||
p{
|
||||
line-height: 2rem;
|
||||
}
|
||||
.hint{
|
||||
color: #df0002;
|
||||
}
|
||||
}
|
|
@ -8,12 +8,12 @@ import './index.scss';
|
|||
|
||||
|
||||
const Register = Loadable({
|
||||
loader: () => import("../register"),
|
||||
loader: () => import("./register"),
|
||||
loading: Loading,
|
||||
});
|
||||
|
||||
const ReviewTasks = Loadable({
|
||||
loader: () => import("../reviewTasks"),
|
||||
loader: () => import("./reviewTasks"),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
.navigation {
|
||||
font-size: 0.6em;
|
||||
margin: -35px 0 15px;
|
||||
a:hover{
|
||||
color: #4154f1;
|
||||
}
|
||||
}
|
||||
|
||||
.center_flex {
|
||||
|
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
@ -1,11 +1,11 @@
|
|||
import React, { useEffect, useState, useCallback } from 'react';
|
||||
import { Button, Icon, Form, Modal, Input, Select } from 'antd';
|
||||
import Upload from '../components/Upload';
|
||||
import { unitType, natureOfWork, highestEducation, positionLevel, professionalType, reviewArea } from '../static';
|
||||
import { expertRegister, getCurrentExpert, getFile, expertUpdate } from '../api';
|
||||
import Upload from '../../components/Upload';
|
||||
import { unitType, natureOfWork, highestEducation, positionLevel, professionalType, reviewArea } from '../../static';
|
||||
import { expertRegister, getCurrentExpert, getFile, expertUpdate } from '../../api';
|
||||
|
||||
import './index.scss';
|
||||
import '../index.scss';
|
||||
import '../../index.scss';
|
||||
const Option = Select.Option;
|
||||
|
||||
export default Form.create()(({ match, history, showNotification, form, current_user }) => {
|
||||
|
@ -254,18 +254,18 @@ export default Form.create()(({ match, history, showNotification, form, current_
|
|||
return (
|
||||
<div className='register_right'>
|
||||
{
|
||||
lastRegister && lastRegister.status === -1 && <p className='checking'>
|
||||
lastRegister && lastRegister.status === -1 && <p className='advance checking'>
|
||||
您的资料正在审核,请耐心等待!
|
||||
</p>
|
||||
}
|
||||
{
|
||||
lastRegister && lastRegister.status === 2 && <p className='fail'>
|
||||
lastRegister && lastRegister.status === 2 && <p className='advance fail'>
|
||||
您提交的资料已被拒绝,请完善资料后重新提交
|
||||
{lastRegister.reviewerAdvice&&<div className='advance'>拒绝原因:{lastRegister.reviewerAdvice}</div>}
|
||||
{lastRegister.reviewerAdvice&&<div >拒绝原因:{lastRegister.reviewerAdvice}</div>}
|
||||
</p>
|
||||
}
|
||||
{
|
||||
lastRegister && lastRegister.status === 1 && <p className='succeed'>
|
||||
lastRegister && lastRegister.status === 1 && <p className='advance succeed'>
|
||||
您的资料已审核通过,已成为专家!若修改资料,修改后需要管理员重新审核,审核过程中不会影响您的专家身份
|
||||
</p>
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
.center_flex {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.register_left {
|
||||
height: 10em;
|
||||
font-size: 0.7em;
|
||||
background-color: white;
|
||||
padding: 0.4vw;
|
||||
}
|
||||
.register_right {
|
||||
.advance {
|
||||
padding: 0.5em 2em;
|
||||
color: #181818;
|
||||
font-size: 0.9rem;
|
||||
font-weight: bold;
|
||||
margin-bottom: 1.25rem !important;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.fail {
|
||||
background: #ffefef;
|
||||
border: 1px solid #ff3838;
|
||||
color: #ff3838;
|
||||
}
|
||||
|
||||
.checking {
|
||||
background: #edf2ff;
|
||||
border: 1px solid #4154f1;
|
||||
color: #4154f1;
|
||||
}
|
||||
.succeed {
|
||||
background: #edf2ff;
|
||||
border: 1px solid green;
|
||||
color: green;
|
||||
}
|
||||
.ant-form {
|
||||
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;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
.but41_border {
|
||||
margin-bottom: 0.6em;
|
||||
padding: 0 0.5em;
|
||||
}
|
||||
.ant-cascader-menu-item:hover {
|
||||
background: #f2f3ff;
|
||||
}
|
||||
// }
|
||||
.buts {
|
||||
font-size: 0.7em;
|
||||
padding: 1.5em 2em;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
}
|
||||
}
|
||||
.expert_register .ant-select-dropdown-menu-item:hover,
|
||||
.ant-select-dropdown-menu-item-active:not(.ant-select-dropdown-menu-item-disabled) {
|
||||
background-color: #f2f3ff;
|
||||
}
|
|
@ -1,15 +1,12 @@
|
|||
import React, { useState, useCallback, useMemo, useEffect } from "react";
|
||||
import { Input, Select, Button, Form, DatePicker, Table, Pagination, Upload, Modal } from 'antd';
|
||||
import cookie from 'react-cookies';
|
||||
import { exportExcel } from '../components/exportExcel.js';
|
||||
import Paginationtable from "../../components/paginationTable";
|
||||
import { Info } from '../../components/ModalFun';
|
||||
import Paginationtable from "../../../components/paginationTable";
|
||||
import { getExpertTasks } from "../api";
|
||||
import { taskType } from "../static";
|
||||
import { httpUrl } from '../fetch';
|
||||
import { httpUrl } from '../../fetch';
|
||||
|
||||
import './index.scss';
|
||||
import '../index.scss';
|
||||
import '../../index.scss';
|
||||
const { Search } = Input;
|
||||
const Option = Select.Option;
|
||||
|
||||
|
@ -112,7 +109,7 @@ function ReviewTasks({ form, showNotification, match, history }) {
|
|||
<p className="task-head">
|
||||
我的评审任务
|
||||
</p>
|
||||
<div className="search-screen" >
|
||||
<div className="search-list" >
|
||||
{helper(
|
||||
"任务名称",
|
||||
"containerName",
|
|
@ -1,11 +1,19 @@
|
|||
.task_right {
|
||||
.search-screen {
|
||||
.register_right.task_right {
|
||||
background: #fff;
|
||||
.search-list {
|
||||
display: flex;
|
||||
margin: 0;
|
||||
padding-bottom: 0;
|
||||
padding: 1rem 2rem;
|
||||
// align-items: center;
|
||||
.ant-form-item {
|
||||
min-width: 36%;
|
||||
width: 36%;
|
||||
margin:0;
|
||||
}
|
||||
.ant-col{
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
}
|
||||
.task-head {
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
|
@ -18,4 +26,7 @@
|
|||
.button-div {
|
||||
line-height: 1.5;
|
||||
}
|
||||
.pagination-table{
|
||||
margin:0 2rem;
|
||||
}
|
||||
}
|
|
@ -1,102 +0,0 @@
|
|||
.center_flex {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.register_left {
|
||||
height: 10em;
|
||||
font-size: 0.7em;
|
||||
background-color: white;
|
||||
padding: 0.4vw;
|
||||
}
|
||||
.register_right {
|
||||
p {
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
padding: 0.5em 2em;
|
||||
color: #181818;
|
||||
font-size: 0.9rem;
|
||||
font-weight: bold;
|
||||
margin-bottom: 1.25rem !important;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.fail {
|
||||
background: #ffefef;
|
||||
border: 1px solid #ff3838;
|
||||
color: #ff3838;
|
||||
}
|
||||
|
||||
.checking {
|
||||
background: #edf2ff;
|
||||
border: 1px solid #4154f1;
|
||||
color: #4154f1;
|
||||
}
|
||||
.succeed {
|
||||
background: #edf2ff;
|
||||
border: 1px solid green;
|
||||
color: green;
|
||||
}
|
||||
.ant-form {
|
||||
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;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
.but41_border {
|
||||
margin-bottom: 0.6em;
|
||||
padding: 0 0.5em;
|
||||
}
|
||||
.ant-cascader-menu-item:hover {
|
||||
background: #f2f3ff;
|
||||
}
|
||||
// }
|
||||
.buts {
|
||||
font-size: 0.7em;
|
||||
padding: 1.5em 2em;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
}
|
||||
}
|
||||
.expert_register .ant-select-dropdown-menu-item:hover,
|
||||
.ant-select-dropdown-menu-item-active:not(.ant-select-dropdown-menu-item-disabled) {
|
||||
background-color: #f2f3ff;
|
||||
}
|
|
@ -100,6 +100,13 @@ service.interceptors.response.use(
|
|||
window.location.href="/403";
|
||||
return Promise.reject('error');
|
||||
}
|
||||
if (res.status === 500) {
|
||||
notification.open({
|
||||
message: "提示",
|
||||
description: res.data.message,
|
||||
});
|
||||
return Promise.reject('error');
|
||||
}
|
||||
|
||||
return Promise.reject(error);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue