fix: 首页日历功能bug修复。
This commit is contained in:
@@ -65,7 +65,7 @@ export const constantRoutes = [
|
||||
{
|
||||
path: '',
|
||||
component: Layout,
|
||||
redirect: '/newindex'
|
||||
redirect: '/accountCalendar'
|
||||
// children: [
|
||||
// {
|
||||
// path: '/index',
|
||||
|
||||
@@ -1,35 +1,37 @@
|
||||
<template>
|
||||
<!-- 这里是自定义头部,切换视图类型和切换日期 -->
|
||||
<div class="calendarHeader">
|
||||
<div class="header_left">
|
||||
<h1>{{ type === '3' ? '列表' : calendarTitle }}</h1>
|
||||
</div>
|
||||
<div class="header_right">
|
||||
<!-- <span v-if="type!=='3'&&isShowBack" class="blue-color backToday" @click="getToday()">{{ type==='1'?'返回本月':'返回本周' }}</span>
|
||||
<div class="app-container">
|
||||
<!-- 这里是自定义头部,切换视图类型和切换日期 -->
|
||||
<div class="calendarHeader">
|
||||
<div class="header_left">
|
||||
<h1>{{ type === '3' ? '列表' : calendarTitle }}</h1>
|
||||
</div>
|
||||
<div class="header_right">
|
||||
<!-- <span v-if="type!=='3'&&isShowBack" class="blue-color backToday" @click="getToday()">{{ type==='1'?'返回本月':'返回本周' }}</span>
|
||||
<el-select v-model="type" placeholder="视图类型" style="width: 80px" size="small" class="header_select" @change="handleChangeType">
|
||||
<el-option label="月" value="1" />
|
||||
<el-option label="周" value="2" />
|
||||
<el-option label="列" value="3" />
|
||||
</el-select> -->
|
||||
<!-- 选择月份的日期框 -->
|
||||
<el-date-picker
|
||||
v-if="type === '1'"
|
||||
v-model="showMonth"
|
||||
type="month"
|
||||
size="small"
|
||||
:clearable="false"
|
||||
placeholder="请选择日期"
|
||||
style="margin-left: 10px; vertical-align: middle"
|
||||
@change="changeDate"
|
||||
/>
|
||||
<el-button-group v-if="type === '2'" style="margin-left: 10px">
|
||||
<el-button size="small" class="el-icon-arrow-left" @click="getPrev()">上一周</el-button>
|
||||
<el-button size="small" @click="getNext()">下一周<i class="el-icon-arrow-right" /></el-button>
|
||||
</el-button-group>
|
||||
<!-- 选择月份的日期框 -->
|
||||
<el-date-picker
|
||||
v-if="type === '1'"
|
||||
v-model="showMonth"
|
||||
type="month"
|
||||
size="small"
|
||||
:clearable="false"
|
||||
placeholder="请选择日期"
|
||||
style="margin-left: 10px; vertical-align: middle"
|
||||
@change="changeDate"
|
||||
/>
|
||||
<el-button-group v-if="type === '2'" style="margin-left: 10px">
|
||||
<el-button size="small" class="el-icon-arrow-left" @click="getPrev()">上一周</el-button>
|
||||
<el-button size="small" @click="getNext()">下一周<i class="el-icon-arrow-right" /></el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 月视图和周视图显示,列视图显示表格形式 -->
|
||||
<div v-show="type !== '3'" ref="fullcalendar" class="card" />
|
||||
</div>
|
||||
<!-- 月视图和周视图显示,列视图显示表格形式 -->
|
||||
<div v-show="type !== '3'" ref="fullcalendar" class="card" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -71,10 +73,6 @@ export default {
|
||||
magenta: { title: '#EB2F96', class: 'magenta' }
|
||||
},
|
||||
fullcalendar: ref(),
|
||||
queryParams: {
|
||||
type: null,
|
||||
time: ''
|
||||
},
|
||||
nowDate: new Date(),
|
||||
infoList: [], // 日历显示的列信息
|
||||
categoryJSON: {} // 计划分类json
|
||||
|
||||
Reference in New Issue
Block a user