fix(项目设置): 修复自定义模版名称太长保存报错的缺陷
--bug=1016767 --user=王孝刚 【项目设置】新建/编辑自定义模板,名称太长显示错位,描述太长会报错 https://www.tapd.cn/55049933/s/1243259
This commit is contained in:
parent
f6338f97da
commit
506fa5e66f
|
@ -17,11 +17,11 @@ public class CustomFieldTemplate implements Serializable {
|
||||||
|
|
||||||
private Integer order;
|
private Integer order;
|
||||||
|
|
||||||
private String defaultValue;
|
|
||||||
|
|
||||||
private String customData;
|
private String customData;
|
||||||
|
|
||||||
private String key;
|
private String key;
|
||||||
|
|
||||||
|
private String defaultValue;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
}
|
}
|
|
@ -504,76 +504,6 @@ public class CustomFieldTemplateExample {
|
||||||
return (Criteria) this;
|
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<String> values) {
|
|
||||||
addCriterion("default_value in", values, "defaultValue");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDefaultValueNotIn(List<String> 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() {
|
public Criteria andCustomDataIsNull() {
|
||||||
addCriterion("custom_data is null");
|
addCriterion("custom_data is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
|
|
|
@ -20,8 +20,6 @@ public class TestCaseTemplate implements Serializable {
|
||||||
|
|
||||||
private Boolean global;
|
private Boolean global;
|
||||||
|
|
||||||
private String prerequisite;
|
|
||||||
|
|
||||||
private Long createTime;
|
private Long createTime;
|
||||||
|
|
||||||
private Long updateTime;
|
private Long updateTime;
|
||||||
|
|
|
@ -574,76 +574,6 @@ public class TestCaseTemplateExample {
|
||||||
return (Criteria) this;
|
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<String> values) {
|
|
||||||
addCriterion("prerequisite in", values, "prerequisite");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andPrerequisiteNotIn(List<String> 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() {
|
public Criteria andCreateTimeIsNull() {
|
||||||
addCriterion("create_time is null");
|
addCriterion("create_time is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
|
|
|
@ -9,6 +9,8 @@ import lombok.ToString;
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
public class TestCaseTemplateWithBLOBs extends TestCaseTemplate implements Serializable {
|
public class TestCaseTemplateWithBLOBs extends TestCaseTemplate implements Serializable {
|
||||||
|
private String prerequisite;
|
||||||
|
|
||||||
private String stepDescription;
|
private String stepDescription;
|
||||||
|
|
||||||
private String expectedResult;
|
private String expectedResult;
|
||||||
|
|
|
@ -16,15 +16,21 @@ public interface CustomFieldTemplateMapper {
|
||||||
|
|
||||||
int insertSelective(CustomFieldTemplate record);
|
int insertSelective(CustomFieldTemplate record);
|
||||||
|
|
||||||
|
List<CustomFieldTemplate> selectByExampleWithBLOBs(CustomFieldTemplateExample example);
|
||||||
|
|
||||||
List<CustomFieldTemplate> selectByExample(CustomFieldTemplateExample example);
|
List<CustomFieldTemplate> selectByExample(CustomFieldTemplateExample example);
|
||||||
|
|
||||||
CustomFieldTemplate selectByPrimaryKey(String id);
|
CustomFieldTemplate selectByPrimaryKey(String id);
|
||||||
|
|
||||||
int updateByExampleSelective(@Param("record") CustomFieldTemplate record, @Param("example") CustomFieldTemplateExample example);
|
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 updateByExample(@Param("record") CustomFieldTemplate record, @Param("example") CustomFieldTemplateExample example);
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(CustomFieldTemplate record);
|
int updateByPrimaryKeySelective(CustomFieldTemplate record);
|
||||||
|
|
||||||
|
int updateByPrimaryKeyWithBLOBs(CustomFieldTemplate record);
|
||||||
|
|
||||||
int updateByPrimaryKey(CustomFieldTemplate record);
|
int updateByPrimaryKey(CustomFieldTemplate record);
|
||||||
}
|
}
|
|
@ -1,36 +1,39 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="io.metersphere.base.mapper.CustomFieldTemplateMapper">
|
<mapper namespace="io.metersphere.base.mapper.CustomFieldTemplateMapper">
|
||||||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.CustomFieldTemplate">
|
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.CustomFieldTemplate">
|
||||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
<id column="id" jdbcType="VARCHAR" property="id"/>
|
||||||
<result column="field_id" jdbcType="VARCHAR" property="fieldId" />
|
<result column="field_id" jdbcType="VARCHAR" property="fieldId"/>
|
||||||
<result column="template_id" jdbcType="VARCHAR" property="templateId" />
|
<result column="template_id" jdbcType="VARCHAR" property="templateId"/>
|
||||||
<result column="scene" jdbcType="VARCHAR" property="scene" />
|
<result column="scene" jdbcType="VARCHAR" property="scene"/>
|
||||||
<result column="required" jdbcType="BIT" property="required" />
|
<result column="required" jdbcType="BIT" property="required"/>
|
||||||
<result column="order" jdbcType="INTEGER" property="order" />
|
<result column="order" jdbcType="INTEGER" property="order"/>
|
||||||
<result column="default_value" jdbcType="VARCHAR" property="defaultValue" />
|
<result column="custom_data" jdbcType="VARCHAR" property="customData"/>
|
||||||
<result column="custom_data" jdbcType="VARCHAR" property="customData" />
|
<result column="key" jdbcType="VARCHAR" property="key"/>
|
||||||
<result column="key" jdbcType="VARCHAR" property="key" />
|
</resultMap>
|
||||||
</resultMap>
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.CustomFieldTemplate">
|
||||||
<sql id="Example_Where_Clause">
|
<result column="default_value" jdbcType="LONGVARCHAR" property="defaultValue"/>
|
||||||
<where>
|
</resultMap>
|
||||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
<sql id="Example_Where_Clause">
|
||||||
<if test="criteria.valid">
|
<where>
|
||||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
<foreach collection="criteria.criteria" item="criterion">
|
<if test="criteria.valid">
|
||||||
<choose>
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
<when test="criterion.noValue">
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
and ${criterion.condition}
|
<choose>
|
||||||
</when>
|
<when test="criterion.noValue">
|
||||||
<when test="criterion.singleValue">
|
and ${criterion.condition}
|
||||||
and ${criterion.condition} #{criterion.value}
|
</when>
|
||||||
</when>
|
<when test="criterion.singleValue">
|
||||||
<when test="criterion.betweenValue">
|
and ${criterion.condition} #{criterion.value}
|
||||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
</when>
|
||||||
</when>
|
<when test="criterion.betweenValue">
|
||||||
<when test="criterion.listValue">
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
and ${criterion.condition}
|
</when>
|
||||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||||||
|
separator=",">
|
||||||
#{listItem}
|
#{listItem}
|
||||||
</foreach>
|
</foreach>
|
||||||
</when>
|
</when>
|
||||||
|
@ -60,7 +63,7 @@
|
||||||
<when test="criterion.listValue">
|
<when test="criterion.listValue">
|
||||||
and ${criterion.condition}
|
and ${criterion.condition}
|
||||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
#{listItem}
|
#{listItem}
|
||||||
</foreach>
|
</foreach>
|
||||||
</when>
|
</when>
|
||||||
</choose>
|
</choose>
|
||||||
|
@ -70,50 +73,72 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, field_id, template_id, scene, required, `order`, default_value, custom_data,
|
id
|
||||||
`key`
|
, field_id, template_id, scene, required, `order`, custom_data, `key`
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="io.metersphere.base.domain.CustomFieldTemplateExample" resultMap="BaseResultMap">
|
<sql id="Blob_Column_List">
|
||||||
select
|
default_value
|
||||||
<if test="distinct">
|
</sql>
|
||||||
distinct
|
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.CustomFieldTemplateExample"
|
||||||
</if>
|
resultMap="ResultMapWithBLOBs">
|
||||||
<include refid="Base_Column_List" />
|
select
|
||||||
from custom_field_template
|
<if test="distinct">
|
||||||
<if test="_parameter != null">
|
distinct
|
||||||
<include refid="Example_Where_Clause" />
|
</if>
|
||||||
</if>
|
<include refid="Base_Column_List"/>
|
||||||
<if test="orderByClause != null">
|
,
|
||||||
order by ${orderByClause}
|
<include refid="Blob_Column_List"/>
|
||||||
</if>
|
from custom_field_template
|
||||||
</select>
|
<if test="_parameter != null">
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
<include refid="Example_Where_Clause"/>
|
||||||
select
|
</if>
|
||||||
<include refid="Base_Column_List" />
|
<if test="orderByClause != null">
|
||||||
from custom_field_template
|
order by ${orderByClause}
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
<select id="selectByExample" parameterType="io.metersphere.base.domain.CustomFieldTemplateExample"
|
||||||
delete from custom_field_template
|
resultMap="BaseResultMap">
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
select
|
||||||
</delete>
|
<if test="distinct">
|
||||||
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.CustomFieldTemplateExample">
|
distinct
|
||||||
delete from custom_field_template
|
</if>
|
||||||
<if test="_parameter != null">
|
<include refid="Base_Column_List"/>
|
||||||
<include refid="Example_Where_Clause" />
|
from custom_field_template
|
||||||
</if>
|
<if test="_parameter != null">
|
||||||
</delete>
|
<include refid="Example_Where_Clause"/>
|
||||||
<insert id="insert" parameterType="io.metersphere.base.domain.CustomFieldTemplate">
|
</if>
|
||||||
insert into custom_field_template (id, field_id, template_id,
|
<if test="orderByClause != null">
|
||||||
scene, required, `order`,
|
order by ${orderByClause}
|
||||||
default_value, custom_data, `key`
|
</if>
|
||||||
)
|
</select>
|
||||||
values (#{id,jdbcType=VARCHAR}, #{fieldId,jdbcType=VARCHAR}, #{templateId,jdbcType=VARCHAR},
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||||
#{scene,jdbcType=VARCHAR}, #{required,jdbcType=BIT}, #{order,jdbcType=INTEGER},
|
select
|
||||||
#{defaultValue,jdbcType=VARCHAR}, #{customData,jdbcType=VARCHAR}, #{key,jdbcType=VARCHAR}
|
<include refid="Base_Column_List"/>
|
||||||
)
|
,
|
||||||
</insert>
|
<include refid="Blob_Column_List"/>
|
||||||
|
from custom_field_template
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
|
delete
|
||||||
|
from custom_field_template
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.CustomFieldTemplateExample">
|
||||||
|
delete from custom_field_template
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause"/>
|
||||||
|
</if>
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" parameterType="io.metersphere.base.domain.CustomFieldTemplate">
|
||||||
|
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>
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.CustomFieldTemplate">
|
<insert id="insertSelective" parameterType="io.metersphere.base.domain.CustomFieldTemplate">
|
||||||
insert into custom_field_template
|
insert into custom_field_template
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
@ -123,27 +148,27 @@
|
||||||
<if test="fieldId != null">
|
<if test="fieldId != null">
|
||||||
field_id,
|
field_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="templateId != null">
|
<if test="templateId != null">
|
||||||
template_id,
|
template_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="scene != null">
|
<if test="scene != null">
|
||||||
scene,
|
scene,
|
||||||
</if>
|
</if>
|
||||||
<if test="required != null">
|
<if test="required != null">
|
||||||
required,
|
required,
|
||||||
</if>
|
</if>
|
||||||
<if test="order != null">
|
<if test="order != null">
|
||||||
`order`,
|
`order`,
|
||||||
</if>
|
</if>
|
||||||
<if test="defaultValue != null">
|
<if test="customData != null">
|
||||||
default_value,
|
custom_data,
|
||||||
</if>
|
</if>
|
||||||
<if test="customData != null">
|
<if test="key != null">
|
||||||
custom_data,
|
`key`,
|
||||||
</if>
|
</if>
|
||||||
<if test="key != null">
|
<if test="defaultValue != null">
|
||||||
`key`,
|
default_value,
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
|
@ -152,27 +177,27 @@
|
||||||
<if test="fieldId != null">
|
<if test="fieldId != null">
|
||||||
#{fieldId,jdbcType=VARCHAR},
|
#{fieldId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="templateId != null">
|
<if test="templateId != null">
|
||||||
#{templateId,jdbcType=VARCHAR},
|
#{templateId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="scene != null">
|
<if test="scene != null">
|
||||||
#{scene,jdbcType=VARCHAR},
|
#{scene,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="required != null">
|
<if test="required != null">
|
||||||
#{required,jdbcType=BIT},
|
#{required,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
<if test="order != null">
|
<if test="order != null">
|
||||||
#{order,jdbcType=INTEGER},
|
#{order,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="defaultValue != null">
|
<if test="customData != null">
|
||||||
#{defaultValue,jdbcType=VARCHAR},
|
#{customData,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="customData != null">
|
<if test="key != null">
|
||||||
#{customData,jdbcType=VARCHAR},
|
#{key,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="key != null">
|
<if test="defaultValue != null">
|
||||||
#{key,jdbcType=VARCHAR},
|
#{defaultValue,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<select id="countByExample" parameterType="io.metersphere.base.domain.CustomFieldTemplateExample" resultType="java.lang.Long">
|
<select id="countByExample" parameterType="io.metersphere.base.domain.CustomFieldTemplateExample" resultType="java.lang.Long">
|
||||||
|
@ -190,87 +215,112 @@
|
||||||
<if test="record.fieldId != null">
|
<if test="record.fieldId != null">
|
||||||
field_id = #{record.fieldId,jdbcType=VARCHAR},
|
field_id = #{record.fieldId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.templateId != null">
|
<if test="record.templateId != null">
|
||||||
template_id = #{record.templateId,jdbcType=VARCHAR},
|
template_id = #{record.templateId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.scene != null">
|
<if test="record.scene != null">
|
||||||
scene = #{record.scene,jdbcType=VARCHAR},
|
scene = #{record.scene,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.required != null">
|
<if test="record.required != null">
|
||||||
required = #{record.required,jdbcType=BIT},
|
required = #{record.required,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.order != null">
|
<if test="record.order != null">
|
||||||
`order` = #{record.order,jdbcType=INTEGER},
|
`order` = #{record.order,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.defaultValue != null">
|
<if test="record.customData != null">
|
||||||
default_value = #{record.defaultValue,jdbcType=VARCHAR},
|
custom_data = #{record.customData,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.customData != null">
|
<if test="record.key != null">
|
||||||
custom_data = #{record.customData,jdbcType=VARCHAR},
|
`key` = #{record.key,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.key != null">
|
<if test="record.defaultValue != null">
|
||||||
`key` = #{record.key,jdbcType=VARCHAR},
|
default_value = #{record.defaultValue,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
</set>
|
</set>
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause"/>
|
||||||
</if>
|
</if>
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByExample" parameterType="map">
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||||
update custom_field_template
|
update custom_field_template
|
||||||
set id = #{record.id,jdbcType=VARCHAR},
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
field_id = #{record.fieldId,jdbcType=VARCHAR},
|
field_id = #{record.fieldId,jdbcType=VARCHAR},
|
||||||
template_id = #{record.templateId,jdbcType=VARCHAR},
|
template_id = #{record.templateId,jdbcType=VARCHAR},
|
||||||
scene = #{record.scene,jdbcType=VARCHAR},
|
scene = #{record.scene,jdbcType=VARCHAR},
|
||||||
required = #{record.required,jdbcType=BIT},
|
required = #{record.required,jdbcType=BIT},
|
||||||
`order` = #{record.order,jdbcType=INTEGER},
|
`order` = #{record.order,jdbcType=INTEGER},
|
||||||
default_value = #{record.defaultValue,jdbcType=VARCHAR},
|
custom_data = #{record.customData,jdbcType=VARCHAR},
|
||||||
custom_data = #{record.customData,jdbcType=VARCHAR},
|
`key` = #{record.key,jdbcType=VARCHAR},
|
||||||
`key` = #{record.key,jdbcType=VARCHAR}
|
default_value = #{record.defaultValue,jdbcType=LONGVARCHAR}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause"/>
|
||||||
</if>
|
</if>
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.CustomFieldTemplate">
|
<update id="updateByExample" parameterType="map">
|
||||||
update custom_field_template
|
update custom_field_template
|
||||||
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
|
field_id = #{record.fieldId,jdbcType=VARCHAR},
|
||||||
|
template_id = #{record.templateId,jdbcType=VARCHAR},
|
||||||
|
scene = #{record.scene,jdbcType=VARCHAR},
|
||||||
|
required = #{record.required,jdbcType=BIT},
|
||||||
|
`order` = #{record.order,jdbcType=INTEGER},
|
||||||
|
custom_data = #{record.customData,jdbcType=VARCHAR},
|
||||||
|
`key` = #{record.key,jdbcType=VARCHAR}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause"/>
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.CustomFieldTemplate">
|
||||||
|
update custom_field_template
|
||||||
<set>
|
<set>
|
||||||
<if test="fieldId != null">
|
<if test="fieldId != null">
|
||||||
field_id = #{fieldId,jdbcType=VARCHAR},
|
field_id = #{fieldId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="templateId != null">
|
<if test="templateId != null">
|
||||||
template_id = #{templateId,jdbcType=VARCHAR},
|
template_id = #{templateId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="scene != null">
|
<if test="scene != null">
|
||||||
scene = #{scene,jdbcType=VARCHAR},
|
scene = #{scene,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="required != null">
|
<if test="required != null">
|
||||||
required = #{required,jdbcType=BIT},
|
required = #{required,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
<if test="order != null">
|
<if test="order != null">
|
||||||
`order` = #{order,jdbcType=INTEGER},
|
`order` = #{order,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="defaultValue != null">
|
<if test="customData != null">
|
||||||
default_value = #{defaultValue,jdbcType=VARCHAR},
|
custom_data = #{customData,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="customData != null">
|
<if test="key != null">
|
||||||
custom_data = #{customData,jdbcType=VARCHAR},
|
`key` = #{key,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="key != null">
|
<if test="defaultValue != null">
|
||||||
`key` = #{key,jdbcType=VARCHAR},
|
default_value = #{defaultValue,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.CustomFieldTemplate">
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.CustomFieldTemplate">
|
||||||
update custom_field_template
|
update custom_field_template
|
||||||
set field_id = #{fieldId,jdbcType=VARCHAR},
|
set field_id = #{fieldId,jdbcType=VARCHAR},
|
||||||
template_id = #{templateId,jdbcType=VARCHAR},
|
template_id = #{templateId,jdbcType=VARCHAR},
|
||||||
scene = #{scene,jdbcType=VARCHAR},
|
scene = #{scene,jdbcType=VARCHAR},
|
||||||
required = #{required,jdbcType=BIT},
|
required = #{required,jdbcType=BIT},
|
||||||
`order` = #{order,jdbcType=INTEGER},
|
`order` = #{order,jdbcType=INTEGER},
|
||||||
default_value = #{defaultValue,jdbcType=VARCHAR},
|
custom_data = #{customData,jdbcType=VARCHAR},
|
||||||
custom_data = #{customData,jdbcType=VARCHAR},
|
`key` = #{key,jdbcType=VARCHAR},
|
||||||
`key` = #{key,jdbcType=VARCHAR}
|
default_value = #{defaultValue,jdbcType=LONGVARCHAR}
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.CustomFieldTemplate">
|
||||||
|
update custom_field_template
|
||||||
|
set field_id = #{fieldId,jdbcType=VARCHAR},
|
||||||
|
template_id = #{templateId,jdbcType=VARCHAR},
|
||||||
|
scene = #{scene,jdbcType=VARCHAR},
|
||||||
|
required = #{required,jdbcType=BIT},
|
||||||
|
`order` = #{order,jdbcType=INTEGER},
|
||||||
|
custom_data = #{customData,jdbcType=VARCHAR},
|
||||||
|
`key` = #{key,jdbcType=VARCHAR}
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
|
@ -9,7 +9,6 @@
|
||||||
<result column="case_name" jdbcType="VARCHAR" property="caseName" />
|
<result column="case_name" jdbcType="VARCHAR" property="caseName" />
|
||||||
<result column="system" jdbcType="BIT" property="system" />
|
<result column="system" jdbcType="BIT" property="system" />
|
||||||
<result column="global" jdbcType="BIT" property="global" />
|
<result column="global" jdbcType="BIT" property="global" />
|
||||||
<result column="prerequisite" jdbcType="VARCHAR" property="prerequisite" />
|
|
||||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||||
<result column="step_model" jdbcType="VARCHAR" property="stepModel" />
|
<result column="step_model" jdbcType="VARCHAR" property="stepModel" />
|
||||||
|
@ -17,6 +16,7 @@
|
||||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestCaseTemplateWithBLOBs">
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestCaseTemplateWithBLOBs">
|
||||||
|
<result column="prerequisite" jdbcType="LONGVARCHAR" property="prerequisite"/>
|
||||||
<result column="step_description" jdbcType="LONGVARCHAR" property="stepDescription" />
|
<result column="step_description" jdbcType="LONGVARCHAR" property="stepDescription" />
|
||||||
<result column="expected_result" jdbcType="LONGVARCHAR" property="expectedResult" />
|
<result column="expected_result" jdbcType="LONGVARCHAR" property="expectedResult" />
|
||||||
<result column="actual_result" jdbcType="LONGVARCHAR" property="actualResult" />
|
<result column="actual_result" jdbcType="LONGVARCHAR" property="actualResult" />
|
||||||
|
@ -81,11 +81,13 @@
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, `name`, `type`, description, case_name, `system`, `global`, prerequisite, create_time,
|
id
|
||||||
update_time, step_model, create_user, project_id
|
, `name`, `type`, description, case_name, `system`, `global`, create_time, update_time,
|
||||||
|
step_model, create_user, project_id
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Blob_Column_List">
|
<sql id="Blob_Column_List">
|
||||||
step_description, expected_result, actual_result, steps
|
prerequisite
|
||||||
|
, step_description, expected_result, actual_result, steps
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseTemplateExample" resultMap="ResultMapWithBLOBs">
|
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseTemplateExample" resultMap="ResultMapWithBLOBs">
|
||||||
select
|
select
|
||||||
|
@ -136,18 +138,18 @@
|
||||||
</if>
|
</if>
|
||||||
</delete>
|
</delete>
|
||||||
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseTemplateWithBLOBs">
|
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseTemplateWithBLOBs">
|
||||||
INSERT INTO test_case_template (id, `name`, `type`,
|
insert into test_case_template (id, `name`, `type`,
|
||||||
description, case_name, `system`,
|
description, case_name, `system`,
|
||||||
`global`, prerequisite, create_time,
|
`global`, create_time, update_time,
|
||||||
update_time, step_model, create_user,
|
step_model, create_user, project_id,
|
||||||
project_id, step_description, expected_result,
|
prerequisite, step_description,
|
||||||
actual_result, steps)
|
expected_result, actual_result, steps)
|
||||||
VALUES (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||||
#{description,jdbcType=VARCHAR}, #{caseName,jdbcType=VARCHAR}, #{system,jdbcType=BIT},
|
#{description,jdbcType=VARCHAR}, #{caseName,jdbcType=VARCHAR}, #{system,jdbcType=BIT},
|
||||||
#{global,jdbcType=BIT}, #{prerequisite,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
#{global,jdbcType=BIT}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||||
#{updateTime,jdbcType=BIGINT}, #{stepModel,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR},
|
#{stepModel,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
|
||||||
#{projectId,jdbcType=VARCHAR}, #{stepDescription,jdbcType=LONGVARCHAR}, #{expectedResult,jdbcType=LONGVARCHAR},
|
#{prerequisite,jdbcType=LONGVARCHAR}, #{stepDescription,jdbcType=LONGVARCHAR},
|
||||||
#{actualResult,jdbcType=LONGVARCHAR}, #{steps,jdbcType=LONGVARCHAR})
|
#{expectedResult,jdbcType=LONGVARCHAR}, #{actualResult,jdbcType=LONGVARCHAR}, #{steps,jdbcType=LONGVARCHAR})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseTemplateWithBLOBs">
|
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseTemplateWithBLOBs">
|
||||||
insert into test_case_template
|
insert into test_case_template
|
||||||
|
@ -173,9 +175,6 @@
|
||||||
<if test="global != null">
|
<if test="global != null">
|
||||||
`global`,
|
`global`,
|
||||||
</if>
|
</if>
|
||||||
<if test="prerequisite != null">
|
|
||||||
prerequisite,
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
<if test="createTime != null">
|
||||||
create_time,
|
create_time,
|
||||||
</if>
|
</if>
|
||||||
|
@ -191,6 +190,9 @@
|
||||||
<if test="projectId != null">
|
<if test="projectId != null">
|
||||||
project_id,
|
project_id,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="prerequisite != null">
|
||||||
|
prerequisite,
|
||||||
|
</if>
|
||||||
<if test="stepDescription != null">
|
<if test="stepDescription != null">
|
||||||
step_description,
|
step_description,
|
||||||
</if>
|
</if>
|
||||||
|
@ -226,9 +228,6 @@
|
||||||
<if test="global != null">
|
<if test="global != null">
|
||||||
#{global,jdbcType=BIT},
|
#{global,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
<if test="prerequisite != null">
|
|
||||||
#{prerequisite,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
<if test="createTime != null">
|
||||||
#{createTime,jdbcType=BIGINT},
|
#{createTime,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
@ -244,6 +243,9 @@
|
||||||
<if test="projectId != null">
|
<if test="projectId != null">
|
||||||
#{projectId,jdbcType=VARCHAR},
|
#{projectId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="prerequisite != null">
|
||||||
|
#{prerequisite,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
<if test="stepDescription != null">
|
<if test="stepDescription != null">
|
||||||
#{stepDescription,jdbcType=LONGVARCHAR},
|
#{stepDescription,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -288,9 +290,6 @@
|
||||||
<if test="record.global != null">
|
<if test="record.global != null">
|
||||||
`global` = #{record.global,jdbcType=BIT},
|
`global` = #{record.global,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.prerequisite != null">
|
|
||||||
prerequisite = #{record.prerequisite,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
<if test="record.createTime != null">
|
||||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
@ -306,6 +305,9 @@
|
||||||
<if test="record.projectId != null">
|
<if test="record.projectId != null">
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.prerequisite != null">
|
||||||
|
prerequisite = #{record.prerequisite,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
<if test="record.stepDescription != null">
|
<if test="record.stepDescription != null">
|
||||||
step_description = #{record.stepDescription,jdbcType=LONGVARCHAR},
|
step_description = #{record.stepDescription,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -326,22 +328,22 @@
|
||||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||||
update test_case_template
|
update test_case_template
|
||||||
set id = #{record.id,jdbcType=VARCHAR},
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
`name` = #{record.name,jdbcType=VARCHAR},
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
`type` = #{record.type,jdbcType=VARCHAR},
|
`type` = #{record.type,jdbcType=VARCHAR},
|
||||||
description = #{record.description,jdbcType=VARCHAR},
|
description = #{record.description,jdbcType=VARCHAR},
|
||||||
case_name = #{record.caseName,jdbcType=VARCHAR},
|
case_name = #{record.caseName,jdbcType=VARCHAR},
|
||||||
`system` = #{record.system,jdbcType=BIT},
|
`system` = #{record.system,jdbcType=BIT},
|
||||||
`global` = #{record.global,jdbcType=BIT},
|
`global` = #{record.global,jdbcType=BIT},
|
||||||
prerequisite = #{record.prerequisite,jdbcType=VARCHAR},
|
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
step_model = #{record.stepModel,jdbcType=VARCHAR},
|
||||||
step_model = #{record.stepModel,jdbcType=VARCHAR},
|
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
prerequisite = #{record.prerequisite,jdbcType=LONGVARCHAR},
|
||||||
step_description = #{record.stepDescription,jdbcType=LONGVARCHAR},
|
step_description = #{record.stepDescription,jdbcType=LONGVARCHAR},
|
||||||
expected_result = #{record.expectedResult,jdbcType=LONGVARCHAR},
|
expected_result = #{record.expectedResult,jdbcType=LONGVARCHAR},
|
||||||
actual_result = #{record.actualResult,jdbcType=LONGVARCHAR},
|
actual_result = #{record.actualResult,jdbcType=LONGVARCHAR},
|
||||||
steps = #{record.steps,jdbcType=LONGVARCHAR}
|
steps = #{record.steps,jdbcType=LONGVARCHAR}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
|
@ -355,7 +357,6 @@
|
||||||
case_name = #{record.caseName,jdbcType=VARCHAR},
|
case_name = #{record.caseName,jdbcType=VARCHAR},
|
||||||
`system` = #{record.system,jdbcType=BIT},
|
`system` = #{record.system,jdbcType=BIT},
|
||||||
`global` = #{record.global,jdbcType=BIT},
|
`global` = #{record.global,jdbcType=BIT},
|
||||||
prerequisite = #{record.prerequisite,jdbcType=VARCHAR},
|
|
||||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||||
step_model = #{record.stepModel,jdbcType=VARCHAR},
|
step_model = #{record.stepModel,jdbcType=VARCHAR},
|
||||||
|
@ -386,9 +387,6 @@
|
||||||
<if test="global != null">
|
<if test="global != null">
|
||||||
`global` = #{global,jdbcType=BIT},
|
`global` = #{global,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
<if test="prerequisite != null">
|
|
||||||
prerequisite = #{prerequisite,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
<if test="createTime != null">
|
||||||
create_time = #{createTime,jdbcType=BIGINT},
|
create_time = #{createTime,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
@ -404,6 +402,9 @@
|
||||||
<if test="projectId != null">
|
<if test="projectId != null">
|
||||||
project_id = #{projectId,jdbcType=VARCHAR},
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="prerequisite != null">
|
||||||
|
prerequisite = #{prerequisite,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
<if test="stepDescription != null">
|
<if test="stepDescription != null">
|
||||||
step_description = #{stepDescription,jdbcType=LONGVARCHAR},
|
step_description = #{stepDescription,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -421,22 +422,22 @@
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseTemplateWithBLOBs">
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseTemplateWithBLOBs">
|
||||||
update test_case_template
|
update test_case_template
|
||||||
set `name` = #{name,jdbcType=VARCHAR},
|
set `name` = #{name,jdbcType=VARCHAR},
|
||||||
`type` = #{type,jdbcType=VARCHAR},
|
`type` = #{type,jdbcType=VARCHAR},
|
||||||
description = #{description,jdbcType=VARCHAR},
|
description = #{description,jdbcType=VARCHAR},
|
||||||
case_name = #{caseName,jdbcType=VARCHAR},
|
case_name = #{caseName,jdbcType=VARCHAR},
|
||||||
`system` = #{system,jdbcType=BIT},
|
`system` = #{system,jdbcType=BIT},
|
||||||
`global` = #{global,jdbcType=BIT},
|
`global` = #{global,jdbcType=BIT},
|
||||||
prerequisite = #{prerequisite,jdbcType=VARCHAR},
|
create_time = #{createTime,jdbcType=BIGINT},
|
||||||
create_time = #{createTime,jdbcType=BIGINT},
|
update_time = #{updateTime,jdbcType=BIGINT},
|
||||||
update_time = #{updateTime,jdbcType=BIGINT},
|
step_model = #{stepModel,jdbcType=VARCHAR},
|
||||||
step_model = #{stepModel,jdbcType=VARCHAR},
|
create_user = #{createUser,jdbcType=VARCHAR},
|
||||||
create_user = #{createUser,jdbcType=VARCHAR},
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
project_id = #{projectId,jdbcType=VARCHAR},
|
prerequisite = #{prerequisite,jdbcType=LONGVARCHAR},
|
||||||
step_description = #{stepDescription,jdbcType=LONGVARCHAR},
|
step_description = #{stepDescription,jdbcType=LONGVARCHAR},
|
||||||
expected_result = #{expectedResult,jdbcType=LONGVARCHAR},
|
expected_result = #{expectedResult,jdbcType=LONGVARCHAR},
|
||||||
actual_result = #{actualResult,jdbcType=LONGVARCHAR},
|
actual_result = #{actualResult,jdbcType=LONGVARCHAR},
|
||||||
steps = #{steps,jdbcType=LONGVARCHAR}
|
steps = #{steps,jdbcType=LONGVARCHAR}
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseTemplate">
|
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseTemplate">
|
||||||
|
@ -447,7 +448,6 @@
|
||||||
case_name = #{caseName,jdbcType=VARCHAR},
|
case_name = #{caseName,jdbcType=VARCHAR},
|
||||||
`system` = #{system,jdbcType=BIT},
|
`system` = #{system,jdbcType=BIT},
|
||||||
`global` = #{global,jdbcType=BIT},
|
`global` = #{global,jdbcType=BIT},
|
||||||
prerequisite = #{prerequisite,jdbcType=VARCHAR},
|
|
||||||
create_time = #{createTime,jdbcType=BIGINT},
|
create_time = #{createTime,jdbcType=BIGINT},
|
||||||
update_time = #{updateTime,jdbcType=BIGINT},
|
update_time = #{updateTime,jdbcType=BIGINT},
|
||||||
step_model = #{stepModel,jdbcType=VARCHAR},
|
step_model = #{stepModel,jdbcType=VARCHAR},
|
||||||
|
|
|
@ -9,16 +9,19 @@
|
||||||
|
|
||||||
<el-form :model="form" :rules="rules" label-position="right" size="small" ref="form">
|
<el-form :model="form" :rules="rules" label-position="right" size="small" ref="form">
|
||||||
<el-form-item :label="$t('custom_field.field_name')" prop="name" :label-width="labelWidth">
|
<el-form-item :label="$t('custom_field.field_name')" prop="name" :label-width="labelWidth">
|
||||||
<el-input v-if="isSystem" :disabled="isSystem" :value="$t(systemNameMap[form.name])" autocomplete="off"></el-input>
|
<el-input v-if="isSystem" :disabled="isSystem" :value="$t(systemNameMap[form.name])"
|
||||||
<el-input v-else v-model="form.name" autocomplete="off"></el-input>
|
autocomplete="off"></el-input>
|
||||||
|
<el-input v-else v-model="form.name" autocomplete="off" maxlength="64" show-word-limit></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="$t('custom_field.field_remark')" prop="remark" :label-width="labelWidth">
|
<el-form-item :label="$t('custom_field.field_remark')" prop="remark" :label-width="labelWidth">
|
||||||
<el-input :autosize="{ minRows: 2, maxRows: 4}" type="textarea" v-model="form.remark"></el-input>
|
<el-input v-model="form.remark" :autosize="{ minRows: 2, maxRows: 4}" maxlength="255" show-word-limit
|
||||||
|
type="textarea"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="$t('custom_field.scene')" prop="type" :label-width="labelWidth">
|
<el-form-item :label="$t('custom_field.scene')" prop="type" :label-width="labelWidth">
|
||||||
<el-select :disabled="isSystem || isTemplateEdit" filterable v-model="form.scene" :placeholder="$t('custom_field.scene')">
|
<el-select v-model="form.scene" :disabled="isSystem || isTemplateEdit" :placeholder="$t('custom_field.scene')"
|
||||||
|
filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in (form.scene === 'PLAN' ? planSceneOptions : sceneOptions)"
|
v-for="item in (form.scene === 'PLAN' ? planSceneOptions : sceneOptions)"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
|
@ -44,9 +47,9 @@
|
||||||
:label="$t('custom_field.field_option')"
|
:label="$t('custom_field.field_option')"
|
||||||
prop="options" :label-width="labelWidth">
|
prop="options" :label-width="labelWidth">
|
||||||
<ms-single-handle-drag
|
<ms-single-handle-drag
|
||||||
:is-kv="form.scene === 'ISSUE'"
|
:data="form.options"
|
||||||
:disable="form.name === '用例等级'"
|
:disable="form.name === '用例等级'"
|
||||||
:data="form.options"/>
|
:is-kv="form.scene === 'ISSUE'"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -88,8 +91,8 @@ export default {
|
||||||
{required: true, message: this.$t('test_track.case.input_name'), trigger: 'blur'},
|
{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'}
|
{max: 64, message: this.$t('test_track.length_less_than') + '64', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
scene: [{required: true, trigger: 'change'}],
|
scene: [{required: true, trigger: 'change'}],
|
||||||
type: [{required: true, trigger: 'change'}],
|
type: [{required: true, trigger: 'change'}],
|
||||||
},
|
},
|
||||||
visible: false,
|
visible: false,
|
||||||
url: '',
|
url: '',
|
||||||
|
@ -105,7 +108,7 @@ export default {
|
||||||
},
|
},
|
||||||
planSceneOptions() {
|
planSceneOptions() {
|
||||||
let tmp = [...CUSTOM_FIELD_SCENE_OPTION];
|
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;
|
return tmp;
|
||||||
},
|
},
|
||||||
showOptions() {
|
showOptions() {
|
||||||
|
@ -164,7 +167,7 @@ export default {
|
||||||
}
|
}
|
||||||
Object.assign(param, this.form);
|
Object.assign(param, this.form);
|
||||||
param.projectId = getCurrentProjectID();
|
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) {
|
if (param.options.length < 1) {
|
||||||
this.$warning(this.$t('custom_field.option_check'));
|
this.$warning(this.$t('custom_field.option_check'));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
<template>
|
<template>
|
||||||
<ms-table
|
<ms-table
|
||||||
v-loading="result.loading"
|
ref="table"
|
||||||
:enable-selection="false"
|
v-loading="result.loading"
|
||||||
:operators="operators"
|
:data="tableData"
|
||||||
:data="tableData"
|
:enable-selection="false"
|
||||||
:screen-height="null"
|
:operators="operators"
|
||||||
@refresh="refreshTable"
|
:screen-height="null"
|
||||||
ref="table">
|
@refresh="refreshTable">
|
||||||
|
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
:label="$t('commons.name')"
|
:label="$t('commons.name')"
|
||||||
prop="name">
|
prop="name">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<span v-if="scope.row.system">
|
<span v-if="scope.row.system">
|
||||||
{{$t(systemNameMap[scope.row.name])}}
|
{{ $t(systemNameMap[scope.row.name]) }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
{{scope.row.name}}
|
{{ scope.row.name }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
@ -27,7 +27,8 @@
|
||||||
prop="type">
|
prop="type">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<custom-filed-component class="default-value-item" :data="scope.row" prop="defaultValue"/>
|
<custom-filed-component :data="scope.row" :is-template-edit="true" class="default-value-item"
|
||||||
|
prop="defaultValue"/>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</template>
|
</template>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
@ -35,31 +36,31 @@
|
||||||
<field-custom-data-table-item :scene="scene"/>
|
<field-custom-data-table-item :scene="scene"/>
|
||||||
|
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
:label="$t('api_test.definition.document.table_coloum.is_required')"
|
:label="$t('api_test.definition.document.table_coloum.is_required')"
|
||||||
width="80"
|
prop="type"
|
||||||
prop="type">
|
width="80">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-checkbox v-model="scope.row.required"/>
|
<el-checkbox v-model="scope.row.required"/>
|
||||||
</template>
|
</template>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
:label="$t('custom_field.system_field')"
|
:label="$t('custom_field.system_field')"
|
||||||
width="80"
|
prop="system"
|
||||||
prop="system">
|
width="80">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<span v-if="scope.row.system">
|
<span v-if="scope.row.system">
|
||||||
{{$t('commons.yes')}}
|
{{ $t('commons.yes') }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
{{$t('commons.no')}}
|
{{ $t('commons.no') }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
:label="$t('commons.remark')"
|
:label="$t('commons.remark')"
|
||||||
prop="remark">
|
prop="remark">
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
</ms-table>
|
</ms-table>
|
||||||
|
@ -83,18 +84,18 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
result: {},
|
result: {},
|
||||||
operators: [
|
operators: [
|
||||||
{
|
{
|
||||||
tip: this.$t('commons.delete'), icon: "el-icon-delete", type: "danger",
|
tip: this.$t('commons.delete'), icon: "el-icon-delete", type: "danger",
|
||||||
exec: this.handleDelete,
|
exec: this.handleDelete,
|
||||||
isDisable: (row) => {
|
isDisable: (row) => {
|
||||||
if (row.name === '用例等级') {
|
if (row.name === '用例等级') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
@ -130,21 +131,21 @@ export default {
|
||||||
let condition = {};
|
let condition = {};
|
||||||
condition.ids = customFieldIds;
|
condition.ids = customFieldIds;
|
||||||
this.result = this.$post('custom/field/list',
|
this.result = this.$post('custom/field/list',
|
||||||
condition, (response) => {
|
condition, (response) => {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
if (item.id) {
|
if (item.id) {
|
||||||
this.templateContainIds.add(item.id);
|
this.templateContainIds.add(item.id);
|
||||||
}
|
}
|
||||||
item.fieldId = item.id;
|
item.fieldId = item.id;
|
||||||
item.id = null;
|
item.id = null;
|
||||||
item.options = JSON.parse(item.options);
|
item.options = JSON.parse(item.options);
|
||||||
if (item.type === 'checkbox') {
|
if (item.type === 'checkbox') {
|
||||||
item.defaultValue = [];
|
item.defaultValue = [];
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
this.tableData.push(...data);
|
||||||
});
|
});
|
||||||
this.tableData.push(...data);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -155,13 +155,16 @@ export default {
|
||||||
.el-select {
|
.el-select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-date-editor.el-input {
|
.el-date-editor.el-input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.custom-with >>> .el-input__inner{
|
|
||||||
|
.custom-with >>> .el-input__inner {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
}
|
}
|
||||||
>>> .el-input--suffix .el-input__inner{
|
|
||||||
|
>>> .el-input--suffix .el-input__inner {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -19,13 +19,15 @@
|
||||||
|
|
||||||
<el-form :model="form" :rules="rules" label-position="right" label-width="80px" size="small" ref="form">
|
<el-form :model="form" :rules="rules" label-position="right" label-width="80px" size="small" ref="form">
|
||||||
<el-form-item :label="$t('commons.name')" prop="name" :label-width="labelWidth">
|
<el-form-item :label="$t('commons.name')" prop="name" :label-width="labelWidth">
|
||||||
<el-input :disabled="isSystem" v-model="form.name" autocomplete="off"></el-input>
|
<el-input v-model="form.name" :disabled="isSystem" autocomplete="off" maxlength="64"
|
||||||
|
show-word-limit></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<slot name="base"></slot>
|
<slot name="base"></slot>
|
||||||
|
|
||||||
<el-form-item :label="$t('commons.description')" prop="description" :label-width="labelWidth">
|
<el-form-item :label="$t('commons.description')" prop="description" :label-width="labelWidth">
|
||||||
<el-input :autosize="{ minRows: 2, maxRows: 4}" type="textarea" v-model="form.description"></el-input>
|
<el-input v-model="form.description" :autosize="{ minRows: 2, maxRows: 4}" maxlength="255" show-word-limit
|
||||||
|
type="textarea"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<ms-form-divider :title="$t('custom_field.template_setting')"/>
|
<ms-form-divider :title="$t('custom_field.template_setting')"/>
|
||||||
|
@ -33,8 +35,11 @@
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
|
|
||||||
<el-form-item :label="$t('table.selected_fields')" class="filed-list" :label-width="labelWidth">
|
<el-form-item :label="$t('table.selected_fields')" class="filed-list" :label-width="labelWidth">
|
||||||
<el-button type="primary" @click="relateField">{{$t('custom_field.add_field')}}</el-button>
|
<el-button type="primary" @click="relateField">{{ $t('custom_field.add_field') }}</el-button>
|
||||||
<el-button type="primary" @click="addField" plain>{{ $t('custom_field.custom_field_setting') }}</el-button>
|
<el-button plain type="primary" @click="addField">{{
|
||||||
|
$t('custom_field.custom_field_setting')
|
||||||
|
}}
|
||||||
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label-width="labelWidth">
|
<el-form-item :label-width="labelWidth">
|
||||||
|
@ -57,7 +62,8 @@
|
||||||
:scene="scene"
|
:scene="scene"
|
||||||
ref="customFieldRelateList"/>
|
ref="customFieldRelateList"/>
|
||||||
|
|
||||||
<custom-field-edit :label-width="labelWidth" :scene="scene" @save="handleCustomFieldAdd" ref="customFieldEdit"/>
|
<custom-field-edit ref="customFieldEdit" :label-width="labelWidth" :scene="scene"
|
||||||
|
@save="handleCustomFieldAdd"/>
|
||||||
|
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</el-main>
|
</el-main>
|
||||||
|
@ -95,17 +101,17 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
visible:{
|
visible: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default() {
|
default() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scene: String,
|
scene: String,
|
||||||
url:String,
|
url: String,
|
||||||
rules: Object,
|
rules: Object,
|
||||||
labelWidth: String,
|
labelWidth: String,
|
||||||
form:{
|
form: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return {};
|
return {};
|
||||||
|
@ -211,20 +217,20 @@ export default {
|
||||||
scene: this.scene
|
scene: this.scene
|
||||||
};
|
};
|
||||||
this.result = this.$post('custom/field/default', condition, (response) => {
|
this.result = this.$post('custom/field/default', condition, (response) => {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
if (item.id) {
|
if (item.id) {
|
||||||
this.templateContainIds.add(item.id);
|
this.templateContainIds.add(item.id);
|
||||||
}
|
}
|
||||||
item.fieldId = item.id;
|
item.fieldId = item.id;
|
||||||
item.id = null;
|
item.id = null;
|
||||||
item.options = JSON.parse(item.options);
|
item.options = JSON.parse(item.options);
|
||||||
if (item.type === 'checkbox') {
|
if (item.type === 'checkbox') {
|
||||||
item.defaultValue = [];
|
item.defaultValue = [];
|
||||||
}
|
}
|
||||||
});
|
|
||||||
this.relateFields.push(...data);
|
|
||||||
});
|
});
|
||||||
|
this.relateFields.push(...data);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,8 +11,11 @@
|
||||||
ref="fieldTemplateEdit">
|
ref="fieldTemplateEdit">
|
||||||
|
|
||||||
<template v-slot:base>
|
<template v-slot:base>
|
||||||
<el-form-item :label="$t('api_test.home_page.failed_case_list.table_coloum.case_type')" prop="type" :label-width="labelWidth">
|
<el-form-item :label="$t('api_test.home_page.failed_case_list.table_coloum.case_type')" :label-width="labelWidth"
|
||||||
<el-select :disabled="isSystem" filterable v-model="form.type" :placeholder="$t('api_test.home_page.failed_case_list.table_coloum.case_type')">
|
prop="type">
|
||||||
|
<el-select v-model="form.type" :disabled="isSystem"
|
||||||
|
:placeholder="$t('api_test.home_page.failed_case_list.table_coloum.case_type')"
|
||||||
|
filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in caseTypeOption"
|
v-for="item in caseTypeOption"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
|
@ -25,16 +28,22 @@
|
||||||
|
|
||||||
<template v-slot:default>
|
<template v-slot:default>
|
||||||
<el-form-item :label="$t('test_track.case.name')" prop="caseName" :label-width="labelWidth">
|
<el-form-item :label="$t('test_track.case.name')" prop="caseName" :label-width="labelWidth">
|
||||||
<el-input v-model="form.caseName" autocomplete="off"></el-input>
|
<el-input v-model="form.caseName" autocomplete="off" maxlength="64" show-word-limit></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<form-rich-text-item :label-width="labelWidth" :title="$t('test_track.case.prerequisite')" :data="form" prop="prerequisite"/>
|
<form-rich-text-item :data="form" :label-width="labelWidth" :title="$t('test_track.case.prerequisite')"
|
||||||
|
prop="prerequisite"/>
|
||||||
|
|
||||||
<step-change-item :form="form"/>
|
<step-change-item :form="form"/>
|
||||||
<test-case-step-item :label-width="labelWidth" v-if="form.stepModel === 'STEP'" :form="form"/>
|
<test-case-step-item :label-width="labelWidth" v-if="form.stepModel === 'STEP'" :form="form"/>
|
||||||
<form-rich-text-item :label-width="labelWidth" v-if="form.stepModel === 'TEXT'" :title="$t('test_track.case.step_desc')" :data="form" prop="stepDescription"/>
|
<form-rich-text-item v-if="form.stepModel === 'TEXT'" :data="form"
|
||||||
<form-rich-text-item :label-width="labelWidth" v-if="form.stepModel === 'TEXT'" :title="$t('test_track.case.expected_results')" :data="form" prop="expectedResult"/>
|
:label-width="labelWidth" :title="$t('test_track.case.step_desc')" prop="stepDescription"/>
|
||||||
<form-rich-text-item :label-width="labelWidth" v-if="form.stepModel === 'TEXT'" :title="$t('test_track.plan_view.actual_result')" :data="form" prop="actualResult"/>
|
<form-rich-text-item v-if="form.stepModel === 'TEXT'" :data="form"
|
||||||
|
:label-width="labelWidth" :title="$t('test_track.case.expected_results')"
|
||||||
|
prop="expectedResult"/>
|
||||||
|
<form-rich-text-item v-if="form.stepModel === 'TEXT'" :data="form"
|
||||||
|
:label-width="labelWidth" :title="$t('test_track.plan_view.actual_result')"
|
||||||
|
prop="actualResult"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</field-template-edit>
|
</field-template-edit>
|
||||||
|
@ -91,7 +100,7 @@ export default {
|
||||||
{required: true, message: this.$t('test_track.case.input_name'), trigger: 'blur'},
|
{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'}
|
{max: 64, message: this.$t('test_track.length_less_than') + '64', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
type: [{required: true, trigger: 'change'}],
|
type: [{required: true, trigger: 'change'}],
|
||||||
},
|
},
|
||||||
result: {},
|
result: {},
|
||||||
url: '',
|
url: '',
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<el-row type="flex" class="head-bar">
|
<el-row type="flex" class="head-bar">
|
||||||
<el-col :span="12">
|
<el-col :span="18">
|
||||||
<span class="title">{{ template[prop] }}</span>
|
<span class="title">{{ template[prop] }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" class="head-right">
|
<el-col :span="6" class="head-right">
|
||||||
<el-button plain size="mini" @click="handleCancel">{{ $t('test_track.return') }}</el-button>
|
<el-button plain size="mini" @click="handleCancel">{{ $t('test_track.return') }}</el-button>
|
||||||
<el-button v-prevent-re-click type="primary" size="mini" @click="handleSave">{{ $t('test_track.save') }}</el-button>
|
<el-button v-prevent-re-click size="mini" type="primary" @click="handleSave">{{
|
||||||
|
$t('test_track.save')
|
||||||
|
}}
|
||||||
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue