【代码评审】IoT:数据桥梁的接入
This commit is contained in:
@ -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({
|
||||
|
||||
@ -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://'
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
<!-- TODO @puhui999:去掉 MQ 关键字哈 -->
|
||||
<template>
|
||||
<el-form-item label="主机地址" prop="config.host">
|
||||
<el-input v-model="config.host" placeholder="请输入主机地址,如:localhost" />
|
||||
|
||||
Reference in New Issue
Block a user