初始化专家评审模块 #317
|
@ -55,6 +55,11 @@ const Task = Loadable({
|
||||||
loader: () => import('./military/task'),
|
loader: () => import('./military/task'),
|
||||||
loading: Loading,
|
loading: Loading,
|
||||||
})
|
})
|
||||||
|
// 专家
|
||||||
|
const Expert = Loadable({
|
||||||
|
loader: () => import('./military/expert'),
|
||||||
|
loading: Loading,
|
||||||
|
})
|
||||||
//403页面
|
//403页面
|
||||||
const Shixunauthority = Loadable({
|
const Shixunauthority = Loadable({
|
||||||
loader: () => import('./modules/403/Shixunauthority'),
|
loader: () => import('./modules/403/Shixunauthority'),
|
||||||
|
@ -262,6 +267,9 @@ class App extends Component {
|
||||||
{/*任务*/}
|
{/*任务*/}
|
||||||
<Route path="/task" component={Task} />
|
<Route path="/task" component={Task} />
|
||||||
|
|
||||||
|
{/*专家评审*/}
|
||||||
|
<Route path="/expert" component={Expert} />
|
||||||
|
|
||||||
{/*403*/}
|
{/*403*/}
|
||||||
<Route path="/403" component={Shixunauthority} />
|
<Route path="/403" component={Shixunauthority} />
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
import React, { Component } from "react";
|
||||||
|
|
||||||
|
import { Route, Switch } from "react-router-dom";
|
||||||
|
import { withRouter } from "react-router";
|
||||||
|
import { SnackbarHOC } from "educoder";
|
||||||
|
import { CNotificationHOC } from "../modules/courses/common/CNotificationHOC";
|
||||||
|
import { TPMIndexHOC } from "../modules/tpm/TPMIndexHOC";
|
||||||
|
import Loadable from "react-loadable";
|
||||||
|
import Loading from "../Loading";
|
||||||
|
import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC";
|
||||||
|
import './index.scss';
|
||||||
|
|
||||||
|
const Register = Loadable({
|
||||||
|
loader: () => import("./expert/register"),
|
||||||
|
loading: Loading,
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
class Expert extends Component {
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<div className="newMain clearfix">
|
||||||
|
<Switch {...this.props}>
|
||||||
|
|
||||||
|
<Route
|
||||||
|
path="/expert/register"
|
||||||
|
render={(props) => (
|
||||||
|
<Register {...this.props} {...props} />
|
||||||
|
)}
|
||||||
|
></Route>
|
||||||
|
</Switch>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default withRouter(
|
||||||
|
ImageLayerOfCommentHOC({
|
||||||
|
imgSelector: ".imageLayerParent img, .imageLayerParent .imageTarget",
|
||||||
|
parentSelector: ".newMain",
|
||||||
|
})(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Expert))))
|
||||||
|
);
|
|
@ -0,0 +1,10 @@
|
||||||
|
|
||||||
|
import javaFetch from '../javaFetch';
|
||||||
|
|
||||||
|
|
||||||
|
let settings=JSON.parse(localStorage.chromesetting);
|
||||||
|
let actionUrl = settings.api_urls? settings.api_urls.notice :'https://info.osredm.com';
|
||||||
|
|
||||||
|
const service = javaFetch(actionUrl);
|
||||||
|
export const httpUrl = actionUrl;
|
||||||
|
export default service;
|
|
@ -0,0 +1,65 @@
|
||||||
|
import React, { useEffect, useState, useCallback } from 'react';
|
||||||
|
import { Button, Icon, Form, Modal, Input } from 'antd';
|
||||||
|
import { Link } from "react-router-dom";
|
||||||
|
import './index.scss';
|
||||||
|
|
||||||
|
export default Form.create()(({ match, history, showNotification, form }) => {
|
||||||
|
const { getFieldDecorator, validateFields, setFieldsValue } = form;
|
||||||
|
|
||||||
|
// form表单公共处理函数
|
||||||
|
const helper = useCallback(
|
||||||
|
(label, name, rules, widget) => (
|
||||||
|
<Form.Item label={label}>
|
||||||
|
{getFieldDecorator(name, { rules, validateFirst: true ,getValueFromEvent: e=>e.target.value.replace(/(^\s*)|(\s*$)/g, "") })(widget)}
|
||||||
|
</Form.Item>
|
||||||
|
),
|
||||||
|
[]
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="centerbox detail">
|
||||||
|
{
|
||||||
|
helper('用户姓名',
|
||||||
|
'readerName',
|
||||||
|
[{ required: true, message: "请输入用户姓名" }, { max: 50, message: '不能超过50字符' }],
|
||||||
|
<Input
|
||||||
|
placeholder="请输入用户姓名"
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
helper('单位名称',
|
||||||
|
'companyName',
|
||||||
|
[{ required: true, message: "请输入公司名称" }, { max: 100, message: '不能超过100字符' }],
|
||||||
|
<Input
|
||||||
|
placeholder="请输入公司名称"
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
helper('联系方式',
|
||||||
|
'contactInfo',
|
||||||
|
[{ required: true, message: "请输入联系方式" },
|
||||||
|
{ max: 100, message: '不能超过100字符' },
|
||||||
|
{ validator: (rule,val,callback) =>{
|
||||||
|
const pattern = /^((\+)?86|((\+)?86)?)0?1[3458]\d{9}$/;
|
||||||
|
if(pattern.test(val)){
|
||||||
|
callback();
|
||||||
|
}else {
|
||||||
|
callback('请输入正确的手机号码!');
|
||||||
|
}
|
||||||
|
}}],
|
||||||
|
<Input
|
||||||
|
placeholder="请输入联系方式"
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
|
@ -0,0 +1,102 @@
|
||||||
|
.centerbox {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.notice-detail {
|
||||||
|
margin-top: 3.5rem;
|
||||||
|
.head-navigation {
|
||||||
|
top: -2.5rem;
|
||||||
|
}
|
||||||
|
.center-content {
|
||||||
|
overflow: auto;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.notice-detail-content {
|
||||||
|
padding: 2rem 2.5rem 3rem;
|
||||||
|
|
||||||
|
.anticon-caret-right {
|
||||||
|
color: #1890ff;
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.notice-title {
|
||||||
|
margin: 3rem auto 0;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 1.375rem;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 1.375rem;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 内容详情
|
||||||
|
.item-content {
|
||||||
|
padding: 10px 10px 0 30px;
|
||||||
|
}
|
||||||
|
.content-notice {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.center-author {
|
||||||
|
display: flex;
|
||||||
|
flex-flow:row wrap-reverse;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
padding: .5rem;
|
||||||
|
background: #f9f9f9;
|
||||||
|
color: #333;
|
||||||
|
p {
|
||||||
|
padding: 0 .5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-text {
|
||||||
|
margin: 1.25rem 0;
|
||||||
|
min-height: 30vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-secret{
|
||||||
|
min-height: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notice-content-title {
|
||||||
|
margin: 0.5rem 0;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notice-content-download {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 2rem !important;
|
||||||
|
padding: 0 1rem;
|
||||||
|
background: #f9f9f9;
|
||||||
|
span:hover{
|
||||||
|
cursor: pointer;
|
||||||
|
color: #1890ff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-edit-modal {
|
||||||
|
.ant-form-item{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.ant-form-item-label{
|
||||||
|
min-width: 5rem;
|
||||||
|
}
|
||||||
|
.ant-form-item-control-wrapper{
|
||||||
|
width: 75%;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.ant-input-number{
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-modal-footer{
|
||||||
|
border-top: 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue