瀏覽代碼

测试实习到岗信息上传

lifanagju_citu 2 月之前
父節點
當前提交
be1cf9ce25
共有 2 個文件被更改,包括 51 次插入9 次删除
  1. 2 1
      pagesA/chart/index.vue
  2. 49 8
      pagesB/positionDetail/index.vue

+ 2 - 1
pagesA/chart/index.vue

@@ -294,7 +294,8 @@ const isSendResume = ref(false)
 const positionInfo = ref({})
 const isEmployment = ref('-1')
 
-const isStudent = ref(false) // 已测试,待开放上线 const isStudent = useUserStore.baseInfo?.type && Boolean(Number(useUserStore.baseInfo.type) === 1)
+// const isStudent = ref(false) // 已测试,待开放上线 
+const isStudent = useUserStore.baseInfo?.type && Boolean(Number(useUserStore.baseInfo.type) === 1)
 
 onMounted(() => {
   setTimeout(() => {

+ 49 - 8
pagesB/positionDetail/index.vue

@@ -133,9 +133,6 @@
         </view>
         <view style="height: 1px; margin: 0 20rpx; background-color: #dedede;"></view>
         <scroll-view class="dialog-content" scroll-y="true" style="max-height: 50vh; width: auto;">
-          <view v-if="isStudent" class="ss-p-x-50">
-            <studentDeliveryForm ref="studentDeliveryFormRef" />
-          </view>
           <uni-card
             v-for="(item, index) in resumeList"
             :key="index"
@@ -164,6 +161,23 @@
         <view class="dialog-bottom" @click="deliverySubmit()">确认投递</view>
       </view>
     </uni-popup>
+
+    <!-- 实习到岗时间 -->
+    <uni-popup ref="practicePopup" background-color="#fff" :mask-click="false" >
+      <view class="dialogBox" style="width: 95vw;">
+        <view class="dialog-title">
+          <view class="title">实习到岗信息</view>
+          <uni-icons type="close" color="grey" size="26" @click="practicePopupClose" />
+        </view>
+        <scroll-view class="dialog-content" scroll-y="true" style="max-height: 50vh; width: auto;">
+          <view v-if="isStudent" class="ss-p-x-50">
+            <studentDeliveryForm ref="studentDeliveryFormRef" />
+          </view>
+        </scroll-view>
+        <view class="dialog-bottom" @click="beforeHandleUploadSubmit()">确认</view>
+      </view>
+    </uni-popup>
+
     <!-- 上传简历 -->
     <uni-popup ref="uploadPopup" type="dialog">
 			<uni-popup-dialog
@@ -251,7 +265,8 @@ const imgSrc = ref('')
 const appInfo = ref({})
 const poster = ref()
 const beenLogin = ref(false)
-const isStudent = ref(false) // 已测试,待开放上线 const isStudent = computed(() => useUserStore.baseInfo?.type && Boolean(Number(useUserStore.baseInfo.type) === 1))
+// const isStudent = ref(false) // 已测试,待开放上线 const isStudent = computed(() => useUserStore.baseInfo?.type && Boolean(Number(useUserStore.baseInfo.type) === 1))
+const isStudent = computed(() => useUserStore.baseInfo?.type && Boolean(Number(useUserStore.baseInfo.type) === 1))
 const areaName = ref('')
 const canvasToTempFilePath = ref('')
 
@@ -482,13 +497,37 @@ const uploadPopup = ref()
 const resumeList = ref([])
 const selectIndex = ref(null)
 
-const handleOpen = async () => {
+const practicePopupClose = () => {
+  practicePopup.value.close()
+}
+const beforeHandleUpload = async () => {
+  practicePopup.value.open()
+}
+
+const practicePopup = ref()
+let practiceData = null
+const beforeHandleUploadSubmit = async () => {
+  practiceData = await studentDeliveryFormRef.value.getQueryParams()
+  if (!practiceData) {
+    return
+  }
+  practicePopupClose()
+  handleOpen(true)
+}
+
+const handleOpen = async (retry) => {
+  if (isStudent.value && !retry) {
+    beforeHandleUpload()
+    return
+  }
+
   // 未上传简历
   if (!resumeList.value?.length) {
     return uploadPopup.value.open()
   }
   popup.value.open()
 }
+
 const handleDelivery = async () => {
   // 未登录
   if (!getAccessToken()) {
@@ -552,9 +591,11 @@ const deliverySubmit = async (uploadFile) => {
     ...(jobFairId && { jobFairId })
   }
   if (isStudent.value) {
-    const practice = await studentDeliveryFormRef.value.getQueryParams()
-    if (!practice) return
-    params = Object.assign(params, practice)
+    if (!practiceData) {
+      handleOpen()
+      return
+    }
+    params = Object.assign(params, practiceData)
   }
 
   if (isEmployment.value) {