schangxiang@126.com
2025-09-17 60dd1afc3e8f94aa1b23211b6738d35b47294382
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
(function () {
    'use strict';
    angular.module('task.controller')
        .controller('ConveyorMonitorCtrl', ConveyorMonitorCtrl);
 
    function ConveyorMonitorCtrl($scope, $window, CurdHelper, ETaskTypeService, Global, $timeout, $state, Utils) {
 
 
        $scope.data = [];
 
        $scope.isBlank = Utils.isBlank;
 
        $scope.init = init;
 
        $scope.view = view;
        $scope.info_div = {
            width: $window.innerWidth / 2 - 35,
            height: 550
        }
        $scope.input_length = {
            width: ($window.innerWidth) / 4 - 132 - 45,
        }
        $scope.task_send_div = {
            width: $window.innerWidth - 50
        };
        $scope.sendFlag = false;
        $scope.init = init;
 
 
        function init() {
            $timeout(function () { queryConveyor(); }, 10);
        }
 
        function queryConveyor() {
            CurdHelper.query("./Device/GetConveyorInfos", function (data) {
                $scope.data = data.Result;
                for (var i = 0; i < $scope.data.length; i++) {
                    $scope.data[i].$background = "grove.png";
 
                }
 
                if ($state.includes("task.conveyor-monitor")) {
                    $timeout(queryConveyor, 1000);
                }
            });
        }
 
        function view(d) {
            debugger;
            if (d.ConveyorName == "conveyor1") {
                $state.go("task.conveyor-monitor-detail1", { name: d.ConveyorName });
            }
            else {
                $state.go("task.conveyor-monitor-detail2", { name: d.ConveyorName });
            }
        }
 
 
    }
})();