|
|
@@ -4,35 +4,35 @@
|
|
|
:load="load"
|
|
|
:extraTabs="[
|
|
|
{
|
|
|
- id: 5,
|
|
|
+ id: TAB_ID_ICH_SITES,
|
|
|
text: '传习所',
|
|
|
visible: true,
|
|
|
},
|
|
|
{
|
|
|
- id: 6,
|
|
|
+ id: TAB_ID_INHERITORS,
|
|
|
text: '传承人',
|
|
|
visible: true,
|
|
|
},
|
|
|
{
|
|
|
- id: 7,
|
|
|
+ id: TAB_ID_PEDIGREE,
|
|
|
text: '传承谱系',
|
|
|
width: 180,
|
|
|
visible: true,
|
|
|
},
|
|
|
{
|
|
|
- id: 8,
|
|
|
+ id: TAB_ID_WORKS,
|
|
|
text: '非遗作品',
|
|
|
width: 180,
|
|
|
visible: true,
|
|
|
},
|
|
|
{
|
|
|
- id: 9,
|
|
|
+ id: TAB_ID_ASSOCIATION_ME,
|
|
|
text: '相关资讯',
|
|
|
width: 180,
|
|
|
visible: true,
|
|
|
},
|
|
|
{
|
|
|
- id: 10,
|
|
|
+ id: TAB_ID_LOCATION,
|
|
|
text: '地理位置',
|
|
|
width: 180,
|
|
|
visible: true,
|
|
|
@@ -40,7 +40,7 @@
|
|
|
]"
|
|
|
>
|
|
|
<template #extraTabs="{ content, tabCurrentId }">
|
|
|
- <template v-if="tabCurrentId==5">
|
|
|
+ <template v-if="tabCurrentId==TAB_ID_ICH_SITES">
|
|
|
<!-- 非遗传习中心 -->
|
|
|
<CommonListPage
|
|
|
:showSearch="false"
|
|
|
@@ -53,7 +53,7 @@
|
|
|
}"
|
|
|
/>
|
|
|
</template>
|
|
|
- <template v-else-if="tabCurrentId==6">
|
|
|
+ <template v-else-if="tabCurrentId==TAB_ID_INHERITORS">
|
|
|
<!-- 非遗传承人 -->
|
|
|
<CommonListPage
|
|
|
:showSearch="false"
|
|
|
@@ -66,12 +66,13 @@
|
|
|
}"
|
|
|
/>
|
|
|
</template>
|
|
|
- <template v-else-if="tabCurrentId==7">
|
|
|
+ <template v-else-if="tabCurrentId==TAB_ID_PEDIGREE">
|
|
|
+ <!-- 传承谱系 -->
|
|
|
<view class="d-flex flex-col mt-3 mb-2">
|
|
|
<Parse :content="content.pedigree" :tagStyle="commonParserStyle" />
|
|
|
</view>
|
|
|
</template>
|
|
|
- <template v-else-if="tabCurrentId==8">
|
|
|
+ <template v-else-if="tabCurrentId==TAB_ID_WORKS">
|
|
|
<!-- 非遗作品 -->
|
|
|
<CommonListPage
|
|
|
:showSearch="false"
|
|
|
@@ -84,7 +85,7 @@
|
|
|
}"
|
|
|
/>
|
|
|
</template>
|
|
|
- <template v-else-if="tabCurrentId==9">
|
|
|
+ <template v-else-if="tabCurrentId==TAB_ID_ASSOCIATION_ME">
|
|
|
<!-- 相关资讯 -->
|
|
|
<CommonListPage
|
|
|
:showSearch="false"
|
|
|
@@ -97,7 +98,7 @@
|
|
|
}"
|
|
|
/>
|
|
|
</template>
|
|
|
- <template v-else-if="tabCurrentId==10">
|
|
|
+ <template v-else-if="tabCurrentId==TAB_ID_LOCATION">
|
|
|
<!-- 地理位置 -->
|
|
|
<view class="d-flex flex-col mt-3 mb-2">
|
|
|
<HomeTitle title="地理位置" />
|
|
|
@@ -213,15 +214,15 @@
|
|
|
</DetailTabPage>
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
-import DetailTabPage from "@/pages/article/common/DetailTabPage.vue";
|
|
|
-import ProjectsContent from "@/api/inheritor/ProjectsContent";
|
|
|
-import CommonListPage from "@/pages/article/common/CommonListPage.vue";
|
|
|
-import IntroBlock from "@/pages/article/common/IntroBlock.vue";
|
|
|
+import { ref } from "vue";
|
|
|
import { useLoadQuerys } from "@/common/composeabe/LoadQuerys";
|
|
|
-import type { TabControlItem } from "@/common/composeabe/TabControl";
|
|
|
-import { h, ref, type Ref } from "vue";
|
|
|
+import { useTabId } from "@/common/composeabe/TabControl";
|
|
|
import { navTo } from "@/components/utils/PageAction";
|
|
|
import { StringUtils } from "@imengyu/imengyu-utils";
|
|
|
+import DetailTabPage, { type DetailTabPageTabsArray } from "@/pages/article/common/DetailTabPage.vue";
|
|
|
+import ProjectsContent from "@/api/inheritor/ProjectsContent";
|
|
|
+import CommonListPage from "@/pages/article/common/CommonListPage.vue";
|
|
|
+import IntroBlock from "@/pages/article/common/IntroBlock.vue";
|
|
|
import InheritorContent from "@/api/inheritor/InheritorContent";
|
|
|
import ProductsContent from "@/api/inheritor/ProductsContent";
|
|
|
import SeminarContent from "@/api/inheritor/SeminarContent";
|
|
|
@@ -241,18 +242,26 @@ defineProps({
|
|
|
},
|
|
|
})
|
|
|
|
|
|
-async function load(id: number, tabsArray: Ref<TabControlItem[]>) {
|
|
|
+const { nextId } = useTabId({ idStart: 4 });
|
|
|
+const TAB_ID_ICH_SITES = nextId();
|
|
|
+const TAB_ID_INHERITORS = nextId();
|
|
|
+const TAB_ID_PEDIGREE = nextId();
|
|
|
+const TAB_ID_WORKS = nextId();
|
|
|
+const TAB_ID_ASSOCIATION_ME = nextId();
|
|
|
+const TAB_ID_LOCATION = nextId();
|
|
|
+
|
|
|
+async function load(id: number, tabsArray: DetailTabPageTabsArray) {
|
|
|
const d = await ProjectsContent.getContentDetail(
|
|
|
id,
|
|
|
undefined,
|
|
|
querys.value.modelId > 0 ? querys.value.modelId : undefined
|
|
|
);
|
|
|
- tabsArray.value[4].visible = Boolean(d.ichSitesList && (d.ichSitesList as any[]).length > 0);
|
|
|
- tabsArray.value[5].visible = Boolean(d.inheritorsList && (d.inheritorsList as any[]).length > 0);
|
|
|
- tabsArray.value[6].visible = Boolean(d.pedigree);
|
|
|
- tabsArray.value[7].visible = Boolean(d.worksList && (d.worksList as any[]).length > 0);
|
|
|
- tabsArray.value[8].visible = Boolean(d.associationMeList && (d.associationMeList as any[]).length > 0);
|
|
|
- tabsArray.value[9].visible = Boolean(d.longitude && d.latitude);
|
|
|
+ tabsArray.getTabById(TAB_ID_ICH_SITES)!.visible = Boolean(d.ichSitesList && (d.ichSitesList as any[]).length > 0);
|
|
|
+ tabsArray.getTabById(TAB_ID_INHERITORS)!.visible = Boolean(d.inheritorsList && (d.inheritorsList as any[]).length > 0);
|
|
|
+ tabsArray.getTabById(TAB_ID_PEDIGREE)!.visible = Boolean(d.pedigree);
|
|
|
+ tabsArray.getTabById(TAB_ID_WORKS)!.visible = false && Boolean(d.worksList && (d.worksList as any[]).length > 0);
|
|
|
+ tabsArray.getTabById(TAB_ID_ASSOCIATION_ME)!.visible = Boolean(d.associationMeList && (d.associationMeList as any[]).length > 0);
|
|
|
+ tabsArray.getTabById(TAB_ID_LOCATION)!.visible = Boolean(d.longitude && d.latitude);
|
|
|
return d;
|
|
|
}
|
|
|
async function loadSubList(page: number, pageSize: number, content: any, subList: string) {
|