From 5a31047fa94abde105ee964a70891dd975403f89 Mon Sep 17 00:00:00 2001
From: 赵士淞 <zhaoss@yhzhg.cn>
Date: Fri, 28 Apr 2023 09:00:59 +0000
Subject: [PATCH] 首页:可查看其他月份统计数据
---
eladmin-web-master/src/views/home.vue | 67 ++++++++++++++++++++-------------
1 files changed, 41 insertions(+), 26 deletions(-)
diff --git a/eladmin-web-master/src/views/home.vue b/eladmin-web-master/src/views/home.vue
index 6e12acb..7e775ed 100644
--- a/eladmin-web-master/src/views/home.vue
+++ b/eladmin-web-master/src/views/home.vue
@@ -1,8 +1,11 @@
<template>
<div class="dashboard-container">
<div class="dashboard-editor-container">
+ <div style="text-align: right;">
+ <el-date-picker v-model="yearMonth" type="month" placeholder="选择年月" @change="yearMonthChange" />
+ </div>
<panel-group :user-info="userInfo" @handleSetLineChartData="handleSetLineChartData" />
- <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
+ <el-row style="background: #fff; padding: 16px;">
<FullCalendar ref="fullCalendar" :options="calendarOptions" />
</el-row>
</div>
@@ -128,7 +131,9 @@
}
}
},
- userInfo: {}
+ userInfo: {},
+ // 年月
+ yearMonth: new Date()
}
},
mounted() {
@@ -186,37 +191,47 @@
},
// 获取用户信息
getUserBaseInfo() {
- crudUser.getUserBaseInfo().then(res => {
+ crudUser.getUserBaseInfo(this.yearMonth).then(res => {
this.userInfo = res
})
+ },
+ // 年月变更
+ yearMonthChange() {
+ // 获取用户信息
+ this.getUserBaseInfo()
}
}
}
</script>
-// <style rel="stylesheet/scss" lang="scss" scoped>
-// .dashboard-editor-container {
-// padding: 32px;
-// background-color: rgb(240, 242, 245);
-// position: relative;
+<style rel="stylesheet/scss" lang="scss" scoped>
+ .dashboard-editor-container {
+ padding: 32px;
+ background-color: rgb(240, 242, 245);
+ position: relative;
-// .github-corner {
-// position: absolute;
-// top: 0;
-// border: 0;
-// right: 0;
-// }
+ .github-corner {
+ position: absolute;
+ top: 0;
+ border: 0;
+ right: 0;
+ }
-// .chart-wrapper {
-// background: #fff;
-// padding: 16px 16px 0;
-// margin-bottom: 32px;
-// }
-// }
+ .search-wrapper {
+ text-align: right;
+ }
-// @media (max-width:1024px) {
-// .chart-wrapper {
-// padding: 8px;
-// }
-// }
-// </style>
+ .chart-wrapper {
+ background: #fff;
+ padding: 16px 16px 0;
+ margin-bottom: 32px;
+ overflow: auto;
+ }
+ }
+
+ @media (max-width:1024px) {
+ .chart-wrapper {
+ padding: 8px;
+ }
+ }
+</style>
--
Gitblit v1.9.3