赵士淞
2023-04-28 5a31047fa94abde105ee964a70891dd975403f89
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>