无人机管理后台前端(已迁走)
张含笑
2025-09-01 2ca94de8ede18ac07ccfd8dec7b6f6a707adde9b
src/views/wel/components/calendarBox.vue
@@ -7,7 +7,6 @@
      <template #header="{ date }">
        <div>
          <img :src="caleft" alt="" @click="selectDate('prev-month')" />
          <el-date-picker
            v-model="currentMonth"
            type="month"
@@ -41,7 +40,6 @@
    </el-calendar>
  </div>
</template>
<script setup>
import dayjs from 'dayjs';
import { ref, watch, onMounted, nextTick } from 'vue';
@@ -51,7 +49,6 @@
import ev2 from '@/assets/images/workbench/ev2.svg';
import caleft from '@/assets/images/workbench/caleft.png';
import caright from '@/assets/images/workbench/caright.png';
const router = useRouter();
const calendar = ref();
const events = ref({});
@@ -215,9 +212,9 @@
  const days = date.daysInMonth();
  // 强制 2025 年 6 月显示六行
  if (date.year() === 2025 && date.month() === 5) {
    return 6;
  }
   //if (date.year() === 2025 && date.month() === 5) {
   //  return 6;
  // }
  // 其他月份按原逻辑计算
  return Math.ceil((firstDay + days) / 7);
@@ -282,7 +279,7 @@
  }
  .el-calendar-table .el-calendar-day {
    box-sizing: border-box;
    padding: 0.8rem;
    padding: 0.4rem 0.8rem 0.8rem 0.8rem;
    background: #f5f7fa;
    border-radius: 6px 6px 6px 6px;
    border: 1px solid #efefef;
@@ -334,11 +331,9 @@
      font-size: 14px;
      color: #363636;
    }
    // .el-calendar-table .el-calendar-day {
    //   height: pxToVh(88) !important;
    // }
 &.five-rows .el-calendar-table .el-calendar-day {
    height: pxToVh(88) !important;
    height: pxToVh(92) !important;
  }
  
  &.six-rows .el-calendar-table .el-calendar-day {