index.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <div class="map-container">
  3. <el-row :gutter="10">
  4. <el-col :span="12" class="h-full-calc">
  5. <el-card class="h-40">
  6. <PointsRanking></PointsRanking>
  7. </el-card>
  8. <el-card class="h-60 mt-10">
  9. <MapHy></MapHy>
  10. </el-card>
  11. </el-col>
  12. <!-- <el-col :span="8" class="h-full-calc">
  13. <el-card class="h-full">
  14. <MapHy></MapHy>
  15. </el-card>
  16. </el-col> -->
  17. <el-col :span="12" class="h-full-calc">
  18. <el-card class="h-40">
  19. <Box2
  20. v-if="chartOptions.data && chartOptions.data.length > 0"
  21. :chartOptions="chartOptions"
  22. height="95%"
  23. ></Box2>
  24. <el-empty v-else></el-empty>
  25. </el-card>
  26. <el-card class="h-60 mt-10">
  27. <Box1
  28. v-if="chartOptions.data && chartOptions.data.length > 0"
  29. :chartOptions="chartOptions"
  30. height="100%"
  31. ></Box1>
  32. <el-empty v-else></el-empty>
  33. </el-card>
  34. </el-col>
  35. </el-row>
  36. </div>
  37. </template>
  38. <script>
  39. import MapHy from "./components/map/index.vue";
  40. import Box1 from "./components/box1/index.vue";
  41. import Box2 from "./components/box1 copy/index.vue";
  42. import PointsRanking from "./components/points-ranking/index.vue";
  43. export default {
  44. components: {
  45. Box1,
  46. Box2,
  47. MapHy,
  48. PointsRanking,
  49. },
  50. data() {
  51. return {
  52. chartOptions: {
  53. xData: [],
  54. data: [],
  55. },
  56. };
  57. },
  58. mounted() {
  59. this.init();
  60. },
  61. methods: {
  62. init() {
  63. this.chartOptions.data = [
  64. 120, 200, 150, 80, 70, 110, 130, 70, 110, 130, 200, 150,
  65. ];
  66. this.chartOptions.xData = Array(12)
  67. .fill(0)
  68. .map((it, i) => `${i + 1}月`);
  69. },
  70. },
  71. };
  72. </script>
  73. <style lang="scss" scoped>
  74. .mt-10 {
  75. margin-top: 10px;
  76. }
  77. .map-container {
  78. padding: 15px;
  79. background-color: rgba(11, 42, 96, 0.8);
  80. }
  81. .h-full-calc {
  82. height: calc(100vh - 200px);
  83. }
  84. .mt-10 {
  85. margin-top: 10px;
  86. }
  87. .c-title {
  88. border-left: 4px solid #000;
  89. }
  90. .el-card {
  91. height: 100%;
  92. }
  93. .h-40 {
  94. height: calc(33% - 5px);
  95. }
  96. .h-60 {
  97. height: calc(67% - 5px);
  98. }
  99. .h-48 {
  100. height: calc(50% - 5px);
  101. }
  102. .el-card__body {
  103. height: 100%;
  104. }
  105. ::v-deep {
  106. .el-card__body {
  107. height: 100%;
  108. }
  109. .el-card {
  110. border: none;
  111. background-color: rgba(11, 42, 96, 0);
  112. }
  113. .el-table {
  114. background-color: transparent;
  115. color: white;
  116. }
  117. .el-table tr {
  118. background-color: transparent !important;
  119. }
  120. .el-table th {
  121. color: white;
  122. background-color: transparent !important;
  123. }
  124. }
  125. </style>