@zgfe/modules-settings 2.1.0-zhongyuan.11 → 2.1.0-zhongyuan.12

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.
@@ -193,6 +193,7 @@ var pointMap = function pointMap(props) {
193
193
  });
194
194
  };
195
195
  var getPointTree = function getPointTree() {
196
+ var fn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};
196
197
  request(apis.getPointTree, {
197
198
  method: 'post',
198
199
  data: {
@@ -213,6 +214,7 @@ var pointMap = function pointMap(props) {
213
214
  // props.onChangePage(res?.data ? { ...res?.data[0], currentPointVersion } : undefined);
214
215
  }
215
216
  setChangeNameId(undefined);
217
+ fn();
216
218
  }
217
219
  }).catch(function (err) {
218
220
  console.log(err);
@@ -231,7 +233,8 @@ var pointMap = function pointMap(props) {
231
233
  setPointList(res.data.map(function (res) {
232
234
  return {
233
235
  label: res.labelName,
234
- value: res.id
236
+ value: res.id,
237
+ labelType: 1
235
238
  };
236
239
  }));
237
240
  }
@@ -439,6 +442,9 @@ var pointMap = function pointMap(props) {
439
442
  defaultChecked: pointIds.indexOf(res.value) != -1,
440
443
  onChange: function onChange(e) {
441
444
  onChangeTag(e, nodeData, res);
445
+ },
446
+ onClick: function onClick(e) {
447
+ e.stopPropagation();
442
448
  }
443
449
  }, res.label)),
444
450
  disabled: true
@@ -462,6 +468,7 @@ var pointMap = function pointMap(props) {
462
468
  key: '4'
463
469
  }],
464
470
  onClick: function onClick(item) {
471
+ item.domEvent.stopPropagation();
465
472
  onItemClick(item.key);
466
473
  }
467
474
  };
@@ -568,17 +575,20 @@ var pointMap = function pointMap(props) {
568
575
  }
569
576
  }).then(function (res) {
570
577
  if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
571
- getPointTree();
572
- // setTimeout(() => {
573
- // let labels = node.labels;
574
- // if (checked) {
575
- // labels.push(option);
576
- // } else {
577
- // labels = labels.filter((res: LabelsData) => res.id != option.value);
578
- // }
579
- // node.labels = labels;
580
- // props.onChangePage({ ...node, currentPointVersion });
581
- // }, 0);
578
+ getPointTree(function () {
579
+ var labels = node.labels;
580
+ if (checked) {
581
+ labels.push(option);
582
+ } else {
583
+ labels = labels.filter(function (res) {
584
+ return res.id != option.value;
585
+ });
586
+ }
587
+ node.labels = labels;
588
+ props.onChangePage(_objectSpread(_objectSpread({}, node), {}, {
589
+ currentPointVersion: currentPointVersion
590
+ }));
591
+ });
582
592
  }
583
593
  });
584
594
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-settings",
3
- "version": "2.1.0-zhongyuan.11",
3
+ "version": "2.1.0-zhongyuan.12",
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": "7a1eeee0a2443864124eb2968cb28b3d85577e91",
70
+ "gitHead": "c32391a1f6d07acd9021b7c3af800c6728936040",
71
71
  "gitHooks": {
72
72
  "pre-commit": "lint-staged"
73
73
  }