fix(性能测试): 修复没有查看场景的权限点击同步场景后页面跳转的问题
--bug=1019677 --user=刘瑞斌 【性能测试】只有性能测试查看权限,同步场景按钮可以点,点了会报错 https://www.tapd.cn/55049933/s/1302474
This commit is contained in:
parent
275499002a
commit
582aa9c812
|
@ -48,11 +48,10 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<schedule-config :schedule="test.schedule" :save="saveCronExpression" @scheduleChange="saveSchedule"
|
<schedule-config :schedule="test.schedule" :save="saveCronExpression" @scheduleChange="saveSchedule"
|
||||||
v-permission="['PROJECT_PERFORMANCE_TEST:READ+SCHEDULE']"
|
v-if="hasPermission('PROJECT_PERFORMANCE_TEST:READ+SCHEDULE')"
|
||||||
:check-open="checkScheduleEdit" :test-id="testId" :custom-validate="durationValidate"/>
|
:check-open="checkScheduleEdit" :test-id="testId" :custom-validate="durationValidate"/>
|
||||||
|
|
||||||
<ms-tip-button v-if="test.isNeedUpdate"
|
<ms-tip-button v-if="test.isNeedUpdate && hasPermission('PROJECT_PERFORMANCE_TEST:READ+EDIT')"
|
||||||
v-permission="['PROJECT_PERFORMANCE_TEST:READ+EDIT']"
|
|
||||||
class="sync-btn" type="primary" size="small" circle
|
class="sync-btn" type="primary" size="small" circle
|
||||||
icon="el-icon-connection"
|
icon="el-icon-connection"
|
||||||
@click="syncScenario"
|
@click="syncScenario"
|
||||||
|
@ -213,6 +212,7 @@ export default {
|
||||||
this.getMaintainerOptions();
|
this.getMaintainerOptions();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
hasPermission,
|
||||||
currentUser: () => {
|
currentUser: () => {
|
||||||
return getCurrentUser();
|
return getCurrentUser();
|
||||||
},
|
},
|
||||||
|
@ -416,7 +416,7 @@ export default {
|
||||||
return formData;
|
return formData;
|
||||||
},
|
},
|
||||||
syncScenario() {
|
syncScenario() {
|
||||||
if (!hasPermission('PROJECT_API_SCENARIO:READ')) {
|
if (!hasPermission('PROJECT_API_SCENARIO:READ+CREATE')) {
|
||||||
this.$warning(this.$t('performance_test.sync_scenario_no_permission_tips'));
|
this.$warning(this.$t('performance_test.sync_scenario_no_permission_tips'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ const message = {
|
||||||
test_duration: '{0} hours {1} minutes {2} seconds',
|
test_duration: '{0} hours {1} minutes {2} seconds',
|
||||||
test_duration_tips: 'Execution Time:{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',
|
sync_scenario_no_permission_tips: 'No permission to create the scenario cannot perform synchronization',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -8,7 +8,7 @@ const message = {
|
||||||
test_duration: '{0}时{1}分{2}秒',
|
test_duration: '{0}时{1}分{2}秒',
|
||||||
test_duration_tips: '执行时长:{0}时{1}分{2}秒',
|
test_duration_tips: '执行时长:{0}时{1}分{2}秒',
|
||||||
},
|
},
|
||||||
sync_scenario_no_permission_tips: '没有查看接口的权限无法执行同步',
|
sync_scenario_no_permission_tips: '没有创建接口的权限无法执行同步',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ const message = {
|
||||||
test_duration: '{0}時{1}分{2}秒',
|
test_duration: '{0}時{1}分{2}秒',
|
||||||
test_duration_tips: '執行時長:{0}時{1}分{2}秒',
|
test_duration_tips: '執行時長:{0}時{1}分{2}秒',
|
||||||
},
|
},
|
||||||
sync_scenario_no_permission_tips: '沒有查看接口的權限無法執行同步',
|
sync_scenario_no_permission_tips: '沒有创建接口的權限無法執行同步',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue