fix(测试跟踪): 查看用例缺陷关联TAB权限校验问题
--bug=1029752 --user=宋昌昌 【测试跟踪】github#26486,当授权项目成员角色,并且没有查看缺陷权限的时候,点击查看用例,会跳转到系统设置的页面。 https://www.tapd.cn/55049933/s/1413606
This commit is contained in:
parent
54fd4446bf
commit
bab97d7794
|
@ -64,6 +64,7 @@
|
|||
<el-tab-pane
|
||||
:label="$t('test_track.case.relate_issue')"
|
||||
name="associatedDefects"
|
||||
v-if="hasPermissions('PROJECT_TRACK_ISSUE:READ')"
|
||||
>
|
||||
<span slot="label">
|
||||
{{ $t('test_track.case.relate_issue') }}
|
||||
|
@ -82,7 +83,7 @@
|
|||
:plan-id="planId"
|
||||
:is-copy="isCopy"
|
||||
:copy-case-id="copyCaseId"
|
||||
:read-only="readOnly && !isTestPlan"
|
||||
:read-only="(readOnly && !isTestPlan)"
|
||||
:plan-case-id="planId ? this.form.id : null"
|
||||
:case-id="caseId"
|
||||
ref="issue"
|
||||
|
@ -207,6 +208,8 @@ import CaseCommentComponent from "./CaseCommentComponent";
|
|||
import CaseCommentViewer from "./CaseCommentViewer";
|
||||
import {getRelationshipCountCase} from "@/api/testCase";
|
||||
import TabPaneCount from "@/business/plan/view/comonents/report/detail/component/TabPaneCount";
|
||||
import {hasPermissions} from 'metersphere-frontend/src/utils/permission';
|
||||
|
||||
export default {
|
||||
name: "CaseEditInfoComponent",
|
||||
components: {
|
||||
|
@ -297,6 +300,9 @@ export default {
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
hasPermissions(permission) {
|
||||
return hasPermissions(permission);
|
||||
},
|
||||
getUploadFiles() {
|
||||
if (this.$refs.testCaseBaseInfo) {
|
||||
return this.$refs.testCaseBaseInfo.getUploadFiles();
|
||||
|
@ -554,23 +560,28 @@ export default {
|
|||
:deep(.el-form-item__content) {
|
||||
line-height: px2rem(32);
|
||||
}
|
||||
|
||||
.case-edit-box {
|
||||
width: px2rem(1328);
|
||||
min-height: px2rem(1001);
|
||||
/* margin-left: px2rem(34); */
|
||||
background-color: #fff;
|
||||
|
||||
.edit-header-container {
|
||||
height: px2rem(56);
|
||||
width: 100%;
|
||||
border-bottom: 1px solid rgba(31, 35, 41, 0.15);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.header-content-row {
|
||||
display: flex;
|
||||
|
||||
.back {
|
||||
margin-left: px2rem(24);
|
||||
width: px2rem(20);
|
||||
height: px2rem(20);
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
@ -611,6 +622,7 @@ export default {
|
|||
height: 100%;
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
|
||||
.required-item:after {
|
||||
content: "*";
|
||||
color: #f54a45;
|
||||
|
@ -621,14 +633,17 @@ export default {
|
|||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.content-body-wrap {
|
||||
// 1024 减去左右padding 各24 和 1px右边框
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.case-title-wrap {
|
||||
display: flex;
|
||||
margin-top: px2rem(24);
|
||||
margin-bottom: px2rem(8);
|
||||
|
||||
.title-wrap {
|
||||
font-family: "PingFang SC";
|
||||
font-style: normal;
|
||||
|
@ -637,28 +652,34 @@ export default {
|
|||
color: #1f2329;
|
||||
}
|
||||
}
|
||||
|
||||
.content-container {
|
||||
padding-left: px2rem(24);
|
||||
padding-right: px2rem(24);
|
||||
}
|
||||
|
||||
.comment-common {
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
//公共样式
|
||||
.content-wrap {
|
||||
:deep(.v-note-op) {
|
||||
background-color: #f8f9fa !important;
|
||||
border-bottom: 1px solid #bbbfc4;
|
||||
}
|
||||
|
||||
:deep(.v-note-wrapper) {
|
||||
box-sizing: border-box;
|
||||
border-radius: 4px;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
:deep(.v-note-show) {
|
||||
min-height: 65px;
|
||||
}
|
||||
|
||||
:deep(.v-left-item) {
|
||||
flex: none !important;
|
||||
}
|
||||
|
@ -669,40 +690,48 @@ export default {
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
|
||||
.opt-row {
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pre-condition-row {
|
||||
.content-wrap {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
min-height: 100px;
|
||||
|
||||
.opt-row {
|
||||
:deep(.el-form-item) {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.remark-row {
|
||||
.content-wrap {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
min-height: 100px;
|
||||
|
||||
.opt-row {
|
||||
width: 100%;
|
||||
|
||||
:deep(.el-form-item) {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.attachment-row {
|
||||
.attachment-name.case-title-wrap {
|
||||
.name.title-wrap {
|
||||
|
@ -731,12 +760,15 @@ export default {
|
|||
width: px2rem(304);
|
||||
min-height: px2rem(864);
|
||||
border-left: 1px solid rgba(31, 35, 41, 0.15);
|
||||
|
||||
.case-wrap {
|
||||
margin-left: px2rem(24);
|
||||
margin-top: px2rem(24);
|
||||
}
|
||||
|
||||
.case-title-wrap {
|
||||
display: flex;
|
||||
|
||||
.title-wrap {
|
||||
font-weight: 500;
|
||||
height: 22px;
|
||||
|
@ -744,11 +776,14 @@ export default {
|
|||
line-height: 22px;
|
||||
color: #1f2329;
|
||||
}
|
||||
|
||||
margin-bottom: px2rem(8);
|
||||
}
|
||||
|
||||
.side-content {
|
||||
width: px2rem(256);
|
||||
height: 32px;
|
||||
|
||||
:deep(.el-select) {
|
||||
width: 100%;
|
||||
}
|
||||
|
@ -774,14 +809,17 @@ export default {
|
|||
background: #783887;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.opt-disable-primary {
|
||||
background: #bbbfc4;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.opt-active {
|
||||
background: #ffffff;
|
||||
color: #1f2329;
|
||||
}
|
||||
|
||||
.opt-disable {
|
||||
background: #ffffff;
|
||||
color: #bbbfc4;
|
||||
|
@ -789,18 +827,21 @@ export default {
|
|||
|
||||
.save-btn-row {
|
||||
margin-left: px2rem(24);
|
||||
|
||||
el-button {
|
||||
}
|
||||
}
|
||||
|
||||
.save-add-pub-row {
|
||||
margin-left: px2rem(12);
|
||||
|
||||
el-button {
|
||||
}
|
||||
}
|
||||
|
||||
.save-create-row {
|
||||
margin-left: px2rem(12);
|
||||
|
||||
el-button {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,25 +8,13 @@
|
|||
>{{ $t("case.associated_defect") }}
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item>
|
||||
<div
|
||||
class="add-btn"
|
||||
v-permission="['PROJECT_TRACK_PLAN:READ+RELEVANCE_OR_CANCEL']"
|
||||
:disabled="readOnly"
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="addIssue"
|
||||
>
|
||||
<el-dropdown-item :disabled="!hasPermissions('PROJECT_TRACK_ISSUE:READ+CREATE')">
|
||||
<div class="add-btn" type="primary" @click="addIssue">
|
||||
{{ $t("case.create_defect") }}
|
||||
</div>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<div
|
||||
class="add-btn"
|
||||
v-permission="['PROJECT_TRACK_PLAN:READ+RELEVANCE_OR_CANCEL']"
|
||||
:disabled="readOnly"
|
||||
@click="relateIssue"
|
||||
>
|
||||
<el-dropdown-item :disabled="!hasPermissions('PROJECT_TRACK_ISSUE:READ+EDIT')">
|
||||
<div class="add-btn" @click="relateIssue">
|
||||
{{ $t("case.associate_existing_defects") }}
|
||||
</div>
|
||||
</el-dropdown-item>
|
||||
|
@ -191,10 +179,7 @@ import MsTable from "metersphere-frontend/src/components/new-ui/MsTable";
|
|||
import HomePagination from "@/business/home/components/pagination/HomePagination";
|
||||
import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColumn";
|
||||
import IssueDescriptionTableItem from "@/business/issue/IssueDescriptionTableItem";
|
||||
import {
|
||||
ISSUE_STATUS_MAP,
|
||||
TAPD_ISSUE_STATUS_MAP,
|
||||
} from "metersphere-frontend/src/utils/table-constants";
|
||||
import {ISSUE_STATUS_MAP, TAPD_ISSUE_STATUS_MAP,} from "metersphere-frontend/src/utils/table-constants";
|
||||
import IssueRelateList from "./CaseIssueRelateList";
|
||||
import {
|
||||
buildIssues,
|
||||
|
@ -207,16 +192,11 @@ import {
|
|||
like,
|
||||
parseFields,
|
||||
} from "@/api/issue";
|
||||
import {
|
||||
getCustomFieldValue,
|
||||
getTableHeaderWithCustomFields,
|
||||
} from "metersphere-frontend/src/utils/tableUtils";
|
||||
import {getCustomFieldValue, getTableHeaderWithCustomFields,} from "metersphere-frontend/src/utils/tableUtils";
|
||||
import {LOCAL} from "metersphere-frontend/src/utils/constants";
|
||||
import {
|
||||
getCurrentProjectID,
|
||||
getCurrentWorkspaceId,
|
||||
} from "metersphere-frontend/src/utils/token";
|
||||
import {getCurrentProjectID, getCurrentWorkspaceId,} from "metersphere-frontend/src/utils/token";
|
||||
import MsNewUiSearch from "metersphere-frontend/src/components/new-ui/MsSearch";
|
||||
import {hasPermissions} from 'metersphere-frontend/src/utils/permission';
|
||||
|
||||
export default {
|
||||
name: "CaseIssueRelate",
|
||||
|
@ -326,6 +306,9 @@ export default {
|
|||
});
|
||||
},
|
||||
methods: {
|
||||
hasPermissions(permission) {
|
||||
return hasPermissions(permission);
|
||||
},
|
||||
search() {
|
||||
this.getIssues();
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue