From 6c1daf4620b4511da4202ca000240bfd277a4e8e Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Thu, 25 Mar 2021 01:45:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=9D=E5=A7=8B=E5=8C=96=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E8=A1=A8=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/base/domain/SystemHeader.java | 14 + .../base/domain/SystemHeaderExample.java | 340 ++++++++++++++++++ .../base/mapper/SystemHeaderMapper.java | 31 ++ .../base/mapper/SystemHeaderMapper.xml | 169 +++++++++ .../controller/SystemParameterController.java | 10 +- .../service/SystemParameterService.java | 13 +- .../db/migration/V78__v1.8_release.sql | 49 ++- .../src/main/resources/generatorConfig.xml | 5 +- .../automation/scenario/ApiScenarioList.vue | 6 +- .../components/list/ApiCaseSimpleList.vue | 6 +- .../definition/components/list/ApiList.vue | 5 +- .../components/common/head/HeaderCustom.vue | 1 - .../components/common/model/JsonData.js | 9 +- .../track/case/components/TestCaseList.vue | 58 +-- .../track/plan/components/TestPlanList.vue | 5 +- .../comonents/api/TestPlanApiCaseList.vue | 6 +- .../comonents/api/TestPlanApiScenarioList.vue | 6 +- .../functional/FunctionalTestCaseList.vue | 7 +- .../comonents/load/TestPlanLoadCaseList.vue | 6 +- .../review/components/TestCaseReviewList.vue | 6 +- .../components/TestReviewTestCaseList.vue | 7 +- frontend/src/common/js/tableUtils.js | 9 + 22 files changed, 674 insertions(+), 94 deletions(-) create mode 100644 backend/src/main/java/io/metersphere/base/domain/SystemHeader.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/SystemHeaderExample.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/SystemHeaderMapper.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/SystemHeaderMapper.xml diff --git a/backend/src/main/java/io/metersphere/base/domain/SystemHeader.java b/backend/src/main/java/io/metersphere/base/domain/SystemHeader.java new file mode 100644 index 0000000000..4baffedc15 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/SystemHeader.java @@ -0,0 +1,14 @@ +package io.metersphere.base.domain; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class SystemHeader implements Serializable { + private String type; + + private String props; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/SystemHeaderExample.java b/backend/src/main/java/io/metersphere/base/domain/SystemHeaderExample.java new file mode 100644 index 0000000000..2b45b84d21 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/SystemHeaderExample.java @@ -0,0 +1,340 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class SystemHeaderExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SystemHeaderExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andPropsIsNull() { + addCriterion("props is null"); + return (Criteria) this; + } + + public Criteria andPropsIsNotNull() { + addCriterion("props is not null"); + return (Criteria) this; + } + + public Criteria andPropsEqualTo(String value) { + addCriterion("props =", value, "props"); + return (Criteria) this; + } + + public Criteria andPropsNotEqualTo(String value) { + addCriterion("props <>", value, "props"); + return (Criteria) this; + } + + public Criteria andPropsGreaterThan(String value) { + addCriterion("props >", value, "props"); + return (Criteria) this; + } + + public Criteria andPropsGreaterThanOrEqualTo(String value) { + addCriterion("props >=", value, "props"); + return (Criteria) this; + } + + public Criteria andPropsLessThan(String value) { + addCriterion("props <", value, "props"); + return (Criteria) this; + } + + public Criteria andPropsLessThanOrEqualTo(String value) { + addCriterion("props <=", value, "props"); + return (Criteria) this; + } + + public Criteria andPropsLike(String value) { + addCriterion("props like", value, "props"); + return (Criteria) this; + } + + public Criteria andPropsNotLike(String value) { + addCriterion("props not like", value, "props"); + return (Criteria) this; + } + + public Criteria andPropsIn(List values) { + addCriterion("props in", values, "props"); + return (Criteria) this; + } + + public Criteria andPropsNotIn(List values) { + addCriterion("props not in", values, "props"); + return (Criteria) this; + } + + public Criteria andPropsBetween(String value1, String value2) { + addCriterion("props between", value1, value2, "props"); + return (Criteria) this; + } + + public Criteria andPropsNotBetween(String value1, String value2) { + addCriterion("props not between", value1, value2, "props"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/SystemHeaderMapper.java b/backend/src/main/java/io/metersphere/base/mapper/SystemHeaderMapper.java new file mode 100644 index 0000000000..41e624010e --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/SystemHeaderMapper.java @@ -0,0 +1,31 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.SystemHeader; +import io.metersphere.base.domain.SystemHeaderExample; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface SystemHeaderMapper { + long countByExample(SystemHeaderExample example); + + int deleteByExample(SystemHeaderExample example); + + int deleteByPrimaryKey(String type); + + int insert(SystemHeader record); + + int insertSelective(SystemHeader record); + + List selectByExample(SystemHeaderExample example); + + SystemHeader selectByPrimaryKey(String type); + + int updateByExampleSelective(@Param("record") SystemHeader record, @Param("example") SystemHeaderExample example); + + int updateByExample(@Param("record") SystemHeader record, @Param("example") SystemHeaderExample example); + + int updateByPrimaryKeySelective(SystemHeader record); + + int updateByPrimaryKey(SystemHeader record); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/SystemHeaderMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/SystemHeaderMapper.xml new file mode 100644 index 0000000000..6d3b8b0bdb --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/SystemHeaderMapper.xml @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + `type`, props + + + + + delete + from system_header + where `type` = #{type,jdbcType=VARCHAR} + + + delete from system_header + + + + + + insert into system_header (`type`, props) + values (#{type,jdbcType=VARCHAR}, #{props,jdbcType=VARCHAR}) + + + insert into system_header + + + `type`, + + + props, + + + + + #{type,jdbcType=VARCHAR}, + + + #{props,jdbcType=VARCHAR}, + + + + + + update system_header + + + `type` = #{record.type,jdbcType=VARCHAR}, + + + props = #{record.props,jdbcType=VARCHAR}, + + + + + + + + update system_header + set `type` = #{record.type,jdbcType=VARCHAR}, + props = #{record.props,jdbcType=VARCHAR} + + + + + + update system_header + + + props = #{props,jdbcType=VARCHAR}, + + + where `type` = #{type,jdbcType=VARCHAR} + + + update system_header + set props = #{props,jdbcType=VARCHAR} + where `type` = #{type,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/controller/SystemParameterController.java b/backend/src/main/java/io/metersphere/controller/SystemParameterController.java index 5d6f306e53..584213c2bb 100644 --- a/backend/src/main/java/io/metersphere/controller/SystemParameterController.java +++ b/backend/src/main/java/io/metersphere/controller/SystemParameterController.java @@ -1,5 +1,6 @@ package io.metersphere.controller; +import io.metersphere.base.domain.SystemHeader; import io.metersphere.base.domain.SystemParameter; import io.metersphere.base.domain.UserHeader; import io.metersphere.commons.constants.ParamConstants; @@ -51,13 +52,18 @@ public class SystemParameterController { } @GetMapping("/base/info") - public BaseSystemConfigDTO getBaseInfo () { + public BaseSystemConfigDTO getBaseInfo() { return SystemParameterService.getBaseInfo(); } + @PostMapping("/system/header") + public SystemHeader getHeader(@RequestBody SystemHeader systemHeader) { + return SystemParameterService.getHeader(systemHeader.getType()); + } + @PostMapping("/save/base") @RequiresRoles(value = {RoleConstants.ADMIN}) - public void saveBaseInfo (@RequestBody List systemParameter) { + public void saveBaseInfo(@RequestBody List systemParameter) { SystemParameterService.saveBaseInfo(systemParameter); } diff --git a/backend/src/main/java/io/metersphere/service/SystemParameterService.java b/backend/src/main/java/io/metersphere/service/SystemParameterService.java index 853c6bdc63..a924add88c 100644 --- a/backend/src/main/java/io/metersphere/service/SystemParameterService.java +++ b/backend/src/main/java/io/metersphere/service/SystemParameterService.java @@ -1,9 +1,7 @@ package io.metersphere.service; -import io.metersphere.base.domain.SystemParameter; -import io.metersphere.base.domain.SystemParameterExample; -import io.metersphere.base.domain.UserHeader; -import io.metersphere.base.domain.UserHeaderExample; +import io.metersphere.base.domain.*; +import io.metersphere.base.mapper.SystemHeaderMapper; import io.metersphere.base.mapper.SystemParameterMapper; import io.metersphere.base.mapper.UserHeaderMapper; import io.metersphere.base.mapper.ext.ExtSystemParameterMapper; @@ -42,6 +40,8 @@ public class SystemParameterService { private SystemParameterMapper systemParameterMapper; @Resource private ExtSystemParameterMapper extSystemParameterMapper; + @Resource + private SystemHeaderMapper systemHeaderMapper; public String searchEmail() { return extSystemParameterMapper.email(); @@ -257,6 +257,11 @@ public class SystemParameterService { example.clear(); } + //默认表头 + public SystemHeader getHeader(String type) { + return systemHeaderMapper.selectByPrimaryKey(type); + } + public UserHeader queryUserHeader(HeaderRequest headerRequest) { UserHeaderExample example = new UserHeaderExample(); example.createCriteria().andUserIdEqualTo(headerRequest.getUserId()).andTypeEqualTo(headerRequest.getType()); diff --git a/backend/src/main/resources/db/migration/V78__v1.8_release.sql b/backend/src/main/resources/db/migration/V78__v1.8_release.sql index b3c505c306..f9c3663834 100644 --- a/backend/src/main/resources/db/migration/V78__v1.8_release.sql +++ b/backend/src/main/resources/db/migration/V78__v1.8_release.sql @@ -194,8 +194,55 @@ alter table test_case modify test_id varchar(2000) null; -- update history data -update test_case set review_status = 'Prepare' where review_status is null; +update test_case +set review_status = 'Prepare' +where review_status is null; -- test_case_node update name alter table test_case_node modify name varchar(100) NOT NULL COMMENT 'Node name'; +-- system_header +create table system_header +( + type varchar(150) null, + props varchar(1000) null +); +-- init system_header +insert into system_header (type, props) +values ('api_scenario_list', + '[{"id":"num","label":"ID"},{"id":"name","label":"场景名称"},{"id":"level","label":"用例等级"},{"id":"status","label":"当前状态"},{"id":"tags","label":"标签"},{"id":"userId","label":"创建人"},{"id":"updateTime","label":"最后更新时间"},{"id":"stepTotal","label":"步骤数"},{"id":"lastResult","label":"最后结果"},{"id":"passRate","label":"通过率"}]'); +insert into system_header (type, props) +values ('test_plan_function_test_case', + '[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"priority","label":"用例等级"},{"id":"type","label":"类型"},{"id":"tags","label":"标签"},{"id":"method","label":"测试方式"},{"id":"nodePath","label":"所属模块"},{"id":"projectName","label":"所属项目"},{"id":"issuesContent","label":"缺陷"},{"id":"executorName","label":"执行人"},{"id":"status","label":"执行结果"},{"id":"updateTime","label":"更新时间"},{"id":"maintainer","label":"责任人"}]'); +insert into system_header (type, props) +values ('test_case_review_case_list', + '[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"priority","label":"用例等级"},{"id":"type","label":"类型"},{"id":"method","label":"测试方式"},{"id":"nodePath","label":"所属模块"},{"id":"projectName","label":"所属项目"},{"id":"reviewerName","label":"评审人"},{"id":"reviewStatus","label":"评审状态"},{"id":"updateTime","label":"更新时间"}]'); +insert into system_header (type, props) +values ('test_plan_load_case', + '[{"id":"num","label":"ID"},{"id":"caseName","label":"名称"},{"id":"projectName","label":"所属项目"},{"id":"userName","label":"创建人"},{"id":"createTime","label":"创建时间"},{"id":"status","label":"状态"},{"id":"caseStatus","label":"执行状态"},{"id":"loadReportId","label":"查看报告"}]'); +insert into system_header (type, props) +values ('api_case_list', + '[{"id":"num","label":"ID"},{"id":"name","label":"用例名称"},{"id":"priority","label":"用例等级"},{"id":"path","label":"路径"},{"id":"tags","label":"标签"},{"id":"createUser","label":"创建人"},{"id":"updateTime","label":"最后更新时间"}]'); +insert into system_header (type, props) +values ('api_list', + '[{"id":"num","label":"ID"},{"id":"name","label":"接口名称"},{"id":"method","label":"请求类型"},{"id":"userName","label":"负责人"},{"id":"path","label":"路径"},{"id":"tags","label":"标签"},{"id":"updateTime","label":"最后更新时间"},{"id":"caseTotal","label":"用例数"},{"id":"caseStatus","label":"用例状态"},{"id":"casePassingRate","label":"用例通过率"}]'); +insert into system_header (type, props) +values ('test_case_review_list', + '[{"id":"name","label":"评审名称"},{"id":"reviewer","label":"评审人"},{"id":"projectName","label":"所属项目"},{"id":"creatorName","label":"发起人"},{"id":"status","label":"当前状态"},{"id":"createTime","label":"创建时间"},{"id":"endTime","label":"截止时间"},{"id":"tags","label":"标签"}]'); +insert into system_header (type, props) +values ('test_plan_api_case', + '[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"priority","label":"用例等级"},{"id":"path","label":"路径"},{"id":"createUser","label":"创建人"},{"id":"custom","label":"最后更新时间"},{"id":"tags","label":"标签"},{"id":"execResult","label":"执行状态"}]'); +insert into system_header (type, props) +values ('test_plan_list', + '[{"id":"name","label":"名称"},{"id":"userName","label":"负责人"},{"id":"status","label":"当前状态"},{"id":"stage","label":"测试阶段"},{"id":"testRate","label":"测试进度"},{"id":"projectName","label":"所属项目"},{"id":"plannedStartTime","label":"计划开始"},{"id":"plannedEndTime","label":"计划结束"},{"id":"actualStartTime","label":"实际开始"},{"id":"actualEndTime","label":"实际结束"},{"id":"tags","label":"标签"},{"id":"executionTimes","label":"执行次数"},{"id":"passRate","label":"通过率"}]'); +insert into system_header (type, props) +values ('test_case_list', + '[{"id":"tags","label":"标签"},{"id":"nodePath","label":"所属模块"},{"id":"updateTime","label":"更新时间"},{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"priority","label":"用例等级"},{"id":"reviewStatus","label":"评审状态"}]'); +insert into system_header (type, props) +values ('test_case_list', + '[{"id":"tags","label":"标签"},{"id":"nodePath","label":"所属模块"},{"id":"updateTime","label":"更新时间"},{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"priority","label":"用例等级"},{"id":"reviewStatus","label":"评审状态"}]'); +insert into system_header (type, props) +values ('test_plan_scenario_case', + '[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"level","label":"用例等级"},{"id":"tagNames","label":"标签"},{"id":"userId","label":"创建人"},{"id":"updateTime","label":"最后更新时间"},{"id":"stepTotal","label":"通过"},{"id":"lastResult","label":"失败"},{"id":"passRate","label":"通过率"}]'); + + diff --git a/backend/src/main/resources/generatorConfig.xml b/backend/src/main/resources/generatorConfig.xml index d3b0c38faf..25c1b1bba1 100644 --- a/backend/src/main/resources/generatorConfig.xml +++ b/backend/src/main/resources/generatorConfig.xml @@ -72,11 +72,12 @@ - + +
\ No newline at end of file diff --git a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue index f0bce8b17b..e71ae9f2fb 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue @@ -179,7 +179,7 @@ import {PROJECT_NAME} from "../../../../../common/js/constants"; import EnvironmentSelect from "../../definition/components/environment/EnvironmentSelect"; import BatchMove from "../../../track/case/components/BatchMove"; - import {_sort, getLabel} from "@/common/js/tableUtils"; + import {_sort, getLabel, getSystemLabel} from "@/common/js/tableUtils"; import {Api_Scenario_List} from "@/business/components/common/model/JsonData"; import HeaderCustom from "@/business/components/common/head/HeaderCustom"; import { @@ -249,7 +249,7 @@ result: {}, type: API_SCENARIO_LIST, headerItems: Api_Scenario_List, - tableLabel: Api_Scenario_List, + tableLabel: [], screenHeight: document.documentElement.clientHeight - 280,//屏幕高度, condition: { components: API_SCENARIO_CONFIGS @@ -343,6 +343,8 @@ this.condition.filters = {status: ["Prepare", "Underway", "Completed"]}; this.search(); this.getPrincipalOptions([]); + getSystemLabel(this, this.type) + }, watch: { selectNodeIds() { diff --git a/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue b/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue index c6fdcd47a0..24be117472 100644 --- a/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue +++ b/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue @@ -154,7 +154,7 @@ import {parseEnvironment} from "@/business/components/api/test/model/Environment import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover"; import MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar"; import {API_CASE_CONFIGS} from "@/business/components/common/components/search/search-components"; -import {_filter, _handleSelect, _handleSelectAll, _sort, getLabel,} from "@/common/js/tableUtils"; +import {_filter, _handleSelect, _handleSelectAll, _sort, getLabel, getSystemLabel,} from "@/common/js/tableUtils"; import {API_CASE_LIST} from "@/common/js/constants"; import {Api_Case_List} from "@/business/components/common/model/JsonData"; import HeaderCustom from "@/business/components/common/head/HeaderCustom"; @@ -186,7 +186,7 @@ export default { return { type: API_CASE_LIST, headerItems: Api_Case_List, - tableLabel: Api_Case_List, + tableLabel: [], condition: { components: API_CASE_CONFIGS }, @@ -260,7 +260,7 @@ export default { }, created: function () { this.initTable(); - + getSystemLabel(this, this.type) this.$nextTick(() => { this.$refs.caseTable.bodyWrapper.scrollTop = 5 }) diff --git a/frontend/src/business/components/api/definition/components/list/ApiList.vue b/frontend/src/business/components/api/definition/components/list/ApiList.vue index 3cae8525b0..1fcbb54a3e 100644 --- a/frontend/src/business/components/api/definition/components/list/ApiList.vue +++ b/frontend/src/business/components/api/definition/components/list/ApiList.vue @@ -235,7 +235,7 @@ import { _handleSelect, _handleSelectAll, buildBatchParam, getLabel, - getSelectDataCounts, initCondition, + getSelectDataCounts, getSystemLabel, initCondition, setUnSelectIds, toggleAllSelection } from "@/common/js/tableUtils"; import {_filter, _sort} from "@/common/js/tableUtils"; @@ -271,7 +271,7 @@ return { type: API_LIST, headerItems: Api_List, - tableLabel: Api_List, + tableLabel: [], condition: { components: API_DEFINITION_CONFIGS }, @@ -381,6 +381,7 @@ this.condition.filters = {status: ["Prepare", "Underway", "Completed"]}; } this.initTable(); + getSystemLabel(this, this.type) this.getMaintainerOptions(); }, watch: { diff --git a/frontend/src/business/components/common/head/HeaderCustom.vue b/frontend/src/business/components/common/head/HeaderCustom.vue index 98b3641546..99bb68f0ae 100644 --- a/frontend/src/business/components/common/head/HeaderCustom.vue +++ b/frontend/src/business/components/common/head/HeaderCustom.vue @@ -52,7 +52,6 @@ export default { this.defaultCheckedKeys.push(i.id) } ) - this.fieldSelected = items; }, saveHeader() { let param = { diff --git a/frontend/src/business/components/common/model/JsonData.js b/frontend/src/business/components/common/model/JsonData.js index 6855c63c45..57c5bc5b9a 100644 --- a/frontend/src/business/components/common/model/JsonData.js +++ b/frontend/src/business/components/common/model/JsonData.js @@ -5,17 +5,10 @@ export const Track_Test_Case = [ {id: 'num', label: i18n.t('commons.id')}, {id: 'name', label: i18n.t('commons.name')}, {id: 'priority', label: i18n.t('test_track.case.priority')}, - /* - {id: 'type', label: i18n.t('test_track.case.type')}, - */ - /* - {id: 'method', label: i18n.t('test_track.case.method')}, - */ {id: 'reviewStatus', label: i18n.t('test_track.case.status')}, {id: 'tags', label: i18n.t('commons.tag')}, {id: 'nodePath', label: i18n.t('test_track.case.module')}, {id: 'updateTime', label: i18n.t('commons.update_time')}, - {id: 'status', label: i18n.t('commons.status')} ] //用例评审-测试用例 export const Test_Case_Review = [ @@ -70,7 +63,7 @@ export const Api_Case_List = [ //接口自动化-场景列表 export const Api_Scenario_List = [ {id: 'num', label: "ID"}, - {id: 'name', label: i18n.t('test_track.case.name')}, + {id: 'name', label: i18n.t('api_report.scenario_name')}, {id: 'level', label: i18n.t('api_test.automation.case_level')}, {id: 'status', label: i18n.t('test_track.plan.plan_status')}, {id: 'tags', label: i18n.t('commons.tag')}, diff --git a/frontend/src/business/components/track/case/components/TestCaseList.vue b/frontend/src/business/components/track/case/components/TestCaseList.vue index e74a54cd16..4d2569acfb 100644 --- a/frontend/src/business/components/track/case/components/TestCaseList.vue +++ b/frontend/src/business/components/track/case/components/TestCaseList.vue @@ -48,19 +48,6 @@ show-overflow-tooltip :key="index" > - - - - - - - -