2 Commits fc39936151 ... 05efa0b8e8

Autore SHA1 Messaggio Data
  sunxiao 05efa0b8e8 feat: 修改预测取值,最后一位是null的原因 1 mese fa
  sunxiao 35abc9b8d9 feat: 修改预测数值截取 1 mese fa
2 ha cambiato i file con 18 aggiunte e 5 eliminazioni
  1. 2 1
      .env.development
  2. 16 4
      src/views/business/comparison/index.vue

+ 2 - 1
.env.development

@@ -5,7 +5,8 @@ VITE_APP_TITLE = LibraAI智能体运营平台
 VITE_APP_ENV = 'development'
 
 # 管理系统/开发环境
-VITE_APP_BASE_API =  http://10.0.0.28:8080/
+# VITE_APP_BASE_API =  http://10.0.0.28:8080/
+VITE_APP_BASE_API = 'http://192.168.9.54:8080/'
 
 VITE_APP_BASE_TEST = http://10.0.0.28:8080/
 VITE_APP_BASE_PROD = http://192.168.9.54:8080/

+ 16 - 4
src/views/business/comparison/index.vue

@@ -248,10 +248,18 @@ export default {
       }
       
       const data = await getEchartData({ category: this.activeItem.value, timeBegin, timeEnd });
-  
-      const reusltData = data.hs.data.splice(data.real.data.length - 1, data.hs.data.length - data.real.data.length);
-      const reusltTime = data.hs.time.splice(data.real.time.length - 1, data.hs.time.length - data.real.time.length);
+      
+      Object.keys(data).forEach(key => {
+        const len = data[key].data.length;
+        console.log( data[key].data[len - 1] );
+        if ( !data[key].data[len - 1] ) {
+          data[key].data.pop()
+        }
+      })
 
+      const reusltData = data.hs.data.splice(data.real.data.length, data.hs.data.length - data.real.data.length);
+      // const reusltTime = data.hs.time.splice(data.real.time.length, data.hs.time.length - data.real.time.length);
+      // console.log( reusltData, reusltTime );
       let xAxisData = [];
       // const realOneList = [];
       // const realTwoList = [];
@@ -282,7 +290,7 @@ export default {
       //   yyForecastThreeList.push(yyForecastThree);
       // })
     
-      xAxisData = [...data.yy.time, ...reusltTime];
+      xAxisData = [...data.yy.time];
 
       const echartData = [
         { name: 'TFT', val: [...data.hs.data, ...reusltData] },
@@ -365,6 +373,10 @@ export default {
           nh3: 'NH₃',
           cod: 'COD',
           ss: 'SS',
+          qyxsy1: '#1缺氧硝酸盐',
+          qyxsy2: '#2缺氧硝酸盐',
+          qynh31: '#1缺氧氨氮',
+          qynh32: '#2缺氧氨氮'
         }
         this.comparisonList = response.rows.map(item => ({ ...item, category: whiteList[item.category] }));
         this.total = response.total;