|
|
@ -8,8 +8,12 @@ |
|
|
|
<div class="single-choice"> |
|
|
|
<div class="single-choice"> |
|
|
|
<dl> |
|
|
|
<dl> |
|
|
|
<dd> |
|
|
|
<dd> |
|
|
|
<el-radio-group v-model="form.month" @change="changeType"> |
|
|
|
<el-radio-group v-model="form.month" |
|
|
|
<el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border>{{ item.name }}</el-radio> |
|
|
|
@change="changeType"> |
|
|
|
|
|
|
|
<el-radio v-for="(item,index) in dateList" |
|
|
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
:label="item.id" |
|
|
|
|
|
|
|
border>{{ item.name }}</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-radio-group> |
|
|
|
</dd> |
|
|
|
</dd> |
|
|
|
</dl> |
|
|
|
</dl> |
|
|
@ -17,10 +21,21 @@ |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>创建区间:</label> |
|
|
|
<label>创建区间:</label> |
|
|
|
<el-date-picker v-model="date" align="right" unlink-panels type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" clearable></el-date-picker> |
|
|
|
<el-date-picker v-model="date" |
|
|
|
|
|
|
|
align="right" |
|
|
|
|
|
|
|
unlink-panels |
|
|
|
|
|
|
|
type="daterange" |
|
|
|
|
|
|
|
start-placeholder="开始日期" |
|
|
|
|
|
|
|
end-placeholder="结束日期" |
|
|
|
|
|
|
|
format="yyyy-MM-dd" |
|
|
|
|
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
|
|
|
|
clearable></el-date-picker> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<el-input placeholder="请输入竞赛名称/创建人" suffix-icon="el-icon-search" v-model="keyword" clearable></el-input> |
|
|
|
<el-input placeholder="请输入竞赛名称/创建人" |
|
|
|
|
|
|
|
suffix-icon="el-icon-search" |
|
|
|
|
|
|
|
v-model="keyword" |
|
|
|
|
|
|
|
clearable></el-input> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -28,89 +43,162 @@ |
|
|
|
<ul class="filter"> |
|
|
|
<ul class="filter"> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>大赛来源:</label> |
|
|
|
<label>大赛来源:</label> |
|
|
|
<el-select v-model="form.platformSource" clearable @change="sourceChange"> |
|
|
|
<el-select v-model="form.platformSource" |
|
|
|
<el-option v-for="(item, i) in sourceList" :key="i" :label="item.name" :value="item.id"></el-option> |
|
|
|
clearable |
|
|
|
|
|
|
|
@change="sourceChange"> |
|
|
|
|
|
|
|
<el-option v-for="(item, i) in sourceList" |
|
|
|
|
|
|
|
:key="i" |
|
|
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
|
|
:value="item.id"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>大赛范围:</label> |
|
|
|
<label>大赛范围:</label> |
|
|
|
<el-select v-model="form.competitionScope" clearable @change="initData"> |
|
|
|
<el-select v-model="form.competitionScope" |
|
|
|
<el-option v-for="(item, i) in rangeList" :key="i" :label="item.name" :value="item.id"></el-option> |
|
|
|
clearable |
|
|
|
|
|
|
|
@change="initData"> |
|
|
|
|
|
|
|
<el-option v-for="(item, i) in rangeList" |
|
|
|
|
|
|
|
:key="i" |
|
|
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
|
|
:value="item.id"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" round @click="add" v-auth>创建竞赛</el-button> |
|
|
|
<el-button type="primary" |
|
|
|
<el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button> |
|
|
|
round |
|
|
|
|
|
|
|
@click="add" |
|
|
|
|
|
|
|
v-auth>创建竞赛</el-button> |
|
|
|
|
|
|
|
<el-button type="primary" |
|
|
|
|
|
|
|
round |
|
|
|
|
|
|
|
@click="delAllSelection" |
|
|
|
|
|
|
|
v-auth>批量删除</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<el-table ref="table" :data="matchData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> |
|
|
|
<el-table ref="table" |
|
|
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> |
|
|
|
:data="matchData" |
|
|
|
<el-table-column type="index" width="60" label="序号" align="center"> |
|
|
|
class="table" |
|
|
|
|
|
|
|
stripe |
|
|
|
|
|
|
|
header-align="center" |
|
|
|
|
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
|
|
|
|
row-key="id"> |
|
|
|
|
|
|
|
<el-table-column type="selection" |
|
|
|
|
|
|
|
width="55" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
:reserve-selection="true"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column type="index" |
|
|
|
|
|
|
|
width="60" |
|
|
|
|
|
|
|
label="序号" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.$index + (page - 1) * pageSize + 1 }} |
|
|
|
{{ scope.$index + (page - 1) * pageSize + 1 }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="competitionName" label="竞赛名称" align="center"></el-table-column> |
|
|
|
<el-table-column prop="competitionName" |
|
|
|
<el-table-column prop="founderName" label="创建人" align="center"></el-table-column> |
|
|
|
label="竞赛名称" |
|
|
|
<el-table-column prop="name" label="大赛来源" width="120" align="center"> |
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="founderName" |
|
|
|
|
|
|
|
label="创建人" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="name" |
|
|
|
|
|
|
|
label="大赛来源" |
|
|
|
|
|
|
|
width="120" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ sourceList.find(e => e.id === scope.row.platformSource).name }} |
|
|
|
{{ sourceList.find(e => e.id === scope.row.platformSource).name }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="name" label="大赛范围" align="center"> |
|
|
|
<el-table-column prop="name" |
|
|
|
|
|
|
|
label="大赛范围" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ rangeList.find(e => e.id === scope.row.competitionScope).name }} |
|
|
|
{{ rangeList.find(e => e.id === scope.row.competitionScope).name }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="applicantNum" label="报名人数" align="center" width="100"></el-table-column> |
|
|
|
<el-table-column prop="applicantNum" |
|
|
|
<el-table-column prop="status" label="状态" align="center" width="80"> |
|
|
|
label="报名人数" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
width="100"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="status" |
|
|
|
|
|
|
|
label="状态" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
width="80"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row.publishStatus ? '已发布' : '未发布' }} |
|
|
|
{{ scope.row.publishStatus ? '已发布' : '未发布' }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="time" label="竞赛时间" align="center" width="290"> |
|
|
|
<el-table-column prop="time" |
|
|
|
|
|
|
|
label="竞赛时间" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
width="290"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row.playStartTime }} ~ {{ scope.row.playEndTime }} |
|
|
|
{{ scope.row.playStartTime }} ~ {{ scope.row.playEndTime }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="createTime" label="创建时间" align="center" width="160"></el-table-column> |
|
|
|
<el-table-column prop="createTime" |
|
|
|
<el-table-column label="操作" align="center" width="260"> |
|
|
|
label="创建时间" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
width="160"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column label="操作" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
width="260"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button v-if="scope.row.playingStages && scope.row.playingStages.length" type="text" @click="editEndTime(scope.row)" v-auth>修改结束时间</el-button> |
|
|
|
<el-button v-if="scope.row.playingStages && scope.row.playingStages.length" |
|
|
|
<el-button type="text" @click="manage(scope.row)" v-auth>管理</el-button> |
|
|
|
type="text" |
|
|
|
<el-button type="text" @click="delData(scope.row)" v-auth>删除</el-button> |
|
|
|
@click="editEndTime(scope.row)" |
|
|
|
<el-switch |
|
|
|
v-auth>修改结束时间</el-button> |
|
|
|
v-if="scope.row.publishStatus" |
|
|
|
<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-auth="'/match:启用'" |
|
|
|
v-model="scope.row.ztOpen" |
|
|
|
v-model="scope.row.ztOpen" |
|
|
|
:active-value="0" |
|
|
|
:active-value="0" |
|
|
|
:inactive-value="1" |
|
|
|
:inactive-value="1" |
|
|
|
style="margin: 0 10px 0 5px" |
|
|
|
style="margin: 0 10px 0 5px" |
|
|
|
:active-text="scope.row.ztOpen ? '关' : '开'" |
|
|
|
:active-text="scope.row.ztOpen ? '关' : '开'" |
|
|
|
@change="switchOff($event,scope.row,scope.$index)" |
|
|
|
@change="switchOff($event,scope.row,scope.$index)"></el-switch> |
|
|
|
></el-switch> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
<div class="pagination"> |
|
|
|
<div class="pagination"> |
|
|
|
<el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange" :current-page="page"> |
|
|
|
<el-pagination background |
|
|
|
|
|
|
|
layout="total, prev, pager, next" |
|
|
|
|
|
|
|
:total="total" |
|
|
|
|
|
|
|
@current-change="handleCurrentChange" |
|
|
|
|
|
|
|
:current-page="page"> |
|
|
|
</el-pagination> |
|
|
|
</el-pagination> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="修改当前阶段结束时间" :visible.sync="modifyVisible" width="900px" :close-on-click-modal="false"> |
|
|
|
<el-dialog title="修改当前阶段结束时间" |
|
|
|
<el-table :data="curRow.playingStages" class="table" ref="table" stripe header-align="center"> |
|
|
|
:visible.sync="modifyVisible" |
|
|
|
<el-table-column prop="stageName" label="阶段名称" min-width="100" align="center"></el-table-column> |
|
|
|
width="900px" |
|
|
|
<el-table-column label="竞赛起止时间" width="300" align="center"> |
|
|
|
:close-on-click-modal="false"> |
|
|
|
|
|
|
|
<el-table :data="curRow.playingStages" |
|
|
|
|
|
|
|
class="table" |
|
|
|
|
|
|
|
ref="table" |
|
|
|
|
|
|
|
stripe |
|
|
|
|
|
|
|
header-align="center"> |
|
|
|
|
|
|
|
<el-table-column prop="stageName" |
|
|
|
|
|
|
|
label="阶段名称" |
|
|
|
|
|
|
|
min-width="100" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column label="竞赛起止时间" |
|
|
|
|
|
|
|
width="300" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row.startTime + ' ~ ' + scope.row.endTime }} |
|
|
|
{{ scope.row.startTime + ' ~ ' + scope.row.endTime }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="结束时间调整为" align="center" width="280"> |
|
|
|
<el-table-column label="结束时间调整为" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
width="280"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-date-picker |
|
|
|
<el-date-picker popper-class="no-atTheMoment" |
|
|
|
popper-class="no-atTheMoment" |
|
|
|
|
|
|
|
v-model="scope.row.newEndTime" |
|
|
|
v-model="scope.row.newEndTime" |
|
|
|
placeholder="请选择结束时间" |
|
|
|
placeholder="请选择结束时间" |
|
|
|
type="datetime" |
|
|
|
type="datetime" |
|
|
@ -119,9 +207,13 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<span slot="footer" |
|
|
|
<el-button size="small" @click="modifyVisible = false">取 消</el-button> |
|
|
|
class="dialog-footer"> |
|
|
|
<el-button size="small" type="primary" @click="modifySubmit">确 定</el-button> |
|
|
|
<el-button size="small" |
|
|
|
|
|
|
|
@click="modifyVisible = false">取 消</el-button> |
|
|
|
|
|
|
|
<el-button size="small" |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
@click="modifySubmit">确 定</el-button> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -131,9 +223,10 @@ |
|
|
|
import util from "@/libs/util"; |
|
|
|
import util from "@/libs/util"; |
|
|
|
import Setting from "@/setting"; |
|
|
|
import Setting from "@/setting"; |
|
|
|
import { Loading } from 'element-ui' |
|
|
|
import { Loading } from 'element-ui' |
|
|
|
|
|
|
|
import Bus from '@/libs/bus' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: "match", |
|
|
|
name: "match", |
|
|
|
data() { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
timer: null, |
|
|
|
timer: null, |
|
|
|
keyword: "", |
|
|
|
keyword: "", |
|
|
@ -201,17 +294,16 @@ export default { |
|
|
|
page: +this.$route.query.page || 1, |
|
|
|
page: +this.$route.query.page || 1, |
|
|
|
pageSize: 10, |
|
|
|
pageSize: 10, |
|
|
|
total: 0, |
|
|
|
total: 0, |
|
|
|
transferPublishStatus: [ "未发布", "已发布"], |
|
|
|
transferPublishStatus: ["未发布", "已发布"], |
|
|
|
modifyVisible: false, |
|
|
|
modifyVisible: false, |
|
|
|
curRow: { |
|
|
|
curRow: { |
|
|
|
playingStages: [] |
|
|
|
playingStages: [] |
|
|
|
}, |
|
|
|
}, |
|
|
|
timer: null, |
|
|
|
timer: null, |
|
|
|
redisTimer: null, |
|
|
|
|
|
|
|
pickerOptions: { |
|
|
|
pickerOptions: { |
|
|
|
shortcuts: [{ |
|
|
|
shortcuts: [{ |
|
|
|
text: '此刻', |
|
|
|
text: '此刻', |
|
|
|
onClick(picker) { |
|
|
|
onClick (picker) { |
|
|
|
picker.$emit('pick', new Date(Date.now() + 5000)) |
|
|
|
picker.$emit('pick', new Date(Date.now() + 5000)) |
|
|
|
} |
|
|
|
} |
|
|
|
}] |
|
|
|
}] |
|
|
@ -219,7 +311,7 @@ export default { |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
|
"form.month": function(val) { |
|
|
|
"form.month": function (val) { |
|
|
|
if (val) { |
|
|
|
if (val) { |
|
|
|
let unit = 24 * 60 * 60 * 1000; |
|
|
|
let unit = 24 * 60 * 60 * 1000; |
|
|
|
this.date = [util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() - unit * 30 * val)), util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() + unit))]; |
|
|
|
this.date = [util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() - unit * 30 * val)), util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() + unit))]; |
|
|
@ -227,7 +319,7 @@ export default { |
|
|
|
this.date = []; |
|
|
|
this.date = []; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
date: function(val) { |
|
|
|
date: function (val) { |
|
|
|
if (val) { |
|
|
|
if (val) { |
|
|
|
this.form.startTime = val[0]; |
|
|
|
this.form.startTime = val[0]; |
|
|
|
this.form.endTime = val[1]; |
|
|
|
this.form.endTime = val[1]; |
|
|
@ -237,23 +329,26 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
this.initData(); |
|
|
|
this.initData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
keyword: function(val) { |
|
|
|
keyword: function (val) { |
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
this.initData(); |
|
|
|
this.initData(); |
|
|
|
}, 500); |
|
|
|
}, 500); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted () { |
|
|
|
|
|
|
|
// websocket实时刷新 |
|
|
|
|
|
|
|
Bus.$on('matchSocket', () => { |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
this.$once('hook:beforeDestroy', function() { |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.getData() |
|
|
|
|
|
|
|
this.$once('hook:beforeDestroy', function () { |
|
|
|
clearInterval(this.timer) |
|
|
|
clearInterval(this.timer) |
|
|
|
clearInterval(this.redisTimer) |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
getList() { |
|
|
|
getData () { |
|
|
|
// const load = Loading.service() |
|
|
|
|
|
|
|
const { form } = this |
|
|
|
const { form } = this |
|
|
|
this.$post(this.api.CompetitionPageConditionQueryByNakadai, { |
|
|
|
this.$post(this.api.CompetitionPageConditionQueryByNakadai, { |
|
|
|
pageNum: this.page, |
|
|
|
pageNum: this.page, |
|
|
@ -296,38 +391,29 @@ export default { |
|
|
|
this.page-- |
|
|
|
this.page-- |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(res => { |
|
|
|
}).catch(res => { }) |
|
|
|
// load.close() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getData() { |
|
|
|
|
|
|
|
this.getList() |
|
|
|
|
|
|
|
if (!Setting.isDev) { |
|
|
|
|
|
|
|
clearInterval(this.redisTimer) |
|
|
|
|
|
|
|
this.redisTimer = setInterval(this.getRedis, 1000) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
initData() { |
|
|
|
initData () { |
|
|
|
this.page = 1; |
|
|
|
this.page = 1; |
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取redis缓存 |
|
|
|
// 获取redis缓存 |
|
|
|
getRedis() { |
|
|
|
getRedis () { |
|
|
|
this.$post(this.api.getRedisCacheCompetition).then(({ data }) => { |
|
|
|
this.$post(this.api.getRedisCacheCompetition).then(({ data }) => { |
|
|
|
data && this.getList() |
|
|
|
data && this.getList() |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
add() { |
|
|
|
add () { |
|
|
|
this.$router.push("/addMatch"); |
|
|
|
this.$router.push("/addMatch"); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 修改结束时间 |
|
|
|
// 修改结束时间 |
|
|
|
editEndTime(row) { |
|
|
|
editEndTime (row) { |
|
|
|
this.modifyVisible = true |
|
|
|
this.modifyVisible = true |
|
|
|
row.newEndTime = '' |
|
|
|
row.newEndTime = '' |
|
|
|
this.curRow = row |
|
|
|
this.curRow = row |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 修改结束时间提交 |
|
|
|
// 修改结束时间提交 |
|
|
|
modifySubmit() { |
|
|
|
modifySubmit () { |
|
|
|
const row = this.curRow |
|
|
|
const row = this.curRow |
|
|
|
const data = [] |
|
|
|
const data = [] |
|
|
|
row.competitionStageList.map(e => { |
|
|
|
row.competitionStageList.map(e => { |
|
|
@ -341,19 +427,19 @@ export default { |
|
|
|
util.successMsg('修改成功') |
|
|
|
util.successMsg('修改成功') |
|
|
|
this.modifyVisible = false |
|
|
|
this.modifyVisible = false |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
}).catch(err => {}) |
|
|
|
}).catch(err => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 管理 |
|
|
|
// 管理 |
|
|
|
manage(row) { |
|
|
|
manage (row) { |
|
|
|
this.$router.push(`/matchManage?id=${row.id}&name=${row.competitionName}`) |
|
|
|
this.$router.push(`/matchManage?id=${row.id}&name=${row.competitionName}`) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
changeType() { |
|
|
|
changeType () { |
|
|
|
this.$refs.table.clearSelection(); |
|
|
|
this.$refs.table.clearSelection(); |
|
|
|
this.initData(); |
|
|
|
this.initData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 大赛来源回调 |
|
|
|
// 大赛来源回调 |
|
|
|
sourceChange(val) { |
|
|
|
sourceChange (val) { |
|
|
|
this.$router.push({ |
|
|
|
this.$router.push({ |
|
|
|
path: '/match', |
|
|
|
path: '/match', |
|
|
|
query: { |
|
|
|
query: { |
|
|
@ -364,7 +450,7 @@ export default { |
|
|
|
this.$store.commit('SET_M_SOURCE', val) |
|
|
|
this.$store.commit('SET_M_SOURCE', val) |
|
|
|
this.initData() |
|
|
|
this.initData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
delData(row) { |
|
|
|
delData (row) { |
|
|
|
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", { |
|
|
|
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", { |
|
|
|
type: "warning" |
|
|
|
type: "warning" |
|
|
|
}) |
|
|
|
}) |
|
|
@ -378,11 +464,11 @@ export default { |
|
|
|
.catch(() => { |
|
|
|
.catch(() => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleSelectionChange(val) { |
|
|
|
handleSelectionChange (val) { |
|
|
|
this.multipleSelection = val; |
|
|
|
this.multipleSelection = val; |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 批量删除 |
|
|
|
// 批量删除 |
|
|
|
delAllSelection() { |
|
|
|
delAllSelection () { |
|
|
|
if (this.multipleSelection.length) { |
|
|
|
if (this.multipleSelection.length) { |
|
|
|
this.$confirm("确定要删除吗?", "提示", { |
|
|
|
this.$confirm("确定要删除吗?", "提示", { |
|
|
|
type: "warning" |
|
|
|
type: "warning" |
|
|
@ -400,24 +486,26 @@ export default { |
|
|
|
this.$message.warning("请先选择赛事 !"); |
|
|
|
this.$message.warning("请先选择赛事 !"); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleCurrentChange(val) { |
|
|
|
handleCurrentChange (val) { |
|
|
|
this.page = val; |
|
|
|
this.page = val; |
|
|
|
this.$router.push(`match?page=${val}`) |
|
|
|
this.$router.push(`match?page=${val}`) |
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
|
this.$store.commit('SET_M_PAGE', val) |
|
|
|
this.$store.commit('SET_M_PAGE', val) |
|
|
|
}, |
|
|
|
}, |
|
|
|
transferTime(date, type) { |
|
|
|
transferTime (date, type) { |
|
|
|
if (date == "0000-00-00 00:00:00") return "---"; |
|
|
|
if (date == "0000-00-00 00:00:00") return "---"; |
|
|
|
return date; |
|
|
|
return date; |
|
|
|
}, |
|
|
|
}, |
|
|
|
switchOff(val, row) { |
|
|
|
async switchOff (val, row) { |
|
|
|
this.$post(this.api.disabledEventsCompetition, { |
|
|
|
this.$post(this.api.disabledEventsCompetition, { |
|
|
|
competitionId: row.id, |
|
|
|
competitionId: row.id, |
|
|
|
isOpen: val, |
|
|
|
isOpen: val, |
|
|
|
type: 0 // 禁用平台来源(0中台,1职站) |
|
|
|
type: 0 // 禁用平台来源(0中台,1职站) |
|
|
|
}).then(res => { |
|
|
|
}).then(res => { |
|
|
|
util.successMsg(val == 1 ? '禁用成功' : '启用成功') |
|
|
|
util.successMsg(val == 1 ? '禁用成功' : '启用成功') |
|
|
|
}).catch(err => {}) |
|
|
|
}).catch(err => { }) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await this.$post(`${this.api.refreshPageNotification}?content=1`) |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
@ -432,7 +520,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@media(max-width: 1640px) { |
|
|
|
@media (max-width: 1640px) { |
|
|
|
.page .page-content .tool .filter { |
|
|
|
.page .page-content .tool .filter { |
|
|
|
flex-wrap: wrap; |
|
|
|
flex-wrap: wrap; |
|
|
|
margin-bottom: -15px; |
|
|
|
margin-bottom: -15px; |
|
|
|