专区-标识非必填
This commit is contained in:
parent
6098ffa36a
commit
ea3c8d841c
|
|
@ -16,7 +16,7 @@ const TerserWebpackPlugin = require('terser-webpack-plugin');
|
|||
const paths = require("./paths");
|
||||
const getClientEnvironment = require("./env");
|
||||
|
||||
let publicPath = "/react/build/";
|
||||
let publicPath = "/build/";
|
||||
const publicUrl = publicPath.slice(0, -1);
|
||||
// const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== "false";
|
||||
const shouldUseSourceMap = process.env.NODE_ENV !== "production";
|
||||
|
|
|
|||
|
|
@ -11029,6 +11029,11 @@
|
|||
"resolved": "https://registry.npmjs.org/keycode/-/keycode-2.2.1.tgz",
|
||||
"integrity": "sha512-Rdgz9Hl9Iv4QKi8b0OlCRQEzp4AgVxyCtz5S/+VIHezDmrDhkp2N2TqBWOLz0/gbeREXOOiI9/4b8BY9uw2vFg=="
|
||||
},
|
||||
"keypress": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/keypress/-/keypress-0.1.0.tgz",
|
||||
"integrity": "sha512-x0yf9PL/nx9Nw9oLL8ZVErFAk85/lslwEP7Vz7s5SI1ODXZIgit3C5qyWjw4DxOuO/3Hb4866SQh28a1V1d+WA=="
|
||||
},
|
||||
"killable": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz",
|
||||
|
|
@ -12777,6 +12782,24 @@
|
|||
"pinkie": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"pinyin": {
|
||||
"version": "4.0.0-alpha.0",
|
||||
"resolved": "https://registry.npmmirror.com/pinyin/-/pinyin-4.0.0-alpha.0.tgz",
|
||||
"integrity": "sha512-hdxO/2RuLWarhLaIcGKdXjkFZ0hFr3W/Yrvrd0YPxuIafixMZSAa4jvxskYLgYHE8OkOXkGsxMsEScwGzqKe3g==",
|
||||
"requires": {
|
||||
"commander": "~1.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"commander": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/commander/-/commander-1.1.1.tgz",
|
||||
"integrity": "sha512-71Rod2AhcH3JhkBikVpNd0pA+fWsmAaVoti6OR38T76chA7vE3pSerS0Jor4wDw+tOueD2zLVvFOw5H0Rcj7rA==",
|
||||
"requires": {
|
||||
"keypress": "0.1.x"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"pkg-dir": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz",
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
"nvm": "0.0.4",
|
||||
"object-assign": "4.1.1",
|
||||
"papaparse": "^5.3.2",
|
||||
"pinyin": "^4.0.0-alpha.0",
|
||||
"postcss-flexbugs-fixes": "3.2.0",
|
||||
"promise": "8.0.1",
|
||||
"prop-types": "^15.6.1",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { Form , Input , Row , Col, Button } from 'antd';
|
|||
import '../index.scss';
|
||||
import { postCreateZone } from '../api';
|
||||
import axios from 'axios';
|
||||
|
||||
const { TextArea } = Input;
|
||||
|
||||
const phonereg = /^([1][3456789])\d{9}$/
|
||||
|
|
@ -25,14 +26,15 @@ function Apply(props){
|
|||
const zoneApplication = {...values};
|
||||
postCreateZone(zoneApplication).then(response=>{
|
||||
if(response && response.data && response.data.code===200){
|
||||
props.showNotification("提交成功!");
|
||||
props.showNotification("您的专区申请已提交,请耐心等待管理员与您联系!");
|
||||
setTimeout(() => {
|
||||
window.location.href="/";
|
||||
}, 70);
|
||||
}, 1000);
|
||||
}
|
||||
}).catch(error=>{})
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function checkPhone(rule, value, callback){
|
||||
|
|
@ -55,6 +57,7 @@ function Apply(props){
|
|||
callback();
|
||||
}):callback();
|
||||
}
|
||||
|
||||
|
||||
|
||||
return(
|
||||
|
|
@ -99,18 +102,18 @@ function Apply(props){
|
|||
<Row type="flex" justify="space-between">
|
||||
<Col span={11}>
|
||||
<Form.Item
|
||||
label="专区标识"
|
||||
label="专区英文标识"
|
||||
>
|
||||
{getFieldDecorator("key",{
|
||||
rules:[
|
||||
{ required: true,message:"请输入专区域名标识" },
|
||||
// { required: true,message:"请输入专区域名英文标识" },
|
||||
{ pattern: /^[a-zA-Z][a-zA-Z0-9_-]{0,18}[a-zA-Z]$/, message: "长度2-20,只能包含数字、字母、下划线、中划线,必须以字母开头结尾"},
|
||||
{ validator:checkId }
|
||||
],
|
||||
validateTrigger:"onBlur",
|
||||
validateFirst: true,
|
||||
})(
|
||||
<Input placeholder="请输入专区域名标识" maxLength={20} style={{height:"36px"}}/>
|
||||
<Input placeholder="请输入专区域名标识,若未填写系统将根据专区名称自动生成" maxLength={20} style={{height:"36px"}}/>
|
||||
)}
|
||||
</Form.Item>
|
||||
</Col>
|
||||
|
|
|
|||
Loading…
Reference in New Issue