diff --git a/src/pages/calendar/index.vue b/src/pages/calendar/index.vue
index 5a2cfbb..5391675 100644
--- a/src/pages/calendar/index.vue
+++ b/src/pages/calendar/index.vue
@@ -98,7 +98,7 @@ export default {
handleWindowResize: true,
editable: false,
droppable: false,
- dayMaxEventRows: 1,
+ dayMaxEventRows: 0,
moreLinkText: function(num) {
return '+' + num;
},
@@ -113,9 +113,9 @@ export default {
eventDurationEditable: false,
eventResizableFromStart: false,
selectable: true,
- firstDay: 1, // 从周一开始,让大部分月份的1号更靠前
- showNonCurrentDates: false, // 不显示非当月日期
- fixedWeekCount: false, // 不固定显示6周
+ firstDay: 1,
+ showNonCurrentDates: true,
+ fixedWeekCount: false,
unselectAuto: true,
unselectCancel: '.el-drawer',
headerToolbar: false,
@@ -129,15 +129,12 @@ export default {
allDayText: '全天',
events: state.infoList,
eventContent: function () {
- // 返回空内容,只显示数量
return { html: '' };
},
moreLinkClick: function() {
- // 禁用+N的点击,不做任何操作
return false;
},
dateClick: function(info) {
- // 点击日期时显示该日事项
const date = dayjs(info.dateStr).format('YYYY-MM-DD');
state.currentInfoList = [];
state.infoList.forEach(item => {
@@ -145,38 +142,37 @@ export default {
state.currentInfoList.push(item);
}
});
- // 更新日期标题
updateCurrentDateTitle(date);
},
select: function (info) {
- // 视图选择日期触发
handleSelectDate(info)
}
- // select: function (info) {}
});
state.Tcalendar.render();
};
const getEventColor = (type) => {
const colors = {
- 1: 'linear-gradient(135deg, #667eea, #764ba2)',
- 4: 'linear-gradient(135deg, #f093fb, #f5576c)',
- 5: 'linear-gradient(135deg, #4facfe, #00f2fe)',
- 6: 'linear-gradient(135deg, #43e97b, #38f9d7)',
- 7: 'linear-gradient(135deg, #fa709a, #fee140)',
- 8: 'linear-gradient(135deg, #30cfd0, #330867)'
+ 1: '#5b6cdb', // 信用卡账单日 - 深紫色
+ 2: '#9c27b0', // 类型2 - 深紫红色
+ 3: '#d32f2f', // 类型3 - 深红色
+ 4: '#2d8f3c', // 贷款已还 - 深绿色(已完成/成功)
+ 5: '#e64545', // 日常支出 - 深红色(支出)
+ 6: '#f59a23', // 投资收益 - 深橙金色(收益)
+ 7: '#1677cc', // POS机刷卡 - 深蓝色
+ 8: '#0fa9a9' // 工资收入 - 深青色(收入)
};
- return colors[type] || 'linear-gradient(135deg, #a8edea, #fed6e3)';
+ return colors[type] || '#8c8c8c';
};
const getEventIcon = (type) => {
const icons = {
- 1: 'wallet',
- 4: 'checkmarkempty',
- 5: 'cart',
- 6: 'trending-up-filled',
- 7: 'shop-filled',
- 8: 'gift-filled'
+ 1: 'wallet', // 信用卡账单日 - 钱包图标
+ 4: 'checkmarkempty', // 贷款已还 - 对勾图标(已完成)
+ 5: 'cart', // 日常支出 - 购物车图标
+ 6: 'star', // 投资收益 - 星星图标(收益/增值)
+ 7: 'scan', // POS机刷卡 - 扫描图标
+ 8: 'wallet' // 工资收入 - 钱包图标(收入)
};
return icons[type] || 'calendar';
};
@@ -515,7 +511,7 @@ page {
.event-card {
display: flex;
align-items: center;
- padding: 12rpx 16rpx;
+ padding: 10rpx 14rpx;
background: #f8f9fa;
border-radius: 10rpx;
margin-bottom: 10rpx;
@@ -537,6 +533,12 @@ page {
margin-right: 12rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
flex-shrink: 0;
+
+ :deep(.uni-icons) {
+ display: flex !important;
+ align-items: center;
+ justify-content: center;
+ }
}
.event-content {
@@ -578,11 +580,16 @@ page {
}
:deep(.fc-col-header-cell) {
- background: #f8f9fa;
- padding: 6rpx 0;
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+ padding: 10rpx 0;
font-weight: 600;
- color: #495057;
- font-size: 22rpx;
+ color: #ffffff;
+ font-size: 24rpx;
+ border: none;
+}
+
+:deep(.fc-col-header-cell-cushion) {
+ color: #ffffff;
}
:deep(.fc-daygrid-day) {
@@ -596,6 +603,9 @@ page {
:deep(.fc-daygrid-day-frame) {
min-height: 45px;
cursor: pointer;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
}
:deep(.fc-scrollgrid) {
@@ -607,7 +617,8 @@ page {
}
:deep(.fc-day-today) {
- background: rgba(102, 126, 234, 0.1) !important;
+ background: rgba(102, 126, 234, 0.15) !important;
+ border: 2rpx solid rgba(102, 126, 234, 0.4) !important;
}
:deep(.fc-daygrid-day-number) {
@@ -619,11 +630,12 @@ page {
:deep(.fc-daygrid-day-top) {
flex-direction: row;
+ margin-bottom: 2rpx;
}
:deep(.fc-daygrid-day-events) {
margin: 0;
- padding: 2rpx;
+ padding: 0;
}
:deep(.fc-event) {
@@ -642,7 +654,7 @@ page {
display: inline-block;
box-shadow: none;
line-height: 1;
- pointer-events: none; /* 禁用点击事件 */
+ pointer-events: none;
cursor: default;
}
@@ -653,11 +665,18 @@ page {
transform: none;
}
-/* 隐藏FullCalendar的弹出框 */
:deep(.fc-popover) {
display: none !important;
}
+:deep(.fc-day-other) {
+ background: #f8f9fa !important;
+}
+
+:deep(.fc-day-other .fc-daygrid-day-number) {
+ color: #adb5bd !important;
+}
+
:deep(.plan_title) {
overflow: hidden;
text-overflow: ellipsis;
diff --git a/src/pages/calendar/list.vue b/src/pages/calendar/list.vue
index 0d5c132..74d4be1 100644
--- a/src/pages/calendar/list.vue
+++ b/src/pages/calendar/list.vue
@@ -5,8 +5,9 @@
-
+
@@ -18,8 +19,10 @@
-
-
+
+
-
-
@@ -260,15 +260,6 @@ function dictStr(val, arr) {