Ver código fonte

按要求修改表单

快乐的梦鱼 2 meses atrás
pai
commit
90f12026d5

+ 2 - 1
src/App.vue

@@ -33,7 +33,7 @@ onLaunch(async () => {
 
 
 //修改默认主题颜色
 //修改默认主题颜色
 configTheme((theme) => {
 configTheme((theme) => {
-  theme.colorConfigs.default.primary = '#00ca76';
+  theme.colorConfigs.default.primary = '#00b66a';
   theme.colorConfigs.pressed.primary = '#00814b';
   theme.colorConfigs.pressed.primary = '#00814b';
   theme.colorConfigs.background.primary = '#dcfff0';
   theme.colorConfigs.background.primary = '#dcfff0';
   return theme;
   return theme;
@@ -46,6 +46,7 @@ configTheme((theme) => {
   @import "@/components/index.scss";
   @import "@/components/index.scss";
 
 
   page {
   page {
+    //color: #00b66a;
     background: #f7f8f9;
     background: #f7f8f9;
   }
   }
 </style>
 </style>

+ 3 - 0
src/api/RequestModules.ts

@@ -49,10 +49,13 @@ function requestInceptor(url: string, req: RequestOptions) {
   if (req.method == 'GET') {
   if (req.method == 'GET') {
     //追加GET参数
     //追加GET参数
     url = appendGetUrlParams(url, 'main_body_id', ApiCofig.mainBodyId);
     url = appendGetUrlParams(url, 'main_body_id', ApiCofig.mainBodyId);
+    url = appendGetUrlParams(url, 'platform', ApiCofig.platformId);
     if (append_main_body_user_id)
     if (append_main_body_user_id)
       url = appendGetUrlParams(url, 'main_body_user_id', main_body_user_id);
       url = appendGetUrlParams(url, 'main_body_user_id', main_body_user_id);
   } else {
   } else {
     req.data = appendPostParams(req.data,'main_body_id', ApiCofig.mainBodyId);
     req.data = appendPostParams(req.data,'main_body_id', ApiCofig.mainBodyId);
+    req.data = appendPostParams(req.data,'platform', ApiCofig.platformId);
+    
     if (append_main_body_user_id)
     if (append_main_body_user_id)
       req.data = appendPostParams(req.data,'main_body_user_id', main_body_user_id);
       req.data = appendPostParams(req.data,'main_body_user_id', main_body_user_id);
   } 
   } 

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

@@ -50,6 +50,7 @@ export class VillageListItem extends DataModel<VillageListItem> {
   updatedAt = null as Date|null;
   updatedAt = null as Date|null;
   deleteAt = null as Date|null;
   deleteAt = null as Date|null;
   image = '';
   image = '';
+  thumbnail = '';
   images = [] as string[];
   images = [] as string[];
   villageName = '';
   villageName = '';
   title = '';
   title = '';

+ 1 - 0
src/common/config/ApiCofig.ts

@@ -7,4 +7,5 @@ export default {
   serverProd: 'https://mn.wenlvti.net/api',
   serverProd: 'https://mn.wenlvti.net/api',
   amapServerKey: '8fd09264c33678141f609588c432df0e',
   amapServerKey: '8fd09264c33678141f609588c432df0e',
   mainBodyId: 2,
   mainBodyId: 2,
+  platformId: 330,
 }
 }

+ 1 - 0
src/components/dynamic/wrappers/PickerIdField.vue

@@ -2,6 +2,7 @@
   <PickerField 
   <PickerField 
     :columns="[ loader.data.value || [] ]"
     :columns="[ loader.data.value || [] ]"
     v-bind="$attrs"
     v-bind="$attrs"
+    :singleValue="true"
     :modelValue="!(modelValue instanceof Array) ? [modelValue || ''] : modelValue"
     :modelValue="!(modelValue instanceof Array) ? [modelValue || ''] : modelValue"
     @update:modelValue="handleUpdateModelValue"
     @update:modelValue="handleUpdateModelValue"
   />
   />

+ 1 - 1
src/components/form/CascadePicker.vue

@@ -110,7 +110,7 @@ function loadCols() {
       }
       }
     } 
     } 
   }
   }
-  emit('selectTextChange', selectText.join(' '));
+  emit('selectTextChange', selectText.join(' '), true);
 }
 }
 
 
 watch(() => props.value, (v) => {
 watch(() => props.value, (v) => {

+ 2 - 2
src/components/form/Picker.vue

@@ -98,13 +98,13 @@ function loadValues() {
   value.forEach((v,i) => {
   value.forEach((v,i) => {
     const index = props.columns[i]?.findIndex((item) => item.value === v);
     const index = props.columns[i]?.findIndex((item) => item.value === v);
     pickerSelectIndex.value[i] = index < 0 ? 0 : index;
     pickerSelectIndex.value[i] = index < 0 ? 0 : index;
-  })
+  });  
   emit('selectTextChange', pickerSelectIndex.value.map((p, i) => {
   emit('selectTextChange', pickerSelectIndex.value.map((p, i) => {
     const cols = props.columns[i];
     const cols = props.columns[i];
     if (!cols || cols.length === 0) 
     if (!cols || cols.length === 0) 
       return null;
       return null;
     return cols[p]?.text ?? cols[0]?.text ?? null;
     return cols[p]?.text ?? cols[0]?.text ?? null;
-  }).join(' '));
+  }).join(' '), true);
 }
 }
 
 
 watch(() => props.value, (v) => {
 watch(() => props.value, (v) => {

+ 5 - 0
src/pages/dig/forms/common.vue

@@ -8,6 +8,7 @@
           type="info"
           type="info"
           message="您的修改已经暂存,可以放心离开,下次接着编辑"
           message="您的修改已经暂存,可以放心离开,下次接着编辑"
         />
         />
+        <Height :height="20" />
         <DynamicForm
         <DynamicForm
           ref="formRef"
           ref="formRef"
           :options="formDefine"
           :options="formDefine"
@@ -115,8 +116,12 @@ const { querys } = useLoadQuerys({
     formModel.value = formData as any;
     formModel.value = formData as any;
 
 
   await nextTick();
   await nextTick();
+  await waitTimeOut(100);
   formRef.value.initDefaultValuesToModel();
   formRef.value.initDefaultValuesToModel();
 
 
+  console.log(formModel.value);
+  
+
   await waitTimeOut(1000);
   await waitTimeOut(1000);
   canSaveNow = true;
   canSaveNow = true;
 });
 });

+ 26 - 3
src/pages/dig/forms/data/common.ts

@@ -1,5 +1,7 @@
 import { useAliOssUploadCo } from "@/common/components/upload/AliOssUploadCo";
 import { useAliOssUploadCo } from "@/common/components/upload/AliOssUploadCo";
 import type { IDynamicFormOptions, IDynamicFormRef } from "@/components/dynamic";
 import type { IDynamicFormOptions, IDynamicFormRef } from "@/components/dynamic";
+import type { PickerIdFieldProps } from "@/components/dynamic/wrappers/PickerIdField";
+import type { FieldProps } from "@/components/form/Field.vue";
 import type { UploaderFieldProps } from "@/components/form/UploaderField.vue";
 import type { UploaderFieldProps } from "@/components/form/UploaderField.vue";
 import type { Ref } from "vue";
 import type { Ref } from "vue";
 
 
@@ -7,11 +9,13 @@ export function villageCommonContent (ref: Ref<IDynamicFormRef>, options: {
   title: string,
   title: string,
   showTitle?: boolean,
   showTitle?: boolean,
   showContent?: boolean,
   showContent?: boolean,
+  showType?: boolean,
   contentKey?: string,
   contentKey?: string,
 } = {
 } = {
   title: '文章',
   title: '文章',
   showTitle: true,
   showTitle: true,
 }) : IDynamicFormOptions {
 }) : IDynamicFormOptions {
+  options.title = '';
   return {
   return {
     formItems: [
     formItems: [
       {
       {
@@ -33,7 +37,7 @@ export function villageCommonContent (ref: Ref<IDynamicFormRef>, options: {
             }]
             }]
           }]: []),
           }]: []),
           ...(options.showContent !== false ? [{
           ...(options.showContent !== false ? [{
-            label: `${options.title}介绍`,
+            label: `${options.title}内容`,
             name: options.contentKey || 'content',
             name: options.contentKey || 'content',
             type: 'richtext',
             type: 'richtext',
             defaultValue: '',
             defaultValue: '',
@@ -47,6 +51,26 @@ export function villageCommonContent (ref: Ref<IDynamicFormRef>, options: {
             }]
             }]
           },
           },
           {
           {
+            label: `${options.title}类型`,
+            name: 'type',
+            type: 'select-id',
+            defaultValue: 1,
+            additionalProps: {
+              loadData: async () => [
+                { text: '文字', value: 1 },
+                { text: '图片', value: 2 },
+                { text: '视频', value: 3 },
+                { text: '相册', value: 4 },
+                { text: '数字档案', value: 5 },
+              ],
+            } as PickerIdFieldProps,
+            formProps: { showRightArrow: true },
+            rules: [{
+              required: true,
+              message: '请选择类型',
+            }]
+          },
+          {
             label: '来源(可选)',
             label: '来源(可选)',
             name: 'source',
             name: 'source',
             type: 'text',
             type: 'text',
@@ -100,7 +124,7 @@ export function villageCommonContent (ref: Ref<IDynamicFormRef>, options: {
       {
       {
         name: 'c',
         name: 'c',
         type: 'flat-group',
         type: 'flat-group',
-        label: '额外信息(可选)',
+        label: '其他附件(可选)',
         formProps: {
         formProps: {
           showLabel: false,
           showLabel: false,
         },
         },
@@ -166,6 +190,5 @@ export function villageCommonContent (ref: Ref<IDynamicFormRef>, options: {
         ],
         ],
       }
       }
     ],
     ],
-
   }
   }
 }
 }

+ 7 - 7
src/pages/dig/forms/data/cultural.ts

@@ -28,7 +28,7 @@ export function villageInfoFolkCultureForm(title: string) : SingleForm {
         }]
         }]
       }, 
       }, 
       {
       {
-        label: '村落非遗项目', 
+        label: '非遗项目', 
         name: 'ichId',
         name: 'ichId',
         type: 'select-id', 
         type: 'select-id', 
         defaultValue: null,
         defaultValue: null,
@@ -57,18 +57,18 @@ export function villageInfoFolkCultureForm(title: string) : SingleForm {
         contentKey: 'details'
         contentKey: 'details'
       }).formItems
       }).formItems
     ]
     ]
-  }), { title: title, typeName: 'folk_culture_type', }];
+  }), { title: title, typeName: 'folkCultureType', }];
 }
 }
 
 
 export const villageInfoCulture : GroupForm = {
 export const villageInfoCulture : GroupForm = {
   [1]: [CommonInfoModel, (m) => villageCommonContent(m, {
   [1]: [CommonInfoModel, (m) => villageCommonContent(m, {
-    title: '建村历史',
+    title: '建村(社)历史',
     showTitle: true
     showTitle: true
-  }), { title: '建村历史', typeName: 'cultural_type', }],
+  }), { title: '建村(社)历史', typeName: 'culturalType', }],
   [2]: [CommonInfoModel, (m) => villageCommonContent(m, {
   [2]: [CommonInfoModel, (m) => villageCommonContent(m, {
     title: '历史事件',
     title: '历史事件',
     showTitle: true
     showTitle: true
-  }), { title: '历史事件', typeName: 'cultural_type', }],  
+  }), { title: '历史事件', typeName: 'culturalType', }],  
   [3]: [CommonInfoModel, (m) => ({
   [3]: [CommonInfoModel, (m) => ({
     formItems: [
     formItems: [
       ...(villageCommonContent(m, {
       ...(villageCommonContent(m, {
@@ -91,7 +91,7 @@ export const villageInfoCulture : GroupForm = {
         }]
         }]
       },
       },
     ],
     ],
-  }), { title: '历史文献', typeName: 'cultural_type', }],
+  }), { title: '历史文献', typeName: 'culturalType', }],
   [4]: [CommonInfoModel, (m) => ({
   [4]: [CommonInfoModel, (m) => ({
     formItems: [
     formItems: [
       ...villageCommonContent(m, {
       ...villageCommonContent(m, {
@@ -189,5 +189,5 @@ export const villageInfoCulture : GroupForm = {
         },
         },
       },
       },
     ],
     ],
-  }), { title: '口述历史', typeName: 'cultural_type', }],
+  }), { title: '口述历史', typeName: 'culturalType', }],
 }
 }

+ 1 - 1
src/pages/dig/forms/data/food.ts

@@ -39,5 +39,5 @@ export function villageInfoFoodProductsForm(title: string) : SingleForm {
         showTitle: false,
         showTitle: false,
       })).formItems
       })).formItems
     ]
     ]
-  }), { title: title, typeName: 'product_type', }];
+  }), { title: title, typeName: 'productType', }];
 }
 }

+ 2 - 2
src/pages/dig/forms/data/ich.ts

@@ -166,7 +166,7 @@ export const ichFormItems : SingleForm = [CommonInfoModel, (m) => ({
           }],
           }],
         },
         },
         {
         {
-          label: '与村依存程度', 
+          label: '与村依存程度', 
           name: 'ichDependenceDegree',
           name: 'ichDependenceDegree',
           type: 'select-id', 
           type: 'select-id', 
           additionalProps: {
           additionalProps: {
@@ -181,7 +181,7 @@ export const ichFormItems : SingleForm = [CommonInfoModel, (m) => ({
           formProps: { showRightArrow: true } as FieldProps,
           formProps: { showRightArrow: true } as FieldProps,
           rules: [{
           rules: [{
             required: true,
             required: true,
-            message: '请选择与村依存程度',
+            message: '请选择与村依存程度',
           }],
           }],
         },
         },
         {
         {

+ 83 - 149
src/pages/dig/forms/data/overview.ts

@@ -13,63 +13,55 @@ export const villageInfoOverviewForm : GroupForm = {
   [1]: [CommonInfoModel, (form) => ({
   [1]: [CommonInfoModel, (form) => ({
     formItems: [
     formItems: [
       { 
       { 
-        label: '村落名称', 
+        label: '名称', 
         name: 'name', 
         name: 'name', 
         type: 'text', 
         type: 'text', 
         defaultValue: '',
         defaultValue: '',
         additionalProps: {
         additionalProps: {
-          placeholder: '请输入您的村落名称,例如:后埔',
+          placeholder: '请输入名称,例如:后埔',
         },
         },
         rules:  [{
         rules:  [{
           required: true,
           required: true,
-          message: '请输入村落名称',
+          message: '请输入名称',
         }] 
         }] 
       }, 
       }, 
-      { 
-        label: '村落编码', 
+      /* { 
+        label: '编码', 
         name: 'code', 
         name: 'code', 
         type: 'text', 
         type: 'text', 
         defaultValue: '',
         defaultValue: '',
         additionalProps: {
         additionalProps: {
-          placeholder: '请输入村落编码,例如330106',
+          placeholder: '请输入编码,例如330106',
         },
         },
         rules:  [{
         rules:  [{
           required: true,
           required: true,
-          message: '请输入村落编码',
+          message: '请输入编码',
         }] 
         }] 
-      }, 
+      },  */
       { 
       { 
-        label: '村落地址', 
+        label: '地址', 
         name: 'cityAddress', 
         name: 'cityAddress', 
         type: 'select-city', 
         type: 'select-city', 
         defaultValue: () => [],
         defaultValue: () => [],
         additionalProps: {
         additionalProps: {
-          placeholder: '请点击这里选择村落地址或右侧者从地图选择',
+          placeholder: '请点击这里选择地址或右侧者从地图选择',
           onSelectedTownship: (v: string, code: string) => {
           onSelectedTownship: (v: string, code: string) => {
             form.value.setValueByPath('township', v);
             form.value.setValueByPath('township', v);
             form.value.setValueByPath('code', code);
             form.value.setValueByPath('code', code);
           }
           }
         },
         },
-        rules:  [{
-          required: true,
-          message: '请选择村落地址',
-        }],
       },
       },
       { 
       { 
-        label: '村落乡镇', 
+        label: '所在乡镇(街道)', 
         name: 'township', 
         name: 'township', 
         type: 'text', 
         type: 'text', 
         defaultValue: '',
         defaultValue: '',
         additionalProps: {
         additionalProps: {
-          placeholder: '请输入村落所在乡镇',
+          placeholder: '请输入所在乡镇(街道)',
         },
         },
-        rules: [{
-          required: true,
-          message: '请输入村落所在乡镇',
-        }] 
       }, 
       }, 
       { 
       { 
-        label: '村落类型', 
+        label: '类型', 
         name: 'villageType',
         name: 'villageType',
         type: 'radio-id', 
         type: 'radio-id', 
         additionalProps: {
         additionalProps: {
@@ -80,13 +72,61 @@ export const villageInfoOverviewForm : GroupForm = {
               text: p.title,
               text: p.title,
           })),
           })),
         } as RadioIdFieldProps,
         } as RadioIdFieldProps,
-        rules: [{
-          required: true,
-          message: '请选择类型',
-        }],
       },
       },
     ]
     ]
-  }), { title: '行政区划', typeName: '', }],
+  }), { title: '行政区划', typeName: '', order: 1 }],
+  [5]: [CommonInfoModel, () => ({
+    formItems: [
+      {
+        name: '',
+        type: 'flat-group',
+        childrenColProps: { span: 24 },
+        children: [
+          {
+            label: '概括',
+            name: 'overview',
+            type: 'richtext',
+            defaultValue: '',
+            additionalProps: {
+              placeholder: '请输入整体概括信息',
+              maxLength: 300,
+              showWordLimit: true, 
+            } as FieldProps,
+          },
+          {
+            label: '突出价值',
+            name: 'prominent',
+            type: 'richtext',
+            defaultValue: '',
+            additionalProps: {
+              placeholder: '请输入突出价值信息',
+              maxLength: 300,
+              showWordLimit: true, 
+            } as FieldProps,
+          }
+        ]
+      },
+      {
+        name: '',
+        type: 'flat-group',
+        childrenColProps: { span: 24 },
+        children: [
+          {
+            label: '相关视频(可选)',
+            name: 'video',
+            type: 'uploader',
+            defaultValue: '',
+            additionalProps: {
+              upload: useAliOssUploadCo('xiangyuan/cultural/video'),
+              chooseType: 'video',
+              maxFileSize: 1024 * 1024 * 20,
+              single: true,
+            } as UploaderFieldProps,
+          },
+        ]
+      },
+    ] 
+  }), { title: '综述', typeName: '', order: 2 }],
   [2]: [VillageEnvInfo, () => ({
   [2]: [VillageEnvInfo, () => ({
     formItems: [
     formItems: [
       { 
       { 
@@ -96,10 +136,6 @@ export const villageInfoOverviewForm : GroupForm = {
         defaultValue: '',
         defaultValue: '',
         additionalProps: {},
         additionalProps: {},
         formProps: { showRightArrow: true } as FieldProps,
         formProps: { showRightArrow: true } as FieldProps,
-        rules:  [{
-          required: true,
-          message: '请输入村落经纬度',
-        }]
       }, 
       }, 
       { 
       { 
         label: '海拔', 
         label: '海拔', 
@@ -107,16 +143,12 @@ export const villageInfoOverviewForm : GroupForm = {
         type: 'number', 
         type: 'number', 
         defaultValue: 0,
         defaultValue: 0,
         additionalProps: {
         additionalProps: {
-          placeholder: '请输入村落海拔',
+          placeholder: '请输入海拔',
           min: -1000,
           min: -1000,
           max: 10000,
           max: 10000,
           step: 10,
           step: 10,
           addonAfter: 'M',
           addonAfter: 'M',
         },
         },
-        rules:  [{
-          required: true,
-          message: '请输入村落海拔',
-        }] 
       }, 
       }, 
       { 
       { 
         label: '地形地貌特征(多选)', 
         label: '地形地貌特征(多选)', 
@@ -133,47 +165,35 @@ export const villageInfoOverviewForm : GroupForm = {
           ,
           ,
         } as CheckBoxListProps,
         } as CheckBoxListProps,
         defaultValue: [],
         defaultValue: [],
-        rules: [{
-          required: true,
-          message: '请选择类型',
-        }],
       },
       },
       { 
       { 
-        label: '域面积', 
+        label: '地域面积', 
         name: 'area', 
         name: 'area', 
         type: 'number', 
         type: 'number', 
         defaultValue: 0,
         defaultValue: 0,
         additionalProps: {
         additionalProps: {
-          placeholder: '请输入域面积',
+          placeholder: '请输入域面积',
           min: 0,
           min: 0,
           max: 10000,
           max: 10000,
           step: 1,
           step: 1,
           addonAfter: '平方公里',
           addonAfter: '平方公里',
         },
         },
-        rules:  [{
-          required: true,
-          message: '请输入村域面积',
-        }] 
       }, 
       }, 
       { 
       { 
-        label: '村庄占地面积', 
+        label: '建筑占地面积', 
         name: 'villageArea', 
         name: 'villageArea', 
         type: 'number', 
         type: 'number', 
         defaultValue: 0,
         defaultValue: 0,
         additionalProps: {
         additionalProps: {
-          placeholder: '请输入村庄占地面积',
+          placeholder: '请输入占地面积',
           min: 0,
           min: 0,
           max: 10000,
           max: 10000,
           step: 1,
           step: 1,
           addonAfter: '亩',
           addonAfter: '亩',
         },
         },
-        rules:  [{
-          required: true,
-          message: '请输入村庄占地面积',
-        }] 
       }, 
       }, 
       { 
       { 
-        label: '村落形成年代', 
+        label: '形成年代', 
         name: 'age',
         name: 'age',
         type: 'select-id', 
         type: 'select-id', 
         additionalProps: {
         additionalProps: {
@@ -186,13 +206,9 @@ export const villageInfoOverviewForm : GroupForm = {
           ,
           ,
         } as PickerIdFieldProps,
         } as PickerIdFieldProps,
         formProps: { showRightArrow: true } as FieldProps,
         formProps: { showRightArrow: true } as FieldProps,
-        rules: [{
-          required: true,
-          message: '请选择类型',
-        }],
       },
       },
     ]
     ]
-  }), { title: '地理信息', typeName: '', }],
+  }), { title: '地理信息', typeName: '', order: 3 }],
   [3]: [CommonInfoModel, () => ({
   [3]: [CommonInfoModel, () => ({
     formItems: [
     formItems: [
       { 
       { 
@@ -210,10 +226,6 @@ export const villageInfoOverviewForm : GroupForm = {
           ,
           ,
         } as PickerIdFieldProps,
         } as PickerIdFieldProps,
         formProps: { showRightArrow: true } as FieldProps,
         formProps: { showRightArrow: true } as FieldProps,
-        rules: [{
-          required: true,
-          message: '请选择非遗最高级别',
-        }],
       }, 
       }, 
       { 
       { 
         label: '传统建筑数量', 
         label: '传统建筑数量', 
@@ -225,13 +237,9 @@ export const villageInfoOverviewForm : GroupForm = {
           max: 10000,
           max: 10000,
           step: 1,
           step: 1,
         },
         },
-        rules:  [{
-          required: true,
-          message: '请输入传统建筑数量',
-        }] 
       }, 
       }, 
       { 
       { 
-        label: '列入历史文化名村级别', 
+        label: '列入历史文化名村(社)级别', 
         name: 'historyLevel',
         name: 'historyLevel',
         type: 'select-id', 
         type: 'select-id', 
         additionalProps: {
         additionalProps: {
@@ -244,13 +252,9 @@ export const villageInfoOverviewForm : GroupForm = {
           ,
           ,
         } as PickerIdFieldProps,
         } as PickerIdFieldProps,
         formProps: { showRightArrow: true } as FieldProps,
         formProps: { showRightArrow: true } as FieldProps,
-        rules: [{
-          required: true,
-          message: '请选择类型',
-        }],
       },
       },
       { 
       { 
-        label: '列入特色景观旅游名村级别', 
+        label: '列入特色景观旅游名村(社)级别', 
         name: 'touristLevel',
         name: 'touristLevel',
         type: 'select-id', 
         type: 'select-id', 
         additionalProps: {
         additionalProps: {
@@ -263,21 +267,13 @@ export const villageInfoOverviewForm : GroupForm = {
           ,
           ,
         } as PickerIdFieldProps,
         } as PickerIdFieldProps,
         formProps: { showRightArrow: true } as FieldProps,
         formProps: { showRightArrow: true } as FieldProps,
-        rules: [{
-          required: true,
-          message: '请选择类型',
-        }],
       },
       },
       { 
       { 
-        label: '列入少数民族特色村寨试点示范', 
+        label: '列入少数民族特色村寨(社)试点示范', 
         name: 'isFeaturedVillage', 
         name: 'isFeaturedVillage', 
         type: 'check-box-int', 
         type: 'check-box-int', 
         defaultValue: '',
         defaultValue: '',
         additionalProps: {},
         additionalProps: {},
-        rules: [{
-          required: true,
-          message: '请选择类型',
-        }],
       }, 
       }, 
       { 
       { 
         label: '其他认定级别', 
         label: '其他认定级别', 
@@ -285,12 +281,12 @@ export const villageInfoOverviewForm : GroupForm = {
         type: 'text', 
         type: 'text', 
         defaultValue: '',
         defaultValue: '',
         additionalProps: {
         additionalProps: {
-          placeholder: '(可选)输入村落其他认定级别',
+          placeholder: '(可选)输入其他认定级别',
         },
         },
         rules:  [] 
         rules:  [] 
       }, 
       }, 
     ]
     ]
-  }), { title: '建设与保护', typeName: '', }],
+  }), { title: '建设与保护', typeName: '', order: 4 }],
   [4]: [CommonInfoModel, () => ({ 
   [4]: [CommonInfoModel, () => ({ 
     formItems: [
     formItems: [
       {
       {
@@ -307,10 +303,6 @@ export const villageInfoOverviewForm : GroupForm = {
             additionalProps: {
             additionalProps: {
               placeholder: '请输入主要民族',
               placeholder: '请输入主要民族',
             },
             },
-            rules: [{
-              required: true,
-              message: '请输入主要民族',
-            }]
           }, 
           }, 
           ...[
           ...[
             {
             {
@@ -466,7 +458,8 @@ export const villageInfoOverviewForm : GroupForm = {
             additionalProps: {
             additionalProps: {
               placeholder: '(可选)输入其他服务业',
               placeholder: '(可选)输入其他服务业',
             },
             },
-            rules:  [] 
+            rules:  [],
+            show: { callback: (_, m) => m.otherIndustries === 238 }
           }, 
           }, 
           { 
           { 
             label: '其他农业', 
             label: '其他农业', 
@@ -476,70 +469,11 @@ export const villageInfoOverviewForm : GroupForm = {
             additionalProps: {
             additionalProps: {
               placeholder: '(可选)输入其他农业',
               placeholder: '(可选)输入其他农业',
             },
             },
-            rules:  [] 
+            rules:  [] ,
+            show: { callback: (_, m) => m.otherIndustries === 128 }
           }, 
           }, 
         ]
         ]
       },
       },
     ] 
     ] 
-  }), { title: '人口与经济', typeName: '', }],
-  [5]: [CommonInfoModel, () => ({
-    formItems: [
-      {
-        name: '',
-        type: 'flat-group',
-        childrenColProps: { span: 24 },
-        children: [
-          {
-            label: '概括',
-            name: 'overview',
-            type: 'richtext',
-            defaultValue: '',
-            additionalProps: {
-              placeholder: '请输入村落整体概括信息',
-              maxLength: 300,
-              showWordLimit: true, 
-            } as FieldProps,
-            rules: [{
-              required: true,
-              message: '请输入概括',
-            }]
-          },
-          {
-            label: '突出价值',
-            name: 'prominent',
-            type: 'richtext',
-            defaultValue: '',
-            additionalProps: {
-              placeholder: '请输入村落突出价值信息',
-              maxLength: 300,
-              showWordLimit: true, 
-            } as FieldProps,
-            rules: [{
-              required: true,
-              message: '请输入突出价值',
-            }]
-          }
-        ]
-      },
-      {
-        name: '',
-        type: 'flat-group',
-        childrenColProps: { span: 24 },
-        children: [
-          {
-            label: '相关视频(可选)',
-            name: 'video',
-            type: 'uploader',
-            defaultValue: '',
-            additionalProps: {
-              upload: useAliOssUploadCo('xiangyuan/cultural/video'),
-              chooseType: 'video',
-              maxFileSize: 1024 * 1024 * 20,
-              single: true,
-            } as UploaderFieldProps,
-          },
-        ]
-      },
-    ] 
-  }), { title: '村落综述', typeName: '', }],
+  }), { title: '人口与经济', typeName: '', order: 5 }],
 }
 }

+ 3 - 7
src/pages/dig/forms/data/specker.ts

@@ -18,16 +18,16 @@ export const villageInfoSpeakerForm : SingleForm = [CommonInfoModel, (r) => ({
       },
       },
       children: [
       children: [
         {
         {
-          label: '标题',
+          label: '姓名',
           name: 'name',
           name: 'name',
           type: 'text',
           type: 'text',
           defaultValue: '',
           defaultValue: '',
           additionalProps: {
           additionalProps: {
-            placeholder: '请输入标题',
+            placeholder: '请输入姓名',
           },
           },
           rules: [{
           rules: [{
             required: true,
             required: true,
-            message: '请输入标题',
+            message: '请输入姓名',
           }]
           }]
         },
         },
         {
         {
@@ -66,10 +66,6 @@ export const villageInfoSpeakerForm : SingleForm = [CommonInfoModel, (r) => ({
             type: 'date',
             type: 'date',
           },
           },
           formProps: { showRightArrow: true } as FieldProps,
           formProps: { showRightArrow: true } as FieldProps,
-          rules: [{
-            required: true,
-            message: '请选择生日',
-          }]
         },
         },
       ]
       ]
     },
     },

+ 3 - 3
src/pages/dig/forms/data/travel.ts

@@ -18,16 +18,16 @@ export const villageInfoTravelGuideForm : SingleForm = [CommonInfoModel, () => (
       },
       },
       children: [
       children: [
         {
         {
-          label: '入村路线', 
+          label: '路线', 
           name: 'villageRoute', 
           name: 'villageRoute', 
           type: 'text', 
           type: 'text', 
           defaultValue: '',
           defaultValue: '',
           additionalProps: {
           additionalProps: {
-            placeholder: '请输入入村路线',
+            placeholder: '请输路线',
           },
           },
           rules:  [{
           rules:  [{
             required: true,
             required: true,
-            message: '请输入入村路线',
+            message: '请输路线',
           }] 
           }] 
         },
         },
         {
         {

+ 57 - 14
src/pages/dig/forms/forms.ts

@@ -15,10 +15,13 @@ import { villageInfoFigureFormItems, villageInfoStoryFormItems } from "./data/hi
 import { villageInfoRouteForm, villageInfoTravelGuideForm } from "./data/travel";
 import { villageInfoRouteForm, villageInfoTravelGuideForm } from "./data/travel";
 import { villageInfoSpeakerForm } from "./data/specker";
 import { villageInfoSpeakerForm } from "./data/specker";
 import { ichFormItems } from "./data/ich";
 import { ichFormItems } from "./data/ich";
+import type { PickerIdFieldProps } from "@/components/dynamic/wrappers/PickerIdField";
 
 
 export type SingleForm = [NewDataModel, (formRef: Ref<IDynamicFormRef>) => IDynamicFormOptions, {
 export type SingleForm = [NewDataModel, (formRef: Ref<IDynamicFormRef>) => IDynamicFormOptions, {
   title: string,
   title: string,
   typeName: string,
   typeName: string,
+  order?: number,
+  id?: number,
 }]
 }]
 export type GroupForm = Record<number, SingleForm>
 export type GroupForm = Record<number, SingleForm>
 
 
@@ -84,7 +87,7 @@ const villageInfoForm : Record<string, GroupForm> = {
         {
         {
           label: '描述',
           label: '描述',
           name: 'desc',
           name: 'desc',
-          type: 'richtext',
+          type: 'textarea',
           defaultValue: '',
           defaultValue: '',
           additionalProps: {
           additionalProps: {
             placeholder: '请输入描述',
             placeholder: '请输入描述',
@@ -96,6 +99,7 @@ const villageInfoForm : Record<string, GroupForm> = {
         ...villageCommonContent(r, {
         ...villageCommonContent(r, {
           title: '记录',
           title: '记录',
           showTitle: false,
           showTitle: false,
+          showType: true,
         }).formItems
         }).formItems
       ]
       ]
     }), { title: '随手记', typeName: '', }]
     }), { title: '随手记', typeName: '', }]
@@ -114,26 +118,65 @@ export function getVillageInfoFormIds(subType: string) {
   return Object.keys(villageInfoForm[subType]).map((k) => Number(k));
   return Object.keys(villageInfoForm[subType]).map((k) => Number(k));
 }
 }
 
 
-export function mergeFormItems(set: Record<number, SingleForm>) {
-  const keys = Object.keys(set);
-  const result : SingleForm = [set[keys[0] as any][0], (formRef: Ref<IDynamicFormRef>) => {
+export function mergeFormItems(group: GroupForm) {
+  const groupArray = Object.keys(group)
+    .map((k) => {
+      const id = Number(k);
+      const it = group[id];
+      it[2].id = id;
+      return it;
+    })
+    .sort((a, b) => 
+      (a[2].order || 0) - (b[2].order || 0)
+    );
+  const [model, firstForm, info] = groupArray[0];
+  const isOverview = group === villageInfoOverviewForm;
+  const needType = !isOverview && info.typeName;
+  const result : SingleForm = [model, (formRef: Ref<IDynamicFormRef>) => {
     const options : IDynamicFormOptions = {
     const options : IDynamicFormOptions = {
       formItems: [],
       formItems: [],
     };
     };
-    for (const key in set) {
-      const it = set[key];
-      const op = it[1](formRef);
-      const ex = it[2];
+    if (needType) {
       options.formItems.push({
       options.formItems.push({
-        label: ex.title, 
-        name: 'group' + key, 
-        type: 'flat-group', 
-        childrenColProps: { span: 24 },
-        children: op.formItems, 
+        label: '类型',
+        name: info.typeName, 
+        type: 'select-id', 
+        additionalProps: {
+          disabled: groupArray.length <= 1,
+          loadData: async () => groupArray.map((it) => ({
+            value: it[2].id,
+            text: it[2].title,
+          })),
+        } as PickerIdFieldProps,
+        defaultValue: groupArray[0][2].id,
+        formProps: { showRightArrow: true } as FieldProps,
+        rules: [{
+          required: true,
+          type: 'number',
+          message: '请选择类型',
+        }],
       });
       });
     }
     }
+    if (needType) {
+      let i = 0;
+      for (const it of groupArray) {
+        const op = it[1](formRef);
+        const ex = it[2];
+        options.formItems.push({
+          label: ex.title, 
+          name: 'group' + i, 
+          type: 'flat-group', 
+          childrenColProps: { span: 24 },
+          children: op.formItems, 
+          show: { callback: (_, m) => m[info.typeName] === ex.id }
+        });
+        i++;
+      }
+    } else {
+      options.formItems.push(...firstForm(formRef).formItems)
+    }
     return options;
     return options;
-  }, set[keys[0] as any]?.[2] ?? { title: '合并', typeName: '' }]
+  }, info ?? { title: '合并', typeName: '' }]
 
 
   return result;
   return result;
 }
 }

+ 21 - 14
src/pages/dig/forms/tasks.ts

@@ -163,35 +163,35 @@ export const TaskMenuDef : Record<string, TaskMenuDefItem> = {
         desc: '欢庆与传承并重的文化盛宴',
         desc: '欢庆与传承并重的文化盛宴',
         icon: 'icon-task-custom-2',
         icon: 'icon-task-custom-2',
         enable: 'folk_culture',
         enable: 'folk_culture',
-        goForm: [ 'folk_culture', 1, 'folk_culture_type', undefined, '节庆活动' ],
+        goForm: [ 'folk_culture', 1, 'folkCultureType', undefined, '节庆活动' ],
       },
       },
       {
       {
         title: '祭祀崇礼',
         title: '祭祀崇礼',
         desc: '对先贤与自然的崇高致敬',
         desc: '对先贤与自然的崇高致敬',
         icon: 'icon-task-custom-3',
         icon: 'icon-task-custom-3',
         enable: 'folk_culture',
         enable: 'folk_culture',
-        goForm: [ 'folk_culture', 2, 'folk_culture_type', undefined, '祭祀崇礼' ],
+        goForm: [ 'folk_culture', 2, 'folkCultureType', undefined, '祭祀崇礼' ],
       },
       },
       {
       {
         title: '婚丧嫁娶',
         title: '婚丧嫁娶',
         desc: '生命礼赞与文化传承的双重奏鸣',
         desc: '生命礼赞与文化传承的双重奏鸣',
         icon: 'icon-task-custom-4',
         icon: 'icon-task-custom-4',
         enable: 'folk_culture',
         enable: 'folk_culture',
-        goForm: [ 'folk_culture', 3, 'folk_culture_type', undefined, '婚丧嫁娶' ],
+        goForm: [ 'folk_culture', 3, 'folkCultureType', undefined, '婚丧嫁娶' ],
       },
       },
       {
       {
         title: '地方方言',
         title: '地方方言',
         desc: '历史沉淀的语言瑰宝',
         desc: '历史沉淀的语言瑰宝',
         icon: 'icon-task-custom-5',
         icon: 'icon-task-custom-5',
         enable: 'folk_culture',
         enable: 'folk_culture',
-        goForm: [ 'folk_culture', 4, 'folk_culture_type', undefined, '地方方言' ],
+        goForm: [ 'folk_culture', 4, 'folkCultureType', undefined, '地方方言' ],
       },
       },
       {
       {
         title: '特色文化',
         title: '特色文化',
         desc: '民族精神的鲜明烙印',
         desc: '民族精神的鲜明烙印',
         icon: 'icon-task-custom-6',
         icon: 'icon-task-custom-6',
         enable: 'folk_culture',
         enable: 'folk_culture',
-        goForm: [ 'folk_culture', 5, 'folk_culture_type', undefined, '特色文化' ],
+        goForm: [ 'folk_culture', 5, 'folkCultureType', undefined, '特色文化' ],
       },
       },
     ],
     ],
   },
   },
@@ -229,14 +229,14 @@ export const TaskMenuDef : Record<string, TaskMenuDefItem> = {
         desc: '乡村繁荣的多元支柱',
         desc: '乡村繁荣的多元支柱',
         icon: 'icon-task-food-1',
         icon: 'icon-task-food-1',
         enable: 'food_product',
         enable: 'food_product',
-        goForm: [ 'food_product', 1, 'product_type', undefined, '农副产品' ],
+        goForm: [ 'food_product', 1, 'productType', undefined, '农副产品' ],
       },
       },
       {
       {
         title: '特色美食',
         title: '特色美食',
         desc: '给味蕾探索带来无限惊喜',
         desc: '给味蕾探索带来无限惊喜',
         icon: 'icon-task-food-2',
         icon: 'icon-task-food-2',
         enable: 'food_product',
         enable: 'food_product',
-        goForm: [ 'food_product', 3, 'product_type', undefined, '特色美食' ],
+        goForm: [ 'food_product', 3, 'productType', undefined, '特色美食' ],
       },
       },
     ],
     ],
   },
   },
@@ -248,7 +248,7 @@ export const TaskMenuDef : Record<string, TaskMenuDefItem> = {
         desc: '村落建立与发展历程',
         desc: '村落建立与发展历程',
         icon: 'icon-task-history-1',
         icon: 'icon-task-history-1',
         enable: 'cultural',
         enable: 'cultural',
-        goForm: [ 'cultural', 1, 'cultural_type', undefined, '建村历史' ],
+        goForm: [ 'cultural', 1, 'culturalType', undefined, '建村历史' ],
       },
       },
       {
       {
         title: '历史人物',
         title: '历史人物',
@@ -262,7 +262,7 @@ export const TaskMenuDef : Record<string, TaskMenuDefItem> = {
         desc: '重大历史事件记录',
         desc: '重大历史事件记录',
         icon: 'icon-task-history-3',
         icon: 'icon-task-history-3',
         enable: 'cultural',
         enable: 'cultural',
-        goForm: [ 'cultural', 2, 'cultural_type', undefined, '历史事件' ],
+        goForm: [ 'cultural', 2, 'culturalType', undefined, '历史事件' ],
       },
       },
       {
       {
         title: '掌故轶事',
         title: '掌故轶事',
@@ -276,14 +276,21 @@ export const TaskMenuDef : Record<string, TaskMenuDefItem> = {
         desc: '重要历史文献资料',
         desc: '重要历史文献资料',
         icon: 'icon-task-history-5',
         icon: 'icon-task-history-5',
         enable: 'cultural',
         enable: 'cultural',
-        goForm: [ 'cultural', 3, 'cultural_type', undefined, '历史文献' ],
+        goForm: [ 'cultural', 3, 'culturalType', undefined, '历史文献' ],
       },
       },
       {
       {
         title: '口述历史',
         title: '口述历史',
         desc: '村民口述历史记录',
         desc: '村民口述历史记录',
         icon: 'icon-task-history-6',
         icon: 'icon-task-history-6',
         enable: 'cultural',
         enable: 'cultural',
-        goForm: [ 'cultural', 4, 'cultural_type', undefined, '口述历史' ],
+        goForm: [ 'cultural', 4, 'culturalType', undefined, '口述历史' ],
+      },
+      {
+        title: '口述人管理',
+        desc: '口述人管理登记',
+        icon: 'icon-task-history-1',
+        enable: 'cultural',
+        goForm: [ 'speaker', 1, undefined, undefined, '口述人管理' ],
       },
       },
     ],
     ],
   },
   },
@@ -295,21 +302,21 @@ export const TaskMenuDef : Record<string, TaskMenuDefItem> = {
         desc: '文化交流的开放窗口',
         desc: '文化交流的开放窗口',
         icon: 'icon-task-mine-1',
         icon: 'icon-task-mine-1',
         enable: 'food_product',
         enable: 'food_product',
-        goForm: [ 'food_product', 4, 'product_type', undefined, '商业集市' ],
+        goForm: [ 'food_product', 4, 'productType', undefined, '商业集市' ],
       },
       },
       {
       {
         title: '服装服饰',
         title: '服装服饰',
         desc: '艺术与功能交织的时尚篇章',
         desc: '艺术与功能交织的时尚篇章',
         icon: 'icon-task-mine-2',
         icon: 'icon-task-mine-2',
         enable: 'food_product',
         enable: 'food_product',
-        goForm: [ 'food_product', 5, 'product_type', undefined, '服装服饰' ],
+        goForm: [ 'food_product', 5, 'productType', undefined, '服装服饰' ],
       },
       },
       {
       {
         title: '运输工具',
         title: '运输工具',
         desc: '历史的运输工具',
         desc: '历史的运输工具',
         icon: 'icon-task-mine-2',
         icon: 'icon-task-mine-2',
         enable: 'food_product',
         enable: 'food_product',
-        goForm: [ 'food_product', 6, 'product_type', undefined, '运输工具' ],
+        goForm: [ 'food_product', 6, 'productType', undefined, '运输工具' ],
       },
       },
     ],
     ],
   },
   },

+ 35 - 77
src/pages/home/index.vue

@@ -2,7 +2,7 @@
   <FlexCol :gap="20" :padding="20">
   <FlexCol :gap="20" :padding="20">
     <FlexCol :radius="15" overflow="hidden">
     <FlexCol :radius="15" overflow="hidden">
       <ImageSwiper 
       <ImageSwiper 
-        :height="200"
+        :height="300"
         :images="[
         :images="[
           'https://mn.wenlvti.net/app_static/minnan/images/home/BackgroundBanner5.jpg',
           'https://mn.wenlvti.net/app_static/minnan/images/home/BackgroundBanner5.jpg',
           'https://mn.wenlvti.net/app_static/minnan/images/home/BackgroundBanner4.jpg',
           'https://mn.wenlvti.net/app_static/minnan/images/home/BackgroundBanner4.jpg',
@@ -12,7 +12,8 @@
     </FlexCol>
     </FlexCol>
     <Box title="传统村落分布" icon="/static/images/home/icon-pin-distance.png">
     <Box title="传统村落分布" icon="/static/images/home/icon-pin-distance.png">
       <map 
       <map 
-        id="map"
+        id="prevMap"
+        map-id="prevMap"
         class="w-100 height-400 radius-base overflow-hidden"
         class="w-100 height-400 radius-base overflow-hidden"
         :markers="mapLoader.content.value || []"
         :markers="mapLoader.content.value || []"
         :scale="10"
         :scale="10"
@@ -20,7 +21,7 @@
         :latitude="AppCofig.defaultLonLat[1]"
         :latitude="AppCofig.defaultLonLat[1]"
       />
       />
     </Box>
     </Box>
-    <Box title="优秀线上史馆" icon="/static/images/home/icon-ancient-gate.png">
+    <Box title="线上史馆展示" icon="/static/images/home/icon-ancient-gate.png">
       <SimplePageContentLoader :loader="recommendLoader">
       <SimplePageContentLoader :loader="recommendLoader">
         <FlexRow justify="space-between" align="center" wrap :gap="25">
         <FlexRow justify="space-between" align="center" wrap :gap="25">
           <Touchable 
           <Touchable 
@@ -77,6 +78,8 @@
 </template>
 </template>
 
 
 <script setup lang="ts">
 <script setup lang="ts">
+import CommonContent from '@/api/CommonContent';
+import VillageApi from '@/api/inhert/VillageApi';
 import Box from '@/common/components/parts/Box.vue';
 import Box from '@/common/components/parts/Box.vue';
 import ImageSwiper from '@/common/components/parts/ImageSwiper.vue';
 import ImageSwiper from '@/common/components/parts/ImageSwiper.vue';
 import SimplePageContentLoader from '@/common/components/SimplePageContentLoader.vue';
 import SimplePageContentLoader from '@/common/components/SimplePageContentLoader.vue';
@@ -91,90 +94,45 @@ import FlexRow from '@/components/layout/FlexRow.vue';
 import Height from '@/components/layout/space/Height.vue';
 import Height from '@/components/layout/space/Height.vue';
 import Width from '@/components/layout/space/Width.vue';
 import Width from '@/components/layout/space/Width.vue';
 import { RandomUtils } from '@imengyu/imengyu-utils';
 import { RandomUtils } from '@imengyu/imengyu-utils';
+import { getCurrentInstance } from 'vue';
 
 
 function testImage() {
 function testImage() {
   return 'https://mncdn.wenlvti.net/app_static/minnan/images/home/ImageTest' + RandomUtils.genRandom(1, 5) +'.jpg';
   return 'https://mncdn.wenlvti.net/app_static/minnan/images/home/ImageTest' + RandomUtils.genRandom(1, 5) +'.jpg';
 }
 }
 
 
-const mapCtx = uni.createMapContext('map');
+const instance = getCurrentInstance();
+const mapCtx = uni.createMapContext('prevMap', instance);
 const mapLoader = useSimpleDataLoader(async () => {
 const mapLoader = useSimpleDataLoader(async () => {
-  const res = [
-    {
-      title: '传统村落',
-      longitude: Number(118.11441371826822),
-      latitude: Number(24.51019917828817),
-      width: 30,
-      height: 30,
-      iconPath: testImage(),
-    },
-    {
-      title: '传统村落',
-      longitude: Number(118.18573604529888),
-      latitude: Number(24.485581319259357),
-      width: 30,
-      height: 30,
-      iconPath: testImage(),
-    },
-    {
-      title: '传统村落',
-      longitude: Number(118.1242512731751),
-      latitude: Number(24.417297514622685),
-      width: 30,
-      height: 30,
-      iconPath: testImage(),
-    },
-    {
-      title: '传统村落',
-      longitude: Number(118.23861292755578),
-      latitude: Number(24.559407658427826),
-      width: 30,
-      height: 30,
-      iconPath: testImage(),
-    },
-  ]
-  mapCtx.includePoints({
-    points: res.map(p => {
-      if (!p.longitude || !p.latitude) {
-        p.longitude = AppCofig.defaultLonLat[0];
-        p.latitude = AppCofig.defaultLonLat[1];
-      }
-      return {
-        latitude: p.latitude,
-        longitude: p.longitude,
-      }
-    }),
-    padding: [20, 20, 20, 20],
-  });
+  const res = (await VillageApi.getVallageList()).map(p => ({
+    id: p.id,
+    title: p.villageName,
+    longitude: Number(p.longitude),
+    latitude: Number(p.latitude),
+    width: 30,
+    height: 30,
+    iconPath: p.thumbnail || p.image,
+  }));
+  setTimeout(() => {
+    mapCtx.includePoints({
+      points: res.map(p => {
+        if (!p.longitude || !p.latitude) {
+          p.longitude = AppCofig.defaultLonLat[0];
+          p.latitude = AppCofig.defaultLonLat[1];
+        }
+        return {
+          latitude: p.latitude,
+          longitude: p.longitude,
+        }
+      }),
+      padding: [20, 20, 20, 20],
+    });
+  }, 200);
   return res;
   return res;
 });
 });
 
 
 const recommendLoader = useSimpleDataLoader(async () => {
 const recommendLoader = useSimpleDataLoader(async () => {
-  return [
-    { 
-      title: '茶艺传承作坊', 
-      desc: '',
-      image: testImage(),
-      thumbnail: testImage(),
-    },
-    { 
-      title: '茶艺传承作坊', 
-      desc: '', 
-      image: testImage(),
-      thumbnail: testImage(),
-    },
-    { 
-      title: '茶艺传承作坊',  
-      desc: '',
-      image: testImage(),
-      thumbnail: testImage(),
-    },
-    { 
-      title: '茶艺传承作坊',  
-      desc: '',
-      image: testImage(),
-      thumbnail: testImage(),
-    },
-  ]
+  const category = (await CommonContent.getCategoryList(151)).find(p => p.title == '省级');
+  return (await VillageApi.getVallageList(category?.id)).slice(0, 8);
 });
 });
 
 
 const discoverLoader = useSimpleDataLoader(async () => {
 const discoverLoader = useSimpleDataLoader(async () => {

+ 1 - 1
src/pages/home/store/index.vue

@@ -3,7 +3,7 @@
     <SearchBar placeholder="输入关键词搜索" />
     <SearchBar placeholder="输入关键词搜索" />
     <FlexCol :radius="15" overflow="hidden">
     <FlexCol :radius="15" overflow="hidden">
       <ImageSwiper 
       <ImageSwiper 
-        :height="200"
+        :height="300"
         :images="[
         :images="[
           'https://mn.wenlvti.net/app_static/minnan/images/home/BackgroundBanner5.jpg',
           'https://mn.wenlvti.net/app_static/minnan/images/home/BackgroundBanner5.jpg',
           'https://mn.wenlvti.net/app_static/minnan/images/home/BackgroundBanner4.jpg',
           'https://mn.wenlvti.net/app_static/minnan/images/home/BackgroundBanner4.jpg',

+ 6 - 6
src/pages/index.vue

@@ -1,6 +1,6 @@
 <template>
 <template>
 	<view class="index">
 	<view class="index">
-    <StatusBarSpace backgroundColor="primary" />
+    <StatusBarSpace backgroundColor="transparent" />
     <NavBar 
     <NavBar 
       :title="title"
       :title="title"
       :titleScroll="false"
       :titleScroll="false"
@@ -42,15 +42,15 @@ import StoreIndex from './home/store/index.vue';
 const title = computed(() => {
 const title = computed(() => {
   switch (tabIndex.value) {
   switch (tabIndex.value) {
     case 0:
     case 0:
-      return '乡源·乡村文化资源挖掘平台';
+      return '首页·村社文化资源挖掘平台';
     case 1:
     case 1:
-      return '发现·村文化资源挖掘平台';
+      return '发现·村文化资源挖掘平台';
     case 2:
     case 2:
-      return '挖掘·村文化资源';
+      return '挖掘·村文化资源挖掘平台';
     case 3:
     case 3:
-      return '知识库·村文化资源挖掘平台';
+      return '知识库·村文化资源挖掘平台';
     case 4:
     case 4:
-      return '我的·村文化资源挖掘平台';
+      return '我的·村文化资源挖掘平台';
   }
   }
   return '';
   return '';
 });
 });

BIN
src/static/images/BackgroundMask.jpg