Merge branch 'dev' of github.com:jetlinks/jetlinks-ui-vue into dev
This commit is contained in:
commit
d3bdbe8909
|
@ -97,7 +97,7 @@ export const _import = (configId: any, params: any) => server.get(`/network/card
|
||||||
* @param format 类型 xlsx、csv
|
* @param format 类型 xlsx、csv
|
||||||
* @param params
|
* @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
|
* 验证iccid
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<page-container
|
<page-container
|
||||||
:tabList="list"
|
:tabList="list"
|
||||||
@back="onBack"
|
@back="onBack"
|
||||||
:tabActiveKey="productStore.active"
|
:tabActiveKey="productStore.tabActiveKey"
|
||||||
@tabChange="onTabChange"
|
@tabChange="onTabChange"
|
||||||
>
|
>
|
||||||
<template #title>
|
<template #title>
|
||||||
|
|
|
@ -45,8 +45,9 @@ const handleOk = () => {
|
||||||
console.log(props.data);
|
console.log(props.data);
|
||||||
_export(type.value, props.data).then((res: any) => {
|
_export(type.value, props.data).then((res: any) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
const blob = new Blob([res.data], { type: type.value });
|
const blob = new Blob([res], { type: type.value });
|
||||||
const url = URL.createObjectURL(blob);
|
const url = URL.createObjectURL(blob);
|
||||||
|
console.log(url);
|
||||||
downloadFileByUrl(
|
downloadFileByUrl(
|
||||||
url,
|
url,
|
||||||
`物联卡管理-${moment(new Date()).format(
|
`物联卡管理-${moment(new Date()).format(
|
||||||
|
|
Loading…
Reference in New Issue