赛事相关

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. 41
      src/views/match/manage/matchSignup.vue

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

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

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

@ -104,7 +104,11 @@
<el-table-column prop="score" <el-table-column prop="score"
label="分数" label="分数"
width="90" 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" <el-table-column prop="timeSum"
label="耗时" label="耗时"
width="90" width="90"
@ -125,7 +129,8 @@
align="center" align="center"
width="160"> width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button :disabled="!scope.row.reportId" <el-button v-if="method != 2"
:disabled="!scope.row.reportId"
type="text" type="text"
@click="show(scope.row)">{{ scope.row.reportId ? '查看成绩报告' : '未参加' }}</el-button> @click="show(scope.row)">{{ scope.row.reportId ? '查看成绩报告' : '未参加' }}</el-button>
<el-button v-if="scope.row.reportId" <el-button v-if="scope.row.reportId"
@ -478,12 +483,12 @@ export default {
type: "category", type: "category",
boundaryGap: false, boundaryGap: false,
interval: 10, 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: { yAxis: {
name: "人数", name: "人数",
type: "value", type: "value",
interval: 10 minInterval: 10
}, },
series: [{ series: [{
data, data,

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

Loading…
Cancel
Save