| 1 |
- webpackJsonp([16],{RPx3:function(e,t){},y5I6:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=a("gyMJ"),n=a("2hfY"),r=a("t4zo"),o=a.n(r),s=a("uXZL"),i=a.n(s),c={name:"ReportStatistical",data:function(){return{station_data:[],table_data:[],send_data:{type:1,station:"",time:""},times:n.b,loading:!1,show_table:!0,currpage:1,pageSize:15,currentPage:null}},methods:{export_table:function(){if(!this.send_data.station||!this.send_data.time)return this.$message({type:"warning",showClose:!0,duration:1500,message:"请选择站/时间"});if(this.loading)return this.$message({type:"warning",showClose:!0,duration:1500,message:"表格数据正在加载中,暂不可导出"});if(!this.table_data.length)return this.$message({type:"warning",showClose:!0,duration:1500,message:"无数据,无法导出..."});var e=document.querySelector(".el-table__fixed"),t=void 0;e?(t=i.a.utils.table_to_book(document.querySelector("#out-table").removeChild(e)),document.querySelector("#out-table").appendChild(e)):t=i.a.utils.table_to_book(document.querySelector("#out-table"));var a=i.a.write(t,{bookType:"xlsx",bookSST:!0,type:"array"}),l=this.send_data.station+"-"+this.$dayjs(1e3*this.send_data.time).format("YYYY-MM-DD")+".xlsx";try{return o.a.saveAs(new Blob([a],{type:"application/octet-stream"}),l),this.$message({type:"success",showClose:!0,duration:1500,message:"导出成功!"})}catch(e){"undefined"!=typeof console&&console.log(e,a)}return a},get_table_data:function(){var e=this;if(!this.send_data.station)return this.$message.warning("无站数据...");this.send_data.time=this.times/1e3,this.currpage=1,this.currentPage=1,this.loading=!0,Object(l.D)(this.send_data).then(function(t){if(e.loading=!1,e.table_data=[],!t.length)return e.$message.warning("无数据...");e.table_data=t}).catch(function(t){console.log(t),e.loading=!1,e.table_data=[]})},handle_current_change:function(e){this.currpage=e},handle_size_change:function(e){this.currpage=1,this.currentPage=1,this.pageSize=e},objectSpanMethod:function(e){e.row,e.column;var t=e.rowIndex;if(0===e.columnIndex)return{rowspan:this.flitterData(this.table_data).one[t],colspan:1}},flitterData:function(e){var t=[],a=[],l=0;return e.forEach(function(n,r){0===r?(t.push(1),a.push(1)):n.mo_name===e[r-1].mo_name?(t[l]+=1,t.push(0)):(t.push(1),l=r)}),{one:t}},get_station_list:function(){var e=this;Object(l.E)().then(function(t){return t&&t.length?(e.station_data=t,e.send_data.station=t[0].id,e.get_table_data()):e.$message.warning("无站数据...")}).catch(function(e){console.log(e)})}},mounted:function(){this.get_station_list()}},_={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"report_box"},[a("div",{staticClass:"tools"},[a("el-select",{attrs:{"popper-append-to-body":!1,filterable:"",size:"small",placeholder:"请选择"},on:{change:e.get_table_data},model:{value:e.send_data.station,callback:function(t){e.$set(e.send_data,"station",t)},expression:"send_data.station"}},e._l(e.station_data,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1),e._v(" "),a("el-date-picker",{staticStyle:{width:"180px",margin:"0 8px"},attrs:{type:"date",size:"small",clearable:!1,format:"yyyy年MM月dd日","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"timestamp",placeholder:"选择日期"},on:{change:e.get_table_data},model:{value:e.times,callback:function(t){e.times=t},expression:"times"}}),e._v(" "),a("el-button",{attrs:{loading:e.loading,type:"primary",icon:"el-icon-refresh",size:"small"},on:{click:e.get_table_data}},[e._v("刷新")]),e._v(" "),a("el-button",{directives:[{name:"debounce",rawName:"v-debounce",value:e.export_table,expression:"export_table"}],staticStyle:{"margin-left":"8px"},attrs:{icon:"el-icon-download",type:"primary",size:"small"}},[e._v("导出")])],1),e._v(" "),a("div",{staticClass:"table_box"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.table_data.slice((e.currpage-1)*e.pageSize,e.currpage*e.pageSize),"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(31, 31, 31, 0.6)","span-method":e.objectSpanMethod}},[a("el-table-column",{attrs:{prop:"mo_name",label:"道岔",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"mp",label:"牵引点",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"转换阻力"}},[a("el-table-column",{attrs:{align:"center",label:"定扳反-峰值"}},[a("el-table-column",{attrs:{align:"center",prop:"d_convert_resist",label:"次数"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"d_convert_resist_max",label:"最大"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"d_convert_resist_min",label:"最小"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"d_convert_resist_avg",label:"平均"}})],1),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"反扳定-峰值"}},[a("el-table-column",{attrs:{align:"center",prop:"f_convert_resist",label:"次数"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"f_convert_resist_max",label:"最大"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"f_convert_resist_min",label:"最小"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"f_convert_resist_avg",label:"平均"}})],1)],1),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"锁闭力"}},[a("el-table-column",{attrs:{align:"center",label:"定位"}},[a("el-table-column",{attrs:{align:"center",prop:"d_suobi_lock",label:"次数"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"d_suobi_lock_max",label:"最大"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"d_suobi_lock_min",label:"最小"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"d_suobi_lock_avg",label:"平均"}})],1),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"反位"}},[a("el-table-column",{attrs:{align:"center",prop:"f_suobi_lock",label:"次数"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"f_suobi_lock_max",label:"最大"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"f_suobi_lock_min",label:"最小"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"f_suobi_lock_avg",label:"平均"}})],1)],1)],1),e._v(" "),a("el-pagination",{attrs:{background:"","page-size":e.pageSize,"page-sizes":[15,50,100],"current-page":e.currentPage,total:e.table_data.length,layout:"sizes, total, prev, pager, next, jumper"},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"size-change":e.handle_size_change,"current-change":e.handle_current_change}})],1),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],staticClass:"export_table"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.table_data,id:"out-table","span-method":e.objectSpanMethod}},[a("el-table-column",{attrs:{prop:"mo_name",label:"道岔",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"mp",label:"牵引点",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"转换阻力"}},[a("el-table-column",{attrs:{align:"center",label:"定扳反-峰值"}},[a("el-table-column",{attrs:{align:"center",prop:"d_convert_resist",label:"次数"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"d_convert_resist_max",label:"最大"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"d_convert_resist_min",label:"最小"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"d_convert_resist_avg",label:"平均"}})],1),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"反扳定-峰值"}},[a("el-table-column",{attrs:{align:"center",prop:"f_convert_resist",label:"次数"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"f_convert_resist_max",label:"最大"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"f_convert_resist_min",label:"最小"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"f_convert_resist_avg",label:"平均"}})],1)],1),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"锁闭力"}},[a("el-table-column",{attrs:{align:"center",label:"定位"}},[a("el-table-column",{attrs:{align:"center",prop:"d_suobi_lock",label:"次数"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"d_suobi_lock_max",label:"最大"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"d_suobi_lock_min",label:"最小"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"d_suobi_lock_avg",label:"平均"}})],1),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"反位"}},[a("el-table-column",{attrs:{align:"center",prop:"f_suobi_lock",label:"次数"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"f_suobi_lock_max",label:"最大"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"f_suobi_lock_min",label:"最小"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"f_suobi_lock_avg",label:"平均"}})],1)],1)],1)],1)])},staticRenderFns:[]};var b=a("VU/8")(c,_,!1,function(e){a("RPx3")},"data-v-49829f28",null);t.default=b.exports}});
|