fix 关注问题
This commit is contained in:
parent
66feb50786
commit
bc02c38758
|
@ -1625,15 +1625,18 @@ export default {
|
||||||
}
|
}
|
||||||
if(this.currentScenario.id){
|
if(this.currentScenario.id){
|
||||||
this.$post("/api/automation/update/follows/"+this.currentScenario.id, this.currentScenario.follows,() => {
|
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 {
|
}else {
|
||||||
this.showFollow = true;
|
this.showFollow = true;
|
||||||
|
if(!this.currentScenario.follows){
|
||||||
|
this.currentScenario.follows = [];
|
||||||
|
}
|
||||||
this.currentScenario.follows.push(this.currentUser().id)
|
this.currentScenario.follows.push(this.currentUser().id)
|
||||||
if(this.currentScenario.id){
|
if(this.currentScenario.id){
|
||||||
this.$post("/api/automation/update/follows/"+this.currentScenario.id, this.currentScenario.follows,() => {
|
this.$post("/api/automation/update/follows/"+this.currentScenario.id, this.currentScenario.follows,() => {
|
||||||
this.$message.success("cancel success")
|
this.$success(this.$t('commons.follow_success'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -519,15 +519,18 @@ export default {
|
||||||
}
|
}
|
||||||
if( this.apiCase.id){
|
if( this.apiCase.id){
|
||||||
this.$post("/api/testcase/update/follows/"+this.apiCase.id, this.apiCase.follows,() => {
|
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 {
|
}else {
|
||||||
this.showFollow = true;
|
this.showFollow = true;
|
||||||
|
if(!this.apiCase.follows){
|
||||||
|
this.apiCase.follows = [];
|
||||||
|
}
|
||||||
this.apiCase.follows.push(this.currentUser().id)
|
this.apiCase.follows.push(this.currentUser().id)
|
||||||
if( this.apiCase.id){
|
if( this.apiCase.id){
|
||||||
this.$post("/api/testcase/update/follows/"+this.apiCase.id, this.apiCase.follows,() => {
|
this.$post("/api/testcase/update/follows/"+this.apiCase.id, this.apiCase.follows,() => {
|
||||||
this.$message.success("cancel success")
|
this.$success(this.$t('commons.follow_success'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -412,8 +412,6 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
saveFollow(){
|
saveFollow(){
|
||||||
console.log("***********")
|
|
||||||
console.log(this.basisData.id)
|
|
||||||
if(this.showFollow){
|
if(this.showFollow){
|
||||||
this.showFollow = false;
|
this.showFollow = false;
|
||||||
for (let i = 0; i < this.httpForm.follows.length; i++) {
|
for (let i = 0; i < this.httpForm.follows.length; i++) {
|
||||||
|
@ -424,15 +422,18 @@
|
||||||
}
|
}
|
||||||
if(this.basisData.id){
|
if(this.basisData.id){
|
||||||
this.$post("/api/definition/update/follows/"+this.basisData.id, this.httpForm.follows,() => {
|
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 {
|
}else {
|
||||||
this.showFollow = true;
|
this.showFollow = true;
|
||||||
|
if(!this.httpForm.follows){
|
||||||
|
this.httpForm.follows = [];
|
||||||
|
}
|
||||||
this.httpForm.follows.push(this.currentUser().id)
|
this.httpForm.follows.push(this.currentUser().id)
|
||||||
if(this.basisData.id){
|
if(this.basisData.id){
|
||||||
this.$post("/api/definition/update/follows/"+this.basisData.id, this.httpForm.follows,() => {
|
this.$post("/api/definition/update/follows/"+this.basisData.id, this.httpForm.follows,() => {
|
||||||
this.$message.success("save success")
|
this.$success(this.$t('commons.follow_success'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -494,15 +494,18 @@ export default {
|
||||||
}
|
}
|
||||||
if(this.testId){
|
if(this.testId){
|
||||||
this.$post("/performance/test/update/follows/"+this.testId, this.test.follows,() => {
|
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 {
|
}else {
|
||||||
this.showFollow = true;
|
this.showFollow = true;
|
||||||
|
if(!this.test.follows){
|
||||||
|
this.test.follows = [];
|
||||||
|
}
|
||||||
this.test.follows.push(this.currentUser().id)
|
this.test.follows.push(this.currentUser().id)
|
||||||
if(this.testId){
|
if(this.testId){
|
||||||
this.$post("/performance/test/update/follows/"+this.testId, this.test.follows,() => {
|
this.$post("/performance/test/update/follows/"+this.testId, this.test.follows,() => {
|
||||||
this.$message.success("cancel success")
|
this.$success(this.$t('commons.follow_success'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -841,16 +841,21 @@ export default {
|
||||||
this.result.loading = true
|
this.result.loading = true
|
||||||
this.$post('/test/case/edit/follows/' + this.currentTestCaseInfo.id, this.form.follows, () => {
|
this.$post('/test/case/edit/follows/' + this.currentTestCaseInfo.id, this.form.follows, () => {
|
||||||
this.result.loading = false
|
this.result.loading = false
|
||||||
|
this.$success(this.$t('commons.cancel_follow_success'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.showFollow = true;
|
this.showFollow = true;
|
||||||
|
if(!this.form.follows){
|
||||||
|
this.form.follows = [];
|
||||||
|
}
|
||||||
this.form.follows.push(this.currentUser().id)
|
this.form.follows.push(this.currentUser().id)
|
||||||
if (this.path === "/test/case/edit") {
|
if (this.path === "/test/case/edit") {
|
||||||
this.result.loading = true
|
this.result.loading = true
|
||||||
this.$post('/test/case/edit/follows/' + this.currentTestCaseInfo.id, this.form.follows, () => {
|
this.$post('/test/case/edit/follows/' + this.currentTestCaseInfo.id, this.form.follows, () => {
|
||||||
this.result.loading = false
|
this.result.loading = false
|
||||||
|
this.$success(this.$t('commons.follow_success'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -317,14 +317,19 @@ export default {
|
||||||
}
|
}
|
||||||
if(this.url === "issues/update"){
|
if(this.url === "issues/update"){
|
||||||
this.$post("issues/up/follows/"+this.issueId, this.form.follows,() => {
|
this.$post("issues/up/follows/"+this.issueId, this.form.follows,() => {
|
||||||
|
this.$success(this.$t('commons.cancel_follow_success'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
this.showFollow = true;
|
this.showFollow = true;
|
||||||
|
if(!this.form.follows){
|
||||||
|
this.form.follows = [];
|
||||||
|
}
|
||||||
this.form.follows.push(this.currentUser().id)
|
this.form.follows.push(this.currentUser().id)
|
||||||
if(this.url === "issues/update"){
|
if(this.url === "issues/update"){
|
||||||
this.$post("issues/up/follows/"+this.issueId, this.form.follows,() => {
|
this.$post("issues/up/follows/"+this.issueId, this.form.follows,() => {
|
||||||
|
this.$success(this.$t('commons.follow_success'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -565,14 +565,19 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$post('/test/plan/edit/follows/' + row.id, row.follows,() => {
|
this.$post('/test/plan/edit/follows/' + row.id, row.follows,() => {
|
||||||
|
this.$success(this.$t('commons.cancel_follow_success'));
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
});
|
});
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(!row.showFollow){
|
if(!row.showFollow){
|
||||||
row.showFollow = true;
|
row.showFollow = true;
|
||||||
|
if(!row.follows){
|
||||||
|
row.follows = [];
|
||||||
|
}
|
||||||
row.follows.push(this.currentUser().id);
|
row.follows.push(this.currentUser().id);
|
||||||
this.$post('/test/plan/edit/follows/' + row.id, row.follows,() => {
|
this.$post('/test/plan/edit/follows/' + row.id, row.follows,() => {
|
||||||
|
this.$success(this.$t('commons.follow_success'));
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
});
|
});
|
||||||
return
|
return
|
||||||
|
|
|
@ -318,15 +318,20 @@ export default {
|
||||||
}
|
}
|
||||||
param.followIds = row.followIds
|
param.followIds = row.followIds
|
||||||
this.$post('/test/case/review/edit/follows', param,() => {
|
this.$post('/test/case/review/edit/follows', param,() => {
|
||||||
|
this.$success(this.$t('commons.cancel_follow_success'));
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
});
|
});
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(!row.showFollow){
|
if(!row.showFollow){
|
||||||
row.showFollow = true;
|
row.showFollow = true;
|
||||||
|
if(!row.followIds){
|
||||||
|
row.followIds = [];
|
||||||
|
}
|
||||||
row.followIds.push(this.currentUser().id);
|
row.followIds.push(this.currentUser().id);
|
||||||
param.followIds = row.followIds
|
param.followIds = row.followIds
|
||||||
this.$post('/test/case/review/edit/follows', param,() => {
|
this.$post('/test/case/review/edit/follows', param,() => {
|
||||||
|
this.$success(this.$t('commons.follow_success'));
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,6 +189,8 @@ export default {
|
||||||
run_success: "Run Success",
|
run_success: "Run Success",
|
||||||
run_completed: "Run Completed",
|
run_completed: "Run Completed",
|
||||||
run_fail: "Run Fail",
|
run_fail: "Run Fail",
|
||||||
|
follow_success:"Follow Success",
|
||||||
|
cancel_follow_success: "Cancel Follow Success",
|
||||||
generate_test_data: "Generate test data",
|
generate_test_data: "Generate test data",
|
||||||
relationship: {
|
relationship: {
|
||||||
name: 'Dependencies',
|
name: 'Dependencies',
|
||||||
|
|
|
@ -190,6 +190,8 @@ export default {
|
||||||
run_success: "执行成功",
|
run_success: "执行成功",
|
||||||
run_completed: "执行完成",
|
run_completed: "执行完成",
|
||||||
run_fail: "执行失败",
|
run_fail: "执行失败",
|
||||||
|
follow_success:"关注成功",
|
||||||
|
cancel_follow_success:"取消关注成功",
|
||||||
relationship: {
|
relationship: {
|
||||||
name: '依赖关系',
|
name: '依赖关系',
|
||||||
pre_case: '前置用例',
|
pre_case: '前置用例',
|
||||||
|
|
|
@ -190,6 +190,8 @@ export default {
|
||||||
run_success: "執行成功",
|
run_success: "執行成功",
|
||||||
run_completed: "執行完成",
|
run_completed: "執行完成",
|
||||||
run_fail: "執行失敗",
|
run_fail: "執行失敗",
|
||||||
|
follow_success:"關注成功",
|
||||||
|
cancel_follow_success: "取消關注成功",
|
||||||
relationship: {
|
relationship: {
|
||||||
name: '依賴關系',
|
name: '依賴關系',
|
||||||
pre_case: '前置用例',
|
pre_case: '前置用例',
|
||||||
|
|
Loading…
Reference in New Issue