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
@@ -0,0 +1,126 @@
1
+ import { useTemplateRef, ref, onMounted, nextTick, onUnmounted } from 'vue';
2
+ import { orgListWithDev3Api } from '../../../api/organization.mjs';
3
+
4
+ function useUserTree(hy) {
5
+ const emits = hy.emits;
6
+ const props = hy.props;
7
+ const hyTreeRef = useTemplateRef("hyTreeRef");
8
+ const containerRef = useTemplateRef("containerRef");
9
+ const treeHeight = ref(400);
10
+ let resizeObserver;
11
+ function updateTreeHeight() {
12
+ const height = hy.containerRef.value?.getBoundingClientRect().height;
13
+ if (height > 0 && height - 12 !== hy.treeHeight.value) {
14
+ hy.treeHeight.value = Math.round(height) - 12;
15
+ }
16
+ }
17
+ async function setData() {
18
+ if (props.type === "custom") {
19
+ emits("onRefreshData");
20
+ return;
21
+ }
22
+ const data = await orgListWithDev3Api({
23
+ showDevice: false,
24
+ showGroup: false,
25
+ ...props.requestParams
26
+ });
27
+ hy.hyTreeRef.value.getData(data).then(() => {
28
+ emits("on-load");
29
+ });
30
+ }
31
+ function getData(data) {
32
+ return new Promise((resolve) => {
33
+ hy.hyTreeRef.value.getData(data).then(() => {
34
+ emits("on-load");
35
+ resolve(200);
36
+ });
37
+ });
38
+ }
39
+ onMounted(() => {
40
+ if (props.type !== "custom") {
41
+ hy.setData();
42
+ }
43
+ nextTick(() => {
44
+ hy.updateTreeHeight();
45
+ if (typeof ResizeObserver === "function" && hy.containerRef.value) {
46
+ hy.resizeObserver = new ResizeObserver(hy.updateTreeHeight);
47
+ hy.resizeObserver.observe(hy.containerRef.value);
48
+ } else if (typeof window !== "undefined") {
49
+ window.addEventListener("resize", hy.updateTreeHeight);
50
+ }
51
+ });
52
+ });
53
+ onUnmounted(() => {
54
+ hy.resizeObserver?.disconnect();
55
+ if (typeof window !== "undefined") {
56
+ window.removeEventListener("resize", hy.updateTreeHeight);
57
+ }
58
+ });
59
+ function onClickDelete(data) {
60
+ emits("on-click-delete", data);
61
+ }
62
+ function onClick(data) {
63
+ emits("on-click", data);
64
+ }
65
+ function onCheckTree(list, checkObj) {
66
+ emits("on-check-tree", list, checkObj);
67
+ }
68
+ function onDepartmentClick(data) {
69
+ emits("on-department-click", data);
70
+ }
71
+ function onClickDevice(data) {
72
+ emits("on-click-device", data);
73
+ }
74
+ function onContextmenu(data) {
75
+ emits("on-contextmenu", data);
76
+ }
77
+ function onDblclick(list) {
78
+ emits("on-dblclick", list);
79
+ }
80
+ function onSelectedDataList(list) {
81
+ emits("on-selectedDataList", list);
82
+ }
83
+ function singleRemovalFn(row, isForce = false) {
84
+ hy.hyTreeRef.value.singleRemovalFn(row, isForce);
85
+ }
86
+ function setCheckedKeys(dataList, isForce = false) {
87
+ hy.hyTreeRef.value.setCheckedKeys(dataList, isForce);
88
+ }
89
+ function setChecked(data, type = true) {
90
+ hy.hyTreeRef.value.setChecked(data, type);
91
+ }
92
+ function getSelectedDataList(leafOnly = false) {
93
+ return hy.hyTreeRef.value.getSelectedDataList(leafOnly);
94
+ }
95
+ function refreshData() {
96
+ hy.hyTreeRef.value.refreshData();
97
+ }
98
+ function getNode(id) {
99
+ return hy.hyTreeRef.value.getNode(id);
100
+ }
101
+ return {
102
+ hyTreeRef,
103
+ containerRef,
104
+ treeHeight,
105
+ resizeObserver,
106
+ updateTreeHeight,
107
+ setData,
108
+ getData,
109
+ onClickDelete,
110
+ onClick,
111
+ onCheckTree,
112
+ onDepartmentClick,
113
+ onClickDevice,
114
+ onContextmenu,
115
+ onDblclick,
116
+ onSelectedDataList,
117
+ singleRemovalFn,
118
+ setCheckedKeys,
119
+ setChecked,
120
+ getSelectedDataList,
121
+ refreshData,
122
+ getNode
123
+ };
124
+ }
125
+
126
+ export { useUserTree };
File without changes
@@ -0,0 +1,239 @@
1
+ import { defineComponent, useSlots, openBlock, createElementBlock, createCommentVNode, createVNode, unref, mergeProps, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
2
+ import '../../components/index.mjs';
3
+ import '../../hooks/index.mjs';
4
+ import { useUserTree } from './js/index.mjs';
5
+ import { useMixins } from '../../hooks/useMixins.mjs';
6
+ import { HyTree } from '../../components/hyTree/index.mjs';
7
+
8
+ import "./style/userTree.scss";
9
+
10
+ const __default__ = defineComponent({
11
+ name: "HyUserTree"
12
+ });
13
+ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
14
+ props: {
15
+ // 数据获取类型 custom 自定义数据
16
+ type: {
17
+ type: String,
18
+ default: "default"
19
+ },
20
+ // 请求的额外参数
21
+ requestParams: {
22
+ type: Object,
23
+ default: () => ({})
24
+ },
25
+ /* 禁止选择 */
26
+ disableSelection: {
27
+ type: Array,
28
+ default: () => {
29
+ return [];
30
+ }
31
+ },
32
+ // 设置勤务状态
33
+ getDutyRoster: {
34
+ type: Boolean,
35
+ default: () => {
36
+ return false;
37
+ }
38
+ },
39
+ // 仅展示在线数据
40
+ showOnlineOnly: {
41
+ type: Boolean,
42
+ default: () => {
43
+ return false;
44
+ }
45
+ },
46
+ /* 是否开启多选框 */
47
+ showCheckbox: {
48
+ type: Boolean,
49
+ default: true
50
+ },
51
+ /* 是否开启单选框 */
52
+ showSinglebox: {
53
+ type: Boolean,
54
+ default: false
55
+ },
56
+ // 是否清除无数据的部门
57
+ clearEmptyBusiness: {
58
+ type: Boolean,
59
+ default: false
60
+ },
61
+ // 是否显示自定义空数据显示
62
+ showCustomEmpty: {
63
+ type: Boolean,
64
+ default: false
65
+ },
66
+ placeholder: {
67
+ type: String,
68
+ default: "\u8BF7\u8F93\u5165"
69
+ },
70
+ // 是否返回默认选择的数据
71
+ isBackDefaultSelected: {
72
+ type: Boolean,
73
+ default: false
74
+ },
75
+ /* 默认选中列表 */
76
+ selectedByDefault: {
77
+ type: Array,
78
+ default: () => {
79
+ return [];
80
+ }
81
+ },
82
+ // 默认需要选中的部门ID
83
+ defaultSelectedOrgID: {
84
+ default: null
85
+ },
86
+ // 搜索类型
87
+ searchType: {
88
+ type: Number,
89
+ default: 1
90
+ },
91
+ // 筛选列表
92
+ selectFilterList: {
93
+ type: Array,
94
+ default: () => []
95
+ },
96
+ // 是否高亮选中节点
97
+ highlight: {
98
+ type: Boolean,
99
+ default: false
100
+ },
101
+ // 是否严格的遵循父子不互相关联
102
+ checkStrictly: {
103
+ type: Boolean,
104
+ default: false
105
+ },
106
+ // 单选时可以取消选中
107
+ cancelable: {
108
+ type: Boolean,
109
+ default: true
110
+ },
111
+ // 是否显示多选框或单选框
112
+ showSelectBox: {
113
+ type: Boolean,
114
+ default: true
115
+ },
116
+ // 是否在点击节点的时候展开或者收缩节点
117
+ expandOnClickNode: {
118
+ type: Boolean,
119
+ default: true
120
+ },
121
+ // 是否在点击节点的时候选中节点
122
+ checkOnClickNode: {
123
+ type: Boolean,
124
+ default: false
125
+ },
126
+ // 点击叶节点(最后一个子节点)时是否检查或取消节点
127
+ checkOnClickLeaf: {
128
+ type: Boolean,
129
+ default: true
130
+ },
131
+ // 双击父节点会触发选中功能
132
+ checkOnDblclickParentNode: {
133
+ type: Boolean,
134
+ default: true
135
+ },
136
+ // 初始化过滤数据
137
+ filterConfig: {
138
+ type: Array,
139
+ default: () => []
140
+ },
141
+ // 外部自定义过滤函数
142
+ filterMethod: {
143
+ type: Function,
144
+ default: null
145
+ }
146
+ },
147
+ emits: [
148
+ "on-load",
149
+ "onRefreshData",
150
+ "on-click-delete",
151
+ "on-click",
152
+ "on-check-tree",
153
+ "on-department-click",
154
+ "on-click-device",
155
+ "on-contextmenu",
156
+ "on-dblclick",
157
+ "on-selectedDataList"
158
+ ],
159
+ setup(__props, { expose: __expose, emit: __emit }) {
160
+ const props = __props;
161
+ const emits = __emit;
162
+ const slots = useSlots();
163
+ const {
164
+ containerRef,
165
+ hyTreeRef,
166
+ treeHeight,
167
+ setData,
168
+ getData,
169
+ onClickDelete,
170
+ onClick,
171
+ onCheckTree,
172
+ onDepartmentClick,
173
+ onClickDevice,
174
+ onContextmenu,
175
+ onDblclick,
176
+ onSelectedDataList,
177
+ singleRemovalFn,
178
+ setCheckedKeys,
179
+ setChecked,
180
+ getSelectedDataList,
181
+ refreshData,
182
+ getNode
183
+ } = useMixins({ props, emits }, [useUserTree]);
184
+ __expose({
185
+ getData,
186
+ singleRemovalFn,
187
+ setCheckedKeys,
188
+ setChecked,
189
+ getSelectedDataList,
190
+ refreshData,
191
+ getNode
192
+ });
193
+ return (_ctx, _cache) => {
194
+ return openBlock(), createElementBlock(
195
+ "div",
196
+ {
197
+ ref_key: "containerRef",
198
+ ref: containerRef,
199
+ class: "w-full h-full"
200
+ },
201
+ [
202
+ createCommentVNode(" HyUserTree \u7528\u6237\u6811\u5F62 "),
203
+ createVNode(unref(HyTree), mergeProps({
204
+ ref_key: "hyTreeRef",
205
+ ref: hyTreeRef
206
+ }, { ...props }, {
207
+ treeHeight: unref(treeHeight),
208
+ treeType: "user",
209
+ onOnRefreshData: unref(setData),
210
+ onOnClickDelete: unref(onClickDelete),
211
+ onOnClick: unref(onClick),
212
+ onOnCheckTree: unref(onCheckTree),
213
+ onOnDepartmentClick: unref(onDepartmentClick),
214
+ onOnClickDevice: unref(onClickDevice),
215
+ onOnContextmenu: unref(onContextmenu),
216
+ onOnDblclick: unref(onDblclick),
217
+ onOnSelectedDataList: unref(onSelectedDataList)
218
+ }), createSlots({
219
+ _: 2
220
+ /* DYNAMIC */
221
+ }, [
222
+ renderList(unref(slots), (_, slotName) => {
223
+ return {
224
+ name: slotName,
225
+ fn: withCtx((scope) => [
226
+ renderSlot(_ctx.$slots, slotName, normalizeProps(guardReactiveProps(scope)))
227
+ ])
228
+ };
229
+ })
230
+ ]), 1040, ["treeHeight", "onOnRefreshData", "onOnClickDelete", "onOnClick", "onOnCheckTree", "onOnDepartmentClick", "onOnClickDevice", "onOnContextmenu", "onOnDblclick", "onOnSelectedDataList"])
231
+ ],
232
+ 512
233
+ /* NEED_PATCH */
234
+ );
235
+ };
236
+ }
237
+ });
238
+
239
+ export { _sfc_main as default };
@@ -1,2 +1,7 @@
1
1
  export { HyAddDepartmentType } from './hyAddDepartmentType/index.mjs';
2
2
  export { HyMapAearchPlace } from './hyMapAearchPlace/index.mjs';
3
+ export { HyUserTree } from './hyUserTree/index.mjs';
4
+ export { HyDeviceTree } from './hyDeviceTree/index.mjs';
5
+ export { HyOrgGroupTree } from './hyOrgGroupTree/index.mjs';
6
+ export { HyPlanGroupDeviceTree } from './hyPlanGroupDeviceTree/index.mjs';
7
+ export { HyAcquisitionStationTree } from './hyAcquisitionStationTree/index.mjs';