|
@@ -22,8 +22,7 @@
|
|
|
<div itemcode="3"><span>稼动率</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
|
|
|
<div itemcode="4"><span>生产趋势</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
|
|
|
<div itemcode="5"><span>能耗趋势</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
|
|
|
- -->
|
|
|
- <div ><span>指定设备</span><input id="imp_devcode" type="text" placeholder="设备编号" maxlength="4" style="width: 80px;margin-left: 8px;font-size: 12px;"></div>
|
|
|
+ -->
|
|
|
<div itemcode="1"><span>最近7天</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
|
|
|
<div itemcode="2"><span>自定义日期</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
|
|
|
</div>
|
|
@@ -43,6 +42,9 @@
|
|
|
<label>到</label>
|
|
|
<select id="hour2" style="width: 63px;"></select>
|
|
|
</div>
|
|
|
+ <div style="margin-top: 5px;">
|
|
|
+ <span>设备:</span><input id="imp_devcode" type="text" placeholder="设备编号" maxlength="4" style="width: 140px;margin-left: 8px;font-size: 12px;">
|
|
|
+ </div>
|
|
|
<div class="dateSelected_ok"><button type=button>确定</button></div>
|
|
|
</div>
|
|
|
<div id="search"><input type="text" placeholder="请输入设备编号" maxlength="4"><img style="position: absolute;top: 20%;right: 5px;" src="image/search_icon.png" class="search_btn"></div>
|
|
@@ -2213,7 +2215,8 @@
|
|
|
changeMonth: true,
|
|
|
changeYear: true,
|
|
|
numberOfMonths: 1,
|
|
|
- rangeSelect: true
|
|
|
+ rangeSelect: true,
|
|
|
+ defaultDate:new Date().Format("yyyy-MM-dd")
|
|
|
});
|
|
|
$("#date_select,#ui-datepicker-div").on("click",function(e){
|
|
|
e.stopPropagation();
|
|
@@ -2237,17 +2240,20 @@
|
|
|
$("#imp_item>div").on('click',function(e){
|
|
|
//导出数据
|
|
|
var code = $(this).attr("itemcode")
|
|
|
- var devcode =$.trim($("#imp_devcode").val())
|
|
|
+ //var devcode =$.trim($("#imp_devcode").val())
|
|
|
if(code=="2")
|
|
|
{
|
|
|
//自定义日期导出
|
|
|
e.stopPropagation();
|
|
|
- $("#datepicker1,#datepicker2").val('')
|
|
|
+ var day = new Date();
|
|
|
+ var day1 = new Date().setDate(day.getDate()-7)
|
|
|
+ $("#datepicker1").val(new Date(day1).Format("yyyy-MM-dd"))
|
|
|
+ $("#datepicker2").val(day.Format("yyyy-MM-dd"))
|
|
|
$("#date_select").show().css({
|
|
|
"top":$(this).offset().top+47+"px",
|
|
|
"left":$(this).offset().left+$("#imp_item").width()-$("#date_select").width()-5+"px"
|
|
|
})
|
|
|
- }else if(code=="1") window.open(SERVER_URL+"/export?devcode="+devcode)
|
|
|
+ }else if(code=="1") window.open(SERVER_URL+"/export")
|
|
|
else e.stopPropagation();
|
|
|
})
|
|
|
//自定义导出日期确定
|