12.4125f79e70238d6a93d4.js 4.0 KB

12
  1. webpackJsonp([12],{"4B1B":function(e,t){},XuoT:function(e,t){},swbJ:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a("l/JR"),r=a("t4zo"),n=a.n(r),l=a("uXZL"),s=a.n(l),i={name:"History",data:function(){return{sj:null,pageSize:1,pageSizes:1,pageCount:0,reqData:{ctg:"his",opt:"nonexcel"},tableData:[{id:7,error_code:"C04",equ_name:"输送机",error_name:"C04_Status.Emergency_Stop",error_reason:"C04急停",error_solve:"检查电控柜急停按钮",alarm_date:"/Date(1603778585000)/",if_deal:1,deal_man:"系统",deal_date:"/Date(1603848495000)/"}]}},created:function(){this.getData()},mounted:function(){clearInterval(this.sj);var e=this;this.sj=setInterval(function(){e.getData()},3e3)},beforeRouteLeave:function(e,t,a){a(),this.sj&&(clearInterval(this.sj),this.sj=null)},methods:{changePage:function(e){this.pageSize=e,this.getData()},getData:function(){var e=this,t={value:!0,PageIndex:this.pageSize,PageSize:13};Object(o.w)(t).then(function(t){e.tableData=t.resultData.result,e.pageCount=t.pageNumber})},timeFor:function(e){var t=new Date(parseInt(e.replace("/Date(","").replace(")/",""),10));return t.getFullYear()+"-"+((t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1)+"-")+((t.getDate()<10?"0"+t.getDate():t.getDate())+" ")+((t.getHours()<10?"0"+t.getHours():t.getHours())+":")+((t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes())+":")+(t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds())},downlodTable:function(){var e=this;this.$confirm("是否需要导出xlsx文档, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.downFile(),e.$message({type:"success",message:"导出成功!"})}).catch(function(){e.$message({type:"info",message:"已取消导出"})})},downFile:function(){var e=s.a.utils.table_to_book(document.querySelector("#userTableData")),t=s.a.write(e,{bookType:"xlsx",bookSST:!0,type:"array"});try{n.a.saveAs(new Blob([t],{type:"application/octet-stream"}),"报警统计.xlsx")}catch(e){"undefined"!=typeof console&&console.log(e,t)}return t},goTo:function(){this.$router.push("/Alarm/RealTime")},cellStyle:function(e){e.row,e.column,e.rowIndex;return 0===e.columnIndex?"background:#103366":""}}},c={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"logBox"},[a("div",{staticClass:"border_left_top border"}),e._v(" "),a("div",{staticClass:"border_top border"}),e._v(" "),a("div",{staticClass:"border_right_top border"}),e._v(" "),a("div",{staticClass:"border_left border"}),e._v(" "),a("div",{staticClass:"border_right border"}),e._v(" "),a("div",{staticClass:"border_left_bottom border"}),e._v(" "),a("div",{staticClass:"border_bottom border"}),e._v(" "),a("div",{staticClass:"border_right_bottom border"}),e._v(" "),a("el-button-group",{attrs:{id:"topButton2"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.goTo}},[e._v("当前")]),e._v(" "),a("el-button",{staticClass:"active",attrs:{type:"primary"}},[e._v("历史")])],1),e._v(" "),a("div",{staticClass:"downlodTable",on:{click:e.downlodTable}},[e._v("导出")]),e._v(" "),a("el-table",{staticStyle:{width:"100%",color:"#2daff5",height:"678px","overflow-y":"auto"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"error_position",align:"center",label:"报警位置",width:"180"}}),e._v(" "),a("el-table-column",{attrs:{prop:"error_content",align:"center",label:"报警内容"}}),e._v(" "),a("el-table-column",{attrs:{prop:"handle_method",align:"center",label:"处理方式"}}),e._v(" "),a("el-table-column",{attrs:{prop:"alarm_date",align:"center",label:"报警时间"}}),e._v(" "),a("el-table-column",{attrs:{prop:"deal_date",align:"center",label:"恢复时间"}})],1),e._v(" "),a("el-pagination",{attrs:{layout:"prev, pager, next",total:e.pageCount},on:{"current-change":e.changePage,"prev-click":e.changePage,"next-click":e.changePage}})],1)},staticRenderFns:[]};var u=a("VU/8")(i,c,!1,function(e){a("XuoT"),a("4B1B")},"data-v-0fb34f8e",null);t.default=u.exports}});
  2. //# sourceMappingURL=12.4125f79e70238d6a93d4.js.map