|
@@ -112,7 +112,7 @@ export default {
|
|
|
createTest() {
|
|
|
this.$router.push({ path: '/cncTestLists' });
|
|
|
},
|
|
|
- deleteTest(item) {
|
|
|
+ deleteTest(item, index) {
|
|
|
const h = this.$createElement;
|
|
|
this.$msgbox({
|
|
|
title: '删除',
|
|
@@ -126,11 +126,16 @@ export default {
|
|
|
instance.confirmButtonText = '执行中...';
|
|
|
let data = {
|
|
|
"id": item._id,
|
|
|
+ "operator": "admin"
|
|
|
}
|
|
|
api.deleteTest(data).then((res) => {
|
|
|
if (res.success) {
|
|
|
instance.confirmButtonLoading = false;
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ this.pageModel.resultSet.splice(index, 1);
|
|
|
+ done();
|
|
|
} else {
|
|
|
+ this.$message.error("删除失败,请重试");
|
|
|
done();
|
|
|
}
|
|
|
})
|
|
@@ -139,17 +144,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}).then(() => {
|
|
|
- this.pageModel.resultSet.splice(index, 1);
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: '删除成功'
|
|
|
- });
|
|
|
}).catch(() => { });
|
|
|
},
|
|
|
copyTest(item) {
|
|
|
let data = {
|
|
|
"id": item._id,
|
|
|
- "operator": "测试"
|
|
|
+ "operator": "admin"
|
|
|
}
|
|
|
api.copyTest(data).then((res) => {
|
|
|
if (res.success) {
|