【代码优化】IoT: 场景联动注释格式统一
							parent
							
								
									279d88e729
								
							
						
					
					
						commit
						24cdcd10c1
					
				|  | @ -106,7 +106,7 @@ const actionConfig = useVModel(props, 'modelValue', emits) as Ref<ActionConfig> | |||
| 
 | ||||
| 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<InstanceType<typeof ProductTableSelect>>() | ||||
| const deviceTableSelectRef = ref<InstanceType<typeof DeviceTableSelect>>() | ||||
| const product = ref<ProductVO>() | ||||
|  | @ -181,7 +181,7 @@ const handleDeviceSelect = (val: DeviceVO[]) => { | |||
|   } | ||||
| } | ||||
| 
 | ||||
| // 监听执行类型变化,初始化对应配置 | ||||
| /** 监听执行类型变化,初始化对应配置 */ | ||||
| watch( | ||||
|   () => actionConfig.value.type, | ||||
|   () => { | ||||
|  |  | |||
|  | @ -64,7 +64,7 @@ const props = defineProps<{ modelValue: any }>() | |||
| const emits = defineEmits(['update:modelValue']) | ||||
| const alertConfig = useVModel(props, 'modelValue', emits) as Ref<ActionAlert> | ||||
| 
 | ||||
| // 初始化告警执行器结构 | ||||
| /** 初始化告警执行器结构 */ | ||||
| const initAlertConfig = () => { | ||||
|   if (!alertConfig.value) { | ||||
|     alertConfig.value = { | ||||
|  | @ -76,7 +76,7 @@ const initAlertConfig = () => { | |||
|   } | ||||
| } | ||||
| 
 | ||||
| // 初始化 | ||||
| /** 初始化 */ | ||||
| onMounted(() => { | ||||
|   initAlertConfig() | ||||
| }) | ||||
|  |  | |||
|  | @ -25,9 +25,9 @@ const props = defineProps<{ modelValue: any }>() | |||
| const emits = defineEmits(['update:modelValue']) | ||||
| const dataBridgeId = useVModel(props, 'modelValue', emits) | ||||
| 
 | ||||
| const dataBridgeList = ref<any[]>([]) // 数据桥接列表 | ||||
| const dataBridgeList = ref<any[]>([]) /** 数据桥接列表 */ | ||||
| 
 | ||||
| // 获取数据桥接列表 | ||||
| /** 获取数据桥接列表 */ | ||||
| const getDataBridgeList = async () => { | ||||
|   dataBridgeList.value = await DataBridgeApi.getSimpleDataBridgeList() | ||||
| } | ||||
|  |  | |||
|  | @ -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, | ||||
|   () => { | ||||
|  |  | |||
|  | @ -194,6 +194,7 @@ const removeConditionParameter = ( | |||
|   conditionParameters.splice(index, 1) | ||||
| } | ||||
| 
 | ||||
| /** 产品和设备选择引用 */ | ||||
| const productTableSelectRef = ref<InstanceType<typeof ProductTableSelect>>() | ||||
| const deviceTableSelectRef = ref<InstanceType<typeof DeviceTableSelect>>() | ||||
| const product = ref<ProductVO>() | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 puhui999
						puhui999