Merge branches 'dev_aliyun' and 'dev_newshixunModel' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun
	
		
	
				
					
				
			
						commit
						749366c37e
					
				@ -0,0 +1,252 @@
 | 
				
			||||
.searchinput{
 | 
				
			||||
    width: 800px;
 | 
				
			||||
    margin-top: 53px;
 | 
				
			||||
}
 | 
				
			||||
.newshixunheadersear{
 | 
				
			||||
    display: flex;
 | 
				
			||||
    justify-content: center;
 | 
				
			||||
}
 | 
				
			||||
.packinput .ant-input{
 | 
				
			||||
    height: 55px;
 | 
				
			||||
    width:663px !important;
 | 
				
			||||
    font-size: 14px;
 | 
				
			||||
    /*color: #681616 !important;*/
 | 
				
			||||
    border-color: #E1EDF8 !important;
 | 
				
			||||
    padding-left: 20px;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.packinput .ant-input-group-addon .ant-btn{
 | 
				
			||||
    width:137px !important;
 | 
				
			||||
    font-size: 18px;
 | 
				
			||||
    height: 53px;
 | 
				
			||||
    background:rgba(76,172,255,1);
 | 
				
			||||
 | 
				
			||||
}
 | 
				
			||||
.tabtitle{
 | 
				
			||||
    height: 62px !important;
 | 
				
			||||
    box-shadow: 3px 10px 21px 0px rgba(76, 76, 76, 0.15);
 | 
				
			||||
    border-radius: 6px;
 | 
				
			||||
    background: #fff;
 | 
				
			||||
    display: flex;
 | 
				
			||||
    justify-content: center;
 | 
				
			||||
}
 | 
				
			||||
.tabtitles2{
 | 
				
			||||
    background: #fff;
 | 
				
			||||
    height: 62px !important;
 | 
				
			||||
    width: 1200px;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.tabtitless{
 | 
				
			||||
    height: 62px !important;
 | 
				
			||||
    line-height: 62px !important;
 | 
				
			||||
 | 
				
			||||
}
 | 
				
			||||
.tabtitle1{
 | 
				
			||||
 | 
				
			||||
}
 | 
				
			||||
.tabtitle2{
 | 
				
			||||
    margin-left: 30px !important;
 | 
				
			||||
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
.counttit{
 | 
				
			||||
    display: flex;
 | 
				
			||||
    justify-content: center;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.counttittext{
 | 
				
			||||
    text-align: left;
 | 
				
			||||
    width: 1200px;
 | 
				
			||||
    height: 18px;
 | 
				
			||||
    color: #888888;
 | 
				
			||||
    font-size: 13px;
 | 
				
			||||
    margin-top: 24px;
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
}
 | 
				
			||||
.counttittexts{
 | 
				
			||||
    color: #4CACFF !important;
 | 
				
			||||
    font-size: 13px;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.mainx{
 | 
				
			||||
    display: flex;
 | 
				
			||||
    justify-content: center;
 | 
				
			||||
    margin-top: 17px;
 | 
				
			||||
}
 | 
				
			||||
.project-packages-list{
 | 
				
			||||
 | 
				
			||||
}
 | 
				
			||||
.project-package-item{
 | 
				
			||||
    display: -webkit-flex;
 | 
				
			||||
    display: flex;
 | 
				
			||||
    flex-direction:column;
 | 
				
			||||
    margin-bottom: 20px;
 | 
				
			||||
    padding: 20px;
 | 
				
			||||
    background: white;
 | 
				
			||||
    /* box-shadow: 1px 3px 3px 1px rgba(156,156,156,0.16); */
 | 
				
			||||
 | 
				
			||||
}
 | 
				
			||||
.xuxianpro{
 | 
				
			||||
    height: 20px;
 | 
				
			||||
    border-bottom: 1px dashed;
 | 
				
			||||
    border-color: #EAEAEA;
 | 
				
			||||
    margin-bottom: 18px;
 | 
				
			||||
}
 | 
				
			||||
.magr11{
 | 
				
			||||
    margin-top: 11px;
 | 
				
			||||
}
 | 
				
			||||
.highlight{
 | 
				
			||||
    color: #4CACFF;
 | 
				
			||||
}
 | 
				
			||||
.fonttext{
 | 
				
			||||
    font-size: 20px;
 | 
				
			||||
    font-weight:bold;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.fontextcolor{
 | 
				
			||||
    color:  #777777;
 | 
				
			||||
}
 | 
				
			||||
.tzbq{
 | 
				
			||||
    margin-left: 68px;
 | 
				
			||||
}
 | 
				
			||||
.tzbqx{
 | 
				
			||||
    /* margin-left: 24px; */
 | 
				
			||||
}
 | 
				
			||||
.bjyss{
 | 
				
			||||
    background: #F8F8F8;
 | 
				
			||||
}
 | 
				
			||||
.zj{
 | 
				
			||||
    overflow:hidden;
 | 
				
			||||
    text-overflow:ellipsis;
 | 
				
			||||
    white-space:nowrap
 | 
				
			||||
}
 | 
				
			||||
.ziticor{
 | 
				
			||||
    color: #777777;
 | 
				
			||||
    font-size: 13px;
 | 
				
			||||
}
 | 
				
			||||
.foohter{
 | 
				
			||||
    margin-top: 20px;
 | 
				
			||||
    display: flex;
 | 
				
			||||
    flex-direction:row;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.maxwidth1100{
 | 
				
			||||
    max-width: 1100px;
 | 
				
			||||
    overflow:hidden;
 | 
				
			||||
    text-overflow:ellipsis;
 | 
				
			||||
    white-space:nowrap;
 | 
				
			||||
    font-size: 18px !important;
 | 
				
			||||
    font-weight: 500;
 | 
				
			||||
    color: rgba(51,51,51,1) !important;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
.newshixunmodelmidfont{
 | 
				
			||||
    font-size: 14px;
 | 
				
			||||
    font-weight: 400;
 | 
				
			||||
    color: #999999;
 | 
				
			||||
    margin-top: 15px;
 | 
				
			||||
    margin-left: 30px;
 | 
				
			||||
    overflow: hidden;
 | 
				
			||||
    -o-text-overflow: ellipsis;
 | 
				
			||||
    text-overflow: ellipsis;
 | 
				
			||||
    max-width: 1100px;
 | 
				
			||||
    text-overflow: ellipsis;
 | 
				
			||||
    display: -webkit-box;
 | 
				
			||||
    -webkit-line-clamp: 2;
 | 
				
			||||
    -webkit-box-orient: vertical;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.newshixunmodelbotfont{
 | 
				
			||||
    font-size:12px;
 | 
				
			||||
    font-weight:400;
 | 
				
			||||
    color:rgba(102,102,102,1);
 | 
				
			||||
    margin-top: 15px;
 | 
				
			||||
    margin-left: 30px;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.newshixunlist{
 | 
				
			||||
    max-height:227px;
 | 
				
			||||
    width: 1200px;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.xuxianpro {
 | 
				
			||||
    height: 20px;
 | 
				
			||||
    border-bottom: 1px dashed;
 | 
				
			||||
    border-color: #eaeaea;
 | 
				
			||||
    margin-bottom: 18px;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.newshixunpd030{
 | 
				
			||||
    padding: 0px 30px;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.pd303010{
 | 
				
			||||
    padding: 30px 30px 10px;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.newshixunfont12{
 | 
				
			||||
    font-size: 12px;
 | 
				
			||||
    color: rgba(76,172,255,1);
 | 
				
			||||
    line-height: 21px;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.newshixunmode{
 | 
				
			||||
    width: 100px;
 | 
				
			||||
    height: 38px;
 | 
				
			||||
    border-radius: 3px;
 | 
				
			||||
    border: 1px solid rgba(191,191,191,1);
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.ntopsj {
 | 
				
			||||
    position: absolute;
 | 
				
			||||
    top: -4px;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.nyslbottomsj {
 | 
				
			||||
    position: absolute;
 | 
				
			||||
    bottom: -6px;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.inherits .ant-dropdown-menu-item{
 | 
				
			||||
    cursor: inherit !important;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.menus{
 | 
				
			||||
    width: 91px;
 | 
				
			||||
    text-align: center;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.newshixunmodelbotfont span{
 | 
				
			||||
    display: inline-block;
 | 
				
			||||
    margin-right: 34px;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.minhegiht300{
 | 
				
			||||
    min-height: 300px;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.newshixunlist:hover{
 | 
				
			||||
    box-shadow: 1px 6px 16px rgba(156,156,156,0.16);
 | 
				
			||||
    opacity: 1;
 | 
				
			||||
    border-radius: 2px;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.newshixun500{
 | 
				
			||||
    max-width: 500px;
 | 
				
			||||
    overflow: hidden;
 | 
				
			||||
    -o-text-overflow: ellipsis;
 | 
				
			||||
    text-overflow: ellipsis;
 | 
				
			||||
    white-space: nowrap;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.mt3 {
 | 
				
			||||
    margin-top: 3px !important;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
.highlight{
 | 
				
			||||
    color: #4CACFF;
 | 
				
			||||
}
 | 
				
			||||
 | 
				
			||||
@ -1,120 +1,122 @@
 | 
				
			||||
import React,{ Component } from "react";
 | 
				
			||||
import { Modal,Checkbox,Select,Input,Tooltip} from "antd";
 | 
				
			||||
import axios from'axios';
 | 
				
			||||
import ShixunModal from './ShixunModal'
 | 
				
			||||
 | 
				
			||||
const Option = Select.Option;
 | 
				
			||||
const Search = Input.Search;
 | 
				
			||||
class ShixunChooseModal extends Component{
 | 
				
			||||
  constructor(props){
 | 
				
			||||
    super(props);
 | 
				
			||||
    this.state={
 | 
				
			||||
      shixunmodal: false,
 | 
				
			||||
      hometypepvisible: false,
 | 
				
			||||
    }
 | 
				
			||||
  }
 | 
				
			||||
  setVisible = (visible) => {
 | 
				
			||||
    if (visible) {
 | 
				
			||||
      this.createCommonWork()
 | 
				
			||||
    } else {
 | 
				
			||||
      this.setState({ shixunmodal: visible })
 | 
				
			||||
    }
 | 
				
			||||
  }
 | 
				
			||||
  hidecouseShixunModal = () => {
 | 
				
			||||
    this.setVisible(false)
 | 
				
			||||
  }
 | 
				
			||||
  componentDidMount() {
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
  }
 | 
				
			||||
  funshixunmodallist=(search,type,loading,page)=>{
 | 
				
			||||
    let{newshixunmodallist}=this.state;
 | 
				
			||||
    let newshixunmodallists=[]
 | 
				
			||||
    if(page>1){
 | 
				
			||||
      newshixunmodallists=newshixunmodallist;
 | 
				
			||||
    }
 | 
				
			||||
    this.setState({
 | 
				
			||||
      hometypepvisible:loading
 | 
				
			||||
    })
 | 
				
			||||
    let coursesId=this.props.match.params.coursesId;
 | 
				
			||||
    let url = this.props.shixunsUrl || "/courses/"+coursesId+"/homework_commons/shixuns.json";
 | 
				
			||||
 | 
				
			||||
    axios.get(url, {
 | 
				
			||||
      params: {
 | 
				
			||||
        search: search,
 | 
				
			||||
        type:type,
 | 
				
			||||
        page:page
 | 
				
			||||
      }
 | 
				
			||||
    }).then((result)=>{
 | 
				
			||||
      if(result.status===200){
 | 
				
			||||
 | 
				
			||||
        let  shixun_list=result.data.shixun_list;
 | 
				
			||||
        for(var i=0; i<shixun_list.length;i++){
 | 
				
			||||
          newshixunmodallists.push(shixun_list[i])
 | 
				
			||||
        }
 | 
				
			||||
        this.setState({
 | 
				
			||||
          shixunmodal:true,
 | 
				
			||||
          shixunmodallist:result.data,
 | 
				
			||||
          newshixunmodallist:newshixunmodallists,
 | 
				
			||||
          hometypepvisible:false
 | 
				
			||||
        })
 | 
				
			||||
      }
 | 
				
			||||
    }).catch((error)=>{
 | 
				
			||||
      console.log(error);
 | 
				
			||||
    })
 | 
				
			||||
  }
 | 
				
			||||
  funpatheditarry=(list)=>{
 | 
				
			||||
    this.setState({
 | 
				
			||||
      patheditarry:list
 | 
				
			||||
    })
 | 
				
			||||
  }
 | 
				
			||||
  createCommonWork=()=>{
 | 
				
			||||
 | 
				
			||||
    this.setState({
 | 
				
			||||
      hometypepvisible:true,
 | 
				
			||||
      patheditarry:[]
 | 
				
			||||
    })
 | 
				
			||||
 | 
				
			||||
    let coursesId=this.props.match.params.coursesId;
 | 
				
			||||
    let url = this.props.shixunsUrl || "/courses/"+coursesId+"/homework_commons/shixuns.json";
 | 
				
			||||
 | 
				
			||||
    axios.get(url).then((result)=>{
 | 
				
			||||
      if(result.status===200){
 | 
				
			||||
        this.setState({
 | 
				
			||||
          shixunmodal:true,
 | 
				
			||||
          shixunmodallist:result.data,
 | 
				
			||||
          hometypepvisible:false,
 | 
				
			||||
          newshixunmodallist:result.data.shixun_list,
 | 
				
			||||
        })
 | 
				
			||||
      }
 | 
				
			||||
    }).catch((error)=>{
 | 
				
			||||
      console.log(error);
 | 
				
			||||
    })
 | 
				
			||||
  }
 | 
				
			||||
  render(){
 | 
				
			||||
     let {Searchvalue,type,category_id, datas, shixunmodal, shixunmodallist
 | 
				
			||||
          , hometypepvisible, newshixunmodallist, patheditarry }=this.state;
 | 
				
			||||
     let {visible}=this.props;
 | 
				
			||||
 | 
				
			||||
     // console.log(patheditarry)
 | 
				
			||||
    return(
 | 
				
			||||
      <ShixunModal
 | 
				
			||||
        datas={datas}
 | 
				
			||||
        category_id={this.props.match.params.category_id}
 | 
				
			||||
        visible={shixunmodal}
 | 
				
			||||
        shixunmodallist={shixunmodallist}
 | 
				
			||||
        funshixunmodallist={(search,type,loading,page)=>this.funshixunmodallist(search,type,loading,page)}
 | 
				
			||||
        hometypepvisible={hometypepvisible}
 | 
				
			||||
        hidecouseShixunModal={this.hidecouseShixunModal}
 | 
				
			||||
        newshixunmodallist={newshixunmodallist}
 | 
				
			||||
        coursesId={this.props.match.params.coursesId}
 | 
				
			||||
        courseshomeworkstart={(category_id,homework_ids)=> this.props.newhomeworkstart 
 | 
				
			||||
                && this.props.newhomeworkstart(category_id,homework_ids)}
 | 
				
			||||
        funpatheditarry={(patheditarry)=>this.funpatheditarry(patheditarry)}
 | 
				
			||||
        patheditarry={patheditarry}
 | 
				
			||||
        {...this.props}
 | 
				
			||||
      ></ShixunModal>
 | 
				
			||||
    )
 | 
				
			||||
  }
 | 
				
			||||
}
 | 
				
			||||
import React,{ Component } from "react";
 | 
				
			||||
import { Modal,Checkbox,Select,Input,Tooltip} from "antd";
 | 
				
			||||
import axios from'axios';
 | 
				
			||||
import NewShixunModel from '../coursesPublic/NewShixunModel';
 | 
				
			||||
 | 
				
			||||
const Option = Select.Option;
 | 
				
			||||
const Search = Input.Search;
 | 
				
			||||
class ShixunChooseModal extends Component{
 | 
				
			||||
  constructor(props){
 | 
				
			||||
    super(props);
 | 
				
			||||
    this.state={
 | 
				
			||||
      shixunmodal: false,
 | 
				
			||||
      hometypepvisible: false,
 | 
				
			||||
    }
 | 
				
			||||
  }
 | 
				
			||||
  setVisible = (visible) => {
 | 
				
			||||
    // if (visible) {
 | 
				
			||||
    //   this.createCommonWork()
 | 
				
			||||
    // } else {
 | 
				
			||||
    //
 | 
				
			||||
    // }
 | 
				
			||||
		this.setState({ shixunmodal: visible })
 | 
				
			||||
  }
 | 
				
			||||
  hidecouseShixunModal = () => {
 | 
				
			||||
    this.setVisible(false)
 | 
				
			||||
  }
 | 
				
			||||
  componentDidMount() {
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
  }
 | 
				
			||||
  funshixunmodallist=(search,type,loading,page)=>{
 | 
				
			||||
    let{newshixunmodallist}=this.state;
 | 
				
			||||
    let newshixunmodallists=[]
 | 
				
			||||
    if(page>1){
 | 
				
			||||
      newshixunmodallists=newshixunmodallist;
 | 
				
			||||
    }
 | 
				
			||||
    this.setState({
 | 
				
			||||
      hometypepvisible:loading
 | 
				
			||||
    })
 | 
				
			||||
    let coursesId=this.props.match.params.coursesId;
 | 
				
			||||
    let url = this.props.shixunsUrl || "/courses/"+coursesId+"/homework_commons/shixuns.json";
 | 
				
			||||
 | 
				
			||||
    axios.get(url, {
 | 
				
			||||
      params: {
 | 
				
			||||
        search: search,
 | 
				
			||||
        type:type,
 | 
				
			||||
        page:page
 | 
				
			||||
      }
 | 
				
			||||
    }).then((result)=>{
 | 
				
			||||
      if(result.status===200){
 | 
				
			||||
 | 
				
			||||
        let  shixun_list=result.data.shixun_list;
 | 
				
			||||
        for(var i=0; i<shixun_list.length;i++){
 | 
				
			||||
          newshixunmodallists.push(shixun_list[i])
 | 
				
			||||
        }
 | 
				
			||||
        this.setState({
 | 
				
			||||
          shixunmodal:true,
 | 
				
			||||
          shixunmodallist:result.data,
 | 
				
			||||
          newshixunmodallist:newshixunmodallists,
 | 
				
			||||
          hometypepvisible:false
 | 
				
			||||
        })
 | 
				
			||||
      }
 | 
				
			||||
    }).catch((error)=>{
 | 
				
			||||
      console.log(error);
 | 
				
			||||
    })
 | 
				
			||||
  }
 | 
				
			||||
  funpatheditarry=(list)=>{
 | 
				
			||||
    this.setState({
 | 
				
			||||
      patheditarry:list
 | 
				
			||||
    })
 | 
				
			||||
  }
 | 
				
			||||
  createCommonWork=()=>{
 | 
				
			||||
 | 
				
			||||
    this.setState({
 | 
				
			||||
      hometypepvisible:true,
 | 
				
			||||
      patheditarry:[]
 | 
				
			||||
    })
 | 
				
			||||
 | 
				
			||||
    let coursesId=this.props.match.params.coursesId;
 | 
				
			||||
    let url = this.props.shixunsUrl || "/courses/"+coursesId+"/homework_commons/shixuns.json";
 | 
				
			||||
 | 
				
			||||
    axios.get(url).then((result)=>{
 | 
				
			||||
      if(result.status===200){
 | 
				
			||||
        this.setState({
 | 
				
			||||
          shixunmodal:true,
 | 
				
			||||
          shixunmodallist:result.data,
 | 
				
			||||
          hometypepvisible:false,
 | 
				
			||||
          newshixunmodallist:result.data.shixun_list,
 | 
				
			||||
        })
 | 
				
			||||
      }
 | 
				
			||||
    }).catch((error)=>{
 | 
				
			||||
      console.log(error);
 | 
				
			||||
    })
 | 
				
			||||
  }
 | 
				
			||||
  render(){
 | 
				
			||||
     let {Searchvalue,type,category_id, datas, shixunmodal, shixunmodallist
 | 
				
			||||
          , hometypepvisible, newshixunmodallist, patheditarry }=this.state;
 | 
				
			||||
     let {visible}=this.props;
 | 
				
			||||
 | 
				
			||||
     // console.log(patheditarry)
 | 
				
			||||
    return(
 | 
				
			||||
			shixunmodal===true?<NewShixunModel
 | 
				
			||||
				statustype={'published'}
 | 
				
			||||
        datas={datas}
 | 
				
			||||
        category_id={this.props.match.params.category_id}
 | 
				
			||||
				NewShixunModelType={shixunmodal}
 | 
				
			||||
        shixunmodallist={shixunmodallist}
 | 
				
			||||
        funshixunmodallist={(search,type,loading,page)=>this.funshixunmodallist(search,type,loading,page)}
 | 
				
			||||
        hometypepvisible={hometypepvisible}
 | 
				
			||||
				hideNewShixunModelType={this.hidecouseShixunModal}
 | 
				
			||||
        newshixunmodallist={newshixunmodallist}
 | 
				
			||||
        coursesId={this.props.match.params.coursesId}
 | 
				
			||||
        courseshomeworkstart={(category_id,homework_ids)=> this.props.newhomeworkstart 
 | 
				
			||||
                && this.props.newhomeworkstart(category_id,homework_ids)}
 | 
				
			||||
        funpatheditarry={(patheditarry)=>this.funpatheditarry(patheditarry)}
 | 
				
			||||
        patheditarry={patheditarry}
 | 
				
			||||
        {...this.props}
 | 
				
			||||
      ></NewShixunModel>:""
 | 
				
			||||
    )
 | 
				
			||||
  }
 | 
				
			||||
}
 | 
				
			||||
export default ShixunChooseModal;
 | 
				
			||||
					Loading…
					
					
				
		Reference in new issue