Files
DataMate/frontend/src/pages/OperatorMarket/operator.model.ts
hhhhsc701 7d4dcb756b fix: 修复入库可能重复;筛选逻辑优化 (#226)
* 修改数据清洗筛选逻辑-筛选修改为多选

* 修改数据清洗筛选逻辑-筛选修改为多选

* antd 组件库样式定制修改

* fix: 修复入库可能重复

* fix: 算子市场筛选逻辑优化

* fix: 清洗任务创建筛选逻辑优化

* fix: 清洗任务创建筛选逻辑优化

---------

Co-authored-by: chase <byzhangxin11@126.com>
2026-01-06 17:57:25 +08:00

64 lines
1.6 KiB
TypeScript

export interface ConfigI {
type:
| "input"
| "select"
| "radio"
| "checkbox"
| "range"
| "slider"
| "inputNumber"
| "switch"
| "multiple";
value?: number | string | boolean | string[] | number[];
required?: boolean;
description?: string;
key: string;
defaultVal: number | string | boolean | string[];
options?: string[] | { label: string; value: string }[];
min?: number;
max?: number;
step?: number;
properties?: ConfigI[]; // 用于嵌套配置
}
export interface OperatorI {
id: string;
name: string;
type: string;
version: string;
inputs: string;
outputs: string;
icon: React.ReactNode;
iconColor?: string; // 图标背景色,用于区分不同类型算子
description: string;
tags: string[];
isStar?: boolean;
originalId?: string; // 用于标识原始算子ID,便于去重
categories: string[]; // 分类列表
settings: string;
overrides?: { [key: string]: any }; // 用户配置的参数
defaultParams?: { [key: string]: any }; // 默认参数
configs: {
[key: string]: ConfigI;
};
createdAt?: string;
updatedAt?: string;
}
export interface CategoryI {
id: string;
name: string;
count: number; // 该分类下的算子数量
type: string; // e.g., "数据源", "数据清洗", "数据分析", "数据可视化"
parentId?: string; // 父分类ID,若无父分类则为null
value: string;
createdAt: string;
}
export interface CategoryTreeI {
id: string;
name: string;
count: number;
categories: CategoryI[];
}