feat(测试跟踪): 用例评审添加标签列
--story=1011310 --user=宋昌昌 用例评审列表增加标签列 https://www.tapd.cn/55049933/s/1360101
This commit is contained in:
parent
a7deee7f12
commit
374c85f159
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<span class="adv-search-bar">
|
||||
<el-button size="mini" @click="open" ref="filter-btn">
|
||||
<el-button size="mini" @click="open" ref="filter-btn" :class="conditionNum === 0 ? '' : 'btn-active'">
|
||||
<svg-icon :icon-class="conditionNum === 0 ? 'icon-filter' : 'icon-filter-active'"/>
|
||||
<span class="condition-num">{{conditionNum === 0 ? "" : "(" + conditionNum + ")" }}</span>
|
||||
</el-button>
|
||||
|
@ -409,7 +409,7 @@ export default {
|
|||
|
||||
span.condition-num {
|
||||
width: 18px;
|
||||
height: 22px;
|
||||
height: 10px;
|
||||
font-family: 'PingFang SC';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
|
@ -428,7 +428,7 @@ span.condition-num {
|
|||
letter-spacing: -0.1px;
|
||||
color: #783887;
|
||||
position: relative;
|
||||
top: -19px;
|
||||
top: -25px;
|
||||
left: 12px;
|
||||
}
|
||||
|
||||
|
@ -512,4 +512,8 @@ span.condition-num {
|
|||
height: 32px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.btn-active {
|
||||
border: 1px solid #783887!important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -144,8 +144,7 @@
|
|||
test_case.type, test_case.node_path, test_case.num,
|
||||
test_case.custom_num, test_case_review_test_case.status review_status,
|
||||
test_case.remark as remark, test_case.maintainer, test_case.steps as steps, test_case.node_id as nodeId,
|
||||
test_case.project_id,
|
||||
test_case_node.name as model, test_case.version_id
|
||||
test_case.project_id, test_case_node.name as model, test_case.version_id, test_case.tags
|
||||
from test_case_review_test_case
|
||||
inner join test_case on test_case_review_test_case.case_id = test_case.id
|
||||
left join test_case_node on test_case_node.id=test_case.node_id
|
||||
|
|
|
@ -92,6 +92,31 @@
|
|||
</template>
|
||||
</ms-table-column>
|
||||
|
||||
<ms-table-column
|
||||
prop="tags"
|
||||
:field="item"
|
||||
:fields-width="fieldsWidth"
|
||||
min-width="180"
|
||||
:show-overflow-tooltip="false"
|
||||
:label="$t('commons.tag')">
|
||||
<template v-slot:default="scope">
|
||||
<el-tooltip class="item" effect="dark" placement="top">
|
||||
<div v-html="getTagToolTips(scope.row.tags)" slot="content"></div>
|
||||
<div class="oneLine">
|
||||
<ms-single-tag
|
||||
v-for="(itemName, index) in parseColumnTag(scope.row.tags)"
|
||||
:key="index"
|
||||
type="success"
|
||||
effect="plain"
|
||||
:show-tooltip="scope.row.tags.length === 1 && itemName.length * 12 <= 100"
|
||||
:content="itemName"
|
||||
style="margin-left: 0; margin-right: 2px"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<span/>
|
||||
</template>
|
||||
</ms-table-column>
|
||||
|
||||
<ms-table-column
|
||||
prop="maintainerName"
|
||||
:field="item"
|
||||
|
@ -178,6 +203,7 @@ import StatusEdit from "@/business/plan/view/comonents/StatusEdit";
|
|||
import ExecutorEdit from "@/business/plan/view/comonents/ExecutorEdit";
|
||||
import MsTipButton from "metersphere-frontend/src/components/MsTipButton";
|
||||
import MsTableHeader from "metersphere-frontend/src/components/MsTableHeader";
|
||||
import MsSingleTag from "metersphere-frontend/src/components/new-ui/MsSingleTag";
|
||||
import NodeBreadcrumb from "@/business/common/NodeBreadcrumb";
|
||||
import MsTableButton from "metersphere-frontend/src/components/MsTableButton";
|
||||
import ShowMoreBtn from "metersphere-frontend/src/components/table/ShowMoreBtn";
|
||||
|
@ -186,30 +212,28 @@ import MsTablePagination from 'metersphere-frontend/src/components/pagination/Ta
|
|||
import {TEST_CASE_CONFIGS} from "metersphere-frontend/src/components/search/search-components";
|
||||
import TestReviewTestCaseEdit from "./TestReviewTestCaseEdit";
|
||||
import ReviewStatus from "@/business/case/components/ReviewStatus";
|
||||
import {
|
||||
_handleSelectAll, buildBatchParam, deepClone, getCustomTableWidth, getLastTableSortField, getSelectDataCounts,
|
||||
getTableHeaderWithCustomFields, initCondition, toggleAllSelection, getCustomFieldBatchEditOption} from "metersphere-frontend/src/utils/tableUtils";
|
||||
import HeaderCustom from "metersphere-frontend/src/components/head/HeaderCustom";
|
||||
import {Test_Case_Review_Case_List} from "@/business/model/JsonData";
|
||||
import MsTable from "metersphere-frontend/src/components/table/MsTable";
|
||||
import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColumn";
|
||||
import MsTableHeaderSelectPopover from "metersphere-frontend/src/components/table/MsTableHeaderSelectPopover";
|
||||
import HeaderLabelOperate from "metersphere-frontend/src/components/head/HeaderLabelOperate";
|
||||
import {editTestReviewTestCaseOrder, getTestReviewTestCase} from "@/api/testCase";
|
||||
import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
||||
import {hasLicense} from "metersphere-frontend/src/utils/permission";
|
||||
import TestCaseReviewStatusTableItem from "@/business/common/tableItems/TestCaseReviewStatusTableItem";
|
||||
import {getProjectConfig} from "@/api/project";
|
||||
import {
|
||||
batchDeleteTestReviewCase, batchEditTestReviewCaseReviewer,
|
||||
batchEditTestReviewCaseStatus,
|
||||
deleteTestReviewCase, getTesReviewById
|
||||
} from "@/api/test-review";
|
||||
import {TEST_REVIEW_CASE} from "metersphere-frontend/src/components/search/search-components";
|
||||
import {useStore} from "@/store";
|
||||
import {getProjectConfig} from "@/api/project";
|
||||
import {parseTag} from "metersphere-frontend/src/utils"
|
||||
import {getVersionFilters} from "@/business/utils/sdk-utils";
|
||||
import {getProjectMember, getProjectMemberUserFilter} from "@/api/user";
|
||||
import {TEST_REVIEW_CASE} from "metersphere-frontend/src/components/search/search-components";
|
||||
import {getProjectApplicationConfig} from "@/api/project-application";
|
||||
import {getTagToolTips, parseColumnTag} from "@/business/case/test-case";
|
||||
import {hasLicense} from "metersphere-frontend/src/utils/permission";
|
||||
import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
||||
import {editTestReviewTestCaseOrder, getTestReviewTestCase} from "@/api/testCase";
|
||||
import {
|
||||
_handleSelectAll, buildBatchParam, deepClone, getCustomTableWidth, getLastTableSortField, getSelectDataCounts,
|
||||
getTableHeaderWithCustomFields, initCondition, toggleAllSelection, getCustomFieldBatchEditOption } from "metersphere-frontend/src/utils/tableUtils";
|
||||
import {batchDeleteTestReviewCase, batchEditTestReviewCaseReviewer, batchEditTestReviewCaseStatus, deleteTestReviewCase, getTesReviewById} from "@/api/test-review";
|
||||
|
||||
export default {
|
||||
name: "TestReviewTestCaseList",
|
||||
|
@ -223,7 +247,7 @@ export default {
|
|||
NodeBreadcrumb, MsTableButton, ShowMoreBtn, BatchEdit,
|
||||
MsTablePagination, ReviewStatus, MsTableHeaderSelectPopover,
|
||||
MsTableColumn,
|
||||
MsTable,
|
||||
MsTable, MsSingleTag
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -409,14 +433,14 @@ export default {
|
|||
this.condition.reviewId = this.reviewId;
|
||||
}
|
||||
if (this.clickType) {
|
||||
if (this.status == 'default') {
|
||||
if (this.status === 'default') {
|
||||
this.condition.status = this.clickType;
|
||||
} else {
|
||||
this.condition.status = null;
|
||||
}
|
||||
this.status = 'all';
|
||||
}
|
||||
this.enableOrderDrag = (this.condition.orders && this.condition.orders.length) > 0 ? false : true;
|
||||
this.enableOrderDrag = (this.condition.orders && this.condition.orders.length) <= 0;
|
||||
|
||||
this.condition.nodeIds = this.selectNodeIds;
|
||||
if (this.reviewId) {
|
||||
|
@ -426,6 +450,7 @@ export default {
|
|||
this.total = response.data.itemCount;
|
||||
this.pageCount = Math.ceil(this.total / this.pageSize);
|
||||
this.tableData = response.data.listObject;
|
||||
parseTag(this.tableData);
|
||||
this.getPreData();
|
||||
if (callback && callback instanceof Function) {
|
||||
callback();
|
||||
|
@ -631,6 +656,12 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
getTagToolTips(tags) {
|
||||
return getTagToolTips(tags);
|
||||
},
|
||||
parseColumnTag(tags) {
|
||||
return parseColumnTag(tags);
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -157,14 +157,15 @@ const TRACK_HEADER = {
|
|||
TEST_CASE_REVIEW_FUNCTION_TEST_CASE: [
|
||||
{id: 'num', key: '1', label: 'commons.id'},
|
||||
{id: 'name', key: '2', label: 'commons.name'},
|
||||
{id: 'versionId', key: 'b', label: 'commons.version'},
|
||||
{id: 'priority', key: '3', label: 'test_track.case.priority'},
|
||||
{id: 'tags', key: '4', label: 'commons.tag'},
|
||||
{id: 'nodePath', key: '5', label: 'test_track.case.module'},
|
||||
{id: 'projectName', key: '6', label: 'test_track.review.review_project'},
|
||||
{id: 'reviewerName', key: '7', label: 'test_track.review.reviewer'},
|
||||
{id: 'reviewStatus', key: '8', label: 'test_track.case.status'},
|
||||
{id: 'updateTime', key: '9', label: 'commons.update_time'},
|
||||
{id: 'maintainerName', key: 'a', label: 'custom_field.case_maintainer'},
|
||||
{id: 'versionId', key: 'b', label: 'commons.version'}
|
||||
],
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue