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

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

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

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

Loading…
Cancel
Save