新建课堂搜索学校增加加载效果

topic_bank
杨树明 6 years ago
parent e4c805dbbb
commit 7c13d9a4d8

@ -48,6 +48,7 @@ class CoursesNew extends Component {
addonAfteronelenone:0,
addonAfteronelentwo:0,
bordebool:false,
smallspinning:false
}
}
componentDidMount() {
@ -450,8 +451,10 @@ class CoursesNew extends Component {
// });
this.setState({
fetching: true,
school: value
school: value,
smallspinning:true
})
this.getschool(value)
}
};
@ -478,6 +481,7 @@ class CoursesNew extends Component {
};
getschool=(value)=>{
// this.props.form.setFieldsValue({
// school: value
// })
@ -491,17 +495,24 @@ class CoursesNew extends Component {
if (result.data.status===0) {
this.setState({
searchlistscholl: result.data.school_names,
smallspinning:false
})
if(result.data.school_names.length!=0){
this.setState({
fetching: false
fetching: false,
})
}
}else{
this.setState({
smallspinning:false
})
}
}
}).catch((error)=>{
console.log(error)
this.setState({
smallspinning:false
})
})
}
showApplyForAddOrgModal = () => {
@ -895,6 +906,9 @@ class CoursesNew extends Component {
>
</AutoComplete>
)}
<span className={"fl ml20 "}>
<Spin size="small" spinning={this.state.smallspinning}/>
</span>
<span className={"newcoursestitle fl"}>
{/*(输入内容出现匹配的下拉菜单←同账号管理的单位信息填写)*/}
</span>

@ -55,6 +55,7 @@ class Goldsubject extends Component {
addonAfteronelentwo:"",
Whethertocreateanewclassroom:true,
bordebool:false,
smallspinning:false
}
}
// disabledEndDate= endValue => {
@ -570,7 +571,8 @@ class Goldsubject extends Component {
// });
this.setState({
fetching: true,
school: value
school: value,
smallspinning:true
})
this.getschool(value)
}
@ -598,6 +600,7 @@ class Goldsubject extends Component {
};
getschool=(value)=>{
// this.props.form.setFieldsValue({
// school: value
// })
@ -611,17 +614,24 @@ class Goldsubject extends Component {
if (result.data.status===0) {
this.setState({
searchlistscholl: result.data.school_names,
smallspinning:false
})
if(result.data.school_names.length!=0){
this.setState({
fetching: false
})
}
}else{
this.setState({
smallspinning:false
})
}
}
}).catch((error)=>{
console.log(error)
this.setState({
smallspinning:false
})
})
}
showApplyForAddOrgModal = () => {
@ -1036,6 +1046,9 @@ class Goldsubject extends Component {
>
</AutoComplete>
)}
<span className={"fl ml20 "}>
<Spin size="small" spinning={this.state.smallspinning}/>
</span>
<span className={"newcoursestitle fl"}>
{/*(输入内容出现匹配的下拉菜单←同账号管理的单位信息填写)*/}
</span>

Loading…
Cancel
Save