Forráskód Böngészése

waterAnalysisDataVisualization water.js 李欣儒 commit at 2020-12-23

李欣儒 4 éve
szülő
commit
cb0705d280
1 módosított fájl, 130 hozzáadás és 0 törlés
  1. 130 0
      waterAnalysisDataVisualization/externalJs/water.js

+ 130 - 0
waterAnalysisDataVisualization/externalJs/water.js

@@ -1126,3 +1126,133 @@ function getListData(queryParam = {}) {
                     },
                     grid: {
                         top: "0%",
+                        left: "1%",
+                        right: "1%",
+                        bottom: "15%",
+                        show: true, // 显示边框
+                        borderWidth: '0', //去除边框
+                        containLabel: true // 包含刻度文字在内
+                    },
+                    xAxis: {
+                        type: "category",
+                        boundaryGap: false,
+                        data: xData,
+                        axisTick: {
+                            show: false // 去除刻度线
+                        },
+                        axisLabel: {
+                            color: "#AADDFF" // 文本颜色
+                        },
+                        axisLine: {
+                            lineStyle: {
+                                color: 'rgba(255,255,255,.3)'
+                            }
+                        },
+                        splitNumber: 8,
+                        splitLine: {
+                            show: false
+                        },
+                        splitArea: {
+                            show: true,
+                            areaStyle: {
+                                color: ["rgba(250,250,250,0.05)", "rgba(250,250,250,0.0)"]
+                            }
+                        }
+                    },
+
+                    yAxis: {
+                        splitNumber: 8,
+                        type: "value",
+                        axisTick: {
+                            show: false // 去除刻度线
+                        },
+                        axisLabel: {
+                            show: false // 去除文本
+                        },
+                        axisLine: {
+                            show: false // 去除轴线
+                        },
+                        splitLine: {
+                            lineStyle: {
+                                color: "#aaa", // 分割线颜色
+                                opacity: '0.1'
+                            }
+                        }
+                    },
+                    series: [{
+                            symbol: "none",
+                            name: "方差",
+                            type: "line",
+                            data: sortData[0].data[0]
+                        },
+                        {
+                            symbol: "none",
+                            name: "标准差",
+                            type: "line",
+                            data: sortData[0].data[1]
+                        }, {
+                            symbol: "none",
+                            name: "平均值",
+                            type: "line",
+                            data: sortData[0].data[2]
+                        }
+                    ]
+                };
+
+                myChart.setOption(option);
+
+                //echarts赋值到src
+                var img1 = document.getElementById('divergenceChart1_img');
+                setTimeout(function() {
+                    img1.src = myChart.getDataURL();
+                }, 1000)
+
+            })();
+
+            // 渗漏隐患排查
+            let leakage_investigation = result.RESULT[0].leakage_investigation;
+
+            // 结论数据渲染
+            var items = '';
+            var conclusion = leakage_investigation.conclusion
+            for (x in conclusion) {
+                xIndex = x.substr(x.length - 1, 1);
+                items += `<div>${xIndex}、${conclusion[x]}</div>`
+            }
+            $('.exportBox .hiddenCheck .summaryDetail').html(items);
+
+            // 渗漏隐患排查
+            (function() {
+
+                let abnormal_pressure = [];
+                let location_description = [];
+                let start_pressure = [];
+                let end_pressure = [];
+                let leakage_data = leakage_investigation.leakage_data;
+                leakage_data.forEach(function(item, index) {
+
+                    //异常值
+                    abnormal_pressure.push(item.abnormal_pressure)
+
+                    //楼层
+                    location_description.push(item.location_description)
+
+                    //开始值
+                    start_pressure.push(item.start_pressure)
+
+                    //结束值
+                    end_pressure.push(item.end_pressure)
+                });
+
+                var xData = location_description;
+
+                // 基于准备好的dom,初始化echarts实例
+                var myChart = echarts.init(document.querySelector("#hiddenCheckChart1"));
+
+                var option = {
+                    backgroundColor: 'transparent',
+                    color: ['rgba(0,150,255,.5)', 'rgba(255,156,0,.5)'],
+                    tooltip: {
+                        //提示框组件
+                        trigger: 'axis',
+                        formatter: function(params) {