Commit b8328781 authored by zhengke's avatar zhengke

修改

parent 534f7a8c
...@@ -71,17 +71,15 @@ ...@@ -71,17 +71,15 @@
<tbody class="contant" v-if="(commonIndex==index)&&!isShow"> <tbody class="contant" v-if="(commonIndex==index)&&!isShow">
<tr v-for="(subItem,subIndex) in item"> <tr v-for="(subItem,subIndex) in item">
<td style="width:40px;text-align:center;"> <td style="width:40px;text-align:center;">
<div class="Answer_List" @click="ChangeItem(item,subItem)" :class="{'Is_Answer':subItem.IsAnswer}"> <div class="Answer_List" :class="{'Is_Answer':subItem.IsAnswer}">
{{subItem.Name}} {{subItem.Name}}
</div> </div>
</td> </td>
<td> <td>
<div class="InpDIV" v-html="subItem.Content" v-if="childIndex!=subIndex" @click="changeEdit(subIndex)"> <div class="InpDIV" style="border:0;" v-html="subItem.Content">
</div> </div>
<UeEditor v-model="subItem.Content" :config="config" v-else></UeEditor>
</td> </td>
<td style="width:40px;text-align:center;"> <td style="width:40px;text-align:center;">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(item,subIndex)"></i>
</td> </td>
</tr> </tr>
</tbody> </tbody>
...@@ -237,14 +235,6 @@ ...@@ -237,14 +235,6 @@
this.setOption.Answer = answer; this.setOption.Answer = answer;
} }
}, },
ChangeItem(item, subItem) {
if (item && item.length > 0) {
item.forEach(childItem => {
childItem.IsAnswer = false;
})
}
subItem.IsAnswer = true;
},
//点击展开收起 //点击展开收起
showNav(index) { showNav(index) {
if (this.commonIndex2 == index) { if (this.commonIndex2 == index) {
...@@ -256,10 +246,6 @@ ...@@ -256,10 +246,6 @@
this.commonIndex2 = index; this.commonIndex2 = index;
} }
}, },
//点击切换输入
changeEdit(index) {
this.childIndex = index;
}
}, },
mounted() { mounted() {
......
...@@ -162,8 +162,8 @@ ...@@ -162,8 +162,8 @@
<sorting-problem v-if="questionObj.Key=='sorting-problem'" :questionData="AnswerList" :setOption="objOption" <sorting-problem v-if="questionObj.Key=='sorting-problem'" :questionData="AnswerList" :setOption="objOption"
@getChild="getChildData"></sorting-problem> @getChild="getChildData"></sorting-problem>
<!--完型填空--> <!--完型填空-->
<cloze v-if="questionObj.Key=='cloze'" :questionData="AnswerList" :setOption="objOption" <v-cloze v-if="questionObj.Key=='cloze'" :questionData="AnswerList" :setOption="objOption"
@getChild="getChildData"></cloze> @getChild="getChildData"></v-cloze>
<!--阅读理解、听力题--> <!--阅读理解、听力题-->
<reading-comprehensio v-if="questionObj.Key=='reading-comprehensio'||questionObj.Key=='listening'" <reading-comprehensio v-if="questionObj.Key=='reading-comprehensio'||questionObj.Key=='listening'"
:questionData="AnswerList" :setOption="objOption" @getChild="getChildData"></reading-comprehensio> :questionData="AnswerList" :setOption="objOption" @getChild="getChildData"></reading-comprehensio>
...@@ -181,41 +181,21 @@ ...@@ -181,41 +181,21 @@
<br /> <br />
<span class="difficulty_Degree">难度</span> <span class="difficulty_Degree">难度</span>
<span>{{objOption.DifficultyTypeStr}}</span> <span>{{objOption.DifficultyTypeStr}}</span>
<!-- <select v-model="objOption.DifficultyType" class="selectBox blue-border">
<template v-for="(cItem,cIndex) in questionDifficultyTypeList">
<option :key="cIndex" :label="cItem.Name" :value="cItem.Id">
</option>
</template>
</select> -->
</div> </div>
<div class="col-12"> <div class="col-12">
<br /> <br />
<span class="difficulty_Degree">所属大类</span> <span class="difficulty_Degree">所属大类</span>
<select v-model="objOption.Category" class="selectBox blue-border"> <span>{{objOption.CategoryName}}</span>
<template v-for="(cItem,cIndex) in questionCategoryList">
<option :key="cIndex" :label="cItem.Name" :value="cItem.Id">
</option>
</template>
</select>
</div> </div>
<div class="col-12"> <div class="col-12">
<br /> <br />
<span class="difficulty_Degree">考级程度</span> <span class="difficulty_Degree">考级程度</span>
<select v-model="objOption.LevelType" class="selectBox blue-border"> <span>{{objOption.LevelTypeName}}</span>
<template v-for="(cItem,cIndex) in questionLevalTypeList">
<option :key="cIndex" :label="cItem.Name" :value="cItem.Id">
</option>
</template>
</select>
</div> </div>
<div class="col-12" style="margin-top:16px;"> <div class="col-12" style="margin-top:16px;">
<span class="difficulty_Degree">知识点: </span> <span class="difficulty_Degree">知识点: </span>
<a class="addKnowledge" @click="isShowPoint=true">
<i class="iconfont icon-add" style="position:relative;top:1px;"></i>选择知识点
</a>
<span class="knowledge_List" v-for="(x, i) in choosePointArray" :key="i"> <span class="knowledge_List" v-for="(x, i) in choosePointArray" :key="i">
{{x.PointName}} {{x.PointName}}
<i class="iconfont icon-shanchu1" @click="removePointTag(i)"></i>
</span> </span>
</div> </div>
</div> </div>
...@@ -235,11 +215,8 @@ ...@@ -235,11 +215,8 @@
<script> <script>
import { import {
queryQuestionTypeList, queryQuestionTypeList,
queryDifficultyType,
saveQuestion, saveQuestion,
queryQuestionInfo, queryQuestionInfo
queryQuestionCategory,
queryQuestionLevelType
} from '../../api/question/question' } from '../../api/question/question'
import { import {
CreateQuestion, //生成问题 CreateQuestion, //生成问题
...@@ -256,7 +233,7 @@ ...@@ -256,7 +233,7 @@
import entryProblem from '../../components/questiontype/entry-problem' 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 vCloze from '../../components/questiontype/v-cloze'
import readingComprehensio from '../../components/questiontype/reading-comprehensio' import readingComprehensio from '../../components/questiontype/reading-comprehensio'
import sharingChoose from '../../components/questiontype/sharing-choose' import sharingChoose from '../../components/questiontype/sharing-choose'
export default { export default {
...@@ -271,7 +248,7 @@ ...@@ -271,7 +248,7 @@
entryProblem, //分录题 entryProblem, //分录题
matching, //连线题 matching, //连线题
sortingProblem, //排序题 sortingProblem, //排序题
cloze, //完型填空 vCloze, //完型填空
readingComprehensio, //阅读理解 readingComprehensio, //阅读理解
sharingChoose, //共用选择题 sharingChoose, //共用选择题
}, },
...@@ -312,17 +289,18 @@ ...@@ -312,17 +289,18 @@
IsMutex: 0, //填空题(答案顺序打乱也判正确) IsMutex: 0, //填空题(答案顺序打乱也判正确)
Category: 0, //大类 Category: 0, //大类
LevelType: 0, //考级程度 LevelType: 0, //考级程度
DifficultyTypeStr:'',
CategoryName:'',
LevelTypeName:'',
}, },
AnswerList: [], AnswerList: [],
optionTitle: "", optionTitle: "",
questionObj: {}, //题目类型对象 questionObj: {}, //题目类型对象
firstTypeList: [], //前5个数组 firstTypeList: [], //前5个数组
secondTypeList: [], //后面的题型 secondTypeList: [], //后面的题型
questionDifficultyTypeList: [], //问题难易程度列表
isShowPoint: false, //是否显示知识点弹窗 isShowPoint: false, //是否显示知识点弹窗
choosePointArray: [], //知识点列表 choosePointArray: [], //知识点列表
questionCategoryList: [], //问题大类
questionLevalTypeList: [],
} }
}, },
computed: { computed: {
...@@ -344,26 +322,11 @@ ...@@ -344,26 +322,11 @@
}, },
created() { created() {
this.getQuestionType(); this.getQuestionType();
this.getDifficultyType();
this.getQuestionCategory();
this.getQuestionLevelType();
}, },
mounted() { mounted() {
this.initObj() this.initObj()
}, },
methods: { methods: {
//获取问题大类
getQuestionCategory() {
queryQuestionCategory().then(res => {
this.questionCategoryList = res.Data;
})
},
//获取问题考级程度
getQuestionLevelType() {
queryQuestionLevelType().then(res => {
this.questionLevalTypeList = res.Data;
})
},
//移除知识点 //移除知识点
removePointTag(index) { removePointTag(index) {
this.choosePointArray.splice(index, 1); this.choosePointArray.splice(index, 1);
...@@ -412,14 +375,6 @@ ...@@ -412,14 +375,6 @@
} }
}); });
}, },
//获取问题难易程度列表
getDifficultyType() {
queryDifficultyType().then(res => {
if (res.Code == 1) {
this.questionDifficultyTypeList = res.Data;
}
});
},
//初始化表单 //初始化表单
initObj() { initObj() {
var qId = 0; var qId = 0;
...@@ -444,6 +399,10 @@ ...@@ -444,6 +399,10 @@
this.questionObj.QId = res.Data.QuestionTypeId; 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.DifficultyTypeStr = res.Data.DifficultyTypeStr;
this.objOption.CategoryName = res.Data.CategoryName;
this.objOption.LevelTypeName = res.Data.LevelTypeName;
if (res.Data.QuestionContentObj) { if (res.Data.QuestionContentObj) {
this.AnswerList = res.Data.QuestionContentObj; this.AnswerList = res.Data.QuestionContentObj;
this.objOption.QuestionContent = JSON.stringify(res.Data.QuestionContentObj); this.objOption.QuestionContent = JSON.stringify(res.Data.QuestionContentObj);
...@@ -454,7 +413,6 @@ ...@@ -454,7 +413,6 @@
this.choosePointArray = res.Data.QuestionPointList; this.choosePointArray = res.Data.QuestionPointList;
} }
}) })
this.optionTitle = "修改问题信息"
} }
}, },
//关闭弹窗 //关闭弹窗
......
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