chunk-7b4dc90b.7b6f2ae9.js 5.34 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7b4dc90b"],{3110:function(t,e,a){"use strict";a("6105")},6105:function(t,e,a){},"7b95":function(t,e,a){},"9f17":function(t,e,a){"use strict";a("7b95")},c632: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-body",on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.btnAction("query")}}},[a("sys-head",{attrs:{title:t.sysTitle,remark:"(点击柱状查看故障详情)"}}),a("div",{staticClass:"time-select"},[a("bus-project-eq",{attrs:{defaultSelectIndexProject:1,defaultSelectIndexEq:1,isAGV:!1},on:{selectCallBackEmit:t.projectEqCallBackEmit}}),a("el-col",{attrs:{span:56}},[a("el-date-picker",{staticStyle:{width:"210px"},attrs:{type:"date",placeholder:"选择日期","value-format":"yyyy-MM-dd"},model:{value:t.form.startTime,callback:function(e){t.$set(t.form,"startTime",e)},expression:"form.startTime"}})],1),a("el-button",{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,excelColumn:t.column.tableColumn}})],1),t._m(0),a("div",{staticClass:"dv-body-bottom"},[a("div",{staticClass:"dv-body-bottom-content"},[a("div",{staticClass:"dv-body-bottom-tableMTTR"},[a("sys-table",{ref:"childTable",attrs:{tableHeight:"220",tableColumn:t.column.tableColumn}})],1)])])],1)},s=[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:"faultStatistiDay"}})])}],n={data:function(){return{baseUrl:window.baseOnLineOrOff?window.appConfig.baseUlrOnLine:"http://127.0.0.1:10099",sysTitle:"故障次数天每小时对比 ver:"+window.appConfig.appId,form:{startTime:(new Date).format("yyyy-MM-dd")},sysData:{eChars:[],sysTable:[]},params:{nowSelectProjectVal:"",nowSelectEqVal:"",isFrist:!1},column:{tableColumn:window.faultStatisti}}},methods:{projectEqCallBackEmit:function(t){this.params.nowSelectProjectVal=t.nowSelectProject["selectKey"],this.params.nowSelectEqVal=t.nowSelectEq["selectKey"],""!=this.params.nowSelectEqVal&&(this.params.isFrist||(this.getData("query"),this.params.isFrist=!0))},btnAction:function(t){this.getData(t)},getData:function(t){var e=this;if(""!=this.params.nowSelectProjectVal)if(""!=this.params.nowSelectEqTypeVal)if(null!=this.form.startTime){var a={urlSuffix:"".concat(this.baseUrl,"/api/BulletinBoard/FailureEveryHourCount?projectCode=").concat(this.params.nowSelectProjectVal,"&currentDate=").concat(this.form.startTime,"&equipmentCode=").concat(this.params.nowSelectEqVal),logTitle:"表格数据",isUrlALL:!0,isLoad:!0,falg:t},i=function(a){if(e.ajaxSuccessDataBefore(a)){e.sysData.eChars=a.data.data;var i=e.initEchartMttr(a.data.message);if(e.initEchart(i),"excel"==t){var s=a.data.data.map((function(t){return t.AlarmListData})).flat();e.$refs.childExport.exportExcel(s)}else e.popupList(e.sysData.eChars[0].TimePeriod)}};"".ajax(this,a,i)}else this.$alert("请选择日期","提示",{dangerouslyUseHTMLString:!0});else this.$alert("请选择设备","提示",{dangerouslyUseHTMLString:!0});else this.$alert("请选择项目号","提示",{dangerouslyUseHTMLString:!0})},initEchartMttr:function(t){var e=this.echeartTmpe(),a=[],i=[];e.forEach((function(t){a.push(t.AlarmCount),i.push(t.TimePeriod)}));var s=document.getElementById("faultStatistiDay"),n=this.$echarts.init(s);return faultStatistiDayOption.xAxis.data=i,faultStatistiDayOption.series[0].data=a,faultStatistiDayOption.title.text=t,faultStatistiDayOption&&n.setOption(faultStatistiDayOption),faultStatistiDayOption},echeartTmpe:function(){var t=this,e=(new Date).format("yyyy-MM-dd"),a=[];if(this.form.startTime==e)for(var i=(new Date).getHours(),s=0;s<=i;++s)a.push({AlarmCount:null,AlarmListData:[],AlarmSumTime:null,TimePeriod:s,WeekNo:null});else for(var n=0;n<=23;++n)a.push({AlarmCount:null,AlarmListData:[],AlarmSumTime:null,TimePeriod:n,WeekNo:null});return a.forEach((function(e){t.sysData.eChars.forEach((function(t){e.TimePeriod==t.TimePeriod&&(e.TimePeriod=t.TimePeriod,e.AlarmListData=t.AlarmListData,e.AlarmCount=t.AlarmCount,e.AlarmSumTime=t.AlarmSumTime)}))})),this.sysData.sysTable=a,a},initEchart:function(t){var e=this,a=this.$echarts.init(document.getElementById("faultStatistiDay")),i=a;i.getZr().on("click",(function(t){var s=[t.offsetX,t.offsetY];if(i.containPixel("grid",s)){var n=i.convertFromPixel({seriesIndex:0},[t.offsetX,t.offsetY])[0],r=a.getOption(),l=r.xAxis[0].data[n];0==t.event.cancelBubble&&(t.event.cancelBubble=!0,e.popupList(l))}})),null!=i&&i.setOption(t)},popupList:function(t){var e=[];this.sysData.sysTable.forEach((function(a){a.TimePeriod===t&&(e=a.AlarmListData)})),this.$refs.childTable.setDataSource(e)},ajaxSuccessDataBefore:function(t,e){return null!=t.data.data&&0!=t.data.data.length||(this.$refs.childTable.setDataSource([]),this.$echarts.init(document.getElementById("faultStatistiDay")).clear(),this.$alert("业务操作查询无数据!","提示",{dangerouslyUseHTMLString:!0}),!1)}},mounted:function(){}},r=n,l=(a("9f17"),a("3110"),a("2877")),o=Object(l["a"])(r,i,s,!1,null,"11fd74d8",null);e["default"]=o.exports}}]);
//# sourceMappingURL=chunk-7b4dc90b.7b6f2ae9.js.map