|
@@ -75,6 +75,9 @@
|
|
</a-tab-pane>
|
|
</a-tab-pane>
|
|
<a-tab-pane key="3" tab="作品">
|
|
<a-tab-pane key="3" tab="作品">
|
|
<EmptyToRecord title="作品" :model="inheritorData?.works" :showEdited="false" @edit="router.push({ name: 'FormWork' })">
|
|
<EmptyToRecord title="作品" :model="inheritorData?.works" :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?.works || []">
|
|
<a-list item-layout="horizontal" :data-source="inheritorData?.works || []">
|
|
<template #renderItem="{ item }">
|
|
<template #renderItem="{ item }">
|
|
<a-list-item>
|
|
<a-list-item>
|
|
@@ -86,6 +89,9 @@
|
|
<a-avatar :src="item.image" />
|
|
<a-avatar :src="item.image" />
|
|
</template>
|
|
</template>
|
|
</a-list-item-meta>
|
|
</a-list-item-meta>
|
|
|
|
+ <template #actions>
|
|
|
|
+ <a key="list-loadmore-edit" @click="router.push({ name: 'FormWork', query: { id: item.id } })">编辑</a>
|
|
|
|
+ </template>
|
|
</a-list-item>
|
|
</a-list-item>
|
|
</template>
|
|
</template>
|
|
</a-list>
|
|
</a-list>
|
|
@@ -128,6 +134,29 @@
|
|
</a-descriptions>
|
|
</a-descriptions>
|
|
</EmptyToRecord>
|
|
</EmptyToRecord>
|
|
</a-tab-pane>
|
|
</a-tab-pane>
|
|
|
|
+ <a-tab-pane key="5" tab="五年计划">
|
|
|
|
+ <EmptyToRecord title="五年计划" :model="planData" :showEdited="false" @edit="router.push({ name: 'FormPlan' })">
|
|
|
|
+ <div class="d-flex justify-content-end">
|
|
|
|
+ <a-button type="primary" @click="router.push({ name: 'FormPlan' })">+ 新增</a-button>
|
|
|
|
+ </div>
|
|
|
|
+ <a-list item-layout="horizontal" :data-source="planData">
|
|
|
|
+ <template #renderItem="{ item }">
|
|
|
|
+ <a-list-item>
|
|
|
|
+ <a-list-item-meta
|
|
|
|
+ :title="item.name"
|
|
|
|
+ :description="item.desc"
|
|
|
|
+ />
|
|
|
|
+ <template #actions>
|
|
|
|
+ <a-badge v-if="item.progress === -1" status="error" text="不通过" />
|
|
|
|
+ <a-badge v-else-if="item.progress === 0" status="processing" text="待审核" />
|
|
|
|
+ <a-badge v-else-if="item.progress === 1" status="success" text="已通过" />
|
|
|
|
+ <a key="list-loadmore-edit" @click="router.push({ name: 'FormPlan', query: { id: item.id } })">编辑</a>
|
|
|
|
+ </template>
|
|
|
|
+ </a-list-item>
|
|
|
|
+ </template>
|
|
|
|
+ </a-list>
|
|
|
|
+ </EmptyToRecord>
|
|
|
|
+ </a-tab-pane>
|
|
</a-tabs>
|
|
</a-tabs>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
@@ -135,9 +164,9 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
-import { onMounted, ref } from 'vue';
|
|
|
|
-import { useRouter } from 'vue-router';
|
|
|
|
-import type { IchInfo, InheritorInfo, SeminarInfo } from '@/api/inheritor/InheritorContent';
|
|
|
|
|
|
+import { onMounted, ref, watch } from 'vue';
|
|
|
|
+import { useRoute, useRouter } from 'vue-router';
|
|
|
|
+import type { IchInfo, InheritorInfo, PlanInfo, SeminarInfo } from '@/api/inheritor/InheritorContent';
|
|
import InheritorContent from '@/api/inheritor/InheritorContent';
|
|
import InheritorContent from '@/api/inheritor/InheritorContent';
|
|
import ImageGrid from '@/components/content/ImageGrid.vue';
|
|
import ImageGrid from '@/components/content/ImageGrid.vue';
|
|
import SimplePointedMap from '@/components/content/SimplePointedMap.vue';
|
|
import SimplePointedMap from '@/components/content/SimplePointedMap.vue';
|
|
@@ -145,15 +174,23 @@ import SimpleRichHtml from '@/components/display/SimpleRichHtml.vue';
|
|
import ShowValueOrNull from '@/components/dynamicf/Display/ShowValueOrNull.vue';
|
|
import ShowValueOrNull from '@/components/dynamicf/Display/ShowValueOrNull.vue';
|
|
import EmptyToRecord from '@/components/parts/EmptyToRecord.vue';
|
|
import EmptyToRecord from '@/components/parts/EmptyToRecord.vue';
|
|
|
|
|
|
-const activeKey = ref('1');
|
|
|
|
|
|
+const router = useRouter();
|
|
|
|
+const route = useRoute();
|
|
|
|
+const activeKey = ref(route.query.tab as string || '1');
|
|
const ichData = ref<IchInfo>();
|
|
const ichData = ref<IchInfo>();
|
|
const inheritorData = ref<InheritorInfo>();
|
|
const inheritorData = ref<InheritorInfo>();
|
|
const seminarData = ref<SeminarInfo>();
|
|
const seminarData = ref<SeminarInfo>();
|
|
-const router = useRouter();
|
|
|
|
|
|
+const planData = ref<PlanInfo[]>([]);
|
|
|
|
|
|
|
|
+watch(activeKey, (newValue) => {
|
|
|
|
+ router.replace({ query: { tab: newValue } });
|
|
|
|
+})
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
InheritorContent.getIchInfo().then(data => {
|
|
InheritorContent.getIchInfo().then(data => {
|
|
ichData.value = data;
|
|
ichData.value = data;
|
|
|
|
+ InheritorContent.getPlanList(ichData.value.id).then(data => {
|
|
|
|
+ planData.value = data;
|
|
|
|
+ });
|
|
});
|
|
});
|
|
InheritorContent.getInheritorInfo().then(data => {
|
|
InheritorContent.getInheritorInfo().then(data => {
|
|
inheritorData.value = data;
|
|
inheritorData.value = data;
|