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.
- package/dist/tailwind.css +25 -1
- package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +174 -142
- package/es/components/hyButton/button.vue.mjs +16 -3
- package/es/components/hyButton/style/button.scss +2 -0
- package/es/components/hyForm/cpns/formItem.vue.mjs +96 -46
- package/es/components/hyForm/form.vue.mjs +22 -8
- package/es/components/hyForm/js/useAppForm.mjs +1 -1
- package/es/components/hyMap/js/index.mjs +6 -6
- package/es/components/hyMap/map.vue.mjs +14 -4
- package/es/components/hyOrgCascader/orgCascader.vue.mjs +7 -2
- package/es/components/hySearch/cpns/searchItem.vue.mjs +396 -324
- package/es/components/hySearch/search.vue.mjs +17 -7
- package/es/components/hySearch/style/search.scss +7 -0
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +25 -6
- package/es/components/hyTable/js/index.mjs +11 -5
- package/es/components/hyTable/js/search.mjs +25 -1
- package/es/components/hyTable/table.vue.mjs +34 -13
- package/es/components/hyTableActionButton/tableActionButton.vue.mjs +9 -2
- package/es/components/hyTableForm/batchTableForm.vue.mjs +23 -2
- package/es/components/hyTableForm/js/useAppTableForm.mjs +1 -1
- package/es/components/hyTableForm/tableForm.vue.mjs +79 -33
- package/es/components/hyTree/js/index.mjs +118 -50
- package/es/components/hyTree/tree.vue.mjs +4 -2
- package/es/style/index.scss +0 -1
- package/es/style/tailwind.scss +0 -1
- package/es/utils/is.mjs +3 -1
- package/es/utils/map/hook/bigMap.mjs +2 -0
- package/es/utils/map/hook/gaode.mjs +51 -16
- package/es/utils/map/hook/leafletjs.mjs +15 -3
- package/es/utils/map/index.mjs +1 -1
- package/es/version.mjs +1 -1
- package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +173 -141
- package/lib/components/hyButton/button.vue.js +15 -2
- package/lib/components/hyButton/style/button.scss +2 -0
- package/lib/components/hyForm/cpns/formItem.vue.js +93 -43
- package/lib/components/hyForm/form.vue.js +21 -7
- package/lib/components/hyForm/js/useAppForm.js +1 -1
- package/lib/components/hyMap/js/index.js +5 -5
- package/lib/components/hyMap/map.vue.js +13 -3
- package/lib/components/hyOrgCascader/orgCascader.vue.js +7 -2
- package/lib/components/hySearch/cpns/searchItem.vue.js +394 -322
- package/lib/components/hySearch/search.vue.js +17 -7
- package/lib/components/hySearch/style/search.scss +7 -0
- package/lib/components/hyTable/cpns/virtualTable.vue.js +24 -5
- package/lib/components/hyTable/js/index.js +11 -4
- package/lib/components/hyTable/js/search.js +25 -1
- package/lib/components/hyTable/table.vue.js +33 -12
- package/lib/components/hyTableActionButton/tableActionButton.vue.js +9 -2
- package/lib/components/hyTableForm/batchTableForm.vue.js +23 -2
- package/lib/components/hyTableForm/js/useAppTableForm.js +1 -1
- package/lib/components/hyTableForm/tableForm.vue.js +78 -32
- package/lib/components/hyTree/js/index.js +118 -50
- package/lib/components/hyTree/tree.vue.js +4 -2
- package/lib/style/index.scss +0 -1
- package/lib/style/tailwind.scss +0 -1
- package/lib/utils/is.js +5 -3
- package/lib/utils/map/hook/bigMap.js +2 -0
- package/lib/utils/map/hook/gaode.js +51 -16
- package/lib/utils/map/hook/leafletjs.js +15 -3
- package/lib/utils/map/index.js +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { inject, useTemplateRef, computed,
|
|
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,
|
|
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
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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
|
-
|
|
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
|
|
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(
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
"onUpdate:modelValue"
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
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
|
-
"
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
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 */
|