homeCalendar.vue
2.53 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
<template>
<div>
<match-calendar @select-date="getScheduleList"></match-calendar>
<div class="calendarList">
<ul v-loading="loading">
<li v-for="n in schList" :key="n.id" @click="goMatch(n)">
<label>{{ n.timeStr }}</label>
<div class="esp mt5">{{ n.name }}</div>
</li>
</ul>
<el-empty
v-if="schList.length== 0"
:image="`/img/order_no.png`"
:image-size="200" style="--el-empty-padding:0;--el-empty-description-margin-top:0"
/>
</div>
</div>
</template>
<script setup>
import {ref} from 'vue'
import {useRouter} from 'vue-router'
import MatchCalendar from "/@/viewsPc/components/matchCalendar.vue";
import {getIndexScheduleList} from "/@/apiPc/common";
const router = useRouter()
const schList = ref([])
const loading = ref(false)
async function getScheduleList(params) {
loading.value = true
await 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 lang="scss" scoped>
.calendarList {
border: 1px solid #F0F0F0;
padding: 12px 20px;
overflow: auto;
height: 225px;
ul {
li {
cursor: pointer;
background: #F6F9FE;
margin: 7px 0 7px 20px;
position: relative;
padding: 13px;
border-radius: 10px;
font-weight: 500;
font-size: 15px;
label {
//color: #453DEA;
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: linear-gradient(0deg, #8623FC, #453DEA);
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: linear-gradient(-90deg, #8623FC, #453DEA);
background: #000;
label {
color: #fff;
}
}
}
}
</style>