From f4fcbbd7009d17b8fce4df0e5a74bcadcf87841b Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Tue, 7 Mar 2023 14:28:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E7=BC=96=E8=BE=91=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89ID=E6=A0=A1=E9=AA=8C=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --story=1011313 --user=宋昌昌 【测试跟踪】github #22395用例详情保存操作优化 https://www.tapd.cn/55049933/s/1346059 --- .../new-ui/MsCustomFiledComponent.vue | 6 --- .../src/components/new-ui/MsInputTag.vue | 8 ++-- .../frontend/src/business/TestTrack.vue | 48 +++++++++++++++++-- .../business/case/components/TestCaseEdit.vue | 2 +- .../case/components/case/CaseBaseInfo.vue | 25 ++++++---- .../components/head/TestCaseEditNameView.vue | 32 ++++++------- 6 files changed, 81 insertions(+), 40 deletions(-) diff --git a/framework/sdk-parent/frontend/src/components/new-ui/MsCustomFiledComponent.vue b/framework/sdk-parent/frontend/src/components/new-ui/MsCustomFiledComponent.vue index f9db71333c..3d44f3fccf 100644 --- a/framework/sdk-parent/frontend/src/components/new-ui/MsCustomFiledComponent.vue +++ b/framework/sdk-parent/frontend/src/components/new-ui/MsCustomFiledComponent.vue @@ -271,12 +271,6 @@ export default { height: 32px; } -:deep(.ms-select-tag.el-select .el-tag__close.el-icon-close::before) { - position: relative; - top: -17px; - left: -6px; -} - :deep(.ms-select-tag.el-select span.el-select__tags-text) { max-width: 240px!important; } diff --git a/framework/sdk-parent/frontend/src/components/new-ui/MsInputTag.vue b/framework/sdk-parent/frontend/src/components/new-ui/MsInputTag.vue index b630967a66..e8574920c4 100644 --- a/framework/sdk-parent/frontend/src/components/new-ui/MsInputTag.vue +++ b/framework/sdk-parent/frontend/src/components/new-ui/MsInputTag.vue @@ -234,11 +234,9 @@ span.ms-top.el-tag.el-tag--info.el-tag--small.el-tag--light span{ color: rgb(31, 35, 41); } -:deep(.el-tag .el-icon-close::before) { - display: block; - font-size: 26px; +:deep(.ms-top.el-tag .el-icon-close::before) { + font-size: 24px; position: relative; - top: -15px; - left: -6px; + top: -3px; } diff --git a/test-track/frontend/src/business/TestTrack.vue b/test-track/frontend/src/business/TestTrack.vue index c28b084a4c..69ace00d43 100644 --- a/test-track/frontend/src/business/TestTrack.vue +++ b/test-track/frontend/src/business/TestTrack.vue @@ -288,23 +288,63 @@ span.el-tag.el-tag--info.el-tag--mini.el-tag--light span{ color: rgb(31, 35, 41); } + /** * el-tag-icon-close */ i.el-tag__close.el-icon-close { height: 0; + position: relative; + top: -11px!important; + left: 1px!important; } -.el-select .el-tag__close.el-icon-close::before { +.el-tag__close.el-icon-close::before { font-size: 28px; - position: relative; - top: -7px; - left: -6px; } .el-tag.el-tag--info .el-tag__close:hover { color: #1F2329; background-color: #909399; } + + +/** + * 统一测试跟踪MsInputTag样式, 交互改造后去掉 + */ +span.ms-top.el-tag.el-tag--info.el-tag--small.el-tag--light { + flex-direction: row; + align-items: center; + padding: 1px 6px; + gap: 4px; + height: 24px; + background: rgba(31, 35, 41, 0.1); + border-radius: 2px; + flex: none; + flex-grow: 0; + font-family: 'PingFang SC'; + font-style: normal; + font-weight: 400; + font-size: 14px; + line-height: 22px; + position: relative; + top: 6px; + +} + +span.ms-top.el-tag.el-tag--info.el-tag--small.el-tag--light span{ + display: inline-block; + max-width: 500px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + color: rgb(31, 35, 41); +} + +.ms-top.el-tag .el-tag__close.el-icon-close::before { + font-size: 24px; + position: relative; + top: -3px; +} diff --git a/test-track/frontend/src/business/case/components/TestCaseEdit.vue b/test-track/frontend/src/business/case/components/TestCaseEdit.vue index 0fe6fd8bb1..cc3e56d2a0 100644 --- a/test-track/frontend/src/business/case/components/TestCaseEdit.vue +++ b/test-track/frontend/src/business/case/components/TestCaseEdit.vue @@ -1560,7 +1560,7 @@ export default { }); } let detailForm = this.$refs.otherInfo.validateForm(); - let baseInfoValidate = this.$refs.testCaseBaseInfo.validateForm(); + let baseInfoValidate = this.$refs.testCaseBaseInfo.validateForm() && this.$refs.testCaseBaseInfo.validateCaseFrom(); let customValidate = this.$refs.testCaseBaseInfo.validateCustomForm(); if (!detailForm || !baseInfoValidate) { return false; diff --git a/test-track/frontend/src/business/case/components/case/CaseBaseInfo.vue b/test-track/frontend/src/business/case/components/case/CaseBaseInfo.vue index f474e0d31d..1c243d763e 100644 --- a/test-track/frontend/src/business/case/components/case/CaseBaseInfo.vue +++ b/test-track/frontend/src/business/case/components/case/CaseBaseInfo.vue @@ -390,14 +390,6 @@ export default { trigger: "blur", }, ], - customNum: [ - { required: true, message: "ID必填", trigger: "blur" }, - { - max: 50, - message: this.$t("test_track.length_less_than") + "50", - trigger: "blur", - }, - ], demandName: [ { required: true, @@ -428,6 +420,14 @@ export default { ], }, headerRules: { + customNum: [ + { required: true, message: "ID必填", trigger: "blur" }, + { + max: 50, + message: this.$t("test_track.length_less_than") + "50", + trigger: "blur", + }, + ], module: [ { required: true, @@ -613,6 +613,15 @@ export default { }); return isValidate; }, + validateCaseFrom() { + let isValidate = true; + this.$refs["caseFrom"].validate((valid) => { + if (!valid) { + isValidate = false; + } + }); + return isValidate; + }, getCustomFields() { let caseFromFields = this.$refs["caseFrom"].fields; let customFields = this.$refs["customFieldForm"].fields; diff --git a/test-track/frontend/src/business/case/components/head/TestCaseEditNameView.vue b/test-track/frontend/src/business/case/components/head/TestCaseEditNameView.vue index bf1e510c91..340da947ae 100644 --- a/test-track/frontend/src/business/case/components/head/TestCaseEditNameView.vue +++ b/test-track/frontend/src/business/case/components/head/TestCaseEditNameView.vue @@ -1,24 +1,24 @@