wujingjing
2024-07-08 b43e0a2ac87f94bfe218d1a1a7488551be1129d5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import type { Edge, Node } from '@antv/x6';
 
export const enum ModelShape {
    Junction = 'junction',
    Reservoir = 'reservoir',
    Tank = 'tank',
    //#region ====================== 线 ======================
    Pump = 'pump',
    Valve = 'valve',
    //#endregion
    Pipe = 'pipe',
    /** @description 用于 Pump、Valve、Pipe连接其他 */
    LinkEdge = 'link-edge',
}
 
export const LINE_NODE_SHAPE = [ModelShape.Pump, ModelShape.Valve];
 
export const modelShapeMapName = {
    [ModelShape.Junction]: '连接点',
    [ModelShape.Reservoir]: '水库',
    [ModelShape.Tank]: '贮水池',
    [ModelShape.Pump]: '水泵',
    [ModelShape.Valve]: '阀门',
    [ModelShape.Pipe]: '管道',
};
 
export const modelShapeMapShortName = {
    [ModelShape.Junction]: '■',
    [ModelShape.Reservoir]: '库',
    [ModelShape.Tank]: '池',
    [ModelShape.Pump]: '泵',
    [ModelShape.Valve]: '阀',
    [ModelShape.Pipe]: '管',
};
export type NodeShapeConfig = Node.Config & {
    inherit?: string | Node.Definition | undefined;
};
 
export type EdgeShapeConfig = Edge.Config & {
    inherit?: string | Edge.Definition | undefined;
};