Przeglądaj źródła

Merge branch 'master' of http://114.244.114.158:8802/siwei/real3d-portalsite

maxiaoxiao 9 miesięcy temu
rodzic
commit
a3eaf4893c

+ 10 - 4
src/components/echartsTemplate/pie.vue

@@ -28,16 +28,16 @@ let option = {
     fontSize: 16,
   },
   title: {
-    // text: "报建数量",
-    x: "20%",
+    show: false,
+    text: "暂无数据",
     textStyle: {
       //  rich: {
       fontSize: 14,
       color: "#fff",
       fontWeight: "bold",
     },
-    x: "20%",
-    y: "45%",
+    x: "39%",
+    y: "28%",
   },
   legend: {
     // type: "scroll",
@@ -169,6 +169,7 @@ export default {
   },
   methods: {
     setOptions(cartData) {
+      console.log('cartData: ', cartData);
       let _this = this;
       if (!this.myChart) {
         // var dom = document.getElementById("pie_echart");
@@ -226,6 +227,11 @@ export default {
         return `${params.name} : ${params.value} ${_this.$props.unit}`;
       };
       this.myChart.resize();
+      console.log('cartData.data.length: ', cartData.data.length);
+
+      if (cartData.data.length <= 0) {
+        option.title.show = true;
+      }
       this.myChart.setOption(option);
       // if (cartData.isclick) {
       //  legendselectchanged

+ 1 - 1
src/views/siteselection/components/dkDetailsNew.vue

@@ -65,7 +65,7 @@ export default {
       loading: true,
       isDateilsShow: false,
       ruleForm: { height: 50 },
-      activeName: 'second',
+      activeName: '规划地块',
       tabs_list: null,
       optional: null,
       rawData: [],