|
@@ -123,11 +123,11 @@
|
|
|
</EmptyToRecord>
|
|
|
</a-tab-pane>
|
|
|
<a-tab-pane key="4" tab="作品">
|
|
|
- <EmptyToRecord title="作品" buttonText="新增作品" :loader="inheritorData" :showEdited="false" @edit="router.push({ name: 'FormWork' })">
|
|
|
+ <EmptyToRecord title="作品" buttonText="新增作品" :loader="ichData" :showEdited="false" @edit="router.push({ name: 'FormWork' })">
|
|
|
<div class="d-flex justify-content-end">
|
|
|
<a-button type="primary" @click="router.push({ name: 'FormWork' })">+ 新增</a-button>
|
|
|
</div>
|
|
|
- <a-list item-layout="horizontal" :data-source="inheritorData?.content.value?.works || []">
|
|
|
+ <a-list class="light-round" item-layout="horizontal" :data-source="worksData || []">
|
|
|
<template #renderItem="{ item }">
|
|
|
<a-list-item>
|
|
|
<a-list-item-meta
|
|
@@ -186,7 +186,7 @@
|
|
|
<script setup lang="ts">
|
|
|
import { onMounted, ref, watch } from 'vue';
|
|
|
import { useRoute, useRouter } from 'vue-router';
|
|
|
-import type { IchInfo, InheritorInfo, PlanInfo, SeminarInfo } from '@/api/inheritor/InheritorContent';
|
|
|
+import type { IchInfo, InheritorInfo, InheritorWorkInfo, PlanInfo, SeminarInfo } from '@/api/inheritor/InheritorContent';
|
|
|
import InheritorContent from '@/api/inheritor/InheritorContent';
|
|
|
import ImageGrid from '@/components/content/ImageGrid.vue';
|
|
|
import SimplePointedMap from '@/components/content/SimplePointedMap.vue';
|
|
@@ -201,6 +201,7 @@ const router = useRouter();
|
|
|
const route = useRoute();
|
|
|
const activeKey = ref(route.query.tab as string || '1');
|
|
|
const planData = ref<PlanInfo[]>([]);
|
|
|
+const worksData = ref<InheritorWorkInfo[]>([]);
|
|
|
const showInMessage = ref(false);
|
|
|
|
|
|
watch(activeKey, (newValue) => {
|
|
@@ -210,6 +211,11 @@ watch(activeKey, (newValue) => {
|
|
|
const ichData = useSimpleDataLoader(async () => {
|
|
|
const data = await InheritorContent.getIchInfo(undefined);
|
|
|
planData.value = await InheritorContent.getPlanList(data.id);
|
|
|
+ worksData.value = await InheritorContent.getIchWorksInfo({
|
|
|
+ ichId: data.id,
|
|
|
+ page: 1,
|
|
|
+ pageSize: 100,
|
|
|
+ });
|
|
|
return data;
|
|
|
});
|
|
|
const inheritorData = useSimpleDataLoader<InheritorInfo|null>(async () => {
|