@zgfe/business-lib 1.1.34-alpha.2 → 1.1.34-alpha.21

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 (100) hide show
  1. package/es/addToPanel/index.js +7 -1
  2. package/es/addToScene/index.js +1 -1
  3. package/es/assets/colorIcon/demo.css +539 -0
  4. package/es/assets/colorIcon/demo_index.html +741 -0
  5. package/es/assets/colorIcon/iconfont.css +112 -0
  6. package/es/assets/colorIcon/iconfont.js +43 -0
  7. package/es/assets/colorIcon/iconfont.json +177 -0
  8. package/es/assets/colorIcon/iconfont.svg +67 -0
  9. package/es/assets/colorIcon/iconfont.ttf +0 -0
  10. package/es/assets/colorIcon/iconfont.woff +0 -0
  11. package/es/assets/colorIcon/iconfont.woff2 +0 -0
  12. package/es/assets/iconfont/demo_index.html +95 -3
  13. package/es/assets/iconfont/iconfont.css +19 -3
  14. package/es/assets/iconfont/iconfont.js +1 -1
  15. package/es/assets/iconfont/iconfont.json +28 -0
  16. package/es/assets/iconfont/iconfont.ttf +0 -0
  17. package/es/assets/iconfont/iconfont.woff +0 -0
  18. package/es/assets/iconfont/iconfont.woff2 +0 -0
  19. package/es/assets/theme.js +1 -2
  20. package/es/attrConditions/components/stringList.js +0 -1
  21. package/es/attrConditions/components/valuesList.js +1 -0
  22. package/es/attrConditions/demo/group.js +3 -2
  23. package/es/attrConditions/demo/index.js +1 -11
  24. package/es/attrConditions/index.d.ts +3 -1
  25. package/es/attrConditions/index.js +24 -19
  26. package/es/attrConditions/types.d.ts +1 -1
  27. package/es/attributeSelector/index.js +10 -8
  28. package/es/attributeSelector/types.d.ts +4 -0
  29. package/es/attributeSelector/util.js +5 -1
  30. package/es/chart/util/formatOption.js +1 -1
  31. package/es/colorIcon/demo/index.d.ts +3 -0
  32. package/es/colorIcon/demo/index.js +10 -0
  33. package/es/colorIcon/index.d.ts +9 -0
  34. package/es/colorIcon/index.js +19 -0
  35. package/es/constants/apis.d.ts +6 -0
  36. package/es/constants/apis.js +7 -1
  37. package/es/constants/common.d.ts +11 -0
  38. package/es/constants/common.js +35 -0
  39. package/es/context/index.d.ts +4 -1
  40. package/es/cycleTime/month.js +17 -15
  41. package/es/datePicker/index.d.ts +1 -1
  42. package/es/datePicker/index.js +1 -1
  43. package/es/datePicker/styles/index.less +1 -1
  44. package/es/demoWrapper/content.d.ts +2 -1
  45. package/es/demoWrapper/content.js +25 -12
  46. package/es/demoWrapper/demo/index.js +5 -3
  47. package/es/demoWrapper/head.d.ts +3 -1
  48. package/es/demoWrapper/head.js +17 -5
  49. package/es/demoWrapper/index.js +18 -10
  50. package/es/dialog/index.js +1 -1
  51. package/es/eventSelector/demo/index.js +1 -0
  52. package/es/eventSelector/index.js +15 -10
  53. package/es/eventSelector/listPanel.js +33 -7
  54. package/es/eventSelector/types.d.ts +2 -0
  55. package/es/index.d.ts +3 -1
  56. package/es/index.js +3 -1
  57. package/es/select/handle.js +6 -2
  58. package/es/select/index.js +13 -11
  59. package/es/socket/demo/demo.d.ts +2 -0
  60. package/es/socket/demo/demo.js +145 -0
  61. package/es/socket/demo/index.less +27 -0
  62. package/es/socket/index.d.ts +33 -0
  63. package/es/socket/index.js +304 -0
  64. package/es/socket/types.d.ts +38 -0
  65. package/es/socket/types.js +28 -0
  66. package/es/targetConditionGroup/components/targetDimension.js +29 -27
  67. package/es/targetConditionGroup/data/operates.js +0 -3
  68. package/es/targetConditionGroup/demo/index.js +2 -1
  69. package/es/targetConditionGroup/index.js +65 -34
  70. package/es/targetConditionGroup/types.d.ts +1 -0
  71. package/es/targetSelector/index.js +9 -7
  72. package/es/userCondition/conditionTypeList.js +11 -8
  73. package/es/userCondition/conditions/business/operatorCondition.d.ts +11 -0
  74. package/es/userCondition/conditions/business/operatorCondition.js +181 -0
  75. package/es/userCondition/conditions/business/paramsCondition.d.ts +9 -0
  76. package/es/userCondition/conditions/business/paramsCondition.js +79 -0
  77. package/es/userCondition/conditions/businessCondition.d.ts +2 -8
  78. package/es/userCondition/conditions/businessCondition.js +37 -203
  79. package/es/userCondition/conditions/cdpCondition.js +1 -1
  80. package/es/userCondition/conditions/dataAttribute.js +78 -274
  81. package/es/userCondition/conditions/eventCondition.js +7 -4
  82. package/es/userCondition/conditions/order/runPeriodCondition.d.ts +11 -0
  83. package/es/userCondition/conditions/order/runPeriodCondition.js +142 -0
  84. package/es/userCondition/conditions/order/runTimesCondition.d.ts +11 -0
  85. package/es/userCondition/conditions/order/runTimesCondition.js +112 -0
  86. package/es/userCondition/conditions/textDesc.d.ts +1 -1
  87. package/es/userCondition/conditions/textDesc.js +160 -2
  88. package/es/userCondition/conditions/timeDimension.d.ts +1 -0
  89. package/es/userCondition/conditions/timeDimension.js +26 -76
  90. package/es/userCondition/demo/business.d.ts +3 -0
  91. package/es/userCondition/demo/business.js +71 -0
  92. package/es/userCondition/index.js +14 -2
  93. package/es/userCondition/orConditions.js +9 -4
  94. package/es/userCondition/types.d.ts +42 -8
  95. package/es/userCondition/types.js +8 -1
  96. package/es/userCondition/util.d.ts +1 -1
  97. package/es/userCondition/util.js +7 -4
  98. package/es/userTagsSelector/index.js +5 -3
  99. package/es/utils/ajax.js +0 -1
  100. package/package.json +60 -60
@@ -18,12 +18,13 @@ import { stringOperate, orderTypeList, typeList, computeTypeList } from '../../a
18
18
  import moment from 'moment';
19
19
  import request from '../../utils/ajax';
20
20
  import BizGlobalDataContext from '../../context';
21
- import { DatePicker, Input } from 'antd';
22
- var RangePicker = DatePicker.RangePicker;
21
+ import ParamsCondition from './business/paramsCondition';
22
+ import OperatorCondition from './business/operatorCondition';
23
+ import Apis from '../../constants/apis';
23
24
  var DataAttribute = function DataAttribute(props) {
25
+ var _condition$paramsList, _condition$paramsList2;
24
26
  var condition = props.condition,
25
27
  index = props.index,
26
- serviceAttrType = props.serviceAttrType,
27
28
  onChange = props.onChange;
28
29
  var list = [];
29
30
  var operateList = [];
@@ -38,9 +39,10 @@ var DataAttribute = function DataAttribute(props) {
38
39
  break;
39
40
  default:
40
41
  list = typeList['cont-date'];
42
+ operateList = typeList['cont-date'];
41
43
  break;
42
44
  }
43
- var _useState = useState((serviceAttrType === null || serviceAttrType === void 0 ? void 0 : serviceAttrType.value) ? list : []),
45
+ var _useState = useState((condition === null || condition === void 0 ? void 0 : condition.typeId) ? list : []),
44
46
  _useState2 = _slicedToArray(_useState, 2),
45
47
  masterList = _useState2[0],
46
48
  setMasterList = _useState2[1];
@@ -48,39 +50,25 @@ var DataAttribute = function DataAttribute(props) {
48
50
  _useState4 = _slicedToArray(_useState3, 2),
49
51
  stringOperateList = _useState4[0],
50
52
  setStringOperateList = _useState4[1];
51
- var _useState5 = useState([]),
53
+ var _useState5 = useState({}),
52
54
  _useState6 = _slicedToArray(_useState5, 2),
53
- paramsList = _useState6[0],
54
- setParamsList = _useState6[1];
55
+ queryValueObj = _useState6[0],
56
+ setQueryValueObj = _useState6[1];
55
57
  var _useState7 = useState([]),
56
58
  _useState8 = _slicedToArray(_useState7, 2),
57
59
  bizDataAttrList = _useState8[0],
58
60
  setBizDataAttrList = _useState8[1];
59
- var _useState9 = useState(''),
60
- _useState10 = _slicedToArray(_useState9, 2),
61
- searchValue = _useState10[0],
62
- setSearchValue = _useState10[1];
63
- var _useState11 = useState([]),
64
- _useState12 = _slicedToArray(_useState11, 2),
65
- current = _useState12[0],
66
- setCurrent = _useState12[1];
67
61
  var _useContext = useContext(BizGlobalDataContext),
68
62
  currentApp = _useContext.currentApp;
69
63
  useEffect(function () {
70
- if (serviceAttrType === null || serviceAttrType === void 0 ? void 0 : serviceAttrType.value) {
71
- queryBizDataAttrList(serviceAttrType === null || serviceAttrType === void 0 ? void 0 : serviceAttrType.value);
64
+ if (condition === null || condition === void 0 ? void 0 : condition.typeId) {
65
+ queryBizDataAttrList(condition === null || condition === void 0 ? void 0 : condition.typeId);
72
66
  } else {
73
67
  setBizDataAttrList(orderTypeList);
74
68
  }
75
- if (searchValue) {
76
- console.log(66666, searchValue);
77
- }
78
- }, [searchValue]);
69
+ }, [condition === null || condition === void 0 ? void 0 : condition.typeId]);
79
70
  function queryAppList(type) {
80
- request(type === 'master' ? '/cep-console/api/v1/cdp/orderAttribute/master' : '/cep-console/api/v1/cdp/orderAttribute/son', {
81
- headers: {
82
- 'Content-Type': 'application/json'
83
- },
71
+ request(type === 'master' ? Apis.orderAttributeMaster : Apis.orderAttributeSon, {
84
72
  method: 'post',
85
73
  data: {
86
74
  appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
@@ -89,150 +77,65 @@ var DataAttribute = function DataAttribute(props) {
89
77
  }
90
78
  }).then(function (res) {
91
79
  if (res.data) {
92
- var _list = res.data.map(function (item) {
80
+ var _res$data;
81
+ var _list = (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.map(function (item) {
93
82
  return _objectSpread(_objectSpread({}, item), {}, {
94
- name: item.name,
95
- value: item.id,
96
- columnName: item.columnName
83
+ value: item.id
97
84
  });
98
85
  });
99
86
  setMasterList(_list);
87
+ condition.paramsList[index].masterList = _list;
100
88
  } else {
89
+ condition.paramsList[index].masterList = [];
101
90
  setMasterList([]);
102
91
  }
103
92
  }).catch(function () {
104
- setMasterList([{
105
- id: 81,
106
- value: 81,
107
- appId: 99677,
108
- name: '手机号',
109
- propType: 1,
110
- required: 0,
111
- isOrderShow: 1,
112
- isUserShow: 1,
113
- columnName: 'cus4',
114
- isDelete: null,
115
- isUniqueOrder: '',
116
- isUniqueUser: '',
117
- isUniqueCreatedate: '',
118
- isUniquePaydate: '',
119
- orderRelationSon: '',
120
- createDate: 1678431608000,
121
- updateDateTime: null,
122
- hidden: null,
123
- attrOrder: 5,
124
- requestHide: null
125
- }, {
126
- id: 82,
127
- value: 82,
128
- appId: 99677,
129
- name: 'ID',
130
- propType: 2,
131
- required: 1,
132
- isOrderShow: 1,
133
- isUserShow: 1,
134
- columnName: 'cus5',
135
- isDelete: null,
136
- isUniqueOrder: '',
137
- isUniqueUser: '',
138
- isUniqueCreatedate: 'Y',
139
- isUniquePaydate: '',
140
- orderRelationSon: '',
141
- createDate: 1678431608000,
142
- updateDateTime: 1678433665000,
143
- hidden: null,
144
- attrOrder: 6,
145
- requestHide: null
146
- }, {
147
- id: 83,
148
- value: 83,
149
- appId: 99677,
150
- name: '订单支付时间',
151
- propType: 3,
152
- required: 1,
153
- isOrderShow: 1,
154
- isUserShow: 1,
155
- columnName: 'cus6',
156
- isDelete: null,
157
- isUniqueOrder: '',
158
- isUniqueUser: '',
159
- isUniqueCreatedate: '',
160
- isUniquePaydate: 'Y',
161
- orderRelationSon: '',
162
- createDate: 1678431608000,
163
- updateDateTime: 1678433668000,
164
- hidden: null,
165
- attrOrder: 7,
166
- requestHide: null
167
- }]);
168
- });
169
- }
170
- function queryValueList(keyword, operate) {
171
- request('/cep-console/api/v1/es/data/attr/value', {
172
- headers: {
173
- 'Content-Type': 'application/json'
174
- },
175
- method: 'post',
176
- data: {
177
- appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
178
- attrId: condition.attrs[index].attrId,
179
- dataTypeId: operate.bizDataTypeId ? operate.bizDataTypeId : condition.attrs[index].orderType === 'master' ? 1 : 2,
180
- keyword: keyword,
181
- pageNum: 1,
182
- pageSize: 20,
183
- attrName: operate.name,
184
- eventId: 0
185
- }
186
- }).then(function (res) {
187
- if (res.data) {
188
- var _list2 = res.data.map(function (item) {
189
- return {
190
- name: operate.bizDataTypeId ? item : item.name,
191
- value: operate.bizDataTypeId ? item : item.id
192
- };
193
- });
194
- setParamsList(_list2);
195
- } else {
196
- setParamsList([]);
197
- }
198
- }).catch(function () {
199
- setParamsList([]);
93
+ setMasterList([]);
94
+ condition.paramsList[index].masterList = [];
200
95
  });
96
+ onChange(_objectSpread({}, condition));
201
97
  }
202
98
  function queryBizDataAttrList(bizDataTypeId) {
203
- request('/cep-console/api/v1/bizdata/attr/list', {
204
- headers: {
205
- 'Content-Type': 'application/json'
206
- },
99
+ request(Apis.bizDataAttrList, {
207
100
  method: 'post',
208
101
  data: {
209
102
  bizDataTypeId: bizDataTypeId
210
103
  }
211
104
  }).then(function (res) {
212
105
  if (res.data) {
213
- var _list3 = res.data.map(function (item) {
106
+ var _res$data2;
107
+ var _list2 = (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.map(function (item) {
214
108
  return _objectSpread(_objectSpread({}, item), {}, {
215
109
  value: item.id
216
110
  });
217
111
  });
218
- setBizDataAttrList(_list3);
112
+ condition.paramsList[index].bizDataAttrList = _list2;
113
+ setBizDataAttrList(_list2);
219
114
  } else {
115
+ condition.paramsList[index].bizDataAttrList = [];
220
116
  setBizDataAttrList([]);
221
117
  }
222
118
  }).catch(function () {
119
+ condition.paramsList[index].bizDataAttrList = [];
223
120
  setBizDataAttrList([]);
224
121
  });
122
+ onChange(_objectSpread({}, condition));
225
123
  }
226
124
  var onOrderTypeListChange = function onOrderTypeListChange(operate) {
227
- if (serviceAttrType === null || serviceAttrType === void 0 ? void 0 : serviceAttrType.value) {
228
- condition.attrs[index].category = 'custom';
229
- condition.attrs[index].attrId = operate.id;
230
- condition.attrs[index].attrName = operate.name;
125
+ if (condition === null || condition === void 0 ? void 0 : condition.typeId) {
126
+ condition.attrs[index] = _objectSpread(_objectSpread({}, condition.attrs[index]), {}, {
127
+ category: 'custom',
128
+ attrId: operate.id,
129
+ attrName: operate.name
130
+ });
231
131
  switch (operate.propType) {
232
132
  case 1:
233
133
  setMasterList(typeList['cont-string']);
234
134
  condition.attrs[index].attrType = 'cont-string';
235
- queryValueList('', operate);
135
+ setQueryValueObj({
136
+ keyword: '',
137
+ operate: operate
138
+ });
236
139
  break;
237
140
  case 2:
238
141
  setMasterList(computeTypeList);
@@ -252,12 +155,16 @@ var DataAttribute = function DataAttribute(props) {
252
155
  onChange(_objectSpread({}, condition));
253
156
  };
254
157
  var onMasterListChange = function onMasterListChange(operate) {
255
- if (!(serviceAttrType === null || serviceAttrType === void 0 ? void 0 : serviceAttrType.value)) {
158
+ condition.attrs[index].params = [];
159
+ if (!(condition === null || condition === void 0 ? void 0 : condition.typeId)) {
256
160
  switch (operate.propType) {
257
161
  case 1:
258
162
  setStringOperateList(typeList['cont-string']);
259
163
  condition.attrs[index].attrType = 'cont-string';
260
- queryValueList('', operate);
164
+ setQueryValueObj({
165
+ keyword: '',
166
+ operate: operate
167
+ });
261
168
  break;
262
169
  case 2:
263
170
  setStringOperateList(typeList['cont-num']);
@@ -273,15 +180,22 @@ var DataAttribute = function DataAttribute(props) {
273
180
  }
274
181
  break;
275
182
  }
276
- condition.attrs[index].attrId = operate.id;
277
- condition.attrs[index].attrName = operate.name;
278
- condition.attrs[index].attrMaping = operate.columnName;
183
+ condition.attrs[index] = _objectSpread(_objectSpread({}, condition.attrs[index]), {}, {
184
+ attrId: operate.id,
185
+ computeType: 'origin',
186
+ attrName: operate.name,
187
+ attrMaping: operate.columnName,
188
+ operator: ''
189
+ });
279
190
  } else {
280
191
  switch (condition.attrs[index].attrType) {
281
192
  case 'cont-string':
282
193
  case 'cont-date':
283
- condition.attrs[index].operator = operate.value;
284
- condition.attrs[index].params = [];
194
+ condition.attrs[index] = _objectSpread(_objectSpread({}, condition.attrs[index]), {}, {
195
+ operator: operate.value,
196
+ computeType: 'origin',
197
+ params: []
198
+ });
285
199
  if (condition.attrs[index].operator === 'absolute' && condition.attrs[index].attrType === 'cont-date') {
286
200
  var _endDate = moment().format('YYYY-MM-DD');
287
201
  var _startDate = moment().subtract(7, 'days').format('YYYY-MM-DD');
@@ -295,153 +209,43 @@ var DataAttribute = function DataAttribute(props) {
295
209
  }
296
210
  onChange(_objectSpread({}, condition));
297
211
  };
298
- var onStringOperateChange = function onStringOperateChange(operate) {
299
- if (condition.attrs[index].operator !== 'absolute') {
300
- condition.attrs[index].params = [];
301
- }
302
- condition.attrs[index].operator = operate.value;
303
- onChange(_objectSpread({}, condition));
304
- };
305
- var onComputeTypeOperateChange = function onComputeTypeOperateChange(operate) {
306
- condition.attrs[index].computeType = operate.value;
307
- onChange(_objectSpread({}, condition));
308
- };
309
- var onValue0Change = function onValue0Change(e) {
310
- var value = e.target.value;
311
- condition.attrs[index].params[0] = value;
312
- onChange(_objectSpread({}, condition));
313
- };
314
- var onValue1Change = function onValue1Change(e) {
315
- var value = e.target.value;
316
- condition.attrs[index].params[1] = value;
317
- onChange(_objectSpread({}, condition));
318
- };
319
- var onParamsChange = function onParamsChange(operate) {
320
- var obj = operate.map(function (item) {
321
- return {
322
- name: item.name,
323
- value: item.value
324
- };
325
- });
326
- var params = operate.map(function (item) {
327
- return item.value;
328
- });
329
- if (!(serviceAttrType === null || serviceAttrType === void 0 ? void 0 : serviceAttrType.value)) {
330
- queryValueList(searchValue, {});
331
- }
332
- setCurrent(obj);
333
- condition.attrs[index].params = params;
334
- onChange(_objectSpread({}, condition));
335
- };
336
- function onDateChange(newData) {
337
- if (condition.attrs[index].operator === 'absolute') {
338
- var dateRange = newData;
339
- var newValues = dateRange.map(function (date) {
340
- return date.format('YYYY-MM-DD');
341
- });
342
- condition.attrs[index].params = newValues;
343
- onChange(_objectSpread({}, condition));
344
- }
345
- }
346
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
212
+ return /*#__PURE__*/React.createElement("div", {
347
213
  className: "".concat(classPrefix, "-runtimes-condition")
348
214
  }, /*#__PURE__*/React.createElement("div", {
349
215
  className: "".concat(classPrefix, "-period-condition-operator")
350
216
  }, /*#__PURE__*/React.createElement(BizSelect, {
351
217
  className: "".concat(classPrefix, "-select-condition"),
352
- options: bizDataAttrList,
353
- labelField: "name",
354
- keyField: "value",
355
- overlayWidth: 120,
356
- onChange: onOrderTypeListChange
357
- })), /*#__PURE__*/React.createElement("div", {
358
- className: "".concat(classPrefix, "-period-condition-operator")
359
- }, /*#__PURE__*/React.createElement(BizSelect, {
360
- className: "".concat(classPrefix, "-select-condition"),
361
- options: masterList,
362
- labelField: "name",
363
- keyField: "value",
364
- onChange: onMasterListChange
365
- })), !(serviceAttrType === null || serviceAttrType === void 0 ? void 0 : serviceAttrType.value) && condition.attrs[index].attrType === 'cont-num' ? /*#__PURE__*/React.createElement("div", {
366
- className: "".concat(classPrefix, "-period-condition-operator")
367
- }, /*#__PURE__*/React.createElement(BizSelect, {
368
- className: "".concat(classPrefix, "-select-condition"),
369
- options: computeTypeList,
218
+ options: bizDataAttrList.length > 0 ? bizDataAttrList : condition === null || condition === void 0 ? void 0 : (_condition$paramsList = condition.paramsList[index]) === null || _condition$paramsList === void 0 ? void 0 : _condition$paramsList.bizDataAttrList,
370
219
  labelField: "name",
371
220
  keyField: "value",
372
221
  value: {
373
- name: condition.attrs[index].computeType,
374
- value: condition.attrs[index].computeType
222
+ name: condition.typeId ? condition.attrs[index].attrName : condition.attrs[index].orderType,
223
+ value: condition.typeId ? condition.attrs[index].attrId : condition.attrs[index].orderType
375
224
  },
376
225
  overlayWidth: 120,
377
- onChange: onComputeTypeOperateChange
378
- })) : null, (serviceAttrType === null || serviceAttrType === void 0 ? void 0 : serviceAttrType.value) && condition.attrs[index].attrType === 'cont-num' || !(serviceAttrType === null || serviceAttrType === void 0 ? void 0 : serviceAttrType.value) ? /*#__PURE__*/React.createElement("div", {
226
+ onChange: onOrderTypeListChange
227
+ })), /*#__PURE__*/React.createElement("div", {
379
228
  className: "".concat(classPrefix, "-period-condition-operator")
380
229
  }, /*#__PURE__*/React.createElement(BizSelect, {
381
230
  className: "".concat(classPrefix, "-select-condition"),
382
- options: stringOperateList,
383
- labelField: "name",
384
- keyField: "value",
231
+ options: masterList.length > 0 ? masterList : condition === null || condition === void 0 ? void 0 : (_condition$paramsList2 = condition.paramsList[index]) === null || _condition$paramsList2 === void 0 ? void 0 : _condition$paramsList2.masterList,
385
232
  value: {
386
- name: condition.attrs[index].operator,
387
- value: condition.attrs[index].operator
233
+ name: condition.typeId ? condition.attrs[index].attrType === 'cont-string' || condition.attrs[index].attrType === 'cont-date' ? condition.attrs[index].operator : condition.attrs[index].computeType : condition.attrs[index].attrName,
234
+ value: condition.typeId ? condition.attrs[index].attrType === 'cont-string' || condition.attrs[index].attrType === 'cont-date' ? condition.attrs[index].operator : condition.attrs[index].computeType : condition.attrs[index].attrId
388
235
  },
389
- overlayWidth: 120,
390
- onChange: onStringOperateChange
391
- })) : null, !(serviceAttrType === null || serviceAttrType === void 0 ? void 0 : serviceAttrType.value) && condition.attrs[index].attrType === 'cont-string' || condition.attrs[index].attrType === 'cont-string' && condition.attrs[index].operator !== 'is null' && condition.attrs[index].operator !== 'is not null' ? /*#__PURE__*/React.createElement("div", {
392
- className: "".concat(classPrefix, "-period-condition-operator"),
393
- style: {
394
- width: '250px'
395
- }
396
- }, /*#__PURE__*/React.createElement(BizSelect, {
397
- className: "".concat(classPrefix, "-multi-select"),
398
- multiple: true,
399
- size: "middle",
400
236
  labelField: "name",
401
237
  keyField: "value",
402
- value: current,
403
- options: paramsList,
404
- onChange: onParamsChange,
405
- onSearch: setSearchValue,
406
- enableCreate: true
407
- })) : null, condition.attrs[index].attrType === 'cont-num' || condition.attrs[index].attrType === 'cont-date' && condition.attrs[index].operator !== 'absolute' ? /*#__PURE__*/React.createElement("div", {
408
- className: "".concat(classPrefix, "-period-condition")
409
- }, /*#__PURE__*/React.createElement(Input, {
410
- key: "relative-date",
411
- className: "".concat(classPrefix, "-select-condition"),
412
- size: "middle",
413
- type: condition.attrs[index].attrType === 'cont-date' ? 'number' : '',
414
- placeholder: condition.attrs[index].operator === 'between' ? '输入最小值' : '请输入',
415
- value: condition.attrs[index].params[0],
416
- style: {
417
- width: condition.attrs[index].operator === 'between' || condition.attrs[index].attrType === 'cont-date' && condition.attrs[index].operator ? 100 : 200
418
- },
419
- suffix: condition.attrs[index].attrType === 'cont-date' ? '天' : null,
420
- onChange: onValue0Change
421
- })) : null, condition.attrs[index].attrType === 'cont-num' && condition.attrs[index].operator === 'between' || condition.attrs[index].attrType === 'cont-date' && (condition.attrs[index].operator === 'relativeInterval' || condition.attrs[index].operator === 'futureInterval') ? /*#__PURE__*/React.createElement("div", {
422
- className: "".concat(classPrefix, "-period-condition"),
423
- style: {
424
- marginLeft: 10
425
- }
426
- }, /*#__PURE__*/React.createElement(Input, {
427
- key: "relative-date",
428
- className: "".concat(classPrefix, "-select-condition"),
429
- size: "middle",
430
- type: condition.attrs[index].attrType === 'cont-date' ? 'number' : '',
431
- placeholder: '输入最大值',
432
- value: condition.attrs[index].params[1],
433
- style: {
434
- width: 100
435
- },
436
- suffix: condition.attrs[index].attrType === 'cont-date' ? '天' : null,
437
- onChange: onValue1Change
438
- })) : null, condition.attrs[index].attrType === 'cont-date' && condition.attrs[index].operator === 'absolute' ? /*#__PURE__*/React.createElement("div", {
439
- className: "".concat(classPrefix, "-runtimes-condition")
440
- }, /*#__PURE__*/React.createElement(RangePicker, {
441
- size: "middle",
442
- defaultValue: [moment(condition.attrs[index].params[0]), moment(condition.attrs[index].params[1])],
443
- onChange: onDateChange,
444
- allowClear: false
445
- })) : null));
238
+ onChange: onMasterListChange
239
+ })), /*#__PURE__*/React.createElement(OperatorCondition, {
240
+ queryValueObj: queryValueObj,
241
+ stringOperateList: stringOperateList,
242
+ index: index,
243
+ condition: condition,
244
+ onChange: onChange
245
+ }), /*#__PURE__*/React.createElement(ParamsCondition, {
246
+ index: index,
247
+ condition: condition,
248
+ onChange: onChange
249
+ }));
446
250
  };
447
251
  export default DataAttribute;
@@ -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'
@@ -155,7 +157,8 @@ var EventCondition = function EventCondition(props) {
155
157
  }, "\u65F6\u95F4\u7EF4\u5EA6"), /*#__PURE__*/React.createElement(TimeDimension, {
156
158
  onChange: onTimeDimensionChange,
157
159
  condition: condition,
158
- index: index
160
+ index: index,
161
+ dataId: dataId
159
162
  }), /*#__PURE__*/React.createElement("div", {
160
163
  className: "biz-user-condition-item-delete",
161
164
  onClick: function onClick() {
@@ -164,7 +167,7 @@ var EventCondition = function EventCondition(props) {
164
167
  }, /*#__PURE__*/React.createElement(IconFont, {
165
168
  type: "qingchu"
166
169
  }))));
167
- }), condition.timeDimensions.length < 3 ? /*#__PURE__*/React.createElement("div", {
170
+ }), ((_condition$timeDimens3 = condition.timeDimensions) === null || _condition$timeDimens3 === void 0 ? void 0 : _condition$timeDimens3.length) < 3 ? /*#__PURE__*/React.createElement("div", {
168
171
  style: {
169
172
  margin: '2px 0 0 38px',
170
173
  color: '#4075fd',
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { AllConditionBasePropsI, BizUserConditionT } from '../../types';
3
+ import '../styles/periodCondition.less';
4
+ export interface RunPeriodConditionPropsI extends AllConditionBasePropsI<any> {
5
+ onChange: (condition: any) => void;
6
+ isEvent?: boolean;
7
+ dataId: number;
8
+ condition: BizUserConditionT.BusinessCondition;
9
+ }
10
+ declare const RunPeriodCondition: React.FC<RunPeriodConditionPropsI>;
11
+ export default RunPeriodCondition;