From bab97d77944ce96906f2c45540fec6b4c897ac19 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Thu, 7 Sep 2023 11:33:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E7=94=A8=E4=BE=8B=E7=BC=BA=E9=99=B7=E5=85=B3?= =?UTF-8?q?=E8=81=94TAB=E6=9D=83=E9=99=90=E6=A0=A1=E9=AA=8C=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1029752 --user=宋昌昌 【测试跟踪】github#26486,当授权项目成员角色,并且没有查看缺陷权限的时候,点击查看用例,会跳转到系统设置的页面。 https://www.tapd.cn/55049933/s/1413606 --- .../components/case/CaseEditInfoComponent.vue | 235 ++++++++++-------- .../case/components/case/CaseIssueRelate.vue | 221 ++++++++-------- 2 files changed, 240 insertions(+), 216 deletions(-) diff --git a/test-track/frontend/src/business/case/components/case/CaseEditInfoComponent.vue b/test-track/frontend/src/business/case/components/case/CaseEditInfoComponent.vue index 57b3f8ead2..96ef4f4851 100644 --- a/test-track/frontend/src/business/case/components/case/CaseEditInfoComponent.vue +++ b/test-track/frontend/src/business/case/components/case/CaseEditInfoComponent.vue @@ -6,27 +6,27 @@
@@ -34,8 +34,8 @@ {{ $t('case.associate_test_cases') }} @@ -44,17 +44,17 @@
@@ -62,8 +62,9 @@ {{ $t('test_track.case.relate_issue') }} @@ -72,20 +73,20 @@
@@ -100,19 +101,19 @@
@@ -127,16 +128,16 @@
@@ -145,14 +146,14 @@
@@ -161,34 +162,34 @@
@@ -205,8 +206,10 @@ import CaseChangeHistory from "./CaseChangeHistory"; import CaseIssueRelate from "./CaseIssueRelate"; import CaseCommentComponent from "./CaseCommentComponent"; import CaseCommentViewer from "./CaseCommentViewer"; -import { getRelationshipCountCase } from "@/api/testCase"; +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(); @@ -384,19 +390,19 @@ export default { } }, getDemandOptions() { - this.result = { loading: true }; + this.result = {loading: true}; this.demandLabel = ""; issueDemandList(this.projectId) - .then((r) => { - this.demandOptions = []; - if (r.data && r.data.length > 0) { - this.buildDemandCascaderOptions(r.data, this.demandOptions, []); - } - this.addOtherOption(); - }) - .catch(() => { - this.addOtherOption(); - }); + .then((r) => { + this.demandOptions = []; + if (r.data && r.data.length > 0) { + this.buildDemandCascaderOptions(r.data, this.demandOptions, []); + } + this.addOtherOption(); + }) + .catch(() => { + this.addOtherOption(); + }); }, addOtherOption() { this.demandOptions.unshift({ @@ -408,7 +414,7 @@ export default { this.demandValue = ["other"]; this.demandLabel = "Other: " + this.$t("test_track.case.other"); } - this.result = { loading: false }; + this.result = {loading: false}; }, buildDemandCascaderOptions(data, options, pathArray) { this.demandValue = []; @@ -428,9 +434,9 @@ export default { if (item.children && item.children.length > 0) { option.children = []; this.buildDemandCascaderOptions( - item.children, - option.children, - pathArray + item.children, + option.children, + pathArray ); } pathArray.pop(); @@ -438,8 +444,8 @@ export default { }, filterDemand(node, keyword) { if ( - keyword && - node.text.toLowerCase().indexOf(keyword.toLowerCase()) !== -1 + keyword && + node.text.toLowerCase().indexOf(keyword.toLowerCase()) !== -1 ) { return true; } @@ -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 { } } diff --git a/test-track/frontend/src/business/case/components/case/CaseIssueRelate.vue b/test-track/frontend/src/business/case/components/case/CaseIssueRelate.vue index b101be46fe..0594388a2c 100644 --- a/test-track/frontend/src/business/case/components/case/CaseIssueRelate.vue +++ b/test-track/frontend/src/business/case/components/case/CaseIssueRelate.vue @@ -8,25 +8,13 @@ >{{ $t("case.associated_defect") }}
- -
+ +
{{ $t("case.create_defect") }}
- -
+ +
{{ $t("case.associate_existing_defects") }}
@@ -35,69 +23,69 @@