From 569c206b7352dfa9b521d8226eb3cd10325e13ab Mon Sep 17 00:00:00 2001 From: qirong <2032486488@qq.com> Date: 星期三, 28 二月 2024 10:09:03 +0800 Subject: [PATCH] 修改 --- vue.config.js | 2 +- src/views/exam/personalRandomTemplate/list.vue | 19 ++++++++++++++++++- admin.zip | 0 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/admin.zip b/admin.zip index a4e5565..600f4ed 100644 --- a/admin.zip +++ b/admin.zip Binary files differ diff --git a/src/views/exam/personalRandomTemplate/list.vue b/src/views/exam/personalRandomTemplate/list.vue index b44db15..7b30d25 100644 --- a/src/views/exam/personalRandomTemplate/list.vue +++ b/src/views/exam/personalRandomTemplate/list.vue @@ -31,6 +31,8 @@ <template slot-scope="{row}"> <el-button size="mini" @click="$router.push({path:'/exam/personalRandomTemplate/edit',query:{id:row.id}})" >缂栬緫</el-button> <el-button size="mini" type="danger" @click="deletePaper(row)" class="link-left">鍒犻櫎</el-button> + <el-button size="mini" type="danger" @click="handleExport(row)" class="link-left">瀵煎嚭</el-button> + <el-button size="mini" type="danger" @click="handleExport1(row)" class="link-left">瀵煎嚭1</el-button> </template> </el-table-column> </el-table> @@ -70,7 +72,7 @@ methods: { handleExport(row){ let fileName = row.name +'.xls' - let url ='/api/admin/exam/count/exportTemplatesId/'+row.id + let url ='/api/admin/exam/count/exportRandownTemplatesId/'+row.id var x = new XMLHttpRequest(); x.open("GET", url, true); x.responseType = "blob"; @@ -103,6 +105,21 @@ // }) }, + handleExport1(row){ + let fileName = row.name +'.xls' + let url ='/api/admin/exam/count/timeOne' + var x = new XMLHttpRequest(); + x.open("GET", url, true); + x.responseType = "blob"; + x.onload = function () { + var url = window.URL.createObjectURL(x.response); + var a = document.createElement("a"); + a.href = url; + a.download = fileName; + a.click(); + }; + x.send(); + }, submitForm () { this.queryParam.pageIndex = 1 this.search() diff --git a/vue.config.js b/vue.config.js index a9437ad..2e10ff2 100644 --- a/vue.config.js +++ b/vue.config.js @@ -19,7 +19,7 @@ hotOnly: false, proxy: { '/api': { - target: 'http://192.168.3.64:8000', + target: 'http://80.36.32.171:8085', changeOrigin: true } } -- Gitblit v1.8.0