This commit is contained in:
red-deng-deng 2021-11-11 14:58:23 +08:00
parent d1f699526d
commit 3bb8705e45
4 changed files with 11 additions and 15 deletions

View File

@ -86,7 +86,7 @@ import classNames from 'classnames'
} }
// 焦点事件,伸展宽度 // 焦点事件,伸展宽度
focusFn(e){ focusFn(e){
if(this.props.placeholder.length>7){ if(this.props.placeholder.length>10){
this.setState({'focus':0}); this.setState({'focus':0});
} }

View File

@ -3,7 +3,7 @@
.iptfillself{ .iptfillself{
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 30px; // margin-bottom: 24px!important;
.label{ .label{
margin-right: 58px; margin-right: 58px;
.warning{ .warning{

View File

@ -63,14 +63,14 @@ function Adduser(){
{ {
return { return {
name: 'error', name: 'error',
message: '输入电话', message: '输入电话',
}; };
} }
else if(values.password == "") else if(values.password == "")
{ {
return { return {
name: 'error', name: 'error',
message: '清输入电话', message: '请输入密码',
}; };
} }
} }
@ -153,15 +153,7 @@ function Adduser(){
style={{marginLeft:'10px'}} style={{marginLeft:'10px'}}
onSubmit={onSubmit} onSubmit={onSubmit}
> >
<FormImageUploadField
name="imageUpload"
label="头像上传"
props={{
maxAmount: 1,
maxSize: 1024 * 1024 * 2,
}}
validators={[Validators.minLength(1, '请上传头像')]}
/>

View File

@ -59,7 +59,7 @@ export default class station extends React.Component{
if( e.innerHTML=="保存"){ if( e.innerHTML=="保存"){
if(this.hasVal(cssname,e.parentNode.parentNode.children[0].value)>-1){ if(this.hasVal(cssname,e.parentNode.parentNode.children[0].value)>-1){
Notify.clear() Notify.clear()
Notify.warn(`公司名重复`); Notify.warn(`${placeholder}重复,请重新增加`);
}else{ }else{
e.parentNode.firstChild.innerHTML='删除'; e.parentNode.firstChild.innerHTML='删除';
e.parentNode.parentNode.children[0].disabled="disabled"; e.parentNode.parentNode.children[0].disabled="disabled";
@ -104,16 +104,20 @@ export default class station extends React.Component{
sureFn(e,rp,placeholder){ sureFn(e,rp,placeholder){
if(e.target.value&&e.keyCode==13){ if(e.target.value&&e.keyCode==13){
let cssname=null; let cssname=null;
let stationame=[];
if(placeholder=='公司'){ if(placeholder=='公司'){
cssname='companyBtn'; cssname='companyBtn';
stationame=this.state.company;
}else if(placeholder=='部门'){ }else if(placeholder=='部门'){
cssname='departmentBtn'; cssname='departmentBtn';
stationame=this.state.department;
}else if(placeholder=='岗位'){ }else if(placeholder=='岗位'){
cssname='postBtn'; cssname='postBtn';
stationame=this.state.post;
} }
if(this.hasVal(this.state.company,e.target.value)>-1){ if(this.hasVal(this.state.company,e.target.value)>-1){
Notify.clear() Notify.clear()
Notify.warn(`公司名重复`); Notify.warn(`${placeholder}重复,请重新增加`);
}else{ }else{
rp.parentNode.children[1].firstChild.innerHTML='删除'; rp.parentNode.children[1].firstChild.innerHTML='删除';
rp.disabled="disabled"; rp.disabled="disabled";