6692d073 by zhangmeng

2024改成2025

1 parent b1908dcf
......@@ -2,10 +2,10 @@
<div>
<el-calendar v-model="currentDate" :range="calendarRange">
<template #date-cell="data">
<div :class="data.data.day==query.currentDate?'primaryDate date':'date'" @click="selectDate(data.data.day)">
<div :class="data.data.day==query.currentDate?'primaryDate date':'date'" @click="selectDate(data.data.day)">
{{ data.data.day.slice(8, 10) }}
</div>
</template>
</el-calendar>
<div class="calendarList">
......@@ -15,42 +15,48 @@
<div class="esp mt5">{{ n.name }}</div>
</li>
</ul>
<el-empty v-if="schList.length== 0"
style="--el-empty-padding:0;--el-empty-description-margin-top:0"
:image="`/img/order_no.png`" :image-size="200"/>
<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 {dayjs} from "element-plus";
import {getIndexScheduleList} from "@/apiPc/common";
import {useRouter} from "vue-router";
import { ref } from 'vue'
import { dayjs } from 'element-plus'
import { getIndexScheduleList } from '@/apiPc/common'
import { useRouter } from 'vue-router'
const router = useRouter()
const currentDate = ref(new Date())
const calendarRange = ref([dayjs('2024-07-17').toDate(), dayjs('2024-07-17').toDate()])
const calendarRange = ref([dayjs('2025-07-17').toDate(), dayjs('2025-07-17').toDate()])
const schList = ref([])
const loading = ref(false)
const query = ref({
// currentDate:dayjs().format('YYYY-MM-DD')
currentDate: '2024-07-17'
currentDate: '2025-07-17'
})
getScheduleList()
function getScheduleList() {
loading.value = true
query.value.currentDate = dayjs(query.value.currentDate).format('YYYY-MM-DD')
getIndexScheduleList(query.value).then(res=>{
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',
......@@ -64,44 +70,44 @@ function goMatch(n) {
}
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
.el-calendar {
--el-calendar-border: none;
--el-calendar-cell-width: 40px;
text-align: center;
--el-text-color-regular: #8E8D94;
:deep(.el-calendar__header) {
justify-content: center;
padding: 0 0 10px
}
: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;
}
:deep(.el-calendar-table thead th) {
padding: 5px 0 0
}
.primaryDate {
color: #fff;
background: linear-gradient(90deg, #8623FC, #453DEA);
}
.date {
margin: auto;
border-radius: 50%;
......@@ -117,9 +123,10 @@ function goMatch(n) {
padding: 12px 20px;
overflow: auto;
height: 225px;
ul {
li {cursor: pointer;
li {
cursor: pointer;
background: #F6F9FE;
margin: 7px 0 7px 20px;
position: relative;
......@@ -127,11 +134,11 @@ function goMatch(n) {
border-radius: 10px;
font-weight: 500;
font-size: 15px;
label {
color: #453DEA;
margin-right: 15px;
&::before {
content: '';
background: #fff;
......@@ -147,7 +154,7 @@ function goMatch(n) {
}
}
}
li::before {
content: '';
background: linear-gradient(0deg, #8623FC, #453DEA);
......@@ -161,7 +168,7 @@ function goMatch(n) {
margin: auto;
z-index: 1;
}
li::after {
content: '';
left: -16px;
......@@ -171,11 +178,11 @@ function goMatch(n) {
position: absolute;
top: 20px
}
li:hover {
color: #fff;
background: linear-gradient(-90deg, #8623FC, #453DEA);
label {
color: #fff;
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!