浏览代码

fix: 分页

maopixin 2 年之前
父节点
当前提交
b0fd6dad8f

+ 9 - 0
src/main/resources/static/app/storage/foodstuffAnalysis/controller/monthCtrl.js

@@ -29,6 +29,15 @@ angular.module('app.storage').controller("monthCtrl", function ($scope, $rootSco
29
 	};
29
 	};
30
 	$scope.loadData();
30
 	$scope.loadData();
31
 
31
 
32
+
33
+	// 翻页
34
+	$scope.goPage = function(pageNum) {
35
+		if ($scope.pageInfo.pageNum != pageNum && pageNum > 0) {
36
+			 $scope.pageInfo.pageNum = pageNum;
37
+			 $scope.loadData();
38
+		 }
39
+	}
40
+
32
 	$scope.addRow = function() {
41
 	$scope.addRow = function() {
33
 		$state.go("app.storage.foodstuffAnalysis.month-detail", {
42
 		$state.go("app.storage.foodstuffAnalysis.month-detail", {
34
 			id: 0,
43
 			id: 0,

+ 8 - 0
src/main/resources/static/app/storage/foodstuffAnalysis/controller/quarterCtrl.js

@@ -48,6 +48,14 @@ angular.module('app.storage').controller("quarterCtrl", function ($scope, $rootS
48
 	};
48
 	};
49
 	$scope.loadData();
49
 	$scope.loadData();
50
 
50
 
51
+	// 翻页
52
+	$scope.goPage = function(pageNum) {
53
+		if ($scope.pageInfo.pageNum != pageNum && pageNum > 0) {
54
+			 $scope.pageInfo.pageNum = pageNum;
55
+			 $scope.loadData();
56
+		 }
57
+	}
58
+
51
 	$scope.addRow = function() {
59
 	$scope.addRow = function() {
52
 		$state.go("app.storage.foodstuffAnalysis.quarter-detail", {
60
 		$state.go("app.storage.foodstuffAnalysis.quarter-detail", {
53
 			id: 0,
61
 			id: 0,

+ 9 - 0
src/main/resources/static/app/storage/foodstuffAnalysis/controller/weekCtrl.js

@@ -20,6 +20,15 @@ angular.module('app.storage').controller("weekCtrl", function ($scope, $rootScop
20
 	};
20
 	};
21
 	$scope.loadData();
21
 	$scope.loadData();
22
 
22
 
23
+
24
+	// 翻页
25
+	$scope.goPage = function(pageNum) {
26
+		if ($scope.pageInfo.pageNum != pageNum && pageNum > 0) {
27
+			 $scope.pageInfo.pageNum = pageNum;
28
+			 $scope.loadData();
29
+		 }
30
+	}
31
+	
23
 	$scope.addRow = function() {
32
 	$scope.addRow = function() {
24
 		$state.go("app.storage.foodstuffAnalysis.week-detail", {
33
 		$state.go("app.storage.foodstuffAnalysis.week-detail", {
25
 			id: 0,
34
 			id: 0,

+ 8 - 0
src/main/resources/static/app/supervise/controller/humidityWarningThresholdCtrl.js

@@ -20,6 +20,14 @@ angular.module('app.supervise')
20
 		};
20
 		};
21
 		$scope.loadData();
21
 		$scope.loadData();
22
 
22
 
23
+
24
+		$scope.goPage = function(pageNum) {
25
+			if ($scope.pageInfo.pageNum != pageNum && pageNum > 0) {
26
+				$scope.pageInfo.pageNum = pageNum;
27
+				$scope.loadData();
28
+			}
29
+		}
30
+		
23
 		// 打印
31
 		// 打印
24
 		$scope.print = function () {
32
 		$scope.print = function () {
25
 			$("#print").printArea();
33
 			$("#print").printArea();