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 |   47 +++++++++++++++++------------------------------
 1 files changed, 17 insertions(+), 30 deletions(-)

diff --git a/src/views/ecg/devmanage/DevStatistic.vue b/src/views/ecg/devmanage/DevStatistic.vue
index 14c949c..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>
 <!--
@@ -79,7 +85,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>
@@ -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 () => {
@@ -216,4 +203,4 @@
 
   getList()
 })
-</script>
\ No newline at end of file
+</script>

--
Gitblit v1.9.3