소스 검색

更新 饼图渲染逻辑

王智慧 3 년 전
부모
커밋
797c386926
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      src/views/index/Index.vue

+ 7 - 0
src/views/index/Index.vue

@@ -440,6 +440,13 @@ function drawPie(type) {
     chartDom.value = document.getElementById("pie");
     myChart.value = echarts.init(chartDom.value);
   }
+  if (
+    indexData.value.finshDiscTons == 0 &&
+    indexData.value.unfinshDiscTons == 0
+  ) {
+    myChart.value.clear();
+    return;
+  }
 
   let option;