Commit 1cae7be9 authored by 黄奎's avatar 黄奎

页面修改

parent 1c22ae98
......@@ -143,9 +143,10 @@
<!--多选题-->
<multiple v-if="questionObj.Key=='multiple'" :questionData="AnswerList" @getChild="getChildData"
:setOption="objOption"></multiple>
<!--填空题-->
<fill-in v-if="questionObj.Key=='fill-in'" :questionData="AnswerList" @getChild="getChildData"
:setOption="objOption"></fill-in>
<!--填空题、分录题、资料题-->
<fill-in
v-if="questionObj.Key=='fill-in'||questionObj.Key=='entry-problem'|| questionObj.Key=='data-question'"
:questionData="AnswerList" @getChild="getChildData" :setOption="objOption"></fill-in>
<!--判断题-->
<judge v-if="questionObj.Key=='judge'" :questionData="AnswerList" @getChild="getChildData"
:setOption="objOption"></judge>
......@@ -153,10 +154,6 @@
<short-answer v-if="questionObj.Key=='short-answer'||questionObj.Key=='noun-explanation'||questionObj.Key=='essay-question'
||questionObj.Key=='calculation' || questionObj.Key=='spoken'|| questionObj.Key=='other'
" :setOption="objOption"> </short-answer>
<!--分录题、资料题-->
<entry-problem v-if="questionObj.Key=='entry-problem'|| questionObj.Key=='data-question'"
:questionData="AnswerList" :setOption="objOption" @getChild="getChildData">
</entry-problem>
<!--连线题-->
<matching v-if="questionObj.Key=='matching'" :questionData="AnswerList" :setOption="objOption"
@getChild="getChildData"></matching>
......@@ -265,7 +262,6 @@
import fillIn from '../questiontype/fill-in'
import judge from '../questiontype/judge'
import shortAnswer from '../questiontype/short-answer'
import entryProblem from '../questiontype/entry-problem'
import matching from '../questiontype/matching'
import sortingProblem from '../questiontype/sorting-problem'
import cloze from '../questiontype/cloze'
......@@ -280,7 +276,6 @@
fillIn, //填空题
judge, //判断题
shortAnswer, //简答题
entryProblem, //分录题
matching, //连线题
sortingProblem, //排序题
cloze, //完型填空
......@@ -574,15 +569,15 @@
break;
//排序题
case "sorting-problem":
retMessage = questionBankSortingproblemValidate(gName, detailsList,this.objOption);
retMessage = questionBankSortingproblemValidate(gName, detailsList, this.objOption);
break;
//完型填空
case "cloze":
retMessage = questionBankClozeValidate(gName, detailsList,this.objOption);
retMessage = questionBankClozeValidate(gName, detailsList, this.objOption);
break;
//阅读理解
case "reading-comprehensio":
retMessage = questionBankReadingcomprehensioValidate(gName, detailsList,this.objOption);
retMessage = questionBankReadingcomprehensioValidate(gName, detailsList, this.objOption);
break;
//口语题
case "spoken":
......@@ -590,7 +585,7 @@
break;
//听力题
case "listening":
retMessage = questionBankReadingcomprehensioValidate(gName, detailsList,this.objOption);
retMessage = questionBankReadingcomprehensioValidate(gName, detailsList, this.objOption);
break;
//公用选项题
case "sharing-choose":
......@@ -602,7 +597,7 @@
break;
//单选题-数字
case "single-number":
retMessage = questionBankChooseValidate(gName, detailsList,this.objOption);
retMessage = questionBankChooseValidate(gName, detailsList, this.objOption);
break;
}
if (retMessage != '') {
......
......@@ -114,7 +114,6 @@
import fillIn from '../questiontype/fill-in'
import judge from '../questiontype/judge'
import shortAnswer from '../questiontype/short-answer'
import entryProblem from '../questiontype/entry-problem'
import matching from '../questiontype/matching'
import sortingProblem from '../questiontype/sorting-problem'
import cloze from '../questiontype/cloze'
......@@ -129,7 +128,6 @@
fillIn, //填空题
judge, //判断题
shortAnswer, //简答题
entryProblem, //分录题
matching, //连线题
sortingProblem, //排序题
cloze, //完型填空
......
......@@ -20,8 +20,6 @@
color: #646873;
}
.clozeQuestion .add_LiteBtn {
width: 100px;
height: 30px;
......@@ -45,6 +43,16 @@
text-align: center;
}
.clozeQuestion .clozeSubTitle {
cursor: pointer;
padding-left: 10px;
}
.clozeQuestion .clozeSubScore {
width: 120px;
margin-left: 5px;
}
</style>
<template>
<div class="clozeQuestion">
......@@ -54,7 +62,7 @@
<thead>
<tr class="clozeTest_question_tit">
<th colspan="2" style="text-align:left;">
<span @click="showNav(index)" style="cursor:pointer;padding-left:10px;">
<span @click="showNav(index)" class="clozeSubTitle">
<i class="iconfont icon-arrowdown2" v-if="(commonIndex==index)&&!isShow">
</i>
<i class="iconfont icon-arrowright" v-else>
......@@ -65,9 +73,8 @@
<strong v-else>点击展开</strong>
</q-tooltip>
</span>
<el-input v-if="isShowScore" :placeholder="'请输入第'+(index+1)+'小题分数'" v-model="item.SubScore" size="small"
maxlength="6" @keyup.native="checkPrice(item,'SubScore')" @input="getQuestionScore"
style="width:120px;margin-left:5px;">
<el-input v-if="isShowScore" placeholder="分数" v-model="item.SubScore" size="small" maxlength="6"
@keyup.native="checkPrice(item,'SubScore')" @input="getQuestionScore" class="clozeSubScore">
<template slot="append"></template>
</el-input>
</th>
......@@ -138,7 +145,6 @@
initialFrameHeight: 80,
},
optionTitleList: [],
showTag: true,
commonIndex: -1,
childIndex: -1,
isShow: true,
......@@ -299,5 +305,4 @@
},
}
};
</script>
\ No newline at end of file
<!--分录题-->
<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" class="common_TiTable">
<tr v-for="(item,index) in data" :key="index">
<td style="width:40px;text-align:center;padding-top:8px;">
{{index+1}}
</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>
</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>
<br />
<br />
<div class="entrytk_info">
1. 一个空有多种答案时请用";"隔开。如:水;H2O
<br />
2. 若试题答案是数字,可设置范围,两个数字之间用"-"。如:1-9,学生填写1到9之间的数字都算正确(包括1和9)
</div>
</div>
</template>
<script>
import UeEditor from '../editor/UeEditor'
export default {
props: {
questionData: {
type: Array,
},
setOption: {
type: Object,
}
},
components: {
UeEditor
},
data() {
return {
data: this.questionData,
config: {
initialFrameWidth: null,
initialFrameHeight: 80,
},
commonIndex: -1,
};
},
created() {},
methods: {
//删除选项
deleteOpion(index) {
this.$q.dialog({
title: "删除小题",
message: "确实要删除该选项吗?",
persistent: true,
cancel: {
label: "取消",
flat: true
},
ok: {
label: "确认",
flat: true,
focus: true
}
}).onOk(() => {
this.data.splice(index, 1);
this.commonIndex = -1;
});
},
//新增选项
addOption() {
this.data.push({
Content: "",
});
},
//获取答案
getAnswer() {
if (this.data && this.data.length > 0) {
var answer = "";
this.data.forEach(item => {
answer += "★" + item.Content;
})
if (answer != "") {
answer = answer.substring(1);
}
this.setOption.Answer = answer;
}
},
//返回数据到父组件
returnDataToParent() {
this.getAnswer();
this.$emit('getChild', this.data);
},
changeEdit(index) {
this.commonIndex = index;
}
},
mounted() {
},
watch: {
data: {
handler(newValue) {
this.returnDataToParent();
},
deep: true
},
questionData: {
handler(newValue) {
this.data = this.questionData;
},
deep: true
},
}
};
</script>
......@@ -15,8 +15,7 @@
</div>
</td>
<td style="vertical-align:middle;">
<span v-if="index==0"></span>
<span v-if="index==1"></span>
{{item.Content}}
</td>
</tr>
</table>
......
......@@ -4,15 +4,12 @@
width: 100%;
}
.team_tit {
display: inline-block;
.matchingQuestion .team_tit {
font-size: 14px;
color: #A8A8B3;
padding-bottom: 20px;
margin-left: 13px;
}
.line_center {
.matchingQuestion .line_center {
display: inline-block;
width: 28px;
height: 10px;
......@@ -20,7 +17,7 @@
margin: 13px 12px 0 0;
}
.selectBox2 {
.matchingQuestion .selectBox2 {
display: inline-block;
vertical-align: top;
text-align: left;
......@@ -37,67 +34,81 @@
outline: none;
}
.matchingQuestion .matching_td {
width: 50px;
text-align: center;
}
</style>
<template>
<div class="matchingQuestion">
<span class="team_tit" style="margin-top:20px;padding-bottom:0;">第1组:</span>
<table v-if="data&&data.length>0" class="common_TiTable">
<!--第一组-->
<tr>
<td colspan="3" class="team_tit">
第1组:
</td>
</tr>
<tr v-for="(item,index) in data[0]" :key="index">
<td style="width:40px;text-align:center;padding-top:10px;">
<td class="matching_td" style=" padding-top:10px;">
{{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>
</td>
<td style="width:40px;text-align:center;">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(0,index)"></i>
<td class="matching_td">
<i class="iconfont icon-guanbi Tiku_DelIcon" v-if="data[0].length>1" @click="deleteOpion(0,index)"></i>
</td>
</tr>
<tfoot>
<tr>
<td colspan="3">
<a class="addTiMuList" style="margin-left:13px;" @click="addOption(0)">
<td>
</td>
<td colspan="2">
<a class="addTiMuList" @click="addOption(0)">
<i class="iconfont icon-add"></i>添加更多
</a>
</td>
</tr>
</tfoot>
</table>
<span class="team_tit">第2组:</span>
<table v-if="data&&data.length>1" class="common_TiTable">
<!--第二组-->
<tr>
<td colspan="3" class="team_tit">
第2组:
</td>
</tr>
<tr v-for="(item,index) in data[1]" :key="index">
<td style="width:40px;text-align:center;padding-top:10px;">
<td class="matching_td" style="padding-top:10px;">
{{item.Name}}
</td>
<td>
<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 style="width:40px;text-align:center;">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(1,index)"></i>
<td class="matching_td">
<i class="iconfont icon-guanbi Tiku_DelIcon" v-if="data[1].length>1" @click="deleteOpion(1,index)"></i>
</td>
</tr>
<tfoot>
<tr>
<td colspan="3">
<a class="addTiMuList" style="margin-left:13px;" @click="addOption(1)">
<td>
</td>
<td colspan="2">
<a class="addTiMuList" @click="addOption(1)">
<i class="iconfont icon-add"></i>添加更多
</a>
</td>
</tr>
</tfoot>
</table>
<span class="team_tit">答案</span>
<table v-if="data&&data.length>2" style="padding-left:13px;">
<!--答案-->
<tr>
<td colspan="3" class="team_tit">
答案:
</td>
</tr>
<tr v-for="(item,index) in data[0]" :key="index">
<td style="width:30px;">
<td class="matching_td">
{{item.Name}}
</td>
<td>
<td colspan="2">
<span class="line_center"></span>
</td>
<td>
<select v-model="data[2][index].Content" class="selectBox2">
<template v-for="(cItem,cIndex) in data[1]">
<option :key="cIndex" :label="cItem.Name" :value="cItem.Name">
......
......@@ -4,12 +4,17 @@
width: 100%;
}
.multipleQuestion .multiple_td {
width: 40px;
text-align: center;
}
</style>
<template>
<div class="multipleQuestion">
<table v-if="data&&data.length>0" class="common_TiTable">
<tr v-for="(item,index) in data">
<td style="width:40px;text-align:center;">
<tr v-for="(item,index) in data" :key="index">
<td class="multiple_td">
<div class="num_option_dx" @click="ChangeItem(item)" :class="{'Is_Answer':item.IsAnswer}">
{{item.Name}}
</div>
......@@ -18,7 +23,7 @@
<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 style="width:40px;text-align:center;">
<td class="multiple_td">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(index)"></i>
</td>
</tr>
......
......@@ -4,11 +4,7 @@
width: 100%;
}
.edui-editor-toolbarbox {
text-align: left;
}
.readingComprehensioQuestion .clozeTest_question_tit {
.readingComprehensioQuestion .readingTest_question_tit {
width: 100%;
height: 40px;
background: #F7F8FA;
......@@ -16,14 +12,32 @@
line-height: 40px;
font-size: 14px;
color: #646873;
display: flex;
justify-content: space-between;
align-items: center;
}
.clozeTest_question_tit i {
color: #acbfd9;
.readingComprehensioQuestion .readingSubTitle {
cursor: pointer;
padding-left: 10px;
}
.readingComprehensioQuestion .readingSubScore {
width: 120px;
margin-left: 5px;
}
.readingComprehensioQuestion .readingTdFirst {
width: 40px;
text-align: center;
}
.readingComprehensioQuestion .reading_Td_Judge {
text-align: left;
vertical-align: middle;
}
.readingComprehensioQuestion .reading_Td_FillIn {
width: 50px;
text-align: center;
padding-top: 8px;
}
</style>
......@@ -32,24 +46,26 @@
<template v-if="data&&data.length>0">
<table class="common_TiTable" v-for="(item,index) in data" :key="index">
<thead>
<tr>
<th colspan="3" style="text-align:left;">
<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.stop="deleteQuestion(index)"></i>
</div>
</div>
<tr class="readingTest_question_tit">
<th colspan="2" style="text-align:left;">
<span @click="showNav(index)" class="readingSubTitle">
<i class="iconfont icon-arrowdown2" v-if="(commonIndex==index)&&!isShow">
</i>
<i class="iconfont icon-arrowright" v-else>
</i>
{{index+1}}小题
<q-tooltip anchor="top middle" self="bottom middle">
<strong v-if="!isShow">点击收起</strong>
<strong v-else>点击展开</strong>
</q-tooltip>
</span>
<el-input v-if="isShowScore" placeholder="分数" v-model="item.SubScore" size="small" maxlength="6"
@keyup.native="checkPrice(item,'SubScore')" @input="getQuestionScore" class="readingSubScore">
<template slot="append"></template>
</el-input>
</th>
</tr>
<tr v-if="isShowScore">
<th colspan="3">
<q-input filled stack-label maxlength="5" style="width:170px;" :dense="false" @keyup.native="checkPrice(item,'SubScore')"
v-model="item.SubScore" class="col-12 q-pb-lg" label="分数" @input="getQuestionScore" />
<th class="readingTdFirst">
<i class="iconfont icon-img_delete_small" @click.stop="deleteQuestion(index)"></i>
</th>
</tr>
</thead>
......@@ -63,7 +79,7 @@
<template
v-if="item.QuestionKey=='single' ||item.QuestionKey=='multiple'|| item.QuestionKey=='single-number'">
<tr v-for="(subItem,subIndex) in item.SubAnwser" :key="subIndex">
<td style="width:40px;text-align:center;">
<td class="readingTdFirst">
<template v-if="item.QuestionKey=='single'||item.QuestionKey=='single-number'">
<div class="Answer_List" @click="ChangeItem(item,subItem)" :class="{'Is_Answer':subItem.IsAnswer}">
{{subItem.Name}}
......@@ -80,15 +96,23 @@
</div>
<UeEditor v-model="subItem.Content" :config="config" v-else></UeEditor>
</td>
<td style="width:40px;text-align:center;">
<td class="readingTdFirst">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(item,subIndex)"></i>
</td>
</tr>
<!--添加选项-->
<tr>
<td colspan="3">
<a class="addTiMuList" @click="addOption(item)">
<i class="iconfont icon-add"></i>添加选项
</a>
</td>
</tr>
</template>
<!--填空题-->
<template v-if="item.QuestionKey=='fill-in'">
<tr v-for="(subItem,subIndex) in item.SubAnwser">
<td style="width:50px;text-align:center;padding-top:8px;">
<tr v-for="(subItem,subIndex) in item.SubAnwser" :key="subIndex">
<td class="reading_Td_FillIn">
{{subIndex+1}}
</td>
<td>
......@@ -96,27 +120,35 @@
</div>
<UeEditor v-model="subItem.Content" :config="config" v-else></UeEditor>
</td>
<td style="width:30px;text-align:center;">
<td class="readingTdFirst">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(item,subIndex)"></i>
</td>
</tr>
<tr>
<td colspan="3">
<!--填空题-->
<a class="addTiMuList" @click="addFillIn(item)">
<i class="iconfont icon-add"></i>添加更多
</a>
</td>
</tr>
</template>
<!--判断题-->
<template v-if="item.QuestionKey=='judge'">
<tr v-for="(subItem,subIndex) in item.SubAnwser">
<tr v-for="(subItem,subIndex) in item.SubAnwser" :key="subIndex">
<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;vertical-align:middle;">
<td colspan="2" class="reading_Td_Judge">
{{subItem.Content}}
</td>
</tr>
</template>
<!--简答题-->
<template v-if="item.QuestionKey=='short-answer'">
<tr v-for="(subItem,subIndex) in item.SubAnwser">
<tr v-for="(subItem,subIndex) in item.SubAnwser" :key="subIndex">
<td colspan="3">
答案<br />
<UeEditor v-model="subItem.Content" :config="config"></UeEditor>
......@@ -124,29 +156,10 @@
</tr>
</template>
</tbody>
<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 class="addTiMuList" @click="addOption(item)">
<i class="iconfont icon-add"></i>添加选项
</a>
</template>
<!--填空题-->
<template v-if="item.QuestionKey=='fill-in'">
<a class="addTiMuList" @click="addFillIn(item)">
<i class="iconfont icon-add"></i>添加更多
</a>
</template>
&nbsp;
</td>
</tr>
</tfoot>
</table>
</template>
<br />
<q-btn-dropdown color="primary" label="添加小题" style="margin:0 0 20px 5px;">
<q-btn-dropdown color="primary" label="添加小题">
<q-list>
<q-item v-for="(fItem,fIndex) in firstTypeList" @click="onItemClick(fItem)" clickable v-close-popup
:key="fIndex">
......@@ -241,6 +254,7 @@
QuestionType: item.QId,
QuestionKey: item.Key,
QuestionName: item.Name,
SubScore: 0,
SubTitle: "", //题目内容
SubAnwser: ""
};
......
......@@ -4,70 +4,95 @@
width: 100%;
}
.B-info {
.sharingChooseQuestion .B-info {
font-size: 14PX;
color: #A8A8B3;
padding-bottom: 10px;
margin-left: 13px;
}
.sharingChooseQuestion .sharingChoose_td {
width: 50px;
text-align: center;
}
.sharingChooseQuestion .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;
}
</style>
<template>
<div class="sharingChooseQuestion">
<table v-if="data&&data.length>0" class="common_TiTable">
<tr v-for="(item,index) in data[0]">
<td style="width:40px;text-align:center;padding-top:8px;">
<!--选项部分-->
<tr v-for="(item,index) in data[0]" :key="index">
<td class="sharingChoose_td" style="padding-top:8px;">
{{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>
</td>
<td style="width:40px;text-align:center;">
<i v-if="index>0" class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(index)"></i>
<td class="sharingChoose_td">
<i v-if="data[0].length>1" class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(index)"></i>
</td>
</tr>
<tfoot>
<tr>
<td colspan="3">
<a class="addTiMuList" style="margin-left:13px;" @click="addOption()">
<td>
</td>
<td colspan="2">
<a class="addTiMuList" @click="addOption()">
<i class="iconfont icon-add"></i>添加选项
</a>
</td>
</tr>
</tfoot>
</table>
<table v-if="data&&data.length>0" class="common_TiTable">
<tr v-for="(item,index) in data[1]">
<td style="width:40px;text-align:center;padding-top:8px;">
<!--题干部分-->
<tr v-for="(item,index) in data[1]" :key="index">
<td class="sharingChoose_td" style="padding-top:8px;">
{{index+1}}
</td>
<td>
<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 style="width:40px;text-align:center;">
<i v-if="index>0" class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteQuestion(index)"></i>
<td class="sharingChoose_td">
<i v-if="data[1].length>1" class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteQuestion(index)"></i>
</td>
</tr>
<tfoot>
<tr>
<td colspan="3">
<a class="addTiMuList" style="margin-left:13px;" @click="addQuestion()">
<td>
</td>
<td colspan="2">
<a class="addTiMuList" @click="addQuestion()">
<i class="iconfont icon-add"></i>添加题干
</a>
</td>
</tr>
</tfoot>
</table>
<div class="B-info">答案:</div>
<table v-if="data&&data.length>0" style="margin-bottom:20px;">
<tr v-for="(item,index) in data[1]">
<td style="padding:12px 0 0 13px;">
{{index+1}}
<tr>
<td colspan="3" class="B-info">
答案:
</td>
<td>
<select v-model="item.Name" class="selectBox" style="margin:10px 0 0 0;outline:none;">
</tr>
<tr v-for="(item,index) in data[1]" :key="index">
<td class="sharingChoose_td">
{{index+1}}
</td>
<td colspan="2">
<select v-model="item.Name" class="selectBox" style="outline:none;margin-left:10px;">
<template v-for="(cItem,cIndex) in data[0]">
<option :key="cIndex" :label="cItem.Name" :value="cItem.Name">
</option>
......
......@@ -3,13 +3,18 @@
width: 100%;
}
.singleQuestion .single_td {
width: 40px;
text-align: center;
}
</style>
<!--单选题-->
<template>
<div class="singleQuestion">
<table v-if="data&&data.length>0" class="common_TiTable">
<tr v-for="(item,index) in data" :key="index">
<td style="width:40px;text-align:center;">
<td class="single_td">
<div class="Answer_List" @click="ChangeItem(item)" :class="{'Is_Answer':item.IsAnswer}">
{{item.Name}}
</div>
......@@ -18,7 +23,7 @@
<div class="InpDIV" v-html="item.Content" v-if="commonIndex!=index" @click="changeEdit(index)"></div>
<UeEditor v-model="item.Content" v-else :config="config"></UeEditor>
</td>
<td style="width:40px;text-align:center;">
<td class="single_td">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(index)"></i>
</td>
</tr>
......
......@@ -4,13 +4,13 @@
width: 100%
}
.team_tit {
.sortingProblemQuestion .team_tit {
font-size: 14px;
color: #A8A8B3;
padding-bottom: 20px;
}
.selectBox {
.sortingProblemQuestion .selectBox {
display: inline-block;
vertical-align: top;
text-align: left;
......@@ -27,40 +27,49 @@
margin: 0 20px 14px 0;
}
.blue-border {
.sortingProblemQuestion .blue-border {
border: 1px solid #FFFFFF;
box-shadow: 0 0 7px 1px #75BAFF;
}
.sortingProblemQuestion .sortingProblem_td {
width: 40px;
text-align: center;
}
</style>
<template>
<div class="sortingProblemQuestion">
<table v-if="data&&data.length>0" class="common_TiTable">
<tr v-for="(item,index) in data[0]" :key="index">
<td style="width:40px;text-align:center;">
<td class="sortingProblem_td">
{{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>
</td>
<td style="width:40px;text-align:center;">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(index)"></i>
<td class="sortingProblem_td">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(index)" v-if="data[0].length>1"></i>
</td>
</tr>
</table>
<br />
<tr>
<td colspan="3">
<a class="addTiMuList" @click="addOption()">
<i class="iconfont icon-add"></i>添加更多
</a>
<br />
<div class="team_tit">答案:请在下方下拉框中对选项进行排序(顺序从左到右)</div>
<table v-if="data&&data.length>0">
</td>
</tr>
<tr>
<td>
<td colspan="3" class="team_tit">
答案:请在下方下拉框中对选项进行排序(顺序从左到右)
</td>
</tr>
<tr>
<td colspan="3">
<template v-for="(item,index) in data[1]">
<select v-model="item.Name" class="selectBox" :class="{'blue-border':index==clickIndex}"
@click="clickIndex=index">
@click="clickIndex=index" :key="index">
<template v-for="(cItem,cIndex) in data[0]">
<option :key="cIndex" :label="cItem.Name" :value="cItem.Name">
</option>
......
<!--分录题-->
<style>
.v_entryProblemQuestion {
width: 100%;
}
.v_entryProblemBold {
font-weight: bold
}
.v_entryProblemTitle {
width: 70px;
text-align: center;
padding-top: 8px;
}
</style>
<template>
<div class="v_entryProblemQuestion">
<table v-if="data&&data.QuestionContentObj&&data.QuestionContentObj.length>0" class="common_TiTable">
<template v-if="isShowAnswer">
<tbody v-for="(item,index) in data.QuestionContentObj" :key="index">
<tr>
<td class="v_entryProblemTitle">
{{index+1}}
</td>
<td>
<div class="InpDIV" style="border:0;margin-top:-2px;" v-html="item.Content"></div>
</td>
</tr>
</tbody>
</template>
<template v-if="isOperate">
<tbody v-for="(item,index) in data.QuestionContentObj" :key="index">
<tr>
<td class="v_entryProblemBold">
{{index+1}}
</td>
<td>
<el-input v-model="item.Content" :placeholder="'请填写第 '+(index+1)+' 空答案'"> </el-input>
</td>
</tr>
</tbody>
</template>
<tbody>
<tr>
<td colspan="2"><span v-if="data&&data.IsMutex==1" style="font-size:13px;">答案顺序打乱也判正确</span></td>
</tr>
<tr>
<td colspan="2">1. 一个空有多种答案时请用";"隔开。如:水;H2O</td>
</tr>
<tr>
<td colspan="2">2. 若试题答案是数字,可设置范围,两个数字之间用"-"。如:1-9,学生填写1到9之间的数字都算正确(包括1和9)</td>
</tr>
</tbody>
<tfoot v-if="isShowAnswer">
<tr v-if="isShowStudentAnswer">
<td class="v_entryProblemBold">
考生答案
</td>
<td>
</td>
</tr>
<template v-if="isShowStudentAnswer">
<tr v-for="(item,index) in data.AnswerList" :key="index">
<td class="v_entryProblemBold">
{{index+1}}
</td>
<td class="v_entryProblemBold">
{{item}}
</td>
</tr>
</template>
<tr v-if="isShowStudentAnswer">
<td colspan="2">
<q-input v-if="isEditStudentScore" standout="bg-primary text-white" v-model="data.StudentScore" label="得分:"
maxlength="20" @input="getQuestionScore" />
<span v-else class="v_entryProblemBold">考生得分:{{data.StudentScore}}</span>
</td>
</tr>
<tr>
<td colspan="2">解析:<span v-html="data.AnswerParse"></span></td>
</tr>
</tfoot>
</table>
</div>
</template>
<script>
export default {
props: {
questionObj: {
type: Object,
},
//是否显示答案和解析
isShowAnswer: {
type: Boolean,
default: false,
},
//是否可操作(PC端考试使用【可以填写答案】)
isOperate: {
type: Boolean,
default: false,
},
//是否显示学生答案
isShowStudentAnswer: {
type: Boolean,
default: false
},
//是否可以编辑学生得分
isEditStudentScore: {
type: Boolean,
default: false,
}
},
data() {
return {
data: this.questionObj,
};
},
created() {},
methods: {
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
},
mounted() {
},
watch: {
isShowAnswer: {
handler(newValue) {
},
deep: true
},
}
};
</script>
......@@ -129,18 +129,14 @@
:isShowAnswer="isShowAnswer"></v-single>
<!--多选题-->
<v-multiple v-if="objOption.QuestionTypeKey=='multiple'" :questionObj="objOption" :isShowAnswer="isShowAnswer"></v-multiple>
<!--填空题-->
<v-fillin v-if="objOption.QuestionTypeKey=='fill-in'" :questionObj="objOption" :isShowAnswer="isShowAnswer"></v-fillin>
<!--填空题、分录题、资料题-->
<v-fillin v-if="objOption.QuestionTypeKey=='fill-in'||objOption.QuestionTypeKey=='entry-problem'|| objOption.QuestionTypeKey=='data-question'" :questionObj="objOption" :isShowAnswer="isShowAnswer"></v-fillin>
<!--判断题-->
<v-judge v-if="objOption.QuestionTypeKey=='judge'" :questionObj="objOption" :isShowAnswer="isShowAnswer"></v-judge>
<!--简答题、名词解释、论述题、计算题、口语题、其它-->
<v-shortanswer v-if="objOption.QuestionTypeKey=='short-answer'||objOption.QuestionTypeKey=='noun-explanation'||objOption.QuestionTypeKey=='essay-question'
||objOption.QuestionTypeKey=='calculation' || objOption.QuestionTypeKey=='spoken'|| objOption.QuestionTypeKey=='other'
" :questionObj="objOption" :isShowAnswer="isShowAnswer"> </v-shortanswer>
<!--分录题、资料题-->
<v-entryproblem v-if="objOption.QuestionTypeKey=='entry-problem'|| objOption.QuestionTypeKey=='data-question'" :questionObj="objOption"
:isShowAnswer="isShowAnswer">
</v-entryproblem>
<!--连线题-->
<v-matching v-if="objOption.QuestionTypeKey=='matching'" :questionObj="objOption" :isShowAnswer="isShowAnswer"></v-matching>
<!--排序题-->
......@@ -192,7 +188,6 @@
import vFillin from '../../components/questiontype/v-fillin'
import vJudge from '../../components/questiontype/v-judge'
import vShortanswer from '../../components/questiontype/v-shortanswer'
import vEntryproblem from '../../components/questiontype/v-entryproblem'
import vMatching from '../../components/questiontype/v-matching'
import vSortingproblem from '../../components/questiontype/v-sortingproblem'
import vCloze from '../../components/questiontype/v-cloze'
......@@ -205,7 +200,6 @@
vFillin, //填空题
vJudge, //判断题
vShortanswer, //简答题
vEntryproblem, //分录题
vMatching, //连线题
vSortingproblem, //排序题
vCloze, //完型填空
......
......@@ -277,8 +277,8 @@
<v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isOperate="isOperate">
</v-multiple>
<!--填空题-->
<v-fillin v-if="dItem.QuestionTypeKey=='fill-in'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
<!--填空题、分录题、资料题-->
<v-fillin v-if="dItem.QuestionTypeKey=='fill-in'||dItem.QuestionTypeKey=='entry-problem'|| dItem.QuestionTypeKey=='data-question'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isOperate="isOperate">
</v-fillin>
<!--判断题-->
......@@ -289,11 +289,6 @@
<v-shortanswer v-if="dItem.QuestionTypeKey=='short-answer'||dItem.QuestionTypeKey=='noun-explanation'||dItem.QuestionTypeKey=='essay-question'
||dItem.QuestionTypeKey=='calculation' || dItem.QuestionTypeKey=='spoken'|| dItem.QuestionTypeKey=='other'
" :questionObj="dItem" :isShowAnswer="isShowAnswer" :isOperate="isOperate"> </v-shortanswer>
<!--分录题、资料题-->
<v-entryproblem v-if="dItem.QuestionTypeKey=='entry-problem'|| dItem.QuestionTypeKey=='data-question'"
:questionObj="dItem" :isShowAnswer="isShowAnswer" :isOperate="isOperate">
</v-entryproblem>
<!--连线题-->
<v-matching v-if="dItem.QuestionTypeKey=='matching'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isOperate="isOperate">
......@@ -328,7 +323,6 @@
import vFillin from '../../components/questiontype/v-fillin'
import vJudge from '../../components/questiontype/v-judge'
import vShortanswer from '../../components/questiontype/v-shortanswer'
import vEntryproblem from '../../components/questiontype/v-entryproblem'
import vMatching from '../../components/questiontype/v-matching'
import vSortingproblem from '../../components/questiontype/v-sortingproblem'
import vCloze from '../../components/questiontype/v-cloze'
......@@ -345,7 +339,6 @@
vFillin,
vJudge,
vShortanswer,
vEntryproblem,
vMatching,
vSortingproblem,
vCloze,
......
......@@ -280,8 +280,8 @@
<v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper">
</v-multiple>
<!--填空题-->
<v-fillin v-if="dItem.QuestionTypeKey=='fill-in'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
<!--填空题、分录题、资料题-->
<v-fillin v-if="dItem.QuestionTypeKey=='fill-in'||dItem.QuestionTypeKey=='entry-problem'|| dItem.QuestionTypeKey=='data-question'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper">
</v-fillin>
<!--判断题-->
......@@ -297,12 +297,6 @@
|| dItem.QuestionTypeKey=='other'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper">
</v-shortanswer>
<!--分录题、资料题-->
<v-entryproblem v-if="dItem.QuestionTypeKey=='entry-problem'|| dItem.QuestionTypeKey=='data-question'"
:questionObj="dItem" :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer"
@getScore="calcPaper">
</v-entryproblem>
<!--连线题-->
<v-matching v-if="dItem.QuestionTypeKey=='matching'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper">
......@@ -339,7 +333,6 @@
import vFillin from '../../components/questiontype/v-fillin'
import vJudge from '../../components/questiontype/v-judge'
import vShortanswer from '../../components/questiontype/v-shortanswer'
import vEntryproblem from '../../components/questiontype/v-entryproblem'
import vMatching from '../../components/questiontype/v-matching'
import vSortingproblem from '../../components/questiontype/v-sortingproblem'
import vCloze from '../../components/questiontype/v-cloze'
......@@ -356,7 +349,6 @@
vFillin,
vJudge,
vShortanswer,
vEntryproblem,
vMatching,
vSortingproblem,
vCloze,
......
......@@ -282,8 +282,8 @@
<v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isEditStudentScore="isEditStudentScore">
</v-multiple>
<!--填空题-->
<v-fillin v-if="dItem.QuestionTypeKey=='fill-in'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
<!--填空题、分录题、资料题-->
<v-fillin v-if="dItem.QuestionTypeKey=='fill-in'||dItem.QuestionTypeKey=='entry-problem'|| dItem.QuestionTypeKey=='data-question'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isEditStudentScore="isEditStudentScore">
</v-fillin>
<!--判断题-->
......@@ -299,12 +299,6 @@
|| dItem.QuestionTypeKey=='other'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isEditStudentScore="isEditStudentScore">
</v-shortanswer>
<!--分录题、资料题-->
<v-entryproblem v-if="dItem.QuestionTypeKey=='entry-problem'|| dItem.QuestionTypeKey=='data-question'"
:questionObj="dItem" :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer"
@getScore="calcPaper" :isEditStudentScore="isEditStudentScore">
</v-entryproblem>
<!--连线题-->
<v-matching v-if="dItem.QuestionTypeKey=='matching'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isEditStudentScore="isEditStudentScore">
......@@ -341,7 +335,7 @@
import vFillin from '../../components/questiontype/v-fillin'
import vJudge from '../../components/questiontype/v-judge'
import vShortanswer from '../../components/questiontype/v-shortanswer'
import vEntryproblem from '../../components/questiontype/v-entryproblem'
import vMatching from '../../components/questiontype/v-matching'
import vSortingproblem from '../../components/questiontype/v-sortingproblem'
import vCloze from '../../components/questiontype/v-cloze'
......@@ -358,7 +352,6 @@
vFillin,
vJudge,
vShortanswer,
vEntryproblem,
vMatching,
vSortingproblem,
vCloze,
......
......@@ -390,8 +390,8 @@
<!--多选题-->
<multiple v-if="ChooseItem.QuestionTypeKey=='multiple'" :questionData="ChooseItem.QuestionContentObj"
@getChild="getChildData" :setOption="ChooseItem"></multiple>
<!--填空题-->
<fill-in v-if="ChooseItem.QuestionTypeKey=='fill-in'" :questionData="ChooseItem.QuestionContentObj"
<!--填空题、分录题、资料题-->
<fill-in v-if="ChooseItem.QuestionTypeKey=='fill-in'||ChooseItem.QuestionTypeKey=='entry-problem'|| ChooseItem.QuestionTypeKey=='data-question'" :questionData="ChooseItem.QuestionContentObj"
@getChild="getChildData" :setOption="ChooseItem"></fill-in>
<!--判断题-->
<judge v-if="ChooseItem.QuestionTypeKey=='judge'" :questionData="ChooseItem.QuestionContentObj"
......@@ -400,11 +400,6 @@
<short-answer v-if="ChooseItem.QuestionTypeKey=='short-answer'||ChooseItem.QuestionTypeKey=='noun-explanation'||ChooseItem.QuestionTypeKey=='essay-question'
||ChooseItem.QuestionTypeKey=='calculation' || ChooseItem.QuestionTypeKey=='spoken'|| ChooseItem.QuestionTypeKey=='other'
" :setOption="ChooseItem"> </short-answer>
<!--分录题、资料题-->
<entry-problem
v-if="ChooseItem.QuestionTypeKey=='entry-problem'|| ChooseItem.QuestionTypeKey=='data-question'"
:questionData="ChooseItem.QuestionContentObj" :setOption="ChooseItem" @getChild="getChildData">
</entry-problem>
<!--连线题-->
<matching v-if="ChooseItem.QuestionTypeKey=='matching'" :questionData="ChooseItem.QuestionContentObj"
:setOption="ChooseItem" @getChild="getChildData"></matching>
......@@ -483,7 +478,6 @@
import fillIn from '../../components/questiontype/fill-in'
import judge from '../../components/questiontype/judge'
import shortAnswer from '../../components/questiontype/short-answer'
import entryProblem from '../../components/questiontype/entry-problem'
import matching from '../../components/questiontype/matching'
import sortingProblem from '../../components/questiontype/sorting-problem'
import cloze from '../../components/questiontype/cloze'
......@@ -523,7 +517,6 @@
fillIn, //填空题
judge, //判断题
shortAnswer, //简答题
entryProblem, //分录题
matching, //连线题
sortingProblem, //排序题
cloze, //完型填空
......@@ -532,7 +525,7 @@
questionForm
},
meta: {
title: "考试"
title: "编辑试卷"
},
watch: {
'ChooseItem.Title': {
......@@ -966,7 +959,11 @@
var clozeScore = 0;
if (y.QuestionContentObj && y.QuestionContentObj.length > 0) {
y.QuestionContentObj.forEach(qItem => {
clozeScore += Number(qItem.SubScore);
var tempClozeScore = 0;
if (qItem.SubScore != '') {
tempClozeScore = qItem.SubScore;
}
clozeScore += Number(tempClozeScore);
})
}
y.Score = clozeScore;
......@@ -975,7 +972,11 @@
var readScore = 0;
if (y.QuestionContentObj && y.QuestionContentObj.length > 0) {
y.QuestionContentObj.forEach(qItem => {
readScore += Number(qItem.SubScore);
var tempReadingScore = 0;
if (qItem.SubScore != '') {
tempReadingScore = qItem.SubScore;
}
readScore += Number(tempReadingScore);
})
}
y.Score = readScore;
......
......@@ -277,8 +277,9 @@
<!--多选题-->
<v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer">
</v-multiple>
<!--填空题-->
<v-fillin v-if="dItem.QuestionTypeKey=='fill-in'" :questionObj="dItem" :isShowAnswer="isShowAnswer">
<!--填空题、分录题、资料题-->
<v-fillin v-if="dItem.QuestionTypeKey=='fill-in'||dItem.QuestionTypeKey=='entry-problem'|| dItem.QuestionTypeKey=='data-question'"
:questionObj="dItem" :isShowAnswer="isShowAnswer">
</v-fillin>
<!--判断题-->
<v-judge v-if="dItem.QuestionTypeKey=='judge'" :questionObj="dItem" :isShowAnswer="isShowAnswer"></v-judge>
......@@ -287,11 +288,6 @@
<v-shortanswer v-if="dItem.QuestionTypeKey=='short-answer'||dItem.QuestionTypeKey=='noun-explanation'||dItem.QuestionTypeKey=='essay-question'
||dItem.QuestionTypeKey=='calculation' || dItem.QuestionTypeKey=='spoken'|| dItem.QuestionTypeKey=='other'
" :questionObj="dItem" :isShowAnswer="isShowAnswer"> </v-shortanswer>
<!--分录题、资料题-->
<v-entryproblem v-if="dItem.QuestionTypeKey=='entry-problem'|| dItem.QuestionTypeKey=='data-question'"
:questionObj="dItem" :isShowAnswer="isShowAnswer">
</v-entryproblem>
<!--连线题-->
<v-matching v-if="dItem.QuestionTypeKey=='matching'" :questionObj="dItem" :isShowAnswer="isShowAnswer">
</v-matching>
......@@ -323,7 +319,6 @@
import vFillin from '../../components/questiontype/v-fillin'
import vJudge from '../../components/questiontype/v-judge'
import vShortanswer from '../../components/questiontype/v-shortanswer'
import vEntryproblem from '../../components/questiontype/v-entryproblem'
import vMatching from '../../components/questiontype/v-matching'
import vSortingproblem from '../../components/questiontype/v-sortingproblem'
import vCloze from '../../components/questiontype/v-cloze'
......@@ -339,7 +334,6 @@
vFillin,
vJudge,
vShortanswer,
vEntryproblem,
vMatching,
vSortingproblem,
vCloze,
......
......@@ -180,7 +180,8 @@
<div class="setCt">
<span class="papPub_Left f1">考试限时</span>
<div class="f1">
<q-input filled bottom-slots maxlength="10" style="width:308px;" :disable="true" v-model="postMsg.ExamTimes" :dense="false">
<q-input filled bottom-slots maxlength="10" style="width:308px;" :disable="true" v-model="postMsg.ExamTimes"
:dense="false">
<template v-slot:append>
<span style="font-size:12px;">分钟</span>
</template>
......
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