index.vue
2.74 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
<template>
<div class="box">
<div class="mt20"/>
<el-card>
<el-row :gutter="20">
<el-col :sm="24" :lg="12">
<!--赛事日历-->
<match-calendar @select-date="getScheduleList"></match-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>
<!-- <match-cj />-->
</div>
</template>
<script setup>
import {ref} from 'vue'
import {getIndexScheduleList} from "@/apiPc/common";
import {useRouter} from "vue-router";
import MatchCalendar from "/@/viewsPc/components/matchCalendar.vue";
// import MatchCj from "/@/viewsPc/components/matchCj.vue";
const router = useRouter()
const schList = ref([])
const loading = ref(false)
function getScheduleList(params) {
loading.value = true
getIndexScheduleList(params).then(res => {
loading.value = false
schList.value = res.data
})
}
function goMatch(n) {
router.push({
name: 'matchDetail',
params: {
id: n.cptId
},
query: {
matchId: n.cptId
}
})
}
</script>
<style scoped lang="scss">
.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: #000;
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: #000;
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: #000;
label {
color: #fff;
}
}
}
}
</style>