Browse Source

📦 按要求修改表单页面

快乐的梦鱼 2 weeks ago
parent
commit
84c40543cb

+ 1 - 1
src/components/NavBar.vue

@@ -181,7 +181,7 @@ nav.main {
         margin: 0;
         font-size: 1rem;
         height: 20px;
-        letter-spacing: 0.15rem;
+        letter-spacing: 0.35rem;
 
         span {
           font-size: 1rem;

+ 8 - 4
src/components/dynamicf/UploadVideoFormItem.vue

@@ -23,16 +23,18 @@
           :preview="false"
         />
       </div>
-      <div v-else :style="{ width: singleImageSize.width, height: singleImageSize.height }">
+      <div v-else :style="{ width: singleImageSize.width, height: singleImageSize.height }" class="ant-upload-video">
         <loading-outlined v-if="uploadingSubImg"></loading-outlined>
         <plus-outlined v-else></plus-outlined>
         <div class="ant-upload-text">上传</div>
       </div>
     </template>
     <template v-else>
-      <loading-outlined v-if="uploadingSubImg"></loading-outlined>
-      <plus-outlined v-else></plus-outlined>
-      <div class="ant-upload-text">上传</div>
+      <div class="ant-upload-video">
+        <loading-outlined v-if="uploadingSubImg"></loading-outlined>
+        <plus-outlined v-else></plus-outlined>
+        上传
+      </div>
     </template>
   </a-upload>
 </template>
@@ -175,6 +177,8 @@ function handleUploadSubImgChange(info: FileInfo) {
 .ant-upload-video {
   display: flex;
   flex-direction: column;
+  justify-content: center;
+  align-items: center;
   padding: 10px;
   border: 1px solid #666666;
   background-color: #e8e8e8;

+ 10 - 0
src/pages/forms/ich.vue

@@ -20,7 +20,9 @@ import type { IDynamicFormOptions, IDynamicFormRef } from '@imengyu/vue-dynamic-
 import type { SelectProps } from 'ant-design-vue';
 import type { UploadImageFormItemProps } from '@/components/dynamicf/UploadImageFormItem';
 import type { AddressItem } from '@/components/dynamicf/Map/AddressSercher.vue';
+import { useAuthStore } from '@/stores/auth';
 
+const authStore = useAuthStore();
 const formRef = ref();
 const formModel = ref(new IchInfo()) as Ref<IchInfo>;
 const formOptions = ref<IDynamicFormOptions>({
@@ -125,12 +127,20 @@ const formOptions = ref<IDynamicFormOptions>({
           label: '审核人员', name: 'text1', type: 'static-text', 
           additionalProps: {
             text: '黄念旭,李向群,卢志明',
+            style: { color: '#999', }
           }
         },
         { 
           label: '审核状态', name: 'text2', type: 'static-text', 
           additionalProps: {
             text: '暂未审核',
+            style: { color: '#999', }
+          }
+        },
+        { 
+          label: '填报人', name: 'text3', type: 'static-text', 
+          additionalProps: {
+            text: authStore.userInfo?.nickname,
           }
         },
       ]

+ 12 - 1
src/pages/forms/inheritor.vue

@@ -17,7 +17,9 @@ import CommonContent from '@/api/CommonContent';
 import type { IDynamicFormOptions } from '@imengyu/vue-dynamic-form';
 import type { SelectProps } from 'ant-design-vue';
 import type { UploadImageFormItemProps } from '@/components/dynamicf/UploadImageFormItem';
+import { useAuthStore } from '@/stores/auth';
 
+const authStore = useAuthStore();
 const formModel = ref(new InheritorInfo()) as Ref<InheritorInfo>;
 const formOptions = ref<IDynamicFormOptions>({
   formLabelCol: { span: 6 },
@@ -66,7 +68,8 @@ const formOptions = ref<IDynamicFormOptions>({
         },
         //{ label: '别称', name: 'alsoName', type: 'text', additionalProps: { placeholder: '请输入别称' } },
         //{ label: '时代', name: 'age', type: 'text', additionalProps: { placeholder: '请输入时代' } },
-        { label: '出生地', name: 'birthplace', type: 'text', additionalProps: { placeholder: '请输入出生地' } },
+        { label: '联系电话', name: 'mobile', 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: '请选择逝世日期' } },
@@ -117,12 +120,20 @@ const formOptions = ref<IDynamicFormOptions>({
           label: '审核人员', name: 'text1', type: 'static-text', 
           additionalProps: {
             text: '黄念旭,李向群,卢志明',
+            style: { color: '#999', }
           }
         },
         { 
           label: '审核状态', name: 'text2', type: 'static-text', 
           additionalProps: {
             text: '暂未审核',
+            style: { color: '#999', }
+          }
+        },
+        { 
+          label: '填报人', name: 'text3', type: 'static-text', 
+          additionalProps: {
+            text: authStore.userInfo?.nickname,
           }
         },
       ]

+ 10 - 0
src/pages/forms/seminar.vue

@@ -20,7 +20,9 @@ import type { IDynamicFormOptions, IDynamicFormRef } from '@imengyu/vue-dynamic-
 import type { SelectProps } from 'ant-design-vue';
 import type { UploadImageFormItemProps } from '@/components/dynamicf/UploadImageFormItem';
 import type { AddressItem } from '@/components/dynamicf/Map/AddressSercher.vue';
+import { useAuthStore } from '@/stores/auth';
 
+const authStore = useAuthStore();
 const formRef = ref();
 const formModel = ref(new SeminarInfo()) as Ref<SeminarInfo>;
 const formOptions = ref<IDynamicFormOptions>({
@@ -103,12 +105,20 @@ const formOptions = ref<IDynamicFormOptions>({
           label: '审核人员', name: 'text1', type: 'static-text', 
           additionalProps: {
             text: '黄念旭,李向群,卢志明',
+            style: { color: '#999', }
           }
         },
         { 
           label: '审核状态', name: 'text2', type: 'static-text', 
           additionalProps: {
             text: '暂未审核',
+            style: { color: '#999', }
+          }
+        },
+        { 
+          label: '填报人', name: 'text3', type: 'static-text', 
+          additionalProps: {
+            text: authStore.userInfo?.nickname,
           }
         },
       ]

+ 25 - 14
src/pages/forms/works.vue

@@ -18,7 +18,9 @@ import type { IDynamicFormOptions } from '@imengyu/vue-dynamic-form';
 import type { SelectProps } from 'ant-design-vue';
 import type { UploadImageFormItemProps } from '@/components/dynamicf/UploadImageFormItem';
 import { useRoute } from 'vue-router';
+import { useAuthStore } from '@/stores/auth';
 
+const authStore = useAuthStore();
 const formModel = ref(new InheritorWorkInfo()) as Ref<InheritorWorkInfo>;
 const formOptions = ref<IDynamicFormOptions>({
   formLabelCol: { span: 6 },
@@ -50,7 +52,9 @@ const formOptions = ref<IDynamicFormOptions>({
           { 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: { 
+            label: '组图', name: 'images', type: 'mulit-image', 
+            hidden: { callback: (_, model) => (model as InheritorWorkInfo).type !== 4 },
+            additionalProps: { 
               placeholder: '请上传组图', 
               uploadCo: useImageSimpleUploadCo(), name: 'file', accept: 'image/*', maxCount: 20 
             } as UploadImageFormItemProps 
@@ -76,18 +80,26 @@ 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: '暂未审核',
-            }
-          },
+        { 
+          label: '审核人员', name: 'text1', type: 'static-text', 
+          additionalProps: {
+            text: '黄念旭,李向群,卢志明',
+            style: { color: '#999', }
+          }
+        },
+        { 
+          label: '审核状态', name: 'text2', type: 'static-text', 
+          additionalProps: {
+            text: '暂未审核',
+            style: { color: '#999', }
+          }
+        },
+        { 
+          label: '填报人', name: 'text3', type: 'static-text', 
+          additionalProps: {
+            text: authStore.userInfo?.nickname,
+          }
+        },
         ]
       },
       /* {
@@ -124,7 +136,6 @@ const formOptions = ref<IDynamicFormOptions>({
     region: [{ required: true, message: '请选择地区' }],
     image: [{ required: true, message: '请上传图片' }],
     type: [{ required: true, message: '请选择类型' }],
-    images: [{ required: true, message: '请上传组图' }],
     content: [{ required: true, message: '请输入内容介绍' }],
   }
 });

+ 1 - 1
src/pages/index.vue

@@ -7,7 +7,7 @@
       <p></p>
       
       <RouterLink v-if="authStore.isLogged" to="/inheritor">
-        <a-button size="large" type="primary">我的非遗提交信息</a-button>
+        <a-button size="large" type="primary">进入非遗数字化资源信息校对</a-button>
       </RouterLink>
       <RouterLink v-else to="/login">
         <a-button size="large" type="primary">去登录</a-button>

+ 25 - 25
src/pages/inheritor.vue

@@ -73,31 +73,7 @@
               </a-descriptions>
             </EmptyToRecord>
           </a-tab-pane>
-          <a-tab-pane key="3" tab="作品">
-            <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>
-              <a-list item-layout="horizontal" :data-source="inheritorData?.works || []">
-                <template #renderItem="{ item }">
-                  <a-list-item>
-                    <a-list-item-meta
-                      :title="item.title"
-                      :description="item.desc"
-                    >
-                      <template #avatar>
-                        <a-avatar :src="item.image" />
-                      </template>
-                    </a-list-item-meta>
-                    <template #actions>
-                      <a key="list-loadmore-edit" @click="router.push({ name: 'FormWork', query: { id: item.id } })">编辑</a>
-                    </template>
-                  </a-list-item>
-                </template>
-              </a-list>
-            </EmptyToRecord>
-          </a-tab-pane>
-          <a-tab-pane key="4" tab="传习所">
+          <a-tab-pane key="3" tab="传习所">
             <EmptyToRecord title="传习所" :model="seminarData" @edit="router.push({ name: 'FormSeminar' })">
               <a-descriptions class="mt-3" title="传习所信息" v-if="seminarData" bordered :column="{ xs: 1, sm: 1, md: 1, lg: 2 }">
                 <a-descriptions-item label="标题"><ShowValueOrNull :value="seminarData.title" /></a-descriptions-item>
@@ -134,6 +110,30 @@
               </a-descriptions>
             </EmptyToRecord>
           </a-tab-pane>
+          <a-tab-pane key="4" tab="作品">
+            <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>
+              <a-list item-layout="horizontal" :data-source="inheritorData?.works || []">
+                <template #renderItem="{ item }">
+                  <a-list-item>
+                    <a-list-item-meta
+                      :title="item.title"
+                      :description="item.desc"
+                    >
+                      <template #avatar>
+                        <a-avatar :src="item.image" />
+                      </template>
+                    </a-list-item-meta>
+                    <template #actions>
+                      <a key="list-loadmore-edit" @click="router.push({ name: 'FormWork', query: { id: item.id } })">编辑</a>
+                    </template>
+                  </a-list-item>
+                </template>
+              </a-list>
+            </EmptyToRecord>
+          </a-tab-pane>
           <!-- <a-tab-pane key="5" tab="五年计划">
             <EmptyToRecord title="五年计划" :model="planData" :showEdited="false" @edit="router.push({ name: 'FormPlan' })">
               <div class="d-flex justify-content-end">