Bladeren bron

修改温度风力折线图

vera_min 2 jaren geleden
bovenliggende
commit
a792c7c018
2 gewijzigde bestanden met toevoegingen van 24 en 13 verwijderingen
  1. 12 5
      package-lock.json
  2. 12 8
      src/views/heating/monitor/weather.vue

+ 12 - 5
package-lock.json

@@ -597,11 +597,6 @@
         "fastq": "^1.6.0"
       }
     },
-    "@popperjs/core": {
-      "version": "npm:@sxzz/popperjs-es@2.11.7",
-      "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
-      "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
-    },
     "@types/d3-timer": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-2.0.1.tgz",
@@ -1376,6 +1371,13 @@
         "lodash-unified": "^1.0.2",
         "memoize-one": "^6.0.0",
         "normalize-wheel-es": "^1.2.0"
+      },
+      "dependencies": {
+        "@popperjs/core": {
+          "version": "npm:@sxzz/popperjs-es@2.11.7",
+          "resolved": "https://registry.npmjs.org/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
+          "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
+        }
       }
     },
     "element-resize-detector": {
@@ -3337,6 +3339,11 @@
         "vue": "^3.0.0"
       },
       "dependencies": {
+        "@popperjs/core": {
+          "version": "2.11.6",
+          "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz",
+          "integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw=="
+        },
         "async-validator": {
           "version": "3.5.2",
           "resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-3.5.2.tgz",

+ 12 - 8
src/views/heating/monitor/weather.vue

@@ -154,19 +154,20 @@ export default defineComponent({
           Info.forEach((i: any) => {
             state.xAxisWind.push(i.time);
             state.temWind.push(i.value);
-            state.foreCastInfoWind.push('-');
+            // state.foreCastInfoWind.push('-');
           })
         }
         if (AvgInfo && AvgInfo.length) {
           AvgInfo.forEach((i: any) => {
             state.averageTemWind.push(i.value)
-            state.foreCastAvgInfoWind.push('-');
+            // state.foreCastAvgInfoWind.push('-');
           })
         }
         if([2, 3].indexOf(state.windpowerType) > -1) {
+          // 周数据、月数据
           ForeCastInfo.forEach((i: any) => {
-            state.xAxisWind.push(i.time);
-            state.temWind.push('-');
+            // state.xAxisWind.push(i.time);
+            // state.temWind.push('-');
             state.foreCastInfoWind.push(i.value);
           })
           ForeCastAvgInfo.forEach((i: any) => {
@@ -192,25 +193,28 @@ export default defineComponent({
           Info.forEach((i: any) => {
             state.xAxis.push(i.time);
             state.tem.push(i.value);
-            state.foreCastInfoTem.push('-');
+            // state.foreCastInfoTem.push('-');
           })
         }
         if (AvgInfo && AvgInfo.length) {
           AvgInfo.forEach((i: any) => {
             state.averageTem.push(i.value)
-            state.foreCastAvgInfoTem.push('-');
+            // state.foreCastAvgInfoTem.push('-');
           })
         }
+        
         if([2, 3].indexOf(state.temperatureType) > -1) {
+          // 周数据、月数据
           ForeCastInfo.forEach((i: any) => {
-            state.xAxis.push(i.time);
-            state.tem.push('-');
+            // state.xAxis.push(i.time);
+            // state.tem.push('-');
             state.foreCastInfoTem.push(i.value);
           })
           ForeCastAvgInfo.forEach((i: any) => {
             state.foreCastAvgInfoTem.push(i.value);
           })
         }
+        console.log(state.xAxis)
         nextTick(() => {
           initTemLineChart();
         });