Переглянути джерело

曲线偏差率页面切换后点击行不显示图表的问题;
echarts标题色与图色不一致的问题

wangmengwei 3 роки тому
батько
коміт
8fa6bb261a

+ 5 - 32
src/components/coms/table/table-qc.vue

@@ -49,7 +49,7 @@
       custom-class="modal"
       :close-on-click-modal="true"
     >
-      <div class="chart" id="chartDiv" height="500px"></div>
+      <div class="chart" id="chartDiv" style="height: 500px;"></div>
     </el-dialog>
   </table>
 </template>
@@ -156,7 +156,7 @@ export default {
       });
     },
     onClick(col, row) {
-      this.clearChart();
+      // this.clearChart();
       let subUrl = "";
       let data = {};
       let method = "POST";
@@ -225,7 +225,7 @@ export default {
       let that = this;
       let myChart = echarts.init(document.getElementById("chartDiv"));
       let option = {
-        color: ["#05bb4c", "#4b55ae"],
+        color: ["#05bb4c", "#fa8c16"],
         tooltip: {
           trigger: "axis"
         },
@@ -261,34 +261,7 @@ export default {
             axisLine: {
               show: false
             },
-            data: [
-              "0",
-              "1",
-              "2",
-              "3",
-              "4",
-              "5",
-              "6",
-              "7",
-              "8",
-              "9",
-              "10",
-              "11",
-              "12",
-              "13",
-              "14",
-              "15",
-              "16",
-              "17",
-              "18",
-              "19",
-              "20",
-              "21",
-              "22",
-              "23",
-              "24",
-              "25"
-            ]
+            data: ["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25"]
           }
         ],
         yAxis: [
@@ -492,6 +465,6 @@ export default {
 <style lang="less">
 .chart {
   width: 100%;
-  height: 500px;
+  // height: 500px;
 }
 </style>

+ 0 - 4
src/views/wtSaturability/tab1.vue

@@ -197,11 +197,7 @@ export default {
           }];
 
           keyArray.forEach((keyEle, keyIndex) => {
-            console.log('keyele:',keyEle,'keyindex:',keyIndex)
-            console.log('resdata:',res.data)
             res.data.forEach(ele => {
-              console.log('ele:',ele)
-              console.log(' chartData[keyIndex].value:', chartData[keyIndex].value)
               chartData[keyIndex].value.push({
                 text: "",
                 value: ele[keyEle.key]