gcs-ui-lib 1.2.36 → 1.2.38
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/lib/gcs-ui-lib.common.js +706 -703
- package/lib/gcs-ui-lib.css +1 -1
- package/lib/gcs-ui-lib.umd.js +706 -703
- package/lib/gcs-ui-lib.umd.min.js +28 -28
- package/package.json +1 -1
- package/packages/AutoFillList/src/components/config.js +1 -1
- package/packages/AutoFillService/src/components/paymentCategoryT.vue +3 -28
- package/packages/SelectTreeUnit/src/Tree/index.vue +1 -0
- package/packages/SelectTreeUnit/src/main.vue +17 -4
- package/packages/SelectTreeUnitForm/src/main.vue +17 -4
- package/src/lang/i18n.json +1 -1
package/package.json
CHANGED
|
@@ -188,7 +188,7 @@ export default {
|
|
|
188
188
|
} else if (this.type == "paymentCategory") {
|
|
189
189
|
params = {
|
|
190
190
|
activeFlag: 1,
|
|
191
|
-
|
|
191
|
+
directionList: [this.settingSource == '1' ? 1 : 0, 2].join(','),
|
|
192
192
|
resultType: 2,
|
|
193
193
|
};
|
|
194
194
|
} else {
|
|
@@ -198,33 +198,8 @@ export default {
|
|
|
198
198
|
}
|
|
199
199
|
let res = await this.Api(params);
|
|
200
200
|
res = this.tranData(res);
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
this.treeData = this.mergeTree(res, res1);
|
|
204
|
-
} else {
|
|
205
|
-
this.type == "cashflow" && this.handleData(res);
|
|
206
|
-
this.treeData = res;
|
|
207
|
-
}
|
|
208
|
-
},
|
|
209
|
-
|
|
210
|
-
// 递归合并两棵款项类别树(按paymentCategoryNo去重)
|
|
211
|
-
mergeTree(arr1, arr2) {
|
|
212
|
-
const map = new Map();
|
|
213
|
-
arr1?.forEach((item) => {
|
|
214
|
-
map.set(item.paymentCategoryNo, item);
|
|
215
|
-
});
|
|
216
|
-
arr2?.forEach((item) => {
|
|
217
|
-
if (map.has(item.paymentCategoryNo)) {
|
|
218
|
-
const existing = map.get(item.paymentCategoryNo);
|
|
219
|
-
existing.children = this.mergeTree(
|
|
220
|
-
existing.children,
|
|
221
|
-
item.children
|
|
222
|
-
);
|
|
223
|
-
} else {
|
|
224
|
-
map.set(item.paymentCategoryNo, item);
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
return Array.from(map.values());
|
|
201
|
+
this.type == "cashflow" && this.handleData(res);
|
|
202
|
+
this.treeData = res;
|
|
228
203
|
},
|
|
229
204
|
tranData(res) {
|
|
230
205
|
const eachItem = (parent, list) => {
|
|
@@ -626,10 +626,14 @@ export default {
|
|
|
626
626
|
// } else {
|
|
627
627
|
this.getTreeData("1", { resolve, expandFlag: true });
|
|
628
628
|
// }
|
|
629
|
-
}).then((
|
|
630
|
-
if (
|
|
631
|
-
|
|
632
|
-
|
|
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((
|
|
617
|
-
if (
|
|
618
|
-
|
|
619
|
-
|
|
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
|
//单选才会进入
|