Pārlūkot izejas kodu

📦 非遗作品单独字段

imengyu 1 mēnesi atpakaļ
vecāks
revīzija
925ba5cc3c
1 mainītis faili ar 24 papildinājumiem un 5 dzēšanām
  1. 24 5
      src/pages/inhert/intangible/DetailsCommon.vue

+ 24 - 5
src/pages/inhert/intangible/DetailsCommon.vue

@@ -15,11 +15,16 @@
       },
       {
         id: 7,
-        name: `${commonRefName.startsWith('相关') ? '' : '非遗'}${commonRefName}`,
+        name: '非遗作品',
         visible: true,
       },
       {
         id: 8,
+        name: '相关非遗',
+        visible: true,
+      },
+      {
+        id: 9,
         name: '地理位置',
         visible: true,
       }
@@ -53,7 +58,20 @@
         />
       </template>
       <template v-else-if="tabCurrentId==7">
-        <!-- 非遗产品(作品) -->
+        <!-- 非遗作品 -->
+        <CommonListPage 
+          :showSearch="false"
+          :hasBg="false"
+          :load="(page: number, pageSize: number) => loadSubList(page, pageSize, content, 'worksList')"
+          :detailsPage="`/pages/inhert/product/details`"
+          :detailsParams="{
+            mainBodyColumnId: ProductsContent.mainBodyColumnId,
+            modelId: ProductsContent.modelId,
+          }"
+        />
+      </template>
+      <template v-else-if="tabCurrentId==8">
+        <!-- 相关非遗 -->
         <CommonListPage 
           :showSearch="false"
           :hasBg="false"
@@ -65,7 +83,7 @@
           }"
         />
       </template>
-      <template v-else-if="tabCurrentId==8">
+      <template v-else-if="tabCurrentId==9">
         <!-- 地理位置 -->
         <view class="d-flex flex-col mt-3 mb-2">
          <HomeTitle title="地理位置" />
@@ -178,8 +196,9 @@ async function load(id: number, tabsArray: Ref<TabControlItem[]>) {
   );
   tabsArray.value[4].visible = Boolean(d.ichSitesList && (d.ichSitesList as any[]).length > 0);
   tabsArray.value[5].visible = Boolean(d.inheritorsList && (d.inheritorsList as any[]).length > 0);
-  tabsArray.value[6].visible = Boolean(d.associationMeList && (d.associationMeList as any[]).length > 0);
-  tabsArray.value[7].visible = Boolean(d.longitude && d.latitude);
+  tabsArray.value[6].visible = Boolean(d.worksList && (d.worksList as any[]).length > 0);
+  tabsArray.value[7].visible = Boolean(d.associationMeList && (d.associationMeList as any[]).length > 0);
+  tabsArray.value[8].visible = Boolean(d.longitude && d.latitude);
   return d;
 }
 async function loadSubList(page: number, pageSize: number, content: any, subList: string) {