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
@@ -32,10 +32,50 @@ const useAppTreeWrapper = (hy) => {
32
32
  const selectFilterType = ref(null);
33
33
  const selectFilterList = ref([]);
34
34
  const loading = ref(true);
35
+ const noTreeSelData = ref([]);
36
+ function getSelectedDataKey(data) {
37
+ if (!data) return void 0;
38
+ if (props.treeType === "device" || props.treeType === "channel") {
39
+ return data.channelId || data.deviceId;
40
+ }
41
+ if (props.treeType) {
42
+ return data.id;
43
+ }
44
+ return data[props.treeProps?.value];
45
+ }
46
+ function deleteNoTreeSelData(item) {
47
+ const index = hy.noTreeSelData.value.findIndex(
48
+ (v) => hy.getSelectedDataKey(v) === hy.getSelectedDataKey(item)
49
+ );
50
+ if (index !== -1) {
51
+ hy.noTreeSelData.value.splice(index, 1);
52
+ }
53
+ }
54
+ function updateNoTreeSelData(dataList) {
55
+ let selList = [];
56
+ if (props.treeType) {
57
+ selList = hy.virtualTree?.getCheckedBusinessNodes(true) || [];
58
+ } else {
59
+ selList = hy.virtualTree?.getCheckedNodes(true) || [];
60
+ }
61
+ const treeMap = /* @__PURE__ */ new Map();
62
+ selList.forEach((item) => {
63
+ const key = hy.getSelectedDataKey(item);
64
+ if (key) {
65
+ treeMap.set(key, true);
66
+ }
67
+ });
68
+ hy.noTreeSelData.value = dataList.filter(
69
+ (item) => !treeMap.get(hy.getSelectedDataKey(item))
70
+ );
71
+ }
72
+ function mergeNoTreeSelData(dataList) {
73
+ return [...hy.noTreeSelData.value, ...dataList];
74
+ }
35
75
  watch(
36
76
  () => props.showCheckbox,
37
77
  (newVal) => {
38
- virtualTree?.setRowSelection({
78
+ hy.virtualTree?.setRowSelection({
39
79
  type: props.showCheckbox ? "checkbox" : "radio"
40
80
  });
41
81
  }
@@ -44,10 +84,10 @@ const useAppTreeWrapper = (hy) => {
44
84
  return new Promise((resolve) => {
45
85
  hy.loading.value = true;
46
86
  if (props.disableSelection?.length) {
47
- setDisAbleSelectionMap();
87
+ hy.setDisAbleSelectionMap();
48
88
  }
49
- if (!virtualTree) {
50
- virtualTree = new VirtualTree({
89
+ if (!hy.virtualTree) {
90
+ hy.virtualTree = new VirtualTree({
51
91
  // 指定容器
52
92
  container: treeRef.value,
53
93
  // 数据
@@ -56,30 +96,31 @@ const useAppTreeWrapper = (hy) => {
56
96
  itemHeight: 30,
57
97
  // 可视区域外的缓冲项数量
58
98
  bufferSize: 10,
59
- // 可视区域外的缓冲项数量
99
+ // 相邻级节点间的水平缩进,单位为像素
60
100
  indent: 16,
61
101
  emptyText: "\u6682\u65E0\u6570\u636E",
102
+ // 树形业务类型
62
103
  business: props.treeType,
63
104
  // 自定义整体的插槽
64
- renderItem: props.treeType === treeTypeConfig.user ? (data, node) => setUserSlot(data, node) : setSlot("treeParentSlot"),
105
+ renderItem: props.treeType === treeTypeConfig.user ? (data, node) => hy.setUserSlot(data, node) : props.treeType === treeTypeConfig.group ? (data, node) => hy.setGroupRenderItem(data, node) : hy.setSlot("treeParentSlot"),
65
106
  // // 自定义状态右侧插槽
66
107
  renderRight: (data) => {
67
- let renderRight = setSlot("renderRight");
108
+ let renderRight = hy.setSlot("renderRight");
68
109
  if (renderRight) return renderRight(data);
69
110
  if (data.dataType === 1) {
70
- let departmentRight = setSlot("departmentRight");
111
+ let departmentRight = hy.setSlot("departmentRight");
71
112
  if (departmentRight) {
72
113
  return departmentRight(data);
73
114
  }
74
115
  }
75
116
  if (data.dataType === 3) {
76
- let deviceOnlineRight = setSlot("deviceOnlineRight");
117
+ let deviceOnlineRight = hy.setSlot("deviceOnlineRight");
77
118
  if (deviceOnlineRight) {
78
119
  return deviceOnlineRight(data);
79
120
  }
80
121
  }
81
122
  if ([11].includes(data.dataType)) {
82
- let planGroupRight = setSlot("planGroupRight");
123
+ let planGroupRight = hy.setSlot("planGroupRight");
83
124
  if (planGroupRight) {
84
125
  return planGroupRight(data);
85
126
  }
@@ -87,18 +128,20 @@ const useAppTreeWrapper = (hy) => {
87
128
  return true;
88
129
  },
89
130
  // // 自定义状态模块
90
- renderStatus: props.treeType === treeTypeConfig.device || props.treeType === treeTypeConfig.channel ? (data) => setRenderStatus(data) : null,
131
+ renderStatus: props.treeType === treeTypeConfig.device || props.treeType === treeTypeConfig.channel ? (data) => hy.setRenderStatus(data) : null,
132
+ // 暂无数据插槽
91
133
  renderEmpty: () => {
92
134
  if (!props.showCustomEmpty || hy.filterValue.value) return true;
93
- let renderEmpty = setSlot("renderEmpty");
135
+ let renderEmpty = hy.setSlot("renderEmpty");
94
136
  if (renderEmpty) {
95
137
  const target = renderEmpty();
96
138
  return target.el;
97
139
  }
98
- return setEmpty();
140
+ return hy.setEmpty();
99
141
  },
100
142
  props: {
101
- showStatus: true,
143
+ // 是否显示右侧业务状态
144
+ showStatus: props.showStatus,
102
145
  disabled: (data) => {
103
146
  if (data.dataType === 5 || data.dataType === 3) {
104
147
  if (hy.disableSelectionMap.value) {
@@ -112,7 +155,9 @@ const useAppTreeWrapper = (hy) => {
112
155
  },
113
156
  rowSelection: {
114
157
  type: props.showCheckbox ? "checkbox" : "radio",
158
+ // 是否高亮选中项
115
159
  highlight: props.highlight,
160
+ // 是否严格遵循父子不互相关联
116
161
  checkStrictly: props.checkStrictly,
117
162
  // 是否显示选项 showSinglebox 单选为true时部门不显示其他节点显示选择框
118
163
  showSelect: (data) => {
@@ -127,7 +172,6 @@ const useAppTreeWrapper = (hy) => {
127
172
  showSelectBox: props.showSelectBox,
128
173
  // 选中回调
129
174
  onCheckChange: (data, info, checked) => {
130
- console.log("onCheckChange", info);
131
175
  if (data.dataType === 3 && !checked) {
132
176
  emits("on-click-delete", JSON.parse(JSON.stringify(data)));
133
177
  } else if (data.dataType === 3) {
@@ -136,7 +180,11 @@ const useAppTreeWrapper = (hy) => {
136
180
  emits(
137
181
  "on-check-tree",
138
182
  JSON.parse(
139
- JSON.stringify(info.checkedBusinessNodes || info.checkedNodes)
183
+ JSON.stringify(
184
+ hy.mergeNoTreeSelData(
185
+ info.checkedBusinessNodes || info.checkedNodes
186
+ )
187
+ )
140
188
  ),
141
189
  {
142
190
  data,
@@ -157,7 +205,6 @@ const useAppTreeWrapper = (hy) => {
157
205
  // 筛选方法
158
206
  filterMethod: ({ filterValue: filterValue2 }, data) => {
159
207
  let isFilter = true;
160
- console.log("111111111", isFilter, props.filterMethod);
161
208
  if (props.filterMethod) {
162
209
  isFilter = props.filterMethod(data, {
163
210
  filterValue: filterValue2
@@ -242,16 +289,16 @@ const useAppTreeWrapper = (hy) => {
242
289
  document.body.click();
243
290
  },
244
291
  onLoad: () => {
245
- if (props.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
292
+ if (props.showOnlineOnly && !hy.virtualTree._flattenTree?.length && !hy.filterValue.value) {
246
293
  ElMessage.warning("\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001");
247
294
  }
248
295
  if (props.defaultSelectedOrgID && props.showCheckbox && props.treeType === "device") {
249
- setSelectedOrg(dataList);
296
+ hy.setSelectedOrg(dataList);
250
297
  } else if (props.selectedByDefault?.length) {
251
- setCheckedKeys(props.selectedByDefault);
298
+ hy.setCheckedKeys(props.selectedByDefault);
252
299
  }
253
300
  if (hy.filterValue.value) {
254
- getFilterValue();
301
+ hy.getFilterValue();
255
302
  }
256
303
  setTimeout(() => {
257
304
  hy.loading.value = false;
@@ -260,7 +307,7 @@ const useAppTreeWrapper = (hy) => {
260
307
  }
261
308
  });
262
309
  } else {
263
- virtualTree.setData(
310
+ hy.virtualTree.setData(
264
311
  {
265
312
  data: dataList,
266
313
  businessConfig: {
@@ -270,11 +317,11 @@ const useAppTreeWrapper = (hy) => {
270
317
  }
271
318
  },
272
319
  () => {
273
- if (props.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
320
+ if (props.showOnlineOnly && !hy.virtualTree._flattenTree?.length && !hy.filterValue.value) {
274
321
  ElMessage.success("\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001");
275
322
  }
276
323
  if (hy.filterValue.value) {
277
- getFilterValue();
324
+ hy.getFilterValue();
278
325
  }
279
326
  setTimeout(() => {
280
327
  hy.loading.value = false;
@@ -298,13 +345,13 @@ const useAppTreeWrapper = (hy) => {
298
345
  }
299
346
  });
300
347
  content = `<div class="w-full h-full flex flex-col justify-center items-center">
301
- <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>
348
+ <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>
302
349
  <span class="text-auxiliary text-sm mt-2">\u60A8\u5C1A\u672A\u6DFB\u52A0\u4EFB\u52A1\u8BBE\u5907</span>
303
350
  ${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>' : ""}
304
351
  </div>`;
305
352
  } else {
306
353
  content = `<div class="w-full h-full flex flex-col justify-center items-center">
307
- <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>
354
+ <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>
308
355
  <span class="text-auxiliary text-sm mt-2">\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001</span>
309
356
  <span class="text-auxiliary text-sm whitespace-nowrap">\u8BF7\u68C0\u67E5\u8BBE\u5907\u72B6\u6001\u6216\u7F51\u7EDC\u8FDE\u63A5</span>
310
357
  </div>`;
@@ -312,7 +359,7 @@ const useAppTreeWrapper = (hy) => {
312
359
  return content;
313
360
  }
314
361
  function getFilterValue() {
315
- virtualTree.filter({ filterValue: hy.filterValue.value }, false);
362
+ hy.virtualTree.filter({ filterValue: hy.filterValue.value }, false);
316
363
  }
317
364
  function setDisAbleSelectionMap() {
318
365
  const map = /* @__PURE__ */ new Map();
@@ -326,7 +373,7 @@ const useAppTreeWrapper = (hy) => {
326
373
  emits("on-refreshData");
327
374
  }
328
375
  function setRenderStatus(data) {
329
- const slot = setSlot("renderStatus");
376
+ const slot = hy.setSlot("renderStatus");
330
377
  if (slot) {
331
378
  return slot(data);
332
379
  }
@@ -356,22 +403,24 @@ const useAppTreeWrapper = (hy) => {
356
403
  }
357
404
  function setUserSlot(data) {
358
405
  if (data.dataType === 1) {
359
- const slot2 = setSlot("treeParentSlot");
406
+ const slot2 = hy.setSlot("treeParentSlot");
360
407
  if (slot2) {
361
408
  return slot2(data);
362
409
  }
363
410
  return true;
364
411
  }
365
- const slot = setSlot("treeSelectedSlot");
412
+ const slot = hy.setSlot("treeSelectedSlot");
366
413
  if (slot) {
367
414
  return slot(data);
368
415
  }
369
416
  return true;
370
417
  }
371
418
  function setGroupRenderItem(data, node) {
372
- const slot = setSlot("treeParentSlot");
373
- if (slot) {
374
- return slot(data, node);
419
+ if (data.dataType === 4) {
420
+ const slot = hy.setSlot("treeGroupSlot");
421
+ if (slot) {
422
+ return slot(data, node);
423
+ }
375
424
  }
376
425
  return true;
377
426
  }
@@ -416,81 +465,91 @@ const useAppTreeWrapper = (hy) => {
416
465
  emits("on-addDevice");
417
466
  }
418
467
  function setDeviceStatus(payload) {
419
- virtualTree?.updateData([payload]);
468
+ hy.virtualTree?.updateData([payload]);
420
469
  }
421
470
  function singleRemovalFn(row, isForce = false) {
422
471
  if (props.treeType === "device" || props.treeType === "channel") {
423
- virtualTree.setChecked(row.channelId || row.deviceId, false, true);
472
+ hy.virtualTree.setChecked(row.channelId || row.deviceId, false, true);
424
473
  } else if (props.treeType) {
425
- virtualTree.setChecked(row.id, false, true, isForce);
474
+ hy.virtualTree.setChecked(row.id, false, true, isForce);
426
475
  } else if (!props.treeType && props.treeProps) {
427
- virtualTree.setChecked(
476
+ hy.virtualTree.setChecked(
428
477
  row[`${props.treeProps.value}`],
429
478
  false,
430
479
  true,
431
480
  isForce
432
481
  );
433
482
  }
483
+ hy.deleteNoTreeSelData(row);
434
484
  }
435
485
  function setCheckedKeys(dataList, isForce = false) {
436
486
  if (props.treeType === "device" || props.treeType === "channel") {
437
- virtualTree?.setCheckedKeys(
487
+ hy.virtualTree?.setCheckedKeys(
438
488
  dataList.map((v) => v.channelId || v.deviceId),
439
489
  true,
440
490
  isForce
441
491
  );
442
492
  } else if (props.treeType) {
443
- virtualTree?.setCheckedKeys(
493
+ hy.virtualTree?.setCheckedKeys(
444
494
  dataList.map((v) => v.id),
445
495
  true,
446
496
  isForce
447
497
  );
448
498
  } else if (!props.treeType && props.treeProps) {
449
- console.log(
450
- "\u9009\u4E2D\u56DE\u8C03",
451
- dataList.map((v) => v[`${props.treeProps.value}`])
452
- );
453
- virtualTree?.setCheckedKeys(
499
+ hy.virtualTree?.setCheckedKeys(
454
500
  dataList.map((v) => v[`${props.treeProps.value}`]),
455
501
  false,
456
502
  isForce
457
503
  );
458
504
  }
505
+ hy.updateNoTreeSelData(dataList);
459
506
  if (props.isBackDefaultSelected) {
460
507
  setTimeout(() => {
461
- const deviceList = virtualTree?.getCheckedBusinessNodes(true) || [];
462
- emits("on-selectedDataList", deviceList);
508
+ let deviceList = [];
509
+ if (props.treeType) {
510
+ deviceList = hy.virtualTree?.getCheckedBusinessNodes(true) || [];
511
+ } else {
512
+ deviceList = hy.virtualTree?.getCheckedNodes(true) || [];
513
+ }
514
+ emits("on-selectedDataList", hy.mergeNoTreeSelData(deviceList));
463
515
  });
464
516
  }
465
517
  }
466
- function setChecked(data, type) {
518
+ function setChecked(data, type = true) {
467
519
  if (props.treeType === "device") {
468
- virtualTree?.setChecked(data.channelId || data.deviceId, type, true);
520
+ hy.virtualTree?.setChecked(data.channelId || data.deviceId, type, true);
469
521
  } else if (props.treeType) {
470
- virtualTree?.setChecked(data.id, type, true);
522
+ hy.virtualTree?.setChecked(data.id, type, true);
471
523
  } else if (!props.treeType && props.treeProps) {
472
- virtualTree?.setChecked(data[`${props.treeProps.value}`], type, true);
524
+ hy.virtualTree?.setChecked(data[`${props.treeProps.value}`], type, false);
525
+ }
526
+ if (!type) {
527
+ hy.deleteNoTreeSelData(data);
473
528
  }
474
529
  }
475
530
  function setSelectedOrg(deviceList) {
476
531
  for (let i = 0; i < deviceList.length; i++) {
477
532
  if (props.defaultSelectedOrgID === deviceList[i].id) {
478
533
  if (deviceList[i].deviceList?.length) {
479
- setCheckedKeys(deviceList[i].deviceList);
534
+ hy.setCheckedKeys(deviceList[i].deviceList);
480
535
  }
481
536
  return true;
482
537
  }
483
538
  if (deviceList[i].children?.length) {
484
- const org = setSelectedOrg(deviceList[i].children);
539
+ const org = hy.setSelectedOrg(deviceList[i].children);
485
540
  if (org) return true;
486
541
  }
487
542
  }
488
543
  }
489
544
  function getSelectedDataList(leafOnly = false) {
490
545
  if (props.treeType) {
491
- return virtualTree?.getCheckedBusinessNodes(leafOnly) || [];
546
+ return hy.mergeNoTreeSelData(
547
+ hy.virtualTree?.getCheckedBusinessNodes(leafOnly) || []
548
+ );
492
549
  }
493
- return virtualTree?.getCheckedNodes(leafOnly) || [];
550
+ return hy.mergeNoTreeSelData(
551
+ hy.virtualTree?.getCheckedNodes(leafOnly) || []
552
+ );
494
553
  }
495
554
  function setFilterListType(type) {
496
555
  if (props.selectFilterList?.length) {
@@ -552,7 +611,7 @@ const useAppTreeWrapper = (hy) => {
552
611
  }
553
612
  }
554
613
  function getNode(id) {
555
- return virtualTree.getNode(id);
614
+ return hy.virtualTree.getNode(id);
556
615
  }
557
616
  return {
558
617
  filterValue,
@@ -560,6 +619,7 @@ const useAppTreeWrapper = (hy) => {
560
619
  permissionIdList,
561
620
  disableSelectionMap,
562
621
  addDeviceDom,
622
+ setDisAbleSelectionMap,
563
623
  getData,
564
624
  getFilterValue,
565
625
  refreshData,
@@ -567,6 +627,11 @@ const useAppTreeWrapper = (hy) => {
567
627
  setCheckedKeys,
568
628
  setChecked,
569
629
  setFilterListType,
630
+ setSelectedOrg,
631
+ setUserSlot,
632
+ setSlot,
633
+ setRenderStatus,
634
+ setEmpty,
570
635
  getInputPlaceholder,
571
636
  onChange,
572
637
  selectFilterList,
@@ -574,7 +639,14 @@ const useAppTreeWrapper = (hy) => {
574
639
  selectedDataList,
575
640
  getSelectedDataList,
576
641
  loading,
577
- getNode
642
+ getNode,
643
+ noTreeSelData,
644
+ updateNoTreeSelData,
645
+ mergeNoTreeSelData,
646
+ getSelectedDataKey,
647
+ deleteNoTreeSelData,
648
+ setDeviceStatus,
649
+ setGroupRenderItem
578
650
  };
579
651
  };
580
652
  function filterNodeMethod(data, value, { selectFilterType, treeFilterParam = [], treeType }) {
@@ -18,9 +18,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
18
18
  /* 禁止选择 */
19
19
  disableSelection: {
20
20
  type: Array,
21
- default: () => {
22
- return [];
23
- }
21
+ default: () => []
24
22
  },
25
23
  // 是否开启按照设备在线和离线状态排序,仅支持 device 和 groupDevice 业务类型
26
24
  deviceOrderSort: {
@@ -30,37 +28,27 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
30
28
  // 当前群组
31
29
  orgGroupId: {
32
30
  type: [Number, String],
33
- default: () => {
34
- return null;
35
- }
31
+ default: null
36
32
  },
37
33
  // 设置勤务状态
38
34
  getDutyRoster: {
39
35
  type: Boolean,
40
- default: () => {
41
- return false;
42
- }
36
+ default: false
43
37
  },
44
38
  // 仅展示在线数据
45
39
  showOnlineOnly: {
46
40
  type: Boolean,
47
- default: () => {
48
- return false;
49
- }
41
+ default: false
50
42
  },
51
43
  /* 是否开启多选框 */
52
44
  showCheckbox: {
53
45
  type: Boolean,
54
- default: () => {
55
- return true;
56
- }
46
+ default: true
57
47
  },
58
48
  /* 是否开启单选框 */
59
49
  showSinglebox: {
60
50
  type: Boolean,
61
- default: () => {
62
- return false;
63
- }
51
+ default: false
64
52
  },
65
53
  // 是否清除无数据的部门
66
54
  clearEmptyBusiness: {
@@ -75,28 +63,22 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
75
63
  // 树形类型
76
64
  treeType: {
77
65
  type: String,
78
- default: () => {
79
- return treeTypeConfig.device;
80
- }
66
+ default: treeTypeConfig.device
81
67
  },
82
68
  // 树形 props 类型 (treeType null时生效)
83
69
  treeProps: {
84
70
  type: Object,
85
- default: () => {
86
- return {};
87
- }
71
+ default: () => ({})
88
72
  },
89
73
  // 树形 过滤参数 类型 (treeType null时生效)
90
74
  treeFilterParam: {
91
75
  type: Array,
92
- default: () => {
93
- return [];
94
- }
76
+ default: () => []
95
77
  },
96
78
  // 是否显示通道节点的选择框
97
79
  isShowChannelSelect: {
98
80
  type: Boolean,
99
- default: () => false
81
+ default: false
100
82
  },
101
83
  // 是否显示自定义空数据显示
102
84
  showCustomEmpty: {
@@ -105,9 +87,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
105
87
  },
106
88
  placeholder: {
107
89
  type: String,
108
- default: () => {
109
- return "\u8BF7\u8F93\u5165";
110
- }
90
+ default: "\u8BF7\u8F93\u5165"
111
91
  },
112
92
  // 是否返回默认选择的数据
113
93
  isBackDefaultSelected: {
@@ -117,13 +97,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
117
97
  /* 默认选中列表 */
118
98
  selectedByDefault: {
119
99
  type: Array,
120
- default: () => {
121
- return [];
122
- }
100
+ default: () => []
123
101
  },
124
102
  // 默认需要选中的部门ID
125
103
  defaultSelectedOrgID: {
126
- default: () => null
104
+ default: null
127
105
  },
128
106
  // 搜索类型
129
107
  searchType: {
@@ -184,6 +162,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
184
162
  filterMethod: {
185
163
  type: Function,
186
164
  default: null
165
+ },
166
+ // 是否显示右侧业务状态
167
+ showStatus: {
168
+ type: Boolean,
169
+ default: true
187
170
  }
188
171
  },
189
172
  emits: [
@@ -219,7 +202,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
219
202
  onChange,
220
203
  getSelectedDataList,
221
204
  loading,
222
- getNode
205
+ getNode,
206
+ setDeviceStatus
223
207
  } = useMixins(
224
208
  {
225
209
  props,
@@ -242,7 +226,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
242
226
  setChecked,
243
227
  getSelectedDataList,
244
228
  refreshData,
245
- getNode
229
+ getNode,
230
+ setDeviceStatus
246
231
  });
247
232
  return (_ctx, _cache) => {
248
233
  const _directive_loading = resolveDirective("loading");
@@ -26,6 +26,7 @@ export { HyBatchUploadDialog } from './hyBatchUploadDialog/index.mjs';
26
26
  export { HyMap } from './hyMap/index.mjs';
27
27
  export { HyRadioGroup } from './hyRadioGroup/index.mjs';
28
28
  export { ElLoading, ElLoading as HyLoading } from './hyLoading/index.mjs';
29
+ export { HyTour } from './hyTour/index.mjs';
29
30
  export { resetAppFormValue, useAppForm } from './hyForm/js/useAppForm.mjs';
30
31
  export { resetAppSearchValue, useAppSearch } from './hySearch/js/useAppSearch.mjs';
31
32
  export { useAppTable } from './hyTable/js/useAppTable.mjs';
package/es/index.mjs CHANGED
@@ -8,6 +8,7 @@ export { ElInput, HyInput, HyInputSearch } from './components/hyInput/index.mjs'
8
8
  export { ElLoading, ElLoading as HyLoading } from './components/hyLoading/index.mjs';
9
9
  export { ElTimePicker, HyTimePicker } from './components/hyTimePicker/index.mjs';
10
10
  export { ElTooltip, HyTooltip } from './components/hyTooltip/index.mjs';
11
+ export { HyAcquisitionStationTree } from './bussiness/hyAcquisitionStationTree/index.mjs';
11
12
  export { HyAddDepartmentType } from './bussiness/hyAddDepartmentType/index.mjs';
12
13
  export { HyAudioPlayer } from './components/hyAudioPlayer/index.mjs';
13
14
  export { HyBatchTableForm, HyTableForm } from './components/hyTableForm/index.mjs';
@@ -16,6 +17,7 @@ export { HyButton } from './components/hyButton/index.mjs';
16
17
  export { HyConfigProvider } from './components/hyConfigProvider/index.mjs';
17
18
  export { HyConfirmDialog } from './components/hyConfirmDialog/index.mjs';
18
19
  export { HyCutter } from './components/hyCutter/index.mjs';
20
+ export { HyDeviceTree } from './bussiness/hyDeviceTree/index.mjs';
19
21
  export { HyDialog } from './components/hyDialog/index.mjs';
20
22
  export { HyForm } from './components/hyForm/index.mjs';
21
23
  export { HyIcon } from './components/hyIcon/index.mjs';
@@ -26,12 +28,16 @@ export { HyMenu } from './components/hyMenu/index.mjs';
26
28
  export { HyNoPermissions } from './components/hyNoPermissions/index.mjs';
27
29
  export { HyNoPermissionsMap } from './components/hyNoPermissionsMap/index.mjs';
28
30
  export { HyOrgCascader } from './components/hyOrgCascader/index.mjs';
31
+ export { HyOrgGroupTree } from './bussiness/hyOrgGroupTree/index.mjs';
32
+ export { HyPlanGroupDeviceTree } from './bussiness/hyPlanGroupDeviceTree/index.mjs';
29
33
  export { HyRadioGroup } from './components/hyRadioGroup/index.mjs';
30
34
  export { HySearch } from './components/hySearch/index.mjs';
31
35
  export { HyTable } from './components/hyTable/index.mjs';
32
36
  export { HyTableActionButton } from './components/hyTableActionButton/index.mjs';
37
+ export { HyTour } from './components/hyTour/index.mjs';
33
38
  export { HyTree } from './components/hyTree/index.mjs';
34
39
  export { HyUserAvatar } from './components/hyUserAvatar/index.mjs';
40
+ export { HyUserTree } from './bussiness/hyUserTree/index.mjs';
35
41
  export { HyVideoPlayer } from './components/hyVideoPlayer/index.mjs';
36
42
  export { InitMap, setMapServer, setPoiServer } from './utils/map/index.mjs';
37
43
  export { PERMISSION } from './utils/permission.mjs';
@@ -0,0 +1,10 @@
1
+ export default {
2
+ id: 'hy-icon-ops-linear-arrow',
3
+ symbol: `<symbol id="hy-icon-ops-linear-arrow" viewBox="0 0 6 6">
4
+ <g id="hy-icon-ops-linear-arrow-部门管理" stroke="none" stroke-width="1" fill-rule="evenodd">
5
+ <g id="hy-icon-ops-linear-arrow-缩小化-组件说明-清除" transform="translate(-524, -155)" fill-rule="nonzero">
6
+ <path d="M527.5474,155.206715 C527.421954,155.075391 527.249559,155.000932 527.069246,155.000193 C526.890413,154.995823 526.717619,155.065901 526.591092,155.19411 L524.200321,157.582204 C523.936243,157.845664 523.932818,158.276291 524.19267,158.544035 C524.452522,158.811779 524.877251,158.815252 525.141328,158.551792 L526.384529,157.302963 L526.384529,160.321289 C526.384529,160.696131 526.684237,161 527.053945,161 C527.423653,161 527.723361,160.696131 527.723361,160.321289 L527.723361,157.358229 L528.848936,158.539187 C529.015151,158.7136 529.260514,158.784857 529.492599,158.726117 C529.724684,158.667378 529.908231,158.487565 529.974101,158.254413 C530.03997,158.021261 529.978154,157.770191 529.811938,157.595778 L527.5474,155.206715 Z" id="hy-icon-ops-linear-arrow-Arrow"></path>
7
+ </g>
8
+ </g>
9
+ </symbol>`,
10
+ };
@@ -1002,11 +1002,32 @@
1002
1002
  }
1003
1003
  }
1004
1004
 
1005
+ .hy-el-notification {
1006
+ --hy-el-notification-title-color: rgba(var(--hy-main), 1);
1007
+ --hy-el-notification-content-color: rgba(var(--hy-main), 1);
1008
+ --hy-el-notification-close-color: rgba(var(--hy-main), 1);
1009
+ background: rgba(var(--hy-background-2), 1);
1010
+ }
1005
1011
 
1006
- // 指引
1007
- .hy-el-tour__content{
1008
- .hy-el-tour__body{
1012
+ .hy-el-tour {
1013
+ .hy-el-tour__hollow {
1014
+ fill: rgba(0, 0, 0, 0.9) !important;
1015
+ }
1016
+ .hy-el-tour__content {
1017
+ border: 1px solid rgba(var(--hy-theme), 1);
1018
+ }
1019
+ .hy-el-tour__arrow {
1020
+ border: 1px solid rgba(var(--hy-theme), 1);
1021
+ }
1022
+ .hy-el-tour__title {
1023
+ color: rgba(var(--hy-main), 1);
1024
+ font-weight: bold;
1025
+ }
1026
+ .hy-el-tour__body {
1009
1027
  color: rgba(var(--hy-main), 1);
1010
1028
  }
1029
+ .hy-el-tour__footer {
1030
+ display: none;
1031
+ }
1011
1032
  }
1012
1033
 
@@ -3,7 +3,6 @@
3
3
  * {
4
4
  margin: 0;
5
5
  padding: 0;
6
- box-sizing: border-box;
7
6
  }
8
7
  html,
9
8
  body,
@@ -54,7 +54,6 @@
54
54
  *,
55
55
  ::before,
56
56
  ::after {
57
- box-sizing: border-box;
58
57
  /* 1 */
59
58
  border-width: 0;
60
59
  /* 2 */