<!-- Description: 综合大屏 - 数据展示- 监测设备统计 Author: 李亚光 Date: 2024-09-18 --> <script lang="ts" setup name="FullScreenMonitorDeviceCount"> import layout from './layout.vue' import PieChart3D from '@/components/Echart/PieChart3D.vue' // 宽高 const height = ref((window.innerHeight - 100 - 50) / 3) const width = ref((window.innerWidth - (window.innerWidth * 0.6) - 30) / 2) window.addEventListener('resize', () => { height.value = (window.innerHeight - 100 - 50) / 3 width.value = (window.innerWidth - (window.innerWidth * 0.6) - 30) / 2 }) const data = ref<any[]>([]) onMounted(() => { setTimeout(() => { data.value = [ { name: '管网哨兵', value: '12', }, { name: '燃气智能监测终端', value: '18', }, { name: '场站监测云台', value: '6', }, { name: '井盖状态监测仪', value: '10', }, { name: '智能警示桩', value: '14', }, ] }, 2000) }) </script> <template> <layout class="layout" :height="height" :width="width" title="监测设备统计" subtitle="Monitoring Equipment Statistics"> <template #content> <pie-chart3-d :data="data" :style="{ width: '100%', height: `${height - 30}px` }" /> </template> </layout> </template> <style lang="scss" scoped> .layout { ::v-deep(.title) { padding-left: 8px !important; color: #fff; font-weight: 700; // padding-left: 20px; box-sizing: border-box; } } </style>