杨树林 6 years ago
commit 2b33ed3863

@ -892,6 +892,7 @@ pop_box_new(htmlvalue, 480, 182);
<Dialog <Dialog
id="tpi-dialog" id="tpi-dialog"
open={this.state.gDialogOpen} open={this.state.gDialogOpen}
disableEscapeKeyDown={true}
onClose={() => this.handleGdialogClose()} onClose={() => this.handleGdialogClose()}
> >
<DialogTitle id="alert-dialog-title">{"提示"}</DialogTitle> <DialogTitle id="alert-dialog-title">{"提示"}</DialogTitle>

@ -505,6 +505,7 @@ class Comments extends Component {
</Modals> : </Modals> :
<Dialog <Dialog
open={dialogOpen} open={dialogOpen}
disableEscapeKeyDown={true}
onClose={this.handleDialogClose} onClose={this.handleDialogClose}
> >
<DialogTitle id="alert-dialog-title">{"提示"}</DialogTitle> <DialogTitle id="alert-dialog-title">{"提示"}</DialogTitle>
@ -531,6 +532,7 @@ class Comments extends Component {
<Dialog <Dialog
open={goldRewardDialogOpen} open={goldRewardDialogOpen}
disableEscapeKeyDown={true}
onClose={this.handleGoldRewardDialogClose} onClose={this.handleGoldRewardDialogClose}
> >
<DialogTitle id="alert-dialog-title">{"奖励设置"}</DialogTitle> <DialogTitle id="alert-dialog-title">{"奖励设置"}</DialogTitle>

@ -58,6 +58,7 @@ class RewardDialog extends Component {
return ( return (
<Dialog <Dialog
open={goldRewardDialogOpen} open={goldRewardDialogOpen}
disableEscapeKeyDown={true}
onClose={this.handleGoldRewardDialogClose} onClose={this.handleGoldRewardDialogClose}
> >
<DialogTitle id="alert-dialog-title">{"奖励设置"}</DialogTitle> <DialogTitle id="alert-dialog-title">{"奖励设置"}</DialogTitle>

@ -381,6 +381,7 @@ class LoginDialog extends Component {
return ( return (
<Dialog open={true} id="DialogID" <Dialog open={true} id="DialogID"
style={{ display: isRender==false? 'none' : ''}} style={{ display: isRender==false? 'none' : ''}}
disableEscapeKeyDown={true}
onClose={() => this.handleDialogClose()} onClose={() => this.handleDialogClose()}
> >
<div className={dialogBox}> <div className={dialogBox}>

@ -538,6 +538,7 @@ class Trialapplication extends Component {
style={{height: '0', width: '0', border: 'none', display: "none"}}/> style={{height: '0', width: '0', border: 'none', display: "none"}}/>
<Dialog open={true} id="DialogIDysl" <Dialog open={true} id="DialogIDysl"
disableEscapeKeyDown={true}
style={{display: isRenders == false ? 'none' : '', "border-radius": "10px"}} style={{display: isRenders == false ? 'none' : '', "border-radius": "10px"}}
> >
<div id="closeIcon" onClick={() => { <div id="closeIcon" onClick={() => {

@ -876,6 +876,7 @@ class MainContentContainer extends Component {
<React.Fragment> <React.Fragment>
<Dialog <Dialog
open={this.state.open} open={this.state.open}
disableEscapeKeyDown={true}
onClose={this.handleClose} onClose={this.handleClose}
> >
<DialogTitle id="alert-dialog-title">{"提示"}</DialogTitle> <DialogTitle id="alert-dialog-title">{"提示"}</DialogTitle>
@ -893,6 +894,7 @@ class MainContentContainer extends Component {
<Dialog <Dialog
open={this.state.resetCodeDialogOpen} open={this.state.resetCodeDialogOpen}
disableEscapeKeyDown={true}
onClose={() => this.handleResetCodeDialogClose()} onClose={() => this.handleResetCodeDialogClose()}
> >
<DialogTitle id="alert-dialog-title">{"提示"}</DialogTitle> <DialogTitle id="alert-dialog-title">{"提示"}</DialogTitle>
@ -912,6 +914,7 @@ class MainContentContainer extends Component {
</Dialog> </Dialog>
<Dialog <Dialog
disableEscapeKeyDown={true}
open={this.state.resetPassedCodeDialogOpen} open={this.state.resetPassedCodeDialogOpen}
onClose={() => this.handleResetPassedCodeDialogClose()} onClose={() => this.handleResetPassedCodeDialogClose()}
> >

@ -147,6 +147,7 @@ class LeftView extends Component {
<React.Fragment> <React.Fragment>
<Dialog <Dialog
open={dialogOpen} open={dialogOpen}
disableEscapeKeyDown={true}
onClose={handleDialogClose} onClose={handleDialogClose}
> >
<DialogTitle id="alert-dialog-title">{"提示"}</DialogTitle> <DialogTitle id="alert-dialog-title">{"提示"}</DialogTitle>

@ -11,6 +11,7 @@ const radioOptions = [
{ label: '男', value: 'boy' }, { label: '男', value: 'boy' },
{ label: '女', value: 'girl' }, { label: '女', value: 'girl' },
]; ];
export const identityMap={"teacher":"教师", "student":"学生", "professional":"专业人士"}
class AccountBasicEdit extends Component { class AccountBasicEdit extends Component {
constructor(props){ constructor(props){
super(props); super(props);
@ -84,14 +85,14 @@ class AccountBasicEdit extends Component {
label="所在地" label="所在地"
className="display formItemInline" className="display formItemInline"
> >
{basicInfo && basicInfo.location} {basicInfo && basicInfo.location_city} {basicInfo && basicInfo.location} {basicInfo && basicInfo.location_city}
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label="职业" label="职业"
className="display formItemInline" className="display formItemInline"
> >
{basicInfo && basicInfo.technical_title} { basicInfo && basicInfo.identity && identityMap[basicInfo.identity] } {basicInfo && ( basicInfo.technical_title || basicInfo.student_id)}
</Form.Item> </Form.Item>
<Form.Item <Form.Item
@ -109,7 +110,7 @@ class AccountBasicEdit extends Component {
</Form.Item> </Form.Item>
</Form> </Form>
</div> </div>
<diV style={{color: '#989898', marginLeft: '20px'}}>* 我们确保你所提供的信息均处于严格保密状态不会泄露</diV> <div style={{color: '#989898', marginLeft: '20px'}}>* 我们确保你所提供的信息均处于严格保密状态不会泄露</div>
</div> </div>
); );
} }

@ -5,11 +5,11 @@ import { Form, Button, Input, Radio, Select, Tooltip, Icon } from 'antd'
import ApplyForAddOrgModal from '../modal/ApplyForAddOrgModal' import ApplyForAddOrgModal from '../modal/ApplyForAddOrgModal'
import ApplyForAddChildOrgModal from '../modal/ApplyForAddChildOrgModal' import ApplyForAddChildOrgModal from '../modal/ApplyForAddChildOrgModal'
import axios from 'axios' import axios from 'axios'
import { identityMap } from './AccountBasic'
const RadioGroup = Radio.Group; const RadioGroup = Radio.Group;
const Option = Select.Option; const Option = Select.Option;
const map={"teacher":"教师", "student":"学生", "professional":"专业人士"} const map = identityMap // {"teacher":"教师", "student":"学生", "professional":"专业人士"}
class AccountBasic extends Component { class AccountBasic extends Component {
constructor(props){ constructor(props){
super(props); super(props);
@ -62,10 +62,13 @@ class AccountBasic extends Component {
job2:basicInfo && basicInfo.identity=="professional" ? basicInfo.technical_title:"企业管理者", job2:basicInfo && basicInfo.identity=="professional" ? basicInfo.technical_title:"企业管理者",
}) })
}, 100) }, 100)
//if(basicInfo.nickname){ //if(basicInfo.nickname){
this.setState({ this.setState({
forDisable: true,
nameLength:basicInfo.nickname?basicInfo.nickname.length:0, nameLength:basicInfo.nickname?basicInfo.nickname.length:0,
showRealName:basicInfo.show_realname, showRealName:basicInfo.show_realname,
realName: basicInfo.name,
identity:basicInfo.identity identity:basicInfo.identity
}) })
//} //}
@ -116,7 +119,8 @@ class AccountBasic extends Component {
axios.put((url),{ axios.put((url),{
nickname:values.nickname, nickname:values.nickname,
// 认证中的不能修改 // 认证中的不能修改
name: basicInfo.authentication == 'uncertified' ? values.name : basicInfo.name, name: basicInfo.authentication == 'uncertified' ?
(this.state.showRealName ? values.name : this.state.realName ) : basicInfo.name,
show_realname:this.state.showRealName, show_realname:this.state.showRealName,
gender:parseInt(values.sex), gender:parseInt(values.sex),
location:values.city[0], location:values.city[0],
@ -140,15 +144,16 @@ class AccountBasic extends Component {
} }
// 隐藏或显示真实姓名 // 隐藏或显示真实姓名
showOrHide=(flag,name)=>{ showOrHide=(flag)=>{
const name = this.props.form.getFieldsValue().name || this.props.basicInfo.name
this.setState({ this.setState({
showRealName:flag==true?false:true showRealName:flag==true?false:true
}) })
if(flag==true){ if(flag==true){ // 隐藏真实姓名
this.hideRealName(name); this.hideRealName(name);
}else{ }else{ // 显示
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
name name: this.state.realName
}) })
} }
} }
@ -164,11 +169,13 @@ class AccountBasic extends Component {
// 将名字隐藏起来 // 将名字隐藏起来
hideRealName=(name)=>{ hideRealName=(name)=>{
this.setState({ realName: name })
const newName = this.getHiddenName(name) const newName = this.getHiddenName(name)
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
name: newName name: newName
}) })
return newName
} }
// 过滤学校 // 过滤学校
@ -333,9 +340,12 @@ class AccountBasic extends Component {
font-size: 14px; font-size: 14px;
} }
.basicForm .saveBtn { .basicForm .saveBtn {
width: 120px; width: 100px;
margin-left: 100px; margin-left: 100px;
} }
.basicForm .cancelBtn {
margin-left: 0px;
}
.basicForm .ant-input-lg { .basicForm .ant-input-lg {
height: 32px; height: 32px;
} }
@ -384,9 +394,9 @@ class AccountBasic extends Component {
message: '请输入您的姓名', message: '请输入您的姓名',
}], }],
})( })(
<Input placeholder="请输入您的姓名" suffix={ <Input placeholder="请输入您的姓名" disabled={!showRealName && this.state.forDisable == true } suffix={
<i className={showRealName?"iconfont icon-xianshi font-18 color-blue":"iconfont icon-yincang font-18 color-blue"} <i className={showRealName?"iconfont icon-xianshi font-18 color-blue":"iconfont icon-yincang font-18 color-blue"}
onClick={()=>this.showOrHide(showRealName,basicInfo.name)}></i> onClick={()=>this.showOrHide(showRealName)}></i>
}></Input> }></Input>
)} )}
<span>{ showRealName ? '(显示:平台将显示您的真实姓名)' : '(隐藏:平台将显示你的昵称)' }</span> <span>{ showRealName ? '(显示:平台将显示您的真实姓名)' : '(隐藏:平台将显示你的昵称)' }</span>
@ -394,7 +404,7 @@ class AccountBasic extends Component {
<div className="df" style={{ 'justify-content': 'center' }}> <div className="df" style={{ 'justify-content': 'center' }}>
<span className="mr8" >{showRealName ? this.props.basicInfo.name : this.getHiddenName(this.props.basicInfo.name)}</span> <span className="mr8" >{showRealName ? this.props.basicInfo.name : this.getHiddenName(this.props.basicInfo.name)}</span>
<i className={showRealName?"iconfont icon-xianshi font-18 color-blue":"iconfont icon-yincang font-18 color-blue"} <i className={showRealName?"iconfont icon-xianshi font-18 color-blue":"iconfont icon-yincang font-18 color-blue"}
onClick={()=>this.showOrHide(showRealName,basicInfo.name)}></i> onClick={()=>this.showOrHide(showRealName)}></i>
<span>{ showRealName ? '(显示:平台将显示您的真实姓名)' : '(隐藏:平台将显示你的昵称)' }</span> <span>{ showRealName ? '(显示:平台将显示您的真实姓名)' : '(隐藏:平台将显示你的昵称)' }</span>
</div> </div>
} }
@ -562,7 +572,7 @@ class AccountBasic extends Component {
{ {
filterDepartments && filterDepartments.map((item,key)=>{ filterDepartments && filterDepartments.map((item,key)=>{
return( return(
<Option value={item.name}>{item.name}</Option> <Option value={item.name} key={item.name}>{item.name}</Option>
) )
}) })
} }
@ -583,11 +593,14 @@ class AccountBasic extends Component {
{/* <Form.Item> {/* <Form.Item>
<div className="clearfix mt30 mb30"> */} <div className="clearfix mt30 mb30"> */}
<Button type="primary" onClick={this.handleSubmit} size="middle" className="saveBtn mr20 mt30">{"保存"}</Button> <Button type="primary" onClick={this.handleSubmit} size="middle" className="saveBtn mr20 mt30">{"保存"}</Button>
{this.props.basicInfo.base_info_completed &&
<Button type="" onClick={() => { this.props.history.push('/account/profile') }} size="middle" className="saveBtn cancelBtn mr20 mt30">{"取消"}</Button>}
{/* </div> {/* </div>
</Form.Item> */} </Form.Item> */}
</Form> </Form>
</div> </div>
<diV style={{color: '#989898', marginLeft: '20px'}}>* 我们确保你所提供的信息均处于严格保密状态不会泄露</diV> <div style={{color: '#989898', marginLeft: '20px'}}>* 我们确保你所提供的信息均处于严格保密状态不会泄露</div>
</div> </div>
); );
} }

@ -84,7 +84,7 @@ class AccountCertification extends Component {
</div> </div>
</div> </div>
</div> </div>
<diV style={{color: '#989898', marginLeft: '20px'}}>* 我们确保你所提供的信息均处于严格保密状态不会泄露</diV> <div style={{color: '#989898', marginLeft: '20px'}}>* 我们确保你所提供的信息均处于严格保密状态不会泄露</div>
</div> </div>
); );
} }

@ -480,7 +480,7 @@ class AccountSecure extends Component {
</div> </div>
</Form> </Form>
</div> </div>
<diV style={{color: '#989898', marginLeft: '20px'}}>* 我们确保你所提供的信息均处于严格保密状态不会泄露</diV> <div style={{color: '#989898', marginLeft: '20px'}}>* 我们确保你所提供的信息均处于严格保密状态不会泄露</div>
</div> </div>
); );
} }

@ -66,7 +66,7 @@ button.ant-btn.ant-btn-primary.grayBtn {
padding-bottom: 30px; padding-bottom: 30px;
margin-bottom:30px; margin-bottom:30px;
margin-right:20px; margin-right:20px;
max-height:430px; height:418px;
} }
.accountInfo { .accountInfo {
text-align: center; text-align: center;

Loading…
Cancel
Save