【代码评审】IoT:数据桥梁的接入

This commit is contained in:
YunaiV
2025-03-16 23:44:56 +08:00
parent 79507aef6d
commit c87ed7fe17
12 changed files with 52 additions and 39 deletions

View File

@ -83,7 +83,7 @@ import {
RocketMQConfigForm
} from './config'
/** IoT 数据桥梁 表单 */
/** IoT 数据桥梁表单 */
defineOptions({ name: 'IoTDataBridgeForm' })
const { t } = useI18n() // 国际化
@ -95,8 +95,8 @@ const formLoading = ref(false) // 表单的加载中1修改时的数据加
const formType = ref('') // 表单的类型create - 新增update - 修改
const formData = ref<DataBridgeVO>({
status: 0,
direction: 1,
type: 1,
direction: 1, // TODO @puhui999:枚举类
type: 1, // TODO @puhui999:枚举类
config: {} as any
})
const formRules = reactive({

View File

@ -49,7 +49,7 @@ const fullUrl = computed(() => {
return urlPath.value ? urlPrefix.value + urlPath.value : ''
})
/** 监听URL变化 */
/** 监听 URL 变化 */
watch([urlPrefix, urlPath], () => {
config.value.url = fullUrl.value
})
@ -57,7 +57,7 @@ watch([urlPrefix, urlPath], () => {
/** 组件初始化 */
onMounted(() => {
if (!isEmpty(config.value)) {
// 初始化URL
// 初始化 URL
if (config.value.url) {
if (config.value.url.startsWith('https://')) {
urlPrefix.value = 'https://'

View File

@ -1,3 +1,4 @@
<!-- TODO @puhui999去掉 MQ 关键字哈 -->
<template>
<el-form-item label="主机地址" prop="config.host">
<el-input v-model="config.host" placeholder="请输入主机地址localhost" />