<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>
|