dcim-topology2d 2.2.0 → 2.2.3
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/chart-diagram/index.d.ts +1 -1
- package/chart-diagram/index.js +1 -1
- package/chart-diagram/src/echarts/index.js +112 -112
- package/chart-diagram/src/utils/changeOptions.d.ts +8 -8
- package/chart-diagram/src/utils/changeOptions.js +8 -2
- package/chart-diagram/src/utils/conversion.d.ts +19 -19
- package/chart-diagram/src/utils/conversion.js +601 -560
- package/chart-diagram/src/utils/drawGraphic.d.ts +3 -3
- package/chart-diagram/src/utils/drawGraphic.js +97 -97
- package/chart-diagram/src/utils/index.d.ts +5 -5
- package/chart-diagram/src/utils/index.js +5 -5
- package/chart-diagram/src/utils/render.js +4 -0
- package/core/index.js +1 -19
- package/core/src/activeLayer.js +23 -23
- package/core/src/calling.js +32 -33
- package/core/src/common.d.ts +1 -0
- package/core/src/common.js +106 -75
- package/core/src/element/common.js +0 -1
- package/core/src/healps/changeData.js +3 -0
- package/core/src/middles/default.js +3 -1
- package/core/src/middles/index.d.ts +1 -2
- package/core/src/middles/index.js +3 -2
- package/core/src/middles/nodes/formDatePicker.js +1 -0
- package/core/src/middles/nodes/formoverflow.js +17 -16
- package/core/src/middles/nodes/formselect.js +1 -1
- package/core/src/middles/nodes/index.d.ts +2 -1
- package/core/src/middles/nodes/index.js +1 -0
- package/core/src/middles/nodes/progress.d.ts +2 -0
- package/core/src/middles/nodes/progress.js +63 -0
- package/core/src/middles/nodes/progress.js.map +1 -0
- package/core/src/middles/nodes/rectangle.js +54 -15
- package/core/src/models/node.js +7 -0
- package/core/src/models/pen.js +10 -1
- package/core/src/preview.js +63 -37
- package/core/src/store/data.d.ts +9 -0
- package/core/src/store/data.js +5 -0
- package/core/src/utils/assignment.d.ts +1 -1
- package/core/src/utils/assignment.js +18 -5
- package/package.json +1 -1
- package/static/echartsDefaultData.js +178 -178
- package/store/actions.js +2 -1
- package/store/clear.js +4 -0
- /package/myShape-diagram/{index.ts → index.d.ts} +0 -0
|
@@ -1,178 +1,178 @@
|
|
|
1
|
-
// 图例默认数据
|
|
2
|
-
export const echartsLegendDefaultData = {
|
|
3
|
-
icon: 'rect', // 图标类型:'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow', 'none'
|
|
4
|
-
itemWidth: 12, // 图标宽
|
|
5
|
-
itemHeight: 12, // 图标高
|
|
6
|
-
itemGap: 8, // 图例之间的间隔
|
|
7
|
-
top: '0%', // 图例距离容器上边位置
|
|
8
|
-
right: 'auto', // 图例距离容器右边位置
|
|
9
|
-
bottom: 'auto', // 图例距离容器下边位置
|
|
10
|
-
left: '60', // 图例距离容器左边位置
|
|
11
|
-
padding: [20, 0, 0, 0], // 图例内边距 string
|
|
12
|
-
color: '#fff', // 文字颜色
|
|
13
|
-
height: 8, // 文本显示高度 number
|
|
14
|
-
fontSize: 12 // 文字大小 number
|
|
15
|
-
};
|
|
16
|
-
// 柱状图和折线图默认标注
|
|
17
|
-
export const echartsLineBarDefaultLegendData = {
|
|
18
|
-
data: ['标注1'],
|
|
19
|
-
icon: 'rich',
|
|
20
|
-
show: true,
|
|
21
|
-
itemWidth: 14,
|
|
22
|
-
itemHeight: 14,
|
|
23
|
-
textStyle: {
|
|
24
|
-
color: '#C6D1DB',
|
|
25
|
-
fontSize: '14px',
|
|
26
|
-
},
|
|
27
|
-
top: '12%',
|
|
28
|
-
left: '10%',
|
|
29
|
-
itemGap: 8
|
|
30
|
-
};
|
|
31
|
-
// 曲线默认配置数据
|
|
32
|
-
export const echartsLineSeriesStyleData = {
|
|
33
|
-
smooth: false,
|
|
34
|
-
symbol: 'none',
|
|
35
|
-
symbolSize: 18,
|
|
36
|
-
itemLineStyle:{
|
|
37
|
-
color: '#2F86ED', //改变折线颜色
|
|
38
|
-
type: 'solid',
|
|
39
|
-
width: 1
|
|
40
|
-
},
|
|
41
|
-
area: false, // 是否是区域图
|
|
42
|
-
linear: false, // 是否是线性渐变
|
|
43
|
-
areaColor: {
|
|
44
|
-
type: 'linear',
|
|
45
|
-
x: 0,
|
|
46
|
-
y: 0,
|
|
47
|
-
x2: 0,
|
|
48
|
-
y2: 1,
|
|
49
|
-
global: false // 缺省为 false
|
|
50
|
-
},
|
|
51
|
-
areaColorStops:[{
|
|
52
|
-
offset: 0,
|
|
53
|
-
color: 'rgba(49, 144, 255, 0.21)' // 0% 处的颜色
|
|
54
|
-
}, {
|
|
55
|
-
offset: 1,
|
|
56
|
-
color: 'rgba(49, 144, 255, 0)' // 100% 处的颜色
|
|
57
|
-
}]
|
|
58
|
-
}
|
|
59
|
-
// 图表X轴默认配置数据
|
|
60
|
-
export const echartsXAxisDefaultStyleData = {
|
|
61
|
-
x1AxisLabel: {
|
|
62
|
-
color: '#fff',
|
|
63
|
-
fontSize:"12"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
// 图表Y轴默认配置数据
|
|
67
|
-
export const echartsYAxisDefaultStyleData = {
|
|
68
|
-
ySplitLineShow: true, // y轴轴线是否显示
|
|
69
|
-
//坐标轴线样式
|
|
70
|
-
ysplitLineLineStyle: {
|
|
71
|
-
type: 'solid', //solid实线;dashed虚线
|
|
72
|
-
color: 'rgba(148, 147, 197, 0.5)'
|
|
73
|
-
},
|
|
74
|
-
y1axisLabelTextStyle: {
|
|
75
|
-
//坐标轴颜色
|
|
76
|
-
color: '#fff',
|
|
77
|
-
fontSize:"12",
|
|
78
|
-
padding: 5
|
|
79
|
-
},
|
|
80
|
-
// y轴刻度最大最小值和分隔值
|
|
81
|
-
y1MinMaxData: {
|
|
82
|
-
min: 0,
|
|
83
|
-
max: 60,
|
|
84
|
-
interval: 20
|
|
85
|
-
},
|
|
86
|
-
// y轴名称
|
|
87
|
-
y1NameData: {
|
|
88
|
-
name: '℃',
|
|
89
|
-
nameTextStyle: {
|
|
90
|
-
color: '#FDFDFD',
|
|
91
|
-
padding: [0, 0, 0, -52],
|
|
92
|
-
},
|
|
93
|
-
nameGap: 25
|
|
94
|
-
},
|
|
95
|
-
// y轴刻度标签文字样式
|
|
96
|
-
y2axisLabelTextStyle: {
|
|
97
|
-
//坐标轴颜色
|
|
98
|
-
color: '#fff',
|
|
99
|
-
fontSize:"12",
|
|
100
|
-
padding: 5
|
|
101
|
-
},
|
|
102
|
-
y2MinMaxData: {
|
|
103
|
-
name: '%',
|
|
104
|
-
nameTextStyle: {
|
|
105
|
-
color: '#FDFDFD',
|
|
106
|
-
padding: [0, -42, 0, 0],
|
|
107
|
-
},
|
|
108
|
-
nameGap: 25
|
|
109
|
-
},
|
|
110
|
-
y2NameData: {
|
|
111
|
-
min: 0,
|
|
112
|
-
max: 90,
|
|
113
|
-
interval: 30
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
// 图表的数据缩放
|
|
117
|
-
export const echartsDataRoom = [{ //给x轴设置滚动条
|
|
118
|
-
start: 0, //默认为0
|
|
119
|
-
end: 50, //默认为100
|
|
120
|
-
type: 'slider',
|
|
121
|
-
show: false,
|
|
122
|
-
xAxisIndex: [0],
|
|
123
|
-
handleSize: 10, //滑动条的 左右2个滑动条的大小
|
|
124
|
-
height: 0, //组件高度
|
|
125
|
-
}, { //下面这个属性是里面拖到
|
|
126
|
-
type: 'inside',
|
|
127
|
-
show: true,
|
|
128
|
-
xAxisIndex: [0],
|
|
129
|
-
start: 0, //默认为1
|
|
130
|
-
end: 50 // 100 - 1500 / 31, //默认为100
|
|
131
|
-
}];
|
|
132
|
-
// 图表类型Map
|
|
133
|
-
export const echartsTypeMap = {
|
|
134
|
-
'type_1': 'line',
|
|
135
|
-
'type_2': 'bar',
|
|
136
|
-
'type_3': 'ring',
|
|
137
|
-
'type_4': 'TOP',
|
|
138
|
-
'type_5': 'pie',
|
|
139
|
-
'type_6': 'gauge'
|
|
140
|
-
};
|
|
141
|
-
// 图表颜色
|
|
142
|
-
export const echartsColorData = [
|
|
143
|
-
'#2648E9',
|
|
144
|
-
'#E513F7',
|
|
145
|
-
'#79E10E',
|
|
146
|
-
'#0D9BE7',
|
|
147
|
-
'#23CEE2',
|
|
148
|
-
'#E5B903',
|
|
149
|
-
'#2BDB8E',
|
|
150
|
-
'#CAD804',
|
|
151
|
-
'#117BEE',
|
|
152
|
-
'#DB8407',
|
|
153
|
-
'#E72B2B',
|
|
154
|
-
'#E96812',
|
|
155
|
-
'#7612D6',
|
|
156
|
-
'#A117B8',
|
|
157
|
-
'rgb(21, 151, 224)',
|
|
158
|
-
'rgb(36, 220, 132)',
|
|
159
|
-
'rgb(154, 77, 251)',
|
|
160
|
-
'rgb(226, 182, 56)',
|
|
161
|
-
'rgb(253, 92, 71)',
|
|
162
|
-
'rgb(175, 215, 14)',
|
|
163
|
-
'rgb(214, 154, 37)',
|
|
164
|
-
'rgb(66, 251, 251)',
|
|
165
|
-
'rgb(255, 158, 4)',
|
|
166
|
-
'rgb(19, 236, 236)',
|
|
167
|
-
'rgb(68, 237, 146)',
|
|
168
|
-
'rgb(251, 94, 45)',
|
|
169
|
-
'rgb(18, 255, 113)'];
|
|
170
|
-
// TOP排行榜默认颜色
|
|
171
|
-
export const rankingTopColorList = [
|
|
172
|
-
'rgba(239, 120, 66, .6)',
|
|
173
|
-
'rgba(255, 225, 65, .5)',
|
|
174
|
-
'rgba(55, 240, 151, .5)',
|
|
175
|
-
'rgba(72, 211, 255, .6)',
|
|
176
|
-
'rgba(67, 153, 255, .5)'
|
|
177
|
-
];
|
|
178
|
-
export const rankingTopImageName = ['orange', 'yellow', 'ching', 'lightBlue', 'blue'];
|
|
1
|
+
// 图例默认数据
|
|
2
|
+
export const echartsLegendDefaultData = {
|
|
3
|
+
icon: 'rect', // 图标类型:'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow', 'none'
|
|
4
|
+
itemWidth: 12, // 图标宽
|
|
5
|
+
itemHeight: 12, // 图标高
|
|
6
|
+
itemGap: 8, // 图例之间的间隔
|
|
7
|
+
top: '0%', // 图例距离容器上边位置
|
|
8
|
+
right: 'auto', // 图例距离容器右边位置
|
|
9
|
+
bottom: 'auto', // 图例距离容器下边位置
|
|
10
|
+
left: '60', // 图例距离容器左边位置
|
|
11
|
+
padding: [20, 0, 0, 0], // 图例内边距 string
|
|
12
|
+
color: '#fff', // 文字颜色
|
|
13
|
+
height: 8, // 文本显示高度 number
|
|
14
|
+
fontSize: 12 // 文字大小 number
|
|
15
|
+
};
|
|
16
|
+
// 柱状图和折线图默认标注
|
|
17
|
+
export const echartsLineBarDefaultLegendData = {
|
|
18
|
+
data: ['标注1'],
|
|
19
|
+
icon: 'rich',
|
|
20
|
+
show: true,
|
|
21
|
+
itemWidth: 14,
|
|
22
|
+
itemHeight: 14,
|
|
23
|
+
textStyle: {
|
|
24
|
+
color: '#C6D1DB',
|
|
25
|
+
fontSize: '14px',
|
|
26
|
+
},
|
|
27
|
+
top: '12%',
|
|
28
|
+
left: '10%',
|
|
29
|
+
itemGap: 8
|
|
30
|
+
};
|
|
31
|
+
// 曲线默认配置数据
|
|
32
|
+
export const echartsLineSeriesStyleData = {
|
|
33
|
+
smooth: false,
|
|
34
|
+
symbol: 'none',
|
|
35
|
+
symbolSize: 18,
|
|
36
|
+
itemLineStyle:{
|
|
37
|
+
color: '#2F86ED', //改变折线颜色
|
|
38
|
+
type: 'solid',
|
|
39
|
+
width: 1
|
|
40
|
+
},
|
|
41
|
+
area: false, // 是否是区域图
|
|
42
|
+
linear: false, // 是否是线性渐变
|
|
43
|
+
areaColor: {
|
|
44
|
+
type: 'linear',
|
|
45
|
+
x: 0,
|
|
46
|
+
y: 0,
|
|
47
|
+
x2: 0,
|
|
48
|
+
y2: 1,
|
|
49
|
+
global: false // 缺省为 false
|
|
50
|
+
},
|
|
51
|
+
areaColorStops:[{
|
|
52
|
+
offset: 0,
|
|
53
|
+
color: 'rgba(49, 144, 255, 0.21)' // 0% 处的颜色
|
|
54
|
+
}, {
|
|
55
|
+
offset: 1,
|
|
56
|
+
color: 'rgba(49, 144, 255, 0)' // 100% 处的颜色
|
|
57
|
+
}]
|
|
58
|
+
}
|
|
59
|
+
// 图表X轴默认配置数据
|
|
60
|
+
export const echartsXAxisDefaultStyleData = {
|
|
61
|
+
x1AxisLabel: {
|
|
62
|
+
color: '#fff',
|
|
63
|
+
fontSize:"12"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
// 图表Y轴默认配置数据
|
|
67
|
+
export const echartsYAxisDefaultStyleData = {
|
|
68
|
+
ySplitLineShow: true, // y轴轴线是否显示
|
|
69
|
+
//坐标轴线样式
|
|
70
|
+
ysplitLineLineStyle: {
|
|
71
|
+
type: 'solid', //solid实线;dashed虚线
|
|
72
|
+
color: 'rgba(148, 147, 197, 0.5)'
|
|
73
|
+
},
|
|
74
|
+
y1axisLabelTextStyle: {
|
|
75
|
+
//坐标轴颜色
|
|
76
|
+
color: '#fff',
|
|
77
|
+
fontSize:"12",
|
|
78
|
+
padding: 5
|
|
79
|
+
},
|
|
80
|
+
// y轴刻度最大最小值和分隔值
|
|
81
|
+
y1MinMaxData: {
|
|
82
|
+
min: 0,
|
|
83
|
+
max: 60,
|
|
84
|
+
interval: 20
|
|
85
|
+
},
|
|
86
|
+
// y轴名称
|
|
87
|
+
y1NameData: {
|
|
88
|
+
name: '℃',
|
|
89
|
+
nameTextStyle: {
|
|
90
|
+
color: '#FDFDFD',
|
|
91
|
+
padding: [0, 0, 0, -52],
|
|
92
|
+
},
|
|
93
|
+
nameGap: 25
|
|
94
|
+
},
|
|
95
|
+
// y轴刻度标签文字样式
|
|
96
|
+
y2axisLabelTextStyle: {
|
|
97
|
+
//坐标轴颜色
|
|
98
|
+
color: '#fff',
|
|
99
|
+
fontSize:"12",
|
|
100
|
+
padding: 5
|
|
101
|
+
},
|
|
102
|
+
y2MinMaxData: {
|
|
103
|
+
name: '%',
|
|
104
|
+
nameTextStyle: {
|
|
105
|
+
color: '#FDFDFD',
|
|
106
|
+
padding: [0, -42, 0, 0],
|
|
107
|
+
},
|
|
108
|
+
nameGap: 25
|
|
109
|
+
},
|
|
110
|
+
y2NameData: {
|
|
111
|
+
min: 0,
|
|
112
|
+
max: 90,
|
|
113
|
+
interval: 30
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
// 图表的数据缩放
|
|
117
|
+
export const echartsDataRoom = [{ //给x轴设置滚动条
|
|
118
|
+
start: 0, //默认为0
|
|
119
|
+
end: 50, //默认为100
|
|
120
|
+
type: 'slider',
|
|
121
|
+
show: false,
|
|
122
|
+
xAxisIndex: [0],
|
|
123
|
+
handleSize: 10, //滑动条的 左右2个滑动条的大小
|
|
124
|
+
height: 0, //组件高度
|
|
125
|
+
}, { //下面这个属性是里面拖到
|
|
126
|
+
type: 'inside',
|
|
127
|
+
show: true,
|
|
128
|
+
xAxisIndex: [0],
|
|
129
|
+
start: 0, //默认为1
|
|
130
|
+
end: 50 // 100 - 1500 / 31, //默认为100
|
|
131
|
+
}];
|
|
132
|
+
// 图表类型Map
|
|
133
|
+
export const echartsTypeMap = {
|
|
134
|
+
'type_1': 'line',
|
|
135
|
+
'type_2': 'bar',
|
|
136
|
+
'type_3': 'ring',
|
|
137
|
+
'type_4': 'TOP',
|
|
138
|
+
'type_5': 'pie',
|
|
139
|
+
'type_6': 'gauge'
|
|
140
|
+
};
|
|
141
|
+
// 图表颜色
|
|
142
|
+
export const echartsColorData = [
|
|
143
|
+
'#2648E9',
|
|
144
|
+
'#E513F7',
|
|
145
|
+
'#79E10E',
|
|
146
|
+
'#0D9BE7',
|
|
147
|
+
'#23CEE2',
|
|
148
|
+
'#E5B903',
|
|
149
|
+
'#2BDB8E',
|
|
150
|
+
'#CAD804',
|
|
151
|
+
'#117BEE',
|
|
152
|
+
'#DB8407',
|
|
153
|
+
'#E72B2B',
|
|
154
|
+
'#E96812',
|
|
155
|
+
'#7612D6',
|
|
156
|
+
'#A117B8',
|
|
157
|
+
'rgb(21, 151, 224)',
|
|
158
|
+
'rgb(36, 220, 132)',
|
|
159
|
+
'rgb(154, 77, 251)',
|
|
160
|
+
'rgb(226, 182, 56)',
|
|
161
|
+
'rgb(253, 92, 71)',
|
|
162
|
+
'rgb(175, 215, 14)',
|
|
163
|
+
'rgb(214, 154, 37)',
|
|
164
|
+
'rgb(66, 251, 251)',
|
|
165
|
+
'rgb(255, 158, 4)',
|
|
166
|
+
'rgb(19, 236, 236)',
|
|
167
|
+
'rgb(68, 237, 146)',
|
|
168
|
+
'rgb(251, 94, 45)',
|
|
169
|
+
'rgb(18, 255, 113)'];
|
|
170
|
+
// TOP排行榜默认颜色
|
|
171
|
+
export const rankingTopColorList = [
|
|
172
|
+
'rgba(239, 120, 66, .6)',
|
|
173
|
+
'rgba(255, 225, 65, .5)',
|
|
174
|
+
'rgba(55, 240, 151, .5)',
|
|
175
|
+
'rgba(72, 211, 255, .6)',
|
|
176
|
+
'rgba(67, 153, 255, .5)'
|
|
177
|
+
];
|
|
178
|
+
export const rankingTopImageName = ['orange', 'yellow', 'ching', 'lightBlue', 'blue'];
|
package/store/actions.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export const plugsPool = {};
|
|
1
|
+
export const plugsPool = {};
|
|
2
|
+
export const tabsPageContentData = {};
|
package/store/clear.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import {setEventListener} from "../core";
|
|
2
|
+
import {tabsPageContentData} from "./actions";
|
|
2
3
|
export const removeAllElement = function (){
|
|
4
|
+
for (let key of Object.keys(tabsPageContentData)) {
|
|
5
|
+
delete tabsPageContentData[key];
|
|
6
|
+
}
|
|
3
7
|
const documentDefineEle = document.querySelectorAll('.documentDefine');
|
|
4
8
|
if(documentDefineEle) {
|
|
5
9
|
documentDefineEle.forEach(function(element) {
|
|
File without changes
|