@zgfe/business-lib 1.1.37-beta.1 → 1.1.37-beta.3

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.
@@ -5,7 +5,6 @@ export interface OperatorConditionPropsI {
5
5
  index: number;
6
6
  stringOperateList: any;
7
7
  queryValueObj: any;
8
- conParamsList: any;
9
8
  onChange: (condition: any) => void;
10
9
  }
11
10
  declare const OperatorCondition: React.FC<OperatorConditionPropsI>;
@@ -19,11 +19,10 @@ import request from '../../../utils/ajax';
19
19
  import BizGlobalDataContext from '../../../context';
20
20
  import Apis from '../../../constants/apis';
21
21
  var OperatorCondition = function OperatorCondition(props) {
22
- var _condition$attrs$inde, _condition$attrs$inde2, _conParamsList$index;
22
+ var _condition$attrs$inde, _condition$attrs$inde2;
23
23
  var condition = props.condition,
24
24
  index = props.index,
25
25
  stringOperateList = props.stringOperateList,
26
- conParamsList = props.conParamsList,
27
26
  queryValueObj = props.queryValueObj,
28
27
  onChange = props.onChange;
29
28
  var _useState = useState([]),
@@ -85,15 +84,12 @@ var OperatorCondition = function OperatorCondition(props) {
85
84
  value: !isString(item) ? JSON.stringify(item) : item
86
85
  };
87
86
  });
88
- conParamsList[index].paramsList = list;
89
87
  setParamsList(list);
90
88
  } else {
91
89
  setParamsList([]);
92
- conParamsList[index].paramsList = [];
93
90
  }
94
91
  }).catch(function () {
95
92
  setParamsList([]);
96
- conParamsList[index].paramsList = [];
97
93
  });
98
94
  };
99
95
  if (timer) clearTimeout(timer);
@@ -103,6 +99,7 @@ var OperatorCondition = function OperatorCondition(props) {
103
99
  onChange(_objectSpread({}, condition));
104
100
  }
105
101
  var onStringOperateChange = function onStringOperateChange(operate) {
102
+ condition.attrs[index].operator = operate.value;
106
103
  if (condition.attrs[index].operator !== 'absolute') {
107
104
  condition.attrs[index].params = [];
108
105
  }
@@ -171,7 +168,7 @@ var OperatorCondition = function OperatorCondition(props) {
171
168
  size: "middle",
172
169
  labelField: "name",
173
170
  keyField: "value",
174
- options: paramsList.length > 0 ? paramsList : (_conParamsList$index = conParamsList[index]) === null || _conParamsList$index === void 0 ? void 0 : _conParamsList$index.paramsList,
171
+ options: paramsList,
175
172
  value: current,
176
173
  onChange: onParamsChange,
177
174
  onSearch: setSearchValue,
@@ -68,10 +68,6 @@ var BusinessCondition = function BusinessCondition(props) {
68
68
  _useState6 = _slicedToArray(_useState5, 2),
69
69
  serviceAttributeList = _useState6[0],
70
70
  setServiceAttributeList = _useState6[1];
71
- var _useState7 = useState([]),
72
- _useState8 = _slicedToArray(_useState7, 2),
73
- conParamsList = _useState8[0],
74
- setConParamsList = _useState8[1];
75
71
  function queryServiceAttributeList() {
76
72
  request(Apis.bizDataTypeList + "/".concat(currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId), {
77
73
  method: 'get'
@@ -127,15 +123,8 @@ var BusinessCondition = function BusinessCondition(props) {
127
123
  attrType: '',
128
124
  category: ''
129
125
  };
130
- var params = {
131
- masterList: [],
132
- bizDataAttrList: [],
133
- paramsList: []
134
- };
135
126
  if (condition.attrs.length < 6) {
136
127
  condition.attrs.push(_obj);
137
- conParamsList.push(params);
138
- setConParamsList(conParamsList);
139
128
  } else {
140
129
  notification.info({
141
130
  message: '事件属性最多增加6条'
@@ -150,8 +139,6 @@ var BusinessCondition = function BusinessCondition(props) {
150
139
  }
151
140
  function onAttrsDelete(index) {
152
141
  condition.attrs.splice(index, 1);
153
- conParamsList.splice(index, 1);
154
- setConParamsList(conParamsList);
155
142
  onChange(_objectSpread({}, condition));
156
143
  }
157
144
  function onServiceAttributeChange(operate) {
@@ -228,7 +215,6 @@ var BusinessCondition = function BusinessCondition(props) {
228
215
  className: "".concat(classPrefix, "-period-condition-label")
229
216
  }, dataAttributeLabel), /*#__PURE__*/React.createElement(DataAttribute, {
230
217
  onChange: onChange,
231
- conParamsList: conParamsList,
232
218
  condition: condition,
233
219
  index: index,
234
220
  serviceAttrType: serviceAttribute
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  import './styles/runTimesCondition.less';
3
3
  export interface DataAttributePropsI {
4
4
  condition: any;
5
- conParamsList: any;
6
5
  index: number;
7
6
  serviceAttrType: any;
8
7
  onChange: (condition: any) => void;
@@ -22,10 +22,8 @@ import ParamsCondition from './business/paramsCondition';
22
22
  import OperatorCondition from './business/operatorCondition';
23
23
  import Apis from '../../constants/apis';
24
24
  var DataAttribute = function DataAttribute(props) {
25
- var _conParamsList$index, _conParamsList$index2;
26
25
  var condition = props.condition,
27
26
  index = props.index,
28
- conParamsList = props.conParamsList,
29
27
  onChange = props.onChange;
30
28
  var list = [];
31
29
  var operateList = [];
@@ -85,35 +83,32 @@ var DataAttribute = function DataAttribute(props) {
85
83
  });
86
84
  });
87
85
  setMasterList(_list);
88
- conParamsList[index].masterList = _list;
89
86
  } else {
90
- conParamsList[index].masterList = [];
91
87
  setMasterList([]);
92
88
  }
93
89
  }).catch(function () {
94
90
  setMasterList([{
95
- id: 93,
96
- value: 93,
91
+ id: 95,
92
+ value: 95,
97
93
  appId: 501313,
98
- name: '订单',
99
- propType: 1,
94
+ name: '订单创建时间',
95
+ propType: 3,
100
96
  required: 1,
101
97
  isOrderShow: 1,
102
98
  isUserShow: 1,
103
- columnName: 'cus5',
99
+ columnName: 'cus7',
104
100
  isDelete: null,
105
- isUniqueOrder: 'Y',
101
+ isUniqueOrder: '',
106
102
  isUniqueUser: '',
107
- isUniqueCreatedate: '',
103
+ isUniqueCreatedate: 'Y',
108
104
  isUniquePaydate: '',
109
- orderRelationSon: 'Y',
110
- createDate: 1681924645000,
111
- updateDateTime: 1681925795000,
105
+ orderRelationSon: '',
106
+ createDate: 1681925736000,
107
+ updateDateTime: 1681925789000,
112
108
  hidden: null,
113
- attrOrder: 151,
109
+ attrOrder: 153,
114
110
  requestHide: null
115
111
  }]);
116
- conParamsList[index].masterList = [];
117
112
  });
118
113
  onChange(_objectSpread({}, condition));
119
114
  }
@@ -131,14 +126,11 @@ var DataAttribute = function DataAttribute(props) {
131
126
  value: item.id
132
127
  });
133
128
  });
134
- conParamsList[index].bizDataAttrList = _list2;
135
129
  setBizDataAttrList(_list2);
136
130
  } else {
137
- conParamsList[index].bizDataAttrList = [];
138
131
  setBizDataAttrList([]);
139
132
  }
140
133
  }).catch(function () {
141
- conParamsList[index].bizDataAttrList = [];
142
134
  setBizDataAttrList([]);
143
135
  });
144
136
  onChange(_objectSpread({}, condition));
@@ -237,7 +229,7 @@ var DataAttribute = function DataAttribute(props) {
237
229
  className: "".concat(classPrefix, "-period-condition-operator")
238
230
  }, /*#__PURE__*/React.createElement(BizSelect, {
239
231
  className: "".concat(classPrefix, "-select-condition"),
240
- options: bizDataAttrList.length > 0 ? bizDataAttrList : (_conParamsList$index = conParamsList[index]) === null || _conParamsList$index === void 0 ? void 0 : _conParamsList$index.bizDataAttrList,
232
+ options: bizDataAttrList,
241
233
  labelField: "name",
242
234
  keyField: "value",
243
235
  value: {
@@ -250,7 +242,7 @@ var DataAttribute = function DataAttribute(props) {
250
242
  className: "".concat(classPrefix, "-period-condition-operator")
251
243
  }, /*#__PURE__*/React.createElement(BizSelect, {
252
244
  className: "".concat(classPrefix, "-select-condition"),
253
- options: masterList.length > 0 ? masterList : (_conParamsList$index2 = conParamsList[index]) === null || _conParamsList$index2 === void 0 ? void 0 : _conParamsList$index2.masterList,
245
+ options: masterList,
254
246
  value: {
255
247
  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,
256
248
  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
@@ -260,7 +252,6 @@ var DataAttribute = function DataAttribute(props) {
260
252
  onChange: onMasterListChange
261
253
  })), /*#__PURE__*/React.createElement(OperatorCondition, {
262
254
  queryValueObj: queryValueObj,
263
- conParamsList: conParamsList,
264
255
  stringOperateList: stringOperateList,
265
256
  index: index,
266
257
  condition: condition,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.1.37-beta.1",
3
+ "version": "1.1.37-beta.3",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",