专家列表页顶部

This commit is contained in:
谢思 2021-12-20 08:59:34 +08:00
parent 72d060393d
commit c9cd52221e
9 changed files with 97 additions and 36 deletions

21
package-lock.json generated
View File

@ -289,15 +289,9 @@
}
},
"@babel/runtime-corejs3": {
<<<<<<< HEAD
"version": "7.16.5",
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.16.5.tgz",
"integrity": "sha512-F1pMwvTiUNSAM8mc45kccMQxj31x3y3P+tA/X8hKNWp3/hUsxdGxZ3D3H8JIkxtfA8qGkaBTKvcmvStaYseAFw==",
=======
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.16.0.tgz",
"integrity": "sha512-Oi2qwQ21X7/d9gn3WiwkDTJmq3TQtYNz89lRnoFy8VeZpWlsyXvzSwiRrRZ8cXluvSwqKxqHJ6dBd9Rv+p0ZGQ==",
>>>>>>> 070f869aa67b4f7d20a6955b6c22d4df6398f516
"requires": {
"core-js-pure": "^3.19.0",
"regenerator-runtime": "^0.13.4"
@ -3987,15 +3981,9 @@
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
},
"core-js-pure": {
<<<<<<< HEAD
"version": "3.19.3",
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.19.3.tgz",
"integrity": "sha512-N3JruInmCyt7EJj5mAq3csCgGYgiSqu7p7TQp2KOztr180/OAIxyIvL1FCjzgmQk/t3Yniua50Fsak7FShI9lA=="
=======
"version": "3.19.1",
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.19.1.tgz",
"integrity": "sha512-Q0Knr8Es84vtv62ei6/6jXH/7izKmOrtrxH9WJTHLCMAVeU+8TF8z8Nr08CsH4Ot0oJKzBzJJL9SJBYIv7WlfQ=="
>>>>>>> 070f869aa67b4f7d20a6955b6c22d4df6398f516
},
"core-util-is": {
"version": "1.0.3",
@ -18231,22 +18219,13 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
<<<<<<< HEAD
"dev": true
=======
"dev": true,
"optional": true
>>>>>>> 070f869aa67b4f7d20a6955b6c22d4df6398f516
},
"is-glob": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"dev": true,
<<<<<<< HEAD
=======
"optional": true,
>>>>>>> 070f869aa67b4f7d20a6955b6c22d4df6398f516
"requires": {
"is-extglob": "^2.1.1"
}

View File

@ -119,7 +119,7 @@
},
"scripts": {
"start": "node --max_old_space_size=15360 scripts/start.js",
"build": " NODE_ENV=production node --max_old_space_size=15360 scripts/build.js",
"build": "set NODE_ENV=production node --max_old_space_size=15360 scripts/build.js",
"test-build": "NODE_ENV=testBuild node --max_old_space_size=15360 scripts/build.js",
"pre-build": "NODE_ENV=preBuild node --max_old_space_size=15360 scripts/build.js",
"gen_stats": "NODE_ENV=production webpack --profile --config=./config/webpack.config.prod.js --json > stats.json",

View File

@ -31,7 +31,10 @@ const AdminRouter = Loadable({
loading: Loading,
});
const ReviewTasks = Loadable({
loader: () => import("./expert/reviewTasks"),
loading: Loading,
})
const Expert = (propsTransmit) => {
// 开发时,从代理的位置获取用户信息
@ -56,6 +59,12 @@ const Expert = (propsTransmit) => {
render={(props) => (
<Register {...propsF} {...props} />
)}
></Route>
<Route
path="/expert/tasks"
render={(props) => (
<ReviewTasks {...propsF} {...props} />
)}
></Route>
{/* 管理员管理 */}
<Route

View File

@ -71,7 +71,7 @@ function Uploads({ className, size, actionUrl, fileList, showNotification, load,
showNotification(`文件大小必须小于${size}MB!`);
}
if (!isMin) {
showNotification(`只能上传rarzip文件`);
showNotification(`只能上传rarzip文件`);
}
return isLt100M&&isMin;
}

View File

@ -1,9 +1,12 @@
import React, { useState, useMemo, useEffect } from "react";
import { Input, Select, Button, Form, DatePicker, Table, Pagination, Modal } from 'antd';
import Paginationtable from "../../components/paginationTable";
import Upload from '../components/Upload';
import { expertList, registerCheck } from "../api";
import { professionalType, reviewArea } from "../static";
import './index.scss';
import '../index.scss';
const { Search } = Input;
function RegisterList({ showNotification }) {
@ -13,7 +16,11 @@ function RegisterList({ showNotification }) {
const [dataList, setDataList] = useState([]);
const [total, setTotal] = useState(0);
const [searchInput, setSearchInput] = useState('');
const [searchReviewArea, setSearchReviewArea] = useState('');
const [expertType, setExpertType] = useState('')
const [pageSize, setPageSize] = useState(10);
const [uploadExpertList, setUploadExpertList] = useState([]);
const [uploadExpertIds, setUploadExpertIds] = useState([]);
const columns = useMemo(() => {
return [{
@ -121,9 +128,12 @@ function RegisterList({ showNotification }) {
//
useEffect(() => {
console.log('searchReviewArea', searchReviewArea);
setLoading(true);
let params = {
searchInput,
reviewArea: searchReviewArea,
expertType,
pageSize,
curPage,
statusString: '1',
@ -138,7 +148,7 @@ function RegisterList({ showNotification }) {
setLoading(false);
setTotal(data.total);
});
}, [curPage, reload, searchInput]);
}, [curPage, reload, searchInput, searchReviewArea, expertType]);
function check(record, checkStatus) {
Modal.confirm({
@ -160,17 +170,58 @@ function RegisterList({ showNotification }) {
},
});
}
//
function uploadExpert(fileList, files) {
setUploadExpertList(fileList);
setUploadExpertIds(files);
}
return (
<div className="expert-list centerbox">
<div className="center-screen" >
<div className="center-right-but">
<Search
maxLength={20}
style={{ width: "300px" }}
placeholder="请输入专家全名或手机号"
onSearch={(value) => { setSearchInput(value); setCurPage(1); }}
/>
<div>
<span>查询条件</span>
<Search
maxLength={20}
style={{ width: "300px" }}
placeholder="请输入专家全名或手机号"
onSearch={(value) => { setSearchInput(value); setCurPage(1); }}
/>
<span className="ml20">专家类别</span>
<Select
style={{ width: "150px" }}
placeholder="所有类别"
dropdownClassName="expert_register"
onChange={(value) => { setExpertType(value)}}>
<Option value="">所有类别</Option>
{professionalType.map(item => {
return <Option value={item.value}>{item.label}</Option>
})}
</Select>
<span>评审领域</span>
<Select
style={{ width: "150px" }}
placeholder="所有领域"
dropdownClassName="expert_register"
onChange={(value) => { setSearchReviewArea(value) }}>
<Option value="">所有领域</Option>
{reviewArea.map(item=>{
return <Option value={item.value}>{item.label}</Option>
})}
</Select>
</div>
<div>
<Upload
load={uploadExpert}
size={50}
showNotification={showNotification}
fileList={uploadExpertList}
></Upload>
<button className="but41_fill">导入</button>
<button className="but41_fill">导出</button>
</div>
</div>
</div>
<Paginationtable

View File

@ -2,4 +2,8 @@
.ant-table-thead > tr > th, .ant-table-tbody > tr > td{
padding:16px 6px;
}
.center-right-but{
justify-content: space-between;
margin-bottom: 2.5em;
}
}

View File

@ -3,9 +3,9 @@ import javaFetch from '../javaFetch';
let settings=JSON.parse(localStorage.chromesetting);
let actionUrl = settings.api_urls && settings.api_urls.expert ? settings.api_urls.expert :'http://117.50.100.12:8067/';
// http://10.47.38.56:8088
let actionUrl = settings.api_urls && settings.api_urls.expert ? settings.api_urls.expert :'http://117.50.100.12:8067';
// http://10.47.38.39:8088
// http://117.50.100.12:8067/
const service = javaFetch(actionUrl);
export const httpUrl = actionUrl;
export default service;

View File

@ -0,0 +1,9 @@
import React from "react";
import { Link } from "react-router-dom";
function ReviewTasks() {
return (
<div>aaa</div>
)
}
export default ReviewTasks;

View File

@ -1,7 +1,8 @@
import React, { Component } from 'react';
import { Link } from "react-router-dom";
import AccountProfile from "../user/AccountProfile";
import { getImageUrl,getLogoImageUrl } from 'educoder'
import { getImageUrl,getLogoImageUrl } from 'educoder';
import { getUserInfo } from 'src/military/expert/api';
import axios from 'axios';
import { Modal, Input, message, notification, Button } from 'antd';
@ -51,9 +52,15 @@ class NewHeader extends Component {
mygetHelmetapi2: null,
goshowqqgtounp: false,
visiblemyss: false,
isExpert: false,
}
}
componentDidMount() {
getUserInfo().then(response =>{
console.log('111',response);
response && this.setState({isExpert: response.data.expert});
console.log('222',this.state.isExpert);
});
// this.getAppdata();
this.geturlsdata();
window._header_componentHandler = this;
@ -766,7 +773,9 @@ class NewHeader extends Component {
<div className="head-right">
{this.props.user && this.props.user.login &&
<div className='mr30'>
<i className="iconfont icon-xiaoxilingdang color-grey-6"></i>
<a href={this.state.isExpert ? '/expert/tasks' :'/expert'}>
<i className="iconfont icon-xiaoxilingdang color-grey-6"></i>
</a>
</div>
}
{this.props.user && this.props.user.login &&