监管端上传委托书功能
parent
681fc3b5cb
commit
a372a7b0e0
|
@ -0,0 +1,16 @@
|
|||
export default async function useDownloadFile(url) {
|
||||
if (!url) throw new Error('没有下载地址')
|
||||
fetch(config.fileUrl + url)
|
||||
.then((res) => res.blob())
|
||||
.then((blob) => {
|
||||
const a = document.createElement('a')
|
||||
document.body.appendChild(a)
|
||||
a.style.display = 'none'
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
a.href = url
|
||||
a.download = url.substring(url.lastIndexOf('/') + 1)
|
||||
a.click()
|
||||
document.body.removeChild(a)
|
||||
window.URL.revokeObjectURL(url)
|
||||
})
|
||||
}
|
|
@ -137,6 +137,22 @@
|
|||
<td>{{ formatLabel(userDetailForm.ISFLOW) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div v-if="userDetailForm.ANNEX" style="padding-bottom: 10px">
|
||||
<div class="level-title">
|
||||
<h1>承诺书</h1>
|
||||
</div>
|
||||
<div>
|
||||
<el-button icon="el-icon-download" type="primary" @click = "download(userDetailForm.ANNEX)">下载附件</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="userDetailForm.ATTORNEY" style="padding-bottom: 10px">
|
||||
<div class="level-title">
|
||||
<h1>委托书</h1>
|
||||
</div>
|
||||
<div>
|
||||
<el-button icon="el-icon-download" type="primary" @click = "download(userDetailForm.ATTORNEY)">下载附件</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="level-title">
|
||||
<h1>培训记录</h1>
|
||||
|
@ -317,6 +333,7 @@
|
|||
import vueQr from 'vue-qr'
|
||||
import dateformat from '@/utils/dateformat'
|
||||
import { requestFN } from '@/utils/request'
|
||||
import useDownloadFile from '../../../../utils/useDownloadFile'
|
||||
|
||||
export default {
|
||||
components: { vueQr },
|
||||
|
@ -401,6 +418,9 @@ export default {
|
|||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
download(item) {
|
||||
useDownloadFile(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue