hy-virtual-tree 1.1.50 → 1.1.51

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## Changelog
2
2
 
3
+ ### 1.1.51
4
+
5
+ _2025-12-12_
6
+
7
+ - 扩展[VirtualTree] 功能
8
+ (1)修复通道树在过滤时统计在线设备错误问题
9
+
3
10
  ### 1.1.50
4
11
 
5
12
  _2025-12-09_
package/dist/index.js CHANGED
@@ -1650,9 +1650,14 @@ function useFilter(config, filterMethod, tree = {
1650
1650
  count += childCount;
1651
1651
  total += childTotal;
1652
1652
  }
1653
- else if (!hiddenKeys.has(node.key)) {
1654
- count++;
1655
- total++;
1653
+ // 拥有道通的设备
1654
+ else if (!hiddenKeys.has(node.key) && node.data.dataType === 3 && !node.isLeaf) {
1655
+ if (isCountFiler && countFilter) {
1656
+ count += countFilter(node.data) ? 1 : 0;
1657
+ }
1658
+ if (isTotalFiler && totalFilter) {
1659
+ total += totalFilter(node.data) ? 1 : 0;
1660
+ }
1656
1661
  }
1657
1662
  }
1658
1663
  else if (!hiddenKeys.has(node.key)) {
@@ -1814,7 +1819,7 @@ const useStatus = (config, data, node) => {
1814
1819
  }
1815
1820
  };
1816
1821
  function checkDeviceTypeFn(config, data) {
1817
- // [设备类型]{1:执法记录仪;2:对讲机;3:消防调度台;4:消防值班台;5:PhoneAPP;6:布控球;7:IPC摄像头;8:头盔;9:手电筒;10:工牌;11:无人机;12:车载云台;13:向下级联设备;14:JT808设备;15:国标记录仪;16:RTOS设备;17:手表;18:sip}
1822
+ // [设备类型]{1:执法记录仪;2:对讲机;3:消防调度台;4:消防值班台;5:PhoneAPP;6:布控球;7:IPC摄像头;8:头盔;9:手电筒;10:工牌;11:无人机;12:车载云台;13:向下级联设备;14:JT808设备;15:国标记录仪;16:RTOS设备;17:手表;18:sip;19:RTC报警器;20:FLV设备}
1818
1823
  const deviceTypeMap = {
1819
1824
  1: 'lawEnforcement',
1820
1825
  2: 'walkieTalkie',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hy-virtual-tree",
3
- "version": "1.1.50",
3
+ "version": "1.1.51",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",