diff --git a/public/react/src/modules/testpaper/Paperlibraryseeid.js b/public/react/src/modules/testpaper/Paperlibraryseeid.js index b39ead8d1..4d957f2c6 100644 --- a/public/react/src/modules/testpaper/Paperlibraryseeid.js +++ b/public/react/src/modules/testpaper/Paperlibraryseeid.js @@ -20,6 +20,7 @@ import Bottomsubmit from "../../modules/modals/Bottomsubmit"; import Seeoagertit from "./component/Seeoagertit"; import Paperlibraryseeid_item from './component/Paperlibraryseeid_item'; import QuestionModal from "../question/component/QuestionModal"; +import SendTopicsModel from "./component/SendTopicsModel"; //人工组卷预览 class Paperlibraryseeid extends Component { constructor(props) { @@ -33,6 +34,8 @@ class Paperlibraryseeid extends Component { titiless:"", boolok:"知道了", exercise_id:0, + SendTop:false, + paramsid:null, } @@ -100,32 +103,18 @@ class Paperlibraryseeid extends Component { // titilesm: "功能正在内测中,敬请期待", // titiless: "", // }) - let id = this.props.match.params.id; - let url=`/examination_banks/${id}/send_to_course.json`; - var data={ - course_id:1309 - }; - this.getwangluodata(url,data); + // let id = this.props.match.params.id; + // let url=`/examination_banks/${id}/send_to_course.json`; + // var data={ + // course_id:1309 + // }; + // this.getwangluodata(url,data); + // 2413 + this.submitInfos(true); } - getwangluodata=(url,data)=>{ - axios.post(url,data).then((response) => { - if (response) { - // console.log("组卷发送"); - // console.log(response); - if(response.data){ - if(response.data.status===0){ - this.setState({ - exercise_id:response.data.exercise_id - }) - } - } - - } - }); - } setitem_type = (item_type) => { @@ -152,15 +141,24 @@ class Paperlibraryseeid extends Component { }) } + submitInfos=(bool)=>{ + this.setState({ + SendTop:bool, + paramsid:this.props.match.params.id + }) + } render() { - let {paperlibrartdata,defaultActiveKey,titilesm,titiless,boolok,modalsType} = this.state; + let {paperlibrartdata,defaultActiveKey,titilesm,titiless,boolok,modalsType,SendTop,paramsid} = this.state; const params = this.props && this.props.match && this.props.match.params; // console.log("params"); // console.log(params); let urlsysl=`/paperlibrary?defaultActiveKey=${defaultActiveKey}`; return (
+ {SendTop===true? + this.submitInfos(b)}>:"" + } { modalsType===true? this.modalCancel()} diff --git a/public/react/src/modules/testpaper/component/Contentpart.js b/public/react/src/modules/testpaper/component/Contentpart.js index f5c0a5cb4..68535091b 100644 --- a/public/react/src/modules/testpaper/component/Contentpart.js +++ b/public/react/src/modules/testpaper/component/Contentpart.js @@ -18,6 +18,7 @@ import Contentquestionbank from "./Contentquestionbank"; import LoadingSpin from '../../../common/LoadingSpin'; import Listjihe from "./Listjihe"; import Certifiedprofessional from "../../modals/Certifiedprofessional"; +import SendTopicsModel from "./SendTopicsModel"; const { TabPane } = Tabs; const Search = Input.Search; class Contentpart extends Component { @@ -29,7 +30,8 @@ class Contentpart extends Component { mydisplay:false, occupation:2, isysladmins:false, - + SendTop:false, + paramsid:null, } } @@ -205,13 +207,15 @@ class Contentpart extends Component { } - - - - + submitInfos=(bool,id)=>{ + this.setState({ + SendTop:bool, + paramsid:id + }) + } render() { - let {page,defaultActiveKeyss,mydisplay}=this.state; + let {page,defaultActiveKeyss,mydisplay,SendTop,paramsid}=this.state; let {defaultActiveKey,defaultActiveKeybool}=this.props; let defaultActiveKeys=defaultActiveKey+''; @@ -277,7 +281,7 @@ class Contentpart extends Component { :"" } { - mydisplay===true? + mydisplay===true||SendTop===true? + +
+
+ 温馨提示:选择的试卷将会发送到指定课堂 +
+
+ +
+
+ + { + courses && courses.map((item, key) => { + return ( +
+ + {item.course_name} + +
+ ) + }) + } +
+ +
+ {showcheck === true ?
请先选择课堂
: ""} +
+ this.props.submitInfos(false, null)} className="pop_close task-btn mr30 ">取消 + this.submitInfo()}>确定 +
+
+
+
+ ) + } + +} + +export default SendTopicsModel;