This commit is contained in:
sjl
2024-11-07 15:13:53 +08:00
parent 1ec486a42d
commit 0ca2baa44a
4 changed files with 50 additions and 23 deletions

View File

@@ -42,6 +42,7 @@ import deviceDataList from '@/api/device/deviceData'
import { useDictStore } from '@/stores/modules/dict'
import { getPqDevList, deletePqDev, exportPqDev, importPqDev } from '@/api/device/device.ts'
import { reactive, ref } from 'vue'
import { ElMessageBox } from 'element-plus'
const dictStore = useDictStore()
// ProTable 实例
@@ -134,18 +135,33 @@ const openDialog = (titleType: string, row: Partial<Device.ResPqDev> = {}) => {
}
// 批量删除字典类型
// 批量删除设备
const batchDelete = async (id: string[]) => {
await useHandleData(deletePqDev, id, '删除所选设备')
proTable.value?.clearSelection()
proTable.value?.getTableList()
}
// 删除字典类型
// 删除设备
const handleDelete = async (params: Device.ResPqDev) => {
await useHandleData(deletePqDev, [params.id], `删除【${params.name}】设备`)
proTable.value?.getTableList()
}
// 导出设备
const downloadFile = async () => {
ElMessageBox.confirm('确认导出被检设备?', '温馨提示', { type: 'warning' }).then(() =>
useDownload(exportPqDev, '被检设备导出数据', proTable.value?.searchParam, false,'.xls'),
)
}
//导入设备
const importFile = () => {
ElMessageBox.confirm('确认批量导入被检设备?', '温馨提示', { type: 'warning' }).then(() =>
)
}
</script>