mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 20:19:16 +08:00
feat(测试计划): 测试计划详情-切换显示子模块资源刷新页面
This commit is contained in:
parent
6026df57e2
commit
6da98fb5f6
@ -8,9 +8,9 @@
|
||||
:count="props.modulesCount[props.activeModule] || 0"
|
||||
:name="moduleNamePath"
|
||||
:search-placeholder="t('common.searchByIdName')"
|
||||
@keyword-search="loadCaseList"
|
||||
@adv-search="loadCaseList"
|
||||
@refresh="loadCaseList"
|
||||
@keyword-search="loadCaseList()"
|
||||
@adv-search="loadCaseList()"
|
||||
@refresh="loadCaseList()"
|
||||
/>
|
||||
<MsBaseTable
|
||||
ref="tableRef"
|
||||
@ -22,6 +22,7 @@
|
||||
@drag-change="handleDragChange"
|
||||
@selected-change="handleTableSelect"
|
||||
@filter-change="getModuleCount"
|
||||
@module-change="loadCaseList(false)"
|
||||
>
|
||||
<template #protocol="{ record }">
|
||||
<ApiMethodName :method="record.protocol" />
|
||||
@ -403,15 +404,17 @@
|
||||
}
|
||||
);
|
||||
|
||||
async function loadCaseList() {
|
||||
async function loadCaseList(refreshTreeCount = true) {
|
||||
const tableParams = await getTableParams(false);
|
||||
setLoadListParams(tableParams);
|
||||
loadList();
|
||||
emit('getModuleCount', {
|
||||
...tableParams,
|
||||
current: propsRes.value.msPagination?.current,
|
||||
pageSize: propsRes.value.msPagination?.pageSize,
|
||||
});
|
||||
if (refreshTreeCount) {
|
||||
emit('getModuleCount', {
|
||||
...tableParams,
|
||||
current: propsRes.value.msPagination?.current,
|
||||
pageSize: propsRes.value.msPagination?.pageSize,
|
||||
});
|
||||
}
|
||||
}
|
||||
watch([() => props.activeModule, () => props.selectedProtocols], () => {
|
||||
loadCaseList();
|
||||
@ -463,7 +466,7 @@
|
||||
try {
|
||||
await sortApiCase({ ...params, testCollectionId: collectionId.value });
|
||||
Message.success(t('caseManagement.featureCase.sortSuccess'));
|
||||
loadCaseList();
|
||||
loadCaseList(false);
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(error);
|
||||
|
@ -8,9 +8,9 @@
|
||||
:count="props.modulesCount[props.activeModule] || 0"
|
||||
:name="moduleNamePath"
|
||||
:search-placeholder="t('common.searchByIdName')"
|
||||
@keyword-search="loadCaseList"
|
||||
@adv-search="loadCaseList"
|
||||
@refresh="loadCaseList"
|
||||
@keyword-search="loadCaseList()"
|
||||
@adv-search="loadCaseList()"
|
||||
@refresh="loadCaseList()"
|
||||
/>
|
||||
<MsBaseTable
|
||||
ref="tableRef"
|
||||
@ -22,6 +22,7 @@
|
||||
@drag-change="handleDragChange"
|
||||
@selected-change="handleTableSelect"
|
||||
@filter-change="getModuleCount"
|
||||
@module-change="loadCaseList(false)"
|
||||
>
|
||||
<template #num="{ record }">
|
||||
<MsButton type="text" @click="toDetail(record)">{{ record.num }}</MsButton>
|
||||
@ -391,15 +392,17 @@
|
||||
}
|
||||
);
|
||||
|
||||
async function loadCaseList() {
|
||||
async function loadCaseList(refreshTreeCount = true) {
|
||||
const tableParams = await getTableParams(false);
|
||||
setLoadListParams(tableParams);
|
||||
loadList();
|
||||
emit('getModuleCount', {
|
||||
...tableParams,
|
||||
current: propsRes.value.msPagination?.current,
|
||||
pageSize: propsRes.value.msPagination?.pageSize,
|
||||
});
|
||||
if (refreshTreeCount) {
|
||||
emit('getModuleCount', {
|
||||
...tableParams,
|
||||
current: propsRes.value.msPagination?.current,
|
||||
pageSize: propsRes.value.msPagination?.pageSize,
|
||||
});
|
||||
}
|
||||
}
|
||||
watch(
|
||||
() => props.activeModule,
|
||||
@ -454,7 +457,7 @@
|
||||
try {
|
||||
await sortApiScenario({ ...params, testCollectionId: collectionId.value });
|
||||
Message.success(t('caseManagement.featureCase.sortSuccess'));
|
||||
loadCaseList();
|
||||
loadCaseList(false);
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(error);
|
||||
|
@ -8,9 +8,9 @@
|
||||
:count="props.modulesCount[props.activeModule] || 0"
|
||||
:name="moduleNamePath"
|
||||
:search-placeholder="t('ms.case.associate.searchPlaceholder')"
|
||||
@keyword-search="loadCaseList"
|
||||
@adv-search="loadCaseList"
|
||||
@refresh="loadCaseList"
|
||||
@keyword-search="loadCaseList()"
|
||||
@adv-search="loadCaseList()"
|
||||
@refresh="loadCaseList()"
|
||||
/>
|
||||
<MsBaseTable
|
||||
ref="tableRef"
|
||||
@ -23,6 +23,7 @@
|
||||
@drag-change="handleDragChange"
|
||||
@selected-change="handleTableSelect"
|
||||
@filter-change="getModuleCount"
|
||||
@module-change="loadCaseList(false)"
|
||||
>
|
||||
<template #num="{ record }">
|
||||
<MsButton type="text" @click="toCaseDetail(record)">{{ record.num }}</MsButton>
|
||||
@ -416,15 +417,17 @@
|
||||
}
|
||||
);
|
||||
|
||||
async function loadCaseList() {
|
||||
async function loadCaseList(refreshTreeCount = true) {
|
||||
const tableParams = await getTableParams(false);
|
||||
setLoadListParams(tableParams);
|
||||
loadList();
|
||||
emit('getModuleCount', {
|
||||
...tableParams,
|
||||
current: propsRes.value.msPagination?.current,
|
||||
pageSize: propsRes.value.msPagination?.pageSize,
|
||||
});
|
||||
if (refreshTreeCount) {
|
||||
emit('getModuleCount', {
|
||||
...tableParams,
|
||||
current: propsRes.value.msPagination?.current,
|
||||
pageSize: propsRes.value.msPagination?.pageSize,
|
||||
});
|
||||
}
|
||||
}
|
||||
watch(
|
||||
() => props.activeModule,
|
||||
@ -470,7 +473,7 @@
|
||||
try {
|
||||
await sortFeatureCase({ ...params, testCollectionId: collectionId.value });
|
||||
Message.success(t('caseManagement.featureCase.sortSuccess'));
|
||||
loadCaseList();
|
||||
loadCaseList(false);
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(error);
|
||||
|
@ -453,11 +453,6 @@
|
||||
done();
|
||||
}
|
||||
|
||||
function handleSuccess() {
|
||||
initDetail();
|
||||
loadActiveTabList();
|
||||
}
|
||||
|
||||
onBeforeMount(() => {
|
||||
initDetail();
|
||||
initPlanTree();
|
||||
|
Loading…
Reference in New Issue
Block a user