fix(测试跟踪): 修复功能用例基础信息样式及表单校验
--bug=1023153 --user=刘瑶 【测试跟踪】功能用例-用例编辑/创建页面-自定义富文本类型字段名称较长-显示重叠 https://www.tapd.cn/55049933/s/1336724 --bug=1023144 --user=刘瑶 【测试跟踪】功能用例-创建用例-只输入用例名称-敲2下回车-页面刷新-名称清空 https://www.tapd.cn/55049933/s/1336725 --bug=1022810 --user=刘瑶 【测试跟踪】新建用例,必填提示不对 https://www.tapd.cn/55049933/s/1336726
This commit is contained in:
parent
2f742b12a1
commit
68f06dcd7f
|
@ -2035,12 +2035,10 @@ export default {
|
|||
margin-top: px2rem(24);
|
||||
margin-bottom: px2rem(8);
|
||||
.title-wrap {
|
||||
height: 22px;
|
||||
font-family: "PingFang SC";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
color: #1f2329;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div v-loading="isloading" class="case-base-info-form">
|
||||
<el-form ref="caseFrom" :rules="rules" :model="form">
|
||||
<el-form ref="caseFrom" :rules="headerRules" :model="form" class="case-padding">
|
||||
<div class="module-row case-wrap" v-if="!publicEnable">
|
||||
<div class="case-title-wrap">
|
||||
<div class="name title-wrap">
|
||||
|
@ -21,7 +21,7 @@
|
|||
:readonlyHoverEvent="!readOnly"
|
||||
:content-click-event="!readOnly"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
:rules="headerRules"
|
||||
ref="moduleRef"
|
||||
>
|
||||
<template v-slot:content="{ onClick, hoverEditable }">
|
||||
|
@ -65,7 +65,7 @@
|
|||
:readonlyHoverEvent="!readOnly"
|
||||
:content-click-event="!readOnly"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
:rules="headerRules"
|
||||
>
|
||||
<template v-slot:content="{ onClick, hoverEditable }">
|
||||
<div :class="hoverEditable ? 'selectHover' : ''">
|
||||
|
@ -100,7 +100,7 @@
|
|||
label-position="right"
|
||||
label-width="100px"
|
||||
size="small"
|
||||
class="case-form"
|
||||
class="case-form case-padding"
|
||||
>
|
||||
<custom-filed-form-row
|
||||
:form="customFieldForm"
|
||||
|
@ -111,7 +111,7 @@
|
|||
:editable="editable"
|
||||
/>
|
||||
</el-form>
|
||||
<el-form ref="baseCaseFrom" :rules="rules" :model="form">
|
||||
<el-form ref="baseCaseFrom" :rules="rules" :model="form" class="case-padding">
|
||||
<div class="version-row case-wrap" v-if="versionEnable">
|
||||
<div class="case-title-wrap">
|
||||
<div class="name title-wrap">{{ $t("commons.version") }}</div>
|
||||
|
@ -381,10 +381,10 @@ export default {
|
|||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
module: [
|
||||
{
|
||||
versionId:[
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("test_track.case.input_module"),
|
||||
message: this.$t("case.version_id_cannot_be_empty"),
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
|
@ -425,6 +425,15 @@ export default {
|
|||
},
|
||||
],
|
||||
},
|
||||
headerRules: {
|
||||
module: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("test_track.case.input_module"),
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
},
|
||||
moduleObj: {
|
||||
id: "id",
|
||||
label: "name",
|
||||
|
@ -555,11 +564,11 @@ export default {
|
|||
},
|
||||
validateForm() {
|
||||
let isValidate = true;
|
||||
this.$refs["caseFrom"].validate((valid) => {
|
||||
if (!valid) {
|
||||
isValidate = false;
|
||||
}
|
||||
});
|
||||
// this.$refs["caseFrom"].validate((valid) => {
|
||||
// if (!valid) {
|
||||
// isValidate = false;
|
||||
// }
|
||||
// });
|
||||
this.$refs["baseCaseFrom"].validate((valid) => {
|
||||
if (!valid) {
|
||||
isValidate = false;
|
||||
|
@ -657,7 +666,10 @@ export default {
|
|||
|
||||
<style scoped lang="scss">
|
||||
@import "@/business/style/index.scss";
|
||||
|
||||
.case-padding{
|
||||
margin-left: px2rem(24);
|
||||
margin-right: px2rem(24);
|
||||
}
|
||||
/* 关联需求下拉框 */
|
||||
.story-box {
|
||||
display: flex;
|
||||
|
@ -773,12 +785,10 @@ export default {
|
|||
margin-top: px2rem(24);
|
||||
margin-bottom: px2rem(8);
|
||||
.title-wrap {
|
||||
height: 22px;
|
||||
font-family: "PingFang SC";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
color: #1f2329;
|
||||
}
|
||||
}
|
||||
|
@ -871,9 +881,9 @@ export default {
|
|||
min-height: px2rem(864);
|
||||
border-left: 1px solid rgba(31, 35, 41, 0.15);
|
||||
.case-wrap {
|
||||
margin-left: px2rem(24);
|
||||
/* margin-left: px2rem(24); */
|
||||
margin-top: px2rem(24);
|
||||
margin-right: px2rem(24);
|
||||
/* margin-right: px2rem(24); */
|
||||
}
|
||||
.case-title-wrap {
|
||||
display: flex;
|
||||
|
|
|
@ -142,26 +142,22 @@ export default {
|
|||
margin-top: px2rem(24);
|
||||
margin-bottom: px2rem(8);
|
||||
.title-wrap {
|
||||
height: 22px;
|
||||
font-family: "PingFang SC";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
color: #1f2329;
|
||||
}
|
||||
}
|
||||
.case-wrap {
|
||||
margin-left: px2rem(24);
|
||||
/* margin-left: px2rem(24); */
|
||||
margin-top: px2rem(24);
|
||||
}
|
||||
.case-title-wrap {
|
||||
display: flex;
|
||||
.title-wrap {
|
||||
font-weight: 500;
|
||||
height: 22px;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
color: #1f2329;
|
||||
}
|
||||
margin-bottom: px2rem(8);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div>
|
||||
<div v-on:keydown.enter.prevent>
|
||||
<!-- 基于form组件进行表单验证 -->
|
||||
<el-form ref="caseDetailForm" :rules="rules" :model="form">
|
||||
<!-- case name -->
|
||||
|
|
|
@ -587,12 +587,10 @@ export default {
|
|||
margin-top: px2rem(24);
|
||||
margin-bottom: px2rem(8);
|
||||
.title-wrap {
|
||||
height: 22px;
|
||||
font-family: "PingFang SC";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
color: #1f2329;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -941,9 +941,7 @@ export default {
|
|||
display: flex;
|
||||
.title-wrap {
|
||||
font-weight: 500;
|
||||
height: 22px;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
color: #1f2329;
|
||||
}
|
||||
margin-bottom: px2rem(8);
|
||||
|
|
|
@ -142,6 +142,7 @@ const message = {
|
|||
current_display_history_version: "Current display history version",
|
||||
compare_with_the_latest_version: "Compare with the latest version",
|
||||
view_the_latest_version: "View the latest version",
|
||||
version_id_cannot_be_empty: "Version id cannot be empty",
|
||||
},
|
||||
attachment: {
|
||||
preview: "Preview",
|
||||
|
|
|
@ -142,6 +142,7 @@ const message = {
|
|||
current_display_history_version: "当前展示历史版本",
|
||||
compare_with_the_latest_version: "与最新版本比较",
|
||||
view_the_latest_version: "查看最新版本",
|
||||
version_id_cannot_be_empty: "版本号不能为空",
|
||||
},
|
||||
attachment: {
|
||||
preview: "预览",
|
||||
|
|
|
@ -142,6 +142,7 @@ const message = {
|
|||
current_display_history_version: "當前展示歷史版本",
|
||||
compare_with_the_latest_version: "與最新版本比較",
|
||||
view_the_latest_version: "查看最新版本",
|
||||
version_id_cannot_be_empty: "版本號不能為空",
|
||||
},
|
||||
attachment: {
|
||||
preview: "預覽",
|
||||
|
|
Loading…
Reference in New Issue