From 1cfd2dea036eeab43b1d4b6db60bc79d957b8111 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 05 Aug 2021 14:15:32 +0800
Subject: [PATCH] 考试题目修改
---
src/views/exam/subject.vue | 51 ++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 46 insertions(+), 5 deletions(-)
diff --git a/src/views/exam/subject.vue b/src/views/exam/subject.vue
index b48a3c7..2808746 100644
--- a/src/views/exam/subject.vue
+++ b/src/views/exam/subject.vue
@@ -34,6 +34,14 @@
icon="el-icon-plus"
@click="questionBankHandleAdd">新 增
</el-button>
+ <!-- <el-button
+ type="success"
+ size="small"
+ plain
+ icon="el-icon-upload2"
+ @click="handleImport"
+ >导入
+ </el-button> -->
<el-button type="danger"
size="small"
icon="el-icon-delete"
@@ -41,7 +49,39 @@
</el-button>
</template>
+ <template slot-scope="{row}" slot="menu">
+ <el-button type="text"
+ size="mini"
+ icon="el-icon-edit"
+ @click="questionBankHandleAdd(row)">编辑
+ </el-button>
+ <el-button type="text"
+ size="mini"
+ icon="el-icon-delete"
+ @click="questionBankHandleDel(row)">删除
+ </el-button>
+ </template>
+
</avue-crud>
+
+ <el-dialog
+ title="题目导入"
+ append-to-body
+ :visible.sync="excelBox"
+ width="555px"
+ >
+ <avue-form
+ :option="excelOption"
+ v-model="excelForm"
+ :upload-after="uploadAfter"
+ >
+ <template slot="excelTemplate">
+ <el-button type="primary" @click="handleTemplate">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
</div>
@@ -68,7 +108,7 @@
return {
questionBankOption: {
// 操作栏多余按钮去除
- delBtn: true,
+ delBtn: false,
editBtn: false,
@@ -116,6 +156,9 @@
}, {
label: '判断题',
value: 2,
+ }, {
+ label: '实操题',
+ value: 3,
}],
slot: true,
width: 96,
@@ -190,8 +233,8 @@
},
},
methods: {
- questionBankHandleAdd(){
- this.$refs.addsubject.inits();
+ questionBankHandleAdd(row){
+ this.$refs.addsubject.inits(row.id);
},
questionBankOnLoad (page, params = {}) {
this.questionBankLoading = false;
@@ -268,8 +311,6 @@
this.$refs.questionBankCrud.toggleSelection();
});
},
-
-
}
}
</script>
--
Gitblit v1.9.3