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

页面修改

parent 1c22ae98
...@@ -143,9 +143,10 @@ ...@@ -143,9 +143,10 @@
<!--多选题--> <!--多选题-->
<multiple v-if="questionObj.Key=='multiple'" :questionData="AnswerList" @getChild="getChildData" <multiple v-if="questionObj.Key=='multiple'" :questionData="AnswerList" @getChild="getChildData"
:setOption="objOption"></multiple> :setOption="objOption"></multiple>
<!--填空题--> <!--填空题、分录题、资料题-->
<fill-in v-if="questionObj.Key=='fill-in'" :questionData="AnswerList" @getChild="getChildData" <fill-in
:setOption="objOption"></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" <judge v-if="questionObj.Key=='judge'" :questionData="AnswerList" @getChild="getChildData"
:setOption="objOption"></judge> :setOption="objOption"></judge>
...@@ -153,10 +154,6 @@ ...@@ -153,10 +154,6 @@
<short-answer v-if="questionObj.Key=='short-answer'||questionObj.Key=='noun-explanation'||questionObj.Key=='essay-question' <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' ||questionObj.Key=='calculation' || questionObj.Key=='spoken'|| questionObj.Key=='other'
" :setOption="objOption"> </short-answer> " :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" <matching v-if="questionObj.Key=='matching'" :questionData="AnswerList" :setOption="objOption"
@getChild="getChildData"></matching> @getChild="getChildData"></matching>
...@@ -265,7 +262,6 @@ ...@@ -265,7 +262,6 @@
import fillIn from '../questiontype/fill-in' import fillIn from '../questiontype/fill-in'
import judge from '../questiontype/judge' import judge from '../questiontype/judge'
import shortAnswer from '../questiontype/short-answer' import shortAnswer from '../questiontype/short-answer'
import entryProblem from '../questiontype/entry-problem'
import matching from '../questiontype/matching' import matching from '../questiontype/matching'
import sortingProblem from '../questiontype/sorting-problem' import sortingProblem from '../questiontype/sorting-problem'
import cloze from '../questiontype/cloze' import cloze from '../questiontype/cloze'
...@@ -280,7 +276,6 @@ ...@@ -280,7 +276,6 @@
fillIn, //填空题 fillIn, //填空题
judge, //判断题 judge, //判断题
shortAnswer, //简答题 shortAnswer, //简答题
entryProblem, //分录题
matching, //连线题 matching, //连线题
sortingProblem, //排序题 sortingProblem, //排序题
cloze, //完型填空 cloze, //完型填空
...@@ -574,15 +569,15 @@ ...@@ -574,15 +569,15 @@
break; break;
//排序题 //排序题
case "sorting-problem": case "sorting-problem":
retMessage = questionBankSortingproblemValidate(gName, detailsList,this.objOption); retMessage = questionBankSortingproblemValidate(gName, detailsList, this.objOption);
break; break;
//完型填空 //完型填空
case "cloze": case "cloze":
retMessage = questionBankClozeValidate(gName, detailsList,this.objOption); retMessage = questionBankClozeValidate(gName, detailsList, this.objOption);
break; break;
//阅读理解 //阅读理解
case "reading-comprehensio": case "reading-comprehensio":
retMessage = questionBankReadingcomprehensioValidate(gName, detailsList,this.objOption); retMessage = questionBankReadingcomprehensioValidate(gName, detailsList, this.objOption);
break; break;
//口语题 //口语题
case "spoken": case "spoken":
...@@ -590,7 +585,7 @@ ...@@ -590,7 +585,7 @@
break; break;
//听力题 //听力题
case "listening": case "listening":
retMessage = questionBankReadingcomprehensioValidate(gName, detailsList,this.objOption); retMessage = questionBankReadingcomprehensioValidate(gName, detailsList, this.objOption);
break; break;
//公用选项题 //公用选项题
case "sharing-choose": case "sharing-choose":
...@@ -602,7 +597,7 @@ ...@@ -602,7 +597,7 @@
break; break;
//单选题-数字 //单选题-数字
case "single-number": case "single-number":
retMessage = questionBankChooseValidate(gName, detailsList,this.objOption); retMessage = questionBankChooseValidate(gName, detailsList, this.objOption);
break; break;
} }
if (retMessage != '') { if (retMessage != '') {
......
...@@ -114,7 +114,6 @@ ...@@ -114,7 +114,6 @@
import fillIn from '../questiontype/fill-in' import fillIn from '../questiontype/fill-in'
import judge from '../questiontype/judge' import judge from '../questiontype/judge'
import shortAnswer from '../questiontype/short-answer' import shortAnswer from '../questiontype/short-answer'
import entryProblem from '../questiontype/entry-problem'
import matching from '../questiontype/matching' import matching from '../questiontype/matching'
import sortingProblem from '../questiontype/sorting-problem' import sortingProblem from '../questiontype/sorting-problem'
import cloze from '../questiontype/cloze' import cloze from '../questiontype/cloze'
...@@ -129,7 +128,6 @@ ...@@ -129,7 +128,6 @@
fillIn, //填空题 fillIn, //填空题
judge, //判断题 judge, //判断题
shortAnswer, //简答题 shortAnswer, //简答题
entryProblem, //分录题
matching, //连线题 matching, //连线题
sortingProblem, //排序题 sortingProblem, //排序题
cloze, //完型填空 cloze, //完型填空
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
color: #646873; color: #646873;
} }
.clozeQuestion .add_LiteBtn { .clozeQuestion .add_LiteBtn {
width: 100px; width: 100px;
height: 30px; height: 30px;
...@@ -45,6 +43,16 @@ ...@@ -45,6 +43,16 @@
text-align: center; text-align: center;
} }
.clozeQuestion .clozeSubTitle {
cursor: pointer;
padding-left: 10px;
}
.clozeQuestion .clozeSubScore {
width: 120px;
margin-left: 5px;
}
</style> </style>
<template> <template>
<div class="clozeQuestion"> <div class="clozeQuestion">
...@@ -54,7 +62,7 @@ ...@@ -54,7 +62,7 @@
<thead> <thead>
<tr class="clozeTest_question_tit"> <tr class="clozeTest_question_tit">
<th colspan="2" style="text-align:left;"> <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 class="iconfont icon-arrowdown2" v-if="(commonIndex==index)&&!isShow">
</i> </i>
<i class="iconfont icon-arrowright" v-else> <i class="iconfont icon-arrowright" v-else>
...@@ -65,9 +73,8 @@ ...@@ -65,9 +73,8 @@
<strong v-else>点击展开</strong> <strong v-else>点击展开</strong>
</q-tooltip> </q-tooltip>
</span> </span>
<el-input v-if="isShowScore" :placeholder="'请输入第'+(index+1)+'小题分数'" v-model="item.SubScore" size="small" <el-input v-if="isShowScore" placeholder="分数" v-model="item.SubScore" size="small" maxlength="6"
maxlength="6" @keyup.native="checkPrice(item,'SubScore')" @input="getQuestionScore" @keyup.native="checkPrice(item,'SubScore')" @input="getQuestionScore" class="clozeSubScore">
style="width:120px;margin-left:5px;">
<template slot="append"></template> <template slot="append"></template>
</el-input> </el-input>
</th> </th>
...@@ -138,7 +145,6 @@ ...@@ -138,7 +145,6 @@
initialFrameHeight: 80, initialFrameHeight: 80,
}, },
optionTitleList: [], optionTitleList: [],
showTag: true,
commonIndex: -1, commonIndex: -1,
childIndex: -1, childIndex: -1,
isShow: true, isShow: true,
...@@ -299,5 +305,4 @@ ...@@ -299,5 +305,4 @@
}, },
} }
}; };
</script>
</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 @@ ...@@ -15,8 +15,7 @@
</div> </div>
</td> </td>
<td style="vertical-align:middle;"> <td style="vertical-align:middle;">
<span v-if="index==0"></span> {{item.Content}}
<span v-if="index==1"></span>
</td> </td>
</tr> </tr>
</table> </table>
......
...@@ -4,15 +4,12 @@ ...@@ -4,15 +4,12 @@
width: 100%; width: 100%;
} }
.team_tit { .matchingQuestion .team_tit {
display: inline-block;
font-size: 14px; font-size: 14px;
color: #A8A8B3; color: #A8A8B3;
padding-bottom: 20px;
margin-left: 13px;
} }
.line_center { .matchingQuestion .line_center {
display: inline-block; display: inline-block;
width: 28px; width: 28px;
height: 10px; height: 10px;
...@@ -20,7 +17,7 @@ ...@@ -20,7 +17,7 @@
margin: 13px 12px 0 0; margin: 13px 12px 0 0;
} }
.selectBox2 { .matchingQuestion .selectBox2 {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
text-align: left; text-align: left;
...@@ -37,67 +34,81 @@ ...@@ -37,67 +34,81 @@
outline: none; outline: none;
} }
.matchingQuestion .matching_td {
width: 50px;
text-align: center;
}
</style> </style>
<template> <template>
<div class="matchingQuestion"> <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"> <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"> <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}} {{item.Name}}
</td> </td>
<td> <td>
<div class="InpDIV" v-html="item.Content" v-if="commonIndex!=index" @click="changeEdit(index)"></div> <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> <UeEditor v-model="item.Content" :config="config" v-else></UeEditor>
</td> </td>
<td style="width:40px;text-align:center;"> <td class="matching_td">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(0,index)"></i> <i class="iconfont icon-guanbi Tiku_DelIcon" v-if="data[0].length>1" @click="deleteOpion(0,index)"></i>
</td>
</tr>
<tr>
<td>
</td>
<td colspan="2">
<a class="addTiMuList" @click="addOption(0)">
<i class="iconfont icon-add"></i>添加更多
</a>
</td>
</tr>
<!--第二组-->
<tr>
<td colspan="3" class="team_tit">
第2组:
</td> </td>
</tr> </tr>
<tfoot>
<tr>
<td colspan="3">
<a class="addTiMuList" style="margin-left:13px;" @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 v-for="(item,index) in data[1]" :key="index"> <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}} {{item.Name}}
</td> </td>
<td> <td>
<div class="InpDIV" v-html="item.Content" v-if="commonIndex2!=index" @click="changeEdit2(index)"></div> <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> <UeEditor v-model="item.Content" :config="config" v-else></UeEditor>
</td> </td>
<td style="width:40px;text-align:center;"> <td class="matching_td">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(1,index)"></i> <i class="iconfont icon-guanbi Tiku_DelIcon" v-if="data[1].length>1" @click="deleteOpion(1,index)"></i>
</td>
</tr>
<tr>
<td>
</td>
<td colspan="2">
<a class="addTiMuList" @click="addOption(1)">
<i class="iconfont icon-add"></i>添加更多
</a>
</td>
</tr>
<!--答案-->
<tr>
<td colspan="3" class="team_tit">
答案:
</td> </td>
</tr> </tr>
<tfoot>
<tr>
<td colspan="3">
<a class="addTiMuList" style="margin-left:13px;" @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 v-for="(item,index) in data[0]" :key="index"> <tr v-for="(item,index) in data[0]" :key="index">
<td style="width:30px;"> <td class="matching_td">
{{item.Name}} {{item.Name}}
</td> </td>
<td> <td colspan="2">
<span class="line_center"></span> <span class="line_center"></span>
</td>
<td>
<select v-model="data[2][index].Content" class="selectBox2"> <select v-model="data[2][index].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">
......
...@@ -4,12 +4,17 @@ ...@@ -4,12 +4,17 @@
width: 100%; width: 100%;
} }
.multipleQuestion .multiple_td {
width: 40px;
text-align: center;
}
</style> </style>
<template> <template>
<div class="multipleQuestion"> <div class="multipleQuestion">
<table v-if="data&&data.length>0" class="common_TiTable"> <table v-if="data&&data.length>0" class="common_TiTable">
<tr v-for="(item,index) in data"> <tr v-for="(item,index) in data" :key="index">
<td style="width:40px;text-align:center;"> <td class="multiple_td">
<div class="num_option_dx" @click="ChangeItem(item)" :class="{'Is_Answer':item.IsAnswer}"> <div class="num_option_dx" @click="ChangeItem(item)" :class="{'Is_Answer':item.IsAnswer}">
{{item.Name}} {{item.Name}}
</div> </div>
...@@ -18,7 +23,7 @@ ...@@ -18,7 +23,7 @@
<div class="InpDIV" v-html="item.Content" v-if="commonIndex!=index" @click="changeEdit(index)"></div> <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> <UeEditor v-model="item.Content" :config="config" v-else></UeEditor>
</td> </td>
<td style="width:40px;text-align:center;"> <td class="multiple_td">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(index)"></i> <i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(index)"></i>
</td> </td>
</tr> </tr>
......
...@@ -4,11 +4,7 @@ ...@@ -4,11 +4,7 @@
width: 100%; width: 100%;
} }
.edui-editor-toolbarbox { .readingComprehensioQuestion .readingTest_question_tit {
text-align: left;
}
.readingComprehensioQuestion .clozeTest_question_tit {
width: 100%; width: 100%;
height: 40px; height: 40px;
background: #F7F8FA; background: #F7F8FA;
...@@ -16,14 +12,32 @@ ...@@ -16,14 +12,32 @@
line-height: 40px; line-height: 40px;
font-size: 14px; font-size: 14px;
color: #646873; color: #646873;
display: flex;
justify-content: space-between;
align-items: center;
} }
.clozeTest_question_tit i { .readingComprehensioQuestion .readingSubTitle {
color: #acbfd9;
cursor: pointer; 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> </style>
...@@ -32,24 +46,26 @@ ...@@ -32,24 +46,26 @@
<template v-if="data&&data.length>0"> <template v-if="data&&data.length>0">
<table class="common_TiTable" v-for="(item,index) in data" :key="index"> <table class="common_TiTable" v-for="(item,index) in data" :key="index">
<thead> <thead>
<tr> <tr class="readingTest_question_tit">
<th colspan="3" style="text-align:left;"> <th colspan="2" style="text-align:left;">
<div class="clozeTest_question_tit" @click="showNav(index)"> <span @click="showNav(index)" class="readingSubTitle">
<div> <i class="iconfont icon-arrowdown2" v-if="(commonIndex==index)&&!isShow">
<i class="iconfont icon-arrowdown2" v-if="(commonIndex==index)&&!isShow"></i> </i>
<i class="iconfont icon-arrowright" v-else></i> <i class="iconfont icon-arrowright" v-else>
{{index+1}}小题<span style="color:#A8A8B3;">({{item.QuestionName}})</span> </i>
</div> {{index+1}}小题
<div> <q-tooltip anchor="top middle" self="bottom middle">
<i class="iconfont icon-img_delete_small" @click.stop="deleteQuestion(index)"></i> <strong v-if="!isShow">点击收起</strong>
</div> <strong v-else>点击展开</strong>
</div> </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> </th>
</tr> <th class="readingTdFirst">
<tr v-if="isShowScore"> <i class="iconfont icon-img_delete_small" @click.stop="deleteQuestion(index)"></i>
<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> </th>
</tr> </tr>
</thead> </thead>
...@@ -63,7 +79,7 @@ ...@@ -63,7 +79,7 @@
<template <template
v-if="item.QuestionKey=='single' ||item.QuestionKey=='multiple'|| item.QuestionKey=='single-number'"> v-if="item.QuestionKey=='single' ||item.QuestionKey=='multiple'|| item.QuestionKey=='single-number'">
<tr v-for="(subItem,subIndex) in item.SubAnwser" :key="subIndex"> <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'"> <template v-if="item.QuestionKey=='single'||item.QuestionKey=='single-number'">
<div class="Answer_List" @click="ChangeItem(item,subItem)" :class="{'Is_Answer':subItem.IsAnswer}"> <div class="Answer_List" @click="ChangeItem(item,subItem)" :class="{'Is_Answer':subItem.IsAnswer}">
{{subItem.Name}} {{subItem.Name}}
...@@ -80,15 +96,23 @@ ...@@ -80,15 +96,23 @@
</div> </div>
<UeEditor v-model="subItem.Content" :config="config" v-else></UeEditor> <UeEditor v-model="subItem.Content" :config="config" v-else></UeEditor>
</td> </td>
<td style="width:40px;text-align:center;"> <td class="readingTdFirst">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(item,subIndex)"></i> <i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(item,subIndex)"></i>
</td> </td>
</tr> </tr>
<!--添加选项-->
<tr>
<td colspan="3">
<a class="addTiMuList" @click="addOption(item)">
<i class="iconfont icon-add"></i>添加选项
</a>
</td>
</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" :key="subIndex">
<td style="width:50px;text-align:center;padding-top:8px;"> <td class="reading_Td_FillIn">
{{subIndex+1}} {{subIndex+1}}
</td> </td>
<td> <td>
...@@ -96,27 +120,35 @@ ...@@ -96,27 +120,35 @@
</div> </div>
<UeEditor v-model="subItem.Content" :config="config" v-else></UeEditor> <UeEditor v-model="subItem.Content" :config="config" v-else></UeEditor>
</td> </td>
<td style="width:30px;text-align:center;"> <td class="readingTdFirst">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(item,subIndex)"></i> <i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(item,subIndex)"></i>
</td> </td>
</tr> </tr>
<tr>
<td colspan="3">
<!--填空题-->
<a class="addTiMuList" @click="addFillIn(item)">
<i class="iconfont icon-add"></i>添加更多
</a>
</td>
</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" :key="subIndex">
<td style="width:50px;"> <td style="width:50px;">
<div class="Answer_List" @click="ChangeItem(item,subItem)" :class="{'Is_Answer':subItem.IsAnswer}"> <div class="Answer_List" @click="ChangeItem(item,subItem)" :class="{'Is_Answer':subItem.IsAnswer}">
{{subItem.Name}} {{subItem.Name}}
</div> </div>
</td> </td>
<td colspan="2" style="text-align:left;vertical-align:middle;"> <td colspan="2" class="reading_Td_Judge">
{{subItem.Content}} {{subItem.Content}}
</td> </td>
</tr> </tr>
</template> </template>
<!--简答题--> <!--简答题-->
<template v-if="item.QuestionKey=='short-answer'"> <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"> <td colspan="3">
答案<br /> 答案<br />
<UeEditor v-model="subItem.Content" :config="config"></UeEditor> <UeEditor v-model="subItem.Content" :config="config"></UeEditor>
...@@ -124,29 +156,10 @@ ...@@ -124,29 +156,10 @@
</tr> </tr>
</template> </template>
</tbody> </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> </table>
</template> </template>
<br /> <br />
<q-btn-dropdown color="primary" label="添加小题" style="margin:0 0 20px 5px;"> <q-btn-dropdown color="primary" label="添加小题">
<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">
...@@ -241,6 +254,7 @@ ...@@ -241,6 +254,7 @@
QuestionType: item.QId, QuestionType: item.QId,
QuestionKey: item.Key, QuestionKey: item.Key,
QuestionName: item.Name, QuestionName: item.Name,
SubScore: 0,
SubTitle: "", //题目内容 SubTitle: "", //题目内容
SubAnwser: "" SubAnwser: ""
}; };
......
...@@ -4,70 +4,95 @@ ...@@ -4,70 +4,95 @@
width: 100%; width: 100%;
} }
.B-info { .sharingChooseQuestion .B-info {
font-size: 14PX; font-size: 14PX;
color: #A8A8B3; color: #A8A8B3;
padding-bottom: 10px; padding-bottom: 10px;
margin-left: 13px; 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> </style>
<template> <template>
<div class="sharingChooseQuestion"> <div class="sharingChooseQuestion">
<table v-if="data&&data.length>0" class="common_TiTable"> <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}} {{item.Name}}
</td> </td>
<td> <td>
<div class="InpDIV" v-html="item.Content" v-if="commonIndex!=index" @click="changeEdit(index)"></div> <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> <UeEditor v-model="item.Content" :config="config" v-else></UeEditor>
</td> </td>
<td style="width:40px;text-align:center;"> <td class="sharingChoose_td">
<i v-if="index>0" class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(index)"></i> <i v-if="data[0].length>1" class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(index)"></i>
</td> </td>
</tr> </tr>
<tfoot> <tr>
<tr> <td>
<td colspan="3"> </td>
<a class="addTiMuList" style="margin-left:13px;" @click="addOption()"> <td colspan="2">
<i class="iconfont icon-add"></i>添加选项 <a class="addTiMuList" @click="addOption()">
</a> <i class="iconfont icon-add"></i>添加选项
</td> </a>
</tr> </td>
</tfoot> </tr>
</table>
<table v-if="data&&data.length>0" class="common_TiTable"> <!--题干部分-->
<tr v-for="(item,index) in data[1]"> <tr v-for="(item,index) in data[1]" :key="index">
<td style="width:40px;text-align:center;padding-top:8px;"> <td class="sharingChoose_td" style="padding-top:8px;">
{{index+1}} {{index+1}}
</td> </td>
<td> <td>
<div class="InpDIV" v-html="item.Content" v-if="commonIndex2!=index" @click="changeEdit2(index)"></div> <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> <UeEditor v-model="item.Content" :config="config" v-else></UeEditor>
</td> </td>
<td style="width:40px;text-align:center;"> <td class="sharingChoose_td">
<i v-if="index>0" class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteQuestion(index)"></i> <i v-if="data[1].length>1" class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteQuestion(index)"></i>
</td> </td>
</tr> </tr>
<tfoot> <tr>
<tr>
<td colspan="3">
<a class="addTiMuList" style="margin-left:13px;" @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}}
</td>
<td> <td>
<select v-model="item.Name" class="selectBox" style="margin:10px 0 0 0;outline:none;"> </td>
<td colspan="2">
<a class="addTiMuList" @click="addQuestion()">
<i class="iconfont icon-add"></i>添加题干
</a>
</td>
</tr>
<tr>
<td colspan="3" class="B-info">
答案:
</td>
</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]"> <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>
......
...@@ -3,13 +3,18 @@ ...@@ -3,13 +3,18 @@
width: 100%; width: 100%;
} }
.singleQuestion .single_td {
width: 40px;
text-align: center;
}
</style> </style>
<!--单选题--> <!--单选题-->
<template> <template>
<div class="singleQuestion"> <div class="singleQuestion">
<table v-if="data&&data.length>0" class="common_TiTable"> <table v-if="data&&data.length>0" class="common_TiTable">
<tr v-for="(item,index) in data" :key="index"> <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}"> <div class="Answer_List" @click="ChangeItem(item)" :class="{'Is_Answer':item.IsAnswer}">
{{item.Name}} {{item.Name}}
</div> </div>
...@@ -18,7 +23,7 @@ ...@@ -18,7 +23,7 @@
<div class="InpDIV" v-html="item.Content" v-if="commonIndex!=index" @click="changeEdit(index)"></div> <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> <UeEditor v-model="item.Content" v-else :config="config"></UeEditor>
</td> </td>
<td style="width:40px;text-align:center;"> <td class="single_td">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(index)"></i> <i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(index)"></i>
</td> </td>
</tr> </tr>
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
width: 100% width: 100%
} }
.team_tit { .sortingProblemQuestion .team_tit {
font-size: 14px; font-size: 14px;
color: #A8A8B3; color: #A8A8B3;
padding-bottom: 20px; padding-bottom: 20px;
} }
.selectBox { .sortingProblemQuestion .selectBox {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
text-align: left; text-align: left;
...@@ -27,40 +27,49 @@ ...@@ -27,40 +27,49 @@
margin: 0 20px 14px 0; margin: 0 20px 14px 0;
} }
.blue-border { .sortingProblemQuestion .blue-border {
border: 1px solid #FFFFFF; border: 1px solid #FFFFFF;
box-shadow: 0 0 7px 1px #75BAFF; box-shadow: 0 0 7px 1px #75BAFF;
} }
.sortingProblemQuestion .sortingProblem_td {
width: 40px;
text-align: center;
}
</style> </style>
<template> <template>
<div class="sortingProblemQuestion"> <div class="sortingProblemQuestion">
<table v-if="data&&data.length>0" class="common_TiTable"> <table v-if="data&&data.length>0" class="common_TiTable">
<tr v-for="(item,index) in data[0]" :key="index"> <tr v-for="(item,index) in data[0]" :key="index">
<td style="width:40px;text-align:center;"> <td class="sortingProblem_td">
{{item.Name}} {{item.Name}}
</td> </td>
<td> <td>
<div class="InpDIV" v-html="item.Content" v-if="commonIndex!=index" @click="changeEdit(index)"></div> <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> <UeEditor v-model="item.Content" :config="config" v-else></UeEditor>
</td> </td>
<td style="width:40px;text-align:center;"> <td class="sortingProblem_td">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(index)"></i> <i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(index)" v-if="data[0].length>1"></i>
</td> </td>
</tr> </tr>
</table>
<br />
<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">
<tr> <tr>
<td> <td colspan="3">
<a class="addTiMuList" @click="addOption()">
<i class="iconfont icon-add"></i>添加更多
</a>
</td>
</tr>
<tr>
<td colspan="3" class="team_tit">
答案:请在下方下拉框中对选项进行排序(顺序从左到右)
</td>
</tr>
<tr>
<td colspan="3">
<template v-for="(item,index) in data[1]"> <template v-for="(item,index) in data[1]">
<select v-model="item.Name" class="selectBox" :class="{'blue-border':index==clickIndex}" <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]"> <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>
......
<!--分录题-->
<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 @@ ...@@ -129,18 +129,14 @@
:isShowAnswer="isShowAnswer"></v-single> :isShowAnswer="isShowAnswer"></v-single>
<!--多选题--> <!--多选题-->
<v-multiple v-if="objOption.QuestionTypeKey=='multiple'" :questionObj="objOption" :isShowAnswer="isShowAnswer"></v-multiple> <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-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' <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' ||objOption.QuestionTypeKey=='calculation' || objOption.QuestionTypeKey=='spoken'|| objOption.QuestionTypeKey=='other'
" :questionObj="objOption" :isShowAnswer="isShowAnswer"> </v-shortanswer> " :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> <v-matching v-if="objOption.QuestionTypeKey=='matching'" :questionObj="objOption" :isShowAnswer="isShowAnswer"></v-matching>
<!--排序题--> <!--排序题-->
...@@ -192,7 +188,6 @@ ...@@ -192,7 +188,6 @@
import vFillin from '../../components/questiontype/v-fillin' import vFillin from '../../components/questiontype/v-fillin'
import vJudge from '../../components/questiontype/v-judge' import vJudge from '../../components/questiontype/v-judge'
import vShortanswer from '../../components/questiontype/v-shortanswer' import vShortanswer from '../../components/questiontype/v-shortanswer'
import vEntryproblem from '../../components/questiontype/v-entryproblem'
import vMatching from '../../components/questiontype/v-matching' import vMatching from '../../components/questiontype/v-matching'
import vSortingproblem from '../../components/questiontype/v-sortingproblem' import vSortingproblem from '../../components/questiontype/v-sortingproblem'
import vCloze from '../../components/questiontype/v-cloze' import vCloze from '../../components/questiontype/v-cloze'
...@@ -205,7 +200,6 @@ ...@@ -205,7 +200,6 @@
vFillin, //填空题 vFillin, //填空题
vJudge, //判断题 vJudge, //判断题
vShortanswer, //简答题 vShortanswer, //简答题
vEntryproblem, //分录题
vMatching, //连线题 vMatching, //连线题
vSortingproblem, //排序题 vSortingproblem, //排序题
vCloze, //完型填空 vCloze, //完型填空
......
...@@ -277,8 +277,8 @@ ...@@ -277,8 +277,8 @@
<v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer" <v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isOperate="isOperate"> :isOperate="isOperate">
</v-multiple> </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"> :isOperate="isOperate">
</v-fillin> </v-fillin>
<!--判断题--> <!--判断题-->
...@@ -289,11 +289,6 @@ ...@@ -289,11 +289,6 @@
<v-shortanswer v-if="dItem.QuestionTypeKey=='short-answer'||dItem.QuestionTypeKey=='noun-explanation'||dItem.QuestionTypeKey=='essay-question' <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' ||dItem.QuestionTypeKey=='calculation' || dItem.QuestionTypeKey=='spoken'|| dItem.QuestionTypeKey=='other'
" :questionObj="dItem" :isShowAnswer="isShowAnswer" :isOperate="isOperate"> </v-shortanswer> " :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" <v-matching v-if="dItem.QuestionTypeKey=='matching'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isOperate="isOperate"> :isOperate="isOperate">
...@@ -328,7 +323,6 @@ ...@@ -328,7 +323,6 @@
import vFillin from '../../components/questiontype/v-fillin' import vFillin from '../../components/questiontype/v-fillin'
import vJudge from '../../components/questiontype/v-judge' import vJudge from '../../components/questiontype/v-judge'
import vShortanswer from '../../components/questiontype/v-shortanswer' import vShortanswer from '../../components/questiontype/v-shortanswer'
import vEntryproblem from '../../components/questiontype/v-entryproblem'
import vMatching from '../../components/questiontype/v-matching' import vMatching from '../../components/questiontype/v-matching'
import vSortingproblem from '../../components/questiontype/v-sortingproblem' import vSortingproblem from '../../components/questiontype/v-sortingproblem'
import vCloze from '../../components/questiontype/v-cloze' import vCloze from '../../components/questiontype/v-cloze'
...@@ -345,7 +339,6 @@ ...@@ -345,7 +339,6 @@
vFillin, vFillin,
vJudge, vJudge,
vShortanswer, vShortanswer,
vEntryproblem,
vMatching, vMatching,
vSortingproblem, vSortingproblem,
vCloze, vCloze,
......
...@@ -280,8 +280,8 @@ ...@@ -280,8 +280,8 @@
<v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer" <v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper"> :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper">
</v-multiple> </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"> :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper">
</v-fillin> </v-fillin>
<!--判断题--> <!--判断题-->
...@@ -297,12 +297,6 @@ ...@@ -297,12 +297,6 @@
|| dItem.QuestionTypeKey=='other'" :questionObj="dItem" :isShowAnswer="isShowAnswer" || dItem.QuestionTypeKey=='other'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper"> :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper">
</v-shortanswer> </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" <v-matching v-if="dItem.QuestionTypeKey=='matching'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper"> :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper">
...@@ -339,7 +333,6 @@ ...@@ -339,7 +333,6 @@
import vFillin from '../../components/questiontype/v-fillin' import vFillin from '../../components/questiontype/v-fillin'
import vJudge from '../../components/questiontype/v-judge' import vJudge from '../../components/questiontype/v-judge'
import vShortanswer from '../../components/questiontype/v-shortanswer' import vShortanswer from '../../components/questiontype/v-shortanswer'
import vEntryproblem from '../../components/questiontype/v-entryproblem'
import vMatching from '../../components/questiontype/v-matching' import vMatching from '../../components/questiontype/v-matching'
import vSortingproblem from '../../components/questiontype/v-sortingproblem' import vSortingproblem from '../../components/questiontype/v-sortingproblem'
import vCloze from '../../components/questiontype/v-cloze' import vCloze from '../../components/questiontype/v-cloze'
...@@ -356,7 +349,6 @@ ...@@ -356,7 +349,6 @@
vFillin, vFillin,
vJudge, vJudge,
vShortanswer, vShortanswer,
vEntryproblem,
vMatching, vMatching,
vSortingproblem, vSortingproblem,
vCloze, vCloze,
......
...@@ -282,8 +282,8 @@ ...@@ -282,8 +282,8 @@
<v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer" <v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isEditStudentScore="isEditStudentScore"> :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isEditStudentScore="isEditStudentScore">
</v-multiple> </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"> :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isEditStudentScore="isEditStudentScore">
</v-fillin> </v-fillin>
<!--判断题--> <!--判断题-->
...@@ -299,12 +299,6 @@ ...@@ -299,12 +299,6 @@
|| dItem.QuestionTypeKey=='other'" :questionObj="dItem" :isShowAnswer="isShowAnswer" || dItem.QuestionTypeKey=='other'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isEditStudentScore="isEditStudentScore"> :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isEditStudentScore="isEditStudentScore">
</v-shortanswer> </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" <v-matching v-if="dItem.QuestionTypeKey=='matching'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isEditStudentScore="isEditStudentScore"> :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isEditStudentScore="isEditStudentScore">
...@@ -341,7 +335,7 @@ ...@@ -341,7 +335,7 @@
import vFillin from '../../components/questiontype/v-fillin' import vFillin from '../../components/questiontype/v-fillin'
import vJudge from '../../components/questiontype/v-judge' import vJudge from '../../components/questiontype/v-judge'
import vShortanswer from '../../components/questiontype/v-shortanswer' import vShortanswer from '../../components/questiontype/v-shortanswer'
import vEntryproblem from '../../components/questiontype/v-entryproblem'
import vMatching from '../../components/questiontype/v-matching' import vMatching from '../../components/questiontype/v-matching'
import vSortingproblem from '../../components/questiontype/v-sortingproblem' import vSortingproblem from '../../components/questiontype/v-sortingproblem'
import vCloze from '../../components/questiontype/v-cloze' import vCloze from '../../components/questiontype/v-cloze'
...@@ -358,7 +352,6 @@ ...@@ -358,7 +352,6 @@
vFillin, vFillin,
vJudge, vJudge,
vShortanswer, vShortanswer,
vEntryproblem,
vMatching, vMatching,
vSortingproblem, vSortingproblem,
vCloze, vCloze,
......
...@@ -390,8 +390,8 @@ ...@@ -390,8 +390,8 @@
<!--多选题--> <!--多选题-->
<multiple v-if="ChooseItem.QuestionTypeKey=='multiple'" :questionData="ChooseItem.QuestionContentObj" <multiple v-if="ChooseItem.QuestionTypeKey=='multiple'" :questionData="ChooseItem.QuestionContentObj"
@getChild="getChildData" :setOption="ChooseItem"></multiple> @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> @getChild="getChildData" :setOption="ChooseItem"></fill-in>
<!--判断题--> <!--判断题-->
<judge v-if="ChooseItem.QuestionTypeKey=='judge'" :questionData="ChooseItem.QuestionContentObj" <judge v-if="ChooseItem.QuestionTypeKey=='judge'" :questionData="ChooseItem.QuestionContentObj"
...@@ -400,11 +400,6 @@ ...@@ -400,11 +400,6 @@
<short-answer v-if="ChooseItem.QuestionTypeKey=='short-answer'||ChooseItem.QuestionTypeKey=='noun-explanation'||ChooseItem.QuestionTypeKey=='essay-question' <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' ||ChooseItem.QuestionTypeKey=='calculation' || ChooseItem.QuestionTypeKey=='spoken'|| ChooseItem.QuestionTypeKey=='other'
" :setOption="ChooseItem"> </short-answer> " :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" <matching v-if="ChooseItem.QuestionTypeKey=='matching'" :questionData="ChooseItem.QuestionContentObj"
:setOption="ChooseItem" @getChild="getChildData"></matching> :setOption="ChooseItem" @getChild="getChildData"></matching>
...@@ -483,7 +478,6 @@ ...@@ -483,7 +478,6 @@
import fillIn from '../../components/questiontype/fill-in' import fillIn from '../../components/questiontype/fill-in'
import judge from '../../components/questiontype/judge' import judge from '../../components/questiontype/judge'
import shortAnswer from '../../components/questiontype/short-answer' import shortAnswer from '../../components/questiontype/short-answer'
import entryProblem from '../../components/questiontype/entry-problem'
import matching from '../../components/questiontype/matching' import matching from '../../components/questiontype/matching'
import sortingProblem from '../../components/questiontype/sorting-problem' import sortingProblem from '../../components/questiontype/sorting-problem'
import cloze from '../../components/questiontype/cloze' import cloze from '../../components/questiontype/cloze'
...@@ -523,7 +517,6 @@ ...@@ -523,7 +517,6 @@
fillIn, //填空题 fillIn, //填空题
judge, //判断题 judge, //判断题
shortAnswer, //简答题 shortAnswer, //简答题
entryProblem, //分录题
matching, //连线题 matching, //连线题
sortingProblem, //排序题 sortingProblem, //排序题
cloze, //完型填空 cloze, //完型填空
...@@ -532,7 +525,7 @@ ...@@ -532,7 +525,7 @@
questionForm questionForm
}, },
meta: { meta: {
title: "考试" title: "编辑试卷"
}, },
watch: { watch: {
'ChooseItem.Title': { 'ChooseItem.Title': {
...@@ -966,7 +959,11 @@ ...@@ -966,7 +959,11 @@
var clozeScore = 0; var clozeScore = 0;
if (y.QuestionContentObj && y.QuestionContentObj.length > 0) { if (y.QuestionContentObj && y.QuestionContentObj.length > 0) {
y.QuestionContentObj.forEach(qItem => { y.QuestionContentObj.forEach(qItem => {
clozeScore += Number(qItem.SubScore); var tempClozeScore = 0;
if (qItem.SubScore != '') {
tempClozeScore = qItem.SubScore;
}
clozeScore += Number(tempClozeScore);
}) })
} }
y.Score = clozeScore; y.Score = clozeScore;
...@@ -975,7 +972,11 @@ ...@@ -975,7 +972,11 @@
var readScore = 0; var readScore = 0;
if (y.QuestionContentObj && y.QuestionContentObj.length > 0) { if (y.QuestionContentObj && y.QuestionContentObj.length > 0) {
y.QuestionContentObj.forEach(qItem => { y.QuestionContentObj.forEach(qItem => {
readScore += Number(qItem.SubScore); var tempReadingScore = 0;
if (qItem.SubScore != '') {
tempReadingScore = qItem.SubScore;
}
readScore += Number(tempReadingScore);
}) })
} }
y.Score = readScore; y.Score = readScore;
......
...@@ -277,8 +277,9 @@ ...@@ -277,8 +277,9 @@
<!--多选题--> <!--多选题-->
<v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer"> <v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer">
</v-multiple> </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-fillin>
<!--判断题--> <!--判断题-->
<v-judge v-if="dItem.QuestionTypeKey=='judge'" :questionObj="dItem" :isShowAnswer="isShowAnswer"></v-judge> <v-judge v-if="dItem.QuestionTypeKey=='judge'" :questionObj="dItem" :isShowAnswer="isShowAnswer"></v-judge>
...@@ -287,11 +288,6 @@ ...@@ -287,11 +288,6 @@
<v-shortanswer v-if="dItem.QuestionTypeKey=='short-answer'||dItem.QuestionTypeKey=='noun-explanation'||dItem.QuestionTypeKey=='essay-question' <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' ||dItem.QuestionTypeKey=='calculation' || dItem.QuestionTypeKey=='spoken'|| dItem.QuestionTypeKey=='other'
" :questionObj="dItem" :isShowAnswer="isShowAnswer"> </v-shortanswer> " :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 v-if="dItem.QuestionTypeKey=='matching'" :questionObj="dItem" :isShowAnswer="isShowAnswer">
</v-matching> </v-matching>
...@@ -323,7 +319,6 @@ ...@@ -323,7 +319,6 @@
import vFillin from '../../components/questiontype/v-fillin' import vFillin from '../../components/questiontype/v-fillin'
import vJudge from '../../components/questiontype/v-judge' import vJudge from '../../components/questiontype/v-judge'
import vShortanswer from '../../components/questiontype/v-shortanswer' import vShortanswer from '../../components/questiontype/v-shortanswer'
import vEntryproblem from '../../components/questiontype/v-entryproblem'
import vMatching from '../../components/questiontype/v-matching' import vMatching from '../../components/questiontype/v-matching'
import vSortingproblem from '../../components/questiontype/v-sortingproblem' import vSortingproblem from '../../components/questiontype/v-sortingproblem'
import vCloze from '../../components/questiontype/v-cloze' import vCloze from '../../components/questiontype/v-cloze'
...@@ -339,7 +334,6 @@ ...@@ -339,7 +334,6 @@
vFillin, vFillin,
vJudge, vJudge,
vShortanswer, vShortanswer,
vEntryproblem,
vMatching, vMatching,
vSortingproblem, vSortingproblem,
vCloze, vCloze,
......
...@@ -180,7 +180,8 @@ ...@@ -180,7 +180,8 @@
<div class="setCt"> <div class="setCt">
<span class="papPub_Left f1">考试限时</span> <span class="papPub_Left f1">考试限时</span>
<div class="f1"> <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> <template v-slot:append>
<span style="font-size:12px;">分钟</span> <span style="font-size:12px;">分钟</span>
</template> </template>
...@@ -191,7 +192,7 @@ ...@@ -191,7 +192,7 @@
<span class="papPub_Left f1">限时提交</span> <span class="papPub_Left f1">限时提交</span>
<div class="f1"> <div class="f1">
<q-input filled bottom-slots maxlength="10" @keyup.native="checkInteger(postMsg,'SubmitTimes')" <q-input filled bottom-slots maxlength="10" @keyup.native="checkInteger(postMsg,'SubmitTimes')"
style="width:308px;" v-model="postMsg.SubmitTimes" :dense="false"> style="width:308px;" v-model="postMsg.SubmitTimes" :dense="false">
<template v-slot:append> <template v-slot:append>
<span style="font-size:12px;">分钟内不允许提交</span> <span style="font-size:12px;">分钟内不允许提交</span>
</template> </template>
...@@ -202,7 +203,7 @@ ...@@ -202,7 +203,7 @@
<span class="papPub_Left f1">限时进入</span> <span class="papPub_Left f1">限时进入</span>
<div class="f1"> <div class="f1">
<q-input filled bottom-slots maxlength="10" @keyup.native="checkInteger(postMsg,'EnterTimes')" <q-input filled bottom-slots maxlength="10" @keyup.native="checkInteger(postMsg,'EnterTimes')"
v-model="postMsg.EnterTimes" :dense="false"> v-model="postMsg.EnterTimes" :dense="false">
<template v-slot:append> <template v-slot:append>
<span style="font-size:12px;">分钟后不允许参加考试</span> <span style="font-size:12px;">分钟后不允许参加考试</span>
</template> </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