diff --git a/app/views/hacks/edit.json.jbuilder b/app/views/hacks/edit.json.jbuilder index e6fee65b8..8e58569bc 100644 --- a/app/views/hacks/edit.json.jbuilder +++ b/app/views/hacks/edit.json.jbuilder @@ -1,5 +1,8 @@ # 编程内容 -json.(@hack, :name, :description, :language, :difficult, :category, :time_limit, :open_or_not, :status) +json.(@hack, :name, :description, :language, :difficult, :category, :time_limit, :open_or_not, :status, :sub_discipline_id) + +# 课程 +json.tag_discipline_id @hack.tag_discipline_containers.pluck(:tag_discipline_id) # 代码 json.language @hack.language diff --git a/public/react/src/modules/question/component/Contentpart.js b/public/react/src/modules/question/component/Contentpart.js index 50fce4742..dbb1b4817 100644 --- a/public/react/src/modules/question/component/Contentpart.js +++ b/public/react/src/modules/question/component/Contentpart.js @@ -199,6 +199,7 @@ class Contentpart extends Component { : this.props.Contentdata.items.map((object, index) => { return ( this.props.getitem_basketss(id)} getitem_baskets={(e)=>this.props.getitem_baskets(e)} showmodels={(e)=>this.props.showmodels(e)} diff --git a/public/react/src/modules/testpaper/Testpaperlibrary.js b/public/react/src/modules/testpaper/Testpaperlibrary.js index 89768e2fc..6c07032ad 100644 --- a/public/react/src/modules/testpaper/Testpaperlibrary.js +++ b/public/react/src/modules/testpaper/Testpaperlibrary.js @@ -97,6 +97,12 @@ class Testpaperlibrary extends Component { this.setState({ keywords: value, }) + var data={ + page:1, + per_page:10, + public:this.state.defaultActiveKey, + } + this.getdata(data); } callback = (key) => { this.setState({ @@ -110,16 +116,6 @@ class Testpaperlibrary extends Component { this.getdata(data); } - //搜索框的内容 - setdatafunsval=()=>{ - - } - -//搜索按钮 - setdatafuns=()=>{ - - } - //获取数据 getdata=(data)=>{ const url = `/examination_banks.json`; diff --git a/public/react/src/modules/testpaper/component/Contentpart.js b/public/react/src/modules/testpaper/component/Contentpart.js index 765be880f..042aad2e7 100644 --- a/public/react/src/modules/testpaper/component/Contentpart.js +++ b/public/react/src/modules/testpaper/component/Contentpart.js @@ -37,6 +37,7 @@ class Contentpart extends Component { this.props.history.push('/question'); } + render() { let {page}=this.state; let {defaultActiveKey}=this.props; @@ -189,7 +190,7 @@ class Contentpart extends Component { : this.props.Contentdata.exams.map((object, index) => { return ( - + )