'use strict'; app.controller('calllogCtrl', ["$scope", "i18nService", "$rootScope", "$state", "$timeout", "$interval", "$modal", "SweetAlert", "uiGridConstants", "uiGridGroupingConstants", "Restangular", "api_bpm_data", "api_text", "api_user_data", function($scope, i18nService, $rootScope, $state, $timeout, $interval, $modal, SweetAlert, uiGridConstants, uiGridGroupingConstants, Restangular, api_bpm_data, api_text, api_user_data) { $scope.langs = i18nService.getAllLangs(); $scope.lang = 'zh-cn'; i18nService.setCurrentLang($scope.lang); // $(window).resize(function() { // // console.log("1111") // }); var loginUser = $rootScope.user; // var voiceurl=$rootScope.audioiIp; // delete $rootScope.user.authority; var pdKey = $state.current.pdKey; $scope.gridOptions = {}; $scope.gridOptions.data = 'myData'; $scope.gridOptions.enableColumnResizing = true; $scope.gridOptions.enableFiltering = false; $scope.gridOptions.enableGridMenu = true; $scope.gridOptions.enableRowSelection = true; $scope.gridOptions.showGridFooter = true; $scope.gridOptions.showColumnFooter = false; $scope.gridOptions.fastWatch = true; // $scope.gridOptions.useExternalFiltering=true; $scope.gridOptions.useExternalPagination = true; $scope.gridOptions.paginationPageSizes = [10]; $scope.gridOptions.paginationPageSize = 10; $scope.gridOptions.multiSelect = true; var mun = $scope.gridOptions.paginationPageSize; $scope.gridOptions.rowIdentity = function(row) { return row.id; }; $scope.gridOptions.getRowIdentity = function(row) { return row.id; }; $scope.translateone = function(item) { if (item) { return '已接'; } else { return '未接'; } } $scope.translatetwo = function(item) { if (item) { return '呼入'; } else { return '呼出'; } } $scope.transferTime = function(time) { return moment(time).format('YYYY-MM-DD HH:mm'); } $scope.gridOptions.columnDefs = [{ name: 'item', displayName: '序号', width: 50 }, { name: 'callerIdNumber', displayName: '主叫号码', width: '12%' }, { name: 'destinationNumber', displayName: '拨打号码', width: '10%' }, { name: 'createdTime', displayName: '开始时间', width: '17%', cellTemplate: '