赛事相关

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 () { back () {
this.$emit('update:form', this.$parent.curOriginForm)
this.$emit('hideSet') this.$emit('hideSet')
} }
} }

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

@ -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">
@ -188,7 +188,8 @@ export default {
form: [], form: [],
setVisible: false, setVisible: false,
curStep: 0, curStep: 0,
pass: 0 pass: 0,
curOriginForm: {},
}; };
}, },
components: { components: {
@ -268,6 +269,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

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

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

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

Loading…
Cancel
Save