refactor: 去掉自定义事件
This commit is contained in:
parent
d026c17a81
commit
78237dfb0e
|
@ -181,8 +181,6 @@ export default {
|
|||
this.result = this.$post("/api/scenario/report/delete", {id: report.id}, () => {
|
||||
this.$success(this.$t('commons.delete_success'));
|
||||
this.search();
|
||||
// 发送广播,刷新 head 上的最新列表
|
||||
ApiEvent.$emit(LIST_CHANGE);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -239,8 +237,6 @@ export default {
|
|||
this.selectRows.clear();
|
||||
this.$success(this.$t('commons.delete_success'));
|
||||
this.search();
|
||||
// 发送广播,刷新 head 上的最新列表
|
||||
ApiEvent.$emit(LIST_CHANGE);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -305,8 +305,6 @@ export default {
|
|||
this.$post('/test/plan/delete/' + testPlanId, {}, () => {
|
||||
this.initTableData();
|
||||
this.$success(this.$t('commons.delete_success'));
|
||||
// 发送广播,刷新 head 上的最新列表
|
||||
TrackEvent.$emit(LIST_CHANGE);
|
||||
});
|
||||
},
|
||||
intoPlan(row, event, column) {
|
||||
|
|
|
@ -145,8 +145,6 @@ export default {
|
|||
this.result = this.$post("/api/report/delete", {id: report.id}, () => {
|
||||
this.$success(this.$t('commons.delete_success'));
|
||||
this.search();
|
||||
// 发送广播,刷新 head 上的最新列表
|
||||
ApiEvent.$emit(LIST_CHANGE);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -196,8 +194,6 @@ export default {
|
|||
this.selectRows.clear();
|
||||
this.$success(this.$t('commons.delete_success'));
|
||||
this.search();
|
||||
// 发送广播,刷新 head 上的最新列表
|
||||
ApiEvent.$emit(LIST_CHANGE);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -217,8 +217,6 @@ export default {
|
|||
path: '/api/test/edit?id=' + this.test.id
|
||||
})
|
||||
}
|
||||
// 发送广播,刷新 head 上的最新列表
|
||||
ApiEvent.$emit(LIST_CHANGE);
|
||||
})
|
||||
},
|
||||
runTest() {
|
||||
|
@ -238,8 +236,6 @@ export default {
|
|||
this.save(() => {
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
this.runTest();
|
||||
// 发送广播,刷新 head 上的最新列表
|
||||
ApiEvent.$emit(LIST_CHANGE);
|
||||
})
|
||||
},
|
||||
getBodyUploadFiles() {
|
||||
|
|
|
@ -178,8 +178,6 @@ export default {
|
|||
this.result = this.$post("/api/delete", {id: test.id}, () => {
|
||||
this.$success(this.$t('commons.delete_success'));
|
||||
this.search();
|
||||
// 发送广播,刷新 head 上的最新列表
|
||||
ApiEvent.$emit(LIST_CHANGE);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
{{ $t('commons.test') }}
|
||||
</el-menu-item>
|
||||
<el-menu-item :index="'/performance/report/all'" v-permission="['PROJECT_PERFORMANCE_REPORT:READ']">
|
||||
{{ $t('commons.test') }}
|
||||
{{ $t('commons.report') }}
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</el-col>
|
||||
|
|
|
@ -264,8 +264,6 @@ export default {
|
|||
this.result = this.$get('/performance/stop/' + this.reportId + '/' + forceStop, () => {
|
||||
this.$success(this.$t('report.test_stop_success'));
|
||||
if (forceStop) {
|
||||
// 发送广播,刷新 head 上的最新列表
|
||||
PerformanceEvent.$emit(LIST_CHANGE);
|
||||
this.$router.push('/performance/report/all');
|
||||
this.websocket.close();
|
||||
} else {
|
||||
|
|
|
@ -313,16 +313,12 @@ export default {
|
|||
_handleDeleteNoMsg(report) {
|
||||
this.result = this.$post(this.deletePath + report.id, {}, () => {
|
||||
this.initTableData();
|
||||
// 发送广播,刷新 head 上的最新列表
|
||||
PerformanceEvent.$emit(LIST_CHANGE);
|
||||
});
|
||||
},
|
||||
_handleDelete(report) {
|
||||
this.result = this.$post(this.deletePath + report.id, {}, () => {
|
||||
this.$success(this.$t('commons.delete_success'));
|
||||
this.initTableData();
|
||||
// 发送广播,刷新 head 上的最新列表
|
||||
PerformanceEvent.$emit(LIST_CHANGE);
|
||||
});
|
||||
},
|
||||
sort(column) {
|
||||
|
|
|
@ -180,8 +180,6 @@ export default {
|
|||
this.$success(this.$t('commons.save_success'));
|
||||
this.$refs.advancedConfig.cancelAllEdit();
|
||||
this.$router.push({path: '/performance/test/all'});
|
||||
// 发送广播,刷新 head 上的最新列表
|
||||
PerformanceEvent.$emit(LIST_CHANGE);
|
||||
});
|
||||
},
|
||||
saveAndRun() {
|
||||
|
@ -197,8 +195,6 @@ export default {
|
|||
this.result = this.$post(this.runPath, {id: this.test.id, triggerMode: 'MANUAL'}, (response) => {
|
||||
let reportId = response.data;
|
||||
this.$router.push({path: '/performance/report/view/' + reportId});
|
||||
// 发送广播,刷新 head 上的最新列表
|
||||
PerformanceEvent.$emit(LIST_CHANGE);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
|
@ -230,8 +230,6 @@ export default {
|
|||
this.result = this.$post(this.deletePath, data, () => {
|
||||
this.$success(this.$t('commons.delete_success'));
|
||||
this.initTableData();
|
||||
// 发送广播,刷新 head 上的最新列表
|
||||
PerformanceEvent.$emit(LIST_CHANGE);
|
||||
});
|
||||
},
|
||||
sort(column) {
|
||||
|
|
|
@ -206,8 +206,6 @@ export default {
|
|||
this.$success(this.$t('commons.save_success'));
|
||||
this.dialogFormVisible = false;
|
||||
this.$router.push('/track/plan/view/' + response.data);
|
||||
// 发送广播,刷新 head 上的最新列表
|
||||
TrackEvent.$emit(LIST_CHANGE);
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
|
@ -233,8 +231,6 @@ export default {
|
|||
this.$success(this.$t('commons.save_success'));
|
||||
this.dialogFormVisible = false;
|
||||
this.$emit("refresh");
|
||||
// 发送广播,刷新 head 上的最新列表
|
||||
TrackEvent.$emit(LIST_CHANGE);
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
@ -399,8 +399,6 @@ export default {
|
|||
this.$post('/test/plan/delete/' + testPlanId, {}, () => {
|
||||
this.initTableData();
|
||||
this.$success(this.$t('commons.delete_success'));
|
||||
// 发送广播,刷新 head 上的最新列表
|
||||
TrackEvent.$emit(LIST_CHANGE);
|
||||
});
|
||||
},
|
||||
intoPlan(row, event, column) {
|
||||
|
|
Loading…
Reference in New Issue