租房日历模块

This commit is contained in:
xiaoxian 2026-05-23 16:12:23 +08:00
parent f0848012af
commit 74ec7491f6
1 changed files with 254 additions and 25 deletions

View File

@ -58,7 +58,7 @@
</el-calendar>
</el-card>
<el-dialog :visible.sync="dayDialogVisible" :title="formatSelectedDate + ' —— 租约到期日' + selectedDayItems.length + ' 条)'" width="70%" @close="selectedDate = null">
<el-dialog :visible.sync="dayDialogVisible" :title="formatSelectedDate + ' —— ' + selectedDayItems.length + ' 条)'" width="70%" @close="selectedDate = null">
<el-table :data="selectedDayItems" stripe style="width: 100%">
<el-table-column prop="apartmentName" label="公寓名称" min-width="120"></el-table-column>
<el-table-column prop="roomNumber" label="房间号" width="100"></el-table-column>
@ -230,18 +230,25 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
margin-bottom: 24px;
padding-bottom: 16px;
border-bottom: 1px solid #f0f0f0;
}
.page-header h2 {
margin: 0;
font-size: 20px;
color: #303133;
font-size: 22px;
font-weight: 600;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
letter-spacing: 0.5px;
}
.legend {
display: flex;
gap: 16px;
gap: 20px;
font-size: 13px;
color: #606266;
}
@ -249,7 +256,16 @@ export default {
.legend-item {
display: flex;
align-items: center;
gap: 4px;
gap: 6px;
padding: 4px 12px;
background: #f8f9fa;
border-radius: 20px;
transition: all 0.3s ease;
}
.legend-item:hover {
background: #f0f1f3;
transform: translateY(-1px);
}
.dot {
@ -257,23 +273,155 @@ export default {
width: 8px;
height: 8px;
border-radius: 50%;
position: relative;
}
.dot::after {
content: '';
position: absolute;
inset: -2px;
border-radius: 50%;
opacity: 0.3;
}
.dot-active {
background-color: #67c23a;
background: #52c41a;
box-shadow: 0 0 6px rgba(82, 196, 26, 0.4);
}
.dot-active::after {
background: #52c41a;
}
.dot-soon {
background-color: #e6a23c;
background: #faad14;
box-shadow: 0 0 6px rgba(250, 173, 20, 0.4);
}
.dot-soon::after {
background: #faad14;
}
.dot-expired {
background-color: #f56c6c;
background: #ff4d4f;
box-shadow: 0 0 6px rgba(255, 77, 79, 0.4);
}
::v-deep .el-calendar-day {
.dot-expired::after {
background: #ff4d4f;
}
::v-deep .el-calendar {
border: none;
border-radius: 12px;
overflow: hidden;
}
::v-deep .el-calendar__header {
padding: 16px 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #fff;
border-bottom: none;
}
::v-deep .el-calendar__title {
color: #fff;
font-size: 16px;
font-weight: 500;
}
::v-deep .el-calendar__button-group .el-button-group .el-button,
::v-deep .el-calendar__button-group .el-button-group .el-button:first-child,
::v-deep .el-calendar__button-group .el-button-group .el-button:last-child {
border-color: rgba(255,255,255,0.3);
color: #fff;
background: transparent;
}
::v-deep .el-calendar__button-group .el-button-group .el-button:hover,
::v-deep .el-calendar__button-group .el-button-group .el-button:focus {
background: rgba(255,255,255,0.15);
border-color: rgba(255,255,255,0.5);
}
::v-deep .el-calendar__button-group .el-button-group .el-button.is-disabled,
::v-deep .el-calendar__button-group .el-button-group .el-button.is-disabled:hover {
color: rgba(255,255,255,0.4);
border-color: rgba(255,255,255,0.15);
background: transparent;
}
::v-deep .el-calendar-table {
border-collapse: separate;
border-spacing: 0;
}
::v-deep .el-calendar-table thead th {
padding: 12px 0;
font-weight: 600;
font-size: 13px;
color: #606266;
background: #fafafa;
border-bottom: 2px solid #f0f0f0;
}
::v-deep .el-calendar-table thead th:first-child {
color: #ff4d4f;
}
::v-deep .el-calendar-table thead th:last-child {
color: #ff4d4f;
}
::v-deep .el-calendar-table tr td:first-child {
border-left: none;
}
::v-deep .el-calendar-table tr td {
border: 1px solid #f0f0f0;
vertical-align: top;
transition: background 0.25s ease;
}
::v-deep .el-calendar-table tr td:hover {
background: #fafbff;
}
::v-deep .el-calendar-table td.is-today {
background: #f0f5ff;
}
::v-deep .el-calendar-table td.is-today .calendar-cell .cell-day {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
font-weight: 700;
}
::v-deep .el-calendar-table td.is-selected {
background: #e6f7ff;
}
::v-deep .el-calendar-table .el-calendar-day {
height: auto;
min-height: 100px;
padding: 4px;
box-sizing: border-box;
}
::v-deep .el-calendar-table:not(.is-range) td.next,
::v-deep .el-calendar-table:not(.is-range) td.prev {
background: #fafafa;
color: #d0d0d0;
}
::v-deep .el-calendar-table:not(.is-range) td.next .calendar-cell .cell-day,
::v-deep .el-calendar-table:not(.is-range) td.prev .calendar-cell .cell-day {
color: #d0d0d0;
background: none;
-webkit-text-fill-color: #d0d0d0;
font-weight: 400;
}
.calendar-cell {
@ -282,9 +430,16 @@ export default {
}
.cell-day {
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
font-size: 13px;
color: #909399;
margin-bottom: 2px;
margin-bottom: 4px;
border-radius: 50%;
transition: all 0.2s ease;
}
.is-current-month .cell-day {
@ -292,53 +447,127 @@ export default {
font-weight: 500;
}
.is-current-month .cell-day:hover {
background: #f0f0f0;
}
.cell-items {
display: flex;
flex-direction: column;
gap: 1px;
gap: 2px;
}
.cell-item {
font-size: 11px;
padding: 1px 4px;
border-radius: 3px;
padding: 2px 6px;
border-radius: 4px;
cursor: pointer;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.6;
transition: opacity 0.2s;
transition: all 0.2s ease;
border-left: 3px solid transparent;
font-weight: 500;
}
.cell-item:hover {
opacity: 0.8;
transform: translateX(2px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.cell-item.status-active {
background-color: #f0f9eb;
color: #67c23a;
background: linear-gradient(135deg, #f0f9eb 0%, #e8f5e0 100%);
color: #389e0d;
border-left-color: #52c41a;
}
.cell-item.status-active:hover {
background: linear-gradient(135deg, #e8f5e0 0%, #d9f0cc 100%);
}
.cell-item.status-soon {
background-color: #fdf6ec;
color: #e6a23c;
background: linear-gradient(135deg, #fff7e6 0%, #fff1cc 100%);
color: #d48806;
border-left-color: #faad14;
}
.cell-item.status-soon:hover {
background: linear-gradient(135deg, #fff1cc 0%, #ffe8a8 100%);
}
.cell-item.status-expired {
background-color: #fef0f0;
color: #f56c6c;
background: linear-gradient(135deg, #fff1f0 0%, #ffe3e0 100%);
color: #cf1322;
border-left-color: #ff4d4f;
}
.cell-item.status-expired:hover {
background: linear-gradient(135deg, #ffe3e0 0%, #ffd1cc 100%);
}
.cell-more {
font-size: 11px;
color: #409eff;
color: #667eea;
cursor: pointer;
padding: 1px 4px;
padding: 2px 6px;
border-radius: 4px;
transition: all 0.2s ease;
font-weight: 500;
background: #f0f5ff;
margin-top: 1px;
}
.cell-more:hover {
text-decoration: underline;
background: #e6f0ff;
color: #764ba2;
}
::v-deep .el-card {
border: none;
border-radius: 12px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
transition: box-shadow 0.3s ease;
}
::v-deep .el-card:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.04);
}
::v-deep .el-card__body {
padding: 20px;
}
.filter-bar ::v-deep .el-card__body {
padding: 16px 20px 0;
}
::v-deep .el-dialog {
border-radius: 12px;
overflow: hidden;
}
::v-deep .el-dialog__header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 16px 24px;
border-bottom: none;
}
::v-deep .el-dialog__title {
color: #fff;
font-size: 16px;
font-weight: 500;
}
::v-deep .el-dialog__headerbtn .el-dialog__close {
color: rgba(255,255,255,0.7);
}
::v-deep .el-dialog__headerbtn:hover .el-dialog__close {
color: #fff;
}
::v-deep .el-dialog__body {
padding: 20px 24px;
}
</style>