Commit 507a9a96 authored by 黄奎's avatar 黄奎

页面修改

parent e4418ff3
...@@ -11,9 +11,17 @@ ...@@ -11,9 +11,17 @@
<tbody v-for="(item,index) in data.QuestionContentObj" :key="index"> <tbody v-for="(item,index) in data.QuestionContentObj" :key="index">
<tr> <tr>
<td style="width:40px;text-align:center;"> <td style="width:40px;text-align:center;">
<div class="Answer_List2"> <template v-if="isOperate">
{{item.Name}} <div class="Answer_List2" style="cursor:pointer;" @click="ChangeItem(item)"
</div> :class="{'Is_Answer':item.IsAnswer}">
{{item.Name}}
</div>
</template>
<template v-else>
<div class="Answer_List2">
{{item.Name}}
</div>
</template>
</td> </td>
<td> <td>
<div class="InpDIV" style="border:0;" v-html="item.Content"></div> <div class="InpDIV" style="border:0;" v-html="item.Content"></div>
...@@ -41,7 +49,12 @@ ...@@ -41,7 +49,12 @@
isShowAnswer: { isShowAnswer: {
type: Boolean, type: Boolean,
default: false, default: false,
} },
//是否可操作(PC端考试使用)
isOperate: {
type: Boolean,
default: false,
},
}, },
data() { data() {
return { return {
...@@ -51,7 +64,17 @@ ...@@ -51,7 +64,17 @@
mounted() {}, mounted() {},
methods: { methods: {
ChangeItem(item) {
if (this.data.QuestionContentObj && this.data.QuestionContentObj.length > 0) {
this.data.QuestionContentObj.forEach(item => {
item.IsAnswer = false;
})
}
item.IsAnswer = true;
this.data.Answer = item.Name;
console.log("this.data",this.data);
},
}, },
watch: { watch: {
isShowAnswer: { isShowAnswer: {
......
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
</span> </span>
<!--单选题--> <!--单选题-->
<v-single v-if="dItem.QuestionTypeKey=='single'||dItem.QuestionTypeKey=='single-number'" <v-single v-if="dItem.QuestionTypeKey=='single'||dItem.QuestionTypeKey=='single-number'"
:questionObj="dItem" :isShowAnswer="isShowAnswer"> :questionObj="dItem" :isShowAnswer="isShowAnswer" :isOperate="isOperate">
</v-single> </v-single>
<!--多选题--> <!--多选题-->
<v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer"> <v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer">
...@@ -365,6 +365,7 @@ ...@@ -365,6 +365,7 @@
}, },
PaperConfig: {}, //试卷配置 PaperConfig: {}, //试卷配置
isShowAnswer: false, //是否显示答案 isShowAnswer: false, //是否显示答案
isOperate:true,//是否可操作
examScore: 0, //总分, examScore: 0, //总分,
examNum: 0, //总题量 examNum: 0, //总题量
} }
......
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