|
@@ -62,15 +62,11 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</v-card>
|
|
</v-card>
|
|
|
|
+ <quickResumeDialog v-if="showQuickResumeDialog"></quickResumeDialog>
|
|
|
|
+ <handleDeliveryCom v-if="showHandleDelivery"></handleDeliveryCom>
|
|
|
|
+ <!-- <quickResumeDialog v-model="showQuickResumeDialog"></quickResumeDialog> -->
|
|
|
|
+ <!-- <handleDeliveryCom v-model="showHandleDelivery"></handleDeliveryCom> -->
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
- <!-- 选择简历 -->
|
|
|
|
- <selectResumeDialog v-model="showResume" :list="resumeList" @submit="handleSubmit" @close="handleClose"></selectResumeDialog>
|
|
|
|
-
|
|
|
|
- <CtDialog :visible="showQuickResume" :widthType="2" titleClass="text-h6" title="简历投递" @close="quickResumeClose" @submit="quickResumeSubmit">
|
|
|
|
- <DeliveryForm ref="deliveryForm"></DeliveryForm>
|
|
|
|
- </CtDialog>
|
|
|
|
-
|
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
@@ -78,13 +74,9 @@ defineOptions({name: 'recruit-personal-shareJob-index'})
|
|
import { onMounted, ref } from 'vue';
|
|
import { onMounted, ref } from 'vue';
|
|
import { getPositionDetails } from '@/api/position'
|
|
import { getPositionDetails } from '@/api/position'
|
|
import { dealDictObjData } from '@/utils/position'
|
|
import { dealDictObjData } from '@/utils/position'
|
|
-import DeliveryForm from './components/deliveryForm.vue'
|
|
|
|
|
|
+import handleDeliveryCom from './components/handleDeliveryCom.vue'
|
|
|
|
+import quickResumeDialog from './components/quickResumeDialog.vue'
|
|
import { getPersonalToken } from '@/utils/auth'
|
|
import { getPersonalToken } from '@/utils/auth'
|
|
-import Snackbar from '@/plugins/snackbar'
|
|
|
|
-import { useI18n } from '@/hooks/web/useI18n'; const { t } = useI18n()
|
|
|
|
-import { jobCvRelCheckSend, jobCvRelSend } from '@/api/position'
|
|
|
|
-import { getPersonResumeCv } from '@/api/resume'
|
|
|
|
-import selectResumeDialog from '@/views/recruit/personal/position/components/jobDetails/selectResumeDialog'
|
|
|
|
|
|
|
|
// 组件挂载后添加事件监听器
|
|
// 组件挂载后添加事件监听器
|
|
const isMobile = ref(false)
|
|
const isMobile = ref(false)
|
|
@@ -117,60 +109,18 @@ const desc = [
|
|
{ mdi: 'mdi-clock-time-ten-outline', value: 'expName' }
|
|
{ mdi: 'mdi-clock-time-ten-outline', value: 'expName' }
|
|
]
|
|
]
|
|
|
|
|
|
-// 简历投递
|
|
|
|
-const deliveryForm = ref()
|
|
|
|
-const showQuickResume = ref(false)
|
|
|
|
-const showResume = ref(false)
|
|
|
|
-const resumeList = ref([])
|
|
|
|
|
|
+// 投递简历
|
|
|
|
+const showQuickResumeDialog = ref(false)
|
|
|
|
+const showHandleDelivery = ref(false)
|
|
const handleDelivery = () => {
|
|
const handleDelivery = () => {
|
|
if (getPersonalToken()) {
|
|
if (getPersonalToken()) {
|
|
- // 已登录情况下: 1.是否投递过简历 2.是否有上传简历 3.已登录但未上传过简历->快速投递
|
|
|
|
- inspectionProcess()
|
|
|
|
|
|
+ showHandleDelivery.value = true
|
|
|
|
+ showQuickResumeDialog.value = !showHandleDelivery.value
|
|
} else {
|
|
} else {
|
|
- // 未登录,快速投递
|
|
|
|
- showQuickResume.value = true
|
|
|
|
|
|
+ showQuickResumeDialog.value = true
|
|
|
|
+ showHandleDelivery.value = !showQuickResumeDialog.value
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-const inspectionProcess = async () => {
|
|
|
|
- try {
|
|
|
|
- //
|
|
|
|
- const res = await jobCvRelCheckSend({ jobId }) //是否投递过简历
|
|
|
|
- if (res) return Snackbar.warning(t('resume.alreadyResume'))
|
|
|
|
- //
|
|
|
|
- const data = await getPersonResumeCv()// 简历列表
|
|
|
|
- resumeList.value = data
|
|
|
|
- //
|
|
|
|
- if (data?.length) showResume.value = true // 简历选择
|
|
|
|
- else showQuickResume.value = true // 快速投递
|
|
|
|
- } catch (error) {
|
|
|
|
- console.error('error', error)
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-const quickResumeClose = () => {
|
|
|
|
- showQuickResume.value = false
|
|
|
|
-}
|
|
|
|
-const quickResumeSubmit = async () => {
|
|
|
|
- console.log(await deliveryForm.value.getQuery(), 'quickResumeSubmit')
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-// 简历投递
|
|
|
|
-const selectResume = ref()
|
|
|
|
-const handleClose = () => {
|
|
|
|
- showResume.value = false
|
|
|
|
- selectResume.value = null
|
|
|
|
-}
|
|
|
|
-const handleSubmit = async (val) =>{
|
|
|
|
- selectResume.value = val
|
|
|
|
- if (!selectResume.value) return Snackbar.warning(t('resume.selectResumeToSubmit'))
|
|
|
|
- const obj = resumeList.value.find(e => e.id === selectResume.value)
|
|
|
|
- if (!obj) return Snackbar.warning(t('resume.selectedResumeNotExist'))
|
|
|
|
- await jobCvRelSend({ jobId, title: obj.title, url: obj.url })
|
|
|
|
- setTimeout(() => {
|
|
|
|
- Snackbar.success(t('resume.deliverySuccess'))
|
|
|
|
- }, 3000)
|
|
|
|
- handleClose()
|
|
|
|
-}
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|