index.vue
5.75 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
180
181
182
183
184
185
186
187
188
189
190
191
<template>
<div>
<div class="box">
<div class="mt20" />
<el-card>
<el-row :gutter="20">
<el-col :sm="24" :lg="12">
<!--赛事日历-->
<el-calendar v-model="calendarValue">
<template #date-cell="data">
<div v-if="data.data.day.slice(8,10)==22" class="primaryDate date">22</div>
<div v-else class="date">
{{ data.data.day.slice(8,10) }}
</div>
</template>
</el-calendar>
</el-col>
<el-col :sm="24" :lg="12">
<div class="calendarList">
<ul>
<li>
<label>08:00~10:30</label> 无锡公开赛
</li>
<li>
<label>11:00</label> 2024年WDSF公开赛 A组
</li>
<li>
<label>12:00</label> 2024年WDSF公开赛 B组
</li>
<li>
<label>13:00</label> 2024年WDSF公开赛 C组
</li>
<li>
<label>15:00</label> 2024年WDSF公开赛 D组
</li>
</ul>
</div>
</el-col>
</el-row>
</el-card>
<el-card class="mt20 mb20" v-for="(n,index) in cjList">
<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>{{ language==0?'名次':'RANK' }}</td>
<td>{{ language==0?'组合':'COUPLE' }}</td>
<td width="100">{{ language==0?'国家':'COUNTRY' }}</td>
<td width="120" class="text-center">START #</td>
<td width="120" class="text-center" v-if="index>0">BASE</td>
<td width="120" class="text-center" v-if="index>0">POINTS</td>
</tr>
</thead>
<tbody>
<tr v-for="(l,kndex) in m.rows">
<td>{{ l.RANK }}</td>
<td>{{ l.COUPLE}}</td>
<td>{{ 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'
import { szToHz } from '@/utils/ruoyi'
import {useStorage} from "@vueuse/core/index";
const language = useStorage('language', 0)
const years = ref([])
const currYear = ref(null)
const ztxPlanList = ref([])
const planList = ref([])
const loading = ref(false)
const calendarValue = ref('2024-07-22')
// onMounted(() => {
// currYear.value = dayjs().year()
// getPlanYears().then(res => {
// years.value = res.data
// })
// })
//
// watch(currYear, (val) => {
// if (val) {
// getPlanList()
// }
// })
function getPlanList() {
loading.value = true
Promise.all([
getYearZtxPlanList({
year: currYear.value,
type: 1// 中跆协
}),
getYearZtxPlanList({
year: currYear.value,
type: 0 // 省
})
]).then(res => {
loading.value = false
ztxPlanList.value = res[0].rows
planList.value = res[1].rows
})
}
</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: 30px;height: 30px;line-height: 30px;
font-weight: bold;
}
.calendarList{border: 1px solid #F0F0F0;padding:12px 20px;overflow: hidden;
margin: 46px 0 0;
ul{
li{background: #F6F9FE;margin:7px 0 7px 20px;position: relative;padding: 13px;
border-radius: 10px;
font-weight: 500;
font-size: 15px;
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;}
}
}
}
</style>