1
2
3
| import{_ as w,d as M,o,c as n,a as t,t as v,p as b,b as $,n as x,e as S,r as z,f as m,w as B,F as f,g,h as L,i as u,j as H,k as N,l as k}from"./index.f473c350.js";import{i as R}from"./index.d17f1add.js";const E={name:"screenHeader",data(){return{serverTime:"",timerCount:0,dayStr:"",weekStr:"",timeStr:"",interval:null,serverInterval:null}},mounted(){this.init()},beforeDestroy(){this.clearInerval()},beforeUnmount(){console.log("beforeUnmount------------------\u6E05\u9664\u5E74\u6708\u65E5\u7684\u5B9A\u65F6\u5668"),this.clearInerval()},methods:{init(){this.serverTime=new Date().getTime(),this.getTime(),this.createInterVal()},getServerTime(e){this.loading=!1,e&&e(!0)},getTime(){let e=M(this.serverTime+this.timerCount*1e3);switch(this.dayStr=e.format("YYYY-MM-DD"),e.day()){case 1:this.weekStr="\u661F\u671F\u4E00";break;case 2:this.weekStr="\u661F\u671F\u4E8C";break;case 3:this.weekStr="\u661F\u671F\u4E09";break;case 4:this.weekStr="\u661F\u671F\u56DB";break;case 5:this.weekStr="\u661F\u671F\u4E94";break;case 6:this.weekStr="\u661F\u671F\u516D";break;default:this.weekStr="\u661F\u671F\u65E5";break}this.timeStr=e.format("HH:mm:ss"),this.timerCount++},createInterVal(){this.createServerInterVal(),this.createTimerInterVal()},createTimerInterVal(){this.interval=window.setInterval(this.getTime.bind(this),1e3)},createServerInterVal(){this.serverInterval=window.setInterval(this.getServerTime.bind(this),10*60*1e3)},clearInerval(){this.clearTimerInerval(),this.clearServerInerval()},clearTimerInerval(){window.clearInterval(this.interval)},clearServerInerval(){window.clearInterval(this.serverInterval)}}},A=e=>(b("data-v-1d479e48"),e=e(),$(),e),X={class:"screen-header"},O={class:"left"},K={class:"left-str"},j={class:"day-str"},F=A(()=>t("div",{class:"compName"},"\u9752\u6C7D\u667A\u80FD\u7ACB\u4F53\u5E93\u76D1\u63A7\u5E73\u53F0",-1)),G={class:"right-str"};function Y(e,s,i,c,r,p){return o(),n("div",X,[t("div",O,[t("div",K,[t("span",j,v(r.dayStr),1),t("span",null,v(r.weekStr),1)]),F,t("div",G,v(r.timeStr),1)])])}var U=w(E,[["render",Y],["__scopeId","data-v-1d479e48"]]);const q={name:"autoScrollCompontent",props:{dir:{type:String,default:"vertical"},width:{type:String,default:"100%"},height:{type:String,default:"100%"},stepSpeed:{type:Number,default:2e3},wait:{type:Number,default:3e3},hideSheB:{type:Boolean}},data(){return{$frame:null,refreshKey:0,outerWidth:0,outerHeight:0,wrapperWidth:0,wrapperHeight:0,moveDistance:0,moveTop:0,moveLeft:0,transition:"all 0",interval:null,roundTime:0}},mounted(){this.$nextTick(()=>{this.init()})},beforeDestroy(){this.clearInterval(),this.destroyEleResize()},beforeUnmount(){console.log("\u6E05\u9664\u81EA\u52A8\u6EDA\u52A8\u7684\u5B9A\u65F6\u5668"),this.clearInterval(),this.destroyEleResize()},methods:{init(){console.log("\u5F00\u542F---\u5B9A\u65F6\u81EA\u52A8\u6EDA\u52A8\u6EDA\u52A8"),this.moveTop=0,this.moveLeft=0,this.callSize(),this.createAnimation(),this.createEleResize()},createEleResize(){this.$frame=this.$refs.frame,this.$utils.eleResize.on(document.getElementById("frame"),this.eleListener)},eleListener(){this.moveTop=0,this.moveLeft=0,this.callSize(),this.clearInterval(),this.createAnimation()},callSize(){this.dir==="vertical"?(this.outerHeight=this.$refs.frame.offsetHeight,this.wrapperHeight=this.$refs.wrapper.offsetHeight,this.wrapperHeight>this.outerHeight&&(this.moveDistance=this.wrapperHeight-this.outerHeight,this.roundTime=Math.floor(this.moveDistance/100*this.stepSpeed),this.transition="top "+this.roundTime+"ms linear")):(this.outerWidth=this.$refs.frame.offsetWidth,this.wrapperWidth=this.$refs.wrapper.scrollWidth,this.wrapperWidth>this.outerWidth&&(this.moveDistance=this.wrapperWidth-this.outerWidth,this.roundTime=Math.floor(this.moveDistance/100*this.stepSpeed),this.transition="margin-left "+this.roundTime+"ms linear"))},createAnimation(){this.roundTime&&(this.dir==="vertical"?(this.animationVer(),this.interval=window.setInterval(this.animationVer,this.roundTime+this.wait)):(this.animationHor(),this.interval=window.setInterval(this.animationHor,this.roundTime+this.wait)))},animationVer(){if(this.hideSheB){console.log("\u6E05\u9664\u6EDA\u52A8\u7684\u5B9A\u65F6\u566811111111111111"),this.clearInterval(),this.destroyEleResize();return}console.log("\u6EDA\u52A8\u5B9A\u65F6\u5668go..............."),this.moveTop===0?this.moveTop=-this.moveDistance:this.moveTop=0},animationHor(){this.moveLeft===0?this.moveLeft=-this.moveDistance:this.moveLeft=0},clearInterval(){try{window.clearInterval(this.interval),this.interval=null}catch{}},destroyEleResize(){try{this.$utils.eleResize.off(document.getElementById("frame"),this.eleListener)}catch{}}}};function J(e,s,i,c,r,p){return o(),n("div",{class:"auto-scroll-compontent",style:S({width:i.width,height:i.height})},[t("div",{class:x(["auto-scroll-outer",[i.dir==="vertical"?"vertical-outer":"horizontal-outer"]]),ref:"frame",id:"frame"},[(o(),n("div",{class:x(["auto-scroll-wrapper",[i.dir==="vertical"?"vertical-wrapper":"horizontal-wrapper"]]),ref:"wrapper",key:r.refreshKey,style:S({top:r.moveTop+"px",marginLeft:r.moveLeft+"px",transition:r.transition})},[z(e.$slots,"default",{},void 0,!0)],6))],2)],4)}var C=w(q,[["render",J],["__scopeId","data-v-acf36d58"]]);const Q={name:"screen1PlanWarnings",components:{AutoScroll:C},props:{data:{type:Array,default:function(){return[]}}}},Z=e=>(b("data-v-2943508c"),e=e(),$(),e),ee={class:"screen1-plan-warnings"},te={class:"box"},se=Z(()=>t("div",{class:"title"},"\u8BA1\u5212\u5F02\u5E38:",-1)),ie={class:"infos"},re={key:0,class:"divider"},oe={class:"info-text no-wrap"};function ne(e,s,i,c,r,p){const h=u("auto-scroll");return o(),n("div",ee,[t("div",te,[se,t("div",ie,[m(h,{"step-speed":e.$config.base.screen.screen1.scrollSpeed,dir:"horizontal"},{default:B(()=>[(o(!0),n(f,null,g(i.data,(d,a)=>(o(),n(f,null,[a!==0?(o(),n("div",re,"|")):L("",!0),t("div",oe,v(a+1)+"\u3001"+v(d),1)],64))),256))]),_:1},8,["step-speed"])])])])}var ae=w(Q,[["render",ne],["__scopeId","data-v-2943508c"]]);const le={name:"screen1MoudleBlockTitle",props:{title:{type:String,default:"title"}}},D=e=>(b("data-v-3cf60cf8"),e=e(),$(),e),ce={class:"screen1-moudle-block-title"},he=D(()=>t("div",{class:"title-bottom-line"},null,-1)),de=D(()=>t("div",{class:"title-tag"},null,-1)),_e={class:"title-text"};function ue(e,s,i,c,r,p){return o(),n("div",ce,[he,de,t("div",_e,v(i.title),1)])}var P=w(le,[["render",ue],["__scopeId","data-v-3cf60cf8"]]);const ve={name:"screen1Plans",components:{BlockTitle:P},props:{obj:{type:Object,default:function(){return{}}}},computed:{_numbers(){let e={yearCount:"0000",yearComplete:"0000",monthCount:"0000"};return e.yearCount=this.formatCountX(this.obj.YEARIssue_Count),e.yearComplete=this.formatCountX(this.obj.YEAROK_Count),e.monthCount=this.formatCountX(this.obj.MONTHIssue_Count),e}},methods:{formatCount(e){let s="0000";return e&&(e>9999&&(e=9999),s=this.$utils.numberFormat(e,4)),s},formatCountX(e){let s="000000";return e&&(e>999999&&(e=999999),s=this.$utils.numberFormat(e,6)),s}}},I=e=>(b("data-v-ffe44166"),e=e(),$(),e),pe={class:"screen1-plans module-block"},fe={class:"module-content"},me=I(()=>t("div",{class:"thead"},[t("div",{class:"thead-inner"},[t("div",{class:"first-cell"}),t("div",{class:"use-cell"},"\u6570\u91CF\u603B\u8BA1")])],-1)),ge={class:"tbody"},we={class:"first-cell"},Se={class:"use-cell"},ye=I(()=>t("div",{class:"corner coner-top-left"},null,-1)),be=I(()=>t("div",{class:"corner coner-top-right"},null,-1)),$e=I(()=>t("div",{class:"corner coner-bottom-left"},null,-1)),ke=I(()=>t("div",{class:"corner coner-bottom-right"},null,-1));function Pe(e,s,i,c,r,p){const h=u("block-title");return o(),n("div",pe,[m(h,{title:"\u8BA1\u5212\u6267\u884C"}),t("div",fe,[me,t("div",ge,[(o(!0),n(f,null,g(i.obj,(d,a)=>(o(),n("div",{class:"t-row",key:"scroll-body-row-"+a},[t("div",we,v(d.name),1),t("div",Se,[(o(!0),n(f,null,g(d.data[0],(_,l)=>(o(),n("div",{class:"num-div",key:"d-c-"+l},[ye,be,$e,ke,t("span",null,v(_),1)]))),128))])]))),128))])])])}var Ie=w(ve,[["render",Pe],["__scopeId","data-v-ffe44166"]]);const xe={name:"screen1Stock",components:{BlockTitle:P},props:{obj:{type:Object,default:function(){return{}}}},data(){return{$dom:null,chart:null,defaultOption:{tooltip:{trigger:"item"},series:[{name:"\u5E93\u5B58\u60C5\u51B5",type:"pie",selectedMode:"single",radius:"50%",label:{formatter:`{fc|{b}}
| {hr|}
| {fc|{d}%} `,rich:{fc:{color:"#afd7da",fontSize:12,lineHeight:20,align:"center"},hr:{borderColor:"#afd7da",width:"100%",borderWidth:1,height:0}}},labelLine:{length:5,length2:5},data:[{value:0,name:"\u7A7A\u5E93\u4F4D\u6570",itemStyle:{color:"#00ff12"}},{value:0,name:"\u6EE1\u5E93\u4F4D",itemStyle:{color:"#f56c6c"}}],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]}}},mounted(){this.$nextTick(()=>{this.init()})},beforeDestroy(){this.destoryChart()},methods:{init(){this.createChart(),this.drawChart()},createChart(){this.$dom=this.$refs.chart,this.chart=R(document.getElementById("chartID"))},drawChart(){let e={...this.defaultOption};e.series[0].data[0].value=this.obj[2]||0,e.series[0].data[1].value=this.obj[1]||0,this.chart.setOption(e),window.addEventListener("resize",()=>{this.chart.resize()})},destoryChart(){try{this.chart.dispose(),this.$dom.innerHTML="",this.$dom=null}catch{}}}},Be=e=>(b("data-v-17b9548a"),e=e(),$(),e),Ce={class:"screen1-stock module-block"},Te={class:"module-content"},Le={class:"chart-view",ref:"chart",id:"chartID"},De={class:"desc-view"},We=Be(()=>t("thead",null,[t("tr",null,[t("th",null,"\u603B\u5E93\u4F4D\u6570"),t("th",null,"\u6EE1\u5E93\u4F4D"),t("th",null,"\u7A7A\u5E93\u4F4D\u6570")])],-1));function Ve(e,s,i,c,r,p){const h=u("block-title");return o(),n("div",Ce,[m(h,{title:"\u5E93\u5B58\u60C5\u51B5"}),t("div",Te,[t("div",Le,null,512),t("div",De,[t("table",null,[We,t("tbody",null,[t("tr",null,[t("td",null,v(i.obj[0]),1),t("td",null,v(i.obj[1]),1),t("td",null,v(i.obj[2]),1)])])])])])])}var Me=w(xe,[["render",Ve],["__scopeId","data-v-17b9548a"]]);const ze={name:"screen1Warnings",components:{BlockTitle:P,AutoScroll:C},props:{list:{type:Array,default:function(){return[]}},hideSheB:{type:Boolean}},data(){return{columns:[{label:"\u5E8F\u53F7",type:"index",width:"20px"},{label:"\u8BBE\u5907",name:"deviceName",width:"50px"},{label:"\u6545\u969C\u4EE3\u7801",name:"warningContent",width:"180px"}]}}},He={class:"screen1-warnings module-block"},Ne={class:"module-content"},Re={class:"auto-scroll-view"},Ee={class:"scroll-header"},Ae={class:"fontSmall"},Xe={class:"scroll-body"},Oe={key:0,class:"no-data"},Ke={class:"fontSmall"};function je(e,s,i,c,r,p){const h=u("block-title"),d=u("auto-scroll");return o(),n("div",He,[m(h,{title:"\u8BBE\u5907\u62A5\u8B661"}),t("div",Ne,[t("div",Re,[t("div",Ee,[(o(!0),n(f,null,g(r.columns,(a,_)=>(o(),n("div",{style:S({width:a.grow?"10px":a.width?a.width:"auto",flexGrow:a.grow?a.grow:"initial",flexShrink:a.grow?"initial":"0"}),key:"list-header-cell-"+_},[t("span",Ae,v(a.label),1)],4))),128))]),t("div",Xe,[m(d,{"step-speed":e.$config.base.screen.screen1.scrollSpeed,hideSheB:i.hideSheB},{default:B(()=>[i.list.length===0?(o(),n("div",Oe,"\u6682\u65F6\u6CA1\u6709\u4FE1\u606F\uFF01")):(o(!0),n(f,{key:1},g(i.list,(a,_)=>(o(),n("div",{class:"scroll-body-row",key:"scroll-body-row-"+_},[(o(!0),n(f,null,g(r.columns,(l,y)=>(o(),n("span",{style:S({width:l.grow?"10px":l.width?l.width:"auto",flexGrow:l.grow?l.grow:"initial",flexShrink:l.grow?"initial":"0"}),key:"list-body-cell-"+y},[t("span",Ke,v(l.type==="index"?_+1:a[l.name]),1)],4))),128))]))),128))]),_:1},8,["step-speed","hideSheB"])])])])])}var Fe=w(ze,[["render",je],["__scopeId","data-v-977c5634"]]);const Ge={name:"screen1Outputs",components:{BlockTitle:P,AutoScroll:C},props:{list:{type:Array,default:function(){return[]}},hideSheB:{type:Boolean}},data(){return{columns:[{label:"\u5E8F\u53F7",type:"index",width:"20px"},{label:"\u72B6\u6001",name:"taskState",width:"50px"},{label:"\u96F6\u4EF6\u53F7",name:"partNo",width:"100px"},{label:"\u8D77\u59CB\u4F4D\u7F6E",name:"deviceName",width:"80px"},{label:"\u76EE\u6807\u4F4D\u7F6E",name:"orderNo",width:"80px"}]}}},Ye={class:"screen1-outputs module-block"},Ue={class:"module-content"},qe={class:"auto-scroll-view"},Je={class:"scroll-header"},Qe={class:"fontSmall"},Ze={class:"scroll-body"},et={key:0,class:"no-data"},tt={class:"fontSmall"};function st(e,s,i,c,r,p){const h=u("block-title"),d=u("auto-scroll");return o(),n("div",Ye,[m(h,{title:"\u51FA\u5E93\u4EFB\u52A1"}),t("div",Ue,[t("div",qe,[t("div",Je,[(o(!0),n(f,null,g(r.columns,(a,_)=>(o(),n("div",{style:S({width:a.grow?"10px":a.width?a.width:"auto",flexGrow:a.grow?a.grow:"initial",flexShrink:a.grow?"initial":"0"}),key:"list-header-cell-"+_},[t("span",Qe,v(a.label),1)],4))),128))]),t("div",Ze,[m(d,{"step-speed":e.$config.base.screen.screen1.scrollSpeed,hideSheB:i.hideSheB},{default:B(()=>[i.list.length===0?(o(),n("div",et,"\u6682\u65F6\u6CA1\u6709\u4FE1\u606F\uFF01")):(o(!0),n(f,{key:1},g(i.list,(a,_)=>(o(),n("div",{class:"scroll-body-row",key:"scroll-body-row-"+_},[(o(!0),n(f,null,g(r.columns,(l,y)=>(o(),n("span",{style:S({width:l.grow?"10px":l.width?l.width:"auto",flexGrow:l.grow?l.grow:"initial",flexShrink:l.grow?"initial":"0"}),key:"list-body-cell-"+y},[t("span",tt,v(l.type==="index"?_+1:a[l.name]),1)],4))),128))]))),128))]),_:1},8,["step-speed","hideSheB"])])])])])}var it=w(Ge,[["render",st],["__scopeId","data-v-0112d37c"]]);const rt={name:"screen1Inputs",components:{BlockTitle:P,AutoScroll:C},props:{list:{type:Array,default:function(){return[]}},hideSheB:{type:Boolean}},data(){return{columns:[{label:"\u5E8F\u53F7",type:"index",width:"20px"},{label:"\u72B6\u6001",name:"taskState",width:"50px"},{label:"\u96F6\u4EF6\u53F7",name:"partNo",width:"100px"},{label:"\u8D77\u59CB\u4F4D\u7F6E",name:"deviceName",width:"80px"},{label:"\u76EE\u6807\u4F4D\u7F6E",name:"orderNo",width:"80px"}]}}},ot={class:"screen1-inputs module-block"},nt={class:"module-content"},at={class:"auto-scroll-view"},lt={class:"scroll-header"},ct={class:"fontSmall"},ht={class:"scroll-body"},dt={key:0,class:"no-data"},_t={class:"fontSmall"};function ut(e,s,i,c,r,p){const h=u("block-title"),d=u("auto-scroll");return o(),n("div",ot,[m(h,{title:"\u5165\u5E93\u4EFB\u52A1"}),t("div",nt,[t("div",at,[t("div",lt,[(o(!0),n(f,null,g(r.columns,(a,_)=>(o(),n("div",{style:S({width:a.grow?"10px":a.width?a.width:"auto",flexGrow:a.grow?a.grow:"initial",flexShrink:a.grow?"initial":"0"}),key:"list-header-cell-"+_},[t("span",ct,v(a.label),1)],4))),128))]),t("div",ht,[m(d,{"step-speed":e.$config.base.screen.screen1.scrollSpeed,hideSheB:i.hideSheB},{default:B(()=>[i.list.length===0?(o(),n("div",dt,"\u6682\u65F6\u6CA1\u6709\u4FE1\u606F\uFF01")):(o(!0),n(f,{key:1},g(i.list,(a,_)=>(o(),n("div",{class:"scroll-body-row",key:"scroll-body-row-"+_},[(o(!0),n(f,null,g(r.columns,(l,y)=>(o(),n("span",{style:S({width:l.grow?"10px":l.width?l.width:"auto",flexGrow:l.grow?l.grow:"initial",flexShrink:l.grow?"initial":"0"}),key:"list-body-cell-"+y},[t("span",_t,v(l.type==="index"?_+1:a[l.name]),1)],4))),128))]))),128))]),_:1},8,["step-speed","hideSheB"])])])])])}var vt=w(rt,[["render",ut],["__scopeId","data-v-4073471a"]]);const pt={name:"screen1Center",props:{hideSheB:{type:Boolean}},data(){return{posLimit:{machine:{view:{left:-2,right:329},server:{left:18986,right:1123}},rgv:{view:{top:21,bottom:235},server:{top:457,bottom:18133}}},storeRate:["50%","50%","50%","50%"],rgvWarn:!1,rgvPos:21,rgvServerPos:457,rgvStationPos:[21,61,71,77,118,137,177,182,195,233,235],rgvStationServerPos:[457,3571,5030,5239,8392,10104,13288,13410,14970,18130,18133],machineWarn:[!1,!1,!0,!1],machinePos:[10,10,10,10],machineServerPos:[18986,18986,18986,18986],loading:!1,refreshInterval:null,refreshIntervalX:null}},mounted(){this.init()},beforeDestroy(){this.clearInterVal()},methods:{init(){this.getData(()=>{this.getPosData(()=>{this.createInterval(),this.createIntervalX()})})},getData(e){this.loading=!1,e&&e(!0)},getPosData(e){if(this.hideSheB){this.clearInterVal();return}this.$api.get("pagedetails",{},{block:"screen",needToken:!1}).then(s=>{s.statisticalAnalysis.map(i=>{let c=40;console.log(i.key),i.key==="\u4E00\u53F7\u5806\u579B\u673A\u4F4D\u7F6E"&&(i.value>0?i.value==1?this.machinePos[3]=10:i.value==2?this.machinePos[3]=55:i.value==3?this.machinePos[3]=95:i.value==4?this.machinePos[3]=135:i.value==5?this.machinePos[3]=175:i.value==6?this.machinePos[3]=220:i.value==7?this.machinePos[3]=260:i.value==8?this.machinePos[3]=300:i.value==9?this.machinePos[3]=345:i.value==10?this.machinePos[3]=385:i.value==11&&(this.machinePos[3]=425):this.machinePos[3]=10),i.key=="\u4E8C\u53F7\u5806\u579B\u673A\u4F4D\u7F6E"&&(i.value>0?this.machinePos[0]=i.value*c+10:this.machinePos[0]=10)}),e&&e(!0)}).catch(()=>{e&&e(!1)})},calRgvPos(e){this.formatRgvServerPos(e);let s=0;if(this.rgvServerPos<this.rgvStationServerPos[0])s=0;else if(this.rgvServerPos>=this.rgvStationServerPos[this.rgvStationServerPos.length-1])s=this.rgvStationServerPos.length-2;else for(let d=0;d<this.rgvStationServerPos.length-1;d++)if(this.rgvServerPos>=this.rgvStationServerPos[d]&&this.rgvServerPos<this.rgvStationServerPos[d+1]){s=d;break}let i=this.rgvStationServerPos[s+1]-this.rgvStationServerPos[s],r=(this.rgvServerPos-this.rgvStationServerPos[s])/i,p=this.rgvStationPos[s+1]-this.rgvStationPos[s],h=Math.floor(p*r);this.rgvPos=h+this.rgvStationPos[s]},formatRgvServerPos(e){let s=e||0;s<this.posLimit.rgv.server.top?s=this.posLimit.rgv.server.top:s>this.posLimit.rgv.server.bottom&&(s=this.posLimit.rgv.server.bottom),this.rgvServerPos=s},handleMachineData(e){let s=[],i=[];s.push(e.AState),i.push(e.AStore),s.push(e.BState),i.push(e.BStore),s.push(e.CState),i.push(e.CStore),s.push(e.DState),i.push(e.DStore),this.machineWarn=s,console.log(this.machineWarn),this.storeRate=i},handleMachinePosData(e){let s=[],i=[];s.push(this.formatMachiineServerPos(e.ACoordinate)),s.push(this.formatMachiineServerPos(e.BCoordinate)),s.push(this.formatMachiineServerPos(e.CCoordinate)),s.push(this.formatMachiineServerPos(e.DCoordinate)),s.forEach(c=>{i.push(this.calEachMachinePos(c))}),this.machineServerPos=s,this.machinePos=i},formatMachiineServerPos(e){let s=Number(e);return s===NaN&&(s=0),s<this.posLimit.machine.server.right?s=this.posLimit.machine.server.right:s>this.posLimit.machine.server.left&&(s=this.posLimit.machine.server.left),s},calEachMachinePos(e){let s=this.posLimit.machine.server.left-this.posLimit.machine.server.right,c=(s-(e-this.posLimit.machine.server.right))/s,r=this.posLimit.machine.view.right-this.posLimit.machine.view.left;return Math.floor(r*c)+this.posLimit.machine.view.left},createInterval(){this.refreshInterval=window.setInterval(()=>{this.getData()},this.$config.base.screen.screen1.refreshTime)},createIntervalX(){this.refreshIntervalX=window.setInterval(()=>{this.getPosData()},this.$config.base.screen.screen1.refreshTimeX)},clearInterVal(){this.clearInterVal1(),this.clearInterVal2()},clearInterVal1(){try{window.clearInterval(this.refreshInterval),this.refreshInterval=null}catch{}},clearInterVal2(){try{window.clearInterval(this.refreshIntervalX),this.refreshIntervalX=null}catch{}}}},T=e=>(b("data-v-6f47c1ec"),e=e(),$(),e),ft={class:"screen1-center"},mt={class:"center-box"},gt={class:"center-layer1"},wt={class:"store-blocks-frame"},St=T(()=>t("div",{class:"shelves-row shelves-row2"},null,-1)),yt=T(()=>t("div",{class:"shelves-row3"},null,-1)),bt={class:"line-row"},$t={class:"line-track-row"},kt=T(()=>t("div",{class:"shelves-row4"},null,-1)),Pt=[kt];function It(e,s,i,c,r,p){const h=N("loading");return H((o(),n("div",ft,[t("div",mt,[t("div",gt,[t("div",wt,[t("div",{class:x(["store-block-item",[r.machineWarn[3]==="\u6545\u969C"?"abnormal":r.machineWarn[3]==="\u7A7A\u95F2"?"empty":""]])},[St,yt,t("div",bt,[t("div",$t,[t("div",{class:"machine-box a1",style:S({left:r.machinePos[3]+"px"})},null,4)])])],2),t("div",{class:x(["store-block-item store-block-item2",[r.machineWarn[2]==="\u6545\u969C"?"abnormal":r.machineWarn[2]==="\u7A7A\u95F2"?"empty":""]])},Pt,2)])])])])),[[h,r.loading]])}var xt=w(pt,[["render",It],["__scopeId","data-v-6f47c1ec"]]);const Bt={name:"screenPage1",components:{ScreenHeader:U,PlanWarnings:ae,ModulePlans:Ie,ModuleStock:Me,ModuleWarnings:Fe,ModuleOutputs:it,ModuleInputs:vt,ModuleCenter:xt},data(){return{refreshKey:0,plans:{},stockData:{},warnings:[],inputs:[],outputs:[],planWarnings:[],hideSheB:!1,refreshInterval:null,timerPage:null}},mounted(){this.init()},beforeDestroy(){this.clearInterVal(),clearTimeout(this.timerPage),this.timerPage=null},beforeUnmount(){console.log("beforeUnmount--------------\u6E05\u9664\u9875\u9762screen1\u5B9A\u65F6\u5668"),this.clearInterVal(),clearTimeout(this.timerPage),this.timerPage=null},methods:{init(){this.getData(e=>{this.createInterval()})},getData(e){this.$loading(),Promise.all([this.$api.get("pagedetails",{},{block:"screen",needToken:!1}),this.$api.get("pagewarning",{PageNo:1,PageSize:50},{block:"screen",needToken:!1}),this.$api.get("pageintask",{PageNo:1,PageSize:50},{block:"screen",needToken:!1}),this.$api.get("pageouttask",{PageNo:1,PageSize:50},{block:"screen",needToken:!1})]).then(s=>{let i=[{name:"\u4ECA\u65E5\u51FA\u5165\u5E93\u6570",data:["0000"]},{name:"\u672C\u6708\u51FA\u5165\u5E93\u6570",data:["0000"]},{name:"\u672C\u5E74\u51FA\u5165\u5E93\u6570",data:["0000"]}],c=[];s[0].statisticalAnalysis.map(r=>{r.key=="\u4ECA\u65E5\u51FA\u5165\u5E93\u6570"&&(i[0].data[0]=this.formatCount(r.value)||"0000"),r.key=="\u672C\u6708\u51FA\u5165\u5E93\u6570"&&(i[1].data[0]=this.formatCount(r.value)||"0000"),r.key=="\u672C\u5E74\u51FA\u5165\u5E93\u6570"&&(i[2].data[0]=this.formatCount(r.value)||"0000"),r.key=="\u603B\u5E93\u4F4D\u6570"&&(c[0]=r.value),r.key=="\u6EE1\u5E93\u4F4D\u6570"&&(c[1]=r.value)}),c[2]=(c[0]-c[1]).toFixed(0),this.plans=i||{},this.stockData=c||{},this.warnings=s[1].rows||[],this.inputs=s[2].rows||[],this.outputs=s[3].rows||[],this.refreshKey=new Date().getTime(),this.$loading().close(),e&&e(!0)}).catch(()=>{this.$loading().close(),e&&e(!1)})},createInterval(){this.refreshInterval=window.setInterval(()=>{this.getData()},this.$config.base.screen.screen1.refreshTime)},clearInterVal(){window.clearInterval(this.refreshInterval),this.refreshInterval=null},formatCount(e){let s="0000";return e&&(s=this.$utils.numberFormat(e,4)),s},formatCountX(e){let s="000000";return e&&(e>999999&&(e=999999),s=this.$utils.numberFormat(e,6)),s}}},Ct={class:"screen-page1"},Tt={class:"screen-page1-content"},Lt={class:"header-block"},Dt={class:"header-body"},Wt={class:"row-first"},Vt={class:"block-percent-25"},Mt={class:"block-percent-50"},zt={class:"block-percent-25"},Ht={class:"row-second"},Nt={class:"block-percent-25"},Rt={class:"block-percent-36"},Et={class:"block-percent-36"},At={key:0,class:"row-end"};function Xt(e,s,i,c,r,p){const h=u("screen-header"),d=u("module-plans"),a=u("module-center"),_=u("module-stock"),l=u("module-warnings"),y=u("module-outputs"),W=u("module-inputs"),V=u("plan-warnings");return o(),n("div",Ct,[t("div",Tt,[t("div",Lt,[m(h)]),t("div",Dt,[t("div",Wt,[t("div",Vt,[m(d,{obj:r.plans},null,8,["obj"])]),t("div",Mt,[m(a,{hideSheB:r.hideSheB},null,8,["hideSheB"])]),t("div",zt,[(o(),k(_,{obj:r.stockData,key:r.refreshKey},null,8,["obj"]))])]),t("div",Ht,[t("div",Nt,[(o(),k(l,{list:r.warnings,key:r.refreshKey,hideSheB:r.hideSheB},null,8,["list","hideSheB"]))]),t("div",Rt,[(o(),k(y,{list:r.outputs,key:r.refreshKey,hideSheB:r.hideSheB},null,8,["list","hideSheB"]))]),t("div",Et,[(o(),k(W,{list:r.inputs,key:r.refreshKey,hideSheB:r.hideSheB},null,8,["list","hideSheB"]))])]),r.planWarnings.length>0?(o(),n("div",At,[(o(),k(V,{data:r.planWarnings,key:r.refreshKey},null,8,["data"]))])):L("",!0)])])])}var jt=w(Bt,[["render",Xt],["__scopeId","data-v-3b686c56"]]);export{jt as default};
|
|