fix(用例管理): 修改用例管理tab刷新&新增资源分享已删除页面
This commit is contained in:
parent
1a13f39a96
commit
ebde48f503
|
@ -54,3 +54,6 @@ export const NO_PROJECT_ROUTE_NAME = 'no-project';
|
|||
export const WHITEBOARD_INDEX = 'index';
|
||||
|
||||
export const WHITE_LIST_NAME = WHITE_LIST.map((el) => el.name);
|
||||
|
||||
// 全屏无资源页面用于分享全屏的页面
|
||||
export const NOT_FOUND_RESOURCE = 'notResourceScreen';
|
||||
|
|
|
@ -3,7 +3,15 @@ import { createRouter, createWebHashHistory } from 'vue-router';
|
|||
import 'nprogress/nprogress.css';
|
||||
import createRouteGuard from './guard';
|
||||
import appRoutes from './routes';
|
||||
import { INDEX_ROUTE, INVITE_ROUTE, NO_PROJECT, NO_RESOURCE, NOT_FOUND_ROUTE, REDIRECT_MAIN } from './routes/base';
|
||||
import {
|
||||
INDEX_ROUTE,
|
||||
INVITE_ROUTE,
|
||||
NO_PROJECT,
|
||||
NO_RESOURCE,
|
||||
NOT_FOUND_RESOURCE,
|
||||
NOT_FOUND_ROUTE,
|
||||
REDIRECT_MAIN,
|
||||
} from './routes/base';
|
||||
import NProgress from 'nprogress'; // progress bar
|
||||
|
||||
NProgress.configure({ showSpinner: false }); // NProgress Configuration
|
||||
|
@ -26,6 +34,7 @@ const router = createRouter({
|
|||
...appRoutes,
|
||||
REDIRECT_MAIN,
|
||||
NOT_FOUND_ROUTE,
|
||||
NOT_FOUND_RESOURCE,
|
||||
INVITE_ROUTE,
|
||||
NO_PROJECT,
|
||||
NO_RESOURCE,
|
||||
|
|
|
@ -69,3 +69,9 @@ export const NO_PROJECT: RouteRecordRaw = {
|
|||
hideInMenu: true,
|
||||
},
|
||||
};
|
||||
|
||||
export const NOT_FOUND_RESOURCE: RouteRecordRaw = {
|
||||
path: '/notResourceScreen',
|
||||
name: 'notResourceScreen',
|
||||
component: () => import('@/views/base/not-resource-screen/not-resource-screen.vue'),
|
||||
};
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import caseReportCom from './component/caseReportCom.vue';
|
||||
|
||||
import { getShareReportInfo, reportCaseDetail } from '@/api/modules/api-test/report';
|
||||
import { NO_RESOURCE_ROUTE_NAME } from '@/router/constants';
|
||||
import { NOT_FOUND_RESOURCE } from '@/router/constants';
|
||||
|
||||
import type { ReportDetail } from '@/models/apiTest/report';
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
|||
const res = await getShareReportInfo(route.query.shareId as string);
|
||||
if (res.deleted) {
|
||||
router.push({
|
||||
name: NO_RESOURCE_ROUTE_NAME,
|
||||
name: NOT_FOUND_RESOURCE,
|
||||
});
|
||||
} else {
|
||||
detail.value = await reportCaseDetail(res.reportId, route.query.shareId as string);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import ShareCom from './component/scenarioCom.vue';
|
||||
|
||||
import { getShareReportInfo, reportScenarioDetail } from '@/api/modules/api-test/report';
|
||||
import { NO_RESOURCE_ROUTE_NAME } from '@/router/constants';
|
||||
import { NOT_FOUND_RESOURCE } from '@/router/constants';
|
||||
|
||||
import type { ReportDetail } from '@/models/apiTest/report';
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
|||
const res = await getShareReportInfo(route.query.shareId as string);
|
||||
if (res.deleted) {
|
||||
router.push({
|
||||
name: NO_RESOURCE_ROUTE_NAME,
|
||||
name: NOT_FOUND_RESOURCE,
|
||||
});
|
||||
} else {
|
||||
detail.value = await reportScenarioDetail(res.reportId, route.query.shareId as string);
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
<template>
|
||||
<div class="absolute left-[50%] top-[50%] ml-[-95px] mt-[-121px] text-center">
|
||||
<div class="page">
|
||||
<div class="content-wrapper">
|
||||
<div class="content">
|
||||
<div class="no-resource-svg"></div>
|
||||
<div class="title">
|
||||
<span>{{ t('common.resourceDeleted') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
|
||||
const { t } = useI18n();
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.page {
|
||||
@apply h-full;
|
||||
|
||||
background-color: var(--color-text-fff);
|
||||
.content-wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
background-color: var(--color-text-fff);
|
||||
.content {
|
||||
.no-resource-svg {
|
||||
margin: 0 auto 24px;
|
||||
width: 160px;
|
||||
height: 98px;
|
||||
background: url('@/assets/svg/no_resource.svg');
|
||||
background-size: cover;
|
||||
}
|
||||
.title {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-size: 16px;
|
||||
color: var(--color-text-1);
|
||||
.user {
|
||||
margin-left: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -540,6 +540,15 @@
|
|||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.caseId,
|
||||
(val) => {
|
||||
if (val) {
|
||||
getFetch();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
getFetch();
|
||||
initFilterOptions();
|
||||
|
|
|
@ -273,7 +273,16 @@
|
|||
getFetch();
|
||||
}, 100);
|
||||
|
||||
onMounted(async () => {
|
||||
watch(
|
||||
() => props.caseId,
|
||||
(val) => {
|
||||
if (val) {
|
||||
getFetch();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
getFetch();
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -143,6 +143,15 @@
|
|||
});
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.caseId,
|
||||
(val) => {
|
||||
if (val) {
|
||||
initData();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
initData();
|
||||
});
|
||||
|
|
|
@ -255,6 +255,15 @@
|
|||
// }
|
||||
// );
|
||||
|
||||
watch(
|
||||
() => props.caseId,
|
||||
(val) => {
|
||||
if (val) {
|
||||
initData();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
doCheckIsTip();
|
||||
initData();
|
||||
|
|
|
@ -228,6 +228,15 @@
|
|||
return data;
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.caseId,
|
||||
(val) => {
|
||||
if (val) {
|
||||
getAllCommentList();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
getAllCommentList();
|
||||
});
|
||||
|
|
|
@ -171,6 +171,15 @@
|
|||
}
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props.funParams.caseId,
|
||||
(val) => {
|
||||
if (val) {
|
||||
initData();
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="less"></style>
|
||||
|
|
|
@ -235,6 +235,15 @@
|
|||
// }
|
||||
// );
|
||||
|
||||
watch(
|
||||
() => props.caseId,
|
||||
(val) => {
|
||||
if (val) {
|
||||
initData();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
initData();
|
||||
});
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
t('project.environmental.httpNoWarning')
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="grid grid-cols-4">
|
||||
<div class="grid grid-cols-6">
|
||||
<div class="col-start-1">
|
||||
<a-button
|
||||
v-if="!store.currentEnvDetailInfo.mock"
|
||||
|
@ -16,14 +16,13 @@
|
|||
>
|
||||
</div>
|
||||
|
||||
<div class="col-end-5 flex flex-row gap-[8px]">
|
||||
<div class="col-span-2 col-end-7 flex flex-row gap-[8px]">
|
||||
<a-input-number
|
||||
v-model:model-value="form.requestTimeout"
|
||||
:min="0"
|
||||
:step="100"
|
||||
:precision="0"
|
||||
:max="600000"
|
||||
class="w-[180px]"
|
||||
:disabled="isDisabled"
|
||||
>
|
||||
<template #prefix>
|
||||
|
@ -36,7 +35,6 @@
|
|||
:step="100"
|
||||
:max="600000"
|
||||
:precision="0"
|
||||
class="w-[180px]"
|
||||
:disabled="isDisabled"
|
||||
>
|
||||
<template #prefix>
|
||||
|
|
Loading…
Reference in New Issue