From 24cdcd10c1f56788d9f026a814207076783a62d7 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 29 Mar 2025 13:04:50 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91IoT:=20=E5=9C=BA=E6=99=AF=E8=81=94=E5=8A=A8=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E6=A0=BC=E5=BC=8F=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/rule/scene/components/action/ActionExecutor.vue | 6 +++--- src/views/iot/rule/scene/components/action/AlertAction.vue | 4 ++-- .../iot/rule/scene/components/action/DataBridgeAction.vue | 4 ++-- .../rule/scene/components/action/DeviceControlAction.vue | 6 +++--- .../iot/rule/scene/components/listener/DeviceListener.vue | 1 + 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/views/iot/rule/scene/components/action/ActionExecutor.vue b/src/views/iot/rule/scene/components/action/ActionExecutor.vue index 79b2409a2..83cc99f1b 100644 --- a/src/views/iot/rule/scene/components/action/ActionExecutor.vue +++ b/src/views/iot/rule/scene/components/action/ActionExecutor.vue @@ -106,7 +106,7 @@ const actionConfig = useVModel(props, 'modelValue', emits) as Ref const message = useMessage() -// 初始化执行器结构 +/** 初始化执行器结构 */ const initActionConfig = () => { if (!actionConfig.value) { actionConfig.value = { type: IotRuleSceneActionTypeEnum.DEVICE_CONTROL } as ActionConfig @@ -140,7 +140,7 @@ const initActionConfig = () => { } } -// 产品和设备选择 +/** 产品和设备选择 */ const productTableSelectRef = ref>() const deviceTableSelectRef = ref>() const product = ref() @@ -181,7 +181,7 @@ const handleDeviceSelect = (val: DeviceVO[]) => { } } -// 监听执行类型变化,初始化对应配置 +/** 监听执行类型变化,初始化对应配置 */ watch( () => actionConfig.value.type, () => { diff --git a/src/views/iot/rule/scene/components/action/AlertAction.vue b/src/views/iot/rule/scene/components/action/AlertAction.vue index 5e4d7695d..1dcebd61c 100644 --- a/src/views/iot/rule/scene/components/action/AlertAction.vue +++ b/src/views/iot/rule/scene/components/action/AlertAction.vue @@ -64,7 +64,7 @@ const props = defineProps<{ modelValue: any }>() const emits = defineEmits(['update:modelValue']) const alertConfig = useVModel(props, 'modelValue', emits) as Ref -// 初始化告警执行器结构 +/** 初始化告警执行器结构 */ const initAlertConfig = () => { if (!alertConfig.value) { alertConfig.value = { @@ -76,7 +76,7 @@ const initAlertConfig = () => { } } -// 初始化 +/** 初始化 */ onMounted(() => { initAlertConfig() }) diff --git a/src/views/iot/rule/scene/components/action/DataBridgeAction.vue b/src/views/iot/rule/scene/components/action/DataBridgeAction.vue index 8a4f35aad..c429a073f 100644 --- a/src/views/iot/rule/scene/components/action/DataBridgeAction.vue +++ b/src/views/iot/rule/scene/components/action/DataBridgeAction.vue @@ -25,9 +25,9 @@ const props = defineProps<{ modelValue: any }>() const emits = defineEmits(['update:modelValue']) const dataBridgeId = useVModel(props, 'modelValue', emits) -const dataBridgeList = ref([]) // 数据桥接列表 +const dataBridgeList = ref([]) /** 数据桥接列表 */ -// 获取数据桥接列表 +/** 获取数据桥接列表 */ const getDataBridgeList = async () => { dataBridgeList.value = await DataBridgeApi.getSimpleDataBridgeList() } diff --git a/src/views/iot/rule/scene/components/action/DeviceControlAction.vue b/src/views/iot/rule/scene/components/action/DeviceControlAction.vue index 710ac6ecb..1b15cc43b 100644 --- a/src/views/iot/rule/scene/components/action/DeviceControlAction.vue +++ b/src/views/iot/rule/scene/components/action/DeviceControlAction.vue @@ -111,7 +111,7 @@ watch( { deep: true } ) -// 初始化设备控制执行器结构 +/** 初始化设备控制执行器结构 */ const initDeviceControlConfig = () => { if (!deviceControlConfig.value) { deviceControlConfig.value = { @@ -177,7 +177,7 @@ const getUnitName = computed(() => (identifier: string) => { return '' }) -// 监听 productId 变化 +/** 监听 productId 变化 */ watch( () => props.productId, (newVal) => { @@ -193,7 +193,7 @@ watch( { immediate: true } ) -// 监听消息类型变化 +/** 监听消息类型变化 */ watch( () => deviceControlConfig.value.type, () => { diff --git a/src/views/iot/rule/scene/components/listener/DeviceListener.vue b/src/views/iot/rule/scene/components/listener/DeviceListener.vue index 6595033ce..36c55b780 100644 --- a/src/views/iot/rule/scene/components/listener/DeviceListener.vue +++ b/src/views/iot/rule/scene/components/listener/DeviceListener.vue @@ -194,6 +194,7 @@ const removeConditionParameter = ( conditionParameters.splice(index, 1) } +/** 产品和设备选择引用 */ const productTableSelectRef = ref>() const deviceTableSelectRef = ref>() const product = ref()