Bladeren bron

传递给后端时间戳,注意月份是从 0 开始的

lifanagju_citu 2 maanden geleden
bovenliggende
commit
19f2182680

+ 3 - 4
src/plugins/dialogExtend/components/infoForm.vue

@@ -30,7 +30,7 @@
     </CtForm>
   </div>
   <ImgCropper :visible="isShowCopper" :image="selectPic" :cropBoxResizable="true" @submit="handleHideCopper" :aspectRatio="1 / 1" @close="isShowCopper = false"></ImgCropper>
-  
+
   <!-- 选择本地简历 -->
   <CtDialog
     :visible="openUploadDialog"
@@ -169,8 +169,7 @@ const items = ref({
       mode: 'date',
       labelWidth: 80,
       key: 'birthday',
-      value: '1990-01-01',
-      defaultValue: new Date(1990, 1, 1),
+      value: new Date(1990, 0, 1).getTime(), // 月份是从 0 开始的
       label: '出生日期 *',
       disabledFutureDates: true,
       format: 'YYYY/MM/DD',
@@ -458,4 +457,4 @@ defineExpose({
     border-radius: 50%;
   }
 }
-</style>
+</style>

+ 6 - 4
src/plugins/dialogExtend/components/studentInfoForm.vue

@@ -122,8 +122,7 @@ const items = ref({
       mode: 'date',
       labelWidth: 80,
       key: 'birthday',
-      value: '1990-01-01',
-      defaultValue: new Date(1990, 1, 1),
+      value: new Date(1990, 0, 1).getTime(), // 月份是从 0 开始的
       label: '出生日期 *',
       disabledFutureDates: true,
       format: 'YYYY/MM/DD',
@@ -300,7 +299,10 @@ items.value.options.forEach((e) => {
 
 const getQuery = async () => {
   const { valid } = await formPageRef.value.formRef.validate()
-  if (!valid) return false
+  if (!valid) {
+    Snackbar.warning('请填写完整个人信息!')
+    return false
+  }
   const obj = {}
   items.value.options.forEach(e => {
     if (Object.prototype.hasOwnProperty.call(e, 'data')) return obj[e.key] = e.data
@@ -340,4 +342,4 @@ defineExpose({
     border-radius: 50%;
   }
 }
-</style>
+</style>

+ 1 - 3
src/views/recruit/enterprise/entInfoSetting/informationSettingsComponents/basicInfo.vue

@@ -111,11 +111,9 @@ const formItems = ref({
     },
     {
       type: 'datePicker',
+      mode: 'month',
       key: 'openTime',
       value: null,
-      mode: 'month',
-      // default: '2010-01',
-      // defaultValue: new Date(2010, 1),
       format: 'YYYY-MM',
       disabledDate: true,
       label: '开业时间',

+ 11 - 12
src/views/recruit/enterprise/entInfoSetting/informationSettingsComponents/businessInformation.vue

@@ -11,14 +11,14 @@
             <span>支持jpg、jpeg、png格式,图片大小不得超过20M</span>
           </div>
           <div class="file-box">
-            <Img 
-              class="mt-3" 
-              tips="上传图片" 
+            <Img
+              class="mt-3"
+              tips="上传图片"
               :value="licenseUrl"
-              :showSnackbar="false" 
-              @imgClick="emit('preview', [licenseUrl])" 
-              :showCursor="true" 
-              @success="handleUploadImg" 
+              :showSnackbar="false"
+              @imgClick="emit('preview', [licenseUrl])"
+              :showCursor="true"
+              @success="handleUploadImg"
               @delete="handleDeleteImg"
             ></Img>
           </div>
@@ -92,10 +92,9 @@ const formItems = ref({
     {
       type: 'datePicker',
       key: 'establishmentTime',
-      value: '2010-01-01',
-      label: '成立时间 *',
+      value: new Date(2010, 0, 1).getTime(), // 月份是从 0 开始的
       format: 'YYYY-MM-DD',
-      defaultValue: new Date(2010, 1, 1),
+      label: '成立时间 *',
       labelWidth: 120,
       col: 6,
       flexStyle: 'mr-3'
@@ -217,7 +216,7 @@ const getOcr = async () => {
   loading.value = true
   try {
     const data = await getBusinessLicenseOCR(licenseUrl.value)
-    
+
     if (data && Object.keys(data).length) {
       Confirm(t('common.confirmTitle'), '是否根据营业执照内容替换以下相关信息').then(() => {
         formItems.value.options.forEach(e => {
@@ -229,7 +228,7 @@ const getOcr = async () => {
         })
         business.value = data
       })
-      
+
     } else {
       licenseUrl.value = ''
       Confirm(t('common.confirmTitle'), '营业执照图片识别失败,请重新上传清晰合法图片', { hideCancelBtn: true })

+ 3 - 5
src/views/recruit/personal/PersonalCenter/resume/analysis/components/basicInfo.vue

@@ -85,8 +85,7 @@ const items = ref({
       mode: 'date',
       labelWidth: 80,
       key: 'birthday',
-      value: '2000-01-01',
-      defaultValue: new Date(2000, 1, 1),
+      value: new Date(2000, 0, 1).getTime(), // 月份是从 0 开始的
       label: '出生日期 *',
       disabledFutureDates: true,
       col: 6,
@@ -99,9 +98,8 @@ const items = ref({
       type: 'datePicker',
       mode: 'month',
       key: 'firstWorkTime',
-      value: '2000-01',
+      value: new Date(2000, 0).getTime(), // 月份是从 0 开始的
       disabledFutureDates: true,
-      defaultValue: new Date(2000, 1),
       format: 'YYYY/MM',
       labelWidth: 90,
       flexStyle: 'mb-7',
@@ -225,7 +223,7 @@ const items = ref({
       col: 6,
       items: [],
     },
-    
+
   ]
 })
 

+ 3 - 5
src/views/recruit/personal/PersonalCenter/resume/analysis/components/educationExp.vue

@@ -59,7 +59,7 @@ const getMajorListData = async (name) => {
   }
   if (item.items?.length && (majorNameInput.value === name)) return // 防抖
   item[item.itemTextName] = majorNameInput.value = name
-  
+
   if (name === null || name === '') { item.items = [] }
   else {
     const data = await schoolMajorByName({ name })
@@ -158,10 +158,9 @@ const items = ref({
       key: 'startTime',
       mode: 'month', // 时间类型 year month date time
       value: null,
-      default: new Date(2014, 1).getTime(),
+      default: new Date(2014, 0).getTime(), // 月份是从 0 开始的
       labelWidth: 80,
       label: '开始时间 *',
-      defaultValue: new Date(2014, 1),
       disabledFutureDates: true,
       col: 6,
       rules: [v => !!v || '请选择起始时间'],
@@ -172,8 +171,7 @@ const items = ref({
       key: 'endTime',
       mode: 'month', // 时间类型 year month date time
       value: null,
-      default: new Date(2018, 1).getTime(),
-      defaultValue: new Date(2018, 1),
+      default: new Date(2018, 0).getTime(), // 月份是从 0 开始的
       disabledFutureDates: true,
       labelWidth: 80,
       label: '结束时间 *',

+ 2 - 4
src/views/recruit/personal/PersonalCenter/resume/analysis/components/trainingExperience.vue

@@ -67,9 +67,8 @@ const items = ref({
       type: 'datePicker',
       key: 'startTime',
       mode: 'month',
-      value: new Date(2020, 1).getTime(),
+      value: new Date(2020, 0).getTime(), // 月份是从 0 开始的
       labelWidth: 80,
-      defaultValue: new Date(2020, 1),
       label: '开始时间 *',
       disabledFutureDates: true,
       col: 6,
@@ -81,9 +80,8 @@ const items = ref({
       type: 'datePicker',
       key: 'endTime',
       mode: 'month',
-      value: new Date(2022, 1).getTime(),
+      value: new Date(2022, 0).getTime(), // 月份是从 0 开始的
       labelWidth: 80,
-      defaultValue: new Date(2022, 1),
       label: '结束时间 *',
       disabledFutureDates: true,
       col: 6,

+ 2 - 4
src/views/recruit/personal/PersonalCenter/resume/analysis/components/workExperience.vue

@@ -138,8 +138,7 @@ const items = ref({
       value: null,
       label: '开始时间 *',
       labelWidth: 100,
-      default: new Date(2020, 1).getTime(),
-      defaultValue: new Date(2020, 1),
+      default: new Date(2020, 0).getTime(), // 月份是从 0 开始的
       disabledFutureDates: true,
       rules: [v => !!v || '请选择起始时间'],
       change: startTimeChange
@@ -150,8 +149,7 @@ const items = ref({
       slotName: 'endTime',
       mode: 'month', // 时间类型 year month date time
       value: null,
-      default: new Date(2022, 1).getTime(),
-      defaultValue: new Date(2022, 1),
+      default: new Date(2022, 0).getTime(), // 月份是从 0 开始的
       label: '结束时间 *',
       disabledFutureDates: true,
       labelWidth: 100,

+ 6 - 8
src/views/recruit/personal/PersonalCenter/resume/online/components/basicInfo.vue

@@ -9,8 +9,8 @@
       <div class="avatarsBox" @mouseover="showIcon = true" @mouseleave="showIcon = false">
         <v-badge
           v-if="baseInfo?.sex === '1' || baseInfo?.sex === '2'"
-          bordered 
-          :color="baseInfo?.sex ? (baseInfo?.sex === '1' ? '#1867c0' : 'error') : 'error'" 
+          bordered
+          :color="baseInfo?.sex ? (baseInfo?.sex === '1' ? '#1867c0' : 'error') : 'error'"
           :icon="baseInfo?.sex ? (baseInfo?.sex === '1' ? 'mdi-gender-male' : 'mdi-gender-female') : 'mdi-gender-female'">
           <v-img :src="getUserAvatar(baseInfo?.avatar, baseInfo?.sex)" width="130" height="130" style="border-radius: 6px;"></v-img>
           <div v-show="showIcon" @click.self="openFileInput" class="mdi mdi-camera-outline camera">
@@ -108,7 +108,7 @@
       </div>
     </div>
   </div>
-  
+
   <Loading :visible="overlay"></Loading>
   <!-- 图片裁剪 -->
   <ImgCropper :visible="isShowCopper" :image="selectPic" :cropBoxResizable="true" @submit="handleHideCopper" :aspectRatio="1 / 1" @close="isShowCopper = false, selectPic = ''"></ImgCropper>
@@ -267,8 +267,7 @@ const items = ref({
       mode: 'date',
       labelWidth: 110,
       key: 'birthday',
-      value: '2000-01-01',
-      defaultValue: new Date(2000, 1, 1),
+      value: new Date(2000, 0, 1).getTime(), // 月份是从 0 开始的
       label: '出生日期 *',
       disabledFutureDates: true,
       col: 6,
@@ -281,9 +280,8 @@ const items = ref({
       type: 'datePicker',
       mode: 'month',
       key: 'firstWorkTime',
-      value: '2000-01',
+      value: new Date(2000, 0).getTime(), // 月份是从 0 开始的
       disabledFutureDates: true,
-      defaultValue: new Date(2000, 1),
       format: 'YYYY/MM',
       labelWidth: 110,
       flexStyle: 'mb-7',
@@ -407,7 +405,7 @@ const items = ref({
       col: 6,
       items: [],
     },
-    
+
   ]
 })
 

+ 3 - 3
src/views/recruit/personal/PersonalCenter/resume/online/components/educationExp.vue

@@ -92,7 +92,7 @@ const getMajorListData = async (name) => {
   }
   if (item.items?.length && (majorNameInput.value === name)) return // 防抖
   item[item.itemTextName] = majorNameInput.value = name
-  
+
   if (name === null || name === '') { item.items = [] }
   else {
     const data = await schoolMajorByName({ name })
@@ -191,7 +191,7 @@ const formItems = ref({
       key: 'startTime',
       mode: 'month', // 时间类型 year month date time
       value: null,
-      default: new Date(2014, 1).getTime(),
+      default: new Date(2014, 0).getTime(), // 月份是从 0 开始的
       // format: 'YYYY/MM',
       labelWidth: 120,
       label: '开始时间 *',
@@ -206,7 +206,7 @@ const formItems = ref({
       key: 'endTime',
       mode: 'month', // 时间类型 year month date time
       value: null,
-      default: new Date(2018, 1).getTime(),
+      default: new Date(2018, 0).getTime(), // 月份是从 0 开始的
       // format: 'YYYY/MM',
       defaultValue: new Date(2018, 1),
       disabledFutureDates: true,

+ 2 - 4
src/views/recruit/personal/PersonalCenter/resume/online/components/trainingExperience.vue

@@ -102,9 +102,8 @@ const items = ref({
       type: 'datePicker',
       key: 'startTime',
       mode: 'month',
-      value: new Date(2014, 1).getTime(),
+      value: new Date(2020, 0).getTime(), // 月份是从 0 开始的
       labelWidth: 140,
-      defaultValue: new Date(2020, 1),
       label: '培训开始时间 *',
       disabledFutureDates: true,
       col: 6,
@@ -116,9 +115,8 @@ const items = ref({
       type: 'datePicker',
       key: 'endTime',
       mode: 'month',
-      value: new Date(2022, 1).getTime(),
+      value: new Date(2022, 0).getTime(), // 月份是从 0 开始的
       labelWidth: 140,
-      defaultValue: new Date(2022, 1),
       label: '培训结束时间 *',
       disabledFutureDates: true,
       col: 6,

+ 2 - 4
src/views/recruit/personal/PersonalCenter/resume/online/components/workExperience.vue

@@ -176,8 +176,7 @@ const formItems = ref({
       value: null,
       label: '开始时间 *',
       labelWidth: 120,
-      default: new Date(2020, 1).getTime(),
-      defaultValue: new Date(2020, 1),
+      default: new Date(2020, 0).getTime(), // 月份是从 0 开始的
       disabledFutureDates: true,
       col: 6,
       rules: [v => !!v || '请选择起始时间']
@@ -188,8 +187,7 @@ const formItems = ref({
       slotName: 'endTime',
       mode: 'month', // 时间类型 year month date time
       value: null,
-      default: new Date(2022, 1).getTime(),
-      defaultValue: new Date(2022, 1),
+      default: new Date(2022, 0).getTime(), // 月份是从 0 开始的
       label: '结束时间 *',
       disabledFutureDates: true,
       col: 6,