fix(接口测试): 增加场景详情中执行历史的执行结果抽屉&修改新建子模块样式
--bug=1038771 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001038771 --bug=1038703 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001038703
This commit is contained in:
parent
0527c0177a
commit
5d6d392768
|
@ -13,38 +13,38 @@ export default mergeConfig(
|
||||||
},
|
},
|
||||||
proxy: {
|
proxy: {
|
||||||
'/ws': {
|
'/ws': {
|
||||||
target: 'https://qadevtest.fit2cloud.com/',
|
target: 'http://172.16.200.18:8081/',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path: string) => path.replace(/^\/front\/ws/, ''),
|
rewrite: (path: string) => path.replace(/^\/front\/ws/, ''),
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
'/front': {
|
'/front': {
|
||||||
target: 'https://qadevtest.fit2cloud.com/',
|
target: 'http://172.16.200.18:8081/',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path: string) => path.replace(/^\/front/, ''),
|
rewrite: (path: string) => path.replace(/^\/front/, ''),
|
||||||
},
|
},
|
||||||
'/file': {
|
'/file': {
|
||||||
target: 'https://qadevtest.fit2cloud.com/',
|
target: 'http://172.16.200.18:8081/',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path: string) => path.replace(/^\/front\/file/, ''),
|
rewrite: (path: string) => path.replace(/^\/front\/file/, ''),
|
||||||
},
|
},
|
||||||
'/attachment': {
|
'/attachment': {
|
||||||
target: 'https://qadevtest.fit2cloud.com/',
|
target: 'http://172.16.200.18:8081/',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path: string) => path.replace(/^\/front\/attachment/, ''),
|
rewrite: (path: string) => path.replace(/^\/front\/attachment/, ''),
|
||||||
},
|
},
|
||||||
'/bug/attachment': {
|
'/bug/attachment': {
|
||||||
target: 'https://qadevtest.fit2cloud.com/',
|
target: 'http://172.16.200.18:8081/',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path: string) => path.replace(/^\/front\/bug\/attachment/, ''),
|
rewrite: (path: string) => path.replace(/^\/front\/bug\/attachment/, ''),
|
||||||
},
|
},
|
||||||
'/plugin/image': {
|
'/plugin/image': {
|
||||||
target: 'https://qadevtest.fit2cloud.com/',
|
target: 'http://172.16.200.18:8081/',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path: string) => path.replace(/^\/front\/plugin\/image/, ''),
|
rewrite: (path: string) => path.replace(/^\/front\/plugin\/image/, ''),
|
||||||
},
|
},
|
||||||
'/base-display': {
|
'/base-display': {
|
||||||
target: 'https://qadevtest.fit2cloud.com/',
|
target: 'http://172.16.200.18:8081/',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path: string) => path.replace(/^\/front\/base-display/, ''),
|
rewrite: (path: string) => path.replace(/^\/front\/base-display/, ''),
|
||||||
},
|
},
|
||||||
|
|
|
@ -69,34 +69,22 @@
|
||||||
<MsIcon :type="isExpandAll ? 'icon-icon_folder_collapse1' : 'icon-icon_folder_expansion1'" />
|
<MsIcon :type="isExpandAll ? 'icon-icon_folder_collapse1' : 'icon-icon_folder_expansion1'" />
|
||||||
</MsButton>
|
</MsButton>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<template v-if="!props.readOnly && !props.trash">
|
|
||||||
<a-dropdown @select="handleSelect">
|
|
||||||
<MsButton v-permission="['PROJECT_API_DEFINITION:READ+ADD']" type="icon" class="!mr-0 p-[2px]">
|
|
||||||
<MsIcon
|
|
||||||
type="icon-icon_create_planarity"
|
|
||||||
size="18"
|
|
||||||
class="text-[rgb(var(--primary-5))] hover:text-[rgb(var(--primary-4))]"
|
|
||||||
/>
|
|
||||||
</MsButton>
|
|
||||||
<template #content>
|
|
||||||
<a-doption v-permission="['PROJECT_API_DEFINITION:READ+ADD']" value="newApi">{{
|
|
||||||
t('apiTestManagement.newApi')
|
|
||||||
}}</a-doption>
|
|
||||||
<a-doption v-permission="['PROJECT_API_DEFINITION:READ+ADD']" value="addModule">{{
|
|
||||||
t('apiTestManagement.addSubModule')
|
|
||||||
}}</a-doption>
|
|
||||||
</template>
|
|
||||||
</a-dropdown>
|
|
||||||
<popConfirm
|
<popConfirm
|
||||||
|
v-if="hasAnyPermission(['PROJECT_API_DEFINITION:READ+ADD']) && !props.readOnly && !props.trash"
|
||||||
mode="add"
|
mode="add"
|
||||||
:all-names="rootModulesName"
|
:all-names="rootModulesName"
|
||||||
parent-id="NONE"
|
parent-id="NONE"
|
||||||
:add-module-api="addModule"
|
:add-module-api="addModule"
|
||||||
@add-finish="handleAddFinish"
|
@add-finish="handleAddFinish"
|
||||||
>
|
>
|
||||||
<span id="addModulePopSpan"></span>
|
<MsButton type="icon" class="!mr-0 p-[2px]">
|
||||||
|
<MsIcon
|
||||||
|
type="icon-icon_create_planarity"
|
||||||
|
size="18"
|
||||||
|
class="text-[rgb(var(--primary-5))] hover:text-[rgb(var(--primary-4))]"
|
||||||
|
/>
|
||||||
|
</MsButton>
|
||||||
</popConfirm>
|
</popConfirm>
|
||||||
</template>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a-divider class="my-[8px]" />
|
<a-divider class="my-[8px]" />
|
||||||
|
@ -283,9 +271,6 @@
|
||||||
case 'import':
|
case 'import':
|
||||||
emit('import');
|
emit('import');
|
||||||
break;
|
break;
|
||||||
case 'addModule':
|
|
||||||
document.querySelector('#addModulePopSpan')?.dispatchEvent(new Event('click'));
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,6 +97,8 @@
|
||||||
</MsButton>
|
</MsButton>
|
||||||
</template>
|
</template>
|
||||||
</ms-base-table>
|
</ms-base-table>
|
||||||
|
<!-- 场景报告抽屉 -->
|
||||||
|
<caseAndScenarioReportDrawer v-model:visible="showScenarioReportVisible" is-scenario :report-id="reportId" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -108,6 +110,7 @@
|
||||||
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
|
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
|
||||||
import { MsTableColumn } from '@/components/pure/ms-table/type';
|
import { MsTableColumn } from '@/components/pure/ms-table/type';
|
||||||
import useTable from '@/components/pure/ms-table/useTable';
|
import useTable from '@/components/pure/ms-table/useTable';
|
||||||
|
import caseAndScenarioReportDrawer from '@/views/api-test/components/caseAndScenarioReportDrawer.vue';
|
||||||
import ExecuteStatus from '@/views/api-test/scenario/components/executeStatus.vue';
|
import ExecuteStatus from '@/views/api-test/scenario/components/executeStatus.vue';
|
||||||
|
|
||||||
import { getExecuteHistory } from '@/api/modules/api-test/scenario';
|
import { getExecuteHistory } from '@/api/modules/api-test/scenario';
|
||||||
|
@ -241,7 +244,12 @@
|
||||||
loadExecuteHistoryList();
|
loadExecuteHistoryList();
|
||||||
}
|
}
|
||||||
|
|
||||||
function showResult(record: ExecuteHistoryItem) {}
|
const showScenarioReportVisible = ref(false);
|
||||||
|
const reportId = ref('');
|
||||||
|
function showResult(record: ExecuteHistoryItem) {
|
||||||
|
reportId.value = record.id;
|
||||||
|
showScenarioReportVisible.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
loadExecuteHistoryList();
|
loadExecuteHistoryList();
|
||||||
|
|
|
@ -30,30 +30,22 @@
|
||||||
<MsIcon :type="isExpandAll ? 'icon-icon_folder_collapse1' : 'icon-icon_folder_expansion1'" />
|
<MsIcon :type="isExpandAll ? 'icon-icon_folder_collapse1' : 'icon-icon_folder_expansion1'" />
|
||||||
</MsButton>
|
</MsButton>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<template v-if="!props.readOnly">
|
|
||||||
<a-dropdown @select="handleSelect">
|
|
||||||
<MsButton v-permission="['PROJECT_API_SCENARIO:READ+ADD']" type="icon" class="!mr-0 p-[2px]">
|
|
||||||
<MsIcon
|
|
||||||
type="icon-icon_create_planarity"
|
|
||||||
size="18"
|
|
||||||
class="text-[rgb(var(--primary-5))] hover:text-[rgb(var(--primary-4))]"
|
|
||||||
/>
|
|
||||||
</MsButton>
|
|
||||||
<template #content>
|
|
||||||
<a-doption value="newScenario">{{ t('apiScenario.createScenario') }}</a-doption>
|
|
||||||
<a-doption value="addModule">{{ t('apiScenario.createSubModule') }}</a-doption>
|
|
||||||
</template>
|
|
||||||
</a-dropdown>
|
|
||||||
<popConfirm
|
<popConfirm
|
||||||
|
v-if="hasAnyPermission(['PROJECT_API_SCENARIO:READ+ADD']) && !props.readOnly"
|
||||||
mode="add"
|
mode="add"
|
||||||
:all-names="rootModulesName"
|
:all-names="rootModulesName"
|
||||||
parent-id="NONE"
|
parent-id="NONE"
|
||||||
:add-module-api="addModule"
|
:add-module-api="addModule"
|
||||||
@add-finish="initModules"
|
@add-finish="initModules"
|
||||||
>
|
>
|
||||||
<span id="addModulePopSpan"></span>
|
<MsButton type="icon" class="!mr-0 p-[2px]">
|
||||||
|
<MsIcon
|
||||||
|
type="icon-icon_create_planarity"
|
||||||
|
size="18"
|
||||||
|
class="text-[rgb(var(--primary-5))] hover:text-[rgb(var(--primary-4))]"
|
||||||
|
/>
|
||||||
|
</MsButton>
|
||||||
</popConfirm>
|
</popConfirm>
|
||||||
</template>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a-divider class="my-[8px]" />
|
<a-divider class="my-[8px]" />
|
||||||
|
@ -184,22 +176,6 @@
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { openModal } = useModal();
|
const { openModal } = useModal();
|
||||||
|
|
||||||
function handleSelect(value: string | number | Record<string, any> | undefined) {
|
|
||||||
switch (value) {
|
|
||||||
case 'newScenario':
|
|
||||||
emit('newScenario');
|
|
||||||
break;
|
|
||||||
case 'import':
|
|
||||||
emit('import');
|
|
||||||
break;
|
|
||||||
case 'addModule':
|
|
||||||
document.querySelector('#addModulePopSpan')?.dispatchEvent(new Event('click'));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const virtualListProps = computed(() => {
|
const virtualListProps = computed(() => {
|
||||||
if (props.readOnly) {
|
if (props.readOnly) {
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue