waterPortrait.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <script>
  2. import CoreData from "@/components/common/coreData.vue";
  3. import WaterUseChart from "@/components/dashboard/portrait/water/waterUseChart.vue";
  4. import WaterDistributionChart from "@/components/dashboard/portrait/water/waterDistributionChart.vue";
  5. export default {
  6. data() {
  7. return {
  8. coreData: [
  9. {
  10. type: 0,
  11. title: '月总用水量(m³)',
  12. num: 2000,
  13. historyDesc: '同比',
  14. historyNum: '0.4'
  15. },
  16. {
  17. type: 0,
  18. title: '今日用水总量(m³)',
  19. num: 1800,
  20. historyDesc: '同比',
  21. historyNum: '0.4'
  22. },
  23. {
  24. type: 0,
  25. title: '今日用水趋势',
  26. num: 30,
  27. unit: '%',
  28. historyDesc: '同比',
  29. historyNum: '0.4'
  30. },
  31. {
  32. type: 0,
  33. title: '人均用水量(m³)',
  34. num: 30,
  35. historyDesc: '同比',
  36. historyNum: '0.4'
  37. },
  38. {
  39. type: 1,
  40. isHighLight: false,
  41. title: '值得关注',
  42. content: ''
  43. },
  44. ]
  45. }
  46. },
  47. props: {
  48. chartHeight: Number
  49. },
  50. components: {
  51. CoreData,
  52. WaterUseChart,
  53. WaterDistributionChart,
  54. }
  55. }
  56. </script>
  57. <template>
  58. <div class="supermarketPortrait">
  59. <div class="portrait-coreData">
  60. <CoreData :data-list="coreData"></CoreData>
  61. </div>
  62. <div style="padding: 15px">
  63. <a-row>
  64. <a-col :span="16">
  65. <WaterUseChart :height="chartHeight"></WaterUseChart>
  66. </a-col>
  67. <a-col :span="8">
  68. <WaterDistributionChart :height="chartHeight"></WaterDistributionChart>
  69. </a-col>
  70. </a-row>
  71. </div>
  72. </div>
  73. </template>
  74. <style lang="less" scoped>
  75. .supermarketPortrait {
  76. }
  77. </style>