1 line
8.5 KiB
JavaScript
1 line
8.5 KiB
JavaScript
"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=[],i=n(5591),o=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 o=1;o<=this.chartData.length;o++){let a="";a=o+"",t.push(a),e.push(this.chartData[o-1].operationHours),n.push(this.chartData[o-1].utilization.substring(0,5))}const r=["#73A0FA","#F6BE19","#5AD8A6"];var i={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}]};i&&this.chart.setOption(i)}}},h=m,d=n(1001),p=(0,d.Z)(h,o,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,i.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,d.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 c},JQ:function(){return o},SI:function(){return i},WQ:function(){return m},b6:function(){return s},iv:function(){return r},m:function(){return l}});var a=n(8859);function r(){return(0,a.Z)({url:"/common/getList",method:"post"})}function i(){return(0,a.Z)({url:"/common/getTreeData",method:"post"})}function o(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/getAlarmData",method:"post",data:t})}function s(t){return(0,a.Z)({url:"/common/getProductData",method:"post",data:t})}function l(t){return(0,a.Z)({url:"/common/getMaterialData",method:"post",data:t})}const m="/api/common/attachment/uploadFileFormData"},147:function(t,e,n){n.d(e,{$7:function(){return N},$F:function(){return y},$N:function(){return C},$d:function(){return d},A5:function(){return b},Ah:function(){return o},Dr:function(){return f},HJ:function(){return l},Im:function(){return S},KK:function(){return w},KQ:function(){return k},Ko:function(){return H},Ku:function(){return g},OP:function(){return s},OT:function(){return M},UP:function(){return q},Uw:function(){return Q},YG:function(){return x},bO:function(){return h},co:function(){return Z},fK:function(){return P},h:function(){return T},jD:function(){return u},jL:function(){return F},lJ:function(){return p},lZ:function(){return c},pl:function(){return v},rd:function(){return m},uN:function(){return i},yx:function(){return D},zG:function(){return A},zh:function(){return r}});var a=n(8859);function r(t){return(0,a.Z)({url:"/equipment/PerformanceAnalysis/get",method:"post",data:t})}function i(t){return(0,a.Z)({url:"/equipment/PerformanceAnalysis/getPlan",method:"post",data:t})}function o(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/SparePartStock/page",method:"post",data:t})}function m(t){return(0,a.Z)({url:"/equipment/SparePartStock/inStock",method:"post",data:t})}function h(t){return(0,a.Z)({url:"/equipment/SparePartStock/get",method:"post",data:t})}function d(t){return(0,a.Z)({url:"/equipment/SparePartStock/update",method:"post",data:t})}function p(t){return(0,a.Z)({url:"/equipment/SparePartStock/outStock",method:"post",data:t})}function f(t){return(0,a.Z)({url:"/equipment/SparePartStock/stockDetail",method:"post",data:t})}function g(t){return(0,a.Z)({url:"/equipment/SparePartStock/getBatchList",method:"post",data:t})}function y(t){return(0,a.Z)({url:"/equipment/SparePartStock/export",method:"post",responseType:"blob",data:t,timeout:6e4})}function M(t){return(0,a.Z)({url:"/equipment/SparePartStock/PageHis",method:"post",data:t})}function Z(t){return(0,a.Z)({url:"/equipment/SparePartStock/exportHis",method:"post",responseType:"blob",data:t,timeout:6e4})}function q(t){return(0,a.Z)({url:"/equipment/MaintainManage/pageSelect",method:"post",data:t})}function D(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 P(t){return(0,a.Z)({url:"/equipment/MaintainManage/unDistribute",method:"post",data:t})}function b(t){return(0,a.Z)({url:"/equipment/MaintainManage/completedDistribute",method:"post",data:t})}function A(t){return(0,a.Z)({url:"/equipment/MaintainManage/dispatch",method:"post",data:t})}function k(t){return(0,a.Z)({url:"/equipment/MaintainManage/confirm",method:"post",data:t})}function v(t){return(0,a.Z)({url:"/equipment/MaintainManage/PlainMaintainDelete",method:"post",data:t})}function x(t){return(0,a.Z)({url:"/equipment/MaintainManage/PlanMaintainExport",method:"post",responseType:"blob",data:t,timeout:6e4})}function C(t){return(0,a.Z)({url:"/equipment/MaintainManage/AutoMaintainPageSelect",method:"post",data:t})}function T(t){return(0,a.Z)({url:"/equipment/MaintainManage/AutoMaintainAdd",method:"post",data:t})}function w(t){return(0,a.Z)({url:"/equipment/MaintainManage/AutoMaintainModify",method:"post",data:t})}function F(t){return(0,a.Z)({url:"/equipment/MaintainManage/AUtoMaintainDelete",method:"post",data:t})}function N(t){return(0,a.Z)({url:"/equipment/MaintainManage/AutoMaintainExport",method:"post",responseType:"blob",data:t,timeout:6e4})}function H(t){return(0,a.Z)({url:"/equipment/AlarmMessage/nowAlertSelect",method:"post",data:t})}function Q(t){return(0,a.Z)({url:"/equipment/AlarmMessage/historyAlertSelect",method:"post",data:t})}}}]); |