Просмотр исходного кода

🎨 按要求修改默认采集列表读取接口数据

快乐的梦鱼 недель назад: 2
Родитель
Сommit
edbff10903

+ 1 - 1
src/api/inhert/VillageApi.ts

@@ -351,7 +351,7 @@ export class VillageApi extends AppServerRequestModule<DataModel> {
     const res = await this.get<any[]>('/village/village/getCatalogList', '村落目录列表', {
       village_id: villageId,
       village_volunteer_id: volunteerId,
-      pid: pid === 0 ? undefined : pid,
+      pid: pid,
     });
     return transformArrayDataModel<VillageCatalogListItem>(VillageCatalogListItem, res.data ?? [], `村落目录列表`, true);
   }

+ 0 - 1
src/pages/dig/admin/preview.vue

@@ -33,7 +33,6 @@
       <CollectModuleList
         :villageId="querys.villageId"
         :villageVolunteerId="querys.villageVolunteerId"
-        :taskName="''"
         :taskTitle="''"
         :taskPid="0"
         isView

+ 0 - 2
src/pages/dig/forms/task.vue

@@ -3,7 +3,6 @@
     <CollectModuleList
       :villageId="querys.villageId"
       :villageVolunteerId="querys.villageVolunteerId"
-      :taskName="querys.taskName"
       :taskTitle="querys.taskTitle"
       :taskPid="querys.taskPid"
       :isView="querys.isView"
@@ -19,7 +18,6 @@ import FlexCol from '@/components/layout/FlexCol.vue';
 const { querys } = useLoadQuerys({ 
   villageId: 0,
   villageVolunteerId: 0,
-  taskName: '',
   taskTitle: '',
   taskPid: 0,
   isView: false,

+ 0 - 359
src/pages/dig/forms/tasks.ts

@@ -15,363 +15,4 @@ export type TaskMenuDefItem = {
     name: string;
   }|TaskMenuDefGoForm;
   onClick?: () => void;
-}
-
-export const TaskRootDef : TaskMenuDefItem[] = [
-  {
-    title: '村落概况',
-    desc: '探索村落的历史渊源与发生轨迹',
-    icon: 'icon-task-summary',
-    enable: 'overview',
-    name: 'overview',
-    goForm: {
-      title: '村落概况',
-      name: 'overview',
-    }
-  },
-  {
-    title: '历史文化',
-    desc: '传承百年文化遗产和精神财富',
-    icon: 'icon-task-history',
-    enable: true,
-    name: 'history',
-    goForm: {
-      title: '历史文化',
-      name: 'history',
-    }
-  },
-  {
-    title: '非物质文化遗产项目',
-    desc: '维护文化多样性',
-    icon: 'icon-task-custom-1',
-    enable: 'ich',
-    name: 'ich',
-    goForm: [ 'ich', 0, undefined, undefined, '非物质文化遗产项目', undefined ],
-  },
-  {
-    title: '环境格局',
-    desc: '感受自然人文环境之美',
-    icon: 'icon-task-environment',
-    enable: 'environment',
-    name: 'environment',
-    goForm: {
-      title: '环境格局',
-      name: 'environment',
-    }
-  },
-  {
-    title: '传统建筑',
-    desc: '领略古建筑的独特魅力',
-    icon: 'icon-task-building',
-    enable: true,
-    name: 'building',
-    goForm: {
-      title: '传统建筑',
-      name: 'building',
-    }
-  },
-  {
-    title: '民俗文化',
-    desc: '体验民间传统习俗与节庆',
-    icon: 'icon-task-custom',
-    enable: 'folk_culture',
-    name: 'folk_culture',
-    goForm: {
-      title: '民俗文化',
-      name: 'custom',
-    }
-  },
-  {
-    title: '地道美食',
-    desc: '正宗、传统地方特色美食',
-    icon: 'icon-task-food',
-    enable: 'food_product',
-    name: 'food',
-    goForm: {
-      title: '地道美食',
-      name: 'food',
-    }
-  },
-  {
-    title: '物产资源',
-    desc: '特定地域的植物、矿物或工艺品',
-    icon: 'icon-task-mine',
-    enable: 'food_product',
-    name: 'product',
-    goForm: {
-      title: '物产资源',
-      name: 'product',
-    }
-  },
-  {
-    title: '旅游路线',
-    desc: '体验独特的文化魅力',
-    icon: 'icon-task-trip',
-    enable: true,
-    name: 'trip',
-    goForm: {
-      title: '旅游路线',
-      name: 'trip',
-    }
-  }
-]
-
-export const TaskMenuDef : Record<string, TaskMenuDefGroup> = {
-  'building': {
-    banner: 'https://mn.wenlvti.net/app_static/xiangan/banner_dig_building.jpg',
-    list: [
-      {
-        title: '建筑分布',
-        desc: '村落内传统建筑分布情况',
-        icon: 'icon-task-building-1',
-        enable: 'distribution',
-        goForm: [ 'distribution', 0, undefined, undefined, '建筑分布', undefined ],
-      },
-      {
-        title: '文物建筑',
-        desc: '历史、艺术、科学价值',
-        icon: 'icon-task-building-2',
-        enable: 'building',
-        goForm: [ 'building', 1, 'nature', undefined, '文物建筑', undefined ],
-      },
-      {
-        title: '历史建筑',
-        desc: '重大历史事件记录',
-        icon: 'icon-task-building-3',
-        enable: 'building',
-        goForm: [ 'building', 2, 'nature', undefined, '历史建筑', undefined ],
-      },
-      {
-        title: '重要传统建筑',
-        desc: '重要传统建筑的信息',
-        icon: 'icon-task-building-4',
-        enable: 'building',
-        goForm: [ 'building', 3, 'nature', undefined, '重要传统建筑', undefined ],
-      },
-    ],
-  },
-  'custom': {
-    banner: 'https://mn.wenlvti.net/app_static/xiangan/banner_dig_custom.jpg',
-    list: [
-      {
-        title: '节庆活动',
-        desc: '欢庆与传承并重的文化盛宴',
-        icon: 'icon-task-custom-2',
-        enable: 'folk_culture',
-        goForm: [ 'folk_culture', 1, 'folkCultureType', undefined, '节庆活动', undefined ],
-      },
-      {
-        title: '祭祀崇礼',
-        desc: '对先贤与自然的崇高致敬',
-        icon: 'icon-task-custom-3',
-        enable: 'folk_culture',
-        goForm: [ 'folk_culture', 2, 'folkCultureType', undefined, '祭祀崇礼', undefined ],
-      },
-      {
-        title: '婚丧嫁娶',
-        desc: '生命礼赞与文化传承的双重奏鸣',
-        icon: 'icon-task-custom-4',
-        enable: 'folk_culture',
-        goForm: [ 'folk_culture', 3, 'folkCultureType', undefined, '婚丧嫁娶', undefined ],
-      },
-      {
-        title: '地方方言',
-        desc: '历史沉淀的语言瑰宝',
-        icon: 'icon-task-custom-5',
-        enable: 'folk_culture',
-        goForm: [ 'folk_culture', 4, 'folkCultureType', undefined, '地方方言', undefined ],
-      },
-      {
-        title: '特色文化',
-        desc: '民族精神的鲜明烙印',
-        icon: 'icon-task-custom-6',
-        enable: 'folk_culture',
-        goForm: [ 'folk_culture', 5, 'folkCultureType', undefined, '特色文化', undefined ],
-      },
-    ],
-  },
-  'environment': {
-    banner: 'https://mn.wenlvti.net/app_static/xiangan/banner_dig_environment.jpg',
-    list: [
-      {
-        title: '自然环境',
-        desc: '村落建立与发展历程',
-        icon: 'icon-task-environment-1',
-        enable: 'environment',
-        goForm: [ 'environment', 0, undefined, undefined, '自然环境', undefined ],
-      },
-      {
-        title: '文物古迹',
-        desc: '重要历史文献资料',
-        icon: 'icon-task-environment-5',
-        enable: 'relic',
-        goForm: [ 'relic', 0, undefined, undefined, '文物古迹', undefined ],
-      },
-      {
-        title: '历史环境要素',
-        desc: '村民口述历史记录',
-        icon: 'icon-task-environment-6',
-        enable: 'element',
-        goForm: [ 'element', 0, undefined, undefined, '历史环境要素', undefined ],
-      },
-    ],
-  },
-  'food': {
-    banner: 'https://mn.wenlvti.net/app_static/xiangan/banner_dig_food.jpg',
-    list: [
-      {
-        title: '农副产品',
-        desc: '乡村繁荣的多元支柱',
-        icon: 'icon-task-food-1',
-        enable: 'food_product',
-        goForm: [ 'food_product', 1, 'productType', undefined, '农副产品', undefined ],
-      },
-      {
-        title: '特色美食',
-        desc: '给味蕾探索带来无限惊喜',
-        icon: 'icon-task-food-2',
-        enable: 'food_product',
-        goForm: [ 'food_product', 3, 'productType', undefined, '特色美食', undefined ],
-      },
-    ],
-  },
-  'history': {
-    banner: 'https://mn.wenlvti.net/app_static/xiangan/banner_dig_history.jpg',
-    list: [
-      {
-        title: '建村历史',
-        desc: '村落建立与发展历程',
-        icon: 'icon-task-history-1',
-        enable: 'cultural',
-        goForm: [ 'cultural', 1, 'culturalType', undefined, '建村历史', undefined ],
-      },
-      {
-        title: '历史人物',
-        desc: '重要历史人物事迹',
-        icon: 'icon-task-history-2',
-        enable: 'cultural',
-        goForm: [ 'figure', 0, undefined, undefined, '历史人物', undefined ],
-      },
-      {
-        title: '历史事件',
-        desc: '重大历史事件记录',
-        icon: 'icon-task-history-3',
-        enable: 'cultural',
-        goForm: [ 'cultural', 2, 'culturalType', undefined, '历史事件', undefined ],
-      },
-      {
-        title: '掌故轶事',
-        desc: '民间传说与历史故事',
-        icon: 'icon-task-history-4',
-        enable: 'story',
-        goForm: [ 'story', 0, undefined, undefined, '掌故轶事', undefined ],
-      },
-      {
-        title: '历史文献',
-        desc: '重要历史文献资料',
-        icon: 'icon-task-history-5',
-        enable: 'cultural',
-        goForm: [ 'cultural', 3, 'culturalType', undefined, '历史文献', undefined ],
-      },
-      {
-        title: '口述历史',
-        desc: '村民口述历史记录',
-        icon: 'icon-task-history-6',
-        enable: 'cultural',
-        goForm: [ 'cultural', 4, 'culturalType', undefined, '口述历史', undefined ],
-      },
-      {
-        title: '口述人管理',
-        desc: '口述人管理登记',
-        icon: 'icon-task-history-1',
-        enable: 'cultural',
-        goForm: [ 'speaker', 1, undefined, undefined, '口述人管理', undefined ],
-      },
-    ],
-  },
-  'product': {
-    banner: 'https://mn.wenlvti.net/app_static/xiangan/banner_dig_mine.jpg',
-    list: [
-      {
-        title: '商业集市',
-        desc: '文化交流的开放窗口',
-        icon: 'icon-task-mine-1',
-        enable: 'food_product',
-        goForm: [ 'food_product', 4, 'productType', undefined, '商业集市', undefined ],
-      },
-      {
-        title: '服装服饰',
-        desc: '艺术与功能交织的时尚篇章',
-        icon: 'icon-task-mine-2',
-        enable: 'food_product',
-        goForm: [ 'food_product', 5, 'productType', undefined, '服装服饰', undefined ],
-      },
-      {
-        title: '运输工具',
-        desc: '历史的运输工具',
-        icon: 'icon-task-mine-2',
-        enable: 'food_product',
-        goForm: [ 'food_product', 6, 'productType', undefined, '运输工具', undefined ],
-      },
-    ],
-  },
-  'overview': {
-    banner: 'https://mn.wenlvti.net/app_static/xiangyuan/images/dig/banner_dig_summary.png',
-    list: [
-      {
-        title: '行政区划',
-        desc: '村落行政区域划分及变迁',
-        icon: 'icon-task-summary-1',
-        enable: 'overview',
-        goForm: [ 'overview', 1, undefined, 'common', '行政区划', undefined ],
-      },
-      {
-        title: '村落综述',
-        desc: '村落整体概况介绍',
-        icon: 'icon-task-summary-5',
-        enable: 'overview',
-        goForm: [ 'overview', 5, undefined, 'common', '村落综述', undefined ],
-      },
-      {
-        title: '地理信息',
-        desc: '地理位置和自然环境特征',
-        icon: 'icon-task-summary-2',
-        enable: 'overview',
-        goForm: [ 'overview', 2, undefined, 'common', '地理信息', undefined ],
-      },
-      {
-        title: '建设与保护',
-        desc: '村落发展与文化遗产保护',
-        icon: 'icon-task-summary-3',
-        enable: 'overview',
-        goForm: [ 'overview', 3, undefined, 'common', '建设与保护', undefined ],
-      },
-      {
-        title: '人口与经济',
-        desc: '人口与经济情况',
-        icon: 'icon-task-summary-4',
-        enable: 'overview',
-        goForm: [ 'overview', 4, undefined, 'common', '人口与经济', undefined ],
-      },
-    ],
-  },
-  'trip': {
-    banner: 'https://mn.wenlvti.net/app_static/xiangan/banner_dig_trip.jpg',
-    list: [
-      {
-        title: '旅游导览',
-        desc: '',
-        icon: 'icon-task-trip-3',
-        enable: 'travel_guide',
-        goForm: [ 'travel_guide', 0, undefined, undefined, '旅游导览', undefined ],
-      },
-      {
-        title: '旅游路线',
-        desc: '',
-        icon: 'icon-task-trip-1',
-        enable: 'route',
-        goForm: [ 'route', 0, undefined, undefined, '旅游路线', undefined ],
-      },
-    ],
-  },
 }

+ 8 - 27
src/pages/home/store/index.vue

@@ -1,6 +1,6 @@
 <template>
   <FlexCol :gap="20" :padding="20">
-    <SearchBar placeholder="输入关键词搜索" @search="goList(undefined, '知识库 · 全部', $event)" />
+    <SearchBar placeholder="输入关键词搜索" @search="discoverLoader.loadData(undefined, true)" />
     <FlexCol :radius="15" overflow="hidden">
       <ImageSwiper 
         :height="300"
@@ -10,20 +10,7 @@
         ]"
       />
     </FlexCol>
-    <Box title="主题导览" icon="https://mncdn.wenlvti.net/app_static/xiangyuan/images/home/icon-compass.png" showMore @moreClicked="goList(undefined, '知识库 · 全部')">
-      <ProvideVar :vars="{
-        GridItemIconSize: 70,
-        GridItemBackgroundColor: 'transparent',
-        GridItemPaddingHorizontal: 0,
-      }">
-        <Grid :borderGrid="false" :mainAxisCount="3">
-          <GridItem title="经验分享" icon="https://mncdn.wenlvti.net/app_static/xiangyuan/images/icons/icon-rules.png" touchable @click="goList(358, '知识库 · 经验分享')" />
-          <GridItem title="常见问题" icon="https://mncdn.wenlvti.net/app_static/xiangyuan/images/icons/icon-mark.png" touchable @click="goList(357, '知识库 · 常见问题')" />
-          <GridItem title="政策法规" icon="https://mncdn.wenlvti.net/app_static/xiangyuan/images/icons/icon-route.png" touchable @click="goList(355, '知识库 · 政策法规')" />
-        </Grid>
-      </ProvideVar>
-    </Box>
-    <Box title="最新" icon="https://mncdn.wenlvti.net/app_static/xiangyuan/images/home/icon-shining.png" showMore @moreClicked="goList(undefined, '知识库 · 全部')">  
+    <Box title="最新" icon="https://mncdn.wenlvti.net/app_static/xiangyuan/images/home/icon-shining.png" showMore @moreClicked="goList()">  
       <SimplePageContentLoader :loader="discoverLoader">
         <FlexCol :gap="20">
           <Touchable 
@@ -59,11 +46,12 @@
 </template>
 
 <script setup lang="ts">
+import { useSimpleDataLoader } from '@/common/composeabe/SimpleDataLoader';
+import { navTo } from '@/components/utils/PageAction';
 import CommonContent, { GetContentListItem, GetContentListParams } from '@/api/CommonContent';
 import Box from '@/common/components/parts/Box.vue';
 import ImageSwiper from '@/common/components/parts/ImageSwiper.vue';
 import SimplePageContentLoader from '@/common/components/SimplePageContentLoader.vue';
-import { useSimpleDataLoader } from '@/common/composeabe/SimpleDataLoader';
 import Image from '@/components/basic/Image.vue';
 import Text from '@/components/basic/Text.vue';
 import Loadmore from '@/components/display/loading/Loadmore.vue';
@@ -72,17 +60,12 @@ import Touchable from '@/components/feedback/Touchable.vue';
 import SearchBar from '@/components/form/SearchBar.vue';
 import FlexCol from '@/components/layout/FlexCol.vue';
 import FlexRow from '@/components/layout/FlexRow.vue';
-import Grid from '@/components/layout/grid/Grid.vue';
-import GridItem from '@/components/layout/grid/GridItem.vue';
 import Height from '@/components/layout/space/Height.vue';
 import Width from '@/components/layout/space/Width.vue';
-import ProvideVar from '@/components/theme/ProvideVar.vue';
-import { navTo } from '@/components/utils/PageAction';
 
 const discoverLoader = useSimpleDataLoader(async () => {
   return (await CommonContent.getContentList(new GetContentListParams()
-    .setModelId(18)
-    .setMainBodyColumnId(354)
+    .setModelId(13)
   , 1, 30)).list
 });
 
@@ -93,12 +76,10 @@ function goDetail(item: GetContentListItem) {
     id: item.id,
   });
 }
-function goList(mainBodyColumnId: number|undefined, title: string, search?: string) {
+function goList() {
   navTo('/pages/article/common/list', {
-    modelId: 18,
-    mainBodyColumnId,
-    title,
-    search: search || '',
+    modelId: 13,
+    title: '政策法规',
   });
 }
 </script>