diff --git a/public/react/src/App.js b/public/react/src/App.js index dabe4a50d..247e7939b 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -769,7 +769,7 @@ class App extends Component { render={ (props) => () } /> - () }/> diff --git a/public/react/src/modules/question/Paperreview.js b/public/react/src/modules/question/Paperreview.js index c0660d544..dc60b7594 100644 --- a/public/react/src/modules/question/Paperreview.js +++ b/public/react/src/modules/question/Paperreview.js @@ -66,26 +66,12 @@ class Paperreview extends Component { //初始化 componentDidMount() { console.log("Paperreview.js"); - console.log(this.props.match.params.type); + console.log(this.props.match.params); this.setState({ artificialtype:this.props.match.params.type }) - if(this.props.match.params.type==="artificial"){ - //人工组卷 - - var data = {} - this.getdata(data); - }else{ - //智能组卷 - // - var data = { - exam_setting_id:this.props.match.params.id - } + var data = {}; this.getdata(data); - } - - - let urls = `/disciplines.json`; axios.get(urls, { params: { @@ -148,6 +134,18 @@ class Paperreview extends Component { getdata = (data) => { + + if(this.props.match.params.type==="artificial"){ + //人工组卷 + + + }else{ + //智能组卷 + // + data = { + exam_setting_id:this.props.match.params.id + } + } const url = `/item_baskets.json`; this.setState({ booljupyterurls: true, @@ -290,6 +288,23 @@ class Paperreview extends Component { var data = {} this.getdata(data); } + + //换题型 + Replacementtype=(value)=>{ + console.log("换题型"); + console.log(value); + + } + //换题 + Changingtopics=(value)=>{ + console.log("换题"); + console.log(value); + } + + + + + render() { let {page, limit, count, Headertop, visible, placement, modalsType, item_type,artificialtype,Cohetepaperbool,newmyshixunmodelbool} = this.state; const params = this.props && this.props.match && this.props.match.params; @@ -354,7 +369,7 @@ class Paperreview extends Component { { Cohetepaperbool===false? - this.getdata(data)} setnewmyshixunmodelbool={(e)=>this.setnewmyshixunmodelbool(e)}> + this.Changingtopics(e)} Replacementtype={(e)=>this.Replacementtype(e)} getdata={(data)=>this.getdata(data)} setnewmyshixunmodelbool={(e)=>this.setnewmyshixunmodelbool(e)}> : diff --git a/public/react/src/modules/question/Paperreview_item.js b/public/react/src/modules/question/Paperreview_item.js index a9747e8c2..02980d1bb 100644 --- a/public/react/src/modules/question/Paperreview_item.js +++ b/public/react/src/modules/question/Paperreview_item.js @@ -460,6 +460,12 @@ class Paperreview_item extends Component { singlebool === true ?
this.setmodalsTypedel(true, 1, "SINGLE")}>删除
+ { + this.props.match.params.type==="Intelligence"? +
this.props.Replacementtype("单选题")}>换题型
+ : + "" + }
this.Singlemagazine("单选题", true)}>批量设置得分
: "" } @@ -490,6 +496,9 @@ class Paperreview_item extends Component { > this.Changingtopics(e)} key={index} paperreviewsingleindex={this.state.paperreviewsingleindex} paperreviewsinglename={this.state.paperreviewsinglename} @@ -547,6 +556,12 @@ class Paperreview_item extends Component {
this.setmodalsTypedel(true, 1, "MULTIPLE")}>删除
+ { + this.props.match.params.type==="Intelligence"? +
this.props.Replacementtype("多选题")}>换题型
+ : + "" + }
this.Singlemagazine("多选题", true)}>批量设置得分
@@ -582,6 +597,9 @@ class Paperreview_item extends Component { this.Changingtopics(e)} key={index} paperreviewsingleindex={this.state.paperreviewsingleindex} paperreviewsinglename={this.state.paperreviewsinglename} @@ -637,6 +655,12 @@ class Paperreview_item extends Component {
this.setmodalsTypedel(true, 1, "JUDGMENT")}>删除
+ { + this.props.match.params.type==="Intelligence"? +
this.props.Replacementtype("判断题")}>换题型
+ : + "" + }
this.Singlemagazine("判断题", true)}>批量设置得分
: ""} @@ -669,6 +693,9 @@ class Paperreview_item extends Component { this.Changingtopics(e)} key={index} paperreviewsingleindex={this.state.paperreviewsingleindex} paperreviewsinglename={this.state.paperreviewsinglename} @@ -728,6 +755,12 @@ class Paperreview_item extends Component { programbool === true ?
this.setmodalsTypedel(true, 1, "PROGRAM")}>删除
+ { + this.props.match.params.type==="Intelligence"? +
this.props.Replacementtype("编程题")}>换题型
+ : + "" + }
this.Singlemagazine("编程题", true)}>批量设置得分
: "" @@ -761,6 +794,9 @@ class Paperreview_item extends Component { this.Changingtopics(e)} key={index} paperreviewsingleindex={this.state.paperreviewsingleindex} paperreviewsinglename={this.state.paperreviewsinglename} diff --git a/public/react/src/modules/question/Paperreview_items.js b/public/react/src/modules/question/Paperreview_items.js index 8e86c514a..fde883105 100644 --- a/public/react/src/modules/question/Paperreview_items.js +++ b/public/react/src/modules/question/Paperreview_items.js @@ -67,6 +67,12 @@ class Paperreview_items extends Component { paperreviewsingleindex===indexs&&paperreviewsinglename===typenames?
this.props.showsetmodalsTypedels(object.item_id,true,1)}>删除
+ { + this.props.match.params.type==="Intelligence"? +
this.props.Changingtopics(object.item_id)}>换题
+ : + "" + }
this.props.Singlemagazines(true,object.id,typenamesn)}>设置得分
:
diff --git a/public/react/src/modules/question/Paperreview_single.js b/public/react/src/modules/question/Paperreview_single.js index fdc9ff095..71c641847 100644 --- a/public/react/src/modules/question/Paperreview_single.js +++ b/public/react/src/modules/question/Paperreview_single.js @@ -76,10 +76,20 @@ class Paperreview_single extends Component { try { itemssname= JSON.parse(objectsingle.name); }catch (e) { + itemssname=objectsingle.name; } if(itemssname===undefined){ itemssname=objectsingle.name } + + var itemsnamesy=""; + try { + itemsnamesy= JSON.parse(objectsingle&&objectsingle.program_attr&&objectsingle.program_attr.description); + + }catch (e) { + itemsnamesy=objectsingle&&objectsingle.program_attr&&objectsingle.program_attr.description; + } + return (

: @@ -199,8 +209,15 @@ class Paperreview_single extends Component {

{ objectsingle === undefined || objectsingle === null ? "" : objectsingle.choices.map((object, index) => { + var string="" + try { + string=JSON.parse(object.choice_text); + }catch (e) { + string=object.choice_text; + } + return ( -

+

{tagArray[index]}

{object ? @@ -210,7 +227,7 @@ class Paperreview_single extends Component { object.choice_text.length>0? :"" : diff --git a/public/react/src/modules/question/component/Listjihe.js b/public/react/src/modules/question/component/Listjihe.js index 695fe77fd..408575053 100644 --- a/public/react/src/modules/question/component/Listjihe.js +++ b/public/react/src/modules/question/component/Listjihe.js @@ -135,6 +135,23 @@ class Listjihe extends Component { itemssname=items.name } + + var itemsnamesy=""; + try { + itemsnamesy= JSON.parse(items&&items.program_attr&&items.program_attr.description); + + }catch (e) { + itemsnamesy=items&&items.program_attr&&items.program_attr.description; + } + + var analysisnames=""; + try { + analysisnames= JSON.parse(items&&items.analysis); + + }catch (e) { + analysisnames=items&&items.analysis; + } + return (

@@ -217,7 +234,7 @@ class Listjihe extends Component { >

@@ -232,6 +249,12 @@ class Listjihe extends Component {

{ items === undefined || items === null ? "" : items.choices.map((object, index) => { + var string="" + try { + string=JSON.parse(object.choice_text); + }catch (e) { + string=object.choice_text; + } return (

{tagArray[index]}

@@ -244,7 +267,7 @@ class Listjihe extends Component { object.choice_text.length>0? :"" @@ -425,7 +448,7 @@ class Listjihe extends Component { : "" diff --git a/public/react/src/modules/question/comthetestpaper/Intelligentcomponents.js b/public/react/src/modules/question/comthetestpaper/Intelligentcomponents.js index c40961dbb..f80f44d66 100644 --- a/public/react/src/modules/question/comthetestpaper/Intelligentcomponents.js +++ b/public/react/src/modules/question/comthetestpaper/Intelligentcomponents.js @@ -764,21 +764,29 @@ class Intelligentcomponents extends Component { -

题型及数量

-
- this.props.getdatas()} ref={dom => { - this.$dxt = dom; - }}> - this.props.getdatas()} ref={dom => { - this.$ddxt = dom; - }}> - this.props.getdatas()} ref={dom => { - this.$pdt = dom; - }}> - this.props.getdatas()} ref={dom => { - this.$bct = dom; - }}> + { + this.props.single_question_count===0&&this.props.multiple_question_count===0&&this.props.judgement_question_count===0&& + this.props.program_question_count===0? + "" + : +
+

题型及数量

+
+ this.props.getdatas()} ref={dom => { + this.$dxt = dom; + }}> + this.props.getdatas()} ref={dom => { + this.$ddxt = dom; + }}> + this.props.getdatas()} ref={dom => { + this.$pdt = dom; + }}> + this.props.getdatas()} ref={dom => { + this.$bct = dom; + }}> +
+ }
diff --git a/public/react/src/modules/question/questioncss/questioncom.css b/public/react/src/modules/question/questioncss/questioncom.css index ae405001a..b9d2264fc 100644 --- a/public/react/src/modules/question/questioncss/questioncom.css +++ b/public/react/src/modules/question/questioncss/questioncom.css @@ -760,6 +760,17 @@ font-size:12px; } +.szdfds{ + width:100px; + height:40px; + background:#FC7E30; + border-radius:4px 4px 0px 0px; + text-align: center; + color: #ffffff; + line-height: 40px; + margin-right: 27px; + font-size:12px; +} .pd20{ padding: 20px; diff --git a/public/react/src/modules/testpaper/Intecomponents.js b/public/react/src/modules/testpaper/Intecomponents.js index d393bdd7a..60903af14 100644 --- a/public/react/src/modules/testpaper/Intecomponents.js +++ b/public/react/src/modules/testpaper/Intecomponents.js @@ -257,7 +257,7 @@ class Intecomponents extends Component { .then((result) => { if (result.data.status == 0) { console.log("组卷成功"); - this.props.history.push(`/IntegenerationSee/Intelligence/${result.data.exam_setting_id}`); + this.props.history.push(`/Integeneration/Intelligence/${result.data.exam_setting_id}`); } }).catch((error) => { console.log(error); diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js index 0a6a718c3..7747574dd 100644 --- a/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js @@ -78,6 +78,14 @@ class Paperlibraryseeid_items extends Component { if(itemssname===undefined){ itemssname=objectsingle.name } + + var itemsnamesy=""; + try { + itemsnamesy= JSON.parse(objectsingle&&objectsingle.program_attr&&objectsingle.program_attr.description); + + }catch (e) { + itemsnamesy=objectsingle&&objectsingle.program_attr&&objectsingle.program_attr.description; + } return (

: @@ -196,6 +204,12 @@ class Paperlibraryseeid_items extends Component {

{ objectsingle === undefined || objectsingle === null ? "" : objectsingle.choices.map((object, index) => { + var string="" + try { + string=JSON.parse(object.choice_text); + }catch (e) { + string=object.choice_text; + } return (

{tagArray[index]} @@ -207,7 +221,7 @@ class Paperlibraryseeid_items extends Component { object.choice_text.length>0? :"" :