Commit 26770c04 authored by 罗超's avatar 罗超

修改

parent 36325f89
<!--判断题--> <!--判断题-->
<style> <style>
.judgeQuestion{
width:100%;
}
</style> </style>
<template> <template>
<div class="judgeQuestion"> <div class="judgeQuestion">
<table v-if="data&&data.length>0"> <table v-if="data&&data.length>0" class="common_TiTable">
<tr v-for="(item,index) in data"> <tr v-for="(item,index) in data">
<td> <td style="width:50px;text-align:center;">
<el-checkbox v-model="item.IsAnswer" @change="ChangeItem(item)">{{item.Name}}</el-checkbox> <div class="Answer_List" @click="ChangeItem(item)" :class="{'Is_Answer':item.IsAnswer}">
{{item.Name}}
</div>
</td> </td>
<td> <td style="vertical-align:middle;">
<UeEditor v-model="item.Content" :config="config"></UeEditor> <span v-if="index==0"></span>
<span v-if="index==1"></span>
<!-- <UeEditor v-model="item.Content" :config="config"></UeEditor> -->
</td> </td>
</tr> </tr>
</table> </table>
......
<!--连线题--> <!--连线题-->
<style> <style>
.matchingQuestion{
width:100%;
}
.team_tit {
display:inline-block;
font-size: 14px;
color: #A8A8B3;
padding-bottom: 20px;
margin-left:13px;
}
.line_center{
display: inline-block;
width: 28px;
height: 10px;
border-top: 1px solid #E1E1E5;
margin: 13px 12px 0 0;
}
.selectBox2 {
display: inline-block;
vertical-align: top;
text-align: left;
position: relative;
cursor: pointer;
width: 58px;
line-height: 24px;
height: 24px;
background: #FFFFFF;
border: 1px solid #E1E1E5;
border-radius: 4px;
font-size: 12px;
color: #181E33;
outline: none;
}
</style> </style>
<template> <template>
<div class="matchingQuestion"> <div class="matchingQuestion">
<span>第一组</span> <span class="team_tit" style="margin-top:20px;padding-bottom:0;">第1组:</span>
<table v-if="data&&data.length>0"> <table v-if="data&&data.length>0" class="common_TiTable">
<tr v-for="(item,index) in data[0]"> <tr v-for="(item,index) in data[0]">
<td> <td style="width:40px;text-align:center;padding-top:10px;">
{{item.Name}} {{item.Name}}
</td> </td>
<td> <td>
<UeEditor v-model="item.Content" :config="config"></UeEditor> <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>
</td> </td>
<td> <td style="width:40px;text-align:center;">
<a style="cursor:pointer;" @click="deleteOpion(0,index)">删除</a> <i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(0,index)"></i>
<!-- <a style="cursor:pointer;" @click="deleteOpion(0,index)">删除</a> -->
</td> </td>
</tr> </tr>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="3"> <td colspan="3">
<a style="cursor:pointer;" @click="addOption(0)">添加选项</a> <a class="addTiMuList" style="margin-left:13px;" @click="addOption(0)">
<i class="iconfont icon-add"></i>添加更多
</a>
</td> </td>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
<span>第二组</span> <span class="team_tit">第2组:</span>
<table v-if="data&&data.length>1"> <table v-if="data&&data.length>1" class="common_TiTable">
<tr v-for="(item,index) in data[1]"> <tr v-for="(item,index) in data[1]">
<td> <td style="width:40px;text-align:center;padding-top:10px;">
{{item.Name}} {{item.Name}}
</td> </td>
<td> <td>
<UeEditor v-model="item.Content" :config="config"></UeEditor> <div class="InpDIV" v-html="item.Content" v-if="commonIndex2!=index" @click="changeEdit2(index)"></div>
<UeEditor v-model="item.Content" :config="config" v-else></UeEditor>
</td> </td>
<td> <td style="width:40px;text-align:center;">
<a style="cursor:pointer;" @click="deleteOpion(0,index)">删除</a> <i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(1,index)"></i>
</td> </td>
</tr> </tr>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="3"> <td colspan="3">
<a style="cursor:pointer;" @click="addOption(1)">添加选项</a> <a class="addTiMuList" style="margin-left:13px;" @click="addOption(0)">
<i class="iconfont icon-add"></i>添加更多
</a>
</td> </td>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
<span>答案</span> <span class="team_tit">答案</span>
<table v-if="data&&data.length>2"> <table v-if="data&&data.length>2" style="padding-left:13px;">
<tr v-for="(item,index) in data[2]"> <tr v-for="(item,index) in data[2]">
<td> <td style="width:30px;">
{{item.Name}} {{item.Name}}
</td> </td>
<td> <td>
----- <span class="line_center"></span>
</td> </td>
<td> <td>
<select v-model="item.Content"> <select v-model="item.Content" class="selectBox2">
<template v-for="(cItem,cIndex) in data[1]"> <template v-for="(cItem,cIndex) in data[1]">
<option :key="cIndex" :label="cItem.Name" :value="cItem.Name"> <option :key="cIndex" :label="cItem.Name" :value="cItem.Name">
</option> </option>
...@@ -89,6 +128,8 @@ ...@@ -89,6 +128,8 @@
initialFrameHeight: 80, initialFrameHeight: 80,
}, },
optionTitleList: [], optionTitleList: [],
commonIndex:-1,
commonIndex2:-1
}; };
}, },
computed: { computed: {
...@@ -138,10 +179,19 @@ ...@@ -138,10 +179,19 @@
returnDataToParent() { returnDataToParent() {
this.$emit('getChild', this.data); this.$emit('getChild', this.data);
}, },
//点击切换输入
changeEdit(index){
this.commonIndex=index;
this.commonIndex2=-1;
},
changeEdit2(index){
this.commonIndex2=index;
this.commonIndex=-1;
}
}, },
mounted() { mounted() {
console.log(this.data,'data');
}, },
watch: { watch: {
data: { data: {
handler(newValue) { handler(newValue) {
......
<!--简答题--> <!--简答题-->
<style> <style>
.shortAnswerQuestion{
width:100%;
margin-bottom:20px;
}
</style> </style>
<template> <template>
<div class="shortAnswerQuestion"> <div class="shortAnswerQuestion">
......
<!--排序题--> <!--排序题-->
<style> <style>
.sortingProblemQuestion{
width:100%
}
.team_tit{
font-size: 14px;
color: #A8A8B3;
padding-bottom: 20px;
}
.selectBox{
display: inline-block;
vertical-align: top;
text-align: left;
position: relative;
cursor: pointer;
width: 58px;
line-height: 24px;
height: 24px;
background: #FFFFFF;
border: 1px solid #E1E1E5;
border-radius: 4px;
font-size: 12px;
color: #181E33;
margin: 0 20px 14px 0;
}
.blue-border {
border: 1px solid #FFFFFF;
box-shadow: 0 0 7px 1px #75BAFF;
}
</style> </style>
<template> <template>
<div class="sortingProblemQuestion"> <div class="sortingProblemQuestion">
<table v-if="data&&data.length>0"> <table v-if="data&&data.length>0" class="common_TiTable">
<tr v-for="(item,index) in data[0]"> <tr v-for="(item,index) in data[0]">
<td> <td style="width:40px;text-align:center;">
{{item.Name}} {{item.Name}}
</td> </td>
<td> <td>
<UeEditor v-model="item.Content" :config="config"></UeEditor> <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>
</td> </td>
<td> <td style="width:40px;text-align:center;">
<a style="cursor:pointer;" @click="deleteOpion(index)">删除</a> <i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(index)"></i>
</td> </td>
</tr> </tr>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="3"> <td colspan="3">
<a style="cursor:pointer;" @click="addOption()">添加选项</a> <a class="addTiMuList" @click="addOption()">
<i class="iconfont icon-add"></i>添加选项
</a>
</td> </td>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
答案:请在下方下拉框中对选项进行排序(顺序从左到右) <div class="team_tit">答案:请在下方下拉框中对选项进行排序(顺序从左到右)</div>
<br />
<table v-if="data&&data.length>0"> <table v-if="data&&data.length>0">
<tr> <tr>
<td> <td>
<template v-for="(item,index) in data[1]"> <template v-for="(item,index) in data[1]">
<select v-model="item.Name"> <select v-model="item.Name" class="selectBox" :class="{'blue-border':index==clickIndex}" @click="clickIndex=index">
<template v-for="(cItem,cIndex) in data[0]"> <template v-for="(cItem,cIndex) in data[0]">
<option :key="cIndex" :label="cItem.Name" :value="cItem.Name"> <option :key="cIndex" :label="cItem.Name" :value="cItem.Name">
</option> </option>
...@@ -64,6 +93,8 @@ ...@@ -64,6 +93,8 @@
initialFrameHeight: 80, initialFrameHeight: 80,
}, },
optionTitleList: [], optionTitleList: [],
commonIndex:-1,
clickIndex:-1,
}; };
}, },
created() { created() {
...@@ -76,6 +107,7 @@ ...@@ -76,6 +107,7 @@
//删除选项 //删除选项
deleteOpion(index) { deleteOpion(index) {
this.data[0].splice(index, 1); this.data[0].splice(index, 1);
this.data[1].splice(index, 1);
this.calcOptionTitle(); this.calcOptionTitle();
}, },
//新增选项 //新增选项
...@@ -112,6 +144,10 @@ ...@@ -112,6 +144,10 @@
returnDataToParent() { returnDataToParent() {
this.$emit('getChild', this.data); this.$emit('getChild', this.data);
}, },
//点击切换输入
changeEdit(index){
this.commonIndex=index;
},
}, },
mounted() { 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