From 506fa5e66fa68c4b4d1e91f22ffa3c784a71e7c2 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Thu, 15 Sep 2022 16:26:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=AE=9A=E4=B9=89=E6=A8=A1=E7=89=88?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E5=A4=AA=E9=95=BF=E4=BF=9D=E5=AD=98=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1016767 --user=王孝刚 【项目设置】新建/编辑自定义模板,名称太长显示错位,描述太长会报错 https://www.tapd.cn/55049933/s/1243259 --- .../base/domain/CustomFieldTemplate.java | 6 +- .../domain/CustomFieldTemplateExample.java | 72 +-- .../base/domain/TestCaseTemplate.java | 2 - .../base/domain/TestCaseTemplateExample.java | 70 --- .../domain/TestCaseTemplateWithBLOBs.java | 2 + .../mapper/CustomFieldTemplateMapper.java | 6 + .../base/mapper/CustomFieldTemplateMapper.xml | 438 ++++++++++-------- .../base/mapper/TestCaseTemplateMapper.xml | 124 ++--- .../project/template/CustomFieldEdit.vue | 25 +- .../project/template/CustomFieldFormList.vue | 97 ++-- .../project/template/CustomFiledComponent.vue | 7 +- .../project/template/FieldTemplateEdit.vue | 48 +- .../project/template/TestCaseTemplateEdit.vue | 25 +- .../report/TemplateComponentEditHeader.vue | 9 +- 14 files changed, 436 insertions(+), 495 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/domain/CustomFieldTemplate.java b/backend/src/main/java/io/metersphere/base/domain/CustomFieldTemplate.java index 0473b2d715..487bcf57b2 100644 --- a/backend/src/main/java/io/metersphere/base/domain/CustomFieldTemplate.java +++ b/backend/src/main/java/io/metersphere/base/domain/CustomFieldTemplate.java @@ -17,11 +17,11 @@ public class CustomFieldTemplate implements Serializable { private Integer order; - private String defaultValue; - private String customData; private String key; + private String defaultValue; + private static final long serialVersionUID = 1L; -} +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/CustomFieldTemplateExample.java b/backend/src/main/java/io/metersphere/base/domain/CustomFieldTemplateExample.java index f249094bc1..29eb52bf3a 100644 --- a/backend/src/main/java/io/metersphere/base/domain/CustomFieldTemplateExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/CustomFieldTemplateExample.java @@ -504,76 +504,6 @@ public class CustomFieldTemplateExample { return (Criteria) this; } - public Criteria andDefaultValueIsNull() { - addCriterion("default_value is null"); - return (Criteria) this; - } - - public Criteria andDefaultValueIsNotNull() { - addCriterion("default_value is not null"); - return (Criteria) this; - } - - public Criteria andDefaultValueEqualTo(String value) { - addCriterion("default_value =", value, "defaultValue"); - return (Criteria) this; - } - - public Criteria andDefaultValueNotEqualTo(String value) { - addCriterion("default_value <>", value, "defaultValue"); - return (Criteria) this; - } - - public Criteria andDefaultValueGreaterThan(String value) { - addCriterion("default_value >", value, "defaultValue"); - return (Criteria) this; - } - - public Criteria andDefaultValueGreaterThanOrEqualTo(String value) { - addCriterion("default_value >=", value, "defaultValue"); - return (Criteria) this; - } - - public Criteria andDefaultValueLessThan(String value) { - addCriterion("default_value <", value, "defaultValue"); - return (Criteria) this; - } - - public Criteria andDefaultValueLessThanOrEqualTo(String value) { - addCriterion("default_value <=", value, "defaultValue"); - return (Criteria) this; - } - - public Criteria andDefaultValueLike(String value) { - addCriterion("default_value like", value, "defaultValue"); - return (Criteria) this; - } - - public Criteria andDefaultValueNotLike(String value) { - addCriterion("default_value not like", value, "defaultValue"); - return (Criteria) this; - } - - public Criteria andDefaultValueIn(List values) { - addCriterion("default_value in", values, "defaultValue"); - return (Criteria) this; - } - - public Criteria andDefaultValueNotIn(List values) { - addCriterion("default_value not in", values, "defaultValue"); - return (Criteria) this; - } - - public Criteria andDefaultValueBetween(String value1, String value2) { - addCriterion("default_value between", value1, value2, "defaultValue"); - return (Criteria) this; - } - - public Criteria andDefaultValueNotBetween(String value1, String value2) { - addCriterion("default_value not between", value1, value2, "defaultValue"); - return (Criteria) this; - } - public Criteria andCustomDataIsNull() { addCriterion("custom_data is null"); return (Criteria) this; @@ -807,4 +737,4 @@ public class CustomFieldTemplateExample { this(condition, value, secondValue, null); } } -} +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseTemplate.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseTemplate.java index 19dc2aff27..09af67b16f 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCaseTemplate.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseTemplate.java @@ -20,8 +20,6 @@ public class TestCaseTemplate implements Serializable { private Boolean global; - private String prerequisite; - private Long createTime; private Long updateTime; diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseTemplateExample.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseTemplateExample.java index 88059652b1..d74868028f 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCaseTemplateExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseTemplateExample.java @@ -574,76 +574,6 @@ public class TestCaseTemplateExample { return (Criteria) this; } - public Criteria andPrerequisiteIsNull() { - addCriterion("prerequisite is null"); - return (Criteria) this; - } - - public Criteria andPrerequisiteIsNotNull() { - addCriterion("prerequisite is not null"); - return (Criteria) this; - } - - public Criteria andPrerequisiteEqualTo(String value) { - addCriterion("prerequisite =", value, "prerequisite"); - return (Criteria) this; - } - - public Criteria andPrerequisiteNotEqualTo(String value) { - addCriterion("prerequisite <>", value, "prerequisite"); - return (Criteria) this; - } - - public Criteria andPrerequisiteGreaterThan(String value) { - addCriterion("prerequisite >", value, "prerequisite"); - return (Criteria) this; - } - - public Criteria andPrerequisiteGreaterThanOrEqualTo(String value) { - addCriterion("prerequisite >=", value, "prerequisite"); - return (Criteria) this; - } - - public Criteria andPrerequisiteLessThan(String value) { - addCriterion("prerequisite <", value, "prerequisite"); - return (Criteria) this; - } - - public Criteria andPrerequisiteLessThanOrEqualTo(String value) { - addCriterion("prerequisite <=", value, "prerequisite"); - return (Criteria) this; - } - - public Criteria andPrerequisiteLike(String value) { - addCriterion("prerequisite like", value, "prerequisite"); - return (Criteria) this; - } - - public Criteria andPrerequisiteNotLike(String value) { - addCriterion("prerequisite not like", value, "prerequisite"); - return (Criteria) this; - } - - public Criteria andPrerequisiteIn(List values) { - addCriterion("prerequisite in", values, "prerequisite"); - return (Criteria) this; - } - - public Criteria andPrerequisiteNotIn(List values) { - addCriterion("prerequisite not in", values, "prerequisite"); - return (Criteria) this; - } - - public Criteria andPrerequisiteBetween(String value1, String value2) { - addCriterion("prerequisite between", value1, value2, "prerequisite"); - return (Criteria) this; - } - - public Criteria andPrerequisiteNotBetween(String value1, String value2) { - addCriterion("prerequisite not between", value1, value2, "prerequisite"); - return (Criteria) this; - } - public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseTemplateWithBLOBs.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseTemplateWithBLOBs.java index e3234f1c87..b20c31ecb2 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCaseTemplateWithBLOBs.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseTemplateWithBLOBs.java @@ -9,6 +9,8 @@ import lombok.ToString; @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TestCaseTemplateWithBLOBs extends TestCaseTemplate implements Serializable { + private String prerequisite; + private String stepDescription; private String expectedResult; diff --git a/backend/src/main/java/io/metersphere/base/mapper/CustomFieldTemplateMapper.java b/backend/src/main/java/io/metersphere/base/mapper/CustomFieldTemplateMapper.java index 2ce09dbded..4bf7b3bcf8 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/CustomFieldTemplateMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/CustomFieldTemplateMapper.java @@ -16,15 +16,21 @@ public interface CustomFieldTemplateMapper { int insertSelective(CustomFieldTemplate record); + List selectByExampleWithBLOBs(CustomFieldTemplateExample example); + List selectByExample(CustomFieldTemplateExample example); CustomFieldTemplate selectByPrimaryKey(String id); int updateByExampleSelective(@Param("record") CustomFieldTemplate record, @Param("example") CustomFieldTemplateExample example); + int updateByExampleWithBLOBs(@Param("record") CustomFieldTemplate record, @Param("example") CustomFieldTemplateExample example); + int updateByExample(@Param("record") CustomFieldTemplate record, @Param("example") CustomFieldTemplateExample example); int updateByPrimaryKeySelective(CustomFieldTemplate record); + int updateByPrimaryKeyWithBLOBs(CustomFieldTemplate record); + int updateByPrimaryKey(CustomFieldTemplate record); } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/CustomFieldTemplateMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/CustomFieldTemplateMapper.xml index ffc60f790b..7560217626 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/CustomFieldTemplateMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/CustomFieldTemplateMapper.xml @@ -1,36 +1,39 @@ - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + #{listItem} @@ -60,7 +63,7 @@ and ${criterion.condition} - #{listItem} + #{listItem} @@ -70,50 +73,72 @@ - - id, field_id, template_id, scene, required, `order`, default_value, custom_data, - `key` - - - - - delete from custom_field_template - where id = #{id,jdbcType=VARCHAR} - - - delete from custom_field_template - - - - - - insert into custom_field_template (id, field_id, template_id, - scene, required, `order`, - default_value, custom_data, `key` - ) - values (#{id,jdbcType=VARCHAR}, #{fieldId,jdbcType=VARCHAR}, #{templateId,jdbcType=VARCHAR}, - #{scene,jdbcType=VARCHAR}, #{required,jdbcType=BIT}, #{order,jdbcType=INTEGER}, - #{defaultValue,jdbcType=VARCHAR}, #{customData,jdbcType=VARCHAR}, #{key,jdbcType=VARCHAR} - ) - + + id + , field_id, template_id, scene, required, `order`, custom_data, `key` + + + default_value + + + + + + delete + from custom_field_template + where id = #{id,jdbcType=VARCHAR} + + + delete from custom_field_template + + + + + + insert into custom_field_template (id, field_id, template_id, + scene, required, `order`, + custom_data, `key`, default_value) + values (#{id,jdbcType=VARCHAR}, #{fieldId,jdbcType=VARCHAR}, #{templateId,jdbcType=VARCHAR}, + #{scene,jdbcType=VARCHAR}, #{required,jdbcType=BIT}, #{order,jdbcType=INTEGER}, + #{customData,jdbcType=VARCHAR}, #{key,jdbcType=VARCHAR}, #{defaultValue,jdbcType=LONGVARCHAR}) + insert into custom_field_template @@ -123,27 +148,27 @@ field_id, - - template_id, - - - scene, - - - required, - - - `order`, - - - default_value, - - - custom_data, - - - `key`, - + + template_id, + + + scene, + + + required, + + + `order`, + + + custom_data, + + + `key`, + + + default_value, + @@ -152,27 +177,27 @@ #{fieldId,jdbcType=VARCHAR}, - - #{templateId,jdbcType=VARCHAR}, - - - #{scene,jdbcType=VARCHAR}, - - - #{required,jdbcType=BIT}, - - - #{order,jdbcType=INTEGER}, - - - #{defaultValue,jdbcType=VARCHAR}, - - - #{customData,jdbcType=VARCHAR}, - - - #{key,jdbcType=VARCHAR}, - + + #{templateId,jdbcType=VARCHAR}, + + + #{scene,jdbcType=VARCHAR}, + + + #{required,jdbcType=BIT}, + + + #{order,jdbcType=INTEGER}, + + + #{customData,jdbcType=VARCHAR}, + + + #{key,jdbcType=VARCHAR}, + + + #{defaultValue,jdbcType=LONGVARCHAR}, + select @@ -136,18 +138,18 @@ - INSERT INTO test_case_template (id, `name`, `type`, - description, case_name, `system`, - `global`, prerequisite, create_time, - update_time, step_model, create_user, - project_id, step_description, expected_result, - actual_result, steps) - VALUES (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, - #{description,jdbcType=VARCHAR}, #{caseName,jdbcType=VARCHAR}, #{system,jdbcType=BIT}, - #{global,jdbcType=BIT}, #{prerequisite,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, - #{updateTime,jdbcType=BIGINT}, #{stepModel,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, - #{projectId,jdbcType=VARCHAR}, #{stepDescription,jdbcType=LONGVARCHAR}, #{expectedResult,jdbcType=LONGVARCHAR}, - #{actualResult,jdbcType=LONGVARCHAR}, #{steps,jdbcType=LONGVARCHAR}) + insert into test_case_template (id, `name`, `type`, + description, case_name, `system`, + `global`, create_time, update_time, + step_model, create_user, project_id, + prerequisite, step_description, + expected_result, actual_result, steps) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, + #{description,jdbcType=VARCHAR}, #{caseName,jdbcType=VARCHAR}, #{system,jdbcType=BIT}, + #{global,jdbcType=BIT}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, + #{stepModel,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, + #{prerequisite,jdbcType=LONGVARCHAR}, #{stepDescription,jdbcType=LONGVARCHAR}, + #{expectedResult,jdbcType=LONGVARCHAR}, #{actualResult,jdbcType=LONGVARCHAR}, #{steps,jdbcType=LONGVARCHAR}) insert into test_case_template @@ -173,9 +175,6 @@ `global`, - - prerequisite, - create_time, @@ -191,6 +190,9 @@ project_id, + + prerequisite, + step_description, @@ -226,9 +228,6 @@ #{global,jdbcType=BIT}, - - #{prerequisite,jdbcType=VARCHAR}, - #{createTime,jdbcType=BIGINT}, @@ -244,6 +243,9 @@ #{projectId,jdbcType=VARCHAR}, + + #{prerequisite,jdbcType=LONGVARCHAR}, + #{stepDescription,jdbcType=LONGVARCHAR}, @@ -288,9 +290,6 @@ `global` = #{record.global,jdbcType=BIT}, - - prerequisite = #{record.prerequisite,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=BIGINT}, @@ -306,6 +305,9 @@ project_id = #{record.projectId,jdbcType=VARCHAR}, + + prerequisite = #{record.prerequisite,jdbcType=LONGVARCHAR}, + step_description = #{record.stepDescription,jdbcType=LONGVARCHAR}, @@ -326,22 +328,22 @@ update test_case_template set id = #{record.id,jdbcType=VARCHAR}, - `name` = #{record.name,jdbcType=VARCHAR}, - `type` = #{record.type,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=VARCHAR}, - case_name = #{record.caseName,jdbcType=VARCHAR}, - `system` = #{record.system,jdbcType=BIT}, - `global` = #{record.global,jdbcType=BIT}, - prerequisite = #{record.prerequisite,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=BIGINT}, - update_time = #{record.updateTime,jdbcType=BIGINT}, - step_model = #{record.stepModel,jdbcType=VARCHAR}, - create_user = #{record.createUser,jdbcType=VARCHAR}, - project_id = #{record.projectId,jdbcType=VARCHAR}, - step_description = #{record.stepDescription,jdbcType=LONGVARCHAR}, - expected_result = #{record.expectedResult,jdbcType=LONGVARCHAR}, - actual_result = #{record.actualResult,jdbcType=LONGVARCHAR}, - steps = #{record.steps,jdbcType=LONGVARCHAR} + `name` = #{record.name,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + case_name = #{record.caseName,jdbcType=VARCHAR}, + `system` = #{record.system,jdbcType=BIT}, + `global` = #{record.global,jdbcType=BIT}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + step_model = #{record.stepModel,jdbcType=VARCHAR}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + prerequisite = #{record.prerequisite,jdbcType=LONGVARCHAR}, + step_description = #{record.stepDescription,jdbcType=LONGVARCHAR}, + expected_result = #{record.expectedResult,jdbcType=LONGVARCHAR}, + actual_result = #{record.actualResult,jdbcType=LONGVARCHAR}, + steps = #{record.steps,jdbcType=LONGVARCHAR} @@ -355,7 +357,6 @@ case_name = #{record.caseName,jdbcType=VARCHAR}, `system` = #{record.system,jdbcType=BIT}, `global` = #{record.global,jdbcType=BIT}, - prerequisite = #{record.prerequisite,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=BIGINT}, update_time = #{record.updateTime,jdbcType=BIGINT}, step_model = #{record.stepModel,jdbcType=VARCHAR}, @@ -386,9 +387,6 @@ `global` = #{global,jdbcType=BIT}, - - prerequisite = #{prerequisite,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=BIGINT}, @@ -404,6 +402,9 @@ project_id = #{projectId,jdbcType=VARCHAR}, + + prerequisite = #{prerequisite,jdbcType=LONGVARCHAR}, + step_description = #{stepDescription,jdbcType=LONGVARCHAR}, @@ -421,22 +422,22 @@ update test_case_template - set `name` = #{name,jdbcType=VARCHAR}, - `type` = #{type,jdbcType=VARCHAR}, - description = #{description,jdbcType=VARCHAR}, - case_name = #{caseName,jdbcType=VARCHAR}, - `system` = #{system,jdbcType=BIT}, - `global` = #{global,jdbcType=BIT}, - prerequisite = #{prerequisite,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=BIGINT}, - update_time = #{updateTime,jdbcType=BIGINT}, - step_model = #{stepModel,jdbcType=VARCHAR}, - create_user = #{createUser,jdbcType=VARCHAR}, - project_id = #{projectId,jdbcType=VARCHAR}, - step_description = #{stepDescription,jdbcType=LONGVARCHAR}, - expected_result = #{expectedResult,jdbcType=LONGVARCHAR}, - actual_result = #{actualResult,jdbcType=LONGVARCHAR}, - steps = #{steps,jdbcType=LONGVARCHAR} + set `name` = #{name,jdbcType=VARCHAR}, + `type` = #{type,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + case_name = #{caseName,jdbcType=VARCHAR}, + `system` = #{system,jdbcType=BIT}, + `global` = #{global,jdbcType=BIT}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + step_model = #{stepModel,jdbcType=VARCHAR}, + create_user = #{createUser,jdbcType=VARCHAR}, + project_id = #{projectId,jdbcType=VARCHAR}, + prerequisite = #{prerequisite,jdbcType=LONGVARCHAR}, + step_description = #{stepDescription,jdbcType=LONGVARCHAR}, + expected_result = #{expectedResult,jdbcType=LONGVARCHAR}, + actual_result = #{actualResult,jdbcType=LONGVARCHAR}, + steps = #{steps,jdbcType=LONGVARCHAR} where id = #{id,jdbcType=VARCHAR} @@ -447,7 +448,6 @@ case_name = #{caseName,jdbcType=VARCHAR}, `system` = #{system,jdbcType=BIT}, `global` = #{global,jdbcType=BIT}, - prerequisite = #{prerequisite,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=BIGINT}, update_time = #{updateTime,jdbcType=BIGINT}, step_model = #{stepModel,jdbcType=VARCHAR}, diff --git a/frontend/src/business/components/project/template/CustomFieldEdit.vue b/frontend/src/business/components/project/template/CustomFieldEdit.vue index 6319b8a6c2..1aa2880dc9 100644 --- a/frontend/src/business/components/project/template/CustomFieldEdit.vue +++ b/frontend/src/business/components/project/template/CustomFieldEdit.vue @@ -9,16 +9,19 @@ - - + + - + - + + :data="form.options" + :disable="form.name === '用例等级'" + :is-kv="form.scene === 'ISSUE'"/> @@ -88,8 +91,8 @@ export default { {required: true, message: this.$t('test_track.case.input_name'), trigger: 'blur'}, {max: 64, message: this.$t('test_track.length_less_than') + '64', trigger: 'blur'} ], - scene: [{required: true, trigger: 'change'}], - type: [{required: true, trigger: 'change'}], + scene: [{required: true, trigger: 'change'}], + type: [{required: true, trigger: 'change'}], }, visible: false, url: '', @@ -105,7 +108,7 @@ export default { }, planSceneOptions() { let tmp = [...CUSTOM_FIELD_SCENE_OPTION]; - tmp.push( {value: 'PLAN',text: i18n.t('workstation.table_name.track_plan')});// 创建和编辑不能选测试计划 + tmp.push({value: 'PLAN', text: i18n.t('workstation.table_name.track_plan')});// 创建和编辑不能选测试计划 return tmp; }, showOptions() { @@ -164,7 +167,7 @@ export default { } Object.assign(param, this.form); param.projectId = getCurrentProjectID(); - if (['select','multipleSelect','radio','checkbox'].indexOf(param.type) > -1) { + if (['select', 'multipleSelect', 'radio', 'checkbox'].indexOf(param.type) > -1) { if (param.options.length < 1) { this.$warning(this.$t('custom_field.option_check')); return; diff --git a/frontend/src/business/components/project/template/CustomFieldFormList.vue b/frontend/src/business/components/project/template/CustomFieldFormList.vue index 0ea8185526..2f2f201659 100644 --- a/frontend/src/business/components/project/template/CustomFieldFormList.vue +++ b/frontend/src/business/components/project/template/CustomFieldFormList.vue @@ -1,22 +1,22 @@