refactor(测试跟踪): 没有接口测试权限的关联表不可以点击跳转
--bug=1018779 --user=王孝刚 【系统设置】用户没有接口权限,进入平台后点击测试计划,点击接口测试用例id跳转,建议优化 https://www.tapd.cn/55049933/s/1283851
This commit is contained in:
parent
21d1501d1d
commit
08e0b63edd
|
@ -38,7 +38,9 @@
|
|||
prop="num"
|
||||
min-width="80">
|
||||
<template v-slot:default="scope">
|
||||
<el-link @click="openApiById(scope.row)">
|
||||
<span style="cursor:pointer"
|
||||
v-if="!hasPermission('PROJECT_API_DEFINITION:READ+EDIT_CASE')"> {{ scope.row.num }} </span>
|
||||
<el-link @click="openApiById(scope.row)" v-else>
|
||||
<span>
|
||||
{{ scope.row.num }}
|
||||
</span>
|
||||
|
@ -185,7 +187,7 @@ import MsBottomContainer from "metersphere-frontend/src/components/MsBottomConta
|
|||
import BatchEdit from "@/business/case/components/BatchEdit";
|
||||
import {API_METHOD_COLOUR, CASE_PRIORITY, RESULT_MAP} from "metersphere-frontend/src/model/JsonData";
|
||||
import {getCurrentProjectID, getCurrentWorkspaceId} from "metersphere-frontend/src/utils/token";
|
||||
import {hasLicense} from "metersphere-frontend/src/utils/permission";
|
||||
import {hasLicense, hasPermission} from "metersphere-frontend/src/utils/permission";
|
||||
import {getUUID, strMapToObj} from "metersphere-frontend/src/utils";
|
||||
import PriorityTableItem from "../../../../common/tableItems/planview/PriorityTableItem";
|
||||
import TestPlanCaseListHeader from "./TestPlanCaseListHeader";
|
||||
|
@ -205,7 +207,7 @@ import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColu
|
|||
import MsPlanRunMode from "@/business/plan/common/PlanRunModeWithEnv";
|
||||
import MsUpdateTimeColumn from "metersphere-frontend/src/components/table/MsUpdateTimeColumn";
|
||||
import MsCreateTimeColumn from "metersphere-frontend/src/components/table/MsCreateTimeColumn";
|
||||
import {editTestPlanApiCaseOrder, reportSocket, run, testPlanAutoCheck} from "@/api/remote/plan/test-plan";
|
||||
import {editTestPlanApiCaseOrder, run, testPlanAutoCheck} from "@/api/remote/plan/test-plan";
|
||||
import {getProjectMemberUserFilter} from "@/api/user";
|
||||
import {apiTestCaseGet, apiTestCaseReduction} from "@/api/remote/api/api-case";
|
||||
import {
|
||||
|
@ -216,7 +218,6 @@ import {
|
|||
testPlanApiCaseRun,
|
||||
testPlanApiCaseSelectAllTableRows
|
||||
} from "@/api/remote/plan/test-plan-api-case";
|
||||
import {apiDefinitionPlanReportGetByCaseId} from "@/api/remote/api/api-definition-report";
|
||||
import MsTestPlanApiStatus from "@/business/plan/view/comonents/api/TestPlanApiStatus";
|
||||
import {getProjectVersions} from "@/business/utils/sdk-utils";
|
||||
|
||||
|
@ -406,6 +407,7 @@ export default {
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
hasPermission,
|
||||
customHeader() {
|
||||
const list = deepClone(this.tableLabel);
|
||||
this.$refs.headerCustom.open(list);
|
||||
|
|
|
@ -37,7 +37,9 @@
|
|||
min-width="80px"
|
||||
label="ID">
|
||||
<template v-slot:default="scope">
|
||||
<el-link @click="openById(scope.row)">
|
||||
<span style="cursor:pointer"
|
||||
v-if="!hasPermission('PROJECT_API_SCENARIO:READ+EDIT')"> {{ scope.row.num }} </span>
|
||||
<el-link @click="openById(scope.row)" v-else>
|
||||
<span>
|
||||
{{ scope.row.customNum }}
|
||||
</span>
|
||||
|
@ -204,7 +206,7 @@ import MsTablePagination from "metersphere-frontend/src/components/pagination/Ta
|
|||
import MsTag from "metersphere-frontend/src/components/MsTag";
|
||||
import {getCurrentProjectID, getCurrentWorkspaceId} from "metersphere-frontend/src/utils/token";
|
||||
import {getUUID, strMapToObj} from "metersphere-frontend/src/utils";
|
||||
import {hasLicense} from "metersphere-frontend/src/utils/permission";
|
||||
import {hasLicense, hasPermission} from "metersphere-frontend/src/utils/permission";
|
||||
import MsTableMoreBtn from "metersphere-frontend/src/components/table/TableMoreBtn";
|
||||
import TestPlanScenarioListHeader from "./TestPlanScenarioListHeader";
|
||||
import {
|
||||
|
@ -365,6 +367,7 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
hasPermission,
|
||||
filterSearch() {
|
||||
// 添加搜索条件时,当前页设置成第一页
|
||||
this.currentPage = 1;
|
||||
|
|
Loading…
Reference in New Issue