Merge branch 'dev' of github.com:jetlinks/jetlinks-ui-vue into dev

This commit is contained in:
JiangQiming 2023-02-20 16:54:44 +08:00
commit d3bdbe8909
3 changed files with 4 additions and 3 deletions

View File

@ -97,7 +97,7 @@ export const _import = (configId: any, params: any) => server.get(`/network/card
* @param format xlsxcsv
* @param params
*/
export const _export = (format: string, data: any) => server.post(`/network/card/download.${format}/_query`, data, 'blob');
export const _export = (format: string, data: any) => server.post(`/network/card/download.${format}/_query`, data, { responseType: 'blob' });
/**
* iccid

View File

@ -2,7 +2,7 @@
<page-container
:tabList="list"
@back="onBack"
:tabActiveKey="productStore.active"
:tabActiveKey="productStore.tabActiveKey"
@tabChange="onTabChange"
>
<template #title>

View File

@ -45,8 +45,9 @@ const handleOk = () => {
console.log(props.data);
_export(type.value, props.data).then((res: any) => {
if (res) {
const blob = new Blob([res.data], { type: type.value });
const blob = new Blob([res], { type: type.value });
const url = URL.createObjectURL(blob);
console.log(url);
downloadFileByUrl(
url,
`物联卡管理-${moment(new Date()).format(