dev_202303
yujialong 2 years ago
parent af27dd64a0
commit a825f18d15
  1. 1
      src/components/Sidebar.vue
  2. 2
      src/setting.js
  3. 25
      src/store/index.js
  4. 15
      src/utils/api.js
  5. 25
      src/views/course/AddCurriculum.vue
  6. 67
      src/views/match/add/index.vue
  7. 15
      src/views/match/add/step1.vue
  8. 118
      src/views/match/add/step2.vue
  9. 89
      src/views/match/add/step3.vue
  10. 34
      src/views/match/list/index.vue
  11. 29
      src/views/match/manage/matchArchList.vue
  12. 171
      src/views/match/manage/matchInfo.vue
  13. 47
      src/views/match/manage/matchRank.vue
  14. 4
      src/views/match/manage/matchReport.vue
  15. 39
      src/views/match/manage/matchSignup.vue
  16. 56
      src/views/match/preview/index.vue
  17. 1
      src/views/order/AddOrder.vue
  18. 5
      src/views/order/Order.vue
  19. 2
      src/views/serve/projectAdd.vue
  20. 14
      src/views/theoreticalCourse/add/index.vue

@ -134,6 +134,7 @@ export default {
methods:{
handleSelect(index){
this.onRoutes = index
this.$store.commit('setOrderParam', null)
this.$store.commit('setInfoTab', '1')
this.$store.commit('setColumnId', '')
sessionStorage.setItem('sideBar',index)

@ -45,7 +45,7 @@ const Setting = {
isDev,
isPro,
// 是否使用动态路由
dynamicRoute: false,
dynamicRoute: true,
/**
* @description 默认密码
*/

@ -26,7 +26,8 @@ const store = new Vuex.Store({
platformSource: 0,
columnId: '',
tabId: '1',
dataPer: []
dataPer: [],
orderParam: null
},
actions: {
setSystemId({ state,commit },systemId) {
@ -52,6 +53,15 @@ const store = new Vuex.Store({
SET_USERNAME (state, userName) {
state.userName = userName
},
SET_C_PAGE: (state, page) => {
state.customerPage = page
},
SET_M_PAGE: (state, page) => {
state.matchPage = page
},
SET_M_SOURCE: (state, platformSource) => {
state.platformSource = platformSource
},
courseData (state, payload) {
state.courseId = payload.course_id
},
@ -88,21 +98,16 @@ const store = new Vuex.Store({
setDataPer(state, dataPer) {
state.dataPer = dataPer
},
SET_C_PAGE: (state, page) => {
state.customerPage = page
},
SET_M_PAGE: (state, page) => {
state.matchPage = page
},
SET_M_SOURCE: (state, platformSource) => {
state.platformSource = platformSource
},
setColumnId: (state, columnId) => {
state.columnId = columnId
},
setInfoTab: (state, tabId) => {
state.tabId = tabId
},
setOrderParam: (state, orderParam) => {
state.orderParam = orderParam
},
}
});

@ -2,7 +2,6 @@ import Setting from "@/setting";
const host = Setting.apiBaseURL
const host1 = 'http://192.168.31.51:9000/'
const host2 = 'http://121.37.12.51/'
const uploadURL = Setting.uploadURL
export default {
@ -148,7 +147,6 @@ export default {
editSubsection: `nakadai/nakadai/curriculum/subsection/editSubsection`, //修改小节
getSubsection: `nakadai/nakadai/curriculum/subsection/getSubsection`, //根据小节id获取预览文件地址
// 理论课程
delTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/batchDeletion`,
findTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/findById`,
@ -158,6 +156,7 @@ export default {
disabledTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/disabledEvents`,
checkRepeatTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/checkRepeat`,
getRedisCache: `occupationlab/occupationlab/theoreticalCourse/getRedisCache`,
getSchoolsByProvince: `nakadai/nakadai/school/getSchoolsByProvince`,
// 理论课程分类管理
checkRepeatClassification: `occupationlab/occupationlab/theoreticalCourseClassification/checkRepeat`,
delClassification: `occupationlab/occupationlab/theoreticalCourseClassification/batchDeletion`,
@ -314,6 +313,10 @@ export default {
editCompetitionContent: `competition/competition/content/editCompetitionContent`,
getCompetitionContent: `competition/competition/content/getCompetitionContent`,
// 赛事附件
delComAnnex: `competition/competition/annex/delete`,
saveComAnnex: `competition/competition/annex/save`,
updateComAnnex: `competition/competition/annex/update`,
// 赛事公告附件
delAnnex: `competition/competition/announcementAnnex/delete`,
saveAnnex: `competition/competition/announcementAnnex/save`,
updateAnnex: `competition/competition/announcementAnnex/update`,
@ -349,6 +352,7 @@ export default {
stageSelectParticipants: `competition/competition/teamParticipant/stageSelectParticipants`,
updateUser: `users/users/userInfo/updateUser`,
enquireAboutSchoolStudents: `users/users/userAccount/enquireAboutSchoolStudents`,
cancelParticipant: `competition/competition/teamParticipant/cancelParticipant`,
// 赛事公告
addAnnouncement: `competition/competition/announcement/addAnnouncement`,
amendmentAnnouncement: `competition/competition/announcement/amendmentAnnouncement`,
@ -356,6 +360,7 @@ export default {
disableAnnouncement: `competition/competition/announcement/disableAnnouncement`,
queryAnnouncementByCompetitionId: `competition/competition/announcement/queryAnnouncementByCompetitionId`,
queryAnnouncementDetails: `competition/competition/announcement/queryAnnouncementDetails`,
saveAnnouncementAnnex: `competition/competition/announcementAnnex/save`,
// 赛事成绩
batchDeleteContestGrade: `${host1}competition/competition/performance/batchDeleteContestGrade`,
batchImportGrades: `${host1}competition/competition/performance/batchImportGrades`,
@ -377,7 +382,7 @@ export default {
manuallyRankTheUploadList: `${host1}competition/competition/rank/manuallyRankTheUploadList`,
queryPublicationSource: `${host1}competition/competition/rank/queryPublicationSource`,
releaseVerification: `${host1}competition/competition/rank/releaseVerification`,
gradeImport: `${host2}template/赛事成绩导入模板.xlsx`,
rankImportTeam: `${host2}template/赛事排名导入模板(团队赛).xlsx`,
rankImportPerson: `${host2}template/赛事排名导入模板(个人赛).xlsx`,
gradeImport: `http://121.37.12.51/template/赛事成绩导入模板.xlsx`,
rankImportTeam: `http://121.37.12.51/template/赛事排名导入模板(团队赛).xlsx`,
rankImportPerson: `http://121.37.12.51/template/赛事排名导入模板(个人赛).xlsx`,
};

@ -187,6 +187,7 @@
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
<el-table-column prop="remark" label="备注名称" align="center"></el-table-column>
<el-table-column prop="applicationName" label="系统名称" align="center">
<template slot-scope="scope">
{{ scope.row.applicationName || systemAll.find(e => e.systemId == scope.row.systemId).systemName }}
@ -238,6 +239,7 @@
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
<el-table-column prop="remark" label="备注名称" align="center"></el-table-column>
<el-table-column prop="applicationName" label="系统名称" align="center">
<template slot-scope="scope">
{{ scope.row.applicationName || systemAll.find(e => e.systemId == scope.row.systemId).systemName }}
@ -284,7 +286,7 @@
<!-- 实训配置 -->
<div>
<el-table :data="matches" class="table" stripe header-align="center" max-height="400"
@selection-change="handleSelectionAssessment">
@selection-change="handleSelectionMatch">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
@ -491,9 +493,10 @@ export default {
assessmentData: [],
assessmentTotal: 0,
multipleAssessment: [],
matches: [],
matcheTotal: 0,
multipleAssessment: [],
multipleMatch: [],
submiting: false, //
loadIns: null,
updateTime: 0,
@ -873,6 +876,9 @@ export default {
handleSelectionAssessment(val) { //
this.multipleAssessment = val;
},
handleSelectionMatch(val) { //
this.multipleMatch = val;
},
handleBatchDelete(type) { //
if (type == 1 && !this.multipleAssessment.length) {
this.$message.warning("请勾选考核项目!");
@ -880,14 +886,14 @@ export default {
} else if (!type && !this.multiplePractice.length) {
this.$message.warning("请勾选练习项目!");
return;
} else if (type == 2 && !this.multiplePractice.length) {
} else if (type == 2 && !this.multipleMatch.length) {
this.$message.warning("请勾选竞赛项目!");
return;
}
this.$confirm("此操作将批量移除项目, 是否继续?", "提示", {
type: "warning"
}).then(() => {
if (type) {
if (type == 1) {
let ids = this.multipleAssessment.map(i => i.projectId);
let tempArr = [];
for (let i = 0; i < this.assessmentData.length; i++) {
@ -896,7 +902,7 @@ export default {
}
}
this.assessmentData = tempArr;
} else {
} else if (!type) {
let ids = this.multiplePractice.map(i => i.projectId);
let tempArr = [];
for (let i = 0; i < this.practiceData.length; i++) {
@ -905,6 +911,15 @@ export default {
}
}
this.practiceData = tempArr;
} else {
let ids = this.multipleMatch.map(i => i.projectId);
let tempArr = [];
for (let i = 0; i < this.matches.length; i++) {
if (!ids.includes(this.matches[i].projectId)) {
tempArr.push(this.matches[i]);
}
}
this.matches = tempArr;
}
this.$message.success("批量移除成功");
}).catch(() => {

@ -5,18 +5,18 @@
<el-page-header @back="back" :content="'创建赛事'"></el-page-header>
</div>
</el-card>
<div v-if="step === 1 || (id && !editing)" :class="['type-wrap', {pd: !id}]">
<div class="p-title">大赛发布类型</div>
<el-form label-width="100px" label-suffix=":" size="small" :disabled="!editing && id != ''">
<el-form-item label="请选择类型">
<el-radio v-model="releaseType" :label="0">仅发布信息</el-radio>
<el-radio v-model="releaseType" :label="1">设置完整比赛</el-radio>
</el-form-item>
</el-form>
<el-button v-if="!editing && id" class="edit" type="primary" @click="editing = 1" v-auth="'/match:管理:大赛详情:编辑'">编辑</el-button>
</div>
<el-card v-if="step !== 4" shadow="hover" class="m-b-20" style="position: relative;margin-top: 20px">
<template v-if="step === 1 || (id && !editing)">
<div class="p-title">大赛发布类型</div>
<el-form label-width="100px" label-suffix=":" size="small" :disabled="!editing && id != ''">
<el-form-item label="请选择类型">
<el-radio v-model="releaseType" :label="0">仅发布信息</el-radio>
<el-radio v-model="releaseType" :label="1">设置完整比赛</el-radio>
</el-form-item>
</el-form>
<el-button v-if="!editing && id" class="edit" type="primary" @click="editing = 1">编辑</el-button>
</template>
<ul :class="['steps', {pointer: !editing && id}]">
<ul :class="['steps', {pointer: !editing && id && publishStatus}]">
<li :class="{active: step === 1,done: step > 1}" @click="toStep(1)">
<span class="circle">1</span>
<p class="text">大赛信息填写</p>
@ -48,12 +48,12 @@
<!-- 处于编辑状态(列表点编辑按钮进来默认是查看状态不可编辑点了编辑按钮才可编辑)或者新增才显示这几个按钮 -->
<template v-if="editing || !id">
<el-button v-if="!publishStatus" @click="save(0)">保存{{ releaseType ? '草稿' : '' }}</el-button>
<el-button v-if="step === 2 || step === 3" type="primary" @click="prev" v-auth="'/match:管理:大赛详情:发布'">上一步</el-button>
<el-button v-if="!releaseType || (releaseType && step === 3)" type="primary" @click="save(1)" v-auth="'/match:管理:大赛详情:发布'">发布</el-button>
<el-button v-else type="primary" @click="save(id ? 1 : 0, 2)" v-auth="'/match:管理:大赛详情:保存并下一步'">保存并下一步</el-button>
<el-button v-if="step === 2 || step === 3" type="primary" @click="prev">上一步</el-button>
<el-button v-if="!releaseType || (releaseType && step === 3)" type="primary" @click="save(1)">发布</el-button>
<el-button v-else type="primary" @click="save(id ? 1 : 0, 2)">保存并下一步</el-button>
</template>
<el-button type="danger" @click="preview" v-auth="'/match:管理:大赛详情:预览'">预览</el-button>
<el-button @click="back">取消</el-button>
<el-button @click="cancel">{{ editing ? '取消' : '返回' }}</el-button>
</div>
</div>
</div>
@ -112,12 +112,11 @@ export default {
prev() {
//
const { updateTime } = this.$refs['step' + this.step]
console.log("🚀 ~ file: index.vue:142 ~ back ~ updateTime", updateTime)
if (updateTime) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning'
}).then(() => {
this.save(0)
this.save(0, 1)
}).catch(() => {
this.step--
})
@ -137,21 +136,43 @@ export default {
this.competitionId = competitionId
}
this.step++
} else if (next === 1) {
this.step--
}
},
//
toStep(i) {
if (this.id && !this.editing) this.step = i
if (this.publishStatus && this.id && !this.editing) this.step = i
},
//
preview() {
util.local.set('match', this.$refs.step1.form)
window.open(this.$router.resolve('/matchPreview').href)
},
//
cancel() {
//
if (this.editing && this.$route.query.name) {
//
const { updateTime } = this.$refs['step' + this.step]
if (this.step < 4 && updateTime) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning'
}).then(() => {
this.save(0, 3)
}).catch(() => {
this.editing = false
})
} else {
this.editing = false
}
} else {
this.$router.push(`/match?page=${this.$store.state.matchPage}&platformSource=${this.$store.state.platformSource}`)
}
},
back() {
//
const { updateTime } = this.$refs['step' + this.step]
console.log("🚀 ~ file: index.vue:142 ~ back ~ updateTime", updateTime)
if (this.step < 4 && updateTime) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning'
@ -172,6 +193,14 @@ export default {
</script>
<style scoped lang="scss">
.type-wrap {
position: relative;
margin-top: 20px;
background: #fff;
&.pd {
padding: 15px;
}
}
.edit {
position: absolute;
top: 30px;

@ -522,13 +522,13 @@ export default {
const file = res.data.filesResult
const { id } = this.form
const data = {
contestId: id || '',
competitionId: id || '',
fileName: this.fileName,
filePath: file.fileUrl || file.fileId
}
this.form.competitionAnnexList.push(data)
//
id && this.$post(this.api.saveAnnex, data).then(res => {}).catch(res => {})
id && this.$post(this.api.saveComAnnex, data).then(res => {}).catch(res => {})
},
//
beforeUpload(file) {
@ -565,7 +565,7 @@ export default {
const { url, name } = file
url && this.$del(`${this.api.fileDeletion}?keys=${url}`).then(res => {}).catch(res => {})
const id = this.form.competitionAnnexList.find(e => e.fileName === name).id
id && this.$post(`${this.api.deleteAnnex}?id=${id}`).then(res => {}).catch(res => {})
id && this.$post(`${this.api.delComAnnex}?id=${id}`).then(res => {}).catch(res => {})
},
//
randomInv() {
@ -586,8 +586,8 @@ export default {
form.sponsor = this.sponsorList.filter(d => d).join();
form.undertaker = this.undertakerList.filter(d => d).join();
if (!form.name) return util.warningMsg("请填写竞赛名称");
//
// if (status) {
//
if (next === 2) {
if (form.competitionScope == 2 && !form.competitionRangeList.length) return util.warningMsg('请选择区域、院校')
if (!form.sponsor) return util.warningMsg("请填写主办方");
if (!form.signUpStartTime) return util.warningMsg("请选择报名时间");
@ -595,7 +595,6 @@ export default {
let signUpStartTime = new Date(form.signUpStartTime).getTime();
let signUpEndTime = new Date(form.signUpEndTime).getTime();
let playStartTime = new Date(form.playStartTime).getTime();
// if (signUpStartTime && now > signUpStartTime) return util.warningMsg("");
if (!form.playStartTime) return util.warningMsg("请选择竞赛时间");
if (playStartTime && signUpEndTime && playStartTime < signUpEndTime) return util.warningMsg("竞赛时间不能早于报名结束时间");
const { competitionType, quantityLimit, minTeamSize, maxTeamSize, isNeedCode, invitationCode } = form.completeCompetitionSetup
@ -613,7 +612,7 @@ export default {
}
if (isNeedCode && (!invitationCode || invitationCode.length !== 4)) return util.warningMsg('请填写四位数邀请码')
if (!form.description) return util.warningMsg("请填写竞赛详情");
// }
}
this.$parent.showLoad()
form.publishStatus = status
form.ztOpen = status ? 0 : 1 //
@ -621,6 +620,7 @@ export default {
form.id = this.$route.query.id
if (form.id) {
this.$post(this.api.editCompetition, form).then(res => {
this.updateTime = 0
this.$parent.hideLoad()
util.successMsg("修改成功");
this.$emit('next', next)
@ -629,6 +629,7 @@ export default {
});
} else {
this.$post(this.api.addCompetition, form).then(({ competitionId, setupId }) => {
this.updateTime = 0
this.$parent.hideLoad()
util.successMsg("创建成功");
this.$emit('next', next, setupId, competitionId)

@ -92,7 +92,7 @@
<span class="req">*</span>
成绩公布时间
阶段比赛结束后
<el-input v-model="item.resultAnnouncementTime" type="number" style="width: 120px"></el-input>
<el-input v-model.number="item.resultAnnouncementTime" type="number" style="width: 120px"></el-input>
小时公布阶段比赛成绩
</div>
<div class="line">
@ -124,7 +124,7 @@
</el-form-item>
<el-form-item prop="resultAnnouncementTime" label="成绩公布时间">
阶段比赛结束后
<el-input v-model="form.competitionStageList[0].resultAnnouncementTime" type="number" style="width: 120px"></el-input>
<el-input v-model.number="form.competitionStageList[0].resultAnnouncementTime" type="number" style="width: 120px"></el-input>
小时公布阶段比赛成绩
</el-form-item>
<el-form-item prop="resultsDetails" label="是否公布成绩详情">
@ -259,7 +259,12 @@ export default {
e.operator = limit.replace(/\d+/, '')
const num = limit.replace(/\D+/, '')
if (num) e.score = num
} else {
e.operator = '>'
e.score = ''
}
if (!e.peopleLimit) e.peopleLimit = ''
if (!e.percentageLimit) e.percentageLimit = ''
e.teamNumLimitOpt = e.teamNumLimit ? 1 : 0
e.teamCalculationMethod = +e.teamCalculationMethod
})
@ -290,62 +295,83 @@ export default {
},
//
save(status, next = 0) {
const { form } = this
let { form } = this
const { rule } = form
let invalid = 0
let pointWeight = 0
const { step1 } = this
for (const e of form.competitionStageList) {
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 === '') {
//
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('请输入权重')
util.errorMsg('请输入阶段名称')
break
}
pointWeight += e.pointWeight //
} else if (rule === 1) { //
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
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 (!e.resultsDetails) {
e.resultAnnouncementTime = +e.resultAnnouncementTime
if (e.resultAnnouncementTime === '') {
invalid = 1
util.errorMsg('请填写成绩公布时间')
break
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.resultAnnouncementTime < 0) {
invalid = 1
util.errorMsg('成绩公布时间不得小于0')
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,请重新输入')
} else { // 稿
form.competitionStageList = form.competitionStageList.filter(e => e.stageName)
}
for (const e of form.competitionStageList) {
if (!e.teamNumLimitOpt) e.teamNumLimit = 0
}
if (invalid) return
if (form.resultCalculationMethod == 0 && !rule && pointWeight > 0 && pointWeight !== 100) return util.errorMsg('权重须等于100,请重新输入')
this.$parent.showLoad()
if (form.ruleId) {
this.$post(this.api.editCompetitionRule, form).then(res => {

@ -136,7 +136,11 @@ export default {
this.$post(`${this.api.queryCompetitionStageBySetupId}?setupId=${this.setupId}`).then(res => {
res.competitionStages.map(e => {
const form = e.competitionContent || JSON.parse(JSON.stringify(this.originForm))
if (form.startTime) form.time = [form.startTime, form.endTime]
if (form.startTime) {
form.time = [form.startTime, form.endTime]
} else {
form.time = []
}
form.offlineButton = !!form.offlineButton
form.onlineButton = !!form.onlineButton
form.method = e.method
@ -193,51 +197,60 @@ export default {
//
save(status, next = 0) {
const { form } = this
let invalid = 0
if (this.timeInvalid) return util.errorMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
for (const e of form) {
if (!e.time.length) {
invalid = 1
util.errorMsg('请选择比赛时间')
break
}
e.startTime = e.time[0]
e.endTime = e.time[1]
if (e.method !== 2 && !e.cid) {
invalid = 1
util.errorMsg('请选择课程')
break
}
if (e.method === 2) { // 线
if (!e.offlineAddress) {
invalid = 1
util.errorMsg('请输入比赛地点')
break
}
if (!e.contentDescription) {
invalid = 1
util.errorMsg('请输入比赛内容')
break
}
if (!e.scoreRule) {
if (!form.length) {
this.$parent.hideLoad()
util.successMsg('保存成功')
this.$emit('next', next)
return
}
//
if (status) {
let invalid = 0
if (this.timeInvalid) return util.errorMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
for (const e of form) {
if (!e.time.length) {
invalid = 1
util.errorMsg('请输入评分规则')
util.errorMsg('请选择比赛时间')
break
}
} else {
if (e.onlineButton && !e.onlineAddress) {
e.startTime = e.time[0]
e.endTime = e.time[1]
if (e.method !== 2 && !e.cid) {
invalid = 1
util.errorMsg('请输入线上地点')
util.errorMsg('请选择课程')
break
}
if (e.offlineButton && !e.offlineAddress) {
invalid = 1
util.errorMsg('请输入线下地点')
break
if (e.method === 2) { // 线
if (!e.offlineAddress) {
invalid = 1
util.errorMsg('请输入比赛地点')
break
}
if (!e.contentDescription) {
invalid = 1
util.errorMsg('请输入比赛内容')
break
}
if (!e.scoreRule) {
invalid = 1
util.errorMsg('请输入评分规则')
break
}
} else {
if (e.onlineButton && !e.onlineAddress) {
invalid = 1
util.errorMsg('请输入线上地点')
break
}
if (e.offlineButton && !e.offlineAddress) {
invalid = 1
util.errorMsg('请输入线下地点')
break
}
}
}
if (invalid) return
}
if (invalid) return
//
for (const e of form) {
e.offlineButton = e.offlineButton ? 1 : 0
@ -247,9 +260,9 @@ export default {
this.$post(this.api[form[0].contentId ? 'editCompetitionContent' : 'addCompetitionContent'], {
competitionContents: form
}).then(res => {
this.$parent.hideLoad()
//
!form[0].contentId && status && this.publish(status)
this.$parent.hideLoad()
util.successMsg((status ? '发布' : '保存') + '成功')
this.$emit('next', next)
}).catch(err => {

@ -41,7 +41,7 @@
</ul>
<div>
<el-button type="primary" round @click="add" v-auth>创建竞赛</el-button>
<el-button type="primary" round @click="delAllSelection">批量删除</el-button>
<el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button>
</div>
</div>
@ -82,6 +82,7 @@
<el-button type="text" @click="manage(scope.row)" v-auth>管理</el-button>
<el-button type="text" @click="delData(scope.row)" v-auth>删除</el-button>
<el-switch
v-if="scope.row.publishStatus"
v-auth="'/match:启用'"
v-model="scope.row.ztOpen"
:active-value="0"
@ -209,7 +210,7 @@ export default {
shortcuts: [{
text: '此刻',
onClick(picker) {
picker.$emit('pick', new Date(Date.now() + 1000 * 60 * 5))
picker.$emit('pick', new Date(Date.now() + 5000))
}
}]
}
@ -392,40 +393,15 @@ export default {
if (date == "0000-00-00 00:00:00") return "---";
return date;
},
disable(val, row) {
switchOff(val, row) {
this.$post(this.api.disabledEventsCompetition, {
competitionId: row.id,
isOpen: val,
type: 0 // (01)
}).then(res => {
val == 1 ? util.warningMsg('禁用成功') : util.successMsg('启用成功')
util.successMsg(val == 1 ? '禁用成功' : '启用成功')
}).catch(err => {})
},
switchOff(val, row, index) {
if (val) {
this.disable(val, row)
} else if (!row.publishStatus) {
this.$confirm('是否发布该大赛?', '提示', {
type: 'success'
}).then(() => {
this.$post(this.api.disabledEventsCompetition, {
competitionId: row.id,
isOpen: val,
type: 0 // (01)
}).then(res => {
row.publishStatus = 1
this.$post(`${this.api.publishCompetition}?competitionId=${row.id}&publishStatus=1`).then(res => {
this.getData()
val == 1 ? util.warningMsg('禁用成功') : util.successMsg('启用成功')
}).catch(err => {})
}).catch(err => {})
}).catch(() => {
row.ztOpen = 1
})
} else {
this.disable(val, row)
}
},
}
};
</script>

@ -61,7 +61,7 @@
</el-table-column>
<el-table-column label="操作" align="center" width="160">
<template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看成绩报告</el-button>
<el-button v-if="scope.row.reportId" type="text" @click="show(scope.row)">查看成绩报告</el-button>
<el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
@ -87,9 +87,14 @@
:before-remove="beforeRemove"
:limit="1"
:on-exceed="handleExceed"
:action="this.api.importStaff"
:action="this.api.batchImportGrades"
:file-list="uploadList"
:headers="headers"
:data="{
competitionId: this.id,
stageId: this.stageId,
systemId: 0
}"
>
<el-button type="primary" class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button>
</el-upload>
@ -206,9 +211,13 @@ export default {
type: "warning"
}).then(() => {
let ids = this.multipleSelection.map(item => {
return item.reportId;
return this.method == 2 ? item.scoreId : item.reportId
});
this.$post(this.api.deleteExperimentalReport, ids).then(res => {
this.$post(this.api.batchDeleteContestGrade, {
ids,
competitionId: this.id,
stageId: this.stageId
}).then(res => {
this.multipleSelection = [];
this.$refs.table.clearSelection();
util.successMsg("删除成功");
@ -276,7 +285,12 @@ export default {
},
//
showFaild() {
location.href = `${this.api.performanceExportFailure}?exportCode=${this.exportCode}`
axios.get(`${this.api.performanceExportFailure}?exportCode=${this.exportCode}`, {
headers: this.headers,
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`批量导入成绩管理失败数据导出.xls`, new Blob([res.data]))
}).catch(res => {})
},
uploadSuccess(res, file, fileList) {
this.uploadFaild = false
@ -306,10 +320,7 @@ export default {
},
uploadSure() {
this.importVisible = false
this.studentType = 1
this.keyWord = ''
this.$refs.orgTree.setCurrentKey(null)
this.getOrg()
this.getData()
}
}
};

@ -1,5 +1,5 @@
<template>
<div>
<div style="padding: 0 100px;">
<el-card shadow="hover" class="m-b-20 head-card">
<div class="flex-between">
<el-page-header @back="$router.back()" content="参赛信息与成绩"></el-page-header>
@ -7,20 +7,22 @@
</el-card>
<el-card shadow="hover" class="m-b-20">
<table v-if="form.completeCompetitionSetup.competitionType" class="table m-b-20">
<tr>
<th width="150">团队名称</th>
<td>
<el-input :disabled="!editing" v-model="info.team.teamName"></el-input>
</td>
<th width="150">团队邀请码</th>
<td>
<el-input :disabled="!editing" v-model="info.team.invitationCode"></el-input>
</td>
</tr>
</table>
<div v-if="form.completeCompetitionSetup.competitionType && status < 4" class="m-b-20 text-center">
<el-button type="primary" @click="edit(1)">{{ editing ? '保存' : '编辑' }}</el-button>
<div style="display: flex;align-items: center">
<table v-if="form.completeCompetitionSetup.competitionType" class="table m-b-20 m-r-10">
<tr>
<th width="150">团队名称</th>
<td>
<el-input :disabled="!editing" v-model="info.team.teamName"></el-input>
</td>
<th width="150">团队邀请码</th>
<td>
<el-input :disabled="!editing" v-model="info.team.invitationCode"></el-input>
</td>
</tr>
</table>
<div v-if="form.completeCompetitionSetup.competitionType && status < 4" class="m-b-20 text-center">
<el-button type="primary" @click="edit(1)">{{ editing ? '保存' : '编辑' }}</el-button>
</div>
</div>
<table class="table">
<tr>
@ -77,7 +79,7 @@
<template v-if="form.completeCompetitionSetup.competitionType">
<th width="110">参赛人数限制</th>
<th>允许参赛人员</th>
<th v-if="info.team.captain === 0 && form.rule === 0">总分</th>
<th v-if="form.rule === 0">总分</th>
</template>
<th>竞赛成绩</th>
</tr>
@ -87,11 +89,24 @@
<td>{{ item.stageName }}</td>
<template v-if="form.completeCompetitionSetup.competitionType">
<td>{{ item.teamNumLimit || '不限制' }}</td>
<td>{{ item.teamParticipantIds || '无' }}</td>
<td v-if="info.team.captain === 0 && form.rule === 0 && !i" :rowspan="info.stages.length">{{ info.totalScore }}</td>
<td>
<template v-if="item.participants">
<el-tag
v-for="tag in item.participants"
:key="tag.name"
class="m-r-5"
closable
@close="removePar(tag, item)">
{{tag.name}}
</el-tag>
</template>
<span v-else class="m-r-5"></span>
<i class="el-icon-edit icon" @click="selectPar(item)"></i>
</td>
<td v-if="form.rule === 0 && !i" :rowspan="info.stages.length">{{ info.totalScore }}</td>
</template>
<td>
<span v-if="item.score" class="m-r-10">分数{{item.score}}</span>
<span v-if="item.score > 0" class="m-r-10">分数{{item.score}}</span>
<el-button type="text" :disabled="item.resultsDetails === 1 || (form.completeCompetitionSetup.competitionType && !item.reportId) || (form.completeCompetitionSetup.competitionType === 0 && !item.reportId)" @click="show(item)">查看成绩详情</el-button>
</td>
</tr>
@ -144,7 +159,7 @@
<el-checkbox-group v-model="checkedMembers">
<el-checkbox v-for="(item, i) in chooses" :key="i" :label="item.accountId">{{ item.userName }}</el-checkbox>
</el-checkbox-group>
<p v-if="info.teamLimit" style="margin-top: 15px;font-size: 12px;">当前阶段限制1人参赛且此竞赛每个成员只能参加一个阶段赛项</p>
<p v-if="info.teamLimit && curRow.teamNumLimit" style="margin-top: 15px;font-size: 12px;">当前阶段限制{{ curRow.teamNumLimit }}人参赛且此竞赛每个成员只能参加一个阶段赛项</p>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="chooseSubmit">确定</el-button>
<el-button size="small" @click="chooseVisible = false">取消</el-button>
@ -280,6 +295,21 @@ export default {
info.caption = caption ? caption : {}
info.person = info.personalDetail || info.teamDetail.find(e => e.accountId == info.team.accountId)
this.originInfo = JSON.parse(JSON.stringify(info))
// accountId
info.stages && info.stages.map(e => {
if (e.participantAccountIds && e.teamParticipantIds) {
const accountIds = e.participantAccountIds.split(',').map(n => +n)
const names = e.teamParticipantIds.split(',')
const participants = []
accountIds.map((n, i) => {
participants.push({
id: n,
name: names[i]
})
})
e.participants = participants
}
})
//
const now = Date.now()
this.form.competitionStage.map(e => {
@ -329,8 +359,9 @@ export default {
teamId,
teamName,
invitationCode,
whetherSignUp: 1
whetherSignUp: 0
}).then(res => {
this.editing = false
this.getInfo()
showMsg && util.successMsg('保存成功')
}).catch(res => {})
@ -419,55 +450,81 @@ export default {
}
}
if (!start) {
this.$confirm('确定要踢出该成员吗?', '提示', {
let include
for (const e of this.info.stages) {
if (e.participantAccountIds) {
const ids = e.participantAccountIds.split(',').map(n => +n)
if (ids.includes(row.accountId)) {
include = e.stageName
break
}
}
}
this.$confirm(include ? `该成员已被指定参加${include},踢出后需重新指定成员参加,是否确认踢出团队?` : '确定要踢出该成员吗?', '提示', {
type: 'warning'
}).then(() => {
this.$post(`${this.api.removeTheLine}?teamId=${this.info.teamId}&competitionId=${this.id}&accountId=${row.accountId}`).then(res => {
util.successMsg('移除成功')
this.getInfo()
if (row.accountId == this.accountId) this.$router.back()
}).catch(res => {})
}).catch(() => {})
}
},
//
selectPar(row) {
const item = this.form.competitionStage.find(e => e.stageId == row.stageId)
if (item) {
//
const now = new Date()
if (now >= new Date(item.startTime) && now <= new Date(item.endTime)) {
return util.errorMsg('该阶段比赛已经开始,无法修改允许参赛人员!')
} else {
const { teamLimit, stages, teamDetail } = this.info
// teamLimit=truestagesparticipantAccountIdsaccountId
if (teamLimit) {
const chooses = []
let ids = []
// accountId
stages.map(e => {
const id = e.participantAccountIds
id && ids.push(...id.split(',').map(n => +n))
})
ids = [...new Set(ids)]
teamDetail.map(e => {
ids.includes(e.accountId) || chooses.push(e) //
})
this.chooses = chooses
//
removePar(e, stage) {
this.$confirm('确定要移除该成员吗?', '提示', {
type: 'warning'
}).then(() => {
this.$post(this.api.cancelParticipant, {
accountId: e.id,
competitionId: this.id,
stageId: stage.stageId,
teamId: this.info.teamId
}).then(res => {
util.successMsg('移除成功')
this.getInfo()
}).catch(res => {})
}).catch(() => {})
},
//
selectPar(row) {
const item = this.form.competitionStage.find(e => e.stageId == row.stageId)
if (item) {
//
const now = new Date()
if (now >= new Date(item.startTime) && now <= new Date(item.endTime)) {
return util.errorMsg('该阶段比赛已经开始,无法修改允许参赛人员!')
} else {
this.chooses = this.info.teamDetail
const { teamLimit, stages, teamDetail } = this.info
// teamLimit=truestagesparticipantAccountIdsaccountId
if (teamLimit) {
const chooses = []
let ids = []
// accountId
stages.map(e => {
let id = e.participantAccountIds
if (e.stageId != row.stageId && id) ids.push(...id.split(',').map(n => +n))
})
ids = [...new Set(ids)]
teamDetail.map(e => {
ids.includes(e.accountId) || chooses.push(e) //
})
this.chooses = chooses
} else {
this.chooses = this.info.teamDetail
}
this.curRow = row
this.checkedMembers = []
this.chooseVisible = true
}
this.curRow = row
this.chooseVisible = true
}
}
},
},
//
chooseSubmit() {
const accountIds = this.checkedMembers
if (!accountIds.length) return util.errorMsg('请选择参赛成员!')
const limit = this.curRow.teamNumLimit //
if (accountIds.length > limit) return util.errorMsg(`请选择${limit}个以下参赛成员!`) //
if (limit && accountIds.length > limit) return util.errorMsg(`请选择${limit}个以下参赛成员!`) //
this.$post(this.api.stageSelectParticipants, {
accountIds,
competitionId: this.id,
@ -483,7 +540,7 @@ export default {
//
show(row) {
//
if (this.form.completeCompetitionSetup.competitionType && this.info.team.captain === 0) { //
if (this.form.completeCompetitionSetup.competitionType) { //
this.curRow = row
this.memberVisible = true
const teamId = this.form.competitionRegistration.teamId
@ -513,6 +570,9 @@ export default {
</script>
<style lang="scss" scoped>
.m-r-5 {
margin-right: 5px;
}
.l-title {
margin-top: 20px;
font-size: 18px;
@ -536,6 +596,9 @@ export default {
font-size: 16px;
color: #7a7a7a;
cursor: pointer;
&:hover {
color: #007EFF;
}
}
.plus {
margin-bottom: 10px;

@ -20,8 +20,8 @@
<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="primary" @click="cancelPublish(1)">发布排名</el-button>
<el-button v-else 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 && sourceType === '0') || (type && sourceType == 1))" type="primary" @click="cancelPublish(0)">取消发布</el-button>
</div>
</div>
<el-table :data="list" class="table" ref="table" stripe header-align="center">
@ -69,21 +69,26 @@
<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 :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>
</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 colspan="6">总排名{{ curRow.index }}</td>
@ -191,7 +196,6 @@ export default {
getRank(whetherToPublish) {
//
if (whetherToPublish) {
console.log(44, this.active)
this.$post(this.api.manuallyRankTheUploadList, {
pageNum: this.page,
pageSize: this.pageSize,
@ -358,10 +362,10 @@ export default {
//
publish() {
//
if (this.published && this.sourceType != !this.type) {
this.$confirm(this.sourceType && !this.type ?
'手动排名已发布,是否要取消手动排名的内容,改为系统排名的内容?' :
'默认系统排名已发布,是否要取消系统排名的内容,改为手动发布的内容?', '提示', {
if (this.published && this.sourceType != this.type) {
this.$confirm(this.sourceType == 1 && !this.type ?
'手动排名已发布,是否要取消手动排名的内容,改为系统排名的内容?' :
'默认系统排名已发布,是否要取消系统排名的内容,改为手动发布的内容?', '提示', {
type: 'success'
}).then(() => {
this.publishSubmit()
@ -390,6 +394,7 @@ export default {
}).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.getData()
util.successMsg('取消发布成功!')
}).catch(res => {})

@ -40,8 +40,8 @@
</li>
<li>
<label>学生班级</label>
<el-input v-if="editing" v-model="infoData.workNumber"></el-input>
<span v-else>{{ infoData.workNumber }}</span>
<el-input v-if="editing" v-model="infoData.className"></el-input>
<span v-else>{{ infoData.className }}</span>
</li>
<li>
<label>指导老师</label>

@ -15,7 +15,7 @@
</li>
</ul>
<div>
<el-button type="primary" round @click="add" v-auth="'/match:管理:报名人员:新增'">新增</el-button>
<el-button type="primary" round @click="add">新增</el-button>
<el-button type="primary" round @click="exportAll" v-auth="'/match:管理:报名人员:导出'">批量导出</el-button>
</div>
</div>
@ -58,7 +58,7 @@
</div>
<el-dialog :title="(form.accountId ? '编辑' : '新增') + '参赛人员'" :visible.sync="addVisible" width="400px" class="dialog" :close-on-click-modal="false" @close="closeAdd">
<el-dialog :title="(!isAdd ? '编辑' : '新增') + '参赛人员'" :visible.sync="addVisible" width="400px" class="dialog" :close-on-click-modal="false" @close="closeAdd">
<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%">
@ -185,10 +185,11 @@ export default {
registrationInvitationCode: '',
teamName: '',
invitationCode: '',
whetherSignUp: 0,
whetherSignUp: 1,
identification: 1
},
originForm: {}
originForm: {},
exitMember: 0
};
},
watch: {
@ -252,6 +253,7 @@ export default {
this.isAdd = false
this.addVisible = true
row.userName = row.username
this.exitMember = 0
row.id = row.accountId
this.originForm = JSON.parse(JSON.stringify(row))
this.form = JSON.parse(JSON.stringify(row))
@ -259,18 +261,28 @@ export default {
//
workNumberChange() {
const { form } = this
form.schoolId && form.schoolId && this.$get(`${this.api.enquireAboutSchoolStudents}?schoolId=${form.schoolId}&workNumber=${form.workNumber}`).then(({ account }) => {
if (account) {
account
this.form = account
}
this.formEnable = !account
}).catch(res => {})
if (this.originForm.workNumber !== form.workNumber) {
form.schoolId && form.workNumber && this.$get(`${this.api.enquireAboutSchoolStudents}?schoolId=${form.schoolId}&workNumber=${form.workNumber}${this.isAdd ? '' : '&applyFor=1'}`).then(({ account }) => {
this.exitMember = 0
if (account) {
this.form = account
}
this.formEnable = !account
}).catch(res => {
if (!this.isAdd) this.exitMember = 1
})
} else {
this.exitMember = 0
}
},
//
submitForm() {
const { form } = this
if (!this.isAdd) { //
if (this.exitMember) {
this.submiting = false
return util.errorMsg('学生已存在')
}
this.$post(this.api.updateUser, {
hrUserAccount: {
...form,
@ -369,7 +381,7 @@ export default {
registrationInvitationCode: '',
teamName: '',
invitationCode: '',
whetherSignUp: 0,
whetherSignUp: 1,
identification: 1
}
this.teamVisible = true
@ -402,6 +414,9 @@ export default {
form.accountId = this.form.id
this.$post(this.api.addCompetitionTeam, form).then(res => {
this.teamVisible = false
this.addVisible = false
this.getData()
util.successMsg('报名成功!')
}).catch(res => {})
},
//

@ -17,17 +17,17 @@
<div class="l-title" id="part1"><img src="@/assets/img/label.png" alt=""> 竞赛信息</div>
<div v-if="form.description" class="texts ql-editor" v-html="form.description"></div>
<template v-if="form.contestAnnexList && form.contestAnnexList.length">
<template v-if="form.competitionAnnexList && form.competitionAnnexList.length">
<h6 class="p-title">附件下载</h6>
<ul class="files">
<li v-for="(item, i) in form.contestAnnexList" :key="i">
<li v-for="(item, i) in form.competitionAnnexList" :key="i">
<el-link v-if="item.canPreview" class="m-r-10" type="primary" @click="previewFile(item)">{{ item.fileName }}</el-link>
<span v-else class="file-name">{{ item.fileName }}</span>
<el-link type="primary" :underline="false" @click="download(item)">下载</el-link>
</li>
</ul>
</template>
<template v-if="!form.description && (!form.contestAnnexList || !form.contestAnnexList.length )">
<template v-if="!form.description && (!form.competitionAnnexList || !form.competitionAnnexList.length )">
<div class="empty">
<div>
<img src="@/assets/img/none.png" alt="">
@ -36,6 +36,36 @@
</div>
</template>
<div class="l-title"><img src="@/assets/img/label.png" alt=""> 赛程规则与内容</div>
<h6 class="rule-title">{{ form.competitionStage.length }}个竞赛阶段同一个团队每个成员只能参加一个阶段赛项</h6>
<div v-for="(rule, i) in form.competitionStage" :key="i" class="rule">
<p style="font-size: 16px;color: #333;">{{ rule.stageName }}</p>
<p>比赛时间{{ rule.startTime && rule.startTime + ' ~ ' + rule.endTime }}</p>
<p>比赛方式{{ methods.find(e => e.id == rule.method) && methods.find(e => e.id == rule.method).name }}</p>
<p v-if="!rule.method">课程系统{{ rule.systemName }}</p>
<p v-if="rule.onlineButton">线上地点{{ rule.onlineAddress }}</p>
<p v-if="rule.offlineButton">线下地点{{ rule.offlineAddress }}</p>
<template v-if="rule.method === 2">
<p>线下地点{{ rule.offlineAddress }}</p>
<p>比赛内容{{ rule.contentDescription }}</p>
<p>评分规则{{ rule.scoreRule }}</p>
</template>
<template v-if="form.completeCompetitionSetup.competitionType">
<p>团队参赛人数限制{{ rule.teamNumLimit || '不限制' }}</p>
<p>团队成绩计算方式{{ teamCalculationMethods.find(e => e.id == rule.teamCalculationMethod) && teamCalculationMethods.find(e => e.id == rule.teamCalculationMethod).name }}</p>
</template>
<p>阶段比赛结束后{{ rule.resultAnnouncementTime }}小时公布阶段比赛成绩</p>
<div v-if="form.rule === 1" class="flex">
<p>晋级规则</p>
<div>
<p v-if="rule.peopleLimit">本阶段成绩排名前{{ rule.peopleLimit }}可晋级下一阶段比赛</p>
<p v-if="rule.percentageLimit">本阶段成绩排名前{{ rule.percentageLimit }}%可晋级下一阶段比赛</p>
<p v-if="rule.scoreLimit">本阶段成绩{{ rule.scoreLimit }}可晋级下一阶段比赛</p>
</div>
</div>
</div>
<!-- 进展 -->
<div class="l-title" id="part2"><img src="@/assets/img/label.png" alt=""> 竞赛进展</div>
<ul class="progress" v-if="progress.length">
@ -80,10 +110,14 @@
<script>
import util from "@/libs/util";
import breadcrumb from '@/components/breadcrumb'
import Const from '@/const/match'
export default {
name: "match",
data() {
return {
rules: Const.rules,
methods: Const.methods,
teamCalculationMethods: Const.teamCalculationMethods,
curType: '1',
typeList: [
{
@ -117,7 +151,7 @@ export default {
methods: {
//
handleAnnex() {
const list = this.form.contestAnnexList
const list = this.form.competitionAnnexList
if (list) {
list.map(e => {
const { filePath } = e
@ -481,4 +515,18 @@ export default {
color: rgba(0, 0, 0, 0.25);
}
}
.rule-title {
margin-bottom: 10px;
font-size: 16px;
}
.rule {
padding: 15px;
margin-bottom: 15px;
border: 1px solid #dfdfdf;
p {
font-size: 14px;
line-height: 30px;
color: #6e6e6e;
}
}
</style>

@ -1160,7 +1160,6 @@ export default {
return e;
});//
this.coursePermissions = list.filter(i => i.authority === 1);
console.log("🚀 ~ file: AddOrder.vue ~ line 979 ~ setStartDate ~ this.coursePermissions ", this.coursePermissions )
this.dataPlatformPermissions = list.filter(i => i.authority === 0);
this.valuePermissions = list.filter(i => i.authority === 2);
},

@ -112,6 +112,7 @@
export default {
data() {
return {
orderParam: this.$store.state.orderParam,
form: {
provinces: "",
city: "",
@ -159,6 +160,7 @@ export default {
}
},
created() {
if (this.orderParam) this.form = this.orderParam
this.getData()
this.getSchool()
},
@ -227,12 +229,13 @@ export default {
}else{
orderStatus = 0
}
this.$store.commit('setOrderParam', this.form)
this.$router.push({
path:'/AddOrder',
query:{
val:val,
orderId:row.orderId,
orderStatus:orderStatus
orderStatus
}
})
// this.$router.push("/addorder?" + val + "=" + row.orderId+"&orderStatus="+orderStatus);

@ -328,7 +328,7 @@ export default {
},
methods: {
permissionChange(){
if (this.projectManage.permissions == 1){
if (this.projectManage.permissions){
this.projectManage.hintOpen = 1
}else{
this.projectManage.hintOpen = 0

@ -278,10 +278,21 @@ export default {
const rangeName = data.courseRangeList
if (rangeName) {
const range = []
const rangeChecked = []
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)
rangeChecked.push({
value: e.type ? (e.cityId || e.provinceId) : e.schoolId,
label: name,
cityId: e.cityId,
provinceId: e.provinceId,
schoolId: e.schoolId,
})
})
this.rangeName = range.join(',')
this.rangeChecked = rangeChecked
}
this.uploadList.push({
@ -303,6 +314,7 @@ export default {
rangeChecked.find(n => n.value === e.value && n.label == e.label) || name.push(e.data) // push
})
this.rangeChecked.push(...name)
console.log("🚀 ~ file: index.vue:306 ~ rangeChange ~ this.rangeChecked", this.rangeChecked)
},
//
rangeViChange(e) {

Loading…
Cancel
Save