Commit c34c7ff6 authored by 黄奎's avatar 黄奎

页面修改

parent 7fd4be90
<!--阅读理解-->
<style>
.readingComprehensioQuestion{
width:100%;
.readingComprehensioQuestion {
width: 100%;
}
.edui-editor-toolbarbox{
.edui-editor-toolbarbox {
text-align: left;
}
.readingComprehensioQuestion .clozeTest_question_tit {
width: 100%;
height: 40px;
......@@ -18,10 +20,12 @@
justify-content: space-between;
align-items: center;
}
.clozeTest_question_tit i {
color: #acbfd9;
cursor: pointer;
}
</style>
<template>
<div class="readingComprehensioQuestion">
......@@ -55,23 +59,25 @@
</td>
</tr>
<!--选择题-->
<template v-if="item.QuestionKey=='single' ||item.QuestionKey=='multiple'|| item.QuestionKey=='single-number'">
<template
v-if="item.QuestionKey=='single' ||item.QuestionKey=='multiple'|| item.QuestionKey=='single-number'">
<tr v-for="(subItem,subIndex) in item.SubAnwser">
<td style="width:40px;text-align:center;">
<template v-if="item.QuestionKey=='single'||item.QuestionKey=='multiple'|| item.QuestionKey=='single-number'">
<template
v-if="item.QuestionKey=='single'||item.QuestionKey=='multiple'|| item.QuestionKey=='single-number'">
<div class="Answer_List" @click="ChangeItem(item,subItem)" :class="{'Is_Answer':subItem.IsAnswer}">
{{subItem.Name}}
</div>
</template>
<template v-else-if="item.QuestionKey=='multiple'">
<div class="Answer_List" @click="changeMutile(subItem)" :class="{'Is_Answer':subItem.IsAnswer}">
{{subItem.Name}}
</div>
<div class="Answer_List" @click="changeMutile(subItem)" :class="{'Is_Answer':subItem.IsAnswer}">
{{subItem.Name}}
</div>
</template>
</td>
<td>
<div class="InpDIV" v-html="subItem.Content" v-if="childIndex!=subIndex"
@click="changeEdit(subIndex)"></div>
<div class="InpDIV" v-html="subItem.Content" v-if="childIndex!=subIndex" @click="changeEdit(subIndex)">
</div>
<UeEditor v-model="subItem.Content" :config="config" v-else></UeEditor>
</td>
<td style="width:40px;text-align:center;">
......@@ -86,8 +92,8 @@
{{subIndex+1}}
</td>
<td>
<div class="InpDIV" v-html="subItem.Content" v-if="childIndex!=subIndex"
@click="changeEdit(subIndex)"></div>
<div class="InpDIV" v-html="subItem.Content" v-if="childIndex!=subIndex" @click="changeEdit(subIndex)">
</div>
<UeEditor v-model="subItem.Content" :config="config" v-else></UeEditor>
</td>
<td style="width:30px;text-align:center;">
......@@ -179,9 +185,9 @@
},
optionTitleList: [],
firstTypeList: [], //问题类型
commonIndex:-1,
isShow:true,
commonIndex2:-2,
commonIndex: -1,
isShow: true,
commonIndex2: -2,
childIndex: -1,
};
},
......@@ -249,7 +255,7 @@
cancel: "取消",
}).onOk(() => {
item.SubAnwser.splice(index, 1);
this.childIndex=-1;
this.childIndex = -1;
this.calcOptionTitle();
}).onCancel(() => {
......@@ -288,10 +294,15 @@
calcOptionTitle() {
if (this.data && this.data.length > 0) {
this.data.forEach((item, index) => {
if (item.QuestionKey == "single" || item.QuestionKey == "multiple")
if (item.QuestionKey == "single" || item.QuestionKey == "multiple") {
item.SubAnwser.forEach((subItem, subIndex) => {
subItem.Name = this.optionTitleList[subIndex];
})
} else {
item.SubAnwser.forEach((subItem, subIndex) => {
subItem.Name = subIndex + 1;
})
}
})
}
},
......@@ -308,23 +319,23 @@
}
subItem.IsAnswer = true;
},
//多选题
changeMutile(subItem){
//多选题
changeMutile(subItem) {
subItem.IsAnswer = !subItem.IsAnswer;
},
//点击切换输入
changeEdit(index){
this.childIndex=index;
changeEdit(index) {
this.childIndex = index;
},
// //点击展开收起
showNav(index) {
if(this.commonIndex2==index){
this.commonIndex=index;
this.isShow=!this.isShow;
}else{
this.commonIndex=index;
this.isShow=false;
this.commonIndex2=index;
if (this.commonIndex2 == index) {
this.commonIndex = index;
this.isShow = !this.isShow;
} else {
this.commonIndex = index;
this.isShow = false;
this.commonIndex2 = index;
}
},
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment