eight
2025-04-11 106d90222ad7fb031cae93876e904e9dc8e5ce7f
src/views/ecg/devmanage/DevStatistic.vue
@@ -92,16 +92,13 @@
<script setup lang="ts">
import {getStrDictOptions, DICT_TYPE, DictDataType} from '@/utils/dict'
import {dateFormatter, dateFormatter2} from '@/utils/formatTime'
import download from '@/utils/download'
import {DeviceApi, DeviceStatisticVO, DeviceVO, DevModelApi, OptionsVO} from '@/api/ecg/devmanage'
import DeviceForm from './DeviceForm.vue'
import {DeviceApi, DeviceStatisticVO, DevModelApi, OptionsVO} from '@/api/ecg/devmanage'
/** 设备 列表 */
defineOptions({ name: 'DeviceStatistic' })
const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化
const loading = ref(true) // 列表的加载中
const list = ref<DeviceStatisticVO[]>([]) // 列表的数据
@@ -110,10 +107,10 @@
  pageSize: 10,
  purchaseDate: [],
  createTime: [],
  devId: undefined,
  category: undefined,
  brand: undefined,
  model: undefined
  devId: '',
  category: '',
  brand: '',
  model: ''
})
const queryFormRef = ref() // 搜索的表单
const exportLoading = ref(false) // 导出的加载中
@@ -148,22 +145,6 @@
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
  formRef.value.open(type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
  try {
    // 删除的二次确认
    await message.delConfirm()
    // 发起删除
    await DeviceApi.deleteDevice(id)
    message.success(t('common.delSuccess'))
    // 刷新列表
    await getList()
  } catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {