调整重命名体验

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.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) => {
if(prevProps.match.params.main_id != this.props.match.params.main_id){
this.setState({

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

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

@ -1,26 +1,18 @@
import React,{ Component } from "react";
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 ShixunModal from "../coursesPublic/ShixunModal";
import PathModal from "../coursesPublic/PathModal";
import AddcoursesNav from "../coursesPublic/AddcoursesNav";
import ImmediatelyPublish from './pollPublicBtn/ImmediatelyPublish'
import ImmediatelyEnd from './pollPublicBtn/ImmediatelyEnd'
import PollListItem from './PollListItem'
import NoneData from '../coursesPublic/NoneData'
import UseBank from '../busyWork/UseBank'
import ImmediatelyPublish from './pollPublicBtn/ImmediatelyPublish';
import ImmediatelyEnd from './pollPublicBtn/ImmediatelyEnd';
import PollListItem from './PollListItem';
import NoneData from '../coursesPublic/NoneData';
import UseBank from '../busyWork/UseBank';
import _ from 'lodash';
import '../css/members.css'
import '../css/busyWork.css'
import { WordsBtn } from 'educoder'
import Modals from '../../modals/Modals'
import axios from 'axios'
import '../css/members.css';
import '../css/busyWork.css';
import Modals from '../../modals/Modals';
import axios from 'axios';
const Search = Input.Search;
@ -144,7 +136,16 @@ class Poll extends Component{
})
let{type,StudentList_value,page}=this.state
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)=>{

@ -57,29 +57,52 @@ class ShixunHomework extends Component{
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() {
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()
}
}
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()
}
}
on('updateNavSuccess', this.updateNavSuccess)
}
seactall=(id)=>{
this.setState({

Loading…
Cancel
Save