feat(测试跟踪): 测试用例批量删除
This commit is contained in:
parent
fdc9b1c2fe
commit
9b5523d336
|
@ -20,10 +20,6 @@
|
||||||
<el-form-item label="更新后属性值为" prop="value">
|
<el-form-item label="更新后属性值为" prop="value">
|
||||||
<el-select v-model="form.value" style="width: 80%" :filterable="filterable">
|
<el-select v-model="form.value" style="width: 80%" :filterable="filterable">
|
||||||
<el-option v-for="(option, index) in options" :key="index" :value="option.id" :label="option.name">
|
<el-option v-for="(option, index) in options" :key="index" :value="option.id" :label="option.name">
|
||||||
<!-- <div v-if="option.email">-->
|
|
||||||
<!-- <span style="float: left">{{ option.name }}</span>-->
|
|
||||||
<!-- <span style="float: right;color: #8492a6;">{{ option.email }}</span>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -110,7 +106,6 @@
|
||||||
this.options = this.methods;
|
this.options = this.methods;
|
||||||
break;
|
break;
|
||||||
case "maintainer":
|
case "maintainer":
|
||||||
|
|
||||||
this.options = this.maintainers;
|
this.options = this.maintainers;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -196,7 +196,7 @@
|
||||||
}, {
|
}, {
|
||||||
name: '批量移动用例', stop: this.handleClickStop
|
name: '批量移动用例', stop: this.handleClickStop
|
||||||
}, {
|
}, {
|
||||||
name: '批量删除用例', stop: this.handleClickStop
|
name: '批量删除用例', stop: this.handleDeleteBatch
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -394,16 +394,39 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
batchEdit(form) {
|
batchEdit(form) {
|
||||||
let ids = Array.from(this.selectRows).map(row => row.id);
|
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 = {};
|
let param = {};
|
||||||
param[form.type] = form.value;
|
param[form.type] = form.value;
|
||||||
param.ids = ids;
|
param.ids = ids;
|
||||||
// todo 功能测试 的测试方式修改为 自动 时不通过
|
if (!sign) {
|
||||||
// 测试类型为自动时不能修改为 功能测试
|
|
||||||
this.$post('/test/case/batch/edit' , param, () => {
|
this.$post('/test/case/batch/edit' , param, () => {
|
||||||
this.$success(this.$t('commons.save_success'));
|
this.$success(this.$t('commons.save_success'));
|
||||||
this.refresh();
|
this.refresh();
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.$warning("功能测试的测试方式不能设置为自动!");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
filter(filters) {
|
filter(filters) {
|
||||||
_filter(filters, this.condition);
|
_filter(filters, this.condition);
|
||||||
|
|
Loading…
Reference in New Issue