(function () {
|
'use strict';
|
angular.module('task.controller')
|
.controller('ConveyorMonitorDetail2Ctrl', ConveyorMonitorDetail2Ctrl);
|
|
function ConveyorMonitorDetail2Ctrl($scope, $window, CurdHelper, Common, ETaskTypeService, $state, $timeout, Utils, Global, $stateParams) {
|
$scope.data = [];
|
$scope.info_div = {
|
width: $window.innerWidth / 2 - 30,
|
height: 440
|
}
|
$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() {
|
debugger;
|
$scope.conveyorName = $stateParams.name + "输送机监控";
|
queryConveyor();
|
}
|
function queryConveyor() {
|
CurdHelper.queryByParam("./Device/GetGateInfo", { conveyorName: "conveyor2", gateName: "gate21" }, function (data) {
|
|
if (Utils.isBlank(data.Message)) {
|
$scope.gate21 = data.Result;
|
}
|
});
|
|
CurdHelper.queryByParam("./Device/GetGateInfo", { conveyorName: "conveyor2", gateName: "gate22" }, function (data) {
|
|
if (Utils.isBlank(data.Message)) {
|
$scope.gate22 = data.Result;
|
}
|
});
|
if ($state.includes("task.conveyor-monitor")) {
|
$timeout(queryConveyor, 1000);
|
}
|
}
|
|
}
|
|
})();
|