Commit c34c7ff6 authored by 黄奎's avatar 黄奎

页面修改

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