liyongli 6 дней назад
Родитель
Сommit
c9bf29ccbf

+ 2 - 2
public/index.html

@@ -9,12 +9,12 @@
     <meta http-equiv="Pragma" content="no-cache" />
     <meta http-equiv="Expires" content="0" />
     <% if(process.env.VUE_APP_ENV==="Dev" ){ %>
-        <script src="https://cdn.bootcdn.net/ajax/libs/eruda/2.5.0/eruda.min.js"></script>
+        <!-- <script src="https://cdn.bootcdn.net/ajax/libs/eruda/2.5.0/eruda.min.js"></script>
         <script>
             window.eruda.init({
                 tool: ["console", "network", "info", "resource"],
             });
-        </script>
+        </script> -->
         <% } %>
             <script src="https://cxzx.smcic.net/topic/highSpeed/index.min.js"></script>
             <script src="https://cxzx.smcic.net/topic/tool/js/shareWinxin.js"></script>

+ 13 - 0
src/api/2025.js

@@ -26,6 +26,19 @@ export function saveData(data) {
     });
 }
 
+export function editData(data) {
+    return ajax({
+        url: 'biz/signup/edit',
+        method: 'POST',
+        header: {
+            'page-language': localStorage.getItem('langSelect') || 'zh'
+        },
+        urlType: 'Url2025',
+        errorToast: '当前访问人数过多,请重试。',
+        data
+    });
+}
+
 /**
  * 校验邀请码
  * @param {code} string

+ 54 - 15
src/view/fenghui/form.vue

@@ -5,7 +5,7 @@
         <div>
             <span style="font-size: 16px;margin-left: 10px;" v-text="lang[langType].signUp"></span>
         </div>
-        <van-form ref="form" @submit="onSubmit" label-width="8em">
+        <van-form ref="form" @submit="onSubmit" @failed="failed" label-width="8em">
             <!-- 国家/地区 -->
             <van-field input-align="right"
                 :rules="[{ required: true, trigger: 'onBlur', message: lang[langType].countryRegionContent }]" required
@@ -102,7 +102,7 @@
             </van-field>
 
             <!-- 紧急联系人电话 -->
-            <van-field input-align="right" v-model="formData.emergencyContactPhone" required
+            <van-field input-align="right" v-model="formData.emergencyContactPhone" required type="number"
                 :rules="[{ required: true, trigger: 'onBlur', message: lang[langType].emergencyContactPhoneContent }]"
                 :placeholder="lang[langType].emergencyContactPhoneContent">
                 <template #label>
@@ -122,8 +122,7 @@
             </van-field>
             <van-popup v-model:show="showCardType" destroy-on-close round position="bottom">
                 <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel"
-                    :model-value="formData.cardType" :columns="cardTypeList" @cancel="showCardType = false"
-                    @confirm="onConfirm" />
+                    :columns="cardTypeList" @cancel="showCardType = false" @confirm="onConfirm" />
             </van-popup>
 
             <!-- 证件 -->
@@ -175,8 +174,7 @@
             </van-field>
             <van-popup v-model:show="showUnitType" destroy-on-close round position="bottom">
                 <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel"
-                    :model-value="formData.unitType" :columns="unitTypeList" @cancel="showUnitType = false"
-                    @confirm="onUnitTypeConfirm" />
+                    :columns="unitTypeList" @cancel="showUnitType = false" @confirm="onUnitTypeConfirm" />
             </van-popup>
 
             <!-- 职务 -->
@@ -208,21 +206,52 @@
 
             <div style="background-color: #F7F7F7;height: 10px;"></div>
             <!-- 接受采访意向  -->
-            <van-field input-align="right" v-model="formData.interview" required
+            <van-field label-align="top" v-model="formData.interview" required
                 :rules="[{ required: true, trigger: 'onBlur', message: lang[langType].interviewContent }]"
                 :placeholder="lang[langType].interviewContent">
                 <template #label>
                     <span :class="langType === 'zh' ? 'label' : ''" v-html="lang[langType].interview"></span>
                 </template>
                 <template #input>
-                    <van-radio-group style="justify-content: flex-end;width: 100%;" v-model="formData.interview"
+                    <van-radio-group checked-color="#3F5AC8" style="width: 100%;" v-model="formData.interview"
                         direction="horizontal">
-                        <van-radio name="是">{{ lang[langType].confirm }}</van-radio>
-                        <van-radio name="否">{{ lang[langType].cancel }}</van-radio>
+                        <van-radio style="flex: 1;" name="是">{{ lang[langType].confirm }}</van-radio>
+                        <van-radio style="flex: 1;" name="否">{{ lang[langType].cancel }}</van-radio>
                     </van-radio-group>
                 </template>
             </van-field>
 
+            <!-- 拟参加的活动  -->
+            <van-field label-align="top" required
+                :rules="[{ required: true, trigger: 'onBlur', message: lang[langType].activitiesAttendedContent }]"
+                :placeholder="lang[langType].activitiesAttendedContent">
+                <template #label>
+                    <span :class="langType === 'zh' ? 'label' : ''" v-html="lang[langType].activitiesAttended"></span>
+                </template>
+                <template #input>
+                    <van-checkbox-group checked-color="#3F5AC8" v-model="activitiesAttended">
+                        <van-cell clickable :title="lang[langType].activity1">
+                            <template #icon>
+                                <van-checkbox style="margin-right: 5px;" name="active1" @click.stop
+                                    shape="square" />
+                            </template>
+                        </van-cell>
+                        <van-cell clickable :title="lang[langType].activity2">
+                            <template #icon>
+                                <van-checkbox style="margin-right: 5px;" name="active2" @click.stop
+                                    shape="square" />
+                            </template>
+                        </van-cell>
+                        <van-cell clickable :title="lang[langType].activity3">
+                            <template #icon>
+                                <van-checkbox style="margin-right: 5px;" name="active3" @click.stop
+                                    shape="square" />
+                            </template>
+                        </van-cell>
+                    </van-checkbox-group>
+                </template>
+            </van-field>
+
             <div style="background-color: #F7F7F7;height: 10px;"></div>
 
             <!--  抵达西安交通车次 -->
@@ -300,11 +329,12 @@ import { defineEmits, defineProps, reactive, ref, computed, defineExpose } from
 import { showToast, showDialog } from 'vant';
 import { saveData, uploadImage } from '@/api/2025.js';
 import lang from './lang.js';
-const props = defineProps(['langType','verificationCode', 'subData']);
+const props = defineProps(['langType', 'verificationCode', 'subData']);
 
 const emits = defineEmits(['closeComponent']);
 
 const formData = reactive({})
+const activitiesAttended = ref([])
 const cardTypeList = computed(() => lang[props.langType].cardTypeList)
 const unitTypeList = computed(() => lang[props.langType].foreignCountryUnitType)
 const form = ref(null);
@@ -320,6 +350,10 @@ const onClickLeft = () => {
     emits('closeComponent');
 };
 
+const failed = (res) => {
+    console.log(res)
+}
+
 const reset = () => {
     form.value.resetValidation();
 }
@@ -342,12 +376,12 @@ const checkOutTimeConfirm = ({ selectedValues }) => {
 }
 const onUnitTypeConfirm = (values) => {
     showUnitType.value = false;
-    formData.unitType = values.selectedOptions[0].text;
+    formData.unitType = values.selectedOptions[0].value;
     formData.unitTypeName = values.selectedOptions[0].text;
 }
 const onConfirm = (values) => {
     showCardType.value = false;
-    formData.cardType = values.selectedOptions[0].text;
+    formData.cardType = values.selectedOptions[0].value;
     formData.cardTypeName = values.selectedOptions[0].text;
 }
 
@@ -430,7 +464,12 @@ let loading = false
 const onSubmit = () => {
     if (loading) return
     loading = true
+    const activity = {}
+    activitiesAttended.value.forEach((item, index) => {
+        activity[`activity${index + 1}`] = '是' 
+    })
     saveData({
+        ...activity,
         code: props.verificationCode, // 邀请码
         lastName: formData.lastName, // 姓
         firstName: formData.firstName, // 名
@@ -443,11 +482,11 @@ const onSubmit = () => {
         religion: formData.belief, // 宗教
         emergencyContact: formData.emergencyContact, // 紧急联系人
         emergencyContactPhone: formData.emergencyContactPhone, // 紧急联系人电话
-        cardTypeName: formData.cardTypeName, // 证件类型
+        cardType: formData.cardType, // 证件类型
         idCard: formData.passport, // 证件号
         dietaryRequirements: formData.catering, // 饮食要求
         workUnit: formData.workUnit, // 工作单位
-        unitType: formData.unitType[0], // 单位类型
+        unitType: formData.unitType, // 单位类型
         position: formData.career, // 职务
         fax: formData.fax, // fax
         interviewIntention: formData.interview, // 接受采访意向

+ 52 - 12
src/view/fenghui/form1.vue

@@ -93,7 +93,7 @@
             </van-field>
 
             <!-- 紧急联系人电话 -->
-            <van-field input-align="right" v-model="formData.emergencyContactPhone" required
+            <van-field input-align="right" v-model="formData.emergencyContactPhone" required type="number"
                 :rules="[{ required: true, trigger: 'onBlur', message: lang[langType].emergencyContactPhoneContent }]"
                 :placeholder="lang[langType].emergencyContactPhoneContent">
                 <template #label>
@@ -157,8 +157,7 @@
             </van-field>
             <van-popup v-model:show="showUnitType" destroy-on-close round position="bottom">
                 <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel"
-                    :model-value="formData.unitType" :columns="unitTypeList" @cancel="showUnitType = false"
-                    @confirm="onUnitTypeConfirm" />
+                    :columns="unitTypeList" @cancel="showUnitType = false" @confirm="onUnitTypeConfirm" />
             </van-popup>
 
             <!-- 职务 -->
@@ -190,21 +189,53 @@
 
             <div style="background-color: #F7F7F7;height: 10px;"></div>
             <!-- 接受采访意向  -->
-            <van-field input-align="right" v-model="formData.interview" required
+            <van-field v-model="formData.interview" required label-align="top"
                 :rules="[{ required: true, trigger: 'onBlur', message: lang[langType].interviewContent }]"
                 :placeholder="lang[langType].interviewContent">
                 <template #label>
                     <span :class="langType === 'zh' ? 'label' : ''" v-html="lang[langType].interview"></span>
                 </template>
                 <template #input>
-                    <van-radio-group style="justify-content: flex-end;width: 100%;" v-model="formData.interview"
+                    <van-radio-group checked-color="#3F5AC8" style="justify-content: flex-end;width: 100%;" v-model="formData.interview"
                         direction="horizontal">
-                        <van-radio name="是">{{ lang[langType].confirm }}</van-radio>
-                        <van-radio name="否">{{ lang[langType].cancel }}</van-radio>
+                        <van-radio style="flex: 1;" name="是">{{ lang[langType].confirm }}</van-radio>
+                        <van-radio style="flex: 1;" name="否">{{ lang[langType].cancel }}</van-radio>
                     </van-radio-group>
                 </template>
             </van-field>
 
+            <!-- 拟参加的活动  -->
+            <van-field label-align="top" required
+                :rules="[{ required: true, trigger: 'onBlur', message: lang[langType].activitiesAttendedContent }]"
+                :placeholder="lang[langType].activitiesAttendedContent">
+                <template #label>
+                    <span :class="langType === 'zh' ? 'label' : ''" v-html="lang[langType].activitiesAttended"></span>
+                </template>
+                <template #input>
+                    <van-checkbox-group checked-color="#3F5AC8" v-model="activitiesAttended">
+                        <van-cell clickable :title="lang[langType].activity1">
+                            <template #icon>
+                                <van-checkbox style="margin-right: 5px;" name="active1" @click.stop
+                                    shape="square" />
+                            </template>
+                        </van-cell>
+                        <van-cell clickable :title="lang[langType].activity2">
+                            <template #icon>
+                                <van-checkbox style="margin-right: 5px;" name="active2" @click.stop
+                                    shape="square" />
+                            </template>
+                        </van-cell>
+                        <van-cell clickable :title="lang[langType].activity3">
+                            <template #icon>
+                                <van-checkbox style="margin-right: 5px;" name="active3" @click.stop
+                                    shape="square" />
+                            </template>
+                        </van-cell>
+                    </van-checkbox-group>
+                </template>
+            </van-field>
+
+
             <div style="background-color: #F7F7F7;height: 10px;"></div>
 
             <!--  抵达西安交通车次 -->
@@ -282,7 +313,7 @@ import { defineEmits, defineProps, reactive, ref, computed, defineExpose } from
 import { showToast, showDialog } from 'vant';
 import { saveData, uploadImage } from '@/api/2025.js';
 import lang from './lang.js';
-const props = defineProps(['langType','verificationCode', 'subData']);
+const props = defineProps(['langType', 'verificationCode', 'subData']);
 
 const emits = defineEmits(['closeComponent']);
 
@@ -295,6 +326,7 @@ const showUnitType = ref(false)
 const showLeavingTime = ref(false)
 const showCardType = ref(false)
 const showCheckOutTime = ref(false)
+const activitiesAttended = ref([])
 const form = ref(null);
 const photo = ref([]);
 
@@ -317,7 +349,7 @@ const leavingTimeConfirm = ({ selectedValues }) => {
 }
 const onUnitTypeConfirm = (values) => {
     showUnitType.value = false;
-    formData.unitType = values.selectedValues;
+    formData.unitType = values.selectedOptions[0].value;
     formData.unitTypeName = values.selectedOptions[0].text;
 }
 const reachTimeConfirm = ({ selectedValues }) => {
@@ -330,7 +362,7 @@ const checkOutTimeConfirm = ({ selectedValues }) => {
 }
 const onConfirm = (values) => {
     showCardType.value = false;
-    formData.cardType = values.selectedValues;
+    formData.cardType = values.selectedOptions[0].value;
     formData.cardTypeName = values.selectedOptions[0].text;
 }
 
@@ -412,9 +444,16 @@ const dateTimeColumns = computed(() => {
 
 let loading = false
 const onSubmit = () => {
+    console.log('-')
     if (loading) return
+    console.log('0')
     loading = true
+    const activity = {}
+    activitiesAttended.value.forEach((item, index) => {
+        activity[`activity${index + 1}`] = '是' 
+    })
     saveData({
+        ...activity,
         code: props.verificationCode, // 邀请码
         name: formData.name, // 姓名
         provinceCity: formData.provinceCity, // 省市区
@@ -425,11 +464,11 @@ const onSubmit = () => {
         email: formData.email, // 邮箱
         emergencyContact: formData.emergencyContact, // 紧急联系人
         emergencyContactPhone: formData.emergencyContactPhone, // 紧急联系人电话
-        cardTypeName: formData.cardTypeName, // 证件类型
+        cardType: formData.cardType, // 证件类型
         idCard: formData.passport, // 证件号
         dietaryRequirements: formData.catering, // 饮食要求
         workUnit: formData.workUnit, // 工作单位
-        unitType: formData.unitTypeName, // 单位类型
+        unitType: formData.unitType, // 单位类型
         position: formData.career, // 职务
         fax: formData.fax, // fax
         interviewIntention: formData.interview, // 接受采访意向
@@ -455,6 +494,7 @@ const onSubmit = () => {
             message: lang[props.langType].registration,
         })
     }).catch((res) => {
+        console.log(res)
         loading = false
         showToast(res.msg || lang[props.langType].networkError);
     });

+ 80 - 25
src/view/fenghui/form1Recurrence.vue

@@ -5,7 +5,7 @@
         <div>
             <span style="font-size: 16px;margin-left: 10px;" v-text="lang[langType].signUpZH"></span>
         </div>
-        <van-form ref="form" @submit="onSubmit" label-width="8em">
+        <van-form ref="form" @submit="onSubmit" @failed="failed" label-width="8em">
             <!-- 姓名 -->
             <van-field input-align="right"
                 :rules="[{ required: formData, trigger: 'onBlur', message: lang[langType].nameContent }]" required
@@ -93,7 +93,7 @@
             </van-field>
 
             <!-- 紧急联系人电话 -->
-            <van-field input-align="right" v-model="formData.emergencyContactPhone" required
+            <van-field input-align="right" v-model="formData.emergencyContactPhone" required type="number"
                 :rules="[{ required: true, trigger: 'onBlur', message: lang[langType].emergencyContactPhoneContent }]"
                 :placeholder="lang[langType].emergencyContactPhoneContent">
                 <template #label>
@@ -113,8 +113,7 @@
             </van-field>
             <van-popup v-model:show="showCardType" destroy-on-close round position="bottom">
                 <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel"
-                    :model-value="formData.cardType" :columns="cardTypeList" @cancel="showCardType = false"
-                    @confirm="onConfirm" />
+                    :columns="cardTypeList" @cancel="showCardType = false" @confirm="onConfirm" />
             </van-popup>
 
             <!-- 证件 -->
@@ -157,8 +156,7 @@
             </van-field>
             <van-popup v-model:show="showUnitType" destroy-on-close round position="bottom">
                 <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel"
-                    :model-value="formData.unitType" :columns="unitTypeList" @cancel="showUnitType = false"
-                    @confirm="onUnitTypeConfirm" />
+                    :columns="unitTypeList" @cancel="showUnitType = false" @confirm="onUnitTypeConfirm" />
             </van-popup>
 
             <!-- 职务 -->
@@ -190,7 +188,7 @@
 
             <div style="background-color: #F7F7F7;height: 10px;"></div>
             <!-- 接受采访意向  -->
-            <van-field input-align="right" v-model="formData.interview" required
+            <van-field v-model="formData.interview" required label-align="top"
                 :rules="[{ required: true, trigger: 'onBlur', message: lang[langType].interviewContent }]"
                 :placeholder="lang[langType].interviewContent">
                 <template #label>
@@ -199,12 +197,40 @@
                 <template #input>
                     <van-radio-group style="justify-content: flex-end;width: 100%;" v-model="formData.interview"
                         direction="horizontal">
-                        <van-radio name="是">{{ lang[langType].confirm }}</van-radio>
-                        <van-radio name="否">{{ lang[langType].cancel }}</van-radio>
+                        <van-radio style="flex: 1;" name="是">{{ lang[langType].confirm }}</van-radio>
+                        <van-radio style="flex: 1;" name="否">{{ lang[langType].cancel }}</van-radio>
                     </van-radio-group>
                 </template>
             </van-field>
 
+
+            <!-- 拟参加的活动  -->
+            <van-field label-align="top" required
+                :rules="[{ required: true, trigger: 'onBlur', message: lang[langType].activitiesAttendedContent }]"
+                :placeholder="lang[langType].activitiesAttendedContent">
+                <template #label>
+                    <span :class="langType === 'zh' ? 'label' : ''" v-html="lang[langType].activitiesAttended"></span>
+                </template>
+                <template #input>
+                    <van-checkbox-group checked-color="#3F5AC8" v-model="activitiesAttended">
+                        <van-cell clickable :title="lang[langType].activity1">
+                            <template #icon>
+                                <van-checkbox style="margin-right: 5px;" name="active1" @click.stop shape="square" />
+                            </template>
+                        </van-cell>
+                        <van-cell clickable :title="lang[langType].activity2">
+                            <template #icon>
+                                <van-checkbox style="margin-right: 5px;" name="active2" @click.stop shape="square" />
+                            </template>
+                        </van-cell>
+                        <van-cell clickable :title="lang[langType].activity3">
+                            <template #icon>
+                                <van-checkbox style="margin-right: 5px;" name="active3" @click.stop shape="square" />
+                            </template>
+                        </van-cell>
+                    </van-checkbox-group>
+                </template>
+            </van-field>
             <div style="background-color: #F7F7F7;height: 10px;"></div>
 
             <!--  抵达西安交通车次 -->
@@ -280,9 +306,9 @@
 <script setup>
 import { defineEmits, defineProps, reactive, ref, computed, defineExpose } from 'vue';
 import { showToast, showDialog } from 'vant';
-import { saveData, uploadImage } from '@/api/2025.js';
+import { editData, uploadImage } from '@/api/2025.js';
 import lang from './lang.js';
-const props = defineProps(['langType','verificationCode', 'subData']);
+const props = defineProps(['langType', 'verificationCode', 'subData']);
 
 const emits = defineEmits(['closeComponent']);
 
@@ -298,13 +324,14 @@ const showLeavingTime = ref(false)
 const showCardType = ref(false)
 const showCheckOutTime = ref(false)
 const form = ref(null);
+const activitiesAttended = ref([])
 const photo = ref([]);
 
 /**
  * 将subData数据转换为formData
  */
 const initFormData = () => {
-    if(!props.subData) return;
+    if (!props.subData) return;
     const relationship = {
         name: 'name', // 姓名
         provinceCity: 'provinceCity', // 省市区
@@ -315,11 +342,11 @@ const initFormData = () => {
         email: 'email', // 邮箱
         emergencyContact: 'emergencyContact', // 紧急联系人
         emergencyContactPhone: 'emergencyContactPhone', // 紧急联系人电话
-        cardType: 'cardTypeName', // 证件类型
+        cardType: 'cardType', // 证件类型
         idCard: 'passport', // 证件号
         dietaryRequirements: 'catering', // 饮食要求
         workUnit: 'workUnit', // 工作单位
-        unitType: 'unitTypeName', // 单位类型
+        unitType: 'unitType', // 单位类型
         position: 'career', // 职务
         fax: 'fax', // fax
         interviewIntention: 'interview', // 接受采访意向
@@ -331,16 +358,34 @@ const initFormData = () => {
         checkOutTime: 'checkOutTime', // 离店时间
         remarks: 'message', // 备注
     }
-    const keys = Object.keys(props.subData || {});
-    for(let i = 0 ; i < keys.length; i++) {
+    const subData = JSON.parse(JSON.stringify(props.subData))
+    const keys = Object.keys(subData || {});
+    subData.active1 === '是' && activitiesAttended.value.push('active1');
+    subData.active2 === '是' && activitiesAttended.value.push('active2');
+    subData.active3 === '是' && activitiesAttended.value.push('active3');
+    for (let i = 0; i < keys.length; i++) {
         const key = keys[i];
         if (key === 'photo') {
             photo.value.push({
-                url: props.subData[key],
+                url: subData[key],
             })
         }
-        formData[relationship[key]] = props.subData[key];
-    }        
+        if (key === 'cardType') {
+            try {
+                formData.cardTypeName = lang[props.langType].cardTypeList.filter(item => item.value === subData[key])[0].text;
+            } catch (err) {
+                formData.cardTypeName = '';
+            }
+        }
+        if (key === 'unitType') {
+            try {
+                formData.unitTypeName = lang[props.langType].foreignCountryUnitType.filter(item => item.value === subData[key])[0].text;
+            } catch (err) {
+                formData.unitTypeName = '';
+            }
+        }
+        formData[relationship[key]] = subData[key];
+    }
 }
 initFormData()
 const reset = () => {
@@ -351,6 +396,10 @@ const onClickLeft = () => {
     emits('closeComponent');
 };
 
+const failed = (err) => {
+    console.log(err);
+}
+
 const createTextDate = values => values.slice(0, 3).join('-') + ' ' + values.slice(3).join(':');
 const packerConfirm = (values) => {
     showBirthday.value = false;
@@ -362,7 +411,7 @@ const leavingTimeConfirm = ({ selectedValues }) => {
 }
 const onUnitTypeConfirm = (values) => {
     showUnitType.value = false;
-    formData.unitType = values.selectedValues;
+    formData.unitType = values.selectedOptions[0].value;
     formData.unitTypeName = values.selectedOptions[0].text;
 }
 const reachTimeConfirm = ({ selectedValues }) => {
@@ -375,7 +424,7 @@ const checkOutTimeConfirm = ({ selectedValues }) => {
 }
 const onConfirm = (values) => {
     showCardType.value = false;
-    formData.cardType = values.selectedValues;
+    formData.cardType = values.selectedOptions[0].value;
     formData.cardTypeName = values.selectedOptions[0].text;
 }
 
@@ -459,7 +508,13 @@ let loading = false
 const onSubmit = () => {
     if (loading) return
     loading = true
-    saveData({
+    const activity = {}
+    activitiesAttended.value.forEach((item, index) => {
+        activity[`activity${index + 1}`] = '是'
+    })
+    editData({
+        ...activity,
+        id: props.subData.id, // 人员id
         code: props.verificationCode, // 邀请码
         name: formData.name, // 姓名
         provinceCity: formData.provinceCity, // 省市区
@@ -470,11 +525,11 @@ const onSubmit = () => {
         email: formData.email, // 邮箱
         emergencyContact: formData.emergencyContact, // 紧急联系人
         emergencyContactPhone: formData.emergencyContactPhone, // 紧急联系人电话
-        cardType: formData.cardTypeName, // 证件类型
+        cardType: formData.cardType, // 证件类型
         idCard: formData.passport, // 证件号
         dietaryRequirements: formData.catering, // 饮食要求
         workUnit: formData.workUnit, // 工作单位
-        unitType: formData.unitTypeName, // 单位类型
+        unitType: formData.unitType, // 单位类型
         position: formData.career, // 职务
         fax: formData.fax, // fax
         interviewIntention: formData.interview, // 接受采访意向
@@ -497,7 +552,7 @@ const onSubmit = () => {
         // });
         loading = false
         showDialog({
-            message: lang[props.langType].registration,
+            message: lang[props.langType].upRegistration,
         })
     }).catch((res) => {
         loading = false

+ 3 - 4
src/view/fenghui/form2.vue

@@ -60,8 +60,7 @@
             </van-field>
             <van-popup v-model:show="showUnitType" destroy-on-close round position="bottom">
                 <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel"
-                    :model-value="formData.unitType" :columns="unitTypeList" @cancel="showUnitType = false"
-                    @confirm="onUnitTypeConfirm" />
+                    :columns="unitTypeList" @cancel="showUnitType = false" @confirm="onUnitTypeConfirm" />
             </van-popup>
 
             <!-- 工作单位 -->
@@ -86,7 +85,7 @@ import { defineEmits, defineProps, reactive, ref, computed, defineExpose } from
 import { showToast, showDialog } from 'vant';
 import { saveData, uploadImage } from '@/api/2025.js';
 import lang from './lang.js';
-const props = defineProps(['langType','verificationCode', 'subData']);
+const props = defineProps(['langType', 'verificationCode', 'subData']);
 
 const emits = defineEmits(['closeComponent']);
 
@@ -106,7 +105,7 @@ const onClickLeft = () => {
 
 const onUnitTypeConfirm = (values) => {
     showUnitType.value = false;
-    formData.unitType = values.selectedOptions[0].text;
+    formData.unitType = values.selectedOptions[0].value;
     formData.unitTypeName = values.selectedOptions[0].text;
 }
 

+ 40 - 8
src/view/fenghui/form2Recurrence.vue

@@ -60,8 +60,7 @@
             </van-field>
             <van-popup v-model:show="showUnitType" destroy-on-close round position="bottom">
                 <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel"
-                    :model-value="formData.unitType" :columns="unitTypeList" @cancel="showUnitType = false"
-                    @confirm="onUnitTypeConfirm" />
+                    :columns="unitTypeList" @cancel="showUnitType = false" @confirm="onUnitTypeConfirm" />
             </van-popup>
 
             <!-- 工作单位 -->
@@ -84,19 +83,52 @@
 <script setup>
 import { defineEmits, defineProps, reactive, ref, computed, defineExpose } from 'vue';
 import { showToast, showDialog } from 'vant';
-import { saveData, uploadImage } from '@/api/2025.js';
+import { editData, uploadImage } from '@/api/2025.js';
 import lang from './lang.js';
-const props = defineProps(['langType','verificationCode', 'subData']);
+const props = defineProps(['langType', 'verificationCode', 'subData']);
 
 const emits = defineEmits(['closeComponent']);
-
-console.log(props.subData)
 const formData = reactive({})
 const unitTypeList = computed(() => lang[props.langType].workGroup)
 const showUnitType = ref(false)
 const form = ref(null); // 引入子组件的实例,用于调用子组件的方法
 const photo = ref([]);
 
+/**
+ * 将subData数据转换为formData
+ */
+ const initFormData = () => {
+    if (!props.subData) return;
+    const relationship = {
+        photo: 'photoUrl', // 照片
+        phone: 'contact', // 手机号
+        name: 'name', // 姓名
+        idCard: 'passport', // 证件号
+        workUnit: 'workUnit', // 工作单位
+        workGroup: 'unitType', // 单位类型
+    }
+    const subData = JSON.parse(JSON.stringify(props.subData))
+    const keys = Object.keys(subData || {});
+    for (let i = 0; i < keys.length; i++) {
+        const key = keys[i];
+        if (key === 'photo') {
+            photo.value.push({
+                url: subData[key],
+            })
+        }
+        if (key === 'workGroup') {
+            try {
+                console.log(subData[key],lang[props.langType].workGroup);
+                formData.unitTypeName = lang[props.langType].workGroup.filter(item => item.value === subData[key])[0].text;
+            } catch (err) {
+                formData.unitTypeName = '';
+            }
+        }
+        formData[relationship[key]] = subData[key];
+    }
+}
+initFormData()
+
 const reset = () => {
     form.value.resetFields();
 }
@@ -107,7 +139,7 @@ const onClickLeft = () => {
 
 const onUnitTypeConfirm = (values) => {
     showUnitType.value = false;
-    formData.unitType = values.selectedOptions[0].text;
+    formData.unitType = values.selectedOptions[0].value;
     formData.unitTypeName = values.selectedOptions[0].text;
 }
 
@@ -139,7 +171,7 @@ let loading = false
 const onSubmit = () => {
     if (loading) return
     loading = true
-    saveData({
+    editData({
         name: formData.name, // 姓名
         code: props.verificationCode, // 邀请码
         photo: formData.photoUrl, // 照片

+ 111 - 14
src/view/fenghui/formRecurrence.vue

@@ -102,7 +102,7 @@
             </van-field>
 
             <!-- 紧急联系人电话 -->
-            <van-field input-align="right" v-model="formData.emergencyContactPhone" required
+            <van-field input-align="right" v-model="formData.emergencyContactPhone" required type="number"
                 :rules="[{ required: true, trigger: 'onBlur', message: lang[langType].emergencyContactPhoneContent }]"
                 :placeholder="lang[langType].emergencyContactPhoneContent">
                 <template #label>
@@ -175,8 +175,7 @@
             </van-field>
             <van-popup v-model:show="showUnitType" destroy-on-close round position="bottom">
                 <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel"
-                    :model-value="formData.unitType" :columns="unitTypeList" @cancel="showUnitType = false"
-                    @confirm="onUnitTypeConfirm" />
+                    :columns="unitTypeList" @cancel="showUnitType = false" @confirm="onUnitTypeConfirm" />
             </van-popup>
 
             <!-- 职务 -->
@@ -208,7 +207,7 @@
 
             <div style="background-color: #F7F7F7;height: 10px;"></div>
             <!-- 接受采访意向  -->
-            <van-field input-align="right" v-model="formData.interview" required
+            <van-field v-model="formData.interview" required label-align="top"
                 :rules="[{ required: true, trigger: 'onBlur', message: lang[langType].interviewContent }]"
                 :placeholder="lang[langType].interviewContent">
                 <template #label>
@@ -217,12 +216,40 @@
                 <template #input>
                     <van-radio-group style="justify-content: flex-end;width: 100%;" v-model="formData.interview"
                         direction="horizontal">
-                        <van-radio name="是">{{ lang[langType].confirm }}</van-radio>
-                        <van-radio name="否">{{ lang[langType].cancel }}</van-radio>
+                        <van-radio style="flex: 1;" name="是">{{ lang[langType].confirm }}</van-radio>
+                        <van-radio style="flex: 1;" name="否">{{ lang[langType].cancel }}</van-radio>
                     </van-radio-group>
                 </template>
             </van-field>
 
+            <!-- 拟参加的活动  -->
+            <van-field label-align="top" required
+                :rules="[{ required: true, trigger: 'onBlur', message: lang[langType].activitiesAttendedContent }]"
+                :placeholder="lang[langType].activitiesAttendedContent">
+                <template #label>
+                    <span :class="langType === 'zh' ? 'label' : ''" v-html="lang[langType].activitiesAttended"></span>
+                </template>
+                <template #input>
+                    <van-checkbox-group checked-color="#3F5AC8" v-model="activitiesAttended">
+                        <van-cell clickable :title="lang[langType].activity1">
+                            <template #icon>
+                                <van-checkbox style="margin-right: 5px;" name="active1" @click.stop shape="square" />
+                            </template>
+                        </van-cell>
+                        <van-cell clickable :title="lang[langType].activity2">
+                            <template #icon>
+                                <van-checkbox style="margin-right: 5px;" name="active2" @click.stop shape="square" />
+                            </template>
+                        </van-cell>
+                        <van-cell clickable :title="lang[langType].activity3">
+                            <template #icon>
+                                <van-checkbox style="margin-right: 5px;" name="active3" @click.stop shape="square" />
+                            </template>
+                        </van-cell>
+                    </van-checkbox-group>
+                </template>
+            </van-field>
+
             <div style="background-color: #F7F7F7;height: 10px;"></div>
 
             <!--  抵达西安交通车次 -->
@@ -298,9 +325,9 @@
 <script setup>
 import { defineEmits, defineProps, reactive, ref, computed, defineExpose } from 'vue';
 import { showToast, showDialog } from 'vant';
-import { saveData, uploadImage } from '@/api/2025.js';
+import { editData, uploadImage } from '@/api/2025.js';
 import lang from './lang.js';
-const props = defineProps(['langType','verificationCode', 'subData']);
+const props = defineProps(['langType', 'verificationCode', 'subData']);
 
 const emits = defineEmits(['closeComponent']);
 
@@ -314,12 +341,76 @@ const showLeavingTime = ref(false)
 const showCardType = ref(false)
 const showCheckOutTime = ref(false)
 const showUnitType = ref(false)
+const activitiesAttended = ref([])
 const photo = ref([]);
 
 const onClickLeft = () => {
     emits('closeComponent');
 };
 
+/**
+ * 将subData数据转换为formData
+ */
+const initFormData = () => {
+    if (!props.subData) return;
+    const relationship = {
+        lastName: 'lastName', // 姓
+        firstName: 'firstName', // 名
+        countryRegion: 'countryRegion', // 国家/地区
+        religion: 'belief', // 宗教
+        gender: 'gender', // 性别
+        birthDate: 'birthday', // 出生日期
+        photo: 'photoUrl', // 照片
+        phone: 'contact', // 手机号
+        email: 'email', // 邮箱
+        emergencyContact: 'emergencyContact', // 紧急联系人
+        emergencyContactPhone: 'emergencyContactPhone', // 紧急联系人电话
+        cardType: 'cardType', // 证件类型
+        idCard: 'passport', // 证件号
+        dietaryRequirements: 'catering', // 饮食要求
+        workUnit: 'workUnit', // 工作单位
+        unitType: 'unitType', // 单位类型
+        position: 'career', // 职务
+        fax: 'fax', // fax
+        interviewIntention: 'interview', // 接受采访意向
+        officeAddress: 'officeAddress', // 办公地址
+        arrivalNumberXian: 'reachTrainNumber', // 抵达西安交通车次
+        arrivalTimeXian: 'reachTime', // 抵达西安时间
+        departureNumber: 'leavingTrainNumber', // 离开车次
+        departureTime: 'leavingTime', // 离开时间
+        checkOutTime: 'checkOutTime', // 离店时间
+        remarks: 'message', // 备注
+    }
+    const subData = JSON.parse(JSON.stringify(props.subData))
+    const keys = Object.keys(subData || {});
+    subData.active1 === '是' && activitiesAttended.value.push('active1');
+    subData.active2 === '是' && activitiesAttended.value.push('active2');
+    subData.active3 === '是' && activitiesAttended.value.push('active3');
+    for (let i = 0; i < keys.length; i++) {
+        const key = keys[i];
+        if (key === 'photo') {
+            photo.value.push({
+                url: subData[key],
+            })
+        }
+        if (key === 'cardType') {
+            try {
+                formData.cardTypeName = lang[props.langType].cardTypeList.filter(item => item.value === subData[key])[0].text;
+            } catch (err) {
+                formData.cardTypeName = '';
+            }
+        }
+        if (key === 'unitType') {
+            try {
+                formData.unitTypeName = lang[props.langType].foreignCountryUnitType.filter(item => item.value === subData[key])[0].text;
+            } catch (err) {
+                formData.unitTypeName = '';
+            }
+        }
+        formData[relationship[key]] = subData[key];
+    }
+}
+initFormData()
 const reset = () => {
     form.value.resetValidation();
 }
@@ -342,12 +433,12 @@ const checkOutTimeConfirm = ({ selectedValues }) => {
 }
 const onUnitTypeConfirm = (values) => {
     showUnitType.value = false;
-    formData.unitType = values.selectedOptions[0].text;
+    formData.unitType = values.selectedOptions[0].value;
     formData.unitTypeName = values.selectedOptions[0].text;
 }
 const onConfirm = (values) => {
     showCardType.value = false;
-    formData.cardType = values.selectedOptions[0].text;
+    formData.cardType = values.selectedOptions[0].value;
     formData.cardTypeName = values.selectedOptions[0].text;
 }
 
@@ -430,7 +521,13 @@ let loading = false
 const onSubmit = () => {
     if (loading) return
     loading = true
-    saveData({
+    const activity = {}
+    activitiesAttended.value.forEach((item, index) => {
+        activity[`activity${index + 1}`] = '是'
+    })
+    editData({
+        ...activity,
+        id: props.subData.id, // 人员id
         code: props.verificationCode, // 邀请码
         lastName: formData.lastName, // 姓
         firstName: formData.firstName, // 名
@@ -443,11 +540,11 @@ const onSubmit = () => {
         religion: formData.belief, // 宗教
         emergencyContact: formData.emergencyContact, // 紧急联系人
         emergencyContactPhone: formData.emergencyContactPhone, // 紧急联系人电话
-        cardTypeName: formData.cardTypeName, // 证件类型
+        cardType: formData.cardType, // 证件类型
         idCard: formData.passport, // 证件号
         dietaryRequirements: formData.catering, // 饮食要求
         workUnit: formData.workUnit, // 工作单位
-        unitType: formData.unitType[0], // 单位类型
+        unitType: formData.unitType, // 单位类型
         position: formData.career, // 职务
         fax: formData.fax, // fax
         interviewIntention: formData.interview, // 接受采访意向
@@ -470,7 +567,7 @@ const onSubmit = () => {
         // });
         loading = false
         showDialog({
-            message: lang[props.langType].registration,
+            message: lang[props.langType].upRegistration,
         })
     }).catch((res) => {
         loading = false

+ 4 - 0
src/view/fenghui/index.vue

@@ -121,6 +121,10 @@ const langChange = ({ selectedValues }) => {
         font-weight: 400 !important;
         padding: 11px 0;
 
+        .van-field__label--top {
+            width: 100%!important;
+        }
+
         .label {
             min-width: 4em;
             display: inline-block;

+ 2 - 2
src/view/fenghui/introduction.vue

@@ -198,10 +198,10 @@
             <br />
             <van-form @submit="saveLogin">
                 <van-cell-group inset>
-                    <van-field v-model="form.verificationCode" name="username" :label="lang[langType].verificationCode"
+                    <van-field v-model="form.verificationCode" name="verificationCode" :label="lang[langType].verificationCode"
                         :placeholder="lang[langType].verificationCodeContent" required
                         :rules="[{ required: true, message: lang[langType].verificationCodeContent }]" />
-                    <van-field v-model="form.password" type="password" name="password" :label="lang[langType].passport"
+                    <van-field v-model="form.password" name="password" :label="lang[langType].passport"
                         :placeholder="lang[langType].passportContent" required
                         :rules="[{ required: true, message: lang[langType].passportContent }]" />
                 </van-cell-group>

+ 22 - 12
src/view/fenghui/lang.js

@@ -1,5 +1,10 @@
 export default {
     "zh": {
+        "activity1": "5月15日 “共享数字经济发展机遇”分论坛",
+        "activity2": "5月15日“共筑网络安全防线”分论坛",
+        "activity3": "5月15日“共商人工智能发展治理”分论坛",
+        "activitiesAttended": "拟参加的活动",
+        "activitiesAttendedContent": "选择拟参加的活动",
         "username": "用户名",
         "password": "密码",
         "login": "登录",
@@ -56,8 +61,8 @@ export default {
         "networkError": "网络错误",
         "upFileError": "上传失败",
         "upFileSusscess": "上传成功",
+        "upRegistration": "注册信息更新成功",
         "registration": "注册成功",
-        "registrationError": "注册失败",
         "gender": "性别",
         "genderContent": "请输入性别",
         "email": "邮箱",
@@ -75,7 +80,7 @@ export default {
         "IDcardNumber": "身份证号",
         "IDcardNumberContent": "请输入身份证号",
         "workGroupText": "工作组",
-        "workGroupContent": "请选择工作组",
+        "workGroupTextContent": "请选择工作组",
         "belief": "宗教信仰",
         "beliefContent": "请输入宗教信仰",
         "fax": "传真/邮箱",
@@ -141,6 +146,12 @@ export default {
         ]
     },
     "en": {
+        "upRegistration": "Registration information updated successfully",
+        "activity1": "May 15 sub Forum on 'sharing the development opportunities of digital economy'",
+        "activity2": "May 15 sub Forum on 'jointly building network security defense'",
+        "activity3": "On May 15, the sub forum of 'discussing the development and governance of artificial intelligence'",
+        "activitiesAttended": "Activities to be attended",
+        "activitiesAttendedContent": "Activities to be attended",
         "username": "Username",
         "password": "Password",
         "login": "Login",
@@ -197,7 +208,6 @@ export default {
         "upFileError": "Upload failed",
         "upFileSusscess": "Upload successful",
         "registration": "Registration successful",
-        "registrationError": "Registration failed",
         "gender": "Gender",
         "genderContent": "Gender",
         "email": "Email",
@@ -215,7 +225,7 @@ export default {
         "IDcardNumber": "ID Card Number",
         "IDcardNumberContent": "ID Card Number",
         "workGroupText": "Working Group",
-        "workGroupContent": "Please select working group",
+        "workGroupTextContent": "Please select working group",
         "belief": "Religious Belief",
         "beliefContent": "Religious Belief",
         "fax": "Fax/Email",
@@ -259,14 +269,14 @@ export default {
             "work25": "Staff Members"
         },
         "foreignCountryUnitType": [
-            { "text": "Government Agency", "value": "Government Agency" },
-            { "text": "Enterprise/Corporation", "value": "Enterprise/Corporation" },
-            { "text": "Academic Institution/University", "value": "Academic Institution/University" },
-            { "text": "Non-Profit Organization", "value": "Non-Profit Organization" },
-            { "text": "International Organization", "value": "International Organization" },
-            { "text": "Media/Press", "value": "Media/Press" },
-            { "text": "Industry Association", "value": "Industry Association" },
-            { "text": "Other", "value": "Other" }
+            { "text": "Government Agency", "value": "政府机构" },
+            { "text": "Enterprise/Corporation", "value": "企业/公司" },
+            { "text": "Academic Institution/University", "value": "学术机构/高校" },
+            { "text": "Non-Profit Organization", "value": "非营利组织" },
+            { "text": "International Organization", "value": "国际组织" },
+            { "text": "Media/Press", "value": "媒体机构" },
+            { "text": "Industry Association", "value": "行业协会" },
+            { "text": "Other", "value": "其他" }
         ],
         "workGroup": [
             { "text": "Conference Affairs Group", "value": "会务组" },