招聘管理下载简历

main
lijingyu007 7 months ago
parent f517dfe4e4
commit 46e5444eeb
  1. 1
      package.json
  2. 11
      src/api/job/index.js
  3. 11
      src/page/personalpage/jobm/jobuser.vue

@ -13,6 +13,7 @@
"babel-polyfill": "^6.26.0",
"crypto-js": "^4.2.0",
"element-ui": "^2.15.6",
"file-saver": "^2.0.4",
"jquery": "^3.6.0",
"mint-ui": "^2.2.9",
"nprogress": "^0.2.0",

@ -64,4 +64,13 @@ export function jobHuntDetail(id) {
url: '/job/myHuntJobs/' + id,
method: 'get',
})
}
}
// 下载简历
export function downloadPdf(id) {
return request({
url: '/personal/download/resume/' + id,
method: 'get',
responseType: 'blob',
})
}

@ -20,7 +20,7 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="260">
<template slot-scope="scope">
<el-button type="text" @click="jlDetail(scope.row)"> 查看简历 </el-button>
<el-button type="text"> 下载简历 </el-button>
<el-button type="text" @click="downLj(scope.row)"> 下载简历 </el-button>
</template>
</el-table-column>
</el-table>
@ -39,7 +39,8 @@
</template>
<script>
import { mapGetters } from 'vuex'
import { jobHuntDetail } from '@/api/job'
import { jobHuntDetail, downloadPdf } from '@/api/job'
import { saveAs } from 'file-saver'
export default {
data() {
return {
@ -80,6 +81,12 @@ export default {
backlist() {
this.$router.push('/console/jobM')
},
downLj(row) {
downloadPdf(row.user_id).then((res) => {
const blob = new Blob([res])
saveAs(blob, row.nick_name + '简历.pdf')
})
},
},
}
</script>

Loading…
Cancel
Save