index.ts 2.25 KB
import type { CategoryConfigType, NodeItemConfigType } from '../../types/node';
import { RuleNodeTypeEnum } from '../index.type';
import { CreateAlarmConfig } from './CreateAlarm';
import { PushToEdgeConfig } from './PushToEdge';
import { GeneratorConfig } from './Generator';
import { AssignToCustomerConfig } from './AssignToCustomer';
import { UnassignFromCustomerConfig } from './UnassignFromCustomer';
import { SaveTimeseriesConfig } from './SaveTimeseries';
import { GpsGeofencingEventsConfig } from './GpsGeofencingEvents';
import { DeviceProfileConfig } from './DeviceProfile';
import { RpcCallReplyConfig } from './RpcCallReply';
import { CopyToViewConfig } from './CopyToView';
import { LogConfig } from './Log';
import { SaveToCustomTableConfig } from './SaveToCustomTable';
import { ClearAlarmConfig } from './ClearAlarm';
import { DeleteRelationConfig } from './DeleteRelation';
import { DelayDeprecatedConfig } from './DelayDeprecated';
import { MessageCountConfig } from './MessageCount';
import { SaveEventConfig } from './SaveEvent';
import { RpcCallRequestConfig } from './RpcCallRequest';
import { SynchronizationStartConfig } from './SynchronizationStart';
import { SynchronizationEndConfig } from './SynchronizationEnd';
import { SaveAttributesConfig } from './SaveAttributes';
import { CreateRelationConfig } from './CreateRelation';
import { useI18n } from '/@/hooks/web/useI18n';

const { t } = useI18n(); // 加载国际化
export const ActionCategoryConfig: CategoryConfigType = {
  category: RuleNodeTypeEnum.ACTION,
  title: t('designer_config.actions.index.title'),
  backgroundColor: '#f1928f',
  icon: 'material-symbols:flash-on',
  description: t('designer_config.actions.index.description'),
};

export const ActionComponents: NodeItemConfigType[] = [
  AssignToCustomerConfig,
  ClearAlarmConfig,
  CopyToViewConfig,
  CreateAlarmConfig,
  CreateRelationConfig,
  DeleteRelationConfig,
  DelayDeprecatedConfig,
  DeviceProfileConfig,
  GeneratorConfig,
  GpsGeofencingEventsConfig,
  LogConfig,
  MessageCountConfig,
  PushToEdgeConfig,
  RpcCallReplyConfig,
  RpcCallRequestConfig,
  SaveAttributesConfig,
  SaveEventConfig,
  SaveTimeseriesConfig,
  SaveToCustomTableConfig,
  SynchronizationEndConfig,
  SynchronizationStartConfig,
  UnassignFromCustomerConfig,
];