Commit b9effd4a authored by 黄奎's avatar 黄奎

页面修改

parent ca1218f3
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<template> <template>
<div class="judgeQuestion"> <div class="judgeQuestion">
<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:50px;text-align:center;"> <td style="width:50px;text-align:center;">
<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}}
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
</style> </style>
<template> <template>
<div class="v_judgeQuestion"> <div class="v_judgeQuestion">
{{data}}
<table v-if="data&&data.QuestionContentObj&&data.QuestionContentObj.length>0" class="common_TiTable"> <table v-if="data&&data.QuestionContentObj&&data.QuestionContentObj.length>0" class="common_TiTable">
<tbody v-for="(item,index) in data.QuestionContentObj" :key="index"> <tbody v-for="(item,index) in data.QuestionContentObj" :key="index">
<tr> <tr>
......
<!--阅读理解--> <!--阅读理解-->
<style> <style>
.readingComprehensioQuestion { .v_readingComprehensioQuestion {
width: 100%; width: 100%;
} }
.edui-editor-toolbarbox {
text-align: left; .v_readingComprehensioQuestion .clozeTest_question_tit {
}
.readingComprehensioQuestion .clozeTest_question_tit {
width: 100%; width: 100%;
height: 40px; height: 40px;
background: #F7F8FA; background: #F7F8FA;
...@@ -21,17 +18,16 @@ ...@@ -21,17 +18,16 @@
align-items: center; align-items: center;
} }
.clozeTest_question_tit i { .v_readingComprehensioQuestion .clozeTest_question_tit i {
color: #acbfd9; color: #acbfd9;
cursor: pointer; cursor: pointer;
} }
</style> </style>
<template> <template>
<div class="readingComprehensioQuestion"> <div class="v_readingComprehensioQuestion">
<template v-if="data&&data.QuestionContentObj&&data.QuestionContentObj.length>0">
<template v-if="data&&data.QuestionContentObj&&data.QuestionContentObj.length>0" v-for="(item,index) in data.QuestionContentObj"> <table class="common_TiTable" v-for="(item,index) in data.QuestionContentObj" :key="index">
<table class="common_TiTable">
<thead> <thead>
<tr> <tr>
<th colspan="3" style="text-align:left;"> <th colspan="3" style="text-align:left;">
...@@ -54,7 +50,7 @@ ...@@ -54,7 +50,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"> <tr v-for="(subItem,subIndex) in item.SubAnwser" :key="subIndex">
<td style="width:40px;text-align:center;"> <td style="width:40px;text-align:center;">
<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'">
......
...@@ -98,18 +98,21 @@ ...@@ -98,18 +98,21 @@
padding-bottom: 12px; padding-bottom: 12px;
display: inline-block; display: inline-block;
} }
.questionMain{
width:1200px; .questionMain {
margin:20px auto; width: 1200px;
padding:25px; margin: 20px auto;
padding: 25px;
background-color: #fff; background-color: #fff;
border-radius: 8px; border-radius: 8px;
margin-bottom:20px; margin-bottom: 20px;
box-shadow: 0px 2px 10px 0px rgba(237, 238, 240, 0.5); box-shadow: 0px 2px 10px 0px rgba(237, 238, 240, 0.5);
} }
.qussTionTitDiv img{
width:100%; .qussTionTitDiv img {
width: 100%;
} }
</style> </style>
<template> <template>
<div class="questionMain"> <div class="questionMain">
...@@ -122,47 +125,37 @@ ...@@ -122,47 +125,37 @@
<div v-html="objOption.Title" @click="clickQuestion($event)"></div> <div v-html="objOption.Title" @click="clickQuestion($event)"></div>
</div> </div>
<!--单选题--> <!--单选题-->
<v-single v-if="questionObj.Key=='single'||questionObj.Key=='single-number'" :questionData="AnswerList" <v-single v-if="objOption.QuestionTypeKey=='single'||objOption.QuestionTypeKey=='single-number'" :questionObj="objOption"
@getChild="getChildData" :setOption="objOption"></v-single> :isShowAnswer="isShowAnswer"></v-single>
<!--多选题--> <!--多选题-->
<v-multiple v-if="questionObj.Key=='multiple'" :questionData="AnswerList" @getChild="getChildData" <v-multiple v-if="objOption.QuestionTypeKey=='multiple'" :questionObj="objOption" :isShowAnswer="isShowAnswer"></v-multiple>
:setOption="objOption"></v-multiple>
<!--填空题--> <!--填空题-->
<v-fillin v-if="questionObj.Key=='fill-in'" :questionData="AnswerList" @getChild="getChildData" <v-fillin v-if="objOption.QuestionTypeKey=='fill-in'" :questionObj="objOption" :isShowAnswer="isShowAnswer"></v-fillin>
:setOption="objOption"></v-fillin>
<!--判断题--> <!--判断题-->
<v-judge v-if="questionObj.Key=='judge'" :questionData="AnswerList" @getChild="getChildData" <v-judge v-if="objOption.QuestionTypeKey=='judge'" :questionObj="objOption" :isShowAnswer="isShowAnswer"></v-judge>
:setOption="objOption"></v-judge>
<!--简答题、名词解释、论述题、计算题、口语题、其它--> <!--简答题、名词解释、论述题、计算题、口语题、其它-->
<v-shortanswer v-if="questionObj.Key=='short-answer'||questionObj.Key=='noun-explanation'||questionObj.Key=='essay-question' <v-shortanswer v-if="objOption.QuestionTypeKey=='short-answer'||objOption.QuestionTypeKey=='noun-explanation'||objOption.QuestionTypeKey=='essay-question'
||questionObj.Key=='calculation' || questionObj.Key=='spoken'|| questionObj.Key=='other' ||objOption.QuestionTypeKey=='calculation' || objOption.QuestionTypeKey=='spoken'|| objOption.QuestionTypeKey=='other'
" :setOption="objOption"> </v-shortanswer> " :questionObj="objOption" :isShowAnswer="isShowAnswer"> </v-shortanswer>
<!--分录题、资料题--> <!--分录题、资料题-->
<v-entryproblem v-if="questionObj.Key=='entry-problem'|| questionObj.Key=='data-question'" <v-entryproblem v-if="objOption.QuestionTypeKey=='entry-problem'|| objOption.QuestionTypeKey=='data-question'" :questionObj="objOption"
:questionData="AnswerList" :setOption="objOption" @getChild="getChildData"> :isShowAnswer="isShowAnswer">
</v-entryproblem> </v-entryproblem>
<!--连线题--> <!--连线题-->
<v-matching v-if="questionObj.Key=='matching'" :questionData="AnswerList" :setOption="objOption" <v-matching v-if="objOption.QuestionTypeKey=='matching'" :questionObj="objOption" :isShowAnswer="isShowAnswer"></v-matching>
@getChild="getChildData"></v-matching>
<!--排序题--> <!--排序题-->
<v-sortingproblem v-if="questionObj.Key=='sorting-problem'" :questionData="AnswerList" :setOption="objOption" <v-sortingproblem v-if="objOption.QuestionTypeKey=='sorting-problem'" :questionObj="objOption" :isShowAnswer="isShowAnswer">
@getChild="getChildData"></v-sortingproblem> </v-sortingproblem>
<!--完型填空--> <!--完型填空-->
<v-cloze v-if="questionObj.Key=='cloze'" :questionData="AnswerList" :setOption="objOption" <v-cloze v-if="objOption.QuestionTypeKey=='cloze'" :questionObj="objOption" :isShowAnswer="isShowAnswer"></v-cloze>
@getChild="getChildData"></v-cloze>
<!--阅读理解、听力题--> <!--阅读理解、听力题-->
<v-readingcomprehensio v-if="questionObj.Key=='reading-comprehensio'||questionObj.Key=='listening'" <v-readingcomprehensio
:questionData="AnswerList" :setOption="objOption" @getChild="getChildData"></v-readingcomprehensio> v-if="objOption.QuestionTypeKey=='reading-comprehensio'||objOption.QuestionTypeKey=='listening'"
:questionObj="objOption" :isShowAnswer="isShowAnswer"></v-readingcomprehensio>
<!--共用选择题--> <!--共用选择题-->
<v-sharingchoose v-if="questionObj.Key=='sharing-choose'" :questionData="AnswerList" @getChild="getChildData" <v-sharingchoose v-if="objOption.QuestionTypeKey=='sharing-choose'" :questionObj="objOption" :isShowAnswer="isShowAnswer">
:setOption="objOption">
</v-sharingchoose> </v-sharingchoose>
<br /> <br />
<div class="col-12">
<div style="margin:20px 0;">答案解析</div>
<div v-html="objOption.AnswerParse"></div>
</div>
<br />
<div class="col-4"> <div class="col-4">
<br /> <br />
<span class="difficulty_Degree">难度: </span> <span class="difficulty_Degree">难度: </span>
...@@ -193,7 +186,7 @@ ...@@ -193,7 +186,7 @@
import { import {
queryQuestionInfo, queryQuestionInfo,
} from '../../api/question/question' } from '../../api/question/question'
import vSingle from '../../components/questiontype/v-single' import vSingle from '../../components/questiontype/v-single'
import vMultiple from '../../components/questiontype/v-multiple' import vMultiple from '../../components/questiontype/v-multiple'
import vFillin from '../../components/questiontype/v-fillin' import vFillin from '../../components/questiontype/v-fillin'
...@@ -255,26 +248,16 @@ ...@@ -255,26 +248,16 @@
CategoryName: "", //分类 CategoryName: "", //分类
DifficultyTypeStr: "", //难易程度 DifficultyTypeStr: "", //难易程度
LevelTypeName: "", //考级程度 LevelTypeName: "", //考级程度
QuestionContentObj: [], //选项列表
}, },
AnswerList: [], isShowAnswer: true, //显示答案
questionObj: {}, //题目类型对象
choosePointArray: [], //知识点列表 choosePointArray: [], //知识点列表
} }
}, },
computed: {
},
created() {},
mounted() { mounted() {
this.initObj() this.initObj()
}, },
methods: { methods: {
//获取子组件内容
getChildData(obj) {
if (obj) {
this.objOption.QuestionContent = JSON.stringify(obj);
}
},
//初始化表单 //初始化表单
initObj() { initObj() {
var qId = 0; var qId = 0;
...@@ -283,7 +266,7 @@ ...@@ -283,7 +266,7 @@
} }
queryQuestionInfo({ queryQuestionInfo({
QuestionId: qId, QuestionId: qId,
isReplaceClozeTitle:1 isReplaceClozeTitle: 1
}).then(res => { }).then(res => {
this.objOption.QuestionId = res.Data.QuestionId; this.objOption.QuestionId = res.Data.QuestionId;
this.objOption.Title = res.Data.Title; this.objOption.Title = res.Data.Title;
...@@ -296,8 +279,6 @@ ...@@ -296,8 +279,6 @@
this.objOption.SortNum = res.Data.SortNum; this.objOption.SortNum = res.Data.SortNum;
this.objOption.Answer = res.Data.Answer; this.objOption.Answer = res.Data.Answer;
this.objOption.IsMutex = res.Data.IsMutex; this.objOption.IsMutex = res.Data.IsMutex;
this.questionObj.Key = res.Data.QuestionTypeKey;
this.questionObj.QId = res.Data.QuestionTypeId;
this.objOption.Category = res.Data.Category; this.objOption.Category = res.Data.Category;
this.objOption.LevelType = res.Data.LevelType; this.objOption.LevelType = res.Data.LevelType;
this.objOption.QuestionTypeName = res.Data.QuestionTypeName; this.objOption.QuestionTypeName = res.Data.QuestionTypeName;
...@@ -305,14 +286,12 @@ ...@@ -305,14 +286,12 @@
this.objOption.DifficultyTypeStr = res.Data.DifficultyTypeStr; this.objOption.DifficultyTypeStr = res.Data.DifficultyTypeStr;
this.objOption.LevelTypeName = res.Data.LevelTypeName; this.objOption.LevelTypeName = res.Data.LevelTypeName;
if (res.Data.QuestionContentObj) { if (res.Data.QuestionContentObj) {
this.AnswerList = res.Data.QuestionContentObj; this.objOption.QuestionContentObj = res.Data.QuestionContentObj;
this.objOption.QuestionContent = JSON.stringify(res.Data.QuestionContentObj);
} }
if (res.Data.QuestionPointList && res.Data.QuestionPointList.length > 0) { if (res.Data.QuestionPointList && res.Data.QuestionPointList.length > 0) {
this.choosePointArray = res.Data.QuestionPointList; this.choosePointArray = res.Data.QuestionPointList;
} }
}) })
}, },
//标题点击事件 //标题点击事件
clickQuestion(e) { clickQuestion(e) {
......
...@@ -521,7 +521,7 @@ ...@@ -521,7 +521,7 @@
this.GetPaperInfo() this.GetPaperInfo()
} }
}, },
methods: { methods: {
//大类改变分数 //大类改变分数
changeGroupScore(gItem) { changeGroupScore(gItem) {
var subScore = 0; var subScore = 0;
...@@ -793,23 +793,23 @@ ...@@ -793,23 +793,23 @@
this.ComCheckIndex = index2; this.ComCheckIndex = index2;
this.ChooseItem = questionItem; this.ChooseItem = questionItem;
this.ChooseItem.QuestionContentObj = questionItem.QuestionContentObj; this.ChooseItem.QuestionContentObj = questionItem.QuestionContentObj;
if (questionItem.QuestionTypeKey != 'sharing-choose') { if (questionItem.QuestionTypeKey != 'sharing-choose' && this.$refs.UE_Title) {
this.$refs.UE_Title.reloadNewValue(); this.$refs.UE_Title.reloadNewValue();
} }
this.$refs.UE_AnswerParse.reloadNewValue(); if (this.$refs.UE_AnswerParse) {
this.$refs.UE_AnswerParse.reloadNewValue();
}
this.ChooseItem.AnswerParse = questionItem.AnswerParse; this.ChooseItem.AnswerParse = questionItem.AnswerParse;
this.$forceUpdate(); this.$forceUpdate();
}, },
//正则匹配替换 //正则匹配替换
getRegItem(val){ getRegItem(val) {
let Item = val.replace(/<iframe(([\s\S])*?)<\/iframe>/ig,'[音频]').replace(/<img.*?(?:>|\/>)/gi,'[图片]'); let Item = val.replace(/<iframe(([\s\S])*?)<\/iframe>/ig, '[音频]').replace(/<img.*?(?:>|\/>)/gi, '[图片]');
return Item return Item
}, },
//保存题目 //保存题目
SavePaper() { SavePaper() {
if (this.validateType()) { if (this.validateType()) {
console.log('进入');
return;
savePaperInfo(this.DataObj).then(res => { savePaperInfo(this.DataObj).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.$q.notify({ this.$q.notify({
...@@ -856,7 +856,8 @@ ...@@ -856,7 +856,8 @@
} }
} }
//单选题 多选题 //单选题 多选题
if (this.DataObj.GroupList[k].QuestionTypeKey == 'single'||this.DataObj.GroupList[k].QuestionTypeKey == 'multiple') { if (this.DataObj.GroupList[k].QuestionTypeKey == 'single' || this.DataObj.GroupList[k].QuestionTypeKey ==
'multiple') {
for (let i = 0; i < this.DataObj.GroupList[k].DetailsList.length; i++) { for (let i = 0; i < this.DataObj.GroupList[k].DetailsList.length; i++) {
var Num = 0; var Num = 0;
if (this.DataObj.GroupList[k].DetailsList[i].Title == '') { if (this.DataObj.GroupList[k].DetailsList[i].Title == '') {
...@@ -894,7 +895,7 @@ ...@@ -894,7 +895,7 @@
} }
} }
//填空题 //填空题
} }
return result; return result;
}, },
......
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