Merge branch 'v1.3' of https://github.com/metersphere/metersphere into v1.3
This commit is contained in:
commit
534383b8f8
|
@ -37,5 +37,7 @@ public class TestCase implements Serializable {
|
|||
|
||||
private String otherTestName;
|
||||
|
||||
private String reviewStatus;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -1183,6 +1183,76 @@ public class TestCaseExample {
|
|||
addCriterion("other_test_name not between", value1, value2, "otherTestName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReviewStatusIsNull() {
|
||||
addCriterion("review_status is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReviewStatusIsNotNull() {
|
||||
addCriterion("review_status is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReviewStatusEqualTo(String value) {
|
||||
addCriterion("review_status =", value, "reviewStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReviewStatusNotEqualTo(String value) {
|
||||
addCriterion("review_status <>", value, "reviewStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReviewStatusGreaterThan(String value) {
|
||||
addCriterion("review_status >", value, "reviewStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReviewStatusGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("review_status >=", value, "reviewStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReviewStatusLessThan(String value) {
|
||||
addCriterion("review_status <", value, "reviewStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReviewStatusLessThanOrEqualTo(String value) {
|
||||
addCriterion("review_status <=", value, "reviewStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReviewStatusLike(String value) {
|
||||
addCriterion("review_status like", value, "reviewStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReviewStatusNotLike(String value) {
|
||||
addCriterion("review_status not like", value, "reviewStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReviewStatusIn(List<String> values) {
|
||||
addCriterion("review_status in", values, "reviewStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReviewStatusNotIn(List<String> values) {
|
||||
addCriterion("review_status not in", values, "reviewStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReviewStatusBetween(String value1, String value2) {
|
||||
addCriterion("review_status between", value1, value2, "reviewStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReviewStatusNotBetween(String value1, String value2) {
|
||||
addCriterion("review_status not between", value1, value2, "reviewStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
<result column="sort" jdbcType="INTEGER" property="sort" />
|
||||
<result column="num" jdbcType="INTEGER" property="num" />
|
||||
<result column="other_test_name" jdbcType="VARCHAR" property="otherTestName" />
|
||||
<result column="review_status" jdbcType="VARCHAR" property="reviewStatus" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestCaseWithBLOBs">
|
||||
<result column="remark" jdbcType="LONGVARCHAR" property="remark" />
|
||||
|
@ -83,7 +84,7 @@
|
|||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, node_id, node_path, project_id, `name`, `type`, maintainer, priority, `method`,
|
||||
prerequisite, create_time, update_time, test_id, sort, num, other_test_name
|
||||
prerequisite, create_time, update_time, test_id, sort, num, other_test_name, review_status
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
remark, steps
|
||||
|
@ -142,15 +143,15 @@
|
|||
maintainer, priority, `method`,
|
||||
prerequisite, create_time, update_time,
|
||||
test_id, sort, num,
|
||||
other_test_name, remark, steps
|
||||
)
|
||||
other_test_name, review_status, remark,
|
||||
steps)
|
||||
values (#{id,jdbcType=VARCHAR}, #{nodeId,jdbcType=VARCHAR}, #{nodePath,jdbcType=VARCHAR},
|
||||
#{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||
#{maintainer,jdbcType=VARCHAR}, #{priority,jdbcType=VARCHAR}, #{method,jdbcType=VARCHAR},
|
||||
#{prerequisite,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{testId,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{num,jdbcType=INTEGER},
|
||||
#{otherTestName,jdbcType=VARCHAR}, #{remark,jdbcType=LONGVARCHAR}, #{steps,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
#{otherTestName,jdbcType=VARCHAR}, #{reviewStatus,jdbcType=VARCHAR}, #{remark,jdbcType=LONGVARCHAR},
|
||||
#{steps,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseWithBLOBs">
|
||||
insert into test_case
|
||||
|
@ -203,6 +204,9 @@
|
|||
<if test="otherTestName != null">
|
||||
other_test_name,
|
||||
</if>
|
||||
<if test="reviewStatus != null">
|
||||
review_status,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
|
@ -259,6 +263,9 @@
|
|||
<if test="otherTestName != null">
|
||||
#{otherTestName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="reviewStatus != null">
|
||||
#{reviewStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -324,6 +331,9 @@
|
|||
<if test="record.otherTestName != null">
|
||||
other_test_name = #{record.otherTestName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.reviewStatus != null">
|
||||
review_status = #{record.reviewStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.remark != null">
|
||||
remark = #{record.remark,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -353,6 +363,7 @@
|
|||
sort = #{record.sort,jdbcType=INTEGER},
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
other_test_name = #{record.otherTestName,jdbcType=VARCHAR},
|
||||
review_status = #{record.reviewStatus,jdbcType=VARCHAR},
|
||||
remark = #{record.remark,jdbcType=LONGVARCHAR},
|
||||
steps = #{record.steps,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
|
@ -376,7 +387,8 @@
|
|||
test_id = #{record.testId,jdbcType=VARCHAR},
|
||||
sort = #{record.sort,jdbcType=INTEGER},
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
other_test_name = #{record.otherTestName,jdbcType=VARCHAR}
|
||||
other_test_name = #{record.otherTestName,jdbcType=VARCHAR},
|
||||
review_status = #{record.reviewStatus,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -429,6 +441,9 @@
|
|||
<if test="otherTestName != null">
|
||||
other_test_name = #{otherTestName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="reviewStatus != null">
|
||||
review_status = #{reviewStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -455,6 +470,7 @@
|
|||
sort = #{sort,jdbcType=INTEGER},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
other_test_name = #{otherTestName,jdbcType=VARCHAR},
|
||||
review_status = #{reviewStatus,jdbcType=VARCHAR},
|
||||
remark = #{remark,jdbcType=LONGVARCHAR},
|
||||
steps = #{steps,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
|
@ -475,7 +491,8 @@
|
|||
test_id = #{testId,jdbcType=VARCHAR},
|
||||
sort = #{sort,jdbcType=INTEGER},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
other_test_name = #{otherTestName,jdbcType=VARCHAR}
|
||||
other_test_name = #{otherTestName,jdbcType=VARCHAR},
|
||||
review_status = #{reviewStatus,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -99,7 +99,7 @@
|
|||
|
||||
|
||||
<select id="getTestCaseNames" resultType="io.metersphere.base.domain.TestCase">
|
||||
select test_case.id, test_case.name, test_case.priority, test_case.type
|
||||
select test_case.id, test_case.name, test_case.priority, test_case.type, test_case.review_status
|
||||
from test_case
|
||||
<where>
|
||||
<if test="request.combine != null">
|
||||
|
@ -130,6 +130,12 @@
|
|||
#{value}
|
||||
</foreach>
|
||||
</when>
|
||||
<when test="key=='status'">
|
||||
and test_case.review_status in
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
and test_case.type in
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
|
@ -181,6 +187,12 @@
|
|||
#{value}
|
||||
</foreach>
|
||||
</when>
|
||||
<when test="key=='status'">
|
||||
and test_case.review_status in
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
and test_case.method in
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
|
|
|
@ -10,6 +10,6 @@ import java.util.List;
|
|||
public interface ExtTestReviewCaseMapper {
|
||||
|
||||
List<TestReviewCaseDTO> list(@Param("request") QueryCaseReviewRequest request);
|
||||
List<String> getStatusByReviewId(String planId);
|
||||
List<String> getStatusByReviewId(String reviewId);
|
||||
List<String> findRelateTestReviewId(String userId, String workspaceId);
|
||||
}
|
||||
|
|
|
@ -182,9 +182,9 @@
|
|||
</select>
|
||||
|
||||
<select id="getStatusByReviewId" resultType="java.lang.String">
|
||||
select status
|
||||
from test_case_review_test_case
|
||||
where review_id = #{reviewId}
|
||||
select review_status
|
||||
from test_case
|
||||
where id in (select case_id from test_case_review_test_case where review_id = #{reviewId});
|
||||
</select>
|
||||
|
||||
<select id="findRelateTestReviewId" resultType="java.lang.String">
|
||||
|
|
|
@ -9,7 +9,7 @@ import lombok.Setter;
|
|||
public class TestReviewCaseDTO extends TestCaseWithBLOBs {
|
||||
private String reviewer;
|
||||
private String reviewerName;
|
||||
private String status;
|
||||
private String reviewStatus;
|
||||
private String results;
|
||||
private String reviewId;
|
||||
private String caseId;
|
||||
|
|
|
@ -9,4 +9,5 @@ public class TestReviewDTOWithMetric extends TestCaseReviewDTO {
|
|||
private Double testRate;
|
||||
private Integer reviewed;
|
||||
private Integer total;
|
||||
private Integer pass;
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import io.metersphere.base.mapper.ext.ExtProjectMapper;
|
|||
import io.metersphere.base.mapper.ext.ExtTestCaseReviewMapper;
|
||||
import io.metersphere.base.mapper.ext.ExtTestReviewCaseMapper;
|
||||
import io.metersphere.commons.constants.TestCaseReviewStatus;
|
||||
import io.metersphere.commons.constants.TestPlanStatus;
|
||||
import io.metersphere.commons.constants.TestPlanTestCaseStatus;
|
||||
import io.metersphere.commons.constants.TestReviewCaseStatus;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.user.SessionUser;
|
||||
import io.metersphere.commons.utils.LogUtil;
|
||||
|
@ -32,7 +32,6 @@ import org.apache.ibatis.session.SqlSessionFactory;
|
|||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
@ -346,13 +345,13 @@ public class TestCaseReviewService {
|
|||
testCaseReview.setId(reviewId);
|
||||
|
||||
for (String status : statusList) {
|
||||
if (StringUtils.equals(status, TestPlanTestCaseStatus.Prepare.name())) {
|
||||
testCaseReview.setStatus(TestPlanStatus.Underway.name());
|
||||
if (StringUtils.equals(status, TestReviewCaseStatus.Prepare.name())) {
|
||||
testCaseReview.setStatus(TestCaseReviewStatus.Underway.name());
|
||||
testCaseReviewMapper.updateByPrimaryKeySelective(testCaseReview);
|
||||
return;
|
||||
}
|
||||
}
|
||||
testCaseReview.setStatus(TestPlanStatus.Completed.name());
|
||||
testCaseReview.setStatus(TestCaseReviewStatus.Completed.name());
|
||||
SaveTestCaseReviewRequest testCaseReviewRequest = new SaveTestCaseReviewRequest();
|
||||
TestCaseReview _testCaseReview = testCaseReviewMapper.selectByPrimaryKey(reviewId);
|
||||
List<String> userIds = new ArrayList<>();
|
||||
|
@ -411,16 +410,19 @@ public class TestCaseReviewService {
|
|||
|
||||
testReview.setReviewed(0);
|
||||
testReview.setTotal(0);
|
||||
testReview.setPass(0);
|
||||
if (testCases != null) {
|
||||
testReview.setTotal(testCases.size());
|
||||
testCases.forEach(testCase -> {
|
||||
if (!StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Prepare.name())
|
||||
&& !StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Underway.name())) {
|
||||
if (!StringUtils.equals(testCase.getReviewStatus(), TestReviewCaseStatus.Prepare.name())) {
|
||||
testReview.setReviewed(testReview.getReviewed() + 1);
|
||||
}
|
||||
if (StringUtils.equals(testCase.getReviewStatus(), TestReviewCaseStatus.Pass.name())) {
|
||||
testReview.setPass(testReview.getPass() + 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
testReview.setTestRate(MathUtils.getPercentWithDecimal(testReview.getTotal() == 0 ? 0 : testReview.getReviewed() * 1.0 / testReview.getTotal()));
|
||||
|
||||
});
|
||||
}
|
||||
return testReviews;
|
||||
|
|
|
@ -10,6 +10,7 @@ import io.metersphere.base.mapper.*;
|
|||
import io.metersphere.base.mapper.ext.ExtTestCaseMapper;
|
||||
import io.metersphere.commons.constants.RoleConstants;
|
||||
import io.metersphere.commons.constants.TestCaseConstants;
|
||||
import io.metersphere.commons.constants.TestCaseReviewStatus;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.user.SessionUser;
|
||||
import io.metersphere.commons.utils.BeanUtils;
|
||||
|
@ -88,6 +89,7 @@ public class TestCaseService {
|
|||
testCase.setCreateTime(System.currentTimeMillis());
|
||||
testCase.setUpdateTime(System.currentTimeMillis());
|
||||
testCase.setNum(getNextNum(testCase.getProjectId()));
|
||||
testCase.setReviewStatus(TestCaseReviewStatus.Prepare.name());
|
||||
testCaseMapper.insert(testCase);
|
||||
}
|
||||
|
||||
|
@ -347,6 +349,7 @@ public class TestCaseService {
|
|||
testcase.setNodeId(nodePathMap.get(testcase.getNodePath()));
|
||||
testcase.setSort(sort.getAndIncrement());
|
||||
testcase.setNum(num.decrementAndGet());
|
||||
testcase.setReviewStatus(TestCaseReviewStatus.Prepare.name());
|
||||
mapper.insert(testcase);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package io.metersphere.track.service;
|
||||
|
||||
import io.metersphere.base.domain.*;
|
||||
import io.metersphere.base.mapper.TestCaseMapper;
|
||||
import io.metersphere.base.mapper.TestCaseReviewMapper;
|
||||
import io.metersphere.base.mapper.TestCaseReviewTestCaseMapper;
|
||||
import io.metersphere.base.mapper.TestCaseReviewUsersMapper;
|
||||
|
@ -38,6 +39,8 @@ public class TestReviewTestCaseService {
|
|||
TestCaseReviewMapper testCaseReviewMapper;
|
||||
@Resource
|
||||
TestCaseReviewService testCaseReviewService;
|
||||
@Resource
|
||||
TestCaseMapper testCaseMapper;
|
||||
|
||||
public List<TestReviewCaseDTO> list(QueryCaseReviewRequest request) {
|
||||
request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders()));
|
||||
|
@ -111,9 +114,17 @@ public class TestReviewTestCaseService {
|
|||
MSException.throwException("此用例评审已到截止时间!");
|
||||
}
|
||||
|
||||
// 记录测试用例评审状态变更
|
||||
testCaseReviewTestCase.setStatus(testCaseReviewTestCase.getStatus());
|
||||
testCaseReviewTestCase.setReviewer(SessionUtils.getUser().getId());
|
||||
testCaseReviewTestCase.setUpdateTime(System.currentTimeMillis());
|
||||
testCaseReviewTestCaseMapper.updateByPrimaryKeySelective(testCaseReviewTestCase);
|
||||
|
||||
// 修改用例评审状态
|
||||
String caseId = testCaseReviewTestCase.getCaseId();
|
||||
TestCaseWithBLOBs testCase = new TestCaseWithBLOBs();
|
||||
testCase.setId(caseId);
|
||||
testCase.setReviewStatus(testCaseReviewTestCase.getStatus());
|
||||
testCaseMapper.updateByPrimaryKeySelective(testCase);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
alter table test_case add review_status varchar(25) null;
|
||||
|
||||
update test_case set review_status = 'Prepare' where review_status is null;
|
|
@ -32,7 +32,8 @@
|
|||
"js-base64": "^3.4.4",
|
||||
"json-bigint": "^1.0.0",
|
||||
"html2canvas": "^1.0.0-rc.7",
|
||||
"jspdf": "^2.1.1"
|
||||
"jspdf": "^2.1.1",
|
||||
"yan-progress": "^1.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "^4.1.0",
|
||||
|
|
|
@ -86,6 +86,18 @@
|
|||
<method-table-item :value="scope.row.method"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
:filters="statusFilters"
|
||||
column-key="status"
|
||||
:label="$t('test_track.case.status')">
|
||||
<template v-slot:default="scope">
|
||||
<span class="el-dropdown-link">
|
||||
<status-table-item :value="scope.row.reviewStatus"/>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="nodePath"
|
||||
:label="$t('test_track.case.module')"
|
||||
|
@ -146,6 +158,7 @@
|
|||
import BatchEdit from "./BatchEdit";
|
||||
import {WORKSPACE_ID} from "../../../../../common/js/constants";
|
||||
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
|
||||
import StatusTableItem from "@/business/components/track/common/tableItems/planview/StatusTableItem";
|
||||
|
||||
export default {
|
||||
name: "TestCaseList",
|
||||
|
@ -163,7 +176,8 @@
|
|||
NodeBreadcrumb,
|
||||
MsTableHeader,
|
||||
ShowMoreBtn,
|
||||
BatchEdit
|
||||
BatchEdit,
|
||||
StatusTableItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -192,6 +206,11 @@
|
|||
{text: this.$t('commons.performance'), value: 'performance'},
|
||||
{text: this.$t('commons.api'), value: 'api'}
|
||||
],
|
||||
statusFilters: [
|
||||
{text: this.$t('test_track.plan.plan_status_prepare'), value: 'Prepare'},
|
||||
{text: this.$t('test_track.plan_view.pass'), value: 'Pass'},
|
||||
{text: '未通过', value: 'UnPass'},
|
||||
],
|
||||
showMore: false,
|
||||
buttons: [
|
||||
{
|
||||
|
|
|
@ -36,31 +36,37 @@
|
|||
|
||||
<el-table-column
|
||||
prop="status"
|
||||
:label="$t('test_track.plan.plan_status')"
|
||||
show-overflow-tooltip>
|
||||
:label="$t('test_track.plan.plan_status')">
|
||||
<template v-slot:default="scope">
|
||||
<plan-status-table-item :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="projectName"
|
||||
:label="$t('test_track.review.done')"
|
||||
show-overflow-tooltip>
|
||||
:label="$t('test_track.review.result_distribution')">
|
||||
<template v-slot:default="scope">
|
||||
{{scope.row.reviewed}}/{{scope.row.total}}
|
||||
<yan-progress :total="scope.row.total" :done="scope.row.reviewed" :modify="scope.row.pass" :tip="tip"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="projectName"
|
||||
:label="$t('test_track.home.review_progress')"
|
||||
min-width="100"
|
||||
show-overflow-tooltip>
|
||||
<template v-slot:default="scope">
|
||||
<el-progress :percentage="scope.row.testRate"></el-progress>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="projectName"-->
|
||||
<!-- :label="$t('test_track.review.done')"-->
|
||||
<!-- show-overflow-tooltip>-->
|
||||
<!-- <template v-slot:default="scope">-->
|
||||
<!-- {{scope.row.reviewed}}/{{scope.row.total}}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="projectName"-->
|
||||
<!-- :label="$t('test_track.home.review_progress')"-->
|
||||
<!-- min-width="100"-->
|
||||
<!-- show-overflow-tooltip>-->
|
||||
<!-- <template v-slot:default="scope">-->
|
||||
<!-- <el-progress :percentage="scope.row.testRate"></el-progress>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column
|
||||
prop="projectName"
|
||||
|
@ -87,7 +93,12 @@ export default {
|
|||
return {
|
||||
result: {},
|
||||
tableData: [],
|
||||
showMyCreator: false
|
||||
showMyCreator: false,
|
||||
tip: [
|
||||
{text: "总共X个", fillStyle: '#D3D3D3'},
|
||||
{text: "评审了X个", fillStyle: '#F08080'},
|
||||
{text: "通过X个", fillStyle: '#90EE90'}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -115,7 +126,7 @@ export default {
|
|||
},
|
||||
searchMyCreator() {
|
||||
this.showMyCreator = !this.showMyCreator;
|
||||
if (this.showMyCreator){
|
||||
if (this.showMyCreator) {
|
||||
this.initTableData("creator");
|
||||
} else {
|
||||
this.initTableData("reviewer");
|
||||
|
|
|
@ -62,6 +62,15 @@
|
|||
<type-table-item :value="scope.row.type"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:filters="statusFilters"
|
||||
column-key="status"
|
||||
:label="$t('test_track.case.status')"
|
||||
show-overflow-tooltip>
|
||||
<template v-slot:default="scope">
|
||||
<status-table-item :value="scope.row.reviewStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align: center">共 {{testReviews.length}} 条</div>
|
||||
</el-main>
|
||||
|
@ -91,6 +100,7 @@ import MsTableHeader from "../../../../common/components/MsTableHeader";
|
|||
import SwitchProject from "../../../case/components/SwitchProject";
|
||||
import {TEST_CASE_CONFIGS} from "../../../../common/components/search/search-components";
|
||||
import {_filter} from "../../../../../../common/js/utils";
|
||||
import StatusTableItem from "@/business/components/track/common/tableItems/planview/StatusTableItem";
|
||||
|
||||
export default {
|
||||
name: "TestReviewRelevance",
|
||||
|
@ -102,7 +112,8 @@ export default {
|
|||
MsTableSearchBar,
|
||||
MsTableAdvSearchBar,
|
||||
MsTableHeader,
|
||||
SwitchProject
|
||||
SwitchProject,
|
||||
StatusTableItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -130,7 +141,12 @@ export default {
|
|||
{text: this.$t('commons.functional'), value: 'functional'},
|
||||
{text: this.$t('commons.performance'), value: 'performance'},
|
||||
{text: this.$t('commons.api'), value: 'api'}
|
||||
]
|
||||
],
|
||||
statusFilters: [
|
||||
{text: this.$t('test_track.case.status_prepare'), value: 'Prepare'},
|
||||
{text: this.$t('test_track.case.status_pass'), value: 'Pass'},
|
||||
{text: this.$t('test_track.case.status_un_pass'), value: 'UnPass'},
|
||||
],
|
||||
};
|
||||
},
|
||||
props: {
|
||||
|
|
|
@ -283,6 +283,7 @@ export default {
|
|||
saveCase(status) {
|
||||
let param = {};
|
||||
param.id = this.testCase.id;
|
||||
param.caseId = this.testCase.caseId;
|
||||
param.reviewId = this.testCase.reviewId;
|
||||
param.status = status;
|
||||
this.$post('/test/review/case/edit', param, () => {
|
||||
|
|
|
@ -104,13 +104,12 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="status"
|
||||
:filters="statusFilters"
|
||||
column-key="status"
|
||||
:label="$t('test_track.review_view.execute_result')">
|
||||
<template v-slot:default="scope">
|
||||
<span class="el-dropdown-link">
|
||||
<status-table-item :value="scope.row.status"/>
|
||||
<status-table-item :value="scope.row.reviewStatus"/>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -207,9 +206,9 @@ export default {
|
|||
{text: this.$t('commons.api'), value: 'api'}
|
||||
],
|
||||
statusFilters: [
|
||||
{text: this.$t('test_track.plan.plan_status_prepare'), value: 'Prepare'},
|
||||
{text: this.$t('test_track.plan_view.pass'), value: 'Pass'},
|
||||
{text: '未通过', value: 'UnPass'},
|
||||
{text: this.$t('test_track.case.status_prepare'), value: 'Prepare'},
|
||||
{text: this.$t('test_track.case.status_pass'), value: 'Pass'},
|
||||
{text: this.$t('test_track.case.status_un_pass'), value: 'UnPass'},
|
||||
],
|
||||
showMore: false,
|
||||
buttons: [
|
||||
|
|
|
@ -7,6 +7,7 @@ import ajax from "../common/js/ajax";
|
|||
import App from './App.vue';
|
||||
import message from "../common/js/message";
|
||||
import router from "./components/common/router/router";
|
||||
import YanProgress from 'yan-progress';
|
||||
import './permission' // permission control
|
||||
import i18n from "../i18n/i18n";
|
||||
import store from "./store";
|
||||
|
@ -28,6 +29,7 @@ Vue.use(chart);
|
|||
Vue.use(CalendarHeatmap);
|
||||
Vue.use(message);
|
||||
Vue.use(CKEditor);
|
||||
Vue.use(YanProgress)
|
||||
|
||||
// v-permission
|
||||
Vue.directive('permission', permission);
|
||||
|
|
|
@ -695,6 +695,10 @@ export default {
|
|||
batch_delete_case: 'Batch delete',
|
||||
batch_unlink: 'Batch Unlink',
|
||||
project_name: "Project",
|
||||
status: 'Status',
|
||||
status_prepare: 'Prepare',
|
||||
status_pass: 'Pass',
|
||||
status_un_pass: 'UnPass',
|
||||
import: {
|
||||
import: "Import test case",
|
||||
case_import: "Import test case",
|
||||
|
@ -769,7 +773,8 @@ export default {
|
|||
my_create: "My Create",
|
||||
reviewed_by_me: "Review By Me",
|
||||
creator: "Creator",
|
||||
done: "Commented use cases"
|
||||
done: "Commented use cases",
|
||||
result_distribution: "Result Distribution"
|
||||
},
|
||||
comment: {
|
||||
no_comment: "No Comment",
|
||||
|
|
|
@ -697,6 +697,10 @@ export default {
|
|||
batch_delete_case: '批量删除用例',
|
||||
batch_unlink: '批量取消关联',
|
||||
project_name: '所属项目',
|
||||
status: '状态',
|
||||
status_prepare: '未开始',
|
||||
status_pass: '通过',
|
||||
status_un_pass: '未通过',
|
||||
import: {
|
||||
import: "导入用例",
|
||||
case_import: "导入测试用例",
|
||||
|
@ -771,7 +775,8 @@ export default {
|
|||
my_create: "我创建的评审",
|
||||
reviewed_by_me: "待我评审",
|
||||
creator: "创建人",
|
||||
done: "已评用例"
|
||||
done: "已评用例",
|
||||
result_distribution: "结果分布"
|
||||
},
|
||||
comment: {
|
||||
no_comment: "暂无评论",
|
||||
|
@ -785,7 +790,7 @@ export default {
|
|||
all_case: "全部用例",
|
||||
start_review: "开始评审",
|
||||
relevance_case: "关联用例",
|
||||
execute_result: "执行结果",
|
||||
execute_result: "评审结果",
|
||||
},
|
||||
module: {
|
||||
search: "搜索模块",
|
||||
|
|
|
@ -697,6 +697,10 @@ export default {
|
|||
batch_delete_case: '批量刪除用例',
|
||||
batch_unlink: '批量取消關聯',
|
||||
project_name: '所屬項目',
|
||||
status: '狀態',
|
||||
status_prepare: '未開始',
|
||||
status_pass: '通過',
|
||||
status_un_pass: '未通過',
|
||||
import: {
|
||||
import: "導入用例",
|
||||
case_import: "導入測試用例",
|
||||
|
@ -771,7 +775,8 @@ export default {
|
|||
my_create: "我創建的評審",
|
||||
reviewed_by_me: "待我評審",
|
||||
creator: "創建人",
|
||||
done: "已評用例"
|
||||
done: "已評用例",
|
||||
result_distribution: "結果分佈"
|
||||
},
|
||||
comment: {
|
||||
no_comment: "暫無評論",
|
||||
|
@ -785,7 +790,7 @@ export default {
|
|||
all_case: "全部用例",
|
||||
start_review: "開始評審",
|
||||
relevance_case: "關聯用例",
|
||||
execute_result: "執行結果",
|
||||
execute_result: "評審結果",
|
||||
},
|
||||
module: {
|
||||
search: "搜索模塊",
|
||||
|
|
Loading…
Reference in New Issue