Commit 2ba98eae authored by 黄奎's avatar 黄奎

页面修改

parent ef614c72
...@@ -204,6 +204,17 @@ export function getQuestionBankInfo(data) { ...@@ -204,6 +204,17 @@ export function getQuestionBankInfo(data) {
}) })
} }
/**
* 获取题库等级列表
* @param {*} data
*/
export function queryBankTypeList(data) {
return request({
url: '/Question/GetBankTypeList',
method: 'post',
data
})
}
/** /**
* 新增修改题库 * 新增修改题库
......
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
<q-input filled stack-label :dense="false" class="col-6 q-pb-lg" ref="BankName" v-model="msg.BankName" <q-input filled stack-label :dense="false" class="col-6 q-pb-lg" ref="BankName" v-model="msg.BankName"
label="请输入题库名称" maxlength="20" :rules="[val => !!val || '请输入题库名称']" /> label="请输入题库名称" maxlength="20" :rules="[val => !!val || '请输入题库名称']" />
<q-select stack-label color="primary" filled clearable label="等级" option-value="Id" option-label="Name"
:options="BankTypeList" v-model="msg.BankType" ref="ActivityType" emit-value map-options
:rules="[val => !!val || '请选择题库等级']" />
</q-card-section> </q-card-section>
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeQuestionForm" /> <q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeQuestionForm" />
...@@ -23,6 +27,7 @@ ...@@ -23,6 +27,7 @@
import { import {
getQuestionBankInfo, //获取题库详情 getQuestionBankInfo, //获取题库详情
SetQuestionBank, //保存图库 SetQuestionBank, //保存图库
queryBankTypeList
} from '../../api/question/question' } from '../../api/question/question'
export default { export default {
props: { props: {
...@@ -40,16 +45,28 @@ ...@@ -40,16 +45,28 @@
BankId: 0, BankId: 0,
BankNo: "", //题库序号 BankNo: "", //题库序号
BankName: '', //题库名称 BankName: '', //题库名称
BankType: "", //题库类型
}, },
BankTypeList: [], //题库等级列表
persistent: true persistent: true
} }
}, },
computed: {}, computed: {},
created() {}, created() {
this.getBankTypeList();
},
mounted() { mounted() {
this.initQuestionBank(); this.initQuestionBank();
}, },
methods: { methods: {
//获取题库等级列表
getBankTypeList() {
queryBankTypeList({}).then(res => {
if (res.Code == 1) {
this.BankTypeList = res.Data;
}
})
},
initQuestionBank() { initQuestionBank() {
if (this.questionBankObj && this.questionBankObj.BankId > 0) { if (this.questionBankObj && this.questionBankObj.BankId > 0) {
getQuestionBankInfo({ getQuestionBankInfo({
...@@ -59,12 +76,14 @@ ...@@ -59,12 +76,14 @@
this.msg.BankId = res.Data.BankId; this.msg.BankId = res.Data.BankId;
this.msg.BankNo = res.Data.BankNo; this.msg.BankNo = res.Data.BankNo;
this.msg.BankName = res.Data.BankName; this.msg.BankName = res.Data.BankName;
this.msg.BankType=res.Data.BankType;
} }
}) })
} else { } else {
this.msg.BankId = 0; this.msg.BankId = 0;
this.msg.BankNo = ""; this.msg.BankNo = "";
this.msg.BankName = ""; this.msg.BankName = "";
this.msg.BankType="";
} }
}, },
//创建 //创建
...@@ -86,5 +105,4 @@ ...@@ -86,5 +105,4 @@
} }
}, },
} }
</script>
</script> \ No newline at end of file
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
width: 400px; width: 400px;
} }
</style> </style>
<template> <template>
<div class="page-body"> <div class="page-body">
...@@ -114,6 +113,12 @@ ...@@ -114,6 +113,12 @@
field: 'BankName', field: 'BankName',
align: 'left', align: 'left',
}, },
{
name: 'BankTypeName',
label: '等级',
field: 'BankTypeName',
align: 'left',
},
{ {
name: 'CreateByName', name: 'CreateByName',
label: '创建人', label: '创建人',
...@@ -154,9 +159,9 @@ ...@@ -154,9 +159,9 @@
}, },
//获取题库分页列表 //获取题库分页列表
getQuestionBankPage() { getQuestionBankPage() {
this.loading=true; this.loading = true;
queryQuestionBankPage(this.msg).then(res => { queryQuestionBankPage(this.msg).then(res => {
this.loading=false; this.loading = false;
if (res.Code == 1) { if (res.Code == 1) {
this.data = res.Data.PageData; this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount; this.pageCount = res.Data.PageCount;
...@@ -215,9 +220,7 @@ ...@@ -215,9 +220,7 @@
} }
} }
} }
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style>
</style> \ No newline at end of file
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