refactor: 试计划场景用例添加排序筛选 (#3106)
Co-authored-by: chenjianxing <jianxing.chen@fit2cloud.com>
This commit is contained in:
parent
9d95677c50
commit
7b111a5894
|
@ -70,7 +70,12 @@
|
||||||
<if test="request.orders != null and request.orders.size() > 0">
|
<if test="request.orders != null and request.orders.size() > 0">
|
||||||
order by
|
order by
|
||||||
<foreach collection="request.orders" separator="," item="order">
|
<foreach collection="request.orders" separator="," item="order">
|
||||||
tplc.${order.name} ${order.type}
|
<if test="order.name == 'num'">
|
||||||
|
lt.${order.name} ${order.type}
|
||||||
|
</if>
|
||||||
|
<if test="order.name != 'num'">
|
||||||
|
tplc.${order.name} ${order.type}
|
||||||
|
</if>
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
@ -145,4 +150,4 @@
|
||||||
<select id="getStatusByTestPlanId" resultType="java.lang.String">
|
<select id="getStatusByTestPlanId" resultType="java.lang.String">
|
||||||
select status from test_plan_load_case tplc where tplc.test_plan_id = #{planId}
|
select status from test_plan_load_case tplc where tplc.test_plan_id = #{planId}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -60,20 +60,8 @@
|
||||||
#{nodeId}
|
#{nodeId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="request.filters != null and request.filters.size() > 0">
|
|
||||||
<foreach collection="request.filters.entrySet()" index="key" item="values">
|
<include refid="filers"/>
|
||||||
<if test="values != null and values.size() > 0">
|
|
||||||
<choose>
|
|
||||||
<when test="key == 'priority'">
|
|
||||||
and c.priority in
|
|
||||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
|
||||||
#{value}
|
|
||||||
</foreach>
|
|
||||||
</when>
|
|
||||||
</choose>
|
|
||||||
</if>
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
<if test="request.orders != null and request.orders.size() > 0">
|
<if test="request.orders != null and request.orders.size() > 0">
|
||||||
order by
|
order by
|
||||||
<foreach collection="request.orders" separator="," item="order">
|
<foreach collection="request.orders" separator="," item="order">
|
||||||
|
@ -133,20 +121,7 @@
|
||||||
#{nodeId}
|
#{nodeId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="request.filters != null and request.filters.size() > 0">
|
<include refid="filers"/>
|
||||||
<foreach collection="request.filters.entrySet()" index="key" item="values">
|
|
||||||
<if test="values != null and values.size() > 0">
|
|
||||||
<choose>
|
|
||||||
<when test="key == 'priority'">
|
|
||||||
and c.priority in
|
|
||||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
|
||||||
#{value}
|
|
||||||
</foreach>
|
|
||||||
</when>
|
|
||||||
</choose>
|
|
||||||
</if>
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
<if test="request.orders != null and request.orders.size() > 0">
|
<if test="request.orders != null and request.orders.size() > 0">
|
||||||
order by
|
order by
|
||||||
<foreach collection="request.orders" separator="," item="order">
|
<foreach collection="request.orders" separator="," item="order">
|
||||||
|
@ -162,6 +137,23 @@
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<sql id="filers">
|
||||||
|
<if test="request.filters != null and request.filters.size() > 0">
|
||||||
|
<foreach collection="request.filters.entrySet()" index="key" item="values">
|
||||||
|
<if test="values != null and values.size() > 0">
|
||||||
|
<choose>
|
||||||
|
<when test="key == 'level'">
|
||||||
|
and c.level in
|
||||||
|
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||||
|
#{value}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
<select id="getExecResultByPlanId" resultType="java.lang.String">
|
<select id="getExecResultByPlanId" resultType="java.lang.String">
|
||||||
select last_result
|
select last_result
|
||||||
from
|
from
|
||||||
|
@ -188,4 +180,4 @@
|
||||||
where t.test_plan_id = #{planId}
|
where t.test_plan_id = #{planId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-card class="table-card-nopadding" v-loading="result.loading">
|
<el-card class="table-card-nopadding" v-loading="result.loading">
|
||||||
<!-- <template v-slot:header>-->
|
|
||||||
<ms-table-header :condition.sync="condition" @search="selectByParam" title=""
|
<ms-table-header :condition.sync="condition" @search="selectByParam" title=""
|
||||||
:show-create="false" :tip="$t('commons.search_by_id_name_tag')"/>
|
:show-create="false" :tip="$t('commons.search_by_id_name_tag')"/>
|
||||||
<!-- </template>-->
|
|
||||||
|
|
||||||
<el-table ref="scenarioTable" border :data="tableData" class="adjust-table ms-select-all-fixed"
|
<el-table ref="scenarioTable" border :data="tableData" class="adjust-table ms-select-all-fixed"
|
||||||
@sort-change="sort"
|
@sort-change="sort"
|
||||||
|
@ -62,7 +60,7 @@
|
||||||
<el-table-column v-if="item.id == 'level'" prop="level"
|
<el-table-column v-if="item.id == 'level'" prop="level"
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
column-key="level"
|
column-key="level"
|
||||||
:filters="levelFilters"
|
:filters="LEVEL_FILTERS"
|
||||||
min-width="130px"
|
min-width="130px"
|
||||||
:label="$t('api_test.automation.case_level')"
|
:label="$t('api_test.automation.case_level')"
|
||||||
show-overflow-tooltip :key="index">
|
show-overflow-tooltip :key="index">
|
||||||
|
@ -73,7 +71,7 @@
|
||||||
<el-table-column v-if="item.id == 'status'" prop="status" :label="$t('test_track.plan.plan_status')"
|
<el-table-column v-if="item.id == 'status'" prop="status" :label="$t('test_track.plan.plan_status')"
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
column-key="status"
|
column-key="status"
|
||||||
:filters="statusFilters"
|
:filters="STATUS_FILTERS"
|
||||||
show-overflow-tooltip min-width="120px" :key="index">
|
show-overflow-tooltip min-width="120px" :key="index">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<plan-status-table-item :value="scope.row.status"/>
|
<plan-status-table-item :value="scope.row.status"/>
|
||||||
|
@ -113,7 +111,7 @@
|
||||||
show-overflow-tooltip :key="index"/>
|
show-overflow-tooltip :key="index"/>
|
||||||
<el-table-column v-if="item.id == 'lastResult'" prop="lastResult"
|
<el-table-column v-if="item.id == 'lastResult'" prop="lastResult"
|
||||||
:label="$t('api_test.automation.last_result')"
|
:label="$t('api_test.automation.last_result')"
|
||||||
:filters="resultFilters"
|
:filters="RESULT_FILTERS"
|
||||||
|
|
||||||
sortable="custom" column-key="last_result" min-width="130px" :key="index">
|
sortable="custom" column-key="last_result" min-width="130px" :key="index">
|
||||||
<template v-slot:default="{row}">
|
<template v-slot:default="{row}">
|
||||||
|
@ -219,6 +217,7 @@ import {
|
||||||
import {Api_Scenario_List} from "@/business/components/common/model/JsonData";
|
import {Api_Scenario_List} 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 {API_SCENARIO_FILTERS} from "@/common/js/table-constants";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsApiScenarioList",
|
name: "MsApiScenarioList",
|
||||||
|
@ -348,6 +347,7 @@ export default {
|
||||||
isSelectAllDate: false,
|
isSelectAllDate: false,
|
||||||
selectRows: new Set(),
|
selectRows: new Set(),
|
||||||
selectDataCounts: 0,
|
selectDataCounts: 0,
|
||||||
|
...API_SCENARIO_FILTERS,
|
||||||
typeArr: [
|
typeArr: [
|
||||||
{id: 'level', name: this.$t('test_track.case.priority')},
|
{id: 'level', name: this.$t('test_track.case.priority')},
|
||||||
{id: 'status', name: this.$t('test_track.plan.plan_status')},
|
{id: 'status', name: this.$t('test_track.plan.plan_status')},
|
||||||
|
@ -359,22 +359,6 @@ export default {
|
||||||
// {id: 'environmentId', name: this.$t('api_test.definition.request.run_env'), optionMethod: this.getEnvsOptions},
|
// {id: 'environmentId', name: this.$t('api_test.definition.request.run_env'), optionMethod: this.getEnvsOptions},
|
||||||
{id: 'projectEnv', name: this.$t('api_test.definition.request.run_env')},
|
{id: 'projectEnv', name: this.$t('api_test.definition.request.run_env')},
|
||||||
],
|
],
|
||||||
statusFilters: [
|
|
||||||
{text: this.$t('test_track.plan.plan_status_prepare'), value: 'Prepare'},
|
|
||||||
{text: this.$t('test_track.plan.plan_status_running'), value: 'Underway'},
|
|
||||||
{text: this.$t('test_track.plan.plan_status_completed'), value: 'Completed'},
|
|
||||||
{text: this.$t('test_track.plan.plan_status_trash'), value: 'Trash'},
|
|
||||||
],
|
|
||||||
levelFilters: [
|
|
||||||
{text: 'P0', value: 'P0'},
|
|
||||||
{text: 'P1', value: 'P1'},
|
|
||||||
{text: 'P2', value: 'P2'},
|
|
||||||
{text: 'P3', value: 'P3'}
|
|
||||||
],
|
|
||||||
resultFilters: [
|
|
||||||
{text: 'Fail', value: 'Fail'},
|
|
||||||
{text: 'Success', value: 'Success'}
|
|
||||||
],
|
|
||||||
valueArr: {
|
valueArr: {
|
||||||
level: [
|
level: [
|
||||||
{name: 'P0', id: 'P0'},
|
{name: 'P0', id: 'P0'},
|
||||||
|
|
|
@ -27,10 +27,7 @@
|
||||||
<el-table-column prop="level" :label="$t('api_test.automation.case_level')"
|
<el-table-column prop="level" :label="$t('api_test.automation.case_level')"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<ms-tag v-if="scope.row.level == 'P0'" type="info" effect="plain" content="P0"/>
|
<priority-table-item :value="scope.row.level" ref="level"/>
|
||||||
<ms-tag v-if="scope.row.level == 'P1'" type="warning" effect="plain" content="P1"/>
|
|
||||||
<ms-tag v-if="scope.row.level == 'P2'" type="success" effect="plain" content="P2"/>
|
|
||||||
<ms-tag v-if="scope.row.level == 'P3'" type="danger" effect="plain" content="P3"/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -74,10 +71,12 @@
|
||||||
import TestPlanScenarioListHeader from "./TestPlanScenarioListHeader";
|
import TestPlanScenarioListHeader from "./TestPlanScenarioListHeader";
|
||||||
import {_handleSelect, _handleSelectAll} from "../../../../../../../common/js/tableUtils";
|
import {_handleSelect, _handleSelectAll} from "../../../../../../../common/js/tableUtils";
|
||||||
import EnvPopover from "@/business/components/track/common/EnvPopover";
|
import EnvPopover from "@/business/components/track/common/EnvPopover";
|
||||||
|
import PriorityTableItem from "@/business/components/track/common/tableItems/planview/PriorityTableItem";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RelevanceScenarioList",
|
name: "RelevanceScenarioList",
|
||||||
components: {
|
components: {
|
||||||
|
PriorityTableItem,
|
||||||
EnvPopover,
|
EnvPopover,
|
||||||
TestPlanScenarioListHeader,
|
TestPlanScenarioListHeader,
|
||||||
MsTablePagination, MsTableMoreBtn, ShowMoreBtn, MsTableHeader, MsTag, MsApiReportDetail, MsTestPlanList},
|
MsTablePagination, MsTableMoreBtn, ShowMoreBtn, MsTableHeader, MsTag, MsApiReportDetail, MsTestPlanList},
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
<el-table ref="scenarioTable" border :data="tableData" class="test-content adjust-table ms-select-all-fixed"
|
<el-table ref="scenarioTable" border :data="tableData" class="test-content adjust-table ms-select-all-fixed"
|
||||||
@select-all="handleSelectAll"
|
@select-all="handleSelectAll"
|
||||||
|
@sort-change="sort"
|
||||||
|
@filter-change="filter"
|
||||||
:height="screenHeight"
|
:height="screenHeight"
|
||||||
@select="handleSelect">
|
@select="handleSelect">
|
||||||
<el-table-column width="50" type="selection"/>
|
<el-table-column width="50" type="selection"/>
|
||||||
|
@ -26,6 +28,7 @@
|
||||||
<template v-for="(item, index) in tableLabel">
|
<template v-for="(item, index) in tableLabel">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="item.id == 'num'"
|
v-if="item.id == 'num'"
|
||||||
|
sortable="custom"
|
||||||
prop="customNum"
|
prop="customNum"
|
||||||
min-width="80px"
|
min-width="80px"
|
||||||
label="ID"
|
label="ID"
|
||||||
|
@ -33,12 +36,12 @@
|
||||||
<el-table-column v-if="item.id == 'name'" prop="name" :label="$t('api_test.automation.scenario_name')" min-width="120px"
|
<el-table-column v-if="item.id == 'name'" prop="name" :label="$t('api_test.automation.scenario_name')" min-width="120px"
|
||||||
show-overflow-tooltip :key="index"/>
|
show-overflow-tooltip :key="index"/>
|
||||||
<el-table-column v-if="item.id == 'level'" prop="level" :label="$t('api_test.automation.case_level')" min-width="100px"
|
<el-table-column v-if="item.id == 'level'" prop="level" :label="$t('api_test.automation.case_level')" min-width="100px"
|
||||||
|
column-key="level"
|
||||||
|
sortable="custom"
|
||||||
|
:filters="LEVEL_FILTERS"
|
||||||
show-overflow-tooltip :key="index">
|
show-overflow-tooltip :key="index">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<ms-tag v-if="scope.row.level == 'P0'" type="info" effect="plain" content="P0"/>
|
<priority-table-item :value="scope.row.level" ref="level"/>
|
||||||
<ms-tag v-if="scope.row.level == 'P1'" type="warning" effect="plain" content="P1"/>
|
|
||||||
<ms-tag v-if="scope.row.level == 'P2'" type="success" effect="plain" content="P2"/>
|
|
||||||
<ms-tag v-if="scope.row.level == 'P3'" type="danger" effect="plain" content="P3"/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -51,7 +54,10 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-if="item.id == 'userId'" prop="userId" :label="$t('api_test.automation.creator')" min-width="100px"
|
<el-table-column v-if="item.id == 'userId'" prop="userId" :label="$t('api_test.automation.creator')" min-width="100px"
|
||||||
show-overflow-tooltip :key="index"/>
|
show-overflow-tooltip :key="index"/>
|
||||||
<el-table-column v-if="item.id == 'updateTime'" prop="updateTime" min-width="120px"
|
<el-table-column v-if="item.id == 'updateTime'"
|
||||||
|
prop="updateTime"
|
||||||
|
min-width="120px"
|
||||||
|
sortable="custom"
|
||||||
:label="$t('api_test.automation.update_time')" width="180" :key="index">
|
:label="$t('api_test.automation.update_time')" width="180" :key="index">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<span>{{ scope.row.updateTime | timestampFormatDate }}</span>
|
<span>{{ scope.row.updateTime | timestampFormatDate }}</span>
|
||||||
|
@ -60,6 +66,7 @@
|
||||||
<el-table-column v-if="item.id == 'stepTotal'" prop="stepTotal" :label="$t('api_test.automation.step')" min-width="80px"
|
<el-table-column v-if="item.id == 'stepTotal'" prop="stepTotal" :label="$t('api_test.automation.step')" min-width="80px"
|
||||||
show-overflow-tooltip :key="index"/>
|
show-overflow-tooltip :key="index"/>
|
||||||
<el-table-column v-if="item.id == 'lastResult'" prop="lastResult" min-width="100px"
|
<el-table-column v-if="item.id == 'lastResult'" prop="lastResult" min-width="100px"
|
||||||
|
:filters="RESULT_FILTERS"
|
||||||
:label="$t('api_test.automation.last_result')" :key="index">
|
:label="$t('api_test.automation.last_result')" :key="index">
|
||||||
<template v-slot:default="{row}">
|
<template v-slot:default="{row}">
|
||||||
<el-link type="success" @click="showReport(row)" v-if="row.lastResult === 'Success'">
|
<el-link type="success" @click="showReport(row)" v-if="row.lastResult === 'Success'">
|
||||||
|
@ -114,7 +121,7 @@ import MsTableHeader from "@/business/components/common/components/MsTableHeader
|
||||||
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
||||||
import ShowMoreBtn from "@/business/components/track/case/components/ShowMoreBtn";
|
import ShowMoreBtn from "@/business/components/track/case/components/ShowMoreBtn";
|
||||||
import MsTag from "../../../../../common/components/MsTag";
|
import MsTag from "../../../../../common/components/MsTag";
|
||||||
import {getCurrentProjectID, getUUID, strMapToObj} from "@/common/js/utils";
|
import {getUUID, strMapToObj} from "@/common/js/utils";
|
||||||
import MsApiReportDetail from "../../../../../api/automation/report/ApiReportDetail";
|
import MsApiReportDetail from "../../../../../api/automation/report/ApiReportDetail";
|
||||||
import MsTableMoreBtn from "../../../../../api/automation/scenario/TableMoreBtn";
|
import MsTableMoreBtn from "../../../../../api/automation/scenario/TableMoreBtn";
|
||||||
import MsScenarioExtendButtons from "@/business/components/api/automation/scenario/ScenarioExtendBtns";
|
import MsScenarioExtendButtons from "@/business/components/api/automation/scenario/ScenarioExtendBtns";
|
||||||
|
@ -141,10 +148,13 @@ import HeaderLabelOperate from "@/business/components/common/head/HeaderLabelOpe
|
||||||
import BatchEdit from "@/business/components/track/case/components/BatchEdit";
|
import BatchEdit from "@/business/components/track/case/components/BatchEdit";
|
||||||
import MsPlanRunMode from "../../../common/PlanRunMode";
|
import MsPlanRunMode from "../../../common/PlanRunMode";
|
||||||
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
|
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
|
||||||
|
import PriorityTableItem from "@/business/components/track/common/tableItems/planview/PriorityTableItem";
|
||||||
|
import {API_SCENARIO_FILTERS} from "@/common/js/table-constants";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsTestPlanApiScenarioList",
|
name: "MsTestPlanApiScenarioList",
|
||||||
components: {
|
components: {
|
||||||
|
PriorityTableItem,
|
||||||
HeaderLabelOperate,
|
HeaderLabelOperate,
|
||||||
HeaderCustom,
|
HeaderCustom,
|
||||||
MsTableOperatorButton,
|
MsTableOperatorButton,
|
||||||
|
@ -192,6 +202,7 @@ export default {
|
||||||
infoDb: false,
|
infoDb: false,
|
||||||
runVisible: false,
|
runVisible: false,
|
||||||
runData: [],
|
runData: [],
|
||||||
|
...API_SCENARIO_FILTERS,
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: this.$t('test_track.case.batch_unlink'), handleClick: this.handleDeleteBatch
|
name: this.$t('test_track.case.batch_unlink'), handleClick: this.handleDeleteBatch
|
||||||
|
@ -368,6 +379,18 @@ export default {
|
||||||
this.infoDb = true;
|
this.infoDb = true;
|
||||||
this.reportId = row.reportId;
|
this.reportId = row.reportId;
|
||||||
},
|
},
|
||||||
|
sort(column) {
|
||||||
|
// 每次只对一个字段排序
|
||||||
|
if (this.condition.orders) {
|
||||||
|
this.condition.orders = [];
|
||||||
|
}
|
||||||
|
_sort(column, this.condition);
|
||||||
|
this.search();
|
||||||
|
},
|
||||||
|
filter(filters) {
|
||||||
|
_filter(filters, this.condition);
|
||||||
|
this.search();
|
||||||
|
},
|
||||||
remove(row) {
|
remove(row) {
|
||||||
if (this.planId) {
|
if (this.planId) {
|
||||||
this.$get('/test/plan/scenario/case/delete/' + row.id, () => {
|
this.$get('/test/plan/scenario/case/delete/' + row.id, () => {
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<template v-for="(item, index) in tableLabel">
|
<template v-for="(item, index) in tableLabel">
|
||||||
<el-table-column v-if="item.id == 'num'" prop="num" min-width="80" label="ID" show-overflow-tooltip :key="index"/>
|
<el-table-column v-if="item.id == 'num'" prop="num" sortable min-width="80" label="ID" show-overflow-tooltip :key="index"/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="item.id == 'caseName'"
|
v-if="item.id == 'caseName'"
|
||||||
prop="caseName"
|
prop="caseName"
|
||||||
|
|
|
@ -13,10 +13,7 @@
|
||||||
<el-table-column prop="level" :label="$t('api_test.automation.case_level')"
|
<el-table-column prop="level" :label="$t('api_test.automation.case_level')"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<ms-tag v-if="scope.row.level == 'P0'" type="info" effect="plain" content="P0"/>
|
<priority-table-item :value="scope.row.level" ref="level"/>
|
||||||
<ms-tag v-if="scope.row.level == 'P1'" type="warning" effect="plain" content="P1"/>
|
|
||||||
<ms-tag v-if="scope.row.level == 'P2'" type="success" effect="plain" content="P2"/>
|
|
||||||
<ms-tag v-if="scope.row.level == 'P3'" type="danger" effect="plain" content="P3"/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -58,10 +55,11 @@ import {_handleSelect, _handleSelectAll} from "@/common/js/tableUtils";
|
||||||
import MsTag from "@/business/components/common/components/MsTag";
|
import MsTag from "@/business/components/common/components/MsTag";
|
||||||
import EnvPopover from "@/business/components/track/common/EnvPopover";
|
import EnvPopover from "@/business/components/track/common/EnvPopover";
|
||||||
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
||||||
|
import PriorityTableItem from "@/business/components/track/common/tableItems/planview/PriorityTableItem";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ReviewRelevanceScenarioList",
|
name: "ReviewRelevanceScenarioList",
|
||||||
components: {MsTablePagination, EnvPopover, MsTag},
|
components: {PriorityTableItem, MsTablePagination, EnvPopover, MsTag},
|
||||||
props: {
|
props: {
|
||||||
referenced: {
|
referenced: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
// 模板
|
// 模板
|
||||||
|
import i18n from "@/i18n/i18n";
|
||||||
|
|
||||||
export const CUSTOM_FIELD_TYPE_OPTION = [
|
export const CUSTOM_FIELD_TYPE_OPTION = [
|
||||||
{value: 'input',text: '输入框'},
|
{value: 'input',text: '输入框'},
|
||||||
{value: 'textarea',text: '文本框'},
|
{value: 'textarea',text: '文本框'},
|
||||||
|
@ -69,6 +71,25 @@ export const ISSUE_STATUS_MAP = {
|
||||||
'delete': '已删除'
|
'delete': '已删除'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const API_SCENARIO_FILTERS = {
|
||||||
|
LEVEL_FILTERS: [
|
||||||
|
{text: 'P0', value: 'P0'},
|
||||||
|
{text: 'P1', value: 'P1'},
|
||||||
|
{text: 'P2', value: 'P2'},
|
||||||
|
{text: 'P3', value: 'P3'}
|
||||||
|
],
|
||||||
|
RESULT_FILTERS: [
|
||||||
|
{text: 'Fail', value: 'Fail'},
|
||||||
|
{text: 'Success', value: 'Success'}
|
||||||
|
],
|
||||||
|
STATUS_FILTERS: [
|
||||||
|
{text: i18n.t('test_track.plan.plan_status_prepare'), value: 'Prepare'},
|
||||||
|
{text: i18n.t('test_track.plan.plan_status_running'), value: 'Underway'},
|
||||||
|
{text: i18n.t('test_track.plan.plan_status_completed'), value: 'Completed'},
|
||||||
|
{text: i18n.t('test_track.plan.plan_status_trash'), value: 'Trash'},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
export const USER_GROUP_SCOPE = {
|
export const USER_GROUP_SCOPE = {
|
||||||
// todo i18n
|
// todo i18n
|
||||||
'SYSTEM': '系统',
|
'SYSTEM': '系统',
|
||||||
|
|
Loading…
Reference in New Issue