| | |
| | | <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> |
| | |
| | | } |
| | | } |
| | | }, |
| | | userInfo: {} |
| | | userInfo: {}, |
| | | // 年月 |
| | | yearMonth: new Date() |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | }, |
| | | // 获取用户信息 |
| | | 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> |