From c1e2ec17485606ba8d2d6de9520396e55248ff6d Mon Sep 17 00:00:00 2001 From: web <candymxq888@outlook.com> Date: 星期二, 25 三月 2025 17:10:50 +0800 Subject: [PATCH] feat:添加界面,接入设备数据 --- src/utils/index.js | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/utils/index.js b/src/utils/index.js index 35b043c..8994d62 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -472,4 +472,16 @@ export function isNumberStr(str) { return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str) } + +/** + * blob文件流导出 + */ +export function exportBlobFile(blob) { + const link = document.createElement('a') + const url = URL || window.webkitURL + const href = url.createObjectURL(blob) + link.href = href; + link.download = '报警记录.xlsx' + link.click() +} -- Gitblit v1.9.3