fix(全局): 部分bug修复
This commit is contained in:
parent
e93a648780
commit
09d8a97398
|
@ -95,6 +95,7 @@ export interface ApiScenarioTableItem {
|
||||||
status: RequestDefinitionStatus;
|
status: RequestDefinitionStatus;
|
||||||
customFields: ApiDefinitionCustomField[];
|
customFields: ApiDefinitionCustomField[];
|
||||||
scheduleConfig?: ApiScenarioScheduleConfig;
|
scheduleConfig?: ApiScenarioScheduleConfig;
|
||||||
|
lastReportId?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 场景列表查询参数
|
// 场景列表查询参数
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="flex items-center justify-start">
|
<div class="flex items-center justify-start">
|
||||||
<MsIcon :type="getExecutionResult().icon" :class="getExecutionResult()?.color" size="14" />
|
<MsIcon :type="getExecutionResult().icon || '-'" :class="getExecutionResult()?.color" size="14" />
|
||||||
<span class="ml-1">{{ t(getExecutionResult().label) }}</span>
|
<span class="ml-1">{{ t(getExecutionResult().label) }}</span>
|
||||||
<a-tooltip v-if="props.scriptIdentifier" :content="getMsg()">
|
<a-tooltip v-if="props.scriptIdentifier" :content="getMsg()">
|
||||||
<MsTag
|
<MsTag
|
||||||
|
|
|
@ -132,6 +132,8 @@
|
||||||
:module-type="ReportEnum.API_SCENARIO_REPORT"
|
:module-type="ReportEnum.API_SCENARIO_REPORT"
|
||||||
:status="record.lastReportStatus ? record.lastReportStatus : 'PENDING'"
|
:status="record.lastReportStatus ? record.lastReportStatus : 'PENDING'"
|
||||||
:script-identifier="record.scriptIdentifier"
|
:script-identifier="record.scriptIdentifier"
|
||||||
|
:class="record.lastReportId ? 'cursor-pointer' : ''"
|
||||||
|
@click="openScenarioReportDrawer(record)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #stepTotal="{ record }">
|
<template #stepTotal="{ record }">
|
||||||
|
@ -483,6 +485,12 @@
|
||||||
:batch-run-func="batchRunScenario"
|
:batch-run-func="batchRunScenario"
|
||||||
@finished="loadScenarioList"
|
@finished="loadScenarioList"
|
||||||
/>
|
/>
|
||||||
|
<!-- 场景报告抽屉 -->
|
||||||
|
<caseAndScenarioReportDrawer
|
||||||
|
v-model:visible="showScenarioReportVisible"
|
||||||
|
is-scenario
|
||||||
|
:report-id="tableRecord?.lastReportId || ''"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
@ -502,6 +510,7 @@
|
||||||
import type { CaseLevel } from '@/components/business/ms-case-associate/types';
|
import type { CaseLevel } from '@/components/business/ms-case-associate/types';
|
||||||
import type { MsTreeNodeData } from '@/components/business/ms-tree/types';
|
import type { MsTreeNodeData } from '@/components/business/ms-tree/types';
|
||||||
import apiStatus from '@/views/api-test/components/apiStatus.vue';
|
import apiStatus from '@/views/api-test/components/apiStatus.vue';
|
||||||
|
import caseAndScenarioReportDrawer from '@/views/api-test/components/caseAndScenarioReportDrawer.vue';
|
||||||
import ExecutionStatus from '@/views/api-test/report/component/reportStatus.vue';
|
import ExecutionStatus from '@/views/api-test/report/component/reportStatus.vue';
|
||||||
import BatchRunModal from '@/views/api-test/scenario/components/batchRunModal.vue';
|
import BatchRunModal from '@/views/api-test/scenario/components/batchRunModal.vue';
|
||||||
import operationScenarioModuleTree from '@/views/api-test/scenario/components/operationScenarioModuleTree.vue';
|
import operationScenarioModuleTree from '@/views/api-test/scenario/components/operationScenarioModuleTree.vue';
|
||||||
|
@ -1431,6 +1440,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const showScenarioReportVisible = ref(false);
|
||||||
|
function openScenarioReportDrawer(record: ApiScenarioTableItem) {
|
||||||
|
if (record.lastReportId) {
|
||||||
|
tableRecord.value = record;
|
||||||
|
showScenarioReportVisible.value = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
loadScenarioList();
|
loadScenarioList();
|
||||||
});
|
});
|
||||||
|
|
|
@ -501,8 +501,16 @@
|
||||||
recycleModulesCount.value = res.all;
|
recycleModulesCount.value = res.all;
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshTree(params: ApiScenarioGetModuleParams) {
|
const tempTableQueryParams = ref<ApiScenarioGetModuleParams>();
|
||||||
scenarioModuleTreeRef.value?.initModuleCount(params);
|
function refreshTree(params?: ApiScenarioGetModuleParams) {
|
||||||
|
tempTableQueryParams.value = params;
|
||||||
|
if (params) {
|
||||||
|
scenarioModuleTreeRef.value?.initModuleCount(params);
|
||||||
|
} else {
|
||||||
|
scenarioModuleTreeRef.value?.initModuleCount({
|
||||||
|
projectId: appStore.currentProjectId,
|
||||||
|
});
|
||||||
|
}
|
||||||
selectRecycleCount();
|
selectRecycleCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -621,6 +629,7 @@
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
refreshTree(tempTableQueryParams.value);
|
||||||
Message.success(activeScenarioTab.value.isNew ? t('common.createSuccess') : t('common.saveSuccess'));
|
Message.success(activeScenarioTab.value.isNew ? t('common.createSuccess') : t('common.saveSuccess'));
|
||||||
activeScenarioTab.value.unSaved = false;
|
activeScenarioTab.value.unSaved = false;
|
||||||
saveLoading.value = false;
|
saveLoading.value = false;
|
||||||
|
|
|
@ -2,7 +2,7 @@ export default {
|
||||||
'system.config.parameterConfig': '系统参数配置',
|
'system.config.parameterConfig': '系统参数配置',
|
||||||
'system.config.baseConfig': '基础设置',
|
'system.config.baseConfig': '基础设置',
|
||||||
'system.config.pageConfig': '界面设置',
|
'system.config.pageConfig': '界面设置',
|
||||||
'system.config.qrCodeConfig': '扫码登陆',
|
'system.config.qrCodeConfig': '扫码登录',
|
||||||
'system.config.authConfig': '认证设置',
|
'system.config.authConfig': '认证设置',
|
||||||
'system.config.baseInfo': '基本信息',
|
'system.config.baseInfo': '基本信息',
|
||||||
'system.config.update': '更新',
|
'system.config.update': '更新',
|
||||||
|
|
Loading…
Reference in New Issue