diff --git a/public/react/src/modules/question/Paperreview.js b/public/react/src/modules/question/Paperreview.js index 47593ea2d..9014ba92b 100644 --- a/public/react/src/modules/question/Paperreview.js +++ b/public/react/src/modules/question/Paperreview.js @@ -214,7 +214,7 @@ class Paperreview extends Component { axios.post(url, data) .then((result) => { if (result.data.status === 0) { - this.props.showNotification(`组卷成功`); + // this.props.showNotification(`组卷成功`); this.props.history.replace('/paperlibrary'); } }).catch((error) => { diff --git a/public/react/src/modules/question/Paperreview_item.js b/public/react/src/modules/question/Paperreview_item.js index 562da69c1..cbd2f19fa 100644 --- a/public/react/src/modules/question/Paperreview_item.js +++ b/public/react/src/modules/question/Paperreview_item.js @@ -91,7 +91,7 @@ class Paperreview_item extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`拖动成功`); + // this.props.showNotification(`拖动成功`); this.props.getdata({}); } }).catch((error) => { @@ -110,7 +110,7 @@ class Paperreview_item extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`拖动成功`); + // this.props.showNotification(`拖动成功`); this.props.getdata({}); } }).catch((error) => { @@ -131,7 +131,7 @@ class Paperreview_item extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`拖动成功`); + // this.props.showNotification(`拖动成功`); this.props.getdata({}); } }).catch((error) => { @@ -151,7 +151,7 @@ class Paperreview_item extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`拖动成功`); + // this.props.showNotification(`拖动成功`); this.props.getdata({}); } }).catch((error) => { @@ -185,7 +185,7 @@ class Paperreview_item extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`调分成功`); + // this.props.showNotification(`调分成功`); this.props.getdata({}); this.Singlemagazine("", false); } @@ -202,7 +202,7 @@ class Paperreview_item extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`调分成功`); + // this.props.showNotification(`调分成功`); this.props.getdata({}); this.Singlemagazines(false); } @@ -247,7 +247,7 @@ class Paperreview_item extends Component { }) .then((response) => { if (response.data.status == 0) { - this.props.showNotification('大题删除成功'); + // this.props.showNotification('大题删除成功'); this.props.getdata({}); this.setState({ titilesms: "" @@ -275,7 +275,7 @@ class Paperreview_item extends Component { axios.delete((url)) .then((response) => { if (response.data.status == 0) { - this.props.showNotification('试题删除成功'); + // this.props.showNotification('试题删除成功'); this.props.getdata({}); } }) diff --git a/public/react/src/modules/question/Question.js b/public/react/src/modules/question/Question.js index 44d42ac6c..8120b1860 100644 --- a/public/react/src/modules/question/Question.js +++ b/public/react/src/modules/question/Question.js @@ -65,6 +65,7 @@ class Question extends Component { selectallquestionsonthispages:false, oj_status:null, isVisible: false, + selectionbools:false, } } @@ -213,6 +214,7 @@ class Question extends Component { const url = `/item_banks.json`; this.setState({ booljupyterurls:true, + selectionbools:false, }) axios.get((url), {params: data}).then((response) => { setTimeout(()=>{ @@ -235,6 +237,7 @@ class Question extends Component { Contentdata: response.data, items_count: response.data.items_count, }) + this.getdataslen(response.data.items); }).catch((error) => { ////console.log(error) this.setState({ @@ -246,7 +249,9 @@ class Question extends Component { //不刷新加载 getdatasy = (data) => { const url = `/item_banks.json`; - + this.setState({ + selectionbools:false, + }) axios.get((url), {params: data}).then((response) => { setTimeout(()=>{ @@ -265,12 +270,57 @@ class Question extends Component { this.setState({ Contentdata: response.data, items_count: response.data.items_count, + }) + + this.getdataslen(response.data.items); }).catch((error) => { }); } + //计算 + getdataslen=(arr)=>{ + var contes=0; + for(let data of arr) { + if(data.item_type==="PROGRAM"){ + //编程题 + if(data.choosed===true){ + + }else{ + //未选用 + if(data.program_attr.status===1){ + //已发布 + contes=contes+1; + } + + } + + }else{ + //不是编程题 + if(data.choosed===true){ + + }else{ + //未选用 + contes=contes+1; + } + } + + } + + if(contes>0){ + this.setState({ + selectionbools:false, + selectallquestionsonthispages:false, + }) + }else { + this.setState({ + selectionbools:true, + selectallquestionsonthispages:true, + }) + } + } + paginationonChange = (pageNumber) => { this.setState({ page: pageNumber, @@ -466,19 +516,6 @@ class Question extends Component { this.setState({ keywords: e.target.value }) - // var data = { - // discipline_id:this.state.discipline_id, - // sub_discipline_id:this.state.sub_discipline_id, - // tag_discipline_id:this.state.tag_discipline_id, - // public: this.state.defaultActiveKey, - // difficulty: this.state.difficulty, - // item_type: this.state.item_type, - // keywords: e.target.value, - // page: this.state.page, - // per_page:10, - // }; - // - // this.getdata(data); } setdatafuns = (value) => { @@ -507,7 +544,7 @@ class Question extends Component { axios.delete(url) .then((response) => { if (response.data.status == 0) { - this.props.showNotification('删除试题成功') + // this.props.showNotification('删除试题成功') // props.history.push(response.data.right_url) var data = { discipline_id:this.state.discipline_id, @@ -533,7 +570,7 @@ class Question extends Component { axios.post(url) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`公开题目成功`); + // this.props.showNotification(`公开题目成功`); var data = { discipline_id:this.state.discipline_id, sub_discipline_id:this.state.sub_discipline_id, @@ -593,7 +630,7 @@ class Question extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`选用成功`); + // this.props.showNotification(`选用成功`); var data = { discipline_id:this.state.discipline_id, sub_discipline_id:this.state.sub_discipline_id, @@ -623,7 +660,7 @@ class Question extends Component { axios.delete(url) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`撤销成功`); + // this.props.showNotification(`撤销成功`); var data = { discipline_id:this.state.discipline_id, sub_discipline_id:this.state.sub_discipline_id, @@ -635,7 +672,7 @@ class Question extends Component { page: this.state.page, per_page:10, }; - this.getdata(data); + this.getdatasy(data); this.getbasket_listdata(); } }).catch((error) => { @@ -648,7 +685,29 @@ class Question extends Component { var arr= this.state.Contentdata.items; for(let data of arr) { - item_idsdata.push(data.id); + if(data.item_type==="PROGRAM"){ + //编程题 + if(data.choosed===true){ + + }else{ + //未选用 + if(data.program_attr.status===1){ + //已发布 + item_idsdata.push(data.id); + } + + } + + }else{ + //不是编程题 + if(data.choosed===true){ + + }else{ + //未选用 + item_idsdata.push(data.id); + } + } + } const data={ item_ids:item_idsdata @@ -669,7 +728,7 @@ class Question extends Component { }}) .then((response) => { if (response.data.status == 0) { - this.props.showNotification('删除成功'); + // this.props.showNotification('删除成功'); var data = { discipline_id:this.state.discipline_id, sub_discipline_id:this.state.sub_discipline_id, @@ -728,7 +787,7 @@ class Question extends Component { let { page, per_page, items_count, Headertop, visible, placement, modalsType, modalsTypes,basket_list, completion_questions_count, judgement_questions_count, multiple_questions_count, practical_questions_count, - program_questions_count, single_questions_count, subjective_questions_count + program_questions_count, single_questions_count, subjective_questions_count,selectionbools } = this.state; const Datacount = completion_questions_count + judgement_questions_count @@ -812,6 +871,7 @@ class Question extends Component { this.setdifficulty(e)} diff --git a/public/react/src/modules/question/Questionitem_banks.js b/public/react/src/modules/question/Questionitem_banks.js index 097528656..129e29d69 100644 --- a/public/react/src/modules/question/Questionitem_banks.js +++ b/public/react/src/modules/question/Questionitem_banks.js @@ -282,7 +282,7 @@ class Questionitem_banks extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`新增单选题成功`); + // this.props.showNotification(`新增单选题成功`); this.props.history.replace('/question'); } @@ -293,7 +293,7 @@ class Questionitem_banks extends Component { axios.put(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`编辑单选题成功`); + // this.props.showNotification(`编辑单选题成功`); this.props.history.replace('/question'); @@ -360,7 +360,7 @@ class Questionitem_banks extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`新增多选题成功`); + // this.props.showNotification(`新增多选题成功`); this.props.history.replace('/question'); @@ -373,7 +373,7 @@ class Questionitem_banks extends Component { axios.put(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`编辑多选题成功`); + // this.props.showNotification(`编辑多选题成功`); this.props.history.replace('/question'); @@ -427,7 +427,7 @@ class Questionitem_banks extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`新增判断题成功`); + // this.props.showNotification(`新增判断题成功`); this.props.history.replace('/question'); } @@ -439,7 +439,7 @@ class Questionitem_banks extends Component { axios.put(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`编辑判断题成功`); + // this.props.showNotification(`编辑判断题成功`); this.props.history.replace('/question'); } diff --git a/public/react/src/modules/question/component/Contentpart.js b/public/react/src/modules/question/component/Contentpart.js index 60960585f..6cca91f93 100644 --- a/public/react/src/modules/question/component/Contentpart.js +++ b/public/react/src/modules/question/component/Contentpart.js @@ -49,7 +49,7 @@ class Contentpart extends Component { render() { let {page}=this.state; - let {defaultActiveKey}=this.props; + let {defaultActiveKey,item_type,booljupyterurls}=this.props; const content = (
+
trigger.parentNode} placement="bottom" trigger="hover" content={contents} onVisibleChange={()=>this.props.handleVisibleChange(true)}>
@@ -169,7 +169,7 @@ class Contentpart extends Component {
: - "" + "":"" } @@ -203,7 +203,7 @@ class Contentpart extends Component { :
{ - defaultActiveKey===1||defaultActiveKey==="1"? + defaultActiveKey===1||defaultActiveKey==="1"? this.props.selectallquestionsonthispage()} > :"" } diff --git a/public/react/src/modules/question/component/Contentquestionbank.js b/public/react/src/modules/question/component/Contentquestionbank.js index 4f7441956..8ec8cf955 100644 --- a/public/react/src/modules/question/component/Contentquestionbank.js +++ b/public/react/src/modules/question/component/Contentquestionbank.js @@ -40,6 +40,7 @@ class Contentquestionbank extends Component { render() { let {page}=this.state; + let {selectionbools}=this.props; return ( @@ -47,7 +48,13 @@ class Contentquestionbank extends Component {
- this.props.selectallquestionsonthispage()}> + { + selectionbools===true? + this.props.selectallquestionsonthispage()} disabled> + : + this.props.selectallquestionsonthispage()}> + + }

选用本页全部试题

diff --git a/public/react/src/modules/question/component/Itembankstop.js b/public/react/src/modules/question/component/Itembankstop.js index 8ff1307b8..46668c979 100644 --- a/public/react/src/modules/question/component/Itembankstop.js +++ b/public/react/src/modules/question/component/Itembankstop.js @@ -443,7 +443,7 @@ class Itembankstop extends Component { axios.post(url,data) .then((result) => { if (result.data.status === 0) { - this.props.showNotification(`新增知识点成功!`); + // this.props.showNotification(`新增知识点成功!`); var leydata={ id: result.data.tag_discipline_id, name:value, diff --git a/public/react/src/modules/question/component/Listjihe.js b/public/react/src/modules/question/component/Listjihe.js index 3c24c6a6b..64559596b 100644 --- a/public/react/src/modules/question/component/Listjihe.js +++ b/public/react/src/modules/question/component/Listjihe.js @@ -167,18 +167,18 @@ class Listjihe extends Component { items.item_type==="PROGRAM"? items.program_attr.status===0?

- - 选用 + + 选用

:

this.Selectingpracticaltraining(items.id)}> - - 选用 + + 选用

:

this.Selectingpracticaltraining(items.id)}> - - 选用 + + 选用

} { diff --git a/public/react/src/modules/question/component/NoneData.js b/public/react/src/modules/question/component/NoneData.js index 123b7524e..f993190d5 100644 --- a/public/react/src/modules/question/component/NoneData.js +++ b/public/react/src/modules/question/component/NoneData.js @@ -21,7 +21,7 @@ class NoneData extends Component{ margin: 40px auto 20px; } .zenwuxgsj{ - font-size:17px; + font-size:14px; font-family:MicrosoftYaHei; color:rgba(136,136,136,1); } diff --git a/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js b/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js index 53f073656..8b3010ed5 100644 --- a/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js +++ b/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js @@ -518,7 +518,7 @@ class Comthetestpaperst extends Component { axios.post(url,data) .then((result) => { if (result.data.status === 0) { - this.props.showNotification(`新增知识点成功!`); + // this.props.showNotification(`新增知识点成功!`); var leydata={ id: result.data.tag_discipline_id, name:value, diff --git a/public/react/src/modules/question/questioncss/questioncom.css b/public/react/src/modules/question/questioncss/questioncom.css index b6c068a50..4bf767b0f 100644 --- a/public/react/src/modules/question/questioncss/questioncom.css +++ b/public/react/src/modules/question/questioncss/questioncom.css @@ -372,7 +372,7 @@ .selectionss{ width:88px; height:30px; - background:#eeeeee; + background:#CCCCCC; border-radius:4px; text-align: center; line-height: 30px; @@ -399,7 +399,7 @@ padding-bottom: 20px; } .icontianjiadaohangcolor{ - color: #FFFFFF; + color: #ffffff; } .icontianjiadaohangcolors{ @@ -914,3 +914,11 @@ opacity: 0; z-index: 1; } + +.mt25{ + margin-top: 25px; +} + +.mr15{ + margin-right: 15px; +} diff --git a/public/react/src/modules/testpaper/Paperlibraryeditid.js b/public/react/src/modules/testpaper/Paperlibraryeditid.js index ba8cb6926..1497a12ec 100644 --- a/public/react/src/modules/testpaper/Paperlibraryeditid.js +++ b/public/react/src/modules/testpaper/Paperlibraryeditid.js @@ -163,7 +163,7 @@ class Paperlibraryeditid extends Component { axios.put(url, data) .then((result) => { if (result.data.status === 0) { - this.props.showNotification(`试卷更新成功`); + // this.props.showNotification(`试卷更新成功`); this.props.history.push('/paperlibrary'); } }).catch((error) => { diff --git a/public/react/src/modules/testpaper/Testpaperlibrary.js b/public/react/src/modules/testpaper/Testpaperlibrary.js index 2c23d15bf..fdd290ed8 100644 --- a/public/react/src/modules/testpaper/Testpaperlibrary.js +++ b/public/react/src/modules/testpaper/Testpaperlibrary.js @@ -290,7 +290,7 @@ class Testpaperlibrary extends Component { axios.post(url) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`公开试卷成功`); + // this.props.showNotification(`公开试卷成功`); var data = { discipline_id:this.state.discipline_id, sub_discipline_id:this.state.sub_discipline_id, @@ -315,7 +315,7 @@ class Testpaperlibrary extends Component { axios.delete(url) .then((response) => { if (response.data.status == 0) { - this.props.showNotification('删除试卷成功') + // this.props.showNotification('删除试卷成功'); // props.history.push(response.data.right_url) var data = { discipline_id:this.state.discipline_id, diff --git a/public/react/src/modules/testpaper/component/Contentpart.js b/public/react/src/modules/testpaper/component/Contentpart.js index 2ff4b92a5..e69f1b0b5 100644 --- a/public/react/src/modules/testpaper/component/Contentpart.js +++ b/public/react/src/modules/testpaper/component/Contentpart.js @@ -57,7 +57,7 @@ class Contentpart extends Component {
); return ( -
+
-
- +
+

this.gotoseesj(items.id)}>{names}

diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js index e4615caa1..f85ab67d0 100644 --- a/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js @@ -81,7 +81,7 @@ class Paperreview_item extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`拖动成功`); + // this.props.showNotification(`拖动成功`); this.props.getdata(); } }).catch((error) => { @@ -101,7 +101,7 @@ class Paperreview_item extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`拖动成功`); + // this.props.showNotification(`拖动成功`); this.props.getdata(); } }).catch((error) => { @@ -125,7 +125,7 @@ class Paperreview_item extends Component { .then((result) => { debugger if (result.data.status == 0) { - this.props.showNotification(`拖动成功`); + // this.props.showNotification(`拖动成功`); this.props.getdata(); } }).catch((error) => { @@ -147,7 +147,7 @@ class Paperreview_item extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`拖动成功`); + // this.props.showNotification(`拖动成功`); this.props.getdata(); } }).catch((error) => { @@ -181,7 +181,7 @@ class Paperreview_item extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`调分成功`); + // this.props.showNotification(`调分成功`); this.props.getdata({}); this.Singlemagazine("", false); } @@ -198,7 +198,7 @@ class Paperreview_item extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`调分成功`); + // this.props.showNotification(`调分成功`); this.props.getdata({}); this.Singlemagazines(false); } diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js index 25f588977..066b0e4ef 100644 --- a/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js @@ -89,7 +89,7 @@ class Paperlibraryseeid_itemss extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`拖动成功`); + // this.props.showNotification(`拖动成功`); this.props.getdata({}); } }).catch((error) => { @@ -108,7 +108,7 @@ class Paperlibraryseeid_itemss extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`拖动成功`); + // this.props.showNotification(`拖动成功`); this.props.getdata({}); } }).catch((error) => { @@ -129,7 +129,7 @@ class Paperlibraryseeid_itemss extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`拖动成功`); + // this.props.showNotification(`拖动成功`); this.props.getdata({}); } }).catch((error) => { @@ -149,7 +149,7 @@ class Paperlibraryseeid_itemss extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`拖动成功`); + // this.props.showNotification(`拖动成功`); this.props.getdata({}); } }).catch((error) => { @@ -184,7 +184,7 @@ class Paperlibraryseeid_itemss extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`调分成功`); + // this.props.showNotification(`调分成功`); this.props.getdata({}); this.Singlemagazine("", false); } @@ -201,7 +201,7 @@ class Paperlibraryseeid_itemss extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - this.props.showNotification(`调分成功`); + // this.props.showNotification(`调分成功`); this.props.getdata({}); this.Singlemagazines(false); } @@ -247,7 +247,7 @@ class Paperlibraryseeid_itemss extends Component { }) .then((response) => { if (response.data.status == 0) { - this.props.showNotification('大题删除成功'); + // this.props.showNotification('大题删除成功'); this.props.getdata({}); this.setState({ titilesms: "" @@ -275,7 +275,7 @@ class Paperlibraryseeid_itemss extends Component { axios.delete((url)) .then((response) => { if (response.data.status == 0) { - this.props.showNotification('试题删除成功'); + // this.props.showNotification('试题删除成功'); this.props.getdata({}); } }) diff --git a/public/react/src/modules/testpaper/testioncss/testioncss.css b/public/react/src/modules/testpaper/testioncss/testioncss.css index fa87531b0..a1de362d1 100644 --- a/public/react/src/modules/testpaper/testioncss/testioncss.css +++ b/public/react/src/modules/testpaper/testioncss/testioncss.css @@ -366,7 +366,7 @@ .selectionss{ width:88px; height:30px; - background:#eeeeee; + background:#CCCCCC; border-radius:4px; text-align: center; line-height: 30px; @@ -884,3 +884,11 @@ text-align: center; line-height: 20px; } +.mt25{ + margin-top: 25px; +} + +.imgtp{ + width: 39px; + height: 44px; +}