|
|
|
@ -12,8 +12,9 @@
|
|
|
|
|
import XEUtils from 'xe-utils'
|
|
|
|
|
import { EventBus } from '@/event-bus.js'
|
|
|
|
|
import paoWanPgdConfig from "@/views/zyjhzx/pwanpgong/comps/pgdTable";
|
|
|
|
|
import {getDw, pwpg} from "@/api/zyjh";
|
|
|
|
|
import {exportPW, getDw, pwpg} from "@/api/zyjh";
|
|
|
|
|
import * as XLSX from 'xlsx'
|
|
|
|
|
import axios from 'axios'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name:'PwanSgd',
|
|
|
|
@ -55,9 +56,20 @@ export default {
|
|
|
|
|
worker:this.$props.worker().userCode,
|
|
|
|
|
list:this.gridOptions.data,
|
|
|
|
|
}
|
|
|
|
|
// aa(data).then(()=>{
|
|
|
|
|
//
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
axios.post(`${process.env.VUE_APP_BASE_API}/pgdSljh/exportPW`,data,{responseType:'blob'})
|
|
|
|
|
.then(response => {
|
|
|
|
|
const url = window.URL.createObjectURL(new Blob([response.data]));
|
|
|
|
|
const link = document.createElement('a');
|
|
|
|
|
link.href = url;
|
|
|
|
|
link.setAttribute('download', `打码导出${XEUtils.toDateString(new Date(),'yyyyMMdd')}.xlsx`);
|
|
|
|
|
document.body.appendChild(link);
|
|
|
|
|
link.click();
|
|
|
|
|
})
|
|
|
|
|
.catch(error => {
|
|
|
|
|
console.error(error);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
pwpg(data).then(res=>{
|
|
|
|
|
if (res.success){
|
|
|
|
|
this.export()
|
|
|
|
|