1 line
9.5 KiB
JavaScript
1 line
9.5 KiB
JavaScript
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[5067],{5067:function(t,e,a){a.r(e),a.d(e,{default:function(){return v}});var n=function(){var t=this,e=t._self._c;return e("div",[e("el-row",{staticClass:"main-box",attrs:{gutter:10}},[e("el-col",{attrs:{span:18}},[e("div",{staticClass:"left-box"},[e("search-bar",{ref:"searchBarForm",attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick}}),e("base-table",{ref:"palletTable1",attrs:{id:"palletTable",page:t.listQuery.current,limit:t.listQuery.size,"table-props":t.tableProps,"table-data":t.tableData,"max-height":t.tableH,"highlight-current-row":""},on:{"current-change":t.selectPallet}}),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)]),e("el-col",{attrs:{span:6}},[e("div",{staticClass:"right-box"},[e("el-row",[e("el-col",{staticClass:"rigth-top"},[e("span",{staticClass:"title"},[t._v("托盘对应产品等级数据")]),e("base-table",{attrs:{"table-props":t.tableProps2,"table-data":t.tableData2,"max-height":t.tableH2}})],1)],1),e("el-row",[e("el-col",{staticClass:"right-bottom"},[e("span",{staticClass:"title"},[t._v("托盘对应产品等级分析")]),e("pallet-level-chart",{attrs:{chartMsg:t.chartMsg}})],1)],1)],1)])],1)],1)},r=[],i=a(475),u=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticStyle:{width:"100%"},style:{height:t.chartHeight+"px"},attrs:{id:"palletLevel"}})])},o=[],l=a(7171),s=a(5468),c={name:"PalletLevelChart",mixins:[s.Z],props:{chartMsg:{type:Object,default:()=>{}}},data(){return{chart:"",chartHeight:.5*(0,i.NC)(400)}},mounted(){this.$nextTick((()=>{this.getChart()})),window.addEventListener("resize",(()=>{this.chartHeight=.5*(0,i.NC)(400)}))},watch:{chartMsg:function(){this.getChart()}},beforeDestroy(){this.chart&&(this.chart.dispose(),this.chart=null)},methods:{getChart(){null!==this.chart&&""!==this.chart&&void 0!==this.chart&&this.chart.dispose();var t=document.getElementById("palletLevel");this.chart=l.S1(t),console.log(this.chartMsg);var e=this.chartMsg.okNum,a=this.chartMsg.reprocessNum,n=this.chartMsg.wasteNum;const r=["rgba(91, 143, 249, 0.8500)","rgba(90, 216, 166, 0.8500)","rgba(246, 189, 22, 0.8500)"];var i={color:r,legend:{icon:"circle",bottom:"0",left:"center",itemWidth:10,itemHeight:10},series:{name:"palletLeve",type:"pie",radius:["40%","60%"],center:["50%","45%"],data:[{value:e,name:"良品 "+e},{value:a,name:"再加工品 "+a},{value:n,name:"废品 "+n}]}};i&&this.chart.setOption(i)}}},p=c,m=a(1001),d=(0,m.Z)(p,u,o,!1,null,null,null),h=d.exports,f=a(147),g=a(381),b=a.n(g);const y=[{prop:"proLineName",label:"产线",minWidth:80},{prop:"code",label:"工单编号",minWidth:120},{prop:"glassId",label:"玻璃ID",minWidth:120},{prop:"rackId",label:"成品架ID",minWidth:120},{prop:"loadTime",label:"产品上片时间",filter:i.g6,minWidth:160},{prop:"unloadTime",label:"产品下片时间",filter:i.g6,minWidth:160},{prop:"grade",label:"玻璃等级",minWidth:80},{prop:"palletId",label:"面磨托盘ID",minWidth:120},{prop:"glassLength",label:"玻璃长度"},{prop:"glassWidth",label:"玻璃宽度"},{prop:"glassHeight",label:"玻璃厚度"}],M=[{prop:"productType",label:"产品分类"},{prop:"num",label:"数量"},{prop:"percentage",label:"占比"}];var P={name:"analysisOfPallet",components:{palletLevelChart:h},data(){return{formConfig:[{type:"input",label:"托盘ID",placeholder:"托盘ID",param:"palletId"},{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"}],listQuery:{current:1,size:20,palletId:"",startTime:"",endTime:""},total:0,tableProps:y,tableData:[],tableH:(0,i.NC)(330),listQuery2:{current:1,size:500},tableProps2:M,tableData2:[],tableH2:(0,i.NC)(360)/2,chartMsg:{}}},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,i.NC)(330),this.tableH2=(0,i.NC)(360)/2})),this.formConfig[1].defaultSelect=[b()().format("yyyy-MM-DD")+"T00:00:00",b()().format("yyyy-MM-DD")+"T23:59:59"],this.listQuery.startTime=b()().format("yyyy-MM-DD")+"T00:00:00",this.listQuery.endTime=b()().format("yyyy-MM-DD")+"T23:59:59"},methods:{getList(){this.listQuery.palletId?((0,f.lZ)({...this.listQuery}).then((t=>{this.tableData=t.data.records,this.total=t.data.total})),this.getLevel()):this.$message.error("请先输入托盘id后再查询")},getLevel(){(0,f.OP)({palletId:this.listQuery.palletId,startTime:this.listQuery.startTime,endTime:this.listQuery.endTime}).then((t=>{if(this.tableData2=[],0===t.code){const e=t.data;this.chartMsg=e,console.log(this.chartMsg);let a=[{name:"良品",num:"okNum",percentage:"okPercentage"},{name:"待再加工",num:"reprocessNum",percentage:"rePercentage"},{name:"废品",num:"wasteNum",percentage:"noPercentage"},{name:"抽检",num:"checkNum",percentage:"checkPercentage"},{name:"废弃",num:"scrapNum",percentage:"scrapPercentage"},{name:"碎片",num:"chipNum",percentage:"checkPercentage"},{name:"次良品",num:"inferiorNum",percentage:"inferiorPercentage"}];for(let t=0;t<7;t++){let n={};n.productType=a[t].name,n.num=e[a[t].num],n.percentage=e[a[t].percentage],this.tableData2.push(n)}}}))},buttonClick(t){"search"===t.btnName&&(this.listQuery.palletId=t.palletId,this.listQuery.startTime=t.timeVal?t.timeVal[0]:"",this.listQuery.endTime=t.timeVal?t.timeVal[1]:"",this.getList())},selectPallet(t){let e=t.palletId;this.getLevel(e)}}},Z=P,q=(0,m.Z)(Z,n,r,!1,null,"86c9b5c0",null),v=q.exports},147:function(t,e,a){a.d(e,{$7:function(){return H},$F:function(){return g},$N:function(){return C},$d:function(){return m},A5:function(){return v},Ah:function(){return u},Dr:function(){return h},HJ:function(){return s},Im:function(){return Z},KK:function(){return I},KQ:function(){return k},Ko:function(){return w},Ku:function(){return f},OP:function(){return l},OT:function(){return b},UP:function(){return M},Uw:function(){return A},YG:function(){return D},bO:function(){return p},co:function(){return y},fK:function(){return q},h:function(){return N},jL:function(){return Q},lJ:function(){return d},lZ:function(){return o},pl:function(){return T},rd:function(){return c},uN:function(){return i},yx:function(){return P},zG:function(){return S},zh:function(){return r}});var n=a(8859);function r(t){return(0,n.Z)({url:"/equipment/PerformanceAnalysis/get",method:"post",data:t})}function i(t){return(0,n.Z)({url:"/equipment/PerformanceAnalysis/getPlan",method:"post",data:t})}function u(t){return(0,n.Z)({url:"/equipment/PerformanceAnalysis/updatePlan",method:"post",data:t})}function o(t){return(0,n.Z)({url:"/equipment/PalletIndicatorAnalysis/page",method:"post",data:t})}function l(t){return(0,n.Z)({url:"/equipment/PalletIndicatorAnalysis/getType",method:"post",data:t})}function s(t){return(0,n.Z)({url:"/equipment/SparePartStock/page",method:"post",data:t})}function c(t){return(0,n.Z)({url:"/equipment/SparePartStock/inStock",method:"post",data:t})}function p(t){return(0,n.Z)({url:"/equipment/SparePartStock/get",method:"post",data:t})}function m(t){return(0,n.Z)({url:"/equipment/SparePartStock/update",method:"post",data:t})}function d(t){return(0,n.Z)({url:"/equipment/SparePartStock/outStock",method:"post",data:t})}function h(t){return(0,n.Z)({url:"/equipment/SparePartStock/stockDetail",method:"post",data:t})}function f(t){return(0,n.Z)({url:"/equipment/SparePartStock/getBatchList",method:"post",data:t})}function g(t){return(0,n.Z)({url:"/equipment/SparePartStock/export",method:"post",responseType:"blob",data:t,timeout:6e4})}function b(t){return(0,n.Z)({url:"/equipment/SparePartStock/PageHis",method:"post",data:t})}function y(t){return(0,n.Z)({url:"/equipment/SparePartStock/exportHis",method:"post",responseType:"blob",data:t,timeout:6e4})}function M(t){return(0,n.Z)({url:"/equipment/MaintainManage/pageSelect",method:"post",data:t})}function P(t){return(0,n.Z)({url:"/equipment/MaintainManage/unDistributeGet",method:"post",data:t})}function Z(t){return(0,n.Z)({url:"/equipment/MaintainManage/create",method:"post",data:t})}function q(t){return(0,n.Z)({url:"/equipment/MaintainManage/unDistribute",method:"post",data:t})}function v(t){return(0,n.Z)({url:"/equipment/MaintainManage/completedDistribute",method:"post",data:t})}function S(t){return(0,n.Z)({url:"/equipment/MaintainManage/dispatch",method:"post",data:t})}function k(t){return(0,n.Z)({url:"/equipment/MaintainManage/confirm",method:"post",data:t})}function T(t){return(0,n.Z)({url:"/equipment/MaintainManage/PlainMaintainDelete",method:"post",data:t})}function D(t){return(0,n.Z)({url:"/equipment/MaintainManage/PlanMaintainExport",method:"post",responseType:"blob",data:t,timeout:6e4})}function C(t){return(0,n.Z)({url:"/equipment/MaintainManage/AutoMaintainPageSelect",method:"post",data:t})}function N(t){return(0,n.Z)({url:"/equipment/MaintainManage/AutoMaintainAdd",method:"post",data:t})}function I(t){return(0,n.Z)({url:"/equipment/MaintainManage/AutoMaintainModify",method:"post",data:t})}function Q(t){return(0,n.Z)({url:"/equipment/MaintainManage/AUtoMaintainDelete",method:"post",data:t})}function H(t){return(0,n.Z)({url:"/equipment/MaintainManage/AutoMaintainExport",method:"post",responseType:"blob",data:t,timeout:6e4})}function w(t){return(0,n.Z)({url:"/equipment/AlarmMessage/nowAlertSelect",method:"post",data:t})}function A(t){return(0,n.Z)({url:"/equipment/AlarmMessage/historyAlertSelect",method:"post",data:t})}}}]); |