Commit c301691d authored by zhengke's avatar zhengke

修改

parent 5fbd3981
......@@ -25,6 +25,7 @@
props: {
questionBankObj: {
type: Object,
default:null
}
},
components: {
......@@ -42,7 +43,6 @@
computed: {},
created() {},
mounted() {
},
methods: {
initQuestionBank() {
......
......@@ -30,7 +30,7 @@
<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" @click="isShowQuestionBankForm=true"
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" @click="EditQuestion(null)"
label="创建新题库" />
</div>
</template>
......@@ -56,7 +56,7 @@
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props" style="width:200px;">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" @click="EditQuestion(props.row)" label="编辑" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" @click="goQuestionList(props.row)"
label="管理题目" />
<q-btn flat size="xs" icon="edit" color="negative" style="font-weight:400" @click="deleteQuestionBank(props.row)" label="删除" />
......@@ -64,7 +64,7 @@
</q-td>
</template>
</q-table>
<questionbank-form v-if="isShowQuestionBankForm" @close="closeQuestionBank" @success="refreshQuestion">
<questionbank-form v-if="isShowQuestionBankForm" :questionBankObj="questionBankObj" @close="closeQuestionBank" @success="refreshQuestion">
</questionbank-form>
</div>
</div>
......@@ -93,6 +93,7 @@
},
loading: false,
isShowQuestionBankForm: false,
questionBankObj:null, //传入参数
columns: [{
name: 'BankId',
label: '序号',
......@@ -157,6 +158,15 @@
refreshQuestion() {
this.getQuestionBankPage();
},
//编辑题库
EditQuestion(obj){
if(obj){
this.questionBankObj = obj
}else{
this.questionBankObj = null
}
this.isShowQuestionBankForm=true
},
//删除问题
deleteQuestionBank(item) {
let delMsg = {
......@@ -186,7 +196,6 @@
}).onCancel(() => {
});
},
//跳转至questionlist
goQuestionList(item) {
......
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