浏览代码

结露预警

gaodd 2 年之前
父节点
当前提交
37ee8d8128

+ 14 - 1
src/main/resources/static/app/business/module.js

@@ -211,7 +211,7 @@ angular.module('app.business')
211 211
         )
212 212
 		// 湿度报警
213 213
         .state('app.business.warning.humidity', {
214
-			url: '/business/warning/humidity/:isShow/:houseId',
214
+			url: '/business/warning/humidity',
215 215
 			data: {
216 216
 				title: '湿度报警'
217 217
 			},
@@ -222,6 +222,19 @@ angular.module('app.business')
222 222
 				}
223 223
 			}
224 224
 		})
225
+		// 结露报警
226
+        .state('app.business.warning.dewing', {
227
+			url: '/business/warning/dewing',
228
+			data: {
229
+				title: '结露预警'
230
+			},
231
+			views: {
232
+				"content@app": {
233
+					controller: 'sptJlyjCtrl',
234
+					templateUrl: 'app/supervise/views/dewingAlarm-list.html'
235
+				}
236
+			}
237
+		})
225 238
 		// 库存超限报警
226 239
         .state('app.business.warning.stock', {
227 240
 			url: '/business/warning/stock/:isShow/:houseId',

+ 3 - 0
src/main/resources/static/app/layout/partials/navigation.tpl.html

@@ -442,6 +442,9 @@
442 442
 							<li has-func="450">
443 443
 								<a data-ui-sref="app.business.warning.humidity">湿度报警</a>
444 444
 							</li>
445
+							<li has-func="450">
446
+								<a data-ui-sref="app.business.warning.dewing">结露预警</a>
447
+							</li>
445 448
 							<li has-func="452">
446 449
 								<a data-ui-sref="app.business.warning.stock">库存超限报警</a>
447 450
 							</li>

+ 40 - 0
src/main/resources/static/app/supervise/controller/sptCtrl.js

@@ -208,4 +208,44 @@ angular.module('app.supervise').controller("sptSxtgzsCtrl", function($scope, $ro
208 208
     };
209 209
 
210 210
 })
211
+
212
+
213
+.controller("sptJlyjCtrl", function($scope, $rootScope, $state, $stateParams, APP_CONFIG, sptService) {
214
+
215
+    // 获取列表数据
216
+    $scope.pageInfo = {pageNum : 1, pageSize : 10};
217
+
218
+    $scope.search = {kqbm:$rootScope.orgInfo.kqbm,cfbm:""};
219
+    $scope.loadData = function() {
220
+    	$scope.search.searchStartDate = $("#startDate").val();
221
+    	$scope.search.searchEndDate = $("#endDate").val();
222
+    	
223
+		sptService.getDewingPageInfo($scope.pageInfo.pageNum, $scope.pageInfo.pageSize, $scope.search).then(function (data) {
224
+			$scope.pageInfo = data;
225
+		}, function (data) {
226
+			console.log(data);
227
+		});
228
+    }
229
+    
230
+    $scope.loadData();
231
+
232
+    // 翻页
233
+    $scope.goPage = function(pageNum) {
234
+        $scope.pageInfo.pageNum = pageNum;
235
+        $scope.loadData();
236
+    };
237
+
238
+    $scope.emptyTime = function() {
239
+    	$("#startDate").val("");
240
+    	$("#endDate").val("");
241
+    	$scope.search.cfbm = "";
242
+        $scope.loadData();
243
+    }
244
+    
245
+   // 打印
246
+    $scope.print = function () {
247
+        $("#print").printArea();
248
+    };
249
+    
250
+})
211 251
 ;

+ 26 - 0
src/main/resources/static/app/supervise/service/sptService.js

@@ -178,4 +178,30 @@ angular.module('app.supervise').service("sptService", function($http, $q, APP_CO
178 178
         });
179 179
         return d.promise;
180 180
     }
181
+    
182
+    /**
183
+     * 结露预警
184
+     */
185
+    this.getDewingPageInfo = function(pageNum, pageSize,search) {
186
+        var d = $q.defer();
187
+        $http({
188
+            method : 'GET',
189
+            url : APP_CONFIG.depotStorageUrl + '/spt/getDewingAlarmList',
190
+            params : {
191
+                pageNum : pageNum,
192
+                pageSize : pageSize,
193
+                kqbm : search.kqbm, 
194
+                cfbm : search.cfbm,
195
+                searchStartDate : search.searchStartDate,
196
+                searchEndDate : search.searchEndDate
197
+            }
198
+        }).then(function successCallback(response) {
199
+            // 请求成功执行代码
200
+            d.resolve(response.data);
201
+        }, function errorCallback(response) {
202
+            // 请求失败执行代码
203
+            d.reject("error");
204
+        });
205
+        return d.promise;
206
+    }
181 207
 });

+ 98 - 0
src/main/resources/static/app/supervise/views/dewingAlarm-list.html

@@ -0,0 +1,98 @@
1
+<!-- MAIN CONTENT -->
2
+<div id="content">
3
+	<!-- widget grid -->
4
+	<section widget-grid id="widget-grid">
5
+		<div class="row">
6
+			<article class="col-sm-12">
7
+
8
+				<div jarvis-widget id="standard-datatable-widget" data-widget-color="darken"
9
+					data-widget-editbutton="true">
10
+					<header>
11
+						<span class="widget-icon"> <i class="fa fa-table"></i> </span>
12
+						<h2>结露预警列表</h2>
13
+					</header>
14
+					<div>
15
+						<div class="widget-body no-padding">
16
+							<div id="DataTables_Table_1_wrapper" class="dataTables_wrapper form-inline no-footer">
17
+								<div class="dt-toolbar">
18
+									<div class="col-xs-12 col-sm-10">
19
+										<a href-void class="btn btn-default btn-sm" ng-show="isShow"
20
+											ng-click="retList()"><i class="fa fa-angle-left"></i>&nbsp;返回&nbsp;</a>
21
+										<a class="btn btn-primary btn-sm" ng-click="print()">
22
+											<span class="fa fa-print"></span>&nbsp;打&nbsp;印
23
+										</a>&emsp;
24
+										<label> 仓房名称:&emsp;
25
+											<select ng-model="search.cfbm" class="form-control input-sm"
26
+												ng-options="store.cfbm as store.storehouseName for store in storelist">
27
+												<option value="">请选择</option>
28
+											</select>&emsp;
29
+										</label>
30
+										<label>检查日期:<input style="width: 100px;" class="form-control" type="text"
31
+												ng-model="search.startDate" name="startDate" id="startDate"
32
+												onClick="WdatePicker({lang:'zh-cn',maxDate:'#F{$dp.$D(\'endDate\')}'})">
33
+											--&nbsp;<input style="width: 100px;" class="form-control" type="text"
34
+												ng-disabled="isArchive" ng-model="search.endDate"
35
+												name="endDate" id="endDate"
36
+												onClick="WdatePicker({lang:'zh-cn',minDate:'#F{$dp.$D(\'startDate\')}'})">
37
+										</label>
38
+										<a class="btn btn-default btn-sm" ng-click="loadData()"> <i
39
+												class="fa fa-search"></i>&nbsp;查&nbsp;询</a>
40
+										<a class="btn btn-default btn-sm" ng-click="emptyTime()"> <i
41
+												class=""></i>&nbsp;清&nbsp;空</a>
42
+									</div>
43
+
44
+
45
+									<div class="col-sm-2 col-xs-2 hidden-xs">
46
+										<div class="dataTables_length">
47
+											<label>每页显示 <select ng-model="pageInfo.pageSize" ng-change="loadData()"
48
+													ng-options="num as num for num in [10,25,50,100]"
49
+													class="form-control input-sm"></select> 条
50
+											</label>
51
+										</div>
52
+									</div>
53
+								</div>
54
+								<div id="print">
55
+									<table class="table table-striped table-bordered table-hover" width="100%"
56
+										border="1" style="border-collapse:collapse;border:none;">
57
+										<thead>
58
+											<tr>
59
+												<th data-class="expand" style="text-align:center;">序号</th>
60
+												<th data-class="expand" style="text-align:center;">仓房名称</th>
61
+												<th data-class="expand" style="text-align:center;">测温点</th>
62
+												<th data-class="expand" style="text-align:center;">温度</th>
63
+												<th data-class="expand" style="text-align:center;">温度差</th>
64
+												<th data-class="expand" style="text-align:center;">报警时间</th>
65
+											</tr>
66
+										</thead>
67
+
68
+										<tbody>
69
+											<tr ng-repeat="warning in pageInfo.list">
70
+												<td style="text-align:center;">{{ $index + 1 }}</td>
71
+												<td style="text-align:center;">
72
+													{{ warning.cfmc }}
73
+												</td>
74
+												<td style="text-align:center;">
75
+													{{ warning.cwd }}
76
+												</td>
77
+												<td style="text-align:center;">
78
+													{{ warning.wd }}
79
+												</td>
80
+												<td style="text-align:center;">
81
+													{{ warning.wdc }}
82
+												</td>
83
+												<td style="text-align:center;">
84
+													{{ warning.bjsj | date:'yyyy-MM-dd HH:mm:ss' }}
85
+												</td>
86
+											</tr>
87
+										</tbody>
88
+									</table>
89
+								</div>
90
+								<div smart-include="app/layout/partials/page.tpl.html"></div>
91
+							</div>
92
+						</div>
93
+					</div>
94
+				</div>
95
+			</article>
96
+		</div>
97
+	</section>
98
+</div>