From 5119b69fdafd369085c699cfbda06532099db835 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Mon, 01 Sep 2025 19:11:48 +0800
Subject: [PATCH] feat:更新设备管理和注册管理

---
 src/views/device/components/DeviceSettingBox.vue |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/views/device/components/DeviceSettingBox.vue b/src/views/device/components/DeviceSettingBox.vue
index 92a4b44..1b25451 100644
--- a/src/views/device/components/DeviceSettingBox.vue
+++ b/src/views/device/components/DeviceSettingBox.vue
@@ -312,7 +312,7 @@
 </template>
 
 <script setup>
-import { defineProps, ref, watch } from 'vue';
+import { defineProps, inject, ref, watch } from 'vue';
 import { ELocalStorageKey } from '@/types'
 import { cloneDeep } from 'lodash';
 import { initDeviceSetting, initDeviceSettingFormModel, DeviceSettingKeyEnum } from '@/types/device-setting';
@@ -326,16 +326,19 @@
 // const props = defineProps();
 const props = defineProps(['sn', 'deviceInfo'])
 
-const deviceSetting = ref(cloneDeep(initDeviceSetting));
-const deviceSettingFormModelFromOsd = ref(cloneDeep(initDeviceSettingFormModel));
+// const deviceSetting = ref(cloneDeep(initDeviceSetting));
+// const deviceSettingFormModelFromOsd = ref(cloneDeep(initDeviceSettingFormModel));
 const deviceSettingFormModel = ref(cloneDeep(initDeviceSettingFormModel)); // 真实使用的formModel
 
+const deviceSetting = inject('deviceSetting')
+const deviceSettingFormModelFromOsd = inject('deviceSettingFormModelFromOsd')
 // 根据设备osd信息更新信息
 watch(
   () => props.deviceInfo,
   value => {
-    updateDeviceSettingInfoByOsd(deviceSetting.value, value);
-    updateDeviceSettingFormModelByOsd(deviceSettingFormModelFromOsd.value, value);
+    // console.log('9999',value)
+    // updateDeviceSettingInfoByOsd(deviceSetting, value);
+    // updateDeviceSettingFormModelByOsd(deviceSettingFormModelFromOsd, value);
     // console.log('deviceInfo', value)
   },
   {

--
Gitblit v1.9.3