Commit 4850d28a authored by zhengke's avatar zhengke

修改

parent 53cdc553
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-header-column-table" style="max-height: 550px" separator="none" :data="dataList" :columns="columns" class="sticky-column-table sticky-header-column-table" style="max-height: 440px" separator="none" :data="dataList" :columns="columns"
row-key="BankId" selection="multiple" :selected.sync="selectedQuestionBank"> row-key="BankId" selection="multiple" :selected.sync="selectedQuestionBank">
<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>
...@@ -47,6 +47,12 @@ ...@@ -47,6 +47,12 @@
queryQuestionBankPage, queryQuestionBankPage,
} from '../../api/question/question'; } from '../../api/question/question';
export default { export default {
props: {
CheckedArray: {
type: Array,
default: null
},
},
data() { data() {
return { return {
persistent: true, persistent: true,
...@@ -83,6 +89,9 @@ ...@@ -83,6 +89,9 @@
} }
}, },
mounted() { mounted() {
if(this.CheckedArray&&this.CheckedArray.length>0){
this.selectedQuestionBank = this.CheckedArray;
}
this.getQuestionBankPage(); this.getQuestionBankPage();
}, },
methods: { methods: {
...@@ -115,10 +124,7 @@ ...@@ -115,10 +124,7 @@
var tempArray = []; var tempArray = [];
if (this.selectedQuestionBank && this.selectedQuestionBank.length > 0) { if (this.selectedQuestionBank && this.selectedQuestionBank.length > 0) {
this.selectedQuestionBank.forEach(item => { this.selectedQuestionBank.forEach(item => {
tempArray.push({ tempArray.push(item);
BankId: item.BankId,
BankName: item.BankName,
})
}) })
} }
this.$emit('success', tempArray); this.$emit('success', tempArray);
......
This diff is collapsed.
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