'use strict'; var app = angular.module('app', [ 'angularUtils.directives.dirPagination' ]); app.controller("listCtrl", ["$scope", "$http", "$timeout", function ($scope, $http, $timeout) { var self = this; var s4 = new SM4Util(); self.userId = $.cookie("GlWorkPlatform-userid"); self.userName = $.cookie("GlWorkPlatform-chineseName"); self.get_AccessToken = localStorage.getItem("GlWorkPlatform-AccessToken"); var postCfg = { headers: { 'Content-Type': 'application/json', 'Authorization': "Bearer " + self.get_AccessToken } } self.loading = false; self.search = { date1: sp.monthfirst(sp.getLocalDate()), date2: sp.formatMonthLast(sp.getLocalDate()) } self.getData = function () { self.list = []; self.loading = false; var data = { tablename: "SX_SZJWYSQGKXXCBD", colums: "*", order: "ID", sqlwhere: "", sqlinwhere: "", sqllikewhere: "" } $http.post(apiurljs.login + "g2app/dataabase/queryDataByCol", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg) .success(function (obj) { var res = strToJson(s4.decryptData_CBC(obj.data)); self.loading = false; if (res.data == null || res.data == undefined || res.data == "") { self.noDataTip = 0; } else { self.noDataTip = 1; self.list = res.data; $.each(self.list, function (index, item) { item.SQRQ1 = sp.format(item.SQRQ) item.SJBJRQ1 = sp.format(item.SJBJRQ) self.LAIYUAN.forEach(function (item1) { if (item.LAIYUAN == item1.CODE) item.LAIYUAN1 = item1.CNAME }) }) } }) } self.getData() self.openLayer = function () { self.search = { date1: sp.monthfirst(sp.getLocalDate()), date2: sp.formatMonthLast(sp.getLocalDate()) } sp.layer("#Search") } //头部下滚冻结 $(function () { //页面高度撑满 setTimeout(function () { if ($(".ibox-content").height() < $(window).height() - 31) { $(".ibox-content").css("height", $(window).height() - 31) } }, 1) }) }])