hy-dispatch-ui-v3 0.2.64 → 0.2.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/dist/tailwind.css +26 -12
  2. package/es/api/organization.mjs +43 -0
  3. package/es/bussiness/hyAcquisitionStationTree/acquisitionStationTree.vue.mjs +245 -0
  4. package/es/bussiness/hyAcquisitionStationTree/index.mjs +7 -0
  5. package/es/bussiness/hyAcquisitionStationTree/js/index.mjs +124 -0
  6. package/es/bussiness/hyAcquisitionStationTree/style/acquisitionStationTree.scss +0 -0
  7. package/es/bussiness/hyDeviceTree/deviceTree.vue.mjs +249 -0
  8. package/es/bussiness/hyDeviceTree/index.mjs +7 -0
  9. package/es/bussiness/hyDeviceTree/js/index.mjs +126 -0
  10. package/es/bussiness/hyDeviceTree/style/deviceTree.scss +0 -0
  11. package/es/bussiness/hyOrgGroupTree/index.mjs +7 -0
  12. package/es/bussiness/hyOrgGroupTree/js/index.mjs +124 -0
  13. package/es/bussiness/hyOrgGroupTree/orgGroupTree.vue.mjs +245 -0
  14. package/es/bussiness/hyOrgGroupTree/style/orgGroupTree.scss +0 -0
  15. package/es/bussiness/hyPlanGroupDeviceTree/index.mjs +7 -0
  16. package/es/bussiness/hyPlanGroupDeviceTree/js/index.mjs +124 -0
  17. package/es/bussiness/hyPlanGroupDeviceTree/planGroupDeviceTree.vue.mjs +245 -0
  18. package/es/bussiness/hyPlanGroupDeviceTree/style/planGroupDeviceTree.scss +0 -0
  19. package/es/bussiness/hyUserTree/index.mjs +7 -0
  20. package/es/bussiness/hyUserTree/js/index.mjs +126 -0
  21. package/es/bussiness/hyUserTree/style/userTree.scss +0 -0
  22. package/es/bussiness/hyUserTree/userTree.vue.mjs +239 -0
  23. package/es/bussiness/index.mjs +5 -0
  24. package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +18 -16
  25. package/es/components/hyButton/button.vue.mjs +3 -2
  26. package/es/components/hyButton/style/button.scss +70 -0
  27. package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +1 -2
  28. package/es/components/hyForm/cpns/formItem.vue.mjs +198 -26
  29. package/es/components/hyForm/cpns/locationSelect.vue.mjs +8 -1
  30. package/es/components/hyForm/form.vue.mjs +74 -19
  31. package/es/components/hyForm/js/index.mjs +2 -1
  32. package/es/components/hyForm/js/useAppForm.mjs +2 -2
  33. package/es/components/hyIcon/style/icon.scss +1 -0
  34. package/es/components/hyNoPermissions/noPermissions.vue.mjs +1 -1
  35. package/es/components/hyNoPermissionsMap/noPermissionsMap.vue.mjs +1 -1
  36. package/es/components/hyOrgCascader/orgCascader.vue.mjs +69 -14
  37. package/es/components/hyRadioGroup/radioGroup.vue.mjs +5 -4
  38. package/es/components/hySearch/cpns/searchItem.vue.mjs +167 -11
  39. package/es/components/hySearch/js/index.mjs +2 -1
  40. package/es/components/hySearch/search.vue.mjs +60 -9
  41. package/es/components/hyTable/cpns/columnSelect.vue.mjs +21 -22
  42. package/es/components/hyTable/cpns/virtualTable.vue.mjs +10 -15
  43. package/es/components/hyTable/js/index.mjs +5 -12
  44. package/es/components/hyTable/js/search.mjs +3 -1
  45. package/es/components/hyTable/style/table.scss +13 -0
  46. package/es/components/hyTable/table.vue.mjs +21 -9
  47. package/es/components/hyTableActionButton/tableActionButton.vue.mjs +8 -10
  48. package/es/components/hyTableForm/batchTableForm.vue.mjs +13 -3
  49. package/es/components/hyTableForm/tableForm.vue.mjs +17 -11
  50. package/es/components/hyTour/index.mjs +7 -0
  51. package/es/components/hyTour/style/tour.scss +0 -0
  52. package/es/components/hyTour/tour.vue.mjs +23 -0
  53. package/es/components/hyTree/config/tree-config.mjs +5 -2
  54. package/es/components/hyTree/js/index.mjs +75 -68
  55. package/es/components/hyTree/tree.vue.mjs +19 -36
  56. package/es/components/index.mjs +1 -0
  57. package/es/index.mjs +6 -0
  58. package/es/static/hy-svg-icons/hy-icon-ops-linear-arrow.js +10 -0
  59. package/es/style/element/hy-element.scss +24 -3
  60. package/es/style/theme.scss +1 -0
  61. package/es/utils/map/hook/bigMap.mjs +9 -1
  62. package/es/utils/map/hook/gaode.mjs +9 -1
  63. package/es/utils/map/hook/leafletjs.mjs +10 -1
  64. package/es/version.mjs +1 -1
  65. package/lib/api/organization.js +47 -0
  66. package/lib/bussiness/hyAcquisitionStationTree/acquisitionStationTree.vue.js +249 -0
  67. package/lib/bussiness/hyAcquisitionStationTree/index.js +12 -0
  68. package/lib/bussiness/hyAcquisitionStationTree/js/index.js +126 -0
  69. package/lib/bussiness/hyAcquisitionStationTree/style/acquisitionStationTree.scss +0 -0
  70. package/lib/bussiness/hyDeviceTree/deviceTree.vue.js +253 -0
  71. package/lib/bussiness/hyDeviceTree/index.js +12 -0
  72. package/lib/bussiness/hyDeviceTree/js/index.js +128 -0
  73. package/lib/bussiness/hyDeviceTree/style/deviceTree.scss +0 -0
  74. package/lib/bussiness/hyOrgGroupTree/index.js +12 -0
  75. package/lib/bussiness/hyOrgGroupTree/js/index.js +126 -0
  76. package/lib/bussiness/hyOrgGroupTree/orgGroupTree.vue.js +249 -0
  77. package/lib/bussiness/hyOrgGroupTree/style/orgGroupTree.scss +0 -0
  78. package/lib/bussiness/hyPlanGroupDeviceTree/index.js +12 -0
  79. package/lib/bussiness/hyPlanGroupDeviceTree/js/index.js +126 -0
  80. package/lib/bussiness/hyPlanGroupDeviceTree/planGroupDeviceTree.vue.js +249 -0
  81. package/lib/bussiness/hyPlanGroupDeviceTree/style/planGroupDeviceTree.scss +0 -0
  82. package/lib/bussiness/hyUserTree/index.js +12 -0
  83. package/lib/bussiness/hyUserTree/js/index.js +128 -0
  84. package/lib/bussiness/hyUserTree/style/userTree.scss +0 -0
  85. package/lib/bussiness/hyUserTree/userTree.vue.js +243 -0
  86. package/lib/bussiness/index.js +14 -4
  87. package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +18 -16
  88. package/lib/components/hyButton/button.vue.js +3 -2
  89. package/lib/components/hyButton/style/button.scss +70 -0
  90. package/lib/components/hyConfirmDialog/confirmDialog.vue.js +0 -1
  91. package/lib/components/hyForm/cpns/formItem.vue.js +195 -23
  92. package/lib/components/hyForm/cpns/locationSelect.vue.js +8 -1
  93. package/lib/components/hyForm/form.vue.js +72 -17
  94. package/lib/components/hyForm/js/index.js +2 -0
  95. package/lib/components/hyForm/js/useAppForm.js +2 -2
  96. package/lib/components/hyIcon/style/icon.scss +1 -0
  97. package/lib/components/hyNoPermissions/noPermissions.vue.js +1 -1
  98. package/lib/components/hyNoPermissionsMap/noPermissionsMap.vue.js +1 -1
  99. package/lib/components/hyOrgCascader/orgCascader.vue.js +67 -12
  100. package/lib/components/hyRadioGroup/radioGroup.vue.js +5 -4
  101. package/lib/components/hySearch/cpns/searchItem.vue.js +164 -8
  102. package/lib/components/hySearch/js/index.js +2 -0
  103. package/lib/components/hySearch/search.vue.js +58 -7
  104. package/lib/components/hyTable/cpns/columnSelect.vue.js +20 -21
  105. package/lib/components/hyTable/cpns/virtualTable.vue.js +27 -32
  106. package/lib/components/hyTable/js/index.js +5 -12
  107. package/lib/components/hyTable/js/search.js +3 -1
  108. package/lib/components/hyTable/style/table.scss +13 -0
  109. package/lib/components/hyTable/table.vue.js +20 -8
  110. package/lib/components/hyTableActionButton/tableActionButton.vue.js +7 -9
  111. package/lib/components/hyTableForm/batchTableForm.vue.js +13 -3
  112. package/lib/components/hyTableForm/tableForm.vue.js +18 -12
  113. package/lib/components/hyTour/index.js +12 -0
  114. package/lib/components/hyTour/style/tour.scss +0 -0
  115. package/lib/components/hyTour/tour.vue.js +27 -0
  116. package/lib/components/hyTree/config/tree-config.js +5 -2
  117. package/lib/components/hyTree/js/index.js +75 -68
  118. package/lib/components/hyTree/tree.vue.js +19 -36
  119. package/lib/components/index.js +8 -6
  120. package/lib/index.js +67 -55
  121. package/lib/static/hy-svg-icons/hy-icon-ops-linear-arrow.js +10 -0
  122. package/lib/style/element/hy-element.scss +24 -3
  123. package/lib/style/theme.scss +1 -0
  124. package/lib/utils/map/hook/bigMap.js +9 -1
  125. package/lib/utils/map/hook/gaode.js +9 -1
  126. package/lib/utils/map/hook/leafletjs.js +10 -1
  127. package/lib/version.js +1 -1
  128. package/package.json +1 -1
@@ -3,8 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var vue = require('vue');
6
- var elementPlus = require('element-plus');
7
- var iconsVue = require('@element-plus/icons-vue');
8
6
  require('../index.js');
9
7
  require('../../utils/index.js');
10
8
  var index = require('./js/index.js');
@@ -14,7 +12,8 @@ var is = require('../../utils/is.js');
14
12
  var handler = require('../../utils/handler.js');
15
13
  var index$1 = require('../hyButton/index.js');
16
14
  var index$2 = require('../hyTable/index.js');
17
- var index$3 = require('../hyForm/index.js');
15
+ var index$3 = require('../hyIcon/index.js');
16
+ var index$4 = require('../hyForm/index.js');
18
17
 
19
18
  import "./style/tableForm.scss";
20
19
 
@@ -72,10 +71,19 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
72
71
  default: true
73
72
  }
74
73
  },
75
- emits: ["validate"],
74
+ emits: ["validate", "tableDataChange"],
76
75
  setup(__props, { expose: __expose, emit: __emit }) {
77
76
  const props = __props;
78
77
  const emits = __emit;
78
+ vue.onMounted(() => {
79
+ vue.watch(
80
+ () => dataSource.value,
81
+ () => {
82
+ emits("tableDataChange", dataSource.value);
83
+ },
84
+ { deep: true, immediate: true }
85
+ );
86
+ });
79
87
  const tableRef = vue.useTemplateRef("tableRef");
80
88
  const formRef = vue.useTemplateRef("formRef");
81
89
  const dataSource = vue.ref([]);
@@ -169,10 +177,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
169
177
  await initValidateHandler([data]);
170
178
  if (!dataSource.value.length) {
171
179
  dataSource.value = [data];
172
- setData(dataSource.value);
173
180
  } else {
174
181
  dataSource.value.push(data);
175
182
  }
183
+ setData(dataSource.value);
176
184
  emits("validate", {
177
185
  ...statistics.value
178
186
  });
@@ -439,12 +447,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
439
447
  class: vue.normalizeClass(["flex items-center gap-1.5 text-danger-2 transition-all duration-300 overflow-hidden", [row.errorMsg ? "h-full" : "h-0"]])
440
448
  },
441
449
  [
442
- row.errorMsg ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElIcon), { key: 0 }, {
443
- default: vue.withCtx(() => [
444
- vue.createVNode(vue.unref(iconsVue.Warning))
445
- ]),
446
- _: 1
447
- /* STABLE */
450
+ row.errorMsg ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.HyIcon), {
451
+ key: 0,
452
+ "svg-name": "dispatch-share1-prompt",
453
+ class: "!w-3 !h-3"
448
454
  })) : vue.createCommentVNode("v-if", true),
449
455
  vue.createElementVNode(
450
456
  "span",
@@ -458,7 +464,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
458
464
  /* CLASS */
459
465
  )
460
466
  ]),
461
- vue.createVNode(vue.unref(index$3.HyForm), {
467
+ vue.createVNode(vue.unref(index$4.HyForm), {
462
468
  ref_key: "formRef",
463
469
  ref: formRef,
464
470
  model: row,
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tour = require('./tour.vue.js');
6
+ require('../../utils/index.js');
7
+ var handler = require('../../utils/handler.js');
8
+
9
+ const HyTour = handler.withInstall(tour.default);
10
+
11
+ exports.HyTour = HyTour;
12
+ exports.default = HyTour;
File without changes
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var vue = require('vue');
6
+
7
+ import "./style/tour.scss";
8
+
9
+ const __default__ = vue.defineComponent({
10
+ name: "HyTour"
11
+ });
12
+ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
13
+ props: {},
14
+ emits: [],
15
+ setup(__props, { expose: __expose, emit: __emit }) {
16
+ const props = __props;
17
+ const emits = __emit;
18
+ __expose({});
19
+ return (_ctx, _cache) => {
20
+ return vue.openBlock(), vue.createElementBlock("div", null, [
21
+ vue.createCommentVNode(" HyTour \u5185\u5BB9 ")
22
+ ]);
23
+ };
24
+ }
25
+ });
26
+
27
+ exports.default = _sfc_main;
@@ -11,13 +11,16 @@ const treeTypeConfig = {
11
11
  // 群组设备树形
12
12
  group: "group",
13
13
  // 群组树形
14
- planGroupDevicee: "planGroupDevicee",
14
+ planGroupDevice: "planGroupDevice",
15
15
  // 预案分组树形
16
16
  cs: "cs",
17
17
  // 采集站树形
18
18
  teamUser: "teamUser",
19
19
  // 队伍树形
20
- userMail: "userMail"
20
+ userMail: "userMail",
21
+ // 用户通讯录树形
22
+ mapRail: "mapRail"
23
+ // 电子围栏树形
21
24
  };
22
25
  const searchTypeConfig = {
23
26
  fullSearch: 1,
@@ -16,7 +16,7 @@ const deviceStatus = {
16
16
  1: "\u5728\u7EBF"
17
17
  };
18
18
  const useAppTreeWrapper = (hy) => {
19
- const { props: props2, emits, slots, treeRef, VirtualTree } = hy;
19
+ const { props, emits, slots, treeRef, VirtualTree } = hy;
20
20
  const instance = vue.getCurrentInstance();
21
21
  const slotAppContext = instance ? {
22
22
  ...instance.appContext,
@@ -35,17 +35,17 @@ const useAppTreeWrapper = (hy) => {
35
35
  const selectFilterList = vue.ref([]);
36
36
  const loading = vue.ref(true);
37
37
  vue.watch(
38
- () => props2.showCheckbox,
38
+ () => props.showCheckbox,
39
39
  (newVal) => {
40
40
  virtualTree?.setRowSelection({
41
- type: props2.showCheckbox ? "checkbox" : "radio"
41
+ type: props.showCheckbox ? "checkbox" : "radio"
42
42
  });
43
43
  }
44
44
  );
45
45
  function getData(dataList) {
46
46
  return new Promise((resolve) => {
47
47
  hy.loading.value = true;
48
- if (props2.disableSelection?.length) {
48
+ if (props.disableSelection?.length) {
49
49
  setDisAbleSelectionMap();
50
50
  }
51
51
  if (!virtualTree) {
@@ -58,12 +58,13 @@ const useAppTreeWrapper = (hy) => {
58
58
  itemHeight: 30,
59
59
  // 可视区域外的缓冲项数量
60
60
  bufferSize: 10,
61
- // 可视区域外的缓冲项数量
61
+ // 相邻级节点间的水平缩进,单位为像素
62
62
  indent: 16,
63
63
  emptyText: "\u6682\u65E0\u6570\u636E",
64
- business: props2.treeType,
64
+ // 树形业务类型
65
+ business: props.treeType,
65
66
  // 自定义整体的插槽
66
- renderItem: props2.treeType === treeConfig.treeTypeConfig.user ? (data, node) => setUserSlot(data, node) : setSlot("treeParentSlot"),
67
+ renderItem: props.treeType === treeConfig.treeTypeConfig.user ? (data, node) => setUserSlot(data, node) : setSlot("treeParentSlot"),
67
68
  // // 自定义状态右侧插槽
68
69
  renderRight: (data) => {
69
70
  let renderRight = setSlot("renderRight");
@@ -89,9 +90,10 @@ const useAppTreeWrapper = (hy) => {
89
90
  return true;
90
91
  },
91
92
  // // 自定义状态模块
92
- renderStatus: props2.treeType === treeConfig.treeTypeConfig.device || props2.treeType === treeConfig.treeTypeConfig.channel ? (data) => setRenderStatus(data) : null,
93
+ renderStatus: props.treeType === treeConfig.treeTypeConfig.device || props.treeType === treeConfig.treeTypeConfig.channel ? (data) => setRenderStatus(data) : null,
94
+ // 暂无数据插槽
93
95
  renderEmpty: () => {
94
- if (!props2.showCustomEmpty || hy.filterValue.value) return true;
96
+ if (!props.showCustomEmpty || hy.filterValue.value) return true;
95
97
  let renderEmpty = setSlot("renderEmpty");
96
98
  if (renderEmpty) {
97
99
  const target = renderEmpty();
@@ -100,7 +102,8 @@ const useAppTreeWrapper = (hy) => {
100
102
  return setEmpty();
101
103
  },
102
104
  props: {
103
- showStatus: true,
105
+ // 是否显示右侧业务状态
106
+ showStatus: props.showStatus,
104
107
  disabled: (data) => {
105
108
  if (data.dataType === 5 || data.dataType === 3) {
106
109
  if (hy.disableSelectionMap.value) {
@@ -110,23 +113,25 @@ const useAppTreeWrapper = (hy) => {
110
113
  }
111
114
  return false;
112
115
  },
113
- ...props2.treeProps
116
+ ...props.treeProps
114
117
  },
115
118
  rowSelection: {
116
- type: props2.showCheckbox ? "checkbox" : "radio",
117
- highlight: props2.highlight,
118
- checkStrictly: props2.checkStrictly,
119
+ type: props.showCheckbox ? "checkbox" : "radio",
120
+ // 是否高亮选中项
121
+ highlight: props.highlight,
122
+ // 是否严格遵循父子不互相关联
123
+ checkStrictly: props.checkStrictly,
119
124
  // 是否显示选项 showSinglebox 单选为true时部门不显示其他节点显示选择框
120
125
  showSelect: (data) => {
121
126
  if (data.dataType === 1) {
122
- return props2.showCheckbox;
127
+ return props.showCheckbox;
123
128
  }
124
- return props2.showCheckbox || props2.showSinglebox;
129
+ return props.showCheckbox || props.showSinglebox;
125
130
  },
126
131
  // 单选时是否可以取消选择
127
- cancelable: props2.cancelable,
132
+ cancelable: props.cancelable,
128
133
  // 是否显示多选框或单选框
129
- showSelectBox: props2.showSelectBox,
134
+ showSelectBox: props.showSelectBox,
130
135
  // 选中回调
131
136
  onCheckChange: (data, info, checked) => {
132
137
  console.log("onCheckChange", info);
@@ -149,37 +154,40 @@ const useAppTreeWrapper = (hy) => {
149
154
  }
150
155
  },
151
156
  // 是否在点击节点的时候展开或者收缩节点
152
- expandOnClickNode: props2.expandOnClickNode,
157
+ expandOnClickNode: props.expandOnClickNode,
153
158
  // 是否在点击节点的时候选中节点
154
- checkOnClickNode: props2.checkOnClickNode,
159
+ checkOnClickNode: props.checkOnClickNode,
155
160
  // 点击叶节点(最后一个子节点)时是否检查或取消节点
156
- checkOnClickLeaf: props2.checkOnClickLeaf,
161
+ checkOnClickLeaf: props.checkOnClickLeaf,
157
162
  // 双击父节点会触发选中功能
158
- checkOnDblclickParentNode: props2.checkOnDblclickParentNode,
163
+ checkOnDblclickParentNode: props.checkOnDblclickParentNode,
159
164
  // 筛选方法
160
165
  filterMethod: ({ filterValue: filterValue2 }, data) => {
161
166
  let isFilter = true;
162
- if (props2.filterMethod) {
163
- isFilter = props2.filterMethod(data, { filterValue: filterValue2 });
167
+ if (props.filterMethod) {
168
+ isFilter = props.filterMethod(data, {
169
+ filterValue: filterValue2
170
+ });
164
171
  }
165
172
  if (filterValue2) {
166
173
  isFilter = isFilter && !!filterNodeMethod(data, filterValue2, {
167
- treeFilterParam: props2.treeFilterParam
174
+ treeFilterParam: props.treeFilterParam,
175
+ treeType: props.treeType
168
176
  });
169
177
  }
170
178
  return isFilter;
171
179
  },
172
180
  businessConfig: {
173
181
  // 是否开启按在线离线状态排序
174
- sortByStatus: props2.deviceOrderSort,
182
+ sortByStatus: props.deviceOrderSort,
175
183
  // 是否只显示在线设备
176
- showOnlineState: props2.showOnlineOnly,
184
+ showOnlineState: props.showOnlineOnly,
177
185
  // 是否清空没有业务项(设备、用户、采集器)的部门和群组
178
- clearEmptyBusiness: props2.clearEmptyBusiness,
186
+ clearEmptyBusiness: props.clearEmptyBusiness,
179
187
  // 是否显示通道节点的选择框
180
- isShowChannelSelect: props2.isShowChannelSelect,
188
+ isShowChannelSelect: props.isShowChannelSelect,
181
189
  // 初始化过滤数据
182
- filterConfig: props2.filterConfig
190
+ filterConfig: props.filterConfig
183
191
  },
184
192
  // 初始化时处理数据,想回显必须return值,若想要过滤,可不return
185
193
  handleMethod: (data) => {
@@ -200,7 +208,7 @@ const useAppTreeWrapper = (hy) => {
200
208
  },
201
209
  // 双击事件
202
210
  onNodeDblClick: (data, node, event) => {
203
- if (props2.treeType !== "channel") {
211
+ if (props.treeType !== "channel") {
204
212
  emits("on-dblclick", [{ ...data }]);
205
213
  } else {
206
214
  if (data.channelId) {
@@ -240,13 +248,13 @@ const useAppTreeWrapper = (hy) => {
240
248
  document.body.click();
241
249
  },
242
250
  onLoad: () => {
243
- if (props2.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
251
+ if (props.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
244
252
  elementPlus.ElMessage.warning("\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001");
245
253
  }
246
- if (props2.defaultSelectedOrgID && props2.showCheckbox && props2.treeType === "device") {
254
+ if (props.defaultSelectedOrgID && props.showCheckbox && props.treeType === "device") {
247
255
  setSelectedOrg(dataList);
248
- } else if (props2.selectedByDefault?.length) {
249
- setCheckedKeys(props2.selectedByDefault);
256
+ } else if (props.selectedByDefault?.length) {
257
+ setCheckedKeys(props.selectedByDefault);
250
258
  }
251
259
  if (hy.filterValue.value) {
252
260
  getFilterValue();
@@ -262,13 +270,13 @@ const useAppTreeWrapper = (hy) => {
262
270
  {
263
271
  data: dataList,
264
272
  businessConfig: {
265
- sortByStatus: props2.deviceOrderSort,
266
- showOnlineState: props2.showOnlineOnly,
267
- clearEmptyBusiness: props2.clearEmptyBusiness
273
+ sortByStatus: props.deviceOrderSort,
274
+ showOnlineState: props.showOnlineOnly,
275
+ clearEmptyBusiness: props.clearEmptyBusiness
268
276
  }
269
277
  },
270
278
  () => {
271
- if (props2.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
279
+ if (props.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
272
280
  elementPlus.ElMessage.success("\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001");
273
281
  }
274
282
  if (hy.filterValue.value) {
@@ -285,7 +293,7 @@ const useAppTreeWrapper = (hy) => {
285
293
  }
286
294
  function setEmpty() {
287
295
  let content = ``;
288
- if (!props2.showOnlineOnly) {
296
+ if (!props.showOnlineOnly) {
289
297
  setTimeout(() => {
290
298
  if (hy.addDeviceDom.value) {
291
299
  hy.addDeviceDom.value.removeEventListener("click", addDevice);
@@ -296,13 +304,13 @@ const useAppTreeWrapper = (hy) => {
296
304
  }
297
305
  });
298
306
  content = `<div class="w-full h-full flex flex-col justify-center items-center">
299
- <svg data-v-19e5a669="" data-v-56505d40="" aria-hidden="true" svgName="map_service" class="svg-icon" style="width: 40px; height: 48px"><use data-v-19e5a669="" xlink:href="#icon-noData"></use></svg>
307
+ <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>
300
308
  <span class="text-auxiliary text-sm mt-2">\u60A8\u5C1A\u672A\u6DFB\u52A0\u4EFB\u52A1\u8BBE\u5907</span>
301
309
  ${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>' : ""}
302
310
  </div>`;
303
311
  } else {
304
312
  content = `<div class="w-full h-full flex flex-col justify-center items-center">
305
- <svg data-v-19e5a669="" data-v-56505d40="" aria-hidden="true" svgName="map_service" class="svg-icon" style="width: 40px; height: 40px"><use data-v-19e5a669="" xlink:href="#icon-v3-card-device-offline"></use></svg>
313
+ <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>
306
314
  <span class="text-auxiliary text-sm mt-2">\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001</span>
307
315
  <span class="text-auxiliary text-sm whitespace-nowrap">\u8BF7\u68C0\u67E5\u8BBE\u5907\u72B6\u6001\u6216\u7F51\u7EDC\u8FDE\u63A5</span>
308
316
  </div>`;
@@ -314,7 +322,7 @@ const useAppTreeWrapper = (hy) => {
314
322
  }
315
323
  function setDisAbleSelectionMap() {
316
324
  const map = /* @__PURE__ */ new Map();
317
- props2.disableSelection.forEach((v) => {
325
+ props.disableSelection.forEach((v) => {
318
326
  map.set(v.id, true);
319
327
  });
320
328
  hy.disableSelectionMap.value = map;
@@ -338,7 +346,7 @@ const useAppTreeWrapper = (hy) => {
338
346
  container.style.display = "flex";
339
347
  container.style.width = "100%";
340
348
  const dutyHtml = `<div class="flex treeDeviceBox">
341
- ${props2.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"
349
+ ${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"
342
350
  style="border-color: ${data.rosterContentColor};background-color: ${data.rosterContentColor}70;">
343
351
  ${data.rosterContentSimple}
344
352
  </span>` : ""}
@@ -374,7 +382,6 @@ const useAppTreeWrapper = (hy) => {
374
382
  return true;
375
383
  }
376
384
  function setSlot(slotName) {
377
- console.log(slots, slotName);
378
385
  if (!slotName || !slots[slotName]) return null;
379
386
  return (data, node) => {
380
387
  let container = document.createElement("div");
@@ -418,13 +425,13 @@ const useAppTreeWrapper = (hy) => {
418
425
  virtualTree?.updateData([payload]);
419
426
  }
420
427
  function singleRemovalFn(row, isForce = false) {
421
- if (props2.treeType === "device" || props2.treeType === "channel") {
428
+ if (props.treeType === "device" || props.treeType === "channel") {
422
429
  virtualTree.setChecked(row.channelId || row.deviceId, false, true);
423
- } else if (props2.treeType) {
430
+ } else if (props.treeType) {
424
431
  virtualTree.setChecked(row.id, false, true, isForce);
425
- } else if (!props2.treeType && props2.treeProps) {
432
+ } else if (!props.treeType && props.treeProps) {
426
433
  virtualTree.setChecked(
427
- row[`${props2.treeProps.value}`],
434
+ row[`${props.treeProps.value}`],
428
435
  false,
429
436
  true,
430
437
  isForce
@@ -432,48 +439,48 @@ const useAppTreeWrapper = (hy) => {
432
439
  }
433
440
  }
434
441
  function setCheckedKeys(dataList, isForce = false) {
435
- if (props2.treeType === "device" || props2.treeType === "channel") {
442
+ if (props.treeType === "device" || props.treeType === "channel") {
436
443
  virtualTree?.setCheckedKeys(
437
444
  dataList.map((v) => v.channelId || v.deviceId),
438
445
  true,
439
446
  isForce
440
447
  );
441
- } else if (props2.treeType) {
448
+ } else if (props.treeType) {
442
449
  virtualTree?.setCheckedKeys(
443
450
  dataList.map((v) => v.id),
444
451
  true,
445
452
  isForce
446
453
  );
447
- } else if (!props2.treeType && props2.treeProps) {
454
+ } else if (!props.treeType && props.treeProps) {
448
455
  console.log(
449
456
  "\u9009\u4E2D\u56DE\u8C03",
450
- dataList.map((v) => v[`${props2.treeProps.value}`])
457
+ dataList.map((v) => v[`${props.treeProps.value}`])
451
458
  );
452
459
  virtualTree?.setCheckedKeys(
453
- dataList.map((v) => v[`${props2.treeProps.value}`]),
460
+ dataList.map((v) => v[`${props.treeProps.value}`]),
454
461
  false,
455
462
  isForce
456
463
  );
457
464
  }
458
- if (props2.isBackDefaultSelected) {
465
+ if (props.isBackDefaultSelected) {
459
466
  setTimeout(() => {
460
467
  const deviceList = virtualTree?.getCheckedBusinessNodes(true) || [];
461
468
  emits("on-selectedDataList", deviceList);
462
469
  });
463
470
  }
464
471
  }
465
- function setChecked(data, type) {
466
- if (props2.treeType === "device") {
472
+ function setChecked(data, type = true) {
473
+ if (props.treeType === "device") {
467
474
  virtualTree?.setChecked(data.channelId || data.deviceId, type, true);
468
- } else if (props2.treeType) {
475
+ } else if (props.treeType) {
469
476
  virtualTree?.setChecked(data.id, type, true);
470
- } else if (!props2.treeType && props2.treeProps) {
471
- virtualTree?.setChecked(data[`${props2.treeProps.value}`], type, true);
477
+ } else if (!props.treeType && props.treeProps) {
478
+ virtualTree?.setChecked(data[`${props.treeProps.value}`], type, false);
472
479
  }
473
480
  }
474
481
  function setSelectedOrg(deviceList) {
475
482
  for (let i = 0; i < deviceList.length; i++) {
476
- if (props2.defaultSelectedOrgID === deviceList[i].id) {
483
+ if (props.defaultSelectedOrgID === deviceList[i].id) {
477
484
  if (deviceList[i].deviceList?.length) {
478
485
  setCheckedKeys(deviceList[i].deviceList);
479
486
  }
@@ -486,19 +493,19 @@ const useAppTreeWrapper = (hy) => {
486
493
  }
487
494
  }
488
495
  function getSelectedDataList(leafOnly = false) {
489
- if (props2.treeType) {
496
+ if (props.treeType) {
490
497
  return virtualTree?.getCheckedBusinessNodes(leafOnly) || [];
491
498
  }
492
499
  return virtualTree?.getCheckedNodes(leafOnly) || [];
493
500
  }
494
501
  function setFilterListType(type) {
495
- if (props2.selectFilterList?.length) {
502
+ if (props.selectFilterList?.length) {
496
503
  hy.selectFilterList.value = JSON.parse(
497
- JSON.stringify(props2.selectFilterList)
504
+ JSON.stringify(props.selectFilterList)
498
505
  );
499
506
  return;
500
507
  }
501
- if (props2.treeType === "device") {
508
+ if (props.treeType === "device") {
502
509
  hy.selectFilterList.value = [
503
510
  {
504
511
  label: "\u5168\u90E8",
@@ -516,7 +523,7 @@ const useAppTreeWrapper = (hy) => {
516
523
  placeholder: "\u8BBE\u5907\u53F7\u3001\u8BBE\u5907\u540D\u79F0\u8FDB\u884C\u7B5B\u9009"
517
524
  }
518
525
  ];
519
- } else if (props2.treeType === "user") {
526
+ } else if (props.treeType === "user") {
520
527
  hy.selectFilterList.value = [
521
528
  {
522
529
  label: "\u5168\u90E8",
@@ -576,13 +583,13 @@ const useAppTreeWrapper = (hy) => {
576
583
  getNode
577
584
  };
578
585
  };
579
- function filterNodeMethod(data, value, { selectFilterType, treeFilterParam = [] }) {
586
+ function filterNodeMethod(data, value, { selectFilterType, treeFilterParam = [], treeType }) {
580
587
  let type = data.dataType;
581
588
  if (selectFilterType) type = selectFilterType;
582
589
  const includesValue = (field) => {
583
590
  return field && field.toString().includes(value.toString());
584
591
  };
585
- if (!props.treeType) {
592
+ if (!treeType) {
586
593
  let filterType = false;
587
594
  for (let i = 0; i < treeFilterParam.length; i++) {
588
595
  const item = treeFilterParam[i];
@@ -22,9 +22,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
22
22
  /* 禁止选择 */
23
23
  disableSelection: {
24
24
  type: Array,
25
- default: () => {
26
- return [];
27
- }
25
+ default: () => []
28
26
  },
29
27
  // 是否开启按照设备在线和离线状态排序,仅支持 device 和 groupDevice 业务类型
30
28
  deviceOrderSort: {
@@ -34,37 +32,27 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
34
32
  // 当前群组
35
33
  orgGroupId: {
36
34
  type: [Number, String],
37
- default: () => {
38
- return null;
39
- }
35
+ default: null
40
36
  },
41
37
  // 设置勤务状态
42
38
  getDutyRoster: {
43
39
  type: Boolean,
44
- default: () => {
45
- return false;
46
- }
40
+ default: false
47
41
  },
48
42
  // 仅展示在线数据
49
43
  showOnlineOnly: {
50
44
  type: Boolean,
51
- default: () => {
52
- return false;
53
- }
45
+ default: false
54
46
  },
55
47
  /* 是否开启多选框 */
56
48
  showCheckbox: {
57
49
  type: Boolean,
58
- default: () => {
59
- return true;
60
- }
50
+ default: true
61
51
  },
62
52
  /* 是否开启单选框 */
63
53
  showSinglebox: {
64
54
  type: Boolean,
65
- default: () => {
66
- return false;
67
- }
55
+ default: false
68
56
  },
69
57
  // 是否清除无数据的部门
70
58
  clearEmptyBusiness: {
@@ -79,28 +67,22 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
79
67
  // 树形类型
80
68
  treeType: {
81
69
  type: String,
82
- default: () => {
83
- return treeConfig.treeTypeConfig.device;
84
- }
70
+ default: treeConfig.treeTypeConfig.device
85
71
  },
86
72
  // 树形 props 类型 (treeType null时生效)
87
73
  treeProps: {
88
74
  type: Object,
89
- default: () => {
90
- return {};
91
- }
75
+ default: () => ({})
92
76
  },
93
77
  // 树形 过滤参数 类型 (treeType null时生效)
94
78
  treeFilterParam: {
95
79
  type: Array,
96
- default: () => {
97
- return [];
98
- }
80
+ default: () => []
99
81
  },
100
82
  // 是否显示通道节点的选择框
101
83
  isShowChannelSelect: {
102
84
  type: Boolean,
103
- default: () => false
85
+ default: false
104
86
  },
105
87
  // 是否显示自定义空数据显示
106
88
  showCustomEmpty: {
@@ -109,9 +91,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
109
91
  },
110
92
  placeholder: {
111
93
  type: String,
112
- default: () => {
113
- return "\u8BF7\u8F93\u5165";
114
- }
94
+ default: "\u8BF7\u8F93\u5165"
115
95
  },
116
96
  // 是否返回默认选择的数据
117
97
  isBackDefaultSelected: {
@@ -121,13 +101,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
121
101
  /* 默认选中列表 */
122
102
  selectedByDefault: {
123
103
  type: Array,
124
- default: () => {
125
- return [];
126
- }
104
+ default: () => []
127
105
  },
128
106
  // 默认需要选中的部门ID
129
107
  defaultSelectedOrgID: {
130
- default: () => null
108
+ default: null
131
109
  },
132
110
  // 搜索类型
133
111
  searchType: {
@@ -187,7 +165,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
187
165
  // 外部自定义过滤函数
188
166
  filterMethod: {
189
167
  type: Function,
190
- default: () => null
168
+ default: null
169
+ },
170
+ // 是否显示右侧业务状态
171
+ showStatus: {
172
+ type: Boolean,
173
+ default: true
191
174
  }
192
175
  },
193
176
  emits: [