Browse Source

判定结果柱状统计图

maxiaoxiao 7 hours ago
parent
commit
d08b42bb20
2 changed files with 26 additions and 22 deletions
  1. 18 18
      src/components/echarts/bar.vue
  2. 8 4
      src/views/pageCode/statistic/progress/index.vue

+ 18 - 18
src/components/echarts/bar.vue

@@ -58,24 +58,24 @@ let option = {
       type: "value",
       name: "",
       nameTextStyle: {
-        color: "#ffffff",
-      },
-      splitLine: {
-        show: false,
-        lineStyle: {
-          color: "rgba(163, 163, 163, 0.5)",
-          type: "dashed",
-        },
-      },
-      axisLabel: {
-        color: "#A0A4AA",
-      },
-      axisLine: {
-        show: true,
-        lineStyle: {
-          color: "rgba(65, 97, 128, 0.5)",
-        },
+        color: "#000",
       },
+      // splitLine: {
+      //   show: false,
+      //   lineStyle: {
+      //     color: "rgba(163, 163, 163, 0.5)",
+      //     type: "dashed",
+      //   },
+      // },
+      // axisLabel: {
+      //   color: "#A0A4AA",
+      // },
+      // axisLine: {
+      //   show: true,
+      //   lineStyle: {
+      //     color: "rgba(65, 97, 128, 0.5)",
+      //   },
+      // },
     },
     {
       // name: obj.yAxis ? obj.yAxis[0].name : "项目个数/个",
@@ -180,7 +180,7 @@ export default {
         // }
         option.series.push(o);
       });
-      this.myChart.resize();
+      // this.myChart.resize();
       this.myChart.setOption(option);
 
       this.myChart.on("click", function (params) {

+ 8 - 4
src/views/pageCode/statistic/progress/index.vue

@@ -145,7 +145,7 @@
         </el-table>
         <div class="echartTitle">
           <div class="block-title">{{ titles[route.query.type] }}统计图</div>
-          <el-select v-model="bartype" @change="changeNtype">
+          <el-select v-model="bartype" @change="changeBartype">
             <el-option
               v-for="item in typeoptions"
               :key="item.id"
@@ -401,6 +401,9 @@ function changeNtype() {
   }
   echartsMap.value.init(mapVals.value, mname);
 }
+function changeBartype() {
+  setLnbh(tableData.value);
+}
 function setLnbh(data) {
   //eData.value.yName = `变化面积${this.unitList[this.nowunit].unit}`;
   eData.value.xData = [];
@@ -408,15 +411,16 @@ function setLnbh(data) {
   eData.value.yData = [[], [], []];
   if (route.query.type == "judge")
     eData.value.legend = ["未判定", "已判定(拆分前)", "已判定(拆分后)"];
-  else if (route.query.type == "judge")
+  else if (route.query.type == "result")
     eData.value.legend = ["合法用地", "违法用地", "其它用地"];
   else eData.value.legend = [];
   data.forEach((res, i) => {
-    if (i) {//去掉合计
+    if (i) {
+      //去掉合计
       eData.value.xData.push(res.xzqmc);
       if (route.query.type == "all") {
         eData.value.yData[0].push(
-          res[ntype.value == "0" ? "countNumber" : "countSum"]
+          res[bartype.value == "0" ? "countNumber" : "countSum"]
         );
       } else {
         //if (route.query.type == "judge")