调整样式

yslnewtiku
杨树林 5 years ago
parent 1096dea50a
commit d62a7794a6

@ -180,16 +180,16 @@ class Questionitem_banks extends Component {
// 1: [3]
// 2: (4) ["1", "2", "3", "4"]
for(var k=0;k<anserdata[2].length;k++){
console.log("k");
console.log(k);
const choicesdata={
choice_text:anserdata[2][k],
is_answer:anserdata[1]-1===k?1:0,
is_answer:anserdata[1][0]===(k+1)?1:0,
}
choices.push(choicesdata);
}
var data={
repertoire_id:1,
sub_repertoire_id:1,
@ -202,7 +202,6 @@ class Questionitem_banks extends Component {
};
debugger
if(boolnew===true){
axios.post(url, data)
@ -242,15 +241,24 @@ class Questionitem_banks extends Component {
const choices=[];
// 1: [3]
// 2: (4) ["1", "2", "3", "4"]
console.log("MULTIPLE");
console.log(anserdata);
for(var k=0;k<anserdata[2].length;k++){
console.log("k");
console.log(k);
var bool =false
for(var y=0;y<anserdata[1].length;y++){
if(anserdata[1][y]===(k+1)){
bool=true
}
}
const choicesdata={
choice_text:anserdata[2][k],
is_answer:anserdata[1]-1===k?1:0,
is_answer:bool===true?1:0,
}
choices.push(choicesdata);
}
var data={
repertoire_id:1,
sub_repertoire_id:1,
@ -422,7 +430,6 @@ class Questionitem_banks extends Component {
<SingleEditor
{...this.state}
{...this.props}
question_choices={this.state.myquestion_choicesco}
getanswerMdRef={(ref)=>this.getanswerMdRef(ref)}
>

@ -49,14 +49,13 @@ class ChoquesEditor extends Component{
if(this.props.item_banksedit.choices){
this.props.item_banksedit.choices.forEach((item, index) => {
console.log("SingleEditor");
console.log(item);
choicescomy.push({
choice_text:item.choice_text,
standard_boolean:item.is_answer,
})
})
_standard_answers = []
_question_choices = []
choicescomy.forEach((item, index) => {
_standard_answers.push(item.standard_boolean)
@ -105,9 +104,10 @@ class ChoquesEditor extends Component{
})
)
}else{
this.props.confirm({
content: `确认要删除这个选项吗?`,
onOk: () => {
// this.props.confirm({
// content: `确认要删除这个选项吗?`,
// onOk: () => {
this.toMDMode(null)
this.setState(
(prevState) => ({
@ -115,8 +115,9 @@ class ChoquesEditor extends Component{
standard_answers : update(prevState.standard_answers, {$splice: [[index, 1]]})
})
)
}
})
// }
// })
}
}
onSave = () => {

@ -330,7 +330,7 @@ class Itembankstop extends Component {
<style>
{
`
.ant-radio-button-wrapper{
.rbndclass .ant-radio-button-wrapper{
width:106px !important;
height:33px !important;
background:#EEEEEE;
@ -342,7 +342,7 @@ class Itembankstop extends Component {
margin-top: 6px !important;
}
.ant-radio-button-wrapper-checked {
.rbndclass .ant-radio-button-wrapper-checked {
width: 106px !important;
height: 33px !important;
background: #4CACFF !important;
@ -354,22 +354,22 @@ class Itembankstop extends Component {
margin-top: 6px!important;
}
.ant-radio-button-wrapper:not(:first-child)::before{
.rbndclass .ant-radio-button-wrapper:not(:first-child)::before{
border:0px !important;
width:0px !important;
}
.ant-radio-button-wrapper{
.rbndclass .ant-radio-button-wrapper{
border:0px !important;
}
.ant-radio-group{
.rbndclass .ant-radio-group{
border:0px !important;
}
.ant-radio-group label{
.rbndclass .ant-radio-group label{
border:0px !important;
}
.ant-radio-group span{
.rbndclass .ant-radio-group span{
border:0px !important;
}
@ -380,6 +380,7 @@ class Itembankstop extends Component {
`
}
</style>
<div className="rbndclass">
<Form.Item label="难度">
{getFieldDecorator('rbnd',
{
@ -394,7 +395,7 @@ class Itembankstop extends Component {
</Radio.Group>,
)}
</Form.Item>
</div>
{/*<Form.Item>*/}
{/* <Button type="primary" htmlType="submit" className="login-form-button">*/}
{/* 提交*/}

@ -59,6 +59,7 @@ class SingleEditor extends Component{
})
})
_standard_answers = []
_question_choices = []
choicescomy.forEach((item, index) => {
_standard_answers.push(item.standard_boolean)
@ -108,9 +109,6 @@ class SingleEditor extends Component{
})
)
}else{
this.props.confirm({
content: `确认要删除这个选项吗?`,
onOk: () => {
this.toMDMode(null)
this.setState(
(prevState) => ({
@ -118,8 +116,6 @@ class SingleEditor extends Component{
standard_answers : update(prevState.standard_answers, {$splice: [[index, 1]]})
})
)
}
})
}
}
onSave = () => {

Loading…
Cancel
Save