fix(测试跟踪): 功能用例左侧模块树与列表查询结果不一致问题
This commit is contained in:
parent
d69cd76d09
commit
b09321a665
|
@ -230,6 +230,12 @@
|
||||||
#{nodeId}
|
#{nodeId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="request.caseCoverage == 'uncoverage' ">
|
||||||
|
and test_case.id not in (select distinct test_case_test.test_case_id from test_case_test)
|
||||||
|
</if>
|
||||||
|
<if test="request.caseCoverage == 'coverage' ">
|
||||||
|
and test_case.id in (select distinct test_case_test.test_case_id from test_case_test)
|
||||||
|
</if>
|
||||||
<include refid="queryVersionCondition">
|
<include refid="queryVersionCondition">
|
||||||
<property name="versionTable" value="test_case"/>
|
<property name="versionTable" value="test_case"/>
|
||||||
</include>
|
</include>
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
<!-- public, trash back header -->
|
<!-- public, trash back header -->
|
||||||
<div v-show="showPublicNode || showTrashNode" class="back-layout">
|
<div v-show="showPublicNode || showTrashNode" class="back-layout">
|
||||||
<i class="el-icon-back" style="float: left;position: relative;top: 15px;left: 21px;" @click="activeName = 'default'"/>
|
<i class="el-icon-back" style="float: left;position: relative;top: 15px;left: 21px;" @click="backDefault"/>
|
||||||
<span class="back-content">{{showPublicNode? $t('project.case_public') : $t('commons.trash')}}</span>
|
<span class="back-content">{{showPublicNode? $t('project.case_public') : $t('commons.trash')}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
@refreshAll="refreshAll"
|
@refreshAll="refreshAll"
|
||||||
@setCondition="setCondition"
|
@setCondition="setCondition"
|
||||||
@decrease="decrease"
|
@decrease="decrease"
|
||||||
@search="refreshTreeByCaseFilter"
|
@refreshTree="refreshTreeByCaseFilter"
|
||||||
ref="testCaseList">
|
ref="testCaseList">
|
||||||
</test-case-list>
|
</test-case-list>
|
||||||
<test-case-minder
|
<test-case-minder
|
||||||
|
@ -134,7 +134,7 @@
|
||||||
@refreshAll="refreshAll"
|
@refreshAll="refreshAll"
|
||||||
@refreshPublic="refreshPublic"
|
@refreshPublic="refreshPublic"
|
||||||
@setCondition="setPublicCondition"
|
@setCondition="setPublicCondition"
|
||||||
@search="refreshTreeByCaseFilter"
|
@refreshTree="refreshTreeByCaseFilter"
|
||||||
ref="testCasePublicList"/>
|
ref="testCasePublicList"/>
|
||||||
</el-card>
|
</el-card>
|
||||||
</ms-main-container>
|
</ms-main-container>
|
||||||
|
@ -151,7 +151,7 @@
|
||||||
@refresh="refreshTrashNode"
|
@refresh="refreshTrashNode"
|
||||||
@refreshAll="refreshAll"
|
@refreshAll="refreshAll"
|
||||||
@setCondition="setTrashCondition"
|
@setCondition="setTrashCondition"
|
||||||
@search="refreshTreeByCaseFilter"
|
@refreshTree="refreshTreeByCaseFilter"
|
||||||
ref="testCaseTrashList">
|
ref="testCaseTrashList">
|
||||||
</test-case-list>
|
</test-case-list>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
@ -520,13 +520,21 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
backDefault() {
|
||||||
|
// 回到默认列表页
|
||||||
|
this.activeName = 'default';
|
||||||
|
this.trashEnable = false;
|
||||||
|
this.publicEnable = false;
|
||||||
|
},
|
||||||
enableTrash(data) {
|
enableTrash(data) {
|
||||||
|
// 进入回收站列表
|
||||||
this.trashEnable = !data;
|
this.trashEnable = !data;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.trashEnable = data;
|
this.trashEnable = data;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
enablePublic(data) {
|
enablePublic(data) {
|
||||||
|
//进入公共用例列表
|
||||||
this.publicEnable = !data;
|
this.publicEnable = !data;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.publicEnable = data;
|
this.publicEnable = data;
|
||||||
|
|
|
@ -271,14 +271,16 @@ import {TEST_CASE_LIST} from "metersphere-frontend/src/utils/constants";
|
||||||
import MsSingleTag from "metersphere-frontend/src/components/new-ui/MsSingleTag";
|
import MsSingleTag from "metersphere-frontend/src/components/new-ui/MsSingleTag";
|
||||||
import {
|
import {
|
||||||
buildBatchParam,
|
buildBatchParam,
|
||||||
getCustomFieldBatchEditOption, getCustomFieldFilter,
|
getCustomFieldBatchEditOption,
|
||||||
|
getCustomFieldFilter,
|
||||||
getCustomTableHeader,
|
getCustomTableHeader,
|
||||||
getCustomTableWidth,
|
getCustomTableWidth,
|
||||||
getLastTableSortField,
|
getLastTableSortField,
|
||||||
getPageInfo,
|
getPageInfo,
|
||||||
getSelectDataCounts,
|
getSelectDataCounts,
|
||||||
getTableHeaderWithCustomFields,
|
getTableHeaderWithCustomFields,
|
||||||
initCondition, parseCustomFilesForList,
|
initCondition,
|
||||||
|
parseCustomFilesForList,
|
||||||
} from "metersphere-frontend/src/utils/tableUtils";
|
} from "metersphere-frontend/src/utils/tableUtils";
|
||||||
import PlanStatusTableItem from "@/business/common/tableItems/plan/PlanStatusTableItem";
|
import PlanStatusTableItem from "@/business/common/tableItems/plan/PlanStatusTableItem";
|
||||||
import {getCurrentProjectID, getCurrentWorkspaceId, setCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
import {getCurrentProjectID, getCurrentWorkspaceId, setCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
||||||
|
@ -296,11 +298,15 @@ import {
|
||||||
editTestCaseOrder,
|
editTestCaseOrder,
|
||||||
getTestCase,
|
getTestCase,
|
||||||
getTestCaseStep,
|
getTestCaseStep,
|
||||||
getTestCaseVersions, testCaseBatchCopy,
|
getTestCaseVersions,
|
||||||
|
testCaseBatchCopy,
|
||||||
testCaseBatchDelete,
|
testCaseBatchDelete,
|
||||||
testCaseBatchDeleteToGc, testCaseBatchEdit, testCaseBatchRelateDemand,
|
testCaseBatchDeleteToGc,
|
||||||
|
testCaseBatchEdit,
|
||||||
|
testCaseBatchRelateDemand,
|
||||||
testCaseDelete,
|
testCaseDelete,
|
||||||
testCaseDeleteToGc, testCaseList,
|
testCaseDeleteToGc,
|
||||||
|
testCaseList,
|
||||||
testCaseReduction
|
testCaseReduction
|
||||||
} from "@/api/testCase";
|
} from "@/api/testCase";
|
||||||
import {getGraphByCondition} from "@/api/graph";
|
import {getGraphByCondition} from "@/api/graph";
|
||||||
|
@ -549,7 +555,6 @@ export default {
|
||||||
this.userFilter = data;
|
this.userFilter = data;
|
||||||
});
|
});
|
||||||
this.getTemplateField();
|
this.getTemplateField();
|
||||||
this.$emit('setCondition', this.condition);
|
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
let redirectParam = this.$route.query.dataSelectRange;
|
let redirectParam = this.$route.query.dataSelectRange;
|
||||||
this.checkRedirectEditPage(redirectParam);
|
this.checkRedirectEditPage(redirectParam);
|
||||||
|
@ -837,6 +842,7 @@ export default {
|
||||||
if (this.projectId) {
|
if (this.projectId) {
|
||||||
this.condition.projectId = this.projectId;
|
this.condition.projectId = this.projectId;
|
||||||
this.$emit('setCondition', this.condition);
|
this.$emit('setCondition', this.condition);
|
||||||
|
this.$emit('refreshTree', this.currentVersion);
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
testCaseList({pageNum: this.page.currentPage, pageSize: this.page.pageSize}, this.condition)
|
testCaseList({pageNum: this.page.currentPage, pageSize: this.page.pageSize}, this.condition)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
|
@ -861,7 +867,6 @@ export default {
|
||||||
// 添加搜索条件时,当前页设置成第一页
|
// 添加搜索条件时,当前页设置成第一页
|
||||||
this.page.currentPage = 1;
|
this.page.currentPage = 1;
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
this.$emit('search');
|
|
||||||
},
|
},
|
||||||
callBackSelect(selection) {
|
callBackSelect(selection) {
|
||||||
this.selectCounts = this.$refs.table.selectDataCounts;
|
this.selectCounts = this.$refs.table.selectDataCounts;
|
||||||
|
@ -871,7 +876,7 @@ export default {
|
||||||
},
|
},
|
||||||
changeVersion(currentVersion) {
|
changeVersion(currentVersion) {
|
||||||
this.currentVersion = currentVersion || null;
|
this.currentVersion = currentVersion || null;
|
||||||
this.$emit('search',currentVersion);
|
this.search();
|
||||||
},
|
},
|
||||||
toggleAdvanceSearch() {
|
toggleAdvanceSearch() {
|
||||||
this.$refs.advanceSearch.toggle();
|
this.$refs.advanceSearch.toggle();
|
||||||
|
|
|
@ -340,9 +340,14 @@ export default {
|
||||||
}
|
}
|
||||||
condition.projectId = this.projectId;
|
condition.projectId = this.projectId;
|
||||||
if (this.projectId) {
|
if (this.projectId) {
|
||||||
|
// 加载树
|
||||||
|
this.refreshTreeByCaseFilter();
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
refreshTreeByCaseFilter() {
|
||||||
|
this.$refs.nodeTree.list();
|
||||||
|
},
|
||||||
saveCaseRelevance(item) {
|
saveCaseRelevance(item) {
|
||||||
this.isSaving = true;
|
this.isSaving = true;
|
||||||
let param = {};
|
let param = {};
|
||||||
|
|
|
@ -226,7 +226,7 @@ import {
|
||||||
} from "metersphere-frontend/src/utils/tableUtils";
|
} from "metersphere-frontend/src/utils/tableUtils";
|
||||||
import PlanStatusTableItem from "@/business/common/tableItems/plan/PlanStatusTableItem";
|
import PlanStatusTableItem from "@/business/common/tableItems/plan/PlanStatusTableItem";
|
||||||
import {getCurrentProjectID, getCurrentUserId, getCurrentWorkspaceId} from "metersphere-frontend/src/utils/token";
|
import {getCurrentProjectID, getCurrentUserId, getCurrentWorkspaceId} from "metersphere-frontend/src/utils/token";
|
||||||
import {getUUID, parseTag} from "metersphere-frontend/src/utils"
|
import {parseTag} from "metersphere-frontend/src/utils"
|
||||||
import {hasLicense} from "metersphere-frontend/src/utils/permission"
|
import {hasLicense} from "metersphere-frontend/src/utils/permission"
|
||||||
import MsTable from "metersphere-frontend/src/components/new-ui/MsTable";
|
import MsTable from "metersphere-frontend/src/components/new-ui/MsTable";
|
||||||
import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColumn";
|
import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColumn";
|
||||||
|
@ -237,9 +237,14 @@ import TestCaseReviewStatusTableItem from "@/business/common/tableItems/TestCase
|
||||||
import BatchMove from "@/business/case/components/BatchMove";
|
import BatchMove from "@/business/case/components/BatchMove";
|
||||||
import TestCasePreview from "@/business/case/components/TestCasePreview";
|
import TestCasePreview from "@/business/case/components/TestCasePreview";
|
||||||
import {
|
import {
|
||||||
deletePublicTestCaseVersion, editTestCaseOrder, getEditSimpleTestCase,
|
deletePublicTestCaseVersion,
|
||||||
getTestCaseStep, getTestCaseVersions, testCasePublicBatchCopy,
|
editTestCaseOrder,
|
||||||
testCasePublicBatchDeleteToGc, testCasePublicList,
|
getEditSimpleTestCase,
|
||||||
|
getTestCaseStep,
|
||||||
|
getTestCaseVersions,
|
||||||
|
testCasePublicBatchCopy,
|
||||||
|
testCasePublicBatchDeleteToGc,
|
||||||
|
testCasePublicList,
|
||||||
} from "@/api/testCase";
|
} from "@/api/testCase";
|
||||||
import ListItemDeleteConfirm from "metersphere-frontend/src/components/ListItemDeleteConfirm";
|
import ListItemDeleteConfirm from "metersphere-frontend/src/components/ListItemDeleteConfirm";
|
||||||
import {TEST_CASE_STATUS_MAP} from "@/business/constants/table-constants";
|
import {TEST_CASE_STATUS_MAP} from "@/business/constants/table-constants";
|
||||||
|
@ -433,6 +438,7 @@ export default {
|
||||||
// 公共用例暂不支持所属项目过滤
|
// 公共用例暂不支持所属项目过滤
|
||||||
// this.condition.projectId = this.projectId;
|
// this.condition.projectId = this.projectId;
|
||||||
this.$emit('setCondition', this.condition);
|
this.$emit('setCondition', this.condition);
|
||||||
|
this.$emit('refreshTree');
|
||||||
this.condition.casePublic = true;
|
this.condition.casePublic = true;
|
||||||
this.condition.workspaceId = getCurrentWorkspaceId();
|
this.condition.workspaceId = getCurrentWorkspaceId();
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -450,7 +456,6 @@ export default {
|
||||||
// 添加搜索条件时,当前页设置成第一页
|
// 添加搜索条件时,当前页设置成第一页
|
||||||
this.page.currentPage = 1;
|
this.page.currentPage = 1;
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
this.$emit('search');
|
|
||||||
},
|
},
|
||||||
clearTableSelect() {
|
clearTableSelect() {
|
||||||
this.$refs.table.clear();
|
this.$refs.table.clear();
|
||||||
|
|
|
@ -50,7 +50,7 @@ import MsNodeTree from "metersphere-frontend/src/components/new-ui/MsNodeTree";
|
||||||
import TestCaseCreate from "@/business/case/components/TestCaseCreate";
|
import TestCaseCreate from "@/business/case/components/TestCaseCreate";
|
||||||
import TestCaseImport from "@/business/case/components/import/TestCaseImport";
|
import TestCaseImport from "@/business/case/components/import/TestCaseImport";
|
||||||
import MsSearchBar from "metersphere-frontend/src/components/new-ui/MsSearchBar";
|
import MsSearchBar from "metersphere-frontend/src/components/new-ui/MsSearchBar";
|
||||||
import {buildTree, buildNodePath} from "metersphere-frontend/src/model/NodeTree";
|
import {buildNodePath, buildTree} from "metersphere-frontend/src/model/NodeTree";
|
||||||
import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
||||||
import ModuleTrashButton from "metersphere-frontend/src/components/ModuleTrashButton";
|
import ModuleTrashButton from "metersphere-frontend/src/components/ModuleTrashButton";
|
||||||
import {getTestCaseNodesByCaseFilter, getTestCaseNodesCountMap} from "@/api/testCase";
|
import {getTestCaseNodesByCaseFilter, getTestCaseNodesCountMap} from "@/api/testCase";
|
||||||
|
@ -129,15 +129,6 @@ export default {
|
||||||
},
|
},
|
||||||
'condition.filterText'() {
|
'condition.filterText'() {
|
||||||
this.filter();
|
this.filter();
|
||||||
},
|
|
||||||
caseCondition: {
|
|
||||||
handler() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.list();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
deep: true,
|
|
||||||
immediate: true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
Loading…
Reference in New Issue