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