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

修改样式

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