chromesetting
杨树明 5 years ago
parent 067f770dcc
commit a4f872bf49

@ -59,7 +59,8 @@ class TPMBanner extends Component {
openknow:false,
openshowpublictype:false,
Radiovalue:1,
TextAreaintshow:false
TextAreaintshow:false,
}
}
@ -112,6 +113,15 @@ class TPMBanner extends Component {
componentDidUpdate(prevProps, prevState) {
if (prevProps != this.props) {
if(prevProps.user != this.props.user){
if(this.props.user&&this.props.user.admin===true||this.props.user&&this.props.user.business===true){
this.setState({
TextArea:"云上实验室使用"
})
}
}
let shixunopenprocess=window.localStorage.shixunopenprocess;
let openopenpublictype=window.localStorage.openopenpublictype;
if(this.props.status===0&&this.props.openknows===false){
@ -173,8 +183,12 @@ class TPMBanner extends Component {
})
}
if (this.props.user && this.props.user.admin === true || this.props.user && this.props.user.business === true) {
this.setState({
TextArea: "云上实验室使用"
})
}
}
/*
* Fork
* */
@ -736,6 +750,11 @@ class TPMBanner extends Component {
this.setState({
Radiovalue:e.target.value
})
if(e.target.value!=4){
this.setState({
TextAreaintshow:false
})
}
}
render() {
@ -827,7 +846,7 @@ class TPMBanner extends Component {
};
//
// console.log(this.props.shixunsDetails&&this.props.shixunsDetails.is_jupyter)
// console.log(this.props)
// console.log(this.state)
return (
@ -1318,7 +1337,9 @@ class TPMBanner extends Component {
其它原因
</Radio>
{this.state.Radiovalue === 4 ?
<TextArea className={this.state.TextAreaintshow===true?"bor-red mt10":"mt10"} rows={4} style={{ width: '85%', marginLeft: '30px' }} onInput={this.changeTextArea}/>: null}
<TextArea className={this.state.TextAreaintshow===true?"bor-red mt10":"mt10"}
value={this.state.TextArea}
rows={4} style={{ width: '85%', marginLeft: '30px' }} onInput={this.changeTextArea}/>: null}
{this.state.TextAreaintshow===true?<div className={"color-red ml30"}>不能为空</div>:""}
</Radio.Group>
</div>

Loading…
Cancel
Save