소스 검색

waterAnalysisSharingEnginePush water.js 李欣儒 commit at 2020-12-07

李欣儒 4 년 전
부모
커밋
eff958832f
1개의 변경된 파일164개의 추가작업 그리고 0개의 파일을 삭제
  1. 164 0
      waterAnalysisSharingEnginePush/externalJs/water.js

+ 164 - 0
waterAnalysisSharingEnginePush/externalJs/water.js

@@ -275,3 +275,167 @@ function getListData(queryParam = {}) {
                     var data = [];
                     for (var i = 1; i < hydraulic_pressure.length + 1; i++) {
                         data.push(i);
+                    }
+                    return data;
+                }();
+
+                // 1. 实例化对象
+                var myChart = echarts.init(document.querySelector(".divergence .chart"));
+                // 2.指定配置
+                var option = {
+
+                    color: [{
+                            colorStops: [{
+                                offset: 0,
+                                color: '#F9860C' // 0% 处的颜色
+                            }, {
+                                offset: 1,
+                                color: '#fff' // 100% 处的颜色
+                            }],
+                        },
+
+                        {
+                            colorStops: [{
+                                offset: 0,
+                                color: '#07E1F1' // 0% 处的颜色
+                            }, {
+                                offset: 1,
+                                color: '#0456CB' // 100% 处的颜色
+                            }],
+                        },
+                        {
+                            colorStops: [{
+                                offset: 0,
+                                color: '#11F90C' // 0% 处的颜色
+                            }, {
+                                offset: 1,
+                                color: '#3FC713' // 100% 处的颜色
+                            }],
+                        }
+
+                    ],
+                    tooltip: {
+                        trigger: "axis",
+                        textStyle: {
+                            align: 'left' //图例左对齐
+                        },
+                        backgroundColor: '#12DFE0',
+                        formatter: '{a0}: {c0}<br />{a1}: {c1}<br />{a2}: {c2}<br />时间:' + chooseTime + ''
+                    },
+                    legend: {
+                        // 如果series 对象有name 值,则 legend可以不用写data
+                        itemGap: 20,
+                        itemHeight: 2,
+                        itemWidth: 15,
+                        icon: 'rect',
+                        textStyle: {
+                            color: "#fff"
+                        },
+                        top: "bottom",
+                    },
+                    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: {
+                        // scale: true,
+                        // min: 'dataMin',
+                        type: "value",
+                        axisTick: {
+                            show: false // 去除刻度线
+                        },
+                        axisLabel: {
+                            show: false // 去除文本
+                        },
+                        axisLine: {
+                            show: false // 去除轴线
+                        },
+                        splitLine: {
+                            lineStyle: {
+                                color: "#012f4a" // 分割线颜色
+                            }
+                        }
+                    },
+                    series: [{
+                            symbol: "none",
+                            name: "方差",
+                            type: "line",
+                            data: a
+                        },
+                        {
+                            symbol: "none",
+                            name: "标准差",
+                            type: "line",
+                            data: b
+                        }, {
+                            symbol: "none",
+                            name: "平均值",
+                            type: "line",
+                            data: c
+                        }
+                    ]
+                };
+
+                myChart.setOption(option);
+                window.addEventListener("resize", function() {
+                    myChart.resize();
+                });
+
+
+            })();
+
+            // 渗漏隐患排查
+            (function() {
+
+                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 += `<p>${xIndex}、${conclusion[x]}</p>`
+                }
+                $('.hiddenCheck .summaryDetail').html(items);
+
+                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)