hy-dispatch-ui-v3 0.2.65 → 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 +11 -7
- package/es/components/hyTree/tree.vue.mjs +18 -35
- 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 +11 -7
- package/lib/components/hyTree/tree.vue.js +18 -35
- 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
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
|
@@ -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;
|
|
File without changes
|