dev_forum
杨树明 5 years ago
parent 1de8282c8d
commit ffd13e728a

@ -13,10 +13,11 @@ import '@icedesign/base/dist/ICEDesignBase.css';
import '@icedesign/base/index.scss';
import LoginDialog from './modules/login/LoginDialog'
import Notcompletedysl from './modules/user/Notcompletedysl'
import Trialapplicationysl from './modules/login/Trialapplicationysl'
import Trialapplicationreview from './modules/user/Trialapplicationreview'
import LoginDialog from './modules/login/LoginDialog';
import Notcompletedysl from './modules/user/Notcompletedysl';
import Trialapplicationysl from './modules/login/Trialapplicationysl';
import Trialapplicationreview from './modules/user/Trialapplicationreview';
import Addcourses from "./modules/courses/coursesPublic/Addcourses";
import Trialapplication from './modules/login/Trialapplication'
import NotFoundPage from './NotFoundPage'
@ -41,6 +42,7 @@ import {initAxiosInterceptors} from './AppConfig'
// tpi需要这个来加载css
import {TPMIndexHOC} from './modules/tpm/TPMIndexHOC';
const theme = createMuiTheme({
palette: {
primary: {
@ -259,7 +261,7 @@ class App extends Component {
render() {
// let {isRenders} = this.state;
return (
<LocaleProvider locale={zhCN}>
@ -270,6 +272,7 @@ class App extends Component {
<Notcompletedysl {...this.props} {...this.state}></Notcompletedysl>
<Trialapplicationysl {...this.props} {...this.state}></Trialapplicationysl>
<Trialapplicationreview {...this.props} {...this.state}></Trialapplicationreview>
<Addcourses {...this.props} {...this.state}/>
{/*{*/}
{/* isRender === true?*/}
{/* <LoginDialog></LoginDialog> : ""*/}

@ -28,6 +28,20 @@ class Addcourses extends Component{
}
componentDidMount() {
axios.interceptors.response.use((response) => {
if (response != undefined)
if (response && response.data.status === 409) {
this.setState({
Addcoursestypes: true
})
}
return response;
}, (error) => {
//TODO 这里如果样式变了会出现css不加载的情况
});
let {Addcoursestype}=this.props;
this.setState({
@ -102,7 +116,7 @@ class Addcourses extends Component{
hidetojoinclass=()=>{
this.props.hideAddcoursestype();
// console.log(this.props)
this.setState({
invite_code:undefined,
@ -114,9 +128,10 @@ class Addcourses extends Component{
Checkboxteachingtype:false,
professor:null,
assistant_professor:null,
student:null
student:null,
Addcoursestypes:false
})
this.props.hideAddcoursestype();
}
submitasyn=(course_id)=>{
@ -285,7 +300,8 @@ class Addcourses extends Component{
loadtype,
modalsType,
modalsTopval,
modalSave
modalSave,
Addcoursestypes
}=this.state;
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
return(
@ -301,7 +317,7 @@ class Addcourses extends Component{
keyboard={false}
className={"HomeworkModal"}
title="加入课堂"
visible={Addcoursestype}
visible={Addcoursestype===undefined?Addcoursestypes:Addcoursestype}
closable={false}
footer={null}
destroyOnClose={true}

@ -91,7 +91,7 @@ class PathModal extends Component{
this.setState({
type:types,
page:1,
newshixunmodallist:undefined
newshixunmodallist:[]
})
this.funshixunpathlist(Searchvalue,types,true,1)
}
@ -103,10 +103,11 @@ class PathModal extends Component{
})
}
SenttotheSearch=(value)=>{
let{type}=this.state;
this.setState({
page:1,
newshixunmodallist:[]
})
let{type}=this.state;
this.funshixunpathlist(value,type,true,1)
}
@ -269,7 +270,7 @@ class PathModal extends Component{
`}
</style>
<div className="over210 pl20 pr20"
{ newshixunmodallist&&newshixunmodallist.length===0?"":<div className="over210 pl20 pr20"
onScroll={this.contentViewScrolledit}
style={{"Height":"204px"}}>
<Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit}>
@ -298,7 +299,7 @@ class PathModal extends Component{
})
}
</Checkbox.Group>
</div>
</div>}
{ this.state.patheditarrytype===true?<span className={"color-red"}>{this.state.patheditarryvalue}</span>:""}
<div className="mt20 marginauto clearfix edu-txt-center">
<a className="pop_close task-btn mr30 margin-tp26" onClick={this.hidecouseShixunModal}>取消</a>

@ -142,11 +142,15 @@ class DetailCardsEditAndAdd extends Component{
//打开选择实训弹框初始化tag标签和列表
changeTag=(id,search)=>{
this.setState({
ChooseShixunListshixun_list:[],
page:1,
hometypepvisible:true,
})
let pathId=this.props.pathid;
let {page}=this.state;
let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+1
if(search!="" && search!=undefined){
url+="&search="+search;
@ -157,11 +161,6 @@ class DetailCardsEditAndAdd extends Component{
axios.get(url).then((result)=>{
if(result.status===200){
this.setState({
ChooseShixunListshixun_list:[],
page:1
})
this.setState({
ChooseShixunList:result.data,
hometypepvisible:false,
@ -296,11 +295,10 @@ class DetailCardsEditAndAdd extends Component{
contentViewScrolladd=(e)=>{
let {page}=this.state;
//滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
// console.log("到达底部");
if(page!=1){
debugger
this.setState({
hometypepvisible:true
})
@ -334,7 +332,7 @@ class DetailCardsEditAndAdd extends Component{
}).catch((error)=>{
console.log(error);
})
}
}
@ -493,7 +491,7 @@ class DetailCardsEditAndAdd extends Component{
`
}
</style>
<div className="over180 pl20 pr20"
{ChooseShixunListshixun_list && ChooseShixunListshixun_list.length===0?"": <div className="over180 pl20 pr20"
onScroll={this.contentViewScrolladd}
>
<Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit}>
@ -520,7 +518,7 @@ class DetailCardsEditAndAdd extends Component{
})
}
</Checkbox.Group>
</div>
</div>}
<div className="mt20 marginauto clearfix edu-txt-center">
<a className="pop_close task-btn mr30 margin-tp26" onClick={this.cloasShixunBox}>取消</a>
<a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.clickShixunchoose}>确定</a>

@ -392,10 +392,12 @@ export default class TPMsettings extends Component {
let departmentsUrl = `/shixuns/departments.json`;
axios.get(departmentsUrl).then((response) => {
if (response.status === 200) {
if (response.data.message === undefined) {
this.setState({
departmentslist: response.data.shools_name
});
}
}
}).catch((error) => {
console.log(error)
});

@ -251,10 +251,12 @@ class Newshixuns extends Component {
let departmentsUrl = `/shixuns/departments.json`;
axios.get(departmentsUrl).then((response) => {
if (response.status === 200) {
if (response.data.message===undefined) {
this.setState({
departmentslist: response.data.shools_name
});
}
}
}).catch((error) => {
console.log(error)
});
@ -496,7 +498,9 @@ class Newshixuns extends Component {
function fake() {
let departmentsUrl = `/shixuns/departments.json?q=` + currentValue;
axios.get(departmentsUrl).then((response) => {
if (response.data.message===undefined) {
callback(response.data.shools_name);
}
}).catch((error) => {
console.log(error)
});

Loading…
Cancel
Save