gcs-ui-lib 1.2.36 → 1.2.37

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gcs-ui-lib",
3
- "version": "1.2.36",
3
+ "version": "1.2.37",
4
4
  "private": false,
5
5
  "main": "./lib/gcs-ui-lib.common.js",
6
6
  "scripts": {
@@ -14,6 +14,7 @@
14
14
  >
15
15
  <div
16
16
  slot-scope="{ node, data }"
17
+ :class="data.disabled ? 'nstc-tree-disabled' : ''"
17
18
  class="flex-box flex-lr flex-v w-100p cl-tree-item"
18
19
  @mouseenter="mouseenterTree(node, data)"
19
20
  @mouseleave="checkFlag = false"
@@ -626,10 +626,14 @@ export default {
626
626
  // } else {
627
627
  this.getTreeData("1", { resolve, expandFlag: true });
628
628
  // }
629
- }).then((data) => {
630
- if (data) {
631
- //默认展开节点
632
- this.defaultExpandedKeys = [data.id];
629
+ }).then(() => {
630
+ if (this.searchKey) {
631
+ //搜索时展开所有有子节点的父级路径
632
+ let expandKeys = [];
633
+ this.collectExpandKeys(this.data, expandKeys);
634
+ this.defaultExpandedKeys = expandKeys;
635
+ } else {
636
+ this.defaultExpandedKeys = [];
633
637
  }
634
638
  });
635
639
  }
@@ -1135,6 +1139,15 @@ export default {
1135
1139
  }
1136
1140
  });
1137
1141
  },
1142
+ collectExpandKeys(arr, keys) {
1143
+ if (!arr) return;
1144
+ arr.forEach((a) => {
1145
+ if (a.children && Array.isArray(a.children) && a.children.length > 0) {
1146
+ keys.push(a.id);
1147
+ this.collectExpandKeys(a.children, keys);
1148
+ }
1149
+ });
1150
+ },
1138
1151
  },
1139
1152
  };
1140
1153
  </script>
@@ -613,10 +613,14 @@ export default {
613
613
  } else {
614
614
  this.getTreeData("1", { resolve, expandFlag: true });
615
615
  }
616
- }).then((data) => {
617
- if (data) {
618
- //默认展开节点
619
- this.defaultExpandedKeys = [data.id];
616
+ }).then(() => {
617
+ if (this.searchKey) {
618
+ //搜索时展开所有有子节点的父级路径
619
+ let expandKeys = [];
620
+ this.collectExpandKeys(this.data, expandKeys);
621
+ this.defaultExpandedKeys = expandKeys;
622
+ } else {
623
+ this.defaultExpandedKeys = [];
620
624
  }
621
625
  });
622
626
  }
@@ -907,6 +911,15 @@ export default {
907
911
  }
908
912
  });
909
913
  },
914
+ collectExpandKeys(arr, keys) {
915
+ if (!arr) return;
916
+ arr.forEach((a) => {
917
+ if (a.children && Array.isArray(a.children) && a.children.length > 0) {
918
+ keys.push(a.id);
919
+ this.collectExpandKeys(a.children, keys);
920
+ }
921
+ });
922
+ },
910
923
  nodeClick(data) {
911
924
  this.$refs.tree.showDropMenu = null;
912
925
  //单选才会进入
@@ -381,7 +381,7 @@
381
381
  "en": "name of opposite Dep. bank"
382
382
  },
383
383
  "对方户名": {
384
- "en": "Counterparty Acct Name"
384
+ "en": "Beneficiary Name"
385
385
  },
386
386
  "对方账号": {
387
387
  "en": "Opposite Account"