hy-dispatch-ui-v3 0.2.64 → 0.2.66

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 (128) hide show
  1. package/dist/tailwind.css +26 -12
  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 +18 -16
  25. package/es/components/hyButton/button.vue.mjs +3 -2
  26. package/es/components/hyButton/style/button.scss +70 -0
  27. package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +1 -2
  28. package/es/components/hyForm/cpns/formItem.vue.mjs +198 -26
  29. package/es/components/hyForm/cpns/locationSelect.vue.mjs +8 -1
  30. package/es/components/hyForm/form.vue.mjs +74 -19
  31. package/es/components/hyForm/js/index.mjs +2 -1
  32. package/es/components/hyForm/js/useAppForm.mjs +2 -2
  33. package/es/components/hyIcon/style/icon.scss +1 -0
  34. package/es/components/hyNoPermissions/noPermissions.vue.mjs +1 -1
  35. package/es/components/hyNoPermissionsMap/noPermissionsMap.vue.mjs +1 -1
  36. package/es/components/hyOrgCascader/orgCascader.vue.mjs +69 -14
  37. package/es/components/hyRadioGroup/radioGroup.vue.mjs +5 -4
  38. package/es/components/hySearch/cpns/searchItem.vue.mjs +167 -11
  39. package/es/components/hySearch/js/index.mjs +2 -1
  40. package/es/components/hySearch/search.vue.mjs +60 -9
  41. package/es/components/hyTable/cpns/columnSelect.vue.mjs +21 -22
  42. package/es/components/hyTable/cpns/virtualTable.vue.mjs +10 -15
  43. package/es/components/hyTable/js/index.mjs +5 -12
  44. package/es/components/hyTable/js/search.mjs +3 -1
  45. package/es/components/hyTable/style/table.scss +13 -0
  46. package/es/components/hyTable/table.vue.mjs +21 -9
  47. package/es/components/hyTableActionButton/tableActionButton.vue.mjs +8 -10
  48. package/es/components/hyTableForm/batchTableForm.vue.mjs +13 -3
  49. package/es/components/hyTableForm/tableForm.vue.mjs +17 -11
  50. package/es/components/hyTour/index.mjs +7 -0
  51. package/es/components/hyTour/style/tour.scss +0 -0
  52. package/es/components/hyTour/tour.vue.mjs +23 -0
  53. package/es/components/hyTree/config/tree-config.mjs +5 -2
  54. package/es/components/hyTree/js/index.mjs +75 -68
  55. package/es/components/hyTree/tree.vue.mjs +19 -36
  56. package/es/components/index.mjs +1 -0
  57. package/es/index.mjs +6 -0
  58. package/es/static/hy-svg-icons/hy-icon-ops-linear-arrow.js +10 -0
  59. package/es/style/element/hy-element.scss +24 -3
  60. package/es/style/theme.scss +1 -0
  61. package/es/utils/map/hook/bigMap.mjs +9 -1
  62. package/es/utils/map/hook/gaode.mjs +9 -1
  63. package/es/utils/map/hook/leafletjs.mjs +10 -1
  64. package/es/version.mjs +1 -1
  65. package/lib/api/organization.js +47 -0
  66. package/lib/bussiness/hyAcquisitionStationTree/acquisitionStationTree.vue.js +249 -0
  67. package/lib/bussiness/hyAcquisitionStationTree/index.js +12 -0
  68. package/lib/bussiness/hyAcquisitionStationTree/js/index.js +126 -0
  69. package/lib/bussiness/hyAcquisitionStationTree/style/acquisitionStationTree.scss +0 -0
  70. package/lib/bussiness/hyDeviceTree/deviceTree.vue.js +253 -0
  71. package/lib/bussiness/hyDeviceTree/index.js +12 -0
  72. package/lib/bussiness/hyDeviceTree/js/index.js +128 -0
  73. package/lib/bussiness/hyDeviceTree/style/deviceTree.scss +0 -0
  74. package/lib/bussiness/hyOrgGroupTree/index.js +12 -0
  75. package/lib/bussiness/hyOrgGroupTree/js/index.js +126 -0
  76. package/lib/bussiness/hyOrgGroupTree/orgGroupTree.vue.js +249 -0
  77. package/lib/bussiness/hyOrgGroupTree/style/orgGroupTree.scss +0 -0
  78. package/lib/bussiness/hyPlanGroupDeviceTree/index.js +12 -0
  79. package/lib/bussiness/hyPlanGroupDeviceTree/js/index.js +126 -0
  80. package/lib/bussiness/hyPlanGroupDeviceTree/planGroupDeviceTree.vue.js +249 -0
  81. package/lib/bussiness/hyPlanGroupDeviceTree/style/planGroupDeviceTree.scss +0 -0
  82. package/lib/bussiness/hyUserTree/index.js +12 -0
  83. package/lib/bussiness/hyUserTree/js/index.js +128 -0
  84. package/lib/bussiness/hyUserTree/style/userTree.scss +0 -0
  85. package/lib/bussiness/hyUserTree/userTree.vue.js +243 -0
  86. package/lib/bussiness/index.js +14 -4
  87. package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +18 -16
  88. package/lib/components/hyButton/button.vue.js +3 -2
  89. package/lib/components/hyButton/style/button.scss +70 -0
  90. package/lib/components/hyConfirmDialog/confirmDialog.vue.js +0 -1
  91. package/lib/components/hyForm/cpns/formItem.vue.js +195 -23
  92. package/lib/components/hyForm/cpns/locationSelect.vue.js +8 -1
  93. package/lib/components/hyForm/form.vue.js +72 -17
  94. package/lib/components/hyForm/js/index.js +2 -0
  95. package/lib/components/hyForm/js/useAppForm.js +2 -2
  96. package/lib/components/hyIcon/style/icon.scss +1 -0
  97. package/lib/components/hyNoPermissions/noPermissions.vue.js +1 -1
  98. package/lib/components/hyNoPermissionsMap/noPermissionsMap.vue.js +1 -1
  99. package/lib/components/hyOrgCascader/orgCascader.vue.js +67 -12
  100. package/lib/components/hyRadioGroup/radioGroup.vue.js +5 -4
  101. package/lib/components/hySearch/cpns/searchItem.vue.js +164 -8
  102. package/lib/components/hySearch/js/index.js +2 -0
  103. package/lib/components/hySearch/search.vue.js +58 -7
  104. package/lib/components/hyTable/cpns/columnSelect.vue.js +20 -21
  105. package/lib/components/hyTable/cpns/virtualTable.vue.js +27 -32
  106. package/lib/components/hyTable/js/index.js +5 -12
  107. package/lib/components/hyTable/js/search.js +3 -1
  108. package/lib/components/hyTable/style/table.scss +13 -0
  109. package/lib/components/hyTable/table.vue.js +20 -8
  110. package/lib/components/hyTableActionButton/tableActionButton.vue.js +7 -9
  111. package/lib/components/hyTableForm/batchTableForm.vue.js +13 -3
  112. package/lib/components/hyTableForm/tableForm.vue.js +18 -12
  113. package/lib/components/hyTour/index.js +12 -0
  114. package/lib/components/hyTour/style/tour.scss +0 -0
  115. package/lib/components/hyTour/tour.vue.js +27 -0
  116. package/lib/components/hyTree/config/tree-config.js +5 -2
  117. package/lib/components/hyTree/js/index.js +75 -68
  118. package/lib/components/hyTree/tree.vue.js +19 -36
  119. package/lib/components/index.js +8 -6
  120. package/lib/index.js +67 -55
  121. package/lib/static/hy-svg-icons/hy-icon-ops-linear-arrow.js +10 -0
  122. package/lib/style/element/hy-element.scss +24 -3
  123. package/lib/style/theme.scss +1 -0
  124. package/lib/utils/map/hook/bigMap.js +9 -1
  125. package/lib/utils/map/hook/gaode.js +9 -1
  126. package/lib/utils/map/hook/leafletjs.js +10 -1
  127. package/lib/version.js +1 -1
  128. package/package.json +1 -1
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ require('../hooks/index.js');
4
+ var vue = require('vue');
5
+ var useLocale = require('../hooks/useLocale.js');
6
+ var useApi = require('../hooks/useApi.js');
7
+
8
+ function orgListWithDev3Api(params) {
9
+ return new Promise((resolve, reject) => {
10
+ const { t } = useLocale.useLocale();
11
+ const { api } = useApi.useApi();
12
+ const http = vue.unref(api);
13
+ http.post("organization/orgTree", params).then((res) => {
14
+ resolve(res.data);
15
+ }).catch((res) => {
16
+ reject(new Error(t("interfaceError")));
17
+ });
18
+ });
19
+ }
20
+ function orgTreeWithGroupAndDeviceApi(params) {
21
+ return new Promise((resolve, reject) => {
22
+ const { t } = useLocale.useLocale();
23
+ const { api } = useApi.useApi();
24
+ const http = vue.unref(api);
25
+ http.post("organization/orgTreeWithGroupAndDevice", params).then((res) => {
26
+ return resolve(res.data);
27
+ }).catch((res) => {
28
+ reject(new Error(t("interfaceError")));
29
+ });
30
+ });
31
+ }
32
+ function orgTreeWithPlanGroupAndDeviceApi(params) {
33
+ return new Promise((resolve, reject) => {
34
+ const { t } = useLocale.useLocale();
35
+ const { api } = useApi.useApi();
36
+ const http = vue.unref(api);
37
+ http.post("organization/orgTreeWithPlanGroupAndDevice", params).then((res) => {
38
+ return resolve(res.data);
39
+ }).catch((res) => {
40
+ reject(new Error(t("interfaceError")));
41
+ });
42
+ });
43
+ }
44
+
45
+ exports.orgListWithDev3Api = orgListWithDev3Api;
46
+ exports.orgTreeWithGroupAndDeviceApi = orgTreeWithGroupAndDeviceApi;
47
+ exports.orgTreeWithPlanGroupAndDeviceApi = orgTreeWithPlanGroupAndDeviceApi;
@@ -0,0 +1,249 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var vue = require('vue');
6
+ require('../../components/index.js');
7
+ require('../../hooks/index.js');
8
+ var index = require('./js/index.js');
9
+ var useMixins = require('../../hooks/useMixins.js');
10
+ var index$1 = require('../../components/hyTree/index.js');
11
+
12
+ import "./style/acquisitionStationTree.scss";
13
+
14
+ const __default__ = vue.defineComponent({
15
+ name: "HyAcquisitionStationTree"
16
+ });
17
+ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
18
+ props: {
19
+ // 数据获取类型 custom 自定义数据
20
+ type: {
21
+ type: String,
22
+ default: "default"
23
+ },
24
+ // 请求的额外参数
25
+ requestParams: {
26
+ type: Object,
27
+ default: () => ({})
28
+ },
29
+ /* 禁止选择 */
30
+ disableSelection: {
31
+ type: Array,
32
+ default: () => {
33
+ return [];
34
+ }
35
+ },
36
+ // 是否开启按照设备在线和离线状态排序,仅支持 device 和 groupDevice 业务类型
37
+ deviceOrderSort: {
38
+ type: Boolean,
39
+ default: true
40
+ },
41
+ // 设置勤务状态
42
+ getDutyRoster: {
43
+ type: Boolean,
44
+ default: false
45
+ },
46
+ // 仅展示在线数据
47
+ showOnlineOnly: {
48
+ type: Boolean,
49
+ default: false
50
+ },
51
+ /* 是否开启多选框 */
52
+ showCheckbox: {
53
+ type: Boolean,
54
+ default: true
55
+ },
56
+ /* 是否开启单选框 */
57
+ showSinglebox: {
58
+ type: Boolean,
59
+ default: false
60
+ },
61
+ // 是否清除无数据的部门
62
+ clearEmptyBusiness: {
63
+ type: Boolean,
64
+ default: false
65
+ },
66
+ // 是否显示通道节点的选择框
67
+ isShowChannelSelect: {
68
+ type: Boolean,
69
+ default: false
70
+ },
71
+ // 是否显示自定义空数据显示
72
+ showCustomEmpty: {
73
+ type: Boolean,
74
+ default: false
75
+ },
76
+ placeholder: {
77
+ type: String,
78
+ default: "\u8BF7\u8F93\u5165"
79
+ },
80
+ // 是否返回默认选择的数据
81
+ isBackDefaultSelected: {
82
+ type: Boolean,
83
+ default: false
84
+ },
85
+ /* 默认选中列表 */
86
+ selectedByDefault: {
87
+ type: Array,
88
+ default: () => {
89
+ return [];
90
+ }
91
+ },
92
+ // 默认需要选中的部门ID
93
+ defaultSelectedOrgID: {
94
+ default: null
95
+ },
96
+ // 搜索类型
97
+ searchType: {
98
+ type: Number,
99
+ default: 1
100
+ },
101
+ // 筛选列表
102
+ selectFilterList: {
103
+ type: Array,
104
+ default: () => []
105
+ },
106
+ // 是否高亮选中节点
107
+ highlight: {
108
+ type: Boolean,
109
+ default: false
110
+ },
111
+ // 是否严格的遵循父子不互相关联
112
+ checkStrictly: {
113
+ type: Boolean,
114
+ default: false
115
+ },
116
+ // 单选时可以取消选中
117
+ cancelable: {
118
+ type: Boolean,
119
+ default: true
120
+ },
121
+ // 是否显示多选框或单选框
122
+ showSelectBox: {
123
+ type: Boolean,
124
+ default: true
125
+ },
126
+ // 是否在点击节点的时候展开或者收缩节点
127
+ expandOnClickNode: {
128
+ type: Boolean,
129
+ default: true
130
+ },
131
+ // 是否在点击节点的时候选中节点
132
+ checkOnClickNode: {
133
+ type: Boolean,
134
+ default: false
135
+ },
136
+ // 点击叶节点(最后一个子节点)时是否检查或取消节点
137
+ checkOnClickLeaf: {
138
+ type: Boolean,
139
+ default: true
140
+ },
141
+ // 双击父节点会触发选中功能
142
+ checkOnDblclickParentNode: {
143
+ type: Boolean,
144
+ default: true
145
+ },
146
+ // 初始化过滤数据
147
+ filterConfig: {
148
+ type: Array,
149
+ default: () => []
150
+ },
151
+ // 外部自定义过滤函数
152
+ filterMethod: {
153
+ type: Function,
154
+ default: null
155
+ }
156
+ },
157
+ emits: [
158
+ "on-load",
159
+ "onRefreshData",
160
+ "on-click-delete",
161
+ "on-click",
162
+ "on-check-tree",
163
+ "on-department-click",
164
+ "on-click-device",
165
+ "on-contextmenu",
166
+ "on-dblclick",
167
+ "on-selectedDataList"
168
+ ],
169
+ setup(__props, { expose: __expose, emit: __emit }) {
170
+ const props = __props;
171
+ const emits = __emit;
172
+ const slots = vue.useSlots();
173
+ const {
174
+ containerRef,
175
+ hyTreeRef,
176
+ treeHeight,
177
+ setData,
178
+ getData,
179
+ onClickDelete,
180
+ onClick,
181
+ onCheckTree,
182
+ onDepartmentClick,
183
+ onClickDevice,
184
+ onContextmenu,
185
+ onDblclick,
186
+ onSelectedDataList,
187
+ singleRemovalFn,
188
+ setCheckedKeys,
189
+ setChecked,
190
+ getSelectedDataList,
191
+ refreshData,
192
+ getNode
193
+ } = useMixins.useMixins({ props, emits }, [index.useAcquisitionStationTree]);
194
+ __expose({
195
+ getData,
196
+ singleRemovalFn,
197
+ setCheckedKeys,
198
+ setChecked,
199
+ getSelectedDataList,
200
+ refreshData,
201
+ getNode
202
+ });
203
+ return (_ctx, _cache) => {
204
+ return vue.openBlock(), vue.createElementBlock(
205
+ "div",
206
+ {
207
+ ref_key: "containerRef",
208
+ ref: containerRef,
209
+ class: "w-full h-full"
210
+ },
211
+ [
212
+ vue.createCommentVNode(" HyAcquisitionStationTree \u91C7\u96C6\u7AD9\u6811\u5F62 "),
213
+ vue.createVNode(vue.unref(index$1.HyTree), vue.mergeProps({
214
+ ref_key: "hyTreeRef",
215
+ ref: hyTreeRef
216
+ }, { ...props }, {
217
+ treeType: "cs",
218
+ treeHeight: vue.unref(treeHeight),
219
+ onOnRefreshData: vue.unref(setData),
220
+ onOnClickDelete: vue.unref(onClickDelete),
221
+ onOnClick: vue.unref(onClick),
222
+ onOnCheckTree: vue.unref(onCheckTree),
223
+ onOnDepartmentClick: vue.unref(onDepartmentClick),
224
+ onOnClickDevice: vue.unref(onClickDevice),
225
+ onOnContextmenu: vue.unref(onContextmenu),
226
+ onOnDblclick: vue.unref(onDblclick),
227
+ onOnSelectedDataList: vue.unref(onSelectedDataList)
228
+ }), vue.createSlots({
229
+ _: 2
230
+ /* DYNAMIC */
231
+ }, [
232
+ vue.renderList(vue.unref(slots), (_, slotName) => {
233
+ return {
234
+ name: slotName,
235
+ fn: vue.withCtx((scope) => [
236
+ vue.renderSlot(_ctx.$slots, slotName, vue.normalizeProps(vue.guardReactiveProps(scope)))
237
+ ])
238
+ };
239
+ })
240
+ ]), 1040, ["treeHeight", "onOnRefreshData", "onOnClickDelete", "onOnClick", "onOnCheckTree", "onOnDepartmentClick", "onOnClickDevice", "onOnContextmenu", "onOnDblclick", "onOnSelectedDataList"])
241
+ ],
242
+ 512
243
+ /* NEED_PATCH */
244
+ );
245
+ };
246
+ }
247
+ });
248
+
249
+ exports.default = _sfc_main;
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var acquisitionStationTree = require('./acquisitionStationTree.vue.js');
6
+ require('../../utils/index.js');
7
+ var handler = require('../../utils/handler.js');
8
+
9
+ const HyAcquisitionStationTree = handler.withInstall(acquisitionStationTree.default);
10
+
11
+ exports.HyAcquisitionStationTree = HyAcquisitionStationTree;
12
+ exports.default = HyAcquisitionStationTree;
@@ -0,0 +1,126 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+ var organization = require('../../../api/organization.js');
5
+
6
+ function useAcquisitionStationTree(hy) {
7
+ const emits = hy.emits;
8
+ const props = hy.props;
9
+ const hyTreeRef = vue.useTemplateRef("hyTreeRef");
10
+ const containerRef = vue.useTemplateRef("containerRef");
11
+ const treeHeight = vue.ref(400);
12
+ let resizeObserver;
13
+ function updateTreeHeight() {
14
+ const height = hy.containerRef.value?.getBoundingClientRect().height;
15
+ if (height > 0 && height - 12 !== hy.treeHeight.value) {
16
+ hy.treeHeight.value = Math.round(height) - 12;
17
+ }
18
+ }
19
+ async function setData() {
20
+ if (props.type === "custom") {
21
+ emits("onRefreshData");
22
+ return;
23
+ }
24
+ const data = await organization.orgListWithDev3Api({
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
+ vue.onMounted(() => {
40
+ if (props.type !== "custom") {
41
+ hy.setData();
42
+ }
43
+ vue.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
+ vue.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
+ exports.useAcquisitionStationTree = useAcquisitionStationTree;
@@ -0,0 +1,253 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var vue = require('vue');
6
+ require('../../components/index.js');
7
+ require('../../hooks/index.js');
8
+ var index = require('./js/index.js');
9
+ var useMixins = require('../../hooks/useMixins.js');
10
+ var index$1 = require('../../components/hyTree/index.js');
11
+
12
+ import "./style/deviceTree.scss";
13
+
14
+ const __default__ = vue.defineComponent({
15
+ name: "HyDeviceTree"
16
+ });
17
+ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
18
+ props: {
19
+ // 数据获取类型 custom 自定义数据
20
+ type: {
21
+ type: String,
22
+ default: "default"
23
+ },
24
+ // 树形类型
25
+ treeType: {
26
+ type: String,
27
+ default: "device"
28
+ },
29
+ // 请求的额外参数
30
+ requestParams: {
31
+ type: Object,
32
+ default: () => ({})
33
+ },
34
+ /* 禁止选择 */
35
+ disableSelection: {
36
+ type: Array,
37
+ default: () => {
38
+ return [];
39
+ }
40
+ },
41
+ // 是否开启按照设备在线和离线状态排序,仅支持 device 和 groupDevice 业务类型
42
+ deviceOrderSort: {
43
+ type: Boolean,
44
+ default: true
45
+ },
46
+ // 设置勤务状态
47
+ getDutyRoster: {
48
+ type: Boolean,
49
+ default: false
50
+ },
51
+ // 仅展示在线数据
52
+ showOnlineOnly: {
53
+ type: Boolean,
54
+ default: false
55
+ },
56
+ /* 是否开启多选框 */
57
+ showCheckbox: {
58
+ type: Boolean,
59
+ default: true
60
+ },
61
+ /* 是否开启单选框 */
62
+ showSinglebox: {
63
+ type: Boolean,
64
+ default: false
65
+ },
66
+ // 是否清除无数据的部门
67
+ clearEmptyBusiness: {
68
+ type: Boolean,
69
+ default: false
70
+ },
71
+ // 是否显示通道节点的选择框
72
+ isShowChannelSelect: {
73
+ type: Boolean,
74
+ default: false
75
+ },
76
+ // 是否显示自定义空数据显示
77
+ showCustomEmpty: {
78
+ type: Boolean,
79
+ default: false
80
+ },
81
+ placeholder: {
82
+ type: String,
83
+ default: "\u8BF7\u8F93\u5165"
84
+ },
85
+ // 是否返回默认选择的数据
86
+ isBackDefaultSelected: {
87
+ type: Boolean,
88
+ default: false
89
+ },
90
+ /* 默认选中列表 */
91
+ selectedByDefault: {
92
+ type: Array,
93
+ default: () => {
94
+ return [];
95
+ }
96
+ },
97
+ // 默认需要选中的部门ID
98
+ defaultSelectedOrgID: {
99
+ default: null
100
+ },
101
+ // 搜索类型
102
+ searchType: {
103
+ type: Number,
104
+ default: 1
105
+ },
106
+ // 筛选列表
107
+ selectFilterList: {
108
+ type: Array,
109
+ default: () => []
110
+ },
111
+ // 是否高亮选中节点
112
+ highlight: {
113
+ type: Boolean,
114
+ default: false
115
+ },
116
+ // 是否严格的遵循父子不互相关联
117
+ checkStrictly: {
118
+ type: Boolean,
119
+ default: false
120
+ },
121
+ // 单选时可以取消选中
122
+ cancelable: {
123
+ type: Boolean,
124
+ default: true
125
+ },
126
+ // 是否显示多选框或单选框
127
+ showSelectBox: {
128
+ type: Boolean,
129
+ default: true
130
+ },
131
+ // 是否在点击节点的时候展开或者收缩节点
132
+ expandOnClickNode: {
133
+ type: Boolean,
134
+ default: true
135
+ },
136
+ // 是否在点击节点的时候选中节点
137
+ checkOnClickNode: {
138
+ type: Boolean,
139
+ default: false
140
+ },
141
+ // 点击叶节点(最后一个子节点)时是否检查或取消节点
142
+ checkOnClickLeaf: {
143
+ type: Boolean,
144
+ default: true
145
+ },
146
+ // 双击父节点会触发选中功能
147
+ checkOnDblclickParentNode: {
148
+ type: Boolean,
149
+ default: true
150
+ },
151
+ // 初始化过滤数据
152
+ filterConfig: {
153
+ type: Array,
154
+ default: () => []
155
+ },
156
+ // 外部自定义过滤函数
157
+ filterMethod: {
158
+ type: Function,
159
+ default: null
160
+ }
161
+ },
162
+ emits: [
163
+ "on-load",
164
+ "onRefreshData",
165
+ "on-click-delete",
166
+ "on-click",
167
+ "on-check-tree",
168
+ "on-department-click",
169
+ "on-click-device",
170
+ "on-contextmenu",
171
+ "on-dblclick",
172
+ "on-selectedDataList"
173
+ ],
174
+ setup(__props, { expose: __expose, emit: __emit }) {
175
+ const props = __props;
176
+ const emits = __emit;
177
+ const slots = vue.useSlots();
178
+ const {
179
+ containerRef,
180
+ hyTreeRef,
181
+ treeHeight,
182
+ setData,
183
+ getData,
184
+ onClickDelete,
185
+ onClick,
186
+ onCheckTree,
187
+ onDepartmentClick,
188
+ onClickDevice,
189
+ onContextmenu,
190
+ onDblclick,
191
+ onSelectedDataList,
192
+ singleRemovalFn,
193
+ setCheckedKeys,
194
+ setChecked,
195
+ getSelectedDataList,
196
+ refreshData,
197
+ getNode
198
+ } = useMixins.useMixins({ props, emits }, [index.useDeviceTree]);
199
+ __expose({
200
+ getData,
201
+ singleRemovalFn,
202
+ setCheckedKeys,
203
+ setChecked,
204
+ getSelectedDataList,
205
+ refreshData,
206
+ getNode
207
+ });
208
+ return (_ctx, _cache) => {
209
+ return vue.openBlock(), vue.createElementBlock(
210
+ "div",
211
+ {
212
+ ref_key: "containerRef",
213
+ ref: containerRef,
214
+ class: "w-full h-full"
215
+ },
216
+ [
217
+ vue.createCommentVNode(" HyDeviceTree \u8BBE\u5907\u6811\u5F62 "),
218
+ vue.createVNode(vue.unref(index$1.HyTree), vue.mergeProps({
219
+ ref_key: "hyTreeRef",
220
+ ref: hyTreeRef
221
+ }, { ...props }, {
222
+ treeHeight: vue.unref(treeHeight),
223
+ onOnRefreshData: vue.unref(setData),
224
+ onOnClickDelete: vue.unref(onClickDelete),
225
+ onOnClick: vue.unref(onClick),
226
+ onOnCheckTree: vue.unref(onCheckTree),
227
+ onOnDepartmentClick: vue.unref(onDepartmentClick),
228
+ onOnClickDevice: vue.unref(onClickDevice),
229
+ onOnContextmenu: vue.unref(onContextmenu),
230
+ onOnDblclick: vue.unref(onDblclick),
231
+ onOnSelectedDataList: vue.unref(onSelectedDataList)
232
+ }), vue.createSlots({
233
+ _: 2
234
+ /* DYNAMIC */
235
+ }, [
236
+ vue.renderList(vue.unref(slots), (_, slotName) => {
237
+ return {
238
+ name: slotName,
239
+ fn: vue.withCtx((scope) => [
240
+ vue.renderSlot(_ctx.$slots, slotName, vue.normalizeProps(vue.guardReactiveProps(scope)))
241
+ ])
242
+ };
243
+ })
244
+ ]), 1040, ["treeHeight", "onOnRefreshData", "onOnClickDelete", "onOnClick", "onOnCheckTree", "onOnDepartmentClick", "onOnClickDevice", "onOnContextmenu", "onOnDblclick", "onOnSelectedDataList"])
245
+ ],
246
+ 512
247
+ /* NEED_PATCH */
248
+ );
249
+ };
250
+ }
251
+ });
252
+
253
+ exports.default = _sfc_main;
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var deviceTree = require('./deviceTree.vue.js');
6
+ require('../../utils/index.js');
7
+ var handler = require('../../utils/handler.js');
8
+
9
+ const HyDeviceTree = handler.withInstall(deviceTree.default);
10
+
11
+ exports.HyDeviceTree = HyDeviceTree;
12
+ exports.default = HyDeviceTree;