|
@@ -20,11 +20,11 @@
|
|
|
:key="'col' + colIndex"
|
|
|
:style="{ width: curQue.colWidthList[colIndex].width + '%',textAlign:(curQue.align?curQue.align:'center') }"
|
|
|
>
|
|
|
- <template v-if="!col.isNumll">
|
|
|
+ <template v-if="!col.isNull">
|
|
|
{{ col.con }}
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <div v-html="col.con" contenteditable="true" placeholder="输入" class="input"></div>
|
|
|
+ <div v-html="curQue.Bookanswer[rowIndex][colIndex]" contenteditable="true" placeholder="输入" class="input"></div>
|
|
|
<!-- <input type="text" v-model="col.con" /> -->
|
|
|
</template>
|
|
|
</td>
|
|
@@ -58,7 +58,7 @@ export default {
|
|
|
components: {
|
|
|
Soundrecord,
|
|
|
},
|
|
|
- props: ["curQue"],
|
|
|
+ props: ["curQue","Bookanswer"],
|
|
|
data() {
|
|
|
//这里存放数据
|
|
|
return {};
|
|
@@ -73,13 +73,25 @@ export default {
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
|
- this.curQue.option.forEach((item) => {
|
|
|
- item.forEach((it) => {
|
|
|
- if (it.con == "") {
|
|
|
- it.isNumll = true;
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
+ if (!this.curQue.Bookanswer) {
|
|
|
+ let curCorrect = [];
|
|
|
+ this.curQue.option.forEach((item) => {
|
|
|
+ let curCorrectItem = []
|
|
|
+ item.forEach((it)=>{
|
|
|
+ if (it.con == "") {
|
|
|
+ curCorrectItem.push('')
|
|
|
+ it.isNull = true
|
|
|
+ }else{
|
|
|
+ curCorrectItem.push(null)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ curCorrect.push(curCorrectItem)
|
|
|
+ });
|
|
|
+ this.$set(this.curQue, "Bookanswer", curCorrect);
|
|
|
+ } else {
|
|
|
+ let curCorrect = JSON.parse(JSON.stringify(this.Bookanswer));
|
|
|
+ this.$set(this.curQue, "Bookanswer", curCorrect);
|
|
|
+ }
|
|
|
},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {},
|