1 line
21 KiB
JavaScript
1 line
21 KiB
JavaScript
|
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[8466],{8466:function(t,s,a){a.r(s),a.d(s,{default:function(){return C}});var i=function(){var t=this,s=t._self._c;return s("div",[s("div",{staticClass:"top-box"},[s("production-line-diagram")],1),s("el-row",{staticClass:"bottom-box",attrs:{gutter:10}},[s("el-col",{staticClass:"area",attrs:{span:4}},[s("span",{staticClass:"title"},[t._v("终检单元")]),s("base-table",{attrs:{page:t.listQuery1.current,limit:t.listQuery1.size,pageWidth:40,"table-props":t.tableProps1,"table-data":t.tableData1,"max-height":t.tableH}})],1),s("el-col",{staticClass:"area",attrs:{span:6}},[s("span",{staticClass:"title"},[t._v("面磨后清洗单元")]),s("base-table",{attrs:{page:t.listQuery1.current,limit:t.listQuery1.size,pageWidth:40,"table-props":t.tableProps1,"table-data":t.tableData3,"max-height":t.tableH}})],1),s("el-col",{staticClass:"area",attrs:{span:6}},[s("span",{staticClass:"title"},[t._v("面磨单元")]),s("base-table",{attrs:{page:t.listQuery2.current,limit:t.listQuery2.size,pageWidth:40,"table-props":t.tableProps2,"table-data":t.tableData4,"max-height":t.tableH}})],1),s("el-col",{staticClass:"area",attrs:{span:4}},[s("span",{staticClass:"title"},[t._v("磨边后清洗单元")]),s("base-table",{attrs:{page:t.listQuery2.current,limit:t.listQuery2.size,pageWidth:40,"table-props":t.tableProps2,"table-data":t.tableData5,"max-height":t.tableH2}}),s("span",{staticClass:"title"},[t._v("边检单元")]),s("base-table",{attrs:{page:t.listQuery2.current,limit:t.listQuery2.size,pageWidth:40,"table-props":t.tableProps2,"table-data":t.tableData5,"max-height":t.tableH2}})],1),s("el-col",{staticClass:"area",attrs:{span:4}},[s("span",{staticClass:"title"},[t._v("精切磨边单元")]),s("base-table",{attrs:{page:t.listQuery1.current,limit:t.listQuery1.size,pageWidth:40,"table-props":t.tableProps2,"table-data":t.tableData6,"max-height":t.tableH}})],1)],1)],1)},r=[],e=a(475),h=function(){var t=this;t._self._c;return t._m(0)},d=[function(){var t=this,s=t._self._c;return s("div",{staticClass:"root-box",attrs:{id:"root"}},[s("canvas",{staticClass:"canvas",staticStyle:{width:"1640px",height:"235px",transform:"scale(1)",top:"0px",left:"0px"},attrs:{id:"productLine",width:"1640px",height:"235px"}},[t._v("您的浏览器版本过低,不支持canvas,请升级浏览器或使用chrome浏览器")]),s("canvas",{staticClass:"canvas",staticStyle:{width:"1640px",height:"235px",transform:"scale(1)",top:"0px",left:"0px"},attrs:{id:"glassAndAlarm",width:"1640px",height:"235px"}})])}],l=a(6171),w={name:"ProductionLineDiagram",data(){return{canvas:"",ctx:"",root:"",canvasReset:"",canvas2:"",ctx2:"",canvasReset2:"",timer:""}},mounted(){this.root=document.querySelector("#root"),this.canvas=document.querySelector("#productLine"),this.canvas2=document.querySelector("#glassAndAlarm"),this.ctx=this.canvas.getContext("2d"),this.ctx2=this.canvas2.getContext("2d"),this.canvasReset=(0,l.D)((()=>{this.resetSize()}),500),this.canvasReset2=(0,l.D)((()=>{this.resetSize2()}),500),window.addEventListener("resize",(()=>{this.canvasReset(),this.canvasReset2()})),this.getChart(),this.resetSize(),this.resetSize2(),this.getGlass(),this.getAlarm()},methods:{resetSize(){let t=parseFloat(getComputedStyle(this.root).width),s=parseFloat(getComputedStyle(this.root).height),a=parseFloat(this.canvas.style.width),i=parseFloat(this.canvas.style.height),r=t/a,e=s/i,h=r>e?e:r;this.canvas.style.transform="scale("+h+")",this.canvas.style.top=235*(e-1)/2+"px",this.canvas.style.left=1640*(r-1)/2+"px"},resetSize2(){let t=parseFloat(getComputedStyle(this.root).width),s=parseFloat(getComputedStyle(this.root).height),a=parseFloat(this.canvas2.style.width),i=parseFloat(this.canvas2.style.height),r=t/a,e=s/i,h=r>e?e:r;this.canvas2.style.transform="scale("+h+")",this.canvas2.style.top=235*(e-1)/2+"px",this.canvas2.style.left=1640*(r-1)/2+"px"},getChart(){this.getArea1(),this.getArea2(),this.getArea3(),this.getText()},getArea1(){this.drawRect(22,43,28,22,"#B2FFC8",!0),this.drawRect(66,43,28,22,"#B2FFC8",!0),this.drawRect(22,16
|