|
@@ -19,12 +19,45 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
+ <template #extraTab="{ currentTabIndex, content }">
|
|
|
+ <template v-if="currentTabIndex==3">
|
|
|
+ <!-- 非遗产品(作品) -->
|
|
|
+ <CommonListBlock
|
|
|
+ :showSearch="false"
|
|
|
+ :load="(page: number, pageSize: number) => loadSubList(page, pageSize, content, 'product')"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template v-else-if="currentTabIndex==4">
|
|
|
+ <!-- 非遗传习中心 -->
|
|
|
+ <CommonListBlock
|
|
|
+ :showSearch="false"
|
|
|
+ :load="(page: number, pageSize: number) => loadSubList(page, pageSize, content, 'ichSitesList')"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template v-else-if="currentTabIndex==5">
|
|
|
+ <!-- 非遗传承人 -->
|
|
|
+ <CommonListBlock
|
|
|
+ :showSearch="false"
|
|
|
+ :load="(page: number, pageSize: number) => loadSubList(page, pageSize, content, 'inheritorsList')"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
</TabDetailView>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import TabDetailView from './TabDetailView.vue';
|
|
|
import ProjectsContent from '@/api/inheritor/ProjectsContent';
|
|
|
+import CommonListBlock from '@/components/content/CommonListBlock.vue';
|
|
|
+
|
|
|
+async function loadSubList(page: number, pageSize: number, content: any, subList: string) {
|
|
|
+ const list = content[subList] as any[] || [];
|
|
|
+ return {
|
|
|
+ page: page,
|
|
|
+ total: list.length,
|
|
|
+ data: list.slice((page - 1) * pageSize, page * pageSize)
|
|
|
+ };
|
|
|
+}
|
|
|
|
|
|
async function loadData(id: number) {
|
|
|
const res = await ProjectsContent.getContentDetail(id);
|
|
@@ -32,8 +65,10 @@ async function loadData(id: number) {
|
|
|
tabs: [
|
|
|
{ text: '非遗基础信息', visible: true },
|
|
|
{ text: '非遗相册', visible: true },
|
|
|
- { text: '非遗视频', visible: true },
|
|
|
- { text: '非遗音频', visible: true },
|
|
|
+ { text: '非遗音视频', visible: true },
|
|
|
+ { text: '非遗产品(作品)', visible: true },
|
|
|
+ { text: '非遗传习中心', visible: true },
|
|
|
+ { text: '非遗传承人', visible: true },
|
|
|
]
|
|
|
};
|
|
|
return res;
|