|
|
|
@ -115,6 +115,7 @@
|
|
|
|
|
<el-button type="danger" icon="el-icon-download" @click="handleExportInfo" plain |
|
|
|
|
>导出 |
|
|
|
|
</el-button> |
|
|
|
|
<!-- v-loading.fullscreen.lock="fullscreenLoading"--> |
|
|
|
|
<el-button type="danger" icon="el-icon-picture" @click="handlePictureInfo" plain |
|
|
|
|
>导出图片 |
|
|
|
|
</el-button> |
|
|
|
@ -215,9 +216,29 @@
|
|
|
|
|
</span> |
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog |
|
|
|
|
title="提示" |
|
|
|
|
v-model="dialogVisible" |
|
|
|
|
width="15%" |
|
|
|
|
:before-close="handleClose"> |
|
|
|
|
<div align="center"> |
|
|
|
|
<el-progress type="circle" :percentage="fileSize" status="success"></el-progress> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button @click="dialogVisible = false">取 消</el-button> |
|
|
|
|
<el-button type="primary" @click="dialogVisible = false">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</basic-container> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<edittablehead |
|
|
|
|
@setcolum="setnewcolum" |
|
|
|
|
@closce="showdrawer" |
|
|
|
@ -572,6 +593,7 @@ export default {
|
|
|
|
|
// 更多列的配置... |
|
|
|
|
], |
|
|
|
|
columnListedit: [], |
|
|
|
|
dialogVisible: false, |
|
|
|
|
drawerShow: false, |
|
|
|
|
height: 0, |
|
|
|
|
// 弹框标题 |
|
|
|
@ -592,6 +614,7 @@ export default {
|
|
|
|
|
signingStatusData: [], |
|
|
|
|
//业务类型 |
|
|
|
|
deliveryTypeData: [], |
|
|
|
|
fullscreenLoading:false, |
|
|
|
|
//来源 |
|
|
|
|
orderSourceData: [], |
|
|
|
|
// 分页信息 |
|
|
|
@ -609,6 +632,7 @@ export default {
|
|
|
|
|
// 表单列表 |
|
|
|
|
data: [], |
|
|
|
|
driverData: [], |
|
|
|
|
fileSize:0, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
@ -722,6 +746,9 @@ export default {
|
|
|
|
|
// if (!!this.ids) { |
|
|
|
|
// row.ids = this.ids; |
|
|
|
|
// } |
|
|
|
|
// const h = this.$createElement; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log("this.selectionList>>>>>>>>>>",this.selectionList); |
|
|
|
|
if (this.selectionList.length < 1){ |
|
|
|
|
this.$message({ |
|
|
|
@ -729,16 +756,69 @@ export default {
|
|
|
|
|
message: '请选择签收记录!', |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
const idList= this.selectionList.map(item=>{ |
|
|
|
|
return item.id |
|
|
|
|
}) |
|
|
|
|
console.log(idList); |
|
|
|
|
const ids = idList.join(','); |
|
|
|
|
console.log("ids>>>>>>>>>>>>",ids); |
|
|
|
|
handlePicture(ids).then(res=>{ |
|
|
|
|
console.log("res><>>>>>>>>>>>>>",res); |
|
|
|
|
|
|
|
|
|
const idList= this.selectionList.map(item=>{ |
|
|
|
|
console.log('>>>>>>>>>',item); |
|
|
|
|
return{id:item.id,reservationCode:item.reservationCode,client:item.consignee} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const _arr = []; |
|
|
|
|
console.log(idList); |
|
|
|
|
if (idList.length > 0){ |
|
|
|
|
// this.fullscreenLoading = true; |
|
|
|
|
// this.dialogVisible = true; |
|
|
|
|
|
|
|
|
|
idList.forEach(item=>{ |
|
|
|
|
return _arr.push(handlePicture(item.id)); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log('arr>>>>>>>>>>>>>>>>>>>>',_arr); |
|
|
|
|
function delayedTimer() { |
|
|
|
|
console.log('Delayed timer executed!'); |
|
|
|
|
} |
|
|
|
|
const timerId = setTimeout(delayedTimer, 500); |
|
|
|
|
Promise.all(_arr).then((response)=>{ |
|
|
|
|
|
|
|
|
|
console.log('response>>>>>>>>>>>>>>>>>>>>>',response); |
|
|
|
|
response.forEach((res, index) =>{ |
|
|
|
|
console.log('res>>>>>>>>>>>>>>>>>>>>>',res.data); |
|
|
|
|
if (res.data.size > 0){ |
|
|
|
|
const _item = idList[index]; |
|
|
|
|
const blob = new Blob([res.data], {type: 'application/zip'}); |
|
|
|
|
let a = document.createElement("a"); |
|
|
|
|
a.href = window.URL.createObjectURL(blob); |
|
|
|
|
// a.href = 'http://192.168.10.25:2888/D:/Test'; |
|
|
|
|
a.download = _item.client +'-'+_item.reservationCode +".zip"; |
|
|
|
|
// a.download = 'aaa' + ".zip"; |
|
|
|
|
a.style.display = "none"; |
|
|
|
|
document.body.appendChild(a); |
|
|
|
|
a.click(); // 模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了 |
|
|
|
|
a.remove(); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
for (let i = 0; i < 100; i++) { |
|
|
|
|
this.fileSize = i; |
|
|
|
|
} |
|
|
|
|
// this.dialogVisible = false; |
|
|
|
|
setTimeout(() => { |
|
|
|
|
clearTimeout(timerId); |
|
|
|
|
console.log('延迟执行完成'); |
|
|
|
|
this.fullscreenLoading = false; |
|
|
|
|
|
|
|
|
|
this.$notify({ |
|
|
|
|
title: '提示', |
|
|
|
|
message: ('i', { style: 'color: teal'}, '开始下载...') |
|
|
|
|
}); |
|
|
|
|
}, 3000); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 在 3 秒之后,自动清除定时器 |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// row.signingStatus = '2'; |
|
|
|
|
// row = { ...row, ...this.query }; |
|
|
|
@ -748,6 +828,7 @@ export default {
|
|
|
|
|
// downloadXls(res.data, '签收数据.xlsx'); |
|
|
|
|
// }); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
showdrawer(value) { |
|
|
|
|
this.drawerShow = value; |
|
|
|
|
}, |
|
|
|
|