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.
- package/dist/tailwind.css +26 -12
- package/es/api/organization.mjs +43 -0
- package/es/bussiness/hyAcquisitionStationTree/acquisitionStationTree.vue.mjs +245 -0
- package/es/bussiness/hyAcquisitionStationTree/index.mjs +7 -0
- package/es/bussiness/hyAcquisitionStationTree/js/index.mjs +124 -0
- package/es/bussiness/hyAcquisitionStationTree/style/acquisitionStationTree.scss +0 -0
- package/es/bussiness/hyDeviceTree/deviceTree.vue.mjs +249 -0
- package/es/bussiness/hyDeviceTree/index.mjs +7 -0
- package/es/bussiness/hyDeviceTree/js/index.mjs +126 -0
- package/es/bussiness/hyDeviceTree/style/deviceTree.scss +0 -0
- package/es/bussiness/hyOrgGroupTree/index.mjs +7 -0
- package/es/bussiness/hyOrgGroupTree/js/index.mjs +124 -0
- package/es/bussiness/hyOrgGroupTree/orgGroupTree.vue.mjs +245 -0
- package/es/bussiness/hyOrgGroupTree/style/orgGroupTree.scss +0 -0
- package/es/bussiness/hyPlanGroupDeviceTree/index.mjs +7 -0
- package/es/bussiness/hyPlanGroupDeviceTree/js/index.mjs +124 -0
- package/es/bussiness/hyPlanGroupDeviceTree/planGroupDeviceTree.vue.mjs +245 -0
- package/es/bussiness/hyPlanGroupDeviceTree/style/planGroupDeviceTree.scss +0 -0
- package/es/bussiness/hyUserTree/index.mjs +7 -0
- package/es/bussiness/hyUserTree/js/index.mjs +126 -0
- package/es/bussiness/hyUserTree/style/userTree.scss +0 -0
- package/es/bussiness/hyUserTree/userTree.vue.mjs +239 -0
- package/es/bussiness/index.mjs +5 -0
- package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +18 -16
- package/es/components/hyButton/button.vue.mjs +3 -2
- package/es/components/hyButton/style/button.scss +70 -0
- package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +1 -2
- package/es/components/hyForm/cpns/formItem.vue.mjs +198 -26
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +8 -1
- package/es/components/hyForm/form.vue.mjs +74 -19
- package/es/components/hyForm/js/index.mjs +2 -1
- package/es/components/hyForm/js/useAppForm.mjs +2 -2
- package/es/components/hyIcon/style/icon.scss +1 -0
- package/es/components/hyNoPermissions/noPermissions.vue.mjs +1 -1
- package/es/components/hyNoPermissionsMap/noPermissionsMap.vue.mjs +1 -1
- package/es/components/hyOrgCascader/orgCascader.vue.mjs +69 -14
- package/es/components/hyRadioGroup/radioGroup.vue.mjs +5 -4
- package/es/components/hySearch/cpns/searchItem.vue.mjs +167 -11
- package/es/components/hySearch/js/index.mjs +2 -1
- package/es/components/hySearch/search.vue.mjs +60 -9
- package/es/components/hyTable/cpns/columnSelect.vue.mjs +21 -22
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +10 -15
- package/es/components/hyTable/js/index.mjs +5 -12
- package/es/components/hyTable/js/search.mjs +3 -1
- package/es/components/hyTable/style/table.scss +13 -0
- package/es/components/hyTable/table.vue.mjs +21 -9
- package/es/components/hyTableActionButton/tableActionButton.vue.mjs +8 -10
- package/es/components/hyTableForm/batchTableForm.vue.mjs +13 -3
- package/es/components/hyTableForm/tableForm.vue.mjs +17 -11
- package/es/components/hyTour/index.mjs +7 -0
- package/es/components/hyTour/style/tour.scss +0 -0
- package/es/components/hyTour/tour.vue.mjs +23 -0
- package/es/components/hyTree/config/tree-config.mjs +5 -2
- package/es/components/hyTree/js/index.mjs +75 -68
- package/es/components/hyTree/tree.vue.mjs +19 -36
- package/es/components/index.mjs +1 -0
- package/es/index.mjs +6 -0
- package/es/static/hy-svg-icons/hy-icon-ops-linear-arrow.js +10 -0
- package/es/style/element/hy-element.scss +24 -3
- package/es/style/theme.scss +1 -0
- package/es/utils/map/hook/bigMap.mjs +9 -1
- package/es/utils/map/hook/gaode.mjs +9 -1
- package/es/utils/map/hook/leafletjs.mjs +10 -1
- package/es/version.mjs +1 -1
- package/lib/api/organization.js +47 -0
- package/lib/bussiness/hyAcquisitionStationTree/acquisitionStationTree.vue.js +249 -0
- package/lib/bussiness/hyAcquisitionStationTree/index.js +12 -0
- package/lib/bussiness/hyAcquisitionStationTree/js/index.js +126 -0
- package/lib/bussiness/hyAcquisitionStationTree/style/acquisitionStationTree.scss +0 -0
- package/lib/bussiness/hyDeviceTree/deviceTree.vue.js +253 -0
- package/lib/bussiness/hyDeviceTree/index.js +12 -0
- package/lib/bussiness/hyDeviceTree/js/index.js +128 -0
- package/lib/bussiness/hyDeviceTree/style/deviceTree.scss +0 -0
- package/lib/bussiness/hyOrgGroupTree/index.js +12 -0
- package/lib/bussiness/hyOrgGroupTree/js/index.js +126 -0
- package/lib/bussiness/hyOrgGroupTree/orgGroupTree.vue.js +249 -0
- package/lib/bussiness/hyOrgGroupTree/style/orgGroupTree.scss +0 -0
- package/lib/bussiness/hyPlanGroupDeviceTree/index.js +12 -0
- package/lib/bussiness/hyPlanGroupDeviceTree/js/index.js +126 -0
- package/lib/bussiness/hyPlanGroupDeviceTree/planGroupDeviceTree.vue.js +249 -0
- package/lib/bussiness/hyPlanGroupDeviceTree/style/planGroupDeviceTree.scss +0 -0
- package/lib/bussiness/hyUserTree/index.js +12 -0
- package/lib/bussiness/hyUserTree/js/index.js +128 -0
- package/lib/bussiness/hyUserTree/style/userTree.scss +0 -0
- package/lib/bussiness/hyUserTree/userTree.vue.js +243 -0
- package/lib/bussiness/index.js +14 -4
- package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +18 -16
- package/lib/components/hyButton/button.vue.js +3 -2
- package/lib/components/hyButton/style/button.scss +70 -0
- package/lib/components/hyConfirmDialog/confirmDialog.vue.js +0 -1
- package/lib/components/hyForm/cpns/formItem.vue.js +195 -23
- package/lib/components/hyForm/cpns/locationSelect.vue.js +8 -1
- package/lib/components/hyForm/form.vue.js +72 -17
- package/lib/components/hyForm/js/index.js +2 -0
- package/lib/components/hyForm/js/useAppForm.js +2 -2
- package/lib/components/hyIcon/style/icon.scss +1 -0
- package/lib/components/hyNoPermissions/noPermissions.vue.js +1 -1
- package/lib/components/hyNoPermissionsMap/noPermissionsMap.vue.js +1 -1
- package/lib/components/hyOrgCascader/orgCascader.vue.js +67 -12
- package/lib/components/hyRadioGroup/radioGroup.vue.js +5 -4
- package/lib/components/hySearch/cpns/searchItem.vue.js +164 -8
- package/lib/components/hySearch/js/index.js +2 -0
- package/lib/components/hySearch/search.vue.js +58 -7
- package/lib/components/hyTable/cpns/columnSelect.vue.js +20 -21
- package/lib/components/hyTable/cpns/virtualTable.vue.js +27 -32
- package/lib/components/hyTable/js/index.js +5 -12
- package/lib/components/hyTable/js/search.js +3 -1
- package/lib/components/hyTable/style/table.scss +13 -0
- package/lib/components/hyTable/table.vue.js +20 -8
- package/lib/components/hyTableActionButton/tableActionButton.vue.js +7 -9
- package/lib/components/hyTableForm/batchTableForm.vue.js +13 -3
- package/lib/components/hyTableForm/tableForm.vue.js +18 -12
- package/lib/components/hyTour/index.js +12 -0
- package/lib/components/hyTour/style/tour.scss +0 -0
- package/lib/components/hyTour/tour.vue.js +27 -0
- package/lib/components/hyTree/config/tree-config.js +5 -2
- package/lib/components/hyTree/js/index.js +75 -68
- package/lib/components/hyTree/tree.vue.js +19 -36
- package/lib/components/index.js +8 -6
- package/lib/index.js +67 -55
- package/lib/static/hy-svg-icons/hy-icon-ops-linear-arrow.js +10 -0
- package/lib/style/element/hy-element.scss +24 -3
- package/lib/style/theme.scss +1 -0
- package/lib/utils/map/hook/bigMap.js +9 -1
- package/lib/utils/map/hook/gaode.js +9 -1
- package/lib/utils/map/hook/leafletjs.js +10 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ const deviceStatus = {
|
|
|
14
14
|
1: "\u5728\u7EBF"
|
|
15
15
|
};
|
|
16
16
|
const useAppTreeWrapper = (hy) => {
|
|
17
|
-
const { props
|
|
17
|
+
const { props, emits, slots, treeRef, VirtualTree } = hy;
|
|
18
18
|
const instance = getCurrentInstance();
|
|
19
19
|
const slotAppContext = instance ? {
|
|
20
20
|
...instance.appContext,
|
|
@@ -33,17 +33,17 @@ const useAppTreeWrapper = (hy) => {
|
|
|
33
33
|
const selectFilterList = ref([]);
|
|
34
34
|
const loading = ref(true);
|
|
35
35
|
watch(
|
|
36
|
-
() =>
|
|
36
|
+
() => props.showCheckbox,
|
|
37
37
|
(newVal) => {
|
|
38
38
|
virtualTree?.setRowSelection({
|
|
39
|
-
type:
|
|
39
|
+
type: props.showCheckbox ? "checkbox" : "radio"
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
43
|
function getData(dataList) {
|
|
44
44
|
return new Promise((resolve) => {
|
|
45
45
|
hy.loading.value = true;
|
|
46
|
-
if (
|
|
46
|
+
if (props.disableSelection?.length) {
|
|
47
47
|
setDisAbleSelectionMap();
|
|
48
48
|
}
|
|
49
49
|
if (!virtualTree) {
|
|
@@ -56,12 +56,13 @@ const useAppTreeWrapper = (hy) => {
|
|
|
56
56
|
itemHeight: 30,
|
|
57
57
|
// 可视区域外的缓冲项数量
|
|
58
58
|
bufferSize: 10,
|
|
59
|
-
//
|
|
59
|
+
// 相邻级节点间的水平缩进,单位为像素
|
|
60
60
|
indent: 16,
|
|
61
61
|
emptyText: "\u6682\u65E0\u6570\u636E",
|
|
62
|
-
|
|
62
|
+
// 树形业务类型
|
|
63
|
+
business: props.treeType,
|
|
63
64
|
// 自定义整体的插槽
|
|
64
|
-
renderItem:
|
|
65
|
+
renderItem: props.treeType === treeTypeConfig.user ? (data, node) => setUserSlot(data, node) : setSlot("treeParentSlot"),
|
|
65
66
|
// // 自定义状态右侧插槽
|
|
66
67
|
renderRight: (data) => {
|
|
67
68
|
let renderRight = setSlot("renderRight");
|
|
@@ -87,9 +88,10 @@ const useAppTreeWrapper = (hy) => {
|
|
|
87
88
|
return true;
|
|
88
89
|
},
|
|
89
90
|
// // 自定义状态模块
|
|
90
|
-
renderStatus:
|
|
91
|
+
renderStatus: props.treeType === treeTypeConfig.device || props.treeType === treeTypeConfig.channel ? (data) => setRenderStatus(data) : null,
|
|
92
|
+
// 暂无数据插槽
|
|
91
93
|
renderEmpty: () => {
|
|
92
|
-
if (!
|
|
94
|
+
if (!props.showCustomEmpty || hy.filterValue.value) return true;
|
|
93
95
|
let renderEmpty = setSlot("renderEmpty");
|
|
94
96
|
if (renderEmpty) {
|
|
95
97
|
const target = renderEmpty();
|
|
@@ -98,7 +100,8 @@ const useAppTreeWrapper = (hy) => {
|
|
|
98
100
|
return setEmpty();
|
|
99
101
|
},
|
|
100
102
|
props: {
|
|
101
|
-
|
|
103
|
+
// 是否显示右侧业务状态
|
|
104
|
+
showStatus: props.showStatus,
|
|
102
105
|
disabled: (data) => {
|
|
103
106
|
if (data.dataType === 5 || data.dataType === 3) {
|
|
104
107
|
if (hy.disableSelectionMap.value) {
|
|
@@ -108,23 +111,25 @@ const useAppTreeWrapper = (hy) => {
|
|
|
108
111
|
}
|
|
109
112
|
return false;
|
|
110
113
|
},
|
|
111
|
-
...
|
|
114
|
+
...props.treeProps
|
|
112
115
|
},
|
|
113
116
|
rowSelection: {
|
|
114
|
-
type:
|
|
115
|
-
|
|
116
|
-
|
|
117
|
+
type: props.showCheckbox ? "checkbox" : "radio",
|
|
118
|
+
// 是否高亮选中项
|
|
119
|
+
highlight: props.highlight,
|
|
120
|
+
// 是否严格遵循父子不互相关联
|
|
121
|
+
checkStrictly: props.checkStrictly,
|
|
117
122
|
// 是否显示选项 showSinglebox 单选为true时部门不显示其他节点显示选择框
|
|
118
123
|
showSelect: (data) => {
|
|
119
124
|
if (data.dataType === 1) {
|
|
120
|
-
return
|
|
125
|
+
return props.showCheckbox;
|
|
121
126
|
}
|
|
122
|
-
return
|
|
127
|
+
return props.showCheckbox || props.showSinglebox;
|
|
123
128
|
},
|
|
124
129
|
// 单选时是否可以取消选择
|
|
125
|
-
cancelable:
|
|
130
|
+
cancelable: props.cancelable,
|
|
126
131
|
// 是否显示多选框或单选框
|
|
127
|
-
showSelectBox:
|
|
132
|
+
showSelectBox: props.showSelectBox,
|
|
128
133
|
// 选中回调
|
|
129
134
|
onCheckChange: (data, info, checked) => {
|
|
130
135
|
console.log("onCheckChange", info);
|
|
@@ -147,37 +152,40 @@ const useAppTreeWrapper = (hy) => {
|
|
|
147
152
|
}
|
|
148
153
|
},
|
|
149
154
|
// 是否在点击节点的时候展开或者收缩节点
|
|
150
|
-
expandOnClickNode:
|
|
155
|
+
expandOnClickNode: props.expandOnClickNode,
|
|
151
156
|
// 是否在点击节点的时候选中节点
|
|
152
|
-
checkOnClickNode:
|
|
157
|
+
checkOnClickNode: props.checkOnClickNode,
|
|
153
158
|
// 点击叶节点(最后一个子节点)时是否检查或取消节点
|
|
154
|
-
checkOnClickLeaf:
|
|
159
|
+
checkOnClickLeaf: props.checkOnClickLeaf,
|
|
155
160
|
// 双击父节点会触发选中功能
|
|
156
|
-
checkOnDblclickParentNode:
|
|
161
|
+
checkOnDblclickParentNode: props.checkOnDblclickParentNode,
|
|
157
162
|
// 筛选方法
|
|
158
163
|
filterMethod: ({ filterValue: filterValue2 }, data) => {
|
|
159
164
|
let isFilter = true;
|
|
160
|
-
if (
|
|
161
|
-
isFilter =
|
|
165
|
+
if (props.filterMethod) {
|
|
166
|
+
isFilter = props.filterMethod(data, {
|
|
167
|
+
filterValue: filterValue2
|
|
168
|
+
});
|
|
162
169
|
}
|
|
163
170
|
if (filterValue2) {
|
|
164
171
|
isFilter = isFilter && !!filterNodeMethod(data, filterValue2, {
|
|
165
|
-
treeFilterParam:
|
|
172
|
+
treeFilterParam: props.treeFilterParam,
|
|
173
|
+
treeType: props.treeType
|
|
166
174
|
});
|
|
167
175
|
}
|
|
168
176
|
return isFilter;
|
|
169
177
|
},
|
|
170
178
|
businessConfig: {
|
|
171
179
|
// 是否开启按在线离线状态排序
|
|
172
|
-
sortByStatus:
|
|
180
|
+
sortByStatus: props.deviceOrderSort,
|
|
173
181
|
// 是否只显示在线设备
|
|
174
|
-
showOnlineState:
|
|
182
|
+
showOnlineState: props.showOnlineOnly,
|
|
175
183
|
// 是否清空没有业务项(设备、用户、采集器)的部门和群组
|
|
176
|
-
clearEmptyBusiness:
|
|
184
|
+
clearEmptyBusiness: props.clearEmptyBusiness,
|
|
177
185
|
// 是否显示通道节点的选择框
|
|
178
|
-
isShowChannelSelect:
|
|
186
|
+
isShowChannelSelect: props.isShowChannelSelect,
|
|
179
187
|
// 初始化过滤数据
|
|
180
|
-
filterConfig:
|
|
188
|
+
filterConfig: props.filterConfig
|
|
181
189
|
},
|
|
182
190
|
// 初始化时处理数据,想回显必须return值,若想要过滤,可不return
|
|
183
191
|
handleMethod: (data) => {
|
|
@@ -198,7 +206,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
198
206
|
},
|
|
199
207
|
// 双击事件
|
|
200
208
|
onNodeDblClick: (data, node, event) => {
|
|
201
|
-
if (
|
|
209
|
+
if (props.treeType !== "channel") {
|
|
202
210
|
emits("on-dblclick", [{ ...data }]);
|
|
203
211
|
} else {
|
|
204
212
|
if (data.channelId) {
|
|
@@ -238,13 +246,13 @@ const useAppTreeWrapper = (hy) => {
|
|
|
238
246
|
document.body.click();
|
|
239
247
|
},
|
|
240
248
|
onLoad: () => {
|
|
241
|
-
if (
|
|
249
|
+
if (props.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
|
|
242
250
|
ElMessage.warning("\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001");
|
|
243
251
|
}
|
|
244
|
-
if (
|
|
252
|
+
if (props.defaultSelectedOrgID && props.showCheckbox && props.treeType === "device") {
|
|
245
253
|
setSelectedOrg(dataList);
|
|
246
|
-
} else if (
|
|
247
|
-
setCheckedKeys(
|
|
254
|
+
} else if (props.selectedByDefault?.length) {
|
|
255
|
+
setCheckedKeys(props.selectedByDefault);
|
|
248
256
|
}
|
|
249
257
|
if (hy.filterValue.value) {
|
|
250
258
|
getFilterValue();
|
|
@@ -260,13 +268,13 @@ const useAppTreeWrapper = (hy) => {
|
|
|
260
268
|
{
|
|
261
269
|
data: dataList,
|
|
262
270
|
businessConfig: {
|
|
263
|
-
sortByStatus:
|
|
264
|
-
showOnlineState:
|
|
265
|
-
clearEmptyBusiness:
|
|
271
|
+
sortByStatus: props.deviceOrderSort,
|
|
272
|
+
showOnlineState: props.showOnlineOnly,
|
|
273
|
+
clearEmptyBusiness: props.clearEmptyBusiness
|
|
266
274
|
}
|
|
267
275
|
},
|
|
268
276
|
() => {
|
|
269
|
-
if (
|
|
277
|
+
if (props.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
|
|
270
278
|
ElMessage.success("\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001");
|
|
271
279
|
}
|
|
272
280
|
if (hy.filterValue.value) {
|
|
@@ -283,7 +291,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
283
291
|
}
|
|
284
292
|
function setEmpty() {
|
|
285
293
|
let content = ``;
|
|
286
|
-
if (!
|
|
294
|
+
if (!props.showOnlineOnly) {
|
|
287
295
|
setTimeout(() => {
|
|
288
296
|
if (hy.addDeviceDom.value) {
|
|
289
297
|
hy.addDeviceDom.value.removeEventListener("click", addDevice);
|
|
@@ -294,13 +302,13 @@ const useAppTreeWrapper = (hy) => {
|
|
|
294
302
|
}
|
|
295
303
|
});
|
|
296
304
|
content = `<div class="w-full h-full flex flex-col justify-center items-center">
|
|
297
|
-
<svg data-v-19e5a669="" data-v-56505d40="" aria-hidden="true" svgName="
|
|
305
|
+
<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>
|
|
298
306
|
<span class="text-auxiliary text-sm mt-2">\u60A8\u5C1A\u672A\u6DFB\u52A0\u4EFB\u52A1\u8BBE\u5907</span>
|
|
299
307
|
${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>' : ""}
|
|
300
308
|
</div>`;
|
|
301
309
|
} else {
|
|
302
310
|
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="
|
|
311
|
+
<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>
|
|
304
312
|
<span class="text-auxiliary text-sm mt-2">\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001</span>
|
|
305
313
|
<span class="text-auxiliary text-sm whitespace-nowrap">\u8BF7\u68C0\u67E5\u8BBE\u5907\u72B6\u6001\u6216\u7F51\u7EDC\u8FDE\u63A5</span>
|
|
306
314
|
</div>`;
|
|
@@ -312,7 +320,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
312
320
|
}
|
|
313
321
|
function setDisAbleSelectionMap() {
|
|
314
322
|
const map = /* @__PURE__ */ new Map();
|
|
315
|
-
|
|
323
|
+
props.disableSelection.forEach((v) => {
|
|
316
324
|
map.set(v.id, true);
|
|
317
325
|
});
|
|
318
326
|
hy.disableSelectionMap.value = map;
|
|
@@ -336,7 +344,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
336
344
|
container.style.display = "flex";
|
|
337
345
|
container.style.width = "100%";
|
|
338
346
|
const dutyHtml = `<div class="flex treeDeviceBox">
|
|
339
|
-
${
|
|
347
|
+
${props.getDutyRoster === 1 && data.rosterContent ? `<span class="w-[22px] h-[22px] text-xs rounded border box-border text-main flex justify-center items-center mr-1"
|
|
340
348
|
style="border-color: ${data.rosterContentColor};background-color: ${data.rosterContentColor}70;">
|
|
341
349
|
${data.rosterContentSimple}
|
|
342
350
|
</span>` : ""}
|
|
@@ -372,7 +380,6 @@ const useAppTreeWrapper = (hy) => {
|
|
|
372
380
|
return true;
|
|
373
381
|
}
|
|
374
382
|
function setSlot(slotName) {
|
|
375
|
-
console.log(slots, slotName);
|
|
376
383
|
if (!slotName || !slots[slotName]) return null;
|
|
377
384
|
return (data, node) => {
|
|
378
385
|
let container = document.createElement("div");
|
|
@@ -416,13 +423,13 @@ const useAppTreeWrapper = (hy) => {
|
|
|
416
423
|
virtualTree?.updateData([payload]);
|
|
417
424
|
}
|
|
418
425
|
function singleRemovalFn(row, isForce = false) {
|
|
419
|
-
if (
|
|
426
|
+
if (props.treeType === "device" || props.treeType === "channel") {
|
|
420
427
|
virtualTree.setChecked(row.channelId || row.deviceId, false, true);
|
|
421
|
-
} else if (
|
|
428
|
+
} else if (props.treeType) {
|
|
422
429
|
virtualTree.setChecked(row.id, false, true, isForce);
|
|
423
|
-
} else if (!
|
|
430
|
+
} else if (!props.treeType && props.treeProps) {
|
|
424
431
|
virtualTree.setChecked(
|
|
425
|
-
row[`${
|
|
432
|
+
row[`${props.treeProps.value}`],
|
|
426
433
|
false,
|
|
427
434
|
true,
|
|
428
435
|
isForce
|
|
@@ -430,48 +437,48 @@ const useAppTreeWrapper = (hy) => {
|
|
|
430
437
|
}
|
|
431
438
|
}
|
|
432
439
|
function setCheckedKeys(dataList, isForce = false) {
|
|
433
|
-
if (
|
|
440
|
+
if (props.treeType === "device" || props.treeType === "channel") {
|
|
434
441
|
virtualTree?.setCheckedKeys(
|
|
435
442
|
dataList.map((v) => v.channelId || v.deviceId),
|
|
436
443
|
true,
|
|
437
444
|
isForce
|
|
438
445
|
);
|
|
439
|
-
} else if (
|
|
446
|
+
} else if (props.treeType) {
|
|
440
447
|
virtualTree?.setCheckedKeys(
|
|
441
448
|
dataList.map((v) => v.id),
|
|
442
449
|
true,
|
|
443
450
|
isForce
|
|
444
451
|
);
|
|
445
|
-
} else if (!
|
|
452
|
+
} else if (!props.treeType && props.treeProps) {
|
|
446
453
|
console.log(
|
|
447
454
|
"\u9009\u4E2D\u56DE\u8C03",
|
|
448
|
-
dataList.map((v) => v[`${
|
|
455
|
+
dataList.map((v) => v[`${props.treeProps.value}`])
|
|
449
456
|
);
|
|
450
457
|
virtualTree?.setCheckedKeys(
|
|
451
|
-
dataList.map((v) => v[`${
|
|
458
|
+
dataList.map((v) => v[`${props.treeProps.value}`]),
|
|
452
459
|
false,
|
|
453
460
|
isForce
|
|
454
461
|
);
|
|
455
462
|
}
|
|
456
|
-
if (
|
|
463
|
+
if (props.isBackDefaultSelected) {
|
|
457
464
|
setTimeout(() => {
|
|
458
465
|
const deviceList = virtualTree?.getCheckedBusinessNodes(true) || [];
|
|
459
466
|
emits("on-selectedDataList", deviceList);
|
|
460
467
|
});
|
|
461
468
|
}
|
|
462
469
|
}
|
|
463
|
-
function setChecked(data, type) {
|
|
464
|
-
if (
|
|
470
|
+
function setChecked(data, type = true) {
|
|
471
|
+
if (props.treeType === "device") {
|
|
465
472
|
virtualTree?.setChecked(data.channelId || data.deviceId, type, true);
|
|
466
|
-
} else if (
|
|
473
|
+
} else if (props.treeType) {
|
|
467
474
|
virtualTree?.setChecked(data.id, type, true);
|
|
468
|
-
} else if (!
|
|
469
|
-
virtualTree?.setChecked(data[`${
|
|
475
|
+
} else if (!props.treeType && props.treeProps) {
|
|
476
|
+
virtualTree?.setChecked(data[`${props.treeProps.value}`], type, false);
|
|
470
477
|
}
|
|
471
478
|
}
|
|
472
479
|
function setSelectedOrg(deviceList) {
|
|
473
480
|
for (let i = 0; i < deviceList.length; i++) {
|
|
474
|
-
if (
|
|
481
|
+
if (props.defaultSelectedOrgID === deviceList[i].id) {
|
|
475
482
|
if (deviceList[i].deviceList?.length) {
|
|
476
483
|
setCheckedKeys(deviceList[i].deviceList);
|
|
477
484
|
}
|
|
@@ -484,19 +491,19 @@ const useAppTreeWrapper = (hy) => {
|
|
|
484
491
|
}
|
|
485
492
|
}
|
|
486
493
|
function getSelectedDataList(leafOnly = false) {
|
|
487
|
-
if (
|
|
494
|
+
if (props.treeType) {
|
|
488
495
|
return virtualTree?.getCheckedBusinessNodes(leafOnly) || [];
|
|
489
496
|
}
|
|
490
497
|
return virtualTree?.getCheckedNodes(leafOnly) || [];
|
|
491
498
|
}
|
|
492
499
|
function setFilterListType(type) {
|
|
493
|
-
if (
|
|
500
|
+
if (props.selectFilterList?.length) {
|
|
494
501
|
hy.selectFilterList.value = JSON.parse(
|
|
495
|
-
JSON.stringify(
|
|
502
|
+
JSON.stringify(props.selectFilterList)
|
|
496
503
|
);
|
|
497
504
|
return;
|
|
498
505
|
}
|
|
499
|
-
if (
|
|
506
|
+
if (props.treeType === "device") {
|
|
500
507
|
hy.selectFilterList.value = [
|
|
501
508
|
{
|
|
502
509
|
label: "\u5168\u90E8",
|
|
@@ -514,7 +521,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
514
521
|
placeholder: "\u8BBE\u5907\u53F7\u3001\u8BBE\u5907\u540D\u79F0\u8FDB\u884C\u7B5B\u9009"
|
|
515
522
|
}
|
|
516
523
|
];
|
|
517
|
-
} else if (
|
|
524
|
+
} else if (props.treeType === "user") {
|
|
518
525
|
hy.selectFilterList.value = [
|
|
519
526
|
{
|
|
520
527
|
label: "\u5168\u90E8",
|
|
@@ -574,13 +581,13 @@ const useAppTreeWrapper = (hy) => {
|
|
|
574
581
|
getNode
|
|
575
582
|
};
|
|
576
583
|
};
|
|
577
|
-
function filterNodeMethod(data, value, { selectFilterType, treeFilterParam = [] }) {
|
|
584
|
+
function filterNodeMethod(data, value, { selectFilterType, treeFilterParam = [], treeType }) {
|
|
578
585
|
let type = data.dataType;
|
|
579
586
|
if (selectFilterType) type = selectFilterType;
|
|
580
587
|
const includesValue = (field) => {
|
|
581
588
|
return field && field.toString().includes(value.toString());
|
|
582
589
|
};
|
|
583
|
-
if (!
|
|
590
|
+
if (!treeType) {
|
|
584
591
|
let filterType = false;
|
|
585
592
|
for (let i = 0; i < treeFilterParam.length; i++) {
|
|
586
593
|
const item = treeFilterParam[i];
|
|
@@ -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:
|
|
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:
|
|
104
|
+
default: null
|
|
127
105
|
},
|
|
128
106
|
// 搜索类型
|
|
129
107
|
searchType: {
|
|
@@ -183,7 +161,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
183
161
|
// 外部自定义过滤函数
|
|
184
162
|
filterMethod: {
|
|
185
163
|
type: Function,
|
|
186
|
-
default:
|
|
164
|
+
default: null
|
|
165
|
+
},
|
|
166
|
+
// 是否显示右侧业务状态
|
|
167
|
+
showStatus: {
|
|
168
|
+
type: Boolean,
|
|
169
|
+
default: true
|
|
187
170
|
}
|
|
188
171
|
},
|
|
189
172
|
emits: [
|
package/es/components/index.mjs
CHANGED
|
@@ -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-
|
|
1008
|
-
|
|
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
|
|
package/es/style/theme.scss
CHANGED
|
@@ -351,7 +351,15 @@ class bigMap extends EventEmitter {
|
|
|
351
351
|
layerGroup(map, markers = []) {
|
|
352
352
|
const layerGroup = this.BM.layerGroup(markers);
|
|
353
353
|
layerGroup.addTo(map);
|
|
354
|
-
|
|
354
|
+
const handlers = {
|
|
355
|
+
addLayer: function(target, addItem) {
|
|
356
|
+
return target.addLayer(addItem);
|
|
357
|
+
},
|
|
358
|
+
clearLayers: function(target) {
|
|
359
|
+
return target.clearLayers();
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
return createMapProxy(layerGroup, handlers);
|
|
355
363
|
}
|
|
356
364
|
// 自定义图标
|
|
357
365
|
DivIcon(option) {
|
|
@@ -186,7 +186,15 @@ class Google extends EventEmitter {
|
|
|
186
186
|
layerGroup(map, markers = []) {
|
|
187
187
|
const layerGroup = new window.AMap.LayerGroup(markers);
|
|
188
188
|
layerGroup.setMap(map);
|
|
189
|
-
|
|
189
|
+
const handlers = {
|
|
190
|
+
addLayer: function(target, addItem) {
|
|
191
|
+
return target.addLayer(addItem);
|
|
192
|
+
},
|
|
193
|
+
clearLayers: function(target) {
|
|
194
|
+
return target.clearLayers();
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
return createMapProxy(layerGroup, handlers);
|
|
190
198
|
}
|
|
191
199
|
// 自定义图标
|
|
192
200
|
DivIcon(option) {
|
|
@@ -550,7 +550,16 @@ class Leafletjs extends EventEmitter {
|
|
|
550
550
|
}
|
|
551
551
|
// 地图图层
|
|
552
552
|
layerGroup(map, markers = []) {
|
|
553
|
-
|
|
553
|
+
const layerGroup = L.layerGroup(markers).addTo(getInitMap(map));
|
|
554
|
+
const handlers = {
|
|
555
|
+
addLayer: function(target, addItem) {
|
|
556
|
+
return target.addLayer(addItem);
|
|
557
|
+
},
|
|
558
|
+
clearLayers: function(target) {
|
|
559
|
+
return target.clearLayers();
|
|
560
|
+
}
|
|
561
|
+
};
|
|
562
|
+
return createMapProxy(layerGroup, handlers);
|
|
554
563
|
}
|
|
555
564
|
// 自定义图标
|
|
556
565
|
DivIcon(option) {
|
package/es/version.mjs
CHANGED