"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[8603],{8603:function(t,e,n){n.r(e),n.d(e,{default:function(){return q}});var a=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:4}},[e("div",{staticClass:"left-box"},[e("el-tree",{ref:"deviceTree",attrs:{data:t.treeData,"node-key":"name",props:t.defaultTree,"highlight-current":!0,"default-expand-all":""},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("rate-analysis-chart",{attrs:{chartData:t.chartData}})],1)])],1)],1)},r=[],o=n(5591),i=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticStyle:{width:"100%"},style:{height:t.chartHeight+"px"},attrs:{id:"rateChart"}})])},u=[],c=n(7171),s=n(475),l=n(5468),m={name:"RateAnalysisChart",mixins:[l.Z],data(){return{chartDom:"",chart:"",chartHeight:(0,s.NC)(214)-35}},props:{chartData:{type:Array,required:!0,default:()=>[]}},mounted(){this.$nextTick((()=>{this.getChart()})),window.addEventListener("resize",(()=>{this.chartHeight=(0,s.NC)(214)-35}))},watch:{chartData:function(){this.getChart()}},methods:{getChart(){null!==this.chart&&""!==this.chart&&void 0!==this.chart&&this.chart.dispose(),this.chartDom=document.getElementById("rateChart"),this.chart=c.S1(this.chartDom);const t=[],e=[],n=[],a=new Array(31).fill(24);for(let i=1;i<=this.chartData.length;i++){let a="";a=i+"",t.push(a),e.push(this.chartData[i-1].operationHours),n.push(this.chartData[i-1].utilization.substring(0,5))}const r=["#73A0FA","#F6BE19","#5AD8A6"];var o={color:r,tooltip:{trigger:"axis",axisPointer:{type:"cross",crossStyle:{color:"#999"}}},legend:{data:["实际运行小时数","理论运行时长","设备利用率"]},xAxis:[{type:"category",data:t,axisPointer:{type:"shadow"}}],yAxis:[{type:"value",name:"理论运行时长",axisLabel:{formatter:"{value} h"}},{type:"value",name:"设备利用率",axisLabel:{formatter:"{value} %"}}],series:[{name:"实际运行小时数",type:"bar",tooltip:{valueFormatter:function(t){return t+" h"}},data:e},{name:"理论运行时长",type:"line",tooltip:{valueFormatter:function(t){return t+" h"}},data:a},{name:"设备利用率",type:"line",yAxisIndex:1,tooltip:{valueFormatter:function(t){return t+"%"}},data:n}]};o&&this.chart.setOption(o)}}},d=m,h=n(1001),p=(0,h.Z)(d,i,u,!1,null,null,null),f=p.exports,g=n(147),y={name:"utilizationRateAnalysis",data(){return{treeData:[],defaultTree:{children:"children",label:"name"},eqName:"",chooseMonth:"",formConfig:[{type:"datePicker",label:"月份选择",dateType:"month",format:"yyyy-MM",valueFormat:"yyyy-MM",placeholder:"月份选择",param:"timePosition",defaultSelect:"",width:200},{type:"button",btnName:"查询",name:"search",color:"primary"}],listQuery:{timePosition:"",name:""},chartData:[]}},components:{rateAnalysisChart:f},mounted(){this.setDefaultVal(),this.getTree()},methods:{setDefaultVal(){let t=new Date,e=t.getFullYear(),n=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1;this.formConfig[0].defaultSelect=e+"-"+n,this.listQuery.timePosition=e+"-"+n},getTree(){(0,o.SI)().then((t=>{this.treeData=t.data,this.eqName=t.data[0].children[0].children[0].name,this.listQuery.name=this.eqName,setTimeout((()=>{this.$refs.deviceTree.setCurrentKey(this.eqName)}),100)})),this.getData()},getData(){(0,g.jD)({...this.listQuery}).then((t=>{console.log(t),0===t.code&&t.data?this.chartData=t.data:this.chartData=[]}))},buttonClick(t){console.log(t),this.listQuery.timePosition=t.timePosition,this.getData()},clickDevice(t){t.children||(this.listQuery.name=t.name,this.eqName=t.name)}}},M=y,Z=(0,h.Z)(M,a,r,!1,null,"1683220e",null),q=Z.exports},5591:function(t,e,n){n.d(e,{FH:function(){return u},Hp:function(){return s},JQ:function(){return i},SI:function(){return o},Vx:function(){return l},WQ:function(){return h},b6:function(){return m},iv:function(){return r},jL:function(){return c},m:function(){return d}});var a=n(8859);function r(){return(0,a.Z)({url:"/common/getList",method:"post"})}function o(){return(0,a.Z)({url:"/common/getTreeData",method:"post"})}function i(t){return(0,a.Z)({url:"/common/updateEqSeq",method:"post",data:t})}function u(t){return(0,a.Z)({url:"/common/attachment/downloadFile",method:"get",responseType:"blob",params:t,timeout:6e4})}function c(t){return(0,a.Z)({url:"/common/getFpyData",method:"post",data:t})}function s(t){return(0,a.Z)({url:"/common/getAlarmData",method:"post",data:t})}function l(t){return(0,a.Z)({url:"/common/getCapacityData",method:"post",data:t})}function m(t){return(0,a.Z)({url:"/common/getProductData",method:"post",data:t})}function d(t){return(0,a.Z)({url:"/common/getMaterialData",method:"post",data:t})}const h="/api/common/attachment/uploadFileFormData"},147:function(t,e,n){n.d(e,{$7:function(){return Q},$F:function(){return Z},$N:function(){return F},$d:function(){return f},A5:function(){return k},Ah:function(){return i},Az:function(){return m},Dr:function(){return y},HJ:function(){return d},Im:function(){return S},KK:function(){return N},KQ:function(){return x},Ko:function(){return z},Ku:function(){return M},OP:function(){return s},OT:function(){return q},UP:function(){return P},Uw:function(){return I},YG:function(){return T},bO:function(){return p},co:function(){return D},fK:function(){return b},h:function(){return w},jD:function(){return u},jL:function(){return H},lJ:function(){return g},lZ:function(){return c},pl:function(){return C},rd:function(){return h},tR:function(){return l},uN:function(){return o},yx:function(){return A},zG:function(){return v},zh:function(){return r}});var a=n(8859);function r(t){return(0,a.Z)({url:"/equipment/PerformanceAnalysis/get",method:"post",data:t})}function o(t){return(0,a.Z)({url:"/equipment/PerformanceAnalysis/getPlan",method:"post",data:t})}function i(t){return(0,a.Z)({url:"/equipment/PerformanceAnalysis/updatePlan",method:"post",data:t})}function u(t){return(0,a.Z)({url:"/equipment/PerformanceAnalysis/getUtilization",method:"post",data:t})}function c(t){return(0,a.Z)({url:"/equipment/PalletIndicatorAnalysis/page",method:"post",data:t})}function s(t){return(0,a.Z)({url:"/equipment/PalletIndicatorAnalysis/getType",method:"post",data:t})}function l(t){return(0,a.Z)({url:"/equipment/PerformanceAnalysis/getMTBRF",method:"post",data:t})}function m(t){return(0,a.Z)({url:"/equipment/PerformanceAnalysis/getMTBRFWeek",method:"post",data:t})}function d(t){return(0,a.Z)({url:"/equipment/SparePartStock/page",method:"post",data:t})}function h(t){return(0,a.Z)({url:"/equipment/SparePartStock/inStock",method:"post",data:t})}function p(t){return(0,a.Z)({url:"/equipment/SparePartStock/get",method:"post",data:t})}function f(t){return(0,a.Z)({url:"/equipment/SparePartStock/update",method:"post",data:t})}function g(t){return(0,a.Z)({url:"/equipment/SparePartStock/outStock",method:"post",data:t})}function y(t){return(0,a.Z)({url:"/equipment/SparePartStock/stockDetail",method:"post",data:t})}function M(t){return(0,a.Z)({url:"/equipment/SparePartStock/getBatchList",method:"post",data:t})}function Z(t){return(0,a.Z)({url:"/equipment/SparePartStock/export",method:"post",responseType:"blob",data:t,timeout:6e4})}function q(t){return(0,a.Z)({url:"/equipment/SparePartStock/PageHis",method:"post",data:t})}function D(t){return(0,a.Z)({url:"/equipment/SparePartStock/exportHis",method:"post",responseType:"blob",data:t,timeout:6e4})}function P(t){return(0,a.Z)({url:"/equipment/MaintainManage/pageSelect",method:"post",data:t})}function A(t){return(0,a.Z)({url:"/equipment/MaintainManage/unDistributeGet",method:"post",data:t})}function S(t){return(0,a.Z)({url:"/equipment/MaintainManage/create",method:"post",data:t})}function b(t){return(0,a.Z)({url:"/equipment/MaintainManage/unDistribute",method:"post",data:t})}function k(t){return(0,a.Z)({url:"/equipment/MaintainManage/completedDistribute",method:"post",data:t})}function v(t){return(0,a.Z)({url:"/equipment/MaintainManage/dispatch",method:"post",data:t})}function x(t){return(0,a.Z)({url:"/equipment/MaintainManage/confirm",method:"post",data:t})}function C(t){return(0,a.Z)({url:"/equipment/MaintainManage/PlainMaintainDelete",method:"post",data:t})}function T(t){return(0,a.Z)({url:"/equipment/MaintainManage/PlanMaintainExport",method:"post",responseType:"blob",data:t,timeout:6e4})}function F(t){return(0,a.Z)({url:"/equipment/MaintainManage/AutoMaintainPageSelect",method:"post",data:t})}function w(t){return(0,a.Z)({url:"/equipment/MaintainManage/AutoMaintainAdd",method:"post",data:t})}function N(t){return(0,a.Z)({url:"/equipment/MaintainManage/AutoMaintainModify",method:"post",data:t})}function H(t){return(0,a.Z)({url:"/equipment/MaintainManage/AUtoMaintainDelete",method:"post",data:t})}function Q(t){return(0,a.Z)({url:"/equipment/MaintainManage/AutoMaintainExport",method:"post",responseType:"blob",data:t,timeout:6e4})}function z(t){return(0,a.Z)({url:"/equipment/AlarmMessage/nowAlertSelect",method:"post",data:t})}function I(t){return(0,a.Z)({url:"/equipment/AlarmMessage/historyAlertSelect",method:"post",data:t})}}}]);