Commit e5d2cc95 authored by 黄奎's avatar 黄奎
parents 0648d75c 49f8e26d
......@@ -20,22 +20,14 @@
{{index+1}}</el-checkbox>
</td>
<td>
<div class="InpDIV" v-html="item.Content" v-if="commonIndex!=index" @click="changeEdit(index)"></div>
<UeEditor v-model="item.Content" :config="config" v-else></UeEditor>
<div class="InpDIV" style="border:0;margin-top:-2px;" v-html="item.Content"></div>
</td>
<td style="width:40px;text-align:center;">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(index)"></i>
</td>
</tr>
</table>
<br />
<a class="addTiMuList" @click="addOption()">
<i class="iconfont icon-add"></i>添加更多
</a>
<br />
<br />
<el-checkbox v-model="setOption.IsMutex" :true-label="1" :false-label="0"><span
style="font-size:12px;">答案顺序打乱也判正确</span></el-checkbox>
<span v-if="setOption.IsMutex==1" style="font-size:12px;">答案顺序打乱也判正确</span>
<br />
<br />
<div class="entrytk_info">
......@@ -115,9 +107,6 @@
this.getAnswer();
this.$emit('getChild', this.data);
},
changeEdit(index) {
this.commonIndex = index;
}
},
mounted() {
......
......@@ -21,7 +21,7 @@
{{index+1}}</el-checkbox>
</td>
<td>
<div class="InpDIV" v-html="item.Content"></div>
<div class="InpDIV" style="border:0;margin-top:-2px;" v-html="item.Content"></div>
</td>
</tr>
</table>
......
......@@ -10,7 +10,7 @@
<table v-if="data&&data.length>0" class="common_TiTable">
<tr v-for="(item,index) in data">
<td style="width:50px;text-align:center;">
<div class="Answer_List" @click="ChangeItem(item)" :class="{'Is_Answer':item.IsAnswer}">
<div class="Answer_List" :class="{'Is_Answer':item.IsAnswer}">
{{item.Name}}
</div>
</td>
......@@ -52,15 +52,6 @@
this.getAnswer();
this.$emit('getChild', this.data);
},
ChangeItem(item) {
if (this.data && this.data.length > 0) {
this.data.forEach(item => {
item.IsAnswer = false;
})
}
item.IsAnswer = true;
this.getAnswer();
},
//获取正确答案
getAnswer() {
this.setOption.Answer = "";
......
......@@ -11,7 +11,7 @@
<br />
答案
<br />
<UeEditor v-model="setOption.Answer" :config="config"></UeEditor>
<div v-html="setOption.Answer"></div>
</div>
</template>
<script>
......
......@@ -35,38 +35,27 @@
</style>
<template>
<div class="sortingProblemQuestion">
<table v-if="data&&data.length>0" class="common_TiTable">
<table v-if="data&&data.length>0">
<tr v-for="(item,index) in data[0]">
<td style="width:40px;text-align:center;">
{{item.Name}}
</td>
<td>
<div class="InpDIV" v-html="item.Content" v-if="commonIndex!=index" @click="changeEdit(index)"></div>
<UeEditor v-model="item.Content" :config="config" v-else></UeEditor>
<div class="InpDIV" style="border:0;margin-top:-2px;" v-html="item.Content"></div>
</td>
<td style="width:40px;text-align:center;">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(index)"></i>
</td>
</tr>
</table>
<br />
<a class="addTiMuList" @click="addOption()">
<i class="iconfont icon-add"></i>添加更多
</a>
<br />
<div class="team_tit">答案:请在下方下拉框中对选项进行排序(顺序从左到右)</div>
<div style="padding-bottom:20px;">答案:请在下方下拉框中对选项进行排序(顺序从左到右)</div>
<table v-if="data&&data.length>0">
<tr>
<td>
<template v-for="(item,index) in data[1]">
<select v-model="item.Name" class="selectBox" :class="{'blue-border':index==clickIndex}"
@click="clickIndex=index">
<template v-for="(cItem,cIndex) in data[0]">
<option :key="cIndex" :label="cItem.Name" :value="cItem.Name">
</option>
</template>
</select>
</template>
<span v-for="(cItem,cIndex) in data[0]">
{{cItem.Name}}
</span>
</td>
</tr>
</table>
......@@ -103,6 +92,8 @@
},
created() {
this.initConfig();
console.log(this.data[1],'data1');
console.log(this.data[0],'data0');
},
methods: {
initConfig() {
......@@ -179,10 +170,6 @@
this.setOption.Answer = answer;
}
},
//点击切换输入
changeEdit(index) {
this.commonIndex = index;
},
},
mounted() {
......
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