فهرست منبع

在线简历基本信息必填项调整

Xiao_123 7 ماه پیش
والد
کامیت
cf869d06a8
1فایلهای تغییر یافته به همراه12 افزوده شده و 26 حذف شده
  1. 12 26
      src/views/recruit/personal/PersonalCenter/resume/online/components/basicInfo.vue

+ 12 - 26
src/views/recruit/personal/PersonalCenter/resume/online/components/basicInfo.vue

@@ -221,7 +221,7 @@ const items = ref({
       key: 'sex',
       key: 'sex',
       value: '0', // '1' ? '男' : '女'
       value: '0', // '1' ? '男' : '女'
       default: 0,
       default: 0,
-      label: '性别',
+      label: '性别 *',
       col: 6,
       col: 6,
       width: 70,
       width: 70,
       dictTypeName: 'menduner_sex',
       dictTypeName: 'menduner_sex',
@@ -230,13 +230,11 @@ const items = ref({
     {
     {
       type: 'datePicker',
       type: 'datePicker',
       key: 'birthday',
       key: 'birthday',
-      // dateType: 'date', // 时间类型 year month date time
       value: null,
       value: null,
       label: '出生日期 *',
       label: '出生日期 *',
       col: 6,
       col: 6,
       outlined: true,
       outlined: true,
       rules: [v => !!v || '请选择出生日期']
       rules: [v => !!v || '请选择出生日期']
-      // options: {},
     },
     },
     {
     {
       type: 'phoneNumber',
       type: 'phoneNumber',
@@ -245,27 +243,20 @@ const items = ref({
       default: null,
       default: null,
       label: '电话号码',
       label: '电话号码',
       col: 6,
       col: 6,
-      outlined: true,
-      rules: [v => !!v || '请填写手机号码']
-      // disabled: true,
-      // slotName: 'phone',
+      outlined: true
     },
     },
     {
     {
       type: 'text',
       type: 'text',
       key: 'email',
       key: 'email',
       value: null,
       value: null,
       default: null,
       default: null,
-      label: '常用邮箱 *',
+      label: '常用邮箱',
       col: 6,
       col: 6,
       outlined: true,
       outlined: true,
       rules: [
       rules: [
         value => {
         value => {
-          if (value) return true
-          return '请输入常用邮箱'
-        },
-        value => {
-          if (checkEmail(value)) return true
-          return '请输入正确的电子邮箱'
+          if (value && !checkEmail(value)) return '请输入正确的电子邮箱'
+          return true
         }
         }
       ]
       ]
     },
     },
@@ -330,20 +321,19 @@ const items = ref({
       key: 'maritalStatus',
       key: 'maritalStatus',
       value: null,
       value: null,
       default: null,
       default: null,
-      label: '婚姻状况 *',
+      label: '婚姻状况',
       col: 6,
       col: 6,
       outlined: true,
       outlined: true,
       itemText: 'label',
       itemText: 'label',
       itemValue: 'value',
       itemValue: 'value',
       dictTypeName: 'menduner_marital_status',
       dictTypeName: 'menduner_marital_status',
-      rules: [v => !!v || '请选择婚姻状况'],
       items: []
       items: []
     },
     },
     {
     {
       type: 'autocomplete',
       type: 'autocomplete',
       key: 'workAreaProvinceId',
       key: 'workAreaProvinceId',
       value: null,
       value: null,
-      label: '所在城市:省 *',
+      label: '所在城市:省',
       outlined: true,
       outlined: true,
       itemText: 'name',
       itemText: 'name',
       itemValue: 'id',
       itemValue: 'id',
@@ -351,7 +341,6 @@ const items = ref({
       noParam: true,
       noParam: true,
       col: 6,
       col: 6,
       flexStyle: 'mr-3',
       flexStyle: 'mr-3',
-      rules: [v => !!v || '请选择所在城市:省'],
       items: [],
       items: [],
       change: null
       change: null
     },
     },
@@ -359,12 +348,11 @@ const items = ref({
       type: 'autocomplete',
       type: 'autocomplete',
       key: 'areaId',
       key: 'areaId',
       value: null,
       value: null,
-      label: '所在城市:市 *',
+      label: '所在城市:市',
       outlined: true,
       outlined: true,
       itemText: 'name',
       itemText: 'name',
       itemValue: 'id',
       itemValue: 'id',
       col: 6,
       col: 6,
-      rules: [v => !!v || '请选择所在城市:市'],
       items: [],
       items: [],
       change: null
       change: null
     },
     },
@@ -402,13 +390,10 @@ const items = ref({
       dateType: 'month',
       dateType: 'month',
       key: 'firstWorkTime',
       key: 'firstWorkTime',
       value: null,
       value: null,
-      label: '首次工作时间 *',
+      label: '首次工作时间',
       col: 6,
       col: 6,
-      outlined: true,
-      // clearable: true,
-      rules: [v => !!v || '请选择首次工作时间']
-      // options: {},
-    },
+      outlined: true
+    }
   ]
   ]
 })
 })
 
 
@@ -423,6 +408,7 @@ const handleSave = async () => {
     if (e.type === 'datepicker') obj[e.key] = getTimeStamp(e.value)
     if (e.type === 'datepicker') obj[e.key] = getTimeStamp(e.value)
     else obj[e.key] = e.value
     else obj[e.key] = e.value
   })
   })
+  if (!obj.sex) return Snackbar.warning('请先选择您的性别')
   await saveResumeBasicInfo(obj)
   await saveResumeBasicInfo(obj)
   Snackbar.success(t('common.saveMsg'))
   Snackbar.success(t('common.saveMsg'))
   isEdit.value = false
   isEdit.value = false