UNPKG

@wufengteam/baguaeditor

Version:

低零融合编辑器封装

91 lines (90 loc) 2.41 kB
import type { Component } from '@wufengteam/core/dist/src/types'; export interface FormField { label: string; name: string; component?: Component; } export type ConditionOperatorString = 'empty' | 'notEmpty' | 'contains' | 'notContains' | 'equals' | 'notEquals' | 'range'; export interface ConditionOperator { operator: ConditionOperatorString; name: string; } export type ValueType = 'fixed' | 'formValue'; export interface Condition { field: FormField; operator: ConditionOperator; valueType: ValueType; value: any; } export type LogicalOperatorString = 'AND' | 'OR'; export interface Operator { operator: LogicalOperatorString; name: string; } export interface Node { id: string; type: 'condition' | 'operator'; value: Condition | Operator; } export type JumpPageType = '0' | '1' | '2'; export interface JumpPageTypeOption { label: string; value: JumpPageType; } export interface ExecuteEventTypeOption { label: string; value: ExecuteEventType; } export type ExecuteEventType = '0' | '1'; export interface SubmitExecute { id: string; executeEventType: ExecuteEventType; jumpPageType: JumpPageType; defaultJumpPageDTOS?: any[]; jumpAppPage?: string; formSubmitJumpRequest?: any[]; } /** * 状态:'1'-启用,'0'-未启用 */ export type EventState = '0' | '1'; /** * 条件类型:'1'-自定义条件,'0'-任意数据 */ export type ConditionType = '0' | '1'; /** * 状态:00A-启用,00X-未启用 */ export type RuleState = '00A' | '00X'; export interface JumpEvent { appId: string; busiObjectId: string; customButtonId?: string; submitEventId?: string; sort?: number; conditionType: ConditionType; conditions: Node[]; formType: string; isDefaultEvent: string; submitExecuteDTOS: any[]; isEnable: EventState; } /** * 是否是默认事件:'T'-默认预置事件,'F'-自定义添加事件 */ export type EventType = 'T' | 'F'; /** * 服务端返回的 JumpEvent 数据 */ export interface FormJumpEventDto { appId: string; busiObjectId: string; submitEventId: string; sort: number; conditionType: ConditionType; conditions: string; isEnable: EventState; isDefaultEvent: string; formType: string; submitExecuteDTOS: any[]; }