赛事相关

dev_review
yujialong 8 months ago
parent 2419a97063
commit 43b59996f3
  1. 1
      src/views/match/add/set.vue
  2. 2
      src/views/match/add/step2.vue
  3. 16
      src/views/match/add/step3.vue
  4. 13
      src/views/match/manage/matchArchList.vue
  5. 47
      src/views/match/manage/matchSignup.vue

@ -295,6 +295,7 @@ export default {
},
//
back () {
this.$emit('update:form', this.$parent.curOriginForm)
this.$emit('hideSet')
}
}

@ -8,7 +8,7 @@
label-width="170px"
label-suffix=":"
size="small"
:disabled="!editing && id">
:disabled="!!(!editing && id)">
<el-form-item label="竞赛类型">
{{ step1.completeCompetitionSetup.competitionType ? '团队赛(' + step1.completeCompetitionSetup.minTeamSize + '-' + step1.completeCompetitionSetup.maxTeamSize + '人/队)' : '个人赛' }} <span class="tips">如需修改请返回上一步</span>
</el-form-item>

@ -7,7 +7,7 @@
<el-form label-width="170px"
label-suffix=":"
size="small"
:disabled="!editing && id">
:disabled="!!(!editing && id)">
<div v-for="(item, i) in form"
:key="i"
class="step">
@ -197,6 +197,7 @@ export default {
form: [],
setVisible: false,
curStep: 0,
curOriginForm: {},
};
},
components: {
@ -278,6 +279,7 @@ export default {
},
//
toSet (i) {
this.curOriginForm = JSON.parse(JSON.stringify(this.form[i]))
this.curStep = i
this.$parent.showBtns = false
this.setVisible = true
@ -355,8 +357,19 @@ export default {
publish () {
this.competitionId && this.$post(`${this.api.publishCompetition}?competitionId=${this.competitionId}&publishStatus=1`).then(res => { }).catch(err => { })
},
//
autoAllocation () {
this.$confirm('团队赛已发布,是否要自动分配阶段人员?', '提示', {
// confirmButtonText: '',
// cancelButtonText: '',
type: 'success'
}).then(() => {
}).catch(() => { });
},
//
save (status, next = 0) {
// return console.log(this.$parent.$refs.step1.form.completeCompetitionSetup.competitionType)
const { form } = this
if (!form.length) {
this.$parent.hideLoad()
@ -449,6 +462,7 @@ export default {
this.$parent.hideLoad()
//
status && this.publish(status)
// this.$parent.$refs.step1.form.completeCompetitionSetup.competitionType && this.autoAllocation() //
util.successMsg((status ? '发布' : '保存') + '成功')
this.$emit('next', next)
}).catch(err => {

@ -104,7 +104,11 @@
<el-table-column prop="score"
label="分数"
width="90"
align="center"></el-table-column>
align="center">
<template slot-scope="scope">
{{ scope.row.submitTime ? scope.row.score : '--' }}
</template>
</el-table-column>
<el-table-column prop="timeSum"
label="耗时"
width="90"
@ -125,7 +129,8 @@
align="center"
width="160">
<template slot-scope="scope">
<el-button :disabled="!scope.row.reportId"
<el-button v-if="method != 2"
:disabled="!scope.row.reportId"
type="text"
@click="show(scope.row)">{{ scope.row.reportId ? '查看成绩报告' : '未参加' }}</el-button>
<el-button v-if="scope.row.reportId"
@ -478,12 +483,12 @@ export default {
type: "category",
boundaryGap: false,
interval: 10,
data: ["0-10", "11-20", "21-30", "31-40", "41-50", "51-60", "61-70", "71-80", "81-90", "91-100"]
data: ["0-10", "10-20", "20-30", "30-40", "40-50", "50-60", "60-70", "70-80", "80-90", "90-100"]
},
yAxis: {
name: "人数",
type: "value",
interval: 10
minInterval: 10
},
series: [{
data,

@ -30,11 +30,7 @@
@click="autoAllocation">自动分配阶段成员</el-button>
<el-button type="primary"
round
@click="batchImport">
<i v-if="uploading"
class="el-icon-loading"></i>
{{ uploading ? '正在' : '' }}导入
</el-button>
@click="batchImport">导入</el-button>
<el-button type="primary"
round
@click="add"
@ -75,11 +71,21 @@
sortable="custom"
min-width="180"
align="center">
<template slot-scope="scope">
{{ scope.row.school }}
<span v-if="scope.row.schoolStatus"
style="color: #f00">(已删除)</span>
</template>
</el-table-column>
<el-table-column prop="realSchool"
label="学生所属院校"
min-width="180"
align="center">
<template slot-scope="scope">
{{ scope.row.realSchool }}
<span v-if="scope.row.realSchoolStatus"
style="color: #f00">(已删除)</span>
</template>
</el-table-column>
<el-table-column v-if="info.completeCompetitionSetup.competitionType"
prop="teamName"
@ -317,6 +323,8 @@
<el-button type="primary"
:loading="uploading"
class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button>
<div slot="tip"
class="el-upload__tip">建议文件数据在5000条以内导入5000名学生大致需要10分钟</div>
</el-upload>
</template>
<template v-else>
@ -324,16 +332,12 @@
<p type="primary"
style="margin-bottom: 10px;font-size: 14px;color: #9076FF;text-decoration: underline;cursor: pointer;"
@click="showFaild">部分数据导入失败查看失败原因</p>
<el-button type="primary"
@click="uploadFaild = false">重新上传</el-button>
</template>
</div>
<span v-if="uploading"
slot="footer"
class="dialog-footer">
<el-button @click="cancelUpload">取消上传</el-button>
<el-button type="primary"
@click="backstageUpload">后台上传</el-button>
<el-button @click="cancelUpload">停止导入</el-button>
</span>
</el-dialog>
</div>
@ -517,8 +521,9 @@ export default {
//
batchImport () {
this.isBackstage = 0
this.importVisible = true
this.uploadList = []
this.uploadFaild = false
},
//
download () {
@ -546,12 +551,13 @@ export default {
this.uploadTips = ''
if (status === 200) {
this.init()
const { tip } = data
if (data.exportCode) {
this.exportCode = data.exportCode
this.uploadFaild = true
this.uploadTips = data.tip
this.uploadTips = tip
} else {
util.successMsg(data.tip, 3000)
util[tip.includes('5000') ? 'errorMsg' : 'successMsg'](tip, 3000)
this.importVisible = false
this.keyWord = ''
}
@ -560,7 +566,6 @@ export default {
}
},
uploadError (err, file, fileList) {
console.log("🚀 ~ uploadError ~ err:", err)
this.uploading = false
this.$message({
message: "上传出错,请重试!",
@ -579,14 +584,11 @@ export default {
this.uploadFaild = false
},
cancelUpload () {
if (!this.isBackstage) {
this.uploadList = []
this.$refs.upload.abort()
this.uploading = false
this.init()
this.importVisible = false
this.keyWord = ''
}
this.uploading = false
this.$refs.upload.abort()
this.keyWord = ''
this.init()
this.importVisible = false
},
//
backstageUpload () {
@ -661,6 +663,7 @@ export default {
hrUserAccount: {
...form,
id: form.id,
lastTimeInstitutionId: this.originForm.studentAffiliatedInstitutionId
},
hrUserInfo: {
userId: form.userId,

Loading…
Cancel
Save