feat:采集设备列表添加导出按钮

main
黄伟杰 1 month ago
parent 1927899fc0
commit cd2172a46a

@ -15,7 +15,7 @@ const dictStore = useDictStoreWithOut()
export interface DictDataType {
dictType: string
label: string
value: string | number | boolean
value: string | number
colorType: ElementPlusInfoType | ''
cssClass: string
}

@ -314,12 +314,16 @@ const handleCopy = async (id: number) => {
/** 导出按钮操作 */
const handleExport = async () => {
if (!selectedIds.value.length) {
message.error('请选择需要导出的数据')
return
}
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await DeviceApi.exportDevice(queryParams)
const data = await DeviceApi.exportDevice({ ids: selectedIds.value.join(',') })
download.excel(data, '物联设备.xls')
} catch {
} finally {

Loading…
Cancel
Save