chromesetting
杨树明 5 years ago
parent ea091baab0
commit bf5194fe2f

@ -909,7 +909,7 @@ class TPMBanner extends Component {
{shixunsDetails.shixun_status === 0 && this.props.identity < 5 ? {shixunsDetails.shixun_status === 0 && this.props.identity < 5 ?
<a onClick={this.applyrelease} className="fr user_default_btn user_blue_btn mr20 font-18 height39" <a onClick={this.applyrelease} className="fr user_default_btn user_blue_btn mr20 font-18 height39"
id="challenge_begin">申请发布</a> : "" id="challenge_begin">发布</a> : ""
} }
<Modal <Modal

@ -222,7 +222,7 @@ export default class Shixuninformation extends Component {
} }
render() { render() {
console.log(this.props) // console.log(this.props)
return ( return (
<div> <div>
<div className="educontent mb200 edu-back-white padding10-20 pdb30 mb50"> <div className="educontent mb200 edu-back-white padding10-20 pdb30 mb50">

@ -841,15 +841,33 @@ class Shixuninformation extends Component {
> >
{ {
this.props.data === undefined ? "" : this.props.data.shixun&&this.props.data.shixun.main_type.map((item, key) => { this.props.data === undefined ? "" : this.props.shixunsDetails.is_jupyter === true?this.props.data.shixun&&this.props.data.shixun.main_type.map((item, key) => {
return ( let itemtype=item.type_name.toLowerCase().indexOf('jupyter'.toLowerCase())
<Option value={item.id} key={key} name={item.description}> if(itemtype>-1) {
<Tooltip placement="right" title={item.description === "" ? "无描述" : item.description}> return (
{item.type_name} <Option value={item.id} key={key} name={item.description}>
</Tooltip> <Tooltip placement="right" title={item.description === "" ? "无描述" : item.description}>
</Option> {item.type_name}
) </Tooltip>
}) </Option>
)
}
}):""
}
{
this.props.data === undefined ? "" : this.props.shixunsDetails.is_jupyter === false?this.props.data.shixun&&this.props.data.shixun.main_type.map((item, key) => {
let itemtype=item.type_name.toLowerCase().indexOf('jupyter'.toLowerCase())
if(itemtype===-1) {
return (
<Option value={item.id} key={key} name={item.description}>
<Tooltip placement="right" title={item.description === "" ? "无描述" : item.description}>
{item.type_name}
</Tooltip>
</Option>
)
}
}):""
} }
</Select> </Select>

@ -32,6 +32,7 @@ class Newshixuns extends Component {
run_method: undefined, run_method: undefined,
postapplyvisible: undefined, postapplyvisible: undefined,
fileList: [], fileList: [],
Radiovalue:"1"
} }
} }
@ -85,6 +86,9 @@ class Newshixuns extends Component {
this.setState({ this.setState({
Radiovalue: e.target.value, Radiovalue: e.target.value,
}); });
this.props.form.setFieldsValue({
is_jupyter: e.target.value,
});
}; };
handleSubmit = (e) => { handleSubmit = (e) => {
@ -535,16 +539,36 @@ class Newshixuns extends Component {
defaultOpen={false} defaultOpen={false}
> >
{ {
newshixunlist === undefined ? "" : newshixunlist.main_type.map((item, key) => { newshixunlist === undefined ? "" : this.state.Radiovalue==="2"?newshixunlist.main_type.map((item, key) => {
return ( let itemtype=item.type_name.toLowerCase().indexOf('jupyter'.toLowerCase())
<Option value={item.id} key={key} name={item.description}> if(itemtype>-1){
<Tooltip placement="right" return (
title={item.description === "" ? "无描述" : item.description}> <Option value={item.id} key={key} name={item.description}>
{item.type_name} <Tooltip placement="right"
</Tooltip> title={item.description === "" ? "无描述" : item.description}>
</Option> {item.type_name}
) </Tooltip>
}) </Option>
)
}
}):""
}
{
newshixunlist === undefined ? "" : this.state.Radiovalue==="1"?newshixunlist.main_type.map((item, key) => {
let itemtype=item.type_name.toLowerCase().indexOf('jupyter'.toLowerCase())
if(itemtype===-1){
return (
<Option value={item.id} key={key} name={item.description}>
<Tooltip placement="right"
title={item.description === "" ? "无描述" : item.description}>
{item.type_name}
</Tooltip>
</Option>
)
}
}):""
} }
</Select> </Select>

Loading…
Cancel
Save