Browse Source

英文名

Xiao_123 6 tháng trước cách đây
mục cha
commit
06711517de

+ 44 - 22
src/views/recruit/personal/PersonalCenter/resume/online/components/basicInfo.vue

@@ -52,7 +52,10 @@
         </div>
         <!-- 展示 -->
         <div v-else>
-          <span class="ml-50" style="font-size: 20px; font-weight: 600;color: var(--color-666);">{{ baseInfo?.name || userInfo?.phone }}</span>
+          <span class="ml-50" style="font-size: 20px; font-weight: 600;color: var(--color-666);">
+            {{ baseInfo?.name || userInfo?.phone }}
+            <span v-if="baseInfo?.foreignName">(英文名:{{ baseInfo?.foreignName }})</span>
+          </span>
           <div class="mt-3 d-flex">
             <div class="listBox ml-50">
               <div>
@@ -220,6 +223,23 @@ const items = ref({
         }
       ]
     },
+    {
+      type: 'text',
+      key: 'foreignName',
+      value: null,
+      label: '英文名',
+      col: 6,
+      outlined: true,
+      clearable: true,
+      rules: [
+        value => {
+          if (!value) return true
+          var regex = /^[A-Za-z]+(?:\s[A-Za-z]+)?$/
+          if (regex.test(value)) return true
+          return '请输入正确的英文名'
+        }
+      ]
+    },
     {
       type: 'ifRadio',
       key: 'sex',
@@ -231,6 +251,16 @@ const items = ref({
       dictTypeName: 'menduner_sex',
       items: [],
     },
+    {
+      type: 'phoneNumber',
+      key: 'phone',
+      value: userInfo?.value?.phone || '',
+      default: null,
+      label: '电话号码 *',
+      col: 6,
+      outlined: true,
+      rules: [v => !!v || '请填写联系手机号']
+    },
     {
       type: 'datePicker',
       mode: 'date',
@@ -242,18 +272,23 @@ const items = ref({
       disabledFutureDates: true,
       col: 6,
       format: 'YYYY/MM/DD',
+      flexStyle: 'mb-7',
       outlined: true,
       rules: [v => !!v || '请选择出生日期']
     },
     {
-      type: 'phoneNumber',
-      key: 'phone',
-      value: userInfo?.value?.phone || '',
-      default: null,
-      label: '电话号码 *',
+      type: 'datePicker',
+      mode: 'month',
+      key: 'firstWorkTime',
+      value: '2000-01',
+      disabledFutureDates: true,
+      defaultValue: new Date(2000, 1),
+      format: 'YYYY/MM',
+      labelWidth: 110,
+      flexStyle: 'mb-7',
+      label: '首次工作时间',
       col: 6,
-      outlined: true,
-      rules: [v => !!v || '请填写联系手机号']
+      outlined: true
     },
     {
       type: 'text',
@@ -371,19 +406,7 @@ const items = ref({
       col: 6,
       items: [],
     },
-    {
-      type: 'datePicker',
-      mode: 'month',
-      key: 'firstWorkTime',
-      value: '2000-01',
-      disabledFutureDates: true,
-      defaultValue: new Date(2000, 1),
-      format: 'YYYY/MM',
-      labelWidth: 130,
-      label: '首次工作时间',
-      col: 6,
-      outlined: true
-    }
+    
   ]
 })
 
@@ -402,7 +425,6 @@ const handleSave = async () => {
   isEdit.value = false
   await userStore.getUserBaseInfos(baseInfo.value.userId || null)
   getBasicInfo()
-
 }
 
 items.value.options.forEach(async (e, index) => {