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 { Form , Input , Row , Col, Button } from 'antd';
|
||||||
import '../index.scss';
|
import '../index.scss';
|
||||||
import { postCreateZone } from '../api';
|
import { postCreateZone } from '../api';
|
||||||
const { TextArea } = Input;
|
const { TextArea } = Input;
|
||||||
|
|
||||||
const phonereg = /^([1][3456789])\d{9}$/
|
const phonereg = /^([1][3456789])\d{9}$/
|
||||||
|
const idenReg = /^[a-zA-Z][a-zA-Z0-9-_]{0,18}[a-zA-Z]+$/g
|
||||||
function Apply(props){
|
function Apply(props){
|
||||||
const { form } = props;
|
const { form } = props;
|
||||||
const { getFieldDecorator , validateFields } = form;
|
const { getFieldDecorator , validateFields } = form;
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
document.title = '申请创建专区';
|
||||||
|
},[])
|
||||||
|
|
||||||
function submitFunc(){
|
function submitFunc(){
|
||||||
validateFields((error,values)=>{
|
validateFields((error,values)=>{
|
||||||
if(!error){
|
if(!error){
|
||||||
|
@ -33,6 +38,14 @@ function Apply(props){
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function checkIndentity(rule, value, callback){
|
||||||
|
if(value && !idenReg.test(value)){
|
||||||
|
callback("专区标识长度2-20,只能以字母开头结尾,可包含数字、下划线、中划线");
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<div className="applyBox">
|
<div className="applyBox">
|
||||||
<div className="applyContent">
|
<div className="applyContent">
|
||||||
|
@ -78,9 +91,12 @@ function Apply(props){
|
||||||
label="专区标识"
|
label="专区标识"
|
||||||
>
|
>
|
||||||
{getFieldDecorator("key",{
|
{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>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
|
@ -139,7 +155,7 @@ function Apply(props){
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<div className="mt20">
|
<div className="mt20">
|
||||||
<Button style={{height:"36px",width:"100px"}} type="primary" onClick={submitFunc}>提交</Button>
|
<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>
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -101,7 +101,7 @@ function SelfList(props){
|
||||||
<i className="iconfont icon-shanchu_tc_icon font-22 mr15" style={{color:"#ca0002"}}></i>
|
<i className="iconfont icon-shanchu_tc_icon font-22 mr15" style={{color:"#ca0002"}}></i>
|
||||||
<div>
|
<div>
|
||||||
<p className="font-15 mb15 mt5" style={{color:"#202d40"}}>确定删除该{source?"资源":"文章"}?</p>
|
<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>
|
</div>
|
||||||
<div className="delBoxBtn">
|
<div className="delBoxBtn">
|
||||||
|
@ -119,6 +119,7 @@ function SelfList(props){
|
||||||
<li onClick={()=>setStatus(2)} className={status===2?"active":""}>未通过</li>
|
<li onClick={()=>setStatus(2)} className={status===2?"active":""}>未通过</li>
|
||||||
</ul>
|
</ul>
|
||||||
<Spin spinning={isSpin}>
|
<Spin spinning={isSpin}>
|
||||||
|
<div style={{backgroundColor:"#fff",borderRadius:"4px"}}>
|
||||||
<ul className="selfListPanel">
|
<ul className="selfListPanel">
|
||||||
{
|
{
|
||||||
list && list.length === 0 &&
|
list && list.length === 0 &&
|
||||||
|
@ -132,10 +133,10 @@ function SelfList(props){
|
||||||
return(
|
return(
|
||||||
<li>
|
<li>
|
||||||
<div>
|
<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">
|
<div className="s-info">
|
||||||
<span>
|
<span>
|
||||||
<span>{i.domainName}</span>
|
<span>{i.domainName || i.dirName}</span>
|
||||||
<span className="ml10 mr15">|</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><i className="iconfont icon-a-31shijian mr5 font-15"></i>{moment(i.createTime).format("YYYY/MM/DD")}</span>
|
||||||
</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>
|
</ul>
|
||||||
|
{
|
||||||
|
total > limit &&
|
||||||
|
<div style={{padding:"20px",textAlign:"right"}}>
|
||||||
|
<Pagination showQuickJumper current={page} total={total} pageSize={limit} onChange={(p)=>setPage(p)}/>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
</Spin>
|
</Spin>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,7 +7,7 @@ function beforeFetch(actionUrl){
|
||||||
}
|
}
|
||||||
|
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
headers:{Authorization:"a57ec217a1963611f9a0ff591b305dc3d5b3ba1f"},
|
headers:{Authorization:"0cd46d63363af9205eb7ccecff574309ce069a97"},
|
||||||
baseURL: actionUrl,
|
baseURL: actionUrl,
|
||||||
timeout: 1800000, // 请求超时时间
|
timeout: 1800000, // 请求超时时间
|
||||||
});
|
});
|
||||||
|
|
|
@ -1549,7 +1549,8 @@
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
p{
|
p{
|
||||||
color: #424650;
|
color: #424650;
|
||||||
margin-top: 15px;
|
margin-top: 14px;
|
||||||
|
line-height: 24px;
|
||||||
}
|
}
|
||||||
h5{
|
h5{
|
||||||
color:#000000;
|
color:#000000;
|
||||||
|
@ -1592,7 +1593,7 @@
|
||||||
border-radius: 0px 4px 4px 0px;
|
border-radius: 0px 4px 4px 0px;
|
||||||
}
|
}
|
||||||
&.active{
|
&.active{
|
||||||
background-color: #466aff;
|
background-color: var(--primary-color);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1616,7 +1617,7 @@
|
||||||
.s-name{
|
.s-name{
|
||||||
position: relative;
|
position: relative;
|
||||||
color:#1f2329;
|
color:#1f2329;
|
||||||
font-size:18px;
|
font-size:16px;
|
||||||
padding-left: 16px;
|
padding-left: 16px;
|
||||||
height: 26px;
|
height: 26px;
|
||||||
line-height: 26px;
|
line-height: 26px;
|
||||||
|
@ -1626,9 +1627,9 @@
|
||||||
left: 0px;
|
left: 0px;
|
||||||
height: 8px;
|
height: 8px;
|
||||||
width: 8px;
|
width: 8px;
|
||||||
background-color: #466aff;
|
background-color: var(--primary-color);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
top:10px;
|
top:8px;
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue