|
|
@ -20,8 +20,9 @@ |
|
|
|
<el-button type="primary" :disabled="type === 0" class="ml20" @click="batchImport">上传文件</el-button> |
|
|
|
<el-button type="primary" :disabled="type === 0" class="ml20" @click="batchImport">上传文件</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-button v-if="(type && uploadData.length) || (!type && !published) || (!type && sourceType == 1)" type="primary" @click="cancelPublish(1)">发布排名</el-button> |
|
|
|
<!-- <el-button v-if="(type && uploadData.length) || (!type && !published) || (!type && sourceType == 1)" type="primary" @click="cancelPublish(1)">发布排名</el-button> --> |
|
|
|
<el-button v-if="published && ((!type && sourceType === '0') || (type && sourceType == 1))" type="primary" @click="cancelPublish(0)">取消发布</el-button> |
|
|
|
<el-button v-if="!published" type="primary" @click="cancelPublish(1)">发布排名</el-button> |
|
|
|
|
|
|
|
<el-button v-else type="primary" @click="cancelPublish(0)">取消发布</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-table :data="list" class="table" ref="table" stripe header-align="center"> |
|
|
|
<el-table :data="list" class="table" ref="table" stripe header-align="center"> |
|
|
@ -38,13 +39,13 @@ |
|
|
|
<el-table-column prop="schoolName" label="学校" min-width="100" align="center"></el-table-column> |
|
|
|
<el-table-column prop="schoolName" label="学校" min-width="100" align="center"></el-table-column> |
|
|
|
<el-table-column prop="timeSum" label="用时" width="90" align="center"> |
|
|
|
<el-table-column prop="timeSum" label="用时" width="90" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row.timeSum }}min |
|
|
|
{{ scope.row.timeSum + (scope.row.timeSum === '—' ? '' : 'min') }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="score" label="分数" width="90" align="center"></el-table-column> |
|
|
|
<el-table-column prop="score" label="分数" width="90" align="center"></el-table-column> |
|
|
|
<el-table-column label="得分详情" align="center" width="160"> |
|
|
|
<el-table-column label="得分详情" align="center" width="160"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="text" @click="show(scope.row, scope.$index)">查看</el-button> |
|
|
|
<el-button v-if="(!competitionType && scope.row.reportId) || competitionType" type="text" @click="show(scope.row, scope.$index)">查看</el-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
@ -113,7 +114,7 @@ |
|
|
|
<el-button type="primary" @click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button> |
|
|
|
<el-button type="primary" @click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-upload |
|
|
|
<el-upload |
|
|
|
ref="importStaff" |
|
|
|
ref="upload" |
|
|
|
name="file" |
|
|
|
name="file" |
|
|
|
accept=".xls,.xlsx" |
|
|
|
accept=".xls,.xlsx" |
|
|
|
:on-remove="handleRemove" |
|
|
|
:on-remove="handleRemove" |
|
|
@ -128,8 +129,10 @@ |
|
|
|
:data="{ |
|
|
|
:data="{ |
|
|
|
competitionId: this.id, |
|
|
|
competitionId: this.id, |
|
|
|
stageId: this.stageId, |
|
|
|
stageId: this.stageId, |
|
|
|
isOverallRanking: active ? 0 : 1 |
|
|
|
isOverallRanking: active ? 0 : 1, |
|
|
|
|
|
|
|
schoolId: this.$store.state.user.schoolId |
|
|
|
}" |
|
|
|
}" |
|
|
|
|
|
|
|
:auto-upload="false" |
|
|
|
> |
|
|
|
> |
|
|
|
<el-button type="primary" class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button> |
|
|
|
<el-button type="primary" class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button> |
|
|
|
</el-upload> |
|
|
|
</el-upload> |
|
|
@ -204,33 +207,58 @@ export default { |
|
|
|
// 获排名 |
|
|
|
// 获排名 |
|
|
|
getData() { |
|
|
|
getData() { |
|
|
|
// 查询是否已经发布排名 |
|
|
|
// 查询是否已经发布排名 |
|
|
|
this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ whetherToPublish }) => { |
|
|
|
// this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ whetherToPublish }) => { |
|
|
|
const ids = this.grades.map(e => e.stageId) |
|
|
|
// const ids = this.grades.map(e => e.stageId) |
|
|
|
ids.pop() |
|
|
|
// ids.pop() |
|
|
|
// 如果已发布,查询发布上一次排名的来源——>默认顺序或者手动发布(返回数据:是否手动发布(1为是,0不是)) |
|
|
|
// // 如果已发布,查询发布上一次排名的来源——>默认顺序或者手动发布(返回数据:是否手动发布(1为是,0不是)) |
|
|
|
whetherToPublish && this.$post(`${this.api.queryPublicationSource}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => { |
|
|
|
// whetherToPublish && this.$post(`${this.api.queryPublicationSource}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => { |
|
|
|
|
|
|
|
// this.sourceType = source |
|
|
|
|
|
|
|
// this.type = source == 1 ? 1 : 0 |
|
|
|
|
|
|
|
// }).catch(res => {}) |
|
|
|
|
|
|
|
// this.published = whetherToPublish |
|
|
|
|
|
|
|
// this.getRank(whetherToPublish) |
|
|
|
|
|
|
|
// }).catch(res => {}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&publicationType=${this.type}`).then(({ whetherToPublish }) => { |
|
|
|
|
|
|
|
// const ids = this.grades.map(e => e.stageId) |
|
|
|
|
|
|
|
// ids.pop() |
|
|
|
|
|
|
|
// // 如果已发布,查询发布上一次排名的来源——>默认顺序或者手动发布(返回数据:是否手动发布(1为是,0不是)) |
|
|
|
|
|
|
|
// whetherToPublish ? |
|
|
|
|
|
|
|
// this.$post(`${this.api.selectTheLastSortStatus}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => { |
|
|
|
|
|
|
|
// this.sourceType = source |
|
|
|
|
|
|
|
// this.type = source == 1 ? 1 : 0 |
|
|
|
|
|
|
|
// this.getRank(whetherToPublish) |
|
|
|
|
|
|
|
// }).catch(res => {}) : |
|
|
|
|
|
|
|
// this.getRank() |
|
|
|
|
|
|
|
// this.published = whetherToPublish |
|
|
|
|
|
|
|
// }).catch(res => {}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$post(`${this.api.selectTheLastSortStatus}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => { |
|
|
|
this.sourceType = source |
|
|
|
this.sourceType = source |
|
|
|
this.type = source == 1 ? 1 : 0 |
|
|
|
this.type = source == 1 ? 1 : 0 |
|
|
|
}).catch(res => {}) |
|
|
|
this.getRank() |
|
|
|
this.published = whetherToPublish |
|
|
|
|
|
|
|
this.getRank(whetherToPublish) |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 查询排名 |
|
|
|
// 查询排名 |
|
|
|
getRank(whetherToPublish) { |
|
|
|
getRank() { |
|
|
|
// 已发布,则调已发布的排名接口 |
|
|
|
// 手动上传的排名接口 |
|
|
|
if (whetherToPublish) { |
|
|
|
if (this.type) { |
|
|
|
this.$post(this.api.manuallyRankTheUploadList, { |
|
|
|
this.$post(this.api.manuallyUploadedRankings, { |
|
|
|
pageNum: this.page, |
|
|
|
pageNum: this.page, |
|
|
|
pageSize: this.pageSize, |
|
|
|
pageSize: this.pageSize, |
|
|
|
competitionId: this.id, |
|
|
|
competitionId: this.id, |
|
|
|
isOverallRanking: this.active ? 0 : 1, |
|
|
|
isOverallRanking: this.active ? 0 : 1, |
|
|
|
stageId: this.active || '' |
|
|
|
stageId: this.active || this.stageId |
|
|
|
}).then(({ message }) => { |
|
|
|
}).then(({ message, publishStatus }) => { |
|
|
|
|
|
|
|
// isRelease 0未发布,1已发布 |
|
|
|
|
|
|
|
this.published = publishStatus |
|
|
|
|
|
|
|
this.sourceType = message.total ? message.records[0].isRelease : 0 |
|
|
|
this.list = message.records |
|
|
|
this.list = message.records |
|
|
|
this.total = message.total |
|
|
|
this.total = message.total |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
} else { // 未发布的排名接口 |
|
|
|
} else { // 默认排名接口 |
|
|
|
if (!this.active) { |
|
|
|
if (!this.active) { |
|
|
|
// 总分排名 |
|
|
|
// 总分排名 |
|
|
|
const ids = this.grades.map(e => e.stageId) |
|
|
|
const ids = this.grades.map(e => e.stageId) |
|
|
@ -238,13 +266,17 @@ export default { |
|
|
|
pageNum: this.page, |
|
|
|
pageNum: this.page, |
|
|
|
pageSize: this.pageSize, |
|
|
|
pageSize: this.pageSize, |
|
|
|
competitionId: this.id, |
|
|
|
competitionId: this.id, |
|
|
|
|
|
|
|
publicationType: this.type, |
|
|
|
|
|
|
|
locationStageId: this.stageId, |
|
|
|
stageIds: ids.splice(0, ids.length - 1) |
|
|
|
stageIds: ids.splice(0, ids.length - 1) |
|
|
|
}).then(({ page }) => { |
|
|
|
}).then(({ page, publishStatus }) => { |
|
|
|
|
|
|
|
this.published = publishStatus |
|
|
|
this.list = page |
|
|
|
this.list = page |
|
|
|
this.total = total |
|
|
|
this.total = total |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
} else { // 阶段排名 |
|
|
|
} else { // 阶段排名 |
|
|
|
this.$post(`${this.api.stageRaceRanking}?competitionId=${this.id}&stageId=${this.active}&pageNum=${this.page}&pageSize=${this.pageSize}`).then(({ page, total }) => { |
|
|
|
this.$post(`${this.api.stageRaceRanking}?competitionId=${this.id}&stageId=${this.active}&pageNum=${this.page}&pageSize=${this.pageSize}&publicationType=${this.type}`).then(({ page, total, publishStatus }) => { |
|
|
|
|
|
|
|
this.published = publishStatus |
|
|
|
this.list = page |
|
|
|
this.list = page |
|
|
|
this.total = total |
|
|
|
this.total = total |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
@ -270,7 +302,14 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 排序类型切换回调 |
|
|
|
// 排序类型切换回调 |
|
|
|
typeChange(val) { |
|
|
|
typeChange(val) { |
|
|
|
this.getRank(val) |
|
|
|
this.$post(`${this.api.toggleTheSortingMode}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&whetherToManuallyPublish=${this.type}`).then(res => {}).catch(res => {}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&publicationType=${this.type}`).then(({ whetherToPublish }) => { |
|
|
|
|
|
|
|
// if (whetherToPublish && !val) this.sourceType = '0' |
|
|
|
|
|
|
|
this.getRank() |
|
|
|
|
|
|
|
// this.published = whetherToPublish |
|
|
|
|
|
|
|
// }).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
initData() { |
|
|
|
initData() { |
|
|
|
this.page = 1 |
|
|
|
this.page = 1 |
|
|
@ -363,7 +402,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 跳转实验报告 |
|
|
|
// 跳转实验报告 |
|
|
|
toReport(row) { |
|
|
|
toReport(row) { |
|
|
|
this.$router.push(`/matchReport?reportId=${row.reportId}`) |
|
|
|
this.$router.push(`/match/report?reportId=${row.reportId}`) |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleCurrentChange(val) { // 切换分页 |
|
|
|
handleCurrentChange(val) { // 切换分页 |
|
|
|
this.page = val; |
|
|
|
this.page = val; |
|
|
@ -371,7 +410,15 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 发布排名 |
|
|
|
// 发布排名 |
|
|
|
publishSubmit() { |
|
|
|
publishSubmit() { |
|
|
|
let data = this.uploadData // 手动上传后发布排名,数据直接取批量上传后返回的data |
|
|
|
const { startTime, endTime } = this.grades[this.index] |
|
|
|
|
|
|
|
if (Date.now() <= new Date(endTime)) return util.errorMsg('当前阶段还在进行中,请在本阶段结束后再发布!') |
|
|
|
|
|
|
|
if (this.type) { // 手动发布 |
|
|
|
|
|
|
|
this.$post(this.api.batchRelease, this.list.map(e => e.id)).then(res => { |
|
|
|
|
|
|
|
this.getData() |
|
|
|
|
|
|
|
util.successMsg('发布成功!') |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
let data = [] // 手动上传后发布排名,数据直接取批量上传后返回的data |
|
|
|
if (!this.type) { // 默认排序 |
|
|
|
if (!this.type) { // 默认排序 |
|
|
|
// 处理默认排序的数据 |
|
|
|
// 处理默认排序的数据 |
|
|
|
const { list, id } = this |
|
|
|
const { list, id } = this |
|
|
@ -381,37 +428,53 @@ export default { |
|
|
|
list.map(e => { |
|
|
|
list.map(e => { |
|
|
|
e.competitionId = id |
|
|
|
e.competitionId = id |
|
|
|
e.isOverallRanking = isOverall |
|
|
|
e.isOverallRanking = isOverall |
|
|
|
|
|
|
|
e.stageId = this.stageId |
|
|
|
// if (isOverall) delete e.stageId |
|
|
|
// if (isOverall) delete e.stageId |
|
|
|
if (isPerson) e.teamId = null // 个人赛则teamId传null |
|
|
|
if (isPerson) e.teamId = null // 个人赛则teamId传null |
|
|
|
}) |
|
|
|
}) |
|
|
|
data = list |
|
|
|
data = list |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
data.forEach(e => { |
|
|
|
|
|
|
|
e.publicationType = this.type |
|
|
|
|
|
|
|
}) |
|
|
|
const ids = this.grades.map(e => e.stageId) |
|
|
|
const ids = this.grades.map(e => e.stageId) |
|
|
|
ids.pop() |
|
|
|
ids.pop() |
|
|
|
// 发布前校验 |
|
|
|
// 发布前校验 |
|
|
|
this.$post(`${this.api.releaseVerification}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&whetherToManuallyPublish=${this.type}`).then(res => { |
|
|
|
// this.$post(`${this.api.releaseVerification}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&whetherToManuallyPublish=${this.type}`).then(res => { |
|
|
|
this.$post(this.api.publishRanking, data).then(res => { |
|
|
|
this.$post(this.api.publishRanking, data).then(res => { |
|
|
|
this.uploadData = [] |
|
|
|
this.uploadData = [] |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
util.successMsg('发布成功!') |
|
|
|
util.successMsg('发布成功!') |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
// }).catch(res => {}) |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 发布排名确认 |
|
|
|
// 发布排名确认 |
|
|
|
publish() { |
|
|
|
publish() { |
|
|
|
// 如果已发布,并且上次发布的类型跟这次发布的类型不一致,则要提示确认 |
|
|
|
// 如果已发布,并且上次发布的类型跟这次发布的类型不一致,则要提示确认 |
|
|
|
if (this.published && this.sourceType != this.type) { |
|
|
|
// if (this.published && this.sourceType != this.type) { |
|
|
|
this.$confirm(this.sourceType == 1 && !this.type ? |
|
|
|
// this.$confirm(this.sourceType == 1 && !this.type ? |
|
|
|
'手动排名已发布,是否要取消手动排名的内容,改为系统排名的内容?' : |
|
|
|
// '手动排名已发布,是否要取消手动排名的内容,改为系统排名的内容?' : |
|
|
|
'默认系统排名已发布,是否要取消系统排名的内容,改为手动发布的内容?', '提示', { |
|
|
|
// '默认系统排名已发布,是否要取消系统排名的内容,改为手动发布的内容?', '提示', { |
|
|
|
|
|
|
|
// type: 'success' |
|
|
|
|
|
|
|
// }).then(() => { |
|
|
|
|
|
|
|
// this.publishSubmit() |
|
|
|
|
|
|
|
// }).catch(() => {}) |
|
|
|
|
|
|
|
// } else { |
|
|
|
|
|
|
|
// this.publishSubmit() |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&publicationType=${this.type}`).then(({ whetherToPublish }) => { |
|
|
|
|
|
|
|
whetherToPublish ? |
|
|
|
|
|
|
|
this.$confirm('排名已经发布,是否直接覆盖?', '提示', { |
|
|
|
type: 'success' |
|
|
|
type: 'success' |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
this.publishSubmit() |
|
|
|
this.publishSubmit() |
|
|
|
}).catch(() => {}) |
|
|
|
}).catch(() => {}) : |
|
|
|
} else { |
|
|
|
|
|
|
|
this.publishSubmit() |
|
|
|
this.publishSubmit() |
|
|
|
} |
|
|
|
}).catch(res => {}) |
|
|
|
|
|
|
|
// this.publishSubmit() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 取消发布排名 |
|
|
|
// 取消发布排名 |
|
|
|
cancelPublish(publish) { |
|
|
|
cancelPublish(publish) { |
|
|
@ -424,13 +487,15 @@ export default { |
|
|
|
// 如果是发布排名,则先删除已发布的排名,再调发布排名的接口 |
|
|
|
// 如果是发布排名,则先删除已发布的排名,再调发布排名的接口 |
|
|
|
// 如果是取消发布,则直接调取消发布的接口 |
|
|
|
// 如果是取消发布,则直接调取消发布的接口 |
|
|
|
if (publish) { |
|
|
|
if (publish) { |
|
|
|
this.$post(this.api.deleteLastPublication, { |
|
|
|
// this.type ? |
|
|
|
competitionId: this.id, |
|
|
|
|
|
|
|
isOverallRanking: this.active ? 0 : 1, |
|
|
|
|
|
|
|
stageIds: this.active ? [this.active] : stageIds |
|
|
|
|
|
|
|
}).then(res => { |
|
|
|
|
|
|
|
this.publish() |
|
|
|
this.publish() |
|
|
|
}).catch(res => {}) |
|
|
|
// this.$post(this.api.deleteLastPublication, { |
|
|
|
|
|
|
|
// competitionId: this.id, |
|
|
|
|
|
|
|
// isOverallRanking: this.active ? 0 : 1, |
|
|
|
|
|
|
|
// stageIds: this.active ? [this.active] : stageIds |
|
|
|
|
|
|
|
// }).then(res => { |
|
|
|
|
|
|
|
// this.publish() |
|
|
|
|
|
|
|
// }).catch(res => {}) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}`).then(res => { |
|
|
|
this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}`).then(res => { |
|
|
|
this.sourceType = '' |
|
|
|
this.sourceType = '' |
|
|
@ -473,10 +538,13 @@ export default { |
|
|
|
this.exportCode = exportCode |
|
|
|
this.exportCode = exportCode |
|
|
|
this.uploadFaild = true |
|
|
|
this.uploadFaild = true |
|
|
|
util.errorMsg(`本次上传有${res.data.failureNum}个错误信息录入`) |
|
|
|
util.errorMsg(`本次上传有${res.data.failureNum}个错误信息录入`) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.importVisible = false |
|
|
|
|
|
|
|
this.getRank() |
|
|
|
|
|
|
|
util.successMsg('请检查数据后,点击发布排名以发布数据!') |
|
|
|
} |
|
|
|
} |
|
|
|
this.uploadData = res.data.data |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
res.message ? util.errorMsg(res.message) : util.errorMsg("上传失败,请检查数据") |
|
|
|
util.errorMsg(res.message || "上传失败,请检查数据") |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
uploadError(err, file, fileList) { |
|
|
|
uploadError(err, file, fileList) { |
|
|
@ -494,9 +562,11 @@ export default { |
|
|
|
this.uploadFaild = false |
|
|
|
this.uploadFaild = false |
|
|
|
}, |
|
|
|
}, |
|
|
|
uploadSure() { |
|
|
|
uploadSure() { |
|
|
|
this.importVisible = false |
|
|
|
this.list.length ? |
|
|
|
this.list = this.uploadData |
|
|
|
this.$post(this.api.cancelImport, this.list.map(e => e.id)).then(res => { |
|
|
|
this.uploadData.length && util.successMsg('请检查数据后,点击发布排名以发布数据!') |
|
|
|
this.$refs.upload.submit() |
|
|
|
|
|
|
|
}).catch(res => {}) : |
|
|
|
|
|
|
|
this.$refs.upload.submit() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|