Преглед изворни кода

投递职位接口相关参数增加,如果是学生则需要填
practiceStartTime
practiceEndTime

lifanagju_citu пре 4 месеци
родитељ
комит
ca9a2e7b3a
1 измењених фајлова са 6 додато и 5 уклоњено
  1. 6 5
      src/views/recruit/components/message/index.vue

+ 6 - 5
src/views/recruit/components/message/index.vue

@@ -187,7 +187,7 @@
         </div>
       </v-radio-group>
     </div>
-    <studentDeliveryForm v-if="baseInfo?.type && Number(baseInfo?.type) === 1" ref="studentDeliveryFormRef" />
+    <studentDeliveryForm v-if="isStudent" ref="studentDeliveryFormRef" />
   </CtDialog>
 	<Loading :visible="pageLoading" />
 </template>
@@ -242,6 +242,7 @@ const pageSize = ref(1)
 const hasMore = ref(false)
 const studentDeliveryFormRef = ref()
 const baseInfo = ref(localStorage.getItem('baseInfo') ? JSON.parse(localStorage.getItem('baseInfo')) : {})
+const isStudent = ref(baseInfo.value?.type && Number(baseInfo.value.type) === 1)
 
 const positionList = ref([])
 const showTip = ref(false)
@@ -634,11 +635,11 @@ const handleSubmitAttachment = async () => {
 
   // 学生实习到岗信息
   let practice = {}
-  if (baseInfo.value?.type && Number(baseInfo.value?.type) === 1) {
+  if (isStudent.value) {
     practice = studentDeliveryFormRef.value.getQueryParams()
     console.log(practice, '上传简历-到岗信息')
   }
-  if (practice && Object.keys(practice).length > 0 && !practice.practiceStartTime || !practice.practiceEndTime) return Snackbar.warning('请完善实习到岗信息')
+  if (isStudent.value && (!practice?.practiceStartTime || !practice?.practiceEndTime)) return Snackbar.warning('请完善实习到岗信息')
 
   // 保存附件
   await savePersonResumeCv(obj)
@@ -692,11 +693,11 @@ async function handleSubmitResume () {
 
   // 学生实习到岗信息
   let practice = {}
-  if (baseInfo.value?.type && Number(baseInfo.value?.type) === 1) {
+  if (isStudent.value) {
     practice = studentDeliveryFormRef.value.getQueryParams()
     console.log(practice, '选择简历-到岗信息')
   }
-  if (practice && Object.keys(practice).length > 0 && !practice.practiceStartTime || !practice.practiceEndTime) return Snackbar.warning('请完善实习到岗信息')
+  if (isStudent.value && (!practice?.practiceStartTime || !practice?.practiceEndTime)) return Snackbar.warning('请完善实习到岗信息')
 
   // 简历投递至简历库
   if (isEmployment.value !== '-1') {