【前端】智能库房综合管理系统前端项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
2.6 KiB

4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
  1. <template>
  2. <div class="dashboard-container">
  3. <WarehouseEnv />
  4. <!-- <div class="dashboard-editor-container">
  5. <github-corner class="github-corner" />
  6. <panel-group @handleSetLineChartData="handleSetLineChartData" />
  7. <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
  8. <line-chart :chart-data="lineChartData" />
  9. </el-row>
  10. <el-row :gutter="32">
  11. <el-col :xs="24" :sm="24" :lg="8">
  12. <div class="chart-wrapper">
  13. <radar-chart />
  14. </div>
  15. </el-col>
  16. <el-col :xs="24" :sm="24" :lg="8">
  17. <div class="chart-wrapper">
  18. <pie-chart />
  19. </div>
  20. </el-col>
  21. <el-col :xs="24" :sm="24" :lg="8">
  22. <div class="chart-wrapper">
  23. <bar-chart />
  24. </div>
  25. </el-col>
  26. </el-row>
  27. </div> -->
  28. </div>
  29. </template>
  30. <script>
  31. // import GithubCorner from '@/components/GithubCorner'
  32. // import PanelGroup from './dashboard/PanelGroup'
  33. // import LineChart from './dashboard/LineChart'
  34. // import RadarChart from '@/components/Echarts/RadarChart'
  35. // import PieChart from '@/components/Echarts/PieChart'
  36. // import BarChart from '@/components/Echarts/BarChart'
  37. import WarehouseEnv from './WarehouseEnv'
  38. const lineChartData = {
  39. newVisitis: {
  40. expectedData: [100, 120, 161, 134, 105, 160, 165],
  41. actualData: [120, 82, 91, 154, 162, 140, 145]
  42. },
  43. messages: {
  44. expectedData: [200, 192, 120, 144, 160, 130, 140],
  45. actualData: [180, 160, 151, 106, 145, 150, 130]
  46. },
  47. purchases: {
  48. expectedData: [80, 100, 121, 104, 105, 90, 100],
  49. actualData: [120, 90, 100, 138, 142, 130, 130]
  50. },
  51. shoppings: {
  52. expectedData: [130, 140, 141, 142, 145, 150, 160],
  53. actualData: [120, 82, 91, 154, 162, 140, 130]
  54. }
  55. }
  56. export default {
  57. name: 'Dashboard',
  58. components: {
  59. // GithubCorner,
  60. // PanelGroup,
  61. // LineChart,
  62. // RadarChart,
  63. // PieChart,
  64. // BarChart,
  65. WarehouseEnv
  66. },
  67. data() {
  68. return {
  69. lineChartData: lineChartData.newVisitis
  70. }
  71. },
  72. methods: {
  73. handleSetLineChartData(type) {
  74. this.lineChartData = lineChartData[type]
  75. }
  76. }
  77. }
  78. </script>
  79. <style rel="stylesheet/scss" lang="scss" scoped>
  80. .dashboard-editor-container {
  81. padding: 32px;
  82. background-color: rgb(240, 242, 245);
  83. position: relative;
  84. .github-corner {
  85. position: absolute;
  86. top: 0;
  87. border: 0;
  88. right: 0;
  89. }
  90. .chart-wrapper {
  91. background: #fff;
  92. padding: 16px 16px 0;
  93. margin-bottom: 32px;
  94. }
  95. }
  96. @media (max-width:1024px) {
  97. .chart-wrapper {
  98. padding: 8px;
  99. }
  100. }
  101. </style>