|
@@ -1906,3 +1906,54 @@ function getListData(queryParam = {}) {
|
|
|
|
|
|
|
|
|
} else {
|
|
|
+ layui.use('layer', function() {
|
|
|
+ var layer = layui.layer;
|
|
|
+ layer.alert('暂无数据', { icon: 5 }, function() {
|
|
|
+ location.reload();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }, function(errorMsg) {
|
|
|
+ layui.use('layer', function() {
|
|
|
+ var layer = layui.layer;
|
|
|
+ layer.alert('数据请求失败', { icon: 5 });
|
|
|
+ });
|
|
|
+ }, 1)
|
|
|
+};
|
|
|
+
|
|
|
+function getSearchParamObj() {
|
|
|
+ let queryParam = {};
|
|
|
+ let buildingVal = $('#building').val();
|
|
|
+ let chooseTime = $('#chooseTime').val();
|
|
|
+ queryParam.company_code = buildingVal;
|
|
|
+ queryParam.generation_time = chooseTime;
|
|
|
+ return queryParam;
|
|
|
+};
|
|
|
+
|
|
|
+//日期筛选
|
|
|
+layui.use('laydate', function() {
|
|
|
+ var laydate = layui.laydate;
|
|
|
+ ///年月选择器
|
|
|
+ laydate.render({
|
|
|
+ elem: '#chooseTime',
|
|
|
+ type: 'month',
|
|
|
+ max: -30, //7天后
|
|
|
+ trigger: 'click', //呼出事件改成click
|
|
|
+
|
|
|
+ done: function(value, date, endDate) {
|
|
|
+ setTimeout(function() {
|
|
|
+ getListData(getSearchParamObj());
|
|
|
+ }, 100)
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+});
|
|
|
+
|
|
|
+//建筑筛选
|
|
|
+$("#building").change(function() {
|
|
|
+ setTimeout(function() {
|
|
|
+ getListData(getSearchParamObj());
|
|
|
+ }, 100)
|
|
|
+
|
|
|
+});
|