|
|
@@ -243,42 +243,13 @@ export default {
|
|
|
this.$refs.selOrder.init();
|
|
|
});
|
|
|
},
|
|
|
- async down(info){
|
|
|
- let imgUrl = ''
|
|
|
- let name = ''
|
|
|
- await this.$service.order.down({ id:info.id }).then(data => {
|
|
|
- imgUrl = data.url
|
|
|
- name = data.name
|
|
|
- });
|
|
|
- console.log(imgUrl)
|
|
|
- const response = await fetch(imgUrl)
|
|
|
- const blob = await response.blob()
|
|
|
- const url = window.URL.createObjectURL(blob)
|
|
|
- const link = document.createElement('a')
|
|
|
- link.href = url
|
|
|
- link.download = name
|
|
|
- document.body.appendChild(link)
|
|
|
- link.click()
|
|
|
- document.body.removeChild(link)
|
|
|
- window.URL.revokeObjectURL(url)
|
|
|
+ down(info){
|
|
|
+ let imgFile = this.$service.order.down(info.id)
|
|
|
+ location.href = imgFile
|
|
|
},
|
|
|
- async allDown(){
|
|
|
- let imgUrl = ''
|
|
|
- let name = ''
|
|
|
- await this.$service.order.allDown({ id:info.id }).then(data => {
|
|
|
- imgUrl = data.url
|
|
|
- name = data.name
|
|
|
- })
|
|
|
- const response = await fetch(imgUrl)
|
|
|
- const blob = await response.blob()
|
|
|
- const url = window.URL.createObjectURL(blob)
|
|
|
- const link = document.createElement('a')
|
|
|
- link.href = url
|
|
|
- link.download = name
|
|
|
- document.body.appendChild(link)
|
|
|
- link.click()
|
|
|
- document.body.removeChild(link)
|
|
|
- window.URL.revokeObjectURL(url)
|
|
|
+ allDown(info){
|
|
|
+ let imgFile = this.$service.order.allDown(info.id)
|
|
|
+ location.href = imgFile
|
|
|
},
|
|
|
detailShowFn(item) {
|
|
|
this.optionData = item;
|