hy-dispatch-ui-v3 0.2.59 → 0.2.60

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 (87) hide show
  1. package/dist/tailwind.css +129 -0
  2. package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
  3. package/es/api/index.mjs +137 -0
  4. package/es/bussiness/hyAddDepartmentType/addDepartmentType.vue.mjs +365 -0
  5. package/es/bussiness/hyAddDepartmentType/index.mjs +6 -0
  6. package/es/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +31 -0
  7. package/es/bussiness/index.mjs +1 -1
  8. package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +1 -1
  9. package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +45 -36
  10. package/es/components/hyDatePicker/datePicker.vue.mjs +2 -0
  11. package/es/components/hyForm/cpns/formItem.vue.mjs +106 -43
  12. package/es/components/hyForm/cpns/locationSelect.vue.mjs +358 -0
  13. package/es/components/hyForm/form.vue.mjs +83 -31
  14. package/es/components/hyForm/js/index.mjs +9 -2
  15. package/es/components/hyForm/js/useAppForm.mjs +6 -36
  16. package/es/components/hyMap/map.vue.mjs +3 -3
  17. package/es/components/hyRadioGroup/index.mjs +6 -0
  18. package/es/components/hyRadioGroup/radioGroup.vue.mjs +123 -0
  19. package/es/components/hyRadioGroup/style/radioGroup.scss +0 -0
  20. package/es/components/hySearch/cpns/searchItem.vue.mjs +20 -13
  21. package/es/components/hySearch/js/useAppSearch.mjs +3 -33
  22. package/es/components/hyTable/cpns/virtualTable.vue.mjs +9 -1
  23. package/es/components/hyTable/js/index.mjs +6 -3
  24. package/es/components/hyTable/js/search.mjs +1 -0
  25. package/es/components/hyTable/table.vue.mjs +11 -4
  26. package/es/components/hyTableForm/batchTableForm.vue.mjs +5 -2
  27. package/es/components/hyTableForm/tableForm.vue.mjs +6 -0
  28. package/es/components/hyTree/js/index.mjs +69 -53
  29. package/es/components/hyTree/tree.vue.mjs +36 -1
  30. package/es/components/index.mjs +1 -0
  31. package/es/index.mjs +3 -1
  32. package/es/locale/en.mjs +17 -1
  33. package/es/locale/zh_CN.mjs +17 -1
  34. package/es/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
  35. package/es/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
  36. package/es/style/index.scss +53 -0
  37. package/es/style/theme.scss +0 -53
  38. package/es/utils/form.mjs +56 -7
  39. package/es/utils/index.mjs +1 -1
  40. package/es/utils/map/hook/bigMap.mjs +4 -0
  41. package/es/utils/map/hook/gaode.mjs +3 -0
  42. package/es/utils/map/hook/leafletjs.mjs +10 -10
  43. package/es/utils/map/index.mjs +27 -7
  44. package/es/version.mjs +1 -1
  45. package/lib/_virtual/_plugin-vue_export-helper.js +13 -0
  46. package/lib/api/index.js +147 -0
  47. package/lib/bussiness/hyAddDepartmentType/addDepartmentType.vue.js +369 -0
  48. package/lib/bussiness/hyAddDepartmentType/index.js +11 -0
  49. package/lib/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +31 -0
  50. package/lib/bussiness/index.js +5 -0
  51. package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +44 -35
  52. package/lib/components/hyDatePicker/datePicker.vue.js +2 -0
  53. package/lib/components/hyForm/cpns/formItem.vue.js +111 -48
  54. package/lib/components/hyForm/cpns/locationSelect.vue.js +362 -0
  55. package/lib/components/hyForm/form.vue.js +79 -27
  56. package/lib/components/hyForm/js/index.js +9 -1
  57. package/lib/components/hyForm/js/useAppForm.js +5 -35
  58. package/lib/components/hyMap/map.vue.js +3 -3
  59. package/lib/components/hyRadioGroup/index.js +11 -0
  60. package/lib/components/hyRadioGroup/radioGroup.vue.js +127 -0
  61. package/lib/components/hyRadioGroup/style/radioGroup.scss +0 -0
  62. package/lib/components/hySearch/cpns/searchItem.vue.js +19 -12
  63. package/lib/components/hySearch/js/useAppSearch.js +2 -32
  64. package/lib/components/hyTable/cpns/virtualTable.vue.js +9 -1
  65. package/lib/components/hyTable/js/index.js +6 -3
  66. package/lib/components/hyTable/js/search.js +1 -0
  67. package/lib/components/hyTable/table.vue.js +43 -36
  68. package/lib/components/hyTableForm/batchTableForm.vue.js +5 -2
  69. package/lib/components/hyTableForm/tableForm.vue.js +6 -0
  70. package/lib/components/hyTree/js/index.js +69 -53
  71. package/lib/components/hyTree/tree.vue.js +36 -1
  72. package/lib/components/index.js +14 -12
  73. package/lib/index.js +56 -49
  74. package/lib/locale/en.js +17 -1
  75. package/lib/locale/zh_CN.js +17 -1
  76. package/lib/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
  77. package/lib/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
  78. package/lib/style/index.scss +53 -0
  79. package/lib/style/theme.scss +0 -53
  80. package/lib/utils/form.js +57 -5
  81. package/lib/utils/index.js +3 -0
  82. package/lib/utils/map/hook/bigMap.js +4 -0
  83. package/lib/utils/map/hook/gaode.js +3 -0
  84. package/lib/utils/map/hook/leafletjs.js +10 -10
  85. package/lib/utils/map/index.js +26 -6
  86. package/lib/version.js +1 -1
  87. package/package.json +2 -2
@@ -457,7 +457,15 @@ const _sfc_main = {
457
457
  }, {
458
458
  default: withCtx(() => [
459
459
  createElementVNode("div", {
460
- class: normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-xs hover:font-bold border border-transparent hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)] rounded box-border cursor-pointer", citem.className]),
460
+ class: normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-xs hover:font-bold border border-transparent rounded box-border", [
461
+ citem.className,
462
+ unref(operatorDisabledHandler)(citem, {
463
+ column,
464
+ row,
465
+ $index,
466
+ cellIndex
467
+ }) ? "cursor-not-allowed text-[var(--hy-el-text-color-disabled)] hover:border-[rgba(var(--hy-auxiliary),1)] hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-auxiliary),0.5)]" : "cursor-pointer hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)]"
468
+ ]]),
461
469
  onClick: ($event) => unref(operatorClickHandler)(
462
470
  cindex,
463
471
  column,
@@ -1,8 +1,8 @@
1
1
  import { ref, computed, watch, watchEffect, unref, nextTick } from 'vue';
2
2
  import { ElLoading } from 'element-plus';
3
- import { isString, isBoolean, isFunction, isPermission, isNumber, isArray } from '../../../utils/is.mjs';
4
- import { useLocale } from '../../../hooks/useLocale.mjs';
5
3
  import { usePermissionMap } from '../../../hooks/usePermissionMap.mjs';
4
+ import { useLocale } from '../../../hooks/useLocale.mjs';
5
+ import { isString, isBoolean, isFunction, isPermission, isNumber, isArray } from '../../../utils/is.mjs';
6
6
 
7
7
  function tableColumnShowHandler(column) {
8
8
  if (column.permission && !isPermission(column.permission)) {
@@ -123,6 +123,7 @@ function operatorFilterHandler(column, scope, type = "all") {
123
123
  function operatorClickHandler(command, column, scope, type = "all") {
124
124
  const operator = operatorFilterHandler(column, scope, type);
125
125
  const target = operator[command];
126
+ if (operatorDisabledHandler(target, scope)) return;
126
127
  target?.handler && target.handler(scope);
127
128
  }
128
129
  function renderHeaderHandler(column, scope) {
@@ -394,7 +395,9 @@ const useAppTableWrapper = (hy) => {
394
395
  // 搜索选中
395
396
  isSearchFocus,
396
397
  onSearchInputHandler,
397
- onSearchBlurHandler
398
+ onSearchBlurHandler,
399
+ showAppTableLoading,
400
+ closeAppTableLoading
398
401
  };
399
402
  };
400
403
 
@@ -54,6 +54,7 @@ function useAppTableSearch(hy) {
54
54
  }
55
55
  async function resetFields() {
56
56
  await nextTick();
57
+ props.filterModel.query = null;
57
58
  if (appSearchRef.value) {
58
59
  appSearchRef.value.resetFields();
59
60
  }
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, useModel, useTemplateRef, openBlock, createElementBlock, createCommentVNode, createElementVNode, createBlock, unref, createVNode, toDisplayString, withCtx, renderSlot, normalizeClass, createSlots, renderList, normalizeProps, guardReactiveProps, mergeProps, Fragment, withModifiers, mergeModels } from 'vue';
2
2
  import { ElTable, ElTableColumn, ElDropdown, ElIcon, ElDropdownMenu, ElDropdownItem, ElAutoResizer, ElPagination } from 'element-plus';
3
3
  import { MoreFilled } from '@element-plus/icons-vue';
4
- import { operatorFilterHandler, operatorClickHandler, operatorDisabledHandler, operatorDisableTextdHandler, renderContentHandler, renderHeaderHandler, useAppTableWrapper } from './js/index.mjs';
4
+ import { useAppTableWrapper, operatorFilterHandler, operatorClickHandler, operatorDisabledHandler, operatorDisableTextdHandler, renderContentHandler, renderHeaderHandler } from './js/index.mjs';
5
5
  import { useAppTableSearch } from './js/search.mjs';
6
6
  import _sfc_main$2 from './cpns/headerItem.vue.mjs';
7
7
  import _sfc_main$1 from './cpns/columnSelect.vue.mjs';
@@ -248,7 +248,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
248
248
  getTableDataSource,
249
249
  onSizeChangeHandler,
250
250
  onCurrentChangeHandler,
251
- onSearchQueryHandler
251
+ onSearchQueryHandler,
252
+ showAppTableLoading,
253
+ closeAppTableLoading
252
254
  } = useMixins(
253
255
  {
254
256
  props,
@@ -275,7 +277,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
275
277
  getTableDataSource,
276
278
  clearSelection,
277
279
  clearSelectedList,
278
- toggleRowExpansion
280
+ toggleRowExpansion,
281
+ showAppTableLoading,
282
+ closeAppTableLoading
279
283
  });
280
284
  return (_ctx, _cache) => {
281
285
  return openBlock(), createElementBlock(
@@ -478,7 +482,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
478
482
  }, {
479
483
  default: withCtx(() => [
480
484
  createElementVNode("div", {
481
- class: normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-xs hover:font-bold border border-transparent hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)] rounded box-border cursor-pointer", citem.className]),
485
+ class: normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-xs hover:font-bold border border-transparent hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)] rounded box-border", [
486
+ citem.className,
487
+ unref(operatorDisabledHandler)(citem, scope) ? "cursor-not-allowed text-[var(--hy-el-text-color-disabled)] hover:border-[rgba(var(--hy-auxiliary),1)] hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-auxiliary),0.5)]" : "cursor-pointer hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)]"
488
+ ]]),
482
489
  onClick: withModifiers(($event) => unref(operatorClickHandler)(cindex, column, scope, "default"), ["stop"]),
483
490
  onContextmenu: withModifiers(() => {
484
491
  }, ["stop"])
@@ -61,6 +61,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
61
61
  beforeDataHandle: {
62
62
  type: Function
63
63
  },
64
+ onExpandRowChange: {
65
+ type: Function
66
+ },
64
67
  templateConfig: {
65
68
  type: Object,
66
69
  default: () => ({
@@ -149,7 +152,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
149
152
  try {
150
153
  isUploading.value = true;
151
154
  emits("uploading");
152
- formColumns;
153
155
  const data = await doReadExcel(files, props);
154
156
  if (!data) {
155
157
  ElMessage.warning("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25");
@@ -523,6 +525,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
523
525
  }, _ctx.$attrs, {
524
526
  tableColumns: __props.tableColumns,
525
527
  formColumns: __props.formColumns,
528
+ onExpandRowChange: __props.onExpandRowChange,
526
529
  rules: __props.rules,
527
530
  rowClickExpand: __props.rowClickExpand,
528
531
  columnNum: __props.columnNum,
@@ -540,7 +543,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
540
543
  ])
541
544
  };
542
545
  })
543
- ]), 1040, ["tableColumns", "formColumns", "rules", "rowClickExpand", "columnNum", "size"])
546
+ ]), 1040, ["tableColumns", "formColumns", "onExpandRowChange", "rules", "rowClickExpand", "columnNum", "size"])
544
547
  ])) : createCommentVNode("v-if", true),
545
548
  submitting.value ? (openBlock(), createElementBlock("div", {
546
549
  key: 1,
@@ -17,6 +17,9 @@ const __default__ = defineComponent({
17
17
  });
18
18
  const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
19
19
  props: {
20
+ onExpandRowChange: {
21
+ type: Function
22
+ },
20
23
  // 表格配置项
21
24
  tableColumns: {
22
25
  // 表格的列
@@ -131,6 +134,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
131
134
  }
132
135
  }
133
136
  async function onExpandRowChange(row) {
137
+ if (props.onExpandRowChange) {
138
+ props.onExpandRowChange(row);
139
+ }
134
140
  await nextTick();
135
141
  if (!formRef.value) return;
136
142
  const valid = await initValidateHandler([row]);
@@ -14,7 +14,7 @@ const deviceStatus = {
14
14
  1: "\u5728\u7EBF"
15
15
  };
16
16
  const useAppTreeWrapper = (hy) => {
17
- const { props, emits, slots, treeRef, VirtualTree } = hy;
17
+ const { props: props2, emits, slots, treeRef, VirtualTree } = hy;
18
18
  const instance = getCurrentInstance();
19
19
  const slotAppContext = instance ? {
20
20
  ...instance.appContext,
@@ -33,17 +33,17 @@ const useAppTreeWrapper = (hy) => {
33
33
  const selectFilterList = ref([]);
34
34
  const loading = ref(true);
35
35
  watch(
36
- () => props.showCheckbox,
36
+ () => props2.showCheckbox,
37
37
  (newVal) => {
38
38
  virtualTree?.setRowSelection({
39
- type: props.showCheckbox ? "checkbox" : "radio"
39
+ type: props2.showCheckbox ? "checkbox" : "radio"
40
40
  });
41
41
  }
42
42
  );
43
43
  function getData(dataList) {
44
44
  return new Promise((resolve) => {
45
45
  hy.loading.value = true;
46
- if (props.disableSelection?.length) {
46
+ if (props2.disableSelection?.length) {
47
47
  setDisAbleSelectionMap();
48
48
  }
49
49
  if (!virtualTree) {
@@ -59,9 +59,9 @@ const useAppTreeWrapper = (hy) => {
59
59
  // 可视区域外的缓冲项数量
60
60
  indent: 16,
61
61
  emptyText: "\u6682\u65E0\u6570\u636E",
62
- business: props.treeType,
62
+ business: props2.treeType,
63
63
  // 自定义整体的插槽
64
- renderItem: props.treeType === treeTypeConfig.user ? (data, node) => setUserSlot(data) : setSlot("treeParentSlot"),
64
+ renderItem: props2.treeType === treeTypeConfig.user ? (data, node) => setUserSlot(data) : setSlot("treeParentSlot"),
65
65
  // // 自定义状态右侧插槽
66
66
  renderRight: (data) => {
67
67
  let renderRight = setSlot("renderRight");
@@ -87,9 +87,9 @@ const useAppTreeWrapper = (hy) => {
87
87
  return true;
88
88
  },
89
89
  // // 自定义状态模块
90
- renderStatus: props.treeType === treeTypeConfig.device || props.treeType === treeTypeConfig.channel ? (data) => setRenderStatus(data) : null,
90
+ renderStatus: props2.treeType === treeTypeConfig.device || props2.treeType === treeTypeConfig.channel ? (data) => setRenderStatus(data) : null,
91
91
  renderEmpty: () => {
92
- if (!props.showCustomEmpty || hy.filterValue.value) return true;
92
+ if (!props2.showCustomEmpty || hy.filterValue.value) return true;
93
93
  let renderEmpty = setSlot("renderEmpty");
94
94
  if (renderEmpty) {
95
95
  const target = renderEmpty();
@@ -100,29 +100,31 @@ const useAppTreeWrapper = (hy) => {
100
100
  props: {
101
101
  showStatus: true,
102
102
  disabled: (data) => {
103
- if (data.dataType === 3 || data.dataType === 5) {
103
+ if (data.dataType === 5 || data.dataType === 3) {
104
104
  if (hy.disableSelectionMap.value) {
105
- return hy.disableSelectionMap.value.get(data.id);
105
+ return data.dataType === 3 ? hy.disableSelectionMap.value.get(data.deviceId) : hy.disableSelectionMap.value.get(data.id);
106
106
  }
107
107
  return false;
108
108
  }
109
109
  return false;
110
110
  },
111
- ...props.treeProps
111
+ ...props2.treeProps
112
112
  },
113
113
  rowSelection: {
114
- type: props.showCheckbox ? "checkbox" : "radio",
115
- highlight: props.highlight,
116
- checkStrictly: props.checkStrictly,
114
+ type: props2.showCheckbox ? "checkbox" : "radio",
115
+ highlight: props2.highlight,
116
+ checkStrictly: props2.checkStrictly,
117
117
  // 是否显示选项 showSinglebox 单选为true时部门不显示其他节点显示选择框
118
118
  showSelect: (data) => {
119
119
  if (data.dataType === 1) {
120
- return props.showCheckbox;
120
+ return props2.showCheckbox;
121
121
  }
122
- return props.showCheckbox || props.showSinglebox;
122
+ return props2.showCheckbox || props2.showSinglebox;
123
123
  },
124
124
  // 单选时是否可以取消选择
125
- cancelable: true,
125
+ cancelable: props2.cancelable,
126
+ // 是否显示多选框或单选框
127
+ showSelectBox: props2.showSelectBox,
126
128
  // 选中回调
127
129
  onCheckChange: (data, info, checked) => {
128
130
  console.log("onCheckChange", info);
@@ -139,25 +141,35 @@ const useAppTreeWrapper = (hy) => {
139
141
  );
140
142
  }
141
143
  },
144
+ // 是否在点击节点的时候展开或者收缩节点
145
+ expandOnClickNode: props2.expandOnClickNode,
146
+ // 是否在点击节点的时候选中节点
147
+ checkOnClickNode: props2.checkOnClickNode,
148
+ // 点击叶节点(最后一个子节点)时是否检查或取消节点
149
+ checkOnClickLeaf: props2.checkOnClickLeaf,
150
+ // 双击父节点会触发选中功能
151
+ checkOnDblclickParentNode: props2.checkOnDblclickParentNode,
142
152
  // 筛选方法
143
153
  filterMethod: ({ filterValue: filterValue2 }, data) => {
144
154
  let isFilter = true;
145
155
  if (filterValue2) {
146
156
  isFilter = isFilter && !!filterNodeMethod(data, filterValue2, {
147
- treeFilterParam: props.treeFilterParam
157
+ treeFilterParam: props2.treeFilterParam
148
158
  });
149
159
  }
150
160
  return isFilter;
151
161
  },
152
162
  businessConfig: {
153
163
  // 是否开启按在线离线状态排序
154
- sortByStatus: props.deviceOrderSort,
164
+ sortByStatus: props2.deviceOrderSort,
155
165
  // 是否只显示在线设备
156
- showOnlineState: props.showOnlineOnly,
166
+ showOnlineState: props2.showOnlineOnly,
157
167
  // 是否清空没有业务项(设备、用户、采集器)的部门和群组
158
- clearEmptyBusiness: props.clearEmptyBusiness,
168
+ clearEmptyBusiness: props2.clearEmptyBusiness,
159
169
  // 是否显示通道节点的选择框
160
- isShowChannelSelect: props.isShowChannelSelect
170
+ isShowChannelSelect: props2.isShowChannelSelect,
171
+ // 初始化过滤数据
172
+ filterConfig: props2.filterConfig
161
173
  },
162
174
  // 初始化时处理数据,想回显必须return值,若想要过滤,可不return
163
175
  handleMethod: (data) => {
@@ -178,7 +190,7 @@ const useAppTreeWrapper = (hy) => {
178
190
  },
179
191
  // 双击事件
180
192
  onNodeDblClick: (data, node, event) => {
181
- if (props.treeType !== "channel") {
193
+ if (props2.treeType !== "channel") {
182
194
  emits("on-dblclick", [{ ...data }]);
183
195
  } else {
184
196
  if (data.channelId) {
@@ -218,13 +230,13 @@ const useAppTreeWrapper = (hy) => {
218
230
  document.body.click();
219
231
  },
220
232
  onLoad: () => {
221
- if (props.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
233
+ if (props2.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
222
234
  ElMessage.warning("\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001");
223
235
  }
224
- if (props.defaultSelectedOrgID && props.showCheckbox && props.treeType === "device") {
236
+ if (props2.defaultSelectedOrgID && props2.showCheckbox && props2.treeType === "device") {
225
237
  setSelectedOrg(dataList);
226
- } else if (props.selectedByDefault?.length) {
227
- setCheckedKeys(props.selectedByDefault);
238
+ } else if (props2.selectedByDefault?.length) {
239
+ setCheckedKeys(props2.selectedByDefault);
228
240
  }
229
241
  if (hy.filterValue.value) {
230
242
  getFilterValue();
@@ -240,13 +252,13 @@ const useAppTreeWrapper = (hy) => {
240
252
  {
241
253
  data: dataList,
242
254
  businessConfig: {
243
- sortByStatus: props.deviceOrderSort,
244
- showOnlineState: props.showOnlineOnly,
245
- clearEmptyBusiness: props.clearEmptyBusiness
255
+ sortByStatus: props2.deviceOrderSort,
256
+ showOnlineState: props2.showOnlineOnly,
257
+ clearEmptyBusiness: props2.clearEmptyBusiness
246
258
  }
247
259
  },
248
260
  () => {
249
- if (props.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
261
+ if (props2.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
250
262
  ElMessage.success("\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001");
251
263
  }
252
264
  if (hy.filterValue.value) {
@@ -263,7 +275,7 @@ const useAppTreeWrapper = (hy) => {
263
275
  }
264
276
  function setEmpty() {
265
277
  let content = ``;
266
- if (!props.showOnlineOnly) {
278
+ if (!props2.showOnlineOnly) {
267
279
  setTimeout(() => {
268
280
  if (hy.addDeviceDom.value) {
269
281
  hy.addDeviceDom.value.removeEventListener("click", addDevice);
@@ -292,7 +304,7 @@ const useAppTreeWrapper = (hy) => {
292
304
  }
293
305
  function setDisAbleSelectionMap() {
294
306
  const map = /* @__PURE__ */ new Map();
295
- props.disableSelection.forEach((v) => {
307
+ props2.disableSelection.forEach((v) => {
296
308
  map.set(v.id, true);
297
309
  });
298
310
  hy.disableSelectionMap.value = map;
@@ -316,7 +328,7 @@ const useAppTreeWrapper = (hy) => {
316
328
  container.style.display = "flex";
317
329
  container.style.width = "100%";
318
330
  const dutyHtml = `<div class="flex treeDeviceBox">
319
- ${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"
331
+ ${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"
320
332
  style="border-color: ${data.rosterContentColor};background-color: ${data.rosterContentColor}70;">
321
333
  ${data.rosterContentSimple}
322
334
  </span>` : ""}
@@ -385,31 +397,35 @@ const useAppTreeWrapper = (hy) => {
385
397
  emits("on-addDevice");
386
398
  }
387
399
  function singleRemovalFn(row) {
388
- if (props.treeType === "device") {
400
+ if (props2.treeType === "device") {
389
401
  virtualTree.setChecked(row.channelId || row.deviceId, false, true);
390
- } else if (props.treeType) {
402
+ } else if (props2.treeType) {
391
403
  virtualTree.setChecked(row.id, false, true);
392
- } else if (!props.treeType && props.treeProps) {
393
- virtualTree.setChecked(row[`${props.treeProps.value}`], false, true);
404
+ } else if (!props2.treeType && props2.treeProps) {
405
+ virtualTree.setChecked(row[`${props2.treeProps.value}`], false, true);
394
406
  }
395
407
  }
396
408
  function setCheckedKeys(dataList) {
397
- if (props.treeType === "device" || props.treeType === "channel") {
409
+ if (props2.treeType === "device" || props2.treeType === "channel") {
398
410
  virtualTree?.setCheckedKeys(
399
411
  dataList.map((v) => v.channelId || v.deviceId),
400
412
  true
401
413
  );
402
- } else if (props.treeType) {
414
+ } else if (props2.treeType) {
403
415
  virtualTree?.setCheckedKeys(
404
416
  dataList.map((v) => v.id),
405
417
  true
406
418
  );
407
- } else if (!props.treeType && props.treeProps) {
419
+ } else if (!props2.treeType && props2.treeProps) {
420
+ console.log(
421
+ "\u9009\u4E2D\u56DE\u8C03",
422
+ dataList.map((v) => v[`${props2.treeProps.value}`])
423
+ );
408
424
  virtualTree?.setCheckedKeys(
409
- dataList.map((v) => v[`${props.treeProps.value}`])
425
+ dataList.map((v) => v[`${props2.treeProps.value}`])
410
426
  );
411
427
  }
412
- if (props.isBackDefaultSelected) {
428
+ if (props2.isBackDefaultSelected) {
413
429
  setTimeout(() => {
414
430
  const deviceList = virtualTree?.getCheckedBusinessNodes(true) || [];
415
431
  emits("on-selectedDataList", deviceList);
@@ -417,17 +433,17 @@ const useAppTreeWrapper = (hy) => {
417
433
  }
418
434
  }
419
435
  function setChecked(data, type) {
420
- if (props.treeType === "device") {
436
+ if (props2.treeType === "device") {
421
437
  virtualTree?.setChecked(data.channelId || data.deviceId, type, true);
422
- } else if (props.treeType) {
438
+ } else if (props2.treeType) {
423
439
  virtualTree?.setChecked(data.id, type, true);
424
- } else if (!props.treeType && props.treeProps) {
425
- virtualTree?.setChecked(data[`${props.treeProps.value}`], type, true);
440
+ } else if (!props2.treeType && props2.treeProps) {
441
+ virtualTree?.setChecked(data[`${props2.treeProps.value}`], type, true);
426
442
  }
427
443
  }
428
444
  function setSelectedOrg(deviceList) {
429
445
  for (let i = 0; i < deviceList.length; i++) {
430
- if (props.defaultSelectedOrgID === deviceList[i].id) {
446
+ if (props2.defaultSelectedOrgID === deviceList[i].id) {
431
447
  if (deviceList[i].deviceList?.length) {
432
448
  setCheckedKeys(deviceList[i].deviceList);
433
449
  }
@@ -443,13 +459,13 @@ const useAppTreeWrapper = (hy) => {
443
459
  return virtualTree?.getCheckedBusinessNodes(true) || [];
444
460
  }
445
461
  function setFilterListType(type) {
446
- if (props.selectFilterList?.length) {
462
+ if (props2.selectFilterList?.length) {
447
463
  hy.selectFilterList.value = JSON.parse(
448
- JSON.stringify(props.selectFilterList)
464
+ JSON.stringify(props2.selectFilterList)
449
465
  );
450
466
  return;
451
467
  }
452
- if (props.treeType === "device") {
468
+ if (props2.treeType === "device") {
453
469
  hy.selectFilterList.value = [
454
470
  {
455
471
  label: "\u5168\u90E8",
@@ -467,7 +483,7 @@ const useAppTreeWrapper = (hy) => {
467
483
  placeholder: "\u8BBE\u5907\u53F7\u3001\u8BBE\u5907\u540D\u79F0\u8FDB\u884C\u7B5B\u9009"
468
484
  }
469
485
  ];
470
- } else if (props.treeType === "user") {
486
+ } else if (props2.treeType === "user") {
471
487
  hy.selectFilterList.value = [
472
488
  {
473
489
  label: "\u5168\u90E8",
@@ -529,7 +545,7 @@ function filterNodeMethod(data, value, { selectFilterType, treeFilterParam = []
529
545
  const includesValue = (field) => {
530
546
  return field && field.toString().includes(value.toString());
531
547
  };
532
- if (!type) {
548
+ if (!props.treeType) {
533
549
  let filterType = false;
534
550
  for (let i = 0; i < treeFilterParam.length; i++) {
535
551
  const item = treeFilterParam[i];
@@ -142,6 +142,41 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
142
142
  checkStrictly: {
143
143
  type: Boolean,
144
144
  default: false
145
+ },
146
+ // 单选时可以取消选中
147
+ cancelable: {
148
+ type: Boolean,
149
+ default: true
150
+ },
151
+ // 是否显示多选框或单选框
152
+ showSelectBox: {
153
+ type: Boolean,
154
+ default: true
155
+ },
156
+ // 是否在点击节点的时候展开或者收缩节点
157
+ expandOnClickNode: {
158
+ type: Boolean,
159
+ default: true
160
+ },
161
+ // 是否在点击节点的时候选中节点
162
+ checkOnClickNode: {
163
+ type: Boolean,
164
+ default: false
165
+ },
166
+ // 点击叶节点(最后一个子节点)时是否检查或取消节点
167
+ checkOnClickLeaf: {
168
+ type: Boolean,
169
+ default: true
170
+ },
171
+ // 双击父节点会触发选中功能
172
+ checkOnDblclickParentNode: {
173
+ type: Boolean,
174
+ default: true
175
+ },
176
+ // 初始化过滤数据
177
+ filterConfig: {
178
+ type: Array,
179
+ default: () => []
145
180
  }
146
181
  },
147
182
  emits: [
@@ -306,7 +341,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
306
341
  /* STABLE */
307
342
  }, 8, ["content"])
308
343
  ])) : createCommentVNode("v-if", true),
309
- renderSlot(_ctx.$slots, "input-bottom-bottom"),
344
+ renderSlot(_ctx.$slots, "input-bottom"),
310
345
  withDirectives(createElementVNode(
311
346
  "div",
312
347
  {
@@ -24,6 +24,7 @@ export { HyBatchTableForm, HyTableForm } from './hyTableForm/index.mjs';
24
24
  export { HyTableActionButton } from './hyTableActionButton/index.mjs';
25
25
  export { HyBatchUploadDialog } from './hyBatchUploadDialog/index.mjs';
26
26
  export { HyMap } from './hyMap/index.mjs';
27
+ export { HyRadioGroup } from './hyRadioGroup/index.mjs';
27
28
  export { resetAppFormValue, useAppForm } from './hyForm/js/useAppForm.mjs';
28
29
  export { resetAppSearchValue, useAppSearch } from './hySearch/js/useAppSearch.mjs';
29
30
  export { useAppTable } from './hyTable/js/useAppTable.mjs';
package/es/index.mjs CHANGED
@@ -3,6 +3,7 @@ export { ElDatePicker, HyDatePicker } from './components/hyDatePicker/index.mjs'
3
3
  export { ElInput, HyInput, HyInputSearch } from './components/hyInput/index.mjs';
4
4
  export { ElTimePicker, HyTimePicker } from './components/hyTimePicker/index.mjs';
5
5
  export { ElTooltip, HyTooltip } from './components/hyTooltip/index.mjs';
6
+ export { HyAddDepartmentType } from './bussiness/hyAddDepartmentType/index.mjs';
6
7
  export { HyAudioPlayer } from './components/hyAudioPlayer/index.mjs';
7
8
  export { HyBatchTableForm, HyTableForm } from './components/hyTableForm/index.mjs';
8
9
  export { HyBatchUploadDialog } from './components/hyBatchUploadDialog/index.mjs';
@@ -19,6 +20,7 @@ export { HyMenu } from './components/hyMenu/index.mjs';
19
20
  export { HyNoPermissions } from './components/hyNoPermissions/index.mjs';
20
21
  export { HyNoPermissionsMap } from './components/hyNoPermissionsMap/index.mjs';
21
22
  export { HyOrgCascader } from './components/hyOrgCascader/index.mjs';
23
+ export { HyRadioGroup } from './components/hyRadioGroup/index.mjs';
22
24
  export { HySearch } from './components/hySearch/index.mjs';
23
25
  export { HyTable } from './components/hyTable/index.mjs';
24
26
  export { HyTableActionButton } from './components/hyTableActionButton/index.mjs';
@@ -31,7 +33,7 @@ export { base64Decrypt, encryptToBase64, generateRandomCode } from './utils/cryp
31
33
  export { blobToDataURL, fileFormUpload, fileJsonUplaod, fileUpload, presignedUrl, sizeToTextHandler } from './utils/file.mjs';
32
34
  export { buildLocaleContext, buildTranslator, getLanguage, localeContextKey, translate, useLocale } from './hooks/useLocale.mjs';
33
35
  export { clearResizeObserver, useResizeObserver } from './hooks/useResizeObserver.mjs';
34
- export { clearSpace, columnRuleHandler, genRuleRequiredMsgHandler, genValueByProp, getValueByProp, setValueByProp } from './utils/form.mjs';
36
+ export { clearSpace, columnLabelHandler, columnPlaceholderHandler, columnRuleHandler, genColumnDefaultLabel, genRuleRequiredMsgHandler, genValueByProp, getValueByProp, setValueByProp } from './utils/form.mjs';
35
37
  export { cloneDeep, copyText, createUniqueId, funRunHandler, mergeDeep, withInstall } from './utils/handler.mjs';
36
38
  export { configProviderContextKey, provideGlobalConfig, useGlobalConfig } from './hooks/useGlobalConfig.mjs';
37
39
  export { defaultAxios, localApiKey, useApi } from './hooks/useApi.mjs';
package/es/locale/en.mjs CHANGED
@@ -27,7 +27,8 @@ var en = {
27
27
  wednesday: "Wednesday",
28
28
  thursday: "Thursday",
29
29
  friday: "Friday",
30
- saturday: "Saturday"
30
+ saturday: "Saturday",
31
+ help: "Help"
31
32
  },
32
33
  form: {
33
34
  department: "Department",
@@ -144,6 +145,21 @@ var en = {
144
145
  endMonth: "End Month",
145
146
  startYear: "Start Year",
146
147
  endYear: "End Year"
148
+ },
149
+ departmentType: {
150
+ editDepartmentType: "Edit Department Type",
151
+ addDepartmentType: "Add Department Type",
152
+ departmentIcon: "Department Icon",
153
+ upload: "Upload",
154
+ pleaseUploadDepartmentTypeIcon: "Please Upload Department Type Icon",
155
+ iconSize44px: "Icon Size 44px",
156
+ ifNoIconUseTheDefaultIcon: "If No Icon, Use The Default Icon",
157
+ departmentTypeName: "Department Type Name",
158
+ pleaseEnterTheDepartmentTypeName: "Please Enter The Department Type Name",
159
+ imageUploadFailedLogoSizeWithin2M: "Image Upload Failed, Logo Size Within 2M",
160
+ editDeviceCover: "Edit Device Cover",
161
+ close: "Close",
162
+ save: "Save"
147
163
  }
148
164
  };
149
165
 
@@ -27,7 +27,8 @@ var zh_CN = {
27
27
  wednesday: "\u661F\u671F\u4E09",
28
28
  thursday: "\u661F\u671F\u56DB",
29
29
  friday: "\u661F\u671F\u4E94",
30
- saturday: "\u661F\u671F\u516D"
30
+ saturday: "\u661F\u671F\u516D",
31
+ help: "\u5E2E\u52A9"
31
32
  },
32
33
  form: {
33
34
  department: "\u6240\u5C5E\u90E8\u95E8",
@@ -140,6 +141,21 @@ var zh_CN = {
140
141
  endMonth: "\u7ED3\u675F\u6708\u4EFD",
141
142
  startYear: "\u5F00\u59CB\u5E74\u4EFD",
142
143
  endYear: "\u7ED3\u675F\u5E74\u4EFD"
144
+ },
145
+ departmentType: {
146
+ editDepartmentType: "\u7F16\u8F91\u90E8\u95E8\u7C7B\u578B",
147
+ addDepartmentType: "\u6DFB\u52A0\u90E8\u95E8\u7C7B\u578B",
148
+ departmentIcon: "\u90E8\u95E8\u56FE\u6807",
149
+ upload: "\u4E0A \u4F20",
150
+ pleaseUploadDepartmentTypeIcon: "\u8BF7\u4E0A\u4F20\u90E8\u95E8\u7C7B\u578B\u56FE\u6807",
151
+ iconSize44px: "\u56FE\u6807\u5C3A\u5BF844px",
152
+ ifNoIconUseTheDefaultIcon: "\u82E5\u65E0\u56FE\u6807\u5219\u4F7F\u7528\u9ED8\u8BA4\u56FE\u6807",
153
+ departmentTypeName: "\u90E8\u95E8\u7C7B\u578B\u540D\u79F0",
154
+ pleaseEnterTheDepartmentTypeName: "\u8BF7\u8F93\u5165\u90E8\u95E8\u7C7B\u578B\u540D\u79F0",
155
+ imageUploadFailedLogoSizeWithin2M: "\u56FE\u7247\u4E0A\u4F20\u5931\u8D25\uFF0Clogo\u5927\u5C0F2M\u4EE5\u5185\u3002",
156
+ editDeviceCover: "\u7F16\u8F91\u8BBE\u5907\u5C01\u9762",
157
+ close: "\u5173 \u95ED",
158
+ save: "\u4FDD \u5B58"
143
159
  }
144
160
  };
145
161
 
@@ -0,0 +1,8 @@
1
+ export default {
2
+ id: 'hy-icon-ops-linear-shouqi',
3
+ symbol: `<symbol id="hy-icon-ops-linear-shouqi" viewBox="0 0 16 16">
4
+ <g id="hy-icon-ops-linear-shouqi-导航/shouqi" stroke="none" stroke-width="1" fill-rule="evenodd">
5
+ <path d="M1,2 C1.55228475,2 2,2.44771525 2,3 L2,13 C2,13.5522847 1.55228475,14 1,14 C0.44771525,14 0,13.5522847 0,13 L0,3 C0,2.44771525 0.44771525,2 1,2 Z M14.9962476,6.99721351 L7.22134415,6.99721351 L7.22134415,6.99721351 L10.3410325,3.80591026 C10.6688751,3.47054177 10.6627742,2.93290294 10.3274057,2.60506033 C10.3232766,2.6010239 10.3191065,2.59702968 10.3148959,2.59307831 C9.96535062,2.26505074 9.41645109,2.28110608 9.08667668,2.62900381 L4.65060824,7.30886388 C4.28556459,7.69396911 4.2848692,8.29714332 4.64902391,8.68308924 L9.01892515,13.3144877 C9.35293318,13.668483 9.91067004,13.6846858 10.2646653,13.3506778 C10.2790116,13.3371414 10.2928995,13.3231273 10.3063053,13.308659 C10.6624129,12.9243285 10.6464065,12.3259543 10.2702613,11.9612115 L7.22134415,9.00471827 L7.22134415,9.00471827 L14.9962476,9.00471827 C15.5506048,9.00471827 16,8.55532302 16,8.00096589 C16,7.44660876 15.5506048,6.99721351 14.9962476,6.99721351 Z" id="hy-icon-ops-linear-shouqi-收起" fill-rule="nonzero"></path>
6
+ </g>
7
+ </symbol>`,
8
+ };
@@ -0,0 +1,8 @@
1
+ export default {
2
+ id: 'hy-icon-ops-linear-zhankai',
3
+ symbol: `<symbol id="hy-icon-ops-linear-zhankai" viewBox="0 0 16 16">
4
+ <g id="hy-icon-ops-linear-zhankai-导航/zhankai" stroke="none" stroke-width="1" fill-rule="evenodd">
5
+ <path d="M15,2 C15.5522847,2 16,2.44771525 16,3 L16,13 C16,13.5522847 15.5522847,14 15,14 C14.4477153,14 14,13.5522847 14,13 L14,3 C14,2.44771525 14.4477153,2 15,2 Z M1.00375238,6.99721351 L8.77865585,6.99721351 L8.77865585,6.99721351 L5.65896747,3.80591026 C5.33112486,3.47054177 5.33722579,2.93290294 5.67259429,2.60506033 C5.67672338,2.6010239 5.68089354,2.59702968 5.68510411,2.59307831 C6.03464938,2.26505074 6.58354891,2.28110608 6.91332332,2.62900381 L11.3493918,7.30886388 C11.7144354,7.69396911 11.7151308,8.29714332 11.3509761,8.68308924 L6.98107485,13.3144877 C6.64706682,13.668483 6.08932996,13.6846858 5.73533471,13.3506778 C5.72098837,13.3371414 5.70710053,13.3231273 5.69369467,13.308659 C5.33758707,12.9243285 5.35359349,12.3259543 5.72973868,11.9612115 L8.77865585,9.00471827 L8.77865585,9.00471827 L1.00375238,9.00471827 C0.449395248,9.00471827 0,8.55532302 0,8.00096589 C0,7.44660876 0.449395248,6.99721351 1.00375238,6.99721351 Z" id="hy-icon-ops-linear-zhankai-形状结合" fill-rule="nonzero"></path>
6
+ </g>
7
+ </symbol>`,
8
+ };