hy-dispatch-ui-v3 0.2.84 → 0.2.86
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 +54 -0
- package/es/bussiness/hyDeviceTree/deviceTree.vue.mjs +5 -0
- package/es/bussiness/hyDeviceTree/js/index.mjs +15 -5
- package/es/bussiness/hySelectDeviceTree/cpns/deviceItem.install.mjs +6 -0
- package/es/bussiness/hySelectDeviceTree/cpns/deviceItem.vue.mjs +113 -0
- package/es/bussiness/hySelectDeviceTree/index.mjs +7 -0
- package/es/bussiness/hySelectDeviceTree/js/index.mjs +35 -0
- package/es/bussiness/hySelectDeviceTree/selectDeviceTree.install.mjs +6 -0
- package/es/bussiness/hySelectDeviceTree/selectDeviceTree.vue.mjs +163 -0
- package/es/bussiness/hySelectDeviceTree/style/selectDeviceTree.scss +0 -0
- package/es/bussiness/index.mjs +1 -0
- package/es/components/hyForm/cpns/formItem.vue.mjs +493 -426
- package/es/components/hyForm/form.vue.mjs +12 -0
- package/es/components/hyIcon/icon.vue.mjs +10 -4
- package/es/components-map.mjs +1 -0
- package/es/index.mjs +2 -0
- package/es/utils/device.mjs +42 -0
- package/es/utils/index.mjs +1 -0
- package/es/version.mjs +1 -1
- package/lib/bussiness/hyDeviceTree/deviceTree.vue.js +5 -0
- package/lib/bussiness/hyDeviceTree/js/index.js +15 -5
- package/lib/bussiness/hySelectDeviceTree/cpns/deviceItem.install.js +6 -0
- package/lib/bussiness/hySelectDeviceTree/cpns/deviceItem.vue.js +117 -0
- package/lib/bussiness/hySelectDeviceTree/index.js +12 -0
- package/lib/bussiness/hySelectDeviceTree/js/index.js +37 -0
- package/lib/bussiness/hySelectDeviceTree/selectDeviceTree.install.js +6 -0
- package/lib/bussiness/hySelectDeviceTree/selectDeviceTree.vue.js +167 -0
- package/lib/bussiness/hySelectDeviceTree/style/selectDeviceTree.scss +0 -0
- package/lib/bussiness/index.js +4 -2
- package/lib/components/hyForm/cpns/formItem.vue.js +492 -425
- package/lib/components/hyForm/form.vue.js +12 -0
- package/lib/components/hyIcon/icon.vue.js +10 -4
- package/lib/components-map.js +1 -0
- package/lib/index.js +24 -20
- package/lib/utils/device.js +44 -0
- package/lib/utils/index.js +2 -0
- package/lib/version.js +1 -1
- package/package.json +7 -1
package/dist/tailwind.css
CHANGED
|
@@ -751,6 +751,10 @@
|
|
|
751
751
|
height: 45px;
|
|
752
752
|
}
|
|
753
753
|
|
|
754
|
+
.h-\[46px\] {
|
|
755
|
+
height: 46px;
|
|
756
|
+
}
|
|
757
|
+
|
|
754
758
|
.h-\[48px\] {
|
|
755
759
|
height: 48px;
|
|
756
760
|
}
|
|
@@ -935,6 +939,10 @@
|
|
|
935
939
|
width: 0.625rem;
|
|
936
940
|
}
|
|
937
941
|
|
|
942
|
+
.w-20 {
|
|
943
|
+
width: 5rem;
|
|
944
|
+
}
|
|
945
|
+
|
|
938
946
|
.w-3 {
|
|
939
947
|
width: 0.75rem;
|
|
940
948
|
}
|
|
@@ -999,6 +1007,10 @@
|
|
|
999
1007
|
width: 33%;
|
|
1000
1008
|
}
|
|
1001
1009
|
|
|
1010
|
+
.w-\[34px\] {
|
|
1011
|
+
width: 34px;
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1002
1014
|
.w-\[38px\] {
|
|
1003
1015
|
width: 38px;
|
|
1004
1016
|
}
|
|
@@ -1102,6 +1114,11 @@
|
|
|
1102
1114
|
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));
|
|
1103
1115
|
}
|
|
1104
1116
|
|
|
1117
|
+
.-translate-y-full {
|
|
1118
|
+
--tw-translate-y: -100%;
|
|
1119
|
+
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));
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1105
1122
|
.translate-x-1\/2 {
|
|
1106
1123
|
--tw-translate-x: 50%;
|
|
1107
1124
|
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));
|
|
@@ -1528,6 +1545,10 @@
|
|
|
1528
1545
|
padding: 0.5rem;
|
|
1529
1546
|
}
|
|
1530
1547
|
|
|
1548
|
+
.p-3 {
|
|
1549
|
+
padding: 0.75rem;
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1531
1552
|
.p-4 {
|
|
1532
1553
|
padding: 1rem;
|
|
1533
1554
|
}
|
|
@@ -1856,6 +1877,10 @@
|
|
|
1856
1877
|
line-height: 1.25rem;
|
|
1857
1878
|
}
|
|
1858
1879
|
|
|
1880
|
+
.leading-6 {
|
|
1881
|
+
line-height: 1.5rem;
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1859
1884
|
.leading-\[1\] {
|
|
1860
1885
|
line-height: 1;
|
|
1861
1886
|
}
|
|
@@ -1890,6 +1915,11 @@
|
|
|
1890
1915
|
color: rgb(var(--hy-auxiliary), var(--tw-text-opacity, 1));
|
|
1891
1916
|
}
|
|
1892
1917
|
|
|
1918
|
+
.text-danger {
|
|
1919
|
+
--tw-text-opacity: 1;
|
|
1920
|
+
color: rgb(var(--hy-danger), var(--tw-text-opacity, 1));
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1893
1923
|
.text-danger-2 {
|
|
1894
1924
|
--tw-text-opacity: 1;
|
|
1895
1925
|
color: rgb(var(--hy-danger-2), var(--tw-text-opacity, 1));
|
|
@@ -1929,6 +1959,10 @@
|
|
|
1929
1959
|
text-decoration-line: underline;
|
|
1930
1960
|
}
|
|
1931
1961
|
|
|
1962
|
+
.opacity-0 {
|
|
1963
|
+
opacity: 0;
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1932
1966
|
.opacity-90 {
|
|
1933
1967
|
opacity: 0.9;
|
|
1934
1968
|
}
|
|
@@ -1963,6 +1997,17 @@
|
|
|
1963
1997
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
1964
1998
|
}
|
|
1965
1999
|
|
|
2000
|
+
.shadow-\[inset_0_0_10px_0\] {
|
|
2001
|
+
--tw-shadow: inset 0 0 10px 0;
|
|
2002
|
+
--tw-shadow-colored: inset 0 0 10px 0 var(--tw-shadow-color);
|
|
2003
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
.\!shadow-auxiliary {
|
|
2007
|
+
--tw-shadow-color: rgb(var(--hy-auxiliary), 1) !important;
|
|
2008
|
+
--tw-shadow: var(--tw-shadow-colored) !important;
|
|
2009
|
+
}
|
|
2010
|
+
|
|
1966
2011
|
.\!shadow-success {
|
|
1967
2012
|
--tw-shadow-color: rgb(var(--hy-success), 1) !important;
|
|
1968
2013
|
--tw-shadow: var(--tw-shadow-colored) !important;
|
|
@@ -1973,6 +2018,11 @@
|
|
|
1973
2018
|
--tw-shadow: var(--tw-shadow-colored) !important;
|
|
1974
2019
|
}
|
|
1975
2020
|
|
|
2021
|
+
.shadow-auxiliary {
|
|
2022
|
+
--tw-shadow-color: rgb(var(--hy-auxiliary), 1);
|
|
2023
|
+
--tw-shadow: var(--tw-shadow-colored);
|
|
2024
|
+
}
|
|
2025
|
+
|
|
1976
2026
|
.outline {
|
|
1977
2027
|
outline-style: solid;
|
|
1978
2028
|
}
|
|
@@ -2132,3 +2182,7 @@ menu {
|
|
|
2132
2182
|
.active\:opacity-50:active {
|
|
2133
2183
|
opacity: 0.5;
|
|
2134
2184
|
}
|
|
2185
|
+
|
|
2186
|
+
.group:hover .group-hover\:opacity-100 {
|
|
2187
|
+
opacity: 1;
|
|
2188
|
+
}
|
|
@@ -12,6 +12,11 @@ const __default__ = defineComponent({
|
|
|
12
12
|
});
|
|
13
13
|
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
14
14
|
props: {
|
|
15
|
+
// 外部自定义树形数据接收 promise
|
|
16
|
+
customDataFn: {
|
|
17
|
+
type: Function,
|
|
18
|
+
default: null
|
|
19
|
+
},
|
|
15
20
|
// 数据获取类型 custom 自定义数据
|
|
16
21
|
type: {
|
|
17
22
|
type: String,
|
|
@@ -19,11 +19,20 @@ function useDeviceTree(hy) {
|
|
|
19
19
|
emits("onRefreshData");
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
let data = {};
|
|
23
|
+
if (props.customDataFn) {
|
|
24
|
+
data = await props.customDataFn({
|
|
25
|
+
showDevice: true,
|
|
26
|
+
showGroup: false,
|
|
27
|
+
...props.requestParams
|
|
28
|
+
});
|
|
29
|
+
} else {
|
|
30
|
+
data = await orgListWithDev3Api({
|
|
31
|
+
showDevice: true,
|
|
32
|
+
showGroup: false,
|
|
33
|
+
...props.requestParams
|
|
34
|
+
});
|
|
35
|
+
}
|
|
27
36
|
hy.hyTreeRef.value.getData(data).then(() => {
|
|
28
37
|
emits("on-load");
|
|
29
38
|
});
|
|
@@ -78,6 +87,7 @@ function useDeviceTree(hy) {
|
|
|
78
87
|
emits("on-dblclick", list);
|
|
79
88
|
}
|
|
80
89
|
function onSelectedDataList(list) {
|
|
90
|
+
console.log("\u9009\u4E2D\u7684\u8BBE\u5907");
|
|
81
91
|
emits("on-selectedDataList", list);
|
|
82
92
|
}
|
|
83
93
|
function singleRemovalFn(row, isForce = false) {
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, toDisplayString, createElementBlock, createCommentVNode } from 'vue';
|
|
2
|
+
import '../../../utils/index.mjs';
|
|
3
|
+
import '../../../components/index.mjs';
|
|
4
|
+
import { HyTooltip } from '../../../components/hyTooltip/index.mjs';
|
|
5
|
+
import { HyIcon } from '../../../components/hyIcon/index.mjs';
|
|
6
|
+
import { getDeviceTypeIcon } from '../../../utils/device.mjs';
|
|
7
|
+
|
|
8
|
+
const _sfc_main = {
|
|
9
|
+
__name: "deviceItem",
|
|
10
|
+
props: {
|
|
11
|
+
deleteFn: {
|
|
12
|
+
type: Function
|
|
13
|
+
},
|
|
14
|
+
index: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default() {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
source: {
|
|
21
|
+
type: Object,
|
|
22
|
+
default() {
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
setup(__props) {
|
|
28
|
+
const props = __props;
|
|
29
|
+
return (_ctx, _cache) => {
|
|
30
|
+
return openBlock(), createBlock(unref(HyTooltip), null, {
|
|
31
|
+
content: withCtx(() => [
|
|
32
|
+
createElementVNode("div", { class: "w-full flex flex-col gap-3" }, [
|
|
33
|
+
__props.source.devName ? (openBlock(), createElementBlock("div", {
|
|
34
|
+
key: 0,
|
|
35
|
+
class: "flex"
|
|
36
|
+
}, [
|
|
37
|
+
createElementVNode("div", {
|
|
38
|
+
class: "w-20 flex-shrink-0 text-auxiliary",
|
|
39
|
+
style: { "text-align-last": "justify" }
|
|
40
|
+
}, "\u8BBE\u5907\u540D\u79F0"),
|
|
41
|
+
createElementVNode("span", { class: "text-auxiliary" }, ":"),
|
|
42
|
+
createElementVNode(
|
|
43
|
+
"span",
|
|
44
|
+
{ class: "ml-1" },
|
|
45
|
+
toDisplayString(__props.source.devName),
|
|
46
|
+
1
|
|
47
|
+
/* TEXT */
|
|
48
|
+
)
|
|
49
|
+
])) : createCommentVNode("v-if", true),
|
|
50
|
+
__props.source.deviceId ? (openBlock(), createElementBlock("div", {
|
|
51
|
+
key: 1,
|
|
52
|
+
class: "flex"
|
|
53
|
+
}, [
|
|
54
|
+
createElementVNode("div", {
|
|
55
|
+
class: "w-20 flex-shrink-0 text-auxiliary",
|
|
56
|
+
style: { "text-align-last": "justify" }
|
|
57
|
+
}, "\uFF29\uFF2D\uFF25\uFF29"),
|
|
58
|
+
createElementVNode("span", { class: "text-auxiliary" }, ":"),
|
|
59
|
+
createElementVNode(
|
|
60
|
+
"span",
|
|
61
|
+
{ class: "ml-1" },
|
|
62
|
+
toDisplayString(__props.source.deviceId),
|
|
63
|
+
1
|
|
64
|
+
/* TEXT */
|
|
65
|
+
)
|
|
66
|
+
])) : createCommentVNode("v-if", true),
|
|
67
|
+
__props.source.name ? (openBlock(), createElementBlock("div", {
|
|
68
|
+
key: 2,
|
|
69
|
+
class: "flex"
|
|
70
|
+
}, [
|
|
71
|
+
createElementVNode("div", {
|
|
72
|
+
class: "w-20 flex-shrink-0 text-auxiliary",
|
|
73
|
+
style: { "text-align-last": "justify" }
|
|
74
|
+
}, "\u5F53\u524D\u7528\u6237"),
|
|
75
|
+
createElementVNode("span", { class: "text-auxiliary" }, ":"),
|
|
76
|
+
createElementVNode(
|
|
77
|
+
"span",
|
|
78
|
+
{ class: "ml-1" },
|
|
79
|
+
toDisplayString(__props.source.name),
|
|
80
|
+
1
|
|
81
|
+
/* TEXT */
|
|
82
|
+
)
|
|
83
|
+
])) : createCommentVNode("v-if", true)
|
|
84
|
+
])
|
|
85
|
+
]),
|
|
86
|
+
default: withCtx(() => [
|
|
87
|
+
createElementVNode("div", { class: "w-full h-8 rounded bg-background-2 flex items-center box-border px-2 text-sm text-main mb-2 cursor-pointer group" }, [
|
|
88
|
+
createVNode(unref(HyIcon), {
|
|
89
|
+
svgName: unref(getDeviceTypeIcon)(__props.source.deviceType, __props.source.onlineState),
|
|
90
|
+
class: "w-3 h-4 mr-1"
|
|
91
|
+
}, null, 8, ["svgName"]),
|
|
92
|
+
createElementVNode(
|
|
93
|
+
"span",
|
|
94
|
+
{ class: "truncate" },
|
|
95
|
+
toDisplayString(__props.source.devName),
|
|
96
|
+
1
|
|
97
|
+
/* TEXT */
|
|
98
|
+
),
|
|
99
|
+
createVNode(unref(HyIcon), {
|
|
100
|
+
onClick: ($event) => __props.deleteFn(__props.source, __props.index),
|
|
101
|
+
svgName: "ops-linear-delete-v3",
|
|
102
|
+
class: "w-4 h-4 text-danger ml-auto opacity-0 group-hover:opacity-100"
|
|
103
|
+
}, null, 8, ["onClick"])
|
|
104
|
+
])
|
|
105
|
+
]),
|
|
106
|
+
_: 1
|
|
107
|
+
/* STABLE */
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ref, useTemplateRef } from 'vue';
|
|
2
|
+
import '../../../api/organization.mjs';
|
|
3
|
+
|
|
4
|
+
function useHySelectDeviceTree(hy) {
|
|
5
|
+
const emits = hy.emits;
|
|
6
|
+
const props = hy.props;
|
|
7
|
+
const selDeviceList = ref([]);
|
|
8
|
+
const hyDeviceTreeRef = useTemplateRef("hyDeviceTreeRef");
|
|
9
|
+
function onCheckTreeFn(list = []) {
|
|
10
|
+
console.log("\u9009\u4E2D\u7684\u8BBE\u5907", list);
|
|
11
|
+
selDeviceList.value = list;
|
|
12
|
+
}
|
|
13
|
+
function deleteFn(device, index) {
|
|
14
|
+
selDeviceList.value.splice(index, 1);
|
|
15
|
+
hyDeviceTreeRef.value.singleRemovalFn(device);
|
|
16
|
+
}
|
|
17
|
+
function clearAllFn() {
|
|
18
|
+
selDeviceList.value = [];
|
|
19
|
+
hyDeviceTreeRef.value.setCheckedKeys([]);
|
|
20
|
+
}
|
|
21
|
+
function getData() {
|
|
22
|
+
const list = selDeviceList.value.map((item) => item);
|
|
23
|
+
return list;
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
selDeviceList,
|
|
27
|
+
hyDeviceTreeRef,
|
|
28
|
+
deleteFn,
|
|
29
|
+
onCheckTreeFn,
|
|
30
|
+
clearAllFn,
|
|
31
|
+
getData
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { useHySelectDeviceTree };
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createCommentVNode, createElementVNode, createVNode, unref, mergeProps, withCtx, createTextVNode, toDisplayString, createBlock } from 'vue';
|
|
2
|
+
import '../../index.mjs';
|
|
3
|
+
import VirtualList from 'vue3-virtual-scroll-list';
|
|
4
|
+
import _sfc_main$1 from './cpns/deviceItem.vue.mjs';
|
|
5
|
+
import '../../hooks/index.mjs';
|
|
6
|
+
import { useHySelectDeviceTree } from './js/index.mjs';
|
|
7
|
+
import { useMixins } from '../../hooks/useMixins.mjs';
|
|
8
|
+
import { HyDeviceTree } from '../hyDeviceTree/index.mjs';
|
|
9
|
+
import { HyButton } from '../../components/hyButton/index.mjs';
|
|
10
|
+
import { HyIcon } from '../../components/hyIcon/index.mjs';
|
|
11
|
+
|
|
12
|
+
import "./style/selectDeviceTree.scss";
|
|
13
|
+
|
|
14
|
+
const __default__ = defineComponent({
|
|
15
|
+
name: "HySelectDeviceTree"
|
|
16
|
+
});
|
|
17
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
18
|
+
props: {
|
|
19
|
+
text: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: "\u5DF2\u9009\u62E9\u8BBE\u5907\uFF1A"
|
|
22
|
+
},
|
|
23
|
+
noDataText: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: "\u6682\u672A\u9009\u62E9\u8BBE\u5907"
|
|
26
|
+
},
|
|
27
|
+
// 请求的额外参数
|
|
28
|
+
requestParams: {
|
|
29
|
+
type: Object,
|
|
30
|
+
default: () => ({})
|
|
31
|
+
},
|
|
32
|
+
/* 禁止选择 */
|
|
33
|
+
disableSelection: {
|
|
34
|
+
type: Array,
|
|
35
|
+
default: () => {
|
|
36
|
+
return [];
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
// 是否开启按照设备在线和离线状态排序,仅支持 device 和 groupDevice 业务类型
|
|
40
|
+
deviceOrderSort: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: true
|
|
43
|
+
},
|
|
44
|
+
// 外部自定义树形数据接收 promise
|
|
45
|
+
customDataFn: {
|
|
46
|
+
type: Function,
|
|
47
|
+
default: null
|
|
48
|
+
},
|
|
49
|
+
/* 默认选中列表 */
|
|
50
|
+
selectedByDefault: {
|
|
51
|
+
type: Array,
|
|
52
|
+
default: () => {
|
|
53
|
+
return [];
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
// 是否清除无数据的部门
|
|
57
|
+
clearEmptyBusiness: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: false
|
|
60
|
+
},
|
|
61
|
+
// 仅展示在线数据
|
|
62
|
+
showOnlineOnly: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: false
|
|
65
|
+
},
|
|
66
|
+
/* 是否开启多选框 */
|
|
67
|
+
showCheckbox: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: true
|
|
70
|
+
},
|
|
71
|
+
/* 是否开启单选框 */
|
|
72
|
+
showSinglebox: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: false
|
|
75
|
+
},
|
|
76
|
+
placeholder: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: "\u8BF7\u8F93\u5165"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
emits: [],
|
|
82
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
83
|
+
const props = __props;
|
|
84
|
+
const emits = __emit;
|
|
85
|
+
const {
|
|
86
|
+
selDeviceList,
|
|
87
|
+
hyDeviceTreeRef,
|
|
88
|
+
deleteFn,
|
|
89
|
+
onCheckTreeFn,
|
|
90
|
+
clearAllFn,
|
|
91
|
+
getData
|
|
92
|
+
} = useMixins({ props, emits }, [useHySelectDeviceTree]);
|
|
93
|
+
__expose({
|
|
94
|
+
getData
|
|
95
|
+
});
|
|
96
|
+
return (_ctx, _cache) => {
|
|
97
|
+
return openBlock(), createElementBlock("div", { class: "w-full h-full flex gap-4" }, [
|
|
98
|
+
createCommentVNode(" HySelectDeviceTree \u5185\u5BB9 "),
|
|
99
|
+
createElementVNode("div", { class: "w-0 flex-grow h-full p-3 box-border shadow-[inset_0_0_10px_0] shadow-auxiliary rounded" }, [
|
|
100
|
+
createVNode(unref(HyDeviceTree), mergeProps({
|
|
101
|
+
ref_key: "hyDeviceTreeRef",
|
|
102
|
+
ref: hyDeviceTreeRef,
|
|
103
|
+
onOnCheckTree: unref(onCheckTreeFn),
|
|
104
|
+
isBackDefaultSelected: true
|
|
105
|
+
}, { ...props }), null, 16, ["onOnCheckTree"])
|
|
106
|
+
]),
|
|
107
|
+
createElementVNode("div", { class: "w-0 flex-grow h-full flex flex-col gap-3" }, [
|
|
108
|
+
createElementVNode("div", { class: "flex justify-between items-center" }, [
|
|
109
|
+
createVNode(unref(HyButton), {
|
|
110
|
+
onClick: unref(clearAllFn),
|
|
111
|
+
type: "danger",
|
|
112
|
+
size: "small"
|
|
113
|
+
}, {
|
|
114
|
+
default: withCtx(() => [
|
|
115
|
+
createTextVNode("\u6E05\u7A7A")
|
|
116
|
+
]),
|
|
117
|
+
_: 1
|
|
118
|
+
/* STABLE */
|
|
119
|
+
}, 8, ["onClick"]),
|
|
120
|
+
createElementVNode(
|
|
121
|
+
"span",
|
|
122
|
+
{ class: "text-sm text-theme" },
|
|
123
|
+
toDisplayString(__props.text) + toDisplayString(unref(selDeviceList).length ? unref(selDeviceList).length : ""),
|
|
124
|
+
1
|
|
125
|
+
/* TEXT */
|
|
126
|
+
)
|
|
127
|
+
]),
|
|
128
|
+
createElementVNode("div", { class: "w-full h-0 flex-grow box-border py-3 flex flex-col shadow-[inset_0_0_10px_0] rounded !shadow-auxiliary" }, [
|
|
129
|
+
unref(selDeviceList).length ? (openBlock(), createBlock(unref(VirtualList), {
|
|
130
|
+
key: 0,
|
|
131
|
+
class: "w-full h-full px-3 overflow-auto box-border",
|
|
132
|
+
"data-key": "id",
|
|
133
|
+
"data-sources": unref(selDeviceList),
|
|
134
|
+
"data-component": _sfc_main$1,
|
|
135
|
+
keeps: 30,
|
|
136
|
+
"estimate-size": 34,
|
|
137
|
+
"extra-props": {
|
|
138
|
+
deleteFn: unref(deleteFn)
|
|
139
|
+
}
|
|
140
|
+
}, null, 8, ["data-sources", "extra-props"])) : (openBlock(), createElementBlock("div", {
|
|
141
|
+
key: 1,
|
|
142
|
+
class: "w-full h-full flex flex-col justify-center items-center gap-3"
|
|
143
|
+
}, [
|
|
144
|
+
createVNode(unref(HyIcon), {
|
|
145
|
+
svgName: "ops-list-no-data",
|
|
146
|
+
class: "w-[34px] h-[46px]"
|
|
147
|
+
}),
|
|
148
|
+
createElementVNode(
|
|
149
|
+
"span",
|
|
150
|
+
{ class: "text-auxiliary text-sm" },
|
|
151
|
+
toDisplayString(__props.noDataText),
|
|
152
|
+
1
|
|
153
|
+
/* TEXT */
|
|
154
|
+
)
|
|
155
|
+
]))
|
|
156
|
+
])
|
|
157
|
+
])
|
|
158
|
+
]);
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
export { _sfc_main as default };
|
|
File without changes
|
package/es/bussiness/index.mjs
CHANGED
|
@@ -9,3 +9,4 @@ export { HyAddElectronicFenceDialog, HyBatchSetElectronicFenceUserDialog, HyElec
|
|
|
9
9
|
export { HyRuleAssignDialog, HyRuleFenceDialog, HyRuleSetting, HyRuleSettingDialog, HySetRuleAggregationAlarmDialog } from './hyRuleSetting/index.mjs';
|
|
10
10
|
export { HyDisplayQueryAddress } from './hyDisplayQueryAddress/index.mjs';
|
|
11
11
|
export { HyFilePlayback } from './hyFilePlayback/index.mjs';
|
|
12
|
+
export { HySelectDeviceTree } from './hySelectDeviceTree/index.mjs';
|