diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index 55cbc955af..f9c297d53d 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -1625,15 +1625,18 @@ export default { } if(this.currentScenario.id){ this.$post("/api/automation/update/follows/"+this.currentScenario.id, this.currentScenario.follows,() => { - this.$message.success("cancel success") + this.$success(this.$t('commons.cancel_follow_success')); }); } }else { this.showFollow = true; + if(!this.currentScenario.follows){ + this.currentScenario.follows = []; + } this.currentScenario.follows.push(this.currentUser().id) if(this.currentScenario.id){ this.$post("/api/automation/update/follows/"+this.currentScenario.id, this.currentScenario.follows,() => { - this.$message.success("cancel success") + this.$success(this.$t('commons.follow_success')); }); } } diff --git a/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue b/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue index b652817558..ebb2f02558 100644 --- a/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue +++ b/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue @@ -519,15 +519,18 @@ export default { } if( this.apiCase.id){ this.$post("/api/testcase/update/follows/"+this.apiCase.id, this.apiCase.follows,() => { - this.$message.success("cancel success") + this.$success(this.$t('commons.cancel_follow_success')); }); } }else { this.showFollow = true; + if(!this.apiCase.follows){ + this.apiCase.follows = []; + } this.apiCase.follows.push(this.currentUser().id) if( this.apiCase.id){ this.$post("/api/testcase/update/follows/"+this.apiCase.id, this.apiCase.follows,() => { - this.$message.success("cancel success") + this.$success(this.$t('commons.follow_success')); }); } } diff --git a/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue b/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue index d0ca420141..50fb6d94af 100644 --- a/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue +++ b/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue @@ -412,8 +412,6 @@ }); }, saveFollow(){ - console.log("***********") - console.log(this.basisData.id) if(this.showFollow){ this.showFollow = false; for (let i = 0; i < this.httpForm.follows.length; i++) { @@ -424,15 +422,18 @@ } if(this.basisData.id){ this.$post("/api/definition/update/follows/"+this.basisData.id, this.httpForm.follows,() => { - this.$message.success("cancel success") + this.$success(this.$t('commons.cancel_follow_success')); }); } }else { this.showFollow = true; + if(!this.httpForm.follows){ + this.httpForm.follows = []; + } this.httpForm.follows.push(this.currentUser().id) if(this.basisData.id){ this.$post("/api/definition/update/follows/"+this.basisData.id, this.httpForm.follows,() => { - this.$message.success("save success") + this.$success(this.$t('commons.follow_success')); }); } } diff --git a/frontend/src/business/components/performance/test/EditPerformanceTest.vue b/frontend/src/business/components/performance/test/EditPerformanceTest.vue index fe67476a67..3fe222ee84 100644 --- a/frontend/src/business/components/performance/test/EditPerformanceTest.vue +++ b/frontend/src/business/components/performance/test/EditPerformanceTest.vue @@ -494,15 +494,18 @@ export default { } if(this.testId){ this.$post("/performance/test/update/follows/"+this.testId, this.test.follows,() => { - this.$message.success("cancel success") + this.$success(this.$t('commons.cancel_follow_success')); }); } }else { this.showFollow = true; + if(!this.test.follows){ + this.test.follows = []; + } this.test.follows.push(this.currentUser().id) if(this.testId){ this.$post("/performance/test/update/follows/"+this.testId, this.test.follows,() => { - this.$message.success("cancel success") + this.$success(this.$t('commons.follow_success')); }); } } diff --git a/frontend/src/business/components/track/case/components/TestCaseEdit.vue b/frontend/src/business/components/track/case/components/TestCaseEdit.vue index 451812e012..77e0927671 100644 --- a/frontend/src/business/components/track/case/components/TestCaseEdit.vue +++ b/frontend/src/business/components/track/case/components/TestCaseEdit.vue @@ -841,16 +841,21 @@ export default { this.result.loading = true this.$post('/test/case/edit/follows/' + this.currentTestCaseInfo.id, this.form.follows, () => { this.result.loading = false + this.$success(this.$t('commons.cancel_follow_success')); }); } } else { this.showFollow = true; + if(!this.form.follows){ + this.form.follows = []; + } this.form.follows.push(this.currentUser().id) if (this.path === "/test/case/edit") { this.result.loading = true this.$post('/test/case/edit/follows/' + this.currentTestCaseInfo.id, this.form.follows, () => { this.result.loading = false + this.$success(this.$t('commons.follow_success')); }); } } diff --git a/frontend/src/business/components/track/issue/IssueEditDetail.vue b/frontend/src/business/components/track/issue/IssueEditDetail.vue index 1051721880..3f8b57e864 100644 --- a/frontend/src/business/components/track/issue/IssueEditDetail.vue +++ b/frontend/src/business/components/track/issue/IssueEditDetail.vue @@ -317,14 +317,19 @@ export default { } if(this.url === "issues/update"){ this.$post("issues/up/follows/"+this.issueId, this.form.follows,() => { + this.$success(this.$t('commons.cancel_follow_success')); }); } }else { this.showFollow = true; + if(!this.form.follows){ + this.form.follows = []; + } this.form.follows.push(this.currentUser().id) if(this.url === "issues/update"){ this.$post("issues/up/follows/"+this.issueId, this.form.follows,() => { + this.$success(this.$t('commons.follow_success')); }); } } diff --git a/frontend/src/business/components/track/plan/components/TestPlanList.vue b/frontend/src/business/components/track/plan/components/TestPlanList.vue index cf6c2528af..bf01580e00 100644 --- a/frontend/src/business/components/track/plan/components/TestPlanList.vue +++ b/frontend/src/business/components/track/plan/components/TestPlanList.vue @@ -565,14 +565,19 @@ export default { } } this.$post('/test/plan/edit/follows/' + row.id, row.follows,() => { + this.$success(this.$t('commons.cancel_follow_success')); this.initTableData(); }); return } if(!row.showFollow){ row.showFollow = true; + if(!row.follows){ + row.follows = []; + } row.follows.push(this.currentUser().id); this.$post('/test/plan/edit/follows/' + row.id, row.follows,() => { + this.$success(this.$t('commons.follow_success')); this.initTableData(); }); return diff --git a/frontend/src/business/components/track/review/components/TestCaseReviewList.vue b/frontend/src/business/components/track/review/components/TestCaseReviewList.vue index 5b308dda35..0de2fc36d5 100644 --- a/frontend/src/business/components/track/review/components/TestCaseReviewList.vue +++ b/frontend/src/business/components/track/review/components/TestCaseReviewList.vue @@ -318,15 +318,20 @@ export default { } param.followIds = row.followIds this.$post('/test/case/review/edit/follows', param,() => { + this.$success(this.$t('commons.cancel_follow_success')); this.initTableData(); }); return } if(!row.showFollow){ row.showFollow = true; + if(!row.followIds){ + row.followIds = []; + } row.followIds.push(this.currentUser().id); param.followIds = row.followIds this.$post('/test/case/review/edit/follows', param,() => { + this.$success(this.$t('commons.follow_success')); this.initTableData(); }); } diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index fd059c0370..a5e975c8bf 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -189,6 +189,8 @@ export default { run_success: "Run Success", run_completed: "Run Completed", run_fail: "Run Fail", + follow_success:"Follow Success", + cancel_follow_success: "Cancel Follow Success", generate_test_data: "Generate test data", relationship: { name: 'Dependencies', diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index f90d885c81..0fb2ae0324 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -190,6 +190,8 @@ export default { run_success: "执行成功", run_completed: "执行完成", run_fail: "执行失败", + follow_success:"关注成功", + cancel_follow_success:"取消关注成功", relationship: { name: '依赖关系', pre_case: '前置用例', diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index 21d4d89855..6f3ccb0c3a 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -190,6 +190,8 @@ export default { run_success: "執行成功", run_completed: "執行完成", run_fail: "執行失敗", + follow_success:"關注成功", + cancel_follow_success: "取消關注成功", relationship: { name: '依賴關系', pre_case: '前置用例',