Переглянути джерело

📦 按要求修改表单页面

快乐的梦鱼 2 тижнів тому
батько
коміт
ef160fbba4

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

@@ -23,7 +23,7 @@ export class CommonInfo<T extends DataModel> extends DataModel<T> {
   
   title = '' as string;
   region = null as number|null;
-  image = '' as string|null;
+  image = null as string|null;
   imageDesc = '' as string|null;
   images = [] as string[];
   audio = '' as string|null;

+ 1 - 1
src/common/ConstStrings.ts

@@ -1,2 +1,2 @@
 export const NO_CONTENT_STRING = '无内容,请添加内容!';
-export const TITLE = '闽南文化资源调查采集';
+export const TITLE = '闽南文化资源调查采集平台';

+ 136 - 0
src/components/dynamicf/Map/AddressSercher.vue

@@ -0,0 +1,136 @@
+<script setup lang="ts">
+import { ref, computed, nextTick, watch, type Ref } from 'vue';
+import { SearchOutlined } from '@ant-design/icons-vue';
+import type { SelectProps } from 'ant-design-vue';
+
+// 定义Props
+const props = defineProps<{
+  modelValue?: string;
+}>();
+
+// 定义Emits
+const emit = defineEmits<{
+  'update:modelValue': [value: string];
+  'choosedAddress': [address: AddressItem];
+}>();
+
+export interface AddressItem {
+  name: string;
+  lng: number;
+  lat: number;
+  address: string;
+}
+
+// 状态管理
+const inputValue = ref(props.modelValue);
+const addressList = ref<Array<AddressItem>>([]);
+const showDropdown = ref(false);
+const loading = ref(false);
+
+// 监听modelValue变化
+watch(() => props.modelValue, (newValue) => {
+  inputValue.value = newValue ;
+});
+
+
+
+// 调用高德API搜索地址
+async function searchAddress() {
+  if (!inputValue.value?.trim()) return;
+  loading.value = true;
+
+  try {
+    const apiKey = '8fd09264c33678141f609588c432df0e';
+    const url = `https://restapi.amap.com/v3/place/text?key=${apiKey}&keywords=${encodeURIComponent(inputValue.value)}&citylimit=true&offset=10&page=1`;
+    
+    const response = await fetch(url);
+    const data = await response.json();
+    
+    if (data.status === '1' && data.pois && data.pois.length > 0) {
+      addressList.value = data.pois.map((item: any) => ({
+        name: item.name,
+        lng: parseFloat(item.location.split(',')[0]),
+        lat: parseFloat(item.location.split(',')[1]),
+        address: item.address || item.name
+      }));
+      
+      // 显示下拉框
+      await nextTick();
+      showDropdown.value = true;
+    } else {
+      addressList.value = [];
+      showDropdown.value = false;
+    }
+  } catch (error) {
+    console.error('搜索地址失败:', error);
+    addressList.value = [];
+    showDropdown.value = false;
+  } finally {
+    loading.value = false;
+  }
+}
+
+// 选择地址
+function handleSelectAddress(address: any) {
+  // 更新输入值
+  inputValue.value = address.name;
+  emit('update:modelValue', address.name);
+  
+  // 发送详细地址信息
+  emit('choosedAddress', {
+    name: address.name,
+    lng: address.lng,
+    lat: address.lat,
+    address: address.address
+  });
+  
+  // 关闭下拉框
+  showDropdown.value = false;
+}
+
+// 处理输入变化
+function handleInputChange(value: string) {
+  inputValue.value = value;
+  emit('update:modelValue', value);
+}
+
+// 处理点击搜索按钮
+function handleSearch() {
+  searchAddress();
+}
+
+// 定义select组件的选项
+const selectOptions = computed<SelectProps['options']>(() => {
+  return addressList.value.map(item => ({
+    label: `${item.name} (${item.address})`,
+    value: item.name,
+    data: item
+  }));
+});
+</script>
+
+<template>
+  <div style="position: relative; display: flex; align-items: center; gap: 8px;">
+    <div style="position: relative; flex: 1;">
+      <a-select
+        v-model:value="inputValue"
+        mode="combobox"
+        :options="selectOptions"
+        :show-search="true"
+        :open="showDropdown"
+        :default-active-first-option="false"
+        :show-arrow="false"
+        :filter-option="false"
+        :not-found-content="null"
+        placeholder="请输入地址"
+        style="width: 100%;"
+        @select="(value: string, option: any) => handleSelectAddress(option?.data)"
+        @search="handleInputChange"
+      />
+    </div>
+    <a-button type="primary" :loading="loading" @click="handleSearch">
+      <SearchOutlined />
+      搜索
+    </a-button>
+  </div>
+</template>

+ 9 - 0
src/components/dynamicf/Map/MapPointPicker.vue

@@ -47,6 +47,15 @@ watch(center, (newVal) => {
   emit('update:modelValue', newVal);
 })
 
+defineExpose({
+  moveTo(lonlat: (number|string)[], zoom?: number) {
+    map.setCenter(lonlat);
+    if (zoom) {
+      map.setZoom(zoom);
+    }
+  }
+})
+
 </script>
 
 <style scoped>

+ 26 - 9
src/components/dynamicf/UploadImageFormItem.vue

@@ -12,14 +12,18 @@
     @change="handleUploadSubImgChange"
   >
     <template v-if="single">
-      <a-image v-if="value != ''" 
-        :src="(value as string)"
-        alt="avatar"
-        :width="singleImageSize.width"
-        :height="singleImageSize.height"
-        :preview="false"
-        :fallback="failImage" 
-      />
+      
+      <div v-if="Boolean(value)" class="ant-upload-image">
+        点击替换图片
+        <a-image
+          :src="(value as string)"
+          alt="avatar"
+          :width="singleImageSize.width"
+          :height="singleImageSize.height"
+          :preview="false"
+          :fallback="failImage" 
+        />
+      </div>
       <div v-else :style="{ width: singleImageSize.width, height: singleImageSize.height }">
         <loading-outlined v-if="uploadingSubImg"></loading-outlined>
         <plus-outlined v-else></plus-outlined>
@@ -166,4 +170,17 @@ function handleUploadSubImgChange(info: FileInfo) {
     message.error('上传失败!' + info.file.response);
   }
 }
-</script>
+</script>
+
+<style lang="scss">
+.ant-upload-image {
+  margin-top: 10px;
+  display: flex;
+  flex-direction: column;
+  border: 1px solid #666666;
+  background-color: #e8e8e8;
+  border-radius: 8px;
+  text-align: center;
+}
+
+</style>

+ 25 - 9
src/components/dynamicf/UploadVideoFormItem.vue

@@ -12,14 +12,17 @@
     @change="handleUploadSubImgChange"
   >
     <template v-if="single">
-      <video v-if="value != ''" 
-        :src="(value as string)"
-        alt="avatar"
-        controls
-        :width="singleImageSize.width"
-        :height="singleImageSize.height"
-        :preview="false"
-      />
+      <div v-if="value != ''" class="ant-upload-video">
+        已选择,点击替换视频
+        <video 
+          :src="(value as string)"
+          alt="avatar"
+          controls
+          :width="singleImageSize.width"
+          :height="singleImageSize.height"
+          :preview="false"
+        />
+      </div>
       <div v-else :style="{ width: singleImageSize.width, height: singleImageSize.height }">
         <loading-outlined v-if="uploadingSubImg"></loading-outlined>
         <plus-outlined v-else></plus-outlined>
@@ -166,4 +169,17 @@ function handleUploadSubImgChange(info: FileInfo) {
     message.error('上传失败!' + info.file.response);
   }
 }
-</script>
+</script>
+
+<style lang="scss">
+.ant-upload-video {
+  display: flex;
+  flex-direction: column;
+  padding: 10px;
+  border: 1px solid #666666;
+  background-color: #e8e8e8;
+  border-radius: 8px;
+  text-align: center;
+}
+
+</style>

+ 3 - 0
src/components/dynamicf/index.ts

@@ -30,6 +30,7 @@ import MapPointPicker from "./Map/MapPointPicker.vue";
 import { QuillEditor } from "@vueup/vue-quill";
 import QuillEditorWrapper from "./Editor/QuillEditorWrapper.vue";
 import UploadVideoFormItem from "./UploadVideoFormItem.vue";
+import AddressSercher from "./Map/AddressSercher.vue";
 
 export const defaultConfig = {
   internalWidgets: {
@@ -96,4 +97,6 @@ export function registerAllFormComponents() {
     .register('space', markRaw(WhiteSpaceVue))
     .register('map-pick-point', markRaw(MapPointPicker))
     .register('richtext', markRaw(QuillEditorWrapper), {}, 'modelValue')
+    .register('address-sercher', markRaw(AddressSercher), {}, 'modelValue')
+
 }

+ 5 - 1
src/components/parts/EmptyToRecord.vue

@@ -9,6 +9,10 @@ defineProps({
     type: String,
     default: '非遗项目'
   },
+  buttonText: {
+    type: String,
+    default: '去补充'
+  },
   showEdited: {
     type: Boolean,
     default: true
@@ -24,7 +28,7 @@ defineProps({
     :subTitle="`暂无${title}信息,快去补充`"
   > 
     <template #extra>
-      <a-button type="primary" @click="emit('edit')">去补充</a-button>
+      <a-button type="primary" @click="emit('edit')">{{ buttonText }}</a-button>
     </template>
   </a-result>
   <div v-else>

+ 16 - 3
src/pages/forms/form.vue

@@ -13,9 +13,9 @@
         <template v-else>
           
           <a-tabs centered>
-            <a-tab-pane key="1" tab="基础信息">
+            <a-tab-pane key="1" :tab="basicTabText">
               <DynamicForm
-                ref="form"
+                ref="formBase"
                 :model="(formModel as any)" 
                 :options="formOptions"
               />
@@ -63,7 +63,11 @@ import type { DataModel } from '@imengyu/js-request-transform';
 const props = defineProps({
   title: {
     type: String,
-    default: '非遗数字化资源采集'
+    default: '非遗数字化资源信息校对'
+  },
+  basicTabText: {
+    type: String,
+    default: '基础信息'
   },
   formModel: {
     type: Object as PropType<T>,
@@ -196,5 +200,14 @@ function handleBack() {
 onMounted(async () => {
   await loadData();
 })
+
+defineExpose({
+  getFormRef() {
+    return formBase.value;
+  },
+  getExtraFormRef() {
+    return formExtend.value;
+  },
+})
 </script>
 

+ 66 - 67
src/pages/forms/ich.vue

@@ -1,10 +1,11 @@
 <template>
-  <!-- 非遗基础表单 -->
+  <!-- 非遗基础表单 
+    :extendFormModel="formExtendModel"
+    :extendFormOptions="formExtendOptions"-->
   <Form 
+    ref="formRef"
     :formModel="formModel"
     :formOptions="formOptions"
-    :extendFormModel="formExtendModel"
-    :extendFormOptions="formExtendOptions"
     :load="loadData"
   />
 </template>
@@ -15,10 +16,12 @@ import { useImageSimpleUploadCo } from '@/common/upload/ImageUploadCo';
 import Form from './form.vue';
 import InheritorContent, { IchExpandInfo, IchInfo } from '@/api/inheritor/InheritorContent';
 import CommonContent from '@/api/CommonContent';
-import type { IDynamicFormOptions } from '@imengyu/vue-dynamic-form';
+import type { IDynamicFormOptions, IDynamicFormRef } from '@imengyu/vue-dynamic-form';
 import type { SelectProps } from 'ant-design-vue';
 import type { UploadImageFormItemProps } from '@/components/dynamicf/UploadImageFormItem';
+import type { AddressItem } from '@/components/dynamicf/Map/AddressSercher.vue';
 
+const formRef = ref();
 const formModel = ref(new IchInfo()) as Ref<IchInfo>;
 const formOptions = ref<IDynamicFormOptions>({
   formLabelCol: { span: 6 },
@@ -30,22 +33,27 @@ const formOptions = ref<IDynamicFormOptions>({
   formNestNameGenerateType: 'array',
   formItems: [
     {
-      type: 'group-flat', label: '非遗信息', name: 'ichInfo',
+      type: 'group-flat', label: '非遗基础档案', name: 'ichInfo',
       childrenColProps: { span: 24 },
       children: [
         { 
-          label: '标题', name: 'title', type: 'text',
-          additionalProps: { placeholder: '请输入标题' },
+          label: '非遗项目名称', name: 'title', type: 'text',
+          disabled: true,
+          additionalProps: {
+            placeholder: '请输入标题',
+          },
         },
         { 
           label: '级别', name: 'level', type: 'select-id',
+          disabled: true,
           additionalProps: {
             placeholder: '请选择级别',
             loadData: async () => (await CommonContent.getCategoryList(2)).map(p => ({ label: p.title, value: p.id, raw: p }))
           },  
         },
         { 
-          label: '非遗类型', name: 'ichType', type: 'select-id',
+          label: '非遗分类', name: 'ichType', type: 'select-id',
+          disabled: true,
           additionalProps: {
             placeholder: '请选择非遗类型',
             loadData: async () => (await CommonContent.getCategoryList(4)).map(p => ({ label: p.title, value: p.id, raw: p }))
@@ -53,15 +61,30 @@ const formOptions = ref<IDynamicFormOptions>({
         },
         { 
           label: '批次', name: 'batch', type: 'select-id',
+          disabled: true,
           additionalProps: {
             placeholder: '请选择批次',
             loadData: async () => (await CommonContent.getCategoryList(289)).map(p => ({ label: p.title, value: p.id, raw: p }))
           },
         },
-        { label: '简介', name: 'intro', type: 'richtext', additionalProps: { placeholder: '请输入简介' } },
-        { label: '项目描述', name: 'description', type: 'richtext', additionalProps: { placeholder: '请输入项目描述' } },
-        { label: '传承值', name: 'heritage', type: 'text', additionalProps: { placeholder: '请输入传承值' } },
+        { label: '申报区域', name: 'declarationRegion', type: 'text', disabled: true, additionalProps: { placeholder: '请输入申报地区' } },
         
+        { label: '非遗项目简介', name: 'intro', type: 'richtext', additionalProps: { placeholder: '请输入简介' } },
+        { label: '传承谱系', name: 'pedigree', type: 'richtext', additionalProps: { placeholder: '请输入传承谱系' } },
+        //{ label: '非遗详细描述', name: 'description', type: 'richtext', additionalProps: { placeholder: '请输入项目描述' } },
+        //{ label: '传承值', name: 'heritage', type: 'text', additionalProps: { placeholder: '请输入传承值' } },
+        
+        { 
+          label: '保护单位地址', name: 'address', type: 'address-sercher', 
+          additionalProps: { placeholder: '请输入地址' },
+          additionalEvents: {
+            choosedAddress: (address: AddressItem) => {
+              ((formRef.value?.getFormRef() as IDynamicFormRef).getFormItemControlRef('lonlat') as any).moveTo([
+                address.lng, address.lat
+              ], 20)
+            },
+          }
+        },
         { label: '地图坐标', name: 'lonlat', type: 'map-pick-point' },
         
         {
@@ -72,51 +95,47 @@ const formOptions = ref<IDynamicFormOptions>({
             { label: '平面坐标Y', name: 'mapY', type: 'number', additionalProps: { placeholder: '请输入平面坐标Y' } },
           ]
         },
-        { label: '保护单位', name: 'unit', type: 'text', additionalProps: { placeholder: '请输入保护单位' } },
-        { label: '地址', name: 'address', type: 'text', additionalProps: { placeholder: '请输入地址' } },
-        { label: '非遗编号', name: 'code', type: 'text', additionalProps: { placeholder: '请输入非遗编号' } },
-        { label: '申报地区', name: 'declarationRegion', type: 'text', additionalProps: { placeholder: '请输入申报地区' } },
-        { label: '流行地区', name: 'popularRegion', type: 'text', additionalProps: { placeholder: '请输入流行地区' } },
-        { label: '批准时间', name: 'approveTime', type: 'text', additionalProps: { placeholder: '请输入批准时间' } },
+        { label: '保护单位(多个保护单位请用逗号隔开)', name: 'unit', type: 'text', additionalProps: { placeholder: '请输入保护单位' } },
+        //{ label: '非遗编号', name: 'code', type: 'text', additionalProps: { placeholder: '请输入非遗编号' } },
+        //{ label: '流行地区', name: 'popularRegion', type: 'text', additionalProps: { placeholder: '请输入流行地区' } },
+        //{ label: '批准时间', name: 'approveTime', type: 'text', additionalProps: { placeholder: '请输入批准时间' } },     
         { 
-          type: 'array-object', label: '代表性图片', name: 'typicalImages',
+          label: '非遗项目相关图片', name: 'images', type: 'mulit-image',
+          hidden: { callback: (_, model) => (model as IchInfo).type !== 4 },
           formProps: {
-            center: false,
+            extra: '建议分辨率:1920*1080以上',
           },
           additionalProps: {
-            direction: 'horizontal'
-          },
-          newChildrenObject: (arrayNow) => ({
-            desc: `代表性图片${arrayNow.length+1}`,
-            url: '',
-            from: '',
-            mobile: '',
-          }),
-          children: [
-            { type: 'text', label: '来源', name: 'from', additionalProps: { placeholder: '请输入来源' } },
-            { type: 'text', label: '联系方式', name: 'mobile', additionalProps: { placeholder: '请输入联系方式' } },
-            { type: 'text', label: '说明', name: 'desc', additionalProps: { placeholder: '请输入说明' } },
-            { 
-              label: '图片', name: 'url', type: 'single-image',
-              additionalProps: {
-                name: 'file',
-                placeholder: '请上传图片',
-                uploadCo: useImageSimpleUploadCo(),
-              } as UploadImageFormItemProps,
-            },
-          ]
+            placeholder: '请上传图片',
+            maxCount: 20,
+            name: 'file',
+            uploadCo: useImageSimpleUploadCo(),
+          } as UploadImageFormItemProps,
         },
         { 
-          label: '展厅图片', name: 'ztImage', type: 'single-image',
+          label: '视频', name: 'video', type: 'single-video',
+          //hidden: { callback: (_, model) => (model as IchInfo).type !== 3 },
           additionalProps: {
+            placeholder: '请上传视频',
             name: 'file',
-            placeholder: '请上传展厅图片',
-            uploadCo: useImageSimpleUploadCo(),
-          } as UploadImageFormItemProps,
+            uploadCo: useImageSimpleUploadCo()
+          } as UploadImageFormItemProps,  
+        },
+        { 
+          label: '审核人员', name: 'text1', type: 'static-text', 
+          additionalProps: {
+            text: '黄念旭,李向群,卢志明',
+          }
+        },
+        { 
+          label: '审核状态', name: 'text2', type: 'static-text', 
+          additionalProps: {
+            text: '暂未审核',
+          }
         },
       ]
     },
-    {
+    /* {
       type: 'group-flat', label: '通用信息', name: 'commonInfo',
       childrenColProps: { span: 24 },
       children: [
@@ -139,18 +158,7 @@ const formOptions = ref<IDynamicFormOptions>({
               { text: '数字档案', value: 5 }]
             },  
         },
-        { 
-          label: '图片', name: 'image', type: 'single-image',
-          additionalProps: {
-            placeholder: '请上传图片',
-            name: 'file',
-            uploadCo: useImageSimpleUploadCo()
-          } as UploadImageFormItemProps,
-        },
-        { 
-          label: '图片说明', name: 'imageDesc', type: 'text',
-          additionalProps: { placeholder: '请输入图片说明' }
-        },
+        
         { 
           label: '转自', name: 'from', type: 'text',
           additionalProps: { placeholder: '请输入来源' },
@@ -175,15 +183,6 @@ const formOptions = ref<IDynamicFormOptions>({
           } as UploadImageFormItemProps,
         },
         { 
-          label: '视频', name: 'video', type: 'single-video',
-          hidden: { callback: (_, model) => (model as IchInfo).type !== 3 },
-          additionalProps: {
-            placeholder: '请上传视频',
-            name: 'file',
-            uploadCo: useImageSimpleUploadCo()
-          } as UploadImageFormItemProps,  
-        },
-        { 
           label: '数字档案', name: 'archives', type: 'mulit-image',
           hidden: { callback: (_, model) => (model as IchInfo).type !== 5 },
           additionalProps: {
@@ -226,7 +225,7 @@ const formOptions = ref<IDynamicFormOptions>({
           additionalProps: { placeholder: '请输入备注' },
         },
       ]
-    },
+    }, */
   ],
   formRules: {
     title: [{ required: true, message: '请输入标题' }],

+ 43 - 27
src/pages/forms/inheritor.vue

@@ -1,10 +1,9 @@
 <template>
-  <!-- 传承人基础表单 -->
+  <!-- 传承人基础表单    :extendFormModel="formExtendModel"
+    :extendFormOptions="formExtendOptions" -->
   <Form 
     :formModel="formModel"
     :formOptions="formOptions"
-    :extendFormModel="formExtendModel"
-    :extendFormOptions="formExtendOptions"
     :load="loadData"
   />
 </template>
@@ -30,11 +29,12 @@ const formOptions = ref<IDynamicFormOptions>({
   formNestNameGenerateType: 'array',
   formItems: [
     {
-      type: 'group-flat', label: '传承人信息', name: 'ichInfo',
+      type: 'group-flat', label: '传承人基础档案', name: 'ichInfo',
       childrenColProps: { span: 24 },
       children: [
         { 
-          label: '标题', name: 'title', type: 'text',
+          label: '姓名', name: 'title', type: 'text',
+          disabled: true,
           additionalProps: { placeholder: '请输入标题' },
         },
         { 
@@ -50,6 +50,7 @@ const formOptions = ref<IDynamicFormOptions>({
         },
         { 
           label: '传承人等级', name: 'level', type: 'select-id',
+          disabled: true,
           additionalProps: {
             placeholder: '请选择传承人等级',
             loadData: async () => (await CommonContent.getCategoryList(2)).map(p => ({ label: p.title, value: p.id, raw: p }))
@@ -57,23 +58,26 @@ const formOptions = ref<IDynamicFormOptions>({
         },
         { 
           label: '传承人批次', name: 'batch', type: 'select-id',
+          disabled: true,
           additionalProps: {
             placeholder: '请选择传承人批次',
             loadData: async () => (await CommonContent.getCategoryList(289)).map(p => ({ label: p.title, value: p.id, raw: p }))
           },
         },
-        { label: '别称', name: 'alsoName', type: 'text', additionalProps: { placeholder: '请输入别称' } },
-        { label: '时代', name: 'age', type: 'text', additionalProps: { placeholder: '请输入时代' } },
+        //{ label: '别称', name: 'alsoName', type: 'text', additionalProps: { placeholder: '请输入别称' } },
+        //{ label: '时代', name: 'age', type: 'text', additionalProps: { placeholder: '请输入时代' } },
         { label: '出生地', name: 'birthplace', type: 'text', additionalProps: { placeholder: '请输入出生地' } },
         { label: '民族', name: 'nation', type: 'text', additionalProps: { placeholder: '请输入民族' } },
         { label: '出生日期', name: 'dateBirth', type: 'text', additionalProps: { placeholder: '请选择出生日期' } },
-        { label: '逝世日期', name: 'deathBirth', type: 'text', additionalProps: { placeholder: '请选择逝世日期' } },
-        { label: '单位', name: 'unit', type: 'text', additionalProps: { placeholder: '请输入单位' } },
-        { label: '简介', name: 'intro', type: 'richtext', additionalProps: { placeholder: '请输入简介' } },
-        { label: '详情', name: 'content', type: 'richtext', additionalProps: { placeholder: '请输入详情' } },
+        //{ label: '逝世日期', name: 'deathBirth', type: 'text', additionalProps: { placeholder: '请选择逝世日期' } },
+        { label: '保护单位', name: 'unit', type: 'text', additionalProps: { placeholder: '请输入单位' } },
+        { label: '传承人简介', name: 'intro', type: 'richtext', additionalProps: { placeholder: '请输入简介' } },
+        //{ label: '详情', name: 'content', type: 'richtext', additionalProps: { placeholder: '请输入详情' } },
         { label: '奖项-成就', name: 'prize', type: 'richtext', additionalProps: { placeholder: '请输入奖项-成就' } },
+        { label: '传承人谱系', name: 'pedigree', type: 'richtext', additionalProps: { placeholder: '请输入传承谱系' } },
+        
         { 
-          type: 'array-object', label: '代表性图片', name: 'typicalImages',
+          type: 'array-object', label: '传承人照片(建议分辨率:1920*1080以上,请上传传承人证件照、工作照、生活照、实践活动照)', name: 'typicalImages',
           formProps: {
             center: false,
           },
@@ -87,11 +91,11 @@ const formOptions = ref<IDynamicFormOptions>({
             mobile: '',
           }),
           children: [
-            { type: 'text', label: '来源', name: 'from', additionalProps: { placeholder: '请输入来源' } },
-            { type: 'text', label: '联系方式', name: 'mobile', additionalProps: { placeholder: '请输入联系方式' } },
-            { type: 'text', label: '说明', name: 'desc', additionalProps: { placeholder: '请输入说明' } },
+            { type: 'text', label: '照片来源', name: 'from', additionalProps: { placeholder: '请输入来源' } },
+            //{ type: 'text', label: '联系方式', name: 'mobile', additionalProps: { placeholder: '请输入联系方式' } },
+            { type: 'text', label: '照片说明', name: 'desc', additionalProps: { placeholder: '请输入说明' } },
             { 
-              label: '片', name: 'url', type: 'single-image',
+              label: '片', name: 'url', type: 'single-image',
               additionalProps: {
                 name: 'file',
                 placeholder: '请上传图片',
@@ -100,9 +104,30 @@ const formOptions = ref<IDynamicFormOptions>({
             },
           ]
         },
+        { 
+          label: '传承人介绍视频', name: 'video', type: 'single-video',
+          //hidden: { callback: (_, model) => (model as InheritorInfo).type !== 3 },
+          additionalProps: {
+            placeholder: '请上传视频',
+            name: 'file',
+            uploadCo: useImageSimpleUploadCo()
+          } as UploadImageFormItemProps,  
+        },
+        { 
+          label: '审核人员', name: 'text1', type: 'static-text', 
+          additionalProps: {
+            text: '黄念旭,李向群,卢志明',
+          }
+        },
+        { 
+          label: '审核状态', name: 'text2', type: 'static-text', 
+          additionalProps: {
+            text: '暂未审核',
+          }
+        },
       ]
     },
-    {
+    /* {
       type: 'group-flat', label: '通用信息', name: 'commonInfo',
       childrenColProps: { span: 24 },
       children: [
@@ -161,15 +186,6 @@ const formOptions = ref<IDynamicFormOptions>({
           } as UploadImageFormItemProps,
         },
         { 
-          label: '视频', name: 'video', type: 'single-video',
-          hidden: { callback: (_, model) => (model as InheritorInfo).type !== 3 },
-          additionalProps: {
-            placeholder: '请上传视频',
-            name: 'file',
-            uploadCo: useImageSimpleUploadCo()
-          } as UploadImageFormItemProps,  
-        },
-        { 
           label: '数字档案', name: 'archives', type: 'mulit-image',
           hidden: { callback: (_, model) => (model as InheritorInfo).type !== 5 },
           additionalProps: {
@@ -212,7 +228,7 @@ const formOptions = ref<IDynamicFormOptions>({
           additionalProps: { placeholder: '请输入备注' },
         },
       ]
-    },
+    }, */
   ],
   formRules: {
     title: [{ required: true, message: '请输入标题' }],

+ 46 - 11
src/pages/forms/seminar.vue

@@ -1,10 +1,11 @@
 <template>
-  <!-- 传习所基础表单 -->
+  <!-- 传习所基础表单 
+    :extendFormModel="formExtendModel"
+    :extendFormOptions="formExtendOptions" -->
   <Form 
+    ref="formRef"
     :formModel="formModel"
     :formOptions="formOptions"
-    :extendFormModel="formExtendModel"
-    :extendFormOptions="formExtendOptions"
     :load="loadData"
   />
 </template>
@@ -15,10 +16,12 @@ import { useImageSimpleUploadCo } from '@/common/upload/ImageUploadCo';
 import Form from './form.vue';
 import InheritorContent, { SeminarExpandInfo, SeminarInfo } from '@/api/inheritor/InheritorContent';
 import CommonContent from '@/api/CommonContent';
-import type { IDynamicFormOptions } from '@imengyu/vue-dynamic-form';
+import type { IDynamicFormOptions, IDynamicFormRef } from '@imengyu/vue-dynamic-form';
 import type { SelectProps } from 'ant-design-vue';
 import type { UploadImageFormItemProps } from '@/components/dynamicf/UploadImageFormItem';
+import type { AddressItem } from '@/components/dynamicf/Map/AddressSercher.vue';
 
+const formRef = ref();
 const formModel = ref(new SeminarInfo()) as Ref<SeminarInfo>;
 const formOptions = ref<IDynamicFormOptions>({
   formLabelCol: { span: 6 },
@@ -30,11 +33,11 @@ const formOptions = ref<IDynamicFormOptions>({
   formNestNameGenerateType: 'array',
   formItems: [
     {
-      type: 'group-flat', label: '传习所信息', name: 'seminarInfo',
+      type: 'group-flat', label: '传习所/保护单位信息', name: 'seminarInfo',
       childrenColProps: { span: 24 },
       children: [
         { 
-          label: '标题', name: 'title', type: 'text',
+          label: '传习所名称', name: 'title', type: 'text',
           additionalProps: { placeholder: '请输入标题' },
         },
         { 
@@ -51,8 +54,18 @@ const formOptions = ref<IDynamicFormOptions>({
             loadData: async () => (await CommonContent.getCategoryList(2)).map(p => ({ label: p.title, value: p.id, raw: p }))
           },
         },
-        { label: '简介', name: 'content', type: 'richtext', additionalProps: { placeholder: '请输入内容' } },
+        { label: '传习所介绍', name: 'content', type: 'richtext', additionalProps: { placeholder: '请输入内容' } },
         
+        { label: '传习所地址', name: 'address', type: 'address-sercher', 
+          additionalProps: { placeholder: '请输入地址' },
+          additionalEvents: {
+            choosedAddress: (address: AddressItem) => {
+              ((formRef.value?.getFormRef() as IDynamicFormRef).getFormItemControlRef('lonlat') as any).moveTo([
+                address.lng, address.lat
+              ], 20)
+            },
+          }
+        },
         { label: '地图坐标', name: 'lonlat', type: 'map-pick-point' },
         
         {
@@ -64,11 +77,10 @@ const formOptions = ref<IDynamicFormOptions>({
           ]
         },
         
-        { label: '地址', name: 'address', type: 'text', additionalProps: { placeholder: '请输入地址' } },
         { label: '联系人', name: 'contact', type: 'text', additionalProps: { placeholder: '请输入联系人' } },
         { label: '联系电话', name: 'mobile', type: 'text', additionalProps: { placeholder: '请输入联系电话' } },
         { 
-          label: '非遗单位类型', name: 'ichSiteType', type: 'select',
+          label: '传习所/保护单位类型', name: 'ichSiteType', type: 'select',
           additionalProps: {
             placeholder: '请选择非遗单位类型',
             options: [
@@ -77,9 +89,32 @@ const formOptions = ref<IDynamicFormOptions>({
             ]
           },
         },
+        { 
+          label: '是否对游客开放', name: 'visit', type: 'select',
+          additionalProps: {
+            placeholder: '请选择是否对游客开放',
+            options: [
+              { text: '否', value: 0 },
+              { text: '是', value: 1 }
+            ]
+          },
+        },
+        { 
+          label: '审核人员', name: 'text1', type: 'static-text', 
+          additionalProps: {
+            text: '黄念旭,李向群,卢志明',
+          }
+        },
+        { 
+          label: '审核状态', name: 'text2', type: 'static-text', 
+          additionalProps: {
+            text: '暂未审核',
+          }
+        },
       ]
     },
-    {
+
+    /* {
       type: 'group-flat', label: '通用信息', name: 'commonInfo',
       childrenColProps: { span: 24 },
       children: [
@@ -189,7 +224,7 @@ const formOptions = ref<IDynamicFormOptions>({
           additionalProps: { placeholder: '请输入备注' },
         },
       ]
-    },
+    }, */
   ],
   formRules: {
     expandInfo: {

+ 38 - 9
src/pages/forms/works.vue

@@ -4,6 +4,7 @@
     :formModel="formModel"
     :formOptions="formOptions"
     :load="loadData"
+    basicTabText="作品/产品信息"
   />
 </template>
 
@@ -29,16 +30,32 @@ const formOptions = ref<IDynamicFormOptions>({
   formNestNameGenerateType: 'array',
   formItems: [
       {
-        type: 'group-flat', label: '作品信息', name: 'baseInfo',
+        type: 'group-flat', label: '作品/产品信息', name: 'baseInfo',
         childrenColProps: { span: 24 },
         children: [
-          { label: '标题', name: 'title', type: 'text', additionalProps: { placeholder: '请输入标题' } },
-          { label: '地区', name: 'region', type: 'select-id', additionalProps: { placeholder: '请选择地区', loadData: async () => (await CommonContent.getCategoryList(1)).map(p => ({ label: p.title, value: p.id, raw: p })) } },
-          { label: '类型', name: 'type', type: 'select', additionalProps: { placeholder: '请选择类型', options: [{ text: '文章', value: 1 }, { text: '音频', value: 2 }, { text: '视频', value: 3 }, { text: '相册', value: 4 }, { text: '数字档案', value: 5 }] } },
-          { label: '图片', name: 'image', type: 'single-image', additionalProps: { placeholder: '请上传图片', uploadCo: useImageSimpleUploadCo(), name: 'file', accept: 'image/*' } as UploadImageFormItemProps },
+          { label: '作品/产品名称', name: 'title', type: 'text', additionalProps: { placeholder: '请输入标题' } },
+          { label: '所属区域', name: 'region', type: 'select-id', additionalProps: { placeholder: '请选择地区', loadData: async () => (await CommonContent.getCategoryList(1)).map(p => ({ label: p.title, value: p.id, raw: p })) } },
+          { label: '类型', name: 'type', type: 'select', 
+            additionalProps: { 
+              placeholder: '请选择类型', 
+              options: [
+                { text: '文字', value: 1 }, 
+                { text: '音频', value: 2 }, 
+                { text: '视频', value: 3 }, 
+                { text: '相册', value: 4 }, 
+                { text: '其他类型', value: 5 }
+              ] 
+            } as SelectProps 
+          },
+          { label: '缩略图', name: 'image', type: 'single-image', additionalProps: { placeholder: '请上传图片', uploadCo: useImageSimpleUploadCo(), name: 'file', accept: 'image/*' } as UploadImageFormItemProps },
           { label: '图片说明', name: 'imageDesc', type: 'text', additionalProps: { placeholder: '请输入图片说明' } },
-          { label: '组图', name: 'images', type: 'mulit-image', additionalProps: { placeholder: '请上传组图', uploadCo: useImageSimpleUploadCo(), name: 'file', accept: 'image/*', maxCount: 20 } as UploadImageFormItemProps },
-          { label: '内容介绍', name: 'content', type: 'richtext', additionalProps: { placeholder: '请输入内容介绍' } },
+          { 
+            label: '组图', name: 'images', type: 'mulit-image', additionalProps: { 
+              placeholder: '请上传组图', 
+              uploadCo: useImageSimpleUploadCo(), name: 'file', accept: 'image/*', maxCount: 20 
+            } as UploadImageFormItemProps 
+          },
+          { label: '作品/产品介绍', name: 'content', type: 'richtext', additionalProps: { placeholder: '请输入内容介绍' } },
           { 
             label: '音频', name: 'audio', type: 'single-image', 
             hidden: { callback: (_, model) => (model as InheritorWorkInfo).type !== 2 },
@@ -59,9 +76,21 @@ const formOptions = ref<IDynamicFormOptions>({
             hidden: { callback: (_, model) => (model as InheritorWorkInfo).type !== 5 },
             additionalProps: { placeholder: '请上传数字档案', uploadCo: useImageSimpleUploadCo(), name: 'file', maxCount: 20 } as UploadImageFormItemProps 
           },
+          { 
+            label: '审核人员', name: 'text1', type: 'static-text', 
+            additionalProps: {
+              text: '黄念旭,李向群,卢志明',
+            }
+          },
+          { 
+            label: '审核状态', name: 'text2', type: 'static-text', 
+            additionalProps: {
+              text: '暂未审核',
+            }
+          },
         ]
       },
-      {
+      /* {
         type: 'group-flat', label: '扩展信息', name: 'extendInfo',
         childrenColProps: { span: 24 },
         children: [
@@ -88,7 +117,7 @@ const formOptions = ref<IDynamicFormOptions>({
           { label: '采集时间', name: 'collectionTime', type: 'date-time', additionalProps: { placeholder: '请选择采集时间' } },
           { label: '采集地点', name: 'collectionLocation', type: 'text', additionalProps: { placeholder: '请输入采集地点' } },
         ]
-      }
+      } */
     ],
   formRules: {
     title: [{ required: true, message: '请输入标题' }],

+ 4 - 4
src/pages/inheritor.vue

@@ -7,7 +7,7 @@
     <section class="main-section ">
       <div class="content">
         <div class="title">
-          <h2>我的提交</h2>
+          <h2>非遗数字化资源信息校对</h2>
         </div>
        
         <a-tabs v-model:activeKey="activeKey" centered>
@@ -74,7 +74,7 @@
             </EmptyToRecord>
           </a-tab-pane>
           <a-tab-pane key="3" tab="作品">
-            <EmptyToRecord title="作品" :model="inheritorData?.works" :showEdited="false" @edit="router.push({ name: 'FormWork' })">
+            <EmptyToRecord title="作品" buttonText="新增作品" :model="inheritorData?.works" :showEdited="false" @edit="router.push({ name: 'FormWork' })">
               <div class="d-flex justify-content-end">
                 <a-button type="primary" @click="router.push({ name: 'FormWork' })">+ 新增</a-button>
               </div>
@@ -134,7 +134,7 @@
               </a-descriptions>
             </EmptyToRecord>
           </a-tab-pane>
-          <a-tab-pane key="5" tab="五年计划">
+          <!-- <a-tab-pane key="5" tab="五年计划">
             <EmptyToRecord title="五年计划" :model="planData" :showEdited="false" @edit="router.push({ name: 'FormPlan' })">
               <div class="d-flex justify-content-end">
                 <a-button type="primary" @click="router.push({ name: 'FormPlan' })">+ 新增</a-button>
@@ -156,7 +156,7 @@
                 </template>
               </a-list>
             </EmptyToRecord>
-          </a-tab-pane>
+          </a-tab-pane> -->
         </a-tabs>
       </div>
     </section>