Commit 83599ba0 authored by 罗超's avatar 罗超

修改样式

parent ff3a2362
<!--分录题-->
<style>
.entryProblemQuestion{
width:100%;
}
.entrytk_info{
color: #A8A8B3;
font-size: 12px;
line-height: 24px;
cursor: default;
}
</style>
<template>
<div class="entryProblemQuestion">
<table v-if="data&&data.length>0">
<table v-if="data&&data.length>0" class="common_TiTable">
<tr v-for="(item,index) in data">
<td>
{{index+1}} </el-checkbox>
<td style="width:40px;text-align:center;padding-top:8px;">
{{index+1}}</el-checkbox>
</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>
<a style="cursor:pointer;" @click="deleteOpion(index)">删除</a>
<td style="width:40px;text-align:center;">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(index)"></i>
<!-- <a style="cursor:pointer;" @click="deleteOpion(index)">删除</a> -->
</td>
</tr>
<tfoot>
<tr>
<td colspan="3">
<a style="cursor:pointer;" @click="addOption()">添加选项</a>
<a class="addTiMuList" @click="addOption()">
<i class="iconfont icon-add"></i>添加选项
</a>
<!-- <a style="cursor:pointer;" @click="addOption()">添加选项</a> -->
</td>
</tr>
<tr>
<td colspan="3">
<div class="entrytk_info">
1. 一个空有多种答案时请用";"隔开。如:水;H2O
<br />
2. 若试题答案是数字,可设置范围,两个数字之间用"-"。如:1-9,学生填写1到9之间的数字都算正确(包括1和9)
</div>
</td>
</tr>
</tfoot>
......@@ -51,6 +66,7 @@
initialFrameWidth: null,
initialFrameHeight: 80,
},
commonIndex:-1,
};
},
created() {},
......@@ -70,6 +86,9 @@
returnDataToParent() {
this.$emit('getChild', this.data);
},
changeEdit(index){
this.commonIndex = index;
}
},
mounted() {
......
<!--阅读理解-->
<style>
.readingComprehensioQuestion{
width:100%;
}
.edui-editor-toolbarbox{
text-align: left;
}
.readingComprehensioQuestion .clozeTest_question_tit {
width: 100%;
height: 40px;
background: #F7F8FA;
padding: 0 20px;
line-height: 40px;
font-size: 14px;
color: #646873;
display: flex;
justify-content: space-between;
align-items: center;
}
.clozeTest_question_tit i {
color: #acbfd9;
cursor: pointer;
}
</style>
<template>
<div class="readingComprehensioQuestion">
<template v-if="data&&data.length>0" v-for="(item,index) in data">
<table>
<table class="common_TiTable">
<thead>
<tr>
<th colspan="3" style="text-align:left;">
{{index+1}} 题 ({{item.QuestionName}})
<div class="clozeTest_question_tit" @click="showNav(index)">
<div>
<i class="iconfont icon-arrowdown2" v-if="(commonIndex==index)&&!isShow"></i>
<i class="iconfont icon-arrowright" v-else></i>
{{index+1}}小题<span style="color:#A8A8B3;">({{item.QuestionName}})</span>
</div>
<div>
<i class="iconfont icon-img_delete_small" @click="deleteQuestion(index)"></i>
</div>
</div>
</th>
</tr>
<tr>
<!-- <tr>
<th colspan="3">
<UeEditor v-model="item.SubTitle" :config="config"></UeEditor>
</th>
</tr>
</tr> -->
</thead>
<tbody>
<tbody v-if="(commonIndex==index)&&!isShow">
<tr>
<td colspan="3">
<UeEditor v-model="item.SubTitle" :config="config"></UeEditor>
</td>
</tr>
<!--选择题-->
<template v-if="item.QuestionKey=='single' ||item.QuestionKey=='multiple'">
<tr v-for="(subItem,subIndex) in item.SubAnwser">
<td>
<td style="width:40px;text-align:center;">
<template v-if="item.QuestionKey=='single'">
<el-checkbox v-model="subItem.IsAnswer" @change="ChangeItem(item,subItem)">{{subItem.Name}}
</el-checkbox>
<div class="Answer_List" @click="ChangeItem(item,subItem)" :class="{'Is_Answer':subItem.IsAnswer}">
{{subItem.Name}}
</div>
</template>
<template v-else-if="item.QuestionKey=='multiple'">
<el-checkbox v-model="subItem.IsAnswer">{{subItem.Name}}
</el-checkbox>
<div class="Answer_List" @click="changeMutile(subItem)" :class="{'Is_Answer':subItem.IsAnswer}">
{{subItem.Name}}
</div>
</template>
</td>
<td>
<UeEditor v-model="subItem.Content" :config="config"></UeEditor>
<div class="InpDIV" v-html="subItem.Content" v-if="childIndex!=subIndex"
@click="changeEdit(subIndex)"></div>
<UeEditor v-model="subItem.Content" :config="config" v-else></UeEditor>
</td>
<td>
<a style="cursor:pointer;" @click="deleteOpion(item,subIndex)">删除</a>
<td style="width:40px;text-align:center;">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(item,subIndex)"></i>
</td>
</tr>
</template>
<!--填空题-->
<template v-if="item.QuestionKey=='fill-in'">
<tr v-for="(subItem,subIndex) in item.SubAnwser">
<td>
{{subIndex+1}}
<td style="width:50px;text-align:center;padding-top:8px;">
{{subIndex+1}}
</td>
<td>
<UeEditor v-model="subItem.Content" :config="config"></UeEditor>
<div class="InpDIV" v-html="subItem.Content" v-if="childIndex!=subIndex"
@click="changeEdit(subIndex)"></div>
<UeEditor v-model="subItem.Content" :config="config" v-else></UeEditor>
</td>
<td>
<a style="cursor:pointer;" @click="deleteOpion(item,subIndex)">删除</a>
<td style="width:30px;text-align:center;">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(item,subIndex)"></i>
</td>
</tr>
</template>
<!--判断题-->
<template v-if="item.QuestionKey=='judge'">
<tr v-for="(subItem,subIndex) in item.SubAnwser">
<td>
<el-checkbox v-model="subItem.IsAnswer" @change="ChangeItem(item,subItem)">{{subItem.Name}}
</el-checkbox>
<td style="width:50px;">
<div class="Answer_List" @click="ChangeItem(item,subItem)" :class="{'Is_Answer':subItem.IsAnswer}">
{{subItem.Name}}
</div>
</td>
<td colspan="2" style="text-align:left;">
<td colspan="2" style="text-align:left;vertical-align:middle;">
{{subItem.Content}}
</td>
</tr>
......@@ -75,26 +117,29 @@
</tr>
</template>
</tbody>
<tfoot>
<tfoot v-if="item.QuestionKey=='single' ||item.QuestionKey=='multiple'||item.QuestionKey=='fill-in'">
<tr>
<td colspan="3">
<!--选择题-->
<template v-if="item.QuestionKey=='single' ||item.QuestionKey=='multiple'">
<a style="cursor:pointer;" @click="addOption(item)">添加选项</a>
<a class="addTiMuList" @click="addOption(item)">
<i class="iconfont icon-add"></i>添加选项
</a>
</template>
<!--填空题-->
<template v-if="item.QuestionKey=='fill-in'">
<a style="cursor:pointer;" @click="addFillIn(item)">添加更多</a>
<a class="addTiMuList" @click="addFillIn(item)">
<i class="iconfont icon-add"></i>添加更多
</a>
</template>
&nbsp;
<a style="cursor:pointer;" @click="deleteQuestion(index)">删除问题</a>
</td>
</tr>
</tfoot>
</table>
</template>
<br />
<q-btn-dropdown color="primary" label="添加小题" style="margin-left:5px;">
<q-btn-dropdown color="primary" label="添加小题" style="margin:0 0 20px 5px;">
<q-list>
<q-item v-for="(fItem,fIndex) in firstTypeList" @click="onItemClick(fItem)" clickable v-close-popup
:key="fIndex">
......@@ -134,6 +179,10 @@
},
optionTitleList: [],
firstTypeList: [], //问题类型
commonIndex:-1,
isShow:true,
commonIndex2:-2,
childIndex: -1,
};
},
created() {
......@@ -236,6 +285,25 @@
}
subItem.IsAnswer = true;
},
//多选题
changeMutile(subItem){
subItem.IsAnswer = !subItem.IsAnswer;
},
//点击切换输入
changeEdit(index){
this.childIndex=index;
},
// //点击展开收起
showNav(index) {
if(this.commonIndex2==index){
this.commonIndex=index;
this.isShow=!this.isShow;
}else{
this.commonIndex=index;
this.isShow=false;
this.commonIndex2=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