赛事相关

dev_review
yujialong 7 months ago
parent effa4606b7
commit d820cb0e8b
  1. 6
      package-lock.json
  2. 1
      package.json
  3. 3
      src/setting.js
  4. 1
      src/utils/api.js
  5. 2
      src/views/match/add/step1.vue
  6. 18
      src/views/match/add/step2.vue
  7. 2
      src/views/match/list/index.vue
  8. 1
      src/views/match/manage/matchArch.vue
  9. 24
      src/views/match/manage/matchArchList.vue
  10. 63
      src/views/match/manage/matchRank.vue
  11. 67
      src/views/match/manage/matchSignup.vue
  12. 2
      src/views/serve/projectAdd.vue

6
package-lock.json generated

@ -9739,9 +9739,9 @@
} }
}, },
"lodash": { "lodash": {
"version": "4.17.15", "version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
}, },
"lodash._basecopy": { "lodash._basecopy": {
"version": "3.0.1", "version": "3.0.1",

@ -23,6 +23,7 @@
"image-webpack-loader": "^8.1.0", "image-webpack-loader": "^8.1.0",
"js-cookie": "^3.0.1", "js-cookie": "^3.0.1",
"jszip": "^3.10.1", "jszip": "^3.10.1",
"lodash": "^4.17.21",
"mavon-editor": "^2.10.4", "mavon-editor": "^2.10.4",
"postcss-px2rem": "^0.3.0", "postcss-px2rem": "^0.3.0",
"px2rem-loader": "^0.1.9", "px2rem-loader": "^0.1.9",

@ -6,7 +6,7 @@ const isDev = process.env.NODE_ENV === 'development' // 开发环境
const isPro = url.includes('huorantech.cn') //正式服 const isPro = url.includes('huorantech.cn') //正式服
let jumpPath = `${location.origin}/judgmentPoint/` let jumpPath = `${location.origin}/judgmentPoint/`
let sandPath = `https://izhixinyun.com/sandbox` // 沙盘地址 let sandPath = `http://121.37.12.51/sandbox` // 沙盘地址
let host = `${location.origin}/` let host = `${location.origin}/`
if (isDev) { if (isDev) {
jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统 jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统
@ -16,6 +16,7 @@ if (isDev) {
// host = 'https://huorantech.cn/' // host = 'https://huorantech.cn/'
host = 'http://192.168.31.217:9000/' host = 'http://192.168.31.217:9000/'
} else if (isPro) { } else if (isPro) {
sandPath = `https://izhixinyun.com/sandbox`
jumpPath = 'https://judgment.huorantech.cn/' jumpPath = 'https://judgment.huorantech.cn/'
} }

@ -373,6 +373,7 @@ export default {
cancelParticipant: `competition/competition/teamParticipant/cancelParticipant`, cancelParticipant: `competition/competition/teamParticipant/cancelParticipant`,
schoolsInCompetitionArea: `competition/competition/range/schoolsInCompetitionArea`, schoolsInCompetitionArea: `competition/competition/range/schoolsInCompetitionArea`,
batchDeleteApplicants: `competition/competition/registration/batchDeleteApplicants`, batchDeleteApplicants: `competition/competition/registration/batchDeleteApplicants`,
deleteAllData: `competition/competition/registration/deleteAllData`,
batchImportPersonalData: `${host}competition/competition/registration/batchImportPersonalData`, batchImportPersonalData: `${host}competition/competition/registration/batchImportPersonalData`,
batchImportTeamData: `${host}competition/competition/registration/batchImportTeamData`, batchImportTeamData: `${host}competition/competition/registration/batchImportTeamData`,
TeamDataExportFailure: `${host}competition/competition/registration/exportFailure`, TeamDataExportFailure: `${host}competition/competition/registration/exportFailure`,

@ -565,7 +565,7 @@ export default {
provinceId: e.provinceId || '', provinceId: e.provinceId || '',
cityId: e.cityId || '', cityId: e.cityId || '',
schoolId: e.schoolId || '', schoolId: e.schoolId || '',
type: e.schoolId ? 0 : 1 type: e.schoolId ? 0 : (e.cityId ? 1 : 2)
}) })
}) })
this.form.competitionRangeList = data this.form.competitionRangeList = data

@ -85,6 +85,7 @@
:label="1">自定义</el-radio> :label="1">自定义</el-radio>
<el-input v-model.number="item.customNumber" <el-input v-model.number="item.customNumber"
type="number" type="number"
min="0"
style="width: 150px;" style="width: 150px;"
:disabled="item.teamNumLimit === 0"></el-input> :disabled="item.teamNumLimit === 0"></el-input>
<span class="tips">可限制本阶段单个团队的出战人数</span> <span class="tips">可限制本阶段单个团队的出战人数</span>
@ -110,6 +111,7 @@
本阶段成绩排名前 本阶段成绩排名前
<el-input v-model.number="item.peopleLimit" <el-input v-model.number="item.peopleLimit"
type="number" type="number"
min="0"
style="width: 100px"></el-input> style="width: 100px"></el-input>
可晋级下一阶段比赛 可晋级下一阶段比赛
</div> </div>
@ -117,6 +119,7 @@
本阶段成绩排名前 本阶段成绩排名前
<el-input v-model.number="item.percentageLimit" <el-input v-model.number="item.percentageLimit"
type="number" type="number"
min="0"
style="width: 100px"></el-input> style="width: 100px"></el-input>
%可晋级下一阶段比赛 %可晋级下一阶段比赛
</div> </div>
@ -131,6 +134,7 @@
</el-select> </el-select>
<el-input v-model="item.score" <el-input v-model="item.score"
type="number" type="number"
min="0"
style="width: 100px"></el-input> style="width: 100px"></el-input>
可晋级下一阶段比赛 可晋级下一阶段比赛
</div> </div>
@ -142,6 +146,7 @@
占总成绩权重 占总成绩权重
<el-input v-model.number="item.pointWeight" <el-input v-model.number="item.pointWeight"
type="number" type="number"
min="0"
:disabled="form.resultCalculationMethod != 0" :disabled="form.resultCalculationMethod != 0"
style="width: 150px;"></el-input> % style="width: 150px;"></el-input> %
</div> </div>
@ -150,6 +155,7 @@
阶段比赛结束后 阶段比赛结束后
<el-input v-model.number="item.resultAnnouncementTime" <el-input v-model.number="item.resultAnnouncementTime"
type="number" type="number"
min="0"
style="width: 120px"></el-input> style="width: 120px"></el-input>
小时公布阶段比赛成绩 小时公布阶段比赛成绩
</div> </div>
@ -195,6 +201,7 @@
阶段比赛结束后 阶段比赛结束后
<el-input v-model.number="form.competitionStageList[0].resultAnnouncementTime" <el-input v-model.number="form.competitionStageList[0].resultAnnouncementTime"
type="number" type="number"
min="0"
style="width: 120px"></el-input> style="width: 120px"></el-input>
小时公布阶段比赛成绩 小时公布阶段比赛成绩
</el-form-item> </el-form-item>
@ -216,8 +223,8 @@
<script> <script>
import util from "@/libs/util"; import util from "@/libs/util";
import quill from "@/components/quill";
import Const from '@/const/match' import Const from '@/const/match'
import _ from 'lodash'
export default { export default {
props: ['setupId', 'editing'], props: ['setupId', 'editing'],
data () { data () {
@ -374,7 +381,7 @@ export default {
}, },
// //
save (status, next = 0) { save (status, next = 0) {
let { form } = this const form = _.cloneDeep(this.form)
const { rule } = form const { rule } = form
let invalid = 0 let invalid = 0
let pointWeight = 0 let pointWeight = 0
@ -409,7 +416,7 @@ export default {
// //
if (!rule) { if (!rule) {
// //
if (form.resultCalculationMethod == 0 && e.pointWeight === '') { if (form.resultCalculationMethod == 0 && (e.pointWeight === '' || e.pointWeight === undefined)) {
invalid = 1 invalid = 1
util.errorMsg('请输入权重') util.errorMsg('请输入权重')
break break
@ -425,7 +432,7 @@ export default {
if (e.score !== '') e.scoreLimit = e.operator + e.score if (e.score !== '') e.scoreLimit = e.operator + e.score
} }
if (rule !== 2 && competitionType && e.teamNumLimit) { if (rule !== 2 && competitionType && e.teamNumLimit) {
if (e.customNumber === '') { if (e.customNumber === '' || e.customNumber === undefined) {
invalid = 1 invalid = 1
util.errorMsg('请输入团队参数人数限制') util.errorMsg('请输入团队参数人数限制')
break break
@ -439,7 +446,7 @@ export default {
break break
} }
} }
if (e.resultsDetails === 0 && e.resultAnnouncementTime !== '') { if (e.resultsDetails === 0 && (e.resultAnnouncementTime !== '' && e.resultAnnouncementTime !== undefined)) {
if (e.resultAnnouncementTime < 0) { if (e.resultAnnouncementTime < 0) {
invalid = 1 invalid = 1
util.errorMsg('成绩公布时间不得小于0') util.errorMsg('成绩公布时间不得小于0')
@ -453,6 +460,7 @@ export default {
e.resultAnnouncementTime = +e.resultAnnouncementTime e.resultAnnouncementTime = +e.resultAnnouncementTime
} }
if (e.teamNumLimit && e.customNumber) customNumber += e.customNumber // if (e.teamNumLimit && e.customNumber) customNumber += e.customNumber //
if (!e.teamNumLimit) e.customNumber = ''
} }
if (invalid) return if (invalid) return
if (form.teamLimit && competitionType) { if (form.teamLimit && competitionType) {

@ -104,7 +104,7 @@
width="90" width="90"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.setup ? (scope.row.setup.competitionType ? '团队赛' : '个人赛') : '' }} {{ scope.row.competitionType ? '团队赛' : '个人赛' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="founderName" <el-table-column prop="founderName"

@ -36,6 +36,7 @@
label="状态" label="状态"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column label="竞赛起止时间" <el-table-column label="竞赛起止时间"
width="290"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.startTime + ' ~ ' + scope.row.endTime }} {{ scope.row.startTime + ' ~ ' + scope.row.endTime }}

@ -459,30 +459,28 @@ export default {
}); });
}, },
delAllData () { // delAllData () { //
if (this.multipleSelection.length) { const list = this.multipleSelection
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", { this.$confirm(list.length ? '该项目下的所有成绩报告将会删除,是否继续?' : '是否确定删除列表所有成绩数据?', "提示", {
type: "warning" type: "warning"
}).then(async () => { }).then(async () => {
let ids = this.multipleSelection.map(item => { let ids = []
if (list.length) {
ids = list.map(item => {
return this.method == 2 ? item.scoreId : item.reportId return this.method == 2 ? item.scoreId : item.reportId
}); });
ids = ids.filter(e => e) ids = ids.filter(e => e)
if (ids.length) { }
await this.$post(this.api.batchDeleteContestGrade, { const data = {
ids,
competitionId: this.id, competitionId: this.id,
stageId: this.stageId stageId: this.stageId
}) }
if (list.length) data.ids = ids
await this.$post(this.api.batchDeleteContestGrade, data)
this.multipleSelection = []; this.multipleSelection = [];
this.$refs.table.clearSelection(); this.$refs.table.clearSelection();
util.successMsg("删除成功"); util.successMsg("删除成功");
this.getData(); this.getData();
} }).catch(() => { });
}).catch(() => {
});
} else {
util.errorMsg("请先选择数据 !");
}
}, },
handleSelectionChange (val) { // handleSelectionChange (val) { //
this.multipleSelection = val; this.multipleSelection = val;

@ -46,7 +46,7 @@
type="primary" type="primary"
@click="cancelPublish(1)">发布排名</el-button> @click="cancelPublish(1)">发布排名</el-button>
<template v-else> <template v-else>
<span style="margin-right: 10px">{{ publishTime }}发布排名</span> <span style="margin-right: 10px;white-space: nowrap;">{{ publishTime }}发布排名</span>
<el-button type="primary" <el-button type="primary"
@click="cancelPublish(0)">取消发布</el-button> @click="cancelPublish(0)">取消发布</el-button>
</template> </template>
@ -606,44 +606,15 @@ export default {
}).catch(res => { }) }).catch(res => { })
}, },
// //
publishSubmit () { async publishSubmit () {
if (this.type) { // await this.$post(this.api.publishRanking, {
this.$post(this.api.batchRelease, this.list.map(e => e.id)).then(res => { competitionId: this.id,
// this.getData() isOverallRanking: this.active ? 0 : 1,
// util.successMsg('') publicationType: this.type,
}).catch(res => { }) releaseTime: util.formatDate("yyyy-MM-dd hh:mm:ss", this.publishTime),
} else { stageId: this.active || this.stageId,
let data = [] // data
if (!this.type) { //
//
const { list, id } = this
const isOverall = this.active ? 0 : 1
if (list.length) {
const isPerson = this.competitionType == 0
list.map(e => {
e.competitionId = id
e.isOverallRanking = isOverall
e.stageId = this.stageId
// if (isOverall) delete e.stageId
if (isPerson) e.teamId = null // teamIdnull
})
data = list
}
}
data.forEach(e => {
e.publicationType = this.type
}) })
const ids = this.grades.map(e => e.stageId)
ids.pop()
//
// 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.uploadData = []
// this.getData()
// util.successMsg('')
}).catch(res => { })
// }).catch(res => {})
}
}, },
// //
publish () { publish () {
@ -682,13 +653,13 @@ export default {
if (Date.now() <= new Date(endTime)) return util.errorMsg('当前阶段还在进行中,请在本阶段结束后再发布!') if (Date.now() <= new Date(endTime)) return util.errorMsg('当前阶段还在进行中,请在本阶段结束后再发布!')
this.publishSubmit() this.publishSubmit()
await this.$post(this.api.addCompetitionStageRankingTime, { // await this.$post(this.api.addCompetitionStageRankingTime, {
competitionId: this.id, // competitionId: this.id,
isOverallRanking: this.active ? 0 : 1, // isOverallRanking: this.active ? 0 : 1,
publicationType: this.type, // publicationType: this.type,
stageId: this.active || this.stageId, // stageId: this.active || this.stageId,
releaseTime: util.formatDate("yyyy-MM-dd hh:mm:ss", this.publishTime) // releaseTime: util.formatDate("yyyy-MM-dd hh:mm:ss", this.publishTime)
}) // })
util.successMsg('发布成功') util.successMsg('发布成功')
this.getData() this.getData()
@ -719,7 +690,7 @@ export default {
// if (this.timeId) { // if (this.timeId) {
// await this.$post(`${this.api.cancelCompetitionStageRankingTime}?competitionId=${this.id}&releaseId=${this.timeId}&isOverallRanking=${this.active ? 0 : 1}&stageId=${this.active || this.stageId}`) // await this.$post(`${this.api.cancelCompetitionStageRankingTime}?competitionId=${this.id}&releaseId=${this.timeId}&isOverallRanking=${this.active ? 0 : 1}&stageId=${this.active || this.stageId}`)
// } else { // } else {
await this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}&releaseId=${this.timeId}`) await this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}&releaseId=${this.timeId}&publicationType=${this.type}`)
// } // }
this.sourceType = '' this.sourceType = ''
this.type = 0 this.type = 0
@ -784,7 +755,7 @@ export default {
async beforeUpload (file) { async beforeUpload (file) {
this.uploading = true this.uploading = true
if (this.list.length) { if (this.list.length) {
await this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}&releaseId=${this.timeId}`) await this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}&releaseId=${this.timeId}&publicationType=${this.type}`)
} }
}, },
beforeRemove (file, fileList) { beforeRemove (file, fileList) {

@ -72,23 +72,11 @@
label="学生账号归属" label="学生账号归属"
sortable="custom" sortable="custom"
min-width="180" min-width="180"
align="center"> align="center"></el-table-column>
<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" <el-table-column prop="realSchool"
label="学生所属院校" label="学生所属院校"
min-width="180" min-width="180"
align="center"> align="center"></el-table-column>
<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" <el-table-column v-if="info.completeCompetitionSetup.competitionType"
prop="teamName" prop="teamName"
label="团队名称" label="团队名称"
@ -151,7 +139,7 @@
@click="toInfo(scope.row)">参赛信息与成绩</el-button> @click="toInfo(scope.row)">参赛信息与成绩</el-button>
<el-switch v-auth="'/match:管理:报名人员:禁用'" <el-switch v-auth="'/match:管理:报名人员:禁用'"
v-model="scope.row.isDisable" v-model="scope.row.isDisable"
:active-text="scope.row.isDisable ? '关' : '开'" :active-text="scope.row.isDisable ? '禁用' : '启用'"
:active-value="0" :active-value="0"
:inactive-value="1" :inactive-value="1"
style="margin: 0 10px 0 5px" style="margin: 0 10px 0 5px"
@ -199,7 +187,7 @@
<el-select v-model="form.studentAffiliatedInstitutionId" <el-select v-model="form.studentAffiliatedInstitutionId"
filterable filterable
style="width: 100%"> style="width: 100%">
<el-option v-for="(item, i) in clients" <el-option v-for="(item, i) in schools"
:key="i" :key="i"
:label="item.schoolName" :label="item.schoolName"
:value="item.schoolId"></el-option> :value="item.schoolId"></el-option>
@ -381,6 +369,7 @@ export default {
schoolOrder: '', schoolOrder: '',
teamOrder: '', teamOrder: '',
clients: [], clients: [],
schools: [],
addVisible: false, addVisible: false,
formEnable: true, formEnable: true,
isAdd: false, isAdd: false,
@ -769,16 +758,32 @@ export default {
this.teamVisible = true this.teamVisible = true
}, },
// //
getClient () { async getClient () {
if (this.info.competitionScope === 2) { // if (this.info.competitionScope === 2) {
//
this.$get(`${this.api.schoolsInCompetitionArea}?competitionId=${this.id}`).then(({ schools }) => { this.$get(`${this.api.schoolsInCompetitionArea}?competitionId=${this.id}`).then(({ schools }) => {
this.clients = schools this.clients = schools
}).catch(res => { }) }).catch(res => { })
} else { // } else {
this.$get(this.api.querySchoolData).then(({ list }) => { //
const sid = this.$store.state.dataPer.find(e => e.permissionName === '客户管理')
this.$post(this.api.queryCustomer, {
customerType: '',
page: 1,
size: 10000,
supplierId: (sid && !sid.all) ? sid.supplierId : ''
}).then(res => {
const { list } = res.message
list.map(e => {
e.schoolName = e.customerName
})
this.clients = list this.clients = list
}).catch(res => { }) }).catch(res => { })
} }
//
this.$get(this.api.querySchoolData).then(({ list }) => {
this.schools = list
}).catch(res => { })
}, },
// //
getTeam () { getTeam () {
@ -843,23 +848,21 @@ export default {
} }
}, },
// //
batchDel () { async batchDel () {
const list = this.multipleSelection const list = this.multipleSelection
if (list.length) { const tips = list.length ? (this.info.completeCompetitionSetup.competitionType && list.find(e => e.captain === '是') ? '删除队长后,该团队下所有成员都会同步移除报名,是否确认删除?' : '此删除操作不可逆,是否确认删除选中项?') : '是否确定删除全部报名人员?'
this.$confirm(this.info.completeCompetitionSetup.competitionType && list.find(e => e.captain === '是') ? '删除队长后,该团队下所有成员都会同步移除报名,是否确认删除?' : '此删除操作不可逆,是否确认删除选中项?', "提示", { this.$confirm(tips, "提示", {
type: "warning" type: "warning"
}).then(() => { }).then(async () => {
this.$post(this.api.batchDeleteApplicants, { registrationVOS: list }).then(res => { if (list.length) {
await this.$post(this.api.batchDeleteApplicants, { registrationVOS: list })
} else {
await this.$post(`${this.api.deleteAllData}?competitionId=${this.id}`)
}
this.init() this.init()
this.$message.success("删除成功"); this.$message.success("删除成功");
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
}).catch(err => { }).catch(() => { });
});
}).catch(() => {
});
} else {
this.$message.warning("请先选择数据 !");
}
}, },
} }
}; };

@ -767,7 +767,7 @@ export default {
this.judgementpointsquery = ""; this.judgementpointsquery = "";
this.dialogVisible = false; this.dialogVisible = false;
let tempArr = this.selectedJudgment.map(i => { let tempArr = this.selectedJudgment.map(i => {
i.score = 0; this.$set(i, 'score', 0)
return i; return i;
}); });
this.projectJudgmentData = this.projectJudgmentData.concat(tempArr); this.projectJudgmentData = this.projectJudgmentData.concat(tempArr);

Loading…
Cancel
Save