'use strict'; var app = angular.module('app', [ 'angularUtils.directives.dirPagination' ]); app.controller("listCtrl", ["$scope", "$http", "$timeout", "$interval", function ($scope, $http, $timeout, $interval) { var self = this; var s4 = new SM4Util(); self.userId = $.cookie("GlWorkPlatform-userid"); self.userName = $.cookie("GlWorkPlatform-chineseName"); self.get_AccessToken = localStorage.getItem("GlWorkPlatform-AccessToken"); self.deviceType = localStorage.getItem("tjJxtGoldenlinkWork-deviceType"); self.get_lastReturnPageno = sp.getUrlName("lastReturnPageno"); self.get_type = sp.getUrlName("type"); self.params = sp.getUrlName("params"); self.getflowids = sp.getUrlName("flowids") var postCfg = { headers: { 'Content-Type': 'application/json', 'Authorization': "Bearer " + self.get_AccessToken } } self.type = self.get_type != "" ? self.get_type : "todo"; self.Url = getUrl(self.type); self.CrossPage = window.parent.CrossPage; self.loading = false; self.search = null//JSON.parse($.cookie("GlWorkPlatform-fawenbg")); self.noDataTip = 1;//没有数据时赋变量为0,先默认为1 self.pageno = 1; self.total_count = 0; self.itemsPerPage = 20; self.pageOptions = [20, 30, 40, 50, 100, 300, 500]; self.getGWZL = function () { var data = { tablename: "CODE_GWTYPE", colums: "ID,CODE,CNAME,FLOWID", order: "ID desc", sqlwhere: { USEMARK: 1 }, sqlinwhere: { FLOWID: self.flowids.map(function (item) { return "'" + item.ID + "'" }).join(",") }, 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.GWZL = res.data; self.getJJCD() }) } self.getJJCD = function () { var data = { ckey: "CODE_EMERGENCY", routeinfoid: self.routeinfoid } $http.post(apiurljs.login + "g2app/abase/queryDataCode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg) .success(function (obj) { var res = strToJson(s4.decryptData_CBC(obj.data)); self.JJCD = res.data.CODE_EMERGENCY; self.load() }) } self.ordercondition = [] self.flowids = [ { ID: "AA20", NAME: "正式文-上行文", checked: false }, { ID: "AA03", NAME: "正式文-平、下行文", checked: false }, { ID: "AA10", NAME: "专报", checked: false }, { ID: "AA55", NAME: "管委会办公室发文", checked: false }, { ID: "AA56", NAME: "管委会发文稿纸", checked: false }, { ID: "AA57", NAME: "规范性文件", checked: false }, { ID: "AA08", NAME: "委发函", checked: false }, { ID: "AA23", NAME: "审批件", checked: false }, { ID: "AA77", NAME: "主任办公会议纪要", checked: false }, { ID: "AA1C", NAME: "常务会会议纪要", checked: false }, { ID: "AA06", NAME: "会议纪要", checked: false }, ] if (self.getflowids != "") { self.flowids = self.flowids.filter(function (item) { if (self.getflowids.indexOf(item.ID) > -1) { return true } }) } //self.flowids = [ // { ID: "AA20", NAME: "正式文-上行文", checked: false }, // { ID: "AA03", NAME: "正式文-平、下行文", checked: false }, // { ID: "AA10", NAME: "专报", checked: false }, // { ID: "AA55", NAME: "管委会办公室发文", checked: false }, // { ID: "AA56", NAME: "管委会发文稿纸", checked: false }, // { ID: "AA57", NAME: "规范性文件", checked: false }, // { ID: "AA08", NAME: "委发函", checked: false }, // { ID: "AA23", NAME: "审批件", checked: false }, // { ID: "AA77", NAME: "主任办公会议纪要", checked: false }, // { ID: "AA06", NAME: "会议纪要", checked: false }, // { ID: "AA88", NAME: "党委正式文上行文", checked: false }, // { ID: "AA89", NAME: "党委正式文下行文", checked: false }, // { ID: "AA46", NAME: "党委会议纪要", checked: false }, // { ID: "AA22", NAME: "党委其他文件", checked: false }, // { ID: "AA54", NAME: "党委督查专报", checked: false }, // { ID: "AA65", NAME: "签报单", checked: false } //] self.getData = function (pageno) { if (self.search == null) { self.search = { FLOW: [], JJCD: [], GWZL: [], TITLE: "", FWZH: "", DATE1: "", DATE2: "", NGRBM: '', NGR: '', ZS: '' } } var urlflowids = self.flowids.map(function (item) { return item.ID }).join("|"); var flowids = self.search.FLOW.join("|"); var querycondition = []; var columnscondition = [ { COLID: "JJCD", COLUMNS: "FW_ZSWSXW.JJCD|FW_ZSWPXXW.JJCD|FW_ZB.JJCD|FW_GFXWJXGMRBM.JJCD|FW_WFH.JJCD|FW_SPJ.JJCD|FW_ZRBGHYJY.JJCD|FW_CWHHYJY.JJCD|FW_HYJY.JJCD" }, { COLID: "GWZL", COLUMNS: "FW_ZSWSXW.GWZL|FW_ZSWPXXW.GWZL|FW_ZB.GWZL|FW_GWHBGSFW.FWZL|FW_GWHFWGZ.FWZL|FW_GFXWJXGMRBM.GWZL|FW_WFH.GWZL|FW_SPJ.GWZL|FW_ZRBGHYJY.GWZL|FW_CWHHYJY.GWZL|FW_HYJY.GWZL" }, { COLID: "FWZH", COLUMNS: "FW_ZSWSXW.FWZH|FW_ZSWPXXW.FWZH|FW_ZB.FWZH|FW_GFXWJXGMRBM.FWZH|FW_WFH.FWZH|FW_SPJ.FWZH|FW_ZRBGHYJY.FWZH|FW_CWHHYJY.FWZH|FW_HYJY.FWZH" }, { COLID: "NGRBM", COLUMNS: "FW_ZSWSXW.NGRBM|FW_ZSWPXXW.NGRBM|FW_ZB.NGRBM|FW_GWHBGSFW.NGRBM|FW_GWHFWGZ.NGRBM|FW_GFXWJXGMRBM.NGRBM|FW_WFH.NGRBM|FW_SPJ.NGRBM|FW_ZRBGHYJY.NGRBM|FW_CWHHYJY.NGRBM|FW_HYJY.NGRBM" }, { COLID: "NGR", COLUMNS: "FW_ZSWSXW.NGR|FW_ZSWPXXW.NGR|FW_ZB.NGR|FW_GWHBGSFW.NGR|FW_GWHFWGZ.NGR|FW_GFXWJXGMRBM.NGR|FW_WFH.NGR|FW_SPJ.NGR|FW_ZRBGHYJY.NGR|FW_CWHHYJY.NGR|FW_HYJY.NGR" }, { COLID: "ZS", COLUMNS: "FW_ZSWSXW.ZS|FW_ZSWPXXW.ZS|FW_ZB.ZS|FW_GWHBGSFW.ZS|FW_GWHFWGZ.ZS|FW_GFXWJXGMRBM.ZS|FW_WFH.ZS|FW_SPJ.ZS|FW_ZRBGHYJY.ZS|FW_CWHHYJY.ZS|FW_HYJY.ZS" } ] if (self.search.JJCD != "") { querycondition.push({ "CKIND": "VARLIST", "TABLEID": "CODETABLE", "COLID": "JJCD", "VALUEA": self.search.JJCD.join(","), "VALUEB": "" }) } if (self.search.GWZL != "") { querycondition.push({ "CKIND": "VARLIST", "TABLEID": "CODETABLE", "COLID": "GWZL", "VALUEA": self.search.GWZL.join(","), "VALUEB": "" }) } if (self.search.TITLE != "") { querycondition.push({ "CKIND": "VARCHAR", "TABLEID": "SYS_ROUTE_VIEW", "COLID": "TITLE", "VALUEA": self.search.TITLE, "VALUEB": "" }) } if (self.search.FWZH != "") { querycondition.push({ "CKIND": "VARCHAR", "TABLEID": "CODETABLE", "COLID": "FWZH", "VALUEA": self.search.FWZH, "VALUEB": "" }) } if (self.search.NGRBM != "") { querycondition.push({ "CKIND": "VARCHAR", "TABLEID": "CODETABLE", "COLID": "NGRBM", "VALUEA": self.search.NGRBM, "VALUEB": "" }) } if (self.search.NGR != "") { querycondition.push({ "CKIND": "VARCHAR", "TABLEID": "CODETABLE", "COLID": "NGR", "VALUEA": self.search.NGR, "VALUEB": "" }) } if (self.search.ZS != "") { querycondition.push({ "CKIND": "VARCHAR", "TABLEID": "CODETABLE", "COLID": "ZS", "VALUEA": self.search.ZS, "VALUEB": "" }) } if (self.params != "") { querycondition.push({ "CKIND": "VARLIST", "TABLEID": "SYS_ROUTE", "COLID": "ROUTEID", "VALUEA": self.params, "VALUEB": "" }) } if (self.search.DATE1 != "" && self.search.DATE2 != "") { querycondition.push({ "CKIND": "DATETIME", "TABLEID": "SYS_ROUTE_VIEW", "COLID": "RECEIVEDATE", "VALUEA": self.search.DATE1, "VALUEB": self.search.DATE2 }) } else if (self.search.DATE1 != "" && self.search.DATE2 == "") { querycondition.push({ "CKIND": "DATETIME", "TABLEID": "SYS_ROUTE_VIEW", "COLID": "RECEIVEDATE", "VALUEA": self.search.DATE1, "VALUEB": "" }) } else if (self.search.DATE1 == "" && self.search.DATE2 != "") { querycondition.push({ "CKIND": "DATETIME", "TABLEID": "SYS_ROUTE_VIEW", "COLID": "RECEIVEDATE", "VALUEA": "", "VALUEB": self.search.DATE2 }) } self.list = []; self.loading = true; self.pageno = pageno; $scope.__default__currentPage = self.pageno; //设置页面样式在第几页 var data = { //flowid: "AA03|AA04|AA06|AA07|AA08|AA09|AA10|AA11|AA20|AA21|AA23|AA24|AA40|AA41|AA42|AA43|AA49|AA55|AA56|AA57|AA63|AA75|AA76|AA77|AA78|AA79|AA80", //flowid: flowids == "" ? "AA20|AA03|AA10|AA55|AA56|AA57|AA08|AA23|AA77|AA06|AA63|AA80|AA97" : flowids, //flowid: flowids == "" ? "AA20|AA03|AA10|AA55|AA56|AA57|AA08|AA23|AA77|AA06|AA88|AA89|AA46|AA22|AA54|AA65" : flowids, flowid: flowids != "" ? flowids : urlflowids != "" ? urlflowids : "AA20|AA03|AA10|AA55|AA56|AA57|AA08|AA23|AA77|AA1C|AA06",//"AA20|AA03|AA10|AA55|AA56|AA57|AA08|AA23|AA77|AA06" : flowids, userid: self.userId, pageno: self.pageno, pagesize: self.itemsPerPage, columnscondition: JSON.stringify(columnscondition), querycondition: JSON.stringify(querycondition), ordercondition: self.ordercondition.length == 0 ? "" : JSON.stringify(self.ordercondition) } //$http.post(apiurljs.login + "g2work/routeinfo/" + self.Url, { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg) $http.post(apiurljs.login + "g2work/routeinfo/" + self.Url, data, postCfg) .success(function (obj) { var res = obj; //var res = strToJson(s4.decryptData_CBC(obj.data)); self.loading = false; if (res.data == null || res.data == undefined || res.data == "") { self.noDataTip = 0; if (self.params != "") { self.params = ""; self.getData(1) } } else { self.noDataTip = 1; self.list = res.data; self.total_count = res.totalCount; $.each(self.list, function (index, item) { self.JJCD.forEach(function (item1) { if (item.JJCD == item1.CODE) item.JJCD = item1.CNAME }) self.GWZL.forEach(function (item1) { if (item.GWZL == item1.CODE) item.GWZL = item1.CNAME }) if (item.FILEN != "") { item.FILEN = item.FILEN.indexOf("dotype") > -1 ? item.FILEN.replace("dotype=1", "dotype=" + getDoType(self.type)) + "&type=" + self.type + "&lastReturnPageno=" + self.pageno + "&flowid=" + item.FLOWID : item.FILEN + "&dotype=" + getDoType(self.type) + "&type=" + self.type + "&lastReturnPageno=" + self.pageno + "&flowid=" + item.FLOWID; } else { item.FILEN = "#"; } if (item.TODOLIST) { item.TODOLIST.forEach(function (item1) { if (item1.FILEN != "") { item1.FILEN = item1.FILEN.indexOf("dotype") > -1 ? item1.FILEN.replace("dotype=1", "dotype=" + getDoType(self.type)) + "&type=" + self.type + "&lastReturnPageno=" + self.pageno + "&flowid=" + item.FLOWID : item1.FILEN + "&dotype=" + getDoType(self.type) + "&type=" + self.type + "&lastReturnPageno=" + self.pageno + "&flowid=" + item.FLOWID; } else { item1.FILEN = "#"; } }) } if (self.type == "finish") { item.RECEIVEDATE = item.FINISHEDDATE; } }) } if (self.CrossPage.type == 0) { self.journalRecord(self.CrossPage.ctime, sp.getLocalDate1(), "", "接入日志", window.location.pathname) } }) } self.load = function () { if (self.get_lastReturnPageno == undefined || self.get_lastReturnPageno == null || self.get_lastReturnPageno == "") { self.getData(self.pageno); } else { $timeout(function () { self.getData(self.get_lastReturnPageno); }, 1) } } self.sortFiled = function (str) { var n = 0, obj, x = -1; self.ordercondition.forEach(function (item, index) { if (item.COLID == str) { n++ item.SORTTYPE = item.SORTTYPE == "" || item.SORTTYPE == "asc" ? "desc" : "asc" obj = item; x = index } }) if (n == 0) { self.ordercondition.unshift({ COLID: str, SORTTYPE: "desc" }) } if (x != -1) { self.ordercondition.splice(x, 1) self.ordercondition.unshift(obj) } self.getData(1); } self.getGWZL(); self.openLayer = function () { self.params = ""; if (self.search == null) { self.search = { FLOW: [], JJCD: [], GWZL: [], TITLE: "", FWZH: "", DATE1: "", DATE2: "", NGRBM: '', NGR: '', ZS: '' } } else { self.flowids.forEach(function (item) { item.checked = false; if (self.search.FLOW.indexOf(item.ID) > -1) { item.checked = true; } }) self.JJCD.forEach(function (item) { item.checked = false; if (self.search.JJCD.indexOf(item.CODE) > -1) { item.checked = true; } }) self.GWZL.forEach(function (item) { item.checked = false; if (self.search.GWZL.indexOf(item.CODE) > -1) { item.checked = true; } }) } sp.layer("#Search") } self.doSearch = function () { self.search.FLOW = []; self.flowids.forEach(function (item) { if (item.checked == true) { self.search.FLOW.push(item.ID) } }) self.search.JJCD = []; self.JJCD.forEach(function (item) { if (item.checked == true) { self.search.JJCD.push(item.CODE) } }) self.search.GWZL = []; self.GWZL.forEach(function (item) { if (item.checked == true) { self.search.GWZL.push(item.CODE) } }) self.getData(self.pageno) sp.layerhide() } self.cancal = function () { self.search = { FLOW: [], JJCD: [], GWZL: [], TITLE: "", FWZH: "", DATE1: "", DATE2: "", NGRBM: '', NGR: '', ZS: '' } $.cookie("GlWorkPlatform-fawenbg", null, { path: '/', expires: 1 }); self.getData(1) sp.layerhide() } self.refresh = function () { self.CrossPage.type = null; self.getData(self.pageno); } self.goUrl = function (item) { if (item.TODOLIST && item.TODOLIST.length > 1) { self.todoTitle = item.TITLE; self.todoList = item.TODOLIST; sp.layer("#todolist") } else { if (self.deviceType == "pad") { window.location.href = item.FILEN + "&dotype=" + getDoType(self.type) } else { sp.openNewWindow(item.FILEN + "&dotype=" + getDoType(self.type), item.TITLE) } sp.layerhide(); } } self.btnDel = function (item) { var data = { routeinfoid: item.ROUTEINFOID, userid: self.userId } $http.post(apiurljs.login + "g2work/routeinfo/deleteDraftByRouteinfoid", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg) .success(function (obj) { var res = strToJson(s4.decryptData_CBC(obj.data)); if (res.success == true) { self.getData(self.pageno) } else { sp.dialog(res.message) } }) } self.btnRecall = function (routeid, kind) { var data = { routeid: routeid, kind: kind, userid: self.userId } $http.post(apiurljs.login + "g2work/routeinfo/queryDataRecallDoneByRouteid", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg) .success(function (obj) { var res = strToJson(s4.decryptData_CBC(obj.data)); var dialogHead = "温馨提示×"; var dialogBody = "
" + res.data.REMARK + "
"; var dialogFoot = "
"; $('.sp-dialog').html(dialogHead + dialogBody + dialogFoot); sp.openCenter(".sp-dialog"); ///取消按钮 $('.sp-closeDialog').click(function (event) { sp.closeCenter(".sp-dialog"); event.preventDefault(); event.stopPropagation(); }); //post消息的id $("#delDataTrue").click(function () { $http.post(apiurljs.login + "g2work/routeinfo/recallDoneByRouteid", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg) .success(function (obj) { var res = strToJson(s4.decryptData_CBC(obj.data)); sp.dialoghide() if (res.success == true) { self.getData(self.pageno) } else { sp.dialog(res.message) } }) }); }) } self.changeType = function (str) { if (self.type == str) { return; } else { var time1 = sp.getLocalDate1(); self.journalRecord(time1, sp.getLocalDate1(), "查询", "查询日志", "/g2work/routeinfo/" + self.Url) self.type = str; self.Url = getUrl(self.type); self.getData(1) } } self.getAddFlag = function () { var data = { userid: self.userId, ntops: 0 } $http.post(apiurljs.login + "g2work/desktop/queryWorkflowCando", data, postCfg) .success(function (obj) { var res = strToJson(s4.decryptData_CBC(obj.data)); self.lcList = []; self.activeLC = {}; var urlflowids = self.flowids.map(function (item) { return item.ID }).join("|"); var flows = urlflowids != "" ? urlflowids : "AA20|AA03|AA10|AA55|AA56|AA57|AA08|AA23|AA77|AA1C|AA06"; res.data.forEach(function (item) { //if ("AA03|AA04|AA06|AA07|AA08|AA09|AA10|AA11|AA20|AA21|AA23|AA24|AA40|AA41|AA42|AA43|AA49|AA55|AA56|AA57|AA63|AA75|AA76|AA77|AA78|AA79|AA80".indexOf(item.FLOWID) > -1) { if (flows.indexOf(item.FLOWID) > -1) { self.lcList.push(item); } }) }) } self.getAddFlag() self.addLC = function () { if (self.lcList.length == 1) { sp.openNewWindow(self.lcList[0].FILEN + "&dotype=1&GWCODE=" + self.activeLC.CODE + "&flowid=" + self.lcList[0].FLOWID, self.lcList[0].FLOWNAME) } else { //self.seeMB() sp.layer("#addLC"); } } self.seeMB = function () { var postData = { convertType: 0, zoom: 0.8, fileUrl: apiurljs.login.split("glwork/")[0] + "glworkweb/templates/docfile/" + self.activeLC.DOCFILE }; var postCfg_transfer = { headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, transformRequest: function (data) { return $.param(data); } }; $http.post(apiurljs.login.split("glwork/")[0] + "fcscloud/composite/httpfile", postData, postCfg_transfer) .success(function (res) { if (res.errorcode === 0) { $("#iframe_MB").attr("src", res.data.viewUrl); } else { sp.dialog(res.message); } }); } self.seeLCT = function (item, event) { event.preventDefault(); event.stopPropagation(); } self.goAddUrl = function () { if (!self.activeLC.FILEN) { return } sp.openNewWindow(self.activeLC.FILEN + "&dotype=1&GWCODE=" + self.activeLC.CODE + "&flowid=" + self.activeLC.FLOWID, self.activeLC.FLOWNAME) sp.layerhide() } self.printEXCEL = function () { self.columns = [ { header: "紧急程度", key: "JJCD", width: 20 }, { header: "公文种类", key: "GWZL", width: 20 }, { header: "标题", key: "TITLE", width: 100 }, { header: "发文字号", key: "FWZH", width: 20 }, { header: "主办处室", key: "NGRBM", width: 20 }, { header: "拟稿人", key: "NGR", width: 20 }, { header: "上一节点转办时间", key: "RECEIVEDATE", width: 25 } ] self.listExcel = self.list.map(function (item) { return { JJCD: item.JJCD, GWZL: item.GWZL, TITLE: item.TITLE, FWZH: item.FWZH, NGRBM: item.NGRBM, NGR: item.NGR, RECEIVEDATE: item.RECEIVEDATE } }) // 创建工作簿 var workbook = new ExcelJS.Workbook() // 添加工作表 var worksheet = workbook.addWorksheet('sheet1') // 设置表头 worksheet.columns = self.columns // 添加表体数据 self.listExcel.forEach(function (item) { worksheet.addRow(item) }) /** * 设置样式 */ // 1、设置标题行样式 var headerRow = worksheet.getRow(1) // 连续遍历所有非空单元格 headerRow.eachCell(function (cell) { // 边框 https://github.com/exceljs/exceljs/blob/HEAD/README_zh.md#%E8%BE%B9%E6%A1%86 cell.border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' }, } // 填充 https://github.com/exceljs/exceljs/blob/HEAD/README_zh.md#%E5%A1%AB%E5%85%85 cell.fill = { type: 'pattern', pattern: 'solid', fgColor: { argb: '4f81bd' } } // 字体 https://github.com/exceljs/exceljs/blob/HEAD/README_zh.md#%E5%AD%97%E4%BD%93 cell.font = { name: '微软雅黑', size: 11, bold: true, color: { argb: '000000' } } // 对齐 https://github.com/exceljs/exceljs/blob/HEAD/README_zh.md#%E5%AF%B9%E9%BD%90 cell.alignment = { vertical: 'middle', horizontal: 'center' } }) // 2、设置内容行样式 const bodyRow = worksheet.getRows(2, self.listExcel.length + 1) bodyRow.forEach(function (row) { //遍历此列中的所有当前单元格,包括空单元格 row.eachCell({ includeEmpty: true }, function (cell) { // 边框 cell.border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' }, } // 字体 https://github.com/exceljs/exceljs/blob/HEAD/README_zh.md#%E5%AD%97%E4%BD%93 cell.font = { name: '微软雅黑', size: 11, color: { argb: '000000' } } // 对齐 https://github.com/exceljs/exceljs/blob/HEAD/README_zh.md#%E5%AF%B9%E9%BD%90 cell.alignment = { vertical: 'middle', horizontal: 'center' } }) }) // 导出表格 workbook.xlsx.writeBuffer().then(function (buffer) { const blob = new Blob([buffer], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }) const link = document.createElement('a') link.href = URL.createObjectURL(blob) link.download = '行政公文' + sp.format(sp.getLocalDate()) + '.xlsx' link.click() URL.revokeObjectURL(link.href) // 下载完成释放掉blob对象 }) //}) } //记录日志 self.journalRecord = function (time1, time2, title, func, url) { if (!self.CrossPage || !self.CrossPage.cname) { return; } var data = { tablename: "SYS_CLICKLOG", data: { CTIME: time1 == null ? sp.getLocalDate1() : time1, TITLE: (title != "" ? self.CrossPage.cname + "/" + title : self.CrossPage.cname), REQUESTURL: url, REQUESTHEADERURL: window.location.origin, LOGTYPE: func, USERTYPE: $.cookie("GlWorkPlatform-userType"), ADMIN: $.cookie("GlWorkPlatform-userTypeEng"), CLIENTIP: sp.myIP(), PCNAME: sp.detectOS(), BROWSERNAME: sp.browser(), RESPONSETIME: time2 == null ? sp.getLocalDate1() : time2, USERID: self.userId, USERNAME: self.userName } } $http.post(apiurljs.login + "g2app/dataabase/insertFormData", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg) .success(function (res) { self.CrossPage.type = 1; }) } localStorage.removeItem("GlWorkPlatform-fawenbg-refresh") $interval(function () { if (localStorage.getItem("GlWorkPlatform-fawenbg-refresh") == 1) { localStorage.removeItem("GlWorkPlatform-fawenbg-refresh") self.refresh() } }, 1000) //头部下滚冻结 $(function () { //页面高度撑满 setTimeout(function () { if ($(".ibox-content").height() < $(window).height() - 31) { $(".ibox-content").css("height", $(window).height() - 31) } }, 1) }) }]) function getUrl(str) { switch (str) { case "todo": return "queryDataTodoWithPage"; break; case "done": return "queryDataDoneWithPage"; break; case "finish": return "queryDataFinishWithPage"; break; } } function getDoType(str) { switch (str) { case "todo": return 1; break; default: return 0; break; } }