2 lines
106 KiB
JavaScript
2 lines
106 KiB
JavaScript
|
webpackJsonp([1],{"3e4o":function(e,t){},"4C4r":function(e,t){},"6j5T":function(e,t){},"6k33":function(e,t){},"7K47":function(e,t){},ABHT:function(e,t){},Bmfl:function(e,t){},DyIa:function(e,t){},E1AH:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("mvHQ"),i=a.n(s),n={data:function(){return{loading:!1,interfaceStatisticChartByCaseNum:{id:"interfaceStatisticChartByCaseNum",title_text:"项目用例统计",trigger:"axis",legend:[],grid:{},xAxis:{name:"",type:"category",data:[]},yAxis:{},series:{name:"",color:"#4285F4",type:"bar",data:[]}},interfaceStatisticChartByExceStatus:{id:"interfaceStatisticChartByExceStatus",title_text:"任务用例统计",trigger:"item",legend:[],xAxis:{name:"",type:"category",data:[]},yAxis:{},series:{name:"",color:"#85C0D9",type:"bar",data:[]}},interfaceStatisticChartByTestTask:{id:"interfaceStatisticChartByTestTask",title_text:"任务执行成功率",trigger:"item",legend:[],grid:{left:"80",top:"80",right:"0",bottom:"0",containLabel:!0},tooltip:{showContent:!1},xAxis:{type:"value",splitLine:{show:!1},axisLabel:{show:!1},axisTick:{show:!1},axisLine:{show:!1}},yAxis:{type:"category",axisTick:{show:!1},axisLine:{show:!1},axisLabel:{color:"black",fontSize:14},data:[]},series:[{name:"",type:"bar",barWidth:19,data:[],color:"#0505F5",label:{show:!0,position:"right",formatter:"{c}%",color:"black",fontSize:12},itemStyle:{normal:{barBorderRadius:10}},zlevel:1},{name:"%",type:"bar",barGap:"-100%",barWidth:19,data:[],color:"#FFFFFF",itemStyle:{normal:{barBorderRadius:10}}}]},colorList:["#4285F4","#EA4335","#FBBC05","#34A853","#85C0D9","#043269","#78C31C","#916B86","#202124","#00818D","#F5EDA7"]}},mounted:function(){var e=this;setTimeout(function(){e.loading=!1,e.drawAllCharts()},800)},beforeCreate:function(){},created:function(){this.loading=!0,this.getAllTestItemCaseNum(),this.getAllTestTaskExecCondition()},methods:{getAllTestTaskExecCondition:function(){var e=this;this.$api.testresult.queryInterfaceTestCaseExecCountAndSuccessNumAndFailNum().then(function(t){var a=t.data.data,s=[],n=[],r=[],o=[],l=[];a.length>5&&(a=a.splice(0,5)),a.forEach(function(e){var t=e.taskName;s.push(t),t.length>10&&(t=t.substring(0,5)+"..."+t.substring(t.length-5)),n.push(t),r.push(e.execScale),l.push(e.caseCount),o.push(100)}),e.interfaceStatisticChartByTestTask.yAxis.data=JSON.parse(i()(n)),e.interfaceStatisticChartByTestTask.series[0].data=JSON.parse(i()(r)),e.interfaceStatisticChartByTestTask.series[1].data=JSON.parse(i()(o)),e.interfaceStatisticChartByExceStatus.xAxis.data=s,e.interfaceStatisticChartByExceStatus.series.data=l}).catch(function(){})},getAllTestItemCaseNum:function(){var e=this,t=[],a=[];this.$api.testresult.queryInterfaceTestCaseNumGroupByItemName().then(function(s){s.data.data.forEach(function(e){t.push(e.itemName),a.push(e.caseNum)}),e.interfaceStatisticChartByCaseNum.xAxis.data=JSON.parse(i()(t)),e.interfaceStatisticChartByCaseNum.series.data=JSON.parse(i()(a))}).catch(function(){})},drawAllCharts:function(){try{var e=this.$echarts.init(document.getElementById(this.interfaceStatisticChartByCaseNum.id));this.setOptionChart(e,this.interfaceStatisticChartByCaseNum);var t=this.$echarts.init(document.getElementById(this.interfaceStatisticChartByExceStatus.id));this.setOptionChart(t,this.interfaceStatisticChartByExceStatus);var a=this.$echarts.init(document.getElementById(this.interfaceStatisticChartByTestTask.id));this.setProgressOptionChart(a,this.interfaceStatisticChartByTestTask),window.onresize=function(){e.resize(),t.resize(),a.resize()}}catch(e){}},setOptionChart:function(e,t){e.showLoading({text:"loading..."}),e.hideLoading(),e.setOption({dataZoom:[{height:24,type:"slider",show:!0,xAxisIndex:[0],start:0,end:100,bottom:5}],title:{text:t.title_text},tooltip:{trigger:t.trigger},itemStyle:{shadowBlur:200,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0.5)"},legend:{orient:"horizontal",data:t.legend},xAxis:t.xAxis,yAxis:t.yAxis,series:t.series})},setProgressOptionChart:function(e,t){e.showLoading({text:"loading..."}),e.hideLoading(),e.setOption({dataZoom:[{heigh
|
||
|
//# sourceMappingURL=1.5ea73d8c812e95ec5d67.js.map
|