赛事人员相关

dev_review
yujialong 8 months ago
parent e615d0399b
commit e13f523d73
  1. 1
      src/utils/api.js
  2. 6
      src/views/match/manage/matchInfo.vue
  3. 33
      src/views/match/manage/matchSignup.vue

@ -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`,

@ -66,8 +66,7 @@
<tr>
<th width="130">指导老师</th>
<td>
<div v-if="status < 5"
class="plus">
<div class="plus">
<i class="el-icon-circle-plus-outline icon"
@click="addAdvisor"></i>
</div>
@ -91,7 +90,7 @@
clearable
size="mini"
:disabled="!item.edit"></el-input>
<template v-if="status < 5">
<template>
<i v-if="item.edit"
class="el-icon-check icon"
@click="submitAdvisor(item)"></i>
@ -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()

@ -85,21 +85,22 @@
align="center">
</el-table-column>
<el-table-column prop="username"
label="队长/成员"
:label="info.completeCompetitionSetup.competitionType ? '队长/成员' : '学生姓名'"
min-width="140"
align="center">
</el-table-column>
<el-table-column prop="workNumber"
label="队长/成员学号"
:label="info.completeCompetitionSetup.competitionType ? '队长/成员学号' : '学号'"
min-width="140"
align="center">
</el-table-column>
<el-table-column prop="phone"
label="队长/成员手机号"
:label="info.completeCompetitionSetup.competitionType ? '队长/成员手机号' : '手机号'"
min-width="140"
align="center">
</el-table-column>
<el-table-column label="是否为队长"
<el-table-column v-if="info.completeCompetitionSetup.competitionType"
label="是否为队长"
min-width="80"
align="center">
<template slot-scope="scope">
@ -285,9 +286,9 @@
<el-button type="primary"
@click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button>
</div>
<el-upload ref="importStaff"
name="file"
<el-upload name="file"
accept=".xls,.xlsx"
ref="upload"
:on-remove="handleRemove"
:on-error="uploadError"
:on-success="uploadSuccess"
@ -297,6 +298,7 @@
competitionId: id,
platformId: 2
}"
:auto-upload="false"
:on-exceed="handleExceed"
:action="info.completeCompetitionSetup.competitionType ? this.api.batchImportTeamData : this.api.batchImportPersonalData"
:file-list="uploadList"
@ -515,7 +517,6 @@ export default {
headers: this.headers,
responseType: 'blob'
}).then((res) => {
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 => { })
}
},

Loading…
Cancel
Save