| | |
| | | <template> |
| | | <BaseCard size="medium" direction="left"> |
| | | <template #content> |
| | | <el-scrollbar height="calc(49vh - var(--bevel-length-2))" always> |
| | | <DashBoard ref="dashBoardRef" :factor-datas="factorDatas"></DashBoard> |
| | | <el-scrollbar :height="height" always> |
| | | <div v-for="item in seriesList" :key="item.key"> |
| | | <el-row |
| | | v-show="selectFactorType.includes(item.series.key)" |
| | |
| | | import { checkboxOptions } from '@/constant/checkbox-options'; |
| | | import { factorName } from '@/constant/factor-name'; |
| | | import { factorUnit } from '@/constant/factor-unit'; |
| | | import DashBoard from '@/views/realtimemode/component/DashBoard.vue'; |
| | | |
| | | export default { |
| | | components: { DashBoard }, |
| | | props: { |
| | | loading: Boolean, |
| | | factorDatas: FactorDatas, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | height: 'calc(99vh - var(--bevel-length-2))', |
| | | xAxis: [], |
| | | allSeries: new Map(), |
| | | seriesList: [] |
| | | }; |
| | | }, |
| | | computed: { |
| | | // factorTypes() { |
| | | // return checkboxOptions(this.deviceType); |
| | | // } |
| | | }, |
| | | computed: {}, |
| | | watch: { |
| | | factorDatas: { |
| | | handler() { |
| | |
| | | getUnit(label) { |
| | | // fixeme 2024.5.15 修复CO展示单位和原始数据不一致问题 |
| | | return label == 'CO' ? 'μg/m³' : factorUnit[label].unit; |
| | | }, |
| | | calcHeight() { |
| | | const h1 = this.$refs.dashBoardRef |
| | | ? this.$refs.dashBoardRef.$el.offsetHeight |
| | | : 0; |
| | | this.height = `calc(98vh - var(--bevel-length-2) - ${h1}px)`; |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.calcHeight(); |
| | | } |
| | | }; |
| | | </script> |