personPortrait.vue 1.5 KB

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