hy-dispatch-ui-v3 0.2.66 → 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 (62) hide show
  1. package/dist/tailwind.css +25 -1
  2. package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +174 -142
  3. package/es/components/hyButton/button.vue.mjs +16 -3
  4. package/es/components/hyButton/style/button.scss +2 -0
  5. package/es/components/hyForm/cpns/formItem.vue.mjs +96 -46
  6. package/es/components/hyForm/form.vue.mjs +22 -8
  7. package/es/components/hyForm/js/useAppForm.mjs +1 -1
  8. package/es/components/hyMap/js/index.mjs +6 -6
  9. package/es/components/hyMap/map.vue.mjs +14 -4
  10. package/es/components/hyOrgCascader/orgCascader.vue.mjs +7 -2
  11. package/es/components/hySearch/cpns/searchItem.vue.mjs +396 -324
  12. package/es/components/hySearch/search.vue.mjs +17 -7
  13. package/es/components/hySearch/style/search.scss +7 -0
  14. package/es/components/hyTable/cpns/virtualTable.vue.mjs +25 -6
  15. package/es/components/hyTable/js/index.mjs +11 -5
  16. package/es/components/hyTable/js/search.mjs +25 -1
  17. package/es/components/hyTable/table.vue.mjs +34 -13
  18. package/es/components/hyTableActionButton/tableActionButton.vue.mjs +9 -2
  19. package/es/components/hyTableForm/batchTableForm.vue.mjs +23 -2
  20. package/es/components/hyTableForm/js/useAppTableForm.mjs +1 -1
  21. package/es/components/hyTableForm/tableForm.vue.mjs +79 -33
  22. package/es/components/hyTree/js/index.mjs +118 -50
  23. package/es/components/hyTree/tree.vue.mjs +4 -2
  24. package/es/style/index.scss +0 -1
  25. package/es/style/tailwind.scss +0 -1
  26. package/es/utils/is.mjs +3 -1
  27. package/es/utils/map/hook/bigMap.mjs +2 -0
  28. package/es/utils/map/hook/gaode.mjs +51 -16
  29. package/es/utils/map/hook/leafletjs.mjs +15 -3
  30. package/es/utils/map/index.mjs +1 -1
  31. package/es/version.mjs +1 -1
  32. package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +173 -141
  33. package/lib/components/hyButton/button.vue.js +15 -2
  34. package/lib/components/hyButton/style/button.scss +2 -0
  35. package/lib/components/hyForm/cpns/formItem.vue.js +93 -43
  36. package/lib/components/hyForm/form.vue.js +21 -7
  37. package/lib/components/hyForm/js/useAppForm.js +1 -1
  38. package/lib/components/hyMap/js/index.js +5 -5
  39. package/lib/components/hyMap/map.vue.js +13 -3
  40. package/lib/components/hyOrgCascader/orgCascader.vue.js +7 -2
  41. package/lib/components/hySearch/cpns/searchItem.vue.js +394 -322
  42. package/lib/components/hySearch/search.vue.js +17 -7
  43. package/lib/components/hySearch/style/search.scss +7 -0
  44. package/lib/components/hyTable/cpns/virtualTable.vue.js +24 -5
  45. package/lib/components/hyTable/js/index.js +11 -4
  46. package/lib/components/hyTable/js/search.js +25 -1
  47. package/lib/components/hyTable/table.vue.js +33 -12
  48. package/lib/components/hyTableActionButton/tableActionButton.vue.js +9 -2
  49. package/lib/components/hyTableForm/batchTableForm.vue.js +23 -2
  50. package/lib/components/hyTableForm/js/useAppTableForm.js +1 -1
  51. package/lib/components/hyTableForm/tableForm.vue.js +78 -32
  52. package/lib/components/hyTree/js/index.js +118 -50
  53. package/lib/components/hyTree/tree.vue.js +4 -2
  54. package/lib/style/index.scss +0 -1
  55. package/lib/style/tailwind.scss +0 -1
  56. package/lib/utils/is.js +5 -3
  57. package/lib/utils/map/hook/bigMap.js +2 -0
  58. package/lib/utils/map/hook/gaode.js +51 -16
  59. package/lib/utils/map/hook/leafletjs.js +15 -3
  60. package/lib/utils/map/index.js +1 -1
  61. package/lib/version.js +1 -1
  62. package/package.json +2 -2
@@ -1,9 +1,9 @@
1
- import { inject, useTemplateRef, computed, ref, reactive, toRefs, onMounted, onBeforeUnmount, unref, openBlock, createBlock, withCtx, createElementVNode, normalizeStyle, createCommentVNode, normalizeClass, renderSlot, createElementBlock, toDisplayString, Fragment, createVNode, mergeProps, withKeys, createSlots, renderList } from 'vue';
1
+ import { inject, useTemplateRef, computed, reactive, toRefs, onMounted, watch, onBeforeUnmount, unref, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, normalizeStyle, createCommentVNode, renderSlot, createElementBlock, toDisplayString, Fragment, createVNode, mergeProps, withKeys, createSlots, renderList } from 'vue';
2
2
  import { ElFormItem, ElSelect, ElIcon, ElSelectV2, ElCascader } from 'element-plus';
3
3
  import { Loading } from '@element-plus/icons-vue';
4
4
  import '../../../utils/index.mjs';
5
5
  import '../../index.mjs';
6
- import { formContextKey, timeRangeHandler, optionsHandler, columnShowHandler, columnItemStyle, columnItemInputStyle, isDisabled, isSelectedTimeRange } from '../js/index.mjs';
6
+ import { formContextKey, optionsHandler, timeRangeHandler, columnShowHandler, columnItemStyle, columnItemInputStyle, isDisabled, isSelectedTimeRange } from '../js/index.mjs';
7
7
  import { isArray } from '../../../utils/is.mjs';
8
8
  import { setValueByProp, getValueByProp, columnPlaceholderHandler, columnLabelHandler } from '../../../utils/form.mjs';
9
9
  import { HyInput } from '../../hyInput/index.mjs';
@@ -36,7 +36,7 @@ const _sfc_main = {
36
36
  const props = __props;
37
37
  const emits = __emit;
38
38
  const formContext = inject(formContextKey);
39
- const orgCascaderRef = useTemplateRef("orgCascaderRef");
39
+ const componentRef = useTemplateRef("componentRef");
40
40
  const columnProp = computed(() => {
41
41
  let field = isArray(props.column.field) ? props.column.field[0] : props.column.field;
42
42
  return field;
@@ -75,39 +75,57 @@ const _sfc_main = {
75
75
  return {
76
76
  ...props.column.attrs,
77
77
  label: columnLabelHandler(props.column, props.model),
78
- placeholder: columnPlaceholderHandler(props.column, props.model)
78
+ placeholder: props.column.optionsError === "error" ? "\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D" : columnPlaceholderHandler(props.column, props.model)
79
79
  };
80
80
  });
81
- const optionsLoading = ref(false);
82
- const optionsError = ref("");
83
- async function obtainOptions() {
84
- if (props.column.optionsFn) {
85
- if (!props.column.optionsFn || optionsLoading.value) return;
86
- optionsLoading.value = true;
87
- optionsError.value = "";
88
- props.column.attrs.options = [];
89
- try {
90
- props.column.attrs.options = await props.column.optionsFn(
91
- props.column,
92
- props.model
93
- );
94
- optionsError.value = "";
95
- } catch (err) {
96
- optionsError.value = "error";
97
- console.error(err);
98
- }
99
- } else if (props.column.type === "org-cascader") {
100
- if (orgCascaderRef.value) {
101
- optionsLoading.value = true;
102
- optionsError.value = "";
103
- try {
104
- await orgCascaderRef.value.getData();
105
- } catch {
106
- optionsError.value = "error";
81
+ function obtainOptions(isMountedLoad = false) {
82
+ return new Promise(async (resolve, reject) => {
83
+ if (props.column.optionsFn) {
84
+ if (!props.column.optionsFn) return;
85
+ props.column.optionsLoading = true;
86
+ props.column.optionsError = "";
87
+ props.column.attrs.options = [];
88
+ if (!(isMountedLoad && props.column.isDefaultGetData === false)) {
89
+ try {
90
+ props.column.attrs.options = await props.column.optionsFn(
91
+ props.column,
92
+ props.model
93
+ );
94
+ props.column.optionsError = "";
95
+ resolve();
96
+ } catch (err) {
97
+ props.column.optionsError = "error";
98
+ console.error(err);
99
+ reject();
100
+ }
101
+ } else {
102
+ resolve();
107
103
  }
104
+ } else if (props.column.type === "org-cascader") {
105
+ if (componentRef.value) {
106
+ props.column.optionsLoading = true;
107
+ props.column.optionsError = "";
108
+ try {
109
+ await componentRef.value.getData();
110
+ resolve();
111
+ } catch {
112
+ props.column.optionsError = "error";
113
+ reject();
114
+ }
115
+ } else {
116
+ resolve();
117
+ }
118
+ } else {
119
+ resolve();
108
120
  }
121
+ props.column.optionsLoading = false;
122
+ });
123
+ }
124
+ function getOptionsHandler(props2, column) {
125
+ if (props2.column.optionsLoading) {
126
+ return [];
109
127
  }
110
- optionsLoading.value = false;
128
+ return optionsHandler(props2, props2.column);
111
129
  }
112
130
  function onChangeHandler(value, column) {
113
131
  const { onChange } = props.column;
@@ -115,6 +133,15 @@ const _sfc_main = {
115
133
  if (!onChange) return;
116
134
  onChange(props.column, props.model, props.index);
117
135
  }
136
+ async function onVisibleChange(value) {
137
+ if (value && props.column.optionsError === "error") {
138
+ try {
139
+ await obtainOptions();
140
+ } catch {
141
+ }
142
+ formContext?.emitOptionsStatus();
143
+ }
144
+ }
118
145
  function onKeydownEnterHander(e) {
119
146
  emits("search");
120
147
  }
@@ -140,16 +167,29 @@ const _sfc_main = {
140
167
  columnConfig,
141
168
  columnAttrs,
142
169
  obtainOptions,
143
- optionsLoading,
144
- optionsError,
170
+ optionsLoading: computed(() => columnConfig.value.optionsLoading),
171
+ optionsError: computed(() => columnConfig.value.optionsError),
145
172
  options: computed(() => {
146
- return optionsHandler(props, props.column);
173
+ return getOptionsHandler(props, props.column);
147
174
  })
148
175
  });
149
176
  onMounted(() => {
150
177
  if (propString.value) {
151
178
  formContext?.addField(context);
152
179
  }
180
+ watch(
181
+ () => formContext.model.errorMsg,
182
+ () => {
183
+ const optionsError = props.column.optionsError;
184
+ if (optionsError === "error") {
185
+ props.column.optionsError = "";
186
+ setTimeout(() => {
187
+ props.column.optionsError = "error";
188
+ }, 1);
189
+ }
190
+ },
191
+ { immediate: true, deep: true }
192
+ );
153
193
  });
154
194
  onBeforeUnmount(() => {
155
195
  formContext?.removeField(context);
@@ -160,297 +200,329 @@ const _sfc_main = {
160
200
  prop: columnProp.value
161
201
  }, {
162
202
  default: withCtx(() => [
163
- createElementVNode("div", { class: "flex bg-background-2 rounded outline outline-1 outline-transparent outline-offset-0 hover:outline-theme box-border" }, [
164
- createElementVNode(
165
- "div",
166
- {
167
- class: "flex",
168
- style: normalizeStyle(unref(columnItemStyle)(props, __props.column))
169
- },
170
- [
171
- createCommentVNode(" \u8868\u5355label "),
172
- createElementVNode(
173
- "div",
174
- {
175
- class: normalizeClass(["flex items-center text-auxiliary text-xs whitespace-nowrap", {
176
- "border-r border-border px-3": __props.column.labelSlot && _ctx.$slots[__props.column.labelSlot] || unref(columnLabelHandler)(__props.column, props.model)
177
- }])
178
- },
179
- [
180
- __props.column.labelSlot && _ctx.$slots[__props.column.labelSlot] ? renderSlot(_ctx.$slots, __props.column.labelSlot, { column: columnConfig.value }, void 0, void 0, 0) : (openBlock(), createElementBlock(
181
- "span",
182
- { key: 1 },
183
- toDisplayString(unref(columnLabelHandler)(__props.column, props.model)),
184
- 1
185
- /* TEXT */
186
- ))
187
- ],
188
- 2
189
- /* CLASS */
190
- ),
191
- createCommentVNode(" \u8868\u5355\u7EC4\u4EF6 "),
192
- createElementVNode(
193
- "div",
194
- {
195
- class: normalizeClass({ "hy-search-custom-wrapper": __props.column.slot }),
196
- style: normalizeStyle(unref(columnItemInputStyle)(props, __props.column))
197
- },
198
- [
199
- createCommentVNode(" \u81EA\u5B9A\u4E49\u5177\u540D\u63D2\u69FD "),
200
- __props.column.slot ? renderSlot(_ctx.$slots, __props.column.slot, { column: columnConfig.value }, void 0, void 0, 0) : __props.column.type === "input" ? (openBlock(), createElementBlock(
201
- Fragment,
202
- { key: 1 },
203
- [
204
- createCommentVNode(" \u8F93\u5165\u6846 "),
205
- createVNode(unref(HyInput), mergeProps({
206
- modelValue: bindValue.value,
207
- "onUpdate:modelValue": ($event) => bindValue.value = $event
208
- }, columnAttrs.value, {
209
- disabled: unref(isDisabled)(props, __props.column),
210
- onKeydown: withKeys(($event) => onKeydownEnterHander($event, __props.column), ["enter"]),
211
- onChange: ($event) => onChangeHandler($event, __props.column)
212
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "onKeydown", "onChange"])
213
- ],
214
- 2112
215
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
216
- )) : __props.column.type === "select" ? (openBlock(), createElementBlock(
217
- Fragment,
218
- { key: 2 },
219
- [
220
- createCommentVNode(" \u9009\u62E9\u6846 "),
221
- createVNode(unref(ElSelect), mergeProps({
222
- modelValue: bindValue.value,
223
- "onUpdate:modelValue": ($event) => bindValue.value = $event
224
- }, columnAttrs.value, {
225
- disabled: unref(isDisabled)(props, __props.column),
226
- options: unref(optionsHandler)(props, __props.column),
227
- onChange: ($event) => onChangeHandler($event, __props.column)
228
- }), createSlots({
229
- _: 2
230
- /* DYNAMIC */
231
- }, [
232
- optionsLoading.value ? {
233
- name: "empty",
234
- fn: withCtx(() => [
235
- createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
236
- createVNode(unref(ElIcon), {
237
- size: "16",
238
- class: "is-loading text-theme"
239
- }, {
240
- default: withCtx(() => [
241
- createVNode(unref(Loading))
242
- ]),
243
- _: 1
244
- /* STABLE */
245
- }),
246
- createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
247
- ])
248
- ]),
249
- key: "0"
250
- } : void 0
251
- ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled", "options", "onChange"])
252
- ],
253
- 2112
254
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
255
- )) : __props.column.type === "select-v2" ? (openBlock(), createElementBlock(
256
- Fragment,
257
- { key: 3 },
258
- [
259
- createCommentVNode(" \u865A\u62DF\u5316\u9009\u62E9\u6846 "),
260
- createVNode(unref(ElSelectV2), mergeProps({
261
- modelValue: bindValue.value,
262
- "onUpdate:modelValue": ($event) => bindValue.value = $event
263
- }, columnAttrs.value, {
264
- disabled: unref(isDisabled)(props, __props.column),
265
- options: unref(optionsHandler)(props, __props.column),
266
- onChange: onChangeHandler
267
- }), createSlots({
268
- _: 2
269
- /* DYNAMIC */
270
- }, [
271
- optionsLoading.value ? {
272
- name: "empty",
273
- fn: withCtx(() => [
274
- createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
275
- createVNode(unref(ElIcon), {
276
- size: "16",
277
- class: "is-loading text-theme"
278
- }, {
279
- default: withCtx(() => [
280
- createVNode(unref(Loading))
281
- ]),
282
- _: 1
283
- /* STABLE */
284
- }),
285
- createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
286
- ])
287
- ]),
288
- key: "0"
289
- } : void 0
290
- ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
291
- ],
292
- 2112
293
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
294
- )) : __props.column.type === "date-picker" ? (openBlock(), createElementBlock(
295
- Fragment,
296
- { key: 4 },
297
- [
298
- createCommentVNode(" \u65E5\u671F\u9009\u62E9\u6846 "),
203
+ createElementVNode(
204
+ "div",
205
+ {
206
+ class: normalizeClass(["flex bg-background-2 rounded outline outline-1 outline-transparent outline-offset-0 hover:outline-theme box-border", [
207
+ {
208
+ "!outline-danger-2 hy-el-search-item-error": __props.column.optionsError === "error"
209
+ }
210
+ ]])
211
+ },
212
+ [
213
+ createElementVNode(
214
+ "div",
215
+ {
216
+ class: "flex",
217
+ style: normalizeStyle(unref(columnItemStyle)(props, __props.column))
218
+ },
219
+ [
220
+ createCommentVNode(" \u8868\u5355label "),
221
+ createElementVNode(
222
+ "div",
223
+ {
224
+ class: normalizeClass(["flex items-center text-auxiliary text-sm whitespace-nowrap", {
225
+ "border-r border-border px-3": __props.column.labelSlot && _ctx.$slots[__props.column.labelSlot] || unref(columnLabelHandler)(__props.column, props.model)
226
+ }])
227
+ },
228
+ [
229
+ __props.column.labelSlot && _ctx.$slots[__props.column.labelSlot] ? renderSlot(_ctx.$slots, __props.column.labelSlot, { column: columnConfig.value }, void 0, void 0, 0) : (openBlock(), createElementBlock(
230
+ "span",
231
+ { key: 1 },
232
+ toDisplayString(unref(columnLabelHandler)(__props.column, props.model)),
233
+ 1
234
+ /* TEXT */
235
+ ))
236
+ ],
237
+ 2
238
+ /* CLASS */
239
+ ),
240
+ createCommentVNode(" \u8868\u5355\u7EC4\u4EF6 "),
241
+ createElementVNode(
242
+ "div",
243
+ {
244
+ class: normalizeClass({ "hy-search-custom-wrapper": __props.column.slot }),
245
+ style: normalizeStyle(unref(columnItemInputStyle)(props, __props.column))
246
+ },
247
+ [
248
+ createCommentVNode(" \u81EA\u5B9A\u4E49\u5177\u540D\u63D2\u69FD "),
249
+ __props.column.slot ? renderSlot(_ctx.$slots, __props.column.slot, { column: columnConfig.value }, void 0, void 0, 0) : __props.column.type === "input" ? (openBlock(), createElementBlock(
250
+ Fragment,
251
+ { key: 1 },
252
+ [
253
+ createCommentVNode(" \u8F93\u5165\u6846 "),
254
+ createVNode(unref(HyInput), mergeProps({
255
+ ref_key: "componentRef",
256
+ ref: componentRef,
257
+ modelValue: bindValue.value,
258
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
259
+ }, columnAttrs.value, {
260
+ disabled: unref(isDisabled)(props, __props.column),
261
+ onKeydown: withKeys(($event) => onKeydownEnterHander($event, __props.column), ["enter"]),
262
+ onChange: ($event) => onChangeHandler($event, __props.column)
263
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "onKeydown", "onChange"])
264
+ ],
265
+ 2112
266
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
267
+ )) : __props.column.type === "select" ? (openBlock(), createElementBlock(
268
+ Fragment,
269
+ { key: 2 },
270
+ [
271
+ createCommentVNode(" \u9009\u62E9\u6846 "),
272
+ createVNode(unref(ElSelect), mergeProps({
273
+ ref_key: "componentRef",
274
+ ref: componentRef,
275
+ modelValue: bindValue.value,
276
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
277
+ }, columnAttrs.value, {
278
+ disabled: unref(isDisabled)(props, __props.column),
279
+ options: getOptionsHandler(props, __props.column),
280
+ onChange: ($event) => onChangeHandler($event, __props.column),
281
+ onVisibleChange
282
+ }), createSlots({
283
+ _: 2
284
+ /* DYNAMIC */
285
+ }, [
286
+ __props.column.optionsLoading ? {
287
+ name: "empty",
288
+ fn: withCtx(() => [
289
+ createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
290
+ createVNode(unref(ElIcon), {
291
+ size: "16",
292
+ class: "is-loading text-theme"
293
+ }, {
294
+ default: withCtx(() => [
295
+ createVNode(unref(Loading))
296
+ ]),
297
+ _: 1
298
+ /* STABLE */
299
+ }),
300
+ createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
301
+ ])
302
+ ]),
303
+ key: "0"
304
+ } : void 0
305
+ ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled", "options", "onChange"])
306
+ ],
307
+ 2112
308
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
309
+ )) : __props.column.type === "select-v2" ? (openBlock(), createElementBlock(
310
+ Fragment,
311
+ { key: 3 },
312
+ [
313
+ createCommentVNode(" \u865A\u62DF\u5316\u9009\u62E9\u6846 "),
314
+ createVNode(unref(ElSelectV2), mergeProps({
315
+ ref_key: "componentRef",
316
+ ref: componentRef,
317
+ modelValue: bindValue.value,
318
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
319
+ }, columnAttrs.value, {
320
+ disabled: unref(isDisabled)(props, __props.column),
321
+ options: getOptionsHandler(props, __props.column),
322
+ onChange: onChangeHandler,
323
+ onVisibleChange
324
+ }), createSlots({
325
+ _: 2
326
+ /* DYNAMIC */
327
+ }, [
328
+ __props.column.optionsLoading ? {
329
+ name: "empty",
330
+ fn: withCtx(() => [
331
+ createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
332
+ createVNode(unref(ElIcon), {
333
+ size: "16",
334
+ class: "is-loading text-theme"
335
+ }, {
336
+ default: withCtx(() => [
337
+ createVNode(unref(Loading))
338
+ ]),
339
+ _: 1
340
+ /* STABLE */
341
+ }),
342
+ createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
343
+ ])
344
+ ]),
345
+ key: "0"
346
+ } : void 0
347
+ ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
348
+ ],
349
+ 2112
350
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
351
+ )) : __props.column.type === "date-picker" ? (openBlock(), createElementBlock(
352
+ Fragment,
353
+ { key: 4 },
354
+ [
355
+ createCommentVNode(" \u65E5\u671F\u9009\u62E9\u6846 "),
356
+ [
357
+ "datetimerange",
358
+ "daterange",
359
+ "monthrange",
360
+ "yearrange"
361
+ ].includes(columnAttrs.value?.type) && unref(isArray)(__props.column.field) ? (openBlock(), createBlock(unref(HyDatePicker), mergeProps({
362
+ key: 0,
363
+ ref_key: "componentRef",
364
+ ref: componentRef,
365
+ start: bindValue.value,
366
+ "onUpdate:start": ($event) => bindValue.value = $event,
367
+ end: bindValue2.value,
368
+ "onUpdate:end": ($event) => bindValue2.value = $event,
369
+ "is-range": true,
370
+ style: { "width": "100%" },
371
+ timeRangeFill: __props.column.timeRangeFill
372
+ }, columnAttrs.value, {
373
+ disabled: unref(isDisabled)(props, __props.column),
374
+ onChange: ($event) => onChangeHandler($event, __props.column)
375
+ }), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "timeRangeFill", "disabled", "onChange"])) : (openBlock(), createBlock(unref(HyDatePicker), mergeProps({
376
+ key: 1,
377
+ ref_key: "componentRef",
378
+ ref: componentRef,
379
+ modelValue: bindValue.value,
380
+ "onUpdate:modelValue": ($event) => bindValue.value = $event,
381
+ "is-range": false,
382
+ style: { "width": "100%" },
383
+ timeRangeFill: __props.column.timeRangeFill
384
+ }, columnAttrs.value, {
385
+ disabled: unref(isDisabled)(props, __props.column),
386
+ onChange: ($event) => onChangeHandler($event, __props.column)
387
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "timeRangeFill", "disabled", "onChange"]))
388
+ ],
389
+ 64
390
+ /* STABLE_FRAGMENT */
391
+ )) : __props.column.type === "time-picker" ? (openBlock(), createElementBlock(
392
+ Fragment,
393
+ { key: 5 },
394
+ [
395
+ createCommentVNode(" \u65F6\u95F4\u9009\u62E9\u6846 "),
396
+ columnAttrs.value.isRange ? (openBlock(), createBlock(unref(HyTimePicker), mergeProps({
397
+ key: 0,
398
+ ref_key: "componentRef",
399
+ ref: componentRef,
400
+ start: bindValue.value,
401
+ "onUpdate:start": ($event) => bindValue.value = $event,
402
+ end: bindValue2.value,
403
+ "onUpdate:end": ($event) => bindValue2.value = $event,
404
+ "is-range": true,
405
+ style: { "width": "100%" }
406
+ }, columnAttrs.value, {
407
+ disabled: unref(isDisabled)(props, __props.column),
408
+ onChange: onChangeHandler
409
+ }), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (openBlock(), createBlock(unref(HyTimePicker), mergeProps({
410
+ key: 1,
411
+ ref_key: "componentRef",
412
+ ref: componentRef,
413
+ modelValue: bindValue.value,
414
+ "onUpdate:modelValue": ($event) => bindValue.value = $event,
415
+ "is-range": false,
416
+ style: { "width": "100%" }
417
+ }, columnAttrs.value, {
418
+ disabled: unref(isDisabled)(props, __props.column),
419
+ onChange: onChangeHandler
420
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"]))
421
+ ],
422
+ 64
423
+ /* STABLE_FRAGMENT */
424
+ )) : __props.column.type === "org-cascader" ? (openBlock(), createElementBlock(
425
+ Fragment,
426
+ { key: 6 },
427
+ [
428
+ createCommentVNode(" \u90E8\u95E8\u7EA7\u8054\u9009\u62E9\u6846 "),
429
+ createVNode(unref(HyOrgCascader), mergeProps({
430
+ ref_key: "componentRef",
431
+ ref: componentRef,
432
+ modelValue: bindValue.value,
433
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
434
+ }, columnAttrs.value, {
435
+ disabled: unref(isDisabled)(props, __props.column),
436
+ onChange: onChangeHandler,
437
+ onVisibleChange
438
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
439
+ ],
440
+ 2112
441
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
442
+ )) : __props.column.type === "cascader" ? (openBlock(), createElementBlock(
443
+ Fragment,
444
+ { key: 7 },
299
445
  [
300
- "datetimerange",
301
- "daterange",
302
- "monthrange",
303
- "yearrange"
304
- ].includes(columnAttrs.value?.type) && unref(isArray)(__props.column.field) ? (openBlock(), createBlock(unref(HyDatePicker), mergeProps({
305
- key: 0,
306
- start: bindValue.value,
307
- "onUpdate:start": ($event) => bindValue.value = $event,
308
- end: bindValue2.value,
309
- "onUpdate:end": ($event) => bindValue2.value = $event,
310
- "is-range": true,
311
- style: { "width": "100%" },
312
- timeRangeFill: __props.column.timeRangeFill
313
- }, columnAttrs.value, {
314
- disabled: unref(isDisabled)(props, __props.column),
315
- onChange: ($event) => onChangeHandler($event, __props.column)
316
- }), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "timeRangeFill", "disabled", "onChange"])) : (openBlock(), createBlock(unref(HyDatePicker), mergeProps({
317
- key: 1,
318
- modelValue: bindValue.value,
319
- "onUpdate:modelValue": ($event) => bindValue.value = $event,
320
- "is-range": false,
321
- style: { "width": "100%" },
322
- timeRangeFill: __props.column.timeRangeFill
323
- }, columnAttrs.value, {
324
- disabled: unref(isDisabled)(props, __props.column),
325
- onChange: ($event) => onChangeHandler($event, __props.column)
326
- }), null, 16, ["modelValue", "onUpdate:modelValue", "timeRangeFill", "disabled", "onChange"]))
327
- ],
328
- 64
329
- /* STABLE_FRAGMENT */
330
- )) : __props.column.type === "time-picker" ? (openBlock(), createElementBlock(
331
- Fragment,
332
- { key: 5 },
333
- [
334
- createCommentVNode(" \u65F6\u95F4\u9009\u62E9\u6846 "),
335
- columnAttrs.value.isRange ? (openBlock(), createBlock(unref(HyTimePicker), mergeProps({
336
- key: 0,
337
- start: bindValue.value,
338
- "onUpdate:start": ($event) => bindValue.value = $event,
339
- end: bindValue2.value,
340
- "onUpdate:end": ($event) => bindValue2.value = $event,
341
- "is-range": true,
342
- style: { "width": "100%" }
343
- }, columnAttrs.value, {
344
- disabled: unref(isDisabled)(props, __props.column),
345
- onChange: onChangeHandler
346
- }), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (openBlock(), createBlock(unref(HyTimePicker), mergeProps({
347
- key: 1,
348
- modelValue: bindValue.value,
349
- "onUpdate:modelValue": ($event) => bindValue.value = $event,
350
- "is-range": false,
351
- style: { "width": "100%" }
352
- }, columnAttrs.value, {
353
- disabled: unref(isDisabled)(props, __props.column),
354
- onChange: onChangeHandler
355
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"]))
356
- ],
357
- 64
358
- /* STABLE_FRAGMENT */
359
- )) : __props.column.type === "org-cascader" ? (openBlock(), createElementBlock(
360
- Fragment,
361
- { key: 6 },
362
- [
363
- createCommentVNode(" \u90E8\u95E8\u7EA7\u8054\u9009\u62E9\u6846 "),
364
- createVNode(unref(HyOrgCascader), mergeProps({
365
- ref_key: "orgCascaderRef",
366
- ref: orgCascaderRef,
367
- modelValue: bindValue.value,
368
- "onUpdate:modelValue": ($event) => bindValue.value = $event
369
- }, columnAttrs.value, {
370
- disabled: unref(isDisabled)(props, __props.column),
371
- onChange: onChangeHandler
372
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
373
- ],
374
- 2112
375
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
376
- )) : __props.column.type === "cascader" ? (openBlock(), createElementBlock(
377
- Fragment,
378
- { key: 7 },
379
- [
380
- createCommentVNode(" \u7EA7\u8054\u9009\u62E9\u6846 "),
381
- createVNode(unref(ElCascader), mergeProps({
382
- modelValue: bindValue.value,
383
- "onUpdate:modelValue": ($event) => bindValue.value = $event
384
- }, columnAttrs.value, {
385
- style: { "width": "100%" },
386
- disabled: unref(isDisabled)(props, __props.column),
387
- options: unref(optionsHandler)(props, __props.column),
388
- onChange: onChangeHandler
389
- }), createSlots({
390
- _: 2
391
- /* DYNAMIC */
392
- }, [
393
- optionsLoading.value ? {
394
- name: "empty",
395
- fn: withCtx(() => [
396
- createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
397
- createVNode(unref(ElIcon), {
398
- size: "16",
399
- class: "is-loading text-theme"
400
- }, {
401
- default: withCtx(() => [
402
- createVNode(unref(Loading))
403
- ]),
404
- _: 1
405
- /* STABLE */
406
- }),
407
- createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
408
- ])
409
- ]),
410
- key: "0"
411
- } : void 0
412
- ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
413
- ],
414
- 2112
415
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
416
- )) : createCommentVNode("v-if", true)
417
- ],
418
- 6
419
- /* CLASS, STYLE */
420
- )
421
- ],
422
- 4
423
- /* STYLE */
424
- ),
425
- __props.column.type === "date-picker" && ["daterange", "datetimerange"].includes(columnAttrs.value?.type) && __props.column.timeRangeOptions?.length ? (openBlock(), createElementBlock("div", {
426
- key: 0,
427
- class: "flex text-main select-none"
428
- }, [
429
- (openBlock(true), createElementBlock(
430
- Fragment,
431
- null,
432
- renderList(__props.column.timeRangeOptions, (item, index) => {
433
- return openBlock(), createElementBlock("div", {
434
- key: index,
435
- class: normalizeClass(["border-l border-border px-[10px] cursor-pointer", {
436
- "bg-[rgba(var(--hy-theme),0.2)] text-theme font-bold": unref(isSelectedTimeRange)(__props.column, item, __props.model)
437
- }]),
438
- onClick: ($event) => onTimeRangeClickHandler(__props.column, item)
439
- }, [
440
- createElementVNode(
441
- "span",
442
- null,
443
- toDisplayString(item.label),
444
- 1
445
- /* TEXT */
446
- )
447
- ], 10, ["onClick"]);
448
- }),
449
- 128
450
- /* KEYED_FRAGMENT */
451
- ))
452
- ])) : createCommentVNode("v-if", true)
453
- ])
446
+ createCommentVNode(" \u7EA7\u8054\u9009\u62E9\u6846 "),
447
+ createVNode(unref(ElCascader), mergeProps({
448
+ ref_key: "componentRef",
449
+ ref: componentRef,
450
+ modelValue: bindValue.value,
451
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
452
+ }, columnAttrs.value, {
453
+ style: { "width": "100%" },
454
+ disabled: unref(isDisabled)(props, __props.column),
455
+ options: getOptionsHandler(props, __props.column),
456
+ onChange: onChangeHandler,
457
+ onVisibleChange
458
+ }), createSlots({
459
+ _: 2
460
+ /* DYNAMIC */
461
+ }, [
462
+ __props.column.optionsLoading ? {
463
+ name: "empty",
464
+ fn: withCtx(() => [
465
+ createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
466
+ createVNode(unref(ElIcon), {
467
+ size: "16",
468
+ class: "is-loading text-theme"
469
+ }, {
470
+ default: withCtx(() => [
471
+ createVNode(unref(Loading))
472
+ ]),
473
+ _: 1
474
+ /* STABLE */
475
+ }),
476
+ createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
477
+ ])
478
+ ]),
479
+ key: "0"
480
+ } : void 0
481
+ ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
482
+ ],
483
+ 2112
484
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
485
+ )) : createCommentVNode("v-if", true)
486
+ ],
487
+ 6
488
+ /* CLASS, STYLE */
489
+ )
490
+ ],
491
+ 4
492
+ /* STYLE */
493
+ ),
494
+ __props.column.type === "date-picker" && ["daterange", "datetimerange"].includes(columnAttrs.value?.type) && __props.column.timeRangeOptions?.length ? (openBlock(), createElementBlock("div", {
495
+ key: 0,
496
+ class: "flex text-main select-none"
497
+ }, [
498
+ (openBlock(true), createElementBlock(
499
+ Fragment,
500
+ null,
501
+ renderList(__props.column.timeRangeOptions, (item, index) => {
502
+ return openBlock(), createElementBlock("div", {
503
+ key: index,
504
+ class: normalizeClass(["border-l border-border px-[10px] cursor-pointer", {
505
+ "bg-[rgba(var(--hy-theme),0.2)] text-theme font-bold": unref(isSelectedTimeRange)(__props.column, item, __props.model)
506
+ }]),
507
+ onClick: ($event) => onTimeRangeClickHandler(__props.column, item)
508
+ }, [
509
+ createElementVNode(
510
+ "span",
511
+ null,
512
+ toDisplayString(item.label),
513
+ 1
514
+ /* TEXT */
515
+ )
516
+ ], 10, ["onClick"]);
517
+ }),
518
+ 128
519
+ /* KEYED_FRAGMENT */
520
+ ))
521
+ ])) : createCommentVNode("v-if", true)
522
+ ],
523
+ 2
524
+ /* CLASS */
525
+ )
454
526
  ]),
455
527
  _: 3
456
528
  /* FORWARDED */