实验报告、赛事

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`,
cancelCompetitionStageRankingTime: `competition/competitionReleaseTime/cancelCompetitionStageRankingTime`,
getCompetitionStageRankingTime: `competition/competitionReleaseTime/getCompetitionStageRankingTime`,
frontOfficeCompetitionRanking: `competition/competition/rank/frontOfficeCompetitionRanking`,
gradeImport: `https://www.occupationlab.com/template/赛事成绩导入模板.xlsx`,
rankImportTeam: `https://www.occupationlab.com/template/赛事排名导入模板(团队赛).xlsx`,
rankImportPerson: `https://www.occupationlab.com/template/赛事排名导入模板(个人赛).xlsx`,

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

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

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

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

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

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

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

Loading…
Cancel
Save