update
This commit is contained in:
parent
148bcbacf9
commit
05fb87dff1
|
@ -1,14 +1,19 @@
|
|||
import React from 'react';
|
||||
import React, { useEffect } from 'react';
|
||||
import { Form , Input , Row , Col, Button } from 'antd';
|
||||
import '../index.scss';
|
||||
import { postCreateZone } from '../api';
|
||||
const { TextArea } = Input;
|
||||
|
||||
const phonereg = /^([1][3456789])\d{9}$/
|
||||
const idenReg = /^[a-zA-Z][a-zA-Z0-9-_]{0,18}[a-zA-Z]+$/g
|
||||
function Apply(props){
|
||||
const { form } = props;
|
||||
const { getFieldDecorator , validateFields } = form;
|
||||
|
||||
useEffect(()=>{
|
||||
document.title = '申请创建专区';
|
||||
},[])
|
||||
|
||||
function submitFunc(){
|
||||
validateFields((error,values)=>{
|
||||
if(!error){
|
||||
|
@ -33,6 +38,14 @@ function Apply(props){
|
|||
callback();
|
||||
}
|
||||
|
||||
|
||||
function checkIndentity(rule, value, callback){
|
||||
if(value && !idenReg.test(value)){
|
||||
callback("专区标识长度2-20,只能以字母开头结尾,可包含数字、下划线、中划线");
|
||||
}
|
||||
callback();
|
||||
}
|
||||
|
||||
return(
|
||||
<div className="applyBox">
|
||||
<div className="applyContent">
|
||||
|
@ -78,9 +91,12 @@ function Apply(props){
|
|||
label="专区标识"
|
||||
>
|
||||
{getFieldDecorator("key",{
|
||||
rules:[{required:true,message:"请输入专区域名标识"}]
|
||||
rules:[
|
||||
{ required: true,message:"请输入专区域名标识" },
|
||||
{ validator: checkIndentity }
|
||||
]
|
||||
})(
|
||||
<Input placeholder="请输入专区域名标识" maxLength={50} style={{height:"36px"}}/>
|
||||
<Input placeholder="请输入专区域名标识" maxLength={20} style={{height:"36px"}}/>
|
||||
)}
|
||||
</Form.Item>
|
||||
</Col>
|
||||
|
@ -139,7 +155,7 @@ function Apply(props){
|
|||
</Form.Item>
|
||||
<div className="mt20">
|
||||
<Button style={{height:"36px",width:"100px"}} type="primary" onClick={submitFunc}>提交</Button>
|
||||
<Button style={{marginLeft:"30px",height:"36px",width:"100px"}}>取消</Button>
|
||||
<Button style={{marginLeft:"30px",height:"36px",width:"100px"}} onClick={()=>{window.location.href="/"}}>取消</Button>
|
||||
</div>
|
||||
</Form>
|
||||
</div>
|
||||
|
|
|
@ -101,7 +101,7 @@ function SelfList(props){
|
|||
<i className="iconfont icon-shanchu_tc_icon font-22 mr15" style={{color:"#ca0002"}}></i>
|
||||
<div>
|
||||
<p className="font-15 mb15 mt5" style={{color:"#202d40"}}>确定删除该{source?"资源":"文章"}?</p>
|
||||
<p style={{color:"#5f6872"}}>{source?"删除后所有资源文件将被清楚,请谨慎操作":"此操作将发出文章删除申请,管理员同意申请后该文章将被删除"}</p>
|
||||
{(source || (!source && status === 1)) && <p style={{color:"#5f6872"}}>{source?"删除后所有资源文件将被清除,请谨慎操作":"此操作将提交删除申请,管理员同意申请后该文章将被删除"}</p> }
|
||||
</div>
|
||||
</div>
|
||||
<div className="delBoxBtn">
|
||||
|
@ -119,6 +119,7 @@ function SelfList(props){
|
|||
<li onClick={()=>setStatus(2)} className={status===2?"active":""}>未通过</li>
|
||||
</ul>
|
||||
<Spin spinning={isSpin}>
|
||||
<div style={{backgroundColor:"#fff",borderRadius:"4px"}}>
|
||||
<ul className="selfListPanel">
|
||||
{
|
||||
list && list.length === 0 &&
|
||||
|
@ -132,10 +133,10 @@ function SelfList(props){
|
|||
return(
|
||||
<li>
|
||||
<div>
|
||||
<a className="s-name task-hide">{i.name}</a>
|
||||
<Link to={`/zone/${deptId}/${source?"source":"newdetail"}/${i.id}`} className="s-name task-hide">{i.name}</Link>
|
||||
<div className="s-info">
|
||||
<span>
|
||||
<span>{i.domainName}</span>
|
||||
<span>{i.domainName || i.dirName}</span>
|
||||
<span className="ml10 mr15">|</span>
|
||||
<span><i className="iconfont icon-a-31shijian mr5 font-15"></i>{moment(i.createTime).format("YYYY/MM/DD")}</span>
|
||||
</span>
|
||||
|
@ -149,13 +150,14 @@ function SelfList(props){
|
|||
)
|
||||
})
|
||||
}
|
||||
{
|
||||
total > limit &&
|
||||
<div style={{padding:"20px",textAlign:"right"}}>
|
||||
<Pagination showQuickJumper current={page} total={total} pageSize={limit} onChange={(p)=>setPage(p)}/>
|
||||
</div>
|
||||
}
|
||||
</ul>
|
||||
{
|
||||
total > limit &&
|
||||
<div style={{padding:"20px",textAlign:"right"}}>
|
||||
<Pagination showQuickJumper current={page} total={total} pageSize={limit} onChange={(p)=>setPage(p)}/>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</Spin>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -7,7 +7,7 @@ function beforeFetch(actionUrl){
|
|||
}
|
||||
|
||||
const service = axios.create({
|
||||
headers:{Authorization:"a57ec217a1963611f9a0ff591b305dc3d5b3ba1f"},
|
||||
headers:{Authorization:"0cd46d63363af9205eb7ccecff574309ce069a97"},
|
||||
baseURL: actionUrl,
|
||||
timeout: 1800000, // 请求超时时间
|
||||
});
|
||||
|
|
|
@ -1549,7 +1549,8 @@
|
|||
margin-bottom: 20px;
|
||||
p{
|
||||
color: #424650;
|
||||
margin-top: 15px;
|
||||
margin-top: 14px;
|
||||
line-height: 24px;
|
||||
}
|
||||
h5{
|
||||
color:#000000;
|
||||
|
@ -1592,7 +1593,7 @@
|
|||
border-radius: 0px 4px 4px 0px;
|
||||
}
|
||||
&.active{
|
||||
background-color: #466aff;
|
||||
background-color: var(--primary-color);
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
@ -1616,7 +1617,7 @@
|
|||
.s-name{
|
||||
position: relative;
|
||||
color:#1f2329;
|
||||
font-size:18px;
|
||||
font-size:16px;
|
||||
padding-left: 16px;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
|
@ -1626,9 +1627,9 @@
|
|||
left: 0px;
|
||||
height: 8px;
|
||||
width: 8px;
|
||||
background-color: #466aff;
|
||||
background-color: var(--primary-color);
|
||||
border-radius: 50%;
|
||||
top:10px;
|
||||
top:8px;
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue