chunk-71557763.8f15bfa1.js 6.36 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-71557763"],{3050:function(t,e,a){"use strict";a("a29b")},"7c0a":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",{staticClass:"dv"},[a("div",[a("sys-head",{attrs:{title:t.sysTitle,remark:"(选择年查询本年每月的妥善率,选择月查询本月每天的妥善率;当日无故障次数或者无任务数:100 %)"}}),a("div",{staticClass:"time-select"},[a("sys-year-month-day",{ref:"childSelectDate",on:{selectCallBackEmit:t.dateCallBackEmit}}),a("bus-project-eq",{attrs:{defaultSelectIndexProject:1,AGVSelectIndexEq:!0,isAGV:!0},on:{selectCallBackEmit:t.projectEqCallBackEmit}}),a("el-button",{ref:"seach",staticStyle:{margin:"0.2vw"},attrs:{icon:"el-icon-search"},on:{click:function(e){return t.btnAction("query")}}},[t._v("搜索")]),a("el-button",{staticStyle:{margin:"0.2vw"},on:{click:function(e){return t.btnAction("excel")}}},[t._v("Excel")]),a("sys-export",{ref:"childExport",attrs:{fileName:t.sysTitle}})],1)],1),a("sys-table",{ref:"childTable",attrs:{tableHeight:"320",computeCls:t.computeObj}}),t._m(0)],1)},n=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"dv-body-top"},[a("div",{staticClass:"dv-body-top-echartOne",attrs:{id:"eleEchart"}})])}],s={data:function(){return{baseUrl:window.baseOnLineOrOff?window.appConfig.baseUlrOnLine:"http://127.0.0.1:10099",baseUrlOnLine:window.appConfig.webReportlOnLine,sysData:{tableData:[]},sysTitle:"AGV故障任务妥善率(故障次数/任务数)ver:"+window.appConfig.appId,eleEchartObj:null,computeObj:{operator:"less",iscolorDiff:!0,numb:99,startColumn:2},dayBetween:null,params:{nowSelectProjectVal:"",nowSelectEqVal:"",startTime:null,endTime:null,monthOptions:[],timeFlag:null,isFristSelectDate:!1}}},methods:{dateCallBackEmit:function(t){this.params.startTime=t.startTime,this.params.endTime=t.endTime,this.params.timeFlag=t.timeFlag,this.params.monthOptions=t.monthOptions},projectEqCallBackEmit:function(t){var e=this;this.params.nowSelectProjectVal=t.nowSelectProject["selectKey"],this.params.nowSelectEqVal=t.nowSelectEq["selectKey"],this.params.isFristSelectDate||""!=this.params.nowSelectProjectVal&&(this.params.isFristSelectDate=!0,setTimeout((function(){e.getData("query")}),500))},btnAction:function(t){this.getData(t)},getData:function(t){var e=this;if(!this.getDataBefore(t)){var a={urlSuffix:"".concat(this.baseUrl,"/api/BulletinBoard/GetAGVProperRate?projectCode=").concat(this.params.nowSelectProjectVal,"&startTime=").concat(this.params.startTime,"&endTime=").concat(this.params.endTime,"&yearOrDaySelectVal=").concat(this.params.startTime,"&timeFlag=").concat(this.params.timeFlag,"&equipmentCode=").concat(this.params.nowSelectEqVal),isUrlALL:!0,isLoad:!0,isLayout:!0,falg:t,emptyCallBackFn:function(){null!=e.eleEchartObj&&e.eleEchartObj.clear(),e.sysData.tableData=[]}},i=function(a){return"excel"==t?(e.exportExcel(a),e.getData("query"),!1):(e.sysData.tableData.length>0&&e.sysData.tableData.splice(0,e.sysData.tableData.length),e.initTableAndEchart(a),e.sysData.tableData)};this.$refs.childTable.initData(a,i)}},getDataBefore:function(t){if(null==this.params.startTime||""==this.params.startTime)return this.$alert("请选择年","提示",{dangerouslyUseHTMLString:!0}),!0;if(""==this.params.nowSelectProjectVal)return this.$alert("请选择项目号","提示",{dangerouslyUseHTMLString:!0}),!0;var e=this.initTableColumn(this.params.timeFlag);return"excel"!=t&&this.$refs.childTable.setDynamicColumn(e),this.$refs.childExport.setExcelDynamicColumn(e),!1},initTableAndEchart:function(t){var e=this.initTableDataHandle(t);this.sysData.tableData=e,this.initEchart(e)},initTableDataHandle:function(t){var e=this,a=[],i=t.uniqueFunc("EquipmentName"),n=0,s=!1,r=0;"day"!=this.params.timeFlag&&this.params.timeFlag;for(var l=function(l){o={index:l+1,EquipmentName:i[l].EquipmentName},n=0,e.dayBetween.forEach((function(a){for(var c=0;c<t.length;c++)if(i[l].EquipmentName==t[c].EquipmentName&&t[c].dateVal==a){s=!0,r=t[c].Rate;break}if(s){if("year"==e.params.timeFlag){var h=e.$moment(a,"YYYY-MM").daysInMonth();1440*h}o["data"+n++]=r,s=!1}else o["data"+n++]="100 %"})),a.push(o)},c=0;c<i.length;c++){var o;l(c)}return a},initEchart:function(t){var e=window.tuosanRate;e.series=[];var a=[];t.forEach((function(t){var i=[],n=Object.keys(t);for(var s in n)if(Object.hasOwnProperty.call(n,s)){var r=n[s];if("index"!=r&&"EquipmentName"!=r){var l=t[r].replace("%","");i.push(l),a.push("99")}}e.series.push({symbolSize:10,name:t.EquipmentName,type:"line",data:i,itemStyle:{normal:{lineStyle:{width:4}}}})})),e.series.push({symbolSize:10,name:"目标率",type:"line",color:"red",data:a,lineStyle:{normal:{width:3,type:"dashed"}},itemStyle:{normal:{lineStyle:{width:4}}}}),e.yAxis.min=90,e.xAxis.data=[];var i=this.$moment().format("YYYY")+"-";this.dayBetween.forEach((function(t){t.length>7&&(t=t.slice(5));var a=t.replace(i,"");e.xAxis.data.push(a)})),this.eleEchartObj=this.$echarts.init(document.getElementById("eleEchart")),this.eleEchartObj.clear(),this.eleEchartObj.setOption(e)},exportExcel:function(t){var e=this.initTableDataHandle(t),a=this.exportDataAndColumnHandle(e);this.$refs.childExport.exportExcel(a,!1)},exportDataAndColumnHandle:function(t){var e={index:"序号",EquipmentName:"AGV设备"},a=0;return this.dayBetween.forEach((function(t){e["data"+a++]=t})),t.unshift(e),t},initTableColumn:function(t){var e=this,a=[];a.push({prop:"EquipmentName",label:"AGV设备",fixed:"left",width:500});var i=0;switch(t){case"month":this.dayBetween="".enumerateDaysBetweenDates(this,this.params.startTime,this.params.endTime),this.dayBetween.forEach((function(t){a.push({prop:"data"+i++,label:t,width:105})}));break;case"year":this.dayBetween=[],this.params.monthOptions.forEach((function(t){var a=t.label.replace("月","").replace("(当月)",""),i=e.params.startTime+"-"+a.padStart(2,"0");e.dayBetween.push(i)})),this.dayBetween.forEach((function(t){a.push({prop:"data"+i++,label:t,width:105})}));break;case"day":this.dayBetween=new Array(this.params.startTime),a.push({prop:"data0",label:this.params.startTime,width:105});break;default:break}return a}},mounted:function(){},created:function(){}},r=s,l=(a("907f"),a("3050"),a("2877")),c=Object(l["a"])(r,i,n,!1,null,"032f197e",null);e["default"]=c.exports},"7e4b":function(t,e,a){},"907f":function(t,e,a){"use strict";a("7e4b")},a29b:function(t,e,a){}}]);
//# sourceMappingURL=chunk-71557763.8f15bfa1.js.map