@zgfe/business-lib 1.1.31-alpha.2 → 1.1.31
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.
- package/es/assets/colorIcon/demo.css +539 -0
- package/es/assets/colorIcon/demo_index.html +741 -0
- package/es/assets/colorIcon/iconfont.css +112 -0
- package/es/assets/colorIcon/iconfont.js +43 -0
- package/es/assets/colorIcon/iconfont.json +177 -0
- package/es/assets/colorIcon/iconfont.svg +67 -0
- package/es/assets/colorIcon/iconfont.ttf +0 -0
- package/es/assets/colorIcon/iconfont.woff +0 -0
- package/es/assets/colorIcon/iconfont.woff2 +0 -0
- package/es/assets/iconfont/demo_index.html +95 -3
- package/es/assets/iconfont/iconfont.css +19 -3
- package/es/assets/iconfont/iconfont.js +1 -1
- package/es/assets/iconfont/iconfont.json +28 -0
- package/es/assets/iconfont/iconfont.ttf +0 -0
- package/es/assets/iconfont/iconfont.woff +0 -0
- package/es/assets/iconfont/iconfont.woff2 +0 -0
- package/es/assets/styles/resetAntd.less +12 -36
- package/es/attrConditions/utils/operates.d.ts +0 -50
- package/es/attrConditions/utils/operates.js +0 -126
- package/es/colorIcon/demo/index.d.ts +3 -0
- package/es/colorIcon/demo/index.js +10 -0
- package/es/colorIcon/index.d.ts +9 -0
- package/es/colorIcon/index.js +19 -0
- package/es/constants/apis.d.ts +1 -0
- package/es/constants/apis.js +2 -1
- package/es/datePicker/index.d.ts +1 -1
- package/es/datePicker/index.js +1 -1
- package/es/datePicker/styles/index.less +1 -1
- package/es/demoWrapper/content.d.ts +2 -1
- package/es/demoWrapper/content.js +23 -12
- package/es/demoWrapper/demo/index.js +5 -3
- package/es/demoWrapper/head.d.ts +3 -1
- package/es/demoWrapper/head.js +17 -5
- package/es/demoWrapper/index.js +18 -10
- package/es/eventSelector/listPanel.js +11 -4
- package/es/index.d.ts +3 -1
- package/es/index.js +3 -1
- package/es/socket/demo/demo.d.ts +2 -0
- package/es/socket/demo/demo.js +145 -0
- package/es/socket/demo/index.less +27 -0
- package/es/socket/index.d.ts +31 -0
- package/es/socket/index.js +291 -0
- package/es/socket/types.d.ts +38 -0
- package/es/socket/types.js +28 -0
- package/es/userCondition/conditionTypeList.js +1 -17
- package/es/userCondition/conditions/constants.d.ts +0 -1
- package/es/userCondition/conditions/constants.js +1 -2
- package/es/userCondition/conditions/eventCondition.js +2 -77
- package/es/userCondition/orConditions.js +0 -15
- package/es/userCondition/types.d.ts +3 -34
- package/es/userCondition/util.d.ts +1 -1
- package/es/userCondition/util.js +0 -29
- package/package.json +61 -61
- package/es/userCondition/conditions/businessCondition.d.ts +0 -11
- package/es/userCondition/conditions/businessCondition.js +0 -413
- package/es/userCondition/conditions/dataAttribute.d.ts +0 -10
- package/es/userCondition/conditions/dataAttribute.js +0 -329
- package/es/userCondition/conditions/timeDimension.d.ts +0 -9
- package/es/userCondition/conditions/timeDimension.js +0 -200
|
@@ -1,413 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
-
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."); }
|
|
9
|
-
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); }
|
|
10
|
-
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; }
|
|
11
|
-
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; } }
|
|
12
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import React, { useEffect, useState } from 'react';
|
|
14
|
-
import BizSelect from '../../select';
|
|
15
|
-
import { DownOutlined } from '@ant-design/icons';
|
|
16
|
-
import { Input, DatePicker, Dropdown, Space, notification } from 'antd';
|
|
17
|
-
import moment from 'moment';
|
|
18
|
-
import request from '../../utils/ajax';
|
|
19
|
-
import './styles/periodCondition.less';
|
|
20
|
-
import { classPrefix } from '..';
|
|
21
|
-
import { typeList } from '../../attrConditions/utils/operates';
|
|
22
|
-
import { operatorMap } from './constants';
|
|
23
|
-
import TimeDimension from './timeDimension';
|
|
24
|
-
import DataAttribute from './dataAttribute';
|
|
25
|
-
import IconFont from '../../icon/iconFont';
|
|
26
|
-
var RangePicker = DatePicker.RangePicker;
|
|
27
|
-
var BusinessCondition = function BusinessCondition(props) {
|
|
28
|
-
var condition = props.condition,
|
|
29
|
-
dataId = props.dataId,
|
|
30
|
-
isEvent = props.isEvent,
|
|
31
|
-
label = props.label;
|
|
32
|
-
function onChange(data) {
|
|
33
|
-
props.onChange(dataId, data);
|
|
34
|
-
}
|
|
35
|
-
useEffect(function () {
|
|
36
|
-
if (label === '业务数据') {
|
|
37
|
-
queryServiceAttributeList();
|
|
38
|
-
}
|
|
39
|
-
}, []);
|
|
40
|
-
var items = [];
|
|
41
|
-
if (condition.timeDimensions.length < 3) {
|
|
42
|
-
items = items.concat([{
|
|
43
|
-
label: '时间维度',
|
|
44
|
-
key: 'time dimension'
|
|
45
|
-
}]);
|
|
46
|
-
}
|
|
47
|
-
if (label === '订单数据' && condition.attrs.length < 6) {
|
|
48
|
-
items = items.concat([{
|
|
49
|
-
label: '订单属性',
|
|
50
|
-
key: 'order attribute'
|
|
51
|
-
}]);
|
|
52
|
-
} else if (label === '业务数据' && condition.attrs.length < 6) {
|
|
53
|
-
items = items.concat([{
|
|
54
|
-
label: '业务属性',
|
|
55
|
-
key: 'service attribute'
|
|
56
|
-
}]);
|
|
57
|
-
}
|
|
58
|
-
var _useState = useState(),
|
|
59
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
60
|
-
dataAttributeLabel = _useState2[0],
|
|
61
|
-
setDataAttributeLabel = _useState2[1];
|
|
62
|
-
var _useState3 = useState(),
|
|
63
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
64
|
-
serviceAttribute = _useState4[0],
|
|
65
|
-
setServiceAttribute = _useState4[1];
|
|
66
|
-
var _useState5 = useState([]),
|
|
67
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
68
|
-
serviceAttributeList = _useState6[0],
|
|
69
|
-
setServiceAttributeList = _useState6[1];
|
|
70
|
-
var options = [{
|
|
71
|
-
text: '最近',
|
|
72
|
-
value: 'relative'
|
|
73
|
-
}, {
|
|
74
|
-
text: '任意时间',
|
|
75
|
-
value: 'unlimited_time'
|
|
76
|
-
}, {
|
|
77
|
-
text: '固定时段',
|
|
78
|
-
value: 'absolute'
|
|
79
|
-
}];
|
|
80
|
-
if (isEvent) {
|
|
81
|
-
options = options.concat([{
|
|
82
|
-
text: '任意时间',
|
|
83
|
-
value: 'unlimited_time'
|
|
84
|
-
}, {
|
|
85
|
-
text: '新增后*',
|
|
86
|
-
value: 'join_time'
|
|
87
|
-
}]);
|
|
88
|
-
}
|
|
89
|
-
function queryServiceAttributeList() {
|
|
90
|
-
request('/cep-console/api/v1/bizdata/type/list', {
|
|
91
|
-
headers: {
|
|
92
|
-
'Content-Type': 'application/json'
|
|
93
|
-
},
|
|
94
|
-
method: 'get'
|
|
95
|
-
}).then(function (res) {
|
|
96
|
-
if (res.data) {
|
|
97
|
-
var list = res.data.map(function (item) {
|
|
98
|
-
return {
|
|
99
|
-
name: item.typeName,
|
|
100
|
-
value: item.id
|
|
101
|
-
};
|
|
102
|
-
});
|
|
103
|
-
setServiceAttributeList(list);
|
|
104
|
-
} else {
|
|
105
|
-
setServiceAttributeList([]);
|
|
106
|
-
}
|
|
107
|
-
}).catch(function () {
|
|
108
|
-
setServiceAttributeList([]);
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
function onOperatorChange(option) {
|
|
112
|
-
var newData = {
|
|
113
|
-
operator: option.value
|
|
114
|
-
};
|
|
115
|
-
if (newData.operator === 'absolute') {
|
|
116
|
-
var endDate = moment().format('YYYY-MM-DD');
|
|
117
|
-
var startDate = moment().subtract(7, 'days').format('YYYY-MM-DD');
|
|
118
|
-
newData.values = [startDate, endDate];
|
|
119
|
-
}
|
|
120
|
-
if (newData.operator === 'relative') {
|
|
121
|
-
newData.values = ['30', '0'];
|
|
122
|
-
}
|
|
123
|
-
if (newData.operator === 'unlimited_time') {
|
|
124
|
-
newData.values = ['30', '0'];
|
|
125
|
-
}
|
|
126
|
-
if (newData.operator === 'join_time') {
|
|
127
|
-
newData.values = ['3', '0'];
|
|
128
|
-
}
|
|
129
|
-
onChange(_objectSpread(_objectSpread({}, condition), {}, {
|
|
130
|
-
runPeriod: newData
|
|
131
|
-
}));
|
|
132
|
-
}
|
|
133
|
-
function onDateChange(newData) {
|
|
134
|
-
if (condition.runPeriod.operator === 'absolute') {
|
|
135
|
-
var dateRange = newData;
|
|
136
|
-
var newValues = dateRange.map(function (date) {
|
|
137
|
-
return date.format('YYYY-MM-DD');
|
|
138
|
-
});
|
|
139
|
-
onChange(_objectSpread(_objectSpread({}, condition), {}, {
|
|
140
|
-
runPeriod: _objectSpread(_objectSpread({}, condition.runPeriod), {}, {
|
|
141
|
-
values: newValues
|
|
142
|
-
})
|
|
143
|
-
}));
|
|
144
|
-
} else if (condition.runPeriod.operator === 'relative' || condition.runPeriod.operator === 'join_time') {
|
|
145
|
-
var newValue = newData.target.value;
|
|
146
|
-
onChange(_objectSpread(_objectSpread({}, condition), {}, {
|
|
147
|
-
runPeriod: _objectSpread(_objectSpread({}, condition.runPeriod), {}, {
|
|
148
|
-
values: [newValue, '0']
|
|
149
|
-
})
|
|
150
|
-
}));
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
function renderValues() {
|
|
154
|
-
var _condition$runPeriod = condition.runPeriod,
|
|
155
|
-
operator = _condition$runPeriod.operator,
|
|
156
|
-
values = _condition$runPeriod.values;
|
|
157
|
-
if (operator === 'relative' || operator === 'join_time') {
|
|
158
|
-
return /*#__PURE__*/React.createElement(Input, {
|
|
159
|
-
key: "relative-date",
|
|
160
|
-
className: "".concat(classPrefix, "-select-condition"),
|
|
161
|
-
type: "number",
|
|
162
|
-
placeholder: "\u8BF7\u8F93\u5165",
|
|
163
|
-
value: values[0],
|
|
164
|
-
size: "middle",
|
|
165
|
-
onChange: onDateChange,
|
|
166
|
-
style: {
|
|
167
|
-
width: 80
|
|
168
|
-
},
|
|
169
|
-
suffix: "\u5929"
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
if (operator === 'absolute') {
|
|
173
|
-
return /*#__PURE__*/React.createElement(RangePicker, {
|
|
174
|
-
size: "middle",
|
|
175
|
-
defaultValue: [moment(values[0]), moment(values[1])],
|
|
176
|
-
onChange: onDateChange,
|
|
177
|
-
allowClear: false
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
var onOperateChange = function onOperateChange(operate) {
|
|
182
|
-
condition.runTimes.values = [condition.runTimes.values[0]];
|
|
183
|
-
onChange(_objectSpread(_objectSpread({}, condition), {}, {
|
|
184
|
-
runTimes: _objectSpread(_objectSpread({}, condition.runTimes), {}, {
|
|
185
|
-
operator: operate.value
|
|
186
|
-
})
|
|
187
|
-
}));
|
|
188
|
-
};
|
|
189
|
-
var onOperateInput0Change = function onOperateInput0Change(value) {
|
|
190
|
-
var newValue = value.target.value;
|
|
191
|
-
condition.runTimes.values[0] = newValue;
|
|
192
|
-
onChange(_objectSpread({}, condition));
|
|
193
|
-
};
|
|
194
|
-
var onOperateInput1Change = function onOperateInput1Change(value) {
|
|
195
|
-
var newValue = value.target.value;
|
|
196
|
-
condition.runTimes.values[1] = newValue;
|
|
197
|
-
onChange(_objectSpread({}, condition));
|
|
198
|
-
};
|
|
199
|
-
var onClick = function onClick(_ref) {
|
|
200
|
-
var key = _ref.key;
|
|
201
|
-
if (key !== 'time dimension') {
|
|
202
|
-
var _items, _labelProps$;
|
|
203
|
-
var labelProps = (_items = items) === null || _items === void 0 ? void 0 : _items.filter(function (v) {
|
|
204
|
-
return (v === null || v === void 0 ? void 0 : v.key) === key;
|
|
205
|
-
});
|
|
206
|
-
setDataAttributeLabel((_labelProps$ = labelProps[0]) === null || _labelProps$ === void 0 ? void 0 : _labelProps$.label);
|
|
207
|
-
}
|
|
208
|
-
if (key === 'time dimension') {
|
|
209
|
-
var obj = {
|
|
210
|
-
frequencyValues: ['1'],
|
|
211
|
-
frequencyOperator: '>',
|
|
212
|
-
timeDimension: 1,
|
|
213
|
-
timeOperator: 'all',
|
|
214
|
-
timeValues: []
|
|
215
|
-
};
|
|
216
|
-
if (condition.timeDimensions.length !== 3) {
|
|
217
|
-
condition.timeDimensions.push(obj);
|
|
218
|
-
} else {
|
|
219
|
-
notification.info({
|
|
220
|
-
message: '时间维度最多增加3条'
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
} else {
|
|
224
|
-
var _obj = {
|
|
225
|
-
attrId: 0,
|
|
226
|
-
attrName: '',
|
|
227
|
-
operator: '',
|
|
228
|
-
params: [''],
|
|
229
|
-
computeType: 'origin',
|
|
230
|
-
attrType: '',
|
|
231
|
-
category: ''
|
|
232
|
-
};
|
|
233
|
-
if (condition.attrs.length < 6) {
|
|
234
|
-
condition.attrs.push(_obj);
|
|
235
|
-
} else {
|
|
236
|
-
notification.info({
|
|
237
|
-
message: '事件属性最多增加6条'
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
onChange(_objectSpread({}, condition));
|
|
242
|
-
};
|
|
243
|
-
function onTimeDimensionsDelete(index) {
|
|
244
|
-
condition.timeDimensions.splice(index, 1);
|
|
245
|
-
onChange(_objectSpread({}, condition));
|
|
246
|
-
}
|
|
247
|
-
function onAttrsDelete(index) {
|
|
248
|
-
condition.attrs.splice(index, 1);
|
|
249
|
-
onChange(_objectSpread({}, condition));
|
|
250
|
-
}
|
|
251
|
-
function onTimeDimensionChange(condition) {
|
|
252
|
-
onChange(_objectSpread({}, condition));
|
|
253
|
-
}
|
|
254
|
-
function onDataAttributeChange(condition) {
|
|
255
|
-
onChange(_objectSpread({}, condition));
|
|
256
|
-
}
|
|
257
|
-
function onServiceAttributeChange(operate) {
|
|
258
|
-
setServiceAttribute(operate);
|
|
259
|
-
}
|
|
260
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
261
|
-
className: "".concat(classPrefix, "-period-condition")
|
|
262
|
-
}, label === '业务数据' && !serviceAttribute ? /*#__PURE__*/React.createElement("div", {
|
|
263
|
-
className: "".concat(classPrefix, "-period-condition-operator")
|
|
264
|
-
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
265
|
-
className: "".concat(classPrefix, "-select-condition"),
|
|
266
|
-
options: serviceAttributeList,
|
|
267
|
-
labelField: "name",
|
|
268
|
-
keyField: "value",
|
|
269
|
-
overlayWidth: 120,
|
|
270
|
-
onChange: onServiceAttributeChange
|
|
271
|
-
})) : null, label === '订单数据' ? /*#__PURE__*/React.createElement("div", {
|
|
272
|
-
className: "".concat(classPrefix, "-period-condition-label")
|
|
273
|
-
}, label) : /*#__PURE__*/React.createElement("div", {
|
|
274
|
-
className: "".concat(classPrefix, "-period-condition-label")
|
|
275
|
-
}, serviceAttribute === null || serviceAttribute === void 0 ? void 0 : serviceAttribute.name), /*#__PURE__*/React.createElement("div", {
|
|
276
|
-
className: "".concat(classPrefix, "-period-condition-operator")
|
|
277
|
-
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
278
|
-
dropdownExtra: isEvent ? /*#__PURE__*/React.createElement("div", {
|
|
279
|
-
style: {
|
|
280
|
-
lineHeight: '29px'
|
|
281
|
-
}
|
|
282
|
-
}, "*\u7528\u6237\u65B0\u589E\u6570\u636E\u4E3A\u6BCF\u65E5\u51CC\u6668\u751F\u6210") : null,
|
|
283
|
-
overlayWidth: isEvent ? 210 : 114,
|
|
284
|
-
options: options,
|
|
285
|
-
labelField: "text",
|
|
286
|
-
keyField: "value",
|
|
287
|
-
size: "middle",
|
|
288
|
-
value: {
|
|
289
|
-
value: condition.runPeriod.operator,
|
|
290
|
-
text: operatorMap[condition.runPeriod.operator]
|
|
291
|
-
},
|
|
292
|
-
onChange: onOperatorChange
|
|
293
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
294
|
-
className: "".concat(classPrefix, "-period-condition-values")
|
|
295
|
-
}, renderValues()), /*#__PURE__*/React.createElement("div", {
|
|
296
|
-
className: "".concat(classPrefix, "-period-condition-operator")
|
|
297
|
-
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
298
|
-
className: "".concat(classPrefix, "-select-condition"),
|
|
299
|
-
options: typeList['cont-num'],
|
|
300
|
-
labelField: "name",
|
|
301
|
-
keyField: "value",
|
|
302
|
-
overlayWidth: 80,
|
|
303
|
-
value: {
|
|
304
|
-
value: condition.runTimes.operator,
|
|
305
|
-
name: condition.runTimes.operator
|
|
306
|
-
},
|
|
307
|
-
onChange: onOperateChange
|
|
308
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
309
|
-
className: "".concat(classPrefix, "-period-condition")
|
|
310
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
311
|
-
key: "relative-date",
|
|
312
|
-
className: "".concat(classPrefix, "-select-condition"),
|
|
313
|
-
type: condition.runTimes.operator !== 'between' ? 'number' : '',
|
|
314
|
-
size: "middle",
|
|
315
|
-
value: condition.runTimes.values[0],
|
|
316
|
-
placeholder: condition.runTimes.operator !== 'between' ? '请输入' : '输入最小值',
|
|
317
|
-
style: {
|
|
318
|
-
width: 100
|
|
319
|
-
},
|
|
320
|
-
onChange: onOperateInput0Change,
|
|
321
|
-
suffix: condition.runTimes.operator !== 'between' ? '次' : null
|
|
322
|
-
})), condition.runTimes.operator === 'between' ? /*#__PURE__*/React.createElement("div", {
|
|
323
|
-
className: "".concat(classPrefix, "-period-condition"),
|
|
324
|
-
style: {
|
|
325
|
-
marginLeft: 10
|
|
326
|
-
}
|
|
327
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
328
|
-
key: "relative-date",
|
|
329
|
-
className: "".concat(classPrefix, "-select-condition"),
|
|
330
|
-
type: condition.runTimes.operator !== 'between' ? 'number' : '',
|
|
331
|
-
size: "middle",
|
|
332
|
-
value: condition.runTimes.values[1],
|
|
333
|
-
style: {
|
|
334
|
-
width: 100
|
|
335
|
-
},
|
|
336
|
-
placeholder: condition.runTimes.operator !== 'between' ? '请输入' : '输入最大值',
|
|
337
|
-
onChange: onOperateInput1Change,
|
|
338
|
-
suffix: condition.runTimes.operator !== 'between' ? '次' : null
|
|
339
|
-
})) : null), condition.timeDimensions.map(function (_item, index) {
|
|
340
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
341
|
-
style: {
|
|
342
|
-
margin: '10px 0 0 65px'
|
|
343
|
-
},
|
|
344
|
-
className: "".concat(classPrefix, "-item"),
|
|
345
|
-
key: index
|
|
346
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
347
|
-
style: {
|
|
348
|
-
display: 'flex',
|
|
349
|
-
alignItems: 'center'
|
|
350
|
-
}
|
|
351
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
352
|
-
className: "".concat(classPrefix, "-period-condition-label")
|
|
353
|
-
}, "\u65F6\u95F4\u7EF4\u5EA6"), /*#__PURE__*/React.createElement(TimeDimension, {
|
|
354
|
-
onChange: onTimeDimensionChange,
|
|
355
|
-
condition: condition,
|
|
356
|
-
index: index
|
|
357
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
358
|
-
className: "biz-user-condition-item-delete",
|
|
359
|
-
onClick: function onClick() {
|
|
360
|
-
return onTimeDimensionsDelete(index);
|
|
361
|
-
}
|
|
362
|
-
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
363
|
-
type: "qingchu"
|
|
364
|
-
}))));
|
|
365
|
-
}), condition.attrs.map(function (_item, index) {
|
|
366
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
367
|
-
style: {
|
|
368
|
-
margin: '10px 0 0 65px'
|
|
369
|
-
},
|
|
370
|
-
className: "".concat(classPrefix, "-item"),
|
|
371
|
-
key: index
|
|
372
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
373
|
-
style: {
|
|
374
|
-
display: 'flex',
|
|
375
|
-
alignItems: 'center'
|
|
376
|
-
}
|
|
377
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
378
|
-
className: "".concat(classPrefix, "-period-condition-label")
|
|
379
|
-
}, dataAttributeLabel), /*#__PURE__*/React.createElement(DataAttribute, {
|
|
380
|
-
onChange: onDataAttributeChange,
|
|
381
|
-
condition: condition,
|
|
382
|
-
index: index,
|
|
383
|
-
serviceAttrType: serviceAttribute
|
|
384
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
385
|
-
className: "biz-user-condition-item-delete",
|
|
386
|
-
onClick: function onClick() {
|
|
387
|
-
return onAttrsDelete(index);
|
|
388
|
-
}
|
|
389
|
-
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
390
|
-
type: "qingchu"
|
|
391
|
-
}))));
|
|
392
|
-
}), condition.timeDimensions.length !== 3 || condition.attrs.length !== 6 ? /*#__PURE__*/React.createElement("div", {
|
|
393
|
-
style: {
|
|
394
|
-
margin: '2px 0 0 65px',
|
|
395
|
-
color: '#4075fd',
|
|
396
|
-
fontSize: '12px'
|
|
397
|
-
}
|
|
398
|
-
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
399
|
-
menu: {
|
|
400
|
-
items: items,
|
|
401
|
-
onClick: onClick
|
|
402
|
-
}
|
|
403
|
-
}, /*#__PURE__*/React.createElement("a", {
|
|
404
|
-
onClick: function onClick(e) {
|
|
405
|
-
return e.preventDefault();
|
|
406
|
-
}
|
|
407
|
-
}, /*#__PURE__*/React.createElement(Space, null, "\u9AD8\u7EA7\u7B5B\u9009", /*#__PURE__*/React.createElement(DownOutlined, null))))) : null);
|
|
408
|
-
};
|
|
409
|
-
BusinessCondition.defaultProps = {
|
|
410
|
-
isEvent: false,
|
|
411
|
-
isRealTime: false
|
|
412
|
-
};
|
|
413
|
-
export default BusinessCondition;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './styles/runTimesCondition.less';
|
|
3
|
-
export interface DataAttributePropsI {
|
|
4
|
-
condition: any;
|
|
5
|
-
index: number;
|
|
6
|
-
serviceAttrType: any;
|
|
7
|
-
onChange: (condition: any) => void;
|
|
8
|
-
}
|
|
9
|
-
declare const DataAttribute: React.FC<DataAttributePropsI>;
|
|
10
|
-
export default DataAttribute;
|