@nywqs/scada-engine 1.1.30 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +359 -193
- package/dist/index.d.ts +3 -0
- package/dist/scada-engine.css +1 -1
- package/dist/scada-engine.es.js +42794 -21383
- package/dist/scada-engine.umd.js +3751 -156
- package/dist/src/components/canvas/composables/index.d.ts +12 -0
- package/dist/src/components/canvas/composables/useAutoSave.d.ts +9 -0
- package/dist/src/components/canvas/composables/useCanvasScale.d.ts +12 -0
- package/dist/src/components/canvas/composables/useDataSource.d.ts +87 -0
- package/dist/src/components/canvas/composables/useFileOperations.d.ts +37 -0
- package/dist/src/components/canvas/composables/useGraphEvents.d.ts +22 -0
- package/dist/src/components/canvas/composables/useNodeOperations.d.ts +35 -0
- package/dist/src/components/canvas/config/graphConfig.d.ts +64 -0
- package/dist/src/components/canvas/config/pluginConfig.d.ts +5 -0
- package/dist/src/components/canvas/config/scadaEdgeShape.d.ts +14 -0
- package/dist/src/components/canvas/config/scadaEdgeView.d.ts +4 -0
- package/dist/src/components/canvas/types/canvas.d.ts +41 -0
- package/dist/src/components/configurators/BindingCard.d.ts +24 -0
- package/dist/src/components/configurators/ComponentPointSelector.d.ts +16 -0
- package/dist/src/components/{EventCard.d.ts → configurators/EventCard.d.ts} +13 -26
- package/dist/src/components/configurators/MappingConfigurator.d.ts +15 -0
- package/dist/src/components/dialogs/AttributeConfigDialog.d.ts +28 -0
- package/dist/src/components/dialogs/CustomCodeDialog.d.ts +20 -0
- package/dist/src/components/dialogs/DataSourceDialog.d.ts +16 -0
- package/dist/src/components/dialogs/ScadaModal.d.ts +37 -0
- package/dist/src/components/{WorkflowSelectorDialog.d.ts → dialogs/WorkflowSelectorDialog.d.ts} +3 -3
- package/dist/src/components/layout/Footer.d.ts +16 -0
- package/dist/src/components/layout/Header.d.ts +56 -0
- package/dist/src/components/panels/CanvasConfigPanel.d.ts +4 -0
- package/dist/src/components/panels/ComponentLibrary.d.ts +6 -0
- package/dist/src/components/panels/ContextMenu.d.ts +26 -0
- package/dist/src/components/panels/PropertyPanel.d.ts +22 -0
- package/dist/src/components/property-tabs/BasicPropertiesTab.d.ts +37 -0
- package/dist/src/components/property-tabs/DataPropertiesTab.d.ts +14 -0
- package/dist/src/components/property-tabs/EdgePropertiesTab.d.ts +16 -0
- package/dist/src/constants/animation.d.ts +5 -0
- package/dist/src/constants/index.d.ts +3 -0
- package/dist/src/constants/layout.d.ts +16 -0
- package/dist/src/constants/theme.d.ts +17 -0
- package/dist/src/index.d.ts +16 -15
- package/dist/src/main.d.ts +0 -1
- package/dist/src/scada-components/basic/circle.d.ts +0 -1
- package/dist/src/scada-components/basic/rect.d.ts +0 -1
- package/dist/src/scada-components/basic/text.d.ts +0 -1
- package/dist/src/scada-components/canvas/config.d.ts +0 -1
- package/dist/src/scada-components/canvas/manager.d.ts +0 -1
- package/dist/src/scada-components/iot/echarts-gauge/EChartsGauge.d.ts +7 -0
- package/dist/src/scada-components/iot/{echarts-gauge.d.ts → echarts-gauge/index.d.ts} +1 -2
- package/dist/src/scada-components/iot/echarts-line/EChartsLine.d.ts +7 -0
- package/dist/src/scada-components/iot/{echarts-line.d.ts → echarts-line/index.d.ts} +1 -2
- package/dist/src/scada-components/iot/index.d.ts +0 -5
- package/dist/src/scada-components/registry.d.ts +1 -2
- package/dist/src/scada-components/svg/core/index.d.ts +7 -0
- package/dist/src/scada-components/svg/core/loader.d.ts +71 -0
- package/dist/src/scada-components/svg/core/parser.d.ts +40 -0
- package/dist/src/scada-components/svg/core/types.d.ts +297 -0
- package/dist/src/scada-components/svg/helpers/demo.d.ts +20 -0
- package/dist/src/scada-components/svg/helpers/index.d.ts +5 -0
- package/dist/src/scada-components/svg/helpers/utils.d.ts +24 -0
- package/dist/src/scada-components/svg/index.d.ts +9 -0
- package/dist/src/scada-components/svg/rendering/SVGRenderer.d.ts +14 -0
- package/dist/src/scada-components/svg/rendering/animationTemplates.d.ts +81 -0
- package/dist/src/scada-components/svg/rendering/index.d.ts +6 -0
- package/dist/src/scada-components/types.d.ts +0 -1
- package/dist/src/types/context-menu.d.ts +13 -0
- package/dist/src/types/model3d.d.ts +106 -0
- package/dist/src/types/zone.d.ts +54 -0
- package/dist/src/utils/animation/index.d.ts +6 -0
- package/dist/src/utils/{canvasConfigWatcher.d.ts → canvas/config-watcher.d.ts} +19 -9
- package/dist/src/utils/{canvasDataHandler.d.ts → canvas/data-handler.d.ts} +0 -29
- package/dist/src/utils/{edgeOperations.d.ts → canvas/edge-operations.d.ts} +6 -3
- package/dist/src/utils/{graphOperations.d.ts → canvas/graph-operations.d.ts} +0 -1
- package/dist/src/utils/canvas/index.d.ts +10 -0
- package/dist/src/utils/{canvasLayerManager.d.ts → canvas/layer-manager.d.ts} +0 -1
- package/dist/src/utils/{nodeOperations.d.ts → canvas/node-operations.d.ts} +0 -1
- package/dist/src/utils/core/index.d.ts +8 -0
- package/dist/src/utils/{dataBindingService.d.ts → data/binding-service.d.ts} +1 -2
- package/dist/src/utils/data/index.d.ts +6 -0
- package/dist/src/utils/{contextMenuManager.d.ts → events/context-menu.d.ts} +1 -2
- package/dist/src/utils/{eventManager.d.ts → events/event-manager.d.ts} +1 -2
- package/dist/src/utils/events/index.d.ts +7 -0
- package/dist/src/utils/index.d.ts +30 -19
- package/dist/src/utils/integrations/draco-loader.d.ts +2 -0
- package/dist/src/utils/integrations/index.d.ts +6 -0
- package/dist/src/utils/performance/index.d.ts +6 -0
- package/dist/src/utils/{viewportCulling.d.ts → performance/viewport-culling.d.ts} +0 -1
- package/dist/src/views/Preview.d.ts +4 -0
- package/dist/src/views/workflow/WorkflowDialog.d.ts +10 -30
- package/dist/src/views/workflow/components/AddNodeMenu.d.ts +5 -14
- package/dist/src/views/workflow/components/ElementSelector.d.ts +5 -27
- package/dist/src/views/workflow/components/PropertyPanel.d.ts +8 -15
- package/dist/src/views/workflow/components/node-configs/ClearTimerConfig.d.ts +4 -14
- package/dist/src/views/workflow/components/node-configs/ConditionConfig.d.ts +4 -14
- package/dist/src/views/workflow/components/node-configs/CustomCodeConfig.d.ts +4 -14
- package/dist/src/views/workflow/components/node-configs/GetPropertyConfig.d.ts +4 -14
- package/dist/src/views/workflow/components/node-configs/HttpRequestConfig.d.ts +4 -14
- package/dist/src/views/workflow/components/node-configs/SetPropertyConfig.d.ts +4 -14
- package/dist/src/views/workflow/components/node-configs/TimerConfig.d.ts +4 -14
- package/dist/src/views/workflow/config/nodeConfigRegistry.d.ts +0 -1
- package/dist/src/views/workflow/services/canvasElementService.d.ts +0 -1
- package/package.json +86 -82
- package/dist/src/components/AttributeConfigDialog.d.ts +0 -39
- package/dist/src/components/BasicPropertiesTab.d.ts +0 -51
- package/dist/src/components/BindingCard.d.ts +0 -39
- package/dist/src/components/CanvasArea.d.ts +0 -4
- package/dist/src/components/ComponentLibrary.d.ts +0 -34
- package/dist/src/components/ComponentPointSelector.d.ts +0 -29
- package/dist/src/components/ContextMenu.d.ts +0 -63
- package/dist/src/components/CustomCodeDialog.d.ts +0 -30
- package/dist/src/components/DataPropertiesTab.d.ts +0 -24
- package/dist/src/components/DataSourceDialog.d.ts +0 -26
- package/dist/src/components/EdgePropertiesTab.d.ts +0 -22
- package/dist/src/components/Footer.d.ts +0 -41
- package/dist/src/components/Header.d.ts +0 -73
- package/dist/src/components/MappingConfigurator.d.ts +0 -27
- package/dist/src/components/PropertyPanel.d.ts +0 -45
- package/dist/src/scada-components/iot/AlarmLight3D.d.ts +0 -14
- package/dist/src/scada-components/iot/Conveyor3D.d.ts +0 -14
- package/dist/src/scada-components/iot/Cylinder3D.d.ts +0 -14
- package/dist/src/scada-components/iot/EChartsGauge.d.ts +0 -14
- package/dist/src/scada-components/iot/EChartsLine.d.ts +0 -14
- package/dist/src/scada-components/iot/Filter3D.d.ts +0 -14
- package/dist/src/scada-components/iot/HeatExchanger3D.d.ts +0 -14
- package/dist/src/scada-components/iot/Light3D.d.ts +0 -14
- package/dist/src/scada-components/iot/Motor3D.d.ts +0 -14
- package/dist/src/scada-components/iot/Pipe3D.d.ts +0 -14
- package/dist/src/scada-components/iot/Pump3D.d.ts +0 -14
- package/dist/src/scada-components/iot/Switch3D.d.ts +0 -14
- package/dist/src/scada-components/iot/Tank3D.d.ts +0 -14
- package/dist/src/scada-components/iot/Tee3D.d.ts +0 -14
- package/dist/src/scada-components/iot/TemperatureSensor3D.d.ts +0 -14
- package/dist/src/scada-components/iot/Valve3D.d.ts +0 -14
- package/dist/src/scada-components/iot/industrial-3d-extended.d.ts +0 -18
- package/dist/src/scada-components/iot/industrial-3d-fluid.d.ts +0 -18
- package/dist/src/scada-components/iot/industrial-3d.d.ts +0 -18
- package/dist/src/scada-components/iot/light.d.ts +0 -6
- package/dist/src/scada-components/iot/switch.d.ts +0 -6
- package/dist/src/views/workflow/WorkflowEditor.d.ts +0 -38
- package/dist/src/views/workflow/components/WorkflowToolbar.d.ts +0 -24
- /package/dist/src/{components/CanvasConfigPanel.d.ts → App.d.ts} +0 -0
- /package/dist/src/scada-components/iot/{echarts-gauge-presets.d.ts → echarts-gauge/presets.d.ts} +0 -0
- /package/dist/src/scada-components/iot/{echarts-line-presets.d.ts → echarts-line/presets.d.ts} +0 -0
- /package/dist/src/utils/{animationEngine.d.ts → animation/animation-engine.d.ts} +0 -0
- /package/dist/src/utils/{animationScheduler.d.ts → animation/animation-scheduler.d.ts} +0 -0
- /package/dist/src/utils/{commonUtils.d.ts → core/common.d.ts} +0 -0
- /package/dist/src/utils/{fileUtils.d.ts → core/file.d.ts} +0 -0
- /package/dist/src/utils/{messageUtils.d.ts → core/message.d.ts} +0 -0
- /package/dist/src/utils/{storageUtils.d.ts → core/storage.d.ts} +0 -0
- /package/dist/src/utils/{nodePropertyUtils.d.ts → data/node-property.d.ts} +0 -0
- /package/dist/src/utils/{eventUtils.d.ts → events/event-utils.d.ts} +0 -0
- /package/dist/src/utils/{authCrypto.d.ts → integrations/auth-crypto.d.ts} +0 -0
- /package/dist/src/utils/{workerManager.d.ts → performance/worker-manager.d.ts} +0 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
2
|
+
fileInput: HTMLInputElement;
|
|
3
|
+
}, HTMLDivElement>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
2
|
+
addComponent: (type: string) => any;
|
|
3
|
+
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
+
onAddComponent?: ((type: string) => any) | undefined;
|
|
5
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLElement>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { MenuItem } from '../../types/context-menu';
|
|
2
|
+
interface Props {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
position: {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
};
|
|
8
|
+
menuItems: MenuItem[];
|
|
9
|
+
}
|
|
10
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
"update:visible": (value: boolean) => any;
|
|
12
|
+
"menu-click": (key: string) => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
14
|
+
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
15
|
+
"onMenu-click"?: ((key: string) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
visible: boolean;
|
|
18
|
+
position: {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
};
|
|
22
|
+
menuItems: MenuItem[];
|
|
23
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
24
|
+
menuRef: HTMLDivElement;
|
|
25
|
+
}, any>;
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Node, Edge } from '@antv/x6';
|
|
2
|
+
interface Props {
|
|
3
|
+
selectedNode: Node | null;
|
|
4
|
+
selectedEdge: Edge | null;
|
|
5
|
+
edgePanelKey?: number;
|
|
6
|
+
deviceData?: any;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
updateEdge: (data: any) => any;
|
|
10
|
+
deleteEdge: () => any;
|
|
11
|
+
updateNode: (data: any) => any;
|
|
12
|
+
deleteNode: () => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
14
|
+
onUpdateEdge?: ((data: any) => any) | undefined;
|
|
15
|
+
onDeleteEdge?: (() => any) | undefined;
|
|
16
|
+
onUpdateNode?: ((data: any) => any) | undefined;
|
|
17
|
+
onDeleteNode?: (() => any) | undefined;
|
|
18
|
+
}>, {
|
|
19
|
+
edgePanelKey: number;
|
|
20
|
+
deviceData: any;
|
|
21
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Node } from '@antv/x6';
|
|
2
|
+
interface NodePosition {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
}
|
|
6
|
+
interface NodeSize {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
selectedNode: Node;
|
|
12
|
+
nodePosition: NodePosition;
|
|
13
|
+
nodeSize: NodeSize;
|
|
14
|
+
nodeAttrs: any;
|
|
15
|
+
};
|
|
16
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
17
|
+
"update-position": (axis: "x" | "y", value: number) => any;
|
|
18
|
+
"update-size": (dimension: "width" | "height", value: number) => any;
|
|
19
|
+
"update-label": (event: Event) => any;
|
|
20
|
+
"update-fill": (event: Event) => any;
|
|
21
|
+
"update-stroke": (event: Event) => any;
|
|
22
|
+
"update-stroke-width": (event: Event) => any;
|
|
23
|
+
"update-opacity": (event: Event) => any;
|
|
24
|
+
"update-component-name": (event: Event) => any;
|
|
25
|
+
"update-dynamic-prop": (path: string, value: any) => any;
|
|
26
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
27
|
+
"onUpdate-position"?: ((axis: "x" | "y", value: number) => any) | undefined;
|
|
28
|
+
"onUpdate-size"?: ((dimension: "width" | "height", value: number) => any) | undefined;
|
|
29
|
+
"onUpdate-label"?: ((event: Event) => any) | undefined;
|
|
30
|
+
"onUpdate-fill"?: ((event: Event) => any) | undefined;
|
|
31
|
+
"onUpdate-stroke"?: ((event: Event) => any) | undefined;
|
|
32
|
+
"onUpdate-stroke-width"?: ((event: Event) => any) | undefined;
|
|
33
|
+
"onUpdate-opacity"?: ((event: Event) => any) | undefined;
|
|
34
|
+
"onUpdate-component-name"?: ((event: Event) => any) | undefined;
|
|
35
|
+
"onUpdate-dynamic-prop"?: ((path: string, value: any) => any) | undefined;
|
|
36
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
37
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Node } from '@antv/x6';
|
|
2
|
+
interface Props {
|
|
3
|
+
selectedNode: Node;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
+
"update-data-source": (config: {
|
|
7
|
+
dataSourceId: string;
|
|
8
|
+
}) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
10
|
+
"onUpdate-data-source"?: ((config: {
|
|
11
|
+
dataSourceId: string;
|
|
12
|
+
}) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Edge } from '@antv/x6';
|
|
2
|
+
interface Props {
|
|
3
|
+
selectedEdge: Edge | null;
|
|
4
|
+
/** 父组件更新边后递增,用于让 edgeAttrs 重新计算(getAttrs 非响应式) */
|
|
5
|
+
edgePanelKey?: number;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
updateEdge: (updates: any) => any;
|
|
9
|
+
deleteEdge: () => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
11
|
+
onUpdateEdge?: ((updates: any) => any) | undefined;
|
|
12
|
+
onDeleteEdge?: (() => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
edgePanelKey: number;
|
|
15
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 布局相关常量
|
|
3
|
+
* 统一管理硬编码的尺寸,避免多处数值不一致
|
|
4
|
+
*/
|
|
5
|
+
/** 左侧组件库宽度 */
|
|
6
|
+
export declare const SIDEBAR_LEFT_WIDTH = 220;
|
|
7
|
+
/** 右侧属性面板宽度 */
|
|
8
|
+
export declare const SIDEBAR_RIGHT_WIDTH = 300;
|
|
9
|
+
/** 画布自适应时的边距(Scroller 已有 40px padding,这里再留 40px 缓冲) */
|
|
10
|
+
export declare const CANVAS_FIT_PADDING = 80;
|
|
11
|
+
/** 内容适配时的边距 */
|
|
12
|
+
export declare const CONTENT_FIT_PADDING = 40;
|
|
13
|
+
/** Transform 插件:节点最小尺寸 */
|
|
14
|
+
export declare const NODE_RESIZE_MIN = 20;
|
|
15
|
+
/** Transform 插件:节点最大尺寸 */
|
|
16
|
+
export declare const NODE_RESIZE_MAX = 800;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 主题色与组件样式常量
|
|
3
|
+
* 统一管理接线柱、选中等通用视觉样式
|
|
4
|
+
*/
|
|
5
|
+
/** 接线柱描边色 */
|
|
6
|
+
export declare const PORT_STROKE = "#31d0c6";
|
|
7
|
+
/** 接线柱填充色 */
|
|
8
|
+
export declare const PORT_FILL = "#fff";
|
|
9
|
+
/** 接线柱描边宽度 */
|
|
10
|
+
export declare const PORT_STROKE_WIDTH = 2;
|
|
11
|
+
/** 接线柱半径 */
|
|
12
|
+
export declare const PORT_RADIUS = 4;
|
|
13
|
+
/** 状态颜色映射:默认未知/缺失时的回退色 */
|
|
14
|
+
export declare const FALLBACK_STATUS_COLOR = "#999999";
|
|
15
|
+
/** 画布/面板背景色(与 theme.css 中 --scada-bg-* 对应,供 JS 使用) */
|
|
16
|
+
export declare const BG_DARKEST = "#0f172a";
|
|
17
|
+
export declare const BG_DARK = "#1e293b";
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
2
|
import { Graph } from '@antv/x6';
|
|
3
|
-
import { default as ScadaCanvas } from './components/ScadaCanvas';
|
|
4
|
-
import { default as PropertyPanel } from './components/PropertyPanel';
|
|
5
|
-
import { default as Header } from './components/Header';
|
|
6
|
-
import { default as ComponentLibrary } from './components/ComponentLibrary';
|
|
7
|
-
import { default as CanvasConfigPanel } from './components/CanvasConfigPanel';
|
|
8
|
-
import { default as BindingCard } from './components/BindingCard';
|
|
9
|
-
import { default as EventCard } from './components/EventCard';
|
|
10
|
-
import { default as BasicPropertiesTab } from './components/BasicPropertiesTab';
|
|
11
|
-
import { default as AttributeConfigDialog } from './components/AttributeConfigDialog';
|
|
12
|
-
import { default as CustomCodeDialog } from './components/CustomCodeDialog';
|
|
13
|
-
|
|
3
|
+
import { default as ScadaCanvas } from './components/canvas/ScadaCanvas';
|
|
4
|
+
import { default as PropertyPanel } from './components/panels/PropertyPanel';
|
|
5
|
+
import { default as Header } from './components/layout/Header';
|
|
6
|
+
import { default as ComponentLibrary } from './components/panels/ComponentLibrary';
|
|
7
|
+
import { default as CanvasConfigPanel } from './components/panels/CanvasConfigPanel';
|
|
8
|
+
import { default as BindingCard } from './components/configurators/BindingCard';
|
|
9
|
+
import { default as EventCard } from './components/configurators/EventCard';
|
|
10
|
+
import { default as BasicPropertiesTab } from './components/property-tabs/BasicPropertiesTab';
|
|
11
|
+
import { default as AttributeConfigDialog } from './components/dialogs/AttributeConfigDialog';
|
|
12
|
+
import { default as CustomCodeDialog } from './components/dialogs/CustomCodeDialog';
|
|
14
13
|
export * from './scada-components';
|
|
15
14
|
export { componentRegistry } from './scada-components/registry';
|
|
16
15
|
export type { ComponentConfig, ComponentRegistry, ComponentCategory, ComponentMetadata, ComponentProp, ComponentData, NodeAttrs, PropType } from './scada-components/types';
|
|
17
16
|
export { canvasConfigManager } from './scada-components/canvas';
|
|
18
17
|
export type { CanvasConfig, CanvasConfigItem, CanvasSizePreset, BackgroundSize, BackgroundRepeat } from './scada-components/canvas';
|
|
19
18
|
export { showMessage, saveToLocal, loadFromLocal, removeFromLocal, STORAGE_KEYS, exportToJSON, randomPosition, formatTimestamp, getCurrentTimestamp, generateUniqueId, generateEventId, generateNodeId } from './utils';
|
|
20
|
-
export { animationEngine } from './utils/
|
|
21
|
-
export { registerNodeEvents } from './utils/
|
|
19
|
+
export { animationEngine } from './utils/animation/animation-engine';
|
|
20
|
+
export { registerNodeEvents } from './utils/events/event-utils';
|
|
21
|
+
export * from './scada-components/svg';
|
|
22
|
+
export { svgLoader } from './scada-components/svg';
|
|
22
23
|
export type { Device, DevicePoint, DeviceList, PointValueUpdate } from './types/device';
|
|
23
24
|
export { DeviceStatus, DeviceType, PointDataType, PointAccessMode } from './types/device';
|
|
24
25
|
export interface EventConfig {
|
|
@@ -50,9 +51,9 @@ export interface ScadaCanvasExposed {
|
|
|
50
51
|
/** 保存画布数据到 localStorage */
|
|
51
52
|
save: () => void;
|
|
52
53
|
/** 触发文件选择,导入 JSON 数据 */
|
|
53
|
-
|
|
54
|
+
importFile: () => void;
|
|
54
55
|
/** 导出画布数据为 JSON 文件 */
|
|
55
|
-
|
|
56
|
+
exportFile: () => void;
|
|
56
57
|
/** 跳转到预览页面 */
|
|
57
58
|
preview: () => void;
|
|
58
59
|
/** 打开流程编排弹窗 */
|
package/dist/src/main.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
node?: any;
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
5
|
+
chartRef: HTMLDivElement;
|
|
6
|
+
}, HTMLDivElement>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
node?: any;
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
5
|
+
chartContainer: HTMLDivElement;
|
|
6
|
+
}, HTMLDivElement>;
|
|
7
|
+
export default _default;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* IoT组件导出
|
|
3
3
|
*/
|
|
4
|
-
export { LightComponent } from './light';
|
|
5
|
-
export { SwitchComponent } from './switch';
|
|
6
4
|
export { EChartsGaugeComponent } from './echarts-gauge';
|
|
7
5
|
export { EChartsLineComponent } from './echarts-line';
|
|
8
|
-
export { Motor3DComponent, Valve3DComponent, Tank3DComponent, Pump3DComponent } from './industrial-3d';
|
|
9
|
-
export { Conveyor3DComponent, AlarmLight3DComponent, TemperatureSensor3DComponent, Cylinder3DComponent } from './industrial-3d-extended';
|
|
10
|
-
export { Pipe3DComponent, Filter3DComponent, HeatExchanger3DComponent, Tee3DComponent } from './industrial-3d-fluid';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ComponentRegistry, ComponentConfig, ComponentCategory } from './types';
|
|
2
|
-
|
|
3
2
|
type ComponentLoader = () => Promise<{
|
|
4
3
|
default: ComponentConfig;
|
|
5
4
|
}>;
|
|
@@ -17,7 +16,7 @@ declare class ComponentRegistryManager {
|
|
|
17
16
|
private registerDefaultComponents;
|
|
18
17
|
/**
|
|
19
18
|
* 注册懒加载组件(零配置 - 基于约定自动发现)
|
|
20
|
-
* 约定:所有
|
|
19
|
+
* 约定:所有 iot/industrial-* 目录下的 index.ts 文件自动注册为懒加载组件
|
|
21
20
|
* 策略:延迟加载 - 首次请求组件时才加载整个模块,并注册模块内的所有组件
|
|
22
21
|
*/
|
|
23
22
|
private registerLazyComponents;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SVG 组件加载器
|
|
3
|
+
* 负责加载 SVG 文件并注册到组件注册表
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* SVG 组件加载器类
|
|
7
|
+
*/
|
|
8
|
+
export declare class SVGLoader {
|
|
9
|
+
/**
|
|
10
|
+
* 从字符串加载 SVG 组件
|
|
11
|
+
* @param svgContent SVG 文件内容
|
|
12
|
+
* @param fileName 文件名(可选)
|
|
13
|
+
* @returns 是否加载成功
|
|
14
|
+
*/
|
|
15
|
+
loadFromString(svgContent: string, fileName?: string): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 从文件加载 SVG 组件
|
|
18
|
+
* @param file File 对象
|
|
19
|
+
* @returns Promise<boolean>
|
|
20
|
+
*/
|
|
21
|
+
loadFromFile(file: File): Promise<boolean>;
|
|
22
|
+
/**
|
|
23
|
+
* 批量加载 SVG 组件
|
|
24
|
+
* @param files File 对象数组
|
|
25
|
+
* @returns Promise<加载成功的数量>
|
|
26
|
+
*/
|
|
27
|
+
loadBatch(files: File[]): Promise<number>;
|
|
28
|
+
/**
|
|
29
|
+
* 从 URL 加载 SVG 组件
|
|
30
|
+
* @param url SVG 文件 URL
|
|
31
|
+
* @returns Promise<boolean>
|
|
32
|
+
*/
|
|
33
|
+
loadFromUrl(url: string): Promise<boolean>;
|
|
34
|
+
/**
|
|
35
|
+
* 转换 SVGComponentConfig 为 ComponentConfig
|
|
36
|
+
*/
|
|
37
|
+
private convertToComponentConfig;
|
|
38
|
+
/**
|
|
39
|
+
* 从 presetBindings 生成 InternalAnimations
|
|
40
|
+
*/
|
|
41
|
+
private generateInternalAnimations;
|
|
42
|
+
/**
|
|
43
|
+
* 生成默认的驱动字段值
|
|
44
|
+
*/
|
|
45
|
+
private generateDefaultDriverValues;
|
|
46
|
+
/**
|
|
47
|
+
* 生成接线柱配置
|
|
48
|
+
* 接线柱向组件内侧偏移(dx/dy)使圆心落在组件边界上,避免显示在组件外
|
|
49
|
+
*/
|
|
50
|
+
private generatePorts;
|
|
51
|
+
/**
|
|
52
|
+
* 生成组件属性配置
|
|
53
|
+
* 多个 presetBinding 共享同一 driverProperty 时只生成一个 prop(去重)
|
|
54
|
+
*/
|
|
55
|
+
private generateProps;
|
|
56
|
+
/**
|
|
57
|
+
* 根据数值范围推断合理的 step
|
|
58
|
+
*/
|
|
59
|
+
private inferStep;
|
|
60
|
+
/**
|
|
61
|
+
* 根据 SVG 配置生成组件点位定义
|
|
62
|
+
* 主要用于数据绑定面板中的“组件数据点位”列表
|
|
63
|
+
* 多个 presetBinding 共享同一 driverProperty 时只生成一个点位(去重)
|
|
64
|
+
*/
|
|
65
|
+
private generatePoints;
|
|
66
|
+
/**
|
|
67
|
+
* 读取文件为文本
|
|
68
|
+
*/
|
|
69
|
+
private readFileAsText;
|
|
70
|
+
}
|
|
71
|
+
export declare const svgLoader: SVGLoader;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { SVGComponentConfig } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* SVG 解析器类
|
|
4
|
+
*/
|
|
5
|
+
export declare class SVGParser {
|
|
6
|
+
/**
|
|
7
|
+
* 解析 SVG 字符串
|
|
8
|
+
* @param svgContent SVG 文件内容
|
|
9
|
+
* @param fileName 文件名(可选)
|
|
10
|
+
* @returns 解析后的组件配置
|
|
11
|
+
*/
|
|
12
|
+
static parse(svgContent: string, fileName?: string): SVGComponentConfig | null;
|
|
13
|
+
/**
|
|
14
|
+
* 提取元数据(从 <metadata><scada-config> 中)
|
|
15
|
+
*/
|
|
16
|
+
private static extractMetadata;
|
|
17
|
+
/**
|
|
18
|
+
* 生成默认元数据(当 SVG 没有配置时)
|
|
19
|
+
*/
|
|
20
|
+
private static generateDefaultMetadata;
|
|
21
|
+
/**
|
|
22
|
+
* 提取尺寸信息
|
|
23
|
+
*/
|
|
24
|
+
private static extractSize;
|
|
25
|
+
/**
|
|
26
|
+
* 提取内部部件(自动扫描 id="part-*" 的元素)
|
|
27
|
+
*/
|
|
28
|
+
private static extractParts;
|
|
29
|
+
/**
|
|
30
|
+
* 清理 SVG 内容(移除 metadata 等不需要渲染的标签)
|
|
31
|
+
*/
|
|
32
|
+
private static cleanSvgContent;
|
|
33
|
+
/**
|
|
34
|
+
* 验证 SVG 配置
|
|
35
|
+
*/
|
|
36
|
+
static validate(config: SVGComponentConfig): {
|
|
37
|
+
valid: boolean;
|
|
38
|
+
errors: string[];
|
|
39
|
+
};
|
|
40
|
+
}
|