fix(性能测试): 编辑性能测试兼容老版本的数据

This commit is contained in:
Captain.B 2021-07-15 09:57:42 +08:00 committed by 刘瑞斌
parent 128763be38
commit 068348764b
1 changed files with 6 additions and 0 deletions

View File

@ -297,6 +297,7 @@ export default {
this.$get('/performance/get-load-config/' + this.testId, (response) => {
if (response.data) {
let data = JSON.parse(response.data);
let oldVersion;
for (let i = 0; i < data.length; i++) {
let d = data[i];
d.forEach(item => {
@ -312,6 +313,7 @@ export default {
break;
case DURATION:
this.threadGroups[i].duration = item.value;
oldVersion = item.unit;
break;
case UNIT:
this.threadGroups[i].unit = item.value;
@ -365,6 +367,10 @@ export default {
});
}
for (let i = 0; i < this.threadGroups.length; i++) {
//
if (oldVersion) {
break;
}
//
switch (this.threadGroups[i].unit) {
case 'M':