parent
34fc7e8cf6
commit
1a633fe2ca
|
@ -21,6 +21,8 @@ public class TestCaseReview implements Serializable {
|
||||||
|
|
||||||
private String projectId;
|
private String projectId;
|
||||||
|
|
||||||
|
private String tags;
|
||||||
|
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
|
@ -633,6 +633,76 @@ public class TestCaseReviewExample {
|
||||||
addCriterion("project_id not between", value1, value2, "projectId");
|
addCriterion("project_id not between", value1, value2, "projectId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Criteria andTagsIsNull() {
|
||||||
|
addCriterion("tags is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTagsIsNotNull() {
|
||||||
|
addCriterion("tags is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTagsEqualTo(String value) {
|
||||||
|
addCriterion("tags =", value, "tags");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTagsNotEqualTo(String value) {
|
||||||
|
addCriterion("tags <>", value, "tags");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTagsGreaterThan(String value) {
|
||||||
|
addCriterion("tags >", value, "tags");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTagsGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("tags >=", value, "tags");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTagsLessThan(String value) {
|
||||||
|
addCriterion("tags <", value, "tags");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTagsLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("tags <=", value, "tags");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTagsLike(String value) {
|
||||||
|
addCriterion("tags like", value, "tags");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTagsNotLike(String value) {
|
||||||
|
addCriterion("tags not like", value, "tags");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTagsIn(List<String> values) {
|
||||||
|
addCriterion("tags in", values, "tags");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTagsNotIn(List<String> values) {
|
||||||
|
addCriterion("tags not in", values, "tags");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTagsBetween(String value1, String value2) {
|
||||||
|
addCriterion("tags between", value1, value2, "tags");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTagsNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("tags not between", value1, value2, "tags");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Criteria extends GeneratedCriteria {
|
public static class Criteria extends GeneratedCriteria {
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||||
<result column="end_time" jdbcType="BIGINT" property="endTime" />
|
<result column="end_time" jdbcType="BIGINT" property="endTime" />
|
||||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||||
|
<result column="tags" jdbcType="VARCHAR" property="tags" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestCaseReview">
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestCaseReview">
|
||||||
<result column="description" jdbcType="LONGVARCHAR" property="description" />
|
<result column="description" jdbcType="LONGVARCHAR" property="description" />
|
||||||
|
@ -73,7 +74,7 @@
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, `name`, creator, `status`, create_time, update_time, end_time, project_id
|
id, `name`, creator, `status`, create_time, update_time, end_time, project_id, tags
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Blob_Column_List">
|
<sql id="Blob_Column_List">
|
||||||
description
|
description
|
||||||
|
@ -129,12 +130,12 @@
|
||||||
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseReview">
|
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseReview">
|
||||||
insert into test_case_review (id, `name`, creator,
|
insert into test_case_review (id, `name`, creator,
|
||||||
`status`, create_time, update_time,
|
`status`, create_time, update_time,
|
||||||
end_time, project_id, description
|
end_time, project_id, tags,
|
||||||
)
|
description)
|
||||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR},
|
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR},
|
||||||
#{status,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
#{status,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||||
#{endTime,jdbcType=BIGINT}, #{projectId,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR}
|
#{endTime,jdbcType=BIGINT}, #{projectId,jdbcType=VARCHAR}, #{tags,jdbcType=VARCHAR},
|
||||||
)
|
#{description,jdbcType=LONGVARCHAR})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseReview">
|
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseReview">
|
||||||
insert into test_case_review
|
insert into test_case_review
|
||||||
|
@ -163,6 +164,9 @@
|
||||||
<if test="projectId != null">
|
<if test="projectId != null">
|
||||||
project_id,
|
project_id,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="tags != null">
|
||||||
|
tags,
|
||||||
|
</if>
|
||||||
<if test="description != null">
|
<if test="description != null">
|
||||||
description,
|
description,
|
||||||
</if>
|
</if>
|
||||||
|
@ -192,6 +196,9 @@
|
||||||
<if test="projectId != null">
|
<if test="projectId != null">
|
||||||
#{projectId,jdbcType=VARCHAR},
|
#{projectId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="tags != null">
|
||||||
|
#{tags,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
<if test="description != null">
|
<if test="description != null">
|
||||||
#{description,jdbcType=LONGVARCHAR},
|
#{description,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -230,6 +237,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.tags != null">
|
||||||
|
tags = #{record.tags,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
<if test="record.description != null">
|
<if test="record.description != null">
|
||||||
description = #{record.description,jdbcType=LONGVARCHAR},
|
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -248,6 +258,7 @@
|
||||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||||
end_time = #{record.endTime,jdbcType=BIGINT},
|
end_time = #{record.endTime,jdbcType=BIGINT},
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
|
tags = #{record.tags,jdbcType=VARCHAR},
|
||||||
description = #{record.description,jdbcType=LONGVARCHAR}
|
description = #{record.description,jdbcType=LONGVARCHAR}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
@ -262,7 +273,8 @@
|
||||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||||
end_time = #{record.endTime,jdbcType=BIGINT},
|
end_time = #{record.endTime,jdbcType=BIGINT},
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR}
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
|
tags = #{record.tags,jdbcType=VARCHAR}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
|
@ -291,6 +303,9 @@
|
||||||
<if test="projectId != null">
|
<if test="projectId != null">
|
||||||
project_id = #{projectId,jdbcType=VARCHAR},
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="tags != null">
|
||||||
|
tags = #{tags,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
<if test="description != null">
|
<if test="description != null">
|
||||||
description = #{description,jdbcType=LONGVARCHAR},
|
description = #{description,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -306,6 +321,7 @@
|
||||||
update_time = #{updateTime,jdbcType=BIGINT},
|
update_time = #{updateTime,jdbcType=BIGINT},
|
||||||
end_time = #{endTime,jdbcType=BIGINT},
|
end_time = #{endTime,jdbcType=BIGINT},
|
||||||
project_id = #{projectId,jdbcType=VARCHAR},
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
|
tags = #{tags,jdbcType=VARCHAR},
|
||||||
description = #{description,jdbcType=LONGVARCHAR}
|
description = #{description,jdbcType=LONGVARCHAR}
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
|
@ -317,7 +333,8 @@
|
||||||
create_time = #{createTime,jdbcType=BIGINT},
|
create_time = #{createTime,jdbcType=BIGINT},
|
||||||
update_time = #{updateTime,jdbcType=BIGINT},
|
update_time = #{updateTime,jdbcType=BIGINT},
|
||||||
end_time = #{endTime,jdbcType=BIGINT},
|
end_time = #{endTime,jdbcType=BIGINT},
|
||||||
project_id = #{projectId,jdbcType=VARCHAR}
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
|
tags = #{tags,jdbcType=VARCHAR}
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
|
@ -4,7 +4,8 @@
|
||||||
|
|
||||||
<select id="list" resultType="io.metersphere.track.dto.TestCaseReviewDTO"
|
<select id="list" resultType="io.metersphere.track.dto.TestCaseReviewDTO"
|
||||||
parameterType="io.metersphere.track.request.testreview.QueryCaseReviewRequest">
|
parameterType="io.metersphere.track.request.testreview.QueryCaseReviewRequest">
|
||||||
select distinct test_case_review.id, test_case_review.name, test_case_review.creator, test_case_review.status,
|
select distinct test_case_review.id, test_case_review.name, test_case_review.creator, test_case_review.status,
|
||||||
|
test_case_review.tags,
|
||||||
test_case_review.create_time, test_case_review.update_time, test_case_review.end_time,
|
test_case_review.create_time, test_case_review.update_time, test_case_review.end_time,
|
||||||
test_case_review.description, user.name as creatorName, project.name as projectName, test_case_review.project_id
|
test_case_review.description, user.name as creatorName, project.name as projectName, test_case_review.project_id
|
||||||
from test_case_review
|
from test_case_review
|
||||||
|
|
|
@ -70,6 +70,7 @@
|
||||||
<!--<table tableName="test_plan_api_scenario"/>-->
|
<!--<table tableName="test_plan_api_scenario"/>-->
|
||||||
<!--<table tableName="test_plan"/>-->
|
<!--<table tableName="test_plan"/>-->
|
||||||
<!--<table tableName="api_scenario_report"/>-->
|
<!--<table tableName="api_scenario_report"/>-->
|
||||||
|
<table tableName="test_case_review"/>
|
||||||
|
|
||||||
</context>
|
</context>
|
||||||
</generatorConfiguration>
|
</generatorConfiguration>
|
|
@ -222,7 +222,7 @@ import MsBottomContainer from "../BottomContainer";
|
||||||
import ShowMoreBtn from "../../../../track/case/components/ShowMoreBtn";
|
import ShowMoreBtn from "../../../../track/case/components/ShowMoreBtn";
|
||||||
import MsBatchEdit from "../basis/BatchEdit";
|
import MsBatchEdit from "../basis/BatchEdit";
|
||||||
import {API_METHOD_COLOUR, API_STATUS, DUBBO_METHOD, REQ_METHOD, SQL_METHOD, TCP_METHOD} from "../../model/JsonData";
|
import {API_METHOD_COLOUR, API_STATUS, DUBBO_METHOD, REQ_METHOD, SQL_METHOD, TCP_METHOD} from "../../model/JsonData";
|
||||||
import {downloadFile} from "@/common/js/utils";
|
import {downloadFile, getUUID} from "@/common/js/utils";
|
||||||
import {PROJECT_NAME} from '@/common/js/constants';
|
import {PROJECT_NAME} from '@/common/js/constants';
|
||||||
import {getCurrentProjectID, getCurrentUser} from "@/common/js/utils";
|
import {getCurrentProjectID, getCurrentUser} from "@/common/js/utils";
|
||||||
import {API_LIST, TEST_CASE_LIST, WORKSPACE_ID} from '@/common/js/constants';
|
import {API_LIST, TEST_CASE_LIST, WORKSPACE_ID} from '@/common/js/constants';
|
||||||
|
@ -244,6 +244,7 @@ import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
import {Api_List, Track_Test_Case} from "@/business/components/common/model/JsonData";
|
import {Api_List, Track_Test_Case} from "@/business/components/common/model/JsonData";
|
||||||
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
|
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
|
||||||
import HeaderLabelOperate from "@/business/components/common/head/HeaderLabelOperate";
|
import HeaderLabelOperate from "@/business/components/common/head/HeaderLabelOperate";
|
||||||
|
import {Body} from "@/business/components/api/definition/model/ApiTestModel";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -533,7 +534,35 @@ export default {
|
||||||
},
|
},
|
||||||
runApi(row) {
|
runApi(row) {
|
||||||
let request = JSON.parse(row.request);
|
let request = JSON.parse(row.request);
|
||||||
|
if (row.tags instanceof Array) {
|
||||||
|
row.tags = JSON.stringify(row.tags);
|
||||||
|
}
|
||||||
|
let response = ""
|
||||||
|
if (row.response != null && row.response != 'null' && row.response != undefined) {
|
||||||
|
if (Object.prototype.toString.call(row.response).match(/\[object (\w+)\]/)[1].toLowerCase() === 'object') {
|
||||||
|
response = row.response;
|
||||||
|
} else {
|
||||||
|
response = JSON.parse(row.response);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
response = {headers: [], body: new Body(), statusCode: [], type: "HTTP"};
|
||||||
|
}
|
||||||
|
if (response.body) {
|
||||||
|
let body = new Body();
|
||||||
|
Object.assign(body, response.body);
|
||||||
|
if (!body.binary) {
|
||||||
|
body.binary = [];
|
||||||
|
}
|
||||||
|
if (!body.kvs) {
|
||||||
|
body.kvs = [];
|
||||||
|
}
|
||||||
|
if (!body.binary) {
|
||||||
|
body.binary = [];
|
||||||
|
}
|
||||||
|
response.body = body;
|
||||||
|
}
|
||||||
row.request = request
|
row.request = request
|
||||||
|
row.response = response
|
||||||
this.$emit('runTest', row);
|
this.$emit('runTest', row);
|
||||||
},
|
},
|
||||||
reductionApi(row) {
|
reductionApi(row) {
|
||||||
|
|
|
@ -201,6 +201,8 @@ export default {
|
||||||
let bodyFiles = this.getBodyUploadFiles();
|
let bodyFiles = this.getBodyUploadFiles();
|
||||||
this.api.method = this.api.request.method;
|
this.api.method = this.api.request.method;
|
||||||
this.api.path = this.api.request.path;
|
this.api.path = this.api.request.path;
|
||||||
|
console.log(this.api)
|
||||||
|
console.log(typeof (bodyFiles))
|
||||||
this.$fileUpload(url, null, bodyFiles, this.api, () => {
|
this.$fileUpload(url, null, bodyFiles, this.api, () => {
|
||||||
this.$success(this.$t('commons.save_success'));
|
this.$success(this.$t('commons.save_success'));
|
||||||
this.$emit('saveApi', this.api);
|
this.$emit('saveApi', this.api);
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
:to_data='fieldSelected'
|
:to_data='fieldSelected'
|
||||||
:defaultProps="{label:'label'}"
|
:defaultProps="{label:'label'}"
|
||||||
:mode='mode' height='540px' filter openAll/>
|
:mode='mode' height='540px' filter openAll/>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<ms-dialog-footer @cancel="close" @confirm="saveHeader"/>
|
<ms-dialog-footer @cancel="close" @confirm="saveHeader"/>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ export const Test_Case_Review = [
|
||||||
{id: 'status', label: i18n.t('test_track.review.review_status')},
|
{id: 'status', label: i18n.t('test_track.review.review_status')},
|
||||||
{id: 'createTime', label: i18n.t('commons.create_time')},
|
{id: 'createTime', label: i18n.t('commons.create_time')},
|
||||||
{id: 'endTime', label: i18n.t('test_track.review.end_time')},
|
{id: 'endTime', label: i18n.t('test_track.review.end_time')},
|
||||||
|
{id: 'tags', label: '标签'},
|
||||||
]
|
]
|
||||||
//测试计划-测试用例
|
//测试计划-测试用例
|
||||||
export const Test_Plan_List = [
|
export const Test_Plan_List = [
|
||||||
|
|
|
@ -21,6 +21,11 @@
|
||||||
<el-input v-model="form.name"/>
|
<el-input v-model="form.name"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="10" :offset="1">
|
||||||
|
<el-form-item :label="$t('commons.tag')" :label-width="formLabelWidth" prop="tag">
|
||||||
|
<ms-input-tag :currentScenario="form" ref="tag"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
|
@ -94,10 +99,11 @@
|
||||||
import TestPlanStatusButton from "../../plan/common/TestPlanStatusButton";
|
import TestPlanStatusButton from "../../plan/common/TestPlanStatusButton";
|
||||||
import {WORKSPACE_ID} from "@/common/js/constants";
|
import {WORKSPACE_ID} from "@/common/js/constants";
|
||||||
import {getCurrentProjectID, listenGoBack, removeGoBackListener} from "@/common/js/utils";
|
import {getCurrentProjectID, listenGoBack, removeGoBackListener} from "@/common/js/utils";
|
||||||
|
import MsInputTag from "@/business/components/api/automation/scenario/MsInputTag";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestCaseReviewEdit",
|
name: "TestCaseReviewEdit",
|
||||||
components: {TestPlanStatusButton},
|
components: {MsInputTag, TestPlanStatusButton},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogFormVisible: false,
|
dialogFormVisible: false,
|
||||||
|
@ -149,6 +155,10 @@ export default {
|
||||||
let param = {};
|
let param = {};
|
||||||
Object.assign(param, this.form);
|
Object.assign(param, this.form);
|
||||||
param.name = param.name.trim();
|
param.name = param.name.trim();
|
||||||
|
if (this.form.tags instanceof Array) {
|
||||||
|
this.form.tags = JSON.stringify(this.form.tags);
|
||||||
|
}
|
||||||
|
param.tags = this.form.tags;
|
||||||
if (param.name === '') {
|
if (param.name === '') {
|
||||||
this.$warning(this.$t('test_track.plan.input_plan_name'));
|
this.$warning(this.$t('test_track.plan.input_plan_name'));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -58,6 +58,13 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column v-if="item.id == 'tags'" prop="tags"
|
||||||
|
:label="$t('api_test.automation.tag')" :key="index">
|
||||||
|
<template v-slot:default="scope">
|
||||||
|
<ms-tag v-for="(itemName,index) in scope.row.tags" :key="index" type="success" effect="plain"
|
||||||
|
:content="itemName" style="margin-left: 5px"></ms-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="item.id=='createTime'"
|
v-if="item.id=='createTime'"
|
||||||
prop="createTime"
|
prop="createTime"
|
||||||
|
@ -122,10 +129,12 @@ import {Test_Case_Review} from "@/business/components/common/model/JsonData";
|
||||||
import {TEST_CASE_LIST, TEST_CASE_REVIEW_LIST} from "@/common/js/constants";
|
import {TEST_CASE_LIST, TEST_CASE_REVIEW_LIST} from "@/common/js/constants";
|
||||||
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
|
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
|
||||||
import HeaderLabelOperate from "@/business/components/common/head/HeaderLabelOperate";
|
import HeaderLabelOperate from "@/business/components/common/head/HeaderLabelOperate";
|
||||||
|
import MsTag from "@/business/components/common/components/MsTag";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestCaseReviewList",
|
name: "TestCaseReviewList",
|
||||||
components: {
|
components: {
|
||||||
|
MsTag,
|
||||||
HeaderLabelOperate,
|
HeaderLabelOperate,
|
||||||
HeaderCustom,
|
HeaderCustom,
|
||||||
MsDeleteConfirm,
|
MsDeleteConfirm,
|
||||||
|
@ -184,6 +193,11 @@ export default {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
this.total = data.itemCount;
|
this.total = data.itemCount;
|
||||||
this.tableData = data.listObject;
|
this.tableData = data.listObject;
|
||||||
|
this.tableData.forEach(item => {
|
||||||
|
if (item.tags && item.tags.length > 0) {
|
||||||
|
item.tags = JSON.parse(item.tags);
|
||||||
|
}
|
||||||
|
})
|
||||||
for (let i = 0; i < this.tableData.length; i++) {
|
for (let i = 0; i < this.tableData.length; i++) {
|
||||||
let path = "/test/case/review/project";
|
let path = "/test/case/review/project";
|
||||||
this.$post(path, {id: this.tableData[i].id}, res => {
|
this.$post(path, {id: this.tableData[i].id}, res => {
|
||||||
|
|
|
@ -1,37 +1,31 @@
|
||||||
<template>
|
<template>
|
||||||
<ms-container>
|
<div>
|
||||||
|
<ms-test-plan-header-bar>
|
||||||
|
<template v-slot:info>
|
||||||
|
<select-menu
|
||||||
|
:data="testReviews"
|
||||||
|
:current-data="currentReview"
|
||||||
|
:title="$t('test_track.review_view.review')"
|
||||||
|
@dataChange="changeReview"/>
|
||||||
|
</template>
|
||||||
|
<template v-slot:menu>
|
||||||
|
<el-menu v-if="isMenuShow" active-text-color="#6d317c"
|
||||||
|
class="el-menu-demo header-menu" mode="horizontal" @select="handleSelect">
|
||||||
|
<el-menu-item index="functional">功能测试用例</el-menu-item>
|
||||||
|
<el-menu-item index="api">接口测试用例</el-menu-item>
|
||||||
|
<el-menu-item index="load">性能测试用例</el-menu-item>
|
||||||
|
<el-menu-item index="report">报告统计</el-menu-item>
|
||||||
|
</el-menu>
|
||||||
|
</template>
|
||||||
|
</ms-test-plan-header-bar>
|
||||||
|
<test-review-function v-if="activeIndex === 'functional'" :redirectCharType="redirectCharType"
|
||||||
|
:clickType="clickType" :review-id="reviewId"></test-review-function>
|
||||||
|
<test-review-api v-if="activeIndex === 'api'" :redirectCharType="redirectCharType" :clickType="clickType"
|
||||||
|
:review-id="reviewId"></test-review-api>
|
||||||
|
<test-review-load v-if="activeIndex === 'load'" :redirectCharType="redirectCharType" :clickType="clickType"
|
||||||
|
:review-id="reviewId"></test-review-load>
|
||||||
|
</div>
|
||||||
|
|
||||||
<ms-aside-container>
|
|
||||||
<select-menu
|
|
||||||
:data="testReviews"
|
|
||||||
:current-data="currentReview"
|
|
||||||
:title="$t('test_track.review_view.review')"
|
|
||||||
@dataChange="changeReview"/>
|
|
||||||
<node-tree class="node-tree"
|
|
||||||
:all-label="$t('commons.all_label.review')"
|
|
||||||
v-loading="result.loading"
|
|
||||||
@nodeSelectEvent="nodeChange"
|
|
||||||
:tree-nodes="treeNodes"
|
|
||||||
ref="nodeTree"/>
|
|
||||||
</ms-aside-container>
|
|
||||||
|
|
||||||
<ms-main-container>
|
|
||||||
<test-review-test-case-list
|
|
||||||
class="table-list"
|
|
||||||
@openTestReviewRelevanceDialog="openTestReviewRelevanceDialog"
|
|
||||||
@refresh="refresh"
|
|
||||||
:review-id="reviewId"
|
|
||||||
:select-node-ids="selectNodeIds"
|
|
||||||
:select-parent-nodes="selectParentNodes"
|
|
||||||
ref="testPlanTestCaseList"/>
|
|
||||||
</ms-main-container>
|
|
||||||
|
|
||||||
<test-review-relevance
|
|
||||||
@refresh="refresh"
|
|
||||||
:review-id="reviewId"
|
|
||||||
ref="testReviewRelevance"/>
|
|
||||||
|
|
||||||
</ms-container>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -44,10 +38,18 @@ import NodeTree from "../../common/NodeTree";
|
||||||
import TestReviewTestCaseList from "./components/TestReviewTestCaseList";
|
import TestReviewTestCaseList from "./components/TestReviewTestCaseList";
|
||||||
import SelectMenu from "../../common/SelectMenu";
|
import SelectMenu from "../../common/SelectMenu";
|
||||||
import TestReviewRelevance from "./components/TestReviewRelevance";
|
import TestReviewRelevance from "./components/TestReviewRelevance";
|
||||||
|
import MsTestPlanHeaderBar from "@/business/components/track/plan/view/comonents/head/TestPlanHeaderBar";
|
||||||
|
import TestReviewFunction from "@/business/components/track/review/view/components/TestReviewFunction";
|
||||||
|
import TestReviewApi from "@/business/components/track/review/view/components/TestReviewApi";
|
||||||
|
import TestReviewLoad from "@/business/components/track/review/view/components/TestReviewLoad";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestCaseReviewView",
|
name: "TestCaseReviewView",
|
||||||
components: {
|
components: {
|
||||||
|
TestReviewLoad,
|
||||||
|
TestReviewApi,
|
||||||
|
TestReviewFunction,
|
||||||
|
MsTestPlanHeaderBar,
|
||||||
MsMainContainer,
|
MsMainContainer,
|
||||||
MsAsideContainer,
|
MsAsideContainer,
|
||||||
MsContainer,
|
MsContainer,
|
||||||
|
@ -63,7 +65,14 @@ export default {
|
||||||
currentReview: {},
|
currentReview: {},
|
||||||
selectNodeIds: [],
|
selectNodeIds: [],
|
||||||
selectParentNodes: [],
|
selectParentNodes: [],
|
||||||
treeNodes: []
|
treeNodes: [],
|
||||||
|
currentPlan: {},
|
||||||
|
activeIndex: "functional",
|
||||||
|
isMenuShow: true,
|
||||||
|
//报表跳转过来的参数-通过哪个图表跳转的
|
||||||
|
redirectCharType: '',
|
||||||
|
//报表跳转过来的参数-通过哪种数据跳转的
|
||||||
|
clickType: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -83,12 +92,25 @@ export default {
|
||||||
this.initData();
|
this.initData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
activated() {
|
||||||
|
this.genRedirectParam();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
refresh() {
|
handleSelect(key) {
|
||||||
this.selectNodeIds = [];
|
this.activeIndex = key;
|
||||||
this.selectParentNodes = [];
|
},
|
||||||
this.$refs.testReviewRelevance.search();
|
genRedirectParam() {
|
||||||
this.getNodeTreeByReviewId();
|
this.redirectCharType = this.$route.params.charType;
|
||||||
|
this.clickType = this.$route.params.clickType;
|
||||||
|
if (this.redirectCharType != "") {
|
||||||
|
if (this.redirectCharType == 'scenario') {
|
||||||
|
this.activeIndex = 'api';
|
||||||
|
} else if (this.redirectCharType != null && this.redirectCharType != '') {
|
||||||
|
this.activeIndex = this.redirectCharType;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.activeIndex = "functional";
|
||||||
|
}
|
||||||
},
|
},
|
||||||
initData() {
|
initData() {
|
||||||
this.getTestReviews();
|
this.getTestReviews();
|
||||||
|
@ -133,6 +155,12 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
reloadMenu() {
|
||||||
|
this.isMenuShow = false;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.isMenuShow = true;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,94 @@
|
||||||
|
<template>
|
||||||
|
<ms-test-plan-common-component>
|
||||||
|
<template v-slot:aside>
|
||||||
|
<ms-node-tree
|
||||||
|
class="node-tree"
|
||||||
|
:all-label="$t('commons.all_label.review')"
|
||||||
|
v-loading="result.loading"
|
||||||
|
@nodeSelectEvent="nodeChange"
|
||||||
|
:tree-nodes="treeNodes"
|
||||||
|
ref="nodeTree"/>
|
||||||
|
</template>
|
||||||
|
<template v-slot:main>
|
||||||
|
<test-review-test-case-list
|
||||||
|
class="table-list"
|
||||||
|
@openTestReviewRelevanceDialog="openTestReviewRelevanceDialog"
|
||||||
|
@refresh="refresh"
|
||||||
|
:review-id="reviewId"
|
||||||
|
:select-node-ids="selectNodeIds"
|
||||||
|
:select-parent-nodes="selectParentNodes"
|
||||||
|
:clickType="clickType"
|
||||||
|
ref="testPlanTestCaseList"/>
|
||||||
|
</template>
|
||||||
|
<test-review-relevance
|
||||||
|
@refresh="refresh"
|
||||||
|
:review-id="reviewId"
|
||||||
|
ref="testReviewRelevance"/>
|
||||||
|
</ms-test-plan-common-component>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import MsTestPlanCommonComponent from "@/business/components/track/plan/view/comonents/base/TestPlanCommonComponent";
|
||||||
|
import FunctionalTestCaseList from "@/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList";
|
||||||
|
import MsNodeTree from "@/business/components/track/common/NodeTree";
|
||||||
|
import TestReviewRelevance from "@/business/components/track/review/view/components/TestReviewRelevance";
|
||||||
|
import TestReviewTestCaseList from "@/business/components/track/review/view/components/TestReviewTestCaseList";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "TestReviewApi",
|
||||||
|
components: {
|
||||||
|
TestReviewTestCaseList,
|
||||||
|
TestReviewRelevance, MsNodeTree, FunctionalTestCaseList, MsTestPlanCommonComponent
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
result: {},
|
||||||
|
testReviews: [],
|
||||||
|
currentReview: {},
|
||||||
|
selectNodeIds: [],
|
||||||
|
selectParentNodes: [],
|
||||||
|
treeNodes: [],
|
||||||
|
isMenuShow: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: [
|
||||||
|
'reviewId',
|
||||||
|
'redirectCharType',
|
||||||
|
'clickType'
|
||||||
|
],
|
||||||
|
mounted() {
|
||||||
|
this.getNodeTreeByReviewId()
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
this.getNodeTreeByReviewId()
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
refresh() {
|
||||||
|
this.selectNodeIds = [];
|
||||||
|
this.selectParentNodes = [];
|
||||||
|
this.$refs.testReviewRelevance.search();
|
||||||
|
this.getNodeTreeByReviewId();
|
||||||
|
},
|
||||||
|
nodeChange(node, nodeIds, pNodes) {
|
||||||
|
this.selectNodeIds = nodeIds;
|
||||||
|
this.selectParentNodes = pNodes;
|
||||||
|
},
|
||||||
|
getNodeTreeByReviewId() {
|
||||||
|
if (this.reviewId) {
|
||||||
|
this.result = this.$get("/case/node/list/review/" + this.reviewId, response => {
|
||||||
|
this.treeNodes = response.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
openTestReviewRelevanceDialog() {
|
||||||
|
this.$refs.testReviewRelevance.openTestReviewRelevanceDialog();
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
|
@ -0,0 +1,93 @@
|
||||||
|
<template>
|
||||||
|
<ms-test-plan-common-component>
|
||||||
|
<template v-slot:aside>
|
||||||
|
<ms-node-tree
|
||||||
|
class="node-tree"
|
||||||
|
:all-label="$t('commons.all_label.review')"
|
||||||
|
v-loading="result.loading"
|
||||||
|
@nodeSelectEvent="nodeChange"
|
||||||
|
:tree-nodes="treeNodes"
|
||||||
|
ref="nodeTree"/>
|
||||||
|
</template>
|
||||||
|
<template v-slot:main>
|
||||||
|
<test-review-test-case-list
|
||||||
|
class="table-list"
|
||||||
|
@openTestReviewRelevanceDialog="openTestReviewRelevanceDialog"
|
||||||
|
@refresh="refresh"
|
||||||
|
:review-id="reviewId"
|
||||||
|
:select-node-ids="selectNodeIds"
|
||||||
|
:select-parent-nodes="selectParentNodes"
|
||||||
|
:clickType="clickType"
|
||||||
|
ref="testPlanTestCaseList"/>
|
||||||
|
</template>
|
||||||
|
<test-review-relevance
|
||||||
|
@refresh="refresh"
|
||||||
|
:review-id="reviewId"
|
||||||
|
ref="testReviewRelevance"/>
|
||||||
|
</ms-test-plan-common-component>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import MsTestPlanCommonComponent from "@/business/components/track/plan/view/comonents/base/TestPlanCommonComponent";
|
||||||
|
import FunctionalTestCaseList from "@/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList";
|
||||||
|
import MsNodeTree from "@/business/components/track/common/NodeTree";
|
||||||
|
import TestReviewRelevance from "@/business/components/track/review/view/components/TestReviewRelevance";
|
||||||
|
import TestReviewTestCaseList from "@/business/components/track/review/view/components/TestReviewTestCaseList";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "TestReviewFunction",
|
||||||
|
components: {
|
||||||
|
TestReviewTestCaseList,
|
||||||
|
TestReviewRelevance, MsNodeTree, FunctionalTestCaseList, MsTestPlanCommonComponent
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
result: {},
|
||||||
|
testReviews: [],
|
||||||
|
currentReview: {},
|
||||||
|
selectNodeIds: [],
|
||||||
|
selectParentNodes: [],
|
||||||
|
treeNodes: [],
|
||||||
|
isMenuShow: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: [
|
||||||
|
'reviewId',
|
||||||
|
'redirectCharType',
|
||||||
|
'clickType'
|
||||||
|
],
|
||||||
|
mounted() {
|
||||||
|
this.getNodeTreeByReviewId()
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
this.getNodeTreeByReviewId()
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
refresh() {
|
||||||
|
this.selectNodeIds = [];
|
||||||
|
this.selectParentNodes = [];
|
||||||
|
this.$refs.testReviewRelevance.search();
|
||||||
|
this.getNodeTreeByReviewId();
|
||||||
|
},
|
||||||
|
nodeChange(node, nodeIds, pNodes) {
|
||||||
|
this.selectNodeIds = nodeIds;
|
||||||
|
this.selectParentNodes = pNodes;
|
||||||
|
},
|
||||||
|
getNodeTreeByReviewId() {
|
||||||
|
if (this.reviewId) {
|
||||||
|
this.result = this.$get("/case/node/list/review/" + this.reviewId, response => {
|
||||||
|
this.treeNodes = response.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
openTestReviewRelevanceDialog() {
|
||||||
|
this.$refs.testReviewRelevance.openTestReviewRelevanceDialog();
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
|
@ -0,0 +1,94 @@
|
||||||
|
<template>
|
||||||
|
<ms-test-plan-common-component>
|
||||||
|
<template v-slot:aside>
|
||||||
|
<ms-node-tree
|
||||||
|
class="node-tree"
|
||||||
|
:all-label="$t('commons.all_label.review')"
|
||||||
|
v-loading="result.loading"
|
||||||
|
@nodeSelectEvent="nodeChange"
|
||||||
|
:tree-nodes="treeNodes"
|
||||||
|
ref="nodeTree"/>
|
||||||
|
</template>
|
||||||
|
<template v-slot:main>
|
||||||
|
<test-review-test-case-list
|
||||||
|
class="table-list"
|
||||||
|
@openTestReviewRelevanceDialog="openTestReviewRelevanceDialog"
|
||||||
|
@refresh="refresh"
|
||||||
|
:review-id="reviewId"
|
||||||
|
:select-node-ids="selectNodeIds"
|
||||||
|
:select-parent-nodes="selectParentNodes"
|
||||||
|
:clickType="clickType"
|
||||||
|
ref="testPlanTestCaseList"/>
|
||||||
|
</template>
|
||||||
|
<test-review-relevance
|
||||||
|
@refresh="refresh"
|
||||||
|
:review-id="reviewId"
|
||||||
|
ref="testReviewRelevance"/>
|
||||||
|
</ms-test-plan-common-component>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import MsTestPlanCommonComponent from "@/business/components/track/plan/view/comonents/base/TestPlanCommonComponent";
|
||||||
|
import FunctionalTestCaseList from "@/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList";
|
||||||
|
import MsNodeTree from "@/business/components/track/common/NodeTree";
|
||||||
|
import TestReviewRelevance from "@/business/components/track/review/view/components/TestReviewRelevance";
|
||||||
|
import TestReviewTestCaseList from "@/business/components/track/review/view/components/TestReviewTestCaseList";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "TestReviewLoad",
|
||||||
|
components: {
|
||||||
|
TestReviewTestCaseList,
|
||||||
|
TestReviewRelevance, MsNodeTree, FunctionalTestCaseList, MsTestPlanCommonComponent
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
result: {},
|
||||||
|
testReviews: [],
|
||||||
|
currentReview: {},
|
||||||
|
selectNodeIds: [],
|
||||||
|
selectParentNodes: [],
|
||||||
|
treeNodes: [],
|
||||||
|
isMenuShow: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: [
|
||||||
|
'reviewId',
|
||||||
|
'redirectCharType',
|
||||||
|
'clickType'
|
||||||
|
],
|
||||||
|
mounted() {
|
||||||
|
this.getNodeTreeByReviewId()
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
this.getNodeTreeByReviewId()
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
refresh() {
|
||||||
|
this.selectNodeIds = [];
|
||||||
|
this.selectParentNodes = [];
|
||||||
|
this.$refs.testReviewRelevance.search();
|
||||||
|
this.getNodeTreeByReviewId();
|
||||||
|
},
|
||||||
|
nodeChange(node, nodeIds, pNodes) {
|
||||||
|
this.selectNodeIds = nodeIds;
|
||||||
|
this.selectParentNodes = pNodes;
|
||||||
|
},
|
||||||
|
getNodeTreeByReviewId() {
|
||||||
|
if (this.reviewId) {
|
||||||
|
this.result = this.$get("/case/node/list/review/" + this.reviewId, response => {
|
||||||
|
this.treeNodes = response.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
openTestReviewRelevanceDialog() {
|
||||||
|
this.$refs.testReviewRelevance.openTestReviewRelevanceDialog();
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
|
@ -313,6 +313,14 @@ export default {
|
||||||
if (this.reviewId) {
|
if (this.reviewId) {
|
||||||
this.condition.reviewId = this.reviewId;
|
this.condition.reviewId = this.reviewId;
|
||||||
}
|
}
|
||||||
|
if (this.clickType) {
|
||||||
|
if (this.status == 'default') {
|
||||||
|
this.condition.status = this.clickType;
|
||||||
|
} else {
|
||||||
|
this.condition.status = null;
|
||||||
|
}
|
||||||
|
this.status = 'all';
|
||||||
|
}
|
||||||
this.condition.nodeIds = this.selectNodeIds;
|
this.condition.nodeIds = this.selectNodeIds;
|
||||||
if (this.reviewId) {
|
if (this.reviewId) {
|
||||||
this.result = this.$post(this.buildPagePath('/test/review/case/list'), this.condition, response => {
|
this.result = this.$post(this.buildPagePath('/test/review/case/list'), this.condition, response => {
|
||||||
|
|
Loading…
Reference in New Issue