diff --git a/src/App.vue b/src/App.vue index f8bc532..6260200 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,12 +1,30 @@ - - 租房管理系统 - 退出 + + + + + + + + 租房管理系统 + + 退出 + - + + - + + + + + + + + 菜单 + + + + + + + + 首页 + + + + 区域管理 + + + + 公寓管理 + + + + 房间管理 + + + + 租房管理 + + + + 租赁档案 + + + + 水费档案 + + + + 租金统计 + + + + 房间状态统计 + + + @@ -66,13 +147,40 @@ export default { name: 'App', data() { return { - activeIndex: 'dashboard' + activeIndex: 'dashboard', + isMobile: false, + drawerVisible: false, + drawerWidth: '70%' } }, + mounted() { + this.checkDevice() + window.addEventListener('resize', this.checkDevice) + }, + beforeDestroy() { + window.removeEventListener('resize', this.checkDevice) + }, methods: { + checkDevice() { + const width = window.innerWidth + this.isMobile = width <= 768 + // 根据屏幕宽度调整抽屉大小 + if (width <= 375) { + this.drawerWidth = '80%' + } else if (width <= 768) { + this.drawerWidth = '70%' + } + }, handleSelect(key, keyPath) { this.activeIndex = key - // 根据选择的菜单项导航到对应的路由 + this.navigateToRoute(key) + }, + handleMobileSelect(key, keyPath) { + this.activeIndex = key + this.drawerVisible = false + this.navigateToRoute(key) + }, + navigateToRoute(key) { const routeMap = { 'dashboard': '/', 'region-list': '/region/list', @@ -93,7 +201,6 @@ export default { } }, logout() { - // 退出登录逻辑 this.$message.success('退出成功') } } @@ -114,8 +221,179 @@ export default { color: #2c3e50; } +/* 顶部导航栏样式 */ +.app-header { + background-color: #333; + color: white; + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 20px; +} + +.header-left { + display: flex; + align-items: center; + gap: 15px; +} + +.menu-toggle-btn { + padding: 0; + margin: 0; +} + +.app-title { + margin: 0; + font-size: 18px; +} + +/* 侧边栏样式 */ +.app-aside { + background-color: #f0f2f5; + min-height: calc(100vh - 60px); +} + .el-menu-vertical-demo:not(.el-menu--collapse) { width: 200px; min-height: 400px; } - \ No newline at end of file + +/* 主内容区样式 */ +.app-main { + padding: 20px; + background-color: #f5f7fa; + min-height: calc(100vh - 60px); +} + +/* 移动端抽屉样式 */ +.mobile-drawer .el-drawer__body { + padding: 0; +} + +.drawer-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 15px 20px; + border-bottom: 1px solid #ebeef5; + background-color: #f5f7fa; +} + +.drawer-header h3 { + margin: 0; + font-size: 16px; + color: #333; +} + +/* 移动端适配 */ +@media screen and (max-width: 768px) { + .app-header { + padding: 0 15px; + } + + .app-title { + font-size: 16px; + } + + .app-main { + padding: 10px; + } + + /* 表格横向滚动 */ + .el-table { + width: 100%; + overflow-x: auto; + } + + .el-table__body-wrapper { + overflow-x: auto; + } + + /* 表单元素适配 */ + .el-form-item { + margin-bottom: 15px; + } + + .el-form-item__label { + float: none; + display: block; + text-align: left; + padding: 0 0 8px; + line-height: 1.5; + } + + .el-form-item__content { + margin-left: 0 !important; + } + + /* 搜索表单适配 */ + .search-form .el-form-item { + display: block; + margin-right: 0; + } + + .search-form .el-form-item__content { + width: 100%; + } + + .search-form .el-input, + .search-form .el-select { + width: 100%; + } + + /* 卡片适配 */ + .el-card { + margin-bottom: 10px; + } + + .el-card__header { + padding: 12px 15px; + } + + .el-card__body { + padding: 15px; + } + + /* 分页适配 */ + .el-pagination { + text-align: center; + padding: 10px 0; + } + + .el-pagination .el-pagination__total, + .el-pagination .el-pagination__sizes, + .el-pagination .el-pagination__jump { + display: none; + } + + /* 按钮组适配 */ + .el-button + .el-button { + margin-left: 5px; + } + + /* 对话框适配 */ + .el-dialog { + width: 90% !important; + margin-top: 10vh !important; + } + + .el-dialog__body { + padding: 15px; + } +} + +/* 小屏幕手机适配 */ +@media screen and (max-width: 375px) { + .app-title { + font-size: 14px; + } + + .app-main { + padding: 8px; + } + + .el-card__body { + padding: 12px; + } +} + diff --git a/src/main.js b/src/main.js index 9f2080d..9998878 100644 --- a/src/main.js +++ b/src/main.js @@ -3,6 +3,7 @@ import App from './App.vue' import router from './router' import ElementUI from 'element-ui' import 'element-ui/lib/theme-chalk/index.css' +import './styles/responsive.css' Vue.use(ElementUI) @@ -11,4 +12,4 @@ Vue.config.productionTip = false new Vue({ router, render: h => h(App) -}).$mount('#app') \ No newline at end of file +}).$mount('#app') diff --git a/src/styles/responsive.css b/src/styles/responsive.css new file mode 100644 index 0000000..e7cde62 --- /dev/null +++ b/src/styles/responsive.css @@ -0,0 +1,152 @@ +/* 全局响应式样式 */ + +/* 移动端隐藏类 */ +.hidden-xs-only { + display: block; +} + +.hidden-sm-and-up { + display: none; +} + +/* 移动端适配 */ +@media screen and (max-width: 768px) { + .hidden-xs-only { + display: none !important; + } + + .hidden-sm-and-up { + display: block !important; + } + + /* 表单适配 */ + .search-form .el-form-item { + display: block; + margin-right: 0; + margin-bottom: 10px; + } + + .search-form .el-form-item__content { + width: 100%; + } + + .search-form .el-input, + .search-form .el-select { + width: 100%; + } + + /* 表格横向滚动 */ + .table-wrapper { + overflow-x: auto; + } + + .el-table { + min-width: 600px; + } + + /* 分页适配 */ + .pagination-wrapper, + .pagination { + justify-content: center; + } + + /* 卡片头部适配 */ + .card-header { + flex-wrap: wrap; + gap: 10px; + } + + .card-header span { + font-size: 16px; + } + + /* 移动端卡片列表样式 */ + .mobile-list { + display: block; + } + + .mobile-card { + background: #fff; + border: 1px solid #ebeef5; + border-radius: 4px; + padding: 15px; + margin-bottom: 10px; + } + + .mobile-card-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 10px; + padding-bottom: 10px; + border-bottom: 1px solid #ebeef5; + } + + .mobile-card-title { + font-size: 16px; + font-weight: bold; + color: #303133; + } + + .mobile-card-id { + font-size: 12px; + color: #909399; + } + + .mobile-card-body { + margin-bottom: 10px; + } + + .mobile-card-item { + display: flex; + margin-bottom: 8px; + font-size: 14px; + } + + .mobile-card-label { + color: #909399; + min-width: 70px; + flex-shrink: 0; + } + + .mobile-card-value { + color: #606266; + flex: 1; + word-break: break-all; + } + + .mobile-card-footer { + display: flex; + justify-content: flex-end; + gap: 10px; + padding-top: 10px; + border-top: 1px solid #ebeef5; + } + + /* 对话框适配 */ + .el-dialog { + width: 90% !important; + margin-top: 10vh !important; + } + + .el-dialog__body { + padding: 15px; + } +} + +@media screen and (min-width: 769px) { + .hidden-sm-and-up { + display: none !important; + } +} + +/* 小屏幕手机适配 */ +@media screen and (max-width: 375px) { + .mobile-card { + padding: 12px; + } + + .mobile-card-title { + font-size: 14px; + } +} diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index f4a7604..886314e 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -6,10 +6,10 @@ - + - + {{ regionCount }} 区域数量 @@ -17,10 +17,10 @@ - + - + {{ apartmentCount }} 公寓数量 @@ -28,10 +28,10 @@ - + - + {{ roomCount }} 房间数量 @@ -40,10 +40,10 @@ - + - + {{ emptyRoomCount }} 空房数量 @@ -51,10 +51,10 @@ - + - + {{ rentedRoomCount }} 在租数量 @@ -62,10 +62,10 @@ - + - + {{ soonExpireRoomCount }} 即将到期 @@ -73,10 +73,10 @@ - + - + {{ expiredRoomCount }} 已到期 @@ -84,23 +84,23 @@ - + - + - ¥{{ collectedRentAmount }} + {{ formatMoney(collectedRentAmount) }} 已收租金 - + - + - ¥{{ collectedWaterAmount }} + {{ formatMoney(collectedWaterAmount) }} 已收水费 @@ -108,23 +108,31 @@ - + 区域公寓房间状态分布 - - - - - - - - - - - + + + + + + + + + + + + + @@ -178,6 +186,12 @@ export default { this.$message.error('加载数据失败') } }, + formatMoney(value) { + if (value >= 10000) { + return '¥' + (value / 10000).toFixed(1) + '万' + } + return '¥' + value + }, getSummary(param) { const { columns, data } = param; const sums = []; @@ -208,32 +222,39 @@ export default { \ No newline at end of file + +.stats-table-card { + margin-top: 20px; +} + +.table-wrapper { + overflow-x: auto; +} + +.stats-table { + min-width: 800px; +} + +/* 移动端适配 */ +@media screen and (max-width: 768px) { + .welcome-card { + padding: 20px 0; + } + + .welcome-card h2 { + font-size: 18px; + } + + .welcome-card p { + font-size: 13px; + } + + .stat-card { + margin-bottom: 10px; + } + + .stat-item { + padding: 5px; + flex-direction: column; + text-align: center; + } + + .stat-icon { + font-size: 24px; + margin-right: 0; + margin-bottom: 8px; + } + + .stat-value { + font-size: 16px; + } + + .stat-label { + font-size: 12px; + } + + .stats-table-card { + margin-top: 10px; + } +} + +@media screen and (max-width: 375px) { + .welcome-card h2 { + font-size: 16px; + } + + .stat-icon { + font-size: 20px; + } + + .stat-value { + font-size: 14px; + } + + .stat-label { + font-size: 11px; + } +} + diff --git a/src/views/apartment/Add.vue b/src/views/apartment/Add.vue index ba91b8f..a2d7767 100644 --- a/src/views/apartment/Add.vue +++ b/src/views/apartment/Add.vue @@ -6,9 +6,9 @@ 添加公寓 - + - + @@ -18,7 +18,7 @@ - + 提交 重置 返回 @@ -90,7 +90,7 @@ export default { \ No newline at end of file + +.form-content { + max-width: 600px; +} + +.form-actions { + margin-top: 30px; +} + +/* 移动端适配 */ +@media screen and (max-width: 768px) { + .form-content { + max-width: 100%; + } + + .form-content .el-form-item__label { + float: none; + display: block; + text-align: left; + margin-bottom: 5px; + } + + .form-content .el-form-item__content { + margin-left: 0 !important; + } + + .form-actions { + text-align: center; + } + + .form-actions .el-button { + margin-bottom: 10px; + } +} + diff --git a/src/views/apartment/Edit.vue b/src/views/apartment/Edit.vue index 8c2d6ed..86c1b6d 100644 --- a/src/views/apartment/Edit.vue +++ b/src/views/apartment/Edit.vue @@ -6,9 +6,9 @@ 编辑公寓 - + - + @@ -18,7 +18,7 @@ - + 提交 重置 返回 @@ -103,7 +103,7 @@ export default { \ No newline at end of file + +.form-content { + max-width: 600px; +} + +.form-actions { + margin-top: 30px; +} + +/* 移动端适配 */ +@media screen and (max-width: 768px) { + .form-content { + max-width: 100%; + } + + .form-content .el-form-item__label { + float: none; + display: block; + text-align: left; + margin-bottom: 5px; + } + + .form-content .el-form-item__content { + margin-left: 0 !important; + } + + .form-actions { + text-align: center; + } + + .form-actions .el-button { + margin-bottom: 10px; + } +} + diff --git a/src/views/apartment/List.vue b/src/views/apartment/List.vue index 6eeded2..171901a 100644 --- a/src/views/apartment/List.vue +++ b/src/views/apartment/List.vue @@ -4,12 +4,14 @@ 公寓管理 - 添加公寓 + 添加公寓 + + - + @@ -22,22 +24,55 @@ 重置 - - - - - - - - - 编辑 - 删除 - - - - + + + + + + + + + + + + 编辑 + 删除 + + + + + + + + + + {{ item.name }} + ID: {{ item.id }} + + + + 区域: + {{ item.regionName || '-' }} + + + 地址: + {{ item.address || '-' }} + + + 创建时间: + {{ item.createTime }} + + + + + + + .apartment-list { - padding: 20px 0; + padding: 0; } .card-header { @@ -163,8 +216,125 @@ export default { margin-bottom: 20px; } -.pagination { +.table-wrapper { + overflow-x: auto; +} + +.pagination-wrapper { + margin-top: 20px; display: flex; justify-content: flex-end; } + +/* 移动端卡片列表样式 */ +.mobile-list { + display: none; +} + +.mobile-card { + background: #fff; + border: 1px solid #ebeef5; + border-radius: 4px; + padding: 15px; + margin-bottom: 10px; +} + +.mobile-card-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 10px; + padding-bottom: 10px; + border-bottom: 1px solid #ebeef5; +} + +.mobile-card-title { + font-size: 16px; + font-weight: bold; + color: #303133; +} + +.mobile-card-id { + font-size: 12px; + color: #909399; +} + +.mobile-card-body { + margin-bottom: 10px; +} + +.mobile-card-item { + display: flex; + margin-bottom: 8px; + font-size: 14px; +} + +.mobile-card-label { + color: #909399; + min-width: 70px; + flex-shrink: 0; +} + +.mobile-card-value { + color: #606266; + flex: 1; + word-break: break-all; +} + +.mobile-card-footer { + display: flex; + justify-content: flex-end; + gap: 10px; + padding-top: 10px; + border-top: 1px solid #ebeef5; +} + +/* 响应式显示控制 */ +@media screen and (max-width: 768px) { + .hidden-xs-only { + display: none; + } + + .mobile-list { + display: block; + } + + .search-form { + margin-bottom: 15px; + } + + .search-form .el-form-item { + display: block; + margin-right: 0; + margin-bottom: 10px; + } + + .search-form .el-form-item__content { + width: 100%; + } + + .search-form .el-input, + .search-form .el-select { + width: 100%; + } + + .pagination-wrapper { + justify-content: center; + } + + .card-header { + flex-wrap: wrap; + gap: 10px; + } + + .card-header span { + font-size: 16px; + } +} + +@media screen and (min-width: 769px) { + .hidden-sm-and-up { + display: none; + } +} diff --git a/src/views/region/Add.vue b/src/views/region/Add.vue index 9137809..5057ce8 100644 --- a/src/views/region/Add.vue +++ b/src/views/region/Add.vue @@ -6,14 +6,14 @@ 添加区域 - + - + - + 提交 重置 返回 @@ -69,7 +69,7 @@ export default { \ No newline at end of file + +.form-content { + max-width: 600px; +} + +.form-actions { + margin-top: 30px; +} + +/* 移动端适配 */ +@media screen and (max-width: 768px) { + .form-content { + max-width: 100%; + } + + .form-content .el-form-item__label { + float: none; + display: block; + text-align: left; + margin-bottom: 5px; + } + + .form-content .el-form-item__content { + margin-left: 0 !important; + } + + .form-actions { + text-align: center; + } + + .form-actions .el-button { + margin-bottom: 10px; + } +} + diff --git a/src/views/region/Edit.vue b/src/views/region/Edit.vue index e4be0c1..425da71 100644 --- a/src/views/region/Edit.vue +++ b/src/views/region/Edit.vue @@ -6,14 +6,14 @@ 编辑区域 - + - + - + 提交 重置 返回 @@ -84,7 +84,7 @@ export default { \ No newline at end of file + +.form-content { + max-width: 600px; +} + +.form-actions { + margin-top: 30px; +} + +/* 移动端适配 */ +@media screen and (max-width: 768px) { + .form-content { + max-width: 100%; + } + + .form-content .el-form-item__label { + float: none; + display: block; + text-align: left; + margin-bottom: 5px; + } + + .form-content .el-form-item__content { + margin-left: 0 !important; + } + + .form-actions { + text-align: center; + } + + .form-actions .el-button { + margin-bottom: 10px; + } +} + diff --git a/src/views/region/List.vue b/src/views/region/List.vue index 54f2c69..ce44097 100644 --- a/src/views/region/List.vue +++ b/src/views/region/List.vue @@ -4,24 +4,53 @@ 区域列表 - 添加区域 + 添加区域 - - - - - - - - 编辑 - 删除 - - - - + + + + + + + + + + + 编辑 + 删除 + + + + + + + + + + {{ item.name }} + ID: {{ item.id }} + + + + 描述: + {{ item.description || '-' }} + + + 创建时间: + {{ item.createTime }} + + + + + + + .region-list { - padding: 20px 0; + padding: 0; } .card-header { @@ -115,8 +158,106 @@ export default { align-items: center; } -.pagination { +.table-wrapper { + overflow-x: auto; +} + +.pagination-wrapper { + margin-top: 20px; display: flex; justify-content: flex-end; } - \ No newline at end of file + +/* 移动端卡片列表样式 */ +.mobile-list { + display: none; +} + +.mobile-card { + background: #fff; + border: 1px solid #ebeef5; + border-radius: 4px; + padding: 15px; + margin-bottom: 10px; +} + +.mobile-card-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 10px; + padding-bottom: 10px; + border-bottom: 1px solid #ebeef5; +} + +.mobile-card-title { + font-size: 16px; + font-weight: bold; + color: #303133; +} + +.mobile-card-id { + font-size: 12px; + color: #909399; +} + +.mobile-card-body { + margin-bottom: 10px; +} + +.mobile-card-item { + display: flex; + margin-bottom: 8px; + font-size: 14px; +} + +.mobile-card-label { + color: #909399; + min-width: 70px; + flex-shrink: 0; +} + +.mobile-card-value { + color: #606266; + flex: 1; + word-break: break-all; +} + +.mobile-card-footer { + display: flex; + justify-content: flex-end; + gap: 10px; + padding-top: 10px; + border-top: 1px solid #ebeef5; +} + +/* 响应式显示控制 */ +@media screen and (max-width: 768px) { + .hidden-xs-only { + display: none; + } + + .mobile-list { + display: block; + } + + .pagination-wrapper { + justify-content: center; + } + + .card-header { + flex-wrap: wrap; + gap: 10px; + } + + .card-header span { + font-size: 16px; + } +} + +@media screen and (min-width: 769px) { + .hidden-sm-and-up { + display: none; + } +} + diff --git a/src/views/rental/Add.vue b/src/views/rental/Add.vue index 76b4fb7..257c02c 100644 --- a/src/views/rental/Add.vue +++ b/src/views/rental/Add.vue @@ -6,7 +6,7 @@ 添加租房 - + - + 提交 重置 返回 @@ -91,7 +91,6 @@ export default { status: 'active', remark: '' }, - // 保存返回时的查询参数 returnQuery: {}, rules: { roomId: [{ required: true, message: '请选择房间', trigger: 'blur' }], @@ -121,18 +120,14 @@ export default { } }, mounted() { - // 获取返回时的查询参数 this.returnQuery = this.$route.query - // 初始化开始日期为今天 this.rentalForm.startDate = new Date() - // 初始化结束日期 this.updateEndDate() this.loadData() }, methods: { async loadData() { try { - // 并行加载房间和公寓数据(使用list接口) const [roomsResponse, apartmentsResponse] = await Promise.all([ roomApi.list(), apartmentApi.list() @@ -141,16 +136,11 @@ export default { this.rooms = roomsResponse this.apartments = apartmentsResponse - // 检查URL参数中是否有roomId const roomId = this.$route.query.roomId ? Number(this.$route.query.roomId) : null if (roomId) { - // 确保roomId是字符串类型,与option的value类型一致 this.rentalForm.roomId = roomId - - // 查找对应的房间信息 const room = this.rooms.find(r => r.id == roomId) if (room) { - // 自动填充租金 this.rentalForm.rent = room.monthlyPrice } } @@ -171,14 +161,12 @@ export default { try { await rentalApi.create(this.rentalForm) this.$message.success('添加成功') - // 跳转到租房详情页面 if (this.rentalForm.roomId) { this.$router.push({ path: `/rental/detail/${this.rentalForm.roomId}`, query: this.returnQuery }) } else { - // 如果没有房间ID,跳转到列表页面 this.$router.push({ path: '/rental/list', query: this.returnQuery @@ -216,7 +204,7 @@ export default { \ No newline at end of file + +.form-content { + max-width: 600px; +} + +.form-actions { + margin-top: 30px; +} + +/* 移动端适配 */ +@media screen and (max-width: 768px) { + .form-content { + max-width: 100%; + } + + .form-content .el-form-item__label { + float: none; + display: block; + text-align: left; + margin-bottom: 5px; + } + + .form-content .el-form-item__content { + margin-left: 0 !important; + } + + .form-actions { + text-align: center; + } + + .form-actions .el-button { + margin-bottom: 10px; + } + + .el-divider__text { + font-size: 14px; + } +} + diff --git a/src/views/rental/Detail.vue b/src/views/rental/Detail.vue index 20e112f..d05d7be 100644 --- a/src/views/rental/Detail.vue +++ b/src/views/rental/Detail.vue @@ -5,13 +5,13 @@ 房屋详情 - 租房 - 退房 - 打扫 - 维修 - 打扫完成 - 维修完成 - 返回 + 租房 + 退房 + 打扫 + 维修 + 打扫完成 + 维修完成 + 返回 @@ -26,15 +26,15 @@ 租金: ¥{{ room.monthlyPrice }}/月 - ¥{{ room.yearlyPrice }}/年 + ¥{{ room.yearlyPrice }}/年 - + 状态: - - {{ getStatusText(room.status) }} - {{ getSubStatusText(room.subStatus) }} - {{ getOtherStatusText(room.otherStatus) }} + + {{ getStatusText(room.status) }} + {{ getSubStatusText(room.subStatus) }} + {{ getOtherStatusText(room.otherStatus) }} @@ -46,37 +46,39 @@ - - - - - - - - - - - {{ scope.row.status === 'active' ? '在租' : '已到期' }} - - - - - - - 编辑 - 续租 - 删除 - - - - + + + + + + + + + + + + {{ scope.row.status === 'active' ? '在租' : '已到期' }} + + + + + + + 编辑 + 续租 + 删除 + + + + + @@ -85,46 +87,51 @@ 添加水费 - - - - - - - - - - - - {{ scope.row.status === 'paid' ? '已支付' : '未支付' }} - - - - - - 编辑 - 删除 - - - - + + + + + + + + + + + ¥{{ scope.row.amount }} + + + + + + {{ scope.row.status === 'paid' ? '已支付' : '未支付' }} + + + + + + 编辑 + 删除 + + + + + - - + @@ -141,7 +148,7 @@ - + @@ -153,11 +160,9 @@ - - - + @@ -205,13 +210,10 @@ export default { waterBills: [], isLoading: false, activeTab: 'rental', - // 保存返回时的查询参数 returnQuery: {}, - // 分页相关 - 租赁档案 currentPage: 1, pageSize: 10, total: 0, - // 分页相关 - 水费记录 waterCurrentPage: 1, waterPageSize: 10, waterTotal: 0, @@ -255,14 +257,21 @@ export default { } } }, + computed: { + isMobile() { + return window.innerWidth <= 768 + } + }, mounted() { - // 获取返回时的查询参数 this.returnQuery = this.$route.query this.loadData() + window.addEventListener('resize', this.handleResize) + }, + beforeDestroy() { + window.removeEventListener('resize', this.handleResize) }, watch: { activeTab: function() { - // 当tab切换时,刷新对应的数据 if (this.activeTab === 'rental') { this.loadRentalHistory() } else if (this.activeTab === 'water') { @@ -271,19 +280,16 @@ export default { } }, methods: { + handleResize() { + this.$forceUpdate() + }, async loadData() { this.isLoading = true try { const roomId = this.$route.params.id - - // 加载房间数据 const roomResponse = await roomApi.getById(roomId) this.room = roomResponse - - // 加载租赁历史 await this.loadRentalHistory() - - // 如果当前激活的是水费tab,加载水费数据 if (this.activeTab === 'water') { await this.loadWaterBills() } @@ -297,17 +303,12 @@ export default { this.isLoading = true try { const roomId = this.$route.params.id - // 调用API获取水费记录,支持分页 const response = await waterBillApi.getAll({ roomId, page: this.waterCurrentPage, pageSize: this.waterPageSize }) - - // 处理返回数据 this.waterBills = response.data || response - - // 设置总数 this.waterTotal = response.total || 0 } catch (error) { this.$message.error('加载水费记录失败') @@ -319,22 +320,13 @@ export default { this.isLoading = true try { const roomId = this.$route.params.id - // 调用API获取当前房间的租赁记录,支持分页 const response = await rentalApi.getAll({ roomId, page: this.currentPage, pageSize: this.pageSize }) - - // 处理返回数据 const data = response.data || response - this.rentalHistory = data.map(rental => { - return { - ...rental - } - }) - - // 设置总数 + this.rentalHistory = data.map(rental => ({ ...rental })) this.total = response.total || 0 } catch (error) { this.$message.error('加载租赁历史失败') @@ -433,17 +425,12 @@ export default { type: 'warning' }).then(async () => { try { - // 找到当前房间的租房记录 const roomId = this.$route.params.id const rental = this.rentalHistory.find(r => r.roomId == roomId && r.status === 'active') if (rental) { - // 更新租房记录状态 await rentalApi.update(rental.id, { status: 'expired' }) - - // 更新房间状态 await roomApi.update(roomId, { status: 'empty' }) - this.$message.success('退房成功') this.loadData() } else { @@ -453,9 +440,7 @@ export default { console.error('退房失败:', error) this.$message.error('退房失败:' + (error.message || '未知错误')) } - }).catch(() => { - // 取消退房 - }) + }).catch(() => {}) }, async handleCleaning() { this.$confirm('确定要标记为打扫中吗?', '提示', { @@ -471,9 +456,7 @@ export default { } catch (error) { this.$message.error('操作失败') } - }).catch(() => { - // 取消操作 - }) + }).catch(() => {}) }, async handleMaintenance() { this.$confirm('确定要标记为维修中吗?', '提示', { @@ -489,9 +472,7 @@ export default { } catch (error) { this.$message.error('操作失败') } - }).catch(() => { - // 取消操作 - }) + }).catch(() => {}) }, async handleComplete() { this.$confirm('确定要完成打扫/维修吗?', '提示', { @@ -507,9 +488,7 @@ export default { } catch (error) { this.$message.error('操作失败') } - }).catch(() => { - // 取消操作 - }) + }).catch(() => {}) }, handleAddWaterBill() { this.waterBillForm = { @@ -536,15 +515,10 @@ export default { try { const roomId = this.$route.params.id if (this.waterBillForm.id) { - // 更新水费记录 await waterBillApi.update(this.waterBillForm.id, this.waterBillForm) this.$message.success('水费记录更新成功') } else { - // 创建水费记录 - await waterBillApi.create({ - ...this.waterBillForm, - roomId - }) + await waterBillApi.create({ ...this.waterBillForm, roomId }) this.$message.success('水费记录添加成功') } this.waterBillDialogVisible = false @@ -566,11 +540,8 @@ export default { } catch (error) { this.$message.error('删除失败') } - }).catch(() => { - // 取消删除 - }) + }).catch(() => {}) }, - handleEditRental(rental) { this.rentalForm = { ...rental, @@ -580,19 +551,13 @@ export default { this.rentalDialogVisible = true }, handleRenewRental(rental) { - // 计算新的开始日期和结束日期 const oldEndDate = new Date(rental.endDate) const newStartDate = new Date(oldEndDate) - - // 计算租赁时长(月) const oldStartDate = new Date(rental.startDate) const monthsDiff = (oldEndDate.getFullYear() - oldStartDate.getFullYear()) * 12 + (oldEndDate.getMonth() - oldStartDate.getMonth()) - - // 计算新的结束日期 const newEndDate = new Date(newStartDate) newEndDate.setMonth(newEndDate.getMonth() + monthsDiff) - // 预填表单,保持租客信息不变,清空ID this.rentalForm = { id: '', roomId: rental.roomId, @@ -611,11 +576,9 @@ export default { async handleSaveRental() { try { if (this.rentalForm.id) { - // 更新租赁记录 await rentalApi.update(this.rentalForm.id, this.rentalForm) this.$message.success('租赁记录更新成功') } else { - // 创建租赁记录 await rentalApi.create(this.rentalForm) this.$message.success('租赁记录添加成功') } @@ -632,36 +595,22 @@ export default { type: 'danger' }).then(async () => { try { - // 先获取租赁记录的详细信息 const rental = this.rentalHistory.find(r => r.id == id) - - // 删除租赁记录 await rentalApi.delete(id) this.$message.success('租赁记录删除成功') - - // 如果是在租状态,更新房间状态为空房 if (rental && rental.status === 'active' && rental.roomId) { - await roomApi.update(rental.roomId, { - status: 'empty', - subStatus: 'normal' - }) + await roomApi.update(rental.roomId, { status: 'empty', subStatus: 'normal' }) this.$message.success('房间状态已更新为空房') } - this.loadData() } catch (error) { console.error('删除失败:', error) this.$message.error('删除失败:' + (error.message || '未知错误')) } - }).catch(() => { - // 取消删除 - }) + }).catch(() => {}) }, goBack() { - this.$router.push({ - path: '/rental/list', - query: this.returnQuery - }) + this.$router.push({ path: '/rental/list', query: this.returnQuery }) } } } @@ -669,13 +618,15 @@ export default { diff --git a/src/views/rental/List.vue b/src/views/rental/List.vue index babc3a6..7c191ac 100644 --- a/src/views/rental/List.vue +++ b/src/views/rental/List.vue @@ -6,22 +6,24 @@ 租房管理 + + - + - + - + @@ -29,7 +31,7 @@ - + @@ -43,47 +45,50 @@ 重置 - + + + - - {{ getApartmentName(room.apartmentId) }} - - {{ getSubStatusText(room.subStatus) }} - 空房 - {{ getOtherStatusText(room.otherStatus) }} - - - - - {{ room.roomNumber }} - {{ room.area }}㎡ - - ¥{{ room.monthlyPrice }}/月 - ¥{{ room.yearlyPrice }}/年 + + {{ getApartmentName(room.apartmentId) }} + + {{ getSubStatusText(room.subStatus) }} + 空房 + {{ getOtherStatusText(room.otherStatus) }} - - 租客: {{ room.Rentals[0].tenantName }} - 租期: {{ room.Rentals[0].startDate }} 至 {{ room.Rentals[0].endDate }} + + + {{ room.roomNumber }} + {{ room.area }}㎡ + + ¥{{ room.monthlyPrice }}/月 + ¥{{ room.yearlyPrice }}/年 + + + + {{ room.Rentals[0].tenantName }} + {{ room.Rentals[0].startDate }} 至 {{ room.Rentals[0].endDate }} + + + 暂无租客信息 + - - 暂无租客信息 - - - + + .rental-list { - padding: 20px 0; + padding: 0; } .card-header { @@ -296,19 +300,14 @@ export default { margin-top: 20px; } -.room-card { +.room-card-wrapper { cursor: pointer; - transition: all 0.3s ease; - border: 2px solid #e4e7ed; - position: relative; - z-index: 1; - height: 220px; - display: flex; - flex-direction: column; } -.room-card * { - pointer-events: none; +.room-card { + transition: all 0.3s ease; + border: 2px solid #e4e7ed; + height: 100%; } .room-card:hover { @@ -319,20 +318,25 @@ export default { .room-card-header { display: flex; justify-content: space-between; - align-items: center; + align-items: flex-start; margin-bottom: 15px; + flex-wrap: wrap; + gap: 8px; } -.room-card-header { +.room-card-header h3 { + margin: 0; + font-size: 16px; + color: #303133; +} + +.room-card-tags { display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 15px; - flex-shrink: 0; + gap: 5px; + flex-wrap: wrap; } .room-card-body { - flex: 1; display: flex; flex-direction: column; } @@ -344,16 +348,19 @@ export default { margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #e4e7ed; - flex-shrink: 0; + flex-wrap: wrap; + gap: 8px; } .room-number { - font-size: 24px; + font-size: 20px; font-weight: bold; + color: #303133; } .room-area { color: #606266; + font-size: 14px; } .price-info { @@ -363,8 +370,9 @@ export default { } .room-price { - color: #409EFF; + color: #f56c6c; font-weight: 500; + font-size: 14px; } .room-price.yearly { @@ -375,21 +383,32 @@ export default { .rental-info { margin-top: 10px; - flex: 1; - display: flex; - flex-direction: column; - justify-content: flex-start; } .rental-info p { margin: 5px 0; color: #606266; + font-size: 13px; + display: flex; + align-items: center; + gap: 5px; +} + +.rental-info p.no-rental { + color: #909399; + font-style: italic; +} + +.pagination-wrapper { + margin-top: 20px; + display: flex; + justify-content: flex-end; } /* 状态样式 */ .status-empty { - border-color: #ffffff; - background-color: #f9f9f9; + border-color: #dcdfe6; + background-color: #f5f7fa; } .status-normal { @@ -406,4 +425,79 @@ export default { border-color: #f56c6c; background-color: #fef0f0; } - \ No newline at end of file + +/* 移动端适配 */ +@media screen and (max-width: 768px) { + .search-form { + margin-bottom: 15px; + } + + .search-form .el-form-item { + display: block; + margin-right: 0; + margin-bottom: 10px; + } + + .search-form .el-form-item__content { + width: 100%; + } + + .search-form .el-input, + .search-form .el-select { + width: 100%; + } + + .room-cards { + grid-template-columns: 1fr; + gap: 10px; + margin-top: 15px; + } + + .room-card { + padding: 12px; + } + + .room-card:hover { + transform: none; + } + + .room-card-header h3 { + font-size: 14px; + } + + .room-number { + font-size: 16px; + } + + .room-info { + margin-bottom: 10px; + padding-bottom: 10px; + } + + .pagination-wrapper { + justify-content: center; + } + + .card-header span { + font-size: 16px; + } +} + +@media screen and (max-width: 375px) { + .room-cards { + gap: 8px; + } + + .room-card { + padding: 10px; + } + + .room-number { + font-size: 14px; + } + + .room-price { + font-size: 13px; + } +} + diff --git a/src/views/rental/RentalArchive.vue b/src/views/rental/RentalArchive.vue index 1f9d8b0..a962c9e 100644 --- a/src/views/rental/RentalArchive.vue +++ b/src/views/rental/RentalArchive.vue @@ -51,55 +51,117 @@ 重置 - - - - - {{ getApartmentName(scope.row.roomId) }} - {{ getRoomNumber(scope.row.roomId) }} - - - - - - - - - - - {{ scope.row.status === 'active' ? '在租' : '已到期' }} + + + + + + + + {{ scope.row.Room.Apartment.Region.name }} + + + + + {{ scope.row.Room.Apartment.name }} + + + + + {{ scope.row.Room.roomNumber}} + + + + + + + + + + + {{ scope.row.status === 'active' ? '在租' : '已到期' }} + + + + + + + 编辑 + 续租 + 删除 + + + + + + + + + + {{ item.tenantName }} + + {{ item.status === 'active' ? '在租' : '已到期' }} - - - - - - 编辑 - 续租 - 删除 - - - - + + + + 区域: + {{ item.Room.Apartment.Region.name }} + + + 公寓: + {{ item.Room.Apartment.name }} + + + 房间: + {{ item.Room.roomNumber }} + + + 租期: + {{ item.startDate }} 至 {{ item.endDate }} + + + 租金: + ¥{{ item.rent }}/月 + + + 押金: + ¥{{ item.deposit }} + + + 备注: + {{ item.remark }} + + + + + + + - + - + @@ -176,15 +238,27 @@ export default { } } }, + computed: { + isMobile() { + return window.innerWidth <= 768 + } + }, mounted() { this.loadApartments() this.loadAllRooms() this.loadData() + window.addEventListener('resize', this.handleResize) + }, + beforeDestroy() { + window.removeEventListener('resize', this.handleResize) }, methods: { + handleResize() { + this.$forceUpdate() + }, async loadApartments() { try { - const response = await apartmentApi.getAll() + const response = await apartmentApi.list() this.apartments = response.data || response } catch (error) { this.$message.error('加载公寓数据失败') @@ -192,7 +266,7 @@ export default { }, async loadAllRooms() { try { - const response = await roomApi.getAll() + const response = await roomApi.list() this.allRooms = response.data || response } catch (error) { this.$message.error('加载房间数据失败') @@ -204,7 +278,7 @@ export default { return } try { - const response = await roomApi.getAll({ apartmentId: this.searchForm.apartmentId }) + const response = await roomApi.list({ apartmentId: this.searchForm.apartmentId }) this.rooms = response.data || response } catch (error) { this.$message.error('加载房间数据失败') @@ -353,7 +427,7 @@ export default { diff --git a/src/views/rental/WaterArchive.vue b/src/views/rental/WaterArchive.vue index 0c5787b..5c25b2c 100644 --- a/src/views/rental/WaterArchive.vue +++ b/src/views/rental/WaterArchive.vue @@ -42,49 +42,96 @@ 重置 - - - - {{ getApartmentName(scope.row.roomId) }} - {{ getRoomNumber(scope.row.roomId) }} - - - - - - - - - - - - - {{ scope.row.status === 'paid' ? '已支付' : '未支付' }} + + + + + + + {{ getApartmentName(scope.row.roomId) }} - {{ getRoomNumber(scope.row.roomId) }} + + + + + + + + + + + ¥{{ scope.row.amount }} + + + + + + {{ scope.row.status === 'paid' ? '已支付' : '未支付' }} + + + + + + + 编辑 + 删除 + + + + + + + + + + {{ getApartmentName(item.roomId) }} - {{ getRoomNumber(item.roomId) }} + + {{ item.status === 'paid' ? '已支付' : '未支付' }} - - - - - - 编辑 - 删除 - - - - + + + + 计费周期: + {{ item.startDate }} 至 {{ item.endDate }} + + + 用水量: + {{ item.usage }} 吨 + + + 费用: + ¥{{ item.amount }} + + + 读数: + {{ item.startReading }} → {{ item.endReading }} + + + 单价: + ¥{{ item.unitPrice }}/吨 + + + + + + + - + @@ -163,15 +210,27 @@ export default { } } }, + computed: { + isMobile() { + return window.innerWidth <= 768 + } + }, mounted() { this.loadApartments() this.loadAllRooms() this.loadData() + window.addEventListener('resize', this.handleResize) + }, + beforeDestroy() { + window.removeEventListener('resize', this.handleResize) }, methods: { + handleResize() { + this.$forceUpdate() + }, async loadApartments() { try { - const response = await apartmentApi.getAll() + const response = await apartmentApi.list() this.apartments = response.data || response } catch (error) { this.$message.error('加载公寓数据失败') @@ -179,7 +238,7 @@ export default { }, async loadAllRooms() { try { - const response = await roomApi.getAll() + const response = await roomApi.list() this.allRooms = response.data || response } catch (error) { this.$message.error('加载房间数据失败') @@ -191,7 +250,7 @@ export default { return } try { - const response = await roomApi.getAll({ apartmentId: this.searchForm.apartmentId }) + const response = await roomApi.list({ apartmentId: this.searchForm.apartmentId }) this.rooms = response.data || response } catch (error) { this.$message.error('加载房间数据失败') @@ -325,7 +384,7 @@ export default { diff --git a/src/views/room/Add.vue b/src/views/room/Add.vue index bdd48fe..9c36ce9 100644 --- a/src/views/room/Add.vue +++ b/src/views/room/Add.vue @@ -6,9 +6,9 @@ 添加房间 - + - + @@ -25,14 +25,14 @@ - + - + @@ -40,13 +40,13 @@ - + - + 提交 重置 返回 @@ -160,7 +160,7 @@ export default { \ No newline at end of file + +.form-content { + max-width: 600px; +} + +.form-actions { + margin-top: 30px; +} + +/* 移动端适配 */ +@media screen and (max-width: 768px) { + .form-content { + max-width: 100%; + } + + .form-content .el-form-item__label { + float: none; + display: block; + text-align: left; + margin-bottom: 5px; + } + + .form-content .el-form-item__content { + margin-left: 0 !important; + } + + .form-actions { + text-align: center; + } + + .form-actions .el-button { + margin-bottom: 10px; + } +} + diff --git a/src/views/room/Edit.vue b/src/views/room/Edit.vue index fc876bf..720dc13 100644 --- a/src/views/room/Edit.vue +++ b/src/views/room/Edit.vue @@ -6,9 +6,9 @@ 编辑房间 - + - + @@ -25,14 +25,14 @@ - + - + @@ -40,13 +40,13 @@ - + - + 提交 重置 返回 @@ -74,7 +74,6 @@ export default { otherStatus: '', subStatus: 'normal' }, - // 保存返回时的查询参数 returnQuery: {}, apartments: [], rules: { @@ -125,7 +124,6 @@ export default { } }, mounted() { - // 获取返回时的查询参数 this.returnQuery = this.$route.query this.loadApartments() this.loadRoomData() @@ -183,7 +181,7 @@ export default { \ No newline at end of file + +.form-content { + max-width: 600px; +} + +.form-actions { + margin-top: 30px; +} + +/* 移动端适配 */ +@media screen and (max-width: 768px) { + .form-content { + max-width: 100%; + } + + .form-content .el-form-item__label { + float: none; + display: block; + text-align: left; + margin-bottom: 5px; + } + + .form-content .el-form-item__content { + margin-left: 0 !important; + } + + .form-actions { + text-align: center; + } + + .form-actions .el-button { + margin-bottom: 10px; + } +} + diff --git a/src/views/room/List.vue b/src/views/room/List.vue index 96de8ff..36d9eb1 100644 --- a/src/views/room/List.vue +++ b/src/views/room/List.vue @@ -4,25 +4,27 @@ 房间管理 - 添加房间 + 添加房间 + + - + - + - + @@ -30,7 +32,7 @@ - + @@ -44,45 +46,94 @@ 重置 - - - - - - - - - {{ getStatusText(scope.row.status) }} - - - - - - {{ getSubStatusText(scope.row.subStatus) }} - 无 - - - - - - {{ getOtherStatusText(scope.row.otherStatus) }} - 无 - - - - - - 编辑 - 删除 - - - - + + + + + + + + + + + + {{ getStatusText(scope.row.status) }} + + + + + {{ getSubStatusText(scope.row.subStatus) }} + - + + + + + {{ getOtherStatusText(scope.row.otherStatus) }} + - + + + + + + 编辑 + 删除 + + + + + + + + + + + {{ item.apartmentName }} + {{ item.roomNumber }} + + + {{ getStatusText(item.status) }} + + {{ getSubStatusText(item.subStatus) }} + + + {{ getOtherStatusText(item.otherStatus) }} + + + + + + + 面积: + {{ item.area }}㎡ + + + 月租: + ¥{{ item.monthlyPrice }} + + + + 年租: + ¥{{ item.yearlyPrice }} + + + 创建时间: + {{ item.createTime }} + + + + + + + { - // 为房间添加公寓名称 const apartment = this.apartments.find(a => a.id == room.apartmentId) return { ...room, @@ -171,7 +228,6 @@ export default { }) this.total = roomsResponse.total } else { - // 兼容旧的返回格式 this.rooms = roomsResponse.map(room => { const apartment = this.apartments.find(a => a.id == room.apartmentId) return { @@ -189,7 +245,7 @@ export default { }, getStatusType(status) { switch (status) { - case 'empty': return '' + case 'empty': return 'info' case 'rented': return 'success' default: return '' } @@ -203,7 +259,7 @@ export default { }, getOtherStatusType(status) { switch (status) { - case 'cleaning': return 'info' + case 'cleaning': return 'warning' case 'maintenance': return 'danger' default: return '' } @@ -235,7 +291,6 @@ export default { this.$router.push('/room/add') }, handleEdit(id) { - // 保存当前的查询参数和页码到路由参数 this.$router.push({ path: `/room/edit/${id}`, query: { @@ -292,7 +347,7 @@ export default { \ No newline at end of file + +/* 移动端卡片列表样式 */ +.mobile-list { + display: none; +} + +.mobile-card { + background: #fff; + border: 1px solid #ebeef5; + border-radius: 4px; + padding: 15px; + margin-bottom: 10px; +} + +.mobile-card-header { + display: flex; + justify-content: space-between; + align-items: flex-start; + margin-bottom: 10px; + padding-bottom: 10px; + border-bottom: 1px solid #ebeef5; + flex-wrap: wrap; + gap: 8px; +} + +.mobile-card-title { + display: flex; + flex-direction: column; + gap: 4px; +} + +.mobile-card-title span:first-child { + font-size: 14px; + color: #606266; +} + +.room-number { + font-size: 16px; + font-weight: bold; + color: #303133; +} + +.mobile-card-tags { + display: flex; + gap: 5px; + flex-wrap: wrap; +} + +.mobile-card-body { + margin-bottom: 10px; +} + +.mobile-card-row { + display: flex; + gap: 20px; +} + +.mobile-card-item { + display: flex; + margin-bottom: 8px; + font-size: 14px; +} + +.mobile-card-label { + color: #909399; + min-width: 50px; + flex-shrink: 0; +} + +.mobile-card-value { + color: #606266; + flex: 1; +} + +.mobile-card-value.price { + color: #f56c6c; + font-weight: bold; +} + +.mobile-card-footer { + display: flex; + justify-content: flex-end; + gap: 10px; + padding-top: 10px; + border-top: 1px solid #ebeef5; +} + +/* 响应式显示控制 */ +@media screen and (max-width: 768px) { + .hidden-xs-only { + display: none; + } + + .mobile-list { + display: block; + } + + .search-form { + margin-bottom: 15px; + } + + .search-form .el-form-item { + display: block; + margin-right: 0; + margin-bottom: 10px; + } + + .search-form .el-form-item__content { + width: 100%; + } + + .search-form .el-input, + .search-form .el-select { + width: 100%; + } + + .pagination-wrapper { + justify-content: center; + } + + .card-header { + flex-wrap: wrap; + gap: 10px; + } + + .card-header span { + font-size: 16px; + } +} + +@media screen and (min-width: 769px) { + .hidden-sm-and-up { + display: none; + } +} + diff --git a/src/views/statistics/House.vue b/src/views/statistics/House.vue index 3115d75..ead2a94 100644 --- a/src/views/statistics/House.vue +++ b/src/views/statistics/House.vue @@ -9,13 +9,23 @@ - - - - - - - 房间总数:{{ totalCount }} 间 + + + + + + {{ scope.row.count }} + + + + + + + + + + + 房间总数:{{ totalCount }} 间 @@ -33,7 +43,6 @@ export default { }, computed: { totalCount() { - // 只计算在租和空房的数量 return this.roomStatusData .filter(item => item.status === '在租' || item.status === '空房') .reduce((sum, item) => sum + item.count, 0) @@ -47,13 +56,12 @@ export default { try { const response = await statisticsApi.getRoomStatus() const data = response - // 只计算在租和空房的数量作为总数 const total = data .filter(item => item.status === '在租' || item.status === '空房') .reduce((sum, item) => sum + item.count, 0) this.roomStatusData = data.map(item => ({ ...item, - percentage: total > 0 ? `${((item.count / total) * 100).toFixed(2)}%` : '0.00%' + percentage: total > 0 ? parseFloat(((item.count / total) * 100).toFixed(2)) : 0 })) } catch (error) { this.$message.error('加载房间状态统计数据失败') @@ -65,7 +73,7 @@ export default { \ No newline at end of file + +.table-wrapper { + overflow-x: auto; +} + +.stats-table { + min-width: 350px; +} + +.count-value { + font-weight: bold; + color: #409EFF; +} + +.total-count { + margin-top: 20px; + text-align: right; +} + +/* 移动端适配 */ +@media screen and (max-width: 768px) { + .chart-container { + margin: 10px 0; + } + + .total-count { + text-align: center; + margin-top: 15px; + } + + .card-header span { + font-size: 16px; + } +} + diff --git a/src/views/statistics/Rent.vue b/src/views/statistics/Rent.vue index e766778..874d36e 100644 --- a/src/views/statistics/Rent.vue +++ b/src/views/statistics/Rent.vue @@ -9,12 +9,18 @@ - - - - - - 总租金收入:{{ totalAmount }} 元 + + + + + + ¥{{ scope.row.amount }} + + + + + + 总租金收入:{{ totalAmount }} 元 @@ -53,7 +59,7 @@ export default { \ No newline at end of file + +.table-wrapper { + overflow-x: auto; +} + +.stats-table { + min-width: 300px; +} + +.amount-value { + color: #f56c6c; + font-weight: bold; +} + +.total-amount { + margin-top: 20px; + text-align: right; +} + +/* 移动端适配 */ +@media screen and (max-width: 768px) { + .chart-container { + margin: 10px 0; + } + + .total-amount { + text-align: center; + margin-top: 15px; + } + + .card-header span { + font-size: 16px; + } +} +
租客: {{ room.Rentals[0].tenantName }}
租期: {{ room.Rentals[0].startDate }} 至 {{ room.Rentals[0].endDate }}
{{ room.Rentals[0].tenantName }}
{{ room.Rentals[0].startDate }} 至 {{ room.Rentals[0].endDate }}
暂无租客信息