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

页面修改

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