hy-dispatch-ui-v3 0.2.65 → 0.2.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/tailwind.css +51 -13
  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 +183 -149
  25. package/es/components/hyButton/button.vue.mjs +19 -5
  26. package/es/components/hyButton/style/button.scss +72 -0
  27. package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +1 -2
  28. package/es/components/hyForm/cpns/formItem.vue.mjs +254 -32
  29. package/es/components/hyForm/cpns/locationSelect.vue.mjs +8 -1
  30. package/es/components/hyForm/form.vue.mjs +88 -19
  31. package/es/components/hyForm/js/index.mjs +2 -1
  32. package/es/components/hyForm/js/useAppForm.mjs +3 -3
  33. package/es/components/hyIcon/style/icon.scss +1 -0
  34. package/es/components/hyMap/js/index.mjs +6 -6
  35. package/es/components/hyMap/map.vue.mjs +14 -4
  36. package/es/components/hyNoPermissions/noPermissions.vue.mjs +1 -1
  37. package/es/components/hyNoPermissionsMap/noPermissionsMap.vue.mjs +1 -1
  38. package/es/components/hyOrgCascader/orgCascader.vue.mjs +75 -15
  39. package/es/components/hyRadioGroup/radioGroup.vue.mjs +5 -4
  40. package/es/components/hySearch/cpns/searchItem.vue.mjs +434 -206
  41. package/es/components/hySearch/js/index.mjs +2 -1
  42. package/es/components/hySearch/search.vue.mjs +71 -10
  43. package/es/components/hySearch/style/search.scss +7 -0
  44. package/es/components/hyTable/cpns/columnSelect.vue.mjs +21 -22
  45. package/es/components/hyTable/cpns/virtualTable.vue.mjs +35 -21
  46. package/es/components/hyTable/js/index.mjs +16 -17
  47. package/es/components/hyTable/js/search.mjs +28 -2
  48. package/es/components/hyTable/style/table.scss +13 -0
  49. package/es/components/hyTable/table.vue.mjs +55 -22
  50. package/es/components/hyTableActionButton/tableActionButton.vue.mjs +17 -12
  51. package/es/components/hyTableForm/batchTableForm.vue.mjs +36 -5
  52. package/es/components/hyTableForm/js/useAppTableForm.mjs +1 -1
  53. package/es/components/hyTableForm/tableForm.vue.mjs +84 -32
  54. package/es/components/hyTour/index.mjs +7 -0
  55. package/es/components/hyTour/style/tour.scss +0 -0
  56. package/es/components/hyTour/tour.vue.mjs +23 -0
  57. package/es/components/hyTree/config/tree-config.mjs +5 -2
  58. package/es/components/hyTree/js/index.mjs +128 -56
  59. package/es/components/hyTree/tree.vue.mjs +22 -37
  60. package/es/components/index.mjs +1 -0
  61. package/es/index.mjs +6 -0
  62. package/es/static/hy-svg-icons/hy-icon-ops-linear-arrow.js +10 -0
  63. package/es/style/element/hy-element.scss +24 -3
  64. package/es/style/index.scss +0 -1
  65. package/es/style/tailwind.scss +0 -1
  66. package/es/style/theme.scss +1 -0
  67. package/es/utils/is.mjs +3 -1
  68. package/es/utils/map/hook/bigMap.mjs +11 -1
  69. package/es/utils/map/hook/gaode.mjs +60 -17
  70. package/es/utils/map/hook/leafletjs.mjs +25 -4
  71. package/es/utils/map/index.mjs +1 -1
  72. package/es/version.mjs +1 -1
  73. package/lib/api/organization.js +47 -0
  74. package/lib/bussiness/hyAcquisitionStationTree/acquisitionStationTree.vue.js +249 -0
  75. package/lib/bussiness/hyAcquisitionStationTree/index.js +12 -0
  76. package/lib/bussiness/hyAcquisitionStationTree/js/index.js +126 -0
  77. package/lib/bussiness/hyAcquisitionStationTree/style/acquisitionStationTree.scss +0 -0
  78. package/lib/bussiness/hyDeviceTree/deviceTree.vue.js +253 -0
  79. package/lib/bussiness/hyDeviceTree/index.js +12 -0
  80. package/lib/bussiness/hyDeviceTree/js/index.js +128 -0
  81. package/lib/bussiness/hyDeviceTree/style/deviceTree.scss +0 -0
  82. package/lib/bussiness/hyOrgGroupTree/index.js +12 -0
  83. package/lib/bussiness/hyOrgGroupTree/js/index.js +126 -0
  84. package/lib/bussiness/hyOrgGroupTree/orgGroupTree.vue.js +249 -0
  85. package/lib/bussiness/hyOrgGroupTree/style/orgGroupTree.scss +0 -0
  86. package/lib/bussiness/hyPlanGroupDeviceTree/index.js +12 -0
  87. package/lib/bussiness/hyPlanGroupDeviceTree/js/index.js +126 -0
  88. package/lib/bussiness/hyPlanGroupDeviceTree/planGroupDeviceTree.vue.js +249 -0
  89. package/lib/bussiness/hyPlanGroupDeviceTree/style/planGroupDeviceTree.scss +0 -0
  90. package/lib/bussiness/hyUserTree/index.js +12 -0
  91. package/lib/bussiness/hyUserTree/js/index.js +128 -0
  92. package/lib/bussiness/hyUserTree/style/userTree.scss +0 -0
  93. package/lib/bussiness/hyUserTree/userTree.vue.js +243 -0
  94. package/lib/bussiness/index.js +14 -4
  95. package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +182 -148
  96. package/lib/components/hyButton/button.vue.js +18 -4
  97. package/lib/components/hyButton/style/button.scss +72 -0
  98. package/lib/components/hyConfirmDialog/confirmDialog.vue.js +0 -1
  99. package/lib/components/hyForm/cpns/formItem.vue.js +250 -28
  100. package/lib/components/hyForm/cpns/locationSelect.vue.js +8 -1
  101. package/lib/components/hyForm/form.vue.js +86 -17
  102. package/lib/components/hyForm/js/index.js +2 -0
  103. package/lib/components/hyForm/js/useAppForm.js +3 -3
  104. package/lib/components/hyIcon/style/icon.scss +1 -0
  105. package/lib/components/hyMap/js/index.js +5 -5
  106. package/lib/components/hyMap/map.vue.js +13 -3
  107. package/lib/components/hyNoPermissions/noPermissions.vue.js +1 -1
  108. package/lib/components/hyNoPermissionsMap/noPermissionsMap.vue.js +1 -1
  109. package/lib/components/hyOrgCascader/orgCascader.vue.js +73 -13
  110. package/lib/components/hyRadioGroup/radioGroup.vue.js +5 -4
  111. package/lib/components/hySearch/cpns/searchItem.vue.js +431 -203
  112. package/lib/components/hySearch/js/index.js +2 -0
  113. package/lib/components/hySearch/search.vue.js +69 -8
  114. package/lib/components/hySearch/style/search.scss +7 -0
  115. package/lib/components/hyTable/cpns/columnSelect.vue.js +20 -21
  116. package/lib/components/hyTable/cpns/virtualTable.vue.js +51 -37
  117. package/lib/components/hyTable/js/index.js +16 -16
  118. package/lib/components/hyTable/js/search.js +28 -2
  119. package/lib/components/hyTable/style/table.scss +13 -0
  120. package/lib/components/hyTable/table.vue.js +53 -20
  121. package/lib/components/hyTableActionButton/tableActionButton.vue.js +16 -11
  122. package/lib/components/hyTableForm/batchTableForm.vue.js +36 -5
  123. package/lib/components/hyTableForm/js/useAppTableForm.js +1 -1
  124. package/lib/components/hyTableForm/tableForm.vue.js +85 -33
  125. package/lib/components/hyTour/index.js +12 -0
  126. package/lib/components/hyTour/style/tour.scss +0 -0
  127. package/lib/components/hyTour/tour.vue.js +27 -0
  128. package/lib/components/hyTree/config/tree-config.js +5 -2
  129. package/lib/components/hyTree/js/index.js +128 -56
  130. package/lib/components/hyTree/tree.vue.js +22 -37
  131. package/lib/components/index.js +8 -6
  132. package/lib/index.js +67 -55
  133. package/lib/static/hy-svg-icons/hy-icon-ops-linear-arrow.js +10 -0
  134. package/lib/style/element/hy-element.scss +24 -3
  135. package/lib/style/index.scss +0 -1
  136. package/lib/style/tailwind.scss +0 -1
  137. package/lib/style/theme.scss +1 -0
  138. package/lib/utils/is.js +5 -3
  139. package/lib/utils/map/hook/bigMap.js +11 -1
  140. package/lib/utils/map/hook/gaode.js +60 -17
  141. package/lib/utils/map/hook/leafletjs.js +25 -4
  142. package/lib/utils/map/index.js +1 -1
  143. package/lib/version.js +1 -1
  144. package/package.json +2 -2
@@ -7,6 +7,7 @@ require('../../../hooks/index.js');
7
7
  var is = require('../../../utils/is.js');
8
8
  var useResizeObserver = require('../../../hooks/useResizeObserver.js');
9
9
 
10
+ const formContextKey = /* @__PURE__ */ Symbol("formContextKey");
10
11
  function columnItemStyle(props, column) {
11
12
  const { width } = column;
12
13
  const style = {};
@@ -143,6 +144,7 @@ function optionsHandler(props, column) {
143
144
  exports.columnItemInputStyle = columnItemInputStyle;
144
145
  exports.columnItemStyle = columnItemStyle;
145
146
  exports.columnShowHandler = columnShowHandler;
147
+ exports.formContextKey = formContextKey;
146
148
  exports.isDisabled = isDisabled;
147
149
  exports.isEmptyValue = isEmptyValue;
148
150
  exports.isSelectedTimeRange = isSelectedTimeRange;
@@ -51,7 +51,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
51
51
  type: [String, Array, Object]
52
52
  }
53
53
  },
54
- emits: ["search"],
54
+ emits: ["search", "optionsStatus"],
55
55
  setup(__props, { expose: __expose, emit: __emit }) {
56
56
  const props = __props;
57
57
  const emits = __emit;
@@ -84,9 +84,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
84
84
  }
85
85
  return style;
86
86
  });
87
- vue.onUnmounted(() => {
88
- shrinkDestroy();
89
- });
90
87
  function getFilterCount(model, defaultValue, prop) {
91
88
  let count = 0;
92
89
  const keys = Object.keys(defaultValue);
@@ -114,10 +111,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
114
111
  function onSearchHandler() {
115
112
  emits("search");
116
113
  }
117
- function resetFields(fields) {
114
+ function resetFields(fields2) {
118
115
  let columns = props.columns || [];
119
- if (fields && fields?.length) {
120
- columns = fields.map((key) => formColumnMap.value.get(key)).filter(Boolean);
116
+ if (fields2 && fields2?.length) {
117
+ columns = fields2.map((key) => formColumnMap.value.get(key)).filter(Boolean);
121
118
  }
122
119
  useAppSearch.resetAppSearchValue(columns, props.model);
123
120
  }
@@ -125,8 +122,72 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
125
122
  resetFields();
126
123
  emits("search");
127
124
  }
125
+ const fields = vue.reactive([]);
126
+ function addField(field) {
127
+ fields.push(field);
128
+ }
129
+ const removeField = (field) => {
130
+ if (vue.unref(field.columnAttrs)) {
131
+ fields.splice(fields.indexOf(field), 1);
132
+ }
133
+ };
134
+ function filterFields(fields2 = [], keys = []) {
135
+ const filterKeys = keys.map((prop) => is.isArray(prop) ? prop.join(".") : prop);
136
+ return filterKeys.length ? fields2.filter(
137
+ (field) => field.propString && filterKeys.includes(field.propString)
138
+ ) : fields2;
139
+ }
140
+ async function obtainOptionsFields(keys, isMountedLoad = false) {
141
+ const filteredFields = filterFields(fields, keys);
142
+ await Promise.allSettled(
143
+ filteredFields.map((field) => field.obtainOptions(isMountedLoad))
144
+ );
145
+ }
146
+ async function getOptions(isMountedLoad = false) {
147
+ await obtainOptionsFields([], isMountedLoad);
148
+ emitOptionsStatus();
149
+ }
150
+ async function getOptionsFields(keys) {
151
+ await obtainOptionsFields(keys);
152
+ emitOptionsStatus();
153
+ }
154
+ async function getOptionsError() {
155
+ const filteredFields = fields.filter(
156
+ (field) => field.propString && field.optionsError
157
+ );
158
+ await Promise.allSettled(filteredFields.map((field) => field.obtainOptions()));
159
+ emitOptionsStatus();
160
+ }
161
+ function emitOptionsStatus() {
162
+ const hasError = fields.some((item) => item.optionsError === "error");
163
+ emits("optionsStatus", { result: !hasError });
164
+ }
165
+ vue.provide(
166
+ index.formContextKey,
167
+ vue.reactive({
168
+ ...vue.toRefs(props),
169
+ emits,
170
+ addField,
171
+ removeField,
172
+ emitOptionsStatus
173
+ })
174
+ );
175
+ vue.onMounted(() => {
176
+ getOptions(true);
177
+ });
178
+ vue.onUnmounted(() => {
179
+ shrinkDestroy();
180
+ });
128
181
  __expose({
129
- resetFields
182
+ resetFields,
183
+ getOptions,
184
+ getOptionsFields,
185
+ getOptionsError,
186
+ getOptionsByField: (field) => {
187
+ const [target] = filterFields(fields, [field]);
188
+ if (!target) return null;
189
+ return target.options;
190
+ }
130
191
  });
131
192
  return (_ctx, _cache) => {
132
193
  return vue.openBlock(), vue.createElementBlock(
@@ -39,6 +39,13 @@
39
39
  &.hidden {
40
40
  display: none;
41
41
  }
42
+ .hy-el-search-item-error {
43
+ .hy-el-input .hy-el-input__inner::placeholder,
44
+ .hy-el-select__placeholder.is-transparent {
45
+ color: rgba(var(--hy-danger-2));
46
+ font-size: 14px;
47
+ }
48
+ }
42
49
  }
43
50
  .hy-el-input,
44
51
  .hy-el-date-editor {
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var vue = require('vue');
6
6
  var Sortable = require('sortablejs');
7
7
  var elementPlus = require('element-plus');
8
- var iconsVue = require('@element-plus/icons-vue');
9
8
  require('../../../hooks/index.js');
10
9
  require('../../../utils/index.js');
11
10
  require('../../index.js');
@@ -53,7 +52,7 @@ const _sfc_main = {
53
52
  function showPopover() {
54
53
  initColumnsInfo(props.columns, props.columnsEditable);
55
54
  rowDrag();
56
- showClear.value = true;
55
+ showReset.value = true;
57
56
  }
58
57
  function closePopover() {
59
58
  sortableInstance?.destroy?.();
@@ -77,7 +76,7 @@ const _sfc_main = {
77
76
  tableEditableColumns.value = columnArr;
78
77
  checkedList.value = checkedArr;
79
78
  }
80
- const showClear = vue.ref(true);
79
+ const showReset = vue.ref(true);
81
80
  const checkedList = vue.ref([]);
82
81
  const checkMap = vue.computed(() => {
83
82
  return (vue.unref(checkedList) || []).reduce((map, item) => {
@@ -94,7 +93,7 @@ const _sfc_main = {
94
93
  } else {
95
94
  checkedList.value.push(target.prop);
96
95
  }
97
- showClear.value = true;
96
+ showReset.value = true;
98
97
  }
99
98
  function onConfirmHandler() {
100
99
  if (!checkedList.value.length && showColumnsLength.value === tableEditableColumns.value?.length) {
@@ -121,7 +120,7 @@ const _sfc_main = {
121
120
  props.originColumns
122
121
  );
123
122
  initColumnsInfo(columnsList, columnsEditablele);
124
- showClear.value = false;
123
+ showReset.value = false;
125
124
  }
126
125
  let sortableInstance;
127
126
  async function rowDrag() {
@@ -149,7 +148,7 @@ const _sfc_main = {
149
148
  for (let i = minIndex; i <= maxIndex; i++) {
150
149
  tableEditableColumns.value[i].sortIndex = sortList[i];
151
150
  }
152
- showClear.value = true;
151
+ showReset.value = true;
153
152
  }
154
153
  });
155
154
  }
@@ -172,7 +171,7 @@ const _sfc_main = {
172
171
  ref: popoverRef,
173
172
  trigger: "click",
174
173
  placement: "left-start",
175
- "popper-class": "!bg-background !p-0 border !border-theme",
174
+ "popper-class": "!bg-[rgba(var(--hy-background),0.7)] !p-0 border !border-theme",
176
175
  effect: "dark",
177
176
  width: "400",
178
177
  "show-arrow": false,
@@ -181,8 +180,7 @@ const _sfc_main = {
181
180
  },
182
181
  {
183
182
  reference: vue.withCtx(() => [
184
- vue.createElementVNode("div", { class: "flex items-center gap-[10px] clickBox px-3 rounded hover:bg-background-2" }, [
185
- vue.createCommentVNode(" <el-icon><Edit /></el-icon> "),
183
+ vue.createElementVNode("div", { class: "h-[32px] flex items-center gap-[10px] clickBox px-3 rounded hover:bg-background-2" }, [
186
184
  vue.createVNode(vue.unref(index$1.HyIcon), {
187
185
  "svg-name": "ops-button-edit-column",
188
186
  "class-name": "!w-3 !h-3"
@@ -212,7 +210,14 @@ const _sfc_main = {
212
210
  onClick: closePopover
213
211
  })
214
212
  ]),
215
- vue.createElementVNode("div", { class: "h-[364px] px-4 pt-[11px] pb-1 scroll-body overflow-y-auto" }, [
213
+ vue.createElementVNode("div", { class: "flex items-center gap-1.5 px-4 py-2.5 text-xs text-theme" }, [
214
+ vue.createVNode(vue.unref(index$1.HyIcon), {
215
+ "svg-name": "dispatch-share1-prompt",
216
+ "class-name": "!w-3 !h-3"
217
+ }),
218
+ vue.createElementVNode("span", null, "\u5728\u53F3\u4FA7\u62D6\u52A8\u5217\u53EF\u8FDB\u884C\u8FDB\u884C\u6392\u5E8F")
219
+ ]),
220
+ vue.createElementVNode("div", { class: "h-[364px] p-4 pt-0 pb-1 scroll-body overflow-y-auto" }, [
216
221
  vue.createVNode(vue.unref(elementPlus.ElCheckboxGroup), {
217
222
  modelValue: checkedList.value,
218
223
  "onUpdate:modelValue": ($event) => checkedList.value = $event
@@ -292,14 +297,14 @@ const _sfc_main = {
292
297
  1
293
298
  /* TEXT */
294
299
  ),
295
- showClear.value ? (vue.openBlock(), vue.createElementBlock(
300
+ showReset.value ? (vue.openBlock(), vue.createElementBlock(
296
301
  "span",
297
302
  {
298
303
  key: 0,
299
304
  class: "clickBox text-danger-2 ml-3",
300
305
  onClick: onClearHandler
301
306
  },
302
- vue.toDisplayString(vue.unref(t)("table.clear")),
307
+ vue.toDisplayString(vue.unref(t)("hy.reset")),
303
308
  1
304
309
  /* TEXT */
305
310
  )) : vue.createCommentVNode("v-if", true)
@@ -309,15 +314,9 @@ const _sfc_main = {
309
314
  vue.Fragment,
310
315
  { key: 0 },
311
316
  [
312
- vue.createVNode(vue.unref(elementPlus.ElIcon), {
313
- class: "mr-1.5",
314
- color: "rgb(var(--hy-auxiliary))"
315
- }, {
316
- default: vue.withCtx(() => [
317
- vue.createVNode(vue.unref(iconsVue.Warning))
318
- ]),
319
- _: 1
320
- /* STABLE */
317
+ vue.createVNode(vue.unref(index$1.HyIcon), {
318
+ "svg-name": "dispatch-share1-prompt",
319
+ class: "!w-3 !h-3 text-auxiliary mr-1.5"
321
320
  }),
322
321
  vue.createVNode(vue.unref(index$2.HyTooltip), {
323
322
  "is-always": false,
@@ -8,12 +8,12 @@ var iconsVue = require('@element-plus/icons-vue');
8
8
  require('../../index.js');
9
9
  require('../../../hooks/index.js');
10
10
  require('../../../utils/index.js');
11
- var index = require('../js/index.js');
11
+ var index$1 = require('../js/index.js');
12
12
  var headerItem = require('./headerItem.vue.js');
13
13
  var useLocale = require('../../../hooks/useLocale.js');
14
14
  var is = require('../../../utils/is.js');
15
- var index$1 = require('../../hyTooltip/index.js');
16
- var index$2 = require('../../hyIcon/index.js');
15
+ var index = require('../../hyIcon/index.js');
16
+ var index$2 = require('../../hyTooltip/index.js');
17
17
 
18
18
  const _sfc_main = {
19
19
  __name: "virtualTable",
@@ -287,6 +287,7 @@ const _sfc_main = {
287
287
  return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTableV2), {
288
288
  "expanded-row-keys": expandedRowKeys.value,
289
289
  "onUpdate:expandedRowKeys": ($event) => expandedRowKeys.value = $event,
290
+ cache: 0,
290
291
  "row-key": __props.rowKey,
291
292
  data: dataSource.value,
292
293
  columns: tableColumns.value,
@@ -325,11 +326,11 @@ const _sfc_main = {
325
326
  ],
326
327
  64
327
328
  /* STABLE_FRAGMENT */
328
- )) : !vue.unref(is.isEmpty)(vue.unref(index.renderHeaderHandler)(column, { column, $index })) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.HyTooltip), {
329
+ )) : !vue.unref(is.isEmpty)(vue.unref(index$1.renderHeaderHandler)(column, { column, $index })) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.HyTooltip), {
329
330
  key: 1,
330
331
  "is-always": false,
331
332
  "over-line": 1,
332
- content: vue.unref(index.renderHeaderHandler)(column, { column, $index })
333
+ content: vue.unref(index$1.renderHeaderHandler)(column, { column, $index })
333
334
  }, null, 8, ["content"])) : vue.createCommentVNode("v-if", true)
334
335
  ])
335
336
  ]),
@@ -376,16 +377,11 @@ const _sfc_main = {
376
377
  rowKey: getRowKey(row)
377
378
  }), ["stop"])
378
379
  }, [
379
- vue.createVNode(vue.unref(elementPlus.ElIcon), {
380
- class: "text-main",
380
+ vue.createVNode(vue.unref(index.HyIcon), {
381
+ "svg-name": "dispatch-linear-arrow-down-bold",
382
+ "class-name": "!w-3 !h-3 text-main",
381
383
  style: vue.normalizeStyle({ "margin-inline-start": `${depth * 12}px` })
382
- }, {
383
- default: vue.withCtx(() => [
384
- vue.createVNode(vue.unref(iconsVue.ArrowRight))
385
- ]),
386
- _: 1
387
- /* STABLE */
388
- }, 8, ["style"])
384
+ }, null, 8, ["style"])
389
385
  ], 10, ["onClick"])) : (vue.openBlock(), vue.createElementBlock(
390
386
  "div",
391
387
  {
@@ -430,12 +426,12 @@ const _sfc_main = {
430
426
  (vue.openBlock(true), vue.createElementBlock(
431
427
  vue.Fragment,
432
428
  null,
433
- vue.renderList(vue.unref(index.operatorFilterHandler)(
429
+ vue.renderList(vue.unref(index$1.operatorFilterHandler)(
434
430
  column,
435
431
  { column, row, $index, cellIndex },
436
432
  "default"
437
433
  ), (citem, cindex) => {
438
- return vue.openBlock(), vue.createBlock(vue.unref(index$1.HyTooltip), {
434
+ return vue.openBlock(), vue.createBlock(vue.unref(index$2.HyTooltip), {
439
435
  key: cindex,
440
436
  "is-always": "",
441
437
  overLine: 1,
@@ -443,23 +439,23 @@ const _sfc_main = {
443
439
  }, {
444
440
  default: vue.withCtx(() => [
445
441
  vue.createElementVNode("div", {
446
- class: vue.normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-xs hover:font-bold border border-transparent rounded box-border", [
442
+ class: vue.normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-xs hover:font-bold border border-transparent rounded box-border relative", [
447
443
  citem.className,
448
- vue.unref(index.operatorDisabledHandler)(citem, {
444
+ vue.unref(index$1.operatorDisabledHandler)(citem, {
449
445
  column,
450
446
  row,
451
447
  $index,
452
448
  cellIndex
453
449
  }) ? "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)]"
454
450
  ]]),
455
- onClick: ($event) => vue.unref(index.operatorClickHandler)(
451
+ onClick: ($event) => vue.unref(index$1.operatorClickHandler)(
456
452
  cindex,
457
453
  column,
458
454
  { column, row, $index, cellIndex },
459
455
  "default"
460
456
  )
461
457
  }, [
462
- vue.createVNode(vue.unref(index$2.HyIcon), {
458
+ vue.createVNode(vue.unref(index.HyIcon), {
463
459
  "svg-name": citem.svgName,
464
460
  "class-name": "!w-4 !h-4"
465
461
  }, null, 8, ["svg-name"]),
@@ -475,7 +471,16 @@ const _sfc_main = {
475
471
  )) : (vue.openBlock(), vue.createElementBlock("div", {
476
472
  key: 1,
477
473
  class: "mt-1 whitespace-nowrap"
478
- }, "\xA0"))
474
+ }, "\xA0")),
475
+ vue.unref(index$1.operatorIsDotHandler)(citem, {
476
+ column,
477
+ row,
478
+ $index,
479
+ cellIndex
480
+ }) ? (vue.openBlock(), vue.createElementBlock("div", {
481
+ key: 2,
482
+ class: "w-2 h-2 absolute right-0 top-0 transform translate-x-1/2 -translate-y-1/2 rounded-full bg-danger-2 z-[2]"
483
+ })) : vue.createCommentVNode("v-if", true)
479
484
  ], 10, ["onClick"])
480
485
  ]),
481
486
  _: 2
@@ -485,7 +490,7 @@ const _sfc_main = {
485
490
  128
486
491
  /* KEYED_FRAGMENT */
487
492
  )),
488
- vue.unref(index.operatorFilterHandler)(
493
+ vue.unref(index$1.operatorFilterHandler)(
489
494
  column,
490
495
  { column, row, $index, cellIndex },
491
496
  "more"
@@ -496,7 +501,7 @@ const _sfc_main = {
496
501
  trigger: "click",
497
502
  "popper-style": "min-width: 150px",
498
503
  placement: "bottom",
499
- onCommand: ($event) => vue.unref(index.operatorClickHandler)(
504
+ onCommand: ($event) => vue.unref(index$1.operatorClickHandler)(
500
505
  $event,
501
506
  column,
502
507
  { column, row, $index, cellIndex },
@@ -506,13 +511,13 @@ const _sfc_main = {
506
511
  dropdown: vue.withCtx(() => [
507
512
  vue.createVNode(
508
513
  vue.unref(elementPlus.ElDropdownMenu),
509
- null,
514
+ { class: "hy-table-dropdown-menu" },
510
515
  {
511
516
  default: vue.withCtx(() => [
512
517
  (vue.openBlock(true), vue.createElementBlock(
513
518
  vue.Fragment,
514
519
  null,
515
- vue.renderList(vue.unref(index.operatorFilterHandler)(
520
+ vue.renderList(vue.unref(index$1.operatorFilterHandler)(
516
521
  column,
517
522
  { column, row, $index, cellIndex },
518
523
  "more"
@@ -520,7 +525,7 @@ const _sfc_main = {
520
525
  return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDropdownItem), {
521
526
  key: cindex,
522
527
  command: cindex,
523
- disabled: vue.unref(index.operatorDisabledHandler)(citem, {
528
+ disabled: vue.unref(index$1.operatorDisabledHandler)(citem, {
524
529
  column,
525
530
  row,
526
531
  $index,
@@ -528,15 +533,15 @@ const _sfc_main = {
528
533
  })
529
534
  }, {
530
535
  default: vue.withCtx(() => [
531
- vue.createElementVNode("span", null, [
536
+ vue.createElementVNode("span", { class: "relative" }, [
532
537
  vue.createElementVNode(
533
538
  "span",
534
- null,
539
+ { class: "pr-1" },
535
540
  vue.toDisplayString(citem.label),
536
541
  1
537
542
  /* TEXT */
538
543
  ),
539
- vue.unref(index.operatorDisabledHandler)(citem, {
544
+ vue.unref(index$1.operatorDisabledHandler)(citem, {
540
545
  column,
541
546
  row,
542
547
  $index,
@@ -547,7 +552,7 @@ const _sfc_main = {
547
552
  key: 0,
548
553
  class: "text-xs leading-1"
549
554
  },
550
- "\uFF08" + vue.toDisplayString(vue.unref(index.operatorDisableTextdHandler)(citem, {
555
+ "\uFF08" + vue.toDisplayString(vue.unref(index$1.operatorDisableTextdHandler)(citem, {
551
556
  column,
552
557
  row,
553
558
  $index,
@@ -555,7 +560,16 @@ const _sfc_main = {
555
560
  })) + "\uFF09",
556
561
  1
557
562
  /* TEXT */
558
- )) : vue.createCommentVNode("v-if", true)
563
+ )) : vue.createCommentVNode("v-if", true),
564
+ vue.unref(index$1.operatorIsDotHandler)(citem, {
565
+ column,
566
+ row,
567
+ $index,
568
+ cellIndex
569
+ }) ? (vue.openBlock(), vue.createElementBlock("div", {
570
+ key: 1,
571
+ class: "w-2 h-2 absolute right-0 top-0 transform translate-x-1/2 -translate-y-1/2 rounded-full bg-danger-2 z-[2]"
572
+ })) : vue.createCommentVNode("v-if", true)
559
573
  ])
560
574
  ]),
561
575
  _: 2
@@ -575,7 +589,7 @@ const _sfc_main = {
575
589
  ]),
576
590
  default: vue.withCtx(() => [
577
591
  vue.createElementVNode("span", null, [
578
- vue.createVNode(vue.unref(index$1.HyTooltip), {
592
+ vue.createVNode(vue.unref(index$2.HyTooltip), {
579
593
  "is-always": "",
580
594
  overLine: 1,
581
595
  content: vue.unref(t)("table.moreOperations")
@@ -616,21 +630,21 @@ const _sfc_main = {
616
630
  { key: 5 },
617
631
  [
618
632
  !vue.unref(is.isEmpty)(
619
- vue.unref(index.renderContentHandler)(column, {
633
+ vue.unref(index$1.renderContentHandler)(column, {
620
634
  column,
621
635
  row,
622
636
  $index,
623
637
  cellIndex
624
638
  })
625
- ) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.HyTooltip), {
639
+ ) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.HyTooltip), {
626
640
  key: 0,
627
641
  "is-always": false,
628
642
  "over-line": 2,
629
- content: vue.unref(index.renderContentHandler)(column, { column, row, $index, cellIndex })
630
- }, null, 8, ["content"])) : (vue.openBlock(), vue.createElementBlock("span", {
643
+ content: vue.unref(index$1.renderContentHandler)(column, { column, row, $index, cellIndex })
644
+ }, null, 8, ["content"])) : column.type !== "expand" ? (vue.openBlock(), vue.createElementBlock("span", {
631
645
  key: 1,
632
646
  class: "text-auxiliary"
633
- }, "- -"))
647
+ }, "- -")) : vue.createCommentVNode("v-if", true)
634
648
  ],
635
649
  64
636
650
  /* STABLE_FRAGMENT */
@@ -88,15 +88,15 @@ function operatorShowHandler(operator, scope) {
88
88
  if (is.isFunction(show)) return show(scope);
89
89
  return true;
90
90
  }
91
- function operatorDisabledHandler(column, scope) {
92
- const { disabled } = column;
91
+ function operatorDisabledHandler(operator, scope) {
92
+ const { disabled } = operator;
93
93
  if (is.isBoolean(disabled)) return disabled;
94
94
  if (is.isFunction(disabled)) return disabled(scope);
95
95
  return false;
96
96
  }
97
- function operatorDisableTextdHandler(column, scope) {
97
+ function operatorDisableTextdHandler(operator, scope) {
98
98
  const { t } = useLocale.useLocale();
99
- const { disabledText } = column;
99
+ const { disabledText } = operator;
100
100
  if (is.isString(disabledText)) return disabledText;
101
101
  if (is.isFunction(disabledText)) return disabledText(scope);
102
102
  return t("table.nonsupport");
@@ -130,6 +130,12 @@ function operatorClickHandler(command, column, scope, type = "all") {
130
130
  if (operatorDisabledHandler(target, scope)) return;
131
131
  target?.handler && target.handler(scope);
132
132
  }
133
+ function operatorIsDotHandler(operator, scope) {
134
+ const { isDot } = operator;
135
+ if (is.isFunction(isDot)) return isDot(scope);
136
+ if (is.isBoolean(isDot)) return isDot;
137
+ return false;
138
+ }
133
139
  function renderHeaderHandler(column, scope) {
134
140
  if (!column) return;
135
141
  if (is.isFunction(column.renderHeader)) {
@@ -351,6 +357,7 @@ const useAppTableWrapper = (hy) => {
351
357
  }
352
358
  function clearSelection() {
353
359
  tableRef.value?.clearSelection();
360
+ selectedList.value = [];
354
361
  }
355
362
  function getSelectedList() {
356
363
  return selectedList.value;
@@ -374,12 +381,15 @@ const useAppTableWrapper = (hy) => {
374
381
  }
375
382
  }
376
383
  }
377
- function onTableSelectHandler(selectList = [], row) {
384
+ function onTableSelectHandler(selectList = [], row, isAll = false) {
378
385
  if (selectList.length === 0 && tableDataSource.value.length === 0) {
379
386
  clearSelection();
380
387
  }
381
388
  selectedList.value = [...selectList];
382
389
  emits("on-select-checkbox", [...selectList], row);
390
+ if (isAll) {
391
+ emits("select-all", selectList);
392
+ }
383
393
  }
384
394
  function clearSelectedList(list = []) {
385
395
  selectedList.value = list || [];
@@ -406,13 +416,6 @@ const useAppTableWrapper = (hy) => {
406
416
  }
407
417
  return className.filter(Boolean).join(" ");
408
418
  }
409
- const isSearchFocus = vue.ref(false);
410
- function onSearchInputHandler() {
411
- isSearchFocus.value = true;
412
- }
413
- function onSearchBlurHandler() {
414
- isSearchFocus.value = false;
415
- }
416
419
  vue.watchEffect(() => {
417
420
  const { columnsList, columnsEditablele, searchText } = tableColumnHandler(
418
421
  props.tableColumns,
@@ -446,10 +449,6 @@ const useAppTableWrapper = (hy) => {
446
449
  onTableRowContextmenuHandler,
447
450
  onTableRowClickHandler,
448
451
  onTableColumnsSelectHandler,
449
- // 搜索选中
450
- isSearchFocus,
451
- onSearchInputHandler,
452
- onSearchBlurHandler,
453
452
  showAppTableLoading,
454
453
  closeAppTableLoading
455
454
  };
@@ -459,6 +458,7 @@ exports.operatorClickHandler = operatorClickHandler;
459
458
  exports.operatorDisableTextdHandler = operatorDisableTextdHandler;
460
459
  exports.operatorDisabledHandler = operatorDisabledHandler;
461
460
  exports.operatorFilterHandler = operatorFilterHandler;
461
+ exports.operatorIsDotHandler = operatorIsDotHandler;
462
462
  exports.renderContentHandler = renderContentHandler;
463
463
  exports.renderHeaderHandler = renderHeaderHandler;
464
464
  exports.tableColumnHandler = tableColumnHandler;
@@ -53,6 +53,7 @@ function useAppTableSearch(hy) {
53
53
  tableDataSource.value = data;
54
54
  }
55
55
  totalElements.value = res.data.totalElements;
56
+ hy.expandRowKeys.value = [];
56
57
  emits("reqSuccess", tableDataSource.value);
57
58
  }
58
59
  }
@@ -66,7 +67,7 @@ function useAppTableSearch(hy) {
66
67
  async function resetFn() {
67
68
  await resetFields();
68
69
  props.filterModel.query = null;
69
- getData(1);
70
+ await getData(1);
70
71
  }
71
72
  function getParametersFn() {
72
73
  return Object.assign(
@@ -86,6 +87,7 @@ function useAppTableSearch(hy) {
86
87
  function setData(dataSource) {
87
88
  tableDataSource.value = dataSource || [];
88
89
  hy.loading.value = false;
90
+ emits("reqSuccess", tableDataSource.value);
89
91
  }
90
92
  function onSizeChangeHandler(val) {
91
93
  props.filterModel.page = 1;
@@ -101,6 +103,26 @@ function useAppTableSearch(hy) {
101
103
  const isReset = !(is.isEmpty(oldQueryValue) && is.isEmpty(props.filterModel.query) || oldQueryValue === props.filterModel.query);
102
104
  getData(isReset ? 1 : null);
103
105
  }
106
+ async function getOptions() {
107
+ if (appSearchRef.value) {
108
+ await appSearchRef.value.getOptions();
109
+ }
110
+ }
111
+ async function getOptionsFields(keys) {
112
+ if (appSearchRef.value) {
113
+ await appSearchRef.value.getOptionsFields(keys);
114
+ }
115
+ }
116
+ async function getOptionsError() {
117
+ if (appSearchRef.value) {
118
+ await appSearchRef.value.getOptionsError();
119
+ }
120
+ }
121
+ function getOptionsByField() {
122
+ if (appSearchRef.value) {
123
+ return appSearchRef.value.getOptionsByField();
124
+ }
125
+ }
104
126
  return {
105
127
  totalElements,
106
128
  showFilter,
@@ -113,7 +135,11 @@ function useAppTableSearch(hy) {
113
135
  getTableDataSource,
114
136
  onSizeChangeHandler,
115
137
  onCurrentChangeHandler,
116
- onSearchQueryHandler
138
+ onSearchQueryHandler,
139
+ getOptions,
140
+ getOptionsFields,
141
+ getOptionsError,
142
+ getOptionsByField
117
143
  };
118
144
  }
119
145