dev_202303
yujialong 2 years ago
parent 048d68dfd6
commit 0da27c54c3
  1. 2
      src/setting.js
  2. 6
      src/store/index.js
  3. 6
      src/utils/api.js
  4. 8
      src/views/course/AddCurriculum.vue
  5. 9
      src/views/match/add/index.vue
  6. 32
      src/views/match/add/set.vue
  7. 6
      src/views/match/add/step1.vue
  8. 21
      src/views/match/add/step2.vue
  9. 25
      src/views/match/add/step3.vue
  10. 7
      src/views/match/list/index.vue
  11. 2
      src/views/match/manage/matchInfo.vue
  12. 136
      src/views/match/manage/matchRank.vue
  13. 15
      src/views/match/manage/matchSignup.vue
  14. 3
      src/views/serve/projectList.vue

@ -11,7 +11,7 @@ if (isDev) {
jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统
host = 'http://121.37.12.51/'
// host = 'https://huorantech.cn/'
// host = 'http://192.168.31.51:9000/'// 榕
host = 'http://192.168.31.51:9000/'// 榕
// host = 'http://192.168.31.116:9000/'// 赓
} else if (isPro) {
jumpPath = 'https://www.huorantech.cn/judgmentPoint/'

@ -27,7 +27,8 @@ const store = new Vuex.Store({
columnId: '',
tabId: '1',
dataPer: [],
orderParam: null
orderParam: null,
competitionCache: null
},
actions: {
setSystemId({ state,commit },systemId) {
@ -107,6 +108,9 @@ const store = new Vuex.Store({
setOrderParam: (state, orderParam) => {
state.orderParam = orderParam
},
setCompetitionCache: (state, param) => {
state.competitionCache = param
},
}
});

@ -337,7 +337,7 @@ export default {
disableContests: `competition/competition/registration/disableContests`,
disableRegistration: `competition/competition/registration/disableRegistration`,
excelExport: `${host}competition/competition/registration/excelExport`,
exportDataInBatches: `competition/competition/registration/exportDataInBatches`,
exportDataInBatches: `${host}competition/competition/registration/exportDataInBatches`,
queryRegistrationByCondition: `competition/competition/registration/queryRegistrationByCondition`,
searchTeam: `competition/competition/team/searchTeam`,
joinCompetitionTeam: `competition/competition/team/joinCompetitionTeam`,
@ -383,6 +383,10 @@ export default {
queryPublicationSource: `competition/competition/rank/queryPublicationSource`,
releaseVerification: `competition/competition/rank/releaseVerification`,
totalRankingScoreDetails: `competition/competition/rank/totalRankingScoreDetails`,
batchRelease: `competition/competition/rank/batchRelease`,
manuallyUploadedRankings: `competition/competition/rank/manuallyUploadedRankings`,
toggleTheSortingMode: `competition/competition/rank/toggleTheSortingMode`,
selectTheLastSortStatus: `competition/competition/rank/selectTheLastSortStatus`,
gradeImport: `http://121.37.12.51/template/赛事成绩导入模板.xlsx`,
rankImportTeam: `http://121.37.12.51/template/赛事排名导入模板(团队赛).xlsx`,
rankImportPerson: `http://121.37.12.51/template/赛事排名导入模板(个人赛).xlsx`,

@ -583,6 +583,12 @@ export default {
if (!systemsAll.find(n => n.systemId == e.systemId)) e.disabled = true
})
this.assessmentData = aList
const cList = data.competitionConfig
cList.map(e => {
if (!systemsAll.find(n => n.systemId == e.systemId)) e.disabled = true
})
this.matches = cList
});
}).catch(err => {
});
@ -704,7 +710,7 @@ export default {
this.configVisible = true;
this.pageNo = 1;
this.getConfig();
this.checkeds = JSON.parse(JSON.stringify(type ? this.assessmentData : this.practiceData))
this.checkeds = JSON.parse(JSON.stringify(type == 1 ? this.assessmentData : type == 2 ? this.matches : this.practiceData))
},
//
getConfig() {

@ -73,6 +73,7 @@ export default {
data() {
return {
id: this.$route.query.id || '',
cache: this.$store.state.competitionCache,
publishStatus: 0,
competitionId: '',
step: 1,
@ -96,6 +97,14 @@ export default {
},
methods: {
//
resumeData() {
if (this.cache) {
this.step = 3
this.editing = true
this.showBtns = false
}
},
// loading
showLoad() {
this.loadIns = Loading.service()

@ -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,6 +142,7 @@ export default {
methods: {
//
getCourse() {
this.loadIns = Loading.service()
const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理')
this.$post(this.api.curriculumList, {
isShelves: 1,
@ -149,15 +152,18 @@ export default {
}).then(({ page }) => {
const list = page.records
this.curriculumList = page.records
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()
},
//
@ -172,7 +178,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;
@ -182,6 +191,17 @@ export default {
this.page = val;
this.getProject();
},
//
toProject() {
this.$store.commit('setCompetitionCache', {
form: this.form,
curStep: this.$parent.curStep
})
const item = this.curriculumList.find(e => e.cid == this.form.cid) || {} // id
let systemId = item.sysId || '1'
systemId = systemId.split(',')[0] // id
this.$router.push(`/projectList?systemId=${systemId}&show=1&name=${item.sysName.split(',')[0]}`)
},
//
timeChange(val) {
if (val.length) {
@ -215,6 +235,8 @@ export default {
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)
if (systemId) form.systemId = systemId
if (projectName) form.projectName = projectName

@ -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,
@ -414,11 +414,13 @@ export default {
if (rangeName) {
const range = []
rangeName.map(e => {
range.push(e.type ? (e.cityName || e.provinceName) : e.schoolName)
const name = e.type ? (e.cityName || e.provinceName) : e.schoolName
range.push(name)
})
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>
小时公布阶段比赛成绩
@ -302,7 +302,23 @@ export default {
const { step1 } = this
//
if (next === 2) {
const stages = form.competitionStageList
let stages = form.competitionStageList
if (form.rule === 2) { //
const e = stages[0]
if (!e.resultsDetails) {
if (e.resultAnnouncementTime === '') {
return util.errorMsg('请填写成绩公布时间')
}
if (e.resultAnnouncementTime < 0) {
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) {
@ -366,6 +382,7 @@ export default {
}
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.competitionCache,
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('setCompetitionCache', 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) {

@ -130,6 +130,7 @@
<script>
import util from "@/libs/util";
import Setting from "@/setting";
import { Loading } from 'element-ui'
export default {
name: "match",
data() {
@ -250,6 +251,7 @@ export default {
},
methods: {
getList() {
const load = Loading.service()
const { form } = this
this.$post(this.api.CompetitionPageConditionQueryByNakadai, {
pageNum: this.page,
@ -260,6 +262,7 @@ export default {
platformSource: form.platformSource === '' ? null : form.platformSource,
startTime: form.startTime || null,
}).then(({ data }) => {
load.close()
const list = data.records
//
this.timer = setInterval(() => {
@ -291,7 +294,9 @@ export default {
this.page--
this.getData()
}
}).catch(res => {})
}).catch(res => {
load.close()
})
},
getData() {
this.getList()

@ -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">

@ -20,8 +20,9 @@
<el-button type="primary" :disabled="type === 0" class="ml20" @click="batchImport">上传文件</el-button>
</div>
<div>
<el-button v-if="(type && uploadData.length) || (!type && !published) || (!type && sourceType == 1)" type="primary" @click="cancelPublish(1)">发布排名</el-button>
<el-button v-if="published && ((!type && sourceType === '0') || (type && sourceType == 1))" type="primary" @click="cancelPublish(0)">取消发布</el-button>
<!-- <el-button v-if="(type && uploadData.length) || (!type && !published) || (!type && sourceType == 1)" type="primary" @click="cancelPublish(1)">发布排名</el-button> -->
<el-button v-if="!published" type="primary" @click="cancelPublish(1)">发布排名</el-button>
<el-button v-else type="primary" @click="cancelPublish(0)">取消发布</el-button>
</div>
</div>
<el-table :data="list" class="table" ref="table" stripe header-align="center">
@ -204,33 +205,58 @@ export default {
//
getData() {
//
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 || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => {
// 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 || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => {
// this.sourceType = source
// this.type = source == 1 ? 1 : 0
// }).catch(res => {})
// this.published = whetherToPublish
// this.getRank(whetherToPublish)
// }).catch(res => {})
// this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&publicationType=${this.type}`).then(({ whetherToPublish }) => {
// const ids = this.grades.map(e => e.stageId)
// ids.pop()
// // >(:(1,0))
// whetherToPublish ?
// this.$post(`${this.api.selectTheLastSortStatus}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => {
// this.sourceType = source
// this.type = source == 1 ? 1 : 0
// this.getRank(whetherToPublish)
// }).catch(res => {}) :
// this.getRank()
// this.published = whetherToPublish
// }).catch(res => {})
this.$post(`${this.api.selectTheLastSortStatus}?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 => {})
this.published = whetherToPublish
this.getRank(whetherToPublish)
this.getRank()
}).catch(res => {})
},
//
getRank(whetherToPublish) {
//
if (whetherToPublish) {
this.$post(this.api.manuallyRankTheUploadList, {
getRank() {
//
if (this.type) {
this.$post(this.api.manuallyUploadedRankings, {
pageNum: this.page,
pageSize: this.pageSize,
competitionId: this.id,
isOverallRanking: this.active ? 0 : 1,
stageId: this.active || ''
}).then(({ message }) => {
stageId: this.active || this.stageId
}).then(({ message, publishStatus }) => {
// isRelease 01
this.published = publishStatus
this.sourceType = message.total ? message.records[0].isRelease : 0
this.list = message.records
this.total = message.total
}).catch(res => {})
} else { //
} else { //
if (!this.active) {
//
const ids = this.grades.map(e => e.stageId)
@ -238,13 +264,16 @@ export default {
pageNum: this.page,
pageSize: this.pageSize,
competitionId: this.id,
publicationType: this.type,
stageIds: ids.splice(0, ids.length - 1)
}).then(({ page }) => {
}).then(({ page, publishStatus }) => {
this.published = publishStatus
this.list = page
this.total = total
}).catch(res => {})
} else { //
this.$post(`${this.api.stageRaceRanking}?competitionId=${this.id}&stageId=${this.active}&pageNum=${this.page}&pageSize=${this.pageSize}`).then(({ page, total }) => {
this.$post(`${this.api.stageRaceRanking}?competitionId=${this.id}&stageId=${this.active}&pageNum=${this.page}&pageSize=${this.pageSize}&publicationType=${this.type}`).then(({ page, total, publishStatus }) => {
this.published = publishStatus
this.list = page
this.total = total
}).catch(res => {})
@ -270,7 +299,14 @@ export default {
},
//
typeChange(val) {
this.getRank(val)
this.$post(`${this.api.toggleTheSortingMode}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&whetherToManuallyPublish=${this.type}`).then(res => {}).catch(res => {})
// this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&publicationType=${this.type}`).then(({ whetherToPublish }) => {
// if (whetherToPublish && !val) this.sourceType = '0'
this.getRank()
// this.published = whetherToPublish
// }).catch(res => {})
},
initData() {
this.page = 1
@ -278,6 +314,7 @@ export default {
},
// tab
tabChange(i) {
this.type = 0
this.active = i
this.initData()
},
@ -370,7 +407,13 @@ export default {
},
//
publishSubmit() {
let data = this.uploadData // data
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
@ -386,31 +429,46 @@ export default {
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.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 => {})
// }).catch(res => {})
}
},
//
publish() {
//
if (this.published && this.sourceType != this.type) {
this.$confirm(this.sourceType == 1 && !this.type ?
'手动排名已发布,是否要取消手动排名的内容,改为系统排名的内容?' :
'默认系统排名已发布,是否要取消系统排名的内容,改为手动发布的内容?', '提示', {
// if (this.published && this.sourceType != this.type) {
// this.$confirm(this.sourceType == 1 && !this.type ?
// '' :
// '', '', {
// type: 'success'
// }).then(() => {
// this.publishSubmit()
// }).catch(() => {})
// } else {
// this.publishSubmit()
// }
this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&publicationType=${this.type}`).then(({ whetherToPublish }) => {
whetherToPublish ?
this.$confirm('排名已经发布,是否直接覆盖?', '提示', {
type: 'success'
}).then(() => {
this.publishSubmit()
}).catch(() => {})
} else {
}).catch(() => {}) :
this.publishSubmit()
}
}).catch(res => {})
// this.publishSubmit()
},
//
cancelPublish(publish) {
@ -423,16 +481,19 @@ export default {
//
//
if (publish) {
this.$post(this.api.deleteLastPublication, {
competitionId: this.id,
isOverallRanking: this.active ? 0 : 1,
stageIds: this.active ? [this.active] : stageIds
}).then(res => {
// this.type ?
this.publish()
}).catch(res => {})
// this.$post(this.api.deleteLastPublication, {
// competitionId: this.id,
// isOverallRanking: this.active ? 0 : 1,
// stageIds: this.active ? [this.active] : stageIds
// }).then(res => {
// this.publish()
// }).catch(res => {})
} 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 => {})
@ -493,7 +554,8 @@ export default {
},
uploadSure() {
this.importVisible = false
this.list = this.uploadData
// this.list = this.uploadData
this.getRank()
this.uploadData.length && util.successMsg('请检查数据后,点击发布排名以发布数据!')
}
}

@ -41,7 +41,7 @@
<template slot-scope="scope">
<el-button type="text" @click="edit(scope.row)">编辑</el-button>
<template v-if="info.releaseType">
<el-button type="text" @click="info(scope.row)">参赛信息与成绩</el-button>
<el-button type="text" @click="toInfo(scope.row)">参赛信息与成绩</el-button>
<el-switch
v-model="scope.row.isDisable"
:active-text="scope.row.isDisable ? '关' : '开'"
@ -64,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="学生学号">
@ -399,13 +399,8 @@ 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
this.$get(this.api.querySchoolData).then(({ list }) => {
this.clients = list
}).catch(res => {})
},
//
@ -431,7 +426,7 @@ export default {
}).catch(res => {})
},
//
info(row) {
toInfo(row) {
this.$router.push(`/matchInfo?id=${this.id}&accountId=${row.accountId}`)
},
exportAll() {

@ -375,7 +375,8 @@ export default {
});
},
goBack() { //
this.$router.push(`/configure`)
// this.$router.push(`/configure`)
this.$router.back()
}
}
};

Loading…
Cancel
Save