| | |
| | | |
| | | <script setup> |
| | | import { defineProps, ref, watch } from 'vue'; |
| | | import { ELocalStorageKey } from '@/types' |
| | | import { cloneDeep } from 'lodash'; |
| | | import { initDeviceSetting, initDeviceSettingFormModel, DeviceSettingKeyEnum } from '@/types/device-setting'; |
| | | import { |
| | |
| | | async function onConfirm(settingKey) { |
| | | deviceSetting.value[settingKey].popConfirm.loading = true; |
| | | const body = genDevicePropsBySettingKey(settingKey, deviceSettingFormModel.value); |
| | | console.log(body, '顶顶顶顶顶') |
| | | await setDeviceProps(props.sn, body); |
| | | localStorage.setItem(ELocalStorageKey.WorkspaceId, props.deviceInfo.workspace_id) |
| | | await setDeviceProps(props.sn, body, props.deviceInfo.workspace_id); |
| | | deviceSetting.value[settingKey].popConfirm.loading = false; |
| | | deviceSetting.value[settingKey].popConfirm.visible = false; |
| | | } |