赛事相关

master
yujialong 8 months ago
parent ec2eac1727
commit dd4e060637
  1. 1
      src/pages/match/add/set.vue
  2. 5
      src/pages/match/add/step1.vue
  3. 2
      src/pages/match/add/step2.vue
  4. 6
      src/pages/match/add/step3.vue
  5. 13
      src/pages/match/manage/matchArchList.vue
  6. 43
      src/pages/match/manage/matchSignup.vue
  7. 45
      src/pages/student/list/index.vue

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

@ -694,8 +694,9 @@ export default {
if (form.competitionScope == 2 && (!form.competitionRangeList || !form.competitionRangeList.length)) form.competitionScope = 1
}
this.$parent.showLoad()
delete form.publishStatus
if (status === 1) form.publishStatus = 1
// delete form.publishStatus
// if (status === 1) form.publishStatus = 1
form.publishStatus = status
form.ztOpen = form.id ? form.ztOpen : (status ? 0 : 1) //
form.releaseType = releaseType

@ -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">
@ -188,7 +188,8 @@ export default {
form: [],
setVisible: false,
curStep: 0,
pass: 0
pass: 0,
curOriginForm: {},
};
},
components: {
@ -268,6 +269,7 @@ export default {
},
//
toSet (i) {
this.curOriginForm = JSON.parse(JSON.stringify(this.form[i]))
this.curStep = i
this.$parent.showBtns = false
this.setVisible = true

@ -103,7 +103,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"
@ -124,7 +128,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"
@ -489,12 +494,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,

@ -70,11 +70,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"
@ -174,6 +184,7 @@
<el-select v-model="form.schoolId"
filterable
:disabled="!isAdd"
@change="schoolChange"
style="width: 100%">
<el-option v-for="(item, i) in clients"
:key="i"
@ -181,8 +192,7 @@
:value="item.schoolId"></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="!schoolDisable"
prop="studentAffiliatedInstitutionId"
<el-form-item prop="studentAffiliatedInstitutionId"
label="学生所属院校">
<el-select v-model="form.studentAffiliatedInstitutionId"
filterable
@ -293,6 +303,7 @@
<el-upload ref="upload"
name="file"
accept=".xls,.xlsx"
:before-upload="beforeUpload"
:on-remove="handleRemove"
:on-error="uploadError"
:on-success="uploadSuccess"
@ -308,6 +319,8 @@
:headers="headers">
<el-button type="primary"
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>
@ -317,6 +330,11 @@
@click="showFaild">部分数据导入失败查看失败原因</a>
</template>
</div>
<span v-if="uploading"
slot="footer"
class="dialog-footer">
<el-button @click="cancelUpload">停止导入</el-button>
</span>
</el-dialog>
</div>
</template>
@ -416,6 +434,7 @@ export default {
token: util.local.get(Setting.tokenKey)
},
diffSchool: false,
uploading: false,
};
},
watch: {
@ -527,16 +546,18 @@ export default {
}).catch(res => { })
},
uploadSuccess ({ data, status }) {
this.uploading = false
this.uploadFaild = false
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 = ''
}
@ -545,12 +566,16 @@ export default {
}
},
uploadError (err, file, fileList) {
this.uploading = false
this.$message({
message: "上传出错,请重试!",
type: "error",
center: true
})
},
beforeUpload (file) {
this.uploading = true
},
beforeRemove (file, fileList) {
return this.$confirm(`确定移除 ${file.name}`)
},
@ -559,15 +584,12 @@ export default {
this.uploadFaild = false
},
cancelUpload () {
this.uploading = false
this.$refs.upload.abort()
this.init()
this.importVisible = false
this.keyWord = ''
},
uploadSure () {
this.importVisible = false
this.keyWord = ''
},
//
add () {
this.diffSchool = false
@ -601,6 +623,10 @@ export default {
.catch(() => {
});
},
//
schoolChange () {
if (!this.form.studentAffiliatedInstitutionId) this.form.studentAffiliatedInstitutionId = this.form.schoolId
},
//
workNumberChange () {
const { form } = this
@ -638,6 +664,7 @@ export default {
hrUserAccount: {
...form,
id: form.id,
lastTimeInstitutionId: this.originForm.studentAffiliatedInstitutionId
},
hrUserInfo: {
userId: form.userId,

@ -664,31 +664,27 @@ export default {
});
},
getOrgStudentData () { //
let params = {
this.$post(this.api.organizationalStudentList, {
architectureId: this.architectureId,
level: this.orgLevel,
keyWord: this.keyWord,
pageNum: this.page,
pageSize: this.pageSize
};
this.$post(this.api.organizationalStudentList, params).then(res => {
}).then(res => {
this.listData = res.page;
this.total = res.total;
}).catch(err => {
});
}).catch(err => { });
},
getData () { //
let data = {
this.$post(this.api.studentList, {
type: this.studentType,
keyWord: this.keyWord,
pageNum: this.page,
pageSize: this.pageSize
};
this.$post(this.api.studentList, data).then(res => {
}).then(res => {
this.listData = res.page;
this.total = res.total;
}).catch(err => {
});
}).catch(err => { });
},
currentChange (val) { //
this.page = val;
@ -715,12 +711,32 @@ export default {
this.getData();
},
delAllSelection () { //
const len = this.multipleSelection.length
const list = len ? this.multipleSelection : this.listData
let list = this.multipleSelection
const len = list.length
this.$confirm(len ? '确定要删除选中学生吗?' : '是否要删除当前列表所有学生?', '提示', {
type: "warning"
}).then(() => {
this.$post(`${this.api.delStudent}?accountIds=${list.map(e => e.accountId).toString()}`).then(res => {
}).then(async () => {
//
if (!len) {
if (this.studentType) {
const { page } = await this.$post(this.api.studentList, {
type: this.studentType,
pageNum: 1,
pageSize: 1000
})
list = page;
} else {
const { page } = await this.$post(this.api.organizationalStudentList, {
architectureId: this.architectureId,
level: this.orgLevel,
pageNum: 1,
pageSize: 1000
})
list = page;
}
}
await this.$post(`${this.api.delStudent}?accountIds=${list.map(e => e.accountId).toString()}`)
this.multipleSelection = [];
this.$refs.table.clearSelection();
util.successMsg("删除成功");
@ -729,7 +745,6 @@ export default {
} else {
this.getOrgStudentData();
}
}).catch(res => { });
if (this.multipleSelection.length === this.listData.length && this.page > 1) {
this.currentChange(this.page - 1)
}

Loading…
Cancel
Save