diff --git a/src/router/index.js b/src/router/index.js index 74894cd..974b4c2 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -85,6 +85,14 @@ export const asyncRoutes = { }, component: () => import('../views/customer_center/WxUser.vue'), }, + user_car: { + path: 'user_car', + name: 'user_car', + meta: { + title: '车辆管理', + }, + component: () => import('../views/customer_center/user_car.vue'), + }, // 运营中心 activity: { path: 'activity', diff --git a/src/store/index.js b/src/store/index.js index 5de011a..c8229bc 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -75,6 +75,7 @@ const store = new Vuex.Store({ { size: 18, text: '车辆管理', + name: 'user_car', type: 'ios-paper', }, ], diff --git a/src/views/customer_center/user_car.vue b/src/views/customer_center/user_car.vue new file mode 100644 index 0000000..3ca76d0 --- /dev/null +++ b/src/views/customer_center/user_car.vue @@ -0,0 +1,331 @@ + + + + \ No newline at end of file diff --git a/src/views/reports/rate.vue b/src/views/reports/rate.vue index 8411741..159778a 100644 --- a/src/views/reports/rate.vue +++ b/src/views/reports/rate.vue @@ -3,7 +3,7 @@
- @@ -42,7 +42,7 @@
- +
@@ -106,12 +106,15 @@ this.initChart() this.getStationList() this.getPileList() + this.calculateTableHeight() + window.addEventListener('resize', this.calculateTableHeight) }, beforeDestroy() { if (this.chartInstance) { this.chartInstance.dispose() } window.removeEventListener('resize', this.handleResize) + window.removeEventListener('resize', this.calculateTableHeight) }, methods: { async initChart() { @@ -248,7 +251,13 @@ // 响应式调整 window.addEventListener('resize', this.handleResize) }, - + calculateTableHeight() { + // 计算表格高度 = 窗口高度 - 搜索区域高度 - 分页高度 - 其他间距 + const searchHeight = document.querySelector('.search-area').offsetHeight + const pageHeight = 32 // 分页组件大约高度 + const margins = 40 // 上下边距总和 + this.tableHeight = window.innerHeight - searchHeight - pageHeight - margins - 230 + }, handleResize() { if (this.chartInstance) { this.chartInstance.resize() @@ -297,13 +306,25 @@ background: #fff; border-radius: 8px; padding: 20px; - margin: 20px; + margin: 2px; box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); } .search-area { background-color: white; border: 1px solid #F3F7FD; + padding-top: 2px; border-radius: 15px; } + + .table-container { + flex: 1; + display: flex; + flex-direction: column; + } + + .page { + margin-top: 10px; + text-align: right; + } \ No newline at end of file