hanqingsong 1 年之前
父節點
當前提交
8ec98395bb

+ 2 - 50
src/main/resources/static/app/warnAndAlarm/deviceAbnormalAlarm/controller/temperatureFaultListCtrl.js

@@ -6,59 +6,11 @@ angular.module('app.warnAndAlarm').controller('temperatureFaultListCtrl', functi
6
 
6
 
7
     // 列表
7
     // 列表
8
     $scope.loadData = function () {
8
     $scope.loadData = function () {
9
-        /*deviceAbnormalAlarmService.getSetUpPageList($scope.pageInfo.pageNum, $scope.pageInfo.pageSize).then(function (data) {
9
+        deviceAbnormalAlarmService.getSetUpPageList($scope.pageInfo.pageNum, $scope.pageInfo.pageSize, $scope.search).then(function (data) {
10
             $scope.pageInfo = data.data;
10
             $scope.pageInfo = data.data;
11
         }, function (data) {
11
         }, function (data) {
12
             console.log(data);
12
             console.log(data);
13
-        });*/
14
-
15
-        // 测试
16
-        $scope.pageInfo = {
17
-            "pageNum": 1,
18
-            "pageSize": 10,
19
-            "size": 2,
20
-            "startRow": 1,
21
-            "endRow": 2,
22
-            "total": 2,
23
-            "pages": 1,
24
-            "list": [
25
-                {
26
-                    "id": "cafad3641c6e4c238f7afe5bb577eb5e",
27
-                    "kqbm": "91120223104141086Y068",
28
-                    "cfbm": "91120223104141086Y0680135",
29
-                    "ch": "309号仓",
30
-                    "gzcwdsl": 756,
31
-                    "bjsj": "2023-07-25 12:58:58",
32
-                    "createTime": "2023-07-25 12:58:58",
33
-                    "updateTime": "2020-10-29 23:09:01"
34
-                },
35
-                {
36
-                    "id": "66d83e5bc77c42d3ac7b1785efc10d81",
37
-                    "kqbm": "91120223104141086Y068",
38
-                    "cfbm": "91120223104141086Y0680010",
39
-                    "ch": "10号仓",
40
-                    "gzcwdsl": 720,
41
-                    "bjsj": "2023-07-25 12:58:58",
42
-                    "createTime": "2023-07-25 12:58:58",
43
-                    "updateTime": "2020-10-30 00:00:36"
44
-                }
45
-            ],
46
-            "prePage": 0,
47
-            "nextPage": 0,
48
-            "isFirstPage": true,
49
-            "isLastPage": true,
50
-            "hasPreviousPage": false,
51
-            "hasNextPage": false,
52
-            "navigatePages": 8,
53
-            "navigatepageNums": [
54
-                1
55
-            ],
56
-            "navigateFirstPage": 1,
57
-            "navigateLastPage": 1,
58
-            "firstPage": 1,
59
-            "lastPage": 1
60
-        };
61
-
13
+        });
62
     };
14
     };
63
     $scope.loadData();
15
     $scope.loadData();
64
 
16
 

+ 21 - 0
src/main/resources/static/app/warnAndAlarm/deviceAbnormalAlarm/service/deviceAbnormalAlarmService.js

@@ -1,4 +1,25 @@
1
 "use strict";
1
 "use strict";
2
 angular.module('app.warnAndAlarm').service("deviceAbnormalAlarmService", function ($http, $q, APP_CONFIG, $rootScope) {
2
 angular.module('app.warnAndAlarm').service("deviceAbnormalAlarmService", function ($http, $q, APP_CONFIG, $rootScope) {
3
 
3
 
4
+    this.getCwdgzsPageInfo = function(pageNum, pageSize, kqbm, bjsj) {
5
+        var d = $q.defer();
6
+        $http({
7
+            method : 'GET',
8
+            url : APP_CONFIG.depotStorageUrl + '/spt/getCwdgzsList',
9
+            params : {
10
+                pageNum : pageNum,
11
+                pageSize : pageSize,
12
+                kqbm : kqbm,
13
+                bjsj : bjsj
14
+            }
15
+        }).then(function successCallback(response) {
16
+            // 请求成功执行代码
17
+            d.resolve(response.data);
18
+        }, function errorCallback(response) {
19
+            // 请求失败执行代码
20
+            d.reject("error");
21
+        });
22
+        return d.promise;
23
+    }
24
+
4
 });
25
 });

+ 18 - 0
src/main/resources/static/app/warnAndAlarm/tempWet/controller/tempAlarmCtrl.js

@@ -22,6 +22,24 @@ angular.module('app.warnAndAlarm').controller("tempAlarmCtrl", function ($scope,
22
         $scope.search.thresholdType = $stateParams.thresholdType;
22
         $scope.search.thresholdType = $stateParams.thresholdType;
23
         tempWarnService.getTempAlarmPageInfo($scope.pageInfo.pageNum, $scope.pageInfo.pageSize, $scope.search).then(function (data) {
23
         tempWarnService.getTempAlarmPageInfo($scope.pageInfo.pageNum, $scope.pageInfo.pageSize, $scope.search).then(function (data) {
24
             $scope.pageInfo = data.data;
24
             $scope.pageInfo = data.data;
25
+            if ($scope.pageInfo.list.length > 0) {
26
+                for (let i = 0; i < $scope.pageInfo.list.length; i++) {
27
+                    let approvalStatus = $scope.pageInfo.list[i].approvalStatus;
28
+                    let processStatus = $scope.pageInfo.list[i].processStatus;
29
+                    let supervisionStatus = $scope.pageInfo.list[i].supervisionStatus;
30
+                    if(approvalStatus === '999999') {
31
+                        $scope.pageInfo.list[i].alarmStatus = '完成';
32
+                    } else if ((processStatus === '100201' || processStatus === null)) {
33
+                        $scope.pageInfo.list[i].alarmStatus = '待处理';
34
+                    } else if (supervisionStatus === null && processStatus !== '100201') {
35
+                        $scope.pageInfo.list[i].alarmStatus = '处理中';
36
+                    } else if ((processStatus === null || processStatus !== '100201') && supervisionStatus !== null) {
37
+                        $scope.pageInfo.list[i].alarmStatus = '待处理 督办中';
38
+                    } else if (processStatus !== '100201' && supervisionStatus !== null) {
39
+                        $scope.pageInfo.list[i].alarmStatus = '督办中';
40
+                    }
41
+                }
42
+            }
25
         }, function (data) {
43
         }, function (data) {
26
             console.log(data);
44
             console.log(data);
27
         });
45
         });

+ 1 - 7
src/main/resources/static/app/warnAndAlarm/tempWet/views/tempAlarm-list.html

@@ -69,13 +69,7 @@
69
                                             <td style="text-align:center;">{{ warning.alarmTime}}</td>
69
                                             <td style="text-align:center;">{{ warning.alarmTime}}</td>
70
                                             <td style="text-align:center;">{{ warning.restoreTime}}</td>
70
                                             <td style="text-align:center;">{{ warning.restoreTime}}</td>
71
                                             <td style="text-align:center;">{{ warning.durationDays }}</td>
71
                                             <td style="text-align:center;">{{ warning.durationDays }}</td>
72
-                                            <td style="text-align:center;" >
73
-                                                <span ng-if="warning.processStatus == null || warning.processStatus == '100201'">待处理</span>
74
-                                                <span ng-if="warning.supervisionStatus == null && warning.processStatus != '100202'">处理中</span>
75
-                                                <span ng-if="(warning.processStatus == null || warning.processStatus == '100203') && warning.supervisionStatus != null">待处理 督办中</span>
76
-                                                <span ng-if="warning.processStatus != null && warning.supervisionStatus != null">督办中</span>
77
-                                                <span ng-if="warning.approvalStatus == '999999'">完成</span>
78
-                                            </td>
72
+                                            <td style="text-align:center;">{{ warning.alarmStatus }}</td>
79
                                             <td style="text-align:center;">
73
                                             <td style="text-align:center;">
80
                                                 <a href-void ng-click="showGrainDetectionList(warning)"><i class=""></i>检测记录</a>&emsp;
74
                                                 <a href-void ng-click="showGrainDetectionList(warning)"><i class=""></i>检测记录</a>&emsp;
81
                                                 <a href-void ng-click="showProcessDetectionList(warning.id)"><i class=""></i>处理记录</a>
75
                                                 <a href-void ng-click="showProcessDetectionList(warning.id)"><i class=""></i>处理记录</a>