refactor: 去掉自定义事件

This commit is contained in:
Captain.B 2021-05-26 15:02:05 +08:00 committed by 刘瑞斌
parent d026c17a81
commit 78237dfb0e
12 changed files with 1 additions and 35 deletions

View File

@ -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);
});
}
}

View File

@ -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) {

View File

@ -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);
});
}
}

View File

@ -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() {

View File

@ -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);
});
}
}

View File

@ -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>

View File

@ -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 {

View File

@ -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) {

View File

@ -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);
});
});
},

View File

@ -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) {

View File

@ -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;

View File

@ -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) {