raintee-maputils 1.0.25 → 1.0.26

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.
package/dist/index.js CHANGED
@@ -5754,7 +5754,6 @@ var RainteeGISUtil = /*#__PURE__*/Object.freeze({
5754
5754
  });
5755
5755
 
5756
5756
  const treeDataAdapter = (data) => {
5757
- let i = 0;
5758
5757
  let treeData = [];
5759
5758
  let checkedKeys = [];
5760
5759
  data.forEach((item) => {
@@ -5762,16 +5761,17 @@ const treeDataAdapter = (data) => {
5762
5761
  let groups = kvs.find(item => item[0] === 'Main')[1].split('/');
5763
5762
  let layerName = kvs.find(item => item[0] === 'CN')[1];
5764
5763
  let currentNode = treeData;
5764
+ let currentNodeKey = '';
5765
5765
  groups.forEach((group, index) => {
5766
- currentNode.find(item => item.label === group) || i++;
5766
+ currentNode.find(item => item.label === group) || (() => { currentNodeKey += group; })();
5767
5767
  currentNode.find(item => item.label === group) || currentNode.push({
5768
- id: i,
5768
+ id: currentNodeKey,
5769
5769
  label: group,
5770
5770
  children: []
5771
5771
  });
5772
5772
  currentNode = currentNode.find(item => item.label === group).children;
5773
5773
  });
5774
- i++;
5774
+ currentNodeKey += layerName;
5775
5775
  currentNode.push({
5776
5776
  id: i,
5777
5777
  label: layerName,