@zgfe/modules-settings 2.1.0-zhongyuan-set.2 → 2.1.0-zhongyuan-set.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.
@@ -287,6 +287,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
287
287
  }, "\u67E5\u770B"), /*#__PURE__*/React.createElement(Button, {
288
288
  color: "primary",
289
289
  type: "link",
290
+ disabled: props.record.demandStatus == 102,
290
291
  onClick: function onClick() {
291
292
  Modal.confirm({
292
293
  wrapClassName: "".concat(classPrefix, "-confirm"),
@@ -319,7 +320,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
319
320
  }
320
321
  });
321
322
  }
322
- }, "\u590D\u5236"), [101, 102].indexOf(props.record.demandStatus) == -1 && (/*#__PURE__*/React.createElement(Button, {
323
+ }, "\u590D\u5236"), [101, 102, 103].indexOf(props.record.demandStatus) == -1 && (/*#__PURE__*/React.createElement(Button, {
323
324
  color: "primary",
324
325
  type: "link",
325
326
  onClick: function onClick() {
@@ -131,35 +131,21 @@ var CreateMeta = function CreateMeta(props) {
131
131
  resultArr = [];
132
132
  newArr = findDuplicateObjects(eventAttrList);
133
133
  if (!(newArr.length >= 1)) {
134
- _context.next = 18;
134
+ _context.next = 16;
135
135
  break;
136
136
  }
137
137
  notification.warning({
138
138
  message: '有事件属性名称相同'
139
139
  });
140
- resultArr = eventAttrList.map(function (j) {
141
- if (newArr.find(function (k) {
142
- return j.name || j.attr_name == k;
143
- })) {
144
- return _objectSpread(_objectSpread({}, j), {}, {
145
- status: 'error'
146
- });
147
- }
148
- return j;
149
- });
150
- setEventAttrList(resultArr);
140
+ // resultArr = eventAttrList.map((j) => {
141
+ // if (newArr.find((k) => j.name == k)) {
142
+ // return { ...j, status: 'error' };
143
+ // }
144
+ // return j;
145
+ // });
146
+ // setEventAttrList(resultArr);
151
147
  return _context.abrupt("return");
152
- case 18:
153
- if (newArr.length == 0) {
154
- resultArr = eventAttrList.map(function (o) {
155
- return _objectSpread(_objectSpread({}, o), {}, {
156
- status: undefined
157
- });
158
- });
159
- setEventAttrList(function () {
160
- return _toConsumableArray(resultArr);
161
- });
162
- }
148
+ case 16:
163
149
  //把参数传递给主页面
164
150
  if (props.onSubmit) {
165
151
  props.onSubmit({
@@ -177,17 +163,17 @@ var CreateMeta = function CreateMeta(props) {
177
163
  eventAttrList: eventAttrList
178
164
  }, props.data ? 'update' : 'create');
179
165
  }
180
- _context.next = 25;
166
+ _context.next = 22;
181
167
  break;
182
- case 22:
183
- _context.prev = 22;
168
+ case 19:
169
+ _context.prev = 19;
184
170
  _context.t0 = _context["catch"](1);
185
171
  console.log('表单验证失败:', _context.t0);
186
- case 25:
172
+ case 22:
187
173
  case "end":
188
174
  return _context.stop();
189
175
  }
190
- }, _callee, null, [[1, 22]]);
176
+ }, _callee, null, [[1, 19]]);
191
177
  }));
192
178
  return function submit() {
193
179
  return _ref.apply(this, arguments);
@@ -356,6 +342,7 @@ var CreateMeta = function CreateMeta(props) {
356
342
  disabled: homeType == 'get',
357
343
  onChange: function onChange(e) {
358
344
  setIsChange(true);
345
+ changeItemInfo(index, 'prop_type', e);
359
346
  changeItemInfo(index, 'type', e);
360
347
  },
361
348
  options: [{
@@ -431,6 +418,7 @@ var CreateMeta = function CreateMeta(props) {
431
418
  disabled: homeType == 'get',
432
419
  onChange: function onChange(e) {
433
420
  setIsChange(true);
421
+ changeItemInfo(index, 'encryption_type', e);
434
422
  changeItemInfo(index, 'encryptionType', e);
435
423
  },
436
424
  options: [{
@@ -92,7 +92,9 @@ var pointMap = function pointMap(props) {
92
92
  pageStatusIsEdit: pageStatusIsEdit,
93
93
  onChangePage: function onChangePage(data) {
94
94
  setPageData(data);
95
- props.setTreeData && props.setTreeData(data.treeName + '_点击'); // 树选择发生变化元事件名称一起变化
95
+ if (data) {
96
+ props.setTreeData && props.setTreeData(data.treeName + '_点击'); // 树选择发生变化元事件名称一起变化
97
+ }
96
98
  },
97
99
  refreshPage: function refreshPage() {
98
100
  return setKey(new Date().getTime());
@@ -45,6 +45,7 @@ var formatTreeData = function formatTreeData(list, storey) {
45
45
  }
46
46
  return listTemp;
47
47
  }
48
+ return [];
48
49
  };
49
50
  var formatTreeArr = function formatTreeArr(list, arrTemp, parentName) {
50
51
  var listTemp = JSON.parse(JSON.stringify(list));
@@ -73,6 +74,7 @@ var formatTreeArr = function formatTreeArr(list, arrTemp, parentName) {
73
74
  }
74
75
  return arrTemp;
75
76
  }
77
+ return [];
76
78
  };
77
79
  var pageNum = 1;
78
80
  var pointMap = function pointMap(props) {
@@ -203,7 +205,7 @@ var pointMap = function pointMap(props) {
203
205
  }
204
206
  }).then(function (res) {
205
207
  if (res && res.code === '100000') {
206
- pageNum = ((res === null || res === void 0 ? void 0 : res.data.length) || 0) + 1;
208
+ pageNum = (res.data ? res.data.length : 0) + 1;
207
209
  setTreeData(formatTreeData((res === null || res === void 0 ? void 0 : res.data) || []));
208
210
  setTreeArr(formatTreeArr((res === null || res === void 0 ? void 0 : res.data) || [], [], '') || []);
209
211
  if (!selectedKeys) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-settings",
3
- "version": "2.1.0-zhongyuan-set.2",
3
+ "version": "2.1.0-zhongyuan-set.5",
4
4
  "private": false,
5
5
  "module": "es/index.js",
6
6
  "typings": "es/index.d.ts",
@@ -67,7 +67,7 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "fad8f4db780d0a3e86a320836033e70809bebbc1",
70
+ "gitHead": "85210d4143066bddf90309d5798b2f205bf80ede",
71
71
  "gitHooks": {
72
72
  "pre-commit": "lint-staged"
73
73
  }