2024改成2025
Showing
7 changed files
with
36 additions
and
29 deletions
This diff is collapsed.
Click to expand it.
| ... | @@ -2,10 +2,10 @@ | ... | @@ -2,10 +2,10 @@ |
| 2 | <div> | 2 | <div> |
| 3 | <el-calendar v-model="currentDate" :range="calendarRange"> | 3 | <el-calendar v-model="currentDate" :range="calendarRange"> |
| 4 | <template #date-cell="data"> | 4 | <template #date-cell="data"> |
| 5 | <div :class="data.data.day==query.currentDate?'primaryDate date':'date'" @click="selectDate(data.data.day)"> | 5 | <div :class="data.data.day==query.currentDate?'primaryDate date':'date'" @click="selectDate(data.data.day)"> |
| 6 | {{ data.data.day.slice(8, 10) }} | 6 | {{ data.data.day.slice(8, 10) }} |
| 7 | </div> | 7 | </div> |
| 8 | 8 | ||
| 9 | </template> | 9 | </template> |
| 10 | </el-calendar> | 10 | </el-calendar> |
| 11 | <div class="calendarList"> | 11 | <div class="calendarList"> |
| ... | @@ -15,42 +15,48 @@ | ... | @@ -15,42 +15,48 @@ |
| 15 | <div class="esp mt5">{{ n.name }}</div> | 15 | <div class="esp mt5">{{ n.name }}</div> |
| 16 | </li> | 16 | </li> |
| 17 | </ul> | 17 | </ul> |
| 18 | <el-empty v-if="schList.length== 0" | 18 | <el-empty |
| 19 | style="--el-empty-padding:0;--el-empty-description-margin-top:0" | 19 | v-if="schList.length== 0" |
| 20 | :image="`/img/order_no.png`" :image-size="200"/> | 20 | :image="`/img/order_no.png`" |
| 21 | :image-size="200" style="--el-empty-padding:0;--el-empty-description-margin-top:0" | ||
| 22 | /> | ||
| 21 | </div> | 23 | </div> |
| 22 | </div> | 24 | </div> |
| 23 | </template> | 25 | </template> |
| 24 | 26 | ||
| 25 | <script setup> | 27 | <script setup> |
| 26 | import {ref} from "vue"; | 28 | import { ref } from 'vue' |
| 27 | import {dayjs} from "element-plus"; | 29 | import { dayjs } from 'element-plus' |
| 28 | import {getIndexScheduleList} from "@/apiPc/common"; | 30 | import { getIndexScheduleList } from '@/apiPc/common' |
| 29 | import {useRouter} from "vue-router"; | 31 | import { useRouter } from 'vue-router' |
| 32 | |||
| 30 | const router = useRouter() | 33 | const router = useRouter() |
| 31 | const currentDate = ref(new Date()) | 34 | const currentDate = ref(new Date()) |
| 32 | const calendarRange = ref([dayjs('2024-07-17').toDate(), dayjs('2024-07-17').toDate()]) | 35 | const calendarRange = ref([dayjs('2025-07-17').toDate(), dayjs('2025-07-17').toDate()]) |
| 33 | const schList = ref([]) | 36 | const schList = ref([]) |
| 34 | const loading = ref(false) | 37 | const loading = ref(false) |
| 35 | const query = ref({ | 38 | const query = ref({ |
| 36 | // currentDate:dayjs().format('YYYY-MM-DD') | 39 | // currentDate:dayjs().format('YYYY-MM-DD') |
| 37 | currentDate: '2024-07-17' | 40 | currentDate: '2025-07-17' |
| 38 | }) | 41 | }) |
| 39 | getScheduleList() | 42 | getScheduleList() |
| 43 | |||
| 40 | function getScheduleList() { | 44 | function getScheduleList() { |
| 41 | loading.value = true | 45 | loading.value = true |
| 42 | query.value.currentDate = dayjs(query.value.currentDate).format('YYYY-MM-DD') | 46 | query.value.currentDate = dayjs(query.value.currentDate).format('YYYY-MM-DD') |
| 43 | getIndexScheduleList(query.value).then(res=>{ | 47 | getIndexScheduleList(query.value).then(res => { |
| 44 | loading.value = false | 48 | loading.value = false |
| 45 | schList.value = res.data | 49 | schList.value = res.data |
| 46 | }) | 50 | }) |
| 47 | } | 51 | } |
| 52 | |||
| 48 | function selectDate(date) { | 53 | function selectDate(date) { |
| 49 | console.log(dayjs(date).toDate()) | 54 | console.log(dayjs(date).toDate()) |
| 50 | console.log(query.value.currentDate) | 55 | console.log(query.value.currentDate) |
| 51 | query.value.currentDate = dayjs(date).toDate() | 56 | query.value.currentDate = dayjs(date).toDate() |
| 52 | getScheduleList() | 57 | getScheduleList() |
| 53 | } | 58 | } |
| 59 | |||
| 54 | function goMatch(n) { | 60 | function goMatch(n) { |
| 55 | router.push({ | 61 | router.push({ |
| 56 | name: 'matchDetail', | 62 | name: 'matchDetail', |
| ... | @@ -64,44 +70,44 @@ function goMatch(n) { | ... | @@ -64,44 +70,44 @@ function goMatch(n) { |
| 64 | } | 70 | } |
| 65 | </script> | 71 | </script> |
| 66 | 72 | ||
| 67 | <style scoped lang="scss"> | 73 | <style lang="scss" scoped> |
| 68 | .el-calendar { | 74 | .el-calendar { |
| 69 | --el-calendar-border: none; | 75 | --el-calendar-border: none; |
| 70 | --el-calendar-cell-width: 40px; | 76 | --el-calendar-cell-width: 40px; |
| 71 | text-align: center; | 77 | text-align: center; |
| 72 | --el-text-color-regular: #8E8D94; | 78 | --el-text-color-regular: #8E8D94; |
| 73 | 79 | ||
| 74 | :deep(.el-calendar__header) { | 80 | :deep(.el-calendar__header) { |
| 75 | justify-content: center; | 81 | justify-content: center; |
| 76 | padding: 0 0 10px | 82 | padding: 0 0 10px |
| 77 | } | 83 | } |
| 78 | 84 | ||
| 79 | :deep(.el-calendar__body) { | 85 | :deep(.el-calendar__body) { |
| 80 | border: 1px solid #F0F0F0; | 86 | border: 1px solid #F0F0F0; |
| 81 | padding: 0 | 87 | padding: 0 |
| 82 | } | 88 | } |
| 83 | 89 | ||
| 84 | :deep(.el-calendar-table .el-calendar-day) { | 90 | :deep(.el-calendar-table .el-calendar-day) { |
| 85 | padding: 1px; | 91 | padding: 1px; |
| 86 | } | 92 | } |
| 87 | 93 | ||
| 88 | :deep(.el-calendar-table td.is-selected) { | 94 | :deep(.el-calendar-table td.is-selected) { |
| 89 | background: transparent; | 95 | background: transparent; |
| 90 | } | 96 | } |
| 91 | 97 | ||
| 92 | :deep(.el-calendar__button-group) { | 98 | :deep(.el-calendar__button-group) { |
| 93 | display: none; | 99 | display: none; |
| 94 | } | 100 | } |
| 95 | 101 | ||
| 96 | :deep(.el-calendar-table thead th) { | 102 | :deep(.el-calendar-table thead th) { |
| 97 | padding: 5px 0 0 | 103 | padding: 5px 0 0 |
| 98 | } | 104 | } |
| 99 | 105 | ||
| 100 | .primaryDate { | 106 | .primaryDate { |
| 101 | color: #fff; | 107 | color: #fff; |
| 102 | background: linear-gradient(90deg, #8623FC, #453DEA); | 108 | background: linear-gradient(90deg, #8623FC, #453DEA); |
| 103 | } | 109 | } |
| 104 | 110 | ||
| 105 | .date { | 111 | .date { |
| 106 | margin: auto; | 112 | margin: auto; |
| 107 | border-radius: 50%; | 113 | border-radius: 50%; |
| ... | @@ -117,9 +123,10 @@ function goMatch(n) { | ... | @@ -117,9 +123,10 @@ function goMatch(n) { |
| 117 | padding: 12px 20px; | 123 | padding: 12px 20px; |
| 118 | overflow: auto; | 124 | overflow: auto; |
| 119 | height: 225px; | 125 | height: 225px; |
| 120 | 126 | ||
| 121 | ul { | 127 | ul { |
| 122 | li {cursor: pointer; | 128 | li { |
| 129 | cursor: pointer; | ||
| 123 | background: #F6F9FE; | 130 | background: #F6F9FE; |
| 124 | margin: 7px 0 7px 20px; | 131 | margin: 7px 0 7px 20px; |
| 125 | position: relative; | 132 | position: relative; |
| ... | @@ -127,11 +134,11 @@ function goMatch(n) { | ... | @@ -127,11 +134,11 @@ function goMatch(n) { |
| 127 | border-radius: 10px; | 134 | border-radius: 10px; |
| 128 | font-weight: 500; | 135 | font-weight: 500; |
| 129 | font-size: 15px; | 136 | font-size: 15px; |
| 130 | 137 | ||
| 131 | label { | 138 | label { |
| 132 | color: #453DEA; | 139 | color: #453DEA; |
| 133 | margin-right: 15px; | 140 | margin-right: 15px; |
| 134 | 141 | ||
| 135 | &::before { | 142 | &::before { |
| 136 | content: ''; | 143 | content: ''; |
| 137 | background: #fff; | 144 | background: #fff; |
| ... | @@ -147,7 +154,7 @@ function goMatch(n) { | ... | @@ -147,7 +154,7 @@ function goMatch(n) { |
| 147 | } | 154 | } |
| 148 | } | 155 | } |
| 149 | } | 156 | } |
| 150 | 157 | ||
| 151 | li::before { | 158 | li::before { |
| 152 | content: ''; | 159 | content: ''; |
| 153 | background: linear-gradient(0deg, #8623FC, #453DEA); | 160 | background: linear-gradient(0deg, #8623FC, #453DEA); |
| ... | @@ -161,7 +168,7 @@ function goMatch(n) { | ... | @@ -161,7 +168,7 @@ function goMatch(n) { |
| 161 | margin: auto; | 168 | margin: auto; |
| 162 | z-index: 1; | 169 | z-index: 1; |
| 163 | } | 170 | } |
| 164 | 171 | ||
| 165 | li::after { | 172 | li::after { |
| 166 | content: ''; | 173 | content: ''; |
| 167 | left: -16px; | 174 | left: -16px; |
| ... | @@ -171,11 +178,11 @@ function goMatch(n) { | ... | @@ -171,11 +178,11 @@ function goMatch(n) { |
| 171 | position: absolute; | 178 | position: absolute; |
| 172 | top: 20px | 179 | top: 20px |
| 173 | } | 180 | } |
| 174 | 181 | ||
| 175 | li:hover { | 182 | li:hover { |
| 176 | color: #fff; | 183 | color: #fff; |
| 177 | background: linear-gradient(-90deg, #8623FC, #453DEA); | 184 | background: linear-gradient(-90deg, #8623FC, #453DEA); |
| 178 | 185 | ||
| 179 | label { | 186 | label { |
| 180 | color: #fff; | 187 | color: #fff; |
| 181 | } | 188 | } | ... | ... |
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment