Branch_d40a2540
yujialong 2 years ago
parent 23f779cfa0
commit d0c11c180c
  1. 24
      src/api/index.js
  2. 2
      src/pages/achievement/list/index.vue
  3. 23
      src/pages/match/add/index.vue
  4. 36
      src/pages/match/add/set.vue
  5. 13
      src/pages/match/add/step1.vue
  6. 123
      src/pages/match/add/step2.vue
  7. 30
      src/pages/match/add/step3.vue
  8. 11
      src/pages/match/list/index.vue
  9. 11
      src/pages/match/manage/matchInfo.vue
  10. 4
      src/pages/match/manage/matchProgress.vue
  11. 168
      src/pages/match/manage/matchRank.vue
  12. 51
      src/pages/match/manage/matchSignup.vue
  13. 8
      src/pages/match/manage/notice.vue
  14. 4
      src/pages/match/manage/noticeDetail.vue
  15. 2
      src/pages/project/add/index.vue
  16. 8
      src/pages/screen/index.vue
  17. 2
      src/setting.js
  18. 8
      src/store/modules/match.js

@ -1,7 +1,6 @@
import Setting from "@/setting";
const host = Setting.apiBaseURL
const uploadURL = Setting.upload.apiURL;
const host1 = "https://www.occupationlab.com:8080/"
const host2 = 'http://192.168.31.51:9000/'
export default {
@ -76,7 +75,7 @@ export default {
// 成绩管理
deleteExperimentalReport: `occupationlab/occupationlab/achievement/deleteExperimentalReport`, // 单个、批量删除实验报告
exportAssessmentInfo: `${host}occupationlab/occupationlab/achievement/exportAssessmentInfo`, // 批量导出考核成绩
exportPracticeInfo: `${host2}occupationlab/occupationlab/achievement/exportPracticeInfo`, // 批量导出练习成绩
exportPracticeInfo: `occupationlab/occupationlab/achievement/exportPracticeInfo`, // 批量导出练习成绩
getAchievementInfo: `occupationlab/occupationlab/achievement/getAchievementInfo`, // 管理端成绩管理
getAssessmentDetail: `occupationlab/occupationlab/achievement/getAssessmentDetail`, // 管理端考核成绩详情
getPracticeDetail: `occupationlab/occupationlab/achievement/getPracticeDetail`, // 管理端练习成绩详情
@ -127,6 +126,7 @@ export default {
getCustomerOrder: `nakadai/nakadai/valueModuleManagement/getCustomerOrder`,
curriculumList: `nakadai/nakadai/curriculum/schoolCourse`,
queryCustomer: `nakadai/nakadai/customer/queryCustomer`,
getSchoolsByProvince: `nakadai/nakadai/school/getSchoolsByProvince`,
// 赛事内容
addCompetitionContent: `competition/competition/content/addCompetitionContent`,
@ -156,8 +156,8 @@ export default {
cancelRegistration: `competition/competition/registration/cancelRegistration`,
disableContests: `competition/competition/registration/disableContests`,
disableRegistration: `competition/competition/registration/disableRegistration`,
excelExport: `competition/competition/registration/excelExport`,
exportDataInBatches: `competition/competition/registration/exportDataInBatches`,
excelExport: `${host}competition/competition/registration/excelExport`,
exportDataInBatches: `${host}competition/competition/registration/exportDataInBatches`,
queryRegistrationByCondition: `competition/competition/registration/queryRegistrationByCondition`,
searchTeam: `competition/competition/team/searchTeam`,
joinCompetitionTeam: `competition/competition/team/joinCompetitionTeam`,
@ -183,14 +183,14 @@ export default {
saveAnnouncementAnnex: `competition/competition/announcementAnnex/save`,
// 赛事成绩
batchDeleteContestGrade: `competition/competition/performance/batchDeleteContestGrade`,
batchImportGrades: `competition/competition/performance/batchImportGrades`,
exportExperimentalResultsInBatch: `competition/competition/performance/exportExperimentalResultsInBatch`,
performanceExportFailure: `competition/competition/performance/exportFailure`,
rankExportFailure: `competition/competition/rank/exportFailure`,
batchImportGrades: `${host}competition/competition/performance/batchImportGrades`,
exportExperimentalResultsInBatch: `${host}competition/competition/performance/exportExperimentalResultsInBatch`,
performanceExportFailure: `${host}competition/competition/performance/exportFailure`,
rankExportFailure: `${host}competition/competition/rank/exportFailure`,
stageGradeManagementList: `competition/competition/performance/stageGradeManagementList`,
stageRaceRanking: `competition/competition/rank/stageRaceRanking`,
overallStandingsInThePointsRace: `competition/competition/rank/overallStandingsInThePointsRace`,
batchImportRanking: `competition/competition/rank/batchImportRanking`,
batchImportRanking: `${host}competition/competition/rank/batchImportRanking`,
publishRanking: `competition/competition/rank/publishRanking`,
stageTeamScoreDetails: `competition/competition/rank/stageTeamScoreDetails`,
multipleStageTeamScoreDetails: `competition/competition/rank/multipleStageTeamScoreDetails`,
@ -202,9 +202,9 @@ export default {
manuallyRankTheUploadList: `competition/competition/rank/manuallyRankTheUploadList`,
queryPublicationSource: `competition/competition/rank/queryPublicationSource`,
releaseVerification: `competition/competition/rank/releaseVerification`,
gradeImport: `${host2}template/赛事成绩导入模板.xlsx`,
rankImportTeam: `${host2}template/赛事排名导入模板(团队赛).xlsx`,
rankImportPerson: `${host2}template/赛事排名导入模板(个人赛).xlsx`,
gradeImport: `${host}template/赛事成绩导入模板.xlsx`,
rankImportTeam: `${host}template/赛事排名导入模板(团队赛).xlsx`,
rankImportPerson: `${host}template/赛事排名导入模板(个人赛).xlsx`,
// 栏目管理
addColumn: `occupationlab/occupationlab/information/column/addColumn`,
deleteColumn: `occupationlab/occupationlab/information/column/deleteColumn`,

@ -3,7 +3,7 @@
<h6 class="p-title">筛选</h6>
<div class="tool mul">
<ul class="filter">
<li>
<li v-if="projectPermissions">
<label>时间</label>
<el-radio-group v-model="month" @change="initData">
<el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border>{{ item.name }}</el-radio>

@ -75,6 +75,7 @@ export default {
data() {
return {
id: this.$route.query.id || '',
cache: this.$store.state.match.cache,
hasPer: false,
releaseTypes: [
{
@ -109,16 +110,20 @@ export default {
this.getPer()
},
methods: {
//
resumeData() {
if (this.cache) {
this.step = 3
this.editing = true
this.showBtns = false
}
},
// true
getPer() {
this.$get(this.api.isClient).then(({ customerId }) => {
customerId && this.$get(this.api.getCustomerOrder, {
customerId
}).then(({ show }) => {
this.hasPer = show
show || this.$parent.hideArch()
}).catch(err => {})
}).catch(res => {})
this.$get(this.api.getCustomerOrder).then(({ show }) => {
this.hasPer = show
show || this.$parent.hideArch()
}).catch(err => {})
},
// loading
showLoad() {
@ -171,7 +176,7 @@ export default {
//
preview() {
util.local.set('match', this.$refs.step1.form)
window.open(this.$router.resolve('/matchPreview').href)
window.open(this.$router.resolve('/match/preview').href)
},
//
cancel() {

@ -55,7 +55,7 @@
<div>
<el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input>
</div>
<el-button style="margin-left: 5px" type="primary" round>自定义实验项目</el-button>
<el-button style="margin-left: 5px" type="primary" round @click="toProject">自定义实验项目</el-button>
</div>
</div>
<!-- 实训项目表格 -->
@ -104,10 +104,12 @@
<script>
import util from "@/libs/util";
import { Loading } from 'element-ui'
export default {
props: ['form', 'step1'],
data() {
return {
loadIns: null,
curriculumList: [],
keyword: '',
projects: [],
@ -140,18 +142,22 @@ export default {
methods: {
//
getCourse() {
this.loadIns = Loading.service()
this.$get(this.api.curriculumList).then(({ data }) => {
const list = data
this.curriculumList = data
if (list.length) this.form.cid = list[0].cid
if (!this.form.cid && list.length) this.form.cid = list[0].cid
this.courseChange()
}).catch(err => {});
}).catch(err => {
this.loadIns.close()
});
},
//
courseChange() {
courseChange(val) {
const { sysId, sysName } = this.curriculumList.find(e => e.cid == this.form.cid)
this.form.sysName = sysName
this.sysId = sysId
if (val) this.loadIns = Loading.service()
this.getProject()
},
//
@ -166,7 +172,10 @@ export default {
}).then(({ data }) => {
this.projects = data.records
this.total = data.total
}).catch(err => {});
this.loadIns.close()
}).catch(err => {
this.loadIns.close()
});
},
initData() {
this.page = 1;
@ -176,6 +185,14 @@ export default {
this.page = val;
this.getProject();
},
//
toProject() {
this.$store.commit('match/setCache', {
form: this.form,
curStep: this.$parent.curStep
})
this.$router.push(`/project/list?show=1`)
},
//
timeChange(val) {
if (val.length) {
@ -205,12 +222,15 @@ export default {
save() {
const { form } = this
if (!form.time.length) return util.warningMsg('请选择比赛时间')
if (this.timeInvalid) return util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
const { playStartTime, playEndTime } = this.step1
if (new Date(form.time[0]) < new Date(playStartTime) || new Date(form.time[1]) > new Date(playEndTime)) return util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
if (!form.cid) return util.warningMsg('请选择课程')
if (!form.projectId) return util.warningMsg('请选择项目')
const cur = this.curriculumList.find(e => e.cid == form.cid)
if (cur) form.systemName = cur.sysName
const { systemId, projectName } = this.projects.find(e => e.projectId == form.projectId)
form.systemId = systemId
form.projectName = projectName
if (systemId) form.systemId = systemId
if (projectName) form.projectName = projectName
form.startTime = form.time[0]
form.endTime = form.time[1]
this.$emit('hideSet', this.form)

@ -138,7 +138,7 @@
</div>
</el-form-item>
<el-form-item class="req" label="竞赛详情">
<quill :border="true" v-model="form.description" :height="400" />
<quill v-if="quillShow" ref="quill" :border="true" v-model="form.description" :height="400" :readonly="!editing && form.id !== ''" />
</el-form-item>
<el-form-item label="附件">
<el-upload
@ -246,7 +246,7 @@ export default {
fileList: [],
pickerOptions: {
disabledDate: time => {
return time.getTime() < new Date().getTime() - 86400000;
return this.$route.query.id ? false : time.getTime() < new Date().getTime() - 86400000;
}
},
rangeVisible: false,
@ -325,12 +325,19 @@ export default {
},
submiting: false,
updateTime: 0,
quillShow: true
};
},
components: {
quill
},
watch: {
editing: function(val) {
this.quillShow = false
this.$nextTick(() => {
this.quillShow = true
})
},
// ,
form: {
handler(){
@ -369,7 +376,6 @@ export default {
id && this.$post(`${this.api.getCompetition}?competitionId=${id}`).then(({ competition }) => {
this.$parent.publishStatus = competition.publishStatus
this.$parent.releaseType = competition.releaseType
if (!competition.releaseType) this.$parent.editing = 1 //
this.$parent.setupId = competition.completeCompetitionSetup.setupId
if (competition.signUpStartTime) this.signupTime = [competition.signUpStartTime, competition.signUpEndTime]
if (competition.playStartTime) this.playTime = [competition.playStartTime, competition.playEndTime]
@ -413,6 +419,7 @@ export default {
this.rangeName = range.join(',')
}
this.form = competition
this.$parent.resumeData()
this.$nextTick(() => {
this.updateTime = 0
})

@ -122,7 +122,7 @@
</div>
</div>
</el-form-item>
<el-form-item prop="resultAnnouncementTime" label="成绩公布时间">
<el-form-item prop="rule" label="成绩公布时间">
阶段比赛结束后
<el-input v-model.number="form.competitionStageList[0].resultAnnouncementTime" type="number" style="width: 120px"></el-input>
小时公布阶段比赛成绩
@ -298,69 +298,86 @@ export default {
//
if (next === 2) {
const stages = form.competitionStageList
for (const i in stages) {
const e = stages[i]
if (rule !== 2 && !e.stageName) {
invalid = 1
util.errorMsg('请输入阶段名称')
break
}
const { competitionType, maxTeamSize } = step1.completeCompetitionSetup // 01
// rule: 012
//
if (!rule) {
//
if (form.resultCalculationMethod == 0 && e.pointWeight === '') {
invalid = 1
util.errorMsg('请输入权重')
break
}
pointWeight += e.pointWeight //
} else if (rule === 1) { //
// ()
if (i != stages.length - 1 && e.peopleLimit === '' && e.percentageLimit === '' && e.score === '') {
invalid = 1
util.errorMsg('请至少填写一条晋级规则')
break
}
if (e.score !== '') e.scoreLimit = e.operator + e.score
}
if (rule !== 2 && competitionType && e.teamNumLimitOpt) {
if (e.teamNumLimit === '') {
invalid = 1
util.errorMsg('请输入团队参数人数限制')
break
} else if (e.teamNumLimit < 0) {
invalid = 1
util.errorMsg('团队参数人数不得小于0')
break
} else if (maxTeamSize !== '' && e.teamNumLimit > maxTeamSize) {
invalid = 1
util.errorMsg('团队参数人数不得大于团队人数上限')
break
}
}
if (form.rule === 2) { //
const e = stages[0]
if (!e.resultsDetails) {
if (e.resultAnnouncementTime === '') {
invalid = 1
util.errorMsg('请填写成绩公布时间')
break
return util.errorMsg('请填写成绩公布时间')
}
if (e.resultAnnouncementTime < 0) {
invalid = 1
util.errorMsg('成绩公布时间不得小于0')
break
return util.errorMsg('成绩公布时间不得小于0')
}
if (e.resultAnnouncementTime % 1) {
return util.errorMsg('成绩公布时间须为整数')
}
e.resultAnnouncementTime = +e.resultAnnouncementTime
}
form.competitionStageList = stages.slice(0, 1) //
} else { //
for (const i in stages) {
const e = stages[i]
if (rule !== 2 && !e.stageName) {
invalid = 1
util.errorMsg('成绩公布时间须为整数')
util.errorMsg('请输入阶段名称')
break
}
e.resultAnnouncementTime = +e.resultAnnouncementTime
const { competitionType, maxTeamSize } = step1.completeCompetitionSetup // 01
// rule: 012
//
if (!rule) {
//
if (form.resultCalculationMethod == 0 && e.pointWeight === '') {
invalid = 1
util.errorMsg('请输入权重')
break
}
pointWeight += e.pointWeight //
} else if (rule === 1) { //
// ()
if (i != stages.length - 1 && e.peopleLimit === '' && e.percentageLimit === '' && e.score === '') {
invalid = 1
util.errorMsg('请至少填写一条晋级规则')
break
}
if (e.score !== '') e.scoreLimit = e.operator + e.score
}
if (rule !== 2 && competitionType && e.teamNumLimitOpt) {
if (e.teamNumLimit === '') {
invalid = 1
util.errorMsg('请输入团队参数人数限制')
break
} else if (e.teamNumLimit < 0) {
invalid = 1
util.errorMsg('团队参数人数不得小于0')
break
} else if (maxTeamSize !== '' && e.teamNumLimit > maxTeamSize) {
invalid = 1
util.errorMsg('团队参数人数不得大于团队人数上限')
break
}
}
if (!e.resultsDetails) {
if (e.resultAnnouncementTime === '') {
invalid = 1
util.errorMsg('请填写成绩公布时间')
break
}
if (e.resultAnnouncementTime < 0) {
invalid = 1
util.errorMsg('成绩公布时间不得小于0')
break
}
if (e.resultAnnouncementTime % 1) {
invalid = 1
util.errorMsg('成绩公布时间须为整数')
break
}
e.resultAnnouncementTime = +e.resultAnnouncementTime
}
}
if (invalid) return
if (form.resultCalculationMethod == 0 && !rule && pointWeight > 0 && pointWeight !== 100) return util.errorMsg('权重须等于100,请重新输入')
}
if (invalid) return
if (form.resultCalculationMethod == 0 && !rule && pointWeight > 0 && pointWeight !== 100) return util.errorMsg('权重须等于100,请重新输入')
} else { // 稿
form.competitionStageList = form.competitionStageList.filter(e => e.stageName)
}

@ -79,6 +79,7 @@ export default {
id: this.$route.query.id,
updateTime: 0,
step1: this.$parent.$refs.step1.form,
cache: this.$store.state.match.cache,
nums: ['一', '二', '三'],
methods: [
{
@ -111,7 +112,6 @@ export default {
form: [],
setVisible: false,
curStep: 0,
timeInvalid: false
};
},
components: {
@ -130,6 +130,15 @@ export default {
this.handleForm()
},
methods: {
//
resumeData() {
if (this.cache) {
this.curStep = this.cache.curStep
if (this.cache.form) this.form[this.curStep] = this.cache.form
this.setVisible = true
this.$store.commit('match/setCache', null)
}
},
// form
handleForm() {
// id
@ -148,6 +157,7 @@ export default {
form.stageName = e.stageName
this.form.push(form)
})
this.resumeData()
this.$nextTick(() => {
this.updateTime = 0
})
@ -171,11 +181,7 @@ export default {
const startTime = new Date(val[0])
const endTime = new Date(val[1])
const { playStartTime, playEndTime } = this.step1
if (startTime < new Date(playStartTime) || endTime > new Date(playEndTime)) {
this.timeInvalid = true
return util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
}
this.timeInvalid = false
if (startTime < new Date(playStartTime) || endTime > new Date(playEndTime)) return util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
const { form, curStep } = this
for (const i in form) {
//
@ -206,13 +212,18 @@ export default {
//
if (status) {
let invalid = 0
if (this.timeInvalid) return util.errorMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
const { playStartTime, playEndTime } = this.step1
for (const e of form) {
if (!e.time.length) {
invalid = 1
util.errorMsg('请选择比赛时间')
break
}
if (new Date(e.time[0]) < new Date(playStartTime) || new Date(e.time[1]) > new Date(playEndTime)) {
invalid = 1
util.errorMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
break
}
e.startTime = e.time[0]
e.endTime = e.time[1]
if (e.method !== 2 && !e.cid) {
@ -247,6 +258,11 @@ export default {
util.errorMsg('请输入线下地点')
break
}
if (!e.onlineAddress && !e.offlineAddress) {
invalid = 1
util.errorMsg('请输入比赛地点')
break
}
}
}
if (invalid) return

@ -126,6 +126,7 @@
import util from "@/libs/util";
import Setting from "@/setting";
import { mapMutations } from "vuex";
import { Loading } from 'element-ui'
export default {
name: "match",
@ -227,9 +228,10 @@ export default {
},
methods: {
...mapMutations('match', [
'SET_PAGE'
'setPage'
]),
getList() {
const load = Loading.service()
const { form } = this
this.$post(this.api.competitionPageConditionQueryByOccupationlab, {
pageNum: this.page,
@ -241,6 +243,7 @@ export default {
startTime: form.startTime || null,
publishStatus: form.publishStatus === '' ? null : form.publishStatus
}).then(({ data }) => {
load.close()
const list = data.records
//
this.timer = setInterval(() => {
@ -275,7 +278,9 @@ export default {
this.page--
this.getData()
}
}).catch(res => {})
}).catch(res => {
load.close()
})
},
getData() {
this.getList()
@ -358,7 +363,7 @@ export default {
this.page = val;
this.$router.push(`list?page=${val}`)
this.getData()
this.SET_PAGE(val)
this.setPage(val)
},
transferTime(date, type) {
if (date == "0000-00-00 00:00:00") return "---";

@ -54,7 +54,7 @@
<tr>
<th width="130">指导老师</th>
<td>
<div class="plus">
<div v-if="status < 5" class="plus">
<i class="el-icon-circle-plus-outline icon" @click="addAdvisor"></i>
</div>
<div v-for="(item, i) in info.teamInstructors" :key="i" class="line">
@ -331,10 +331,10 @@ export default {
let status
const n = this.form
let now = new Date().getTime();
let signUpStartTime = new Date(this.dateCompatible(n.signUpStartTime)).getTime(); //
let signUpEndTime = new Date(this.dateCompatible(n.signUpEndTime)).getTime(); //
let playStartTime = new Date(this.dateCompatible(n.playStartTime)).getTime(); //
let playEndTime = new Date(this.dateCompatible(n.playEndTime)).getTime(); //
let signUpStartTime = new Date(util.dateCompatible(n.signUpStartTime)).getTime(); //
let signUpEndTime = new Date(util.dateCompatible(n.signUpEndTime)).getTime(); //
let playStartTime = new Date(util.dateCompatible(n.playStartTime)).getTime(); //
let playEndTime = new Date(util.dateCompatible(n.playEndTime)).getTime(); //
if (now < signUpStartTime) { //
status = 0;
} else if (now > signUpStartTime && now < signUpEndTime) { //
@ -347,6 +347,7 @@ export default {
status = 5;
}
this.status = status
console.log("🚀 ~ file: matchInfo.vue:350 ~ handleStatus ~ status", status)
},
//
edit(showMsg) {

@ -28,11 +28,11 @@
<template slot-scope="scope">
<el-button v-if="!scope.row.operate" type="text" @click="operateIt(scope.row)" v-auth="'/match:管理:竞赛进展:编辑'">编辑</el-button>
<el-button v-else type="text" @click="saveData(scope.row)">保存</el-button>
<el-button type="text" @click="handleDelete(scope.row, scope.$index)" v-auth="'/match:管理:竞赛进展:删除'">删除</el-button>
<el-button type="text" @click="handleDelete(scope.row, scope.$index)" v-auth="'/match/list:管理:竞赛进展:删除'">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="plus" @click="addData" v-auth="'/match:管理:竞赛进展:新增'">
<div class="plus" @click="addData" v-auth="'/match/list:管理:竞赛进展:新增'">
<i class="el-icon-circle-plus-outline"></i>
</div>
</div>

@ -69,23 +69,36 @@
<th width="100">分数</th>
<th width="100">得分详情</th>
</tr>
<tr v-for="(item, i) in teams" :key="i">
<template v-if="!active && item.rowspan">
<td :rowspan="item.rowspan">{{ item.stageName }}</td>
<td :rowspan="item.rowspan">{{ item.teamScore }}</td>
</template>
<td>{{ i + 1 }}</td>
<td>{{ item.userName }}</td>
<td>{{ item.schoolName }}</td>
<td>{{ item.timeSum }}min</td>
<td>{{ item.score }}</td>
<td>
<el-button type="text" @click="toReport(item)">查看</el-button>
</td>
<template v-if="teams.length">
<tr v-for="(item, i) in teams" :key="i">
<template v-if="!active && item.rowspan">
<td :rowspan="item.rowspan">{{ item.stageName }}</td>
<td class="scores" :rowspan="item.rowspan">
<p class="score">{{ item.teamScore }}</p>
<p>{{ item.teamCalculationMethodName }}</p>
<p>权重</p>
<p>{{ item.pointWeight }}%</p>
</td>
</template>
<template v-if="item.accountId">
<td>{{ i + 1 }}</td>
<td>{{ item.userName }}</td>
<td>{{ item.schoolName }}</td>
<td>{{ item.timeSum }}min</td>
<td>{{ item.score }}</td>
<td>
<el-button v-if="item.reportId" type="text" @click="toReport(item)">查看</el-button>
</td>
</template>
<td v-else colspan="6"></td>
</tr>
</template>
<tr v-else>
<td colspan="99">暂无数据</td>
</tr>
<tr v-if="!active">
<tr v-if="!active && teams.length">
<td>综合得分</td>
<td>{{ totalScore }}</td>
<td>{{ curRow.score }}</td>
<td colspan="6">总排名{{ curRow.index }}</td>
</tr>
</table>
@ -144,6 +157,20 @@ export default {
method: this.$route.query.method,
competitionType: +this.$route.query.competitionType,
rule: +this.$route.query.rule,
teamCalculationMethods: [
{
id: 0,
name: '最高分'
},
{
id: 1,
name: '平均分'
},
{
id: 2,
name: '求和'
}
],
headers: {
token: util.local.get(Setting.tokenKey)
},
@ -177,9 +204,11 @@ export default {
//
getData() {
//
this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || ''}&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)
ids.pop()
// >(:(1,0))
whetherToPublish && this.$post(`${this.api.queryPublicationSource}?competitionId=${this.id}&stageId=${this.active || ''}&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 => {})
@ -191,7 +220,6 @@ export default {
getRank(whetherToPublish) {
//
if (whetherToPublish) {
console.log(44, this.active)
this.$post(this.api.manuallyRankTheUploadList, {
pageNum: this.page,
pageSize: this.pageSize,
@ -250,11 +278,13 @@ export default {
},
// tab
tabChange(i) {
this.type = 0
this.active = i
this.initData()
},
//
show(row, i) {
this.teams = []
//
if (this.competitionType == 1) {
row.index = i + 1
@ -275,46 +305,57 @@ export default {
}).catch(res => {})
} else {
const ids = this.grades.map(e => e.stageId)
data.stageIds = ids.splice(0, ids.length - 1)
this.$post(this.api.detailsOfTotalTeamScores, data).then(({ data, resultCalculationMethod }) => {
const result = []
let totalScore = 0
//
data.map(e => {
const team = e.stageTeamInformation
if (team.length) {
//
const method = e.teamCalculationMethod
const scores = team.map(n => +n.score)
let score
//
if (method == 0) { //
score = Math.max(scores)
} else if (method == 1) { //
score = scores.reduce((prev, next) => prev + next) / scores.length
} else { //
score = scores.reduce((prev, next) => prev + next)
}
team[0].teamScore = score
team[0].rowspan = team.length
team.map(n => {
n = Object.assign(n, e)
ids.pop()
data.stageIds = ids.splice(0, this.index + 1)
//
// if (this.published) {
this.$post(this.api.totalRankingScoreDetails, data).then(({ data }) => {
if (data.length) {
const result = []
//
data.map(e => {
const team = e.stageTeamInformation
if (team.length) {
const teamCItem = this.teamCalculationMethods.find(n => n.id == e.teamCalculationMethod)
if (teamCItem) team[0].teamCalculationMethodName = teamCItem.name
team[0].rowspan = team.length
team.map(n => {
n = Object.assign(n, e)
})
result.push(...team)
} else {
e.rowspan = 1
result.push(e)
}
})
// 0 */100
if (e.pointWeight && !resultCalculationMethod) totalScore += score * e.pointWeight / 100
result.push(...team)
this.teams = result
}
})
//
const teamScores = data.map(e => e.teamScore)
if (resultCalculationMethod === 1) { //
totalScore = teamScores.reduce((prev, next) => prev + next)
} else if (resultCalculationMethod === 2) { //
totalScore = teamScores.reduce((prev, next) => prev + next) / teamScores.length
}
this.totalScore = totalScore
this.teams = result
}).catch(res => {})
}).catch(res => {})
// } else { //
// this.$post(this.api.totalRankingScoreDetails, data).then(({ page }) => {
// const list = page.records
// page.records.map((e, i) => {
// if (!list.find(n => n.stageId == e.stageId && n.rowspan)) {
// e.rowspan = list.filter(n => n.stageId == e.stageId).length
// this.$post(this.api.stageTeamScoreDetails, {
// pageNum: 1,
// pageSize: 100,
// competitionId: this.id,
// teamId: row.teamId,
// stageId: e.stageId
// }).then(({ page }) => {
// }).catch(res => {})
// }
// })
// let totalScore = 0
// this.totalScore = totalScore
// this.teams = list
// console.log("🚀 ~ file: matchRank.vue:346 ~ this.$post ~ list", list)
// }).catch(res => {})
// }
}
} else {
this.toReport(row)
@ -340,14 +381,16 @@ export default {
list.map(e => {
e.competitionId = id
e.isOverallRanking = isOverall
if (isOverall) delete e.stageId
// if (isOverall) delete e.stageId
if (isPerson) e.teamId = null // teamIdnull
})
data = list
}
}
const ids = this.grades.map(e => e.stageId)
ids.pop()
//
this.$post(`${this.api.releaseVerification}?competitionId=${this.id}&stageId=${this.active || ''}&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.uploadData = []
this.getData()
@ -391,6 +434,7 @@ export default {
} else {
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.type = 0
this.getData()
util.successMsg('取消发布成功!')
}).catch(res => {})
@ -473,5 +517,13 @@ export default {
text-align: center;
background-color: #f8faff;
}
.scores {
line-height: 1.6;
}
.score {
font-size: 16px;
font-weight: 600;
color: #9076FF;
}
}
</style>

@ -7,7 +7,7 @@
<label>搜索</label>
<el-input placeholder="请输入姓名/手机号/团队名称/学号" prefix-icon="el-icon-search" v-model="keyword" clearable size="mini" style="width: 250px"></el-input>
</li>
<li>
<li v-if="info.releaseType">
<label>参赛人员状态</label>
<el-select v-model="isDisable" @change="initData">
<el-option v-for="(item, i) in statusList" :key="i" :label="item.name" :value="item.id"></el-option>
@ -16,7 +16,7 @@
</ul>
<div>
<el-button type="primary" round @click="add">新增</el-button>
<el-button type="primary" round @click="exportAll" v-auth="'/match:管理:报名人员:导出'">批量导出</el-button>
<el-button type="primary" round @click="exportAll" v-auth="'/match/list:管理:报名人员:批量导出'">批量导出</el-button>
</div>
</div>
@ -29,7 +29,7 @@
</el-table-column>
<el-table-column prop="school" label="学校" sortable="custom">
</el-table-column>
<el-table-column prop="teamName" label="团队名称" sortable="custom">
<el-table-column v-if="info.completeCompetitionSetup.competitionType" prop="teamName" label="团队名称" sortable="custom">
</el-table-column>
<el-table-column prop="username" label="学生姓名">
</el-table-column>
@ -40,15 +40,17 @@
<el-table-column label="操作" align="center" width="320">
<template slot-scope="scope">
<el-button v-if="scope.row.identification" type="text" @click="edit(scope.row)">编辑</el-button>
<el-button type="text" @click="info(scope.row)">参赛信息与成绩</el-button>
<el-switch
v-model="scope.row.isDisable"
:active-text="scope.row.isDisable ? '关' : '开'"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 5px"
@change="switchOff($event,scope.row,scope.$index)"
></el-switch>
<template v-if="info.releaseType">
<el-button type="text" @click="toInfo(scope.row)">参赛信息与成绩</el-button>
<el-switch
v-model="scope.row.isDisable"
:active-text="scope.row.isDisable ? '关' : '开'"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 5px"
@change="switchOff($event,scope.row,scope.$index)"
></el-switch>
</template>
</template>
</el-table-column>
</el-table>
@ -62,7 +64,7 @@
<el-form ref="form" :model="form" :rules="rules" label-width="80px" style='margin-right: 10px;'>
<el-form-item prop="schoolId" label="院校">
<el-select v-model="form.schoolId" filterable style="width: 100%">
<el-option v-for="(item, i) in clients" :key="i" :label="item.customerName" :value="item.schoolId"></el-option>
<el-option v-for="(item, i) in clients" :key="i" :label="item.schoolName" :value="item.schoolId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="workNumber" label="学生学号">
@ -122,6 +124,9 @@ export default {
return {
token: util.local.get(Setting.tokenKey),
id: +this.$route.query.id,
info: {
completeCompetitionSetup: {}
},
isDisable: '',
statusList: [
{
@ -202,6 +207,7 @@ export default {
},
mounted() {
this.initData()
this.getInfo()
this.getClient()
this.getTeam()
},
@ -222,6 +228,12 @@ export default {
}).catch(res => {
});
},
//
getInfo() {
this.$post(`${this.api.getCompetition}?competitionId=${this.id}`).then(({ competition }) => {
this.info = competition
}).catch(err => {})
},
initData() {
this.page = 1
this.getData()
@ -388,14 +400,9 @@ export default {
},
//
getClient() {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '客户管理')
this.$post(this.api.queryCustomer,{
page: 1,
size: 1000,
supplierId: (sid && !sid.all) ? sid.supplierId : ''
}).then(res => {
this.clients = res.message.list
}).catch(res => {})
this.$get(this.api.querySchoolData).then(({ list }) => {
this.clients = list
}).catch(res => {})
},
//
getTeam() {
@ -420,7 +427,7 @@ export default {
}).catch(res => {})
},
//
info(row) {
toInfo(row) {
this.$router.push(`info?id=${this.id}&accountId=${row.accountId}`)
},
exportAll() {

@ -2,7 +2,7 @@
<!-- 报名人员 -->
<div class="page-content" style="padding: 24px">
<div class="tool" style="justify-content: flex-end">
<el-button type="primary" round @click="add" v-auth="'/match:管理:公告通知:新增'">新增</el-button>
<el-button type="primary" round @click="add" v-auth="'/match/list:管理:公告通知:新增'">新增</el-button>
</div>
<el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
@ -24,10 +24,10 @@
</el-table-column>
<el-table-column label="操作" align="center" width="250">
<template slot-scope="scope">
<el-button type="text" @click="edit(scope.row)" v-auth="'/match:管理:公告通知:编辑'">编辑</el-button>
<el-button type="text" @click="del(scope.row)" v-auth="'/match:管理:公告通知:删除'">删除</el-button>
<el-button type="text" @click="edit(scope.row)" v-auth="'/match/list:管理:公告通知:编辑'">编辑</el-button>
<el-button type="text" @click="del(scope.row)" v-auth="'/match/list:管理:公告通知:删除'">删除</el-button>
<el-switch
v-auth="'/match:管理:公告通知:启用'"
v-auth="'/match/list:管理:公告通知:启用'"
v-model="scope.row.isOpen"
:active-text="scope.row.isOpen ? '关' : '开'"
:active-value="0"

@ -38,8 +38,8 @@
</el-upload>
</el-form-item>
<el-form-item>
<el-button v-if="!form.id" @click="save(0)" v-auth="'/match:管理:公告通知:草稿'">草稿</el-button>
<el-button type="primary" @click="save(1)" v-auth="'/match:管理:公告通知:发布'">发布</el-button>
<el-button v-if="!form.id" @click="save(0)" v-auth="'/match/list:管理:公告通知:草稿'">草稿</el-button>
<el-button type="primary" @click="save(1)" v-auth="'/match/list:管理:公告通知:发布'">发布</el-button>
<el-button @click="back">取消</el-button>
</el-form-item>
</el-form>

@ -617,7 +617,7 @@ export default {
location.href = href;
},
permissionChange(){
if (this.projectManage.permissions == 1){
if (this.projectManage.permissions){
this.projectManage.hintOpen = 1
}else{
this.projectManage.hintOpen = 0

@ -281,7 +281,7 @@
</thead>
</table>
</div>
<div class="main_table" style="margin-top: 0;overflow: auto">
<div class="main_table" ref="ach" style="max-height: 520px;margin-top: 0;overflow: hidden">
<table>
<tbody>
<tr v-for="(item, i) in achs" :key="i">
@ -1017,13 +1017,13 @@ export default {
//
scrollTable() {
const dom = this.$refs.popularCourses
// const dom1 = this.$refs.gdpList
const dom1 = this.$refs.ach
setInterval(() => {
dom.scrollTop += 1
if (dom.clientHeight + dom.scrollTop === dom.scrollHeight) dom.scrollTop = 0
// dom1.scrollTop += 1
// if (dom1.clientHeight + dom1.scrollTop === dom1.scrollHeight) dom1.scrollTop = 0
dom1.scrollTop += 1
if (dom1.clientHeight + dom1.scrollTop === dom1.scrollHeight) dom1.scrollTop = 0
}, 30)
}
}

@ -26,7 +26,7 @@ if (isPro) {
uploadURL = `http://121.37.12.51/`
host = "http://121.37.12.51/"; // 中台测试服
// host = 'https://www.occupationlab.com/' // 正式服
host = "http://192.168.31.51:9000/"; // 榕
// host = "http://192.168.31.51:9000/"; // 榕
host = 'http://192.168.31.116:9000/'; // 赓
}

@ -4,11 +4,15 @@
export default {
namespaced: true,
state: {
page: 1
page: 1,
cache: null
},
mutations: {
SET_PAGE: (state, page) => {
setPage: (state, page) => {
state.page = page
},
setCache: (state, cache) => {
state.cache = cache
}
},
actions: {

Loading…
Cancel
Save