diff --git a/public/react/src/modules/question/Questionitem_banks.js b/public/react/src/modules/question/Questionitem_banks.js index 8b3bc8d44..b5364faf7 100644 --- a/public/react/src/modules/question/Questionitem_banks.js +++ b/public/react/src/modules/question/Questionitem_banks.js @@ -13,6 +13,7 @@ import JudquestionEditor from "./component/JudquestionEditor"; import Bottomsubmit from "../../modules/modals/Bottomsubmit"; import { connect } from 'react-redux'; import actions from "../../redux/actions"; +import QuestionModalPicture from "./component/QuestionModalPicture"; var restricte=false; class Questionitem_banks extends Component { constructor(props) { @@ -29,6 +30,7 @@ class Questionitem_banks extends Component { knowledgepoints: [], disciplmy:[], pages:1, + url:'' } @@ -517,14 +519,32 @@ class Questionitem_banks extends Component { this.scrollToAnchor("Itembankstopid"); } + handleShowUploadImage=(url)=>{ + this.setState({ + url:url + }) + } + handleClose=()=>{ + this.setState({ + url:'', + }) + } + + render() { - let {page, limit, count, Headertop, visible, placement, modalsType, item_type,restricte} = this.state; + let {page, limit, count, Headertop, visible, placement, modalsType, item_type,restricte,url} = this.state; const params = this.props && this.props.match && this.props.match.params; // ////console.log(params); return (
+ + {url? + this.handleClose()}> + : + "" + } { restricte===false?
- { - item_type && item_type === "SINGLE" ? + { + item_type && item_type === "SINGLE" ? + +
+ this.getanswerMdRef(ref)} + handleShowUploadImage={(url)=>this.handleShowUploadImage(url)} + > + + +
+ : item_type && item_type === "MULTIPLE" ? +
+ this.getChoquesEditor(ref)} + handleShowUploadImage={(url)=>this.handleShowUploadImage(url)} + > + + +
+ + : item_type && item_type === "JUDGMENT" ?
{ diff --git a/public/react/src/modules/question/component/SingleEditor.js b/public/react/src/modules/question/component/SingleEditor.js index c3196c2b9..6a14c3861 100644 --- a/public/react/src/modules/question/component/SingleEditor.js +++ b/public/react/src/modules/question/component/SingleEditor.js @@ -246,7 +246,11 @@ class SingleEditor extends Component { url:url, bindinginputs:i }) + try { + this.props.handleShowUploadImage(url) + }catch (e) { + } } bindinginputs=(i)=>{ this.setState({