Commit 6eee41f0 authored by 黄奎's avatar 黄奎

页面修改

parent 2800ff3d
...@@ -134,3 +134,13 @@ export function saveQuestionBeatch(data) { ...@@ -134,3 +134,13 @@ export function saveQuestionBeatch(data) {
data data
}) })
} }
/**
* 获取问题大类
*/
export function queryQuestionCategory() {
return request({
url: '/Question/GetQuestionCategory',
method: 'post',
})
}
...@@ -189,6 +189,16 @@ ...@@ -189,6 +189,16 @@
</template> </template>
</select> </select>
</div> </div>
<div class="col-12">
<br />
<span class="difficulty_Degree">所属大类</span>
<select v-model="objOption.Category" class="selectBox blue-border">
<template v-for="(cItem,cIndex) in questionCategoryList">
<option :key="cIndex" :label="cItem.Name" :value="cItem.Id">
</option>
</template>
</select>
</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"> <a class="addKnowledge" @click="isShowPoint=true">
...@@ -220,7 +230,8 @@ ...@@ -220,7 +230,8 @@
queryQuestionTypeList, queryQuestionTypeList,
queryDifficultyType, queryDifficultyType,
saveQuestion, saveQuestion,
queryQuestionInfo queryQuestionInfo,
queryQuestionCategory
} from '../../api/question/question' } from '../../api/question/question'
import { import {
CreateQuestion, //生成问题 CreateQuestion, //生成问题
...@@ -286,7 +297,7 @@ ...@@ -286,7 +297,7 @@
SortNum: 0, //排序 SortNum: 0, //排序
Answer: "", //问题JSON Answer: "", //问题JSON
IsMutex: 0, //填空题(答案顺序打乱也判正确) IsMutex: 0, //填空题(答案顺序打乱也判正确)
Category:0,//大类 Category: 0, //大类
}, },
AnswerList: [], AnswerList: [],
optionTitle: "", optionTitle: "",
...@@ -297,6 +308,7 @@ ...@@ -297,6 +308,7 @@
saveCourseLoading: false, saveCourseLoading: false,
isShowPoint: false, //是否显示知识点弹窗 isShowPoint: false, //是否显示知识点弹窗
choosePointArray: [], //知识点列表 choosePointArray: [], //知识点列表
questionCategoryList: [], //问题大类
} }
}, },
computed: { computed: {
...@@ -319,11 +331,18 @@ ...@@ -319,11 +331,18 @@
created() { created() {
this.getQuestionType(); this.getQuestionType();
this.getDifficultyType(); this.getDifficultyType();
this.getQuestionCategory();
}, },
mounted() { mounted() {
this.initObj() this.initObj()
}, },
methods: { methods: {
//获取问题大类
getQuestionCategory() {
queryQuestionCategory().then(res => {
this.questionCategoryList = res.Data;
})
},
//移除知识点 //移除知识点
removePointTag(index) { removePointTag(index) {
this.choosePointArray.splice(index, 1); this.choosePointArray.splice(index, 1);
...@@ -400,7 +419,7 @@ ...@@ -400,7 +419,7 @@
this.objOption.IsMutex = res.Data.IsMutex; this.objOption.IsMutex = res.Data.IsMutex;
this.questionObj.Key = res.Data.QuestionTypeKey; this.questionObj.Key = res.Data.QuestionTypeKey;
this.questionObj.QId = res.Data.QuestionTypeId; this.questionObj.QId = res.Data.QuestionTypeId;
this.objOption.Category=res.Data.Category; this.objOption.Category = res.Data.Category;
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);
...@@ -425,7 +444,7 @@ ...@@ -425,7 +444,7 @@
this.objOption.SortNum = 0; this.objOption.SortNum = 0;
this.objOption.Answer = ''; this.objOption.Answer = '';
this.objOption.IsMutex = 0; this.objOption.IsMutex = 0;
this.objOption.Category=0; this.objOption.Category = 0;
} }
}, },
//关闭弹窗 //关闭弹窗
......
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