Commit eac05aab authored by 黄奎's avatar 黄奎

页面修改

parent db9aea5b
...@@ -52,12 +52,20 @@ ...@@ -52,12 +52,20 @@
<template> <template>
<span>{{subIndex+1}}小题 {{subItem.SubTitle}}</span><br /> <span>{{subIndex+1}}小题 {{subItem.SubTitle}}</span><br />
</template> </template>
<template v-if=" subItem.QuestionKey=='single'||subItem.QuestionKey=='multiple'|| subItem.QuestionKey=='single-number'" <template
v-if=" subItem.QuestionKey=='single'||subItem.QuestionKey=='multiple'|| subItem.QuestionKey=='single-number'"
v-for="childItem in subItem.SubAnwser"> v-for="childItem in subItem.SubAnwser">
<span>{{childItem.Name}}.{{childItem.Content}} </span><br /> <template v-if="childItem.Content.indexOf('<img')>0">
<span>{{childItem.Name}}.<b v-html="childItem.Content"></b></span>
</template>
<template v-else>
<span> {{childItem.Name}}. {{childItem.Content}}</span>
</template>
<br />
</template> </template>
</span> </span>
<template v-if="subItem.QuestionKey=='single'||subItem.QuestionKey=='multiple'|| subItem.QuestionKey=='single-number'"> <template
v-if="subItem.QuestionKey=='single'||subItem.QuestionKey=='multiple'|| subItem.QuestionKey=='single-number'">
<template v-for="childItem in subItem.SubAnwser"> <template v-for="childItem in subItem.SubAnwser">
<span v-if="childItem.IsAnswer">答案:{{childItem.Name}} </span> <span v-if="childItem.IsAnswer">答案:{{childItem.Name}} </span>
<br v-if="childItem.IsAnswer" /> <br v-if="childItem.IsAnswer" />
...@@ -190,9 +198,8 @@ ...@@ -190,9 +198,8 @@
}, },
}, },
created() { created() {
if(!this.CourseId) if (!this.CourseId) {
{ this.CourseId = 0;
this.CourseId=0;
} }
}, },
mounted() { mounted() {
......
...@@ -21,6 +21,11 @@ ...@@ -21,6 +21,11 @@
<q-input @change="research" clearable standout="bg-primary text-white" v-model="msg.Title" label="关键字" <q-input @change="research" clearable standout="bg-primary text-white" v-model="msg.Title" label="关键字"
@clear="research" maxlength="20" /> @clear="research" maxlength="20" />
</div> </div>
<div class="col-3">
<q-select @input="research" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="msg.QCategoryId" :options="questionCategoryList" emit-value map-options label="分类" multiple
clearable />
</div>
<div class="col-3"> <div class="col-3">
<q-select @input="research" standout="bg-primary text-white" option-value="QId" option-label="Name" <q-select @input="research" standout="bg-primary text-white" option-value="QId" option-label="Name"
v-model="msg.QuestionTypeId" :options="questionTypeList" emit-value map-options label="题型" multiple v-model="msg.QuestionTypeId" :options="questionTypeList" emit-value map-options label="题型" multiple
...@@ -92,7 +97,8 @@ ...@@ -92,7 +97,8 @@
queryQuestionPageList, queryQuestionPageList,
queryQuestionTypeList, queryQuestionTypeList,
deleteQuestion, deleteQuestion,
queryDifficultyType queryDifficultyType,
queryQuestionCategory
} from '../../api/question/question'; } from '../../api/question/question';
import questionForm from '../../components/question/question-form'; import questionForm from '../../components/question/question-form';
import questionUpload from '../../components/question/question-upload'; import questionUpload from '../../components/question/question-upload';
...@@ -159,6 +165,7 @@ ...@@ -159,6 +165,7 @@
PointName: "", //知识点 PointName: "", //知识点
QuestionTypeId: [], //题型 QuestionTypeId: [], //题型
DifficultyType: [], //难易程度 DifficultyType: [], //难易程度
QCategoryId: [], //分类
}, },
pageCount: 0, pageCount: 0,
questionTypeList: [], //问题类型列表 questionTypeList: [], //问题类型列表
...@@ -167,6 +174,7 @@ ...@@ -167,6 +174,7 @@
questionObj: null, questionObj: null,
importType: 0, //导入类型(1-模板导入;2-智能导入) importType: 0, //导入类型(1-模板导入;2-智能导入)
isShowImportUpload: false, //是否显示导入模板 isShowImportUpload: false, //是否显示导入模板
questionCategoryList: []
} }
}, },
created() { created() {
...@@ -175,11 +183,18 @@ ...@@ -175,11 +183,18 @@
} }
this.getQuestionType(); this.getQuestionType();
this.getDifficultyType(); this.getDifficultyType();
this.getQuestionCategory();
}, },
mounted() { mounted() {
this.getQuestionList(); this.getQuestionList();
}, },
methods: { methods: {
//获取问题大类
getQuestionCategory() {
queryQuestionCategory().then(res => {
this.questionCategoryList = res.Data;
})
},
research() { research() {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.getQuestionList(); this.getQuestionList();
......
...@@ -20,6 +20,11 @@ ...@@ -20,6 +20,11 @@
<div class="col-3"> <div class="col-3">
<q-input @change="research" clearable standout="bg-primary text-white" v-model="msg.Title" label="关键字" <q-input @change="research" clearable standout="bg-primary text-white" v-model="msg.Title" label="关键字"
@clear="research" maxlength="20" /> @clear="research" maxlength="20" />
</div>
<div class="col-3">
<q-select @input="research" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="msg.QCategoryId" :options="questionCategoryList" emit-value map-options label="分类" multiple
clearable />
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select @input="research" standout="bg-primary text-white" option-value="QId" option-label="Name" <q-select @input="research" standout="bg-primary text-white" option-value="QId" option-label="Name"
...@@ -92,7 +97,8 @@ ...@@ -92,7 +97,8 @@
queryQuestionPageList, queryQuestionPageList,
queryQuestionTypeList, queryQuestionTypeList,
deleteQuestion, deleteQuestion,
queryDifficultyType queryDifficultyType,
queryQuestionCategory
} from '../../api/question/question'; } from '../../api/question/question';
import questionForm from '../../components/question/question-form'; import questionForm from '../../components/question/question-form';
import questionUpload from '../../components/question/question-upload'; import questionUpload from '../../components/question/question-upload';
...@@ -159,6 +165,7 @@ ...@@ -159,6 +165,7 @@
PointName: "", //知识点 PointName: "", //知识点
QuestionTypeId: [], //题型 QuestionTypeId: [], //题型
DifficultyType: [], //难易程度 DifficultyType: [], //难易程度
QCategoryId:[],//分类
}, },
pageCount: 0, pageCount: 0,
questionTypeList: [], //问题类型列表 questionTypeList: [], //问题类型列表
...@@ -167,6 +174,7 @@ ...@@ -167,6 +174,7 @@
questionObj: null, questionObj: null,
importType: 0, //导入类型(1-模板导入;2-智能导入) importType: 0, //导入类型(1-模板导入;2-智能导入)
isShowImportUpload: false, //是否显示导入模板 isShowImportUpload: false, //是否显示导入模板
questionCategoryList: [], //问题分类
} }
}, },
created() { created() {
...@@ -175,11 +183,18 @@ ...@@ -175,11 +183,18 @@
} }
this.getQuestionType(); this.getQuestionType();
this.getDifficultyType(); this.getDifficultyType();
this.getQuestionCategory();
}, },
mounted() { mounted() {
this.getQuestionList(); this.getQuestionList();
}, },
methods: { methods: {
//获取问题大类
getQuestionCategory() {
queryQuestionCategory().then(res => {
this.questionCategoryList = res.Data;
})
},
research() { research() {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.getQuestionList(); this.getQuestionList();
......
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