【功能完善】IoT: 数据桥梁配置编辑回显
This commit is contained in:
parent
b95cac2e70
commit
2fd3422c06
@ -61,7 +61,7 @@ export const useAppStore = defineStore('app', {
|
|||||||
tagsView: true, // 标签页
|
tagsView: true, // 标签页
|
||||||
tagsViewImmerse: false, // 标签页沉浸
|
tagsViewImmerse: false, // 标签页沉浸
|
||||||
tagsViewIcon: true, // 是否显示标签图标
|
tagsViewIcon: true, // 是否显示标签图标
|
||||||
logo: false, // logo
|
logo: true, // logo
|
||||||
fixedHeader: true, // 固定toolheader
|
fixedHeader: true, // 固定toolheader
|
||||||
footer: true, // 显示页脚
|
footer: true, // 显示页脚
|
||||||
greyMode: false, // 是否开始灰色模式,用于特殊悼念日
|
greyMode: false, // 是否开始灰色模式,用于特殊悼念日
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { HttpConfig, IoTDataBridgeConfigType } from '@/api/iot/rule/databridge'
|
import { HttpConfig, IoTDataBridgeConfigType } from '@/api/iot/rule/databridge'
|
||||||
import { useVModel } from '@vueuse/core'
|
import { useVModel } from '@vueuse/core'
|
||||||
|
import { isEmpty } from '@/utils/is'
|
||||||
|
|
||||||
defineOptions({ name: 'HttpConfigForm' })
|
defineOptions({ name: 'HttpConfigForm' })
|
||||||
|
|
||||||
@ -47,6 +48,9 @@ const queryStr = ref('{}')
|
|||||||
|
|
||||||
/** 组件初始化 */
|
/** 组件初始化 */
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
if (!isEmpty(config.value)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
config.value = {
|
config.value = {
|
||||||
type: IoTDataBridgeConfigType.HTTP,
|
type: IoTDataBridgeConfigType.HTTP,
|
||||||
url: '',
|
url: '',
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { IoTDataBridgeConfigType, KafkaMQConfig } from '@/api/iot/rule/databridge'
|
import { IoTDataBridgeConfigType, KafkaMQConfig } from '@/api/iot/rule/databridge'
|
||||||
import { useVModel } from '@vueuse/core'
|
import { useVModel } from '@vueuse/core'
|
||||||
|
import { isEmpty } from '@/utils/is'
|
||||||
|
|
||||||
defineOptions({ name: 'KafkaMQConfigForm' })
|
defineOptions({ name: 'KafkaMQConfigForm' })
|
||||||
|
|
||||||
@ -29,6 +30,9 @@ const config = useVModel(props, 'modelValue', emit) as Ref<KafkaMQConfig>
|
|||||||
|
|
||||||
/** 组件初始化 */
|
/** 组件初始化 */
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
if (!isEmpty(config.value)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
config.value = {
|
config.value = {
|
||||||
type: IoTDataBridgeConfigType.KAFKA,
|
type: IoTDataBridgeConfigType.KAFKA,
|
||||||
bootstrapServers: '',
|
bootstrapServers: '',
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { IoTDataBridgeConfigType, MqttConfig } from '@/api/iot/rule/databridge'
|
import { IoTDataBridgeConfigType, MqttConfig } from '@/api/iot/rule/databridge'
|
||||||
import { useVModel } from '@vueuse/core'
|
import { useVModel } from '@vueuse/core'
|
||||||
|
import { isEmpty } from '@/utils/is'
|
||||||
|
|
||||||
defineOptions({ name: 'MqttConfigForm' })
|
defineOptions({ name: 'MqttConfigForm' })
|
||||||
|
|
||||||
@ -29,6 +30,9 @@ const config = useVModel(props, 'modelValue', emit) as Ref<MqttConfig>
|
|||||||
|
|
||||||
/** 组件初始化 */
|
/** 组件初始化 */
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
if (!isEmpty(config.value)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
config.value = {
|
config.value = {
|
||||||
type: IoTDataBridgeConfigType.MQTT,
|
type: IoTDataBridgeConfigType.MQTT,
|
||||||
url: '',
|
url: '',
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { IoTDataBridgeConfigType, RabbitMQConfig } from '@/api/iot/rule/databridge'
|
import { IoTDataBridgeConfigType, RabbitMQConfig } from '@/api/iot/rule/databridge'
|
||||||
import { useVModel } from '@vueuse/core'
|
import { useVModel } from '@vueuse/core'
|
||||||
|
import { isEmpty } from '@/utils/is'
|
||||||
|
|
||||||
defineOptions({ name: 'RabbitMQConfigForm' })
|
defineOptions({ name: 'RabbitMQConfigForm' })
|
||||||
|
|
||||||
@ -38,6 +39,9 @@ const config = useVModel(props, 'modelValue', emit) as Ref<RabbitMQConfig>
|
|||||||
|
|
||||||
/** 组件初始化 */
|
/** 组件初始化 */
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
if (!isEmpty(config.value)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
config.value = {
|
config.value = {
|
||||||
type: IoTDataBridgeConfigType.RABBITMQ,
|
type: IoTDataBridgeConfigType.RABBITMQ,
|
||||||
host: '',
|
host: '',
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { IoTDataBridgeConfigType, RedisStreamMQConfig } from '@/api/iot/rule/databridge'
|
import { IoTDataBridgeConfigType, RedisStreamMQConfig } from '@/api/iot/rule/databridge'
|
||||||
import { useVModel } from '@vueuse/core'
|
import { useVModel } from '@vueuse/core'
|
||||||
|
import { isEmpty } from '@/utils/is'
|
||||||
|
|
||||||
defineOptions({ name: 'RedisStreamMQConfigForm' })
|
defineOptions({ name: 'RedisStreamMQConfigForm' })
|
||||||
|
|
||||||
@ -29,6 +30,9 @@ const config = useVModel(props, 'modelValue', emit) as Ref<RedisStreamMQConfig>
|
|||||||
|
|
||||||
/** 组件初始化 */
|
/** 组件初始化 */
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
if (!isEmpty(config.value)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
config.value = {
|
config.value = {
|
||||||
type: IoTDataBridgeConfigType.REDIS_STREAM,
|
type: IoTDataBridgeConfigType.REDIS_STREAM,
|
||||||
host: '',
|
host: '',
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { IoTDataBridgeConfigType, RocketMQConfig } from '@/api/iot/rule/databridge'
|
import { IoTDataBridgeConfigType, RocketMQConfig } from '@/api/iot/rule/databridge'
|
||||||
import { useVModel } from '@vueuse/core'
|
import { useVModel } from '@vueuse/core'
|
||||||
|
import { isEmpty } from '@/utils/is'
|
||||||
|
|
||||||
defineOptions({ name: 'RocketMQConfigForm' })
|
defineOptions({ name: 'RocketMQConfigForm' })
|
||||||
|
|
||||||
@ -37,6 +38,9 @@ const config = useVModel(props, 'modelValue', emit) as Ref<RocketMQConfig>
|
|||||||
|
|
||||||
/** 组件初始化 */
|
/** 组件初始化 */
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
if (!isEmpty(config.value)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
config.value = {
|
config.value = {
|
||||||
type: IoTDataBridgeConfigType.ROCKETMQ,
|
type: IoTDataBridgeConfigType.ROCKETMQ,
|
||||||
nameServer: '',
|
nameServer: '',
|
||||||
|
Loading…
Reference in New Issue
Block a user