feat(测试计划&项目管理): 项目管理环境host调整&测试计划报告自动跳转详情

This commit is contained in:
xinxin.wu 2024-09-09 17:09:39 +08:00 committed by Craftsman
parent 4a480830f3
commit 7b6ebc3132
6 changed files with 17 additions and 16 deletions

View File

@ -15,7 +15,7 @@
</Suspense> --> </Suspense> -->
<Suspense> <Suspense>
<keep-alive :include="cacheStore.cacheViews"> <keep-alive :include="cacheStore.cacheViews">
<component :is="Component" :key="route.fullPath" /> <component :is="Component" :key="route.name" />
</keep-alive> </keep-alive>
</Suspense> </Suspense>
</div> </div>

View File

@ -452,6 +452,7 @@
}); });
function updateHandler() { function updateHandler() {
showDrawerVisible.value = false;
router.push({ router.push({
name: RouteEnum.BUG_MANAGEMENT_DETAIL, name: RouteEnum.BUG_MANAGEMENT_DETAIL,
query: { query: {

View File

@ -359,6 +359,7 @@
} }
function updateHandler(type: string) { function updateHandler(type: string) {
showDrawerVisible.value = false;
router.push({ router.push({
name: CaseManagementRouteEnum.CASE_MANAGEMENT_CASE_DETAIL, name: CaseManagementRouteEnum.CASE_MANAGEMENT_CASE_DETAIL,
query: { query: {

View File

@ -1792,12 +1792,12 @@
} }
async function mountedLoad() { async function mountedLoad() {
await initFilter();
await initData();
getCaseExportData();
if (route.query.id) { if (route.query.id) {
showCaseDetail(route.query.id as string, -1); showCaseDetail(route.query.id as string, -1);
} }
await initFilter();
initData();
getCaseExportData();
} }
watch( watch(

View File

@ -78,10 +78,7 @@
type: 'input', type: 'input',
label: 'project.environmental.host.ip', label: 'project.environmental.host.ip',
placeholder: 'project.environmental.host.ipPlaceholder', placeholder: 'project.environmental.host.ipPlaceholder',
rules: [ rules: [{ required: true, message: t('project.environmental.host.ipIsRequire') }],
{ required: true, message: t('project.environmental.host.ipIsRequire') },
{ notRepeat: true, message: t('project.environmental.host.ipNotRepeat') },
],
}, },
{ {
field: 'domain', field: 'domain',

View File

@ -408,15 +408,22 @@
const showPlanDrawer = ref(false); const showPlanDrawer = ref(false);
// TODO //
async function handleGenerateReport() { async function handleGenerateReport() {
try { try {
loading.value = true; loading.value = true;
await generateReport({ const reportId = await generateReport({
projectId: appStore.currentProjectId, projectId: appStore.currentProjectId,
testPlanId: detail.value.id as string, testPlanId: detail.value.id as string,
triggerMode: 'MANUAL', triggerMode: 'MANUAL',
}); });
router.push({
name: TestPlanRouteEnum.TEST_PLAN_REPORT_DETAIL,
query: {
id: reportId,
type: testPlanTypeEnum.TEST_PLAN,
},
});
Message.success(t('testPlan.testPlanDetail.successfullyGenerated')); Message.success(t('testPlan.testPlanDetail.successfullyGenerated'));
} catch (error) { } catch (error) {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
@ -425,14 +432,9 @@
loading.value = false; loading.value = false;
} }
} }
// TODO //
function configReportHandler() { function configReportHandler() {
try { try {
// await generateReport({
// projectId: appStore.currentProjectId,
// testPlanId: record.id,
// triggerMode: 'MANUAL',
// });
router.push({ router.push({
name: TestPlanRouteEnum.TEST_PLAN_INDEX_CONFIG, name: TestPlanRouteEnum.TEST_PLAN_INDEX_CONFIG,
query: { query: {