|
@@ -1,44 +1,76 @@
|
|
|
<template>
|
|
|
- <!-- 文物详情页 -->
|
|
|
+ <!-- 非遗详情页 -->
|
|
|
<TabDetailView
|
|
|
:load="loadData"
|
|
|
>
|
|
|
<template #extraInfo="{ content }">
|
|
|
- <div class="info-list mb-2">
|
|
|
- <div class="entry">
|
|
|
- <div class="label">非遗类型:</div>
|
|
|
- <div class="value">{{content.ichTypeText || '暂无' }}</div>
|
|
|
- </div>
|
|
|
- <div class="entry">
|
|
|
- <div class="label">所属区域:</div>
|
|
|
- <div class="value">{{content.regionText || '暂无' }}</div>
|
|
|
- </div>
|
|
|
- <div class="entry">
|
|
|
- <div class="label">级别:</div>
|
|
|
- <div class="value">{{content.levelText || '暂无' }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <IntroBlock
|
|
|
+ :descItems="[
|
|
|
+ {
|
|
|
+ label: '地址',
|
|
|
+ value: content.address,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '项目级别',
|
|
|
+ value: content.levelText ,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '项目类别',
|
|
|
+ value: content.ichTypeText,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '批次时间',
|
|
|
+ value: content.batchText,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '所属区域',
|
|
|
+ value: content.regionText ,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '保护单位',
|
|
|
+ value: content.unit
|
|
|
+ },
|
|
|
+ ]"
|
|
|
+ />
|
|
|
</template>
|
|
|
- <template #extraTab="{ currentTabIndex, content }">
|
|
|
- <template v-if="currentTabIndex==3">
|
|
|
+ <template #extraTab="{ currentTabId, content }">
|
|
|
+ <template v-if="currentTabId==4">
|
|
|
<!-- 非遗产品(作品) -->
|
|
|
<CommonListBlock
|
|
|
+ :showTotal="true"
|
|
|
:showSearch="false"
|
|
|
- :load="(page: number, pageSize: number) => loadSubList(page, pageSize, content, 'product')"
|
|
|
+ :load="(page: number, pageSize: number) => loadSubList(page, pageSize, content, 'associationMeList')"
|
|
|
+ detailsPage="/inheritor/intangible-detail"
|
|
|
+ :detailsParams="{
|
|
|
+ mainBodyColumnId: ProjectsContent.mainBodyColumnId,
|
|
|
+ modelId: ProjectsContent.modelId,
|
|
|
+ }"
|
|
|
/>
|
|
|
</template>
|
|
|
- <template v-else-if="currentTabIndex==4">
|
|
|
+ <template v-else-if="currentTabId==5">
|
|
|
<!-- 非遗传习中心 -->
|
|
|
<CommonListBlock
|
|
|
+ :showTotal="true"
|
|
|
:showSearch="false"
|
|
|
:load="(page: number, pageSize: number) => loadSubList(page, pageSize, content, 'ichSitesList')"
|
|
|
+ detailsPage="/inheritor/intangible-detail"
|
|
|
+ :detailsParams="{
|
|
|
+ mainBodyColumnId: ProjectsContent.mainBodyColumnId,
|
|
|
+ modelId: ProjectsContent.modelId,
|
|
|
+ }"
|
|
|
/>
|
|
|
</template>
|
|
|
- <template v-else-if="currentTabIndex==5">
|
|
|
+ <template v-else-if="currentTabId==6">
|
|
|
<!-- 非遗传承人 -->
|
|
|
<CommonListBlock
|
|
|
+ :showTotal="true"
|
|
|
:showSearch="false"
|
|
|
:load="(page: number, pageSize: number) => loadSubList(page, pageSize, content, 'inheritorsList')"
|
|
|
+ detailsPage="/inheritor/intangible-detail"
|
|
|
+ :detailsParams="{
|
|
|
+ mainBodyColumnId: ProjectsContent.mainBodyColumnId,
|
|
|
+ modelId: ProjectsContent.modelId,
|
|
|
+ }"
|
|
|
/>
|
|
|
</template>
|
|
|
</template>
|
|
@@ -49,9 +81,37 @@
|
|
|
import TabDetailView from './TabDetailView.vue';
|
|
|
import ProjectsContent from '@/api/inheritor/ProjectsContent';
|
|
|
import CommonListBlock from '@/components/content/CommonListBlock.vue';
|
|
|
+import IntroBlock from '@/components/parts/IntroBlock.vue';
|
|
|
+import { useRoute } from 'vue-router';
|
|
|
+
|
|
|
+const route = useRoute();
|
|
|
|
|
|
async function loadSubList(page: number, pageSize: number, content: any, subList: string) {
|
|
|
const list = content[subList] as any[] || [];
|
|
|
+ if (subList == 'associationMeList') {
|
|
|
+ list.forEach((p) => {
|
|
|
+ p.bottomTags = [
|
|
|
+ p.levelText,
|
|
|
+ p.ichTypeText,
|
|
|
+ p.batchText,
|
|
|
+ ];
|
|
|
+ })
|
|
|
+ } else if (subList == 'ichSitesList') {
|
|
|
+ list.forEach((p) => {
|
|
|
+ p.bottomTags = [
|
|
|
+ content.levelText,
|
|
|
+ content.ichTypeText,
|
|
|
+ ];
|
|
|
+ })
|
|
|
+ } else if (subList == 'inheritorsList') {
|
|
|
+ list.forEach((p) => {
|
|
|
+ p.bottomTags = [
|
|
|
+ p.levelText,
|
|
|
+ p.nation,
|
|
|
+ content.ichTypeText,
|
|
|
+ ];
|
|
|
+ })
|
|
|
+ }
|
|
|
return {
|
|
|
page: page,
|
|
|
total: list.length,
|
|
@@ -60,18 +120,21 @@ async function loadSubList(page: number, pageSize: number, content: any, subList
|
|
|
}
|
|
|
|
|
|
async function loadData(id: number) {
|
|
|
- const res = await ProjectsContent.getContentDetail(id);
|
|
|
- res.contentProps = {
|
|
|
+ const d = await ProjectsContent.getContentDetail(id,
|
|
|
+ route.query.modelId ? Number(route.query.modelId) : undefined
|
|
|
+ );
|
|
|
+ d.contentProps = {
|
|
|
tabs: [
|
|
|
- { text: '非遗基础信息', visible: true },
|
|
|
- { text: '非遗相册', visible: true },
|
|
|
- { text: '非遗音视频', visible: true },
|
|
|
- { text: '非遗产品(作品)', visible: true },
|
|
|
- { text: '非遗传习中心', visible: true },
|
|
|
- { text: '非遗传承人', visible: true },
|
|
|
+ { id: 0, text: '简介', visible: true },
|
|
|
+ { id: 1, text: '相册', visible: d.images.length > 0 },
|
|
|
+ { id: 2, text: '音频', visible: Boolean(d.audio) },
|
|
|
+ { id: 3, text: '视频', visible: Boolean(d.video) },
|
|
|
+ { id: 4, text: '非遗作品', visible: Boolean(d.associationMeList && (d.associationMeList as any[]).length > 0) },
|
|
|
+ { id: 5, text: '非遗传习中心', visible: Boolean(d.ichSitesList && (d.ichSitesList as any[]).length > 0) },
|
|
|
+ { id: 6, text: '非遗传承人', visible: Boolean(d.inheritorsList && (d.inheritorsList as any[]).length > 0) },
|
|
|
]
|
|
|
};
|
|
|
- return res;
|
|
|
+ return d;
|
|
|
}
|
|
|
|
|
|
</script>
|