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')"
|
<el-table-column prop="caseName" :label="$t('home.case.case_name')"
|
||||||
width="150">
|
width="150">
|
||||||
<template v-slot:default="{row}">
|
<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 }}
|
{{ row.caseName }}
|
||||||
</el-link>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
|
@ -52,6 +54,7 @@
|
||||||
import MsTag from "metersphere-frontend/src/components/MsTag";
|
import MsTag from "metersphere-frontend/src/components/MsTag";
|
||||||
import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
||||||
import {homeTestPlanFailureCaseGet} from "@/api/remote/api/api-home";
|
import {homeTestPlanFailureCaseGet} from "@/api/remote/api/api-home";
|
||||||
|
import {hasPermission} from "@/business/utils/sdk-utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsFailureTestCaseList",
|
name: "MsFailureTestCaseList",
|
||||||
|
@ -63,7 +66,11 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableData: [],
|
tableData: [],
|
||||||
loading: false
|
loading: false,
|
||||||
|
testCaseReadOnly: false,
|
||||||
|
apiCaseReadOnly: false,
|
||||||
|
apiScenarioReadOnly: false,
|
||||||
|
loadCaseReadOnly: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
@ -103,6 +110,10 @@ export default {
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
this.search();
|
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() {
|
activated() {
|
||||||
this.search();
|
this.search();
|
||||||
|
|
Loading…
Reference in New Issue