AaronBruin 2 months ago
parent
commit
edd5eed6ee
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/views/system/elevator/modules/carbonEmission.vue

+ 6 - 2
src/views/system/elevator/modules/carbonEmission.vue

@@ -11,7 +11,6 @@
 import { ref, onMounted, onUnmounted } from 'vue';
 import * as echarts from 'echarts';
 import HeadlineTag from '@/components/HeadlineTag';
-import Empty from '@/components/Empty'
 
 const props = defineProps({
     resultData: {
@@ -138,8 +137,13 @@ onMounted(() => {
     }
     window.addEventListener('resize', handleResize);
 });
-
+const flagSion = ref(false)
 watch(() => props.resultData, (newVal) => {
+    function isEmptyObject(obj) {
+        return Object.keys(obj).length === 0;
+    }
+    flagSion.value = isEmptyObject(newVal)
+    console.log(isEmptyObject(newVal), 88)
     if (chart) {
         chart.setOption({
             xAxis: {