From 245b46dc19b94fcb25477349f9a01b2aadc68d7a Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Fri, 19 Feb 2021 16:34:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=87=AA=E5=AE=9A=E4=B9=89=E8=A1=A8?= =?UTF-8?q?=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/base/domain/UserHeader.java | 17 + .../base/domain/UserHeaderExample.java | 480 ++++++++++++++++++ .../base/mapper/UserHeaderMapper.java | 30 ++ .../base/mapper/UserHeaderMapper.xml | 196 +++++++ .../automation/scenario/ApiScenarioList.vue | 211 +++++--- .../components/list/ApiCaseSimpleList.vue | 202 +++++--- .../definition/components/list/ApiList.vue | 258 ++++++---- .../components/common/head/HeaderCustom.vue | 33 +- .../components/common/model/JsonData.js | 124 ++++- .../track/case/components/TestCaseList.vue | 49 +- .../track/plan/components/TestPlanList.vue | 238 +++++---- .../comonents/api/TestPlanApiCaseList.vue | 189 ++++--- .../comonents/api/TestPlanApiScenarioList.vue | 457 ++++++++++------- .../functional/FunctionalTestCaseList.vue | 329 +++++++----- .../comonents/load/TestPlanLoadCaseList.vue | 186 ++++--- .../review/components/TestCaseReviewList.vue | 146 ++++-- .../components/TestReviewTestCaseList.vue | 216 +++++--- frontend/src/common/js/constants.js | 13 +- 18 files changed, 2399 insertions(+), 975 deletions(-) create mode 100644 backend/src/main/java/io/metersphere/base/domain/UserHeader.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/UserHeaderExample.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/UserHeaderMapper.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/UserHeaderMapper.xml diff --git a/backend/src/main/java/io/metersphere/base/domain/UserHeader.java b/backend/src/main/java/io/metersphere/base/domain/UserHeader.java new file mode 100644 index 0000000000..0f3b9521ee --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/UserHeader.java @@ -0,0 +1,17 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; +import lombok.Data; + +@Data +public class UserHeader implements Serializable { + private String id; + + private String userId; + + private String props; + + private String type; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/UserHeaderExample.java b/backend/src/main/java/io/metersphere/base/domain/UserHeaderExample.java new file mode 100644 index 0000000000..d723f5a6f1 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/UserHeaderExample.java @@ -0,0 +1,480 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class UserHeaderExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public UserHeaderExample() { + 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 andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(String value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(String value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(String value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(String value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(String value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(String value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLike(String value) { + addCriterion("user_id like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotLike(String value) { + addCriterion("user_id not like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(String value1, String value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(String value1, String value2) { + addCriterion("user_id not between", value1, value2, "userId"); + 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 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 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/UserHeaderMapper.java b/backend/src/main/java/io/metersphere/base/mapper/UserHeaderMapper.java new file mode 100644 index 0000000000..6851bfca79 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/UserHeaderMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.UserHeader; +import io.metersphere.base.domain.UserHeaderExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface UserHeaderMapper { + long countByExample(UserHeaderExample example); + + int deleteByExample(UserHeaderExample example); + + int deleteByPrimaryKey(String id); + + int insert(UserHeader record); + + int insertSelective(UserHeader record); + + List selectByExample(UserHeaderExample example); + + UserHeader selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") UserHeader record, @Param("example") UserHeaderExample example); + + int updateByExample(@Param("record") UserHeader record, @Param("example") UserHeaderExample example); + + int updateByPrimaryKeySelective(UserHeader record); + + int updateByPrimaryKey(UserHeader record); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/UserHeaderMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/UserHeaderMapper.xml new file mode 100644 index 0000000000..5cb218d6e0 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/UserHeaderMapper.xml @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + 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} + + + + + + + + + + + id, user_id, props, `type` + + + + + delete from user_header + where id = #{id,jdbcType=VARCHAR} + + + delete from user_header + + + + + + insert into user_header (id, user_id, props, + `type`) + values (#{id,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{props,jdbcType=VARCHAR}, + #{type,jdbcType=VARCHAR}) + + + insert into user_header + + + id, + + + user_id, + + + props, + + + `type`, + + + + + #{id,jdbcType=VARCHAR}, + + + #{userId,jdbcType=VARCHAR}, + + + #{props,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + + + + update user_header + + + id = #{record.id,jdbcType=VARCHAR}, + + + user_id = #{record.userId,jdbcType=VARCHAR}, + + + props = #{record.props,jdbcType=VARCHAR}, + + + `type` = #{record.type,jdbcType=VARCHAR}, + + + + + + + + update user_header + set id = #{record.id,jdbcType=VARCHAR}, + user_id = #{record.userId,jdbcType=VARCHAR}, + props = #{record.props,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR} + + + + + + update user_header + + + user_id = #{userId,jdbcType=VARCHAR}, + + + props = #{props,jdbcType=VARCHAR}, + + + `type` = #{type,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update user_header + set user_id = #{userId,jdbcType=VARCHAR}, + props = #{props,jdbcType=VARCHAR}, + `type` = #{type,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ 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 7f3f94c983..42b9d4df21 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue @@ -27,92 +27,106 @@ + + - + + + + + + + - show-overflow-tooltip> - - + + - show-overflow-tooltip> - - + + - :label="$t('test_track.case.priority')"> - - + + + - + - show-overflow-tooltip> - - + + - - - - - - - - - - - - - - - - - + + + - + - column-key="executor" - :label="$t('test_track.plan_view.executor')"> - - - - + - - - + sortable + prop="updateTime" + :label="$t('commons.update_time')" + min-width="120px" + :key="index" + show-overflow-tooltip> + + + + - + @@ -249,8 +270,15 @@ import MsTableHeader from '../../../../../common/components/MsTableHeader'; import MsTableButton from '../../../../../common/components/MsTableButton'; import NodeBreadcrumb from '../../../../common/NodeBreadcrumb'; -import {ROLE_TEST_MANAGER, ROLE_TEST_USER, TokenKey, WORKSPACE_ID} from "@/common/js/constants"; -import {checkoutTestManagerOrTestUser, hasRoles} from "@/common/js/utils"; +import { + ROLE_TEST_MANAGER, + ROLE_TEST_USER, + TEST_CASE_LIST, + TEST_PLAN_FUNCTION_TEST_CASE, + TokenKey, + WORKSPACE_ID +} from "@/common/js/constants"; +import {checkoutTestManagerOrTestUser, getCurrentUser, hasRoles} from "@/common/js/utils"; import PriorityTableItem from "../../../../common/tableItems/planview/PriorityTableItem"; import StatusTableItem from "../../../../common/tableItems/planview/StatusTableItem"; import TypeTableItem from "../../../../common/tableItems/planview/TypeTableItem"; @@ -264,11 +292,14 @@ import ClassicEditor from "@ckeditor/ckeditor5-build-classic"; import {hub} from "@/business/components/track/plan/event-bus"; import MsTag from "@/business/components/common/components/MsTag"; import {_filter, _sort} from "@/common/js/tableUtils"; +import HeaderCustom from "@/business/components/common/head/HeaderCustom"; +import {Test_Plan_Function_Test_Case} from "@/business/components/common/model/JsonData"; export default { name: "FunctionalTestCaseList", components: { + HeaderCustom, FunctionalTestCaseEdit, MsTableOperatorButton, MsTableOperator, @@ -281,6 +312,9 @@ export default { }, data() { return { + type: TEST_PLAN_FUNCTION_TEST_CASE, + headerItems: Test_Plan_Function_Test_Case, + tableLabel: Test_Plan_Function_Test_Case, result: {}, deletePath: "/test/case/delete", condition: { @@ -383,7 +417,12 @@ export default { hub.$off("openFailureTestCase"); }, methods: { + customHeader() { + this.$refs.headerCustom.open(this.tableLabel) + }, + initTableData() { + this.getLabel() if (this.planId) { // param.planId = this.planId; this.condition.planId = this.planId; @@ -428,6 +467,24 @@ export default { }); } }, + getLabel() { + let param = {} + param.userId = getCurrentUser().id; + param.type = TEST_PLAN_FUNCTION_TEST_CASE + this.result = this.$post('/system/header/info', param, response => { + if (response.data != null) { + let arry = eval(response.data.props); + let obj = {}; + for (let key in arry) { + obj[key] = arry[key]; + } + let newObj = Object.keys(obj).map(val => ({ + prop: obj[val] + })) + this.tableLabel = newObj + } + }) + }, showDetail(row, event, column) { this.isReadOnly = true; this.$refs.testPlanTestCaseEdit.openTestCaseEdit(row); @@ -596,9 +653,9 @@ export default { _sort(column, this.condition); this.initTableData(); }, - headerDragend(newWidth,oldWidth,column,event){ + headerDragend(newWidth, oldWidth, column, event) { let finalWidth = newWidth; - if(column.minWidth>finalWidth){ + if (column.minWidth > finalWidth) { finalWidth = column.minWidth; } column.width = finalWidth; diff --git a/frontend/src/business/components/track/plan/view/comonents/load/TestPlanLoadCaseList.vue b/frontend/src/business/components/track/plan/view/comonents/load/TestPlanLoadCaseList.vue index 199c8d4bb7..e6a7edda19 100644 --- a/frontend/src/business/components/track/plan/view/comonents/load/TestPlanLoadCaseList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/load/TestPlanLoadCaseList.vue @@ -3,10 +3,10 @@ @@ -23,69 +23,89 @@ - - - - - - - - - - - - - - - - - - - - + + - - - - - - - + + :label="$t('commons.operating')" + > + + @@ -169,16 +202,24 @@ import MsTableButton from "../../../../common/components/MsTableButton"; import ShowMoreBtn from "../../../case/components/ShowMoreBtn"; import BatchEdit from "../../../case/components/BatchEdit"; import MsTablePagination from '../../../../common/pagination/TablePagination'; -import {checkoutTestManagerOrTestUser, hasRoles} from "../../../../../../common/js/utils"; +import {checkoutTestManagerOrTestUser, getCurrentUser, hasRoles} from "../../../../../../common/js/utils"; import {TEST_CASE_CONFIGS} from "../../../../common/components/search/search-components"; -import {ROLE_TEST_MANAGER, ROLE_TEST_USER} from "../../../../../../common/js/constants"; +import { + ROLE_TEST_MANAGER, + ROLE_TEST_USER, + TEST_CASE_LIST, + TEST_CASE_REVIEW_CASE_LIST, TEST_PLAN_LIST +} from "../../../../../../common/js/constants"; import TestReviewTestCaseEdit from "./TestReviewTestCaseEdit"; import ReviewStatus from "@/business/components/track/case/components/ReviewStatus"; import {_filter, _sort} from "@/common/js/tableUtils"; +import HeaderCustom from "@/business/components/common/head/HeaderCustom"; +import {Test_Case_Review_Case_List, Track_Test_Case} from "@/business/components/common/model/JsonData"; export default { name: "TestReviewTestCaseList", components: { + HeaderCustom, MsTableOperatorButton, MsTableOperator, MethodTableItem, TypeTableItem, StatusTableItem, PriorityTableItem, StatusEdit, ExecutorEdit, MsTipButton, TestReviewTestCaseEdit, MsTableHeader, @@ -186,6 +227,9 @@ export default { }, data() { return { + type: TEST_CASE_REVIEW_CASE_LIST, + headerItems: Test_Case_Review_Case_List, + tableLabel: Test_Case_Review_Case_List, result: {}, condition: {}, tableData: [], @@ -261,7 +305,11 @@ export default { this.isTestManagerOrTestUser = checkoutTestManagerOrTestUser(); }, methods: { + customHeader() { + this.$refs.headerCustom.open(this.tableLabel) + }, initTableData() { + this.getLabel() if (this.reviewId) { this.condition.reviewId = this.reviewId; } @@ -275,6 +323,24 @@ export default { }); } }, + getLabel() { + let param = {} + param.userId = getCurrentUser().id; + param.type = TEST_CASE_REVIEW_CASE_LIST + this.result = this.$post('/system/header/info', param, response => { + if (response.data != null) { + let arry = eval(response.data.props); + let obj = {}; + for (let key in arry) { + obj[key] = arry[key]; + } + let newObj = Object.keys(obj).map(val => ({ + prop: obj[val] + })) + this.tableLabel = newObj + } + }) + }, showDetail(row, event, column) { this.isReadOnly = true; this.$refs.testReviewTestCaseEdit.openTestCaseEdit(row); diff --git a/frontend/src/common/js/constants.js b/frontend/src/common/js/constants.js index 8c882a657d..ef3c5f4610 100644 --- a/frontend/src/common/js/constants.js +++ b/frontend/src/common/js/constants.js @@ -1,4 +1,15 @@ -export const TEST_CASE_LIST='test_case_list' +export const TEST_CASE_LIST = 'test_case_list' +export const TEST_CASE_REVIEW_LIST = 'test_case_review_list' +export const API_LIST = 'api_list' +export const API_CASE_LIST = 'api_case_list' +export const API_SCENARIO_LIST = 'api_scenario_list' +export const TEST_CASE_REVIEW_CASE_LIST = 'test_case_review_case_list' +export const TEST_PLAN_LIST = 'test_plan_list' +export const TEST_PLAN_FUNCTION_TEST_CASE = 'test_plan_function_test_case' +export const TEST_PLAN_API_CASE = 'test_plan_api_case' +export const TEST_PLAN_LOAD_CASE = 'test_plan_load_case' +export const TEST_PLAN_SCENARIO_CASE = 'test_plan_scenario_case' + export const TokenKey = 'Admin-Token'; export const LicenseKey = 'License'; export const DEFAULT_LANGUAGE = 'default_language';