|
@@ -41,9 +41,6 @@
|
|
|
<div class="d-flex attachment-item my-2" v-for="k in attachmentList" :key="k.id">
|
|
|
<v-icon color="primary">mdi-file-account</v-icon>
|
|
|
<div class="file-name ellipsis ml-2">{{ k.title }}</div>
|
|
|
- <!-- <v-icon class="cursor-pointer" color="primary" @click="previewFile(k.url)">mdi-eye-outline</v-icon>
|
|
|
- <v-icon class="cursor-pointer mx-2" color="primary" @click="handleDownload(k)">mdi-download-box-outline</v-icon>
|
|
|
- <v-icon class="cursor-pointer" color="error" @click="handleDelete(k)">mdi-trash-can-outline</v-icon> -->
|
|
|
<span class="cursor-pointer color-primary" @click="previewFile(k.url)">预览</span>
|
|
|
<span class="cursor-pointer mx-2 color-primary" @click="handleDownload(k)">下载</span>
|
|
|
<span class="cursor-pointer color-error" @click="handleDelete(k)">删除</span>
|
|
@@ -51,15 +48,6 @@
|
|
|
</div>
|
|
|
<div v-else class="more-text d-flex justify-center">暂无简历,请先上传</div>
|
|
|
</div>
|
|
|
- <v-navigation-drawer
|
|
|
- v-model="showInterviewSchedule"
|
|
|
- style="height: 100vh; overflow: hidden;"
|
|
|
- temporary
|
|
|
- location="right"
|
|
|
- width="300"
|
|
|
- >
|
|
|
- <interviewSchedule :dataList="invitePageList" @handleMore="interviewScheduleMore()"></interviewSchedule>
|
|
|
- </v-navigation-drawer>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -68,15 +56,12 @@ defineOptions({ name: 'personal-center-right'})
|
|
|
import { ref } from 'vue'
|
|
|
import { previewFile } from '@/utils'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
-import { useRoute } from 'vue-router'; const route = useRoute()
|
|
|
import { getPersonResumeCv, savePersonResumeCv, deletePersonResumeCv } from '@/api/recruit/personal/resume'
|
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
|
import { useUserStore } from '@/store/user'
|
|
|
import Snackbar from '@/plugins/snackbar'
|
|
|
import Confirm from '@/plugins/confirm'
|
|
|
-import interviewSchedule from './../components/interviewSchedule.vue'
|
|
|
-import { getUserInterviewInvitePage } from '@/api/recruit/personal/personalCenter'
|
|
|
-import { dealDictObjData } from '@/utils/position'
|
|
|
+import { getBlob, saveAs } from '@/utils'
|
|
|
|
|
|
const { t } = useI18n()
|
|
|
const router = useRouter()
|
|
@@ -93,15 +78,9 @@ userStore.$subscribe((mutation, state) => {
|
|
|
|
|
|
const resumeList = ref([
|
|
|
{ name: 'refresh', icon: 'mdi-refresh', title: t('resume.refreshResume'), desc: t('resume.enhanceResumeActivity') },
|
|
|
- // { name: 'interview', icon: 'mdi-account-multiple-check-outline', title: t('resume.interviewSchedule'), desc: '' },
|
|
|
{ name: 'order', icon: 'mdi-clipboard-list-outline', title: '我的订单', desc: '交易订单' },
|
|
|
])
|
|
|
-const showInterviewSchedule = ref(false)
|
|
|
const resumeClick = async (val) => {
|
|
|
- // if (val.name === 'interview') {
|
|
|
- // await getUserInterviewInvitePageList() // 获取最新数据
|
|
|
- // showInterviewSchedule.value = true
|
|
|
- // }
|
|
|
if (val.name === 'order') router.push('/recruit/personal/tradeOrder')
|
|
|
}
|
|
|
|
|
@@ -137,50 +116,12 @@ const handleDelete = ({ id }) => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-const getBlob = (url) => {
|
|
|
- return new Promise(resolve => {
|
|
|
- const xhr = new XMLHttpRequest()
|
|
|
- xhr.open('GET', url, true)
|
|
|
- xhr.responseType = 'blob'
|
|
|
- xhr.onload = () => {
|
|
|
- if (xhr.status === 200) resolve(xhr.response)
|
|
|
- }
|
|
|
- xhr.send()
|
|
|
- })
|
|
|
-}
|
|
|
-
|
|
|
-const saveAs = (blob, filename) => {
|
|
|
- var link = document.createElement('a')
|
|
|
- link.href = window.URL.createObjectURL(blob)
|
|
|
- link.download = filename
|
|
|
- link.click()
|
|
|
-}
|
|
|
-
|
|
|
// 下载附件
|
|
|
const handleDownload = (k) => {
|
|
|
getBlob(k.url).then(blob => {
|
|
|
saveAs(blob, k.title)
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
-// 面试日程
|
|
|
-const invitePageList = ref([])
|
|
|
-const getUserInterviewInvitePageList = async () => {
|
|
|
- const res = await getUserInterviewInvitePage()
|
|
|
- invitePageList.value = res?.list.map(e => {
|
|
|
- e.job = { ...e.job, ...dealDictObjData({}, e.job) }
|
|
|
- e.enterprise = { ...e.enterprise, ...dealDictObjData({}, e.enterprise)}
|
|
|
- return e
|
|
|
- }) || []
|
|
|
- // const interview = resumeList.value.find(f => f.name === 'interview')
|
|
|
- // if (interview) interview.desc = '有' + (res?.total || '0') + '个待面试'
|
|
|
-}
|
|
|
-// getUserInterviewInvitePageList()
|
|
|
-const interviewScheduleMore = () => {
|
|
|
- showInterviewSchedule.value = false
|
|
|
- const path = route.path
|
|
|
- router.push({ path, query: { showInterviewScheduleMore: true } })
|
|
|
-}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|