From e13f523d73031800a215b38dd8fe2eebd560b91e Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Mon, 1 Apr 2024 15:39:31 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B5=9B=E4=BA=8B=E4=BA=BA=E5=91=98=E7=9B=B8?=
=?UTF-8?q?=E5=85=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/utils/api.js | 1 +
src/views/match/manage/matchInfo.vue | 6 ++---
src/views/match/manage/matchSignup.vue | 33 +++++++++++++++-----------
3 files changed, 23 insertions(+), 17 deletions(-)
diff --git a/src/utils/api.js b/src/utils/api.js
index 01bff75..2b85723 100644
--- a/src/utils/api.js
+++ b/src/utils/api.js
@@ -324,6 +324,7 @@ export default {
entryInformation: `competition/competition/team/entryInformation`,
getRedisCacheCompetition: `competition/competition/management/getRedisCache`,
copyCompetition: `competition/competition/management/copyCompetition`,
+ checkCustomerBySchool: `competition/competition/team/checkCustomerBySchool`,
// 赛事内容
addCompetitionContent: `competition/competition/content/addCompetitionContent`,
diff --git a/src/views/match/manage/matchInfo.vue b/src/views/match/manage/matchInfo.vue
index 70beaca..b22a26b 100644
--- a/src/views/match/manage/matchInfo.vue
+++ b/src/views/match/manage/matchInfo.vue
@@ -66,8 +66,7 @@
指导老师: |
-
+
@@ -91,7 +90,7 @@
clearable
size="mini"
:disabled="!item.edit">
-
+
@@ -493,6 +492,7 @@ export default {
teamId: this.info.teamId,
phone: row.phone,
position: row.position,
+ accountId: this.accountId
}).then(res => {
util.successMsg((row.id ? '修改' : '新增') + '成功')
this.getInfo()
diff --git a/src/views/match/manage/matchSignup.vue b/src/views/match/manage/matchSignup.vue
index e13c48f..58ce0e1 100644
--- a/src/views/match/manage/matchSignup.vue
+++ b/src/views/match/manage/matchSignup.vue
@@ -85,21 +85,22 @@
align="center">
-
@@ -285,9 +286,9 @@
模板下载
- {
- console.log("🚀 ~ showFaild ~ res:", res, res.headers['content-disposition'], typeof res.headers['content-disposition'])
const name = res.headers['content-disposition']
util.downloadFileDirect(name ? decodeURI(name) : '批量导入报名人员失败数据导出.xlsx', new Blob([res.data]))
}).catch(res => { })
@@ -526,10 +527,14 @@ export default {
if (data.exportCode) {
this.exportCode = data.exportCode
this.uploadFaild = true
- util.errorMsg(data.tip)
+ util.errorMsg(data.tip, 3000)
+ } else {
+ this.init()
+ this.importVisible = false
+ this.keyWord = ''
}
} else {
- res.message ? util.errorMsg(res.message) : util.errorMsg("上传失败,请检查数据")
+ util.errorMsg(res.message || '上传失败,请检查数据', 3000)
}
},
uploadError (err, file, fileList) {
@@ -547,9 +552,7 @@ export default {
this.uploadFaild = false
},
uploadSure () {
- this.init()
- this.importVisible = false
- this.keyWord = ''
+ this.$refs.upload.submit();
},
// 新增
add () {
@@ -765,7 +768,8 @@ export default {
},
responseType: 'blob'
}).then((res) => {
- util.downloadFileDirect(`报名人员.xls`, new Blob([res.data]))
+ const name = res.headers['content-disposition']
+ util.downloadFileDirect(name ? decodeURI(name) : '报名人员.xlsx', new Blob([res.data]))
}).catch(res => { })
} else {
axios.get(`${this.api.excelExport}?competitionId=${this.id}`, {
@@ -774,7 +778,8 @@ export default {
},
responseType: 'blob'
}).then((res) => {
- util.downloadFileDirect(`报名人员.xls`, new Blob([res.data]))
+ const name = res.headers['content-disposition']
+ util.downloadFileDirect(name ? decodeURI(name) : '报名人员.xlsx', new Blob([res.data]))
}).catch(res => { })
}
},
|