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

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);
@@ -171,7 +167,7 @@ var OperatorCondition = function OperatorCondition(props) {
171
167
  size: "middle",
172
168
  labelField: "name",
173
169
  keyField: "value",
174
- options: paramsList.length > 0 ? paramsList : (_conParamsList$index = conParamsList[index]) === null || _conParamsList$index === void 0 ? void 0 : _conParamsList$index.paramsList,
170
+ options: paramsList,
175
171
  value: current,
176
172
  onChange: onParamsChange,
177
173
  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,11 @@ 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
- setMasterList([{
95
- id: 93,
96
- value: 93,
97
- appId: 501313,
98
- name: '订单',
99
- propType: 1,
100
- required: 1,
101
- isOrderShow: 1,
102
- isUserShow: 1,
103
- columnName: 'cus5',
104
- isDelete: null,
105
- isUniqueOrder: 'Y',
106
- isUniqueUser: '',
107
- isUniqueCreatedate: '',
108
- isUniquePaydate: '',
109
- orderRelationSon: 'Y',
110
- createDate: 1681924645000,
111
- updateDateTime: 1681925795000,
112
- hidden: null,
113
- attrOrder: 151,
114
- requestHide: null
115
- }]);
116
- conParamsList[index].masterList = [];
90
+ setMasterList([]);
117
91
  });
118
92
  onChange(_objectSpread({}, condition));
119
93
  }
@@ -131,14 +105,11 @@ var DataAttribute = function DataAttribute(props) {
131
105
  value: item.id
132
106
  });
133
107
  });
134
- conParamsList[index].bizDataAttrList = _list2;
135
108
  setBizDataAttrList(_list2);
136
109
  } else {
137
- conParamsList[index].bizDataAttrList = [];
138
110
  setBizDataAttrList([]);
139
111
  }
140
112
  }).catch(function () {
141
- conParamsList[index].bizDataAttrList = [];
142
113
  setBizDataAttrList([]);
143
114
  });
144
115
  onChange(_objectSpread({}, condition));
@@ -237,7 +208,7 @@ var DataAttribute = function DataAttribute(props) {
237
208
  className: "".concat(classPrefix, "-period-condition-operator")
238
209
  }, /*#__PURE__*/React.createElement(BizSelect, {
239
210
  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,
211
+ options: bizDataAttrList,
241
212
  labelField: "name",
242
213
  keyField: "value",
243
214
  value: {
@@ -250,7 +221,7 @@ var DataAttribute = function DataAttribute(props) {
250
221
  className: "".concat(classPrefix, "-period-condition-operator")
251
222
  }, /*#__PURE__*/React.createElement(BizSelect, {
252
223
  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,
224
+ options: masterList,
254
225
  value: {
255
226
  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
227
  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 +231,6 @@ var DataAttribute = function DataAttribute(props) {
260
231
  onChange: onMasterListChange
261
232
  })), /*#__PURE__*/React.createElement(OperatorCondition, {
262
233
  queryValueObj: queryValueObj,
263
- conParamsList: conParamsList,
264
234
  stringOperateList: stringOperateList,
265
235
  index: index,
266
236
  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.2",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",