courseware
杨树林 5 years ago
parent df7005483e
commit bd0060fe87

@ -22,6 +22,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) {
@ -38,6 +39,7 @@ class Questionitem_banks extends Component {
knowledgepoints: [],
disciplmy:[],
pages:1,
url:''
}
@ -526,14 +528,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 (
<div>
<div id={"Itembankstopid"} className="newMain clearfix intermediatecenter "
>
{url?
<QuestionModalPicture {...this.props} {...this.state} handleClose={()=>this.handleClose()}></QuestionModalPicture>
:
""
}
{
restricte===false?
<Prompt
@ -584,6 +604,7 @@ class Questionitem_banks extends Component {
{...this.state}
{...this.props}
getanswerMdRef={(ref) => this.getanswerMdRef(ref)}
handleShowUploadImage={(url)=>this.handleShowUploadImage(url)}
>
</SingleEditor>
@ -594,6 +615,7 @@ class Questionitem_banks extends Component {
{...this.state}
{...this.props}
getanswerMdRef={(ref) => this.getChoquesEditor(ref)}
handleShowUploadImage={(url)=>this.handleShowUploadImage(url)}
>
</ChoquesEditor>

@ -184,6 +184,12 @@ class ChoquesEditor extends Component{
bindinginputs:i
})
try {
this.props.handleShowUploadImage(url)
}catch (e) {
}
}
componentDidMount = () => {

@ -258,8 +258,12 @@ class SingleEditor extends Component{
url:url,
bindinginputs:i
})
try {
this.props.handleShowUploadImage(url)
}catch (e) {
}
}
bindinginputs=(i)=>{
this.setState({
bindinginputs:i

Loading…
Cancel
Save