eight
2025-04-15 49206ee0689d44367b9f5de3decf0c3ec02bfb51
src/views/ecg/devmanage/DevStatistic.vue
@@ -79,7 +79,7 @@
      </el-table-column>
      <el-table-column label="型号" align="center" prop="model" />
-->
      <el-table-column label="使用状态" align="center" prop="lost" >
      <el-table-column label="使用状态" align="center" prop="state" >
        <template #default="scope">
          <span>{{tranlateDevState(scope.row.state)}}</span>
        </template>
@@ -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 () => {
@@ -194,6 +175,7 @@
  brandOptions.value = data
  queryParams.brand = ''
  queryParams.model = ''
  //queryParams.brand = brandOptions.value.length === 0 ? "" : brandOptions.value[0].value
  //brandChanged()
@@ -215,4 +197,4 @@
  getList()
})
</script>
</script>