EnergyAnalysis.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <script setup lang="ts">
  2. import { ref } from 'vue';
  3. import DeviceGroupSelect from '@/components/DeviceGroupSelect.vue';
  4. import EnergyConsumption from './EnergyConsumption.vue';
  5. import EnergyEfficiency from './EnergyEfficiency.vue';
  6. const activeKey = ref('energyConsumption');
  7. const handleDevGroupChange = (id: number) => {
  8. console.log(id);
  9. };
  10. </script>
  11. <template>
  12. <ATabs class="button-tabs-compact" v-model:active-key="activeKey" type="card">
  13. <ATabPane key="energyConsumption" :tab="$t('energyAnalysis.energyConsumptionAnalysis')">
  14. <EnergyConsumption />
  15. </ATabPane>
  16. <ATabPane key="energyEfficiency" :tab="$t('energyAnalysis.energyEfficiencyAnalysis')">
  17. <EnergyEfficiency />
  18. </ATabPane>
  19. <!-- <ATabPane key="energySaving" :tab="$t('energyAnalysis.energySavingAssessment')">
  20. <EnergySaving />
  21. </ATabPane> -->
  22. <template #rightExtra>
  23. <DeviceGroupSelect @change="handleDevGroupChange" />
  24. </template>
  25. </ATabs>
  26. </template>
  27. <style lang="scss" scoped>
  28. .group-select {
  29. width: 192px;
  30. & + & {
  31. margin-left: 16px;
  32. }
  33. }
  34. :deep(.ant-tabs-content-holder) {
  35. .ant-card {
  36. border-radius: 16px;
  37. box-shadow: none;
  38. + .ant-card {
  39. margin-top: 16px;
  40. }
  41. }
  42. .ant-card-head-title {
  43. padding-left: 10px;
  44. font-size: 16px;
  45. font-weight: 600;
  46. line-height: 24px;
  47. color: #333;
  48. border-left: 2px solid var(--antd-color-primary);
  49. }
  50. .energy-card-container {
  51. display: flex;
  52. flex: 1;
  53. align-items: center;
  54. height: 124px;
  55. border-radius: 8px;
  56. }
  57. .energy-card-icon {
  58. margin-right: 16px;
  59. margin-left: 24px;
  60. }
  61. .energy-card-title {
  62. margin-bottom: 2px;
  63. }
  64. .energy-card-value {
  65. margin-right: 4px;
  66. font-family: DINAlternate;
  67. font-size: 30px;
  68. font-weight: bold;
  69. line-height: 36px;
  70. color: #000;
  71. }
  72. .energy-card-unit {
  73. font-size: 14px;
  74. font-weight: 500;
  75. line-height: 22px;
  76. color: #000;
  77. }
  78. .energy-card-description {
  79. font-size: 14px;
  80. font-weight: 500;
  81. line-height: 22px;
  82. color: #000;
  83. }
  84. }
  85. </style>