perf:【IoT 物联网】场景联动触发器数据结构优化对齐后端
This commit is contained in:
@ -107,7 +107,7 @@ interface ActionConfig {
|
|||||||
alertConfigId?: number // 告警配置ID(告警恢复时必填)
|
alertConfigId?: number // 告警配置ID(告警恢复时必填)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表单数据接口
|
// 表单数据接口 - 直接对应后端 DO 结构
|
||||||
interface RuleSceneFormData {
|
interface RuleSceneFormData {
|
||||||
id?: number
|
id?: number
|
||||||
name: string
|
name: string
|
||||||
@ -117,57 +117,38 @@ interface RuleSceneFormData {
|
|||||||
actions: ActionFormData[]
|
actions: ActionFormData[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 触发器表单数据 - 直接对应 TriggerDO
|
||||||
interface TriggerFormData {
|
interface TriggerFormData {
|
||||||
type: number
|
type: number // 触发类型
|
||||||
productId?: number
|
productId?: number // 产品编号
|
||||||
deviceId?: number
|
deviceId?: number // 设备编号
|
||||||
identifier?: string
|
identifier?: string // 物模型标识符
|
||||||
operator?: string
|
operator?: string // 操作符
|
||||||
value?: string
|
value?: string // 参数值
|
||||||
cronExpression?: string
|
cronExpression?: string // CRON 表达式
|
||||||
// 新的条件结构
|
conditionGroups?: TriggerConditionFormData[][] // 条件组(二维数组)
|
||||||
mainCondition?: ConditionFormData // 主条件(必须满足)
|
|
||||||
conditionGroup?: ConditionGroupContainerFormData // 条件组容器(可选,与主条件为且关系)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ActionFormData {
|
// 触发条件表单数据 - 直接对应 TriggerConditionDO
|
||||||
type: number
|
interface TriggerConditionFormData {
|
||||||
productId?: number
|
|
||||||
deviceId?: number
|
|
||||||
params?: Record<string, any>
|
|
||||||
alertConfigId?: number
|
|
||||||
}
|
|
||||||
|
|
||||||
// 条件组容器(包含多个子条件组,子条件组间为或关系)
|
|
||||||
interface ConditionGroupContainerFormData {
|
|
||||||
subGroups: SubConditionGroupFormData[] // 子条件组数组,子条件组间为或关系
|
|
||||||
}
|
|
||||||
|
|
||||||
// 子条件组(内部条件为且关系)
|
|
||||||
interface SubConditionGroupFormData {
|
|
||||||
conditions: ConditionFormData[] // 条件数组,条件间为且关系
|
|
||||||
}
|
|
||||||
|
|
||||||
// 保留原有接口用于兼容性
|
|
||||||
interface ConditionGroupFormData {
|
|
||||||
conditions: ConditionFormData[]
|
|
||||||
// 注意:条件组内部的条件固定为"且"关系,条件组之间固定为"或"关系
|
|
||||||
// logicOperator 字段保留用于兼容性,但在UI中固定为 'AND'
|
|
||||||
logicOperator: 'AND' | 'OR'
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ConditionFormData {
|
|
||||||
type: number // 条件类型:1-设备状态,2-设备属性,3-当前时间
|
type: number // 条件类型:1-设备状态,2-设备属性,3-当前时间
|
||||||
productId?: number // 产品ID(设备状态和设备属性时必填)
|
productId?: number // 产品编号
|
||||||
deviceId?: number // 设备ID(设备状态和设备属性时必填)
|
deviceId?: number // 设备编号
|
||||||
identifier?: string // 标识符(设备属性时必填)
|
identifier?: string // 标识符
|
||||||
operator: string // 操作符
|
operator: string // 操作符
|
||||||
param: string // 参数值
|
param: string // 参数值
|
||||||
timeValue?: string // 时间值(当前时间条件时使用)
|
|
||||||
timeValue2?: string // 第二个时间值(时间范围条件时使用)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 主接口
|
// 执行器表单数据 - 直接对应 ActionDO
|
||||||
|
interface ActionFormData {
|
||||||
|
type: number // 执行类型
|
||||||
|
productId?: number // 产品编号
|
||||||
|
deviceId?: number // 设备编号
|
||||||
|
params?: Record<string, any> // 请求参数
|
||||||
|
alertConfigId?: number // 告警配置编号
|
||||||
|
}
|
||||||
|
|
||||||
|
// 主接口 - 原有的 API 接口格式(保持兼容性)
|
||||||
interface IotRuleScene extends TenantBaseDO {
|
interface IotRuleScene extends TenantBaseDO {
|
||||||
id?: number // 场景编号(新增时为空)
|
id?: number // 场景编号(新增时为空)
|
||||||
name: string // 场景名称(必填)
|
name: string // 场景名称(必填)
|
||||||
@ -177,6 +158,47 @@ interface IotRuleScene extends TenantBaseDO {
|
|||||||
actions: ActionConfig[] // 执行器数组(必填,至少一个)
|
actions: ActionConfig[] // 执行器数组(必填,至少一个)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 后端 DO 接口 - 匹配后端数据结构
|
||||||
|
interface IotRuleSceneDO {
|
||||||
|
id?: number // 场景编号
|
||||||
|
name: string // 场景名称
|
||||||
|
description?: string // 场景描述
|
||||||
|
status: number // 场景状态:0-开启,1-关闭
|
||||||
|
triggers: TriggerDO[] // 触发器数组
|
||||||
|
actions: ActionDO[] // 执行器数组
|
||||||
|
}
|
||||||
|
|
||||||
|
// 触发器 DO 结构
|
||||||
|
interface TriggerDO {
|
||||||
|
type: number // 触发类型
|
||||||
|
productId?: number // 产品编号
|
||||||
|
deviceId?: number // 设备编号
|
||||||
|
identifier?: string // 物模型标识符
|
||||||
|
operator?: string // 操作符
|
||||||
|
value?: string // 参数值
|
||||||
|
cronExpression?: string // CRON 表达式
|
||||||
|
conditionGroups?: TriggerConditionDO[][] // 条件组(二维数组)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 触发条件 DO 结构
|
||||||
|
interface TriggerConditionDO {
|
||||||
|
type: number // 条件类型
|
||||||
|
productId?: number // 产品编号
|
||||||
|
deviceId?: number // 设备编号
|
||||||
|
identifier?: string // 标识符
|
||||||
|
operator: string // 操作符
|
||||||
|
param: string // 参数
|
||||||
|
}
|
||||||
|
|
||||||
|
// 执行器 DO 结构
|
||||||
|
interface ActionDO {
|
||||||
|
type: number // 执行类型
|
||||||
|
productId?: number // 产品编号
|
||||||
|
deviceId?: number // 设备编号
|
||||||
|
params?: Record<string, any> // 请求参数
|
||||||
|
alertConfigId?: number // 告警配置编号
|
||||||
|
}
|
||||||
|
|
||||||
// 工具类型 - 从枚举中提取类型
|
// 工具类型 - 从枚举中提取类型
|
||||||
// TriggerType 现在从 constants.ts 中的枚举提取
|
// TriggerType 现在从 constants.ts 中的枚举提取
|
||||||
export type ActionType =
|
export type ActionType =
|
||||||
@ -202,6 +224,10 @@ interface FormValidationRules {
|
|||||||
|
|
||||||
export {
|
export {
|
||||||
IotRuleScene,
|
IotRuleScene,
|
||||||
|
IotRuleSceneDO,
|
||||||
|
TriggerDO,
|
||||||
|
TriggerConditionDO,
|
||||||
|
ActionDO,
|
||||||
TriggerConfig,
|
TriggerConfig,
|
||||||
TriggerCondition,
|
TriggerCondition,
|
||||||
TriggerConditionParameter,
|
TriggerConditionParameter,
|
||||||
@ -209,11 +235,8 @@ export {
|
|||||||
ActionDeviceControl,
|
ActionDeviceControl,
|
||||||
RuleSceneFormData,
|
RuleSceneFormData,
|
||||||
TriggerFormData,
|
TriggerFormData,
|
||||||
|
TriggerConditionFormData,
|
||||||
ActionFormData,
|
ActionFormData,
|
||||||
ConditionGroupFormData,
|
|
||||||
ConditionGroupContainerFormData,
|
|
||||||
SubConditionGroupFormData,
|
|
||||||
ConditionFormData,
|
|
||||||
IotRuleSceneActionTypeEnum,
|
IotRuleSceneActionTypeEnum,
|
||||||
IotDeviceMessageTypeEnum,
|
IotDeviceMessageTypeEnum,
|
||||||
IotRuleSceneTriggerConditionParameterOperatorEnum,
|
IotRuleSceneTriggerConditionParameterOperatorEnum,
|
||||||
|
|||||||
@ -41,9 +41,11 @@ import TriggerSection from './sections/TriggerSection.vue'
|
|||||||
import ActionSection from './sections/ActionSection.vue'
|
import ActionSection from './sections/ActionSection.vue'
|
||||||
import {
|
import {
|
||||||
IotRuleScene,
|
IotRuleScene,
|
||||||
|
IotRuleSceneDO,
|
||||||
IotRuleSceneActionTypeEnum,
|
IotRuleSceneActionTypeEnum,
|
||||||
RuleSceneFormData,
|
RuleSceneFormData,
|
||||||
TriggerFormData
|
TriggerFormData,
|
||||||
|
TriggerConditionFormData
|
||||||
} from '@/api/iot/rule/scene/scene.types'
|
} from '@/api/iot/rule/scene/scene.types'
|
||||||
import { IotRuleSceneTriggerTypeEnum } from '@/views/iot/utils/constants'
|
import { IotRuleSceneTriggerTypeEnum } from '@/views/iot/utils/constants'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
@ -91,8 +93,7 @@ const createDefaultFormData = (): RuleSceneFormData => {
|
|||||||
operator: undefined,
|
operator: undefined,
|
||||||
value: undefined,
|
value: undefined,
|
||||||
cronExpression: undefined,
|
cronExpression: undefined,
|
||||||
mainCondition: undefined,
|
conditionGroups: [] // 空的条件组数组
|
||||||
conditionGroup: undefined
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
actions: []
|
actions: []
|
||||||
@ -100,49 +101,10 @@ const createDefaultFormData = (): RuleSceneFormData => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将表单数据转换为 API 请求格式
|
* 将表单数据转换为后端 DO 格式
|
||||||
|
* 由于数据结构已对齐,转换变得非常简单
|
||||||
*/
|
*/
|
||||||
const convertFormToVO = (formData: RuleSceneFormData): IotRuleScene => {
|
const convertFormToVO = (formData: RuleSceneFormData): IotRuleSceneDO => {
|
||||||
// 构建单个触发器的条件
|
|
||||||
const buildTriggerConditions = (trigger: TriggerFormData) => {
|
|
||||||
const conditions: any[] = []
|
|
||||||
|
|
||||||
// 处理主条件
|
|
||||||
if (trigger.mainCondition) {
|
|
||||||
const mainCondition = trigger.mainCondition
|
|
||||||
conditions.push({
|
|
||||||
type: mainCondition.type === 2 ? 'property' : 'event',
|
|
||||||
identifier: mainCondition.identifier || '',
|
|
||||||
parameters: [
|
|
||||||
{
|
|
||||||
operator: mainCondition.operator,
|
|
||||||
value: mainCondition.param
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 处理条件组
|
|
||||||
if (trigger.conditionGroup?.subGroups) {
|
|
||||||
trigger.conditionGroup.subGroups.forEach((subGroup) => {
|
|
||||||
subGroup.conditions.forEach((condition) => {
|
|
||||||
conditions.push({
|
|
||||||
type: condition.type === 2 ? 'property' : 'event',
|
|
||||||
identifier: condition.identifier || '',
|
|
||||||
parameters: [
|
|
||||||
{
|
|
||||||
operator: condition.operator,
|
|
||||||
value: condition.param
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
return conditions
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: formData.id,
|
id: formData.id,
|
||||||
name: formData.name,
|
name: formData.name,
|
||||||
@ -150,79 +112,41 @@ const convertFormToVO = (formData: RuleSceneFormData): IotRuleScene => {
|
|||||||
status: Number(formData.status),
|
status: Number(formData.status),
|
||||||
triggers: formData.triggers.map((trigger) => ({
|
triggers: formData.triggers.map((trigger) => ({
|
||||||
type: trigger.type,
|
type: trigger.type,
|
||||||
productKey: trigger.productId ? `product_${trigger.productId}` : undefined,
|
productId: trigger.productId,
|
||||||
deviceNames: trigger.deviceId ? [`device_${trigger.deviceId}`] : undefined,
|
deviceId: trigger.deviceId,
|
||||||
|
identifier: trigger.identifier,
|
||||||
|
operator: trigger.operator,
|
||||||
|
value: trigger.value,
|
||||||
cronExpression: trigger.cronExpression,
|
cronExpression: trigger.cronExpression,
|
||||||
conditions: buildTriggerConditions(trigger)
|
conditionGroups: trigger.conditionGroups || []
|
||||||
})),
|
})),
|
||||||
actions:
|
actions: formData.actions?.map((action) => ({
|
||||||
formData.actions?.map((action) => ({
|
type: action.type,
|
||||||
type: action.type,
|
productId: action.productId,
|
||||||
alertConfigId: action.alertConfigId,
|
deviceId: action.deviceId,
|
||||||
deviceControl:
|
params: action.params,
|
||||||
action.type === IotRuleSceneActionTypeEnum.DEVICE_PROPERTY_SET ||
|
alertConfigId: action.alertConfigId
|
||||||
action.type === IotRuleSceneActionTypeEnum.DEVICE_SERVICE_INVOKE
|
})) || []
|
||||||
? {
|
}
|
||||||
productKey: action.productId ? `product_${action.productId}` : '',
|
|
||||||
deviceNames: action.deviceId ? [`device_${action.deviceId}`] : [],
|
|
||||||
type:
|
|
||||||
action.type === IotRuleSceneActionTypeEnum.DEVICE_PROPERTY_SET
|
|
||||||
? 'property'
|
|
||||||
: 'service',
|
|
||||||
identifier:
|
|
||||||
action.type === IotRuleSceneActionTypeEnum.DEVICE_PROPERTY_SET ? 'set' : 'invoke',
|
|
||||||
params: action.params || {}
|
|
||||||
}
|
|
||||||
: undefined
|
|
||||||
})) || []
|
|
||||||
} as IotRuleScene
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将 API 响应数据转换为表单格式
|
* 将后端 DO 数据转换为表单格式
|
||||||
|
* 由于数据结构已对齐,转换变得非常简单
|
||||||
*/
|
*/
|
||||||
const convertVOToForm = (apiData: IotRuleScene): RuleSceneFormData => {
|
const convertVOToForm = (apiData: IotRuleSceneDO): RuleSceneFormData => {
|
||||||
// 解析单个触发器的条件
|
|
||||||
const parseConditions = (trigger: any) => {
|
|
||||||
if (!trigger?.conditions?.length) {
|
|
||||||
return {
|
|
||||||
mainCondition: undefined,
|
|
||||||
conditionGroup: undefined
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 简化处理:将第一个条件作为主条件
|
|
||||||
const firstCondition = trigger.conditions[0]
|
|
||||||
const mainCondition = {
|
|
||||||
type: firstCondition.type === 'property' ? 2 : 3,
|
|
||||||
productId: undefined, // 需要从 productKey 解析
|
|
||||||
deviceId: undefined, // 需要从 deviceNames 解析
|
|
||||||
identifier: firstCondition.identifier,
|
|
||||||
operator: firstCondition.parameters?.[0]?.operator || '=',
|
|
||||||
param: firstCondition.parameters?.[0]?.value || ''
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
mainCondition,
|
|
||||||
conditionGroup: undefined // 暂时简化处理
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 转换所有触发器
|
// 转换所有触发器
|
||||||
const triggers = apiData.triggers?.length
|
const triggers = apiData.triggers?.length
|
||||||
? apiData.triggers.map((trigger) => {
|
? apiData.triggers.map((trigger: any) => ({
|
||||||
const conditionData = parseConditions(trigger)
|
type: Number(trigger.type),
|
||||||
return {
|
productId: trigger.productId,
|
||||||
type: Number(trigger.type),
|
deviceId: trigger.deviceId,
|
||||||
productId: undefined, // 需要从 productKey 解析
|
identifier: trigger.identifier,
|
||||||
deviceId: undefined, // 需要从 deviceNames 解析
|
operator: trigger.operator,
|
||||||
identifier: undefined,
|
value: trigger.value,
|
||||||
operator: undefined,
|
cronExpression: trigger.cronExpression,
|
||||||
value: undefined,
|
conditionGroups: trigger.conditionGroups || []
|
||||||
cronExpression: trigger.cronExpression,
|
}))
|
||||||
...conditionData
|
|
||||||
}
|
|
||||||
})
|
|
||||||
: [
|
: [
|
||||||
{
|
{
|
||||||
type: IotRuleSceneTriggerTypeEnum.DEVICE_PROPERTY_POST,
|
type: IotRuleSceneTriggerTypeEnum.DEVICE_PROPERTY_POST,
|
||||||
@ -232,22 +156,23 @@ const convertVOToForm = (apiData: IotRuleScene): RuleSceneFormData => {
|
|||||||
operator: undefined,
|
operator: undefined,
|
||||||
value: undefined,
|
value: undefined,
|
||||||
cronExpression: undefined,
|
cronExpression: undefined,
|
||||||
mainCondition: undefined,
|
conditionGroups: []
|
||||||
conditionGroup: undefined
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...apiData,
|
id: apiData.id,
|
||||||
|
name: apiData.name,
|
||||||
|
description: apiData.description,
|
||||||
status: Number(apiData.status),
|
status: Number(apiData.status),
|
||||||
triggers,
|
triggers,
|
||||||
actions:
|
actions:
|
||||||
apiData.actions?.map((action) => ({
|
apiData.actions?.map((action: any) => ({
|
||||||
...action,
|
|
||||||
type: Number(action.type),
|
type: Number(action.type),
|
||||||
productId: undefined, // 需要从 deviceControl.productKey 解析
|
productId: action.productId,
|
||||||
deviceId: undefined, // 需要从 deviceControl.deviceNames 解析
|
deviceId: action.deviceId,
|
||||||
params: action.deviceControl?.params || {},
|
params: action.params || {},
|
||||||
|
alertConfigId: action.alertConfigId,
|
||||||
// 为每个执行器添加唯一标识符,解决组件索引重用问题
|
// 为每个执行器添加唯一标识符,解决组件索引重用问题
|
||||||
key: generateUUID()
|
key: generateUUID()
|
||||||
})) || []
|
})) || []
|
||||||
@ -321,9 +246,13 @@ const handleSubmit = async () => {
|
|||||||
// 提交请求
|
// 提交请求
|
||||||
submitLoading.value = true
|
submitLoading.value = true
|
||||||
try {
|
try {
|
||||||
|
console.log(formData.value)
|
||||||
// 转换数据格式
|
// 转换数据格式
|
||||||
const apiData = convertFormToVO(formData.value)
|
const apiData = convertFormToVO(formData.value)
|
||||||
|
if (true) {
|
||||||
|
console.log('转换后', apiData)
|
||||||
|
return
|
||||||
|
}
|
||||||
// 调用API保存数据
|
// 调用API保存数据
|
||||||
if (isEdit.value) {
|
if (isEdit.value) {
|
||||||
// 更新场景联动规则
|
// 更新场景联动规则
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
<!-- 设备触发配置组件 - 优化版本 -->
|
<!-- 设备触发配置组件 -->
|
||||||
<template>
|
<template>
|
||||||
<div class="flex flex-col gap-16px">
|
<div class="flex flex-col gap-16px">
|
||||||
<!-- 主条件配置 - 默认直接展示 -->
|
<!-- 主条件配置 - 默认直接展示 -->
|
||||||
<div class="space-y-16px">
|
<div class="space-y-16px">
|
||||||
<MainConditionConfig
|
<MainConditionConfig
|
||||||
v-model="trigger.mainCondition"
|
v-model="trigger"
|
||||||
:trigger-type="trigger.type"
|
:trigger-type="trigger.type"
|
||||||
@validate="handleMainConditionValidate"
|
@validate="handleMainConditionValidate"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -40,37 +40,37 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import MainConditionInnerConfig from './MainConditionInnerConfig.vue'
|
import MainConditionInnerConfig from './MainConditionInnerConfig.vue'
|
||||||
import {
|
import {
|
||||||
ConditionFormData,
|
IotRuleSceneTriggerConditionTypeEnum,
|
||||||
IotRuleSceneTriggerConditionTypeEnum
|
TriggerFormData
|
||||||
} from '@/api/iot/rule/scene/scene.types'
|
} from '@/api/iot/rule/scene/scene.types'
|
||||||
|
|
||||||
/** 主条件配置组件 */
|
/** 主条件配置组件 */
|
||||||
defineOptions({ name: 'MainConditionConfig' })
|
defineOptions({ name: 'MainConditionConfig' })
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
modelValue?: ConditionFormData
|
modelValue?: TriggerFormData
|
||||||
triggerType: number
|
triggerType: number
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'update:modelValue', value?: ConditionFormData): void
|
(e: 'update:modelValue', value?: TriggerFormData): void
|
||||||
(e: 'validate', result: { valid: boolean; message: string }): void
|
(e: 'validate', result: { valid: boolean; message: string }): void
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
// 事件处理
|
// 事件处理
|
||||||
const addMainCondition = () => {
|
const addMainCondition = () => {
|
||||||
const newCondition: ConditionFormData = {
|
const newCondition: TriggerFormData = {
|
||||||
type: IotRuleSceneTriggerConditionTypeEnum.DEVICE_PROPERTY, // 默认为设备属性
|
type: IotRuleSceneTriggerConditionTypeEnum.DEVICE_PROPERTY, // 默认为设备属性
|
||||||
productId: undefined,
|
productId: undefined,
|
||||||
deviceId: undefined,
|
deviceId: undefined,
|
||||||
identifier: '',
|
identifier: '',
|
||||||
operator: '=',
|
operator: '=',
|
||||||
param: ''
|
value: ''
|
||||||
}
|
}
|
||||||
emit('update:modelValue', newCondition)
|
emit('update:modelValue', newCondition)
|
||||||
}
|
}
|
||||||
|
|
||||||
const updateCondition = (condition: ConditionFormData) => {
|
const updateCondition = (condition: TriggerFormData) => {
|
||||||
emit('update:modelValue', condition)
|
emit('update:modelValue', condition)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -148,8 +148,7 @@ const addTrigger = () => {
|
|||||||
operator: undefined,
|
operator: undefined,
|
||||||
value: undefined,
|
value: undefined,
|
||||||
cronExpression: undefined,
|
cronExpression: undefined,
|
||||||
mainCondition: undefined,
|
conditionGroups: [] // 空的条件组数组
|
||||||
conditionGroup: undefined
|
|
||||||
}
|
}
|
||||||
triggers.value.push(newTrigger)
|
triggers.value.push(newTrigger)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user