zhaoxing
2023-07-26 e4f7e0c028e3866c62edde70efb177794e75c562
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<style>
  .select_btn{
      color: #ff5722 !important;
      font-weight: bold;
  }
  
</style>
<div id="potencyGroup" class="btn-group append_potency">
  <button type="button" class="btn btn-info" disabled="disabled">浓度面板>>></button>
  <button id="potency1" type="button" _code="pm25" class="btn btn-info select_btn">PM25</button>
  <button id="potency2" type="button" _code="pm10" class="btn btn-info">PM10</button>
  <button id="potency3" type="button" _code="no" class="btn btn-info">NO</button>
  <button id="potency4" type="button" _code="no2" class="btn btn-info">NO2</button>
  <button id="potency5" type="button" _code="nox" class="btn btn-info">NOX</button>
  <button id="potency6" type="button" _code="co" class="btn btn-info">CO</button>
   <input type="hidden" id="potencyCode" value="pm10">
</div>
 
<script>
 
  //对应widget.js中MyWidget实例化后的对象
  var thisWidget
 
  
  //当前页面业务
  function initWidgetView(_thisWidget) {
    thisWidget = _thisWidget
    
    
  }
  
  
 
  $("#potencyGroup button").on("click", function () {
      $("#potencyGroup button").removeClass("select_btn");
      $(this).addClass("select_btn");
      
      //$("#potencyGroup button").css("color","");
      //$("#potencyGroup button").css("font-weight","");
      //$(this).css("color","#FF5722");
      //$(this).css("font-weight","bold");   
      var code = $(this).attr("_code");
      $('#potencyCode').val(code);
      loadTop10();
  });
 
 
  function loadTop10(){
    var leftAndRight = mars3d.widget.getClass("widgetsTS/widget_Overall/widget.js");
    if(leftAndRight){
      if(leftAndRight.viewWindowLeft){
        leftAndRight.viewWindowLeft.loadTop10();
      }
    }
    
    //thisWidget.viewWindowRight.test(code);
  }
 
  function applyPotency(){
    var potency = $('#potencyCode').val();
    return potency;
  }
  
</script>