index.vue
5.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<template>
<div>
<div class="box">
<div class="mt20" />
<el-card>
<el-row :gutter="20">
<el-col :sm="24" :lg="12">
<!--赛事日历-->
<el-calendar v-model="currentDate">
<template #date-cell="data">
<div class="date" :class="data.data.day==query.currentDate?'primaryDate':''" @click="selectDate(data.data.day)">
{{ data.data.day.slice(8,10) }}
</div>
</template>
</el-calendar>
</el-col>
<el-col :sm="24" :lg="12">
<div class="calendarList">
<ul v-loading="loading">
<li v-for="n in schList" @click="goMatch(n)">
<label>{{ n.timeStr }}</label>
<div class="esp mt5">{{ n.name }}</div>
</li>
<el-empty v-if="schList.length== 0" :image="`/img/order_no.png`" :image-size="200"/>
</ul>
</div>
</el-col>
</el-row>
</el-card>
<el-card class="mt20 mb20" v-for="(n,index) in cjList" hidden>
<div class="leftboderTT">{{ language==0?n.title:n.en_title }}</div>
<div v-for="(m,jndex) in n.list">
<h3 class="text-center">{{ m.title }}</h3>
<div class="tablebody">
<table class="table table-striped">
<thead>
<tr class="bg-lineg">
<td class="text-center" style="width: 120px;">{{ language==0?'名次':'RANK' }}</td>
<td class="text-center">{{ language==0?'组合':'COUPLE' }}</td>
<td class="text-center w15">{{ language==0?'国家':'COUNTRY' }}</td>
<td class="text-center w15">START #</td>
<td class="text-center w15" v-if="index>0">BASE</td>
<td class="text-center w15" v-if="index>0">POINTS</td>
</tr>
</thead>
<tbody>
<tr v-for="(l,kndex) in m.rows">
<td class="text-center">{{ l.RANK }}</td>
<td class="text-center">{{ l.COUPLE}}</td>
<td class="text-center">{{ l.COUNTRY }}</td>
<td class="text-primary text-center">{{ l.START }}</td>
<td class="text-center" v-if="index>0">{{l.BASE}}</td>
<td v-if="index>0" class="text-primary text-center">{{ l.POINTS }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</el-card>
<br><br>
</div>
</div>
</template>
<script setup>
import { onMounted, ref, watch } from 'vue'
import { getPlanYears, getYearZtxPlanList } from '@/apiPc/train'
import {cjList} from '@/assets/js/data'
import { ArrowRight } from '@element-plus/icons-vue'
import { dayjs } from 'element-plus'
const router = useRouter()
import {useStorage} from "@vueuse/core/index";
import {getIndexScheduleList} from "@/apiPc/common";
import {useRouter} from "vue-router";
const language = useStorage('language', 0)
const years = ref([])
const currYear = ref(null)
const ztxPlanList = ref([])
const planList = ref([])
const schList = ref([])
const loading = ref(false)
const currentDate = ref(dayjs('2024-07-17').toDate())
const query = ref({
// currentDate:dayjs().format('YYYY-MM-DD')
currentDate: '2024-07-17'
})
getScheduleList()
function getScheduleList() {
loading.value = true
query.value.currentDate = dayjs(query.value.currentDate).format('YYYY-MM-DD')
getIndexScheduleList(query.value).then(res=>{
loading.value = false
schList.value = res.data
})
}
function selectDate(date) {
console.log(dayjs(date).toDate())
console.log(query.value.currentDate)
query.value.currentDate = dayjs(date).toDate()
getScheduleList()
}
function goMatch(n) {
router.push({
name: 'matchDetail',
params: {
id: n.cptId
},
query: {
matchId: n.cptId
}
})
}
</script>
<style scoped lang="scss">
.leftboderTT{margin: 0 0 20px;color: var(--el-color-primary);
font-size: 20px;}
h3{background: #F5F0FF;margin: 0;padding: 10px 0;
color: var(--el-color-primary);
font-size: 18px;}
.table { border-spacing: 0;
border-collapse: collapse;
width: 100%;
max-width: 100%;
margin-bottom: 20px;
td,th{ padding: 8px; font-size: 14px;}
}
:deep(.table-striped > tbody > tr:nth-of-type(odd)){
background: #F6F9FE;
}
.el-calendar{--el-calendar-border:none;--el-calendar-cell-width:51px;text-align:center;
--el-text-color-regular:#8E8D94;
:deep(.el-calendar__header){justify-content: center;}
:deep(.el-calendar__body){border: 1px solid #F0F0F0;padding: 0}
:deep(.el-calendar-table .el-calendar-day){padding: 1px;}
:deep(.el-calendar-table td.is-selected){background: transparent;}
:deep(.el-calendar__button-group){display: none;}
}
.primaryDate{color: #fff;
background: linear-gradient(90deg, #8623FC, #453DEA);}
.date{ margin:5px auto;border-radius: 50%;width: 34px;height: 34px;line-height: 34px;
font-weight: bold;
}
.calendarList{border: 1px solid #F0F0F0;padding:12px 20px 0;overflow: hidden;
height: 100%;
ul{ overflow: auto;height: 330px;margin: 0;
li{background: #F6F9FE;margin:7px 0 7px 20px;position: relative;padding: 13px;
border-radius: 10px;
font-weight: 500;
font-size: 15px;cursor: pointer;
label{color: #453DEA;margin-right: 15px;
&::before{content: '';background:#fff;left: -17px;top: 0px;bottom: 0;margin: auto;
border-radius: 50%;width: 2px;height: 2px;position: absolute;z-index: 1}
}
}
li::before{content: '';background: linear-gradient(0deg, #8623FC, #453DEA);
border-radius: 50%;width: 8px;height: 8px;position: absolute;
left: -20px;top: 0;bottom: 0;margin: auto;z-index: 1;
}
li::after{content: ''; left: -16px;width: 1px;height: 100%;
background: #EBEBEB; position: absolute;top: 20px}
li:hover{color: #fff;
background: linear-gradient(-90deg, #8623FC, #453DEA);
label{color: #fff;}
}
}
}
.w15{width: 15%;}
</style>