fix(测试跟踪): 禁用测试跟踪首页无权限的跳转链接
--bug=1018743,1018750 --user=宋昌昌 【系统设置】测试跟踪首页点击场景名称提示没有权限,建议提示优化 https://www.tapd.cn/55049933/s/1275439
This commit is contained in:
parent
e2ba28511a
commit
7f3dca6d0f
|
@ -11,7 +11,9 @@
|
|||
<el-table-column prop="caseName" :label="$t('home.case.case_name')"
|
||||
width="150">
|
||||
<template v-slot:default="{row}">
|
||||
<el-link type="info" @click="redirect(row.caseType,row.id)">
|
||||
<el-link type="info" @click="redirect(row.caseType,row.id)"
|
||||
:disabled="(row.caseType === 'apiCase' && apiCaseReadOnly) || (row.caseType === 'scenario' && apiScenarioReadOnly) ||
|
||||
(row.caseType === 'load' && loadCaseReadOnly) || (row.caseType === 'testCase' && testCaseReadOnly)">
|
||||
{{ row.caseName }}
|
||||
</el-link>
|
||||
</template>
|
||||
|
@ -52,6 +54,7 @@
|
|||
import MsTag from "metersphere-frontend/src/components/MsTag";
|
||||
import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
||||
import {homeTestPlanFailureCaseGet} from "@/api/remote/api/api-home";
|
||||
import {hasPermission} from "@/business/utils/sdk-utils";
|
||||
|
||||
export default {
|
||||
name: "MsFailureTestCaseList",
|
||||
|
@ -63,7 +66,11 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
loading: false
|
||||
loading: false,
|
||||
testCaseReadOnly: false,
|
||||
apiCaseReadOnly: false,
|
||||
apiScenarioReadOnly: false,
|
||||
loadCaseReadOnly: false,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
@ -103,6 +110,10 @@ export default {
|
|||
|
||||
created() {
|
||||
this.search();
|
||||
this.testCaseReadOnly = !hasPermission('PROJECT_TRACK_CASE:READ');
|
||||
this.apiCaseReadOnly = !hasPermission('PROJECT_API_DEFINITION:READ');
|
||||
this.apiScenarioReadOnly = !hasPermission('PROJECT_API_SCENARIO:READ');
|
||||
this.loadCaseReadOnly = !hasPermission('PROJECT_PERFORMANCE_TEST:READ');
|
||||
},
|
||||
activated() {
|
||||
this.search();
|
||||
|
|
Loading…
Reference in New Issue