1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[1076],{1076:function(t,e,a){a.r(e),a.d(e,{default:function(){return x}});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:4}},[e("div",{staticClass:"left-box"},[e("el-tree",{ref:"deviceTree",attrs:{data:t.treeData,"node-key":"name",props:t.defaultTime,"default-expand-all":"","highlight-current":!0},on:{"node-click":t.clickDevice}})],1)]),e("el-col",{attrs:{span:20}},[e("el-row",{attrs:{gutter:10}},[e("el-col",{attrs:{span:24}},[e("el-row",{attrs:{gutter:10}},[e("el-col",{attrs:{span:18}},[e("div",{staticClass:"top-left"},[e("div",[e("search-bar",{attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick}}),e("base-table",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,"page-width":50,"table-props":t.tableProps,"table-data":t.tableData,"max-height":t.tableH}})],1)])]),e("el-col",{attrs:{span:6}},[e("div",{staticClass:"top-right"},[e("div",[e("span",{staticClass:"title"},[t._v(t._s(t.eqName)+"计划产能")]),e("svg-icon",{staticClass:"icon-style",attrs:{"icon-class":"device_edit"},on:{click:t.editPower}})],1),e("el-row",[e("el-col",{attrs:{span:12}},[e("base-table",{attrs:{"table-props":t.tableProps2,"table-data":t.tableData2,"max-height":t.tableH}})],1),e("el-col",{attrs:{span:12}},[e("base-table",{attrs:{"table-props":t.tableProps2,"table-data":t.tableData3,"max-height":t.tableH}})],1)],1)],1)])],1)],1)],1),e("el-row",{attrs:{gutter:10}},[e("el-col",{attrs:{span:24}},[e("div",{staticClass:"right-bottom"},[e("device-oee-line",{ref:"oeeLine",attrs:{chartMsg:t.tableData}})],1)])],1)],1)],1),e("base-dialog",{attrs:{dialogTitle:"产能维护",dialogVisible:t.centervisible,"close-on-click-modal":!1,"before-close":t.handleCancel},on:{cancel:t.handleCancel,confirm:t.handleConfirm}},[e("product-power-edit",{ref:"productPower",on:{successSubmit:t.successSubmit}})],1)],1)},r=[],o=a(5591),i=a(475),l=a(147),u=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticStyle:{"text-align":"center","margin-bottom":"10px","font-weight":"bold"}},[t._v(" "+t._s(t.name)+" ")]),e("el-form",{ref:"form",attrs:{"label-width":"110px",model:t.form}},[e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"1月",prop:"january"}},[e("el-input-number",{staticStyle:{width:"100%"},attrs:{min:0},model:{value:t.form.january,callback:function(e){t.$set(t.form,"january",e)},expression:"form.january"}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"2月",prop:"february"}},[e("el-input-number",{staticStyle:{width:"100%"},attrs:{min:0},model:{value:t.form.february,callback:function(e){t.$set(t.form,"february",e)},expression:"form.february"}})],1)],1)],1),e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"3月",prop:"march"}},[e("el-input-number",{staticStyle:{width:"100%"},attrs:{min:0},model:{value:t.form.march,callback:function(e){t.$set(t.form,"march",e)},expression:"form.march"}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"4月",prop:"april"}},[e("el-input-number",{staticStyle:{width:"100%"},attrs:{min:0},model:{value:t.form.april,callback:function(e){t.$set(t.form,"april",e)},expression:"form.april"}})],1)],1)],1),e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"5月",prop:"may"}},[e("el-input-number",{staticStyle:{width:"100%"},attrs:{min:0},model:{value:t.form.may,callback:function(e){t.$set(t.form,"may",e)},expression:"form.may"}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"6月",prop:"june"}},[e("el-input-number",{staticStyle:{width:"100%"},attrs:{min:0},model:{value:t.form.june,callback:function(e){t.$set(t.form,"june",e)},expression:"form.june"}})],1)],1)],1),e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"7月",prop:"july"}},[e("el-input-number",{staticStyle:{width:"100%"},attrs:{min:0},model:{value:t.form.july,callback:function(e){t.$set(t.form,"july",e)},expression:"form.july"}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"8月",prop:"august"}},[e("el-input-number",{staticStyle:{width:"100%"},attrs:{min:0},model:{value:t.form.august,callback:function(e){t.$set(t.form,"august",e)},expression:"form.august"}})],1)],1)],1),e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"9月",prop:"september"}},[e("el-input-number",{staticStyle:{width:"100%"},attrs:{min:0},model:{value:t.form.september,callback:function(e){t.$set(t.form,"september",e)},expression:"form.september"}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"10月",prop:"october"}},[e("el-input-number",{staticStyle:{width:"100%"},attrs:{min:0},model:{value:t.form.october,callback:function(e){t.$set(t.form,"october",e)},expression:"form.october"}})],1)],1)],1),e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"11月",prop:"november"}},[e("el-input-number",{staticStyle:{width:"100%"},attrs:{min:0},model:{value:t.form.november,callback:function(e){t.$set(t.form,"november",e)},expression:"form.november"}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"12月",prop:"december"}},[e("el-input-number",{staticStyle:{width:"100%"},attrs:{min:0},model:{value:t.form.december,callback:function(e){t.$set(t.form,"december",e)},expression:"form.december"}})],1)],1)],1)],1)],1)},s=[],c={name:"productPowerEdit",data(){return{form:{},name:""}},mounted(){},methods:{init(t){this.name=t.name;let e=new Date(t.timePosition),a=e.getFullYear();(0,l.uN)({name:this.name,year:a}).then((t=>{console.log(t),0===t.code&&t.data&&(this.form=t.data)}))},submitForm(){console.log(this.form),(0,l.Ah)({...this.form}).then((t=>{0===t.code&&(this.$message({message:"操作成功",type:"success",duration:1500}),this.$emit("successSubmit"))}))},formClear(){this.$refs.form.resetFields()}}},m=c,p=a(1001),d=(0,p.Z)(m,u,s,!1,null,null,null),h=d.exports,f=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticStyle:{width:"100%"},style:{height:t.chartHeight+"px"},attrs:{id:"main"}})])},b=[],g=a(7171),y=a(5468),v={name:"deviceOeeLine",mixins:[y.Z],props:{chartMsg:{type:Array,required:!0,default:()=>[]}},data(){return{chartDom:"",chart:"",chartHeight:(0,i.NC)(214)/2-35}},mounted(){this.$nextTick((()=>{this.getChart()})),window.addEventListener("resize",(()=>{this.chartHeight=(0,i.NC)(214)/2-35}))},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(),this.chartDom=document.getElementById("main"),this.chart=g.S1(this.chartDom);let t=[],e=[],a=[],n=[],r=[];for(let i=0;i<this.chartMsg.length;i++)t.push(new Date(this.chartMsg[i].date).getDate()),e.push(this.chartMsg[i].activation),a.push(this.chartMsg[i].performance),n.push(this.chartMsg[i].failurePercent),r.push(this.chartMsg[i].combinedEfficiency);var o={color:["#5B8FF9","#5AD8A6","#5D7092","#F6BD16"],tooltip:{trigger:"axis"},legend:{data:["时间开动率","性能开动率","设备故障率","综合效率"],left:30},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",boundaryGap:!1,data:t},yAxis:{type:"value"},series:[{name:"时间开动率",type:"line",stack:"Total",data:e},{name:"性能开动率",type:"line",stack:"Total",data:a},{name:"设备故障率",type:"line",stack:"Total",data:n},{name:"综合效率",type:"line",stack:"Total",data:r}]};o&&this.chart.setOption(o)}}},M=v,w=(0,p.Z)(M,f,b,!1,null,null,null),P=w.exports;const S=[{prop:"recordDate",label:"时间",minWidth:160,filter:i.g6},{prop:"operationHours",label:"开动时长(h)",minWidth:100},{prop:"loadHours",label:"负荷时长(h)",minWidth:100},{prop:"actualCapacity",label:"实际产能",minWidth:90},{prop:"planCountDay",label:"设计产能",minWidth:90},{prop:"activation",label:"时间开动率",minWidth:100},{prop:"performance",label:"性能开动率",minWidth:100},{prop:"combinedEfficiency",label:"综合效率OEE",minWidth:110},{prop:"failureHours",label:"故障时长",minWidth:90},{prop:"failurePercent",label:"设备故障率",minWidth:100}],k=[{prop:"month",label:"月份",width:60},{prop:"value",label:"设计产能",minWidth:80}];var D={name:"deviceOEEPage",data(){return{treeData:[],defaultTime:{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:{current:1,size:500,timePosition:"",name:""},tableProps:S,tableData:[],tableH:(0,i.NC)(214)/2-75,tableProps2:k,tableData2:[],tableData3:[],centervisible:!1}},components:{productPowerEdit:h,deviceOeeLine:P},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,i.NC)(214)/2-75})),this.setDefaultVal(),this.getTree()},methods:{setDefaultVal(){let t=new Date,e=t.getFullYear(),a=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1;this.formConfig[0].defaultSelect=e+"-"+a,this.listQuery.timePosition=e+"-"+a},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.getList(),this.getPlan()}))},getList(){(0,l.zh)({...this.listQuery}).then((t=>{0===t.code&&(this.tableData=t.data)})),this.$refs.oeeLine.getChart()},buttonClick(t){"search"===t.btnName&&(this.listQuery.timePosition=t.timePosition,this.getList(),this.getPlan())},getPlan(){let t=new Date(this.listQuery.timePosition),e=t.getFullYear(),a=[{month:"1月",value:null,type:"january"},{month:"2月",value:null,type:"february"},{month:"3月",value:null,type:"march"},{month:"4月",value:null,type:"april"},{month:"5月",value:null,type:"may"},{month:"6月",value:null,type:"june"},{month:"7月",value:null,type:"july"},{month:"8月",value:null,type:"august"},{month:"9月",value:null,type:"september"},{month:"10月",value:null,type:"october"},{month:"11月",value:null,type:"november"},{month:"12月",value:null,type:"december"}];(0,l.uN)({name:this.eqName,year:e}).then((t=>{if(0===t.code&&t.data){let e=t.data;for(let t=0;t<a.length;t++)a[t].value=e[a[t].type]}else for(let e=0;e<a.length;e++)a[e].value=null;this.tableData2=a.slice(0,6),this.tableData3=a.slice(6,12)}))},clickDevice(t){t.children||(this.listQuery.name=t.name,this.eqName=t.name)},editPower(){this.centervisible=!0,this.$nextTick((()=>{this.$refs.productPower.init(this.listQuery)}))},handleCancel(){this.$refs.productPower.formClear(),this.centervisible=!1},handleConfirm(){this.$refs.productPower.submitForm()},successSubmit(){this.handleCancel(),this.getPlan()}}},Z=D,q=(0,p.Z)(Z,n,r,!1,null,"14745c10",null),x=q.exports},5591:function(t,e,a){a.d(e,{FH:function(){return l},Hp:function(){return u},JQ:function(){return i},SI:function(){return o},WQ:function(){return m},b6:function(){return s},iv:function(){return r},m:function(){return c}});var n=a(8859);function r(){return(0,n.Z)({url:"/common/getList",method:"post"})}function o(){return(0,n.Z)({url:"/common/getTreeData",method:"post"})}function i(t){return(0,n.Z)({url:"/common/updateEqSeq",method:"post",data:t})}function l(t){return(0,n.Z)({url:"/common/attachment/downloadFile",method:"get",responseType:"blob",params:t,timeout:6e4})}function u(t){return(0,n.Z)({url:"/common/getAlarmData",method:"post",data:t})}function s(t){return(0,n.Z)({url:"/common/getProductData",method:"post",data:t})}function c(t){return(0,n.Z)({url:"/common/getMaterialData",method:"post",data:t})}const m="/api/common/attachment/uploadFileFormData"},147:function(t,e,a){a.d(e,{$7:function(){return T},$F:function(){return b},$N:function(){return x},$d:function(){return p},A5:function(){return S},Ah:function(){return i},Dr:function(){return h},HJ:function(){return s},Im:function(){return w},KK:function(){return $},KQ:function(){return D},Ko:function(){return N},Ku:function(){return f},OP:function(){return u},OT:function(){return g},UP:function(){return v},Uw:function(){return j},YG:function(){return q},bO:function(){return m},co:function(){return y},fK:function(){return P},h:function(){return C},jL:function(){return A},lJ:function(){return d},lZ:function(){return l},pl:function(){return Z},rd:function(){return c},uN:function(){return o},yx:function(){return M},zG:function(){return k},zh:function(){return r}});var n=a(8859);function r(t){return(0,n.Z)({url:"/equipment/PerformanceAnalysis/get",method:"post",data:t})}function o(t){return(0,n.Z)({url:"/equipment/PerformanceAnalysis/getPlan",method:"post",data:t})}function i(t){return(0,n.Z)({url:"/equipment/PerformanceAnalysis/updatePlan",method:"post",data:t})}function l(t){return(0,n.Z)({url:"/equipment/PalletIndicatorAnalysis/page",method:"post",data:t})}function u(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 m(t){return(0,n.Z)({url:"/equipment/SparePartStock/get",method:"post",data:t})}function p(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 b(t){return(0,n.Z)({url:"/equipment/SparePartStock/export",method:"post",responseType:"blob",data:t,timeout:6e4})}function g(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 v(t){return(0,n.Z)({url:"/equipment/MaintainManage/pageSelect",method:"post",data:t})}function M(t){return(0,n.Z)({url:"/equipment/MaintainManage/unDistributeGet",method:"post",data:t})}function w(t){return(0,n.Z)({url:"/equipment/MaintainManage/create",method:"post",data:t})}function P(t){return(0,n.Z)({url:"/equipment/MaintainManage/unDistribute",method:"post",data:t})}function S(t){return(0,n.Z)({url:"/equipment/MaintainManage/completedDistribute",method:"post",data:t})}function k(t){return(0,n.Z)({url:"/equipment/MaintainManage/dispatch",method:"post",data:t})}function D(t){return(0,n.Z)({url:"/equipment/MaintainManage/confirm",method:"post",data:t})}function Z(t){return(0,n.Z)({url:"/equipment/MaintainManage/PlainMaintainDelete",method:"post",data:t})}function q(t){return(0,n.Z)({url:"/equipment/MaintainManage/PlanMaintainExport",method:"post",responseType:"blob",data:t,timeout:6e4})}function x(t){return(0,n.Z)({url:"/equipment/MaintainManage/AutoMaintainPageSelect",method:"post",data:t})}function C(t){return(0,n.Z)({url:"/equipment/MaintainManage/AutoMaintainAdd",method:"post",data:t})}function $(t){return(0,n.Z)({url:"/equipment/MaintainManage/AutoMaintainModify",method:"post",data:t})}function A(t){return(0,n.Z)({url:"/equipment/MaintainManage/AUtoMaintainDelete",method:"post",data:t})}function T(t){return(0,n.Z)({url:"/equipment/MaintainManage/AutoMaintainExport",method:"post",responseType:"blob",data:t,timeout:6e4})}function N(t){return(0,n.Z)({url:"/equipment/AlarmMessage/nowAlertSelect",method:"post",data:t})}function j(t){return(0,n.Z)({url:"/equipment/AlarmMessage/historyAlertSelect",method:"post",data:t})}}}]); |