@zgfe/modules-event 1.0.7 → 1.0.29-zhongyuan.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 (43) hide show
  1. package/README.md +35 -35
  2. package/es/components/eventFilter/index.js +68 -20
  3. package/es/components/eventFilter/setCascade.d.ts +3 -0
  4. package/es/components/eventFilter/setCascade.js +286 -0
  5. package/es/components/eventFilter/styles/index.less +148 -36
  6. package/es/components/renderContent/index.js +14 -25
  7. package/es/components/renderContent/styles/index.less +19 -19
  8. package/es/components/renderContent/types.d.ts +0 -1
  9. package/es/components/searchPanel/index.js +19 -6
  10. package/es/components/searchPanel/styles/index.less +22 -18
  11. package/es/components/searchPanel/types.d.ts +2 -2
  12. package/es/components/table/index.js +60 -9
  13. package/es/components/table/styles/index.less +241 -193
  14. package/es/components/table/types.d.ts +0 -1
  15. package/es/components/topBar/index.d.ts +6 -1
  16. package/es/components/topBar/index.js +39 -22
  17. package/es/components/topBar/styles/index.less +58 -63
  18. package/es/components/topBar/types.d.ts +0 -1
  19. package/es/constants/apis.d.ts +3 -1
  20. package/es/constants/apis.js +4 -2
  21. package/es/constants/fields.d.ts +0 -14
  22. package/es/constants/fields.js +1 -45
  23. package/es/modules/chart/demo/panel.js +7 -2
  24. package/es/modules/chart/index.js +105 -36
  25. package/es/modules/chart/types.d.ts +3 -0
  26. package/es/modules/content/index.d.ts +1 -1
  27. package/es/modules/content/index.js +94 -55
  28. package/es/modules/content/styles/index.less +19 -7
  29. package/es/modules/content/utils.d.ts +1 -1
  30. package/es/modules/content/utils.js +19 -18
  31. package/es/modules/home/demo/edit.js +6 -7
  32. package/es/modules/home/demo/index.js +1 -1
  33. package/es/modules/home/demo/styles/index.less +33 -33
  34. package/es/modules/home/index.js +53 -35
  35. package/es/modules/home/styles/index.less +49 -49
  36. package/es/modules/topPanel/index.js +36 -8
  37. package/es/modules/topPanel/styles/index.less +50 -49
  38. package/es/style/image/ring.svg +8 -8
  39. package/es/style/index.less +62 -62
  40. package/es/types.d.ts +6 -0
  41. package/es/utils/formData.d.ts +2 -1
  42. package/es/utils/formData.js +39 -9
  43. package/package.json +24 -20
package/README.md CHANGED
@@ -1,35 +1,35 @@
1
- # modules-event
2
-
3
- 事件分析
4
-
5
- ## Getting Started
6
-
7
- Install dependencies,
8
-
9
- ```bash
10
- $ npm i
11
- ```
12
-
13
- Start the dev server,
14
-
15
- ```bash
16
- $ npm start
17
- ```
18
-
19
- Build documentation,
20
-
21
- ```bash
22
- $ npm run docs:build
23
- ```
24
-
25
- Run test,
26
-
27
- ```bash
28
- $ npm test
29
- ```
30
-
31
- Build library via `father-build`,
32
-
33
- ```bash
34
- $ npm run build
35
- ```
1
+ # modules-event
2
+
3
+ 事件分析
4
+
5
+ ## Getting Started
6
+
7
+ Install dependencies,
8
+
9
+ ```bash
10
+ $ npm i
11
+ ```
12
+
13
+ Start the dev server,
14
+
15
+ ```bash
16
+ $ npm start
17
+ ```
18
+
19
+ Build documentation,
20
+
21
+ ```bash
22
+ $ npm run docs:build
23
+ ```
24
+
25
+ Run test,
26
+
27
+ ```bash
28
+ $ npm test
29
+ ```
30
+
31
+ Build library via `father-build`,
32
+
33
+ ```bash
34
+ $ npm run build
35
+ ```
@@ -12,11 +12,13 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import { Tooltip } from 'antd';
14
14
  import React, { useEffect, useRef, useState, useContext } from 'react';
15
- import { BizEventSelector, BizAttributeSelector, IconFont, BizAttrConditionGroup, BizGlobalDataContext } from '@zgfe/business-lib';
15
+ import { BizEventSelector, BizAttributeSelector, IconFont, BizAttrConditionGroup, BizGlobalDataContext, ajax } from '@zgfe/business-lib';
16
16
  import { EventContext } from '../../types';
17
17
  import './styles/index.less';
18
18
  import { judgeIsCity, judgeIsArea } from '../../modules/content/utils';
19
19
  import _ from 'lodash';
20
+ import SetCascade from './setCascade';
21
+ import { Apis } from '../../constants';
20
22
  var classPrefix = 'eventfilter-box';
21
23
  var EventFilter = function EventFilter(props) {
22
24
  var _props$value, _props$value2;
@@ -25,9 +27,9 @@ var EventFilter = function EventFilter(props) {
25
27
  setEnableSelectChart = props.setEnableSelectChart,
26
28
  analysisType = props.analysisType;
27
29
  var _useContext = useContext(EventContext),
28
- selectEventData = _useContext.selectEventData,
29
30
  searchData = _useContext.searchData,
30
- setSearchData = _useContext.setSearchData;
31
+ setSearchData = _useContext.setSearchData,
32
+ currentApp = _useContext.currentApp;
31
33
  var _useContext2 = useContext(BizGlobalDataContext),
32
34
  _useContext2$eventIdM = _useContext2.eventIdMap,
33
35
  eventIdMap = _useContext2$eventIdM === void 0 ? {} : _useContext2$eventIdM;
@@ -76,15 +78,20 @@ var EventFilter = function EventFilter(props) {
76
78
  _useState16 = _slicedToArray(_useState15, 2),
77
79
  eventList = _useState16[0],
78
80
  setEventList = _useState16[1];
81
+ var _useState17 = useState(true),
82
+ _useState18 = _slicedToArray(_useState17, 2),
83
+ isCascadeOpen = _useState18[0],
84
+ setIsCascadeOpen = _useState18[1];
85
+ var _useState19 = useState(false),
86
+ _useState20 = _slicedToArray(_useState19, 2),
87
+ isCascadeShow = _useState20[0],
88
+ setIsCascadeShow = _useState20[1];
89
+ var _useState21 = useState(),
90
+ _useState22 = _slicedToArray(_useState21, 2),
91
+ relationConfig = _useState22[0],
92
+ setRelationConfig = _useState22[1];
79
93
  useEffect(function () {
80
94
  var _data = props.value;
81
- if (selectEventData) {
82
- _data = selectEventData;
83
- setEvent({
84
- id: selectEventData.id,
85
- name: selectEventData.name
86
- });
87
- }
88
95
  if (_data) {
89
96
  if (_data && _data.id) {
90
97
  setShowDimension(true);
@@ -94,13 +101,33 @@ var EventFilter = function EventFilter(props) {
94
101
  setCount(_data.filters.conditions.length);
95
102
  }
96
103
  if (_data.dimension) {
97
- var _attr = _data.dimension;
98
- setBizAttributeSelectorValue(_objectSpread(_objectSpread({}, _data.dimension), {}, {
99
- key: "".concat(_attr.propCategory, "-").concat(_attr.value)
100
- }));
104
+ setBizAttributeSelectorValue(_data.dimension);
101
105
  }
102
106
  }
103
- }, [selectEventData]);
107
+ ajax(Apis.getEventSwitch, {
108
+ method: 'post',
109
+ data: {
110
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
111
+ }
112
+ }).then(function (res) {
113
+ if (res === null || res === void 0 ? void 0 : res.data) {
114
+ setIsCascadeOpen(res === null || res === void 0 ? void 0 : res.data);
115
+ queryRelationConfig();
116
+ }
117
+ });
118
+ }, []);
119
+ var queryRelationConfig = function queryRelationConfig() {
120
+ ajax(Apis.queryRelationConfig, {
121
+ method: 'post',
122
+ data: {
123
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
124
+ }
125
+ }).then(function (res) {
126
+ if (res === null || res === void 0 ? void 0 : res.data) {
127
+ setRelationConfig(res === null || res === void 0 ? void 0 : res.data);
128
+ }
129
+ });
130
+ };
104
131
  var onAdd = function onAdd() {
105
132
  if ((event === null || event === void 0 ? void 0 : event.id) === -1) {
106
133
  return;
@@ -174,8 +201,7 @@ var EventFilter = function EventFilter(props) {
174
201
  propCategory: attr.propCategory,
175
202
  category: attr.category,
176
203
  value: _value,
177
- id: attr.id,
178
- key: "".concat(attr.propCategory, "-").concat(_value)
204
+ id: attr.id
179
205
  });
180
206
  }
181
207
  };
@@ -244,7 +270,19 @@ var EventFilter = function EventFilter(props) {
244
270
  onClick: function onClick() {
245
271
  return onAdd();
246
272
  }
247
- })))), (filter || isAdd) && /*#__PURE__*/React.createElement("div", {
273
+ })), isCascadeOpen ? /*#__PURE__*/React.createElement(Tooltip, {
274
+ placement: "top",
275
+ title: '事件属性级联设置'
276
+ }, /*#__PURE__*/React.createElement(IconFont, {
277
+ style: {
278
+ marginLeft: 16
279
+ },
280
+ className: "".concat((event === null || event === void 0 ? void 0 : event.id) === -1 ? 'disable' : ''),
281
+ type: "guanli",
282
+ onClick: function onClick() {
283
+ setIsCascadeShow(true);
284
+ }
285
+ })) : null)), event && eventIdMap && eventIdMap[event.id] && (filter || isAdd) && /*#__PURE__*/React.createElement("div", {
248
286
  className: "".concat(count > 0 ? 'attr-box-show' : '', " top")
249
287
  }, /*#__PURE__*/React.createElement(BizAttrConditionGroup, {
250
288
  ref: conditionRef,
@@ -255,7 +293,17 @@ var EventFilter = function EventFilter(props) {
255
293
  enableUserProp: analysisType === 'eventProp' ? false : true,
256
294
  eventIdList: event ? [event.id] : [],
257
295
  onChange: onChangeFilters,
258
- onConditionsCount: setCount
259
- })));
296
+ onConditionsCount: setCount,
297
+ relationConfig: relationConfig
298
+ })), isCascadeOpen && isCascadeShow && /*#__PURE__*/React.createElement(SetCascade, {
299
+ relationConfig: relationConfig,
300
+ onCancel: function onCancel() {
301
+ setIsCascadeShow(false);
302
+ },
303
+ submit: function submit() {
304
+ queryRelationConfig();
305
+ setIsCascadeShow(false);
306
+ }
307
+ }));
260
308
  };
261
309
  export default EventFilter;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const SelectAttributes: React.FC<any>;
3
+ export default SelectAttributes;
@@ -0,0 +1,286 @@
1
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
4
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
5
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
8
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
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
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
+ import { IconFont, ajax, BizDialog, BizEventSelector, BizAttributeSelector, BizGlobalDataContext } from '@zgfe/business-lib';
12
+ import { message, Button, Empty } from 'antd';
13
+ import { useContext, useEffect, useRef } from 'react';
14
+ import React, { useState } from 'react';
15
+ import _ from 'lodash';
16
+ import { Apis } from '../../constants';
17
+ var SelectAttributes = function SelectAttributes(props) {
18
+ var classPrefix = 'set-cascade';
19
+ var _useState = useState([{}]),
20
+ _useState2 = _slicedToArray(_useState, 2),
21
+ eventAttrList = _useState2[0],
22
+ setEventAttrList = _useState2[1];
23
+ var _useContext = useContext(BizGlobalDataContext),
24
+ currentApp = _useContext.currentApp;
25
+ var _useState3 = useState([]),
26
+ _useState4 = _slicedToArray(_useState3, 2),
27
+ deleteIds = _useState4[0],
28
+ setDeleteIds = _useState4[1];
29
+ var scrollContainerRef = useRef();
30
+ var scrollToBottom = function scrollToBottom() {
31
+ var _scrollContainerRef$c = scrollContainerRef.current,
32
+ scrollHeight = _scrollContainerRef$c.scrollHeight,
33
+ clientHeight = _scrollContainerRef$c.clientHeight;
34
+ scrollContainerRef.current.scrollTo({
35
+ top: scrollHeight - clientHeight,
36
+ behavior: 'smooth'
37
+ });
38
+ };
39
+ useEffect(function () {
40
+ if (props.relationConfig && props.relationConfig.length) {
41
+ setEventAttrList(props.relationConfig.map(function (item) {
42
+ return {
43
+ id: item.id,
44
+ event: {
45
+ id: item.eventId,
46
+ name: item.eventName
47
+ },
48
+ attrSup: {
49
+ id: item.eventAttrIdSup,
50
+ label: item.eventAttrNameSup,
51
+ propCategory: 'eventProp'
52
+ },
53
+ attrSub: {
54
+ id: item.eventAttrIdSub,
55
+ label: item.eventAttrNameSub,
56
+ propCategory: 'eventProp'
57
+ }
58
+ };
59
+ }));
60
+ }
61
+ }, []);
62
+ var changeItemInfo = function changeItemInfo(i, key, v) {
63
+ var dealData = _.clone(eventAttrList);
64
+ dealData[i]['isEdit'] = true;
65
+ dealData[i][key] = v;
66
+ if (key == 'event') {
67
+ dealData[i]['attrSup'] = void 0;
68
+ dealData[i]['attrSub'] = void 0;
69
+ }
70
+ setEventAttrList(dealData);
71
+ if (key === 'attrSup' && dealData[i]['attrSub'] && v && v.id === dealData[i]['attrSub'].id || key === 'attrSub' && dealData[i]['attrSup'] && v && v.id === dealData[i]['attrSup'].id) {
72
+ message.warn('事件属性不可相同');
73
+ setTimeout(function () {
74
+ return changeItemInfo(i, key, undefined);
75
+ }, 200);
76
+ return;
77
+ }
78
+ };
79
+ var dealEventAttr = function dealEventAttr(index) {
80
+ var dealData = _.clone(eventAttrList);
81
+ if (dealData[index].id) {
82
+ setDeleteIds([].concat(_toConsumableArray(deleteIds), [dealData[index].id]));
83
+ }
84
+ dealData.splice(index, 1);
85
+ setEventAttrList(dealData);
86
+ };
87
+ var submit = function submit() {
88
+ if (eventAttrList.filter(function (item) {
89
+ return !item.event || !item.event.id;
90
+ }).length) {
91
+ message.warn('设置事件不可为空');
92
+ return;
93
+ }
94
+ if (eventAttrList.filter(function (item) {
95
+ return !item.attrSup || !item.attrSup.id || !item.attrSub || !item.attrSub.id;
96
+ }).length) {
97
+ message.warn('事件属性不可为空');
98
+ return;
99
+ }
100
+ var addEventRelation = eventAttrList.filter(function (item) {
101
+ return !item.id;
102
+ }).map(function (item) {
103
+ return {
104
+ eventId: item.event.id,
105
+ eventName: item.event.name,
106
+ eventAttrIdSup: item.attrSup.id,
107
+ eventAttrNameSup: item.attrSup.label,
108
+ eventAttrIdSub: item.attrSub.id,
109
+ eventAttrNameSub: item.attrSub.label
110
+ };
111
+ });
112
+ var updateEventRelation = eventAttrList.filter(function (item) {
113
+ return item.id && item.isEdit;
114
+ }).map(function (item) {
115
+ return {
116
+ id: item.id,
117
+ eventId: item.event.id,
118
+ eventName: item.event.name,
119
+ eventAttrIdSup: item.attrSup.id,
120
+ eventAttrNameSup: item.attrSup.label,
121
+ eventAttrIdSub: item.attrSub.id,
122
+ eventAttrNameSub: item.attrSub.label
123
+ };
124
+ });
125
+ if ([].concat(_toConsumableArray(addEventRelation), _toConsumableArray(updateEventRelation), _toConsumableArray(deleteIds)).length) {
126
+ ajax(Apis.relationSaveConfig, {
127
+ method: 'post',
128
+ data: {
129
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
130
+ addEventRelation: addEventRelation,
131
+ updateEventRelation: updateEventRelation,
132
+ deleteIds: deleteIds
133
+ }
134
+ }).then(function (res) {
135
+ if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
136
+ props.submit && props.submit();
137
+ message.success('保存成功');
138
+ }
139
+ });
140
+ } else {
141
+ props.onCancel && props.onCancel();
142
+ message.success('保存成功');
143
+ }
144
+ };
145
+ return /*#__PURE__*/React.createElement(BizDialog, {
146
+ wrapClassName: "".concat(classPrefix, "-modal-box"),
147
+ width: 520,
148
+ open: true,
149
+ title: "\u4E8B\u4EF6\u5C5E\u6027\u7EA7\u8054\u8BBE\u7F6E",
150
+ closable: true,
151
+ onCancel: props.onCancel,
152
+ footer: null
153
+ }, /*#__PURE__*/React.createElement("div", {
154
+ className: "".concat(classPrefix, "-modal-box-tips")
155
+ }, "\u7EA7\u8054\u5173\u7CFB\u8BBE\u7F6E\u540E\uFF0CT+1\u65E5\u5B8C\u6210\u66F4\u65B0\uFF0C\u8BF7\u4E8E\u6B21\u65E5\u524D\u6765\u67E5\u8BE2"), /*#__PURE__*/React.createElement("div", {
156
+ className: "".concat(classPrefix, "-modal-box-set"),
157
+ ref: scrollContainerRef
158
+ }, !eventAttrList.length && /*#__PURE__*/React.createElement("div", {
159
+ className: "".concat(classPrefix, "-modal-box-set-empty")
160
+ }, /*#__PURE__*/React.createElement(Empty, {
161
+ image: Empty.PRESENTED_IMAGE_SIMPLE,
162
+ description: "\u6682\u65E0\u6570\u636E"
163
+ })), eventAttrList.map(function (item, index) {
164
+ var _item$event, _item$event2;
165
+ return /*#__PURE__*/React.createElement("div", {
166
+ key: index,
167
+ className: "".concat(classPrefix, "-modal-box-set-item")
168
+ }, /*#__PURE__*/React.createElement("div", {
169
+ className: "".concat(classPrefix, "-modal-box-set-item-info")
170
+ }, /*#__PURE__*/React.createElement("div", {
171
+ className: "".concat(classPrefix, "-modal-box-set-item-info-item")
172
+ }, /*#__PURE__*/React.createElement("div", {
173
+ style: {
174
+ marginRight: 12
175
+ }
176
+ }, "\u8BBE\u7F6E\u4E8B\u4EF6"), /*#__PURE__*/React.createElement(BizEventSelector, {
177
+ showAllEvent: false,
178
+ showBuiltInTarget: false,
179
+ popupContainer: false,
180
+ defaultSelectAble: false,
181
+ value: {
182
+ event: item.event
183
+ },
184
+ onChange: function onChange(e) {
185
+ changeItemInfo(index, 'event', e.event);
186
+ },
187
+ placeholder: "\u8BF7\u9009\u62E9\u4E8B\u4EF6"
188
+ })), /*#__PURE__*/React.createElement("div", {
189
+ style: {
190
+ paddingLeft: 8
191
+ }
192
+ }, /*#__PURE__*/React.createElement("div", {
193
+ className: "".concat(classPrefix, "-modal-box-set-item-info-item"),
194
+ style: {
195
+ marginBottom: 16
196
+ }
197
+ }, /*#__PURE__*/React.createElement("div", {
198
+ className: "".concat(classPrefix, "-modal-box-set-item-info-item-shu")
199
+ }), /*#__PURE__*/React.createElement("div", {
200
+ className: "".concat(classPrefix, "-modal-box-set-item-info-item-heng")
201
+ }), /*#__PURE__*/React.createElement("div", {
202
+ style: {
203
+ marginRight: 12
204
+ }
205
+ }, "\u4E0A\u7EA7\u4E8B\u4EF6\u5C5E\u6027"), /*#__PURE__*/React.createElement(BizAttributeSelector, {
206
+ isString: true,
207
+ isHideYeWu: true,
208
+ enableEventProp: true,
209
+ enableUserProp: false,
210
+ enableEnvProp: false,
211
+ eventIdList: [item === null || item === void 0 ? void 0 : (_item$event = item.event) === null || _item$event === void 0 ? void 0 : _item$event.id],
212
+ value: item.attrSup,
213
+ enableDelete: true,
214
+ onChange: function onChange(e) {
215
+ changeItemInfo(index, 'attrSup', e);
216
+ },
217
+ onDelete: function onDelete() {
218
+ changeItemInfo(index, 'attrSup', undefined);
219
+ },
220
+ placeholder: "\u8BF7\u9009\u62E9\u7EC6\u5206\u5C5E\u6027"
221
+ })), /*#__PURE__*/React.createElement("div", {
222
+ className: "".concat(classPrefix, "-modal-box-set-item-info-item")
223
+ }, /*#__PURE__*/React.createElement("div", {
224
+ className: "".concat(classPrefix, "-modal-box-set-item-info-item-shu"),
225
+ style: {
226
+ marginTop: -32
227
+ }
228
+ }), /*#__PURE__*/React.createElement("div", {
229
+ className: "".concat(classPrefix, "-modal-box-set-item-info-item-heng")
230
+ }), /*#__PURE__*/React.createElement("div", {
231
+ style: {
232
+ marginRight: 12
233
+ }
234
+ }, "\u4E0B\u7EA7\u4E8B\u4EF6\u5C5E\u6027"), /*#__PURE__*/React.createElement(BizAttributeSelector, {
235
+ isString: true,
236
+ isHideYeWu: true,
237
+ enableEventProp: true,
238
+ enableUserProp: false,
239
+ enableEnvProp: false,
240
+ eventIdList: [item === null || item === void 0 ? void 0 : (_item$event2 = item.event) === null || _item$event2 === void 0 ? void 0 : _item$event2.id],
241
+ value: item.attrSub,
242
+ enableDelete: true,
243
+ onChange: function onChange(e) {
244
+ changeItemInfo(index, 'attrSub', e);
245
+ },
246
+ onDelete: function onDelete() {
247
+ changeItemInfo(index, 'attrSub', undefined);
248
+ },
249
+ placeholder: "\u8BF7\u9009\u62E9\u7EC6\u5206\u5C5E\u6027"
250
+ })))), /*#__PURE__*/React.createElement("div", {
251
+ className: "".concat(classPrefix, "-modal-box-set-item-info-item")
252
+ }, /*#__PURE__*/React.createElement(IconFont, {
253
+ size: 16,
254
+ type: "qingchu",
255
+ onClick: function onClick() {
256
+ dealEventAttr(index);
257
+ }
258
+ })));
259
+ })), /*#__PURE__*/React.createElement("div", {
260
+ className: "".concat(classPrefix, "-modal-box-footer")
261
+ }, /*#__PURE__*/React.createElement(Button, {
262
+ disabled: eventAttrList.length > 4,
263
+ shape: "round",
264
+ className: "button addEvent ".concat(eventAttrList.length > 4 ? 'disabled' : ''),
265
+ onClick: function onClick() {
266
+ setEventAttrList([].concat(_toConsumableArray(eventAttrList), [{}]));
267
+ setTimeout(function () {
268
+ return scrollToBottom();
269
+ });
270
+ }
271
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(IconFont, {
272
+ type: "tianjia3",
273
+ style: {
274
+ marginRight: 8
275
+ }
276
+ }), "\u6DFB\u52A0\u7EA7\u8054\u5173\u7CFB")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
277
+ onClick: props.onCancel,
278
+ style: {
279
+ marginRight: 16
280
+ }
281
+ }, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
282
+ type: 'primary',
283
+ onClick: submit
284
+ }, "\u4FDD\u5B58"))));
285
+ };
286
+ export default SelectAttributes;
@@ -1,36 +1,148 @@
1
- .eventfilter-box {
2
- .attr-box-show {
3
- margin-top: 4px;
4
- }
5
- > div:nth-child(1) {
6
- display: flex;
7
- padding: 4px 0 4px 24px;
8
- &:hover {
9
- background: #e8efff;
10
- }
11
- .biz-event-select,
12
- .biz-attr-select {
13
- min-width: 208px;
14
- margin-right: 16px;
15
- }
16
- .shaixuan {
17
- margin-top: 2px;
18
- color: #9aa1a9;
19
- font-size: 20px !important;
20
- cursor: pointer;
21
- }
22
- .shaixuan:hover {
23
- color: #165dff;
24
- }
25
- .disable {
26
- color: #ccd0d4 !important;
27
- cursor: not-allowed !important;
28
- }
29
- }
30
- &-multiple {
31
- .biz-event-select {
32
- width: auto !important;
33
- min-width: 208px;
34
- }
35
- }
36
- }
1
+ .eventfilter-box {
2
+ .attr-box-show {
3
+ margin-top: 4px;
4
+ }
5
+ > div:nth-child(1) {
6
+ display: flex;
7
+ padding: 4px 0 4px 24px;
8
+ &:hover {
9
+ background: #e8efff;
10
+ }
11
+ .biz-event-select,
12
+ .biz-attr-select {
13
+ min-width: 208px;
14
+ margin-right: 16px;
15
+ }
16
+ .shaixuan,
17
+ .guanli {
18
+ margin-top: 2px;
19
+ color: #9aa1a9;
20
+ font-size: 20px !important;
21
+ cursor: pointer;
22
+ }
23
+ .shaixuan:hover,
24
+ .guanli:hover {
25
+ color: #165dff;
26
+ }
27
+ .disable {
28
+ color: #ccd0d4 !important;
29
+ cursor: not-allowed !important;
30
+ }
31
+ }
32
+ &-multiple {
33
+ .biz-event-select {
34
+ width: auto !important;
35
+ min-width: 208px;
36
+ }
37
+ }
38
+ }
39
+
40
+ .set-cascade-modal-box {
41
+ .ant-modal-header {
42
+ padding-bottom: 0;
43
+ }
44
+ .ant-modal-body {
45
+ padding: 0;
46
+ }
47
+ &-tips {
48
+ padding: 16px 24px;
49
+ color: #67727f;
50
+ font-weight: 400;
51
+ font-size: 14px;
52
+ line-height: 22px;
53
+ }
54
+ &-set::-webkit-scrollbar {
55
+ display: none;
56
+ }
57
+ &-set {
58
+ display: flex;
59
+ flex-direction: column;
60
+ gap: 16px;
61
+ height: 328px;
62
+ padding-right: 24px;
63
+ padding-bottom: 16px;
64
+ padding-left: 24px;
65
+ overflow-y: auto;
66
+ &-empty {
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: center;
70
+ height: 328px;
71
+ }
72
+ &-item {
73
+ display: flex;
74
+ flex-direction: row;
75
+ gap: 16px;
76
+ align-self: stretch;
77
+ justify-content: space-between;
78
+ padding: 16px 16px 16px 24px;
79
+ color: var(--io-N8-, #354354);
80
+ font-weight: 400;
81
+ font-size: 14px;
82
+ font-family: 'PingFang SC';
83
+ font-style: normal;
84
+ line-height: 22px;
85
+ border: 1px solid var(--io-i1-, #e8efff);
86
+ border-radius: 4px;
87
+ &-info {
88
+ display: flex;
89
+ flex: 1;
90
+ flex-direction: column;
91
+ gap: 16px;
92
+ &-item {
93
+ display: flex;
94
+ flex-direction: row;
95
+ align-items: center;
96
+ height: 32px;
97
+ .biz-event-select,
98
+ .biz-attr-select {
99
+ flex: 1;
100
+ }
101
+ .biz-attr-select-handle {
102
+ width: inherit;
103
+ }
104
+ &-shu {
105
+ width: 1px;
106
+ height: 32px;
107
+ background: #e8efff;
108
+ }
109
+ &-heng {
110
+ width: 12px;
111
+ height: 1px;
112
+ margin-right: 8px;
113
+ background: #e8efff;
114
+ }
115
+ }
116
+ }
117
+ .qingchu {
118
+ color: #9aa1a9;
119
+ cursor: pointer;
120
+ }
121
+ .qingchu:hover {
122
+ color: #fb5547;
123
+ }
124
+ }
125
+ }
126
+ &-footer {
127
+ display: flex;
128
+ align-items: center;
129
+ justify-content: space-between;
130
+ height: 80px;
131
+ padding: 24px;
132
+ background: #fff;
133
+ border-top: 1px solid var(--io-n-05, #f2f3f4);
134
+ border-bottom-right-radius: 8px;
135
+ border-bottom-left-radius: 8px;
136
+ .addEvent {
137
+ padding: 0 16px;
138
+ div {
139
+ display: flex;
140
+ align-items: center;
141
+ }
142
+ }
143
+ .button:not(.disabled):not(.ant-btn-primary) {
144
+ color: #1454e5;
145
+ border: 1px solid #1454e5;
146
+ }
147
+ }
148
+ }