zy пре 1 година
родитељ
комит
7e77710f43

+ 34 - 37
wrdep-biz/src/main/java/com/jiayue/biz/service/impl/PdfServiceImpl.java

@@ -96,7 +96,7 @@ public class PdfServiceImpl extends ServiceImpl<WindTowerDataParentTableMapper,
         ArrayList<Map<String, Object>> statisticsWindTowerStatusDataFenTur = statisticsWindTowerStatusDataTur(windTowerCalculationDatas, equipmentAttributeList, windTowerInfos);
         map.put("statisticsWindTowerStatusDataFenTur", statisticsWindTowerStatusDataFenTur);
         //风切变
-        ArrayList<Object> statisticsWindTowerStatusDataShear = statisticsWindTowerStatusDataShear(prophaseAnemometryDataList, windTowerInfos);
+        Map<String, Object> statisticsWindTowerStatusDataShear = statisticsWindTowerStatusDataShear(prophaseAnemometryDataList, windTowerInfos);
         map.put("statisticsWindTowerStatusDataShear", statisticsWindTowerStatusDataShear);
 
 //
@@ -908,12 +908,12 @@ public class PdfServiceImpl extends ServiceImpl<WindTowerDataParentTableMapper,
                     probabilityPlot.suppressDisplay();
                     double K = probabilityPlot.weibullTwoParGamma();
                     double A = probabilityPlot.weibullTwoParSigma();
-
-
-                    map.put("K", BigDecimal.valueOf(K).setScale(2, RoundingMode.HALF_UP).doubleValue());
-                    map.put("A", BigDecimal.valueOf(A).setScale(2, RoundingMode.HALF_UP).doubleValue());
-                    BigDecimal wsAve = wsList.stream().reduce(BigDecimal.ZERO, BigDecimal::add).divide(BigDecimal.valueOf(wsList.size()), 2, RoundingMode.HALF_UP);
-                    map.put("wsAve", wsAve);
+//
+//
+//                    map.put("K", BigDecimal.valueOf(K).setScale(2, RoundingMode.HALF_UP).doubleValue());
+//                    map.put("A", BigDecimal.valueOf(A).setScale(2, RoundingMode.HALF_UP).doubleValue());
+//                    BigDecimal wsAve = wsList.stream().reduce(BigDecimal.ZERO, BigDecimal::add).divide(BigDecimal.valueOf(wsList.size()), 2, RoundingMode.HALF_UP);
+//                    map.put("wsAve", wsAve);
 
                     /*根据风速过滤出风速区间集合*/
                     for (BigDecimal ws : wsList) {
@@ -932,14 +932,13 @@ public class PdfServiceImpl extends ServiceImpl<WindTowerDataParentTableMapper,
                     /*威布尔*/
                     List<List<BigDecimal>> weibullList = new ArrayList<>();
                     wsMap.forEach((key, val) -> {
-
+                        Map<String, Object> freMap = new HashMap<>();
                         List<BigDecimal> list = new ArrayList<>();
                         List<BigDecimal> tempList = new ArrayList<>();
                         BigDecimal wsFrequency = new BigDecimal(val.size()).divide(new BigDecimal(wsList.size()), 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100));
                         list.add(key.setScale(0, RoundingMode.HALF_UP));
                         list.add(wsFrequency);
                         wsFreList.add(list);
-
                         /*区间威布尔累加求和求平均值*/
                         BigDecimal aveWs = val.stream().reduce(BigDecimal.ZERO, BigDecimal::add).divide(BigDecimal.valueOf(val.size()), 2, RoundingMode.HALF_UP);
                         BigDecimal weibull = CalculationUtil.getBigDecimal(e, aveWs.doubleValue(), K, A);
@@ -1003,53 +1002,51 @@ public class PdfServiceImpl extends ServiceImpl<WindTowerDataParentTableMapper,
      *
      * @return
      */
-    public ArrayList<Object> statisticsWindTowerStatusDataShear(List<ProphaseAnemometryData> prophaseAnemometryData, List<WindTowerInfo> windTowerInfos) {
+    public Map<String, Object> statisticsWindTowerStatusDataShear(List<ProphaseAnemometryData> prophaseAnemometryData, List<WindTowerInfo> windTowerInfos) {
+        Map<String, Object> map = new HashMap<>();
         ArrayList<Object> wsShearTableData = new ArrayList<>();
-        HashMap<String, Object> heightMap = new HashMap<>();
+//        HashMap<String, Object> heightMap = new HashMap<>();
         String[] heights = windTowerInfos.get(0).getHeights().split(",");
-        for (String maxHeight : heights) {
+        for (int i = heights.length - 1 ; i > 0; i--) {
+            String mixHeight = heights[i];
             HashMap<Object, Object> mainData = new HashMap<>();
-            if (maxHeight.contains("A")) {
+            if (mixHeight.contains("A")) {
                 continue;
             }
-            List<BigDecimal> maxHeightForWsList = prophaseAnemometryData.stream().filter(p -> p.getLayerHeight().equals(maxHeight)).map(p -> {
+            List<BigDecimal> minHeightForWsList = prophaseAnemometryData.stream().filter(p -> p.getLayerHeight().equals(mixHeight)).map(p -> {
                 return CalculationUtil.getBigDecimal(p.getWsAve());
             }).collect(Collectors.toList());
-            BigDecimal wsAveForMax = CalculationUtil.getAvgWind(maxHeightForWsList);
-            //筛选低层高
-            List<String> heightList = new ArrayList<>(Arrays.asList(heights)).stream().filter(s -> Integer.valueOf(CalculationUtil.getNumberFromString(maxHeight)) > Integer.valueOf(CalculationUtil.getNumberFromString(s))).collect(Collectors.toList());
-            //计算风切变
-            for (String minHeight : heightList) {
-                if (minHeight.contains("A")) {
+            BigDecimal wsAveForMax = CalculationUtil.getAvgWind(minHeightForWsList);
+            //筛选高层高
+            List<String> heightList = new ArrayList<>(Arrays.asList(heights)).stream().filter(s -> Integer.valueOf(CalculationUtil.getNumberFromString(mixHeight)) < Integer.valueOf(CalculationUtil.getNumberFromString(s))).collect(Collectors.toList());
+            for (String maxHeight : heightList) {
+                if (maxHeight.contains("A")) {
                     continue;
                 }
-                List<BigDecimal> minHeightForWsList = prophaseAnemometryData.stream().filter(p -> p.getLayerHeight().equals(minHeight)).map(p -> {
+                List<BigDecimal> maxHeightForWsList = prophaseAnemometryData.stream().filter(p -> p.getLayerHeight().equals(maxHeight)).map(p -> {
                     return CalculationUtil.getBigDecimal(p.getWsAve());
                 }).collect(Collectors.toList());
-                BigDecimal wsAveMin = CalculationUtil.getAvgWind(minHeightForWsList);
-                double z = new BigDecimal(CalculationUtil.getNumberFromString(maxHeight)).divide(new BigDecimal(CalculationUtil.getNumberFromString(minHeight)), 8, RoundingMode.HALF_UP).doubleValue();
+                BigDecimal wsAveMin = CalculationUtil.getAvgWind(maxHeightForWsList);
+                double z = new BigDecimal(CalculationUtil.getNumberFromString(maxHeight)).divide(new BigDecimal(CalculationUtil.getNumberFromString(mixHeight)), 8, RoundingMode.HALF_UP).doubleValue();
                 double z1 = Math.log10(z);
                 if (wsAveForMax.compareTo(BigDecimal.ZERO) > 0 && wsAveMin.compareTo(BigDecimal.ZERO) > 0 && z1 != 0) {
                     BigDecimal shear = Convert.toBigDecimal(Math.log10(Convert.toDouble(wsAveForMax.divide(wsAveMin, 8, RoundingMode.HALF_UP))))
                             .divide(BigDecimal.valueOf(z1), 2, RoundingMode.HALF_UP);
+                    mainData.put(maxHeight, shear);
 
-
-                    mainData.put(minHeight, shear);
-//                    System.out.println(" height = " + maxHeight + "====" + wsAveForMax + "====" + minHeight + "====" + wsAveMin + "======" + shear);
                 }
             }
-            mainData.put("height", maxHeight);
-
-
+            mainData.put("height", mixHeight);
             wsShearTableData.add(mainData);
 
         }
-        heightMap.put("headerData",Arrays.asList(heights));
-        wsShearTableData.add(heightMap);
-        return wsShearTableData;
+//        heightMap.put("headerData", Arrays.asList(heights));
+//        wsShearTableData.add(heightMap);
+        map.put("mainData",wsShearTableData);
+        map.put("headerData",Arrays.asList(heights));
+        return map;
     }
 
-
     /**
      * 一年玫瑰图
      *
@@ -1148,10 +1145,10 @@ public class PdfServiceImpl extends ServiceImpl<WindTowerDataParentTableMapper,
             // 累加保留两位小数
             BigDecimal proportionWd = BigDecimal.ZERO;
             if (!filterWdList.isEmpty()) {
-                proportionWd = BigDecimal.valueOf(filterWdList.size()).divide(BigDecimal.valueOf(wdList.size()), 2, RoundingMode.HALF_UP);
+                proportionWd = BigDecimal.valueOf(filterWdList.size()).multiply(new BigDecimal(100)).divide(BigDecimal.valueOf(wdList.size()), 2, RoundingMode.HALF_UP);
             }
 
-            wdMap.put(value.name(), proportionWd.multiply(new BigDecimal(100)));
+            wdMap.put(value.name(), proportionWd);
             list.add(wdMap);
         }
         return list;
@@ -1178,9 +1175,9 @@ public class PdfServiceImpl extends ServiceImpl<WindTowerDataParentTableMapper,
             // 累加保留两位小数
             BigDecimal proportionPower = BigDecimal.ZERO;
             if (sumPower.compareTo(BigDecimal.ZERO) > 0) {
-                proportionPower = sumPowerForWd.divide(sumPower, 2, RoundingMode.HALF_UP);
+                proportionPower = sumPowerForWd.multiply(new BigDecimal(100)).divide(sumPower, 2, RoundingMode.HALF_UP);
             }
-            powerMap.put(value.name(), proportionPower.multiply(new BigDecimal(100)));
+            powerMap.put(value.name(), proportionPower);
             list.add(powerMap);
         }
         return list;

+ 23 - 11
wrdep-ui/src/views/dataAnalysis/components/turbulence.vue

@@ -15,10 +15,10 @@
           :data="turTableData"
           border
           :header-row-style="{color: '#000'}"
-          style="width: 100%;border: 1px solid;font-weight: bold;color: #000">
+          style="width: 100%;border: 1px solid;font-weight: bold;color: #000;font-size: 20px">
           <el-table-column prop="height" align="center" label="高度"></el-table-column>
-          <el-table-column prop="turbulence" align="center" label="湍流强度"></el-table-column>
-          <el-table-column prop="turbulence15" align="center" label="15m/s湍流强度"></el-table-column>
+          <el-table-column prop="turAve" align="center" label="湍流强度"></el-table-column>
+          <el-table-column prop="turForFifteen" align="center" label="15m/s湍流强度"></el-table-column>
         </el-table>
 
     </div>
@@ -28,17 +28,29 @@
 <script>
 export default {
   name: "turbulence",
+  props: {pData: Array},
+  watch:{
+    pData: {
+      // immediate: true,
+      handler(value) {
+        if(value !== undefined || value !== null || value.length>0) {
+          console.log(value)
+          this.turTableData = value
+        }
+      }
+    }
+  },
   data(){
     return{
       /*湍流数据*/
       turTableData:[
-        {height:'120m',	turbulence:0.13,turbulence15:0.076},
-        {height:'100m',	turbulence:0.13,turbulence15:0.077},
-        {height:'80m',	turbulence:0.13,turbulence15:0.088},
-        {height:'70m',	turbulence:0.14,turbulence15:0.100},
-        {height:'50m',	turbulence:0.14,turbulence15:0.106},
-        {height:'30m',	turbulence:0.15,turbulence15:0.118},
-        {height:'10m',	turbulence:0.17,turbulence15:0.133},
+        // {height:'120m',	turbulence:0.13,turbulence15:0.076},
+        // {height:'100m',	turbulence:0.13,turbulence15:0.077},
+        // {height:'80m',	turbulence:0.13,turbulence15:0.088},
+        // {height:'70m',	turbulence:0.14,turbulence15:0.100},
+        // {height:'50m',	turbulence:0.14,turbulence15:0.106},
+        // {height:'30m',	turbulence:0.15,turbulence15:0.118},
+        // {height:'10m',	turbulence:0.17,turbulence15:0.133},
       ]
 
     }
@@ -68,6 +80,6 @@ export default {
 .turTableDiv /deep/ .el-table .el-table__header-wrapper th, .el-table .el-table__fixed-header-wrapper th {
   background-color: #ffffff;
   color: #000000;
-  font-size: 16px;
+  font-size: 20px;
 }
 </style>

+ 81 - 44
wrdep-ui/src/views/dataAnalysis/components/wdRose.vue

@@ -2,10 +2,10 @@
   <div class="wdRosePage">
     <div style="height: 2220px">
       <h3>2.3.5 主风向分析</h3>
-      <div><span class="text">{{ windTowerInfo.name }}测风设备实测数据风向和分布如下图所示。各层风向占比趋于一致,主导风向为{{ wdRoseInfo.wd }}方向。</span>
+      <div><span class="text">{{ windTowerInfo.name }}测风设备实测数据风向和分布如下图所示</span>
       </div>
-      <div class="wdRose">
-        <div v-for="(item,index) of wdRoseInfo.data" class="wdRoseBox">
+      <div class="wdRose" v-if="wdRoseInfo.length>0">
+        <div v-for="(item,index) of wdRoseInfo" class="wdRoseBox">
           <div :id="'wdItem'+index" style="width:100%;height: 250px;"/>
         </div>
       </div>
@@ -16,7 +16,7 @@
           border
           :header-row-style="{color: '#000'}"
           class="pdfTable">
-          <el-table-column prop="height" align="center" label="高度"></el-table-column>
+          <el-table-column prop="height" align="center" label="高度" width="65px"></el-table-column>
           <el-table-column prop="N" align="center" label="N"></el-table-column>
           <el-table-column prop="NNW" align="center" label="NNW"></el-table-column>
           <el-table-column prop="NW" align="center" label="NW"></el-table-column>
@@ -50,7 +50,7 @@
           border
           :header-row-style="{color: '#000'}"
           class="pdfTable">
-          <el-table-column prop="height" align="center" label="高度"></el-table-column>
+          <el-table-column prop="height" align="center" label="高度" width="65px"></el-table-column>
           <el-table-column prop="N" align="center" label="N"></el-table-column>
           <el-table-column prop="NNW" align="center" label="NNW"></el-table-column>
           <el-table-column prop="NW" align="center" label="NW"></el-table-column>
@@ -76,64 +76,94 @@
 <script>
 export default {
   name: "wdRose",
-  props: {info: Object},
+  props: {info: Object,pData: Array},
   watch: {
     info: {
       immediate: true,
       handler(value) {
         this.windTowerInfo = value
       }
+    },
+    pData: {
+      immediate: true,
+      handler(value) {
+        // console.log(value)
+        if(value !== undefined || value !== null || value.length>0){
+          let wdRoseInfo = []
+          let powerData = []
+          for(let item of value){
+            wdRoseInfo.push({
+              height:item.height,
+              data:item.wd
+            })
+            powerData.push({
+              height:item.height,
+              data:item.power
+            })
+          }
+          this.wdRoseInfo = wdRoseInfo
+          this.powerData = powerData
+          // console.log(this.wdRoseInfo,this.powerData)
+          let _self = this
+          this.$nextTick(()=>{
+            _self.initWdRose()
+          })
+
+        }
+
+
+      }
     }
   },
   data() {
     return {
       windTowerInfo: {},
       /*风向玫瑰图*/
-      wdRoseInfo: {
-        wd: '西南',// 主风向
-        data: [//玫瑰图数据
-          {
-            height: '10',
-            data: [{"N": 0}, {"NNE": 0.23}, {"NE": 0.93}, {"ENE": 0}, {"E": 0}, {"ESE": 0}, {"SE": 0}, {"SSE": 0.12}, {"S": 6.6}, {"SSW": 9.84}, {"SW": 18.87}, {"WSW": 21.06}, {"W": 6.25}, {"WNW": 3.59}, {"NW": 5.09}, {"NNW": 5.9}]
-          }, {
-            height: '50',
-            data: [{"N": 0}, {"NNE": 0.23}, {"NE": 0.93}, {"ENE": 0}, {"E": 0}, {"ESE": 0}, {"SE": 0}, {"SSE": 0.12}, {"S": 6.6}, {"SSW": 9.84}, {"SW": 18.87}, {"WSW": 21.06}, {"W": 6.25}, {"WNW": 3.59}, {"NW": 5.09}, {"NNW": 5.9}]
-          }, {
-            height: '80',
-            data: [{"N": 0}, {"NNE": 0.23}, {"NE": 0.93}, {"ENE": 0}, {"E": 0}, {"ESE": 0}, {"SE": 0}, {"SSE": 0.12}, {"S": 6.6}, {"SSW": 9.84}, {"SW": 18.87}, {"WSW": 21.06}, {"W": 6.25}, {"WNW": 3.59}, {"NW": 5.09}, {"NNW": 5.9}]
-          }, {
-            height: '100',
-            data: [{"N": 0}, {"NNE": 0.23}, {"NE": 0.93}, {"ENE": 0}, {"E": 0}, {"ESE": 0}, {"SE": 0}, {"SSE": 0.12}, {"S": 6.6}, {"SSW": 9.84}, {"SW": 18.87}, {"WSW": 21.06}, {"W": 6.25}, {"WNW": 3.59}, {"NW": 5.09}, {"NNW": 5.9}]
-          },
-        ]
-      },
+      wdRoseInfo: [
+        // wd: '西南',// 主风向
+       //玫瑰图数据
+       //    {
+       //      height: '10',
+       //      data: [{"N": 0}, {"NNE": 0.23}, {"NE": 0.93}, {"ENE": 0}, {"E": 0}, {"ESE": 0}, {"SE": 0}, {"SSE": 0.12}, {"S": 6.6}, {"SSW": 9.84}, {"SW": 18.87}, {"WSW": 21.06}, {"W": 6.25}, {"WNW": 3.59}, {"NW": 5.09}, {"NNW": 5.9}]
+       //    },
+       //  {
+       //      height: '50',
+       //      data: [{"N": 0}, {"NNE": 0.23}, {"NE": 0.93}, {"ENE": 0}, {"E": 0}, {"ESE": 0}, {"SE": 0}, {"SSE": 0.12}, {"S": 6.6}, {"SSW": 9.84}, {"SW": 18.87}, {"WSW": 21.06}, {"W": 6.25}, {"WNW": 3.59}, {"NW": 5.09}, {"NNW": 5.9}]
+       //    }, {
+       //      height: '80',
+       //      data: [{"N": 0}, {"NNE": 0.23}, {"NE": 0.93}, {"ENE": 0}, {"E": 0}, {"ESE": 0}, {"SE": 0}, {"SSE": 0.12}, {"S": 6.6}, {"SSW": 9.84}, {"SW": 18.87}, {"WSW": 21.06}, {"W": 6.25}, {"WNW": 3.59}, {"NW": 5.09}, {"NNW": 5.9}]
+       //    }, {
+       //      height: '100',
+       //      data: [{"N": 0}, {"NNE": 0.23}, {"NE": 0.93}, {"ENE": 0}, {"E": 0}, {"ESE": 0}, {"SE": 0}, {"SSE": 0.12}, {"S": 6.6}, {"SSW": 9.84}, {"SW": 18.87}, {"WSW": 21.06}, {"W": 6.25}, {"WNW": 3.59}, {"NW": 5.09}, {"NNW": 5.9}]
+       //    }
+      ],
       powerData: [//玫瑰图数据
-        {
-          height: '10',
-          data: [{"N": 0}, {"NNE": 0.23}, {"NE": 0.93}, {"ENE": 0}, {"E": 0}, {"ESE": 0}, {"SE": 0}, {"SSE": 0.12}, {"S": 6.6}, {"SSW": 9.84}, {"SW": 18.87}, {"WSW": 21.06}, {"W": 6.25}, {"WNW": 3.59}, {"NW": 5.09}, {"NNW": 5.9}]
-        }, {
-          height: '50',
-          data: [{"N": 0}, {"NNE": 0.23}, {"NE": 0.93}, {"ENE": 0}, {"E": 0}, {"ESE": 0}, {"SE": 0}, {"SSE": 0.12}, {"S": 6.6}, {"SSW": 9.84}, {"SW": 18.87}, {"WSW": 21.06}, {"W": 6.25}, {"WNW": 3.59}, {"NW": 5.09}, {"NNW": 5.9}]
-        }, {
-          height: '80',
-          data: [{"N": 0}, {"NNE": 0.23}, {"NE": 0.93}, {"ENE": 0}, {"E": 0}, {"ESE": 0}, {"SE": 0}, {"SSE": 0.12}, {"S": 6.6}, {"SSW": 9.84}, {"SW": 18.87}, {"WSW": 21.06}, {"W": 6.25}, {"WNW": 3.59}, {"NW": 5.09}, {"NNW": 5.9}]
-        }, {
-          height: '100',
-          data: [{"N": 0}, {"NNE": 0.23}, {"NE": 0.93}, {"ENE": 0}, {"E": 0}, {"ESE": 0}, {"SE": 0}, {"SSE": 0.12}, {"S": 6.6}, {"SSW": 9.84}, {"SW": 18.87}, {"WSW": 21.06}, {"W": 6.25}, {"WNW": 3.59}, {"NW": 5.09}, {"NNW": 5.9}]
-        },
+        // {
+        //   height: '10',
+        //   data: [{"N": 0}, {"NNE": 0.23}, {"NE": 0.93}, {"ENE": 0}, {"E": 0}, {"ESE": 0}, {"SE": 0}, {"SSE": 0.12}, {"S": 6.6}, {"SSW": 9.84}, {"SW": 18.87}, {"WSW": 21.06}, {"W": 6.25}, {"WNW": 3.59}, {"NW": 5.09}, {"NNW": 5.9}]
+        // }, {
+        //   height: '50',
+        //   data: [{"N": 0}, {"NNE": 0.23}, {"NE": 0.93}, {"ENE": 0}, {"E": 0}, {"ESE": 0}, {"SE": 0}, {"SSE": 0.12}, {"S": 6.6}, {"SSW": 9.84}, {"SW": 18.87}, {"WSW": 21.06}, {"W": 6.25}, {"WNW": 3.59}, {"NW": 5.09}, {"NNW": 5.9}]
+        // }, {
+        //   height: '80',
+        //   data: [{"N": 0}, {"NNE": 0.23}, {"NE": 0.93}, {"ENE": 0}, {"E": 0}, {"ESE": 0}, {"SE": 0}, {"SSE": 0.12}, {"S": 6.6}, {"SSW": 9.84}, {"SW": 18.87}, {"WSW": 21.06}, {"W": 6.25}, {"WNW": 3.59}, {"NW": 5.09}, {"NNW": 5.9}]
+        // }, {
+        //   height: '100',
+        //   data: [{"N": 0}, {"NNE": 0.23}, {"NE": 0.93}, {"ENE": 0}, {"E": 0}, {"ESE": 0}, {"SE": 0}, {"SSE": 0.12}, {"S": 6.6}, {"SSW": 9.84}, {"SW": 18.87}, {"WSW": 21.06}, {"W": 6.25}, {"WNW": 3.59}, {"NW": 5.09}, {"NNW": 5.9}]
+        // },
       ],
       wdTable:[],
       powerTable:[]
     }
   },
   mounted() {
-    this.initWdRose()
+
   },
   methods: {
     initWdRose() {
       let wdTable = []
       let powerTable = []
-      this.wdRoseInfo.data.forEach((item, index) => {
+      this.wdRoseInfo.forEach((item, index) => {
         let data = item.data
         let power = []
         if (data != null) {
@@ -144,7 +174,7 @@ export default {
         temp.height = item.height
         for (let value of data) {
           for (let key in value) {
-            temp[key] = value[key]
+            temp[key] = value[key]+ '%'
           }
         }
         wdTable.push(temp)
@@ -161,7 +191,7 @@ export default {
         temp.height = item.height
         for (let value of data) {
           for (let key in value) {
-            temp[key] = value[key]
+            temp[key] = value[key] + '%'
           }
         }
        powerTable.push(temp)
@@ -182,7 +212,7 @@ export default {
           shape: 'circle',
           center: ['52%', '55%'],
           nameGap: 5,
-          indicator: [{name: 'N'}, {name: 'NNW'}, {name: 'NW'}, {name: 'WNW'}, {name: 'W'}, {name: 'WSW'}, {name: 'SW'},
+          indicator: [{name: 'N', max: 100}, {name: 'NNW'}, {name: 'NW'}, {name: 'WNW'}, {name: 'W'}, {name: 'WSW'}, {name: 'SW'},
             {name: 'SSW'}, {name: 'S'}, {name: 'SSE'}, {name: 'SE'}, {name: 'ESE'}, {name: 'E'}, {name: 'ENE'}, {name: 'NE'}, {name: 'NNE'}],
           splitArea: {
             areaStyle: {
@@ -203,7 +233,7 @@ export default {
           data: [{value: data,}],
         }],
       };
-      myCharts.setOption(option)
+      myCharts.setOption(option,true)
       window.addEventListener('resize', () => {
         if (myCharts) {
           myCharts.resize()
@@ -252,7 +282,7 @@ export default {
           // coordinateSystem: 'polar'
         }],
       };
-      myCharts.setOption(option)
+      myCharts.setOption(option,true)
       // myCharts.dispatchAction({
       //   type: 'showTip',
       //   seriesIndex: 0,//第几条series
@@ -315,4 +345,11 @@ export default {
   color: #000000;
   font-size: 20px;
 }
+.pdfTableDiv /deep/ .el-table .cell{
+  padding-left: 0px;
+  padding-right: 0px;
+}
+.pdfTableDiv /deep/ .el-table--border .el-table__cell:first-child .cell {
+  padding-left: 0px;
+}
 </style>

+ 69 - 44
wrdep-ui/src/views/dataAnalysis/components/windShear.vue

@@ -16,9 +16,14 @@
       :data="wshearTableData.mainData"
       border
       :header-row-style="{color: '#000'}"
-      style="width: 100%;border: 1px solid;font-weight: bold;color: #000">
-      <el-table-column prop="height" align="center" label="高度"></el-table-column>
-      <el-table-column v-for="item in wshearTableData.headerData" :prop="item" align="center" :label="item"></el-table-column>
+      style="width: 100%;border: 1px solid;font-weight: bold;color: #000;font-size: 20px">
+      <el-table-column prop="height" align="center" label="高度" width="65px"></el-table-column>
+      <el-table-column v-for="item in wshearTableData.headerData" :prop="item" align="center" :label="item">
+        <template slot-scope="scope">
+          <span v-if="scope.row[item] !== undefined">{{scope.row[item]}}</span>
+          <span v-else> -- </span>
+        </template>
+      </el-table-column>
     </el-table>
   </div>
 </div>
@@ -27,50 +32,63 @@
 <script>
 export default {
   name: "windShear",
+  props: {pData: Object},
+  watch: {
+    pData: {
+      immediate: true,
+      handler(value) {
+        if (value !== undefined || value !== null) {
+          // console.log(value.mainData[0]["50"])
+          this.wshearTableData = value
+
+        }
+      }
+    }
+  },
   data(){
     return{
       /*各个层高对比*/
       wshearTableData:{// 表头
-        headerData:['100','90','80', '70','60','50','40','30','20','10'],// 从高到低
-        mainData:[// 主体数据
-          {
-            height:10,
-            '100':0.1781,
-            '90':0.1756,
-            '80':0.173,
-            '70':0.1704,
-            '60':0.1670,
-            '50':0.1633,
-            '40':0.1517,
-            '30':0.1373,
-            '20':0.1124,
-            '10':'-'
-          },{
-            height:20,
-            '100':0.2064,
-            '90':0.2047,
-            '80':0.2034,
-            '70':0.2026,
-            '60':0.2014,
-            '50':0.2018,
-            '40':0.1910,
-            '30':0.1798,
-            '20':'-',
-            '10':'-'
-          },{
-            height:30,
-            '100':0.2153,
-            '90':0.2139,
-            '80':0.2131,
-            '70':0.2135,
-            '60':0.2140,
-            '50':0.2192,
-            '40':0.2066,
-            '30':'-',
-            '20':'-',
-            '10':'-'
-          },
-        ]
+        // headerData:['100','90','80', '70','60','50','40','30','20','10'],// 从高到低
+        // mainData:[// 主体数据
+        //   {
+        //     height:10,
+        //     '100':0.1781,
+        //     '90':0.1756,
+        //     '80':0.173,
+        //     '70':0.1704,
+        //     '60':0.1670,
+        //     '50':0.1633,
+        //     '40':0.1517,
+        //     '30':0.1373,
+        //     '20':0.1124,
+        //     '10':'-'
+        //   },{
+        //     height:20,
+        //     '100':0.2064,
+        //     '90':0.2047,
+        //     '80':0.2034,
+        //     '70':0.2026,
+        //     '60':0.2014,
+        //     '50':0.2018,
+        //     '40':0.1910,
+        //     '30':0.1798,
+        //     '20':'-',
+        //     '10':'-'
+        //   },{
+        //     height:30,
+        //     '100':0.2153,
+        //     '90':0.2139,
+        //     '80':0.2131,
+        //     '70':0.2135,
+        //     '60':0.2140,
+        //     '50':0.2192,
+        //     '40':0.2066,
+        //     '30':'-',
+        //     '20':'-',
+        //     '10':'-'
+        //   },
+        // ]
       },
     }
   }
@@ -98,6 +116,13 @@ export default {
 .wshearTableDiv /deep/ .el-table .el-table__header-wrapper th, .el-table .el-table__fixed-header-wrapper th {
   background-color: #ffffff;
   color: #000000;
-  font-size: 16px;
+  font-size: 20px;
+}
+.wshearTableDiv /deep/ .el-table--border .el-table__cell:first-child .cell {
+  padding-left: 0px;
+}
+.wshearTableDiv /deep/ .el-table .cell{
+  padding-left: 0px;
+  padding-right: 0px;
 }
 </style>

+ 37 - 51
wrdep-ui/src/views/dataAnalysis/components/wsAndWpd.vue

@@ -13,10 +13,14 @@
             border
             :header-row-style="{color: '#000'}"
             class="pdfTable">
-            <el-table-column prop="parameter" align="center" label="参数"></el-table-column>
-            <el-table-column prop="avg" align="center" label="平均值"></el-table-column>
-            <el-table-column prop="max" align="center" label="最大值"></el-table-column>
-            <el-table-column prop="min" align="center" label="最小值"></el-table-column>
+            <el-table-column prop="height" align="center" label="参数">
+              <template slot-scope="scope">
+                {{scope.row.height}}米风速(m/s)
+              </template>
+            </el-table-column>
+            <el-table-column prop="wsAve" align="center" label="平均值"></el-table-column>
+            <el-table-column prop="wsMax" align="center" label="最大值"></el-table-column>
+            <el-table-column prop="wsMin" align="center" label="最小值"></el-table-column>
           </el-table>
         </div>
       </div>
@@ -32,7 +36,7 @@
             :header-row-style="{color: '#000'}"
             class="pdfTable">
             <el-table-column prop="height" align="center" label="高度"></el-table-column>
-            <el-table-column v-for="item in wsMonthTableData.headerData" :prop="item.prop" align="center"
+            <el-table-column v-for="item in wsMonthTableData.timeTable" :prop="item.value" align="center"
                              :label="item.label"></el-table-column>
           </el-table>
         </div>
@@ -49,8 +53,12 @@
             border
             :header-row-style="{color: '#000'}"
             class="pdfTable">
-            <el-table-column prop="parameter" align="center" label="参数"></el-table-column>
-            <el-table-column prop="avg" align="center" label="平均值"></el-table-column>
+            <el-table-column prop="height" align="center" label="参数">
+              <template slot-scope="scope">
+                {{scope.row.height}}米风功率密度
+              </template>
+            </el-table-column>
+            <el-table-column prop="wpdAve" align="center" label="平均值"></el-table-column>
           </el-table>
         </div>
       </div>
@@ -61,13 +69,23 @@
 <script>
 export default {
   name: "wsAndWpd",
-  props: {info: Object},
+  props: {info: Object,pData: Object},
   watch: {
     info: {
-      immediate: true,
+      // immediate: true,
       handler(value) {
         this.windTowerInfo = value
       }
+    },
+    pData: {
+      // immediate: true,
+      handler(value) {
+        // console.log(value)
+        this.wsTableData = value.statisticsDataFen
+        this.wsMonthTableData = value.statisticsWindTowerStatusDataFenMonth
+        this.wpdTableData = value.statisticsWindTowerStatusDataFenWpd
+        // console.log(this.wsMonthTableData)
+      }
     }
   },
   data() {
@@ -75,52 +93,20 @@ export default {
       windTowerInfo: {},
       /*平均风速*/
       wsTableData: [
-        {parameter: '10米风速(m/s)', avg: '4.32', max: '19.89', min: '0.21'},
-        {parameter: '20米风速(m/s)', avg: '4.67', max: '22.04', min: '0.2'},
-        {parameter: '30米风速(m/s)', avg: '5.03', max: '23.43', min: '0.25'},
-        {parameter: '40米风速(m/s)', avg: '5.33', max: '24.46', min: '0.01'}
+        // {parameter: '10米风速(m/s)', avg: '4.32', max: '19.89', min: '0.21'},
+        // {parameter: '20米风速(m/s)', avg: '4.67', max: '22.04', min: '0.2'},
+        // {parameter: '30米风速(m/s)', avg: '5.03', max: '23.43', min: '0.25'},
+        // {parameter: '40米风速(m/s)', avg: '5.33', max: '24.46', min: '0.01'}
       ],
       /*逐月风速*/
-      wsMonthTableData: {
-        headerData: [// 表头
-          {prop: '202205', label: '2022.5'},
-          {prop: '202206', label: '2022.6'},
-          {prop: '202207', label: '2022.7'},
-          {prop: '202208', label: '2022.8'},
-          {prop: '202209', label: '2022.9'},
-          {prop: '202210', label: '2022.10'},
-          {prop: '202211', label: '2022.11'},
-          {prop: '202212', label: '2022.12'},
-          {prop: '202301', label: '2023.1'},
-          {prop: '202302', label: '2023.2'},
-          {prop: '202303', label: '2023.3'},
-          {prop: '202304', label: '2023.4'},
-        ],
-        mainData: [// 主体数据
-          {
-            'height': '10m',
-            '202205': '4.84',
-            '202206': '4.91',
-            '202207': '4.66',
-            '202208': '4.66',
-            '202209': '4.66',
-            '202210': '4.66',
-            '202211': '4.66',
-            '202212': '4.66',
-            '202301': '4.66',
-            '202302': '4.66',
-            '202303': '4.66',
-            '202304': '4.66'
-          }
-        ]
-      },
+      wsMonthTableData: {},
       /*风功率密度列表*/
       wpdTableData: [
-        {parameter: '10米风功率密度', avg: '124.24'},
-        {parameter: '20米风功率密度', avg: '158.14'},
-        {parameter: '30米风功率密度', avg: '192.02'},
-        {parameter: '40米风功率密度', avg: '223.43'},
-        {parameter: '50米风功率密度', avg: '251.92'},
+        // {parameter: '10米风功率密度', wpdAve: '124.24'},
+        // {parameter: '20米风功率密度', avg: '158.14'},
+        // {parameter: '30米风功率密度', avg: '192.02'},
+        // {parameter: '40米风功率密度', avg: '223.43'},
+        // {parameter: '50米风功率密度', avg: '251.92'},
       ]
     }
   },

+ 74 - 585
wrdep-ui/src/views/dataAnalysis/components/wsFrequency.vue

@@ -13,7 +13,7 @@
         :data="frequencyData"
         border
         :header-row-style="{color: '#000'}"
-        style="width: 100%;border: 1px solid;font-weight: bold;color: #000">
+        style="width: 100%;border: 1px solid;font-weight: bold;color: #000;font-size: 20px">
         <el-table-column v-for="(item, index) in transTitle" :label="item" :key="index" align="center">
           <template slot-scope="scope">
             {{ scope.row[index] }}
@@ -27,616 +27,94 @@
 <script>
 export default {
   name: "wsFrequency",
+  props: {pData: Array},
+  watch: {
+    pData: {
+      immediate: true,
+      handler(value) {
+        if (value !== undefined || value !== null || value.length > 0) {
+          // console.log(value)
+          this.weibullData = value
+          let _self = this
+          this.$nextTick(() => {
+            _self.init()
+          })
+        }
+      }
+    }
+  },
   data() {
     return {
       transTitle: [],
-      tableHeader: ["0-0.5(m/s)",
-        "0.5-1.5(m/s)",
-        "1.5-2.5(m/s)",
-        "2.5-3.5(m/s)",
-        "3.5-4.5(m/s)",
-        "4.5-5.5(m/s)",
-        "5.5-6.5(m/s)",
-        "6.5-7.5(m/s)",
-        "7.5-8.5(m/s)",
-        "8.5-9.5(m/s)",
-        "9.5-10.5(m/s)",
-        "10.5-11.5(m/s)",
-        "11.5-12.5(m/s)",
-        "12.5-13.5(m/s)",
-        "13.5-14.5(m/s)",
-        "14.5-15.5(m/s)",
-        "15.5-16.5(m/s)",
-        "16.5-17.5(m/s)",
-        "17.5-18.5(m/s)",
-        "18.5-19.5(m/s)",
-        "19.5-20.5(m/s)",
-        "20.5-21.5(m/s)",
-        "22.5-23.5(m/s)",
-        "23.5-24.5(m/s)",
-        "24.5-25.5(m/s)",
-        ">25.5(m/s)"],
+      tableHeader: ["0-0.5",
+        "0.5-1.5",
+        "1.5-2.5",
+        "2.5-3.5",
+        "3.5-4.5",
+        "4.5-5.5",
+        "5.5-6.5",
+        "6.5-7.5",
+        "7.5-8.5",
+        "8.5-9.5",
+        "9.5-10.5",
+        "10.5-11.5",
+        "11.5-12.5",
+        "12.5-13.5",
+        "13.5-14.5",
+        "14.5-15.5",
+        "15.5-16.5",
+        "16.5-17.5",
+        "17.5-18.5",
+        "18.5-19.5",
+        "19.5-20.5",
+        "20.5-21.5",
+        "22.5-23.5",
+        "23.5-24.5",
+        "24.5-25.5",
+        ">25.5"],
       frequencyData: [],//频率表格
-      weibullData: [{
-        height: 120,
-        weibull: [
-          {
-            "Weibull": 0.0041,
-            "ws": 2
-          },
-          {
-            "Weibull": 0.0083,
-            "ws": 3
-          },
-          {
-            "Weibull": 0.0249,
-            "ws": 4
-          },
-          {
-            "Weibull": 0.0477,
-            "ws": 5
-          },
-          {
-            "Weibull": 0.0759,
-            "ws": 6
-          },
-          {
-            "Weibull": 0.1163,
-            "ws": 7
-          },
-          {
-            "Weibull": 0.1493,
-            "ws": 8
-          },
-          {
-            "Weibull": 0.1697,
-            "ws": 9
-          },
-          {
-            "Weibull": 0.1625,
-            "ws": 10
-          },
-          {
-            "Weibull": 0.1287,
-            "ws": 11
-          },
-          {
-            "Weibull": 0.0833,
-            "ws": 12
-          },
-          {
-            "Weibull": 0.04,
-            "ws": 13
-          },
-          {
-            "Weibull": 0.0146,
-            "ws": 14
-          },
-          {
-            "Weibull": 0.0057,
-            "ws": 15
-          },
-          {
-            "Weibull": 0.0002,
-            "ws": 16
-          },
-          {
-            "Weibull": 0,
-            "ws": 17
-          }
-        ],
-        frequency: [
-          {
-            "ws": 2,
-            "cont": 0.09
-          },
-          {
-            "ws": 3,
-            "cont": 0.78
-          },
-          {
-            "ws": 4,
-            "cont": 0.7
-          },
-          {
-            "ws": 5,
-            "cont": 4.34
-          },
-          {
-            "ws": 6,
-            "cont": 10.43
-          },
-          {
-            "ws": 7,
-            "cont": 11.03
-          },
-          {
-            "ws": 8,
-            "cont": 14.77
-          },
-          {
-            "ws": 9,
-            "cont": 16.77
-          },
-          {
-            "ws": 10,
-            "cont": 15.9
-          },
-          {
-            "ws": 11,
-            "cont": 12.25
-          },
-          {
-            "ws": 12,
-            "cont": 5.82
-          },
-          {
-            "ws": 13,
-            "cont": 4.78
-          },
-          {
-            "ws": 14,
-            "cont": 2.09
-          },
-          {
-            "ws": 15,
-            "cont": 0.09
-          },
-          {
-            "ws": 16,
-            "cont": 0.09
-          },
-          {
-            "ws": 17,
-            "cont": 0.09
-          }
-        ]
-      }, {
-        height: 100,
-        weibull: [
-          {
-            "Weibull": 0.0041,
-            "ws": 2
-          },
-          {
-            "Weibull": 0.0083,
-            "ws": 3
-          },
-          {
-            "Weibull": 0.0249,
-            "ws": 4
-          },
-          {
-            "Weibull": 0.0477,
-            "ws": 5
-          },
-          {
-            "Weibull": 0.0759,
-            "ws": 6
-          },
-          {
-            "Weibull": 0.1163,
-            "ws": 7
-          },
-          {
-            "Weibull": 0.1493,
-            "ws": 8
-          },
-          {
-            "Weibull": 0.1697,
-            "ws": 9
-          },
-          {
-            "Weibull": 0.1625,
-            "ws": 10
-          },
-          {
-            "Weibull": 0.1287,
-            "ws": 11
-          },
-          {
-            "Weibull": 0.0833,
-            "ws": 12
-          },
-          {
-            "Weibull": 0.04,
-            "ws": 13
-          },
-          {
-            "Weibull": 0.0146,
-            "ws": 14
-          },
-          {
-            "Weibull": 0.0057,
-            "ws": 15
-          },
-          {
-            "Weibull": 0.0002,
-            "ws": 16
-          },
-          {
-            "Weibull": 0,
-            "ws": 17
-          }
-        ],
-        frequency: [
-          {
-            "ws": 2,
-            "cont": 0.09
-          },
-          {
-            "ws": 3,
-            "cont": 0.78
-          },
-          {
-            "ws": 4,
-            "cont": 0.7
-          },
-          {
-            "ws": 5,
-            "cont": 4.34
-          },
-          {
-            "ws": 6,
-            "cont": 10.43
-          },
-          {
-            "ws": 7,
-            "cont": 11.03
-          },
-          {
-            "ws": 8,
-            "cont": 14.77
-          },
-          {
-            "ws": 9,
-            "cont": 16.77
-          },
-          {
-            "ws": 10,
-            "cont": 15.9
-          },
-          {
-            "ws": 11,
-            "cont": 12.25
-          },
-          {
-            "ws": 12,
-            "cont": 5.82
-          },
-          {
-            "ws": 13,
-            "cont": 4.78
-          },
-          {
-            "ws": 14,
-            "cont": 2.09
-          },
-          {
-            "ws": 15,
-            "cont": 0.09
-          },
-          {
-            "ws": 16,
-            "cont": 0.09
-          },
-          {
-            "ws": 17,
-            "cont": 0.09
-          }
-        ]
-      },
-        {
-          height: 80,
-          weibull: [
-            {
-              "Weibull": 0.0041,
-              "ws": 2
-            },
-            {
-              "Weibull": 0.0083,
-              "ws": 3
-            },
-            {
-              "Weibull": 0.0249,
-              "ws": 4
-            },
-            {
-              "Weibull": 0.0477,
-              "ws": 5
-            },
-            {
-              "Weibull": 0.0759,
-              "ws": 6
-            },
-            {
-              "Weibull": 0.1163,
-              "ws": 7
-            },
-            {
-              "Weibull": 0.1493,
-              "ws": 8
-            },
-            {
-              "Weibull": 0.1697,
-              "ws": 9
-            },
-            {
-              "Weibull": 0.1625,
-              "ws": 10
-            },
-            {
-              "Weibull": 0.1287,
-              "ws": 11
-            },
-            {
-              "Weibull": 0.0833,
-              "ws": 12
-            },
-            {
-              "Weibull": 0.04,
-              "ws": 13
-            },
-            {
-              "Weibull": 0.0146,
-              "ws": 14
-            },
-            {
-              "Weibull": 0.0057,
-              "ws": 15
-            },
-            {
-              "Weibull": 0.0002,
-              "ws": 16
-            },
-            {
-              "Weibull": 0,
-              "ws": 17
-            }
-          ],
-          frequency: [
-            {
-              "ws": 2,
-              "cont": 0.09
-            },
-            {
-              "ws": 3,
-              "cont": 0.78
-            },
-            {
-              "ws": 4,
-              "cont": 0.7
-            },
-            {
-              "ws": 5,
-              "cont": 4.34
-            },
-            {
-              "ws": 6,
-              "cont": 10.43
-            },
-            {
-              "ws": 7,
-              "cont": 11.03
-            },
-            {
-              "ws": 8,
-              "cont": 14.77
-            },
-            {
-              "ws": 9,
-              "cont": 16.77
-            },
-            {
-              "ws": 10,
-              "cont": 15.9
-            },
-            {
-              "ws": 11,
-              "cont": 12.25
-            },
-            {
-              "ws": 12,
-              "cont": 5.82
-            },
-            {
-              "ws": 13,
-              "cont": 4.78
-            },
-            {
-              "ws": 14,
-              "cont": 2.09
-            },
-            {
-              "ws": 15,
-              "cont": 0.09
-            },
-            {
-              "ws": 16,
-              "cont": 0.09
-            },
-            {
-              "ws": 17,
-              "cont": 0.09
-            }
-          ]
-        },
-        {
-          height: 50,
-          weibull: [
-            {
-              "Weibull": 0.0041,
-              "ws": 2
-            },
-            {
-              "Weibull": 0.0083,
-              "ws": 3
-            },
-            {
-              "Weibull": 0.0249,
-              "ws": 4
-            },
-            {
-              "Weibull": 0.0477,
-              "ws": 5
-            },
-            {
-              "Weibull": 0.0759,
-              "ws": 6
-            },
-            {
-              "Weibull": 0.1163,
-              "ws": 7
-            },
-            {
-              "Weibull": 0.1493,
-              "ws": 8
-            },
-            {
-              "Weibull": 0.1697,
-              "ws": 9
-            },
-            {
-              "Weibull": 0.1625,
-              "ws": 10
-            },
-            {
-              "Weibull": 0.1287,
-              "ws": 11
-            },
-            {
-              "Weibull": 0.0833,
-              "ws": 12
-            },
-            {
-              "Weibull": 0.04,
-              "ws": 13
-            },
-            {
-              "Weibull": 0.0146,
-              "ws": 14
-            },
-            {
-              "Weibull": 0.0057,
-              "ws": 15
-            },
-            {
-              "Weibull": 0.0002,
-              "ws": 16
-            },
-            {
-              "Weibull": 0,
-              "ws": 17
-            }
-          ],
-          frequency: [
-            {
-              "ws": 2,
-              "cont": 0.09
-            },
-            {
-              "ws": 3,
-              "cont": 0.78
-            },
-            {
-              "ws": 4,
-              "cont": 0.7
-            },
-            {
-              "ws": 5,
-              "cont": 4.34
-            },
-            {
-              "ws": 6,
-              "cont": 10.43
-            },
-            {
-              "ws": 7,
-              "cont": 11.03
-            },
-            {
-              "ws": 8,
-              "cont": 14.77
-            },
-            {
-              "ws": 9,
-              "cont": 16.77
-            },
-            {
-              "ws": 10,
-              "cont": 15.9
-            },
-            {
-              "ws": 11,
-              "cont": 12.25
-            },
-            {
-              "ws": 12,
-              "cont": 5.82
-            },
-            {
-              "ws": 13,
-              "cont": 4.78
-            },
-            {
-              "ws": 14,
-              "cont": 2.09
-            },
-            {
-              "ws": 15,
-              "cont": 0.09
-            },
-            {
-              "ws": 16,
-              "cont": 0.09
-            },
-            {
-              "ws": 17,
-              "cont": 0.09
-            }
-          ]
-        },]
+      weibullData: []
     }
   },
   mounted() {
-    this.init()
+
   },
   methods: {
     init() {
-      let transTitle = [""]
+      let transTitle = ["风速区间(m/s)"]
       let frequencyData = []
       this.weibullData.forEach((item, index) => {
         let tempObject = {}
         // tempObject.height = item.height
         transTitle.push(item.height)
         let height = item.height
-        let data = item.weibull
-        let wsFreData = item.frequency
-        let parameter = []
-        let wsFrequery = []
-        for (let i = 0; i < data.length; i++) {
-          parameter.push([data[i].ws, data[i].Weibull])
-        }
-        for (let j = 0; j < wsFreData.length; j++) {
-          tempObject[wsFreData[j].ws] = wsFreData[j].cont
-          wsFrequery.push([wsFreData[j].ws, wsFreData[j].cont])
+        let parameter = item.weibull
+        let wsFrequery = item.wsFrequency
+        for (let j = 0; j < wsFrequery.length; j++) {
+          tempObject[wsFrequery[j][0]] = wsFrequery[j][1]
         }
         frequencyData.push(tempObject)
         this.drawFrequeryChart(`weibull${index}`, height, parameter, wsFrequery)
       })
       this.transTitle = transTitle
       // 数组按矩阵思路, 变成转置矩阵
-      let matrixData = frequencyData.map((row) => {
+      let findex = 0
+      let length = 0
+      let matrixData = frequencyData.map((row,index) => {
         let arr = []
         for (let key in row) {
-          arr.push(row[key])
+          arr[key] = row[key]
+          // arr.push(row[key])
+        }
+        if(arr.length >= length){
+          length = arr.length
+          findex = index
         }
         return arr
       })
       // 加入标题拼接最终的数据
-      this.frequencyData = matrixData[0].map((col, i) => {
+      this.frequencyData = matrixData[findex].map((col, i) => {
         return [this.tableHeader[i], ...matrixData.map((row) => {
-          console.log(row)
           return row[i] === undefined ? 0 : row[i]
         })]
       })
@@ -754,10 +232,11 @@ export default {
 </script>
 
 <style scoped>
-.wsFrequencyPage{
+.wsFrequencyPage {
   font-size: 20px;
   height: 2220px;
 }
+
 .wsFrequencyPage h1, .wsFrequencyPage h2, .wsFrequencyPage h3 {
   font-weight: bold;
 }
@@ -772,19 +251,29 @@ export default {
   width: 25%;
   padding-top: 10px;
 }
-.freTableDiv{
+
+.freTableDiv {
   margin: 0 auto;
   margin-top: 10px;
   display: flex;
   flex-direction: column;
 }
+
 .freTableDiv /deep/ .el-table--border .el-table__cell {
   border-right: 1px solid #000000;
   border-bottom: 1px solid #000;
 }
+
 .freTableDiv /deep/ .el-table .el-table__header-wrapper th, .el-table .el-table__fixed-header-wrapper th {
   background-color: #ffffff;
   color: #000000;
-  font-size: 16px;
+  font-size: 20px;
+}
+.freTableDiv /deep/ .el-table--border .el-table__cell:first-child .cell {
+  padding-left: 0px;
+}
+.freTableDiv /deep/ .el-table .cell{
+  padding-left: 0px;
+  padding-right: 0px;
 }
 </style>

+ 69 - 34
wrdep-ui/src/views/dataAnalysis/index.vue

@@ -44,7 +44,7 @@
       <!--        </el-select>-->
       <!--      </div>-->
       <el-button class="seachBtu" type="primary" plain icon="el-icon-thumb" :loading="loading" size="mini"
-                 @click="seach()">生成报告模板
+                 @click="getPdfData()">生成报告模板
       </el-button>
       <el-button class="seachBtu" type="primary" plain icon="el-icon-download" :loading="downLoading" size="mini"
                  @click="getPdf()">导出
@@ -165,7 +165,7 @@
                   :header-row-style="{color: '#000'}"
                  class="pdfTable" style="border: 1px solid #000">
                   <el-table-column prop="parameter" align="center" label="参数"></el-table-column>
-                  <el-table-column prop="avg" align="center" label="平均值"></el-table-column>
+                  <el-table-column prop="ave" align="center" label="平均值"></el-table-column>
                   <el-table-column prop="max" align="center" label="最大值"></el-table-column>
                   <el-table-column prop="min" align="center" label="最小值"></el-table-column>
                 </el-table>
@@ -173,11 +173,11 @@
             </div>
           </div>
         </div>
-        <ws-and-wd :info="windTowerInfo"/>
-        <wd-rose :info="windTowerInfo"/>
-        <ws-frequency/>
-        <turbulence style="height: 2220px"/>
-        <wind-shear style="height: 2220px"/>
+        <ws-and-wd :info="windTowerInfo" :pData="wsAndwd"/>
+        <wd-rose :info="windTowerInfo" :pData="roseData"/>
+        <ws-frequency :p-data="weibull"/>
+        <turbulence style="height: 2220px" :p-data="turbulenceData"/>
+        <wind-shear style="height: 2220px" :pData="shearData"/>
       </div>
 
     </div>
@@ -193,7 +193,7 @@ import windShear from './components/windShear'
 import wsFrequency from './components/wsFrequency'
 import turbulence from './components/turbulence'
 import {listEquipmentIdAndDataTime} from "@/api/biz/dataQuery/windTowerStatusInfo";
-import {getDataTimeForEveryTower} from "@/api/biz/dataQuery/pdf";
+import {getDataTimeForEveryTower,generatePDF} from "@/api/biz/dataQuery/pdf";
 import defaultOption from "@/api/biz/dataQuery/defaultOption";
 import WsFrequency from "@/views/dataAnalysis/components/wsFrequency";
 import htmlToPdf from "@/utils/htmlToPdf";
@@ -208,6 +208,7 @@ export default {
       downLoading: false,
       text: '****  生成pdf报告流程:  1.选择测风塔和层高    2.生成报告模板    3.导出  ****',
       cftId: '',
+      pdfData:[],
       intervalID: null,
       startDateAndEndDate: [],
       dataTime: [],
@@ -237,17 +238,7 @@ export default {
       /*pdf数据*/
       info: {equipmentId: '声雷达6172'},
       /*测风塔基本信息*/
-      windTowerInfo: {
-        name: 'xxx声雷达',
-        equipmentNo: '202101008',
-        installationTime: '2022.5.14',
-        startTime: '2022.5.14',
-        endTime: '2023.04.25',
-        longitude: '1',
-        latitude: '1',
-        wsHeight: '1',
-        wdHeight: '1',
-      },
+      windTowerInfo: {},
       tableData: [
         {name: "测风设备命名", column: 0},
         {name: "仪器编号", column: 0},
@@ -257,19 +248,14 @@ export default {
         {name: "通道信息", column: '风向高度(m)'},
       ],
       /*数据完整性*/
-      dataIntegrity: {
-        time: '2022年5月13号',
-        startTime: '5.14号',
-        integrityRate: '99',
-        totalNum: '',
-      },
+      dataIntegrity: {},
       /*环境数据*/
-      envTableData: [
-        {parameter: '温度', avg: '3.83', max: '36.93', min: '-34.08'},
-        {parameter: '湿度', avg: '48.40', max: '99.00', min: '5.00'},
-        {parameter: '大气压力', avg: '902.18', max: '994.30', min: '878.20'},
-        {parameter: '空气密度', avg: '1.14', max: '1.34', min: '1.00'}
-      ]
+      envTableData: [],
+      wsAndwd:{},
+      roseData:[],
+      weibull:[],
+      turbulenceData:[],
+      shearData: {}
     }
   },
   destroyed() {
@@ -306,6 +292,54 @@ export default {
         console.log('获取所有测风塔的开始结束时间异常:' + err)
       })
     },
+    /*pdf查询*/
+    getPdfData(){
+      this.loading = true
+      this.downLoading = true
+      generatePDF({
+        equipmentId: this.cftId,
+        startDay: new Date(this.dataTime[0]).getTime(),
+        endDay: new Date(this.dataTime[1]).getTime()
+      }).then(res => {
+        this.pdfData = res.data
+        let windTowerInfo = this.pdfData.windTowerInfo.windTowerInfo
+        /*基本信息*/
+        this.windTowerInfo = {
+          name: windTowerInfo.name,
+          equipmentNo: windTowerInfo.equipmentNo,
+          installationTime: windTowerInfo.installationTime,
+          startTime: this.pdfData.windTowerInfo.startTime,
+          endTime: this.pdfData.windTowerInfo.endTime,
+          longitude: windTowerInfo.longitude,
+          latitude: windTowerInfo.latitude,
+          wsHeight: windTowerInfo.heights,
+          wdHeight: windTowerInfo.wdHeights
+        }
+        /*完整性*/
+        this.dataIntegrity= {
+          time: windTowerInfo.installationTime,
+          startTime: this.pdfData.windTowerInfo.startTime,
+          integrityRate: this.pdfData.windTowerInfo.percentage,
+          totalNum: this.pdfData.windTowerInfo.allCount
+        }
+        /*环境数据*/
+        this.envTableData= this.pdfData.statisticsData.environment
+        this.wsAndwd = {
+          statisticsDataFen:this.pdfData.statisticsDataFen,
+          statisticsWindTowerStatusDataFenMonth:this.pdfData.statisticsWindTowerStatusDataFenMonth,
+          statisticsWindTowerStatusDataFenWpd:this.pdfData.statisticsWindTowerStatusDataFenWpd
+        }
+        this.roseData = this.pdfData.roseChart
+        this.weibull = this.pdfData.weibull
+        this.turbulenceData = this.pdfData.statisticsWindTowerStatusDataFenTur
+        this.shearData =  this.pdfData.statisticsWindTowerStatusDataShear
+        this.loading = false
+        this.downLoading = false
+      }).catch(err => {
+        this.loading = false
+        this.downLoading = false
+      })
+    },
     changeCft() {
 
     },
@@ -327,9 +361,6 @@ export default {
         this.dataTime[1] = timeEnd //最后一天23:59:59的时间戳
       }
     },
-    seach() {
-
-    },
     async getPdf() {
       this.downLoading = true
       await htmlToPdf.downloadPDF(document.querySelector('#dataAnalysisPdf'), this.windTowerInfo.name + '测风设备数据分析报告')
@@ -469,6 +500,8 @@ export default {
 
 .descriptionsDiv /deep/ .el-descriptions-item__content {
   font-size: 20px;
+  font-weight: bold;
+  color: #000;
 }
 
 .rowDiv {
@@ -488,6 +521,8 @@ export default {
 .rowDiv /deep/ .el-row {
   text-align: center;
   font-size: 20px;
+  font-weight: bold;
+  color: #000;
   line-height: 50px;
   /*border: 1px solid #000;*/
   border-top: 1px solid #000;