田源
2023-07-26 9675f1491ef23c4c6f69cb83cbf6de3fd6dac61b
Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
@@ -132,8 +132,32 @@
            exportArr[`attrIdIndexMap[${index}]`] = item
          })
          exportCode({codeClassifyOid:this.codeClassifyOid,'conditionMap[oid]':ids,...exportArr}).then(res=>{
            console.log(res)
            console.log('res',res)
            const filename = '下载.xlsx'; // 下载的文件名
            const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' });
            const a = document.createElement('a');
            const url = window.URL.createObjectURL(blob);
            a.href = url;
            a.download = filename;
            a.style.display = 'none';
            document.body.appendChild(a);
            a.click();
            document.body.removeChild(a);
            window.URL.revokeObjectURL(url);
            // const filename = '下载.xlsx'; // 下载的文件名
            // const blob = new Blob([response.data], { type: 'application/vnd.ms-excel' });
            //
            // const url = window.URL.createObjectURL(blob);
            // const link = document.createElement('a');
            // link.href = url;
            // link.setAttribute('download', filename);
            // document.body.appendChild(link);
            // link.click();
            // document.body.removeChild(link);
            // URL.revokeObjectURL(url);
          })
        }
      };
    },