浏览代码

feat:【IoT 物联网】移除 DataBridgeAction.vue

YunaiV 10 月之前
父节点
当前提交
dfb0501e09

+ 1 - 3
src/api/iot/rule/scene/scene.types.ts

@@ -10,8 +10,7 @@ const IotRuleSceneTriggerTypeEnum = {
 
 const IotRuleSceneActionTypeEnum = {
   DEVICE_CONTROL: 1, // 设备执行
-  ALERT: 2, // 告警执行
-  DATA_BRIDGE: 3 // 桥接执行
+  ALERT: 2 // 告警执行
 } as const
 
 const IotDeviceMessageTypeEnum = {
@@ -104,7 +103,6 @@ interface ActionConfig {
   type: number // 执行类型
   deviceControl?: ActionDeviceControl // 设备控制
   alert?: ActionAlert // 告警执行
-  dataBridgeId?: number // 数据流转目的编号
 }
 
 // 主接口

+ 2 - 0
src/views/iot/rule/data/sink/config/HttpConfigForm.vue

@@ -3,6 +3,7 @@
     <el-input v-model="urlPath" placeholder="请输入请求地址">
       <template #prepend>
         <el-select v-model="urlPrefix" placeholder="Select" style="width: 115px">
+          <!--suppress HttpUrlsUsage -->
           <el-option label="http://" value="http://" />
           <el-option label="https://" value="https://" />
         </el-select>
@@ -42,6 +43,7 @@ const props = defineProps<{
 const emit = defineEmits(['update:modelValue'])
 const config = useVModel(props, 'modelValue', emit) as Ref<HttpConfig>
 
+// noinspection HttpUrlsUsage
 /** URL处理 */
 const urlPrefix = ref('http://')
 const urlPath = ref('')

+ 0 - 16
src/views/iot/rule/scene/components/action/ActionExecutor.vue

@@ -60,13 +60,6 @@
         :model-value="actionConfig.alert"
         @update:model-value="(val) => (actionConfig.alert = val)"
       />
-
-      <!-- 数据流转目的执行器 -->
-      <DataBridgeAction
-        v-else-if="actionConfig.type === IotRuleSceneActionTypeEnum.DATA_BRIDGE"
-        :model-value="actionConfig.dataBridgeId"
-        @update:model-value="(val) => (actionConfig.dataBridgeId = val)"
-      />
     </div>
 
     <!-- 产品、设备的选择 -->
@@ -88,7 +81,6 @@ import ProductTableSelect from '@/views/iot/product/product/components/ProductTa
 import DeviceTableSelect from '@/views/iot/device/device/components/DeviceTableSelect.vue'
 import DeviceControlAction from './DeviceControlAction.vue'
 import AlertAction from './AlertAction.vue'
-import DataBridgeAction from './DataBridgeAction.vue'
 import { ProductApi, ProductVO } from '@/api/iot/product/product'
 import { DeviceApi, DeviceVO } from '@/api/iot/device/device'
 import {
@@ -133,14 +125,6 @@ const initActionConfig = () => {
   if (actionConfig.value.type === IotRuleSceneActionTypeEnum.ALERT && !actionConfig.value.alert) {
     actionConfig.value.alert = {} as ActionAlert
   }
-
-  // 数据流转目的执行器初始化
-  if (
-    actionConfig.value.type === IotRuleSceneActionTypeEnum.DATA_BRIDGE &&
-    !actionConfig.value.dataBridgeId
-  ) {
-    actionConfig.value.dataBridgeId = undefined
-  }
 }
 
 /** 产品和设备选择 */

+ 0 - 34
src/views/iot/rule/scene/components/action/DataBridgeAction.vue

@@ -1,34 +0,0 @@
-<template>
-  <div class="bg-[#dbe5f6] p-10px">
-    <div class="flex items-center">
-      <span class="mr-10px w-80px">数据流转目的</span>
-      <el-select v-model="dataBridgeId" class="!w-240px" clearable placeholder="选择数据流转目的">
-        <el-option
-          v-for="bridge in dataSinkList"
-          :key="bridge.id"
-          :label="bridge.name"
-          :value="bridge.id"
-        />
-      </el-select>
-    </div>
-  </div>
-</template>
-
-<script setup lang="ts">
-import { useVModel } from '@vueuse/core'
-import { DataSinkApi } from '@/api/iot/rule/data/sink'
-
-/** 数据流转目的执行器组件 */
-defineOptions({ name: 'DataBridgeAction' })
-
-const props = defineProps<{ modelValue: any }>()
-const emits = defineEmits(['update:modelValue'])
-const dataBridgeId = useVModel(props, 'modelValue', emits)
-
-const dataSinkList = ref<any[]>([]) // 数据流转目的列表
-
-onMounted(async () => {
-  // 获取数据流转目的列表
-  dataSinkList.value = await DataSinkApi.getDataSinkSimpleList()
-})
-</script>