From 97f4e581af58ca03ff4c39210fd4b2f3ae11f8ff Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期五, 27 十一月 2026 10:35:43 +0800
Subject: [PATCH] 设备编号记录要求
---
src/views/ecg/devmanage/DevStatistic.vue | 43 +++++++++++++++----------------------------
1 files changed, 15 insertions(+), 28 deletions(-)
diff --git a/src/views/ecg/devmanage/DevStatistic.vue b/src/views/ecg/devmanage/DevStatistic.vue
index e7b435a..d8db732 100644
--- a/src/views/ecg/devmanage/DevStatistic.vue
+++ b/src/views/ecg/devmanage/DevStatistic.vue
@@ -8,10 +8,10 @@
:inline="true"
label-width="68px"
>
- <el-form-item label="鍒嗙被鍚�" prop="category">
+ <el-form-item label="璁惧鍚嶇О" prop="category">
<el-select
v-model="queryParams.category"
- placeholder="璇烽�夋嫨鍒嗙被鍚�"
+ placeholder="璇烽�夋嫨璁惧鍚嶇О"
clearable
class="!w-240px"
@change="categoryChanged"
@@ -68,7 +68,13 @@
<!-- <el-table-column label="id" align="center" prop="id" />-->
<el-table-column label="鍒嗙被鍚�" align="center" prop="category">
<template #default="scope">
- <dict-tag :type="DICT_TYPE.ECG_DEV_CATEGORY" :value="scope.row.category" />
+ <!-- 瀛楀吀鍛戒腑鏃舵樉绀烘爣绛撅紱鏈懡涓殑鍏滃簳鏄剧ず鍘熷鍚嶇О锛岄伩鍏嶆暣鏍肩┖鐧� -->
+ <dict-tag
+ v-if="getDictLabel(DICT_TYPE.ECG_DEV_CATEGORY, scope.row.category)"
+ :type="DICT_TYPE.ECG_DEV_CATEGORY"
+ :value="scope.row.category"
+ />
+ <span v-else>{{ scope.row.category }}</span>
</template>
</el-table-column>
<!--
@@ -91,17 +97,14 @@
</template>
<script setup lang="ts">
-import {getStrDictOptions, DICT_TYPE, DictDataType} from '@/utils/dict'
-import {dateFormatter, dateFormatter2} from '@/utils/formatTime'
+import {getStrDictOptions, getDictLabel, DICT_TYPE, DictDataType} from '@/utils/dict'
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 +113,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 +151,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 () => {
--
Gitblit v1.9.3