dcim-topology2d 2.1.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.
Files changed (215) hide show
  1. package/activity-diagram/src/final/final.d.ts +1 -1
  2. package/activity-diagram/src/final/final.rect.d.ts +1 -1
  3. package/activity-diagram/src/final/final.rect.js +1 -1
  4. package/activity-diagram/src/fork/fork.anchor.d.ts +1 -1
  5. package/activity-diagram/src/fork/fork.anchor.js +1 -1
  6. package/activity-diagram/src/fork/fork.d.ts +1 -1
  7. package/activity-diagram/src/fork/fork.rect.d.ts +1 -1
  8. package/activity-diagram/src/fork/fork.rect.js +1 -1
  9. package/activity-diagram/src/register.js +1 -1
  10. package/activity-diagram/src/swimlaneH/swimlaneH.d.ts +1 -1
  11. package/activity-diagram/src/swimlaneH/swimlaneH.rect.d.ts +1 -1
  12. package/activity-diagram/src/swimlaneH/swimlaneH.rect.js +1 -1
  13. package/activity-diagram/src/swimlaneV/swimlaneV.d.ts +1 -1
  14. package/activity-diagram/src/swimlaneV/swimlaneV.rect.d.ts +1 -1
  15. package/activity-diagram/src/swimlaneV/swimlaneV.rect.js +1 -1
  16. package/chart-diagram/index.d.ts +1 -3
  17. package/chart-diagram/index.js +1 -2
  18. package/chart-diagram/src/echarts/index.d.ts +2 -1
  19. package/chart-diagram/src/echarts/index.js +104 -109
  20. package/chart-diagram/src/register.js +8 -9
  21. package/class-diagram/src/class/class.d.ts +1 -1
  22. package/class-diagram/src/class/class.rect.d.ts +1 -1
  23. package/class-diagram/src/class/class.rect.js +1 -1
  24. package/class-diagram/src/register.js +1 -1
  25. package/core/index.d.ts +0 -2
  26. package/core/index.js +0 -2
  27. package/core/src/activeLayer.d.ts +10 -2
  28. package/core/src/activeLayer.js +47 -42
  29. package/core/src/animateLayer.d.ts +7 -3
  30. package/core/src/animateLayer.js +12 -10
  31. package/core/src/calling.d.ts +4 -1
  32. package/core/src/calling.js +41 -43
  33. package/core/src/canvas.d.ts +6 -1
  34. package/core/src/canvas.js +21 -22
  35. package/core/src/common.d.ts +7 -6
  36. package/core/src/common.js +674 -341
  37. package/core/src/core.d.ts +4 -5
  38. package/core/src/core.js +385 -522
  39. package/core/src/divLayer.d.ts +36 -2
  40. package/core/src/divLayer.js +305 -33
  41. package/core/src/healps/changeData.d.ts +2 -1
  42. package/core/src/healps/changeData.js +66 -32
  43. package/core/src/hoverLayer.d.ts +9 -2
  44. package/core/src/hoverLayer.js +34 -31
  45. package/core/src/middles/default.d.ts +3 -1
  46. package/core/src/middles/default.js +51 -59
  47. package/core/src/middles/index.js +2 -3
  48. package/core/src/middles/nodes/arbitrarygraph.js +9 -11
  49. package/core/src/middles/nodes/pentagon.rect.js +1 -1
  50. package/core/src/middles/nodes/rectangle.rect.js +1 -1
  51. package/core/src/models/data.d.ts +26 -0
  52. package/core/src/models/data.js +77 -0
  53. package/core/src/models/data.js.map +1 -0
  54. package/core/src/models/index.d.ts +1 -0
  55. package/core/src/models/index.js +1 -0
  56. package/core/src/models/node.d.ts +0 -10
  57. package/core/src/models/node.js +36 -81
  58. package/core/src/models/pen.js +59 -19
  59. package/core/src/models/rect.js +2 -2
  60. package/core/src/mqtt.d.ts +14 -0
  61. package/core/src/mqtt.js +82 -0
  62. package/core/src/mqtt.js.map +1 -0
  63. package/core/src/offscreen.d.ts +4 -1
  64. package/core/src/offscreen.js +8 -10
  65. package/core/src/options.d.ts +1 -3
  66. package/core/src/options.js +0 -2
  67. package/core/src/poll.js +39 -0
  68. package/core/src/preview.d.ts +13 -2
  69. package/core/src/preview.js +43 -135
  70. package/core/src/renderLayer.d.ts +9 -11
  71. package/core/src/renderLayer.js +61 -60
  72. package/core/src/socket.d.ts +10 -0
  73. package/core/src/socket.js +51 -0
  74. package/core/src/socket.js.map +1 -0
  75. package/core/src/utils/canvas.js +1 -1
  76. package/core/src/utils/construction.d.ts +3 -12
  77. package/core/src/utils/construction.js +1 -8
  78. package/core/src/utils/conversion.d.ts +0 -13
  79. package/core/src/utils/conversion.js +0 -210
  80. package/core/src/utils/dom.d.ts +8 -0
  81. package/core/src/utils/dom.js +67 -0
  82. package/core/src/utils/dom.js.map +1 -0
  83. package/core/src/utils/index.d.ts +1 -2
  84. package/core/src/utils/index.js +1 -2
  85. package/core/src/utils/math.d.ts +0 -1
  86. package/core/src/utils/math.js +0 -3
  87. package/core/src/utils/onmousevent.d.ts +0 -3
  88. package/core/src/utils/onmousevent.js +10 -42
  89. package/flow-diagram/src/comment/comment.anchor.d.ts +1 -1
  90. package/flow-diagram/src/comment/comment.anchor.js +1 -1
  91. package/flow-diagram/src/comment/comment.d.ts +1 -1
  92. package/flow-diagram/src/data/data.anchor.d.ts +1 -1
  93. package/flow-diagram/src/data/data.anchor.js +1 -1
  94. package/flow-diagram/src/data/data.d.ts +1 -1
  95. package/flow-diagram/src/data/data.rect.d.ts +1 -1
  96. package/flow-diagram/src/data/data.rect.js +1 -1
  97. package/flow-diagram/src/db/db.d.ts +1 -1
  98. package/flow-diagram/src/db/db.rect.d.ts +1 -1
  99. package/flow-diagram/src/db/db.rect.js +1 -1
  100. package/flow-diagram/src/display/display.anchor.d.ts +1 -1
  101. package/flow-diagram/src/display/display.anchor.js +1 -1
  102. package/flow-diagram/src/display/display.d.ts +1 -1
  103. package/flow-diagram/src/display/display.rect.d.ts +1 -1
  104. package/flow-diagram/src/display/display.rect.js +1 -1
  105. package/flow-diagram/src/document/document.anchor.d.ts +1 -1
  106. package/flow-diagram/src/document/document.anchor.js +1 -1
  107. package/flow-diagram/src/document/document.d.ts +1 -1
  108. package/flow-diagram/src/document/document.rect.d.ts +1 -1
  109. package/flow-diagram/src/document/document.rect.js +1 -1
  110. package/flow-diagram/src/externStorage/externStorage.anchor.d.ts +1 -1
  111. package/flow-diagram/src/externStorage/externStorage.anchor.js +1 -1
  112. package/flow-diagram/src/externStorage/externStorage.d.ts +1 -1
  113. package/flow-diagram/src/externStorage/externStorage.rect.d.ts +1 -1
  114. package/flow-diagram/src/externStorage/externStorage.rect.js +1 -1
  115. package/flow-diagram/src/internalStorage/internalStorage.d.ts +1 -1
  116. package/flow-diagram/src/internalStorage/internalStorage.rect.d.ts +1 -1
  117. package/flow-diagram/src/internalStorage/internalStorage.rect.js +1 -1
  118. package/flow-diagram/src/manually/manually.anchor.d.ts +1 -1
  119. package/flow-diagram/src/manually/manually.anchor.js +1 -1
  120. package/flow-diagram/src/manually/manually.d.ts +1 -1
  121. package/flow-diagram/src/manually/manually.rect.d.ts +1 -1
  122. package/flow-diagram/src/manually/manually.rect.js +1 -1
  123. package/flow-diagram/src/parallel/parallel.anchor.d.ts +1 -1
  124. package/flow-diagram/src/parallel/parallel.anchor.js +1 -1
  125. package/flow-diagram/src/parallel/parallel.d.ts +1 -1
  126. package/flow-diagram/src/queue/queue.d.ts +1 -1
  127. package/flow-diagram/src/queue/queue.rect.d.ts +1 -1
  128. package/flow-diagram/src/queue/queue.rect.js +1 -1
  129. package/flow-diagram/src/register.js +1 -1
  130. package/flow-diagram/src/subprocess/subprocess.d.ts +1 -1
  131. package/flow-diagram/src/subprocess/subprocess.rect.d.ts +1 -1
  132. package/flow-diagram/src/subprocess/subprocess.rect.js +1 -1
  133. package/layout/src/align.d.ts +1 -1
  134. package/layout/src/align.js +1 -1
  135. package/layout/src/layout.d.ts +1 -1
  136. package/layout/src/layout.js +1 -1
  137. package/myShape-diagram/{index.js → myShape.js} +1 -4
  138. package/package.json +1 -1
  139. package/sequence-diagram/src/focus/focus.anchor.d.ts +1 -1
  140. package/sequence-diagram/src/focus/focus.anchor.js +1 -1
  141. package/sequence-diagram/src/focus/focus.d.ts +1 -1
  142. package/sequence-diagram/src/focus/focus.rect.d.ts +1 -1
  143. package/sequence-diagram/src/focus/focus.rect.js +1 -1
  144. package/sequence-diagram/src/lifeline/lifeline.anchor.d.ts +1 -1
  145. package/sequence-diagram/src/lifeline/lifeline.anchor.js +1 -1
  146. package/sequence-diagram/src/lifeline/lifeline.d.ts +1 -1
  147. package/sequence-diagram/src/lifeline/lifeline.rect.d.ts +1 -1
  148. package/sequence-diagram/src/lifeline/lifeline.rect.js +1 -1
  149. package/sequence-diagram/src/register.js +1 -1
  150. package/chart-diagram/src/utils/changeOptions.d.ts +0 -8
  151. package/chart-diagram/src/utils/changeOptions.js +0 -267
  152. package/chart-diagram/src/utils/conversion.d.ts +0 -19
  153. package/chart-diagram/src/utils/conversion.js +0 -559
  154. package/chart-diagram/src/utils/drawGraphic.d.ts +0 -3
  155. package/chart-diagram/src/utils/drawGraphic.js +0 -97
  156. package/chart-diagram/src/utils/formatter.d.ts +0 -1
  157. package/chart-diagram/src/utils/formatter.js +0 -206
  158. package/chart-diagram/src/utils/index.d.ts +0 -5
  159. package/chart-diagram/src/utils/index.js +0 -5
  160. package/chart-diagram/src/utils/render.d.ts +0 -8
  161. package/chart-diagram/src/utils/render.js +0 -219
  162. package/chart-diagram/src/utils/surfaceParametricConversion.d.ts +0 -3
  163. package/chart-diagram/src/utils/surfaceParametricConversion.js +0 -252
  164. package/core/src/element/common.d.ts +0 -6
  165. package/core/src/element/common.js +0 -54
  166. package/core/src/element/datePicker.d.ts +0 -3
  167. package/core/src/element/datePicker.js +0 -47
  168. package/core/src/element/iframe.d.ts +0 -3
  169. package/core/src/element/iframe.js +0 -12
  170. package/core/src/element/index.d.ts +0 -5
  171. package/core/src/element/index.js +0 -6
  172. package/core/src/element/select.d.ts +0 -11
  173. package/core/src/element/select.js +0 -275
  174. package/core/src/element/tab.d.ts +0 -1
  175. package/core/src/element/tab.js +0 -25
  176. package/core/src/element/time.d.ts +0 -3
  177. package/core/src/element/time.js +0 -44
  178. package/core/src/middles/arrows/index.d.ts +0 -4
  179. package/core/src/middles/arrows/index.js +0 -5
  180. package/core/src/middles/lines/index.d.ts +0 -4
  181. package/core/src/middles/lines/index.js +0 -5
  182. package/core/src/middles/nodes/formDatePicker.d.ts +0 -2
  183. package/core/src/middles/nodes/formDatePicker.js +0 -66
  184. package/core/src/middles/nodes/formoverflow.js +0 -61
  185. package/core/src/middles/nodes/formselect.d.ts +0 -2
  186. package/core/src/middles/nodes/formselect.js +0 -102
  187. package/core/src/middles/nodes/iframe.d.ts +0 -2
  188. package/core/src/middles/nodes/iframe.js +0 -29
  189. package/core/src/middles/nodes/index.d.ts +0 -50
  190. package/core/src/middles/nodes/index.js +0 -52
  191. package/core/src/middles/nodes/time.d.ts +0 -2
  192. package/core/src/middles/nodes/time.js +0 -98
  193. package/core/src/store/common.d.ts +0 -9
  194. package/core/src/store/common.js +0 -5
  195. package/core/src/store/data.d.ts +0 -194
  196. package/core/src/store/data.js +0 -187
  197. package/core/src/store/index.d.ts +0 -2
  198. package/core/src/store/index.js +0 -2
  199. package/core/src/utils/assignment.d.ts +0 -7
  200. package/core/src/utils/assignment.js +0 -185
  201. package/core/src/utils/params.d.ts +0 -2
  202. package/core/src/utils/params.js +0 -65
  203. package/static/echartsDefaultData.js +0 -178
  204. package/static/element.js +0 -14
  205. package/static/form.js +0 -11
  206. package/static/index.js +0 -3
  207. package/store/actions.js +0 -1
  208. package/store/clear.js +0 -10
  209. package/store/index.js +0 -2
  210. package/style/common.css +0 -15
  211. package/style/datePicker.css +0 -44
  212. package/style/editor.css +0 -16
  213. package/style/index.css +0 -5
  214. package/style/select.css +0 -143
  215. /package/myShape-diagram/{index.ts → myShape.ts} +0 -0
@@ -1,185 +0,0 @@
1
- // 变量赋值操作
2
- import {commonStore} from '../store';
3
- import { setConfItemNode } from '../healps';
4
- import { EventAction } from '../models';
5
-
6
- /**
7
- * 在节点注册前初始化node数据
8
- * @param node 节点数据
9
- * @param TID 数据键
10
- * @param type topology类型
11
- * @param order 节点序列
12
- */
13
- export function setInitNodeDataValidat(node, TID, type, order) {
14
-
15
- const syncData = commonStore[TID].mqttData;
16
-
17
- node.TID = TID;
18
-
19
- if(typeof node.visibleSwitch !== 'boolean') {
20
- // 兼容旧版显示隐藏属性值设置
21
- node.visibleSwitch = type === 'topology';
22
- }else {
23
- node.visibleSwitch = type === 'topology' && node.visibleSwitch;
24
- }
25
-
26
- if(typeof order === "number") node.order = order;
27
- if(type !== 'topology') node.selectDropdown = false;
28
-
29
- initDefaultValidat(node, syncData);
30
-
31
- setDefaultNodeValidat(node, syncData);
32
-
33
- if (node.children && node.children.length) {
34
-
35
- node.children.map((_item) => {
36
-
37
- setInitNodeDataValidat(_item, TID, type);
38
-
39
- })
40
-
41
- }
42
- }
43
- // 初始化默认节点值
44
- export function initDefaultValidat(node, retData) {
45
- node.defaultFillStyle = node.fillStyle;
46
- node.defaultFontColor = node.font.color;
47
- if (node.name === 'line') {
48
- node.defaultStrokeStyle = node.strokeStyle;
49
- }
50
- const dataDictionary = retData && {...retData.varData, ...retData.branchNameData} || {};
51
- // 变量类型数据展示,不需要实时更新
52
- if(Array.isArray(node.data) && Object.keys(dataDictionary).length) {
53
- let typeName = '';
54
- let imgs = '';
55
- const assetId = retData.asset && retData.asset.assetId;
56
- node.data.map((vd) => {
57
- const varNode = dataDictionary[vd.value] || dataDictionary[`${assetId}_${vd.value}`];
58
- if((vd.key.includes('varValue') || vd.key.includes('branchVal')) && varNode){
59
- const showType = varNode.showType ? parseInt(varNode.showType) : 1;
60
- if(showType === 1 && varNode.value) typeName += typeName ? `,${varNode.value}` : varNode.value;
61
- if(showType === 2 && varNode.value) console.log('显示图标>>>');
62
- if(showType === 3 && varNode.value) imgs = `/dcim-api${varNode.value}`; //imgs += imgs ? `,${varData.value}` : varData.value;
63
- }
64
- });
65
- if(typeName) node.text = typeName;
66
- if(imgs) {
67
- node.text = '';
68
- node.image = imgs;
69
- node.paddingBottom = 0;
70
- node.paddingBottomNum = 0;
71
- node.paddingLeft = 0;
72
- node.paddingLeftNum = 0;
73
- node.paddingRight = 0;
74
- node.paddingRightNum = 0;
75
- node.paddingTop = 0;
76
- node.paddingTopNum = 0;
77
- }
78
- }
79
- }
80
- // 初始化mqtt实时值
81
- export function setDefaultNodeValidat(node, retData) {
82
- //const item = JSON.parse(JSON.stringify(node));
83
- if (!retData) return;
84
- //const node = detailData.length > 0 ? detailData : syncData
85
- const functionData = node.events.filter((ev) => {
86
- return ev.action === EventAction.Function
87
- });
88
- const dataValue = functionData[0]
89
- if (functionData.length && dataValue.value && retData) {
90
- if(node.data && node.data.length) node.data.map((d) => {
91
- const {kpiData, tagData} = retData;
92
- const key = d.key;
93
- const value = d.value;
94
- const _syncItem = key === 'tagId' ? tagData[value] : kpiData[value];
95
- if ((key === 'tagId' || key === 'kpiAddr') && _syncItem) {
96
- const isControl = parseInt(_syncItem.isControlDis); // 是否可控,0可控,1不可控
97
- if (!isControl) {
98
- d.tagVal = value
99
- d.controlParams = _syncItem
100
- // delete _syncItem[value]
101
- // Object.assign(d, _syncItem)
102
- }
103
- }
104
- })
105
- // console.log('定制函数=====')
106
- try {
107
- const func = new Function('pen', 'params', dataValue.value);
108
- const funcData = func(node, JSON.stringify(retData));
109
- /**
110
- * 此方式在九所的 服务器状态监测功能中用到
111
- * 全局报警标记,代表正在访问的这个topology文件中是否有告警发生
112
- * 需要注意:自定义函数中要通过 return {monitorAlarm: boolean}的格式将元件告警状态返回
113
- */
114
- if(funcData && funcData.monitorAlarm && commonStore[node.TID]) commonStore[node.TID].monitorAlarm = true;
115
- }catch (e) {
116
- console.log(`自定义函数出错>>>`,);
117
- console.log(`目标元件:${node.id}>>>`,);
118
- console.log(`目标元件方位:X->${node.rect.x},Y->${node.rect.y}>>>`,);
119
- }
120
- } else {
121
- // console.log('默认函数')
122
- const newData = setConfItemNode(node, retData);
123
- if(newData && newData.monitorAlarm && commonStore[node.TID]) commonStore[node.TID].monitorAlarm = true;
124
- }
125
- if (node.animateFrames && node.animateFrames.length) {
126
- for (var _a = 0, _af = node.animateFrames; _a < _af.length; _a++) {
127
- var ani = _af[_a];
128
- ani.state.strokeStyle = node.strokeStyle;
129
- ani.state.fillStyle = node.fillStyle;
130
- }
131
- }
132
- //return node;
133
- }
134
-
135
- /**
136
- * 配置与元件关联的tag数据
137
- * @param node 元件节点数据
138
- */
139
- export function setConnectionTagForConf(node) {
140
- if(!node.tags || node.tags && !node.tags.length) return;
141
- let setType = '';
142
- node.tags.map((t) => {
143
- if(t === 'statisticType' || t.includes('switchTabType')) setType = 'tab';
144
- if(t.includes('selectOption')) setType = 'selectShow';
145
- });
146
- if(!setType) console.log('>>>未能找到绑定的标签数据,请检查绑定的Tabs标签是否包含switchTabType前缀>>>');
147
- if(setType === 'tab'){
148
- // tab切换
149
- setConnectionTabsData(node);
150
- }
151
- if(setType === 'selectShow'){
152
- // 下拉显示隐藏
153
- const tagData = node.tags[0].split('-');
154
- const parentId = tagData[1] && tagData[1].trim();
155
- if(!parentId) return console.log('>>>请检查select节点ID是否设置正确【selectOption+其他任意字符-下拉元件ID】>>>');
156
- if(parentId) {
157
- const params = {
158
- TID: node.TID,
159
- id: node.id,
160
- name: node.name,
161
- order: node.order,
162
- visible: node.visible,
163
- tag: node.tags[0].trim()
164
- }
165
- if(!commonStore[node.TID].selectTabDataPool[parentId]) commonStore[node.TID].selectTabDataPool[parentId] = new Map();
166
- commonStore[node.TID].selectTabDataPool[parentId].set(node.id, params);
167
- }
168
- }
169
- }
170
-
171
- /**
172
- * 初始化配置tabs数据
173
- * @param node
174
- */
175
- export function setConnectionTabsData(node) {
176
- const switchTabType = node.tags.find((t) => {
177
- return t.includes('switchTabType');
178
- }); // 获取按钮组类型
179
- if(!switchTabType) return;
180
- const isTabs = node.events && node.events.find((ev) => ev.action === 8);
181
- let topologyChangeData = commonStore[node.TID].switchTabDataPool;
182
- let keyName = node.bindStaticId && isTabs ? `${switchTabType}Data` : `${switchTabType}AreaData`;
183
- if (!topologyChangeData[keyName]) topologyChangeData[keyName] = {};
184
- topologyChangeData[keyName][node.id] = node;
185
- }
@@ -1,2 +0,0 @@
1
- export declare function getParams(id: string, data: []): void;
2
- export declare function filterParams(node: any): void;
@@ -1,65 +0,0 @@
1
- import {commonStore} from '../store';
2
- // 获取绑定数据的参数
3
- export function getParams(id, data) {
4
- data.map((item) => {
5
- filterParams(id, item);
6
- if (item.children && item.children.length) {
7
- getParams(id, item.children);
8
- }
9
- if (item.formData && item.formData.detailPageData && item.formData.detailPageData.pens && item.formData.detailPageData.pens.length) {
10
- getParams(id, item.formData.detailPageData.pens);
11
- }
12
- });
13
- }
14
- // 过滤出参数
15
- export function filterParams(id, node) {
16
- let tagIds = [];
17
- let kpiAddrs = [];
18
- let assetIds = [];
19
- let areaIds = [];
20
- let tagEcharts = [];
21
- let echartData = [];
22
- let varVaule = [];
23
- let branchValue = [];
24
- let doorIds = [];
25
- let isMqttEventType = false;
26
- node.events.map((ev) => {
27
- if(ev.value && ev.value === 'entranceGuard') doorIds.push(ev.params); // 门禁参数
28
- if(ev.type === 3) isMqttEventType = true;
29
- });
30
- if(doorIds.length) commonStore[id].mqttParams.doorIds = [...commonStore[id].mqttParams.doorIds, ...doorIds];
31
- if(!isMqttEventType) return;
32
- if (node.data && Array.isArray(node.data) && node.data.length) {
33
- node.data.map((item) => {
34
- if (item.key === 'tagId') {
35
- tagIds.push(item.value);
36
- }
37
- if (item.key === 'kpiAddr') {
38
- kpiAddrs.push(item.value);
39
- }
40
- if (item.key === 'assetId') {
41
- assetIds.push(item.value);
42
- }
43
- if (item.key === 'areaId') {
44
- areaIds.push(item.value);
45
- }
46
- if (item.key.includes('varValue')) {
47
- varVaule.push(item.value);
48
- }
49
- if (item.key === 'branchVal') {
50
- branchValue.push(item.value);
51
- }
52
- })
53
- }
54
- if (node.data && Object.prototype.toString.call(node.data) === '[object Object]' && node.data.params && node.data.params.id) {
55
- echartData.push(node.data.params.id);
56
- }
57
- commonStore[id].mqttParams.tagIds = [...commonStore[id].mqttParams.tagIds, ...tagIds];
58
- commonStore[id].mqttParams.kpiAddrs = [...commonStore[id].mqttParams.kpiAddrs, ...kpiAddrs];
59
- commonStore[id].mqttParams.assetIds = [...commonStore[id].mqttParams.assetIds, ...assetIds];
60
- commonStore[id].mqttParams.areaIds = [...commonStore[id].mqttParams.areaIds, ...areaIds];
61
- commonStore[id].mqttParams.varVaule = [...commonStore[id].mqttParams.varVaule, ...varVaule];
62
- commonStore[id].mqttParams.branchValue = [...commonStore[id].mqttParams.branchValue, ...branchValue];
63
- commonStore[id].mqttParams.tagEcharts = [...commonStore[id].mqttParams.tagEcharts, ...tagEcharts];
64
- commonStore[id].mqttParams.echartData = [...commonStore[id].mqttParams.echartData, ...echartData];
65
- }
@@ -1,178 +0,0 @@
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/static/element.js DELETED
@@ -1,14 +0,0 @@
1
- export const elementType = {
2
- select: 'select',
3
- table: 'table',
4
- pagination: 'pagination',
5
- iframe: 'iframe',
6
- echarts: 'echarts'
7
- };
8
- export const elementSelectThemeType = [{
9
- id: 0,
10
- name: '默认'
11
- },{
12
- id: 1,
13
- name: '青色'
14
- }];
package/static/form.js DELETED
@@ -1,11 +0,0 @@
1
- // 下拉默认数据
2
- export const selectDefaultData = [{
3
- id: '1',
4
- name: '列表一'
5
- },{
6
- id: '2',
7
- name: '列表二'
8
- },{
9
- id: '3',
10
- name: '列表三'
11
- }];
package/static/index.js DELETED
@@ -1,3 +0,0 @@
1
- export * from './echartsDefaultData';
2
- export * from './form';
3
- export * from './element';
package/store/actions.js DELETED
@@ -1 +0,0 @@
1
- export const plugsPool = {};
package/store/clear.js DELETED
@@ -1,10 +0,0 @@
1
- import {setEventListener} from "../core";
2
- export const removeAllElement = function (){
3
- const documentDefineEle = document.querySelectorAll('.documentDefine');
4
- if(documentDefineEle) {
5
- documentDefineEle.forEach(function(element) {
6
- element.removeEventListener('click', (e) => {setEventListener(e);});
7
- element.parentNode.removeChild(element);
8
- });
9
- }
10
- }
package/store/index.js DELETED
@@ -1,2 +0,0 @@
1
- export * from './actions';
2
- export * from './clear';
package/style/common.css DELETED
@@ -1,15 +0,0 @@
1
- * {
2
- margin: 0;
3
- padding: 0;
4
- box-sizing: border-box;
5
- }
6
- li {
7
- list-style: none;
8
- }
9
- .canvas-point.pointer{
10
- cursor: pointer;
11
- }
12
- .canvas-point,
13
- .canvas-point.default{
14
- cursor: default;
15
- }
@@ -1,44 +0,0 @@
1
- .topology-datePicker{
2
- position: relative;
3
- box-sizing: border-box;
4
- }
5
- .topology-datePicker i{
6
- display: inline-block;
7
- }
8
- .topology-datePicker input{
9
- width: 100%;
10
- height: 100%;
11
- line-height: 100%;
12
- border: none;
13
- background: transparent;
14
- vertical-align: top;
15
- }
16
- .topology-datePicker input::placeholder{
17
- font-weight: normal;
18
- color: rgb(220, 223, 230);
19
- }
20
- .topology-datePicker input:active,
21
- .topology-datePicker input:focus{
22
- outline: none;
23
- }
24
- .topology-datePicker .icon-date,
25
- .topology-datePicker .icon-arrow{
26
- position: absolute;
27
- top: 50%;
28
- transform: translateY(-50%);
29
- }
30
- .layui-laydate-main{
31
- width: 322px !important;
32
- }
33
- .layui-laydate-main table{
34
- width: 100%;
35
- }
36
- .layui-laydate-header i{
37
- font-size: 14px !important;
38
- }
39
- .laydate-set-ym {
40
- font-size: 16px;
41
- }
42
- .layui-laydate-footer span.layui-laydate-preview{
43
- font-size: 14px;
44
- }
package/style/editor.css DELETED
@@ -1,16 +0,0 @@
1
- /*.canvas-draw{*/
2
- /* z-index: 2;*/
3
- /*}*/
4
- /*.canvas-point{*/
5
- /* z-index: 6;*/
6
- /*}*/
7
- .canvas-point.pointer > div{
8
- z-index: -2;
9
- }
10
- .topoEchart,
11
- .topology-select{
12
- z-index: 1;
13
- }
14
- .topology-select-dropdown{
15
- transition: all ease-in .2s;
16
- }
package/style/index.css DELETED
@@ -1,5 +0,0 @@
1
- @import './common.css';
2
- @import './select.css';
3
- @import './datePicker.css';
4
-
5
-