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