1 line
8.8 KiB
JavaScript
1 line
8.8 KiB
JavaScript
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[4026],{4026:function(t,e,a){a.r(e),a.d(e,{default:function(){return Z}});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),o=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticStyle:{width:"100%"},style:{height:t.chartHeight+"px"},attrs:{id:"palletLevel"}})])},u=[],l=a(7171),s=a(5468),p={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)}}},c=p,h=a(1001),d=(0,h.Z)(c,o,u,!1,null,null,null),m=d.exports,f=a(147);const g=[{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:"玻璃厚度"}],b=[{prop:"productType",label:"产品分类"},{prop:"num",label:"数量"},{prop:"percentage",label:"占比"}];var M={name:"analysisOfPallet",components:{palletLevelChart:m},data(){return{formConfig:[{type:"input",label:"托盘ID",placeholder:"托盘ID",param:"palletId"},{type:"datePicker",label:"产品上片时间",dateType:"datetime",format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss",placeholder:"产品上片时间",param:"testTime",width:200},{type:"button",btnName:"查询",name:"search",color:"primary"}],listQuery:{current:1,size:20,palletId:""},total:0,tableProps:g,tableData:[],tableH:(0,i.NC)(330),listQuery2:{current:1,size:500},tableProps2:b,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.getList()},methods:{getList(){(0,f.lZ)({...this.listQuery}).then((t=>{this.tableData=t.data.records,this.total=t.data.total,this.setCurrent();let e=this.tableData[0].palletId;this.getLevel(e)}))},setCurrent(){let t=this;setTimeout((function(){t.$refs.palletTable1.setCurrent("palletTable",0)}),500)},getLevel(){(0,f.OP)({id:1}).then((t=>{if(this.tableData2=[],0===t.code){const e=t.data;this.chartMsg=e,console.log(this.chartMsg);let a={productType:"良品"};a.num=e.okNum,a.percentage=e.okPercentage,this.tableData2.push(a);let n={productType:"待再加工"};n.num=e.reprocessNum,n.percentage=e.rePercentage,this.tableData2.push(n);let r={productType:"废品"};r.num=e.wasteNum,r.percentage=e.noPercentage,this.tableData2.push(r)}}))},buttonClick(t){"search"===t.btnName&&(this.listQuery.palletId=t.palletId,this.getList())},selectPallet(t){let e=t.palletId;this.getLevel(e)}}},y=M,P=(0,h.Z)(y,n,r,!1,null,"8a08693c",null),Z=P.exports},147:function(t,e,a){a.d(e,{$7:function(){return w},$F:function(){return g},$N:function(){return T},$d:function(){return h},A5:function(){return v},Ah:function(){return o},Dr:function(){return m},HJ:function(){return s},Im:function(){return Z},KK:function(){return I},KQ:function(){return S},Ko:function(){return A},Ku:function(){return f},OP:function(){return l},OT:function(){return b},UP:function(){return y},Uw:function(){return N},YG:function(){return D},bO:function(){return c},co:function(){return M},fK:function(){return q},h:function(){return H},jL:function(){return L},lJ:function(){return d},lZ:function(){return u},pl:function(){return k},rd:function(){return p},uN:function(){return i},yx:function(){return P},zG:function(){return C},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 o(t){return(0,n.Z)({url:"/equipment/PerformanceAnalysis/updatePlan",method:"post",data:t})}function u(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 p(t){return(0,n.Z)({url:"/equipment/SparePartStock/inStock",method:"post",data:t})}function c(t){return(0,n.Z)({url:"/equipment/SparePartStock/get",method:"post",data:t})}function h(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 m(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 M(t){return(0,n.Z)({url:"/equipment/SparePartStock/exportHis",method:"post",responseType:"blob",data:t,timeout:6e4})}function y(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 C(t){return(0,n.Z)({url:"/equipment/MaintainManage/dispatch",method:"post",data:t})}function S(t){return(0,n.Z)({url:"/equipment/MaintainManage/confirm",method:"post",data:t})}function k(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 T(t){return(0,n.Z)({url:"/equipment/MaintainManage/AutoMaintainPageSelect",method:"post",data:t})}function H(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 L(t){return(0,n.Z)({url:"/equipment/MaintainManage/AUtoMaintainDelete",method:"post",data:t})}function w(t){return(0,n.Z)({url:"/equipment/MaintainManage/AutoMaintainExport",method:"post",responseType:"blob",data:t,timeout:6e4})}function A(t){return(0,n.Z)({url:"/equipment/AlarmMessage/nowAlertSelect",method:"post",data:t})}function N(t){return(0,n.Z)({url:"/equipment/AlarmMessage/historyAlertSelect",method:"post",data:t})}}}]); |