fix(性能测试): 修复没有查看场景的权限点击同步场景后页面跳转的问题
--bug=1019677 --user=刘瑞斌 【性能测试】只有性能测试查看权限,同步场景按钮可以点,点了会报错 https://www.tapd.cn/55049933/s/1302474
This commit is contained in:
parent
15beef7698
commit
36fb8c7cfc
|
@ -89,7 +89,6 @@ export default {
|
|||
if (res && res.code === 'ECONNABORTED') {
|
||||
return;
|
||||
}
|
||||
clearSessionStorage()
|
||||
reject(res)
|
||||
})
|
||||
});
|
||||
|
|
|
@ -416,6 +416,10 @@ export default {
|
|||
return formData;
|
||||
},
|
||||
syncScenario() {
|
||||
if (!hasPermission('PROJECT_API_SCENARIO:READ')) {
|
||||
this.$warning(this.$t('performance_test.sync_scenario_no_permission_tips'));
|
||||
return;
|
||||
}
|
||||
let param = {
|
||||
id: this.test.id,
|
||||
scenarioId: this.test.scenarioId
|
||||
|
@ -423,7 +427,7 @@ export default {
|
|||
syncScenario(param)
|
||||
.then(() => {
|
||||
this.getTest(this.$route.params.testId);
|
||||
this.$success('更新成功');
|
||||
this.$success('commons.save_success');
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
|
|
@ -7,7 +7,8 @@ const message = {
|
|||
report: {
|
||||
test_duration: '{0} hours {1} minutes {2} seconds',
|
||||
test_duration_tips: 'Execution Time:{0} hours {1} minutes {2} seconds',
|
||||
}
|
||||
},
|
||||
sync_scenario_no_permission_tips: 'No permission to view the interface cannot perform synchronization',
|
||||
}
|
||||
}
|
||||
export default {
|
||||
|
|
|
@ -7,7 +7,8 @@ const message = {
|
|||
report: {
|
||||
test_duration: '{0}时{1}分{2}秒',
|
||||
test_duration_tips: '执行时长:{0}时{1}分{2}秒',
|
||||
}
|
||||
},
|
||||
sync_scenario_no_permission_tips: '没有查看接口的权限无法执行同步',
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,8 @@ const message = {
|
|||
report: {
|
||||
test_duration: '{0}時{1}分{2}秒',
|
||||
test_duration_tips: '執行時長:{0}時{1}分{2}秒',
|
||||
}
|
||||
},
|
||||
sync_scenario_no_permission_tips: '沒有查看接口的權限無法執行同步',
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue