fix(性能测试): 修复测试报告图表缓存的问题
--bug=1008160 --user=刘瑞斌 【性能测试】测试报告-测试详情,自定义指标显示后不能取消显示 https://www.tapd.cn/55049933/s/1074750
This commit is contained in:
parent
47d9047803
commit
a5b2df3104
|
@ -231,6 +231,7 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<ms-chart ref="chart2"
|
<ms-chart ref="chart2"
|
||||||
|
v-if="refresh"
|
||||||
class="chart-config"
|
class="chart-config"
|
||||||
:options="totalOption"
|
:options="totalOption"
|
||||||
@datazoom="changeDataZoom"
|
@datazoom="changeDataZoom"
|
||||||
|
@ -293,10 +294,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MsChart from "@/business/components/common/chart/MsChart";
|
import MsChart from "@/business/components/common/chart/MsChart";
|
||||||
import {
|
import {getPerformanceReportDetailContent, getSharePerformanceReportDetailContent,} from "@/network/load-test";
|
||||||
getPerformanceReportDetailContent,
|
|
||||||
getSharePerformanceReportDetailContent,
|
|
||||||
} from "@/network/load-test";
|
|
||||||
|
|
||||||
const color = ['#60acfc', '#32d3eb', '#5bc49f', '#feb64d', '#ff7c7c', '#9287e7', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'];
|
const color = ['#60acfc', '#32d3eb', '#5bc49f', '#feb64d', '#ff7c7c', '#9287e7', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'];
|
||||||
|
|
||||||
|
@ -341,6 +339,7 @@ export default {
|
||||||
label: 'label'
|
label: 'label'
|
||||||
},
|
},
|
||||||
init: false,
|
init: false,
|
||||||
|
refresh: true,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
baseOption: {
|
baseOption: {
|
||||||
color: color,
|
color: color,
|
||||||
|
@ -438,20 +437,15 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleChecked(name) {
|
handleChecked(name) {
|
||||||
// let minus = this.checkOptions[name].filter((v) => {
|
|
||||||
// return this.checkList[name].indexOf(v) === -1;
|
|
||||||
// })
|
|
||||||
// let groupName = this.$t('load_test.report.' + name) + ': ';
|
|
||||||
// for (const m of minus) {
|
|
||||||
// this.chartData = this.chartData.filter(c => c.groupName !== groupName + m);
|
|
||||||
// }
|
|
||||||
// this.totalOption = this.generateOption(this.baseOption, this.chartData);
|
|
||||||
// this.getChart(name, this.checkList[name]);
|
|
||||||
this.getTotalChart();
|
this.getTotalChart();
|
||||||
|
|
||||||
|
this.refresh = false;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.refresh = true;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
initTableData() {
|
initTableData() {
|
||||||
// this.init = true;
|
|
||||||
|
|
||||||
for (const name of CHART_MAP) {
|
for (const name of CHART_MAP) {
|
||||||
this.getCheckOptions(name);
|
this.getCheckOptions(name);
|
||||||
}
|
}
|
||||||
|
@ -593,28 +587,6 @@ export default {
|
||||||
item.groupName = this.$t('load_test.report.' + reportKey) + ': ' + item.groupName;
|
item.groupName = this.$t('load_test.report.' + reportKey) + ': ' + item.groupName;
|
||||||
});
|
});
|
||||||
return {data, reportKey};
|
return {data, reportKey};
|
||||||
// if (this.baseOption.yAxis.length === 0) {
|
|
||||||
// this.baseOption.yAxis.push({
|
|
||||||
// name: this.$t('load_test.report.' + reportKey),
|
|
||||||
// type: 'value',
|
|
||||||
// min: 0,
|
|
||||||
// position: 'left',
|
|
||||||
// boundaryGap: [0, '100%']
|
|
||||||
// });
|
|
||||||
// } else {
|
|
||||||
// this.baseOption.yAxis.push({
|
|
||||||
// name: this.$t('load_test.report.' + reportKey),
|
|
||||||
// type: 'value',
|
|
||||||
// min: 0,
|
|
||||||
// position: 'right',
|
|
||||||
// nameRotate: 20,
|
|
||||||
// offset: (this.baseOption.yAxis.length - 1) * 50,
|
|
||||||
// boundaryGap: [0, '100%']
|
|
||||||
// });
|
|
||||||
// this.baseOption.grid.right = (this.baseOption.yAxis.length - 1) * 5 + '%';
|
|
||||||
// }
|
|
||||||
// let yAxisIndex = this.baseOption.yAxis.length - 1;
|
|
||||||
// this.totalOption = this.generateOption(this.baseOption, data, yAxisIndex);
|
|
||||||
},
|
},
|
||||||
generateOption(option, data, yAxisIndex) {
|
generateOption(option, data, yAxisIndex) {
|
||||||
let chartData = data;
|
let chartData = data;
|
||||||
|
|
Loading…
Reference in New Issue