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.
- package/dist/tailwind.css +51 -13
- 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 +183 -149
- package/es/components/hyButton/button.vue.mjs +19 -5
- package/es/components/hyButton/style/button.scss +72 -0
- package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +1 -2
- package/es/components/hyForm/cpns/formItem.vue.mjs +254 -32
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +8 -1
- package/es/components/hyForm/form.vue.mjs +88 -19
- package/es/components/hyForm/js/index.mjs +2 -1
- package/es/components/hyForm/js/useAppForm.mjs +3 -3
- package/es/components/hyIcon/style/icon.scss +1 -0
- package/es/components/hyMap/js/index.mjs +6 -6
- package/es/components/hyMap/map.vue.mjs +14 -4
- 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 +75 -15
- package/es/components/hyRadioGroup/radioGroup.vue.mjs +5 -4
- package/es/components/hySearch/cpns/searchItem.vue.mjs +434 -206
- package/es/components/hySearch/js/index.mjs +2 -1
- package/es/components/hySearch/search.vue.mjs +71 -10
- package/es/components/hySearch/style/search.scss +7 -0
- package/es/components/hyTable/cpns/columnSelect.vue.mjs +21 -22
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +35 -21
- package/es/components/hyTable/js/index.mjs +16 -17
- package/es/components/hyTable/js/search.mjs +28 -2
- package/es/components/hyTable/style/table.scss +13 -0
- package/es/components/hyTable/table.vue.mjs +55 -22
- package/es/components/hyTableActionButton/tableActionButton.vue.mjs +17 -12
- package/es/components/hyTableForm/batchTableForm.vue.mjs +36 -5
- package/es/components/hyTableForm/js/useAppTableForm.mjs +1 -1
- package/es/components/hyTableForm/tableForm.vue.mjs +84 -32
- 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 +128 -56
- package/es/components/hyTree/tree.vue.mjs +22 -37
- 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/index.scss +0 -1
- package/es/style/tailwind.scss +0 -1
- package/es/style/theme.scss +1 -0
- package/es/utils/is.mjs +3 -1
- package/es/utils/map/hook/bigMap.mjs +11 -1
- package/es/utils/map/hook/gaode.mjs +60 -17
- package/es/utils/map/hook/leafletjs.mjs +25 -4
- package/es/utils/map/index.mjs +1 -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 +182 -148
- package/lib/components/hyButton/button.vue.js +18 -4
- package/lib/components/hyButton/style/button.scss +72 -0
- package/lib/components/hyConfirmDialog/confirmDialog.vue.js +0 -1
- package/lib/components/hyForm/cpns/formItem.vue.js +250 -28
- package/lib/components/hyForm/cpns/locationSelect.vue.js +8 -1
- package/lib/components/hyForm/form.vue.js +86 -17
- package/lib/components/hyForm/js/index.js +2 -0
- package/lib/components/hyForm/js/useAppForm.js +3 -3
- package/lib/components/hyIcon/style/icon.scss +1 -0
- package/lib/components/hyMap/js/index.js +5 -5
- package/lib/components/hyMap/map.vue.js +13 -3
- 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 +73 -13
- package/lib/components/hyRadioGroup/radioGroup.vue.js +5 -4
- package/lib/components/hySearch/cpns/searchItem.vue.js +431 -203
- package/lib/components/hySearch/js/index.js +2 -0
- package/lib/components/hySearch/search.vue.js +69 -8
- package/lib/components/hySearch/style/search.scss +7 -0
- package/lib/components/hyTable/cpns/columnSelect.vue.js +20 -21
- package/lib/components/hyTable/cpns/virtualTable.vue.js +51 -37
- package/lib/components/hyTable/js/index.js +16 -16
- package/lib/components/hyTable/js/search.js +28 -2
- package/lib/components/hyTable/style/table.scss +13 -0
- package/lib/components/hyTable/table.vue.js +53 -20
- package/lib/components/hyTableActionButton/tableActionButton.vue.js +16 -11
- package/lib/components/hyTableForm/batchTableForm.vue.js +36 -5
- package/lib/components/hyTableForm/js/useAppTableForm.js +1 -1
- package/lib/components/hyTableForm/tableForm.vue.js +85 -33
- 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 +128 -56
- package/lib/components/hyTree/tree.vue.js +22 -37
- 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/index.scss +0 -1
- package/lib/style/tailwind.scss +0 -1
- package/lib/style/theme.scss +1 -0
- package/lib/utils/is.js +5 -3
- package/lib/utils/map/hook/bigMap.js +11 -1
- package/lib/utils/map/hook/gaode.js +60 -17
- package/lib/utils/map/hook/leafletjs.js +25 -4
- package/lib/utils/map/index.js +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -2
package/dist/tailwind.css
CHANGED
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
--tw-contain-layout: ;
|
|
51
51
|
--tw-contain-paint: ;
|
|
52
52
|
--tw-contain-style: ;
|
|
53
|
-
box-sizing: border-box;
|
|
54
53
|
/* 1 */
|
|
55
54
|
border-width: 0;
|
|
56
55
|
/* 2 */
|
|
@@ -276,6 +275,10 @@
|
|
|
276
275
|
z-index: 1;
|
|
277
276
|
}
|
|
278
277
|
|
|
278
|
+
.z-\[2\] {
|
|
279
|
+
z-index: 2;
|
|
280
|
+
}
|
|
281
|
+
|
|
279
282
|
.z-\[3\] {
|
|
280
283
|
z-index: 3;
|
|
281
284
|
}
|
|
@@ -537,8 +540,8 @@
|
|
|
537
540
|
height: 42px !important;
|
|
538
541
|
}
|
|
539
542
|
|
|
540
|
-
.\!h-\[
|
|
541
|
-
height:
|
|
543
|
+
.\!h-\[56px\] {
|
|
544
|
+
height: 56px !important;
|
|
542
545
|
}
|
|
543
546
|
|
|
544
547
|
.\!h-\[66px\] {
|
|
@@ -561,6 +564,10 @@
|
|
|
561
564
|
height: 0.375rem;
|
|
562
565
|
}
|
|
563
566
|
|
|
567
|
+
.h-2 {
|
|
568
|
+
height: 0.5rem;
|
|
569
|
+
}
|
|
570
|
+
|
|
564
571
|
.h-2\.5 {
|
|
565
572
|
height: 0.625rem;
|
|
566
573
|
}
|
|
@@ -753,8 +760,8 @@
|
|
|
753
760
|
width: 42px !important;
|
|
754
761
|
}
|
|
755
762
|
|
|
756
|
-
.\!w-\[
|
|
757
|
-
width:
|
|
763
|
+
.\!w-\[56px\] {
|
|
764
|
+
width: 56px !important;
|
|
758
765
|
}
|
|
759
766
|
|
|
760
767
|
.\!w-\[58px\] {
|
|
@@ -777,6 +784,10 @@
|
|
|
777
784
|
width: 0.375rem;
|
|
778
785
|
}
|
|
779
786
|
|
|
787
|
+
.w-2 {
|
|
788
|
+
width: 0.5rem;
|
|
789
|
+
}
|
|
790
|
+
|
|
780
791
|
.w-3 {
|
|
781
792
|
width: 0.75rem;
|
|
782
793
|
}
|
|
@@ -916,6 +927,11 @@
|
|
|
916
927
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
917
928
|
}
|
|
918
929
|
|
|
930
|
+
.translate-x-1\/2 {
|
|
931
|
+
--tw-translate-x: 50%;
|
|
932
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
933
|
+
}
|
|
934
|
+
|
|
919
935
|
.transform {
|
|
920
936
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
921
937
|
}
|
|
@@ -936,10 +952,6 @@
|
|
|
936
952
|
cursor: pointer;
|
|
937
953
|
}
|
|
938
954
|
|
|
939
|
-
.cursor-wait {
|
|
940
|
-
cursor: wait;
|
|
941
|
-
}
|
|
942
|
-
|
|
943
955
|
.select-none {
|
|
944
956
|
-webkit-user-select: none;
|
|
945
957
|
-moz-user-select: none;
|
|
@@ -1150,6 +1162,10 @@
|
|
|
1150
1162
|
border-color: transparent;
|
|
1151
1163
|
}
|
|
1152
1164
|
|
|
1165
|
+
.\!bg-\[rgba\(var\(--hy-background\)\2c 0\.7\)\] {
|
|
1166
|
+
background-color: rgba(var(--hy-background),0.7) !important;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1153
1169
|
.\!bg-background {
|
|
1154
1170
|
--tw-bg-opacity: 1 !important;
|
|
1155
1171
|
background-color: rgb(var(--hy-background), var(--tw-bg-opacity, 1)) !important;
|
|
@@ -1212,6 +1228,11 @@
|
|
|
1212
1228
|
background-color: rgb(var(--hy-success), var(--tw-bg-opacity, 1));
|
|
1213
1229
|
}
|
|
1214
1230
|
|
|
1231
|
+
.bg-success-3 {
|
|
1232
|
+
--tw-bg-opacity: 1;
|
|
1233
|
+
background-color: rgb(var(--hy-success-3), var(--tw-bg-opacity, 1));
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1215
1236
|
.bg-theme {
|
|
1216
1237
|
--tw-bg-opacity: 1;
|
|
1217
1238
|
background-color: rgb(var(--hy-theme), var(--tw-bg-opacity, 1));
|
|
@@ -1225,6 +1246,10 @@
|
|
|
1225
1246
|
padding: 0.25rem;
|
|
1226
1247
|
}
|
|
1227
1248
|
|
|
1249
|
+
.p-4 {
|
|
1250
|
+
padding: 1rem;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1228
1253
|
.p-5 {
|
|
1229
1254
|
padding: 1.25rem;
|
|
1230
1255
|
}
|
|
@@ -1317,6 +1342,11 @@
|
|
|
1317
1342
|
padding-bottom: 0.5rem;
|
|
1318
1343
|
}
|
|
1319
1344
|
|
|
1345
|
+
.py-2\.5 {
|
|
1346
|
+
padding-top: 0.625rem;
|
|
1347
|
+
padding-bottom: 0.625rem;
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1320
1350
|
.py-4 {
|
|
1321
1351
|
padding-top: 1rem;
|
|
1322
1352
|
padding-bottom: 1rem;
|
|
@@ -1371,6 +1401,10 @@
|
|
|
1371
1401
|
padding-left: 52px;
|
|
1372
1402
|
}
|
|
1373
1403
|
|
|
1404
|
+
.pr-1 {
|
|
1405
|
+
padding-right: 0.25rem;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1374
1408
|
.pr-2 {
|
|
1375
1409
|
padding-right: 0.5rem;
|
|
1376
1410
|
}
|
|
@@ -1395,6 +1429,10 @@
|
|
|
1395
1429
|
padding-right: 62px;
|
|
1396
1430
|
}
|
|
1397
1431
|
|
|
1432
|
+
.pt-0 {
|
|
1433
|
+
padding-top: 0px;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1398
1436
|
.pt-2 {
|
|
1399
1437
|
padding-top: 0.5rem;
|
|
1400
1438
|
}
|
|
@@ -1411,10 +1449,6 @@
|
|
|
1411
1449
|
padding-top: 1.5rem;
|
|
1412
1450
|
}
|
|
1413
1451
|
|
|
1414
|
-
.pt-\[11px\] {
|
|
1415
|
-
padding-top: 11px;
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
1452
|
.pt-\[32px\] {
|
|
1419
1453
|
padding-top: 32px;
|
|
1420
1454
|
}
|
|
@@ -1572,6 +1606,10 @@
|
|
|
1572
1606
|
outline-offset: 0px;
|
|
1573
1607
|
}
|
|
1574
1608
|
|
|
1609
|
+
.\!outline-danger-2 {
|
|
1610
|
+
outline-color: rgb(var(--hy-danger-2), 1) !important;
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1575
1613
|
.outline-transparent {
|
|
1576
1614
|
outline-color: transparent;
|
|
1577
1615
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import '../hooks/index.mjs';
|
|
2
|
+
import { unref } from 'vue';
|
|
3
|
+
import { useLocale } from '../hooks/useLocale.mjs';
|
|
4
|
+
import { useApi } from '../hooks/useApi.mjs';
|
|
5
|
+
|
|
6
|
+
function orgListWithDev3Api(params) {
|
|
7
|
+
return new Promise((resolve, reject) => {
|
|
8
|
+
const { t } = useLocale();
|
|
9
|
+
const { api } = useApi();
|
|
10
|
+
const http = unref(api);
|
|
11
|
+
http.post("organization/orgTree", params).then((res) => {
|
|
12
|
+
resolve(res.data);
|
|
13
|
+
}).catch((res) => {
|
|
14
|
+
reject(new Error(t("interfaceError")));
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function orgTreeWithGroupAndDeviceApi(params) {
|
|
19
|
+
return new Promise((resolve, reject) => {
|
|
20
|
+
const { t } = useLocale();
|
|
21
|
+
const { api } = useApi();
|
|
22
|
+
const http = unref(api);
|
|
23
|
+
http.post("organization/orgTreeWithGroupAndDevice", params).then((res) => {
|
|
24
|
+
return resolve(res.data);
|
|
25
|
+
}).catch((res) => {
|
|
26
|
+
reject(new Error(t("interfaceError")));
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function orgTreeWithPlanGroupAndDeviceApi(params) {
|
|
31
|
+
return new Promise((resolve, reject) => {
|
|
32
|
+
const { t } = useLocale();
|
|
33
|
+
const { api } = useApi();
|
|
34
|
+
const http = unref(api);
|
|
35
|
+
http.post("organization/orgTreeWithPlanGroupAndDevice", params).then((res) => {
|
|
36
|
+
return resolve(res.data);
|
|
37
|
+
}).catch((res) => {
|
|
38
|
+
reject(new Error(t("interfaceError")));
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { orgListWithDev3Api, orgTreeWithGroupAndDeviceApi, orgTreeWithPlanGroupAndDeviceApi };
|
|
@@ -0,0 +1,245 @@
|
|
|
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 { useAcquisitionStationTree } from './js/index.mjs';
|
|
5
|
+
import { useMixins } from '../../hooks/useMixins.mjs';
|
|
6
|
+
import { HyTree } from '../../components/hyTree/index.mjs';
|
|
7
|
+
|
|
8
|
+
import "./style/acquisitionStationTree.scss";
|
|
9
|
+
|
|
10
|
+
const __default__ = defineComponent({
|
|
11
|
+
name: "HyAcquisitionStationTree"
|
|
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
|
+
// 是否开启按照设备在线和离线状态排序,仅支持 device 和 groupDevice 业务类型
|
|
33
|
+
deviceOrderSort: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: true
|
|
36
|
+
},
|
|
37
|
+
// 设置勤务状态
|
|
38
|
+
getDutyRoster: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: false
|
|
41
|
+
},
|
|
42
|
+
// 仅展示在线数据
|
|
43
|
+
showOnlineOnly: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false
|
|
46
|
+
},
|
|
47
|
+
/* 是否开启多选框 */
|
|
48
|
+
showCheckbox: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: true
|
|
51
|
+
},
|
|
52
|
+
/* 是否开启单选框 */
|
|
53
|
+
showSinglebox: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: false
|
|
56
|
+
},
|
|
57
|
+
// 是否清除无数据的部门
|
|
58
|
+
clearEmptyBusiness: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: false
|
|
61
|
+
},
|
|
62
|
+
// 是否显示通道节点的选择框
|
|
63
|
+
isShowChannelSelect: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false
|
|
66
|
+
},
|
|
67
|
+
// 是否显示自定义空数据显示
|
|
68
|
+
showCustomEmpty: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: false
|
|
71
|
+
},
|
|
72
|
+
placeholder: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: "\u8BF7\u8F93\u5165"
|
|
75
|
+
},
|
|
76
|
+
// 是否返回默认选择的数据
|
|
77
|
+
isBackDefaultSelected: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
default: false
|
|
80
|
+
},
|
|
81
|
+
/* 默认选中列表 */
|
|
82
|
+
selectedByDefault: {
|
|
83
|
+
type: Array,
|
|
84
|
+
default: () => {
|
|
85
|
+
return [];
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
// 默认需要选中的部门ID
|
|
89
|
+
defaultSelectedOrgID: {
|
|
90
|
+
default: null
|
|
91
|
+
},
|
|
92
|
+
// 搜索类型
|
|
93
|
+
searchType: {
|
|
94
|
+
type: Number,
|
|
95
|
+
default: 1
|
|
96
|
+
},
|
|
97
|
+
// 筛选列表
|
|
98
|
+
selectFilterList: {
|
|
99
|
+
type: Array,
|
|
100
|
+
default: () => []
|
|
101
|
+
},
|
|
102
|
+
// 是否高亮选中节点
|
|
103
|
+
highlight: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: false
|
|
106
|
+
},
|
|
107
|
+
// 是否严格的遵循父子不互相关联
|
|
108
|
+
checkStrictly: {
|
|
109
|
+
type: Boolean,
|
|
110
|
+
default: false
|
|
111
|
+
},
|
|
112
|
+
// 单选时可以取消选中
|
|
113
|
+
cancelable: {
|
|
114
|
+
type: Boolean,
|
|
115
|
+
default: true
|
|
116
|
+
},
|
|
117
|
+
// 是否显示多选框或单选框
|
|
118
|
+
showSelectBox: {
|
|
119
|
+
type: Boolean,
|
|
120
|
+
default: true
|
|
121
|
+
},
|
|
122
|
+
// 是否在点击节点的时候展开或者收缩节点
|
|
123
|
+
expandOnClickNode: {
|
|
124
|
+
type: Boolean,
|
|
125
|
+
default: true
|
|
126
|
+
},
|
|
127
|
+
// 是否在点击节点的时候选中节点
|
|
128
|
+
checkOnClickNode: {
|
|
129
|
+
type: Boolean,
|
|
130
|
+
default: false
|
|
131
|
+
},
|
|
132
|
+
// 点击叶节点(最后一个子节点)时是否检查或取消节点
|
|
133
|
+
checkOnClickLeaf: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
default: true
|
|
136
|
+
},
|
|
137
|
+
// 双击父节点会触发选中功能
|
|
138
|
+
checkOnDblclickParentNode: {
|
|
139
|
+
type: Boolean,
|
|
140
|
+
default: true
|
|
141
|
+
},
|
|
142
|
+
// 初始化过滤数据
|
|
143
|
+
filterConfig: {
|
|
144
|
+
type: Array,
|
|
145
|
+
default: () => []
|
|
146
|
+
},
|
|
147
|
+
// 外部自定义过滤函数
|
|
148
|
+
filterMethod: {
|
|
149
|
+
type: Function,
|
|
150
|
+
default: null
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
emits: [
|
|
154
|
+
"on-load",
|
|
155
|
+
"onRefreshData",
|
|
156
|
+
"on-click-delete",
|
|
157
|
+
"on-click",
|
|
158
|
+
"on-check-tree",
|
|
159
|
+
"on-department-click",
|
|
160
|
+
"on-click-device",
|
|
161
|
+
"on-contextmenu",
|
|
162
|
+
"on-dblclick",
|
|
163
|
+
"on-selectedDataList"
|
|
164
|
+
],
|
|
165
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
166
|
+
const props = __props;
|
|
167
|
+
const emits = __emit;
|
|
168
|
+
const slots = useSlots();
|
|
169
|
+
const {
|
|
170
|
+
containerRef,
|
|
171
|
+
hyTreeRef,
|
|
172
|
+
treeHeight,
|
|
173
|
+
setData,
|
|
174
|
+
getData,
|
|
175
|
+
onClickDelete,
|
|
176
|
+
onClick,
|
|
177
|
+
onCheckTree,
|
|
178
|
+
onDepartmentClick,
|
|
179
|
+
onClickDevice,
|
|
180
|
+
onContextmenu,
|
|
181
|
+
onDblclick,
|
|
182
|
+
onSelectedDataList,
|
|
183
|
+
singleRemovalFn,
|
|
184
|
+
setCheckedKeys,
|
|
185
|
+
setChecked,
|
|
186
|
+
getSelectedDataList,
|
|
187
|
+
refreshData,
|
|
188
|
+
getNode
|
|
189
|
+
} = useMixins({ props, emits }, [useAcquisitionStationTree]);
|
|
190
|
+
__expose({
|
|
191
|
+
getData,
|
|
192
|
+
singleRemovalFn,
|
|
193
|
+
setCheckedKeys,
|
|
194
|
+
setChecked,
|
|
195
|
+
getSelectedDataList,
|
|
196
|
+
refreshData,
|
|
197
|
+
getNode
|
|
198
|
+
});
|
|
199
|
+
return (_ctx, _cache) => {
|
|
200
|
+
return openBlock(), createElementBlock(
|
|
201
|
+
"div",
|
|
202
|
+
{
|
|
203
|
+
ref_key: "containerRef",
|
|
204
|
+
ref: containerRef,
|
|
205
|
+
class: "w-full h-full"
|
|
206
|
+
},
|
|
207
|
+
[
|
|
208
|
+
createCommentVNode(" HyAcquisitionStationTree \u91C7\u96C6\u7AD9\u6811\u5F62 "),
|
|
209
|
+
createVNode(unref(HyTree), mergeProps({
|
|
210
|
+
ref_key: "hyTreeRef",
|
|
211
|
+
ref: hyTreeRef
|
|
212
|
+
}, { ...props }, {
|
|
213
|
+
treeType: "cs",
|
|
214
|
+
treeHeight: unref(treeHeight),
|
|
215
|
+
onOnRefreshData: unref(setData),
|
|
216
|
+
onOnClickDelete: unref(onClickDelete),
|
|
217
|
+
onOnClick: unref(onClick),
|
|
218
|
+
onOnCheckTree: unref(onCheckTree),
|
|
219
|
+
onOnDepartmentClick: unref(onDepartmentClick),
|
|
220
|
+
onOnClickDevice: unref(onClickDevice),
|
|
221
|
+
onOnContextmenu: unref(onContextmenu),
|
|
222
|
+
onOnDblclick: unref(onDblclick),
|
|
223
|
+
onOnSelectedDataList: unref(onSelectedDataList)
|
|
224
|
+
}), createSlots({
|
|
225
|
+
_: 2
|
|
226
|
+
/* DYNAMIC */
|
|
227
|
+
}, [
|
|
228
|
+
renderList(unref(slots), (_, slotName) => {
|
|
229
|
+
return {
|
|
230
|
+
name: slotName,
|
|
231
|
+
fn: withCtx((scope) => [
|
|
232
|
+
renderSlot(_ctx.$slots, slotName, normalizeProps(guardReactiveProps(scope)))
|
|
233
|
+
])
|
|
234
|
+
};
|
|
235
|
+
})
|
|
236
|
+
]), 1040, ["treeHeight", "onOnRefreshData", "onOnClickDelete", "onOnClick", "onOnCheckTree", "onOnDepartmentClick", "onOnClickDevice", "onOnContextmenu", "onOnDblclick", "onOnSelectedDataList"])
|
|
237
|
+
],
|
|
238
|
+
512
|
|
239
|
+
/* NEED_PATCH */
|
|
240
|
+
);
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _sfc_main from './acquisitionStationTree.vue.mjs';
|
|
2
|
+
import '../../utils/index.mjs';
|
|
3
|
+
import { withInstall } from '../../utils/handler.mjs';
|
|
4
|
+
|
|
5
|
+
const HyAcquisitionStationTree = withInstall(_sfc_main);
|
|
6
|
+
|
|
7
|
+
export { HyAcquisitionStationTree, HyAcquisitionStationTree as default };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { useTemplateRef, ref, onMounted, nextTick, onUnmounted } from 'vue';
|
|
2
|
+
import { orgListWithDev3Api } from '../../../api/organization.mjs';
|
|
3
|
+
|
|
4
|
+
function useAcquisitionStationTree(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
|
+
...props.requestParams
|
|
24
|
+
});
|
|
25
|
+
hy.hyTreeRef.value.getData(data).then(() => {
|
|
26
|
+
emits("on-load");
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function getData(data) {
|
|
30
|
+
return new Promise((resolve) => {
|
|
31
|
+
hy.hyTreeRef.value.getData(data).then(() => {
|
|
32
|
+
emits("on-load");
|
|
33
|
+
resolve(200);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
onMounted(() => {
|
|
38
|
+
if (props.type !== "custom") {
|
|
39
|
+
hy.setData();
|
|
40
|
+
}
|
|
41
|
+
nextTick(() => {
|
|
42
|
+
hy.updateTreeHeight();
|
|
43
|
+
if (typeof ResizeObserver === "function" && hy.containerRef.value) {
|
|
44
|
+
hy.resizeObserver = new ResizeObserver(hy.updateTreeHeight);
|
|
45
|
+
hy.resizeObserver.observe(hy.containerRef.value);
|
|
46
|
+
} else if (typeof window !== "undefined") {
|
|
47
|
+
window.addEventListener("resize", hy.updateTreeHeight);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
onUnmounted(() => {
|
|
52
|
+
hy.resizeObserver?.disconnect();
|
|
53
|
+
if (typeof window !== "undefined") {
|
|
54
|
+
window.removeEventListener("resize", hy.updateTreeHeight);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
function onClickDelete(data) {
|
|
58
|
+
emits("on-click-delete", data);
|
|
59
|
+
}
|
|
60
|
+
function onClick(data) {
|
|
61
|
+
emits("on-click", data);
|
|
62
|
+
}
|
|
63
|
+
function onCheckTree(list, checkObj) {
|
|
64
|
+
emits("on-check-tree", list, checkObj);
|
|
65
|
+
}
|
|
66
|
+
function onDepartmentClick(data) {
|
|
67
|
+
emits("on-department-click", data);
|
|
68
|
+
}
|
|
69
|
+
function onClickDevice(data) {
|
|
70
|
+
emits("on-click-device", data);
|
|
71
|
+
}
|
|
72
|
+
function onContextmenu(data) {
|
|
73
|
+
emits("on-contextmenu", data);
|
|
74
|
+
}
|
|
75
|
+
function onDblclick(list) {
|
|
76
|
+
emits("on-dblclick", list);
|
|
77
|
+
}
|
|
78
|
+
function onSelectedDataList(list) {
|
|
79
|
+
emits("on-selectedDataList", list);
|
|
80
|
+
}
|
|
81
|
+
function singleRemovalFn(row, isForce = false) {
|
|
82
|
+
hy.hyTreeRef.value.singleRemovalFn(row, isForce);
|
|
83
|
+
}
|
|
84
|
+
function setCheckedKeys(dataList, isForce = false) {
|
|
85
|
+
hy.hyTreeRef.value.setCheckedKeys(dataList, isForce);
|
|
86
|
+
}
|
|
87
|
+
function setChecked(data, type = true) {
|
|
88
|
+
hy.hyTreeRef.value.setChecked(data, type);
|
|
89
|
+
}
|
|
90
|
+
function getSelectedDataList(leafOnly = false) {
|
|
91
|
+
return hy.hyTreeRef.value.getSelectedDataList(leafOnly);
|
|
92
|
+
}
|
|
93
|
+
function refreshData() {
|
|
94
|
+
hy.hyTreeRef.value.refreshData();
|
|
95
|
+
}
|
|
96
|
+
function getNode(id) {
|
|
97
|
+
return hy.hyTreeRef.value.getNode(id);
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
hyTreeRef,
|
|
101
|
+
containerRef,
|
|
102
|
+
treeHeight,
|
|
103
|
+
resizeObserver,
|
|
104
|
+
updateTreeHeight,
|
|
105
|
+
setData,
|
|
106
|
+
getData,
|
|
107
|
+
onClickDelete,
|
|
108
|
+
onClick,
|
|
109
|
+
onCheckTree,
|
|
110
|
+
onDepartmentClick,
|
|
111
|
+
onClickDevice,
|
|
112
|
+
onContextmenu,
|
|
113
|
+
onDblclick,
|
|
114
|
+
onSelectedDataList,
|
|
115
|
+
singleRemovalFn,
|
|
116
|
+
setCheckedKeys,
|
|
117
|
+
setChecked,
|
|
118
|
+
getSelectedDataList,
|
|
119
|
+
refreshData,
|
|
120
|
+
getNode
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export { useAcquisitionStationTree };
|
|
File without changes
|