修改消息提示
This commit is contained in:
parent
874f3c627e
commit
0bf42358e7
|
@ -132,17 +132,11 @@
|
|||
this.status = data.status;
|
||||
switch (data.status) {
|
||||
case 'Error':
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: "报告生成错误,无法查看!"
|
||||
});
|
||||
this.$warning("报告生成错误,无法查看!");
|
||||
break;
|
||||
case 'Starting':
|
||||
case 'Reporting':
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: "报告生成中...."
|
||||
});
|
||||
this.$info("报告生成中....");
|
||||
break;
|
||||
case 'Running':
|
||||
this.showTestLogging = true;
|
||||
|
|
|
@ -136,16 +136,10 @@
|
|||
},
|
||||
handleEdit(report) {
|
||||
if (report.status === "Error") {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: "报告生成错误,无法查看!"
|
||||
});
|
||||
this.$warning("报告生成错误,无法查看!");
|
||||
return false
|
||||
} else if (report.status === "Starting") {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: "报告生成中..."
|
||||
});
|
||||
this.$info("报告生成中...")
|
||||
return false
|
||||
}
|
||||
this.$router.push({
|
||||
|
@ -164,10 +158,7 @@
|
|||
},
|
||||
_handleDelete(report) {
|
||||
this.result = this.$post(this.deletePath + report.id, {}, () => {
|
||||
this.$message({
|
||||
message: this.$t('commons.delete_success'),
|
||||
type: 'success'
|
||||
});
|
||||
this.$success(this.$t('commons.delete_success'));
|
||||
this.initTableData();
|
||||
});
|
||||
},
|
||||
|
|
|
@ -125,10 +125,7 @@
|
|||
let options = this.getSaveOption();
|
||||
|
||||
this.result = this.$request(options, () => {
|
||||
this.$message({
|
||||
message: this.$t('commons.save_success'),
|
||||
type: 'success'
|
||||
});
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
this.$refs.advancedConfig.cancelAllEdit();
|
||||
this.$router.push({path: '/performance/test/all'})
|
||||
});
|
||||
|
@ -142,16 +139,9 @@
|
|||
|
||||
this.result = this.$request(options, (response) => {
|
||||
this.testPlan.id = response.data;
|
||||
this.$message({
|
||||
message: this.$t('commons.save_success'),
|
||||
type: 'success'
|
||||
});
|
||||
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
this.result = this.$post(this.runPath, {id: this.testPlan.id}, () => {
|
||||
this.$message({
|
||||
message: this.$t('load_test.is_running'),
|
||||
type: 'success'
|
||||
});
|
||||
this.$success(this.$t('load_test.is_running'))
|
||||
this.$router.push({path: '/performance/report/all'})
|
||||
})
|
||||
});
|
||||
|
@ -196,20 +186,12 @@
|
|||
},
|
||||
validTestPlan() {
|
||||
if (!this.testPlan.name) {
|
||||
this.$message({
|
||||
message: this.$t('load_test.test_name_is_null'),
|
||||
type: 'error'
|
||||
});
|
||||
|
||||
this.$error(this.$t('load_test.test_name_is_null'));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this.testPlan.projectId) {
|
||||
this.$message({
|
||||
message: this.$t('load_test.project_is_null'),
|
||||
type: 'error'
|
||||
});
|
||||
|
||||
this.$error(this.$t('load_test.project_is_null'));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -189,10 +189,7 @@
|
|||
organizationId: this.currentUser().lastOrganizationId
|
||||
}
|
||||
this.result = this.$post("/organization/member/update", param, () => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: this.$t('commons.modify_success')
|
||||
});
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
this.updateVisible = false;
|
||||
this.initTableData();
|
||||
});
|
||||
|
@ -204,26 +201,17 @@
|
|||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.result = this.$get('/user/org/member/delete/' + this.currentUser().lastOrganizationId + '/' + row.id, () => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: this.$t('commons.delete_success')
|
||||
});
|
||||
this.$success(this.$t('commons.delete_success'));
|
||||
this.initTableData();
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: this.$t('commons.delete_cancel')
|
||||
});
|
||||
this.$info(this.$t('commons.delete_cancel'))
|
||||
});
|
||||
},
|
||||
create() {
|
||||
let orgId = this.currentUser().lastOrganizationId;
|
||||
if (!orgId) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: this.$t('organization.select_organization')
|
||||
})
|
||||
this.$warning(this.$t('organization.select_organization'));
|
||||
return false;
|
||||
}
|
||||
this.form = {};
|
||||
|
|
Loading…
Reference in New Issue