@zgfe/business-lib 1.1.34-alpha.4 → 1.1.34-alpha.5

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.
@@ -26,6 +26,7 @@ import IconFont from '../../icon/iconFont';
26
26
  import BizGlobalDataContext from '../../context';
27
27
  var RangePicker = DatePicker.RangePicker;
28
28
  var BusinessCondition = function BusinessCondition(props) {
29
+ var _condition$timeDimens, _condition$timeDimens3, _condition$timeDimens4, _condition$attrs;
29
30
  var condition = props.condition,
30
31
  dataId = props.dataId,
31
32
  isEvent = props.isEvent,
@@ -41,7 +42,7 @@ var BusinessCondition = function BusinessCondition(props) {
41
42
  }
42
43
  }, []);
43
44
  var items = [];
44
- if (condition.timeDimensions.length < 3) {
45
+ if (((_condition$timeDimens = condition.timeDimensions) === null || _condition$timeDimens === void 0 ? void 0 : _condition$timeDimens.length) < 3) {
45
46
  items = items.concat([{
46
47
  label: '时间维度',
47
48
  key: 'time dimension'
@@ -209,6 +210,7 @@ var BusinessCondition = function BusinessCondition(props) {
209
210
  setDataAttributeLabel((_labelProps$ = labelProps[0]) === null || _labelProps$ === void 0 ? void 0 : _labelProps$.label);
210
211
  }
211
212
  if (key === 'time dimension') {
213
+ var _condition$timeDimens2;
212
214
  var obj = {
213
215
  frequencyValues: ['1'],
214
216
  frequencyOperator: '>',
@@ -216,7 +218,7 @@ var BusinessCondition = function BusinessCondition(props) {
216
218
  timeOperator: 'all',
217
219
  timeValues: []
218
220
  };
219
- if (condition.timeDimensions.length !== 3) {
221
+ if (((_condition$timeDimens2 = condition.timeDimensions) === null || _condition$timeDimens2 === void 0 ? void 0 : _condition$timeDimens2.length) !== 3) {
220
222
  condition.timeDimensions.push(obj);
221
223
  } else {
222
224
  notification.info({
@@ -345,7 +347,7 @@ var BusinessCondition = function BusinessCondition(props) {
345
347
  placeholder: condition.runTimes.operator !== 'between' ? '请输入' : '输入最大值',
346
348
  onChange: onOperateInput1Change,
347
349
  suffix: condition.runTimes.operator !== 'between' ? '次' : null
348
- })) : null), condition.timeDimensions.map(function (_item, index) {
350
+ })) : null), (_condition$timeDimens3 = condition.timeDimensions) === null || _condition$timeDimens3 === void 0 ? void 0 : _condition$timeDimens3.map(function (_item, index) {
349
351
  return /*#__PURE__*/React.createElement("div", {
350
352
  style: {
351
353
  margin: '10px 0 0 65px'
@@ -398,7 +400,7 @@ var BusinessCondition = function BusinessCondition(props) {
398
400
  }, /*#__PURE__*/React.createElement(IconFont, {
399
401
  type: "qingchu"
400
402
  }))));
401
- }), condition.typeId && label === '业务数据' || label === '订单数据' ? /*#__PURE__*/React.createElement("div", null, condition.timeDimensions.length !== 3 || condition.attrs.length !== 6 ? /*#__PURE__*/React.createElement("div", {
403
+ }), condition.typeId && label === '业务数据' || label === '订单数据' ? /*#__PURE__*/React.createElement("div", null, ((_condition$timeDimens4 = condition.timeDimensions) === null || _condition$timeDimens4 === void 0 ? void 0 : _condition$timeDimens4.length) !== 3 || ((_condition$attrs = condition.attrs) === null || _condition$attrs === void 0 ? void 0 : _condition$attrs.length) !== 6 ? /*#__PURE__*/React.createElement("div", {
402
404
  style: {
403
405
  margin: '2px 0 0 65px',
404
406
  color: '#4075fd',
@@ -17,6 +17,7 @@ import TimeDimension from './timeDimension';
17
17
  import { Tooltip } from 'antd';
18
18
  import IconFont from '../../icon/iconFont';
19
19
  var EventCondition = function EventCondition(props) {
20
+ var _condition$timeDimens2, _condition$timeDimens3;
20
21
  var _useContext = useContext(BizUserConditionContext),
21
22
  isRealTime = _useContext.isRealTime;
22
23
  var condition = props.condition,
@@ -56,6 +57,7 @@ var EventCondition = function EventCondition(props) {
56
57
  var onClick = function onClick(_ref) {
57
58
  var key = _ref.key;
58
59
  if (key === 'time dimension') {
60
+ var _condition$timeDimens;
59
61
  var obj = {
60
62
  frequencyValues: ['1'],
61
63
  frequencyOperator: '>',
@@ -63,7 +65,7 @@ var EventCondition = function EventCondition(props) {
63
65
  timeOperator: 'all',
64
66
  timeValues: []
65
67
  };
66
- if (condition.timeDimensions.length < 3) {
68
+ if (((_condition$timeDimens = condition.timeDimensions) === null || _condition$timeDimens === void 0 ? void 0 : _condition$timeDimens.length) < 3) {
67
69
  condition.timeDimensions.push(obj);
68
70
  } else {
69
71
  notification.info({
@@ -138,7 +140,7 @@ var EventCondition = function EventCondition(props) {
138
140
  onChange: onPeriodChange,
139
141
  isEvent: true,
140
142
  isRealTime: isRealTime
141
- }))))), condition.timeDimensions.map(function (_item, index) {
143
+ }))))), (_condition$timeDimens2 = condition.timeDimensions) === null || _condition$timeDimens2 === void 0 ? void 0 : _condition$timeDimens2.map(function (_item, index) {
142
144
  return /*#__PURE__*/React.createElement("div", {
143
145
  style: {
144
146
  margin: '10px 0 0 38px'
@@ -164,7 +166,7 @@ var EventCondition = function EventCondition(props) {
164
166
  }, /*#__PURE__*/React.createElement(IconFont, {
165
167
  type: "qingchu"
166
168
  }))));
167
- }), condition.timeDimensions.length < 3 ? /*#__PURE__*/React.createElement("div", {
169
+ }), ((_condition$timeDimens3 = condition.timeDimensions) === null || _condition$timeDimens3 === void 0 ? void 0 : _condition$timeDimens3.length) < 3 ? /*#__PURE__*/React.createElement("div", {
168
170
  style: {
169
171
  margin: '2px 0 0 38px',
170
172
  color: '#4075fd',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.1.34-alpha.4",
3
+ "version": "1.1.34-alpha.5",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",