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

页面修改

parent ef614c72
......@@ -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 @@
<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 || '请输入题库名称']" />
<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-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeQuestionForm" />
......@@ -23,6 +27,7 @@
import {
getQuestionBankInfo, //获取题库详情
SetQuestionBank, //保存图库
queryBankTypeList
} from '../../api/question/question'
export default {
props: {
......@@ -40,16 +45,28 @@
BankId: 0,
BankNo: "", //题库序号
BankName: '', //题库名称
BankType: "", //题库类型
},
BankTypeList: [], //题库等级列表
persistent: true
}
},
computed: {},
created() {},
created() {
this.getBankTypeList();
},
mounted() {
this.initQuestionBank();
},
methods: {
//获取题库等级列表
getBankTypeList() {
queryBankTypeList({}).then(res => {
if (res.Code == 1) {
this.BankTypeList = res.Data;
}
})
},
initQuestionBank() {
if (this.questionBankObj && this.questionBankObj.BankId > 0) {
getQuestionBankInfo({
......@@ -59,12 +76,14 @@
this.msg.BankId = res.Data.BankId;
this.msg.BankNo = res.Data.BankNo;
this.msg.BankName = res.Data.BankName;
this.msg.BankType=res.Data.BankType;
}
})
} else {
this.msg.BankId = 0;
this.msg.BankNo = "";
this.msg.BankName = "";
this.msg.BankType="";
}
},
//创建
......@@ -86,5 +105,4 @@
}
},
}
</script>
</script>
\ No newline at end of file
......@@ -11,7 +11,6 @@
width: 400px;
}
</style>
<template>
<div class="page-body">
......@@ -114,6 +113,12 @@
field: 'BankName',
align: 'left',
},
{
name: 'BankTypeName',
label: '等级',
field: 'BankTypeName',
align: 'left',
},
{
name: 'CreateByName',
label: '创建人',
......@@ -154,9 +159,9 @@
},
//获取题库分页列表
getQuestionBankPage() {
this.loading=true;
this.loading = true;
queryQuestionBankPage(this.msg).then(res => {
this.loading=false;
this.loading = false;
if (res.Code == 1) {
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
......@@ -215,9 +220,7 @@
}
}
}
</script>
<style lang="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