diff --git a/public/react/src/modules/question/Paperreview.js b/public/react/src/modules/question/Paperreview.js index c9da91fda..47593ea2d 100644 --- a/public/react/src/modules/question/Paperreview.js +++ b/public/react/src/modules/question/Paperreview.js @@ -289,7 +289,7 @@ class Paperreview extends Component { : this.getcontentMdRef(ref)} + getJudquestio={(ref) => this.getcontentMdRef(ref)} setitem_type={(item) => this.setitem_type(item)} > diff --git a/public/react/src/modules/question/Paperreview_item.js b/public/react/src/modules/question/Paperreview_item.js index 0f3726dcb..562da69c1 100644 --- a/public/react/src/modules/question/Paperreview_item.js +++ b/public/react/src/modules/question/Paperreview_item.js @@ -142,8 +142,8 @@ class Paperreview_item extends Component { onDragEndsss = (result) => { - const ids = this.props.judgement_questions.questions[result.source.index].id; - const positions = this.props.judgement_questions.questions[result.destination.index].position; + const ids = this.props.program_questions.questions[result.source.index].id; + const positions = this.props.program_questions.questions[result.destination.index].position; const url = `/item_baskets/${ids}/adjust_position.json` var data = { position: positions diff --git a/public/react/src/modules/question/Question.js b/public/react/src/modules/question/Question.js index a05a581a3..e2ec41a5e 100644 --- a/public/react/src/modules/question/Question.js +++ b/public/react/src/modules/question/Question.js @@ -10,7 +10,7 @@ import { Drawer, Input } from "antd"; -import Headplugselection from "./component/Headplugselection"; +import Headplugselections from "./component/Headplugselections"; import QuestionModal from "./component/QuestionModal"; import QuestionModals from "./component/QuestionModals"; import Contentpart from "./component/Contentpart"; @@ -18,6 +18,7 @@ import {TPMIndexHOC} from "../tpm/TPMIndexHOC"; import NoneData from './component/NoneData'; import './questioncss/questioncom.css'; import SiderBar from "../tpm/SiderBar"; +import ShixunSearchBar from "../tpm/shixuns/ShixunSearchBar"; class Question extends Component { constructor(props) { @@ -695,12 +696,12 @@ class Question extends Component { showDrawer={() => this.showDrawer()} Headertop={Headertop}/> {/*顶部*/} - this.setdiscipline_id(e)} - setsub_discipline_id={(e)=>this.setsub_discipline_id(e)} - settag_discipline_id={(e)=>this.settag_discipline_id(e)} - > + {/*头部*/} this.getitem_basketss(id)} diff --git a/public/react/src/modules/question/component/Headplugselections.js b/public/react/src/modules/question/component/Headplugselections.js index 23bb9c5a7..896655ff4 100644 --- a/public/react/src/modules/question/component/Headplugselections.js +++ b/public/react/src/modules/question/component/Headplugselections.js @@ -2,13 +2,27 @@ import React, {Component} from "react"; import {Link, NavLink} from 'react-router-dom'; import {WordsBtn, ActionBtn,SnackbarHOC,getImageUrl} from 'educoder'; import axios from 'axios'; -import { - notification, +import './../questioncss/questioncom.css'; +import { Select, Input,Menu, Dropdown,notification, Spin, Table, - Pagination, -} from "antd"; -import './../questioncss/questioncom.css'; + Pagination} from 'antd'; + +import 'antd/lib/style/index.css'; + +import 'antd/lib/select/style/index.css'; + +import 'antd/lib/input/style/index.css'; + +import '../../tpm/shixuns/shixunCss/ShixunSearchBar.css'; + + +const $ = window.$; + +const Option = Select.Option; + +const Search = Input.Search; + class Headplugselections extends Component { constructor(props) { super(props); @@ -18,6 +32,14 @@ class Headplugselections extends Component { titlesttingid:null, titlesttings:null, titlesttingss:null, + status: undefined, + diff: 0, + InputValue: undefined, + shixunhoverData: [], + shixunchildValues:'', + shixunsearchAllvalue:"a", + openStatus:false, + openLevel:false } } @@ -25,6 +47,10 @@ class Headplugselections extends Component { componentDidMount(){ } +// +// setdiscipline_id={(e)=>this.setdiscipline_id(e)} +// setsub_discipline_id={(e)=>this.setsub_discipline_id(e)} +// settag_discipline_id={(e)=>this.settag_discipline_id(e)} settitlestting=(name,id)=>{ //如果全部其他的选项重置 this.setState({ @@ -71,191 +97,187 @@ class Headplugselections extends Component { } - render() { - let {page,titlestting,titlesttings,titlesttingss}=this.state; - var kc=0; - var zsd=0; - - if(this.props.disciplinesdata){ - const didata = this.props.disciplinesdata; - for (var i = 0; i < didata.length; i++) { - //方向 - const fxdidata = didata[i].sub_disciplines; - - if(titlestting===didata[i].name){ - for (var j = 0; j < fxdidata.length; j++) { - kc=kc+1; - - //课程 - const zsddata = fxdidata[j].tag_disciplines; - for (var k = 0; k < zsddata.length; k++) { - //知识点 - zsd=zsd+1; - } - } - }else if(titlestting==="全部"){ - kc=kc+1; - zsd=zsd+1; - }else{ - } + shixunsearchall=(e)=>{ + let{shixunsearchAllvalue}=this.state; + let id = "a"; - } + if(shixunsearchAllvalue===id){ + return + } + this.setState({ + shixunsearchAllvalue:"a", + shixunchildValues:"" + }) + // this.props.allUpdatashixunlist(); + } + //查询 + shixunsearchAll = (e) => { + let{shixunsearchAllvalue}=this.state; + let id = e.target.value; + + if(shixunsearchAllvalue===id){ + return + } + if(id===0){ + id=" " + this.setState({ + InputValue: " " + }) + // this.props.OnSearchInput(""); + } + let list=[{'tag_level':1},{'tag_id':id}]; + if(id!=undefined){ + this.setState({ + shixunsearchAllvalue:id, + shixunchildValues:"" + }) + // this.props.Updatasearchlist(list); } + + } + + render() { + let {shixunhoverData, shixunchildValues, shixunsearchAllvalue, InputValue,openStatus,openLevel} = this.state; + let {disciplinesdata} = this.props; + let overlaymenu=(item,id)=>( + + { + item.map((list,k)=>{ + return( + +
+ {list.name} + {/*
*/} + {/* {*/} + {/* list.tag_disciplines.map((tag,e)=>{*/} + {/* return(*/} + {/* {tag.name}*/} + {/* )*/} + {/* })*/} + {/* }*/} + {/*
*/} +
+
+ ) + }) + } +
+ ) return (
{/*课程*/} -
-
- 方向: -
-
-
this.settitlestting("全部",null)}> - 全部 -
- {this.props.disciplinesdata&&this.props.disciplinesdata.map((object, index) => { - return ( -
this.settitlestting(object.name,object.id)}> - {object.name} + + +
+
+
+
+ 方向: +
+
  • 全部
  • + +
    + + + { + disciplinesdata.map((item,key)=>{ + return( + =8?"bottomLeft":"bottomCenter"}> +
  • + {item.name} +
  • +
    + ) + }) + } + +
    - ) - })} +
    + + + + {/*
    */} + {/* 筛选:*/} + {/* {*/} + {/* */} + {/* }*/} + {/*
    */} + {/*
  • this.diff_search(0)}>全部难度
  • */} + {/*
  • this.diff_search(1)}>初级
  • */} + {/*
  • this.diff_search(2)}>中级
  • */} + {/*
  • this.diff_search(3)}>中高级
  • */} + {/*
  • this.diff_search(4)}>高级
  • */} + {/*
    */} + + {/*
    */} + + + + +
    - {/*课程*/} - { - kc===0? - "" - : -
    -
    - 课程: -
    -
    - - {this.props.disciplinesdata&&this.props.disciplinesdata.map((objectn, index) => { - return ( - titlestting==="全部"? - objectn.sub_disciplines&&objectn.sub_disciplines.map((object, indexs) => { - return ( -
    this.settitlesttings(object.name,object.id)}> - {object.name} -
    - ) - }) - : - objectn.name===titlestting? - objectn.sub_disciplines&&objectn.sub_disciplines.map((object, indexs) => { - return ( -
    this.settitlesttings(object.name,object.id)}> - {object.name} -
    - ) - }) - : "" - ) - })} -
    -
    - } - {/*知识点*/} - { - zsd===0? - "" - :
    -
    - 知识点: -
    -
    - - {this.props.disciplinesdata&&this.props.disciplinesdata.map((objecta, index) => { - return ( - titlestting==="全部"&&titlesttings===null? - objecta.sub_disciplines&&objecta.sub_disciplines.map((objectb, indexs) => { - return ( - objectb.tag_disciplines&&objectb.tag_disciplines.map((object, indexss) => { - return ( -
    this.settitlesttingss(object.name)}> - {object.name} -
    - ) - }) - ) - }) - :titlestting==="全部"&&titlesttings!==null? - objecta.sub_disciplines&&objecta.sub_disciplines.map((objectb, indexs) => { - return ( - titlesttings===objectb.name? - objectb.tag_disciplines&&objectb.tag_disciplines.map((object, indexss) => { - return ( -
    this.settitlesttingss(object.name)}> - {object.name} -
    - ) - }):"" - ) - }) - : titlestting!=="全部"&&titlesttings!==null? - titlestting===objecta.name? - objecta.sub_disciplines&&objecta.sub_disciplines.map((objectb, indexs) => { - return ( - titlesttings===objectb.name? - objectb.tag_disciplines&&objectb.tag_disciplines.map((object, indexss) => { - return ( -
    this.settitlesttingss(object.name)}> - {object.name} -
    - ) - }):"" - ) - }) - :"" - : titlestting!=="全部"&&titlesttings===null? - titlestting===objecta.name? - objecta.sub_disciplines&&objecta.sub_disciplines.map((objectb, indexs) => { - return ( - objectb.tag_disciplines&&objectb.tag_disciplines.map((object, indexss) => { - return ( -
    this.settitlesttingss(object.name)}> - {object.name} -
    - ) - }) - ) - }) - :"" - :"" - ) - })} -
    -
    - } + {/*课程尾巴*/}
    diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js index 35f395c0f..e4615caa1 100644 --- a/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js @@ -69,7 +69,8 @@ class Paperreview_item extends Component { } onDragEnd = (result) => { - + console.log("单选题"); + console.log(result); const ids = this.props.single_questions.questions[result.source.index].id; const positions = this.props.single_questions.questions[result.destination.index].position; @@ -89,7 +90,8 @@ class Paperreview_item extends Component { } onDragEnds = (result) => { - + console.log("多选题"); + console.log(result); const ids = this.props.multiple_questions.questions[result.source.index].id; const positions = this.props.multiple_questions.questions[result.destination.index].position; const url = `/examination_items/${ids}/adjust_position.json`; @@ -111,6 +113,8 @@ class Paperreview_item extends Component { onDragEndss = (result) => { + console.log("判断题"); + console.log(result); const ids = this.props.judgement_questions.questions[result.source.index].id; const positions = this.props.judgement_questions.questions[result.destination.index].position; const url = `/examination_items/${ids}/adjust_position.json`; @@ -131,9 +135,11 @@ class Paperreview_item extends Component { } onDragEndsss = (result) => { + console.log("编程题"); + console.log(result); - const ids = this.props.judgement_questions.questions[result.source.index].id; - const positions = this.props.judgement_questions.questions[result.destination.index].position; + const ids = this.props.program_questions.questions[result.source.index].id; + const positions = this.props.program_questions.questions[result.destination.index].position; const url = `/examination_items/${ids}/adjust_position.json`; var data = { position: positions diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js index 7b63cb181..25f588977 100644 --- a/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js @@ -140,8 +140,8 @@ class Paperlibraryseeid_itemss extends Component { onDragEndsss = (result) => { - const ids = this.props.judgement_questions.questions[result.source.index].id; - const positions = this.props.judgement_questions.questions[result.destination.index].position; + const ids = this.props.program_questions.questions[result.source.index].id; + const positions = this.props.program_questions.questions[result.destination.index].position; const url = `/examination_items/${ids}/adjust_position.json`; var data = { position: positions diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 5884eb4ef..0e4ea3073 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -1039,47 +1039,18 @@ submittojoinclass=(value)=>{ ` } - {/*
  • */} - {/* */} - {/*
    */} - {/*
    */} - {/* 题库*/} - {/*
    */} - {/*
    */} - {/*
    */} - {/*
  • */} - - - - - - {/*
  • 课堂
  • */} - {/*
  • */} - {/* /!*课堂*!/*/} - {/* 翻转课堂*/} - {/*
  • */} - - {/*
  • */} - {/* 实训项目*/} - {/* */} - {/* */} - {/*
  • */} - +
  • + +
    +
    + 题库 +
    +
    +
    +
  • - {/*
  • 教学案例
  • */} - {/*
  • */} - {/* 在线竞赛*/} - {/* */} - {/*
  • */} - {/*
  • 教学案例
  • */} - {/*
  • */} - {/*众包创新*/} - {/*
  • */} - {/*
  • 交流问答
  • */}
  • 工程认证
  • @@ -1104,65 +1075,6 @@ submittojoinclass=(value)=>{
    - // :mygetHelmetapi2===undefined||mygetHelmetapi2.navbar===null||mygetHelmetapi2.navbar===undefined||mygetHelmetapi2.navbar.length===0? - //
    - // - //
      - // {/*
    • 首页
    • */} - // - // {/*
    • 实训路径
    • */} - //
    • - // 实践课程 - //
    • - // - // {/*
    • 课堂
    • */} - //
    • - // {/*课堂*/} - // 翻转课堂 - //
    • - // - //
    • - // 实训项目 - // {/**/} - // {/**/} - //
    • - // - //
    • 0 ? 'block' : 'none'}}> - // 职业路径 - //
      0 ? 'block' : 'none'}}> - //
        - // {this.props.Headertop === undefined ? "" : this.props.Headertop.career_url.map((item, key) => { - // return( - //
      • {item.name}
      • - // ) - // }) - // } - //
      - //
      - //
    • - // - // {/*
    • 教学案例
    • */} - //
    • - // 在线竞赛 - // {/**/} - //
    • - //
    • 教学案例
    • - // {/*
    • */} - // {/*众包创新*/} - // {/*
    • */} - //
    • 交流问答
    • - //
    • 工程认证
    • - //
    - //
    :