@zgfe/business-lib 1.2.12 → 1.2.13

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.
@@ -79,6 +79,7 @@ var UserGroupDemo = function UserGroupDemo() {
79
79
  }
80
80
  }
81
81
  }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(BizUserGroup, {
82
+ value: ['874:ep', '873:830763176214528'],
82
83
  enableDelete: false,
83
84
  enableTags: true,
84
85
  placeholder: "\u652F\u6301\u6807\u7B7E",
@@ -36,6 +36,7 @@ var BizUserGroup = function BizUserGroup(_ref) {
36
36
  tagLoading = _React$useContext.tagLoading;
37
37
  useEffect(function () {
38
38
  if (groupLoading || tagLoading) return;
39
+ var noLayers = ['fd', 'ep', 'sql'];
39
40
  if (_.isArray(value)) {
40
41
  var selected = [];
41
42
  var _loop = function _loop() {
@@ -48,15 +49,24 @@ var BizUserGroup = function BizUserGroup(_ref) {
48
49
  tagId = _item$split2[0],
49
50
  layerId = _item$split2[1];
50
51
  if (Number(tagId) === tag.id) {
51
- var _tag$layers;
52
- (_tag$layers = tag.layers) === null || _tag$layers === void 0 ? void 0 : _tag$layers.forEach(function (layer) {
53
- if (layer.layerLabelId === Number(layerId)) {
54
- selected.push([{
55
- id: tag.labelGroupId,
56
- labelGroup: tag.labelGroup
57
- }, tag, layer]);
58
- }
59
- });
52
+ if (noLayers.includes(layerId)) {
53
+ selected.push([{
54
+ id: tag.labelGroupId,
55
+ labelGroup: tag.labelGroup
56
+ }, tag, {
57
+ layerLabelId: layerId
58
+ }]);
59
+ } else {
60
+ var _tag$layers;
61
+ (_tag$layers = tag.layers) === null || _tag$layers === void 0 ? void 0 : _tag$layers.forEach(function (layer) {
62
+ if (layer.layerLabelId === Number(layerId)) {
63
+ selected.push([{
64
+ id: tag.labelGroupId,
65
+ labelGroup: tag.labelGroup
66
+ }, tag, layer]);
67
+ }
68
+ });
69
+ }
60
70
  }
61
71
  } else {
62
72
  if (tag.id === Number(item)) {
@@ -224,6 +224,8 @@ var CascaderOverlay = function CascaderOverlay(props) {
224
224
  currentValue.map(function (item, index) {
225
225
  if (JSON.stringify(item) === JSON.stringify(newValue)) {
226
226
  _index = index;
227
+ } else if (item[0].labelGroup === currentSelect && item[1].id === (data === null || data === void 0 ? void 0 : data.id)) {
228
+ _index = index;
227
229
  }
228
230
  });
229
231
  if (_index === -1) {
@@ -13,7 +13,7 @@ export declare namespace UserTagsSelectorTypes {
13
13
  labelGroupId?: number;
14
14
  }
15
15
  interface Layer {
16
- layerLabelId?: number;
16
+ layerLabelId?: number | string;
17
17
  layerLabelName?: string;
18
18
  layerRemark?: string;
19
19
  layerCondition?: any[][];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.2.12",
3
+ "version": "1.2.13",
4
4
  "module": "es/index.js",
5
5
  "typings": "es/index.d.ts",
6
6
  "files": [