chunk-df430d7c.f7815e28.js 4.88 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-df430d7c"],{"2c34":function(t,e,a){},"7d9e":function(t,e,a){"use strict";a("cecb")},a580:function(t,e,a){"use strict";a("2c34")},cecb:function(t,e,a){},f9da: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}}),a("div",{staticClass:"time-select"},[a("bus-project",{ref:"childSelectProject",attrs:{defaultSelectIndex:1},on:{selectCallBackEmit:t.projectCallBackEmit}}),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"}}),a("el-date-picker",{staticStyle:{width:"210px"},attrs:{type:"date",placeholder:"选择结束日期时间","value-format":"yyyy-MM-dd"},model:{value:t.form.endTime,callback:function(e){t.$set(t.form,"endTime",e)},expression:"form.endTime"}})],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}})],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:"270",tableColumn:t.column,computeCls:t.computeObj}})],1)])])],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:"faultNumberRepeatEchart"}})])}],s={data:function(){return{baseUrl:window.baseOnLineOrOff?window.appConfig.baseUlrOnLine:"http://127.0.0.1:10099",sysTitle:"故障重复次数 ver:"+window.appConfig.appId,form:{startTime:new Date((new Date).setDate(new Date(1).getDate())).format("yyyy-MM-dd"),endTime:(new Date).format("yyyy-MM-dd")},sysData:{sysTable:[]},computeObj:{operator:"greater",iscolorDiff:!0,numb:5,startColumn:4},params:{nowSelectProjectVal:"",isFrist:!1},column:window.faultNumberRepeat}},methods:{projectCallBackEmit:function(t){this.params.nowSelectProjectVal=t.selectKey,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(null!=this.form.startTime&&null!=this.form.endTime)if(new Date(this.form.startTime)>=new Date(this.form.endTime))this.$alert("开始时间不能大于等于结束时间","提示",{dangerouslyUseHTMLString:!0});else{var a=this.$moment(this.form.startTime),i=this.$moment(this.form.endTime),n=i.diff(a,"months",!0);if(n>3)this.$alert("开始时间到结束时间不能超过3个月","提示",{dangerouslyUseHTMLString:!0});else{var s={urlSuffix:"".concat(this.baseUrl,"/api/BulletinBoard/FailureAlarmCount?startTime=").concat(this.form.startTime,"&endTime=").concat(this.form.endTime,"&projectCode=").concat(this.params.nowSelectProjectVal),logTitle:"表格数据",isLoad:!0,isUrlALL:!0},r=function(a){e.ajaxSuccessDataBefore(a.data.data.res)&&(e.initTable(a.data.data.res),e.initEchart(a.data.data.alarmRes),"excel"==t&&e.$refs.childExport.exportExcel(a.data.data.res))};"".ajax(this,s,r)}}else this.$alert("请选择开始时间-结束时间","提示",{dangerouslyUseHTMLString:!0});else this.$alert("请选择项目号","提示",{dangerouslyUseHTMLString:!0})},initTable:function(t){this.$refs.childTable.setDataSource(t)},initEchart:function(t){var e=[],a=[],i=[],n=0;t.forEach((function(t){n=t.alarmCount+n})),t.forEach((function(t){a.push(t.alarmMessage),e.push(t.alarmCount);var s=t.alarmCount/n;i.push(parseInt(100*s))})),window.guzhangCishu.title.text="故障总数:"+n,t.length<=15?window.guzhangCishu.dataZoom[0].end=99:t.length<=100?window.guzhangCishu.dataZoom[0].end=20:window.guzhangCishu.dataZoom[0].end=3,window.guzhangCishu.xAxis[0].data=a,window.guzhangCishu.series[0].data=e,window.guzhangCishu.series[1].data=i;var s=this.$echarts.init(document.getElementById("faultNumberRepeatEchart"));s.clear(),s.setOption(window.guzhangCishu)},initFrom:function(){this.initProjectSelect()},ajaxSuccessDataBefore:function(t,e){return null!=t&&0!=t.length||(this.$refs.childTable.setDataSource([]),this.$echarts.init(document.getElementById("faultNumberRepeatEchart")).clear(),this.$alert("业务操作查询无数据!","提示",{dangerouslyUseHTMLString:!0}),!1)}},mounted:function(){}},r=s,o=(a("a580"),a("7d9e"),a("2877")),l=Object(o["a"])(r,i,n,!1,null,"805ccd9e",null);e["default"]=l.exports}}]);
//# sourceMappingURL=chunk-df430d7c.f7815e28.js.map