coolcare-lite-scada-component 1.0.6 → 1.0.8

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 (30) hide show
  1. package/es/components/ImageUploader/index.js +1 -1
  2. package/es/element/EleButton/Component.js +12 -4
  3. package/es/element/EleFan/Component.js +12 -4
  4. package/es/element/EleGauge/Component.js +12 -4
  5. package/es/element/EleIcon/Component.js +12 -4
  6. package/es/element/EleIndicatorLight/Component.js +12 -4
  7. package/es/element/ElePointImage/Component.js +12 -4
  8. package/es/element/ElePointState/Component.js +12 -4
  9. package/es/element/ElePointValue/Component.js +12 -4
  10. package/es/element/EleShine/Component.js +12 -4
  11. package/es/element/PipeNodes/NodeBottom/index.js +1 -1
  12. package/es/element/PipeNodes/NodeCenter/index.js +1 -1
  13. package/es/element/PipeNodes/NodeHorizontal/index.js +1 -1
  14. package/es/element/PipeNodes/NodeRight/index.js +1 -1
  15. package/es/element/PipeNodes/NodeTop/index.js +1 -1
  16. package/es/element/PipeNodes/NodeVertical/index.js +1 -1
  17. package/es/element/PointCard/PointCard1/Component.js +12 -4
  18. package/es/element/PointCard/PointCard2/Component/PointItem.js +12 -4
  19. package/es/element/PointCard/PointCard3/Component.js +12 -4
  20. package/es/element/PointCard/PointListCard/Component.js +12 -4
  21. package/es/element/PointControl/PointControl1/Component.js +12 -4
  22. package/es/element/PointControl/PointControl3/Component.js +12 -4
  23. package/es/element/type.d.ts +4 -2
  24. package/es/element/utils/handleEleEvent.js +3 -0
  25. package/es/hooks/useEleEventHandle.js +7 -1
  26. package/es/pages/display/Player/index.js +61 -23
  27. package/es/pages/display/index.js +15 -7
  28. package/es/pages/editor/PanelLeft/PipeEleList/listData.js +8 -8
  29. package/es/pages/editor/PanelRight/components/FormBindEvent/index.js +27 -10
  30. package/package.json +2 -1
@@ -72,7 +72,7 @@ var ImageUploader = function ImageUploader(_ref) {
72
72
  if (!isJpgOrPngOrSvgOrGif) {
73
73
  message.error('只能上传 JPG/PNG/Svg/Gif 文件!');
74
74
  }
75
- var size = 30;
75
+ var size = 50;
76
76
  var isLtSize = file.size / 1024 / 1024 < size;
77
77
  if (!isLtSize) {
78
78
  notification.open({
@@ -39,10 +39,18 @@ var EleButtonComponent = function EleButtonComponent(_ref) {
39
39
  }, /*#__PURE__*/React.createElement(Tooltip, {
40
40
  title: tooltipTitle
41
41
  }, /*#__PURE__*/React.createElement("button", {
42
- onClick: eventHandles.onClick,
43
- onContextMenu: eventHandles.onContextMenu,
44
- onMouseEnter: eventHandles.onMouseEnter,
45
- onMouseLeave: eventHandles.onMouseLeave,
42
+ onClick: function onClick(e) {
43
+ return eventHandles.current.onClick(e);
44
+ },
45
+ onContextMenu: function onContextMenu(e) {
46
+ return eventHandles.current.onContextMenu(e);
47
+ },
48
+ onMouseEnter: function onMouseEnter(e) {
49
+ return eventHandles.current.onMouseEnter(e);
50
+ },
51
+ onMouseLeave: function onMouseLeave(e) {
52
+ return eventHandles.current.onMouseLeave(e);
53
+ },
46
54
  className: styles.button
47
55
  }, payload === null || payload === void 0 ? void 0 : payload.btnText)));
48
56
  };
@@ -80,10 +80,18 @@ var EleFanComponent = function EleFanComponent(_ref) {
80
80
  return /*#__PURE__*/React.createElement(Tooltip, {
81
81
  title: tooltipTitle
82
82
  }, /*#__PURE__*/React.createElement("div", {
83
- onClick: eventHandles.onClick,
84
- onContextMenu: eventHandles.onContextMenu,
85
- onMouseEnter: eventHandles.onMouseEnter,
86
- onMouseLeave: eventHandles.onMouseLeave,
83
+ onClick: function onClick(e) {
84
+ return eventHandles.current.onClick(e);
85
+ },
86
+ onContextMenu: function onContextMenu(e) {
87
+ return eventHandles.current.onContextMenu(e);
88
+ },
89
+ onMouseEnter: function onMouseEnter(e) {
90
+ return eventHandles.current.onMouseEnter(e);
91
+ },
92
+ onMouseLeave: function onMouseLeave(e) {
93
+ return eventHandles.current.onMouseLeave(e);
94
+ },
87
95
  style: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, payload === null || payload === void 0 ? void 0 : payload.fontStyles), payload === null || payload === void 0 ? void 0 : payload.borderStyles), payload === null || payload === void 0 ? void 0 : payload.fillStyles), payload === null || payload === void 0 ? void 0 : payload.margin_padding), {}, {
88
96
  backgroundColor: getStatusColor()
89
97
  }),
@@ -111,10 +111,18 @@ var EleGaugeComponent = function EleGaugeComponent(_ref) {
111
111
  }, [pointData, node]);
112
112
  return /*#__PURE__*/React.createElement("div", {
113
113
  className: styles.wrap,
114
- onClick: eventHandles.onClick,
115
- onContextMenu: eventHandles.onContextMenu,
116
- onMouseEnter: eventHandles.onMouseEnter,
117
- onMouseLeave: eventHandles.onMouseLeave,
114
+ onClick: function onClick(e) {
115
+ return eventHandles.current.onClick(e);
116
+ },
117
+ onContextMenu: function onContextMenu(e) {
118
+ return eventHandles.current.onContextMenu(e);
119
+ },
120
+ onMouseEnter: function onMouseEnter(e) {
121
+ return eventHandles.current.onMouseEnter(e);
122
+ },
123
+ onMouseLeave: function onMouseLeave(e) {
124
+ return eventHandles.current.onMouseLeave(e);
125
+ },
118
126
  style: _objectSpread(_objectSpread({}, payload === null || payload === void 0 ? void 0 : payload.borderStyles), payload === null || payload === void 0 ? void 0 : payload.fillStyles)
119
127
  }, /*#__PURE__*/React.createElement(Tooltip, {
120
128
  title: false
@@ -38,10 +38,18 @@ var EleIconComponent = function EleIconComponent(_ref) {
38
38
  title: tooltipTitle
39
39
  }, /*#__PURE__*/React.createElement("div", {
40
40
  style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, payload === null || payload === void 0 ? void 0 : payload.fontStyles), payload === null || payload === void 0 ? void 0 : payload.borderStyles), payload === null || payload === void 0 ? void 0 : payload.fillStyles), payload === null || payload === void 0 ? void 0 : payload.margin_padding),
41
- onClick: eventHandles.onClick,
42
- onContextMenu: eventHandles.onContextMenu,
43
- onMouseEnter: eventHandles.onMouseEnter,
44
- onMouseLeave: eventHandles.onMouseLeave,
41
+ onClick: function onClick(e) {
42
+ return eventHandles.current.onClick(e);
43
+ },
44
+ onContextMenu: function onContextMenu(e) {
45
+ return eventHandles.current.onContextMenu(e);
46
+ },
47
+ onMouseEnter: function onMouseEnter(e) {
48
+ return eventHandles.current.onMouseEnter(e);
49
+ },
50
+ onMouseLeave: function onMouseLeave(e) {
51
+ return eventHandles.current.onMouseLeave(e);
52
+ },
45
53
  className: styles['ele-icon-wrap']
46
54
  }, /*#__PURE__*/React.createElement(Icon, {
47
55
  type: "icon-".concat((payload === null || payload === void 0 ? void 0 : payload.iconName) || 'smile'),
@@ -47,10 +47,18 @@ var EleIndicatorLightComponent = function EleIndicatorLightComponent(_ref) {
47
47
  style: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, payload === null || payload === void 0 ? void 0 : payload.fontStyles), payload === null || payload === void 0 ? void 0 : payload.borderStyles), payload === null || payload === void 0 ? void 0 : payload.fillStyles), payload === null || payload === void 0 ? void 0 : payload.margin_padding), {}, {
48
48
  backgroundColor: backgroundColor
49
49
  }),
50
- onClick: eventHandles.onClick,
51
- onContextMenu: eventHandles.onContextMenu,
52
- onMouseEnter: eventHandles.onMouseEnter,
53
- onMouseLeave: eventHandles.onMouseLeave,
50
+ onClick: function onClick(e) {
51
+ return eventHandles.current.onClick(e);
52
+ },
53
+ onContextMenu: function onContextMenu(e) {
54
+ return eventHandles.current.onContextMenu(e);
55
+ },
56
+ onMouseEnter: function onMouseEnter(e) {
57
+ return eventHandles.current.onMouseEnter(e);
58
+ },
59
+ onMouseLeave: function onMouseLeave(e) {
60
+ return eventHandles.current.onMouseLeave(e);
61
+ },
54
62
  className: styles.wrap
55
63
  }));
56
64
  };
@@ -45,10 +45,18 @@ var ElePointImageComponent = function ElePointImageComponent(_ref) {
45
45
  return /*#__PURE__*/React.createElement(Tooltip, {
46
46
  title: tooltipTitle
47
47
  }, /*#__PURE__*/React.createElement("div", {
48
- onClick: eventHandles.onClick,
49
- onContextMenu: eventHandles.onContextMenu,
50
- onMouseEnter: eventHandles.onMouseEnter,
51
- onMouseLeave: eventHandles.onMouseLeave,
48
+ onClick: function onClick(e) {
49
+ return eventHandles.current.onClick(e);
50
+ },
51
+ onContextMenu: function onContextMenu(e) {
52
+ return eventHandles.current.onContextMenu(e);
53
+ },
54
+ onMouseEnter: function onMouseEnter(e) {
55
+ return eventHandles.current.onMouseEnter(e);
56
+ },
57
+ onMouseLeave: function onMouseLeave(e) {
58
+ return eventHandles.current.onMouseLeave(e);
59
+ },
52
60
  className: styles.wrap
53
61
  }, (payload === null || payload === void 0 ? void 0 : payload.imgSrc) ? /*#__PURE__*/React.createElement("img", {
54
62
  className: styles.img,
@@ -53,10 +53,18 @@ var ElePointStateComponent = function ElePointStateComponent(_ref) {
53
53
  title: tooltipTitle
54
54
  }, /*#__PURE__*/React.createElement("div", {
55
55
  className: styles.wrap,
56
- onClick: eventHandles.onClick,
57
- onContextMenu: eventHandles.onContextMenu,
58
- onMouseEnter: eventHandles.onMouseEnter,
59
- onMouseLeave: eventHandles.onMouseLeave,
56
+ onClick: function onClick(e) {
57
+ return eventHandles.current.onClick(e);
58
+ },
59
+ onContextMenu: function onContextMenu(e) {
60
+ return eventHandles.current.onContextMenu(e);
61
+ },
62
+ onMouseEnter: function onMouseEnter(e) {
63
+ return eventHandles.current.onMouseEnter(e);
64
+ },
65
+ onMouseLeave: function onMouseLeave(e) {
66
+ return eventHandles.current.onMouseLeave(e);
67
+ },
60
68
  style: _objectSpread(_objectSpread(_objectSpread({}, payload === null || payload === void 0 ? void 0 : payload.borderStyles), payload === null || payload === void 0 ? void 0 : payload.fillStyles), {}, {
61
69
  background: typeof bgColor === 'string' ? bgColor : (payload === null || payload === void 0 ? void 0 : (_payload$fillStyles = payload.fillStyles) === null || _payload$fillStyles === void 0 ? void 0 : _payload$fillStyles.backgroundColor) ? payload === null || payload === void 0 ? void 0 : (_payload$fillStyles2 = payload.fillStyles) === null || _payload$fillStyles2 === void 0 ? void 0 : _payload$fillStyles2.backgroundColor : 'invalid-value'
62
70
  })
@@ -54,10 +54,18 @@ var ElePointValueComponent = function ElePointValueComponent(_ref) {
54
54
  }
55
55
  var numberColor = getValueByExpression(pointData === null || pointData === void 0 ? void 0 : pointData.value, payload === null || payload === void 0 ? void 0 : payload.colorExpressions);
56
56
  return /*#__PURE__*/React.createElement("div", {
57
- onClick: eventHandles.onClick,
58
- onContextMenu: eventHandles.onContextMenu,
59
- onMouseEnter: eventHandles.onMouseEnter,
60
- onMouseLeave: eventHandles.onMouseLeave,
57
+ onClick: function onClick(e) {
58
+ return eventHandles.current.onClick(e);
59
+ },
60
+ onContextMenu: function onContextMenu(e) {
61
+ return eventHandles.current.onContextMenu(e);
62
+ },
63
+ onMouseEnter: function onMouseEnter(e) {
64
+ return eventHandles.current.onMouseEnter(e);
65
+ },
66
+ onMouseLeave: function onMouseLeave(e) {
67
+ return eventHandles.current.onMouseLeave(e);
68
+ },
61
69
  style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, payload === null || payload === void 0 ? void 0 : payload.fontStyles), payload === null || payload === void 0 ? void 0 : payload.borderStyles), payload === null || payload === void 0 ? void 0 : payload.fillStyles), payload === null || payload === void 0 ? void 0 : payload.margin_padding),
62
70
  className: "".concat(styles.wrap, " ").concat(styles[directionClassNameMap[direction]])
63
71
  }, /*#__PURE__*/React.createElement("div", {
@@ -50,10 +50,18 @@ var EleShineComponent = function EleShineComponent(_ref) {
50
50
  return /*#__PURE__*/React.createElement(Tooltip, {
51
51
  title: tooltipTitle
52
52
  }, /*#__PURE__*/React.createElement("div", {
53
- onClick: eventHandles.onClick,
54
- onContextMenu: eventHandles.onContextMenu,
55
- onMouseEnter: eventHandles.onMouseEnter,
56
- onMouseLeave: eventHandles.onMouseLeave,
53
+ onClick: function onClick(e) {
54
+ return eventHandles.current.onClick(e);
55
+ },
56
+ onContextMenu: function onContextMenu(e) {
57
+ return eventHandles.current.onContextMenu(e);
58
+ },
59
+ onMouseEnter: function onMouseEnter(e) {
60
+ return eventHandles.current.onMouseEnter(e);
61
+ },
62
+ onMouseLeave: function onMouseLeave(e) {
63
+ return eventHandles.current.onMouseLeave(e);
64
+ },
57
65
  style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, payload === null || payload === void 0 ? void 0 : payload.fontStyles), payload === null || payload === void 0 ? void 0 : payload.borderStyles), payload === null || payload === void 0 ? void 0 : payload.fillStyles), payload === null || payload === void 0 ? void 0 : payload.margin_padding),
58
66
  className: "".concat(styles.wrap, " ").concat(shineExpressionsValue === '告警' ? styles.shine : '')
59
67
  }));
@@ -44,7 +44,7 @@ export var defaultConfig = {
44
44
  }],
45
45
  attrs: {
46
46
  body: {
47
- xlinkHref: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/2358402046b8439b9bee49814e5d94e3.svg',
47
+ xlinkHref: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/生产/组态图片/图片元素/2358402046b8439b9bee49814e5d94e3.svg',
48
48
  refWidth: '100%',
49
49
  refHeight: '100%'
50
50
  }
@@ -44,7 +44,7 @@ export var defaultConfig = {
44
44
  }],
45
45
  attrs: {
46
46
  body: {
47
- xlinkHref: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/58225b888f6a48b9af4b21444700c6ba.svg',
47
+ xlinkHref: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/生产/组态图片/图片元素/58225b888f6a48b9af4b21444700c6ba.svg',
48
48
  refWidth: '100%',
49
49
  refHeight: '100%'
50
50
  }
@@ -43,7 +43,7 @@ export var defaultConfig = {
43
43
  }],
44
44
  attrs: {
45
45
  body: {
46
- xlinkHref: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/dd03192a3abc487aa7b91ad75d1be533.svg',
46
+ xlinkHref: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/生产/组态图片/图片元素/dd03192a3abc487aa7b91ad75d1be533.svg',
47
47
  refWidth: '100%',
48
48
  refHeight: '100%'
49
49
  }
@@ -43,7 +43,7 @@ export var defaultConfig = {
43
43
  }],
44
44
  attrs: {
45
45
  body: {
46
- xlinkHref: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/40a74ebbf068410593fbc92442088fc7.svg',
46
+ xlinkHref: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/生产/组态图片/图片元素/40a74ebbf068410593fbc92442088fc7.svg',
47
47
  refWidth: '100%',
48
48
  refHeight: '100%'
49
49
  }
@@ -43,7 +43,7 @@ export var defaultConfig = {
43
43
  }],
44
44
  attrs: {
45
45
  body: {
46
- xlinkHref: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/63831cb71bd24c47bb11b6e02d9e4c77.svg',
46
+ xlinkHref: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/生产/组态图片/图片元素/63831cb71bd24c47bb11b6e02d9e4c77.svg',
47
47
  refWidth: '100%',
48
48
  refHeight: '100%'
49
49
  }
@@ -43,7 +43,7 @@ export var defaultConfig = {
43
43
  }],
44
44
  attrs: {
45
45
  body: {
46
- xlinkHref: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/8e5f1deaf3a8466fa168588eaac664bc.svg',
46
+ xlinkHref: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/生产/组态图片/图片元素/8e5f1deaf3a8466fa168588eaac664bc.svg',
47
47
  refWidth: '100%',
48
48
  refHeight: '100%'
49
49
  }
@@ -64,10 +64,18 @@ var ElePointCardComponent = function ElePointCardComponent(_ref) {
64
64
  title: tooltipTitle
65
65
  }, /*#__PURE__*/React.createElement("div", {
66
66
  className: styles['ele-point_card-wrap'],
67
- onClick: eventHandles.onClick,
68
- onContextMenu: eventHandles.onContextMenu,
69
- onMouseEnter: eventHandles.onMouseEnter,
70
- onMouseLeave: eventHandles.onMouseLeave,
67
+ onClick: function onClick(e) {
68
+ return eventHandles.current.onClick(e);
69
+ },
70
+ onContextMenu: function onContextMenu(e) {
71
+ return eventHandles.current.onContextMenu(e);
72
+ },
73
+ onMouseEnter: function onMouseEnter(e) {
74
+ return eventHandles.current.onMouseEnter(e);
75
+ },
76
+ onMouseLeave: function onMouseLeave(e) {
77
+ return eventHandles.current.onMouseLeave(e);
78
+ },
71
79
  style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, payload === null || payload === void 0 ? void 0 : payload.fontStyles), payload === null || payload === void 0 ? void 0 : payload.borderStyles), payload === null || payload === void 0 ? void 0 : payload.fillStyles), payload === null || payload === void 0 ? void 0 : payload.margin_padding)
72
80
  }, /*#__PURE__*/React.createElement("div", {
73
81
  className: styles.top
@@ -58,10 +58,18 @@ var PointItem = function PointItem(_ref) {
58
58
  return /*#__PURE__*/React.createElement(Tooltip, {
59
59
  title: tooltipTitle
60
60
  }, /*#__PURE__*/React.createElement("div", {
61
- onClick: eventHandles.onClick,
62
- onContextMenu: eventHandles.onContextMenu,
63
- onMouseEnter: eventHandles.onMouseEnter,
64
- onMouseLeave: eventHandles.onMouseLeave,
61
+ onClick: function onClick(e) {
62
+ return eventHandles.current.onClick(e);
63
+ },
64
+ onContextMenu: function onContextMenu(e) {
65
+ return eventHandles.current.onContextMenu(e);
66
+ },
67
+ onMouseEnter: function onMouseEnter(e) {
68
+ return eventHandles.current.onMouseEnter(e);
69
+ },
70
+ onMouseLeave: function onMouseLeave(e) {
71
+ return eventHandles.current.onMouseLeave(e);
72
+ },
65
73
  className: styles.item,
66
74
  style: _objectSpread({}, style)
67
75
  }, /*#__PURE__*/React.createElement("div", {
@@ -78,12 +78,20 @@ var ElePointCard3Component = function ElePointCard3Component(_ref) {
78
78
  title: tooltipTitle
79
79
  }, /*#__PURE__*/React.createElement("div", {
80
80
  className: "".concat(styles['ele-point-card3']),
81
- onClick: eventHandles.onClick,
82
- onContextMenu: eventHandles.onContextMenu
81
+ onClick: function onClick(e) {
82
+ return eventHandles.current.onClick(e);
83
+ },
84
+ onContextMenu: function onContextMenu(e) {
85
+ return eventHandles.current.onContextMenu(e);
86
+ }
83
87
  // className=""
84
88
  ,
85
- onMouseEnter: eventHandles.onMouseEnter,
86
- onMouseLeave: eventHandles.onMouseLeave,
89
+ onMouseEnter: function onMouseEnter(e) {
90
+ return eventHandles.current.onMouseEnter(e);
91
+ },
92
+ onMouseLeave: function onMouseLeave(e) {
93
+ return eventHandles.current.onMouseLeave(e);
94
+ },
87
95
  style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, payload === null || payload === void 0 ? void 0 : payload.fontStyles), payload === null || payload === void 0 ? void 0 : payload.borderStyles), payload === null || payload === void 0 ? void 0 : payload.fillStyles), payload === null || payload === void 0 ? void 0 : payload.margin_padding)
88
96
  }, /*#__PURE__*/React.createElement("div", {
89
97
  className: styles.iconWrap,
@@ -47,10 +47,18 @@ var PointItem = function PointItem(_ref2) {
47
47
  point: point
48
48
  }) : false
49
49
  }, /*#__PURE__*/React.createElement("div", {
50
- onClick: eventHandles.onClick,
51
- onContextMenu: eventHandles.onContextMenu,
52
- onMouseEnter: eventHandles.onMouseEnter,
53
- onMouseLeave: eventHandles.onMouseLeave,
50
+ onClick: function onClick(e) {
51
+ return eventHandles.current.onClick(e);
52
+ },
53
+ onContextMenu: function onContextMenu(e) {
54
+ return eventHandles.current.onContextMenu(e);
55
+ },
56
+ onMouseEnter: function onMouseEnter(e) {
57
+ return eventHandles.current.onMouseEnter(e);
58
+ },
59
+ onMouseLeave: function onMouseLeave(e) {
60
+ return eventHandles.current.onMouseLeave(e);
61
+ },
54
62
  style: style,
55
63
  className: styles.item
56
64
  }, /*#__PURE__*/React.createElement("div", {
@@ -75,10 +75,18 @@ var ElePointControl1Component = function ElePointControl1Component(_ref) {
75
75
  title: tooltipTitle
76
76
  }, /*#__PURE__*/React.createElement("div", {
77
77
  className: "".concat(styles['ele-point-card3']),
78
- onClick: eventHandles.onClick,
79
- onContextMenu: eventHandles.onContextMenu,
80
- onMouseEnter: eventHandles.onMouseEnter,
81
- onMouseLeave: eventHandles.onMouseLeave,
78
+ onClick: function onClick(e) {
79
+ return eventHandles.current.onClick(e);
80
+ },
81
+ onContextMenu: function onContextMenu(e) {
82
+ return eventHandles.current.onContextMenu(e);
83
+ },
84
+ onMouseEnter: function onMouseEnter(e) {
85
+ return eventHandles.current.onMouseEnter(e);
86
+ },
87
+ onMouseLeave: function onMouseLeave(e) {
88
+ return eventHandles.current.onMouseLeave(e);
89
+ },
82
90
  style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, payload === null || payload === void 0 ? void 0 : payload.fontStyles), payload === null || payload === void 0 ? void 0 : payload.borderStyles), payload === null || payload === void 0 ? void 0 : payload.fillStyles), payload === null || payload === void 0 ? void 0 : payload.margin_padding)
83
91
  }, /*#__PURE__*/React.createElement("div", {
84
92
  style: _objectSpread(_objectSpread({}, payload === null || payload === void 0 ? void 0 : payload.label.fontStyles), payload === null || payload === void 0 ? void 0 : (_payload$label = payload.label) === null || _payload$label === void 0 ? void 0 : _payload$label.margin_padding),
@@ -96,10 +96,18 @@ var ElePointControl3Component = function ElePointControl3Component(_ref) {
96
96
  title: tooltipTitle
97
97
  }, /*#__PURE__*/React.createElement("div", {
98
98
  className: styles.wrap,
99
- onClick: eventHandles.onClick,
100
- onContextMenu: eventHandles.onContextMenu,
101
- onMouseEnter: eventHandles.onMouseEnter,
102
- onMouseLeave: eventHandles.onMouseLeave,
99
+ onClick: function onClick(e) {
100
+ return eventHandles.current.onClick(e);
101
+ },
102
+ onContextMenu: function onContextMenu(e) {
103
+ return eventHandles.current.onContextMenu(e);
104
+ },
105
+ onMouseEnter: function onMouseEnter(e) {
106
+ return eventHandles.current.onMouseEnter(e);
107
+ },
108
+ onMouseLeave: function onMouseLeave(e) {
109
+ return eventHandles.current.onMouseLeave(e);
110
+ },
103
111
  style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, payload === null || payload === void 0 ? void 0 : payload.fontStyles), payload === null || payload === void 0 ? void 0 : payload.borderStyles), payload === null || payload === void 0 ? void 0 : payload.fillStyles), payload === null || payload === void 0 ? void 0 : payload.margin_padding)
104
112
  }, !!(payload === null || payload === void 0 ? void 0 : payload.icon.isShow) ? /*#__PURE__*/React.createElement(Icon, {
105
113
  type: "icon-".concat((payload === null || payload === void 0 ? void 0 : payload.icon.name) || defaultIconName),
@@ -39,11 +39,13 @@ declare namespace Ele {
39
39
  /** 打开链接 */
40
40
  | 'open-url'
41
41
  /** 点位值写入 */
42
- | 'write-point';
42
+ | 'write-point'
43
+ /** 场景组态切换 */
44
+ | 'freedom-scene-switch';
43
45
  export type Event = {
44
46
  type: EventType;
45
47
  action: EventAction;
46
- value?: string;
48
+ value?: any;
47
49
  payload?: any;
48
50
  };
49
51
 
@@ -53,6 +53,9 @@ export default function handleEleEvent() {
53
53
  return isString(v.identifierName);
54
54
  }));
55
55
  return;
56
+ case 'freedom-scene-switch':
57
+ emitter.emit("freedom-scene-switch-".concat(payload.namespace), event.value ? Number(event.value) : undefined);
58
+ return;
56
59
  default:
57
60
  return;
58
61
  }
@@ -3,6 +3,12 @@ import { handleEleEvent } from "../element/utils";
3
3
  export default function useEleEventHandle(_ref) {
4
4
  var events = _ref.events,
5
5
  payload = _ref.payload;
6
+ // const [eventHandles, setEventHandles] = useState<EventHandles>({
7
+ // onClick: () => {},
8
+ // onContextMenu: () => {},
9
+ // onMouseEnter: () => {},
10
+ // onMouseLeave: () => {},
11
+ // })
6
12
  var eventHandles = useRef({
7
13
  onClick: function onClick() {},
8
14
  onContextMenu: function onContextMenu() {},
@@ -32,5 +38,5 @@ export default function useEleEventHandle(_ref) {
32
38
  onMouseLeave: onMouseLeave
33
39
  };
34
40
  }, [events, payload]);
35
- return eventHandles.current;
41
+ return eventHandles;
36
42
  }
@@ -30,7 +30,8 @@ import "./index.css";
30
30
  var RefreshFrequency = 1.5 * 60 * 1000;
31
31
  var Player = function Player(_ref) {
32
32
  var jsonConfig = _ref.jsonConfig,
33
- query = _ref.query;
33
+ query = _ref.query,
34
+ onEvent = _ref.onEvent;
34
35
  var graphRef = useRef(null);
35
36
  var wrapRef = useRef(null);
36
37
  var playerRef = useRef(null);
@@ -250,6 +251,43 @@ var Player = function Player(_ref) {
250
251
  emitter.off(eventName, handler);
251
252
  };
252
253
  }, [query, mittMeta]);
254
+
255
+ // 监听场景组态切换事件
256
+ useEffect(function () {
257
+ var handler = /*#__PURE__*/function () {
258
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(scadaId) {
259
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
260
+ while (1) switch (_context4.prev = _context4.next) {
261
+ case 0:
262
+ onEvent === null || onEvent === void 0 ? void 0 : onEvent({
263
+ event: 'freedom-scene-switch',
264
+ payload: {
265
+ scadaId: scadaId
266
+ }
267
+ });
268
+ console.log('[186]-index.tsx', onEvent, {
269
+ event: 'freedom-scene-switch',
270
+ payload: {
271
+ scadaId: scadaId
272
+ }
273
+ });
274
+ case 2:
275
+ case "end":
276
+ return _context4.stop();
277
+ }
278
+ }, _callee4);
279
+ }));
280
+ return function handler(_x5) {
281
+ return _ref6.apply(this, arguments);
282
+ };
283
+ }();
284
+ var mittMeta = getMittMeta(query);
285
+ var eventName = "freedom-scene-switch-".concat(mittMeta.namespace);
286
+ emitter.on(eventName, handler);
287
+ return function () {
288
+ emitter.off(eventName, handler);
289
+ };
290
+ }, [query, onEvent]);
253
291
  useEffect(function () {
254
292
  if (!playerRef.current) return;
255
293
  graphRef.current = new Graph({
@@ -309,23 +347,23 @@ var Player = function Player(_ref) {
309
347
  // scene === 'device' 加载设备点位数据
310
348
  useEffect(function () {
311
349
  var fetchDevicePoints = /*#__PURE__*/function () {
312
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(deviceId) {
350
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(deviceId) {
313
351
  var res, pointList;
314
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
315
- while (1) switch (_context4.prev = _context4.next) {
352
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
353
+ while (1) switch (_context5.prev = _context5.next) {
316
354
  case 0:
317
- _context4.next = 2;
355
+ _context5.next = 2;
318
356
  return GetDevicePoint({
319
357
  deviceIdList: [deviceId]
320
358
  }, []);
321
359
  case 2:
322
- res = _context4.sent;
360
+ res = _context5.sent;
323
361
  if (res.success) {
324
- _context4.next = 6;
362
+ _context5.next = 6;
325
363
  break;
326
364
  }
327
365
  message.error('设备点位数据获取失败');
328
- return _context4.abrupt("return");
366
+ return _context5.abrupt("return");
329
367
  case 6:
330
368
  pointList = res.data || [];
331
369
  pointList.forEach(function (v) {
@@ -334,12 +372,12 @@ var Player = function Player(_ref) {
334
372
  });
335
373
  case 8:
336
374
  case "end":
337
- return _context4.stop();
375
+ return _context5.stop();
338
376
  }
339
- }, _callee4);
377
+ }, _callee5);
340
378
  }));
341
- return function fetchDevicePoints(_x5) {
342
- return _ref6.apply(this, arguments);
379
+ return function fetchDevicePoints(_x6) {
380
+ return _ref7.apply(this, arguments);
343
381
  };
344
382
  }();
345
383
  var timer;
@@ -359,23 +397,23 @@ var Player = function Player(_ref) {
359
397
  // scene === 'freedom' 加载设备点位数据
360
398
  useEffect(function () {
361
399
  var fetchDevicePoints = /*#__PURE__*/function () {
362
- var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(ids) {
400
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(ids) {
363
401
  var res, pointList;
364
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
365
- while (1) switch (_context5.prev = _context5.next) {
402
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
403
+ while (1) switch (_context6.prev = _context6.next) {
366
404
  case 0:
367
- _context5.next = 2;
405
+ _context6.next = 2;
368
406
  return GetDevicePoint({
369
407
  pointIdList: ids
370
408
  }, []);
371
409
  case 2:
372
- res = _context5.sent;
410
+ res = _context6.sent;
373
411
  if (res.success) {
374
- _context5.next = 6;
412
+ _context6.next = 6;
375
413
  break;
376
414
  }
377
415
  message.error('设备点位数据获取失败');
378
- return _context5.abrupt("return");
416
+ return _context6.abrupt("return");
379
417
  case 6:
380
418
  pointList = res.data || [];
381
419
  pointList.forEach(function (v) {
@@ -383,12 +421,12 @@ var Player = function Player(_ref) {
383
421
  });
384
422
  case 8:
385
423
  case "end":
386
- return _context5.stop();
424
+ return _context6.stop();
387
425
  }
388
- }, _callee5);
426
+ }, _callee6);
389
427
  }));
390
- return function fetchDevicePoints(_x6) {
391
- return _ref7.apply(this, arguments);
428
+ return function fetchDevicePoints(_x7) {
429
+ return _ref8.apply(this, arguments);
392
430
  };
393
431
  }();
394
432
  var timer;
@@ -9,7 +9,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
9
9
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
11
  import React from "react";
12
- import { useEffect, useState, useRef } from 'react';
12
+ import { useEffect, useState } from 'react';
13
13
  import { message } from 'antd';
14
14
  import { queryToObject } from "../../utils";
15
15
  import { GetProductConfiguration } from "../../services/product/Product";
@@ -21,7 +21,8 @@ import ScadaEmpty from "./components/Empty";
21
21
  import styles from "./index.css";
22
22
  import { storeToken } from "../../utils/auth";
23
23
  var Display = function Display(_ref) {
24
- var query_ = _ref.query_;
24
+ var query_ = _ref.query_,
25
+ onEvent = _ref.onEvent;
25
26
  var _useState = useState(),
26
27
  _useState2 = _slicedToArray(_useState, 2),
27
28
  jsonConfig = _useState2[0],
@@ -30,7 +31,7 @@ var Display = function Display(_ref) {
30
31
  _useState4 = _slicedToArray(_useState3, 2),
31
32
  loading = _useState4[0],
32
33
  setLoading = _useState4[1];
33
- var queryRef = useRef(query_ || queryToObject(window.location.href));
34
+ var q = query_ || queryToObject(window.location.href);
34
35
  useEffect(function () {
35
36
  if (query_) {
36
37
  // 被当成组件使用时(非 iframe ),设置接口请求的 prefix
@@ -42,11 +43,13 @@ var Display = function Display(_ref) {
42
43
 
43
44
  // 获取组态配置
44
45
  useEffect(function () {
45
- var query = queryRef.current;
46
+ var query = query_ || queryToObject(window.location.href);
46
47
  if (!query) return;
47
48
  if (query.token && query.xToken) {
48
49
  storeToken(query.token, query.xToken);
49
50
  }
51
+
52
+ // 产品组态
50
53
  if (query.scene === 'product') {
51
54
  var fetchProductScadaConfig = /*#__PURE__*/function () {
52
55
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
@@ -106,6 +109,8 @@ var Display = function Display(_ref) {
106
109
  }();
107
110
  fetchProductScadaConfig();
108
111
  }
112
+
113
+ // 设备组态
109
114
  if (query.scene === 'device') {
110
115
  var fetchDeviceScadaConfig = /*#__PURE__*/function () {
111
116
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
@@ -160,6 +165,8 @@ var Display = function Display(_ref) {
160
165
  }();
161
166
  fetchDeviceScadaConfig();
162
167
  }
168
+
169
+ // 场景组态
163
170
  if (query.scene === 'freedom') {
164
171
  var _fetchDeviceScadaConfig = /*#__PURE__*/function () {
165
172
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
@@ -213,7 +220,7 @@ var Display = function Display(_ref) {
213
220
  }();
214
221
  _fetchDeviceScadaConfig();
215
222
  }
216
- }, []);
223
+ }, [query_]);
217
224
  useEffect(function () {
218
225
  window.addEventListener('message', function (e) {
219
226
  var data = e.data;
@@ -229,9 +236,10 @@ var Display = function Display(_ref) {
229
236
  }, []);
230
237
  return /*#__PURE__*/React.createElement("div", {
231
238
  className: styles.wrap
232
- }, !!queryRef.current && /*#__PURE__*/React.createElement(Player, {
239
+ }, !!q && /*#__PURE__*/React.createElement(Player, {
233
240
  jsonConfig: jsonConfig,
234
- query: queryRef.current
241
+ query: q,
242
+ onEvent: onEvent
235
243
  }), !loading && !jsonConfig && /*#__PURE__*/React.createElement(ScadaEmpty, null));
236
244
  };
237
245
  export default Display;
@@ -15,7 +15,7 @@ export var elementList = [{
15
15
  width: 30,
16
16
  payload: defaultConfigElePipeTL
17
17
  }, {
18
- url: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/63831cb71bd24c47bb11b6e02d9e4c77.svg',
18
+ url: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/生产/组态图片/图片元素/63831cb71bd24c47bb11b6e02d9e4c77.svg',
19
19
  label: '',
20
20
  width: 30,
21
21
  payload: defaultConfigElePipeTop
@@ -30,38 +30,38 @@ export var elementList = [{
30
30
  width: 25,
31
31
  payload: defaultConfigElePipeLeft
32
32
  }, {
33
- url: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/58225b888f6a48b9af4b21444700c6ba.svg',
33
+ url: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/生产/组态图片/图片元素/58225b888f6a48b9af4b21444700c6ba.svg',
34
34
  label: '',
35
35
  width: 25,
36
36
  payload: defaultConfigElePipeCenter
37
37
  }, {
38
- url: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/40a74ebbf068410593fbc92442088fc7.svg',
38
+ url: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/生产/组态图片/图片元素/40a74ebbf068410593fbc92442088fc7.svg',
39
39
  label: '',
40
40
  width: 25,
41
41
  payload: defaultConfigElePipeRight
42
42
  }, {
43
- url: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/be42df157707426fb53360693eae8094.svg',
43
+ url: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/生产/组态图片/图片元素/be42df157707426fb53360693eae8094.svg',
44
44
  label: '',
45
45
  width: 25,
46
46
  payload: defaultConfigElePipeBL
47
47
  }, {
48
- url: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/2358402046b8439b9bee49814e5d94e3.svg',
48
+ url: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/生产/组态图片/图片元素/2358402046b8439b9bee49814e5d94e3.svg',
49
49
  label: '',
50
50
  width: 25,
51
51
  payload: defaultConfigElePipeBottom
52
52
  }, {
53
- url: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/7cdce2491ce3468aae034f531bf149d5.svg',
53
+ url: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/生产/组态图片/图片元素/7cdce2491ce3468aae034f531bf149d5.svg',
54
54
  label: '',
55
55
  width: 25,
56
56
  payload: defaultConfigElePipeBR
57
57
  }, {
58
- url: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/dd03192a3abc487aa7b91ad75d1be533.svg',
58
+ url: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/生产/组态图片/图片元素/dd03192a3abc487aa7b91ad75d1be533.svg',
59
59
  label: '',
60
60
  width: 30,
61
61
  height: 10,
62
62
  payload: defaultConfigElePipeHorizontal
63
63
  }, {
64
- url: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/8e5f1deaf3a8466fa168588eaac664bc.svg',
64
+ url: 'https://front-end-assets.oss-cn-shanghai.aliyuncs.com/生产/组态图片/图片元素/8e5f1deaf3a8466fa168588eaac664bc.svg',
65
65
  label: '',
66
66
  width: 10,
67
67
  height: 30,
@@ -35,6 +35,9 @@ var actionOptions = [{
35
35
  }, {
36
36
  label: '点位写入',
37
37
  value: 'write-point'
38
+ }, {
39
+ label: '场景组态切换',
40
+ value: 'freedom-scene-switch'
38
41
  }];
39
42
  var formLayout = {
40
43
  wrapperCol: {
@@ -170,16 +173,30 @@ var FormBindEvent = function FormBindEvent() {
170
173
  shouldUpdate: true
171
174
  }, function (_ref5) {
172
175
  var getFieldValue = _ref5.getFieldValue;
173
- return getFieldValue(['events', index, 'action']) === 'open-url' && /*#__PURE__*/React.createElement(Form.Item, _extends({}, field, {
174
- key: "".concat(field.key, "value"),
175
- label: "\u94FE\u63A5\xA0",
176
- name: [field.name, 'value'],
177
- fieldKey: [field.fieldKey, 'value'],
178
- rules: [{
179
- required: true,
180
- message: '请输入'
181
- }]
182
- }), /*#__PURE__*/React.createElement(Input, null));
176
+ if (getFieldValue(['events', index, 'action']) === 'open-url') {
177
+ return /*#__PURE__*/React.createElement(Form.Item, _extends({}, field, {
178
+ key: "".concat(field.key, "value"),
179
+ label: "\u94FE\u63A5\xA0",
180
+ name: [field.name, 'value'],
181
+ fieldKey: [field.fieldKey, 'value'],
182
+ rules: [{
183
+ required: true,
184
+ message: '请输入'
185
+ }]
186
+ }), /*#__PURE__*/React.createElement(Input, null));
187
+ }
188
+ if (getFieldValue(['events', index, 'action']) === 'freedom-scene-switch') {
189
+ return /*#__PURE__*/React.createElement(Form.Item, _extends({}, field, {
190
+ key: "".concat(field.key, "value"),
191
+ label: "\u573A\u666FID\xA0",
192
+ name: [field.name, 'value'],
193
+ fieldKey: [field.fieldKey, 'value'],
194
+ rules: [{
195
+ required: true,
196
+ message: '请输入'
197
+ }]
198
+ }), /*#__PURE__*/React.createElement(Input, null));
199
+ }
183
200
  }));
184
201
  }), /*#__PURE__*/React.createElement(Form.Item, {
185
202
  wrapperCol: {
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "coolcare-lite-scada-component",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "scripts": {
5
5
  "start": "umi dev",
6
6
  "build:prod": "UMI_ENV=prod umi build",
7
7
  "build:generalfushi": "UMI_ENV=prod REACT_APP_PLATFORM=generalfushi umi build",
8
+ "build:yimin": "UMI_ENV=prod REACT_APP_PLATFORM=yimin umi build",
8
9
  "build:staging": "UMI_ENV=staging umi build",
9
10
  "build:component": "father build",
10
11
  "postinstall": "umi generate tmp",