dcim-topology2d 2.2.0 → 3.0.2
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/activity-diagram/src/final/final.d.ts +1 -1
- package/activity-diagram/src/final/final.rect.d.ts +1 -1
- package/activity-diagram/src/final/final.rect.js +1 -1
- package/activity-diagram/src/fork/fork.anchor.d.ts +1 -1
- package/activity-diagram/src/fork/fork.anchor.js +1 -1
- package/activity-diagram/src/fork/fork.d.ts +1 -1
- package/activity-diagram/src/fork/fork.rect.d.ts +1 -1
- package/activity-diagram/src/fork/fork.rect.js +1 -1
- package/activity-diagram/src/register.js +1 -1
- package/activity-diagram/src/swimlaneH/swimlaneH.d.ts +1 -1
- package/activity-diagram/src/swimlaneH/swimlaneH.rect.d.ts +1 -1
- package/activity-diagram/src/swimlaneH/swimlaneH.rect.js +1 -1
- package/activity-diagram/src/swimlaneV/swimlaneV.d.ts +1 -1
- package/activity-diagram/src/swimlaneV/swimlaneV.rect.d.ts +1 -1
- package/activity-diagram/src/swimlaneV/swimlaneV.rect.js +1 -1
- package/chart-diagram/index.d.ts +1 -3
- package/chart-diagram/index.js +1 -2
- package/chart-diagram/src/echarts/index.d.ts +2 -1
- package/chart-diagram/src/echarts/index.js +104 -112
- package/chart-diagram/src/register.js +8 -9
- package/class-diagram/src/class/class.d.ts +1 -1
- package/class-diagram/src/class/class.rect.d.ts +1 -1
- package/class-diagram/src/class/class.rect.js +1 -1
- package/class-diagram/src/register.js +1 -1
- package/core/index.d.ts +0 -2
- package/core/index.js +0 -2
- package/core/src/activeLayer.d.ts +10 -2
- package/core/src/activeLayer.js +47 -42
- package/core/src/animateLayer.d.ts +7 -3
- package/core/src/animateLayer.js +12 -10
- package/core/src/calling.d.ts +4 -1
- package/core/src/calling.js +41 -43
- package/core/src/canvas.d.ts +6 -1
- package/core/src/canvas.js +21 -22
- package/core/src/common.d.ts +7 -6
- package/core/src/common.js +675 -343
- package/core/src/core.d.ts +4 -5
- package/core/src/core.js +385 -536
- package/core/src/divLayer.d.ts +36 -2
- package/core/src/divLayer.js +305 -33
- package/core/src/healps/changeData.d.ts +2 -1
- package/core/src/healps/changeData.js +100 -86
- package/core/src/hoverLayer.d.ts +9 -2
- package/core/src/hoverLayer.js +34 -31
- package/core/src/middles/default.d.ts +3 -1
- package/core/src/middles/default.js +51 -63
- package/core/src/middles/index.js +2 -3
- package/core/src/middles/nodes/arbitrarygraph.js +9 -11
- package/core/src/middles/nodes/pentagon.rect.js +1 -1
- package/core/src/middles/nodes/rectangle.rect.js +1 -1
- package/core/src/models/data.d.ts +26 -0
- package/core/src/models/data.js +77 -0
- package/core/src/models/data.js.map +1 -0
- package/core/src/models/index.d.ts +1 -0
- package/core/src/models/index.js +1 -0
- package/core/src/models/line.js +7 -7
- package/core/src/models/node.d.ts +0 -10
- package/core/src/models/node.js +101 -148
- package/core/src/models/pen.js +67 -27
- package/core/src/models/rect.js +2 -2
- package/core/src/mqtt.d.ts +14 -0
- package/core/src/mqtt.js +82 -0
- package/core/src/mqtt.js.map +1 -0
- package/core/src/offscreen.d.ts +4 -1
- package/core/src/offscreen.js +24 -26
- package/core/src/options.d.ts +1 -3
- package/core/src/options.js +0 -2
- package/core/src/poll.js +39 -0
- package/core/src/preview.d.ts +13 -2
- package/core/src/preview.js +43 -144
- package/core/src/renderLayer.d.ts +9 -11
- package/core/src/renderLayer.js +61 -60
- package/core/src/socket.d.ts +10 -0
- package/core/src/socket.js +51 -0
- package/core/src/socket.js.map +1 -0
- package/core/src/utils/canvas.js +1 -1
- package/core/src/utils/construction.d.ts +3 -36
- package/core/src/utils/construction.js +1 -29
- package/core/src/utils/conversion.d.ts +0 -15
- package/core/src/utils/conversion.js +0 -319
- package/core/src/utils/dom.d.ts +8 -0
- package/core/src/utils/dom.js +67 -0
- package/core/src/utils/dom.js.map +1 -0
- package/core/src/utils/index.d.ts +1 -2
- package/core/src/utils/index.js +1 -2
- package/core/src/utils/onmousevent.d.ts +0 -3
- package/core/src/utils/onmousevent.js +10 -42
- package/flow-diagram/src/comment/comment.anchor.d.ts +1 -1
- package/flow-diagram/src/comment/comment.anchor.js +1 -1
- package/flow-diagram/src/comment/comment.d.ts +1 -1
- package/flow-diagram/src/data/data.anchor.d.ts +1 -1
- package/flow-diagram/src/data/data.anchor.js +1 -1
- package/flow-diagram/src/data/data.d.ts +1 -1
- package/flow-diagram/src/data/data.rect.d.ts +1 -1
- package/flow-diagram/src/data/data.rect.js +1 -1
- package/flow-diagram/src/db/db.d.ts +1 -1
- package/flow-diagram/src/db/db.rect.d.ts +1 -1
- package/flow-diagram/src/db/db.rect.js +1 -1
- package/flow-diagram/src/display/display.anchor.d.ts +1 -1
- package/flow-diagram/src/display/display.anchor.js +1 -1
- package/flow-diagram/src/display/display.d.ts +1 -1
- package/flow-diagram/src/display/display.rect.d.ts +1 -1
- package/flow-diagram/src/display/display.rect.js +1 -1
- package/flow-diagram/src/document/document.anchor.d.ts +1 -1
- package/flow-diagram/src/document/document.anchor.js +1 -1
- package/flow-diagram/src/document/document.d.ts +1 -1
- package/flow-diagram/src/document/document.rect.d.ts +1 -1
- package/flow-diagram/src/document/document.rect.js +1 -1
- package/flow-diagram/src/externStorage/externStorage.anchor.d.ts +1 -1
- package/flow-diagram/src/externStorage/externStorage.anchor.js +1 -1
- package/flow-diagram/src/externStorage/externStorage.d.ts +1 -1
- package/flow-diagram/src/externStorage/externStorage.rect.d.ts +1 -1
- package/flow-diagram/src/externStorage/externStorage.rect.js +1 -1
- package/flow-diagram/src/internalStorage/internalStorage.d.ts +1 -1
- package/flow-diagram/src/internalStorage/internalStorage.rect.d.ts +1 -1
- package/flow-diagram/src/internalStorage/internalStorage.rect.js +1 -1
- package/flow-diagram/src/manually/manually.anchor.d.ts +1 -1
- package/flow-diagram/src/manually/manually.anchor.js +1 -1
- package/flow-diagram/src/manually/manually.d.ts +1 -1
- package/flow-diagram/src/manually/manually.rect.d.ts +1 -1
- package/flow-diagram/src/manually/manually.rect.js +1 -1
- package/flow-diagram/src/parallel/parallel.anchor.d.ts +1 -1
- package/flow-diagram/src/parallel/parallel.anchor.js +1 -1
- package/flow-diagram/src/parallel/parallel.d.ts +1 -1
- package/flow-diagram/src/queue/queue.d.ts +1 -1
- package/flow-diagram/src/queue/queue.rect.d.ts +1 -1
- package/flow-diagram/src/queue/queue.rect.js +1 -1
- package/flow-diagram/src/register.js +1 -1
- package/flow-diagram/src/subprocess/subprocess.d.ts +1 -1
- package/flow-diagram/src/subprocess/subprocess.rect.d.ts +1 -1
- package/flow-diagram/src/subprocess/subprocess.rect.js +1 -1
- package/layout/src/align.d.ts +1 -1
- package/layout/src/align.js +1 -1
- package/layout/src/layout.d.ts +1 -1
- package/layout/src/layout.js +1 -1
- package/myShape-diagram/{index.js → myShape.js} +1 -4
- package/package.json +1 -1
- package/sequence-diagram/src/focus/focus.anchor.d.ts +1 -1
- package/sequence-diagram/src/focus/focus.anchor.js +1 -1
- package/sequence-diagram/src/focus/focus.d.ts +1 -1
- package/sequence-diagram/src/focus/focus.rect.d.ts +1 -1
- package/sequence-diagram/src/focus/focus.rect.js +1 -1
- package/sequence-diagram/src/lifeline/lifeline.anchor.d.ts +1 -1
- package/sequence-diagram/src/lifeline/lifeline.anchor.js +1 -1
- package/sequence-diagram/src/lifeline/lifeline.d.ts +1 -1
- package/sequence-diagram/src/lifeline/lifeline.rect.d.ts +1 -1
- package/sequence-diagram/src/lifeline/lifeline.rect.js +1 -1
- package/sequence-diagram/src/register.js +1 -1
- package/chart-diagram/src/utils/changeOptions.d.ts +0 -8
- package/chart-diagram/src/utils/changeOptions.js +0 -267
- package/chart-diagram/src/utils/conversion.d.ts +0 -19
- package/chart-diagram/src/utils/conversion.js +0 -560
- package/chart-diagram/src/utils/drawGraphic.d.ts +0 -3
- package/chart-diagram/src/utils/drawGraphic.js +0 -97
- package/chart-diagram/src/utils/formatter.d.ts +0 -1
- package/chart-diagram/src/utils/formatter.js +0 -206
- package/chart-diagram/src/utils/index.d.ts +0 -5
- package/chart-diagram/src/utils/index.js +0 -5
- package/chart-diagram/src/utils/render.d.ts +0 -8
- package/chart-diagram/src/utils/render.js +0 -219
- package/chart-diagram/src/utils/surfaceParametricConversion.d.ts +0 -3
- package/chart-diagram/src/utils/surfaceParametricConversion.js +0 -252
- package/core/src/element/common.d.ts +0 -6
- package/core/src/element/common.js +0 -63
- package/core/src/element/datePicker.d.ts +0 -3
- package/core/src/element/datePicker.js +0 -44
- package/core/src/element/iframe.d.ts +0 -3
- package/core/src/element/iframe.js +0 -12
- package/core/src/element/index.d.ts +0 -5
- package/core/src/element/index.js +0 -6
- package/core/src/element/select.d.ts +0 -11
- package/core/src/element/select.js +0 -273
- package/core/src/element/tab.d.ts +0 -1
- package/core/src/element/tab.js +0 -20
- package/core/src/element/time.d.ts +0 -3
- package/core/src/element/time.js +0 -44
- package/core/src/middles/arrows/index.d.ts +0 -4
- package/core/src/middles/arrows/index.js +0 -5
- package/core/src/middles/lines/index.d.ts +0 -4
- package/core/src/middles/lines/index.js +0 -5
- package/core/src/middles/nodes/formDatePicker.d.ts +0 -2
- package/core/src/middles/nodes/formDatePicker.js +0 -107
- package/core/src/middles/nodes/formoverflow.js +0 -61
- package/core/src/middles/nodes/formselect.d.ts +0 -2
- package/core/src/middles/nodes/formselect.js +0 -111
- package/core/src/middles/nodes/iframe.d.ts +0 -2
- package/core/src/middles/nodes/iframe.js +0 -29
- package/core/src/middles/nodes/index.d.ts +0 -51
- package/core/src/middles/nodes/index.js +0 -53
- package/core/src/middles/nodes/switchs.d.ts +0 -2
- package/core/src/middles/nodes/switchs.js +0 -46
- package/core/src/middles/nodes/time.d.ts +0 -2
- package/core/src/middles/nodes/time.js +0 -98
- package/core/src/store/common.d.ts +0 -9
- package/core/src/store/common.js +0 -5
- package/core/src/store/data.d.ts +0 -196
- package/core/src/store/data.js +0 -193
- package/core/src/store/index.d.ts +0 -2
- package/core/src/store/index.js +0 -2
- package/core/src/utils/assignment.d.ts +0 -7
- package/core/src/utils/assignment.js +0 -216
- package/core/src/utils/params.d.ts +0 -3
- package/core/src/utils/params.js +0 -136
- package/static/echartsDefaultData.js +0 -178
- package/static/element.js +0 -14
- package/static/form.js +0 -11
- package/static/index.js +0 -3
- package/store/actions.js +0 -1
- package/store/clear.js +0 -10
- package/store/default.js +0 -22
- package/store/index.js +0 -3
- package/style/common.css +0 -15
- package/style/datePicker.css +0 -44
- package/style/editor.css +0 -16
- package/style/index.css +0 -5
- package/style/select.css +0 -143
- /package/myShape-diagram/{index.ts → myShape.ts} +0 -0
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
// @ts-ignore
|
|
2
|
-
export declare const echartsStaticType: Array<string> = [];
|
|
3
|
-
// @ts-ignore
|
|
4
2
|
export declare const winEventActionFns: Array<string> = [];
|
|
5
3
|
export interface MoveDataType {
|
|
6
4
|
None?: string | number;
|
|
@@ -14,18 +12,20 @@ export interface MoveDataType {
|
|
|
14
12
|
HoverAnchors?: string | number;
|
|
15
13
|
Rotate?: string | number;
|
|
16
14
|
}
|
|
15
|
+
export const moveDataType: MoveDataType;
|
|
17
16
|
export interface DownDataType {
|
|
18
17
|
Window?: string | number;
|
|
19
18
|
Target?: string | number;
|
|
20
19
|
Showhide?: string | number;
|
|
21
20
|
Tabswitch?: string | number;
|
|
22
|
-
Formselect?: string | number;
|
|
23
21
|
}
|
|
22
|
+
export const downDataType: DownDataType;
|
|
24
23
|
export interface PreviewType {
|
|
25
24
|
Dcim?: string;
|
|
26
25
|
Topology?: string;
|
|
27
26
|
Logo?: string;
|
|
28
27
|
}
|
|
28
|
+
export const previewType: PreviewType;
|
|
29
29
|
export interface AnimateType {
|
|
30
30
|
LeftFlow?: string;
|
|
31
31
|
RightFlow?: string;
|
|
@@ -38,37 +38,4 @@ export interface AnimateType {
|
|
|
38
38
|
Show?: string;
|
|
39
39
|
Rotate?: string;
|
|
40
40
|
}
|
|
41
|
-
export interface SelectStaticType {
|
|
42
|
-
static?:number;
|
|
43
|
-
dataShow?:number;
|
|
44
|
-
visible?:number;
|
|
45
|
-
}
|
|
46
|
-
export interface DatePickerBindType {
|
|
47
|
-
echarts?:number;
|
|
48
|
-
tag?:number;
|
|
49
|
-
kpi?:number;
|
|
50
|
-
asset?:number;
|
|
51
|
-
area?:number;
|
|
52
|
-
varType?:number;
|
|
53
|
-
branch?:number;
|
|
54
|
-
word?:number;
|
|
55
|
-
}
|
|
56
|
-
export interface ConfBindValueType {
|
|
57
|
-
increment?:number; // 增量值
|
|
58
|
-
current?:number; // 当前值
|
|
59
|
-
max?:number; // 最大值
|
|
60
|
-
min?:number; // 最小值
|
|
61
|
-
average?:number; // 平均值
|
|
62
|
-
}
|
|
63
|
-
export interface ConfAssociateDateValueShowType {
|
|
64
|
-
real?:number; // 实时值
|
|
65
|
-
date?:number; // 日期值
|
|
66
|
-
}
|
|
67
|
-
export const moveDataType: MoveDataType;
|
|
68
|
-
export const downDataType: DownDataType;
|
|
69
|
-
export const previewType: PreviewType;
|
|
70
41
|
export const animateType: AnimateType;
|
|
71
|
-
export const selectStaticType: SelectStaticType;
|
|
72
|
-
export const datePickerBindType: DatePickerBindType;
|
|
73
|
-
export const confBindValueType: ConfBindValueType;
|
|
74
|
-
export const confAssociateDateValueShowType: ConfAssociateDateValueShowType;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export const echartsStaticType = ['DAY', 'WEEK', 'MONTH', 'YEAR', 'REALTIME', 'CUSTOMIZE'];
|
|
2
1
|
export const winEventActionFns = ['Link', 'DoAnimate', 'DoFn', 'DoWindowFn', 'openImg'];
|
|
3
2
|
export const moveDataType = {
|
|
4
3
|
None: 0,
|
|
@@ -16,8 +15,7 @@ export const downDataType = {
|
|
|
16
15
|
Window: 'window',
|
|
17
16
|
Target: 'target',
|
|
18
17
|
Showhide: 'showhide',
|
|
19
|
-
Tabswitch: 'Tabswitch'
|
|
20
|
-
Formselect: 'Formselect'
|
|
18
|
+
Tabswitch: 'Tabswitch'
|
|
21
19
|
};
|
|
22
20
|
export const previewType = {
|
|
23
21
|
Dcim: 'dcim',
|
|
@@ -35,30 +33,4 @@ export const animateType = {
|
|
|
35
33
|
Error: 'error',
|
|
36
34
|
Show: 'show',
|
|
37
35
|
Rotate: 'rotate'
|
|
38
|
-
};
|
|
39
|
-
export const selectStaticType = {
|
|
40
|
-
static: 1,
|
|
41
|
-
dataShow: 2,
|
|
42
|
-
visible: 3
|
|
43
|
-
};
|
|
44
|
-
export const datePickerBindType = {
|
|
45
|
-
echarts: 1, // echart
|
|
46
|
-
tag: 3, // 测点
|
|
47
|
-
kpi: 6, // 指标
|
|
48
|
-
asset: 9, // 资产
|
|
49
|
-
area: 21, // 区域
|
|
50
|
-
varType: 12, // 变量类型
|
|
51
|
-
branch: 15, // 支路地址
|
|
52
|
-
word: -1 // 文字
|
|
53
|
-
};
|
|
54
|
-
export const confBindValueType = {
|
|
55
|
-
increment: 1, // 增量值
|
|
56
|
-
current: 2, // 当前值
|
|
57
|
-
max: 3, // 最大值
|
|
58
|
-
min: 4, // 最小值
|
|
59
|
-
average: 5 // 平均值
|
|
60
|
-
};
|
|
61
|
-
export const confAssociateDateValueShowType = {
|
|
62
|
-
real: 1, // 实时值
|
|
63
|
-
date: 2 // 日期值
|
|
64
36
|
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {Node} from "../models";
|
|
2
|
-
export declare function pageZoom(): number;
|
|
3
|
-
export declare function datePickerValueFormatting(data: {}): {};
|
|
4
|
-
export declare function getTabConnectSHConf(node: Node): Node;
|
|
5
|
-
export declare function tabStaticOperation(type: string, node: Node, areaData: any, params: object): void;
|
|
6
|
-
export declare function tabHideShowOperation(node: any, areaData: any, visible: boolean): void;
|
|
7
|
-
export declare function getEchartsRealData(node: {}, data: []): void;
|
|
8
|
-
export declare function setInitConfData(id: string, data: object): void;
|
|
9
|
-
export declare function setTagIdData(data: any): [];
|
|
10
|
-
export declare function setKpiAddrData(data: any): [];
|
|
11
|
-
export declare function setAssetIdData(data: any): [];
|
|
12
|
-
export declare function setAreaIdData(data: any): [];
|
|
13
|
-
export declare function setVarValueData(data: any): [];
|
|
14
|
-
export declare function setBranchAddressData(data: any): [];
|
|
15
|
-
export declare function setThreeCategoryIdData(pen: Node, data: any): [];
|
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
import {commonStore} from '../store';
|
|
2
|
-
import {setElementSwitchTabState} from '../element';
|
|
3
|
-
import {echartsStaticType} from '../utils';
|
|
4
|
-
import {datePickerType, datePickerTypeList} from "../../../store";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* yyyy-MM-dd 格式转换
|
|
8
|
-
* @param valueType 默认值类型:1-默认当天
|
|
9
|
-
* @returns {string}
|
|
10
|
-
*/
|
|
11
|
-
// function yyyMMddFormatting(valueType) {
|
|
12
|
-
// if(valueType === 1){
|
|
13
|
-
// // 默认当天
|
|
14
|
-
// return new Date().toISOString().split('T')[0];
|
|
15
|
-
// }
|
|
16
|
-
// }
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* yyyy-MM-dd HH:mm:ss 格式转换
|
|
20
|
-
* @param valueType 默认值类型:1-默认当天
|
|
21
|
-
* @returns {string}
|
|
22
|
-
*/
|
|
23
|
-
// function yyyMMddHHmmssFormatting(valueType) {
|
|
24
|
-
// if(valueType === 1){
|
|
25
|
-
// // 默认当天
|
|
26
|
-
// return new Date().toISOString().replace('T', ' ').substring(0, 19);
|
|
27
|
-
// }
|
|
28
|
-
// }
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* yyyy 格式转换
|
|
32
|
-
* @param valueType 默认值类型:1-默认当天
|
|
33
|
-
* @returns {number}
|
|
34
|
-
*/
|
|
35
|
-
// function yyyFormatting(valueType) {
|
|
36
|
-
// if(valueType === 1){
|
|
37
|
-
// // 默认当天
|
|
38
|
-
// return new new Date().getFullYear();
|
|
39
|
-
// }
|
|
40
|
-
// }
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* yyyy-MM 格式转换
|
|
44
|
-
* @param valueType 默认值类型:1-默认当天
|
|
45
|
-
* @returns {string}
|
|
46
|
-
*/
|
|
47
|
-
// function yyyMMFormatting(valueType) {
|
|
48
|
-
// if(valueType === 1){
|
|
49
|
-
// // 默认当天
|
|
50
|
-
// return new Date().toISOString().slice(0, 7);
|
|
51
|
-
// }
|
|
52
|
-
// }
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* HH:mm:ss 格式转换
|
|
56
|
-
* @param valueType 默认值类型:1-默认当天
|
|
57
|
-
* @returns {string}
|
|
58
|
-
*/
|
|
59
|
-
// function hhmmssddFormatting(valueType) {
|
|
60
|
-
// if(valueType === 1){
|
|
61
|
-
// // 默认当天
|
|
62
|
-
// Date.prototype.formatTime = function() {
|
|
63
|
-
// return [this.getHours(), this.getMinutes(), this.getSeconds()]
|
|
64
|
-
// .map(v => v.toString().padStart(2, '0')).join(':');
|
|
65
|
-
// };
|
|
66
|
-
// return new Date().formatTime();
|
|
67
|
-
// }
|
|
68
|
-
// }
|
|
69
|
-
export function pageZoom() {
|
|
70
|
-
let screenWidth = 0;
|
|
71
|
-
if(window.screen.width < 1920) {
|
|
72
|
-
// 1920 * 1080分辨率以下的适配
|
|
73
|
-
const zoom = window.screen.width / 1920;
|
|
74
|
-
screenWidth = Math.round(window.screen.width / zoom);
|
|
75
|
-
}else {
|
|
76
|
-
screenWidth = window.screen.width;
|
|
77
|
-
}
|
|
78
|
-
const order = window.screen.width > 1280 ? 12 : 8; // 差值计算
|
|
79
|
-
return window.innerWidth < screenWidth ? (window.innerWidth - order) / screenWidth : 1;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* 日期转换
|
|
84
|
-
* @param data: {formatType: '日期格式', valueType: '默认值类型'}
|
|
85
|
-
* @returns {string}
|
|
86
|
-
*/
|
|
87
|
-
export function datePickerValueFormatting(data) {
|
|
88
|
-
if(!Object.keys(datePickerType).length) {
|
|
89
|
-
// 获取日期类型map数据
|
|
90
|
-
const params = datePickerTypeList.reduce((obj, item) => {
|
|
91
|
-
obj[item['id']] = item.format;
|
|
92
|
-
return obj;
|
|
93
|
-
}, {});
|
|
94
|
-
Object.assign(datePickerType, params);
|
|
95
|
-
}
|
|
96
|
-
let now = new Date(); // data.valueType === 1 默认
|
|
97
|
-
const map = {
|
|
98
|
-
yyyy: now.getFullYear(),
|
|
99
|
-
MM: String(now.getMonth() + 1).padStart(2, '0'),
|
|
100
|
-
dd: String(now.getDate()).padStart(2, '0'),
|
|
101
|
-
HH: String(now.getHours()).padStart(2, '0'),
|
|
102
|
-
mm: String(now.getMinutes()).padStart(2, '0'),
|
|
103
|
-
ss: String(now.getSeconds()).padStart(2, '0')
|
|
104
|
-
};
|
|
105
|
-
const date = data.dateType ? datePickerType[data.dateType].replace(/yyyy|MM|dd|HH|mm|ss/g, match => map[match]) : '';
|
|
106
|
-
const dateStr = data.formatType.replace(/yyyy|MM|dd|HH|mm|ss/g, match => map[match]);
|
|
107
|
-
return {
|
|
108
|
-
date,
|
|
109
|
-
dateStr
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
// tab切换页签删除数据处理
|
|
113
|
-
export function getTabConnectSHConf(node) {
|
|
114
|
-
const switchTabType = node.tags.find((t) => {
|
|
115
|
-
return t.includes('switchTabType');
|
|
116
|
-
}); // 获取按钮组类型
|
|
117
|
-
const topologyChangeData = commonStore[node.TID].switchTabDataPool;
|
|
118
|
-
const tabAreaData = topologyChangeData[`${switchTabType}AreaData`];
|
|
119
|
-
const bindConfIds = node.bindStaticId.split(','); // tab元件绑定的元件id
|
|
120
|
-
const currentNode = [{...node}]; // 需要删除的关联元件数据
|
|
121
|
-
for (let i = 0; i < bindConfIds.length; i++) {
|
|
122
|
-
const id = bindConfIds[i];
|
|
123
|
-
if(tabAreaData[id]) {
|
|
124
|
-
currentNode.push(tabAreaData[id]);
|
|
125
|
-
delete tabAreaData[id];
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
const changeData = topologyChangeData[`${switchTabType}Data`];
|
|
129
|
-
delete changeData[node.id];
|
|
130
|
-
if(Object.keys(changeData).length) {
|
|
131
|
-
// 第一个页签设置选中效果
|
|
132
|
-
const firstNode = Object.values(changeData)[0];
|
|
133
|
-
firstNode.activeImgeIndex = false;
|
|
134
|
-
const firstNodeBindConfIds = firstNode.bindStaticId.split(','); // tab元件绑定的元件id
|
|
135
|
-
// 为绑定的每个元件设置可见
|
|
136
|
-
for (let i = 0; i < firstNodeBindConfIds.length; i++) {
|
|
137
|
-
const tabAreaNode = tabAreaData[firstNodeBindConfIds[i]];
|
|
138
|
-
if(tabAreaNode) {
|
|
139
|
-
tabAreaNode.visible = true;
|
|
140
|
-
tabAreaNode.visibleSwitch = true;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
return currentNode;
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Tab 数据统计
|
|
148
|
-
* @param type 统计类型
|
|
149
|
-
* @param node 元件数据
|
|
150
|
-
* @param areaData tab展示区域数据
|
|
151
|
-
* @param params Tab 切换选中参数
|
|
152
|
-
*/
|
|
153
|
-
export function tabStaticOperation(type, node, areaData, params) {
|
|
154
|
-
if(!node.bindStaticId || !(echartsStaticType.includes(type) || type === 'OTHER')) return;
|
|
155
|
-
const curentEchart = areaData && areaData[node.bindStaticId]; // 获取当前点中的节点绑定的统计图表数据
|
|
156
|
-
if(!curentEchart || !curentEchart.data.params) return console.log('未能找到匹配的echarts图表>>>');
|
|
157
|
-
const currentStore = commonStore[node.TID];
|
|
158
|
-
const echartNode = currentStore.data.pens[curentEchart.order]; // 获取tab 绑定的图表元件数据
|
|
159
|
-
if(type === 'OTHER') {
|
|
160
|
-
const tabCorrelationType = currentStore.echartsDataPool[node.bindStaticId].tabCorrelationType; // 获取select与tab关联的标识
|
|
161
|
-
const optionNode = currentStore.echartsOptionsPool[node.bindStaticId];
|
|
162
|
-
if(tabCorrelationType === 'select') {
|
|
163
|
-
// tab类型为包含在select下的切换则执行下面的逻辑
|
|
164
|
-
echartNode.data.params['tabVisitOrder'] = params.order;
|
|
165
|
-
}else {
|
|
166
|
-
// 非 年、月、日、周、实时类型的切换
|
|
167
|
-
const groupData = currentStore.selectRealDataPool[node.bindStaticId];
|
|
168
|
-
if (optionNode) currentStore.echartsRealDataPool[optionNode.data.id] = currentStore.echartsRealDataPool[groupData[params.order].id];
|
|
169
|
-
}
|
|
170
|
-
if(optionNode) optionNode.data.tabData = {
|
|
171
|
-
type,
|
|
172
|
-
data: params.data
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
echartNode.data.params['staticForType'] = type
|
|
176
|
-
echartNode.elementRendered = false;
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Tab 显示/隐藏切换
|
|
180
|
-
* @param node tab页签数据
|
|
181
|
-
* @param areaData // tab展示区域数据
|
|
182
|
-
* @param isActive
|
|
183
|
-
*/
|
|
184
|
-
export function tabHideShowOperation(node, areaData, isActive) {
|
|
185
|
-
const confIds = node.bindStaticId && node.bindStaticId.split(',') || [];
|
|
186
|
-
const pens = commonStore[node.TID].data.pens;
|
|
187
|
-
for (let i = 0; i < confIds.length; i++) {
|
|
188
|
-
const confid = confIds[i];
|
|
189
|
-
const areaNode = areaData[confid];
|
|
190
|
-
if(!(areaNode && pens[areaNode.order])) return;
|
|
191
|
-
const tagNode = pens[areaNode.order];
|
|
192
|
-
tagNode.visible = !isActive;
|
|
193
|
-
tagNode.visibleSwitch = tagNode.visible;
|
|
194
|
-
setElementSwitchTabState(tagNode);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* 获取echarts和select实时数据
|
|
199
|
-
* @param node 节点
|
|
200
|
-
* @param data 实时数据
|
|
201
|
-
*/
|
|
202
|
-
export function getEchartsRealData(node, data){
|
|
203
|
-
const currentStore = commonStore[node.TID];
|
|
204
|
-
if(!currentStore.selectRealDataPool[node.id]) {
|
|
205
|
-
const selectData = [];
|
|
206
|
-
let currentData = null;
|
|
207
|
-
data.map((item, index) => {
|
|
208
|
-
if(index === 0) currentData = item;
|
|
209
|
-
selectData.push({
|
|
210
|
-
id: item.id,
|
|
211
|
-
name: item.aliasName
|
|
212
|
-
});
|
|
213
|
-
currentStore.echartsRealDataPool[item.id] = item;
|
|
214
|
-
});
|
|
215
|
-
currentStore.echartsRealDataPool[node.id] = currentData;
|
|
216
|
-
currentStore.selectRealDataPool[node.id] = selectData;
|
|
217
|
-
}else {
|
|
218
|
-
const selectId = currentStore.echartsDataPool[node.id] && currentStore.echartsDataPool[node.id].bindId;
|
|
219
|
-
const selected = selectId && currentStore.selectDataPool[selectId] && currentStore.selectDataPool[selectId].node.selected;
|
|
220
|
-
if(selected && selected.id) {
|
|
221
|
-
// 如有选中的数据
|
|
222
|
-
currentStore.echartsRealDataPool[node.id] = currentStore.echartsRealDataPool[selected.id];
|
|
223
|
-
}else {
|
|
224
|
-
currentStore.echartsRealDataPool[node.id] = data[0];
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
export function setInitConfData(id, data){
|
|
229
|
-
if(commonStore[id].initConfNode[data.id]) return;
|
|
230
|
-
const bindMqttNode = data.events.find((ev) => {return ev.type === 3});
|
|
231
|
-
if(!bindMqttNode) return;
|
|
232
|
-
const initNode = {
|
|
233
|
-
text: data.text,
|
|
234
|
-
font: data.font,
|
|
235
|
-
strokeStyle: data.strokeStyle,
|
|
236
|
-
fillStyle: data.fillStyle,
|
|
237
|
-
image: data.image,
|
|
238
|
-
leakageEnd: data.leakageEnd,
|
|
239
|
-
leakageFillStyle: data.leakageFillStyle,
|
|
240
|
-
leakageStart: data.leakageStart
|
|
241
|
-
}
|
|
242
|
-
if(data.name === 'echarts') initNode.data = data.data;
|
|
243
|
-
commonStore[id].initConfNode[data.id] = initNode;
|
|
244
|
-
}
|
|
245
|
-
export function setTagIdData(data) {
|
|
246
|
-
return [{
|
|
247
|
-
"key": "tagId",
|
|
248
|
-
"value": data.tagId,
|
|
249
|
-
"isControlDis": data.isControlDis,
|
|
250
|
-
"type": data.tagType,
|
|
251
|
-
"tagVal": data.value,
|
|
252
|
-
"valExplain": data.valExplain,
|
|
253
|
-
"tagId": data.tagId
|
|
254
|
-
}, {
|
|
255
|
-
"key": "测点名称",
|
|
256
|
-
"value": data.tagName
|
|
257
|
-
}];
|
|
258
|
-
}
|
|
259
|
-
export function setKpiAddrData(data) {
|
|
260
|
-
return [{
|
|
261
|
-
"key": "kpiAddr",
|
|
262
|
-
"value": data.kpiId + '_' + data.kpiAddr,
|
|
263
|
-
"isControlDis": data.isControlDis,
|
|
264
|
-
"type": data.tagType
|
|
265
|
-
}, {
|
|
266
|
-
"key": "指标名称",
|
|
267
|
-
"value": data.kpiName
|
|
268
|
-
}];
|
|
269
|
-
}
|
|
270
|
-
export function setAssetIdData(data) {
|
|
271
|
-
return [{
|
|
272
|
-
"key": "assetId",
|
|
273
|
-
"value": data.id
|
|
274
|
-
}, {
|
|
275
|
-
"key": "资产名称",
|
|
276
|
-
"value": data.name
|
|
277
|
-
}];
|
|
278
|
-
}
|
|
279
|
-
export function setAreaIdData(data) {
|
|
280
|
-
return [{
|
|
281
|
-
"key": "areaId",
|
|
282
|
-
"value": data.id
|
|
283
|
-
}, {
|
|
284
|
-
"key": "区域名称",
|
|
285
|
-
"value": data.name
|
|
286
|
-
}];
|
|
287
|
-
}
|
|
288
|
-
export function setVarValueData(data) {
|
|
289
|
-
return [{
|
|
290
|
-
"key": "varId",
|
|
291
|
-
"value": data.id
|
|
292
|
-
},{
|
|
293
|
-
"key": "varValue",
|
|
294
|
-
"value": data.value
|
|
295
|
-
}, {
|
|
296
|
-
"key": "变量类型名称",
|
|
297
|
-
"value": data.name
|
|
298
|
-
}];
|
|
299
|
-
}
|
|
300
|
-
export function setBranchAddressData(data) {
|
|
301
|
-
return [{
|
|
302
|
-
"key": "branchVal",
|
|
303
|
-
"value": data.value
|
|
304
|
-
}, {
|
|
305
|
-
"key": "支路地址Key",
|
|
306
|
-
"value": data.key
|
|
307
|
-
}];
|
|
308
|
-
}
|
|
309
|
-
export function setThreeCategoryIdData(pen, data) {
|
|
310
|
-
let params = [];
|
|
311
|
-
const hasThreeCategoryId = pen.data.find((tc) => {
|
|
312
|
-
return tc.key === 'threeCategoryId' && tc.value === data.threeCategoryId;
|
|
313
|
-
});
|
|
314
|
-
if(!hasThreeCategoryId) params = [{
|
|
315
|
-
"key": "threeCategoryId",
|
|
316
|
-
"value": data.threeCategoryId
|
|
317
|
-
}];
|
|
318
|
-
return params;
|
|
319
|
-
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Node } from '../models/node';
|
|
2
|
+
// @ts-ignore
|
|
3
|
+
import { TopologyData } from 'dcim-topology/core'
|
|
4
|
+
export declare let DomElements: {};
|
|
5
|
+
export declare function createChildrenDivByElementId(node: Node, data?: TopologyData): HTMLDivElement;
|
|
6
|
+
export declare function setStyleForElementIdDiv(node: Node, elem: HTMLElement, data: TopologyData): void;
|
|
7
|
+
export declare function createDiv(node: Node): HTMLDivElement;
|
|
8
|
+
export declare function loadJS(url: string, callback?: () => void, render?: boolean): void;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Store } from 'le5le-store';
|
|
2
|
+
import { Lock } from 'dcim-topology/core/src/models/status'
|
|
3
|
+
export let DomElements = {};
|
|
4
|
+
export function createChildrenDivByElementId(node, data) {
|
|
5
|
+
if (!DomElements[node.id]) {
|
|
6
|
+
DomElements[node.id] = document.getElementById(node.id);
|
|
7
|
+
if (DomElements[node.id]) {
|
|
8
|
+
document.querySelector('.canvas-point').appendChild(DomElements[node.id]);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
setStyleForElementIdDiv(node, DomElements[node.id], data);
|
|
12
|
+
}
|
|
13
|
+
export function setStyleForElementIdDiv(node, elem, data) {
|
|
14
|
+
if (!elem) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
elem.style.position = 'absolute';
|
|
18
|
+
elem.style.outline = 'none';
|
|
19
|
+
elem.style.left = node.rect.x + 'px';
|
|
20
|
+
elem.style.top = node.rect.y + 'px';
|
|
21
|
+
elem.style.width = node.rect.width + 'px';
|
|
22
|
+
elem.style.height = node.rect.height + 'px';
|
|
23
|
+
if (node.rotate || node.offsetRotate) {
|
|
24
|
+
elem.style.transform = "rotate(" + (node.rotate + node.offsetRotate) + "deg)";
|
|
25
|
+
}
|
|
26
|
+
// if (node.video && this.videos[node.id] && this.videos[node.id].media) {
|
|
27
|
+
// this.videos[node.id].media.style.width = '100%';
|
|
28
|
+
// this.videos[node.id].media.style.height = '100%';
|
|
29
|
+
// }
|
|
30
|
+
if (data && data.locked > Lock.None || node.locked > Lock.None) {
|
|
31
|
+
elem.style.userSelect = 'initial';
|
|
32
|
+
elem.style.pointerEvents = 'initial';
|
|
33
|
+
} else {
|
|
34
|
+
elem.style.userSelect = 'none';
|
|
35
|
+
elem.style.pointerEvents = 'none';
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export function createDiv(node) {
|
|
39
|
+
var div = document.createElement('div');
|
|
40
|
+
div.style.position = 'absolute';
|
|
41
|
+
div.style.outline = 'none';
|
|
42
|
+
div.style.left = '-9999px';
|
|
43
|
+
div.style.bottom = '-9999px';
|
|
44
|
+
div.style.width = node.rect.width + 'px';
|
|
45
|
+
div.style.height = node.rect.height + 'px';
|
|
46
|
+
// if (node.elementId) {
|
|
47
|
+
// div.id = node.elementId;
|
|
48
|
+
// }
|
|
49
|
+
div.id = node.id;
|
|
50
|
+
return div;
|
|
51
|
+
}
|
|
52
|
+
export function loadJS(url, callback, render) {
|
|
53
|
+
var loaderScript = document.createElement('script');
|
|
54
|
+
loaderScript.type = 'text/javascript';
|
|
55
|
+
loaderScript.src = url;
|
|
56
|
+
loaderScript.addEventListener('load', function () {
|
|
57
|
+
if (callback) {
|
|
58
|
+
callback();
|
|
59
|
+
}
|
|
60
|
+
// how to do
|
|
61
|
+
if (render) {
|
|
62
|
+
Store.set('LT:render', true);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
document.body.appendChild(loaderScript);
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=dom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom.js","sourceRoot":"","sources":["../../../../packages/core/src/utils/dom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAIpC,MAAM,UAAU,SAAS,CAAC,IAAU;IAClC,IAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC1C,GAAG,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC;IAChC,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;IAC3B,GAAG,CAAC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC;IAC3B,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;IAC7B,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACzC,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IAC3C,IAAI,IAAI,CAAC,SAAS,EAAE;QAClB,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC;KACzB;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,GAAW,EAAE,QAAqB,EAAE,MAAgB;IACzE,IAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACtD,YAAY,CAAC,IAAI,GAAG,iBAAiB,CAAC;IACtC,YAAY,CAAC,GAAG,GAAG,GAAG,CAAC;IACvB,YAAY,CAAC,gBAAgB,CAAC,MAAM,EAAE;QACpC,IAAI,QAAQ,EAAE;YACZ,QAAQ,EAAE,CAAC;SACZ;QACD,YAAY;QACZ,IAAI,MAAM,EAAE;YACV,KAAK,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;SAC9B;IACH,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;AAC1C,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './canvas';
|
|
2
|
+
export * from './dom';
|
|
2
3
|
export * from './math';
|
|
3
4
|
export * from './rect';
|
|
4
5
|
export * from './uuid';
|
|
@@ -6,5 +7,3 @@ export * from './padding'
|
|
|
6
7
|
export * from './construction';
|
|
7
8
|
export * from './onmousevent';
|
|
8
9
|
export * from './conversion';
|
|
9
|
-
export * from './assignment';
|
|
10
|
-
export * from './params';
|
package/core/src/utils/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './canvas';
|
|
2
|
+
export * from './dom';
|
|
2
3
|
export * from './math';
|
|
3
4
|
export * from './rect';
|
|
4
5
|
export * from './uuid';
|
|
@@ -6,6 +7,4 @@ export * from './padding'
|
|
|
6
7
|
export * from './construction';
|
|
7
8
|
export * from './onmousevent';
|
|
8
9
|
export * from './conversion';
|
|
9
|
-
export * from './assignment';
|
|
10
|
-
export * from './params';
|
|
11
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {Node} from '../models';
|
|
2
|
-
|
|
3
|
-
export declare function setEventListener(e: Event, TID: string, node: Node): any;
|
|
4
1
|
export declare function mousMoveFun(type: string, data: any): object;
|
|
5
2
|
export declare function mousDownFun(type: string, eventNode: object): object;
|
|
6
3
|
export declare function omouseEventPrototDoWindowFn(eventNode: object, node: object): string;
|
|
@@ -1,27 +1,11 @@
|
|
|
1
1
|
import { ptInPolyXY } from './math';
|
|
2
|
-
import { moveDataType, downDataType } from './construction'
|
|
3
|
-
import { Node } from '../models';
|
|
4
|
-
import {elementType} from "../../../static";
|
|
5
|
-
import {getSelectedData} from '../element';
|
|
6
|
-
import {commonStore} from "../store";
|
|
7
|
-
// 配置鼠标事件监听 监听样式 documentDefine
|
|
8
|
-
// 凡是类名为documentDefine的Dom元素都自动注册下面的监听
|
|
9
|
-
export function setEventListener(e, TID) {
|
|
10
|
-
e.preventDefault();
|
|
11
|
-
const documentDefine = document.querySelector('.documentDefine');
|
|
12
|
-
if(!documentDefine) return;
|
|
13
|
-
const currentNode = commonStore[TID].elementInteractivePoor.node; // 当前点击的元件节点数据
|
|
14
|
-
if(currentNode && currentNode.name === elementType.select) {
|
|
15
|
-
// select 下拉 option选中操作
|
|
16
|
-
getSelectedData(e, currentNode);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
2
|
+
import { moveDataType, downDataType } from './construction'
|
|
19
3
|
// 执行window函数
|
|
20
4
|
export function omouseEventPrototDoWindowFn (eventNode, node) {
|
|
21
5
|
|
|
22
6
|
window[eventNode.value](node, eventNode.params);
|
|
23
7
|
|
|
24
|
-
}
|
|
8
|
+
};
|
|
25
9
|
export function mousMoveFun(type, pos, data) {
|
|
26
10
|
let params = {
|
|
27
11
|
order: 0,
|
|
@@ -34,20 +18,10 @@ export function mousMoveFun(type, pos, data) {
|
|
|
34
18
|
|
|
35
19
|
for (var _i = 0, _a = data; _i < _a.length; _i++) {
|
|
36
20
|
var item = _a[_i];
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
// 任意多边形通过点获取区域
|
|
42
|
-
isInPointNode = ptInPolyXY(pos, item.rotatedAnchors);
|
|
43
|
-
}else {
|
|
44
|
-
if(!(item instanceof Node)) item = new Node(item);
|
|
45
|
-
isInPointNode = item.hit(pos);
|
|
46
|
-
}
|
|
47
|
-
if(isInPointNode) {
|
|
48
|
-
params.hoverNode = item;
|
|
49
|
-
params.order = _i;
|
|
50
|
-
}
|
|
21
|
+
const isPoint = ptInPolyXY(pos, item.rotatedAnchors);
|
|
22
|
+
if(isPoint) {
|
|
23
|
+
params.hoverNode = item;
|
|
24
|
+
params.order = _i;
|
|
51
25
|
}
|
|
52
26
|
}
|
|
53
27
|
// 不在此节点上停留
|
|
@@ -65,21 +39,15 @@ export function mousMoveFun(type, pos, data) {
|
|
|
65
39
|
}
|
|
66
40
|
export function mousDownFun(type, eventNode) {
|
|
67
41
|
let params = {};
|
|
68
|
-
if(eventNode === null) return params;
|
|
69
42
|
const action = eventNode ? parseInt(eventNode.action) : 0;
|
|
70
43
|
if(action === 3) {
|
|
71
44
|
params.eventType = downDataType.Window; // 打开会话窗口
|
|
72
|
-
}else if(action === 7)
|
|
73
|
-
//
|
|
74
|
-
params.eventType = downDataType.Showhide;
|
|
45
|
+
}else if(action === 7){
|
|
46
|
+
params.eventType = downDataType.Showhide; // 链接跳转
|
|
75
47
|
params.value = eventNode.value;
|
|
76
|
-
}else if(action === 8)
|
|
48
|
+
}else if(action === 8){
|
|
77
49
|
params.eventType = downDataType.Tabswitch; // Tab切换
|
|
78
|
-
}else
|
|
79
|
-
params.eventType = downDataType.Formselect; // select下拉切换
|
|
80
|
-
// params.staticType = eventNode.dcimStaticForType; // 1: 数据统计;2:数据展示;3:显示隐藏;4:日期类型
|
|
81
|
-
}else {
|
|
82
|
-
// action === 5 远程控制比较特殊,无论是否绑定远程控制事件,只要数据中有远程控制属性且值为0都会认定为远程控制
|
|
50
|
+
} else {
|
|
83
51
|
params.eventType = downDataType.Target; // 链接跳转
|
|
84
52
|
}
|
|
85
53
|
return params;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Node } from '
|
|
1
|
+
import { Node } from 'dcim-topology/core';
|
|
2
2
|
export declare function flowCommentAnchors(node: Node): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Node } from '
|
|
1
|
+
import { Node } from 'dcim-topology/core';
|
|
2
2
|
export declare function flowComment(ctx: CanvasRenderingContext2D, node: Node): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Node } from '
|
|
1
|
+
import { Node } from 'dcim-topology/core';
|
|
2
2
|
export declare function flowDataAnchors(node: Node): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Point, Direction } from '
|
|
1
|
+
import { Point, Direction } from 'dcim-topology/core';
|
|
2
2
|
export function flowDataAnchors(node) {
|
|
3
3
|
node.anchors.push(new Point(node.rect.x + node.rect.width / 14, node.rect.y + node.rect.height / 2, Direction.Left));
|
|
4
4
|
node.anchors.push(new Point(node.rect.x + (node.rect.width * 4) / 7, node.rect.y, Direction.Up));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Node } from '
|
|
1
|
+
import { Node } from 'dcim-topology/core';
|
|
2
2
|
export declare function flowData(ctx: CanvasRenderingContext2D, node: Node): void;
|