赛事相关

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": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"lodash._basecopy": {
"version": "3.0.1",

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save