调整试题栏

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

@ -41,6 +41,7 @@ class Question extends Component {
keyword:null,
timuid:null,
items_count:0,
basket_list:[],
}
}
@ -67,6 +68,8 @@ class Question extends Component {
}
}
});
this.getbasket_listdata();
}
callback=(key)=>{
@ -301,8 +304,32 @@ class Question extends Component {
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() {
let {page,limit,count,Headertop,visible,placement,modalsType}=this.state;
let {page,limit,count,Headertop,visible,placement,modalsType,basket_list}=this.state;
return (
<div className="newMain clearfix" ref={this.saveContainer}>
<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()}
visible={visible}
>
{/*<div className="mt25 mb26">*/}
{/* <Input placeholder="未命名试卷" />*/}
{/*</div>*/}
{/*<div className="sortinxdirection">*/}
{/* <p className="w50s intermediatecenterysls sortinxdirection font-14">单选题</p>*/}
{/* <p className="w50s intermediatecenterysls xaxisreverseorder"><i className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor "></i></p>*/}
{/*</div>*/}
{/*<div className="intermediatecenter verticallayout mt42">*/}
{/* <div className="drawerbutton">*/}
{/* 试卷预览*/}
{/* </div>*/}
{/*</div>*/}
<div className="drawernonedatadiv intermediatecenter">
<NoneData></NoneData>
</div>
{
basket_list&&basket_list.length===0?
<div className="drawernonedatadiv intermediatecenter">
<NoneData></NoneData>
</div>
:
<div>
<div className="mt25 mb26">
<Input placeholder="未命名试卷" />
</div>
<div className="sortinxdirection">
<p className="w50s intermediatecenterysls sortinxdirection font-14">单选题</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor "></i></p>
</div>
<div className="intermediatecenter verticallayout mt42">
<div className="drawerbutton">
试卷预览
</div>
</div>
</div>
}
</Drawer>

@ -337,11 +337,23 @@ class JudquestionEditor extends Component{
<span className="xingtigans fl"><span className="xingtigan">答案选项</span></span>
</div>
<div className="mb10 sortinxdirection">
<style>
{
`
.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.Button value="0">正确</Radio.Button>
<Radio.Button value="1">错误</Radio.Button>
<Radio.Button value="0" className={"choice_textcsss"}>正确</Radio.Button>
<Radio.Button value="1" className={"choice_textcss"}>错误</Radio.Button>
</Radio.Group>

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

Loading…
Cancel
Save