feat(工作台): 我创建的-页面
This commit is contained in:
parent
5054ccea61
commit
a98e0983bc
|
@ -55,7 +55,7 @@ const TestPlan: AppRouteRecordRaw = {
|
|||
{
|
||||
path: 'created',
|
||||
name: WorkbenchRouteEnum.WORKBENCH_INDEX_CREATED,
|
||||
component: () => import('@/views/workbench/homePage/index.vue'),
|
||||
component: () => import('@/views/workbench/myCreated/index.vue'),
|
||||
meta: {
|
||||
locale: 'menu.workbenchCreatedSort',
|
||||
roles: ['*'],
|
||||
|
|
|
@ -1732,6 +1732,7 @@
|
|||
defineExpose({
|
||||
fetchData,
|
||||
emitTableParams,
|
||||
isAdvancedSearchMode,
|
||||
});
|
||||
|
||||
await tableStore.initColumn(TableKeyEnum.TEST_PLAN_ALL_TABLE, columns, 'drawer');
|
||||
|
|
|
@ -292,9 +292,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
const isAdvancedSearchMode = ref(false);
|
||||
function handleAdvSearch(isStartAdvance: boolean) {
|
||||
isAdvancedSearchMode.value = isStartAdvance;
|
||||
const isAdvancedSearchMode = computed(() => planTableRef.value?.isAdvancedSearchMode);
|
||||
function handleAdvSearch() {
|
||||
setActiveFolder('all');
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -83,6 +83,7 @@
|
|||
|
||||
const props = defineProps<{
|
||||
project: string;
|
||||
type: 'my_follow' | 'my_create';
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
@ -206,14 +207,14 @@
|
|||
function goApiCase() {
|
||||
openNewPage(ApiTestRouteEnum.API_TEST_MANAGEMENT, {
|
||||
tab: 'case',
|
||||
view: 'my_follow',
|
||||
view: props.type,
|
||||
});
|
||||
}
|
||||
|
||||
function init() {
|
||||
setLoadListParams({
|
||||
projectId: props.project,
|
||||
viewId: 'my_follow',
|
||||
viewId: props.type,
|
||||
});
|
||||
loadList();
|
||||
}
|
|
@ -56,6 +56,7 @@
|
|||
|
||||
const props = defineProps<{
|
||||
project: string;
|
||||
type: 'my_follow' | 'my_create';
|
||||
}>();
|
||||
|
||||
const appStore = useAppStore();
|
||||
|
@ -223,14 +224,14 @@
|
|||
|
||||
function goBugList() {
|
||||
openNewPage(BugManagementRouteEnum.BUG_MANAGEMENT_INDEX, {
|
||||
view: 'my_follow',
|
||||
view: props.type,
|
||||
});
|
||||
}
|
||||
|
||||
function init() {
|
||||
setLoadListParams({
|
||||
projectId: props.project,
|
||||
viewId: 'my_follow',
|
||||
viewId: props.type,
|
||||
});
|
||||
loadList();
|
||||
}
|
|
@ -79,6 +79,7 @@
|
|||
|
||||
const props = defineProps<{
|
||||
project: string;
|
||||
type: 'my_follow' | 'my_create';
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
@ -168,14 +169,14 @@
|
|||
|
||||
function goCaseReview() {
|
||||
openNewPage(CaseManagementRouteEnum.CASE_MANAGEMENT_REVIEW, {
|
||||
view: 'my_follow',
|
||||
view: props.type,
|
||||
});
|
||||
}
|
||||
|
||||
function init() {
|
||||
setLoadListParams({
|
||||
projectId: props.project,
|
||||
viewId: 'my_follow',
|
||||
viewId: props.type,
|
||||
});
|
||||
loadList();
|
||||
}
|
|
@ -90,6 +90,7 @@
|
|||
|
||||
const props = defineProps<{
|
||||
project: string;
|
||||
type: 'my_follow' | 'my_create';
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
@ -244,14 +245,14 @@
|
|||
|
||||
function goScenario() {
|
||||
openNewPage(ApiTestRouteEnum.API_TEST_SCENARIO, {
|
||||
view: 'my_follow',
|
||||
view: props.type,
|
||||
});
|
||||
}
|
||||
|
||||
function init() {
|
||||
setLoadListParams({
|
||||
projectId: props.project,
|
||||
viewId: 'my_follow',
|
||||
viewId: props.type,
|
||||
});
|
||||
loadList();
|
||||
}
|
|
@ -70,6 +70,7 @@
|
|||
|
||||
const props = defineProps<{
|
||||
project: string;
|
||||
type: 'my_follow' | 'my_create';
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
@ -196,7 +197,7 @@
|
|||
function init() {
|
||||
setLoadListParams({
|
||||
projectId: props.project,
|
||||
viewId: 'my_follow',
|
||||
viewId: props.type,
|
||||
});
|
||||
loadList();
|
||||
}
|
||||
|
@ -208,7 +209,7 @@
|
|||
function goTestCase() {
|
||||
openNewPage(CaseManagementRouteEnum.CASE_MANAGEMENT_CASE, {
|
||||
showType: 'list',
|
||||
view: 'my_follow',
|
||||
view: props.type,
|
||||
});
|
||||
}
|
||||
</script>
|
|
@ -4,7 +4,7 @@
|
|||
<div class="cursor-pointer font-medium text-[var(--color-text-1)]" @click="goTestPlan">
|
||||
{{ t('ms.workbench.myFollowed.feature.TEST_PLAN') }}
|
||||
</div>
|
||||
<a-radio-group v-model="showType" type="button" class="file-show-type mr-2" @change="fetchData">
|
||||
<a-radio-group v-model="showType" type="button" class="file-show-type mr-2" size="small" @change="fetchData">
|
||||
<a-radio :value="testPlanTypeEnum.ALL" class="show-type-icon p-[2px]">
|
||||
{{ t('testPlan.testPlanIndex.all') }}
|
||||
</a-radio>
|
||||
|
@ -135,6 +135,7 @@
|
|||
|
||||
const props = defineProps<{
|
||||
project: string;
|
||||
type: 'my_follow' | 'my_create';
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
@ -280,7 +281,7 @@
|
|||
setLoadListParams({
|
||||
type: showType.value,
|
||||
projectId: props.project,
|
||||
viewId: 'my_follow',
|
||||
viewId: props.type,
|
||||
});
|
||||
loadList();
|
||||
}
|
||||
|
@ -288,7 +289,7 @@
|
|||
function goTestPlan() {
|
||||
openNewPage(TestPlanRouteEnum.TEST_PLAN_INDEX, {
|
||||
showType: showType.value,
|
||||
view: 'my_follow',
|
||||
view: props.type,
|
||||
});
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
<template>
|
||||
<div class="flex flex-col gap-[16px]">
|
||||
<div class="flex items-center justify-end gap-[12px]">
|
||||
<MsProjectSelect v-model:project="currentProject" class="w-[240px]" use-default-arrow-icon>
|
||||
<template #prefix>
|
||||
{{ t('menu.projectManagementShort') }}
|
||||
</template>
|
||||
</MsProjectSelect>
|
||||
<a-select
|
||||
v-model:model-value="features"
|
||||
:options="featureOptions"
|
||||
:max-tag-count="1"
|
||||
multiple
|
||||
class="w-[240px]"
|
||||
@change="handleFeatureChange"
|
||||
>
|
||||
<template #prefix>
|
||||
{{ t('project.messageManagement.function') }}
|
||||
</template>
|
||||
<template #header>
|
||||
<a-checkbox v-model:model-value="featureAll" class="ml-[8px]" @change="handleFeatureAllChange">
|
||||
{{ t('common.all') }}
|
||||
</a-checkbox>
|
||||
</template>
|
||||
</a-select>
|
||||
<a-button type="outline" class="arco-btn-outline--secondary p-[10px]" @click="handleRefresh">
|
||||
<MsIcon type="icon-icon_reset_outlined" size="14" />
|
||||
</a-button>
|
||||
</div>
|
||||
<testPlanTable v-if="features.includes(FeatureEnum.TEST_PLAN)" :project="currentProject" type="my_create" />
|
||||
<testCaseTable v-if="features.includes(FeatureEnum.TEST_CASE)" :project="currentProject" type="my_create" />
|
||||
<caseReviewTable v-if="features.includes(FeatureEnum.CASE_REVIEW)" :project="currentProject" type="my_create" />
|
||||
<apiCaseTable v-if="features.includes(FeatureEnum.API_CASE)" :project="currentProject" type="my_create" />
|
||||
<scenarioCaseTable v-if="features.includes(FeatureEnum.API_SCENARIO)" :project="currentProject" type="my_create" />
|
||||
<bugTable v-if="features.includes(FeatureEnum.BUG)" :project="currentProject" type="my_create" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
|
||||
import MsProjectSelect from '@/components/business/ms-project-select/index.vue';
|
||||
import apiCaseTable from '../components/apiCaseTable.vue';
|
||||
import bugTable from '../components/bugTable.vue';
|
||||
import caseReviewTable from '../components/caseReviewTable.vue';
|
||||
import scenarioCaseTable from '../components/scenarioCaseTable.vue';
|
||||
import testCaseTable from '../components/testCaseTable.vue';
|
||||
import testPlanTable from '../components/testPlanTable.vue';
|
||||
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
|
||||
import { FeatureEnum } from '@/enums/workbenchEnum';
|
||||
|
||||
const { t } = useI18n();
|
||||
const appStore = useAppStore();
|
||||
|
||||
const currentProject = ref(appStore.currentProjectId);
|
||||
const features = ref<FeatureEnum[]>(Object.values(FeatureEnum));
|
||||
const featureOptions = Object.keys(FeatureEnum).map((key) => ({
|
||||
label: t(`ms.workbench.myFollowed.feature.${key}`),
|
||||
value: key as FeatureEnum,
|
||||
}));
|
||||
const featureAll = ref(true);
|
||||
|
||||
function handleFeatureAllChange(val: boolean | (string | number | boolean)[]) {
|
||||
features.value = val ? featureOptions.map((item) => item.value) : [];
|
||||
}
|
||||
|
||||
function handleFeatureChange(
|
||||
val: string | number | boolean | Record<string, any> | (string | number | boolean | Record<string, any>)[]
|
||||
) {
|
||||
featureAll.value = (val as []).length === featureOptions.length;
|
||||
}
|
||||
|
||||
function handleRefresh() {
|
||||
console.log('refresh');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
|
@ -27,24 +27,24 @@
|
|||
<MsIcon type="icon-icon_reset_outlined" size="14" />
|
||||
</a-button>
|
||||
</div>
|
||||
<testPlanTable v-if="features.includes(FeatureEnum.TEST_PLAN)" :project="currentProject" />
|
||||
<testCaseTable v-if="features.includes(FeatureEnum.TEST_CASE)" :project="currentProject" />
|
||||
<caseReviewTable v-if="features.includes(FeatureEnum.CASE_REVIEW)" :project="currentProject" />
|
||||
<apiCaseTable v-if="features.includes(FeatureEnum.API_CASE)" :project="currentProject" />
|
||||
<scenarioCaseTable v-if="features.includes(FeatureEnum.API_SCENARIO)" :project="currentProject" />
|
||||
<bugTable v-if="features.includes(FeatureEnum.BUG)" :project="currentProject" />
|
||||
<testPlanTable v-if="features.includes(FeatureEnum.TEST_PLAN)" :project="currentProject" type="my_follow" />
|
||||
<testCaseTable v-if="features.includes(FeatureEnum.TEST_CASE)" :project="currentProject" type="my_follow" />
|
||||
<caseReviewTable v-if="features.includes(FeatureEnum.CASE_REVIEW)" :project="currentProject" type="my_follow" />
|
||||
<apiCaseTable v-if="features.includes(FeatureEnum.API_CASE)" :project="currentProject" type="my_follow" />
|
||||
<scenarioCaseTable v-if="features.includes(FeatureEnum.API_SCENARIO)" :project="currentProject" type="my_follow" />
|
||||
<bugTable v-if="features.includes(FeatureEnum.BUG)" :project="currentProject" type="my_follow" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
|
||||
import MsProjectSelect from '@/components/business/ms-project-select/index.vue';
|
||||
import apiCaseTable from './components/apiCaseTable.vue';
|
||||
import bugTable from './components/bugTable.vue';
|
||||
import caseReviewTable from './components/caseReviewTable.vue';
|
||||
import scenarioCaseTable from './components/scenarioCaseTable.vue';
|
||||
import testCaseTable from './components/testCaseTable.vue';
|
||||
import testPlanTable from './components/testPlanTable.vue';
|
||||
import apiCaseTable from '../components/apiCaseTable.vue';
|
||||
import bugTable from '../components/bugTable.vue';
|
||||
import caseReviewTable from '../components/caseReviewTable.vue';
|
||||
import scenarioCaseTable from '../components/scenarioCaseTable.vue';
|
||||
import testCaseTable from '../components/testCaseTable.vue';
|
||||
import testPlanTable from '../components/testPlanTable.vue';
|
||||
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
|
|
Loading…
Reference in New Issue