hy-dispatch-ui-v3 0.2.38 → 0.2.40
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 +2 -6
- package/es/components/hyButton/style/button.scss +1 -1
- package/es/components/hyDialog/dialog.vue.mjs +93 -81
- package/es/components/hyTableActionButton/tableActionButton.vue.mjs +3 -4
- package/es/components/hyTableForm/batchTableForm.vue.mjs +84 -29
- package/es/components/hyTableForm/style/batchTableForm.scss +62 -0
- package/es/components/hyTableForm/tableForm.vue.mjs +0 -1
- package/es/version.mjs +1 -1
- package/lib/components/hyButton/style/button.scss +1 -1
- package/lib/components/hyDialog/dialog.vue.js +92 -80
- package/lib/components/hyTableActionButton/tableActionButton.vue.js +1 -2
- package/lib/components/hyTableForm/batchTableForm.vue.js +82 -27
- package/lib/components/hyTableForm/style/batchTableForm.scss +62 -0
- package/lib/components/hyTableForm/tableForm.vue.js +0 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
package/dist/tailwind.css
CHANGED
|
@@ -268,10 +268,6 @@
|
|
|
268
268
|
margin-bottom: 0.375rem;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
.\!ml-4 {
|
|
272
|
-
margin-left: 1rem !important;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
271
|
.\!ml-auto {
|
|
276
272
|
margin-left: auto !important;
|
|
277
273
|
}
|
|
@@ -560,8 +556,8 @@
|
|
|
560
556
|
height: 54px;
|
|
561
557
|
}
|
|
562
558
|
|
|
563
|
-
.h-\[
|
|
564
|
-
height:
|
|
559
|
+
.h-\[97vh\] {
|
|
560
|
+
height: 97vh;
|
|
565
561
|
}
|
|
566
562
|
|
|
567
563
|
.h-full {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
.hy-button {
|
|
2
2
|
height: 32px;
|
|
3
|
-
border: 0;
|
|
4
3
|
outline: none;
|
|
5
4
|
appearance: none;
|
|
6
5
|
-webkit-appearance: none;
|
|
@@ -10,6 +9,7 @@
|
|
|
10
9
|
white-space: nowrap;
|
|
11
10
|
font-size: 14px;
|
|
12
11
|
padding: 2px;
|
|
12
|
+
border: 1px solid transparent;
|
|
13
13
|
box-sizing: border-box;
|
|
14
14
|
|
|
15
15
|
&:disabled,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useModel,
|
|
1
|
+
import { useModel, computed, ref, openBlock, createElementBlock, Fragment, createCommentVNode, createVNode, unref, mergeProps, withCtx, createElementVNode, renderSlot, normalizeClass, createBlock, withModifiers, createTextVNode, toDisplayString, mergeModels, defineComponent } from 'vue';
|
|
2
2
|
import { ElDialog } from 'element-plus';
|
|
3
3
|
import { useLocale } from '../../hooks/useLocale.mjs';
|
|
4
4
|
import { HyButton } from '../hyButton/index.mjs';
|
|
@@ -17,19 +17,17 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
17
17
|
dialogType: {
|
|
18
18
|
type: String,
|
|
19
19
|
default: "default"
|
|
20
|
-
// default-默认类型 right-右侧弹窗
|
|
20
|
+
// default-默认类型 right-右侧弹窗
|
|
21
21
|
},
|
|
22
22
|
dialogClass: {
|
|
23
23
|
type: String,
|
|
24
24
|
default: "default"
|
|
25
25
|
},
|
|
26
|
-
// zIndex: {
|
|
27
|
-
// type: Number,
|
|
28
|
-
// default: null, // default-默认类型 right-右侧弹窗 fullscreen-全屏
|
|
29
|
-
// },
|
|
30
26
|
top: String,
|
|
31
|
-
//
|
|
32
|
-
|
|
27
|
+
// 是否可缩小化
|
|
28
|
+
ifShrink: { type: Boolean, default: false },
|
|
29
|
+
// 是否拖拽
|
|
30
|
+
ifDraggable: { type: Boolean, default: false },
|
|
33
31
|
showOperate: { type: Boolean, default: true },
|
|
34
32
|
showClose: { type: Boolean, default: true },
|
|
35
33
|
showCancel: {
|
|
@@ -65,15 +63,26 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
65
63
|
onSubmit: Function
|
|
66
64
|
}, {
|
|
67
65
|
"modelValue": { type: Boolean, default: false },
|
|
68
|
-
"modelModifiers": {}
|
|
66
|
+
"modelModifiers": {},
|
|
67
|
+
"loading": { type: Boolean, default: false },
|
|
68
|
+
"loadingModifiers": {}
|
|
69
69
|
}),
|
|
70
|
-
emits: /* @__PURE__ */ mergeModels(["onMinimized", "onDialogMousedown"], ["update:modelValue"]),
|
|
70
|
+
emits: /* @__PURE__ */ mergeModels(["onMinimized", "onDialogMousedown"], ["update:modelValue", "update:loading"]),
|
|
71
71
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
72
72
|
const props = __props;
|
|
73
73
|
const emits = __emit;
|
|
74
74
|
const { t } = useLocale();
|
|
75
75
|
const visible = useModel(__props, "modelValue");
|
|
76
|
-
const loading =
|
|
76
|
+
const loading = useModel(__props, "loading");
|
|
77
|
+
const dialogTypeRight = computed(() => {
|
|
78
|
+
return props.dialogType === "right";
|
|
79
|
+
});
|
|
80
|
+
const ifDraggable = computed(() => {
|
|
81
|
+
if (props.ifShrink) {
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
return props.ifDraggable;
|
|
85
|
+
});
|
|
77
86
|
const dragLevelIndex = ref(null);
|
|
78
87
|
const minimized = ref(false);
|
|
79
88
|
const animating = ref(false);
|
|
@@ -167,15 +176,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
167
176
|
Fragment,
|
|
168
177
|
null,
|
|
169
178
|
[
|
|
170
|
-
createCommentVNode("
|
|
171
|
-
createCommentVNode(
|
|
172
|
-
createCommentVNode(
|
|
173
|
-
createCommentVNode(' :class="dialogClass"'),
|
|
179
|
+
createCommentVNode(" draggable \u4E3A Dialog \u542F\u7528\u53EF\u62D6\u62FD\u529F\u80FD"),
|
|
180
|
+
createCommentVNode(" modal \u662F\u5426\u9700\u8981\u906E\u7F69\u5C42"),
|
|
181
|
+
createCommentVNode(" overflow \u62D6\u52A8\u8303\u56F4\u53EF\u4EE5\u8D85\u51FA\u53EF\u89C6\u533A"),
|
|
174
182
|
createVNode(unref(ElDialog), mergeProps({
|
|
183
|
+
draggable: ifDraggable.value,
|
|
184
|
+
modal: !ifDraggable.value,
|
|
185
|
+
overflow: !ifDraggable.value,
|
|
175
186
|
"z-index": dragLevelIndex.value,
|
|
176
|
-
draggable: props.showShrink,
|
|
177
|
-
modal: !props.showShrink,
|
|
178
|
-
overflow: !props.showShrink,
|
|
179
187
|
"modal-penetrable": "",
|
|
180
188
|
ref_key: "dialogTestRef",
|
|
181
189
|
ref: dialogTestRef,
|
|
@@ -188,7 +196,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
188
196
|
modelValue: visible.value,
|
|
189
197
|
"onUpdate:modelValue": ($event) => visible.value = $event,
|
|
190
198
|
width: props.width,
|
|
191
|
-
top:
|
|
199
|
+
top: dialogTypeRight.value ? "16px" : props.top || null,
|
|
200
|
+
class: dialogTypeRight.value ? "h-[97vh] flex flex-col !my-4 !mr-4 !ml-auto" : null,
|
|
201
|
+
"body-class": dialogTypeRight.value ? "flex-grow h-0" : null
|
|
192
202
|
}, _ctx.$attrs), {
|
|
193
203
|
header: withCtx(() => [
|
|
194
204
|
createElementVNode(
|
|
@@ -206,7 +216,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
206
216
|
),
|
|
207
217
|
createElementVNode("div", { class: "text-lg cursor-pointer" }, [
|
|
208
218
|
renderSlot(_ctx.$slots, "title-operate-box"),
|
|
209
|
-
__props.
|
|
219
|
+
__props.ifShrink ? (openBlock(), createBlock(unref(HyIcon), {
|
|
210
220
|
key: 0,
|
|
211
221
|
onClick: hideToWorkspace,
|
|
212
222
|
"svg-name": "layout-dialog-narrow",
|
|
@@ -225,72 +235,74 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
225
235
|
)
|
|
226
236
|
]),
|
|
227
237
|
default: withCtx(() => [
|
|
228
|
-
createElementVNode(
|
|
229
|
-
"
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
238
|
+
createElementVNode("div", { class: "h-full flex flex-col text-main" }, [
|
|
239
|
+
renderSlot(_ctx.$slots, "content", {}, () => [
|
|
240
|
+
createElementVNode(
|
|
241
|
+
"div",
|
|
242
|
+
{
|
|
243
|
+
class: normalizeClass([{
|
|
244
|
+
"flex-grow h-0": dialogTypeRight.value
|
|
245
|
+
}, "scroll-body overflow-auto px-6 py-4"])
|
|
246
|
+
},
|
|
247
|
+
[
|
|
236
248
|
renderSlot(_ctx.$slots, "default")
|
|
237
|
-
]
|
|
249
|
+
],
|
|
250
|
+
2
|
|
251
|
+
/* CLASS */
|
|
252
|
+
)
|
|
253
|
+
]),
|
|
254
|
+
__props.showOperate ? (openBlock(), createElementBlock("div", {
|
|
255
|
+
key: 0,
|
|
256
|
+
class: "flex items-center flex-row-reverse justify-between p-5 pr-[26px] mt-auto box-border"
|
|
257
|
+
}, [
|
|
258
|
+
createElementVNode("div", { class: "flex items-center" }, [
|
|
259
|
+
renderSlot(_ctx.$slots, "operate", {}, () => [
|
|
260
|
+
__props.showCancel ? (openBlock(), createBlock(unref(HyButton), {
|
|
261
|
+
key: 0,
|
|
262
|
+
type: __props.cancelType,
|
|
263
|
+
disabled: loading.value,
|
|
264
|
+
class: "!min-w-[120px]",
|
|
265
|
+
onMousedown: withModifiers(() => {
|
|
266
|
+
}, ["stop"]),
|
|
267
|
+
onClick: onCancelHandler
|
|
268
|
+
}, {
|
|
269
|
+
default: withCtx(() => [
|
|
270
|
+
createTextVNode(
|
|
271
|
+
toDisplayString(unref(t)("dialog.cancel")),
|
|
272
|
+
1
|
|
273
|
+
/* TEXT */
|
|
274
|
+
)
|
|
275
|
+
]),
|
|
276
|
+
_: 1
|
|
277
|
+
/* STABLE */
|
|
278
|
+
}, 8, ["type", "disabled", "onMousedown"])) : createCommentVNode("v-if", true),
|
|
279
|
+
__props.showSubmit ? (openBlock(), createBlock(unref(HyButton), {
|
|
280
|
+
key: 1,
|
|
281
|
+
type: __props.submitType,
|
|
282
|
+
disabled: loading.value,
|
|
283
|
+
class: "!min-w-[120px]",
|
|
284
|
+
onClick: onSubmitHandler
|
|
285
|
+
}, {
|
|
286
|
+
default: withCtx(() => [
|
|
287
|
+
createTextVNode(
|
|
288
|
+
toDisplayString(unref(t)("dialog.confirm")),
|
|
289
|
+
1
|
|
290
|
+
/* TEXT */
|
|
291
|
+
)
|
|
292
|
+
]),
|
|
293
|
+
_: 1
|
|
294
|
+
/* STABLE */
|
|
295
|
+
}, 8, ["type", "disabled"])) : createCommentVNode("v-if", true)
|
|
296
|
+
]),
|
|
297
|
+
renderSlot(_ctx.$slots, "operate-right-box")
|
|
238
298
|
]),
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}, [
|
|
243
|
-
renderSlot(_ctx.$slots, "operate-left-box"),
|
|
244
|
-
createElementVNode("div", { class: "flex items-center" }, [
|
|
245
|
-
renderSlot(_ctx.$slots, "operate", {}, () => [
|
|
246
|
-
__props.showCancel ? (openBlock(), createBlock(unref(HyButton), {
|
|
247
|
-
key: 0,
|
|
248
|
-
type: __props.cancelType,
|
|
249
|
-
disabled: loading.value,
|
|
250
|
-
class: "!min-w-[120px]",
|
|
251
|
-
onMousedown: withModifiers(() => {
|
|
252
|
-
}, ["stop"]),
|
|
253
|
-
onClick: onCancelHandler
|
|
254
|
-
}, {
|
|
255
|
-
default: withCtx(() => [
|
|
256
|
-
createTextVNode(
|
|
257
|
-
toDisplayString(unref(t)("dialog.cancel")),
|
|
258
|
-
1
|
|
259
|
-
/* TEXT */
|
|
260
|
-
)
|
|
261
|
-
]),
|
|
262
|
-
_: 1
|
|
263
|
-
/* STABLE */
|
|
264
|
-
}, 8, ["type", "disabled", "onMousedown"])) : createCommentVNode("v-if", true),
|
|
265
|
-
__props.showSubmit ? (openBlock(), createBlock(unref(HyButton), {
|
|
266
|
-
key: 1,
|
|
267
|
-
type: __props.submitType,
|
|
268
|
-
disabled: loading.value,
|
|
269
|
-
class: "!min-w-[120px]",
|
|
270
|
-
onClick: onSubmitHandler
|
|
271
|
-
}, {
|
|
272
|
-
default: withCtx(() => [
|
|
273
|
-
createTextVNode(
|
|
274
|
-
toDisplayString(unref(t)("dialog.confirm")),
|
|
275
|
-
1
|
|
276
|
-
/* TEXT */
|
|
277
|
-
)
|
|
278
|
-
]),
|
|
279
|
-
_: 1
|
|
280
|
-
/* STABLE */
|
|
281
|
-
}, 8, ["type", "disabled"])) : createCommentVNode("v-if", true)
|
|
282
|
-
]),
|
|
283
|
-
renderSlot(_ctx.$slots, "operate-right-box")
|
|
284
|
-
])
|
|
285
|
-
])) : createCommentVNode("v-if", true)
|
|
286
|
-
],
|
|
287
|
-
2
|
|
288
|
-
/* CLASS */
|
|
289
|
-
)
|
|
299
|
+
renderSlot(_ctx.$slots, "operate-left-box")
|
|
300
|
+
])) : createCommentVNode("v-if", true)
|
|
301
|
+
])
|
|
290
302
|
]),
|
|
291
303
|
_: 3
|
|
292
304
|
/* FORWARDED */
|
|
293
|
-
}, 16, ["
|
|
305
|
+
}, 16, ["draggable", "modal", "overflow", "z-index", "modal-class", "modelValue", "onUpdate:modelValue", "width", "top", "class", "body-class"])
|
|
294
306
|
],
|
|
295
307
|
2112
|
|
296
308
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, watch,
|
|
1
|
+
import { defineComponent, ref, computed, watch, openBlock, createElementBlock, createBlock, unref, withCtx, createVNode, normalizeClass, createTextVNode, toDisplayString, createElementVNode, Fragment, renderList, createCommentVNode, normalizeStyle } from 'vue';
|
|
2
2
|
import { ElPopover, ElIcon } from 'element-plus';
|
|
3
|
-
import { Warning } from '@element-plus/icons-vue';
|
|
3
|
+
import { Warning, ArrowDown } from '@element-plus/icons-vue';
|
|
4
4
|
import { useLocale } from '../../hooks/useLocale.mjs';
|
|
5
5
|
import { HyTooltip } from '../hyTooltip/index.mjs';
|
|
6
6
|
import { HyButton } from '../hyButton/index.mjs';
|
|
@@ -119,7 +119,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
119
119
|
watch(() => props.operateList, setSelectedData, { deep: true, immediate: true });
|
|
120
120
|
__expose({});
|
|
121
121
|
return (_ctx, _cache) => {
|
|
122
|
-
const _component_ArrowDown = resolveComponent("ArrowDown");
|
|
123
122
|
return dataList.value.length ? (openBlock(), createElementBlock("div", {
|
|
124
123
|
key: 0,
|
|
125
124
|
class: "hy-table-action-button"
|
|
@@ -203,7 +202,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
203
202
|
}])
|
|
204
203
|
}, {
|
|
205
204
|
default: withCtx(() => [
|
|
206
|
-
createVNode(
|
|
205
|
+
createVNode(unref(ArrowDown))
|
|
207
206
|
]),
|
|
208
207
|
_: 1
|
|
209
208
|
/* STABLE */
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { defineComponent, useTemplateRef, ref, openBlock, createElementBlock, createElementVNode, createVNode, unref as unref$1, withCtx, Fragment, renderList, createCommentVNode, toDisplayString, renderSlot,
|
|
2
|
-
import { ElUpload, ElMessage } from 'element-plus';
|
|
1
|
+
import { defineComponent, useTemplateRef, ref, nextTick, openBlock, createElementBlock, createElementVNode, createVNode, unref as unref$1, withCtx, Fragment, renderList, createCommentVNode, toDisplayString, renderSlot, createTextVNode, mergeProps, createSlots, normalizeProps, guardReactiveProps, normalizeStyle } from 'vue';
|
|
2
|
+
import { ElUpload, ElIcon, ElMessage } from 'element-plus';
|
|
3
|
+
import { Loading } from '@element-plus/icons-vue';
|
|
3
4
|
import _sfc_main$1 from './tableForm.vue.mjs';
|
|
4
5
|
import { downloadTemplateHandler, doReadExcel } from './js/index.mjs';
|
|
5
6
|
import { useApi } from '../../hooks/useApi.mjs';
|
|
6
7
|
import { useLocale } from '../../hooks/useLocale.mjs';
|
|
8
|
+
import { isArray } from '../../utils/is.mjs';
|
|
7
9
|
import { HyIcon } from '../hyIcon/index.mjs';
|
|
8
10
|
import { HyButton } from '../hyButton/index.mjs';
|
|
9
11
|
import { HyConfirmDialog } from '../hyConfirmDialog/index.mjs';
|
|
@@ -77,7 +79,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
77
79
|
type: Function
|
|
78
80
|
}
|
|
79
81
|
},
|
|
80
|
-
emits: [
|
|
82
|
+
emits: [
|
|
83
|
+
"uploading",
|
|
84
|
+
"uploaded",
|
|
85
|
+
"reset",
|
|
86
|
+
"submitting",
|
|
87
|
+
"submit"
|
|
88
|
+
],
|
|
81
89
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
82
90
|
const props = __props;
|
|
83
91
|
const emits = __emit;
|
|
@@ -104,6 +112,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
104
112
|
description: "\u4EE5\u5F53\u524D\u6570\u636E\u4E3A\u51C6<br/>\u6267\u884C\u6279\u91CF\u5BFC\u5165\u6DFB\u52A0\u6570\u636E"
|
|
105
113
|
}
|
|
106
114
|
];
|
|
115
|
+
const isUploading = ref(false);
|
|
107
116
|
const templateFileName = ref("");
|
|
108
117
|
const submitNumber = ref(0);
|
|
109
118
|
const submitting = ref(false);
|
|
@@ -133,16 +142,27 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
133
142
|
if (type.indexOf("application") !== -1) {
|
|
134
143
|
const files = { 0: file.raw };
|
|
135
144
|
try {
|
|
145
|
+
isUploading.value = true;
|
|
146
|
+
emits("uploading");
|
|
136
147
|
const data = await doReadExcel(files, props);
|
|
137
148
|
if (!data) {
|
|
138
149
|
ElMessage.warning("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25");
|
|
150
|
+
isUploading.value = false;
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
if (!data.length) {
|
|
154
|
+
ElMessage.warning("\u8BE5\u6587\u4EF6\u6CA1\u6709\u6570\u636E");
|
|
155
|
+
isUploading.value = false;
|
|
139
156
|
return;
|
|
140
157
|
}
|
|
141
158
|
active.value++;
|
|
159
|
+
isUploading.value = false;
|
|
160
|
+
emits("uploaded");
|
|
142
161
|
await nextTick();
|
|
143
162
|
setData(data);
|
|
144
163
|
templateFileName.value = file.name;
|
|
145
164
|
} catch (err) {
|
|
165
|
+
isUploading.value = false;
|
|
146
166
|
console.error(err);
|
|
147
167
|
return;
|
|
148
168
|
}
|
|
@@ -172,6 +192,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
172
192
|
templateFileName.value = "";
|
|
173
193
|
active.value = 1;
|
|
174
194
|
submitNumber.value = 0;
|
|
195
|
+
emits("reset");
|
|
175
196
|
}
|
|
176
197
|
async function submitDataSource() {
|
|
177
198
|
if (!props.url && !props.submitHandler) {
|
|
@@ -263,8 +284,18 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
263
284
|
}
|
|
264
285
|
}
|
|
265
286
|
__expose({
|
|
266
|
-
setData
|
|
287
|
+
setData: async (dataSource) => {
|
|
288
|
+
if (!isArray(dataSource) || !dataSource.length) return;
|
|
289
|
+
active.value = 2;
|
|
290
|
+
await nextTick();
|
|
291
|
+
setData(dataSource);
|
|
292
|
+
},
|
|
267
293
|
deleteData,
|
|
294
|
+
clearData: () => {
|
|
295
|
+
templateFileName.value = "";
|
|
296
|
+
active.value = 1;
|
|
297
|
+
submitNumber.value = 0;
|
|
298
|
+
},
|
|
268
299
|
getTableDataSource,
|
|
269
300
|
validate,
|
|
270
301
|
submitDataSource
|
|
@@ -297,18 +328,39 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
297
328
|
"svg-name": "analytics-echarts-sos",
|
|
298
329
|
"class-name": "!w-[58px] !h-[66px] mb-4"
|
|
299
330
|
}),
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
331
|
+
isUploading.value ? (openBlock(), createElementBlock("div", {
|
|
332
|
+
key: 0,
|
|
333
|
+
class: "flex items-center gap-2 text-auxiliary"
|
|
334
|
+
}, [
|
|
335
|
+
createElementVNode("span", { class: "text-xs" }, "\u6587\u4EF6\u4E0A\u4F20\u4E2D"),
|
|
336
|
+
createVNode(unref$1(ElIcon), { class: "is-loading" }, {
|
|
337
|
+
default: withCtx(() => [
|
|
338
|
+
createVNode(unref$1(Loading))
|
|
339
|
+
]),
|
|
340
|
+
_: 1
|
|
341
|
+
/* STABLE */
|
|
342
|
+
})
|
|
343
|
+
])) : (openBlock(), createElementBlock(
|
|
344
|
+
Fragment,
|
|
345
|
+
{ key: 1 },
|
|
346
|
+
[
|
|
347
|
+
createElementVNode("div", { class: "mb-1.5 text-main" }, [
|
|
348
|
+
createElementVNode("span", null, "\u70B9\u51FB\u6216\u5C06 \u6587\u4EF6 \u62D6\u62FD\u5230\u6B64\u5904\u4E0A\u4F20")
|
|
349
|
+
]),
|
|
350
|
+
createElementVNode("div", { class: "text-auxiliary text-xs" }, "\u4E00\u6B21\u4EC5\u652F\u6301\u4E0A\u4F20\u4E00\u4E2A\u6587\u4EF6"),
|
|
351
|
+
createElementVNode("div", { class: "w-full text-main absolute left-1/2 bottom-4 transform -translate-x-1/2" }, [
|
|
352
|
+
createElementVNode("div", { class: "flex items-center justify-center text-xs text-auxiliary gap-2" }, [
|
|
353
|
+
createElementVNode("span", null, "\u6587\u4EF6\u652F\u6301\uFF1A"),
|
|
354
|
+
createElementVNode("div", { class: "border border-border rounded py-1 px-2.5 bg-background-4" }, " .xls "),
|
|
355
|
+
createElementVNode("div", { class: "border border-border rounded py-1 px-2.5 bg-background-4" }, " .xlsx "),
|
|
356
|
+
createElementVNode("span", null, "\u5355\u6587\u4EF6\u4E0D\u8D85\u8FC7 10 MB")
|
|
357
|
+
])
|
|
358
|
+
])
|
|
359
|
+
],
|
|
360
|
+
64
|
|
361
|
+
/* STABLE_FRAGMENT */
|
|
362
|
+
)),
|
|
363
|
+
createElementVNode("div", { class: "hy-batch-table-form-upload-bg" })
|
|
312
364
|
]),
|
|
313
365
|
_: 1
|
|
314
366
|
/* STABLE */
|
|
@@ -352,9 +404,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
352
404
|
innerHTML: item.description,
|
|
353
405
|
class: "text-auxiliary text-center mb-3 whitespace-nowrap"
|
|
354
406
|
}, null, 8, ["innerHTML"]),
|
|
355
|
-
renderSlot(_ctx.$slots, "template-down", {}, () => [
|
|
356
|
-
|
|
357
|
-
key: 0,
|
|
407
|
+
index === 0 ? renderSlot(_ctx.$slots, "template-down", {}, () => [
|
|
408
|
+
createVNode(unref$1(HyButton), {
|
|
358
409
|
type: "primary",
|
|
359
410
|
link: "",
|
|
360
411
|
onClick: () => unref$1(downloadTemplateHandler)(props)
|
|
@@ -368,8 +419,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
368
419
|
]),
|
|
369
420
|
_: 1
|
|
370
421
|
/* STABLE */
|
|
371
|
-
}, 8, ["onClick"])
|
|
372
|
-
])
|
|
422
|
+
}, 8, ["onClick"])
|
|
423
|
+
], void 0, 1) : createCommentVNode("v-if", true)
|
|
373
424
|
]);
|
|
374
425
|
}),
|
|
375
426
|
64
|
|
@@ -381,19 +432,22 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
381
432
|
key: 1,
|
|
382
433
|
class: "h-full flex flex-col"
|
|
383
434
|
}, [
|
|
384
|
-
createElementVNode("div", { class: "hy-batch-table-form-template-box" }, [
|
|
435
|
+
createElementVNode("div", { class: "hy-batch-table-form-template-box mb-4" }, [
|
|
385
436
|
createElementVNode("div", { class: "flex items-center gap-2" }, [
|
|
386
437
|
createVNode(unref$1(HyIcon), {
|
|
387
438
|
"svg-name": "analytics-echarts-sos",
|
|
388
439
|
"class-name": "!w-[18px] !h-[22px]"
|
|
389
440
|
}),
|
|
390
|
-
|
|
441
|
+
templateFileName.value ? (openBlock(), createElementBlock(
|
|
391
442
|
"span",
|
|
392
|
-
{
|
|
443
|
+
{
|
|
444
|
+
key: 0,
|
|
445
|
+
class: "text-theme"
|
|
446
|
+
},
|
|
393
447
|
toDisplayString(templateFileName.value),
|
|
394
448
|
1
|
|
395
449
|
/* TEXT */
|
|
396
|
-
),
|
|
450
|
+
)) : createCommentVNode("v-if", true),
|
|
397
451
|
createElementVNode("span", { class: "text-auxiliary" }, "\u89E3\u6790\u5B8C\u6210")
|
|
398
452
|
]),
|
|
399
453
|
createVNode(unref$1(HyButton), {
|
|
@@ -409,9 +463,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
409
463
|
/* STABLE */
|
|
410
464
|
})
|
|
411
465
|
]),
|
|
412
|
-
createVNode(_sfc_main$1, {
|
|
466
|
+
createVNode(_sfc_main$1, mergeProps({
|
|
413
467
|
ref_key: "tableRef",
|
|
414
|
-
ref: tableRef
|
|
468
|
+
ref: tableRef
|
|
469
|
+
}, _ctx.$attrs, {
|
|
415
470
|
tableColumns: __props.tableColumns,
|
|
416
471
|
formColumns: __props.formColumns,
|
|
417
472
|
rules: __props.rules,
|
|
@@ -419,7 +474,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
419
474
|
columnNum: __props.columnNum,
|
|
420
475
|
size: __props.size,
|
|
421
476
|
class: "h-0 flex-1"
|
|
422
|
-
}, createSlots({
|
|
477
|
+
}), createSlots({
|
|
423
478
|
_: 2
|
|
424
479
|
/* DYNAMIC */
|
|
425
480
|
}, [
|
|
@@ -431,7 +486,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
431
486
|
])
|
|
432
487
|
};
|
|
433
488
|
})
|
|
434
|
-
]),
|
|
489
|
+
]), 1040, ["tableColumns", "formColumns", "rules", "rowClickExpand", "columnNum", "size"])
|
|
435
490
|
])) : createCommentVNode("v-if", true),
|
|
436
491
|
submitting.value ? (openBlock(), createElementBlock("div", {
|
|
437
492
|
key: 2,
|
|
@@ -123,5 +123,67 @@
|
|
|
123
123
|
border-radius: 4px;
|
|
124
124
|
background: rgba(var(--hy-background-2), 0.5);
|
|
125
125
|
}
|
|
126
|
+
|
|
127
|
+
.hy-batch-table-form-upload-bg {
|
|
128
|
+
position: absolute;
|
|
129
|
+
width: 100%;
|
|
130
|
+
height: 100%;
|
|
131
|
+
perspective: 800px;
|
|
132
|
+
pointer-events: none;
|
|
133
|
+
overflow: hidden;
|
|
134
|
+
&::before {
|
|
135
|
+
display: block;
|
|
136
|
+
content: '';
|
|
137
|
+
position: absolute;
|
|
138
|
+
top: -50%;
|
|
139
|
+
left: -50%;
|
|
140
|
+
width: 200%;
|
|
141
|
+
height: 200%;
|
|
142
|
+
/* 绘制网格线:使用青色,透明度调低,让它融合在 #14273a 背景里 */
|
|
143
|
+
background-image:
|
|
144
|
+
/* 纵向线 */ linear-gradient(
|
|
145
|
+
90deg,
|
|
146
|
+
rgba(0, 229, 255, 0.1) 1px,
|
|
147
|
+
transparent 1px
|
|
148
|
+
),
|
|
149
|
+
/* 横向线 */
|
|
150
|
+
linear-gradient(rgba(0, 229, 255, 0.1) 1px, transparent 1px);
|
|
151
|
+
|
|
152
|
+
/* 网格尺寸 40px */
|
|
153
|
+
background-size: 40px 40px;
|
|
154
|
+
|
|
155
|
+
/* 3D 倒伏效果 */
|
|
156
|
+
transform: rotateX(60deg);
|
|
157
|
+
|
|
158
|
+
/* 动效:无限流动 */
|
|
159
|
+
animation: grid-flow 20s linear infinite;
|
|
160
|
+
|
|
161
|
+
/* 遮罩:四周渐隐,让网格不那么生硬 */
|
|
162
|
+
mask-image: radial-gradient(
|
|
163
|
+
circle at 50% 50%,
|
|
164
|
+
black 10%,
|
|
165
|
+
transparent 80%
|
|
166
|
+
);
|
|
167
|
+
-webkit-mask-image: radial-gradient(
|
|
168
|
+
circle at 50% 50%,
|
|
169
|
+
black 10%,
|
|
170
|
+
transparent 80%
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
&::after {
|
|
174
|
+
display: block;
|
|
175
|
+
content: '';
|
|
176
|
+
position: absolute;
|
|
177
|
+
top: 0;
|
|
178
|
+
left: 0;
|
|
179
|
+
width: 100%;
|
|
180
|
+
height: 100%;
|
|
181
|
+
background: radial-gradient(
|
|
182
|
+
circle at 50% 50%,
|
|
183
|
+
rgba(0, 229, 255, 0.05) 0%,
|
|
184
|
+
transparent 70%
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
126
188
|
}
|
|
127
189
|
|
package/es/version.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
.hy-button {
|
|
2
2
|
height: 32px;
|
|
3
|
-
border: 0;
|
|
4
3
|
outline: none;
|
|
5
4
|
appearance: none;
|
|
6
5
|
-webkit-appearance: none;
|
|
@@ -10,6 +9,7 @@
|
|
|
10
9
|
white-space: nowrap;
|
|
11
10
|
font-size: 14px;
|
|
12
11
|
padding: 2px;
|
|
12
|
+
border: 1px solid transparent;
|
|
13
13
|
box-sizing: border-box;
|
|
14
14
|
|
|
15
15
|
&:disabled,
|
|
@@ -21,19 +21,17 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
21
21
|
dialogType: {
|
|
22
22
|
type: String,
|
|
23
23
|
default: "default"
|
|
24
|
-
// default-默认类型 right-右侧弹窗
|
|
24
|
+
// default-默认类型 right-右侧弹窗
|
|
25
25
|
},
|
|
26
26
|
dialogClass: {
|
|
27
27
|
type: String,
|
|
28
28
|
default: "default"
|
|
29
29
|
},
|
|
30
|
-
// zIndex: {
|
|
31
|
-
// type: Number,
|
|
32
|
-
// default: null, // default-默认类型 right-右侧弹窗 fullscreen-全屏
|
|
33
|
-
// },
|
|
34
30
|
top: String,
|
|
35
|
-
//
|
|
36
|
-
|
|
31
|
+
// 是否可缩小化
|
|
32
|
+
ifShrink: { type: Boolean, default: false },
|
|
33
|
+
// 是否拖拽
|
|
34
|
+
ifDraggable: { type: Boolean, default: false },
|
|
37
35
|
showOperate: { type: Boolean, default: true },
|
|
38
36
|
showClose: { type: Boolean, default: true },
|
|
39
37
|
showCancel: {
|
|
@@ -69,15 +67,26 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
69
67
|
onSubmit: Function
|
|
70
68
|
}, {
|
|
71
69
|
"modelValue": { type: Boolean, default: false },
|
|
72
|
-
"modelModifiers": {}
|
|
70
|
+
"modelModifiers": {},
|
|
71
|
+
"loading": { type: Boolean, default: false },
|
|
72
|
+
"loadingModifiers": {}
|
|
73
73
|
}),
|
|
74
|
-
emits: /* @__PURE__ */ vue.mergeModels(["onMinimized", "onDialogMousedown"], ["update:modelValue"]),
|
|
74
|
+
emits: /* @__PURE__ */ vue.mergeModels(["onMinimized", "onDialogMousedown"], ["update:modelValue", "update:loading"]),
|
|
75
75
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
76
76
|
const props = __props;
|
|
77
77
|
const emits = __emit;
|
|
78
78
|
const { t } = useLocale.useLocale();
|
|
79
79
|
const visible = vue.useModel(__props, "modelValue");
|
|
80
|
-
const loading = vue.
|
|
80
|
+
const loading = vue.useModel(__props, "loading");
|
|
81
|
+
const dialogTypeRight = vue.computed(() => {
|
|
82
|
+
return props.dialogType === "right";
|
|
83
|
+
});
|
|
84
|
+
const ifDraggable = vue.computed(() => {
|
|
85
|
+
if (props.ifShrink) {
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
return props.ifDraggable;
|
|
89
|
+
});
|
|
81
90
|
const dragLevelIndex = vue.ref(null);
|
|
82
91
|
const minimized = vue.ref(false);
|
|
83
92
|
const animating = vue.ref(false);
|
|
@@ -171,15 +180,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
171
180
|
vue.Fragment,
|
|
172
181
|
null,
|
|
173
182
|
[
|
|
174
|
-
vue.createCommentVNode("
|
|
175
|
-
vue.createCommentVNode(
|
|
176
|
-
vue.createCommentVNode(
|
|
177
|
-
vue.createCommentVNode(' :class="dialogClass"'),
|
|
183
|
+
vue.createCommentVNode(" draggable \u4E3A Dialog \u542F\u7528\u53EF\u62D6\u62FD\u529F\u80FD"),
|
|
184
|
+
vue.createCommentVNode(" modal \u662F\u5426\u9700\u8981\u906E\u7F69\u5C42"),
|
|
185
|
+
vue.createCommentVNode(" overflow \u62D6\u52A8\u8303\u56F4\u53EF\u4EE5\u8D85\u51FA\u53EF\u89C6\u533A"),
|
|
178
186
|
vue.createVNode(vue.unref(elementPlus.ElDialog), vue.mergeProps({
|
|
187
|
+
draggable: ifDraggable.value,
|
|
188
|
+
modal: !ifDraggable.value,
|
|
189
|
+
overflow: !ifDraggable.value,
|
|
179
190
|
"z-index": dragLevelIndex.value,
|
|
180
|
-
draggable: props.showShrink,
|
|
181
|
-
modal: !props.showShrink,
|
|
182
|
-
overflow: !props.showShrink,
|
|
183
191
|
"modal-penetrable": "",
|
|
184
192
|
ref_key: "dialogTestRef",
|
|
185
193
|
ref: dialogTestRef,
|
|
@@ -192,7 +200,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
192
200
|
modelValue: visible.value,
|
|
193
201
|
"onUpdate:modelValue": ($event) => visible.value = $event,
|
|
194
202
|
width: props.width,
|
|
195
|
-
top:
|
|
203
|
+
top: dialogTypeRight.value ? "16px" : props.top || null,
|
|
204
|
+
class: dialogTypeRight.value ? "h-[97vh] flex flex-col !my-4 !mr-4 !ml-auto" : null,
|
|
205
|
+
"body-class": dialogTypeRight.value ? "flex-grow h-0" : null
|
|
196
206
|
}, _ctx.$attrs), {
|
|
197
207
|
header: vue.withCtx(() => [
|
|
198
208
|
vue.createElementVNode(
|
|
@@ -210,7 +220,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
210
220
|
),
|
|
211
221
|
vue.createElementVNode("div", { class: "text-lg cursor-pointer" }, [
|
|
212
222
|
vue.renderSlot(_ctx.$slots, "title-operate-box"),
|
|
213
|
-
__props.
|
|
223
|
+
__props.ifShrink ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.HyIcon), {
|
|
214
224
|
key: 0,
|
|
215
225
|
onClick: hideToWorkspace,
|
|
216
226
|
"svg-name": "layout-dialog-narrow",
|
|
@@ -229,72 +239,74 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
229
239
|
)
|
|
230
240
|
]),
|
|
231
241
|
default: vue.withCtx(() => [
|
|
232
|
-
vue.createElementVNode(
|
|
233
|
-
"
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
242
|
+
vue.createElementVNode("div", { class: "h-full flex flex-col text-main" }, [
|
|
243
|
+
vue.renderSlot(_ctx.$slots, "content", {}, () => [
|
|
244
|
+
vue.createElementVNode(
|
|
245
|
+
"div",
|
|
246
|
+
{
|
|
247
|
+
class: vue.normalizeClass([{
|
|
248
|
+
"flex-grow h-0": dialogTypeRight.value
|
|
249
|
+
}, "scroll-body overflow-auto px-6 py-4"])
|
|
250
|
+
},
|
|
251
|
+
[
|
|
240
252
|
vue.renderSlot(_ctx.$slots, "default")
|
|
241
|
-
]
|
|
253
|
+
],
|
|
254
|
+
2
|
|
255
|
+
/* CLASS */
|
|
256
|
+
)
|
|
257
|
+
]),
|
|
258
|
+
__props.showOperate ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
259
|
+
key: 0,
|
|
260
|
+
class: "flex items-center flex-row-reverse justify-between p-5 pr-[26px] mt-auto box-border"
|
|
261
|
+
}, [
|
|
262
|
+
vue.createElementVNode("div", { class: "flex items-center" }, [
|
|
263
|
+
vue.renderSlot(_ctx.$slots, "operate", {}, () => [
|
|
264
|
+
__props.showCancel ? (vue.openBlock(), vue.createBlock(vue.unref(index.HyButton), {
|
|
265
|
+
key: 0,
|
|
266
|
+
type: __props.cancelType,
|
|
267
|
+
disabled: loading.value,
|
|
268
|
+
class: "!min-w-[120px]",
|
|
269
|
+
onMousedown: vue.withModifiers(() => {
|
|
270
|
+
}, ["stop"]),
|
|
271
|
+
onClick: onCancelHandler
|
|
272
|
+
}, {
|
|
273
|
+
default: vue.withCtx(() => [
|
|
274
|
+
vue.createTextVNode(
|
|
275
|
+
vue.toDisplayString(vue.unref(t)("dialog.cancel")),
|
|
276
|
+
1
|
|
277
|
+
/* TEXT */
|
|
278
|
+
)
|
|
279
|
+
]),
|
|
280
|
+
_: 1
|
|
281
|
+
/* STABLE */
|
|
282
|
+
}, 8, ["type", "disabled", "onMousedown"])) : vue.createCommentVNode("v-if", true),
|
|
283
|
+
__props.showSubmit ? (vue.openBlock(), vue.createBlock(vue.unref(index.HyButton), {
|
|
284
|
+
key: 1,
|
|
285
|
+
type: __props.submitType,
|
|
286
|
+
disabled: loading.value,
|
|
287
|
+
class: "!min-w-[120px]",
|
|
288
|
+
onClick: onSubmitHandler
|
|
289
|
+
}, {
|
|
290
|
+
default: vue.withCtx(() => [
|
|
291
|
+
vue.createTextVNode(
|
|
292
|
+
vue.toDisplayString(vue.unref(t)("dialog.confirm")),
|
|
293
|
+
1
|
|
294
|
+
/* TEXT */
|
|
295
|
+
)
|
|
296
|
+
]),
|
|
297
|
+
_: 1
|
|
298
|
+
/* STABLE */
|
|
299
|
+
}, 8, ["type", "disabled"])) : vue.createCommentVNode("v-if", true)
|
|
300
|
+
]),
|
|
301
|
+
vue.renderSlot(_ctx.$slots, "operate-right-box")
|
|
242
302
|
]),
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}, [
|
|
247
|
-
vue.renderSlot(_ctx.$slots, "operate-left-box"),
|
|
248
|
-
vue.createElementVNode("div", { class: "flex items-center" }, [
|
|
249
|
-
vue.renderSlot(_ctx.$slots, "operate", {}, () => [
|
|
250
|
-
__props.showCancel ? (vue.openBlock(), vue.createBlock(vue.unref(index.HyButton), {
|
|
251
|
-
key: 0,
|
|
252
|
-
type: __props.cancelType,
|
|
253
|
-
disabled: loading.value,
|
|
254
|
-
class: "!min-w-[120px]",
|
|
255
|
-
onMousedown: vue.withModifiers(() => {
|
|
256
|
-
}, ["stop"]),
|
|
257
|
-
onClick: onCancelHandler
|
|
258
|
-
}, {
|
|
259
|
-
default: vue.withCtx(() => [
|
|
260
|
-
vue.createTextVNode(
|
|
261
|
-
vue.toDisplayString(vue.unref(t)("dialog.cancel")),
|
|
262
|
-
1
|
|
263
|
-
/* TEXT */
|
|
264
|
-
)
|
|
265
|
-
]),
|
|
266
|
-
_: 1
|
|
267
|
-
/* STABLE */
|
|
268
|
-
}, 8, ["type", "disabled", "onMousedown"])) : vue.createCommentVNode("v-if", true),
|
|
269
|
-
__props.showSubmit ? (vue.openBlock(), vue.createBlock(vue.unref(index.HyButton), {
|
|
270
|
-
key: 1,
|
|
271
|
-
type: __props.submitType,
|
|
272
|
-
disabled: loading.value,
|
|
273
|
-
class: "!min-w-[120px]",
|
|
274
|
-
onClick: onSubmitHandler
|
|
275
|
-
}, {
|
|
276
|
-
default: vue.withCtx(() => [
|
|
277
|
-
vue.createTextVNode(
|
|
278
|
-
vue.toDisplayString(vue.unref(t)("dialog.confirm")),
|
|
279
|
-
1
|
|
280
|
-
/* TEXT */
|
|
281
|
-
)
|
|
282
|
-
]),
|
|
283
|
-
_: 1
|
|
284
|
-
/* STABLE */
|
|
285
|
-
}, 8, ["type", "disabled"])) : vue.createCommentVNode("v-if", true)
|
|
286
|
-
]),
|
|
287
|
-
vue.renderSlot(_ctx.$slots, "operate-right-box")
|
|
288
|
-
])
|
|
289
|
-
])) : vue.createCommentVNode("v-if", true)
|
|
290
|
-
],
|
|
291
|
-
2
|
|
292
|
-
/* CLASS */
|
|
293
|
-
)
|
|
303
|
+
vue.renderSlot(_ctx.$slots, "operate-left-box")
|
|
304
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
305
|
+
])
|
|
294
306
|
]),
|
|
295
307
|
_: 3
|
|
296
308
|
/* FORWARDED */
|
|
297
|
-
}, 16, ["
|
|
309
|
+
}, 16, ["draggable", "modal", "overflow", "z-index", "modal-class", "modelValue", "onUpdate:modelValue", "width", "top", "class", "body-class"])
|
|
298
310
|
],
|
|
299
311
|
2112
|
|
300
312
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
@@ -123,7 +123,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
123
123
|
vue.watch(() => props.operateList, setSelectedData, { deep: true, immediate: true });
|
|
124
124
|
__expose({});
|
|
125
125
|
return (_ctx, _cache) => {
|
|
126
|
-
const _component_ArrowDown = vue.resolveComponent("ArrowDown");
|
|
127
126
|
return dataList.value.length ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
128
127
|
key: 0,
|
|
129
128
|
class: "hy-table-action-button"
|
|
@@ -207,7 +206,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
207
206
|
}])
|
|
208
207
|
}, {
|
|
209
208
|
default: vue.withCtx(() => [
|
|
210
|
-
vue.createVNode(
|
|
209
|
+
vue.createVNode(vue.unref(iconsVue.ArrowDown))
|
|
211
210
|
]),
|
|
212
211
|
_: 1
|
|
213
212
|
/* STABLE */
|
|
@@ -4,10 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var elementPlus = require('element-plus');
|
|
7
|
+
var iconsVue = require('@element-plus/icons-vue');
|
|
7
8
|
var tableForm = require('./tableForm.vue.js');
|
|
8
9
|
var index$2 = require('./js/index.js');
|
|
9
10
|
var useApi = require('../../hooks/useApi.js');
|
|
10
11
|
var useLocale = require('../../hooks/useLocale.js');
|
|
12
|
+
var is = require('../../utils/is.js');
|
|
11
13
|
var index = require('../hyIcon/index.js');
|
|
12
14
|
var index$1 = require('../hyButton/index.js');
|
|
13
15
|
var index$3 = require('../hyConfirmDialog/index.js');
|
|
@@ -81,7 +83,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
81
83
|
type: Function
|
|
82
84
|
}
|
|
83
85
|
},
|
|
84
|
-
emits: [
|
|
86
|
+
emits: [
|
|
87
|
+
"uploading",
|
|
88
|
+
"uploaded",
|
|
89
|
+
"reset",
|
|
90
|
+
"submitting",
|
|
91
|
+
"submit"
|
|
92
|
+
],
|
|
85
93
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
86
94
|
const props = __props;
|
|
87
95
|
const emits = __emit;
|
|
@@ -108,6 +116,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
108
116
|
description: "\u4EE5\u5F53\u524D\u6570\u636E\u4E3A\u51C6<br/>\u6267\u884C\u6279\u91CF\u5BFC\u5165\u6DFB\u52A0\u6570\u636E"
|
|
109
117
|
}
|
|
110
118
|
];
|
|
119
|
+
const isUploading = vue.ref(false);
|
|
111
120
|
const templateFileName = vue.ref("");
|
|
112
121
|
const submitNumber = vue.ref(0);
|
|
113
122
|
const submitting = vue.ref(false);
|
|
@@ -137,16 +146,27 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
137
146
|
if (type.indexOf("application") !== -1) {
|
|
138
147
|
const files = { 0: file.raw };
|
|
139
148
|
try {
|
|
149
|
+
isUploading.value = true;
|
|
150
|
+
emits("uploading");
|
|
140
151
|
const data = await index$2.doReadExcel(files, props);
|
|
141
152
|
if (!data) {
|
|
142
153
|
elementPlus.ElMessage.warning("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25");
|
|
154
|
+
isUploading.value = false;
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
if (!data.length) {
|
|
158
|
+
elementPlus.ElMessage.warning("\u8BE5\u6587\u4EF6\u6CA1\u6709\u6570\u636E");
|
|
159
|
+
isUploading.value = false;
|
|
143
160
|
return;
|
|
144
161
|
}
|
|
145
162
|
active.value++;
|
|
163
|
+
isUploading.value = false;
|
|
164
|
+
emits("uploaded");
|
|
146
165
|
await vue.nextTick();
|
|
147
166
|
setData(data);
|
|
148
167
|
templateFileName.value = file.name;
|
|
149
168
|
} catch (err) {
|
|
169
|
+
isUploading.value = false;
|
|
150
170
|
console.error(err);
|
|
151
171
|
return;
|
|
152
172
|
}
|
|
@@ -176,6 +196,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
176
196
|
templateFileName.value = "";
|
|
177
197
|
active.value = 1;
|
|
178
198
|
submitNumber.value = 0;
|
|
199
|
+
emits("reset");
|
|
179
200
|
}
|
|
180
201
|
async function submitDataSource() {
|
|
181
202
|
if (!props.url && !props.submitHandler) {
|
|
@@ -267,8 +288,18 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
267
288
|
}
|
|
268
289
|
}
|
|
269
290
|
__expose({
|
|
270
|
-
setData
|
|
291
|
+
setData: async (dataSource) => {
|
|
292
|
+
if (!is.isArray(dataSource) || !dataSource.length) return;
|
|
293
|
+
active.value = 2;
|
|
294
|
+
await vue.nextTick();
|
|
295
|
+
setData(dataSource);
|
|
296
|
+
},
|
|
271
297
|
deleteData,
|
|
298
|
+
clearData: () => {
|
|
299
|
+
templateFileName.value = "";
|
|
300
|
+
active.value = 1;
|
|
301
|
+
submitNumber.value = 0;
|
|
302
|
+
},
|
|
272
303
|
getTableDataSource,
|
|
273
304
|
validate,
|
|
274
305
|
submitDataSource
|
|
@@ -301,18 +332,39 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
301
332
|
"svg-name": "analytics-echarts-sos",
|
|
302
333
|
"class-name": "!w-[58px] !h-[66px] mb-4"
|
|
303
334
|
}),
|
|
304
|
-
vue.
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
vue.
|
|
310
|
-
vue.
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
335
|
+
isUploading.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
336
|
+
key: 0,
|
|
337
|
+
class: "flex items-center gap-2 text-auxiliary"
|
|
338
|
+
}, [
|
|
339
|
+
vue.createElementVNode("span", { class: "text-xs" }, "\u6587\u4EF6\u4E0A\u4F20\u4E2D"),
|
|
340
|
+
vue.createVNode(vue.unref(elementPlus.ElIcon), { class: "is-loading" }, {
|
|
341
|
+
default: vue.withCtx(() => [
|
|
342
|
+
vue.createVNode(vue.unref(iconsVue.Loading))
|
|
343
|
+
]),
|
|
344
|
+
_: 1
|
|
345
|
+
/* STABLE */
|
|
346
|
+
})
|
|
347
|
+
])) : (vue.openBlock(), vue.createElementBlock(
|
|
348
|
+
vue.Fragment,
|
|
349
|
+
{ key: 1 },
|
|
350
|
+
[
|
|
351
|
+
vue.createElementVNode("div", { class: "mb-1.5 text-main" }, [
|
|
352
|
+
vue.createElementVNode("span", null, "\u70B9\u51FB\u6216\u5C06 \u6587\u4EF6 \u62D6\u62FD\u5230\u6B64\u5904\u4E0A\u4F20")
|
|
353
|
+
]),
|
|
354
|
+
vue.createElementVNode("div", { class: "text-auxiliary text-xs" }, "\u4E00\u6B21\u4EC5\u652F\u6301\u4E0A\u4F20\u4E00\u4E2A\u6587\u4EF6"),
|
|
355
|
+
vue.createElementVNode("div", { class: "w-full text-main absolute left-1/2 bottom-4 transform -translate-x-1/2" }, [
|
|
356
|
+
vue.createElementVNode("div", { class: "flex items-center justify-center text-xs text-auxiliary gap-2" }, [
|
|
357
|
+
vue.createElementVNode("span", null, "\u6587\u4EF6\u652F\u6301\uFF1A"),
|
|
358
|
+
vue.createElementVNode("div", { class: "border border-border rounded py-1 px-2.5 bg-background-4" }, " .xls "),
|
|
359
|
+
vue.createElementVNode("div", { class: "border border-border rounded py-1 px-2.5 bg-background-4" }, " .xlsx "),
|
|
360
|
+
vue.createElementVNode("span", null, "\u5355\u6587\u4EF6\u4E0D\u8D85\u8FC7 10 MB")
|
|
361
|
+
])
|
|
362
|
+
])
|
|
363
|
+
],
|
|
364
|
+
64
|
|
365
|
+
/* STABLE_FRAGMENT */
|
|
366
|
+
)),
|
|
367
|
+
vue.createElementVNode("div", { class: "hy-batch-table-form-upload-bg" })
|
|
316
368
|
]),
|
|
317
369
|
_: 1
|
|
318
370
|
/* STABLE */
|
|
@@ -356,9 +408,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
356
408
|
innerHTML: item.description,
|
|
357
409
|
class: "text-auxiliary text-center mb-3 whitespace-nowrap"
|
|
358
410
|
}, null, 8, ["innerHTML"]),
|
|
359
|
-
vue.renderSlot(_ctx.$slots, "template-down", {}, () => [
|
|
360
|
-
|
|
361
|
-
key: 0,
|
|
411
|
+
index === 0 ? vue.renderSlot(_ctx.$slots, "template-down", {}, () => [
|
|
412
|
+
vue.createVNode(vue.unref(index$1.HyButton), {
|
|
362
413
|
type: "primary",
|
|
363
414
|
link: "",
|
|
364
415
|
onClick: () => vue.unref(index$2.downloadTemplateHandler)(props)
|
|
@@ -372,8 +423,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
372
423
|
]),
|
|
373
424
|
_: 1
|
|
374
425
|
/* STABLE */
|
|
375
|
-
}, 8, ["onClick"])
|
|
376
|
-
])
|
|
426
|
+
}, 8, ["onClick"])
|
|
427
|
+
], void 0, 1) : vue.createCommentVNode("v-if", true)
|
|
377
428
|
]);
|
|
378
429
|
}),
|
|
379
430
|
64
|
|
@@ -385,19 +436,22 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
385
436
|
key: 1,
|
|
386
437
|
class: "h-full flex flex-col"
|
|
387
438
|
}, [
|
|
388
|
-
vue.createElementVNode("div", { class: "hy-batch-table-form-template-box" }, [
|
|
439
|
+
vue.createElementVNode("div", { class: "hy-batch-table-form-template-box mb-4" }, [
|
|
389
440
|
vue.createElementVNode("div", { class: "flex items-center gap-2" }, [
|
|
390
441
|
vue.createVNode(vue.unref(index.HyIcon), {
|
|
391
442
|
"svg-name": "analytics-echarts-sos",
|
|
392
443
|
"class-name": "!w-[18px] !h-[22px]"
|
|
393
444
|
}),
|
|
394
|
-
vue.
|
|
445
|
+
templateFileName.value ? (vue.openBlock(), vue.createElementBlock(
|
|
395
446
|
"span",
|
|
396
|
-
{
|
|
447
|
+
{
|
|
448
|
+
key: 0,
|
|
449
|
+
class: "text-theme"
|
|
450
|
+
},
|
|
397
451
|
vue.toDisplayString(templateFileName.value),
|
|
398
452
|
1
|
|
399
453
|
/* TEXT */
|
|
400
|
-
),
|
|
454
|
+
)) : vue.createCommentVNode("v-if", true),
|
|
401
455
|
vue.createElementVNode("span", { class: "text-auxiliary" }, "\u89E3\u6790\u5B8C\u6210")
|
|
402
456
|
]),
|
|
403
457
|
vue.createVNode(vue.unref(index$1.HyButton), {
|
|
@@ -413,9 +467,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
413
467
|
/* STABLE */
|
|
414
468
|
})
|
|
415
469
|
]),
|
|
416
|
-
vue.createVNode(tableForm.default, {
|
|
470
|
+
vue.createVNode(tableForm.default, vue.mergeProps({
|
|
417
471
|
ref_key: "tableRef",
|
|
418
|
-
ref: tableRef
|
|
472
|
+
ref: tableRef
|
|
473
|
+
}, _ctx.$attrs, {
|
|
419
474
|
tableColumns: __props.tableColumns,
|
|
420
475
|
formColumns: __props.formColumns,
|
|
421
476
|
rules: __props.rules,
|
|
@@ -423,7 +478,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
423
478
|
columnNum: __props.columnNum,
|
|
424
479
|
size: __props.size,
|
|
425
480
|
class: "h-0 flex-1"
|
|
426
|
-
}, vue.createSlots({
|
|
481
|
+
}), vue.createSlots({
|
|
427
482
|
_: 2
|
|
428
483
|
/* DYNAMIC */
|
|
429
484
|
}, [
|
|
@@ -435,7 +490,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
435
490
|
])
|
|
436
491
|
};
|
|
437
492
|
})
|
|
438
|
-
]),
|
|
493
|
+
]), 1040, ["tableColumns", "formColumns", "rules", "rowClickExpand", "columnNum", "size"])
|
|
439
494
|
])) : vue.createCommentVNode("v-if", true),
|
|
440
495
|
submitting.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
441
496
|
key: 2,
|
|
@@ -123,5 +123,67 @@
|
|
|
123
123
|
border-radius: 4px;
|
|
124
124
|
background: rgba(var(--hy-background-2), 0.5);
|
|
125
125
|
}
|
|
126
|
+
|
|
127
|
+
.hy-batch-table-form-upload-bg {
|
|
128
|
+
position: absolute;
|
|
129
|
+
width: 100%;
|
|
130
|
+
height: 100%;
|
|
131
|
+
perspective: 800px;
|
|
132
|
+
pointer-events: none;
|
|
133
|
+
overflow: hidden;
|
|
134
|
+
&::before {
|
|
135
|
+
display: block;
|
|
136
|
+
content: '';
|
|
137
|
+
position: absolute;
|
|
138
|
+
top: -50%;
|
|
139
|
+
left: -50%;
|
|
140
|
+
width: 200%;
|
|
141
|
+
height: 200%;
|
|
142
|
+
/* 绘制网格线:使用青色,透明度调低,让它融合在 #14273a 背景里 */
|
|
143
|
+
background-image:
|
|
144
|
+
/* 纵向线 */ linear-gradient(
|
|
145
|
+
90deg,
|
|
146
|
+
rgba(0, 229, 255, 0.1) 1px,
|
|
147
|
+
transparent 1px
|
|
148
|
+
),
|
|
149
|
+
/* 横向线 */
|
|
150
|
+
linear-gradient(rgba(0, 229, 255, 0.1) 1px, transparent 1px);
|
|
151
|
+
|
|
152
|
+
/* 网格尺寸 40px */
|
|
153
|
+
background-size: 40px 40px;
|
|
154
|
+
|
|
155
|
+
/* 3D 倒伏效果 */
|
|
156
|
+
transform: rotateX(60deg);
|
|
157
|
+
|
|
158
|
+
/* 动效:无限流动 */
|
|
159
|
+
animation: grid-flow 20s linear infinite;
|
|
160
|
+
|
|
161
|
+
/* 遮罩:四周渐隐,让网格不那么生硬 */
|
|
162
|
+
mask-image: radial-gradient(
|
|
163
|
+
circle at 50% 50%,
|
|
164
|
+
black 10%,
|
|
165
|
+
transparent 80%
|
|
166
|
+
);
|
|
167
|
+
-webkit-mask-image: radial-gradient(
|
|
168
|
+
circle at 50% 50%,
|
|
169
|
+
black 10%,
|
|
170
|
+
transparent 80%
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
&::after {
|
|
174
|
+
display: block;
|
|
175
|
+
content: '';
|
|
176
|
+
position: absolute;
|
|
177
|
+
top: 0;
|
|
178
|
+
left: 0;
|
|
179
|
+
width: 100%;
|
|
180
|
+
height: 100%;
|
|
181
|
+
background: radial-gradient(
|
|
182
|
+
circle at 50% 50%,
|
|
183
|
+
rgba(0, 229, 255, 0.05) 0%,
|
|
184
|
+
transparent 70%
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
126
188
|
}
|
|
127
189
|
|
package/lib/version.js
CHANGED