实验报告、赛事

Branch_d40a2540
yujialong 1 year ago
parent 559a044844
commit 055566f7d9
  1. 1
      src/api/index.js
  2. 173
      src/pages/achievement/show/index.vue
  3. 2
      src/pages/achievement/teach/index.vue
  4. 2
      src/pages/assessment/list/index.vue
  5. 2
      src/pages/expSystem/backstage/model.vue
  6. 94
      src/pages/match/add/set.vue
  7. 80
      src/pages/match/add/step3.vue
  8. 23
      src/pages/match/manage/index.vue
  9. 46
      src/pages/match/manage/matchRank.vue

@ -242,6 +242,7 @@ export default {
addCompetitionStageRankingTime: `competition/competitionReleaseTime/addCompetitionStageRankingTime`, addCompetitionStageRankingTime: `competition/competitionReleaseTime/addCompetitionStageRankingTime`,
cancelCompetitionStageRankingTime: `competition/competitionReleaseTime/cancelCompetitionStageRankingTime`, cancelCompetitionStageRankingTime: `competition/competitionReleaseTime/cancelCompetitionStageRankingTime`,
getCompetitionStageRankingTime: `competition/competitionReleaseTime/getCompetitionStageRankingTime`, getCompetitionStageRankingTime: `competition/competitionReleaseTime/getCompetitionStageRankingTime`,
frontOfficeCompetitionRanking: `competition/competition/rank/frontOfficeCompetitionRanking`,
gradeImport: `https://www.occupationlab.com/template/赛事成绩导入模板.xlsx`, gradeImport: `https://www.occupationlab.com/template/赛事成绩导入模板.xlsx`,
rankImportTeam: `https://www.occupationlab.com/template/赛事排名导入模板(团队赛).xlsx`, rankImportTeam: `https://www.occupationlab.com/template/赛事排名导入模板(团队赛).xlsx`,
rankImportPerson: `https://www.occupationlab.com/template/赛事排名导入模板(个人赛).xlsx`, rankImportPerson: `https://www.occupationlab.com/template/赛事排名导入模板(个人赛).xlsx`,

@ -1,111 +1,157 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover"
<el-page-header @back="$router.back()" content="查看报告"></el-page-header> class="m-b-20">
<el-page-header @back="$router.back()"
content="查看报告"></el-page-header>
</el-card> </el-card>
<div class="content"> <div class="content">
<div class="text-right"> <div class="text-right">
<el-button type="primary" @click="exportPage">导出报告</el-button> <el-button type="primary"
@click="exportPage">导出报告</el-button>
</div> </div>
<h6 class="r-title">标准实验报告</h6> <h6 class="r-title">标准实验报告</h6>
<div class="info"> <div class="info">
<h6 class="l-title"> <h6 class="l-title">
<img src="@/assets/img/info1.png" alt=""> <img src="@/assets/img/info1.png"
alt="">
基本信息 基本信息
</h6> </h6>
<ul :class="['info-list', {edit: editing}]"> <ul :class="['info-list', {edit: editing}]">
<li> <li>
<label>学生姓名</label> <label>学生姓名</label>
<el-input v-if="editing" v-model="infoData.userName" disabled></el-input> <el-input v-if="editing"
v-model="infoData.userName"
disabled></el-input>
<span v-else>{{ infoData.userName }}</span> <span v-else>{{ infoData.userName }}</span>
</li> </li>
<li> <li>
<label>学生学号</label> <label>学生学号</label>
<el-input v-if="editing" v-model="infoData.workNumber" disabled></el-input> <el-input v-if="editing"
v-model="infoData.workNumber"
disabled></el-input>
<span v-else>{{ infoData.workNumber }}</span> <span v-else>{{ infoData.workNumber }}</span>
</li> </li>
<li> <li>
<label>实验时间</label> <label>实验时间</label>
<el-input v-if="editing" v-model="infoData.submitTime" disabled></el-input> <el-input v-if="editing"
v-model="infoData.submitTime"
disabled></el-input>
<span v-else>{{ infoData.submitTime }}</span> <span v-else>{{ infoData.submitTime }}</span>
</li> </li>
<li> <li>
<label>实验成绩</label> <label>实验成绩</label>
<el-input v-if="editing" v-model="infoData.score" disabled></el-input> <el-input v-if="editing"
<div v-else class="score-wrap"> v-model="infoData.score"
disabled></el-input>
<div v-else
class="score-wrap">
<em>{{ infoData.score }}</em> <em>{{ infoData.score }}</em>
<img src="@/assets/img/point.png" alt=""> <img src="@/assets/img/point.png"
alt="">
</div> </div>
</li> </li>
<li> <li>
<label>学生班级</label> <label>学生班级</label>
<el-input v-if="editing" v-model="infoData.workNumber"></el-input> <el-input v-if="editing"
v-model="infoData.workNumber"></el-input>
<span v-else>{{ infoData.workNumber }}</span> <span v-else>{{ infoData.workNumber }}</span>
</li> </li>
<li> <li>
<label>指导老师</label> <label>指导老师</label>
<el-input v-if="editing" v-model="infoData.instructor"></el-input> <el-input v-if="editing"
v-model="infoData.instructor"></el-input>
<span v-else>{{ infoData.instructor }}</span> <span v-else>{{ infoData.instructor }}</span>
</li> </li>
<li> <li>
<label>实验学时</label> <label>实验学时</label>
<el-input v-if="editing" v-model="infoData.period"></el-input> <el-input v-if="editing"
v-model="infoData.period"></el-input>
<span v-else>{{ infoData.period }}</span> <span v-else>{{ infoData.period }}</span>
</li> </li>
</ul> </ul>
<div class="m-b-20"> <div class="m-b-20">
<h6 class="l-title"> <h6 class="l-title">
<img src="@/assets/img/report2.png" alt=""> <img src="@/assets/img/report2.png"
alt="">
实验项目名称 实验项目名称
</h6> </h6>
<el-input v-if="editing" v-model="form.projectName" type="textarea"></el-input> <el-input v-if="editing"
<div v-else class="pre-wrap" v-html="form.projectName"></div> v-model="form.projectName"
type="textarea"></el-input>
<div v-else
class="pre-wrap"
v-html="form.projectName"></div>
</div> </div>
<div class="m-b-20"> <div class="m-b-20">
<h6 class="l-title"> <h6 class="l-title">
<img src="@/assets/img/report3.png" alt=""> <img src="@/assets/img/report3.png"
alt="">
实验目的 实验目的
</h6> </h6>
<div :class="['pre-wrap', {edit: editing}]" v-html="form.purpose"></div> <div :class="['pre-wrap', {edit: editing}]"
v-html="form.purpose"></div>
</div> </div>
<div class="m-b-20"> <div class="m-b-20">
<h6 class="l-title"> <h6 class="l-title">
<img src="@/assets/img/report4.png" alt=""> <img src="@/assets/img/report4.png"
alt="">
实验数据 实验数据
</h6> </h6>
<el-table :data="expData" class="table" border stripe header-align="center"> <el-table :data="expData"
<el-table-column type="index" label="序号" align="center" width="60"> class="table"
border
stripe
header-align="center">
<el-table-column type="index"
label="序号"
align="center"
width="60">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + 1 }} {{ scope.$index + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="judgmentName" label="判分点" width="270" align="center"></el-table-column> <el-table-column prop="judgmentName"
<el-table-column v-if='project' prop="judgmentName" label="考核点" align="center" width="150"> label="判分点"
width="270"
align="center"></el-table-column>
<el-table-column v-if='project'
prop="judgmentName"
label="考核点"
align="center"
width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-for="(item, index) in scope.row.lcRuleRecords" :key="index"> <div v-for="(item, index) in scope.row.lcRuleRecords"
:key="index">
<span> <span>
<span>{{index+1}}. </span>{{item.name}} <span>{{index+1}}. </span>{{item.name}}
</span> </span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="ruleAnswer" label="参考答案" style='word-wrap: break-word'> <el-table-column prop="ruleAnswer"
label="参考答案"
style='word-wrap: break-word'>
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if='scope.row.lcRuleRecords'> <div v-if='scope.row.lcRuleRecords'>
<div v-for="(item, index) in scope.row.lcRuleRecords" :key="index"> <div v-for="(item, index) in scope.row.lcRuleRecords"
:key="index">
<span> <span>
<span>{{index+1}}. </span>{{item.ruleAnswer}} <span>{{index+1}}. </span>{{item.ruleAnswer}}
</span> </span>
</div> </div>
</div> </div>
<div v-else v-html="scope.row.referenceAnswer"></div> <div v-else
v-html="scope.row.referenceAnswer"></div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="userAnswer" label="学生答案"> <el-table-column prop="userAnswer"
label="学生答案">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if='scope.row.lcRuleRecords'> <div v-if='scope.row.lcRuleRecords'>
<div v-for="(item, index) in scope.row.lcRuleRecords" :key="index"> <div v-for="(item, index) in scope.row.lcRuleRecords"
:key="index">
<span v-if='item.userAnswer'> <span v-if='item.userAnswer'>
<span>{{index+1}}. </span>{{item.userAnswer}} <span>{{index+1}}. </span>{{item.userAnswer}}
</span> </span>
@ -114,22 +160,49 @@
</span> </span>
</div> </div>
</div> </div>
<div v-else v-html='scope.row.answer' style='white-space: pre-wrap'></div> <div v-else
v-html='scope.row.answer'
style='white-space: pre-wrap'></div>
</template>
</el-table-column>
<el-table-column prop="runResult"
label="学生运行结果"
align="center">
<template slot-scope="scope">
<div class="m-b-20"
v-html='scope.row.runResult'
style='white-space: pre-wrap'></div>
<template v-if="scope.row.runThePictureList"> <template v-if="scope.row.runThePictureList">
<img v-for="(img, i) in scope.row.runThePictureList" :key="i" width="200" class="result-pic" :src="img" alt=""> <img v-for="(img, i) in scope.row.runThePictureList"
:key="i"
width="200"
class="result-pic"
:src="img"
alt="">
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="score" label="得分" width="80" align="center"></el-table-column> <el-table-column prop="score"
label="得分"
width="80"
align="center"></el-table-column>
</el-table> </el-table>
</div> </div>
<div class="m-b-20"> <div class="m-b-20">
<h6 class="l-title"> <h6 class="l-title">
<img src="@/assets/img/report5.png" alt=""> <img src="@/assets/img/report5.png"
alt="">
实验总结与体会 实验总结与体会
</h6> </h6>
<quill v-if="editing" :border="true" v-model="form.summarize" :minHeight="150" :height="150" :index="1" /> <quill v-if="editing"
<div v-else class="pre-wrap" v-html="form.summarize"></div> :border="true"
v-model="form.summarize"
:minHeight="150"
:height="150"
:index="1" />
<div v-else
class="pre-wrap"
v-html="form.summarize"></div>
</div> </div>
</div> </div>
</div> </div>
@ -210,7 +283,10 @@ export default {
} else { // pythonuserScores } else { // pythonuserScores
list.forEach(e => { list.forEach(e => {
const item = this.userScores.find(n => n.judgmentId == e.judgmentId) const item = this.userScores.find(n => n.judgmentId == e.judgmentId)
if (item && item.runThePictureList) e.runThePictureList = item.runThePictureList if (item) {
if (item.runThePictureList) e.runThePictureList = item.runThePictureList
if (item.runResult) e.runResult = item.runResult
}
}) })
} }
this.expData = list this.expData = list
@ -246,8 +322,10 @@ export default {
.wrap { .wrap {
padding: 12px 300px 20px; padding: 12px 300px 20px;
} }
code, kbd, samp{ code,
font-family: 'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif; kbd,
samp {
font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, 'microsoft yahei', arial, STHeiTi, sans-serif;
word-wrap: break-word; word-wrap: break-word;
white-space: pre-wrap; white-space: pre-wrap;
} }
@ -261,7 +339,7 @@ code, kbd, samp{
overflow: hidden; overflow: hidden;
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;
font-family:'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, 'microsoft yahei', arial, STHeiTi, sans-serif;
} }
.content { .content {
padding: 16px 40px; padding: 16px 40px;
@ -277,7 +355,7 @@ code, kbd, samp{
} }
.info { .info {
padding: 20px 16px; padding: 20px 16px;
border: 1px solid #E1E6F2; border: 1px solid #e1e6f2;
} }
.l-title { .l-title {
display: flex; display: flex;
@ -311,7 +389,7 @@ code, kbd, samp{
span { span {
min-width: 150px; min-width: 150px;
padding: 0 10px 3px; padding: 0 10px 3px;
border-bottom: 1px solid #E1E6F2; border-bottom: 1px solid #e1e6f2;
} }
/deep/.el-input { /deep/.el-input {
width: 174px; width: 174px;
@ -320,7 +398,7 @@ code, kbd, samp{
.score-wrap { .score-wrap {
position: relative; position: relative;
min-width: 150px; min-width: 150px;
border-bottom: 1px solid #E1E6F2; border-bottom: 1px solid #e1e6f2;
em { em {
position: absolute; position: absolute;
top: -12px; top: -12px;
@ -328,7 +406,7 @@ code, kbd, samp{
font-family: din; font-family: din;
font-size: 30px; font-size: 30px;
font-weight: 600; font-weight: 600;
color: #0B1D30; color: #0b1d30;
} }
img { img {
position: absolute; position: absolute;
@ -336,16 +414,17 @@ code, kbd, samp{
left: 0; left: 0;
} }
} }
/deep/.el-textarea .el-textarea__inner, .pre-wrap { /deep/.el-textarea .el-textarea__inner,
.pre-wrap {
min-height: 72px; min-height: 72px;
padding: 10px 16px; padding: 10px 16px;
font-size: 14px; font-size: 14px;
color: #333; color: #333;
&.edit { &.edit {
color: #ABB3C6; color: #abb3c6;
border: 1px solid #CACFDB; border: 1px solid #cacfdb;
border-radius: 4px; border-radius: 4px;
background-color: #F6F7F9; background-color: #f6f7f9;
} }
} }
/deep/ .table th { /deep/ .table th {

@ -358,7 +358,7 @@ export default {
// //
const { message } = await this.$post(`${this.api.practiceActivity}?pageNum=${this.pageActivation}&pageSize=${this.pageSizeActivation}&projectId=${this.id}`) const { message } = await this.$post(`${this.api.practiceActivity}?pageNum=${this.pageActivation}&pageSize=${this.pageSizeActivation}&projectId=${this.id}`)
this.activations = message.records this.activations = message.records
this.total = message.total this.totalActivation = message.total
}, },
initData () { initData () {
this.$refs.table.clearSelection(); this.$refs.table.clearSelection();

@ -448,7 +448,7 @@ export default {
this.$post(`${this.api.collectPaper}?id=${row.id}`).then(async res => { this.$post(`${this.api.collectPaper}?id=${row.id}`).then(async res => {
util.successMsg("提前结束成功!"); util.successMsg("提前结束成功!");
this.getData(); this.getData();
// await this.$post(`${this.api.refreshPageNotification}?content=3-${row.id}`) await this.$post(`${this.api.refreshPageNotification}?content=3-${row.id}`)
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
}); });

@ -56,7 +56,7 @@
<el-table-column label="状态" <el-table-column label="状态"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.isOpen ? '禁用' : '启用' }} {{ scope.row.isOpen || scope.row.ztOpen ? '禁用' : '启用' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作"

@ -1,19 +1,20 @@
<template> <template>
<div> <div>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover"
class="m-b-20">
<div> <div>
<p class="m-b-20">比赛名称</p> <p class="m-b-20">比赛名称</p>
{{ form.stageName }} {{ form.stageName }}
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover"
class="m-b-20">
<div> <div>
<p class="m-b-20">比赛时间</p> <p class="m-b-20">比赛时间</p>
<div class="date-inputs"> <div class="date-inputs">
起止时间 起止时间
<div style="display: inline-flex;align-items: center;"> <div style="display: inline-flex;align-items: center;">
<el-date-picker <el-date-picker v-model="form.time"
v-model="form.time"
type="datetimerange" type="datetimerange"
range-separator="~" range-separator="~"
start-placeholder="开始日期" start-placeholder="开始日期"
@ -22,8 +23,7 @@
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@change="timeChange"> @change="timeChange">
</el-date-picker> </el-date-picker>
<el-alert <el-alert style="width: auto;padding: 4px 16px;margin-left: 10px;"
style="width: auto;padding: 4px 16px;margin-left: 10px;"
:title="'(请设置在 ' + step1.playStartTime + ' ~ ' + step1.playEndTime + '间)'" :title="'(请设置在 ' + step1.playStartTime + ' ~ ' + step1.playEndTime + '间)'"
type="error" type="error"
:closable="false" :closable="false"
@ -33,50 +33,73 @@
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="mgr20 m-b-20"> <el-card shadow="hover"
class="mgr20 m-b-20">
<div> <div>
<p class="m-b-20">课程</p> <p class="m-b-20">课程</p>
<div class="inline-input"> <div class="inline-input">
<el-select v-model="form.cid" @change="courseChange"> <el-select v-model="form.cid"
<el-option @change="courseChange">
v-for="item in curriculumList" <el-option v-for="item in curriculumList"
:key="item.cid" :key="item.associatedProduct"
:label="item.curriculumName" :label="item.productName"
:value="item.cid"> :value="item.associatedProduct
">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover"
class="m-b-20">
<div class="flex-between m-b-20"> <div class="flex-between m-b-20">
<span>实训项目</span> <span>实训项目</span>
<div style="display: inline-flex;"> <div style="display: inline-flex;">
<div> <div>
<el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input> <el-input placeholder="请输入项目名称"
prefix-icon="el-icon-search"
v-model.trim="keyword"
clearable></el-input>
</div> </div>
<el-button style="margin-left: 5px" type="primary" round @click="toProject">自定义实验项目</el-button> <el-button style="margin-left: 5px"
type="primary"
round
@click="toProject">自定义实验项目</el-button>
</div> </div>
</div> </div>
<!-- 实训项目表格 --> <!-- 实训项目表格 -->
<el-table :data="projects" class="table" stripe header-align="center"> <el-table :data="projects"
<el-table-column width="60" label="选择" align="center"> class="table"
stripe
header-align="center">
<el-table-column width="60"
label="选择"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio v-model="form.projectId" :label="scope.row.projectId">&nbsp;</el-radio> <el-radio v-model="form.projectId"
:label="scope.row.projectId">&nbsp;</el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column> <el-table-column prop="projectName"
<el-table-column prop="auth" label="项目权限" align="center"> label="项目名称"
align="center"></el-table-column>
<el-table-column prop="auth"
label="项目权限"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ permissionsKeys[scope.row.permissions] }} {{ permissionsKeys[scope.row.permissions] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="founder" label="创建人" align="center"> <el-table-column prop="founder"
label="创建人"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.founder ? '老师创建' : '系统内置' }} {{ scope.row.founder ? '老师创建' : '系统内置' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> <el-table-column prop="createTime"
label="创建时间"
align="center"></el-table-column>
<!-- <el-table-column label="操作" align="center"> <!-- <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="showProject(scope.row)">查看</el-button> <el-button type="text" @click="showProject(scope.row)">查看</el-button>
@ -84,19 +107,18 @@
</el-table-column> --> </el-table-column> -->
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination background
background
:page-size="pageSize" :page-size="pageSize"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="total,prev, pager, next" layout="total,prev, pager, next"
:total="total" :total="total"></el-pagination>
></el-pagination>
</div> </div>
</el-card> </el-card>
<div style="text-align: center"> <div style="text-align: center">
<el-button @click="back">返回</el-button> <el-button @click="back">返回</el-button>
<el-button type="primary" @click="save">保存</el-button> <el-button type="primary"
@click="save">保存</el-button>
</div> </div>
</div> </div>
</template> </template>
@ -142,10 +164,16 @@ export default {
// //
getCourse () { getCourse () {
this.loadIns = Loading.service() this.loadIns = Loading.service()
this.$get(this.api.curriculumList).then(({ data }) => { this.$post(this.api.listOfGoods, {
const list = data hotTag: 1,
this.curriculumList = data isShelves: 0,
if (!this.form.cid && list.length) this.form.cid = list[0].cid sort: 0,
pageNum: 1,
pageSize: 1000
}).then(({ page }) => {
const list = page.records
this.curriculumList = list
if (!this.form.cid && list.length) this.form.cid = list[0].associatedProduct
this.courseChange() this.courseChange()
}).catch(err => { }).catch(err => {
this.loadIns.close() this.loadIns.close()
@ -191,6 +219,7 @@ export default {
form, form,
curStep curStep
}) })
this.$parent.pass = 1
this.$router.push(`/project/list?show=1`) this.$router.push(`/project/list?show=1`)
}, },
// //
@ -243,5 +272,4 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
</style> </style>

@ -1,19 +1,29 @@
<template> <template>
<div> <div>
<div v-show="!setVisible" class="page"> <div v-show="!setVisible"
class="page">
<div class="page-content"> <div class="page-content">
<div class="p-title">比赛内容设置</div> <div class="p-title">比赛内容设置</div>
<el-form label-width="170px" label-suffix=":" size="small" :disabled="!editing && id"> <el-form label-width="170px"
<div v-for="(item, i) in form" :key="i" class="step"> label-suffix=":"
size="small"
:disabled="!editing && id">
<div v-for="(item, i) in form"
:key="i"
class="step">
<div class="title"> <div class="title">
<span>{{ item.stageName }}{{ nums[i] }}阶段 | {{ methods.find(e => e.id === item.method).name }} </span> <span>{{ item.stageName }}{{ nums[i] }}阶段 | {{ methods.find(e => e.id === item.method).name }} </span>
<el-button v-if="item.method !== 2" type="primary" @click="toSet(i)">设置</el-button> <el-button v-if="item.method !== 2"
type="primary"
@click="toSet(i)">设置</el-button>
</div> </div>
<el-form-item class="req" prop="time" label="比赛时间"> <el-form-item class="req"
prop="time"
label="比赛时间">
<span v-if="item.method !== 2 && item.startTime">{{ item.startTime + ' ' + item.endTime }}</span> <span v-if="item.method !== 2 && item.startTime">{{ item.startTime + ' ' + item.endTime }}</span>
<div style="display: flex;align-items: center;" v-if="item.method === 2"> <div style="display: flex;align-items: center;"
<el-date-picker v-if="item.method === 2">
v-model="item.time" <el-date-picker v-model="item.time"
type="datetimerange" type="datetimerange"
range-separator="~" range-separator="~"
start-placeholder="开始日期" start-placeholder="开始日期"
@ -22,8 +32,7 @@
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@change="timeChange"> @change="timeChange">
</el-date-picker> </el-date-picker>
<el-alert <el-alert style="width: auto;padding: 0px 16px;margin-left: 10px;"
style="width: auto;padding: 0px 16px;margin-left: 10px;"
:title="'(请设置在 ' + step1.playStartTime + ' ~ ' + step1.playEndTime + '间)'" :title="'(请设置在 ' + step1.playStartTime + ' ~ ' + step1.playEndTime + '间)'"
type="error" type="error"
:closable="false" :closable="false"
@ -32,31 +41,53 @@
</div> </div>
</el-form-item> </el-form-item>
<template v-if="item.method === 2"> <template v-if="item.method === 2">
<el-form-item class="req" label="比赛地点"> <el-form-item class="req"
<el-input v-model="item.offlineAddress" style="width: 80%"></el-input> label="比赛地点">
<el-input v-model="item.offlineAddress"
style="width: 80%"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="req" label="比赛内容"> <el-form-item class="req"
<el-input v-model="item.contentDescription" type="textarea" style="width: 80%"></el-input> label="比赛内容">
<el-input v-model="item.contentDescription"
type="textarea"
style="width: 80%"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="req" label="评分规则"> <el-form-item class="req"
<el-input v-model="item.scoreRule" type="textarea" style="width: 80%"></el-input> label="评分规则">
<el-input v-model="item.scoreRule"
type="textarea"
style="width: 80%"></el-input>
</el-form-item> </el-form-item>
</template> </template>
<template v-else> <template v-else>
<el-form-item class="req" prop="cid" label="课程系统"> <el-form-item class="req"
prop="cid"
label="课程系统">
{{ item.systemName }} {{ item.systemName }}
</el-form-item> </el-form-item>
<el-form-item class="req" prop="assessmentId" label="已选择考核"> <el-form-item class="req"
prop="assessmentId"
label="已选择考核">
{{ item.projectName }} {{ item.projectName }}
</el-form-item> </el-form-item>
<el-form-item class="req" prop="resultAnnouncementTime" label="比赛地点"> <el-form-item class="req"
prop="resultAnnouncementTime"
label="比赛地点">
<div class="line"> <div class="line">
<el-checkbox v-model="item.onlineButton">线上</el-checkbox> <el-checkbox v-model="item.onlineButton">线上</el-checkbox>
<el-input v-model="item.onlineAddress" clearable placeholder="请输入比赛网址" :disabled="!item.onlineButton" style="width: 400px;margin-left: 10px"></el-input> <el-input v-model="item.onlineAddress"
clearable
placeholder="请输入比赛网址"
:disabled="!item.onlineButton"
style="width: 400px;margin-left: 10px"></el-input>
</div> </div>
<div class="line"> <div class="line">
<el-checkbox v-model="item.offlineButton">线下</el-checkbox> <el-checkbox v-model="item.offlineButton">线下</el-checkbox>
<el-input v-model="item.offlineAddress" clearable placeholder="请输入地址" :disabled="!item.offlineButton" style="width: 400px;margin-left: 10px"></el-input> <el-input v-model="item.offlineAddress"
clearable
placeholder="请输入地址"
:disabled="!item.offlineButton"
style="width: 400px;margin-left: 10px"></el-input>
</div> </div>
</el-form-item> </el-form-item>
</template> </template>
@ -65,7 +96,10 @@
</div> </div>
</div> </div>
<set v-if="setVisible" :form.sync="form[curStep]" :step1.sync="step1" @hideSet="hideSet" /> <set v-if="setVisible"
:form.sync="form[curStep]"
:step1.sync="step1"
@hideSet="hideSet" />
</div> </div>
</template> </template>
@ -97,6 +131,7 @@ export default {
], ],
originForm: { originForm: {
cid: '', cid: '',
mallId: '',
contentDescription: '', contentDescription: '',
endTime: '', endTime: '',
scoreRule: '', scoreRule: '',
@ -112,6 +147,7 @@ export default {
form: [], form: [],
setVisible: false, setVisible: false,
curStep: 0, curStep: 0,
pass: 0
}; };
}, },
components: { components: {

@ -1,16 +1,24 @@
<template> <template>
<!-- 赛事管理 --> <!-- 赛事管理 -->
<div> <div>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover"
class="m-b-20">
<div class="flex-between"> <div class="flex-between">
<el-page-header @back="back" :content="name + '/管理'"></el-page-header> <el-page-header @back="back"
:content="name + '/管理'"></el-page-header>
</div> </div>
</el-card> </el-card>
<div class="page" style="margin-bottom: 24px"> <div class="page"
style="margin-bottom: 24px">
<div class="tabs"> <div class="tabs">
<a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == active}" @click="tabChange(index)">{{ item }}</a> <a class="item"
v-for="(item,index) in tabs"
:key="index"
:class="{active: index == active}"
@click="tabChange(index)">{{ item }}</a>
</div> </div>
<MatchDetail v-if="active == 'tab1'" ref="detail" /> <MatchDetail v-if="active == 'tab1'"
ref="detail" />
<MatchArch v-if="active == 'tab2'" /> <MatchArch v-if="active == 'tab2'" />
<MatchProgress v-else-if="active == 'tab3'" /> <MatchProgress v-else-if="active == 'tab3'" />
<notice v-else-if="active == 'tab4'" /> <notice v-else-if="active == 'tab4'" />
@ -41,6 +49,7 @@ export default {
tab4: "公告通知", tab4: "公告通知",
tab5: "报名人员" tab5: "报名人员"
}, },
pass: 0
}; };
}, },
components: { components: {
@ -65,7 +74,7 @@ export default {
const { detail } = this.$refs const { detail } = this.$refs
if (detail) { if (detail) {
const step = detail.$refs['step' + detail.step] const step = detail.$refs['step' + detail.step]
if (detail.step < 4 && step && step.updateTime) { if (detail.step < 4 && step && step.updateTime && !step.pass && !this.pass) {
this.$confirm(`编辑的内容未保存,是否保存并且发布?`, '提示.......', { this.$confirm(`编辑的内容未保存,是否保存并且发布?`, '提示.......', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
@ -136,6 +145,7 @@ export default {
// //
backPage () { backPage () {
console.log(444, this.$store.state) console.log(444, this.$store.state)
this.pass = 1
this.$router.push(`/match?page=${this.$store.state.match.page}`) this.$router.push(`/match?page=${this.$store.state.match.page}`)
}, },
// tab // tab
@ -156,5 +166,4 @@ export default {
</script> </script>
<style scoped> <style scoped>
</style> </style>

@ -356,7 +356,7 @@ export default {
publicationType: this.type, publicationType: this.type,
locationStageId: this.stageId, locationStageId: this.stageId,
stageIds: ids.splice(0, ids.length - 1) stageIds: ids.splice(0, ids.length - 1)
}).then(({ page, publishStatus }) => { }).then(({ page, publishStatus, total }) => {
this.published = publishStatus this.published = publishStatus
this.list = page this.list = page
this.total = total this.total = total
@ -392,12 +392,7 @@ export default {
// //
typeChange (val) { typeChange (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.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.getRank()
// this.published = whetherToPublish
// }).catch(res => {})
}, },
initData () { initData () {
this.page = 1 this.page = 1
@ -498,12 +493,10 @@ export default {
}, },
// //
publishSubmit () { publishSubmit () {
const { startTime, endTime } = this.grades[this.index]
if (Date.now() <= new Date(endTime)) return util.errorMsg('当前阶段还在进行中,请在本阶段结束后再发布!')
if (this.type) { // if (this.type) { //
this.$post(this.api.batchRelease, this.list.map(e => e.id)).then(res => { this.$post(this.api.batchRelease, this.list.map(e => e.id)).then(res => {
this.getData() // this.getData()
util.successMsg('发布成功!') // util.successMsg('')
}).catch(res => { }) }).catch(res => { })
} else { } else {
let data = [] // data let data = [] // data
@ -529,30 +522,15 @@ export default {
const ids = this.grades.map(e => e.stageId) const ids = this.grades.map(e => e.stageId)
ids.pop() 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.$post(this.api.publishRanking, data).then(res => {
this.uploadData = [] this.uploadData = []
this.getData() // this.getData()
util.successMsg('发布成功!') // util.successMsg('')
}).catch(res => { }) }).catch(res => { })
// }).catch(res => {})
} }
}, },
// //
publish () { publish () {
//
// 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 }) => { this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&publicationType=${this.type}`).then(({ whetherToPublish }) => {
whetherToPublish ? whetherToPublish ?
this.$confirm('排名已经发布,是否直接覆盖?', '提示', { this.$confirm('排名已经发布,是否直接覆盖?', '提示', {
@ -562,7 +540,6 @@ export default {
}).catch(() => { }) : }).catch(() => { }) :
this.publishSubmit() this.publishSubmit()
}).catch(res => { }) }).catch(res => { })
// this.publishSubmit()
}, },
// //
async getPublishTime () { async getPublishTime () {
@ -584,13 +561,18 @@ export default {
}, },
// //
async publishTimeSubmit () { async publishTimeSubmit () {
this.$post(this.api.addCompetitionStageRankingTime, { const { startTime, endTime } = this.grades[this.index]
if (Date.now() <= new Date(endTime)) return util.errorMsg('当前阶段还在进行中,请在本阶段结束后再发布!')
this.publishSubmit()
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()
this.uploaded = 0 this.uploaded = 0
@ -608,7 +590,7 @@ export default {
// //
if (publish) { if (publish) {
// //
if (this.type && !this.uploaded) { if (this.type && !this.uploaded && !this.list.length) {
return util.errorMsg('请先上传数据!') return util.errorMsg('请先上传数据!')
} else { } else {
this.publishTime = new Date() this.publishTime = new Date()
@ -618,9 +600,9 @@ export default {
try { try {
// //
// 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('&')}`) await this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}&releaseId=${this.timeId}`)
// } // }
this.publishTime = '' this.publishTime = ''
this.sourceType = '' this.sourceType = ''

Loading…
Cancel
Save