diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js index d5d777f3b..9eb14b886 100644 --- a/public/react/src/modules/courses/Resource/index.js +++ b/public/react/src/modules/courses/Resource/index.js @@ -1,5 +1,5 @@ import React,{ Component } from "react"; -import { Input, Checkbox, Table, Tooltip, Pagination,Spin } from "antd"; +import { Input, Checkbox, Table, Tooltip, Pagination,Spin, Divider } from "antd"; import { WordsBtn,on, off, trigger ,getUrl} from 'educoder'; import axios from 'axios'; import Modals from '../../modals/Modals'; @@ -17,6 +17,7 @@ import _ from 'lodash' import './style.css'; import '../css/members.css'; import moment from 'moment'; +import { tuple } from "antd/lib/_util/type"; class Fileslists extends Component{ constructor(props){ super(props); @@ -45,7 +46,9 @@ class Fileslists extends Component{ isSpin:false, course_second_categories:[], title: "", - link: "" + link: "", + //是否展开 + istowshowid:'', } } @@ -458,9 +461,11 @@ class Fileslists extends Component{ checkBoxValues:[] }) if(parseInt(this.props.match.params.main_id)!=parseInt(this.props.coursesids)){ - trigger('attachmentAddlog', parseInt( course_modules&&course_modules.course_modules[0].id)) + console.log(1) + trigger('attachmentAddlog', {id: parseInt( course_modules&&course_modules.course_modules[0].id),name:'目录'}) }else{ - trigger('attachmentAddlog', parseInt(filesId)) + console.log(2) + trigger('attachmentAddlog', {id:parseInt(filesId),name:'资源'}) } } @@ -658,6 +663,13 @@ class Fileslists extends Component{ }) } + //判断二级链接是否显示 + istowshow(item){ + this.setState({ + istowshowid:item.id + }) + } + moveTos=(id)=>{ let {checkBoxValues} = this.state; @@ -773,7 +785,9 @@ class Fileslists extends Component{ this.setState({ course_groupslist:id }) - } + } + + render(){ let { searchValue, checkBoxValues, @@ -808,7 +822,6 @@ class Fileslists extends Component{ } = this.state; let category_id= this.props.match.params.category_id; - // console.log(this.state.course_groups) return( @@ -998,10 +1011,14 @@ class Fileslists extends Component{ .courseSecond{ margin-left: 10px; padding: 10px; - } + } + .bordboom{ + border-bottom: 1 solid red; + } `} -