调整试题栏

yslnewtiku
杨树林 5 years ago
parent d62a7794a6
commit 5ca733ccbb

@ -41,6 +41,7 @@ class Question extends Component {
keyword:null, keyword:null,
timuid:null, timuid:null,
items_count:0, items_count:0,
basket_list:[],
} }
} }
@ -67,6 +68,8 @@ class Question extends Component {
} }
} }
}); });
this.getbasket_listdata();
} }
callback=(key)=>{ callback=(key)=>{
@ -301,8 +304,32 @@ class Question extends Component {
console.log(error); console.log(error);
}) })
} }
getbasket_listdata=()=>{
// 获取试题篮展开的数据
const url ="/item_baskets/basket_list.json";
axios.post(url)
.then((result) => {
if (result.data.status == 0) {
console.log("getbasket_listdata");
console.log(result.data);
this.setState({
basket_list:result.data,
})
}
}).catch((error) => {
console.log(error);
this.setState({
basket_list:[]
})
})
}
render() { render() {
let {page,limit,count,Headertop,visible,placement,modalsType}=this.state; let {page,limit,count,Headertop,visible,placement,modalsType,basket_list}=this.state;
return ( return (
<div className="newMain clearfix" ref={this.saveContainer}> <div className="newMain clearfix" ref={this.saveContainer}>
<QuestionModal {...this.props}{...this.state} modalsType={modalsType} modalCancel={()=>this.modalCancel()} setDownload={()=>this.setDownload()}></QuestionModal> <QuestionModal {...this.props}{...this.state} modalsType={modalsType} modalCancel={()=>this.modalCancel()} setDownload={()=>this.setDownload()}></QuestionModal>
@ -355,23 +382,28 @@ class Question extends Component {
onClose={()=>this.onClose()} onClose={()=>this.onClose()}
visible={visible} visible={visible}
> >
{/*<div className="mt25 mb26">*/} {
{/* <Input placeholder="未命名试卷" />*/} basket_list&&basket_list.length===0?
{/*</div>*/} <div className="drawernonedatadiv intermediatecenter">
{/*<div className="sortinxdirection">*/} <NoneData></NoneData>
{/* <p className="w50s intermediatecenterysls sortinxdirection font-14">单选题</p>*/} </div>
{/* <p className="w50s intermediatecenterysls xaxisreverseorder"><i className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor "></i></p>*/} :
{/*</div>*/} <div>
<div className="mt25 mb26">
{/*<div className="intermediatecenter verticallayout mt42">*/} <Input placeholder="未命名试卷" />
{/* <div className="drawerbutton">*/} </div>
{/* 试卷预览*/} <div className="sortinxdirection">
{/* </div>*/} <p className="w50s intermediatecenterysls sortinxdirection font-14">单选题</p>
{/*</div>*/} <p className="w50s intermediatecenterysls xaxisreverseorder"><i className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor "></i></p>
<div className="drawernonedatadiv intermediatecenter"> </div>
<NoneData></NoneData>
<div className="intermediatecenter verticallayout mt42">
</div> <div className="drawerbutton">
试卷预览
</div>
</div>
</div>
}
</Drawer> </Drawer>

@ -337,11 +337,23 @@ class JudquestionEditor extends Component{
<span className="xingtigans fl"><span className="xingtigan">答案选项</span></span> <span className="xingtigans fl"><span className="xingtigan">答案选项</span></span>
</div> </div>
<style>
<div className="mb10 sortinxdirection"> {
`
.choice_textcsss .ant-radio-button-wrapper{
border-radius:2px !important;
}
.choice_textcss .ant-radio-button-wrapper{
margin-left: 40px !important;
border-radius:2px !important;
}
`
}
</style>
<div className="mb10 sortinxdirection ">
<Radio.Group buttonStyle="solid" value={this.state.zqda} onChange={this.handleFormLayoutChange}> <Radio.Group buttonStyle="solid" value={this.state.zqda} onChange={this.handleFormLayoutChange}>
<Radio.Button value="0">正确</Radio.Button> <Radio.Button value="0" className={"choice_textcsss"}>正确</Radio.Button>
<Radio.Button value="1">错误</Radio.Button> <Radio.Button value="1" className={"choice_textcss"}>错误</Radio.Button>
</Radio.Group> </Radio.Group>

@ -68,12 +68,13 @@ class Listjihe extends Component {
</div> </div>
{/*内容*/} {/*内容*/}
<div className="w100s sortinxdirection"> <div className="w100s sortinxdirection">
<p className="w100s listjihetixingstits sortinxdirection">
<p className="w100s listjihetixingstits sortinxdirection ">
{ {
items.item_type==="JUDGMENT"? items.item_type==="JUDGMENT"?
items === undefined ||items === null? "" : items.choices.map((object, index) => { items === undefined ||items === null? "" : items.choices.map((object, index) => {
return ( return (
<p className="sortinxdirection ml10"> <p className="sortinxdirection ml10 ">
<Radio checked={object.is_answer}>{ <Radio checked={object.is_answer}>{
object.choice_text object.choice_text
}</Radio> }</Radio>

Loading…
Cancel
Save