|
@@ -806,3 +806,115 @@ function getListData(queryParam = {}) {
|
|
|
|
|
|
});
|
|
|
})();
|
|
|
+
|
|
|
+ // 折线图定制 (数据波动关联)
|
|
|
+ (function() {
|
|
|
+
|
|
|
+ let data_fluctuation = result.RESULT[0].data_fluctuation;
|
|
|
+ console.log('data_fluctuation')
|
|
|
+ console.log(data_fluctuation)
|
|
|
+
|
|
|
+ // 结论数据渲染
|
|
|
+ var items = '';
|
|
|
+ var conclusion = data_fluctuation.conclusion
|
|
|
+ for (x in conclusion) {
|
|
|
+ xIndex = x.substr(x.length - 1, 1);
|
|
|
+ items += `<p>${xIndex}、${conclusion[x]}</p>`
|
|
|
+ }
|
|
|
+ $('.data_fluctuation .summaryDetail').html(items);
|
|
|
+
|
|
|
+ let position = [];
|
|
|
+ let before_fluctuation = [];
|
|
|
+ let after_fluctuation = [];
|
|
|
+ let volatility_data = data_fluctuation.volatility_data;
|
|
|
+ volatility_data.forEach(function(item, index) {
|
|
|
+
|
|
|
+ //楼层
|
|
|
+ position.push(item.position)
|
|
|
+
|
|
|
+ //开始值
|
|
|
+ before_fluctuation.push(item.before_fluctuation)
|
|
|
+
|
|
|
+ //结束值
|
|
|
+ after_fluctuation.push(item.after_fluctuation)
|
|
|
+ });
|
|
|
+ // 1. 实例化对象
|
|
|
+ var myChart = echarts.init(document.querySelector(".data_fluctuation .chart"));
|
|
|
+ var xData = position;
|
|
|
+
|
|
|
+ // 2.指定配置
|
|
|
+ var option = {
|
|
|
+ backgroundColor: 'transparent',
|
|
|
+ color: ['rgba(0,150,255,.5)', 'rgba(255,156,0,.5)'],
|
|
|
+ tooltip: {
|
|
|
+ backgroundColor: '#12DFE0',
|
|
|
+ //提示框组件
|
|
|
+ trigger: 'axis',
|
|
|
+ formatter: '{a0}: {c0}<span>Mpa</span><br />{a1}: {c1}<span>Mpa</span><br />时间:' + chooseTime + '',
|
|
|
+ axisPointer: {
|
|
|
+ type: 'shadow',
|
|
|
+ },
|
|
|
+
|
|
|
+ textStyle: {
|
|
|
+ fontStyle: 'normal',
|
|
|
+ fontFamily: '微软雅黑',
|
|
|
+ align: 'left' //图例左对齐
|
|
|
+ },
|
|
|
+ },
|
|
|
+ grid: {
|
|
|
+ left: '0',
|
|
|
+ right: '0',
|
|
|
+ bottom: '40',
|
|
|
+ top: '0',
|
|
|
+ containLabel: true,
|
|
|
+ },
|
|
|
+
|
|
|
+ //添加横线滚动条
|
|
|
+ dataZoom: {
|
|
|
+ start: 0, //默认为0
|
|
|
+ end: 100 - 1500 / 8, //默认为100
|
|
|
+ type: 'slider',
|
|
|
+ show: xData.length > 5 ? true : false,
|
|
|
+ xAxisIndex: [0],
|
|
|
+ handleSize: 0, //滑动条的 左右2个滑动条的大小
|
|
|
+ height: 4, //组件高度
|
|
|
+ left: 20, //左边的距离
|
|
|
+ right: 20, //右边的距离
|
|
|
+ bottom: 20, //右边的距离
|
|
|
+ handleColor: '#CBBCDB', //h滑动图标的颜色
|
|
|
+ handleStyle: {
|
|
|
+ borderColor: "#CBBCDB",
|
|
|
+ borderWidth: "1",
|
|
|
+ shadowBlur: 2,
|
|
|
+ background: "#CBBCDB",
|
|
|
+ shadowColor: "#CBBCDB",
|
|
|
+ },
|
|
|
+ textStyle: {
|
|
|
+ color: "#fff"
|
|
|
+ },
|
|
|
+
|
|
|
+ backgroundColor: 'rgba(37, 46, 100, 0.45)', //两边未选中的滑动条区域的颜色
|
|
|
+ showDataShadow: false, //是否显示数据阴影 默认auto
|
|
|
+ // showDetail: false, //即拖拽时候是否显示详细数值信息 默认true
|
|
|
+ filterMode: 'filter',
|
|
|
+ },
|
|
|
+
|
|
|
+ xAxis: [{
|
|
|
+ type: 'category',
|
|
|
+ // boundaryGap: true,//坐标轴两边留白
|
|
|
+ data: xData,
|
|
|
+ axisLabel: {
|
|
|
+ interval: 0,
|
|
|
+ // rotate: 340,
|
|
|
+ // formatter: function(val) {
|
|
|
+ // return val.split("").join("\n");
|
|
|
+ // }, //横轴信息文字竖直显示
|
|
|
+ textStyle: {
|
|
|
+ color: '#AADDFF',
|
|
|
+ fontStyle: 'normal',
|
|
|
+ fontFamily: '微软雅黑',
|
|
|
+ fontSize: 12,
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
+ axisTick: {
|