From 68b8ed3b4b7ddbb5fe113c1d7df3aa909dc66fb6 Mon Sep 17 00:00:00 2001 From: 龚焕茏 <2842157468@qq.com> Date: 星期三, 03 七月 2024 18:37:29 +0800 Subject: [PATCH] feat:新增随机时间题目配置 --- src/views/exam/question/list.vue | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/views/exam/question/list.vue b/src/views/exam/question/list.vue index c333b0b..bc0b9bb 100644 --- a/src/views/exam/question/list.vue +++ b/src/views/exam/question/list.vue @@ -39,7 +39,7 @@ </el-select> </el-form-item> <el-form-item> - <el-button type="primary" @click="exportQuestion">瀵煎嚭</el-button> + <el-button type="primary" @click="exportQuestion" v-loading="exportLoading">瀵煎嚭</el-button> </el-form-item> </el-form> <el-button slot="reference" class="op-item" type="success">瀵煎嚭</el-button> @@ -54,7 +54,7 @@ :show-file-list="false" :file-list="fileList" :before-upload="beforeAvatarUpload"> - <el-button type="primary">瀵煎叆</el-button> + <el-button v-loading="importLoading" type="primary">瀵煎叆</el-button> <!-- <div slot="tip" class="el-upload__tip">鍙兘涓婁紶Excel鏂囦欢</div>--> </el-upload> </div> @@ -96,6 +96,8 @@ components: { Pagination, QuestionShow }, data () { return { + importLoading: false, + exportLoading: false, subjectIdList: [], timeRange: [], exportForm: { @@ -134,8 +136,10 @@ methods: { // 瀵煎嚭棰樼洰 exportQuestion () { + this.exportLoading = true questionApi.exportQuestion(this.exportForm).then(res => { downloadExcel(res, '棰樼洰瀵煎嚭') + this.exportLoading = false }) }, // 涓嬭浇瀵煎叆妯℃澘 @@ -145,7 +149,7 @@ }) }, handlePreview (e) { - console.log(e) + this.importLoading = false if (e.code === 1) { this.search() this.$message.success(e.message) @@ -154,6 +158,7 @@ } }, beforeAvatarUpload (file) { + this.importLoading = true let legalName = ['xlsx', 'xls'] // 鎷垮埌鍚庣紑鍚� let name = file.name.substring(file.name.lastIndexOf('.') + 1, file.name.length) -- Gitblit v1.8.0