From 6b9c1caacc70f678a1cde1e3fc8308b7d6d5d3cd Mon Sep 17 00:00:00 2001
From: wangzhibo <wangzhibo@shsening.com>
Date: 星期三, 06 十月 2021 22:31:45 +0800
Subject: [PATCH] 查询无结果的提示
---
widgetsTS/widget_detail/view.js | 44 +++++++++++++++++++++++++++++++++-----------
1 files changed, 33 insertions(+), 11 deletions(-)
diff --git a/widgetsTS/widget_detail/view.js b/widgetsTS/widget_detail/view.js
index c7ac133..16bb18e 100644
--- a/widgetsTS/widget_detail/view.js
+++ b/widgetsTS/widget_detail/view.js
@@ -41,10 +41,12 @@
tmp_index++;
}
}
+ }else{
+ haoutil.msg("鏃犳煡璇㈣褰曪紝璇锋洿鎹㈡煡璇㈡潯浠讹紒");
}
},
error: function (request, textStatus) {
-
+ haoutil.msg("鏌ヨ閿欒锛岃鑱旂郴绠$悊鍛橈紒锛侊紒")
}
});
}
@@ -75,7 +77,10 @@
$('#echart').removeAttr('_echarts_instance_');
}
var backend_url = params.nodejs_url_predix + "dataapi/Bdata?bid=get_" + params.layerid + "_history&datatype=" + params.datatype + "&siteid=" + params.siteid + "&datatime=" + params.datatime + "&count=10";
- var legendData = all_layer_legends[params.layerid];
+ // all 1006xx layer has the same legend 锛侊紒
+ var layerid = params.layerid+"";
+
+ var legendData = all_layer_legends[layerid.substring(0,4)];
var legendData_selected = {};
legendData.forEach(element => {
if (element==params.selected_qindex.toUpperCase()){
@@ -147,13 +152,11 @@
title: {
text: tableData[0]["name"],
textStyle: {
- color: '#fff', //棰滆壊
+ color: '#87CEFA', //棰滆壊
},
top: '20px',
x: 'center'
},
-
-
legend: {
// orient 璁剧疆甯冨眬鏂瑰紡锛岄粯璁ゆ按骞冲竷灞�锛屽彲閫夊�硷細'horizontal'锛堟按骞筹級 娄 'vertical'锛堝瀭鐩达級
orient: 'horizontal',
@@ -162,7 +165,7 @@
// y 璁剧疆鍨傜洿瀹夋斁浣嶇疆锛岄粯璁ゅ叏鍥鹃《绔紝鍙�夊�硷細'top' 娄 'bottom' 娄 'center' 娄 {number}锛坹鍧愭爣锛屽崟浣峱x锛�
y: 'top',
textStyle: { //鍥句緥鏂囧瓧鐨勬牱寮�
- color: '#fff',
+ color: '#87CEFA',
},
data: legendData,
selected:legendData_selected,
@@ -182,19 +185,33 @@
tooltip: {
trigger: 'axis'
},
+
+ toolbox:{
+ feature: {
+ saveAsImage: { type:'jpeg'},
+ dataView: {},
+ magicType: {
+ type: ['line', 'bar'],
+ option: {
+ // 绫诲瀷鍒囨崲鏃讹紝涓嬭堪閰嶇疆椤瑰皢琚玬erge鍒板搴旂被鍨嬬殑鍥捐〃 series 涓�
+ line: { smooth: true },
+ bar: { label: { show: true } }
+ }
+ },
+ }
+ },
xAxis: {
name: '鏃堕棿',
type: 'category',
axisLine: {
lineStyle: {
// 璁剧疆x杞撮鑹�
- color: '#912CEE'
+ color: '#87CEFA'
}
},
// 璁剧疆X杞存暟鎹棆杞�炬枩
axisLabel: {
- rotate: 60, // 鏃嬭浆瑙掑害
- color: '#fff', //鍧愭爣鐨勫瓧浣撻鑹�
+ color: '#87CEFA', //鍧愭爣鐨勫瓧浣撻鑹�
interval: 0 //璁剧疆X杞存暟鎹棿闅斿嚑涓樉绀轰竴涓紝涓�0琛ㄧず閮芥樉绀�
},
// boundaryGap鍊间负false鐨勬椂鍊欙紝鎶樼嚎绗竴涓偣鍦▂杞翠笂
@@ -217,7 +234,7 @@
}
},
},{
- name: 'CO(渭g/m鲁)',
+ name: 'CO(mg/m鲁)',
type: 'value',
axisLine: {
lineStyle: {
@@ -233,10 +250,15 @@
};
myCharts = echarts.init(document.getElementById('echart'));
myCharts.setOption(options, true);
+ window.onresize = function(){
+ myCharts.resize();
+ }
+ }else{
+ haoutil.msg("鏃犳煡璇㈣褰曪紝璇锋洿鎹㈡煡璇㈡潯浠讹紒");
}
},
error: function (request, textStatus) {
-
+ haoutil.msg("鏌ヨ閿欒锛岃鑱旂郴绠$悊鍛橈紒锛侊紒")
}
});
}
--
Gitblit v1.9.1