rabin 7 年 前
コミット
9264333798
1 ファイル変更2 行追加1 行削除
  1. 2 1
      web/templates/mobile/origin/env.html

+ 2 - 1
web/templates/mobile/origin/env.html

@@ -23,7 +23,7 @@
 <script>
 {% for v in data['list'] %}
 var date = {% for key,value in enumerate(v['stat']) %}{% if key == 0 %}{% raw value['data']['time'] %}{% end %}{% end %};
-if (date) {
+if (date.length > 0) {
     var myChart = echarts.init(document.getElementById('main_{{v['id']}}'));
     var series = [
         {% for key,value in enumerate(v['stat']) %}
@@ -67,6 +67,7 @@ if (date) {
     myChart.setOption(option, true);
 } else {
     var myChart = $('#main_{{v['id']}}');
+    myChart.attr('style', 'font-size:14px;text-align:center;');
     myChart.html('您要查询的时间段暂无数据');
 }