调整重命名体验

dev_forum
杨树明 6 years ago
parent 683161b1ec
commit beddaecc4d

@ -49,8 +49,19 @@ class Fileslists extends Component{
this.seactall(parseInt(this.props.match.params.Id),1) this.seactall(parseInt(this.props.match.params.Id),1)
} }
this.updadatalist(); this.updadatalist();
on('updateNavSuccess', this.updateNavSuccess)
} }
updateNavSuccess=()=>{
this.setState({
isSpin:true
})
if(this.props.match.params.main_id){
this.seactall();
}else if(this.props.match.params.Id){
this.seactall(parseInt(this.props.match.params.Id),1)
}
}
componentDidUpdate = (prevProps) => { componentDidUpdate = (prevProps) => {
if(prevProps.match.params.main_id != this.props.match.params.main_id){ if(prevProps.match.params.main_id != this.props.match.params.main_id){
this.setState({ this.setState({

@ -55,12 +55,13 @@ class CoursesBanner extends Component {
let courseId = this.props.match.params.coursesId; let courseId = this.props.match.params.coursesId;
let url = "/courses/" + courseId + "/top_banner.json" let url = "/courses/" + courseId + "/top_banner.json"
axios.get(url).then((result) => { axios.get(url).then((result) => {
let data = result.data; debugger
this.setState({ if( result!=undefined){
coursedata: data let data = result.data;
}) this.setState({
// console.log(data) coursedata: data
})
}
}) })
} }
showeditmenu = () => { showeditmenu = () => {

@ -5,7 +5,7 @@ import ExerciseListItem from './ExerciseListItem'
import axios from 'axios'; import axios from 'axios';
import Modals from '../../modals/Modals'; import Modals from '../../modals/Modals';
import '../css/members.css' import '../css/members.css'
import { WordsBtn } from 'educoder' import { WordsBtn,on, off, trigger } from 'educoder'
import '../css/busyWork.css' import '../css/busyWork.css'
import _ from 'lodash'; import _ from 'lodash';
import moment from 'moment' import moment from 'moment'
@ -54,8 +54,13 @@ class Exercise extends Component{
// 加载列表 // 加载列表
componentDidMount(){ componentDidMount(){
this.reloadList(); this.reloadList();
on('updateNavSuccess', this.updateNavSuccess)
} }
updateNavSuccess=()=>{
this.reloadList();
}
reloadList=()=>{ reloadList=()=>{
this.setState({ this.setState({
isSpin:true isSpin:true

@ -1,26 +1,18 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip ,Spin} from "antd"; import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip ,Spin} from "antd";
import CourseLayoutcomponent from '../common/CourseLayoutComponent'; import {WordsBtn, on, off, trigger } from 'educoder';
import HomeworkModal from "../coursesPublic/HomeworkModal"; import HomeworkModal from "../coursesPublic/HomeworkModal";
import ShixunModal from "../coursesPublic/ShixunModal";
import PathModal from "../coursesPublic/PathModal";
import AddcoursesNav from "../coursesPublic/AddcoursesNav"; import AddcoursesNav from "../coursesPublic/AddcoursesNav";
import ImmediatelyPublish from './pollPublicBtn/ImmediatelyPublish' import ImmediatelyPublish from './pollPublicBtn/ImmediatelyPublish';
import ImmediatelyEnd from './pollPublicBtn/ImmediatelyEnd' import ImmediatelyEnd from './pollPublicBtn/ImmediatelyEnd';
import PollListItem from './PollListItem' import PollListItem from './PollListItem';
import NoneData from '../coursesPublic/NoneData' import NoneData from '../coursesPublic/NoneData';
import UseBank from '../busyWork/UseBank' import UseBank from '../busyWork/UseBank';
import _ from 'lodash'; import _ from 'lodash';
import '../css/members.css';
import '../css/members.css' import '../css/busyWork.css';
import '../css/busyWork.css' import Modals from '../../modals/Modals';
import axios from 'axios';
import { WordsBtn } from 'educoder'
import Modals from '../../modals/Modals'
import axios from 'axios'
const Search = Input.Search; const Search = Input.Search;
@ -144,7 +136,16 @@ class Poll extends Component{
}) })
let{type,StudentList_value,page}=this.state let{type,StudentList_value,page}=this.state
this.InitList(type,StudentList_value,page); this.InitList(type,StudentList_value,page);
on('updateNavSuccess', this.updateNavSuccess)
} }
updateNavSuccess=()=>{
this.setState({
isSpin:true
})
let{type,StudentList_value,page}=this.state
this.InitList(type,StudentList_value,page);
}
//切换分页 //切换分页
changePage=(pageNumber)=>{ changePage=(pageNumber)=>{

@ -57,29 +57,52 @@ class ShixunHomework extends Component{
isSpin:false isSpin:false
} }
} }
updateNavSuccess=()=>{
this.setState({
isSpin:true
})
if(this.props.match.params.main_id){
this.setState({
isSpin:true
})
this.seactall();
if(this.props.isAdmin()===true){
this.updadatalist()
}
}else if(this.props.match.params.category_id){
this.setState({
isSpin:true
})
this.seactall(parseInt(this.props.match.params.category_id))
if(this.props.isAdmin()===true){
this.updadatalist()
}
}
}
componentDidMount() { componentDidMount() {
this.setState({ this.setState({
isSpin:true isSpin:true
}) })
if(this.props.match.params.main_id){ if(this.props.match.params.main_id){
this.setState({ this.setState({
isSpin:true isSpin:true
}) })
this.seactall(); this.seactall();
if(this.props.isAdmin()===true){ if(this.props.isAdmin()===true){
this.updadatalist() this.updadatalist()
} }
}else if(this.props.match.params.category_id){ }else if(this.props.match.params.category_id){
this.setState({ this.setState({
isSpin:true isSpin:true
}) })
this.seactall(parseInt(this.props.match.params.category_id)) this.seactall(parseInt(this.props.match.params.category_id))
if(this.props.isAdmin()===true){ if(this.props.isAdmin()===true){
this.updadatalist() this.updadatalist()
} }
} }
on('updateNavSuccess', this.updateNavSuccess)
} }
seactall=(id)=>{ seactall=(id)=>{
this.setState({ this.setState({

Loading…
Cancel
Save