fix(测试跟踪): 修复功能测试的测试方式不能批量设置为自动的问题

This commit is contained in:
shiziyuan9527 2020-10-23 15:42:44 +08:00
parent ce3952bb3e
commit 042f43d9da
1 changed files with 6 additions and 28 deletions

View File

@ -444,39 +444,17 @@
}
},
batchEdit(form) {
let sign = false;
let arr = Array.from(this.selectRows);
//
if (form.type === 'method' && form.value === 'auto') {
arr.forEach(row => {
if (row.type === 'functional') {
sign = true;
return;
}
});
}
if (form.type === 'type' && form.value === 'functional') {
arr.forEach(row => {
if (row.method === 'auto') {
sign = true;
return;
}
});
}
let ids = arr.map(row => row.id);
let param = {};
param[form.type] = form.value;
param.ids = ids;
if (!sign) {
this.$post('/test/case/batch/edit', param, () => {
this.$success(this.$t('commons.save_success'));
this.refresh();
// 广 head
TrackEvent.$emit(LIST_CHANGE);
});
} else {
this.$warning("功能测试的测试方式不能设置为自动!");
}
},
filter(filters) {
_filter(filters, this.condition);