"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[318],{318:function(t,e,r){r.r(e),r.d(e,{default:function(){return h}});var n=function(){var t=this,e=t._self._c;return e("el-row",{staticClass:"main-box",attrs:{gutter:10}},[e("el-col",{attrs:{span:4}},[e("div",{staticClass:"left-box"},[e("el-tree",{ref:"deviceTree",attrs:{data:t.treeData,"node-key":"name",props:t.defaultProps,"default-expand-all":"","highlight-current":!0},on:{"node-click":t.clickDevice}})],1)]),e("el-col",{attrs:{span:20}},[e("div",{staticClass:"right-box"},[e("search-bar",{attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick}}),e("base-table",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,"table-props":t.tableProps,"table-data":t.tableData,"max-height":t.tableH}}),e("pagination",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,total:t.total},on:{"update:page":function(e){return t.$set(t.listQuery,"current",e)},"update:limit":function(e){return t.$set(t.listQuery,"size",e)},pagination:function(e){return t.getList()}}})],1)])],1)},o=[],a=r(475),u=r(5591),i=r(5093),l=r(381),d=r.n(l);const s=[{prop:"name",label:"单元/设备名称",width:300},{prop:"startTime",label:"开始时间",minWidth:160,filter:a.g6},{prop:"endTime",label:"结束时间",minWidth:160,filter:a.g6},{prop:"glassInNum",label:"投入数量"},{prop:"glassOutNum",label:"输出数量"},{prop:"glassMissNum",label:"损失数量"}];var c={name:"ProductionData",data(){return{treeData:[],defaultProps:{children:"children",label:"name"},formConfig:[{type:"datePicker",label:"开始时间",dateType:"datetimerange",format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-ddTHH:mm:ss",rangeSeparator:"-",startPlaceholder:"开始时间",endPlaceholder:"结束时间",param:"timeVal",defaultSelect:[],width:350},{type:"button",btnName:"查询",name:"search",color:"primary"},{type:"separate"},{type:"button",btnName:"导出",name:"export",color:"primary",plain:!0}],tableProps:s,tableData:[],tableH:(0,a.NC)(275),total:0,listQuery:{current:1,size:20,unitName:"",equipmentName:""},centervisible:!1,addOrEditTitle:""}},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,a.NC)(275)})),this.formConfig[0].defaultSelect=[d()().format("yyyy-MM-DD")+"T00:00:00",d()().format("yyyy-MM-DD")+"T23:59:59"],this.listQuery.startTime=d()().format("yyyy-MM-DD")+"T00:00:00",this.listQuery.endTime=d()().format("yyyy-MM-DD")+"T23:59:59",this.getTree()},methods:{getTree(){(0,u.SI)().then((t=>{this.treeData=t.data,this.listQuery.unitName=t.data[0].children[0].name,setTimeout((()=>{this.$refs.deviceTree.setCurrentKey(this.listQuery.unitName)}),100),this.getList()}))},getList(){(0,i.Ol)({...this.listQuery}).then((t=>{console.log(t),0===t.code&&t.data?(this.tableData=t.data.records,this.total=t.data.total):(this.tableData=[],this.total=0)}))},clickDevice(t){t.children?t.children&&t.parent?(this.listQuery.equipmentName="",this.listQuery.unitName=t.name):(this.listQuery.equipmentName="",this.listQuery.unitName=""):(this.listQuery.equipmentName=t.name,this.listQuery.unitName=""),this.getList()},buttonClick(t){switch(console.log(t),t.btnName){case"search":this.listQuery.startTime=t.timeVal?t.timeVal[0]:"",this.listQuery.endTime=t.timeVal?t.timeVal[1]:"",this.getList();break;default:(0,i.TQ)({...this.listQuery}).then((t=>{console.log(t);let e="";const r=t.headers["content-disposition"];r&&(e=decodeURIComponent(r.slice(r.indexOf("filename=")+9)));const n=new Blob([t.data]),o=new FileReader;o.readAsDataURL(n),o.onload=t=>{const r=document.createElement("a");r.download=e,r.href=t.target.result,document.body.appendChild(r),r.click(),document.body.removeChild(r)}}))}},successSubmit(t){alert(t),this.handleCancel()}}},m=c,f=r(1001),p=(0,f.Z)(m,n,o,!1,null,"3347f2a7",null),h=p.exports},5591:function(t,e,r){r.d(e,{FH:function(){return i},Hp:function(){return d},JQ:function(){return u},SI:function(){return a},Vx:function(){return s},WQ:function(){return f},b6:function(){return c},iv:function(){return o},jL:function(){return l},m:function(){return m}});var n=r(8859);function o(){return(0,n.Z)({url:"/common/getList",method:"post"})}function a(){return(0,n.Z)({url:"/common/getTreeData",method:"post"})}function u(t){return(0,n.Z)({url:"/common/updateEqSeq",method:"post",data:t})}function i(t){return(0,n.Z)({url:"/common/attachment/downloadFile",method:"get",responseType:"blob",params:t,timeout:6e4})}function l(t){return(0,n.Z)({url:"/common/getFpyData",method:"post",data:t})}function d(t){return(0,n.Z)({url:"/common/getAlarmData",method:"post",data:t})}function s(t){return(0,n.Z)({url:"/common/getCapacityData",method:"post",data:t})}function c(t){return(0,n.Z)({url:"/common/getProductData",method:"post",data:t})}function m(t){return(0,n.Z)({url:"/common/getMaterialData",method:"post",data:t})}const f="/api/common/attachment/uploadFileFormData"},5093:function(t,e,r){r.d(e,{B7:function(){return D},EM:function(){return s},EO:function(){return c},F7:function(){return g},Hq:function(){return N},Mk:function(){return o},Nm:function(){return w},Ol:function(){return p},SN:function(){return T},TQ:function(){return h},To:function(){return u},Tp:function(){return f},W9:function(){return a},Xe:function(){return i},a1:function(){return y},ag:function(){return Z},dg:function(){return Q},j4:function(){return k},lb:function(){return l},n8:function(){return P},w3:function(){return d},wM:function(){return C},xz:function(){return b},zz:function(){return m}});var n=r(8859);function o(t){return(0,n.Z)({url:"/order/workOrderProcess/getProcessInfo",method:"post",data:t})}function a(t){return(0,n.Z)({url:"/order/workOrder/page",method:"post",data:t})}function u(t){return(0,n.Z)({url:"/order/workOrder/add",method:"post",data:t})}function i(t){return(0,n.Z)({url:"/order/workOrder/delete",method:"post",data:t})}function l(t){return(0,n.Z)({url:"/order/workOrder/update",method:"post",data:t})}function d(t){return(0,n.Z)({url:"/order/workOrder/get",method:"post",data:t})}function s(t){return(0,n.Z)({url:"/order/workOrder/release",method:"post",data:t})}function c(t){return(0,n.Z)({url:"/order/workOrder/finish",method:"post",data:t})}function m(t){return(0,n.Z)({url:"/order/workOrder/importTemplate",method:"post",data:t})}const f="/api/order/workOrder/import";function p(t){return(0,n.Z)({url:"/order/ProData/page",method:"post",data:t})}function h(t){return(0,n.Z)({url:"/order/ProData/export",method:"post",responseType:"blob",data:t,timeout:6e4})}function y(t){return(0,n.Z)({url:"/order/unloadPallet/page",method:"post",data:t})}function g(t){return(0,n.Z)({url:"/order/unloadPallet/add",method:"post",data:t})}function b(t){return(0,n.Z)({url:"/order/unloadPallet/get",method:"post",data:t})}function Z(t){return(0,n.Z)({url:"/order/unloadPallet/update",method:"post",data:t})}function D(t){return(0,n.Z)({url:"/order/unloadPallet/delete",method:"post",data:t})}function k(t){return(0,n.Z)({url:"/order/unloadPallet/verify",method:"post",formState:!0,data:t})}function T(t){return(0,n.Z)({url:"/order/unloadPallet/finish",method:"post",data:t})}function Q(t){return(0,n.Z)({url:"/order/unloadPallet/continuePack",method:"post",data:t})}function w(t){return(0,n.Z)({url:"/order/unloadPallet/getDetail",method:"post",data:t})}function P(t){return(0,n.Z)({url:"/order/unloadPallet/glassIdTrace",method:"post",formState:!0,data:t})}function C(t){return(0,n.Z)({url:"/order/reloadRack/reload",method:"post",data:t})}function N(t){return(0,n.Z)({url:"/order/reloadRack/end",method:"post",data:t})}}}]);