cuikaidong
2025-08-08 c495c1ae53473d54af136ea00da84bf51c50d521
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d76c6"],{"776f":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},s=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"comparative_pie",staticStyle:{width:"100%",height:"600px",display:"flex",overflow:"scroll"}},[a("div",{staticStyle:{flex:"1"},attrs:{id:"compAnalPie1"}}),a("div",{staticStyle:{flex:"1"},attrs:{id:"compAnalPie2"}})])}],n=(a("313e"),{name:"conparativeAnalysisPie",props:{dataList:""},data:function(){return{closeRate:0,openRate:0,usedRate:0,waitRate:0,RateList:[]}},created:function(){},watch:{dataList:function(t){this.RateList=t,this.drawTu()}},mounted:function(){this.drawTu()},methods:{drawTu:function(){var t=this.$echarts.init(document.getElementById("compAnalPie1"),"macarons"),e=this.$echarts.init(document.getElementById("compAnalPie2"),"macarons"),a={title:{x:"center",subtext:"开机效率"},tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c} ({d}%)"},legend:{orient:"vertical",x:"left",y:"bottom",data:["开机率","关机率"]},calculable:!0,series:[{name:"开机效率",type:"pie",radius:"70%",center:["55%","55%"],itemStyle:{normal:{color:function(t){var e=["#4169E1","#A8A8A8"];return e[t.dataIndex]},label:{show:!0,position:"top",formatter:"{b}\n{c}"}}},data:[{value:0,name:"开机率"},{value:0,name:"关机率"}]}]},i={title:{x:"center",subtext:"运行效率"},tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c} ({d}%)"},legend:{orient:"vertical",x:"left",y:"bottom",data:["加工率","待机率","关机率"]},calculable:!0,series:[{name:"运行效率",type:"pie",radius:"70%",center:["55%","55%"],itemStyle:{normal:{color:function(t){var e=["#00ee00","#FCCE10","#A8A8A8"];return e[t.dataIndex]},label:{show:!0,position:"top",formatter:"{b}\n{c}"}}},data:[{value:0,name:"加工率"},{value:0,name:"待机率"},{value:0,name:"关机率"}]}]};null!=this.RateList?(this.closeRate=[],this.openRate=[],this.usedRate=[],this.waitRate=[],this.RateList.length>0?(this.closeRate=this.RateList[0].closeRate,this.openRate=this.RateList[0].openRate,this.usedRate=this.RateList[0].processRate,this.waitRate=this.RateList[0].waitRate,a.series[0].data=[{value:(100*this.openRate).toFixed(2),name:"开机率"},{value:(100*this.closeRate).toFixed(2),name:"关机率"}],i.series[0].data=[{value:(100*this.usedRate).toFixed(2),name:"加工率"},{value:(100*this.waitRate).toFixed(2),name:"待机率"},{value:(100*this.closeRate).toFixed(2),name:"关机率"}],t.setOption(a),e.setOption(i)):(t.setOption(a),e.setOption(i))):(t.setOption(a),e.setOption(i)),t.setOption(a),e.setOption(i),window.addEventListener("resize",(function(){t.resize(),e.resize()}))}}}),o=n,r=a("2877"),l=Object(r["a"])(o,i,s,!1,null,"5177a4c3",null);e["default"]=l.exports}}]);