소스 검색

📦 同步移动端相关修改,修改细节问题

快乐的梦鱼 4 주 전
부모
커밋
3a37bffbe7

+ 9 - 3
src/api/CommonContent.ts

@@ -198,7 +198,7 @@ export class GetContentDetailItem extends DataModel<GetContentDetailItem> {
     this.setNameMapperCase('Camel', 'Snake');
     this._convertTable = {
       id: { clientSide: 'number', serverSide: 'number', clientSideRequired: true },
-      title: { clientSide: 'string', serverSide: 'string', clientSideRequired: true },
+      title: { clientSide: 'string', serverSide: 'string' },
       content: { clientSide: 'string', serverSide: 'string' },
       isGuest: { clientSide: 'boolean', serverSide: 'number' },
       isLogin: { clientSide: 'boolean', serverSide: 'number' },
@@ -216,6 +216,12 @@ export class GetContentDetailItem extends DataModel<GetContentDetailItem> {
           clientSide: 'date',
           serverSide: 'string',
         };
+      else if (key.endsWith('List')) {
+        return [
+          { clientSide: 'map', serverSide: 'original'},
+          { clientSide: 'array', clientSideChildDataModel: GetContentDetailItem, serverSide: 'original' },
+        ]
+      }
       return undefined;
     };
     this._afterSolveServer = () => {
@@ -287,8 +293,8 @@ export class CommonContentApi extends AppServerRequestModule<DataModel> {
     this.debugName = debugName;
   }
 
-  protected mainBodyColumnId?: number;
-  protected modelId: number;
+  public mainBodyColumnId?: number;
+  public modelId: number;
   protected debugName: string;
 
   /**

+ 1 - 1
src/api/inheritor/ProjectsContent.ts

@@ -3,7 +3,7 @@ import { CommonContentApi } from '../CommonContent';
 export class ProjectsContentApi extends CommonContentApi {
 
   constructor() {
-    super(2, "非遗保护名录-非遗代表性项目", 258);
+    super(2, "非遗保护名录-非遗代表性项目",);
   }
 }
 

+ 1 - 1
src/api/introduction/SeaContent.ts

@@ -3,7 +3,7 @@ import { CommonContentApi } from '../CommonContent';
 export class SeaContentApi extends CommonContentApi {
 
   constructor() {
-    super(3, "闽南文化-海洋文化", 252);
+    super(3, "闽南文化-海洋文化", 254);
   }
 }
 

+ 33 - 0
src/assets/scss/news.scss

@@ -76,6 +76,24 @@
       transform: scale(0.95);
     }
 
+    .tags {
+      display: flex;
+      flex-direction: row;
+      flex-wrap: wrap;
+      column-gap: 10px;
+      row-gap: 10px;
+      margin-top: 15px;
+      margin-bottom: 10px;
+      font-size: 0.85rem;
+
+
+      > div {
+        border-radius: 15px;
+        padding: 0 15px;
+        background-color: $primary-dark-color;
+        color: $text-color-light;
+      }
+    }
     .extra {
       display: flex;
       flex-direction: column;
@@ -285,6 +303,10 @@
       flex-wrap: wrap;
       width: 50%;
 
+      &.hidden {
+        display: none;
+      }
+
       .label {
         width: 120px;
         color: $text-content-second-color;
@@ -301,8 +323,10 @@
   }
 
   .carousel {
+    position: relative;
     border-radius: 8px;
     overflow: hidden;
+    margin: 20px 0;
 
     img {
       width: 100%;
@@ -313,6 +337,15 @@
   }
 }
 
+@media (min-width: 808px) {
+  .news-detail .carousel {
+    width: 50%;
+    float: right;
+    margin: 0;
+    margin-left: 20px;
+  }
+}
+
 @media (max-width: 768px) {
   
 }

+ 1 - 0
src/common/utils/DateUtils.ts

@@ -385,6 +385,7 @@ function getDayGap(y: number, m: number, d: number) {
 const DateUtils = {
   FormatStrings: {
     YearChanese: "YYYY年MM月dd日",
+    YearCommonShort: 'YYYY-MM-dd',
     YearCommon: "YYYY-MM-dd HH:mm:ss",
   },
   /**

+ 21 - 3
src/components/content/CommonListBlock.vue

@@ -16,6 +16,10 @@
           <img src="@/assets/images/BackArrow.png" alt="返回" @click="back" />
           <h2>{{ title }}</h2>
         </div>
+        <!-- 标题 -->
+        <div v-if="showTotal" class="nav-back-title">
+          共有 {{ newsLoader.total }} 个{{ title }}
+        </div>
       </div>
       <!-- 右栏 -->
       <div class="col-sm-12 col-md-6 col-lg-6 d-flex flex-row justify-content-end align-items-start" style="gap:5px">
@@ -63,15 +67,25 @@
           <TitleDescBlock
             :title="item.title"
             :desc="item.desc || item.title"
-            :date="DateUtils.formatDate(item.publishAt, DateUtils.FormatStrings.YearCommon)"
           >
             <template #addon>
+              <div v-if="item.bottomTags" class="tags">
+                <div
+                  v-for="(tag, k) in item.bottomTags"
+                  :key="k"
+                >{{ tag }}</div>
+              </div>
               <div v-if="item.addItems" class="extra">
                 <div 
                   v-for="(addItem, k) in item.addItems" 
-                  :key="k" class="d-flex flex-row align-items-center">
+                  :key="k" 
+                  class="d-flex flex-row align-items-center"
+                  :class="[
+                    addItem.text ? '' : 'd-none',
+                  ]"
+                >
                   <span class="desc">{{ addItem.name }}:</span>
-                  <span>{{ addItem.text || '暂无' }}</span>
+                  <span>{{ addItem.text }}</span>
                 </div>
               </div>
             </template>
@@ -127,6 +141,10 @@ const props = defineProps({
     type: Boolean,
     default: false,
   },
+  showTotal: {
+    type: Boolean,
+    default: false, 
+  },
   prevPage: {
     type: Object as PropType<{
       title: string,

+ 1 - 1
src/components/parts/ImageTitleBlock.vue

@@ -5,7 +5,7 @@
       title ? 'has-title' : '',
       fit? 'fit' : ''
     ]" 
-    :style="{ backgroundImage: `url('${image || ImageFailed}')` }"
+    :style="{ backgroundImage: `url('${image || (title ? ImageFailed : '')}')` }"
     @click="$emit('click')"
   >
     <div class="desc">

+ 32 - 0
src/components/parts/IntroBlock.vue

@@ -0,0 +1,32 @@
+<template>
+  <div class="info-list mb-2">
+    <div 
+      v-for="(it, k) in descItems" 
+      :key="k"
+      :class="['entry',Boolean(it.value)?'':'hidden']"
+    >
+      <div class="label">{{ it.label }}</div>
+      <div class="value">{{ it.value }}</div>
+    </div>
+    <slot />
+  </div>
+</template>
+
+<script setup lang="ts">
+import type { PropType } from 'vue';
+
+const props = defineProps({	
+  title: {
+    type: String,
+    default: ''
+  },
+  address: {
+    type: String,
+    default: ''
+  },
+  descItems: {
+    type: Array as PropType<Array<{ label: string, value: any }>>,
+    default: () => []
+  },
+})
+</script>

+ 3 - 3
src/components/parts/TitleDescBlock.vue

@@ -6,7 +6,7 @@
     <slot name="addon" />
 
     <div class="footer">
-      <div v-if="showExpand" :class="'expand'+(expand?' on':'')" @click="expand=!expand">
+      <div v-if="showExpand && desc.length > 200" :class="'expand'+(expand?' on':'')" @click="expand=!expand">
         {{expand?'折叠':'展开'}}
         <img src="@/assets/images/IconArrowRight.png" />
       </div>
@@ -82,8 +82,8 @@ const emit = defineEmits([
   p {
     display: -webkit-box;
     -webkit-box-orient: vertical;
-    -webkit-line-clamp: 6;
-    line-clamp: 6;
+    -webkit-line-clamp: 5;
+    line-clamp: 5;
     margin: 0;
     overflow: hidden;
     text-overflow: ellipsis;

+ 1 - 1
src/views/AboutView.vue

@@ -152,7 +152,7 @@ const lawsData = useSimpleDataLoader(async () =>
       id: item.id,
       title: item.title,
       image: item.image || LawsTest,
-      date: DateUtils.formatDate(item.publishAt, DateUtils.FormatStrings.YearCommon),
+      date: DateUtils.formatDate(item.publishAt, DateUtils.FormatStrings.YearCommonShort),
     }))
 )
 

+ 1 - 1
src/views/InheritorView.vue

@@ -176,7 +176,7 @@ const list1 = [
     onClick: () => navTo('/inheritor/inheritor'),
   },
   {
-    title: '非遗产品(作品)',
+    title: '非遗作品',
     desc: '让文化因传承而永存',
     image: Image3,
     onClick: () => navTo('/inheritor/products'),

+ 60 - 38
src/views/details/ArtifactDetailView.vue

@@ -4,38 +4,53 @@
     :load="loadData"
   >
     <template #extraInfo="{ content }">
-      <div class="info-list mb-2">
-        <div class="entry">
-          <div class="label">开放时间:</div>
-          <div class="value">{{content.openStatusText || '暂无' }}</div>
-        </div>
-        <div class="entry">
-          <div class="label">年代:</div>
-          <div class="value">{{content.age || '暂无' }}</div>
-        </div>
-        <div class="entry">
-          <div class="label">文物类型:</div>
-          <div class="value">{{content.crTypeText || '暂无' }}</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 class="entry">
-          <div class="label">保护范围:</div>
-          <div class="value">
-            <SimpleRichHtml 
-              v-if="content.protectedArea"
-              :contents="[content.protectedArea as string]" 
-            />
-            <span v-else>暂无</span>
-          </div>
-        </div>
-      </div>
+      <IntroBlock
+        :descItems="[
+          {
+            label: '地址',
+            value: content.address
+          },
+          {
+            label: '开放时间',
+            value: content.openStatusText
+          },
+          {
+            label: '年代',
+            value: content.age 
+          },
+          {
+            label: '级别',
+            value: content.levelText 
+          },
+          {
+            label: '所属区域',
+            value: content.regionText ,
+          },
+          {
+            label: '文物类型',
+            value: content.crTypeText, 
+          },
+          {
+            label: '文物编码',
+            value: content.code,
+          }
+        ]"
+      />
+    </template>
+    <template #extraTab="{ currentTabId, content }">
+      <template v-if="currentTabId==4">
+        <!-- VR参观 -->
+        <iframe :src="(content.vr as string)" style="width: 100%;height: 80vh"/>
+      </template>
+      <template v-else-if="currentTabId==5">
+        <SimpleRichHtml :contents="[ content.protectedArea as string ]" /> 
+      </template>
+      <template v-else-if="currentTabId==6">
+        <SimpleRichHtml :contents="[ content.environment as string ]" /> 
+      </template>
+      <template v-else-if="currentTabId==7">
+        <SimpleRichHtml :contents="[ content.value as string ]" /> 
+      </template>
     </template>
   </TabDetailView>
 </template>
@@ -43,17 +58,24 @@
 <script setup lang="ts">
 import UnmoveableContent from '@/api/inheritor/UnmoveableContent';
 import TabDetailView from './TabDetailView.vue';
+import IntroBlock from '@/components/parts/IntroBlock.vue';
+import SimpleRichHtml from '@/components/display/SimpleRichHtml.vue';
 
 async function loadData(id: number) {
-  const res = await UnmoveableContent.getContentDetail(id);
-  res.contentProps = {
+  const d = await UnmoveableContent.getContentDetail(id);
+  d.contentProps = {
     tabs: [
-      { text: '文物基础信息', visible: true },
-      { text: '文物相册', visible: true },
-      { text: '文物视频', visible: true },
+      { id: 0, text: '文物基础信息', visible: true },
+      { id: 1, text: '文物相册', visible: true },
+      { id: 2, text: '文物音频', visible: Boolean(d.audio) },
+      { id: 3, text: '文物视频', visible: Boolean(d.video) },
+      { id: 4, text: 'VR参观', visible: Boolean(d.vr) },
+      { id: 5, text: '保护范围', visible: Boolean(d.protectedArea) },
+      { id: 6, text: '建筑环境', visible: Boolean(d.environment) },
+      { id: 7, text: '价值评估', visible: Boolean(d.value) },
     ]
   };
-  return res;
+  return d;
 }
 
 </script>

+ 92 - 29
src/views/details/IntangibleDetailView.vue

@@ -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>

+ 31 - 13
src/views/details/TabDetailView.vue

@@ -6,6 +6,7 @@
     <section class="main-section main-background main-background-type0 small-h">
       <SimplePageContentLoader :loader="loader">
         <div v-if="loader.content.value" class="content news-detail">
+          
           <div class="d-flex flex-row justify-content-start">
             <div class="back-button2" @click="back">
               <img src="@/assets/images/news/IconBack.png" />
@@ -21,19 +22,18 @@
           <!-- Tab -->
           <TagBar
             class="mb-3"
-            :tags="contentProps.tabs.filter(p => p.visible).map((p, i) => ({ id: i, name: p.text })) || []"
+            :tags="contentProps.tabs.filter(p => p.visible).map((p, i) => ({ id: p.id, name: p.text })) || []"
             :margin="[30, 70]" 
             v-model:selectedTag="currentTabIndex"
           />
-
           <!-- 基础信息 -->
-          <div v-if="currentTabIndex==0">
+          <div v-if="currentTabId==0">
             <!-- 轮播 -->
             <Carousel 
               :itemsToShow="1"
               wrapAround
               :autoPlay="5000"
-              class="carousel"
+              class="carousel float"
             >
               <Slide v-for="(image, key) in loader.content.value.images" :key="key">
                 <img :src="image" />
@@ -43,20 +43,17 @@
                 <Pagination />
               </template>
             </Carousel>
-
             <slot name="extraInfo" :content="loader.content.value" />
-
             <SimpleRichHtml 
               class="news-content"
               :contents="[
                 loader.content.value.intro,
-                loader.content.value.value,
                 loader.content.value.content,
               ]" 
             />
           </div>
           <!-- 图片 -->
-          <div v-else-if="currentTabIndex==1">
+          <div v-else-if="currentTabId==1">
             <ImageGrid
               v-if="loader.content.value.images && loader.content.value.images.length > 0"
               :data="loader.content.value.images"
@@ -66,8 +63,24 @@
             </ImageGrid>    
             <a-empty v-else />
           </div>
+          <!-- 音频 -->
+          <div v-else-if="currentTabId==2">
+            <video 
+              v-if="loader.content.value.video"
+              class="news-video mt-3"
+              controls
+              :src="loader.content.value.video" 
+            />
+            <video 
+              v-if="loader.content.value.audio"
+              class="news-video mt-3"
+              controls
+              :src="loader.content.value.audio" 
+            />
+            <a-empty v-if="!loader.content.value.video && !loader.content.value.audio" />
+          </div>
           <!-- 视频 -->
-          <div v-else-if="currentTabIndex==2">
+          <div v-else-if="currentTabId==3">
             <video 
               v-if="loader.content.value.video"
               class="news-video mt-3"
@@ -84,7 +97,7 @@
           </div>
           <!-- 其他 -->
           <div v-else>
-            <slot name="extraTab" :currentTabIndex="currentTabIndex" :content="loader.content.value" />
+            <slot name="extraTab" :currentTabIndex="currentTabIndex" :currentTabId="currentTabId" :content="loader.content.value" />
           </div>
 
           <ContentNode />
@@ -117,9 +130,9 @@ import SimplePageContentLoader from '@/components/content/SimplePageContentLoade
 import SimpleRichHtml from '@/components/display/SimpleRichHtml.vue';
 import { useLoadQuerys } from '@/composeable/PageQuerys';
 import { useSimpleDataLoader } from '@/composeable/SimpleDataLoader';
-import { useRouter } from 'vue-router';
+import { useRoute, useRouter } from 'vue-router';
 import ContentNode from '@/components/content/ContentNode.vue';
-import { computed, ref, type PropType } from 'vue';
+import { computed, ref, watch, type PropType } from 'vue';
 import TagBar from '@/components/content/TagBar.vue';
 import ImageGrid from '@/components/content/ImageGrid.vue';
 
@@ -138,6 +151,7 @@ function handleShowImage(url: string) {
   imagePreviewSrc.value = url;
 }
 
+const route = useRoute();
 const router = useRouter();
 const loader = useSimpleDataLoader<
   GetContentDetailItem, 
@@ -148,12 +162,15 @@ const loader = useSimpleDataLoader<
   if (!props.load)
     throw new Error("!props.load");
   return props.load(params.id);
-});
+}, false);
+
 
 const currentTabIndex = ref(0);
+const currentTabId = computed(() => contentProps.value.tabs[currentTabIndex.value]?.id || 0);
 const contentProps = computed(() => {
   return loader.content.value?.contentProps as {
     tabs: { 
+      id: number,
       text: string,
       visible: boolean,
     }[],
@@ -169,6 +186,7 @@ useLoadQuerys({
     router.push({ name: 'NotFound' });
     return;
   }
+  currentTabIndex.value = 0;
   loader.loadData({ id });
 })
 

+ 5 - 2
src/views/inheritor/inheritor.vue

@@ -9,6 +9,7 @@
     :loadDetail="loadDetail"
     :tagsData="tagsData"
     :defaultSelectTag="tagsData[0].id"
+    detailsPage="/inheritor/intangible-detail"
   />
 </template>
 
@@ -24,7 +25,8 @@ async function loadDetail(id: number, item: any) {
   item.content = item.content || item.intro as string;
   item.addItems = [
     { name: '传承项目', text: item.ichName },
-    { name: '非遗成就', text: item.prize },
+    { name: '级别', text: item.levelText },
+    { name: '民族', text: item.nation },
   ];
   return item;
 }
@@ -54,7 +56,8 @@ async function loadData(
         image: item.image,
         addItems: [
           { name: '传承项目', text: item.ichName },
-          { name: '非遗成就', text: item.prize },
+          { name: '级别', text: item.levelText },
+          { name: '民族', text: item.nation },
         ],
       };
     }),

+ 2 - 2
src/views/inheritor/products.vue

@@ -1,7 +1,7 @@
 <template>
-  <!-- 文化传承 - 非遗品 -->
+  <!-- 文化传承 - 非遗品 -->
   <CommonListPage
-    :title="'非遗产品(作品)'"
+    :title="'非遗作品'"
     :prevPage="{ title: '保护传承' }"
     :dropDownNames="dropdownNames"
     :pageSize="8"

+ 11 - 16
src/views/inheritor/projects.vue

@@ -16,21 +16,18 @@
 <script setup lang="ts">
 import CommonContent, { GetContentListParams } from '@/api/CommonContent';
 import ProjectsContent from '@/api/inheritor/ProjectsContent';
-import DateUtils from '@/common/utils/DateUtils';
 import type { DropDownNames } from '@/components/content/CommonListPage.vue';
 import { onMounted, ref } from 'vue';
 
-async function loadDetail(id: number, item: any) {
-  const res = await ProjectsContent.getContentDetail(id);
-  res.addItems = [
-    { name: '非遗编号', text: res.code, span: 12 },
-    { name: '非遗类别', text: res.ichTypeText, span: 12 },
-    { name: '申报地区', text: res.declarationRegion, span: 12 },
-    { name: '非遗级别', text: res.levelText, span: 12 },
-    { name: '批准时间', text: DateUtils.formatDate(res.approveTime as Date, DateUtils.FormatStrings.YearChanese), span: 12 },
-    { name: '流行地区', text: res.popularRegion, span: 12 },
+async function loadDetail(id: number, _item: any) {
+  const item = await ProjectsContent.getContentDetail(id);
+  item.addItems = [
+    { name: '非遗级别', text: item.levelText, span: 12 },
+    { name: '非遗类别', text: item.ichTypeText, span: 12 },
+    { name: '地区', text: item.district, span: 12 },
+    { name: '批次', text: item.batchText, span: 12 },
   ];
-  return res;
+  return item;
 }
 async function loadData(
   page: number, 
@@ -56,12 +53,10 @@ async function loadData(
         desc: item.desc,
         image: item.image,
         addItems: [
-          { name: '非遗编号', text: item.code, span: 12 },
-          { name: '非遗类别', text: item.ichTypeText, span: 12 },
-          { name: '申报地区', text: item.declarationRegion, span: 12 },
           { name: '非遗级别', text: item.levelText, span: 12 },
-          { name: '批准时间', text: DateUtils.formatDate(item.approveTime as Date, DateUtils.FormatStrings.YearChanese), span: 12 },
-          { name: '流行地区', text: item.popularRegion, span: 12 },
+          { name: '非遗类别', text: item.ichTypeText, span: 12 },
+          { name: '地区', text: item.district, span: 12 },
+          { name: '批次', text: item.batchText, span: 12 },
         ],
       };
     }),

+ 0 - 14
src/views/inheritor/seminar.vue

@@ -7,8 +7,6 @@
     :pageSize="8"
     :load="loadData"
     :loadDetail="loadDetail"
-    :tagsData="tagsData"
-    :defaultSelectTag="tagsData[0].id"
   />
 </template>
 
@@ -22,7 +20,6 @@ async function loadDetail(id: number, item: any) {
   const res = await SeminarContent.getContentDetail(id);
   res.addItems = [
     { name: '地理位置', text: res.address, span: 12 },
-    { name: '建筑时间', text: res.age, span: 12 },
     { name: '保护级别', text: res.levelText, span: 12 },
   ];
   return res;
@@ -36,7 +33,6 @@ async function loadData(
 ) {
 
   const res = await SeminarContent.getContentList(new GetContentListParams().setSelfValues({
-    crType: selectedTag == 0 ? undefined: selectedTag,
     level: dropDownValues[0] == 0 ? undefined: dropDownValues[0],
     region: dropDownValues[1] == 0 ? undefined: dropDownValues[1],
     keywords: searchText,
@@ -53,7 +49,6 @@ async function loadData(
         image: item.image,
         addItems: [
           { name: '地理位置', text: item.address, span: 12 },
-          { name: '建筑时间', text: item.age, span: 12 },
           { name: '保护级别', text: item.levelText, span: 12 },
         ],
       };
@@ -63,16 +58,7 @@ async function loadData(
 
 const dropdownNames = ref<DropDownNames[]>([]);
 
-//子分类
-const tagsData = ref([
-  { id: 0, name: '全部' },
-]);
-
 onMounted(async () => {
-  tagsData.value = tagsData.value.concat((await CommonContent.getCategoryList(3)).map((item) => ({
-    id: item.id,
-    name: item.title,
-  })));
   dropdownNames.value.push({ 
     options: [{
       id: 0, 

+ 1 - 1
src/views/introduction/custom.vue

@@ -30,7 +30,7 @@ async function loadData(
 ) {
 
   const res = await CustomContent.getContentList(new GetContentListParams().setSelfValues({
-    mainBodyColumnId: selectedTag,
+    mainBodyColumnId: selectedTag == tagsData.value[0].id ? tagsData.value.map(p => p.id) : selectedTag,
     keywords: searchText,
   }), page, pageSize);
 

+ 1 - 1
src/views/introduction/feature.vue

@@ -30,7 +30,7 @@ async function loadData(
 ) {
 
   const res = await FeatureContentApi.getContentList(new GetContentListParams().setSelfValues({
-    mainBodyColumnId: selectedTag,
+    mainBodyColumnId: selectedTag == tagsData.value[0].id ? tagsData.value.map(p => p.id) : selectedTag,
     keywords: searchText,
   }), page, pageSize);