hy-dispatch-ui-v3 0.2.65 → 0.2.67

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.
Files changed (144) hide show
  1. package/dist/tailwind.css +51 -13
  2. package/es/api/organization.mjs +43 -0
  3. package/es/bussiness/hyAcquisitionStationTree/acquisitionStationTree.vue.mjs +245 -0
  4. package/es/bussiness/hyAcquisitionStationTree/index.mjs +7 -0
  5. package/es/bussiness/hyAcquisitionStationTree/js/index.mjs +124 -0
  6. package/es/bussiness/hyAcquisitionStationTree/style/acquisitionStationTree.scss +0 -0
  7. package/es/bussiness/hyDeviceTree/deviceTree.vue.mjs +249 -0
  8. package/es/bussiness/hyDeviceTree/index.mjs +7 -0
  9. package/es/bussiness/hyDeviceTree/js/index.mjs +126 -0
  10. package/es/bussiness/hyDeviceTree/style/deviceTree.scss +0 -0
  11. package/es/bussiness/hyOrgGroupTree/index.mjs +7 -0
  12. package/es/bussiness/hyOrgGroupTree/js/index.mjs +124 -0
  13. package/es/bussiness/hyOrgGroupTree/orgGroupTree.vue.mjs +245 -0
  14. package/es/bussiness/hyOrgGroupTree/style/orgGroupTree.scss +0 -0
  15. package/es/bussiness/hyPlanGroupDeviceTree/index.mjs +7 -0
  16. package/es/bussiness/hyPlanGroupDeviceTree/js/index.mjs +124 -0
  17. package/es/bussiness/hyPlanGroupDeviceTree/planGroupDeviceTree.vue.mjs +245 -0
  18. package/es/bussiness/hyPlanGroupDeviceTree/style/planGroupDeviceTree.scss +0 -0
  19. package/es/bussiness/hyUserTree/index.mjs +7 -0
  20. package/es/bussiness/hyUserTree/js/index.mjs +126 -0
  21. package/es/bussiness/hyUserTree/style/userTree.scss +0 -0
  22. package/es/bussiness/hyUserTree/userTree.vue.mjs +239 -0
  23. package/es/bussiness/index.mjs +5 -0
  24. package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +183 -149
  25. package/es/components/hyButton/button.vue.mjs +19 -5
  26. package/es/components/hyButton/style/button.scss +72 -0
  27. package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +1 -2
  28. package/es/components/hyForm/cpns/formItem.vue.mjs +254 -32
  29. package/es/components/hyForm/cpns/locationSelect.vue.mjs +8 -1
  30. package/es/components/hyForm/form.vue.mjs +88 -19
  31. package/es/components/hyForm/js/index.mjs +2 -1
  32. package/es/components/hyForm/js/useAppForm.mjs +3 -3
  33. package/es/components/hyIcon/style/icon.scss +1 -0
  34. package/es/components/hyMap/js/index.mjs +6 -6
  35. package/es/components/hyMap/map.vue.mjs +14 -4
  36. package/es/components/hyNoPermissions/noPermissions.vue.mjs +1 -1
  37. package/es/components/hyNoPermissionsMap/noPermissionsMap.vue.mjs +1 -1
  38. package/es/components/hyOrgCascader/orgCascader.vue.mjs +75 -15
  39. package/es/components/hyRadioGroup/radioGroup.vue.mjs +5 -4
  40. package/es/components/hySearch/cpns/searchItem.vue.mjs +434 -206
  41. package/es/components/hySearch/js/index.mjs +2 -1
  42. package/es/components/hySearch/search.vue.mjs +71 -10
  43. package/es/components/hySearch/style/search.scss +7 -0
  44. package/es/components/hyTable/cpns/columnSelect.vue.mjs +21 -22
  45. package/es/components/hyTable/cpns/virtualTable.vue.mjs +35 -21
  46. package/es/components/hyTable/js/index.mjs +16 -17
  47. package/es/components/hyTable/js/search.mjs +28 -2
  48. package/es/components/hyTable/style/table.scss +13 -0
  49. package/es/components/hyTable/table.vue.mjs +55 -22
  50. package/es/components/hyTableActionButton/tableActionButton.vue.mjs +17 -12
  51. package/es/components/hyTableForm/batchTableForm.vue.mjs +36 -5
  52. package/es/components/hyTableForm/js/useAppTableForm.mjs +1 -1
  53. package/es/components/hyTableForm/tableForm.vue.mjs +84 -32
  54. package/es/components/hyTour/index.mjs +7 -0
  55. package/es/components/hyTour/style/tour.scss +0 -0
  56. package/es/components/hyTour/tour.vue.mjs +23 -0
  57. package/es/components/hyTree/config/tree-config.mjs +5 -2
  58. package/es/components/hyTree/js/index.mjs +128 -56
  59. package/es/components/hyTree/tree.vue.mjs +22 -37
  60. package/es/components/index.mjs +1 -0
  61. package/es/index.mjs +6 -0
  62. package/es/static/hy-svg-icons/hy-icon-ops-linear-arrow.js +10 -0
  63. package/es/style/element/hy-element.scss +24 -3
  64. package/es/style/index.scss +0 -1
  65. package/es/style/tailwind.scss +0 -1
  66. package/es/style/theme.scss +1 -0
  67. package/es/utils/is.mjs +3 -1
  68. package/es/utils/map/hook/bigMap.mjs +11 -1
  69. package/es/utils/map/hook/gaode.mjs +60 -17
  70. package/es/utils/map/hook/leafletjs.mjs +25 -4
  71. package/es/utils/map/index.mjs +1 -1
  72. package/es/version.mjs +1 -1
  73. package/lib/api/organization.js +47 -0
  74. package/lib/bussiness/hyAcquisitionStationTree/acquisitionStationTree.vue.js +249 -0
  75. package/lib/bussiness/hyAcquisitionStationTree/index.js +12 -0
  76. package/lib/bussiness/hyAcquisitionStationTree/js/index.js +126 -0
  77. package/lib/bussiness/hyAcquisitionStationTree/style/acquisitionStationTree.scss +0 -0
  78. package/lib/bussiness/hyDeviceTree/deviceTree.vue.js +253 -0
  79. package/lib/bussiness/hyDeviceTree/index.js +12 -0
  80. package/lib/bussiness/hyDeviceTree/js/index.js +128 -0
  81. package/lib/bussiness/hyDeviceTree/style/deviceTree.scss +0 -0
  82. package/lib/bussiness/hyOrgGroupTree/index.js +12 -0
  83. package/lib/bussiness/hyOrgGroupTree/js/index.js +126 -0
  84. package/lib/bussiness/hyOrgGroupTree/orgGroupTree.vue.js +249 -0
  85. package/lib/bussiness/hyOrgGroupTree/style/orgGroupTree.scss +0 -0
  86. package/lib/bussiness/hyPlanGroupDeviceTree/index.js +12 -0
  87. package/lib/bussiness/hyPlanGroupDeviceTree/js/index.js +126 -0
  88. package/lib/bussiness/hyPlanGroupDeviceTree/planGroupDeviceTree.vue.js +249 -0
  89. package/lib/bussiness/hyPlanGroupDeviceTree/style/planGroupDeviceTree.scss +0 -0
  90. package/lib/bussiness/hyUserTree/index.js +12 -0
  91. package/lib/bussiness/hyUserTree/js/index.js +128 -0
  92. package/lib/bussiness/hyUserTree/style/userTree.scss +0 -0
  93. package/lib/bussiness/hyUserTree/userTree.vue.js +243 -0
  94. package/lib/bussiness/index.js +14 -4
  95. package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +182 -148
  96. package/lib/components/hyButton/button.vue.js +18 -4
  97. package/lib/components/hyButton/style/button.scss +72 -0
  98. package/lib/components/hyConfirmDialog/confirmDialog.vue.js +0 -1
  99. package/lib/components/hyForm/cpns/formItem.vue.js +250 -28
  100. package/lib/components/hyForm/cpns/locationSelect.vue.js +8 -1
  101. package/lib/components/hyForm/form.vue.js +86 -17
  102. package/lib/components/hyForm/js/index.js +2 -0
  103. package/lib/components/hyForm/js/useAppForm.js +3 -3
  104. package/lib/components/hyIcon/style/icon.scss +1 -0
  105. package/lib/components/hyMap/js/index.js +5 -5
  106. package/lib/components/hyMap/map.vue.js +13 -3
  107. package/lib/components/hyNoPermissions/noPermissions.vue.js +1 -1
  108. package/lib/components/hyNoPermissionsMap/noPermissionsMap.vue.js +1 -1
  109. package/lib/components/hyOrgCascader/orgCascader.vue.js +73 -13
  110. package/lib/components/hyRadioGroup/radioGroup.vue.js +5 -4
  111. package/lib/components/hySearch/cpns/searchItem.vue.js +431 -203
  112. package/lib/components/hySearch/js/index.js +2 -0
  113. package/lib/components/hySearch/search.vue.js +69 -8
  114. package/lib/components/hySearch/style/search.scss +7 -0
  115. package/lib/components/hyTable/cpns/columnSelect.vue.js +20 -21
  116. package/lib/components/hyTable/cpns/virtualTable.vue.js +51 -37
  117. package/lib/components/hyTable/js/index.js +16 -16
  118. package/lib/components/hyTable/js/search.js +28 -2
  119. package/lib/components/hyTable/style/table.scss +13 -0
  120. package/lib/components/hyTable/table.vue.js +53 -20
  121. package/lib/components/hyTableActionButton/tableActionButton.vue.js +16 -11
  122. package/lib/components/hyTableForm/batchTableForm.vue.js +36 -5
  123. package/lib/components/hyTableForm/js/useAppTableForm.js +1 -1
  124. package/lib/components/hyTableForm/tableForm.vue.js +85 -33
  125. package/lib/components/hyTour/index.js +12 -0
  126. package/lib/components/hyTour/style/tour.scss +0 -0
  127. package/lib/components/hyTour/tour.vue.js +27 -0
  128. package/lib/components/hyTree/config/tree-config.js +5 -2
  129. package/lib/components/hyTree/js/index.js +128 -56
  130. package/lib/components/hyTree/tree.vue.js +22 -37
  131. package/lib/components/index.js +8 -6
  132. package/lib/index.js +67 -55
  133. package/lib/static/hy-svg-icons/hy-icon-ops-linear-arrow.js +10 -0
  134. package/lib/style/element/hy-element.scss +24 -3
  135. package/lib/style/index.scss +0 -1
  136. package/lib/style/tailwind.scss +0 -1
  137. package/lib/style/theme.scss +1 -0
  138. package/lib/utils/is.js +5 -3
  139. package/lib/utils/map/hook/bigMap.js +11 -1
  140. package/lib/utils/map/hook/gaode.js +60 -17
  141. package/lib/utils/map/hook/leafletjs.js +25 -4
  142. package/lib/utils/map/index.js +1 -1
  143. package/lib/version.js +1 -1
  144. package/package.json +2 -2
@@ -11,13 +11,16 @@ const treeTypeConfig = {
11
11
  // 群组设备树形
12
12
  group: "group",
13
13
  // 群组树形
14
- planGroupDevicee: "planGroupDevicee",
14
+ planGroupDevice: "planGroupDevice",
15
15
  // 预案分组树形
16
16
  cs: "cs",
17
17
  // 采集站树形
18
18
  teamUser: "teamUser",
19
19
  // 队伍树形
20
- userMail: "userMail"
20
+ userMail: "userMail",
21
+ // 用户通讯录树形
22
+ mapRail: "mapRail"
23
+ // 电子围栏树形
21
24
  };
22
25
  const searchTypeConfig = {
23
26
  fullSearch: 1,
@@ -34,10 +34,50 @@ const useAppTreeWrapper = (hy) => {
34
34
  const selectFilterType = vue.ref(null);
35
35
  const selectFilterList = vue.ref([]);
36
36
  const loading = vue.ref(true);
37
+ const noTreeSelData = vue.ref([]);
38
+ function getSelectedDataKey(data) {
39
+ if (!data) return void 0;
40
+ if (props.treeType === "device" || props.treeType === "channel") {
41
+ return data.channelId || data.deviceId;
42
+ }
43
+ if (props.treeType) {
44
+ return data.id;
45
+ }
46
+ return data[props.treeProps?.value];
47
+ }
48
+ function deleteNoTreeSelData(item) {
49
+ const index = hy.noTreeSelData.value.findIndex(
50
+ (v) => hy.getSelectedDataKey(v) === hy.getSelectedDataKey(item)
51
+ );
52
+ if (index !== -1) {
53
+ hy.noTreeSelData.value.splice(index, 1);
54
+ }
55
+ }
56
+ function updateNoTreeSelData(dataList) {
57
+ let selList = [];
58
+ if (props.treeType) {
59
+ selList = hy.virtualTree?.getCheckedBusinessNodes(true) || [];
60
+ } else {
61
+ selList = hy.virtualTree?.getCheckedNodes(true) || [];
62
+ }
63
+ const treeMap = /* @__PURE__ */ new Map();
64
+ selList.forEach((item) => {
65
+ const key = hy.getSelectedDataKey(item);
66
+ if (key) {
67
+ treeMap.set(key, true);
68
+ }
69
+ });
70
+ hy.noTreeSelData.value = dataList.filter(
71
+ (item) => !treeMap.get(hy.getSelectedDataKey(item))
72
+ );
73
+ }
74
+ function mergeNoTreeSelData(dataList) {
75
+ return [...hy.noTreeSelData.value, ...dataList];
76
+ }
37
77
  vue.watch(
38
78
  () => props.showCheckbox,
39
79
  (newVal) => {
40
- virtualTree?.setRowSelection({
80
+ hy.virtualTree?.setRowSelection({
41
81
  type: props.showCheckbox ? "checkbox" : "radio"
42
82
  });
43
83
  }
@@ -46,10 +86,10 @@ const useAppTreeWrapper = (hy) => {
46
86
  return new Promise((resolve) => {
47
87
  hy.loading.value = true;
48
88
  if (props.disableSelection?.length) {
49
- setDisAbleSelectionMap();
89
+ hy.setDisAbleSelectionMap();
50
90
  }
51
- if (!virtualTree) {
52
- virtualTree = new VirtualTree({
91
+ if (!hy.virtualTree) {
92
+ hy.virtualTree = new VirtualTree({
53
93
  // 指定容器
54
94
  container: treeRef.value,
55
95
  // 数据
@@ -58,30 +98,31 @@ const useAppTreeWrapper = (hy) => {
58
98
  itemHeight: 30,
59
99
  // 可视区域外的缓冲项数量
60
100
  bufferSize: 10,
61
- // 可视区域外的缓冲项数量
101
+ // 相邻级节点间的水平缩进,单位为像素
62
102
  indent: 16,
63
103
  emptyText: "\u6682\u65E0\u6570\u636E",
104
+ // 树形业务类型
64
105
  business: props.treeType,
65
106
  // 自定义整体的插槽
66
- renderItem: props.treeType === treeConfig.treeTypeConfig.user ? (data, node) => setUserSlot(data, node) : setSlot("treeParentSlot"),
107
+ renderItem: props.treeType === treeConfig.treeTypeConfig.user ? (data, node) => hy.setUserSlot(data, node) : props.treeType === treeConfig.treeTypeConfig.group ? (data, node) => hy.setGroupRenderItem(data, node) : hy.setSlot("treeParentSlot"),
67
108
  // // 自定义状态右侧插槽
68
109
  renderRight: (data) => {
69
- let renderRight = setSlot("renderRight");
110
+ let renderRight = hy.setSlot("renderRight");
70
111
  if (renderRight) return renderRight(data);
71
112
  if (data.dataType === 1) {
72
- let departmentRight = setSlot("departmentRight");
113
+ let departmentRight = hy.setSlot("departmentRight");
73
114
  if (departmentRight) {
74
115
  return departmentRight(data);
75
116
  }
76
117
  }
77
118
  if (data.dataType === 3) {
78
- let deviceOnlineRight = setSlot("deviceOnlineRight");
119
+ let deviceOnlineRight = hy.setSlot("deviceOnlineRight");
79
120
  if (deviceOnlineRight) {
80
121
  return deviceOnlineRight(data);
81
122
  }
82
123
  }
83
124
  if ([11].includes(data.dataType)) {
84
- let planGroupRight = setSlot("planGroupRight");
125
+ let planGroupRight = hy.setSlot("planGroupRight");
85
126
  if (planGroupRight) {
86
127
  return planGroupRight(data);
87
128
  }
@@ -89,18 +130,20 @@ const useAppTreeWrapper = (hy) => {
89
130
  return true;
90
131
  },
91
132
  // // 自定义状态模块
92
- renderStatus: props.treeType === treeConfig.treeTypeConfig.device || props.treeType === treeConfig.treeTypeConfig.channel ? (data) => setRenderStatus(data) : null,
133
+ renderStatus: props.treeType === treeConfig.treeTypeConfig.device || props.treeType === treeConfig.treeTypeConfig.channel ? (data) => hy.setRenderStatus(data) : null,
134
+ // 暂无数据插槽
93
135
  renderEmpty: () => {
94
136
  if (!props.showCustomEmpty || hy.filterValue.value) return true;
95
- let renderEmpty = setSlot("renderEmpty");
137
+ let renderEmpty = hy.setSlot("renderEmpty");
96
138
  if (renderEmpty) {
97
139
  const target = renderEmpty();
98
140
  return target.el;
99
141
  }
100
- return setEmpty();
142
+ return hy.setEmpty();
101
143
  },
102
144
  props: {
103
- showStatus: true,
145
+ // 是否显示右侧业务状态
146
+ showStatus: props.showStatus,
104
147
  disabled: (data) => {
105
148
  if (data.dataType === 5 || data.dataType === 3) {
106
149
  if (hy.disableSelectionMap.value) {
@@ -114,7 +157,9 @@ const useAppTreeWrapper = (hy) => {
114
157
  },
115
158
  rowSelection: {
116
159
  type: props.showCheckbox ? "checkbox" : "radio",
160
+ // 是否高亮选中项
117
161
  highlight: props.highlight,
162
+ // 是否严格遵循父子不互相关联
118
163
  checkStrictly: props.checkStrictly,
119
164
  // 是否显示选项 showSinglebox 单选为true时部门不显示其他节点显示选择框
120
165
  showSelect: (data) => {
@@ -129,7 +174,6 @@ const useAppTreeWrapper = (hy) => {
129
174
  showSelectBox: props.showSelectBox,
130
175
  // 选中回调
131
176
  onCheckChange: (data, info, checked) => {
132
- console.log("onCheckChange", info);
133
177
  if (data.dataType === 3 && !checked) {
134
178
  emits("on-click-delete", JSON.parse(JSON.stringify(data)));
135
179
  } else if (data.dataType === 3) {
@@ -138,7 +182,11 @@ const useAppTreeWrapper = (hy) => {
138
182
  emits(
139
183
  "on-check-tree",
140
184
  JSON.parse(
141
- JSON.stringify(info.checkedBusinessNodes || info.checkedNodes)
185
+ JSON.stringify(
186
+ hy.mergeNoTreeSelData(
187
+ info.checkedBusinessNodes || info.checkedNodes
188
+ )
189
+ )
142
190
  ),
143
191
  {
144
192
  data,
@@ -159,7 +207,6 @@ const useAppTreeWrapper = (hy) => {
159
207
  // 筛选方法
160
208
  filterMethod: ({ filterValue: filterValue2 }, data) => {
161
209
  let isFilter = true;
162
- console.log("111111111", isFilter, props.filterMethod);
163
210
  if (props.filterMethod) {
164
211
  isFilter = props.filterMethod(data, {
165
212
  filterValue: filterValue2
@@ -244,16 +291,16 @@ const useAppTreeWrapper = (hy) => {
244
291
  document.body.click();
245
292
  },
246
293
  onLoad: () => {
247
- if (props.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
294
+ if (props.showOnlineOnly && !hy.virtualTree._flattenTree?.length && !hy.filterValue.value) {
248
295
  elementPlus.ElMessage.warning("\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001");
249
296
  }
250
297
  if (props.defaultSelectedOrgID && props.showCheckbox && props.treeType === "device") {
251
- setSelectedOrg(dataList);
298
+ hy.setSelectedOrg(dataList);
252
299
  } else if (props.selectedByDefault?.length) {
253
- setCheckedKeys(props.selectedByDefault);
300
+ hy.setCheckedKeys(props.selectedByDefault);
254
301
  }
255
302
  if (hy.filterValue.value) {
256
- getFilterValue();
303
+ hy.getFilterValue();
257
304
  }
258
305
  setTimeout(() => {
259
306
  hy.loading.value = false;
@@ -262,7 +309,7 @@ const useAppTreeWrapper = (hy) => {
262
309
  }
263
310
  });
264
311
  } else {
265
- virtualTree.setData(
312
+ hy.virtualTree.setData(
266
313
  {
267
314
  data: dataList,
268
315
  businessConfig: {
@@ -272,11 +319,11 @@ const useAppTreeWrapper = (hy) => {
272
319
  }
273
320
  },
274
321
  () => {
275
- if (props.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
322
+ if (props.showOnlineOnly && !hy.virtualTree._flattenTree?.length && !hy.filterValue.value) {
276
323
  elementPlus.ElMessage.success("\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001");
277
324
  }
278
325
  if (hy.filterValue.value) {
279
- getFilterValue();
326
+ hy.getFilterValue();
280
327
  }
281
328
  setTimeout(() => {
282
329
  hy.loading.value = false;
@@ -300,13 +347,13 @@ const useAppTreeWrapper = (hy) => {
300
347
  }
301
348
  });
302
349
  content = `<div class="w-full h-full flex flex-col justify-center items-center">
303
- <svg data-v-19e5a669="" data-v-56505d40="" aria-hidden="true" svgName="map_service" class="svg-icon" style="width: 40px; height: 48px"><use data-v-19e5a669="" xlink:href="#icon-noData"></use></svg>
350
+ <svg data-v-19e5a669="" data-v-56505d40="" aria-hidden="true" svgName="ops-list-no-data" class="svg-icon" style="width: 40px; height: 48px"><use data-v-19e5a669="" xlink:href="#icon-ops-list-no-data"></use></svg>
304
351
  <span class="text-auxiliary text-sm mt-2">\u60A8\u5C1A\u672A\u6DFB\u52A0\u4EFB\u52A1\u8BBE\u5907</span>
305
352
  ${permissionIdList.includes("operator_deviceManage") ? '<span id="dispatch-add-device" class="inline-block border-b border-theme text-theme text-sm mt-2 cursor-pointer">\u53BB\u6DFB\u52A0</span>' : ""}
306
353
  </div>`;
307
354
  } else {
308
355
  content = `<div class="w-full h-full flex flex-col justify-center items-center">
309
- <svg data-v-19e5a669="" data-v-56505d40="" aria-hidden="true" svgName="map_service" class="svg-icon" style="width: 40px; height: 40px"><use data-v-19e5a669="" xlink:href="#icon-v3-card-device-offline"></use></svg>
356
+ <svg data-v-19e5a669="" data-v-56505d40="" aria-hidden="true" svgName="analytics-v3-card-device-offline" class="svg-icon" style="width: 40px; height: 40px"><use data-v-19e5a669="" xlink:href="#icon-analytics-v3-card-device-offline"></use></svg>
310
357
  <span class="text-auxiliary text-sm mt-2">\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001</span>
311
358
  <span class="text-auxiliary text-sm whitespace-nowrap">\u8BF7\u68C0\u67E5\u8BBE\u5907\u72B6\u6001\u6216\u7F51\u7EDC\u8FDE\u63A5</span>
312
359
  </div>`;
@@ -314,7 +361,7 @@ const useAppTreeWrapper = (hy) => {
314
361
  return content;
315
362
  }
316
363
  function getFilterValue() {
317
- virtualTree.filter({ filterValue: hy.filterValue.value }, false);
364
+ hy.virtualTree.filter({ filterValue: hy.filterValue.value }, false);
318
365
  }
319
366
  function setDisAbleSelectionMap() {
320
367
  const map = /* @__PURE__ */ new Map();
@@ -328,7 +375,7 @@ const useAppTreeWrapper = (hy) => {
328
375
  emits("on-refreshData");
329
376
  }
330
377
  function setRenderStatus(data) {
331
- const slot = setSlot("renderStatus");
378
+ const slot = hy.setSlot("renderStatus");
332
379
  if (slot) {
333
380
  return slot(data);
334
381
  }
@@ -358,22 +405,24 @@ const useAppTreeWrapper = (hy) => {
358
405
  }
359
406
  function setUserSlot(data) {
360
407
  if (data.dataType === 1) {
361
- const slot2 = setSlot("treeParentSlot");
408
+ const slot2 = hy.setSlot("treeParentSlot");
362
409
  if (slot2) {
363
410
  return slot2(data);
364
411
  }
365
412
  return true;
366
413
  }
367
- const slot = setSlot("treeSelectedSlot");
414
+ const slot = hy.setSlot("treeSelectedSlot");
368
415
  if (slot) {
369
416
  return slot(data);
370
417
  }
371
418
  return true;
372
419
  }
373
420
  function setGroupRenderItem(data, node) {
374
- const slot = setSlot("treeParentSlot");
375
- if (slot) {
376
- return slot(data, node);
421
+ if (data.dataType === 4) {
422
+ const slot = hy.setSlot("treeGroupSlot");
423
+ if (slot) {
424
+ return slot(data, node);
425
+ }
377
426
  }
378
427
  return true;
379
428
  }
@@ -418,81 +467,91 @@ const useAppTreeWrapper = (hy) => {
418
467
  emits("on-addDevice");
419
468
  }
420
469
  function setDeviceStatus(payload) {
421
- virtualTree?.updateData([payload]);
470
+ hy.virtualTree?.updateData([payload]);
422
471
  }
423
472
  function singleRemovalFn(row, isForce = false) {
424
473
  if (props.treeType === "device" || props.treeType === "channel") {
425
- virtualTree.setChecked(row.channelId || row.deviceId, false, true);
474
+ hy.virtualTree.setChecked(row.channelId || row.deviceId, false, true);
426
475
  } else if (props.treeType) {
427
- virtualTree.setChecked(row.id, false, true, isForce);
476
+ hy.virtualTree.setChecked(row.id, false, true, isForce);
428
477
  } else if (!props.treeType && props.treeProps) {
429
- virtualTree.setChecked(
478
+ hy.virtualTree.setChecked(
430
479
  row[`${props.treeProps.value}`],
431
480
  false,
432
481
  true,
433
482
  isForce
434
483
  );
435
484
  }
485
+ hy.deleteNoTreeSelData(row);
436
486
  }
437
487
  function setCheckedKeys(dataList, isForce = false) {
438
488
  if (props.treeType === "device" || props.treeType === "channel") {
439
- virtualTree?.setCheckedKeys(
489
+ hy.virtualTree?.setCheckedKeys(
440
490
  dataList.map((v) => v.channelId || v.deviceId),
441
491
  true,
442
492
  isForce
443
493
  );
444
494
  } else if (props.treeType) {
445
- virtualTree?.setCheckedKeys(
495
+ hy.virtualTree?.setCheckedKeys(
446
496
  dataList.map((v) => v.id),
447
497
  true,
448
498
  isForce
449
499
  );
450
500
  } else if (!props.treeType && props.treeProps) {
451
- console.log(
452
- "\u9009\u4E2D\u56DE\u8C03",
453
- dataList.map((v) => v[`${props.treeProps.value}`])
454
- );
455
- virtualTree?.setCheckedKeys(
501
+ hy.virtualTree?.setCheckedKeys(
456
502
  dataList.map((v) => v[`${props.treeProps.value}`]),
457
503
  false,
458
504
  isForce
459
505
  );
460
506
  }
507
+ hy.updateNoTreeSelData(dataList);
461
508
  if (props.isBackDefaultSelected) {
462
509
  setTimeout(() => {
463
- const deviceList = virtualTree?.getCheckedBusinessNodes(true) || [];
464
- emits("on-selectedDataList", deviceList);
510
+ let deviceList = [];
511
+ if (props.treeType) {
512
+ deviceList = hy.virtualTree?.getCheckedBusinessNodes(true) || [];
513
+ } else {
514
+ deviceList = hy.virtualTree?.getCheckedNodes(true) || [];
515
+ }
516
+ emits("on-selectedDataList", hy.mergeNoTreeSelData(deviceList));
465
517
  });
466
518
  }
467
519
  }
468
- function setChecked(data, type) {
520
+ function setChecked(data, type = true) {
469
521
  if (props.treeType === "device") {
470
- virtualTree?.setChecked(data.channelId || data.deviceId, type, true);
522
+ hy.virtualTree?.setChecked(data.channelId || data.deviceId, type, true);
471
523
  } else if (props.treeType) {
472
- virtualTree?.setChecked(data.id, type, true);
524
+ hy.virtualTree?.setChecked(data.id, type, true);
473
525
  } else if (!props.treeType && props.treeProps) {
474
- virtualTree?.setChecked(data[`${props.treeProps.value}`], type, true);
526
+ hy.virtualTree?.setChecked(data[`${props.treeProps.value}`], type, false);
527
+ }
528
+ if (!type) {
529
+ hy.deleteNoTreeSelData(data);
475
530
  }
476
531
  }
477
532
  function setSelectedOrg(deviceList) {
478
533
  for (let i = 0; i < deviceList.length; i++) {
479
534
  if (props.defaultSelectedOrgID === deviceList[i].id) {
480
535
  if (deviceList[i].deviceList?.length) {
481
- setCheckedKeys(deviceList[i].deviceList);
536
+ hy.setCheckedKeys(deviceList[i].deviceList);
482
537
  }
483
538
  return true;
484
539
  }
485
540
  if (deviceList[i].children?.length) {
486
- const org = setSelectedOrg(deviceList[i].children);
541
+ const org = hy.setSelectedOrg(deviceList[i].children);
487
542
  if (org) return true;
488
543
  }
489
544
  }
490
545
  }
491
546
  function getSelectedDataList(leafOnly = false) {
492
547
  if (props.treeType) {
493
- return virtualTree?.getCheckedBusinessNodes(leafOnly) || [];
548
+ return hy.mergeNoTreeSelData(
549
+ hy.virtualTree?.getCheckedBusinessNodes(leafOnly) || []
550
+ );
494
551
  }
495
- return virtualTree?.getCheckedNodes(leafOnly) || [];
552
+ return hy.mergeNoTreeSelData(
553
+ hy.virtualTree?.getCheckedNodes(leafOnly) || []
554
+ );
496
555
  }
497
556
  function setFilterListType(type) {
498
557
  if (props.selectFilterList?.length) {
@@ -554,7 +613,7 @@ const useAppTreeWrapper = (hy) => {
554
613
  }
555
614
  }
556
615
  function getNode(id) {
557
- return virtualTree.getNode(id);
616
+ return hy.virtualTree.getNode(id);
558
617
  }
559
618
  return {
560
619
  filterValue,
@@ -562,6 +621,7 @@ const useAppTreeWrapper = (hy) => {
562
621
  permissionIdList,
563
622
  disableSelectionMap,
564
623
  addDeviceDom,
624
+ setDisAbleSelectionMap,
565
625
  getData,
566
626
  getFilterValue,
567
627
  refreshData,
@@ -569,6 +629,11 @@ const useAppTreeWrapper = (hy) => {
569
629
  setCheckedKeys,
570
630
  setChecked,
571
631
  setFilterListType,
632
+ setSelectedOrg,
633
+ setUserSlot,
634
+ setSlot,
635
+ setRenderStatus,
636
+ setEmpty,
572
637
  getInputPlaceholder,
573
638
  onChange,
574
639
  selectFilterList,
@@ -576,7 +641,14 @@ const useAppTreeWrapper = (hy) => {
576
641
  selectedDataList,
577
642
  getSelectedDataList,
578
643
  loading,
579
- getNode
644
+ getNode,
645
+ noTreeSelData,
646
+ updateNoTreeSelData,
647
+ mergeNoTreeSelData,
648
+ getSelectedDataKey,
649
+ deleteNoTreeSelData,
650
+ setDeviceStatus,
651
+ setGroupRenderItem
580
652
  };
581
653
  };
582
654
  function filterNodeMethod(data, value, { selectFilterType, treeFilterParam = [], treeType }) {
@@ -22,9 +22,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
22
22
  /* 禁止选择 */
23
23
  disableSelection: {
24
24
  type: Array,
25
- default: () => {
26
- return [];
27
- }
25
+ default: () => []
28
26
  },
29
27
  // 是否开启按照设备在线和离线状态排序,仅支持 device 和 groupDevice 业务类型
30
28
  deviceOrderSort: {
@@ -34,37 +32,27 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
34
32
  // 当前群组
35
33
  orgGroupId: {
36
34
  type: [Number, String],
37
- default: () => {
38
- return null;
39
- }
35
+ default: null
40
36
  },
41
37
  // 设置勤务状态
42
38
  getDutyRoster: {
43
39
  type: Boolean,
44
- default: () => {
45
- return false;
46
- }
40
+ default: false
47
41
  },
48
42
  // 仅展示在线数据
49
43
  showOnlineOnly: {
50
44
  type: Boolean,
51
- default: () => {
52
- return false;
53
- }
45
+ default: false
54
46
  },
55
47
  /* 是否开启多选框 */
56
48
  showCheckbox: {
57
49
  type: Boolean,
58
- default: () => {
59
- return true;
60
- }
50
+ default: true
61
51
  },
62
52
  /* 是否开启单选框 */
63
53
  showSinglebox: {
64
54
  type: Boolean,
65
- default: () => {
66
- return false;
67
- }
55
+ default: false
68
56
  },
69
57
  // 是否清除无数据的部门
70
58
  clearEmptyBusiness: {
@@ -79,28 +67,22 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
79
67
  // 树形类型
80
68
  treeType: {
81
69
  type: String,
82
- default: () => {
83
- return treeConfig.treeTypeConfig.device;
84
- }
70
+ default: treeConfig.treeTypeConfig.device
85
71
  },
86
72
  // 树形 props 类型 (treeType null时生效)
87
73
  treeProps: {
88
74
  type: Object,
89
- default: () => {
90
- return {};
91
- }
75
+ default: () => ({})
92
76
  },
93
77
  // 树形 过滤参数 类型 (treeType null时生效)
94
78
  treeFilterParam: {
95
79
  type: Array,
96
- default: () => {
97
- return [];
98
- }
80
+ default: () => []
99
81
  },
100
82
  // 是否显示通道节点的选择框
101
83
  isShowChannelSelect: {
102
84
  type: Boolean,
103
- default: () => false
85
+ default: false
104
86
  },
105
87
  // 是否显示自定义空数据显示
106
88
  showCustomEmpty: {
@@ -109,9 +91,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
109
91
  },
110
92
  placeholder: {
111
93
  type: String,
112
- default: () => {
113
- return "\u8BF7\u8F93\u5165";
114
- }
94
+ default: "\u8BF7\u8F93\u5165"
115
95
  },
116
96
  // 是否返回默认选择的数据
117
97
  isBackDefaultSelected: {
@@ -121,13 +101,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
121
101
  /* 默认选中列表 */
122
102
  selectedByDefault: {
123
103
  type: Array,
124
- default: () => {
125
- return [];
126
- }
104
+ default: () => []
127
105
  },
128
106
  // 默认需要选中的部门ID
129
107
  defaultSelectedOrgID: {
130
- default: () => null
108
+ default: null
131
109
  },
132
110
  // 搜索类型
133
111
  searchType: {
@@ -188,6 +166,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
188
166
  filterMethod: {
189
167
  type: Function,
190
168
  default: null
169
+ },
170
+ // 是否显示右侧业务状态
171
+ showStatus: {
172
+ type: Boolean,
173
+ default: true
191
174
  }
192
175
  },
193
176
  emits: [
@@ -223,7 +206,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
223
206
  onChange,
224
207
  getSelectedDataList,
225
208
  loading,
226
- getNode
209
+ getNode,
210
+ setDeviceStatus
227
211
  } = useMixins.useMixins(
228
212
  {
229
213
  props,
@@ -246,7 +230,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
246
230
  setChecked,
247
231
  getSelectedDataList,
248
232
  refreshData,
249
- getNode
233
+ getNode,
234
+ setDeviceStatus
250
235
  });
251
236
  return (_ctx, _cache) => {
252
237
  const _directive_loading = vue.resolveDirective("loading");
@@ -11,14 +11,14 @@ var index$n = require('./hyTable/index.js');
11
11
  var index$4 = require('./hyTooltip/index.js');
12
12
  var index$9 = require('./hyConfigProvider/index.js');
13
13
  var index$8 = require('./hyButton/index.js');
14
- var index$q = require('./hyUserAvatar/index.js');
14
+ var index$r = require('./hyUserAvatar/index.js');
15
15
  var index$i = require('./hyNoPermissions/index.js');
16
16
  var index$j = require('./hyNoPermissionsMap/index.js');
17
17
  var index$b = require('./hyCutter/index.js');
18
18
  var index$c = require('./hyDialog/index.js');
19
19
  var index$h = require('./hyMenu/index.js');
20
- var index$p = require('./hyTree/index.js');
21
- var index$r = require('./hyVideoPlayer/index.js');
20
+ var index$q = require('./hyTree/index.js');
21
+ var index$s = require('./hyVideoPlayer/index.js');
22
22
  var index$5 = require('./hyAudioPlayer/index.js');
23
23
  var index$1 = require('./hyInput/index.js');
24
24
  var index$3 = require('./hyTimePicker/index.js');
@@ -28,6 +28,7 @@ var index$7 = require('./hyBatchUploadDialog/index.js');
28
28
  var index$g = require('./hyMap/index.js');
29
29
  var index$l = require('./hyRadioGroup/index.js');
30
30
  var index$2 = require('./hyLoading/index.js');
31
+ var index$p = require('./hyTour/index.js');
31
32
  var useAppForm = require('./hyForm/js/useAppForm.js');
32
33
  var useAppSearch = require('./hySearch/js/useAppSearch.js');
33
34
  var useAppTable = require('./hyTable/js/useAppTable.js');
@@ -48,14 +49,14 @@ exports.ElTooltip = index$4.ElTooltip;
48
49
  exports.HyTooltip = index$4.HyTooltip;
49
50
  exports.HyConfigProvider = index$9.HyConfigProvider;
50
51
  exports.HyButton = index$8.HyButton;
51
- exports.HyUserAvatar = index$q.HyUserAvatar;
52
+ exports.HyUserAvatar = index$r.HyUserAvatar;
52
53
  exports.HyNoPermissions = index$i.HyNoPermissions;
53
54
  exports.HyNoPermissionsMap = index$j.HyNoPermissionsMap;
54
55
  exports.HyCutter = index$b.HyCutter;
55
56
  exports.HyDialog = index$c.HyDialog;
56
57
  exports.HyMenu = index$h.HyMenu;
57
- exports.HyTree = index$p.HyTree;
58
- exports.HyVideoPlayer = index$r.HyVideoPlayer;
58
+ exports.HyTree = index$q.HyTree;
59
+ exports.HyVideoPlayer = index$s.HyVideoPlayer;
59
60
  exports.HyAudioPlayer = index$5.HyAudioPlayer;
60
61
  exports.ElInput = index$1.ElInput;
61
62
  exports.HyInput = index$1.HyInput;
@@ -70,6 +71,7 @@ exports.HyMap = index$g.HyMap;
70
71
  exports.HyRadioGroup = index$l.HyRadioGroup;
71
72
  exports.ElLoading = index$2.ElLoading;
72
73
  exports.HyLoading = index$2.ElLoading;
74
+ exports.HyTour = index$p.HyTour;
73
75
  exports.resetAppFormValue = useAppForm.resetAppFormValue;
74
76
  exports.useAppForm = useAppForm.useAppForm;
75
77
  exports.resetAppSearchValue = useAppSearch.resetAppSearchValue;