Commit 123a834e authored by 黄奎's avatar 黄奎

页面修改

parent 0dd79b19
...@@ -145,6 +145,16 @@ export function queryQuestionCategory() { ...@@ -145,6 +145,16 @@ export function queryQuestionCategory() {
}) })
} }
/**
* 获取问题考级程度
*/
export function queryQuestionLevelType() {
return request({
url: '/Question/GetQuestionLevelType',
method: 'post',
})
}
/** /**
* 题目上移下移 * 题目上移下移
*/ */
......
...@@ -199,6 +199,16 @@ ...@@ -199,6 +199,16 @@
</template> </template>
</select> </select>
</div> </div>
<div class="col-12">
<br />
<span class="difficulty_Degree">考级程度</span>
<select v-model="objOption.LevelType" class="selectBox blue-border">
<template v-for="(cItem,cIndex) in questionLevalTypeList">
<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">
...@@ -231,7 +241,8 @@ ...@@ -231,7 +241,8 @@
queryDifficultyType, queryDifficultyType,
saveQuestion, saveQuestion,
queryQuestionInfo, queryQuestionInfo,
queryQuestionCategory queryQuestionCategory,
queryQuestionLevelType
} from '../../api/question/question' } from '../../api/question/question'
import { import {
CreateQuestion, //生成问题 CreateQuestion, //生成问题
...@@ -273,11 +284,11 @@ ...@@ -273,11 +284,11 @@
default: null default: null
}, },
CourseId: { CourseId: {
type: String,//课程编号 type: String, //课程编号
default: "0", default: "0",
}, },
BankId: { BankId: {
type: String,//题库编号 type: String, //题库编号
default: "0", default: "0",
} }
}, },
...@@ -291,7 +302,7 @@ ...@@ -291,7 +302,7 @@
objOption: { objOption: {
QuestionId: 0, //问题编号 QuestionId: 0, //问题编号
CourseId: 0, //课程编号 CourseId: 0, //课程编号
BankId:0,//题库编号 BankId: 0, //题库编号
Title: "", //问题名称 Title: "", //问题名称
DifficultyType: 1, //难易程度 DifficultyType: 1, //难易程度
AnswerParse: "", //答案解析JSON AnswerParse: "", //答案解析JSON
...@@ -303,6 +314,7 @@ ...@@ -303,6 +314,7 @@
Answer: "", //问题JSON Answer: "", //问题JSON
IsMutex: 0, //填空题(答案顺序打乱也判正确) IsMutex: 0, //填空题(答案顺序打乱也判正确)
Category: 0, //大类 Category: 0, //大类
LevelType: 0, //考级程度
}, },
AnswerList: [], AnswerList: [],
optionTitle: "", optionTitle: "",
...@@ -314,6 +326,7 @@ ...@@ -314,6 +326,7 @@
isShowPoint: false, //是否显示知识点弹窗 isShowPoint: false, //是否显示知识点弹窗
choosePointArray: [], //知识点列表 choosePointArray: [], //知识点列表
questionCategoryList: [], //问题大类 questionCategoryList: [], //问题大类
questionLevalTypeList: [],
} }
}, },
computed: { computed: {
...@@ -337,6 +350,7 @@ ...@@ -337,6 +350,7 @@
this.getQuestionType(); this.getQuestionType();
this.getDifficultyType(); this.getDifficultyType();
this.getQuestionCategory(); this.getQuestionCategory();
this.getQuestionLevelType();
}, },
mounted() { mounted() {
this.initObj() this.initObj()
...@@ -348,6 +362,12 @@ ...@@ -348,6 +362,12 @@
this.questionCategoryList = res.Data; 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);
...@@ -407,7 +427,7 @@ ...@@ -407,7 +427,7 @@
//初始化表单 //初始化表单
initObj() { initObj() {
this.objOption.CourseId = this.CourseId; this.objOption.CourseId = this.CourseId;
this.objOption.BankId=this.BankId; this.objOption.BankId = this.BankId;
if (this.setingObj && this.setingObj.QuestionId > 0) { if (this.setingObj && this.setingObj.QuestionId > 0) {
queryQuestionInfo({ queryQuestionInfo({
QuestionId: this.setingObj.QuestionId QuestionId: this.setingObj.QuestionId
...@@ -426,6 +446,7 @@ ...@@ -426,6 +446,7 @@
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;
this.objOption.LevelType = res.Data.LevelType;
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);
...@@ -451,6 +472,7 @@ ...@@ -451,6 +472,7 @@
this.objOption.Answer = ''; this.objOption.Answer = '';
this.objOption.IsMutex = 0; this.objOption.IsMutex = 0;
this.objOption.Category = 0; this.objOption.Category = 0;
this.objOption.LevelType = 0;
} }
}, },
//关闭弹窗 //关闭弹窗
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
white-space: nowrap; white-space: nowrap;
width: 400px; width: 400px;
} }
.QuestionisVisible{
.QuestionisVisible {
visibility: hidden; visibility: hidden;
} }
...@@ -46,12 +47,14 @@ ...@@ -46,12 +47,14 @@
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
separator="none" :data="data" :columns="columns" row-key="name"> separator="none" :data="data" :columns="columns" row-key="QuestionId" selection="multiple"
:selected.sync="selectedQuestion">
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">问题列表</div> <div class="col-2 q-table__title">问题列表</div>
<q-space /> <q-space />
<div class="page-option"> <div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增题目" @click="EditQuestion(null)" /> <q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增题目" @click="EditQuestion(null)" />
<!-- <q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="批量设置考级程度" @click="SetBatchLevelType" /> -->
<q-btn-dropdown color="accent" label="批量导入" size="sm" class="q-mr-md" style="margin-left:5px;"> <q-btn-dropdown color="accent" label="批量导入" size="sm" class="q-mr-md" style="margin-left:5px;">
<q-list> <q-list>
<q-item clickable v-close-popup> <q-item clickable v-close-popup>
...@@ -84,10 +87,10 @@ ...@@ -84,10 +87,10 @@
@click="EditQuestion(props.row)" /> @click="EditQuestion(props.row)" />
<q-btn flat size="xs" icon="edit" color="negative" style="font-weight:400" label="删除" <q-btn flat size="xs" icon="edit" color="negative" style="font-weight:400" label="删除"
@click="setQuestionStatus(props.row)"></q-btn> @click="setQuestionStatus(props.row)"></q-btn>
<q-btn flat size="xs" icon="iconfont icon-shangyi2" :class="{'QuestionisVisible':!props.row.isShowFirst}" color="accent" title="上移" <q-btn flat size="xs" icon="iconfont icon-shangyi2" :class="{'QuestionisVisible':!props.row.isShowFirst}"
style="font-weight:400;" label="" @click="getUpStatus(props.row,1)"></q-btn> color="accent" title="上移" style="font-weight:400;" label="" @click="getUpStatus(props.row,1)"></q-btn>
<q-btn flat size="xs" icon="iconfont icon-xiayi" :class="{'QuestionisVisible':!props.row.isShowLast}" color="accent" title="下移" <q-btn flat size="xs" icon="iconfont icon-xiayi" :class="{'QuestionisVisible':!props.row.isShowLast}"
style="font-weight:400;" label="" @click="getUpStatus(props.row,2)"></q-btn> color="accent" title="下移" style="font-weight:400;" label="" @click="getUpStatus(props.row,2)"></q-btn>
<q-btn flat size="xs" icon="iconfont icon-fuzhi" color="accent" style="font-weight:400;" label="" <q-btn flat size="xs" icon="iconfont icon-fuzhi" color="accent" style="font-weight:400;" label=""
@click="getCopyItem(props.row)"></q-btn> @click="getCopyItem(props.row)"></q-btn>
</q-td> </q-td>
...@@ -159,6 +162,12 @@ ...@@ -159,6 +162,12 @@
field: 'DifficultyTypeName', field: 'DifficultyTypeName',
align: 'left' align: 'left'
}, },
{
name: 'LevelTypeName',
label: '考级程度',
field: 'LevelTypeName',
align: 'left'
},
{ {
name: 'CreateByName', name: 'CreateByName',
label: '创建者', label: '创建者',
...@@ -174,7 +183,8 @@ ...@@ -174,7 +183,8 @@
{ {
name: 'optioned', name: 'optioned',
label: '操作', label: '操作',
field: 'QuestionId' field: 'QuestionId',
align: 'center'
} }
], ],
data: [], data: [],
...@@ -199,6 +209,7 @@ ...@@ -199,6 +209,7 @@
importType: 0, //导入类型(1-模板导入;2-智能导入) importType: 0, //导入类型(1-模板导入;2-智能导入)
isShowImportUpload: false, //是否显示导入模板 isShowImportUpload: false, //是否显示导入模板
questionCategoryList: [], //问题分类 questionCategoryList: [], //问题分类
selectedQuestion: [], //选中的数组
} }
}, },
created() { created() {
...@@ -248,6 +259,21 @@ ...@@ -248,6 +259,21 @@
} }
}); });
}, },
//批量设置考级程度
SetBatchLevelType() {
console.log("selectedQuestion", this.selectedQuestion);
if (this.selectedQuestion && this.selectedQuestion.length > 0) {
} else {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: "请选择问题",
position: 'top'
})
}
},
//删除问题 //删除问题
setQuestionStatus(item) { setQuestionStatus(item) {
this.$q.dialog({ this.$q.dialog({
......
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