|
@@ -11,7 +11,7 @@
|
|
|
<div style="height: calc(100% - 80px);">
|
|
|
{{works}}
|
|
|
|
|
|
- <el-button type="primary" @click="departFreemarker">离职证明</el-button>
|
|
|
+ <el-button type="primary" @click="toHref()">离职证明下载</el-button>
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
@@ -23,22 +23,48 @@
|
|
|
|
|
|
<script>
|
|
|
import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
|
|
|
+ import departRegistrationService from '@/api/human/depart/DepartRegistrationService'
|
|
|
+ import OSSSerivce, {
|
|
|
+ toHrefByUrlAndName
|
|
|
+ } from '@/api/sys/OSSService'
|
|
|
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
- works: '',
|
|
|
+ dimissionProveUrl: '',
|
|
|
+ fileName: '',
|
|
|
handoverId: '',
|
|
|
+ works: '',
|
|
|
visible: false,
|
|
|
loading: false,
|
|
|
isAdmin: false,
|
|
|
}
|
|
|
},
|
|
|
+ created () {
|
|
|
+ this.ossService = new OSSSerivce()
|
|
|
+ },
|
|
|
+
|
|
|
methods: {
|
|
|
init (works,handoverId) {
|
|
|
this.visible = true
|
|
|
this.works = works
|
|
|
this.handoverId = handoverId
|
|
|
+ this.visible = true
|
|
|
+ this.loading = false
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.loading = true
|
|
|
+ console.log(this.handoverId)
|
|
|
+ departRegistrationService.getByHandoverId(this.handoverId).then((data) => {
|
|
|
+ this.dimissionProveUrl = data.dimissionProveUrl
|
|
|
+ this.fileName = data.name + "离职证明"
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ toHref () {
|
|
|
+ console.log(this.dimissionProveUrl)
|
|
|
+ console.log(this.fileName)
|
|
|
+ toHrefByUrlAndName(this.dimissionProveUrl,this.fileName)
|
|
|
},
|
|
|
close () {
|
|
|
this.visible = false
|