Explorar o código

efAnalysisdataVisualization eleFire.js 韩正义 commit at 2020-12-25

韩正义 %!s(int64=4) %!d(string=hai) anos
pai
achega
43ff57042d
Modificáronse 1 ficheiros con 199 adicións e 0 borrados
  1. 199 0
      efAnalysisdataVisualization/externalJs/eleFire.js

+ 199 - 0
efAnalysisdataVisualization/externalJs/eleFire.js

@@ -788,3 +788,202 @@ function getListData(queryParam = {}) {
                 // 2.指定配置
                 var option = {
 
+                    color: ["#05EEE7", "#9999FF", "#FE92B3"], // 通过这个color修改三条线的颜色
+                    tooltip: {
+                        trigger: "axis",
+                        textStyle: {
+                            align: 'left' //图例左对齐
+                        },
+                        backgroundColor: '#12DFE0',
+                        // formatter: '{a0}: {c0}°C<br />{a1}: {c1}°C<br />{a2}: {c2}°C<br />时间:' + chooseTime + ''
+                        formatter: function(params) {
+                            var res = params[0].seriesName + ':' + params[0].value + '°C<br />' + params[1].seriesName + ':' + params[1].value + '°C<br />' + params[2].seriesName + ':' + params[2].value + '°C<br />时间:' + data_time[params[2].dataIndex];
+                            return res;
+                        },
+
+
+                    },
+                    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: {
+                            show: false // 去除轴线
+                        }
+                    },
+
+                    yAxis: {
+                        type: "value",
+                        axisTick: {
+                            show: false // 去除刻度线
+                        },
+                        axisLabel: {
+                            show: false // 去除文本
+                        },
+                        axisLine: {
+                            show: false // 去除轴线
+                        },
+                        splitLine: {
+                            lineStyle: {
+                                color: "#012f4a" // 分割线颜色
+                            }
+                        }
+                    },
+                    series: [{
+                            symbol: "none",
+                            name: "线缆产生的温度",
+                            type: "line",
+                            smooth: true, // true 可以让我们的折线显示带有弧度
+                            areaStyle: {
+                                normal: {
+                                    color: new echarts.graphic.LinearGradient(
+                                        0,
+                                        0,
+                                        0,
+                                        1, [{
+                                                offset: 0,
+                                                color: "rgba(5,238,231,.6)"
+                                            },
+                                            {
+                                                offset: 0.8,
+                                                color: "rgba(5,238,231, 0.4)"
+                                            }
+                                        ],
+                                        false
+                                    ),
+                                }
+                            },
+
+                            data: sortData[0].data[0]
+                        },
+                        {
+                            symbol: "none",
+                            name: "环境温度",
+                            type: "line",
+                            smooth: true,
+                            areaStyle: {
+                                normal: {
+                                    color: new echarts.graphic.LinearGradient(
+                                        0,
+                                        0,
+                                        0,
+                                        1, [{
+                                                offset: 0,
+                                                color: "rgba(153,153,255,.6)"
+                                            },
+                                            {
+                                                offset: 0.8,
+                                                color: "rgba(153,153,255, 0.4)"
+                                            }
+                                        ],
+                                        false
+                                    ),
+                                }
+                            },
+
+                            data: sortData[0].data[1]
+                        },
+                        {
+                            symbol: "none",
+                            name: "线缆温度",
+                            type: "line",
+                            smooth: true,
+                            areaStyle: {
+                                normal: {
+                                    color: new echarts.graphic.LinearGradient(
+                                        0,
+                                        0,
+                                        0,
+                                        1, [{
+                                                offset: 0,
+                                                color: "rgba(255,147,180,.6)"
+                                            },
+                                            {
+                                                offset: 0.8,
+                                                color: "rgba(255,147,180, 0.4)"
+                                            }
+                                        ],
+                                        false
+                                    ),
+                                }
+                            },
+
+                            data: sortData[0].data[2]
+                        }
+                    ]
+                };
+
+                myChart.setOption(option);
+                window.addEventListener("resize", function() {
+                    myChart.resize();
+                });
+
+
+            })();
+
+            /* 
+                 主页面数据对接 end
+            */
+
+
+            /* 
+                 导出数据对接 start
+            */
+
+
+            //项目情况
+            var project_situation = result.RESULT[0].project_situation;
+            var items = '';
+            items = `<tr>
+                    <td>单位名称</td>
+                    <td colspan="5">${project_situation.company_name}</td>
+                </tr>
+                <tr>
+                    <td>进场日期</td>
+                    <td>${project_situation.entry_date} </td>
+                    <td>完工日期</td>
+                    <td>${project_situation.completion_date}</td>
+                    <td>验收日期</td>
+                    <td>${project_situation.acceptance_date}</td>
+                </tr>`
+            $('#project_situation').html(items);
+
+            //设备清单
+            var equipment_list = result.RESULT[0].equipment_list;
+            var items2 = '';
+            if (equipment_list) {
+                equipment_list.forEach(function(item, key) {
+                    items2 += `<tr>
+                                <td>${item.device_name}</td>  
+                                <td>${item.device_info}</td>
+                                <td>${item.device_code}</td>
+                                <td>${item.remarks}</td>
+                            </tr>`;
+                })