(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-085cd247"],{"343d":function(t,e,a){},a941:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{width:"100%",height:"100%",overflow:"hidden",display:"flex","flex-direction":"column","background-color":"#f5f4f4"},attrs:{id:"StatisticsLegend"}},[a("div",{staticClass:"table-page-search-wrapper",staticStyle:{width:"100%",height:"44px","background-color":"#fff"}},[a("a-form",{attrs:{layout:"inline"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.searchQuery(e)}}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{md:5,sm:5,xs:5}},[a("a-form-item",{attrs:{label:"名称"}},[a("a-input",{attrs:{placeholder:"输入设备名称查询",readOnly:t.readOnly},model:{value:t.queryParam.tierName,callback:function(e){t.$set(t.queryParam,"tierName",e)},expression:"queryParam.tierName"}})],1)],1),a("a-col",{attrs:{md:4,sm:4,xs:4}},[a("a-form-item",{attrs:{label:"日期"}},[a("a-date-picker",{attrs:{disabledDate:t.disabledDate,format:"YYYY-MM-DD",allowClear:!1},on:{change:t.dataChange},model:{value:t.queryParams.collectTime,callback:function(e){t.$set(t.queryParams,"collectTime",e)},expression:"queryParams.collectTime"}})],1)],1),a("a-col",{attrs:{md:2,sm:2,xs:2}},[a("a-space",[a("a-button",{attrs:{type:"primary",icon:"search"},on:{click:t.searchQuery}},[t._v("查询")]),a("a-button",{attrs:{type:"primary",icon:"reload"},on:{click:t.searchReset}},[t._v("重置")])],1)],1)],1)],1)],1),a("div",{staticClass:"PowerOnRate Line-box"},[a("div",{staticClass:"PowerOnRate-box box-bottom"},[a("div",{staticClass:"PowerOnRate_text",staticStyle:{width:"8%"}},[a("p",[t._v("开机率")]),a("p",[t._v(t._s(t.UtilizationHeight)+"%")]),a("p",[t._v("利用率")]),a("p",[t._v(t._s(t.StatCharUsedRate)+"%")])]),a("div",{ref:"PowerOnRateLine",staticClass:"PowerOnRate-right",attrs:{id:"PowerOnRateLine"}}),t._m(0)])]),a("div",{staticClass:"UtilizationStartup"},[a("div",{staticClass:"Utilization Line-box"},[a("div",{staticClass:"title"}),a("div",{staticClass:"Utilization-box box-bottom"},[a("div",{ref:"UtilizationLine",staticClass:"Utilization-right",attrs:{id:"UtilizationLine"}})])]),a("div",{staticClass:"Startup Line-box"},[a("div",{staticClass:"title"}),a("div",{staticClass:"Startup-box box-bottom"},[a("div",{ref:"StartupLine",staticClass:"Startup-right",attrs:{id:"StartupLine"}})])])])])},r=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"PowerOnRate_text",staticStyle:{width:"8%"}},[a("table",{attrs:{width:"85px;",align:"center"}},[a("tr",[a("td",{attrs:{align:"right"}},[a("div",{staticStyle:{width:"15px",height:"15px","background-color":"#6496e9",position:"static"}})]),a("td",{attrs:{align:"left"}},[t._v("开机")])]),a("tr",[a("td",{attrs:{align:"right"}},[a("div",{staticStyle:{width:"15px",height:"15px","background-color":"#A8A8A8",position:"static"}})]),a("td",{attrs:{align:"left"}},[t._v("关机")])]),a("tr",[a("td",{attrs:{align:"right"}},[a("div",{staticStyle:{width:"15px",height:"15px","background-color":"#4ecee1"}})]),a("td",{attrs:{align:"left"}},[t._v("运行")])]),a("tr",[a("td",{attrs:{align:"right"}},[a("div",{staticStyle:{width:"15px",height:"15px","background-color":"#FCCE10"}})]),a("td",{attrs:{align:"left"}},[t._v("待机")])])])])}],n=a("c1df"),s=a.n(n),o=a("0fea"),c=(a("1157"),a("313e")),l={name:"StatisticalAnalysisMain",props:{equip:{}},data:function(){return{readOnly:!0,showday:!0,StatCharOpeningRate:0,StatCharUsedRate:0,StatCharUsedopeningRate:0,openingLong:0,waitingLong:0,processLong:0,closedLong:0,totalLong:0,UtilizationHeight:0,StartupHeight:0,quip:{},dates:[],queryParam:{},queryParams:{collectTime:null},shiftSubList:[],shiftList:[],url:{getEquipmentByPid:"/mdc/mdcequipment/getEquipmentByPid",dayStatisticalRate:"/mdc/efficiencyReport/dayStatisticalRate",getBaseTree:"/mdc/mdcEquipment/queryTreeListByProduction"}}},created:function(){this.queryParams.collectTime=s()().add(-1,"d").format("YYYY-MM-DD"),this.queryParams.dateTime=s()().add(-1,"d").format("YYYYMMDD"),this.initEquipmentNode()},methods:{disabledDate:function(t){return t&&t>s()().subtract("days",1)},getTime:function(t){var e=Math.round(t/60/60);return e=e<10?"0"+e:e,e},moment:s.a,draw:function(){var t=this.$echarts.init(document.getElementById("PowerOnRateLine"),"macarons"),e={tooltip:{trigger:"axis"},grid:{left:"3%",right:"4%",bottom:"3%",top:60,containLabel:!0},xAxis:{type:"category",data:["开机时长","关机时长","运行时长","待机时长"],axisLabel:{textStyle:{color:"#000"}},axisLine:{lineStyle:{color:"#e5e5e5"}},axisTick:{show:!1},splitLine:{show:!1},boundaryGap:!0},yAxis:{name:"时间/小时",type:"value",axisLabel:{textStyle:{color:"#000"}},axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!0,color:"#dadde4",lineStyle:{type:"dashed"}}},series:[{name:"柱状图",type:"bar",data:[this.openingLong,this.closedLong,this.processLong,this.waitingLong],barWidth:25,label:{show:!0,position:"top",textStyle:{color:"#000"},formatter:function(t){var e=String(t.value);return 2==e.length&&"0"===e[0]?"时长:".concat(e.slice(1),"H"):"时长:".concat(e,"H")}},itemStyle:{normal:{color:function(t){var e=[["#6496e9","#6bded3"],["#849db8","#b4b8cc"],["#4fe1c5","#4ecee1"],["#ffbb65","#fdc68b"]],a=e[t.dataIndex];return new c["graphic"].LinearGradient(0,0,0,1,[{offset:0,color:a[0]},{offset:1,color:a[1]}],!1)},barBorderRadius:[5,5,0,0]}}}]};t.setOption(e);var a=this.$echarts.init(document.getElementById("UtilizationLine"),"macarons"),i={tooltip:{trigger:"item",formatter:function(t){var e=String(t.value);return 2==e.length&&"0"===e[0]?"".concat(t.seriesName,"<br/>").concat(t.name,":").concat(e.slice(1),"H(").concat(t.percent,"%)"):"".concat(t.seriesName,"<br/>").concat(t.name,":").concat(e,"H(").concat(t.percent,"%)")}},legend:{orient:"vertical",x:"85%",y:"50%",data:["开机时间","关机时间"]},calculable:!0,series:[{name:"开机效率",type:"pie",radius:"70%",itemStyle:{normal:{color:function(t){var e=["#6496e9","#849db8"];return e[t.dataIndex]},label:{show:!0,position:"top",formatter:function(t){var e=String(t.value);return 2==e.length&&"0"===e[0]?t.name+" "+e.slice(1)+"H":t.name+" "+e+"H"}}}},data:[{value:this.openingLong,name:"开机时间"},{value:this.closedLong,name:"关机时间"}]}]};a.setOption(i);var r=this.$echarts.init(document.getElementById("StartupLine"),"macarons"),n={tooltip:{trigger:"item",formatter:function(t){var e=String(t.value);return 2==e.length&&"0"===e[0]?"".concat(t.seriesName,"<br/>").concat(t.name,":").concat(e.slice(1),"H(").concat(t.percent,"%)"):"".concat(t.seriesName,"<br/>").concat(t.name,":").concat(e,"H(").concat(t.percent,"%)")}},legend:{orient:"vertical",x:"85%",y:"50%",data:["运行时间","待机时间"]},calculable:!0,series:[{name:"运行效率",type:"pie",radius:"70%",itemStyle:{normal:{color:function(t){var e=["#4ecee1","#FCCE10"];return e[t.dataIndex]},label:{show:!0,position:"top",formatter:function(t){var e=String(t.value);return 2==e.length&&"0"===e[0]?t.name+" "+e.slice(1)+"H":t.name+" "+e+"H"}}}},data:[{value:this.processLong,name:"运行时间"},{value:this.waitingLong,name:"待机时间"}]}]};r.setOption(n)},queryStatistical:function(){var t=this;Object(o["c"])(this.url.dayStatisticalRate,this.queryParams).then((function(e){e.success&&(t.StatCharOpeningRate=e.result.openRate,t.StatCharUsedRate=e.result.utilizationRate,t.UtilizationHeight=e.result.openRate,t.StatCharUsedopeningRate=e.result.StartupHeight,t.StartupHeight=e.result.StartupHeight,t.openingLong=t.getTime(e.result.openLong),t.waitingLong=t.getTime(e.result.waitLong),t.processLong=t.getTime(e.result.processLong),t.closedLong=t.getTime(e.result.closeLong),t.totalLong=parseInt(t.openingLong)+parseInt(t.closedLong),t.draw())}))},dataChange:function(t){this.queryParam.collectTime1="",t&&(this.queryParams.dateTime=t.format("YYYYMMDD"),this.queryParams.collectTime=t.format("YYYY-MM-DD"))},initEquipmentNode:function(){var t=this,e=this;Object(o["c"])(this.url.getBaseTree).then((function(a){a.success?(a.result[0]&&(e.$set(t.queryParam,"tierName",a.result[0].title),e.$set(t.queryParams,"parentId",a.result[0].key)),e.queryStatistical()):t.$notification.warning({message:"消息",description:a.message})})).finally((function(){t.loading=!1,t.cardLoading=!1}))},searchReset:function(){this.queryParam={},this.queryParams={collectTime:s()().add(-1,"d").format("YYYY-MM-DD"),dateTime:s()().add(-1,"d").format("YYYYMMDD")},this.initEquipmentNode()},searchQuery:function(){this.queryStatistical()}},watch:{equip:function(t){t&&t.equipmentId?(this.$set(this.queryParam,"tierName",t.title),this.$set(this.queryParam,"equipmentId",t.equipmentId),this.queryParams.parentId="",this.queryParams.equipmentId=t.equipmentId):(this.queryParams.parentId=t.key,this.queryParams.equipmentId="",this.$set(this.queryParam,"tierName",t.title)),this.searchQuery()}}},d=l,u=(a("db45"),a("2877")),m=Object(u["a"])(d,i,r,!1,null,"58fc585a",null);e["default"]=m.exports},db45:function(t,e,a){"use strict";var i=a("343d"),r=a.n(i);r.a}}]);
|