@zgfe/business-lib 1.0.15-user.1 → 1.0.15-user.4

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.
@@ -476,3 +476,7 @@
476
476
  .ant-dropdown {
477
477
  z-index: 6666 !important;
478
478
  }
479
+ //message
480
+ .ant-message {
481
+ z-index: 99999 !important;
482
+ }
@@ -92,6 +92,7 @@
92
92
  display: flex;
93
93
  align-items: center;
94
94
  margin: 2px 4px 2px 0;
95
+ padding: 0 4px;
95
96
  padding-top: 1px;
96
97
  padding-bottom: 1px;
97
98
  background: none;
@@ -22,25 +22,37 @@ var ConditionTypeList = function ConditionTypeList(props) {
22
22
  className: "biz-user-condition-type-container"
23
23
  }, /*#__PURE__*/React.createElement("li", {
24
24
  className: "condition-type",
25
+ key: "event",
25
26
  onClick: function onClick() {
26
27
  return onAdd('event');
27
28
  }
28
- }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("span", null, "\u505A\u8FC7\uFF08\u6CA1\u505A\u8FC7\uFF09\u2026"))), /*#__PURE__*/React.createElement("li", {
29
+ }, /*#__PURE__*/React.createElement(Space, {
30
+ key: "event"
31
+ }, /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("span", null, "\u505A\u8FC7\uFF08\u6CA1\u505A\u8FC7\uFF09\u2026"))), /*#__PURE__*/React.createElement("li", {
29
32
  className: "condition-type",
33
+ key: "add",
30
34
  onClick: function onClick() {
31
35
  return onAdd('add');
32
36
  }
33
- }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("span", null, "\u65B0\u589E\u4E8E"))), /*#__PURE__*/React.createElement("li", {
37
+ }, /*#__PURE__*/React.createElement(Space, {
38
+ key: "add"
39
+ }, /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("span", null, "\u65B0\u589E\u4E8E"))), /*#__PURE__*/React.createElement("li", {
34
40
  className: "condition-type",
41
+ key: "active",
35
42
  onClick: function onClick() {
36
43
  return onAdd('active');
37
44
  }
38
- }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("span", null, "\u6D3B\u8DC3\u4E8E"))), /*#__PURE__*/React.createElement("li", {
45
+ }, /*#__PURE__*/React.createElement(Space, {
46
+ key: "active"
47
+ }, /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("span", null, "\u6D3B\u8DC3\u4E8E"))), /*#__PURE__*/React.createElement("li", {
39
48
  className: "condition-type",
49
+ key: "prop",
40
50
  onClick: function onClick() {
41
51
  return onAdd('prop');
42
52
  }
43
- }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("span", null, "\u7528\u6237\u5C5E\u6027\u6EE1\u8DB3"))), openTagCondition ? /*#__PURE__*/React.createElement("li", {
53
+ }, /*#__PURE__*/React.createElement(Space, {
54
+ key: "prop"
55
+ }, /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("span", null, "\u7528\u6237\u5C5E\u6027\u6EE1\u8DB3"))), openTagCondition ? /*#__PURE__*/React.createElement("li", {
44
56
  className: "condition-type",
45
57
  onClick: function onClick() {
46
58
  return onAdd('tag');
@@ -26,6 +26,7 @@ var EventCondition = function EventCondition(props) {
26
26
 
27
27
  function onEventChange(data) {
28
28
  var event = data.event;
29
+ console.log(condition);
29
30
  onChange(_objectSpread(_objectSpread({}, condition), {}, {
30
31
  eventId: event.id
31
32
  }));
@@ -8,7 +8,7 @@
8
8
  flex: 1;
9
9
  }
10
10
  .biz-user-condition-event {
11
- width: 355px;
11
+ width: 255px;
12
12
  .biz-event-select-handle {
13
13
  border-top-right-radius: 0;
14
14
  border-bottom-right-radius: 0;
@@ -24,7 +24,7 @@
24
24
  display: flex;
25
25
  align-items: center;
26
26
  justify-content: center;
27
- width: 30px;
27
+ width: 38px;
28
28
  height: 40px;
29
29
  margin-right: @margin-xs;
30
30
  margin-left: @border-radius-small;
@@ -7,6 +7,9 @@
7
7
  &-values,
8
8
  &-unit {
9
9
  margin-right: @margin-xs;
10
+ > input {
11
+ border: none !important;
12
+ }
10
13
  }
11
14
  &-operator {
12
15
  width: 129px;
@@ -9,6 +9,9 @@
9
9
  &-value {
10
10
  width: 58px;
11
11
  margin-right: @margin-xs;
12
+ > input {
13
+ border: none !important;
14
+ }
12
15
  }
13
16
  .biz-user-condition-runtimes-tip {
14
17
  color: @primary-color;
@@ -150,20 +150,54 @@ var getTagList = Promise.resolve([{
150
150
  }]);
151
151
  var data = {
152
152
  json: [[{
153
- attrs: [],
154
- labels: {
155
- operator: 'equal',
156
- values: [77388914425856, 77383474429952, 77384417755136]
157
- }
158
- }], [{
159
153
  attrs: [{
160
154
  attrId: 114,
161
155
  attrName: 'name',
162
156
  category: 'custom',
163
157
  operator: 'equal',
164
- params: ['Safari', 'Microsoft Edge'],
158
+ params: ['Safari', 'Microsoft Edge', 'Apple WebKit'],
165
159
  attrType: 'cont-string'
166
160
  }]
161
+ }, {
162
+ eventId: 24143016,
163
+ runTimes: {
164
+ operator: '>=',
165
+ values: ['1']
166
+ },
167
+ attrs: [{
168
+ attrId: 30183431,
169
+ attrName: '用户open_id',
170
+ category: 'custom',
171
+ operator: 'equal',
172
+ params: ['Apple WebKit', 'Safari', 'Microsoft Edge', 'Unknown'],
173
+ attrType: 'cont-string'
174
+ }],
175
+ runPeriod: {
176
+ operator: 'relative',
177
+ values: ['30', '0']
178
+ }
179
+ }], [{
180
+ eventId: '-3',
181
+ runPeriod: {
182
+ operator: 'relative',
183
+ values: ['30', '0']
184
+ },
185
+ runTimes: {
186
+ operator: '>=',
187
+ values: ['1']
188
+ },
189
+ attrs: []
190
+ }, {
191
+ eventId: '-4',
192
+ runPeriod: {
193
+ operator: 'relative',
194
+ values: ['30', '1']
195
+ },
196
+ runTimes: {
197
+ operator: '>=',
198
+ values: ['1']
199
+ },
200
+ attrs: []
167
201
  }]]
168
202
  };
169
203
  export default (function () {
@@ -118,7 +118,7 @@ var BizUserCondition = function BizUserCondition(props) {
118
118
 
119
119
  setValue(newValue);
120
120
  setDataList(newDataList);
121
- props.onChange(newValue);
121
+ props.onChange && props.onChange(newValue);
122
122
  }
123
123
 
124
124
  return /*#__PURE__*/React.createElement(BizUserConditionContext.Provider, {
@@ -139,14 +139,14 @@ var BizUserCondition = function BizUserCondition(props) {
139
139
  }, "\u4E14"), showList.length ? /*#__PURE__*/React.createElement("div", {
140
140
  className: ["".concat(classPrefix, "-and-conditions-wrap"), props.textMode ? 'text-mode' : ''].join(' ')
141
141
  }, showList.map(function (item, i) {
142
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(OrConditions, {
142
+ return /*#__PURE__*/React.createElement(OrConditions, {
143
143
  showAndDesc: i > 0,
144
144
  orConditions: item.orConditions,
145
145
  key: item.id,
146
146
  onChange: function onChange(data) {
147
147
  _onChange(item.id, data);
148
148
  }
149
- }));
149
+ });
150
150
  })) : null), /*#__PURE__*/React.createElement(ConditionTypeList, {
151
151
  show: value.length < andConditionNum,
152
152
  label: "\u4E14",
@@ -47,14 +47,8 @@ var OrConditions = function OrConditions(props) {
47
47
  showList = _useState2[0],
48
48
  setShowList = _useState2[1];
49
49
 
50
- var _useState3 = useState(orConditions),
51
- _useState4 = _slicedToArray(_useState3, 2),
52
- value = _useState4[0],
53
- setValue = _useState4[1];
54
-
55
50
  useEffect(function () {
56
51
  if (orConditions) {
57
- setValue(orConditions);
58
52
  initShowList();
59
53
  }
60
54
  }, [orConditions]);
@@ -77,8 +71,9 @@ var OrConditions = function OrConditions(props) {
77
71
  id: Math.random(),
78
72
  condition: condition
79
73
  };
80
- var newValue = [].concat(_toConsumableArray(value), [condition]);
81
- setValue(newValue);
74
+ var newValue = showList.map(function (item) {
75
+ return item.condition;
76
+ }).concat([condition]);
82
77
  setShowList([].concat(_toConsumableArray(showList), [newData]));
83
78
  props.onChange(newValue);
84
79
  }
@@ -128,6 +123,7 @@ var OrConditions = function OrConditions(props) {
128
123
 
129
124
  function changeData(type, id, newData) {
130
125
  var newValue = [];
126
+ console.log(type, id, newData);
131
127
  showList.forEach(function (data) {
132
128
  if (id === data.id) {
133
129
  if (type === 'period') {
@@ -159,7 +155,6 @@ var OrConditions = function OrConditions(props) {
159
155
  var newValue = newList.map(function (item) {
160
156
  return item.condition;
161
157
  });
162
- setValue(newValue);
163
158
  props.onChange(newValue);
164
159
  }
165
160
 
@@ -214,11 +209,11 @@ var OrConditions = function OrConditions(props) {
214
209
  runPeriod: condition.runPeriod
215
210
  });
216
211
  } else if (util.isNumber(condition.eventId)) {
217
- conditionDom = /*#__PURE__*/React.createElement(EventCondition, {
212
+ conditionDom = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(EventCondition, {
218
213
  dataId: id,
219
214
  onChange: onChangeEvent,
220
215
  condition: condition
221
- });
216
+ }));
222
217
  }
223
218
 
224
219
  return /*#__PURE__*/React.createElement(ConditionWrap, {
@@ -6,7 +6,7 @@
6
6
  display: flex;
7
7
  .biz-user-condition-and-conditions-wrap {
8
8
  flex: 1;
9
- margin-bottom: @margin-md;
9
+ margin-bottom: @margin-lg;
10
10
  &.text-mode {
11
11
  display: flex;
12
12
  flex-wrap: wrap;
@@ -1,6 +1,8 @@
1
1
  @import '../../assets/styles/variable.less';
2
2
  .biz-user-condition-or {
3
- margin-bottom: @margin-md;
3
+ &:not(:last-child) {
4
+ margin-bottom: @margin-md;
5
+ }
4
6
  &.text-mode {
5
7
  display: flex;
6
8
  min-width: 0;
@@ -17,10 +19,13 @@
17
19
  &-content {
18
20
  display: flex;
19
21
  width: 100%;
20
- margin-bottom: @margin-md;
22
+
21
23
  background: #ffffff;
22
24
  border: 1px solid @border-color-base;
23
25
  border-radius: @border-radius-small;
26
+ &:not(:last-child) {
27
+ margin-bottom: @margin-md;
28
+ }
24
29
  .biz-user-condition-conditions {
25
30
  flex: 1;
26
31
  padding: @padding-xs @padding-md 0 0;
@@ -1,9 +1,9 @@
1
- @import '../../commonStyle/variable.less';
1
+ @import '../../assets/styles/inner.less';
2
2
  .biz-user-condition-relation {
3
3
  position: relative;
4
4
  width: 2px;
5
5
  margin-right: 30px;
6
- background-color: @hoverBgColor;
6
+ background-color: @border-color-split;
7
7
  &-label {
8
8
  position: absolute;
9
9
  top: 50%;
@@ -12,7 +12,8 @@
12
12
  height: 24px;
13
13
  line-height: 24px;
14
14
  text-align: center;
15
- background-color: @hoverBgColor;
15
+ background-color: @border-color-split;
16
+ border-radius: @border-radius-small;
16
17
  transform: translate(-50%, -50%);
17
18
  }
18
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.0.15-user.1",
3
+ "version": "1.0.15-user.4",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -53,6 +53,7 @@
53
53
  "@types/qs": "^6.9.7",
54
54
  "@umijs/fabric": "^2.8.1",
55
55
  "@umijs/test": "^3.0.5",
56
+ "@zgfe/business-lib": "^1.0.15-user.4",
56
57
  "antd": "^4.19.2",
57
58
  "dumi": "^1.1.0",
58
59
  "father-build": "^1.17.2",
@@ -61,5 +62,5 @@
61
62
  "prettier": "^2.2.1",
62
63
  "yorkie": "^2.0.0"
63
64
  },
64
- "gitHead": "508ba3614c7cbbdefb822255f4c0233cc855a50e"
65
+ "gitHead": "aff9d9eccf24c422f39720b228495fd7f5947c5d"
65
66
  }