|
|
|
@ -60,7 +60,7 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import {getAction} from "@api/manage" |
|
|
|
|
import {downloadFile, getAction} from "@api/manage" |
|
|
|
|
import store from '@/store' |
|
|
|
|
import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
|
|
|
|
import {mixinDevice} from '@/utils/mixin' |
|
|
|
@ -85,6 +85,7 @@ export default { |
|
|
|
|
status: '判断文件结构', |
|
|
|
|
}, |
|
|
|
|
form: this.$form.createForm(this), |
|
|
|
|
downName:'', |
|
|
|
|
url: |
|
|
|
|
{ |
|
|
|
|
downfile: '', |
|
|
|
@ -125,18 +126,20 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 下载标准文档 |
|
|
|
|
handleDownload() { |
|
|
|
|
console.log(this.downName,"111") |
|
|
|
|
downloadFile( this.url.downfile,this.downName) |
|
|
|
|
// getAction(this.url.list, params).then((res) => |
|
|
|
|
getAction(this.url.downfile).then((response) => { |
|
|
|
|
const url = window.URL.createObjectURL(new Blob([response.data])) |
|
|
|
|
const link = document.createElement('a') |
|
|
|
|
link.href = url |
|
|
|
|
link.setAttribute('download', 'your-document.pdf') |
|
|
|
|
document.body.appendChild(link) |
|
|
|
|
link.click() |
|
|
|
|
}) |
|
|
|
|
.catch(error => { |
|
|
|
|
console.error(error) |
|
|
|
|
}) |
|
|
|
|
// getAction(this.url.downfile).then((response) => { |
|
|
|
|
// const url = window.URL.createObjectURL(new Blob([response.data])) |
|
|
|
|
// const link = document.createElement('a') |
|
|
|
|
// link.href = url |
|
|
|
|
// link.setAttribute('download', 'your-document.pdf') |
|
|
|
|
// document.body.appendChild(link) |
|
|
|
|
// link.click() |
|
|
|
|
// }) |
|
|
|
|
// .catch(error => { |
|
|
|
|
// console.error(error) |
|
|
|
|
// }) |
|
|
|
|
}, |
|
|
|
|
add() { |
|
|
|
|
|
|
|
|
@ -144,6 +147,7 @@ export default { |
|
|
|
|
show(data,ws) { |
|
|
|
|
this.url.uploadUrl = data.uploadUrl |
|
|
|
|
this.url.downfile = data.downUrl |
|
|
|
|
this.downName = data.downName |
|
|
|
|
this.datas = data.note |
|
|
|
|
this.title = data.title |
|
|
|
|
this.ModalData = {} |
|
|
|
|