赛事人员相关

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`, entryInformation: `competition/competition/team/entryInformation`,
getRedisCacheCompetition: `competition/competition/management/getRedisCache`, getRedisCacheCompetition: `competition/competition/management/getRedisCache`,
copyCompetition: `competition/competition/management/copyCompetition`, copyCompetition: `competition/competition/management/copyCompetition`,
checkCustomerBySchool: `competition/competition/team/checkCustomerBySchool`,
// 赛事内容 // 赛事内容
addCompetitionContent: `competition/competition/content/addCompetitionContent`, addCompetitionContent: `competition/competition/content/addCompetitionContent`,

@ -66,8 +66,7 @@
<tr> <tr>
<th width="130">指导老师</th> <th width="130">指导老师</th>
<td> <td>
<div v-if="status < 5" <div class="plus">
class="plus">
<i class="el-icon-circle-plus-outline icon" <i class="el-icon-circle-plus-outline icon"
@click="addAdvisor"></i> @click="addAdvisor"></i>
</div> </div>
@ -91,7 +90,7 @@
clearable clearable
size="mini" size="mini"
:disabled="!item.edit"></el-input> :disabled="!item.edit"></el-input>
<template v-if="status < 5"> <template>
<i v-if="item.edit" <i v-if="item.edit"
class="el-icon-check icon" class="el-icon-check icon"
@click="submitAdvisor(item)"></i> @click="submitAdvisor(item)"></i>
@ -493,6 +492,7 @@ export default {
teamId: this.info.teamId, teamId: this.info.teamId,
phone: row.phone, phone: row.phone,
position: row.position, position: row.position,
accountId: this.accountId
}).then(res => { }).then(res => {
util.successMsg((row.id ? '修改' : '新增') + '成功') util.successMsg((row.id ? '修改' : '新增') + '成功')
this.getInfo() this.getInfo()

@ -85,21 +85,22 @@
align="center"> align="center">
</el-table-column> </el-table-column>
<el-table-column prop="username" <el-table-column prop="username"
label="队长/成员" :label="info.completeCompetitionSetup.competitionType ? '队长/成员' : '学生姓名'"
min-width="140" min-width="140"
align="center"> align="center">
</el-table-column> </el-table-column>
<el-table-column prop="workNumber" <el-table-column prop="workNumber"
label="队长/成员学号" :label="info.completeCompetitionSetup.competitionType ? '队长/成员学号' : '学号'"
min-width="140" min-width="140"
align="center"> align="center">
</el-table-column> </el-table-column>
<el-table-column prop="phone" <el-table-column prop="phone"
label="队长/成员手机号" :label="info.completeCompetitionSetup.competitionType ? '队长/成员手机号' : '手机号'"
min-width="140" min-width="140"
align="center"> align="center">
</el-table-column> </el-table-column>
<el-table-column label="是否为队长" <el-table-column v-if="info.completeCompetitionSetup.competitionType"
label="是否为队长"
min-width="80" min-width="80"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -285,9 +286,9 @@
<el-button type="primary" <el-button type="primary"
@click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button> @click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button>
</div> </div>
<el-upload ref="importStaff" <el-upload name="file"
name="file"
accept=".xls,.xlsx" accept=".xls,.xlsx"
ref="upload"
:on-remove="handleRemove" :on-remove="handleRemove"
:on-error="uploadError" :on-error="uploadError"
:on-success="uploadSuccess" :on-success="uploadSuccess"
@ -297,6 +298,7 @@
competitionId: id, competitionId: id,
platformId: 2 platformId: 2
}" }"
:auto-upload="false"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:action="info.completeCompetitionSetup.competitionType ? this.api.batchImportTeamData : this.api.batchImportPersonalData" :action="info.completeCompetitionSetup.competitionType ? this.api.batchImportTeamData : this.api.batchImportPersonalData"
:file-list="uploadList" :file-list="uploadList"
@ -515,7 +517,6 @@ export default {
headers: this.headers, headers: this.headers,
responseType: 'blob' responseType: 'blob'
}).then((res) => { }).then((res) => {
console.log("🚀 ~ showFaild ~ res:", res, res.headers['content-disposition'], typeof res.headers['content-disposition'])
const name = res.headers['content-disposition'] const name = res.headers['content-disposition']
util.downloadFileDirect(name ? decodeURI(name) : '批量导入报名人员失败数据导出.xlsx', new Blob([res.data])) util.downloadFileDirect(name ? decodeURI(name) : '批量导入报名人员失败数据导出.xlsx', new Blob([res.data]))
}).catch(res => { }) }).catch(res => { })
@ -526,10 +527,14 @@ export default {
if (data.exportCode) { if (data.exportCode) {
this.exportCode = data.exportCode this.exportCode = data.exportCode
this.uploadFaild = true this.uploadFaild = true
util.errorMsg(data.tip) util.errorMsg(data.tip, 3000)
} else {
this.init()
this.importVisible = false
this.keyWord = ''
} }
} else { } else {
res.message ? util.errorMsg(res.message) : util.errorMsg("上传失败,请检查数据") util.errorMsg(res.message || '上传失败,请检查数据', 3000)
} }
}, },
uploadError (err, file, fileList) { uploadError (err, file, fileList) {
@ -547,9 +552,7 @@ export default {
this.uploadFaild = false this.uploadFaild = false
}, },
uploadSure () { uploadSure () {
this.init() this.$refs.upload.submit();
this.importVisible = false
this.keyWord = ''
}, },
// //
add () { add () {
@ -765,7 +768,8 @@ export default {
}, },
responseType: 'blob' responseType: 'blob'
}).then((res) => { }).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 => { }) }).catch(res => { })
} else { } else {
axios.get(`${this.api.excelExport}?competitionId=${this.id}`, { axios.get(`${this.api.excelExport}?competitionId=${this.id}`, {
@ -774,7 +778,8 @@ export default {
}, },
responseType: 'blob' responseType: 'blob'
}).then((res) => { }).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 => { }) }).catch(res => { })
} }
}, },

Loading…
Cancel
Save