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

页面修改

parent 0dd79b19
......@@ -145,6 +145,16 @@ export function queryQuestionCategory() {
})
}
/**
* 获取问题考级程度
*/
export function queryQuestionLevelType() {
return request({
url: '/Question/GetQuestionLevelType',
method: 'post',
})
}
/**
* 题目上移下移
*/
......
......@@ -199,6 +199,16 @@
</template>
</select>
</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;">
<span class="difficulty_Degree">知识点: </span>
<a class="addKnowledge" @click="isShowPoint=true">
......@@ -231,7 +241,8 @@
queryDifficultyType,
saveQuestion,
queryQuestionInfo,
queryQuestionCategory
queryQuestionCategory,
queryQuestionLevelType
} from '../../api/question/question'
import {
CreateQuestion, //生成问题
......@@ -273,11 +284,11 @@
default: null
},
CourseId: {
type: String,//课程编号
type: String, //课程编号
default: "0",
},
BankId: {
type: String,//题库编号
type: String, //题库编号
default: "0",
}
},
......@@ -291,7 +302,7 @@
objOption: {
QuestionId: 0, //问题编号
CourseId: 0, //课程编号
BankId:0,//题库编号
BankId: 0, //题库编号
Title: "", //问题名称
DifficultyType: 1, //难易程度
AnswerParse: "", //答案解析JSON
......@@ -303,6 +314,7 @@
Answer: "", //问题JSON
IsMutex: 0, //填空题(答案顺序打乱也判正确)
Category: 0, //大类
LevelType: 0, //考级程度
},
AnswerList: [],
optionTitle: "",
......@@ -314,6 +326,7 @@
isShowPoint: false, //是否显示知识点弹窗
choosePointArray: [], //知识点列表
questionCategoryList: [], //问题大类
questionLevalTypeList: [],
}
},
computed: {
......@@ -337,6 +350,7 @@
this.getQuestionType();
this.getDifficultyType();
this.getQuestionCategory();
this.getQuestionLevelType();
},
mounted() {
this.initObj()
......@@ -348,6 +362,12 @@
this.questionCategoryList = res.Data;
})
},
//获取问题考级程度
getQuestionLevelType() {
queryQuestionLevelType().then(res => {
this.questionLevalTypeList = res.Data;
})
},
//移除知识点
removePointTag(index) {
this.choosePointArray.splice(index, 1);
......@@ -407,7 +427,7 @@
//初始化表单
initObj() {
this.objOption.CourseId = this.CourseId;
this.objOption.BankId=this.BankId;
this.objOption.BankId = this.BankId;
if (this.setingObj && this.setingObj.QuestionId > 0) {
queryQuestionInfo({
QuestionId: this.setingObj.QuestionId
......@@ -426,6 +446,7 @@
this.questionObj.Key = res.Data.QuestionTypeKey;
this.questionObj.QId = res.Data.QuestionTypeId;
this.objOption.Category = res.Data.Category;
this.objOption.LevelType = res.Data.LevelType;
if (res.Data.QuestionContentObj) {
this.AnswerList = res.Data.QuestionContentObj;
this.objOption.QuestionContent = JSON.stringify(res.Data.QuestionContentObj);
......@@ -451,6 +472,7 @@
this.objOption.Answer = '';
this.objOption.IsMutex = 0;
this.objOption.Category = 0;
this.objOption.LevelType = 0;
}
},
//关闭弹窗
......
......@@ -10,7 +10,8 @@
white-space: nowrap;
width: 400px;
}
.QuestionisVisible{
.QuestionisVisible {
visibility: hidden;
}
......@@ -46,12 +47,14 @@
</div>
<div class="page-content">
<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">
<div class="col-2 q-table__title">问题列表</div>
<q-space />
<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="SetBatchLevelType" /> -->
<q-btn-dropdown color="accent" label="批量导入" size="sm" class="q-mr-md" style="margin-left:5px;">
<q-list>
<q-item clickable v-close-popup>
......@@ -84,10 +87,10 @@
@click="EditQuestion(props.row)" />
<q-btn flat size="xs" icon="edit" color="negative" style="font-weight:400" label="删除"
@click="setQuestionStatus(props.row)"></q-btn>
<q-btn flat size="xs" icon="iconfont icon-shangyi2" :class="{'QuestionisVisible':!props.row.isShowFirst}" 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="下移"
style="font-weight:400;" label="" @click="getUpStatus(props.row,2)"></q-btn>
<q-btn flat size="xs" icon="iconfont icon-shangyi2" :class="{'QuestionisVisible':!props.row.isShowFirst}"
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="下移" 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=""
@click="getCopyItem(props.row)"></q-btn>
</q-td>
......@@ -159,6 +162,12 @@
field: 'DifficultyTypeName',
align: 'left'
},
{
name: 'LevelTypeName',
label: '考级程度',
field: 'LevelTypeName',
align: 'left'
},
{
name: 'CreateByName',
label: '创建者',
......@@ -174,7 +183,8 @@
{
name: 'optioned',
label: '操作',
field: 'QuestionId'
field: 'QuestionId',
align: 'center'
}
],
data: [],
......@@ -199,6 +209,7 @@
importType: 0, //导入类型(1-模板导入;2-智能导入)
isShowImportUpload: false, //是否显示导入模板
questionCategoryList: [], //问题分类
selectedQuestion: [], //选中的数组
}
},
created() {
......@@ -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) {
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