@skyfox2000/webui 1.0.0 → 1.0.4
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/.cursorignore +8 -0
- package/lib/assets/modules/{menuTabs-JxjPoyCD.js → menuTabs-BXdbFZor.js} +143 -138
- package/lib/components/content/form/formItem.vue.d.ts.map +1 -1
- package/lib/components/content/search/index.vue.d.ts +1 -0
- package/lib/components/content/search/index.vue.d.ts.map +1 -1
- package/lib/components/layout/header/headerExits.vue.d.ts.map +1 -1
- package/lib/components/layout/header/index.vue.d.ts.map +1 -1
- package/lib/components/layout/header/user.vue.d.ts +4 -0
- package/lib/components/layout/header/user.vue.d.ts.map +1 -0
- package/lib/components/layout/menu/menuTabs.vue.d.ts.map +1 -1
- package/lib/es/BasicLayout/index.js +1 -1
- package/lib/webui.css +1 -1
- package/lib/webui.es.js +591 -577
- package/package.json +3 -2
- package/src/components/content/form/formItem.vue +39 -4
- package/src/components/content/search/index.vue +12 -0
- package/src/components/layout/header/headerExits.vue +1 -1
- package/src/components/layout/header/index.vue +3 -2
- package/src/components/layout/header/user.vue +10 -0
- package/src/components/layout/menu/menuTabs.vue +14 -1
package/lib/webui.es.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { _ as
|
|
1
|
+
import { _ as Ra } from "./assets/modules/index-D47Ci-T3.js";
|
|
2
|
+
import { _ as z } from "./assets/modules/index-BoKIa2sr.js";
|
|
3
3
|
import { _ as Y } from "./assets/modules/index-BEWJ_qAH.js";
|
|
4
|
-
import { a as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { a as
|
|
7
|
-
import { defineComponent as
|
|
8
|
-
import { useSettingInfo as ye, onFullscreenClick as Ae, createFromIconfont as Ee, ProviderKeys as X, onFormClose as ae, onFormSaveAs as Ye, onFormSave as be, useFormItemFactory as
|
|
9
|
-
import { Popover as Ge, theme as Be, Drawer as Xe, Space as G, Form as
|
|
10
|
-
import { SERVER_HOST as
|
|
11
|
-
import { VueDraggableNext as
|
|
12
|
-
import
|
|
13
|
-
import { _ as
|
|
4
|
+
import { a as qa } from "./assets/modules/index-BEWJ_qAH.js";
|
|
5
|
+
import { _ as j } from "./assets/modules/menuTabs-BXdbFZor.js";
|
|
6
|
+
import { a as Va, c as ja, d as Ha, e as Wa, I as Ja, f as Ga, g as Xa, b as Za } from "./assets/modules/menuTabs-BXdbFZor.js";
|
|
7
|
+
import { defineComponent as C, createBlock as h, openBlock as f, withModifiers as J, unref as e, useAttrs as W, withCtx as _, createElementVNode as T, createVNode as b, mergeProps as B, renderSlot as I, normalizeStyle as ne, toDisplayString as D, createCommentVNode as k, ref as g, provide as he, watch as $, onMounted as K, createTextVNode as P, inject as ue, resolveDirective as Q, withDirectives as V, computed as re, createElementBlock as w, normalizeClass as N, createSlots as ge, useSlots as ze, Fragment as M, renderList as L, resolveDynamicComponent as Ke, onUnmounted as xe, onActivated as Oe, withKeys as fe } from "vue";
|
|
8
|
+
import { useSettingInfo as ye, onFullscreenClick as Ae, createFromIconfont as Ee, ProviderKeys as X, onFormClose as ae, onFormSaveAs as Ye, onFormSave as be, useFormItemFactory as ke, getToolGroup as Ce, onGridRowEdit as Le, onGridRowDelete as Re, getToolVisible as H, onToolClicked as R, getToolStatus as q, useToolFactory as Ue, getToolByKey as Z, filterColumns as we, onColumnVisibleChanged as qe, AppRouter as Qe, openNewForm as Ve, useInputFactory as O, loadOption as $e, unloadOption as Se, formValidate as U, gridQueryFind as ve, gridQueryList as je, gridStatusUpdate as He, OPTIONS as Te, queryTree as De, OptionCommProps as We, circleLoading as Je, doQuery as Ie } from "@skyfox2000/webbase";
|
|
9
|
+
import { Popover as Ge, theme as Be, Drawer as Xe, Space as G, Form as Fe, message as Ze, FormItem as Pe, ConfigProvider as me, Popconfirm as et, Button as Me, DropdownButton as tt, Menu as ie, MenuItem as de, Dropdown as oe, Checkbox as at, Switch as lt, Table as Ne, Tree as rt, Cascader as ot, DatePicker as st, Input as se, InputPassword as nt, InputNumber as ut, RangePicker as it, Textarea as dt, Transfer as ct, TreeSelect as pt, LayoutContent as ft } from "ant-design-vue";
|
|
10
|
+
import { SERVER_HOST as vt, fieldMapping as ee } from "@skyfox2000/fapi";
|
|
11
|
+
import { VueDraggableNext as mt } from "vue-draggable-next";
|
|
12
|
+
import _t from "vue-m-message";
|
|
13
|
+
import { _ as ht, a as gt, b as xt, c as yt } from "./assets/modules/index-BahGnrAq.js";
|
|
14
14
|
import _e from "dayjs";
|
|
15
|
-
import { _ as
|
|
16
|
-
const
|
|
15
|
+
import { _ as tl } from "./assets/modules/uploadList-Dzlg47V0.js";
|
|
16
|
+
const _a = /* @__PURE__ */ C({
|
|
17
17
|
__name: "fullscreen",
|
|
18
18
|
setup(v) {
|
|
19
|
-
const
|
|
20
|
-
return (a, t) => (
|
|
19
|
+
const r = ye();
|
|
20
|
+
return (a, t) => (f(), h(Y, {
|
|
21
21
|
onClick: J(e(Ae), ["stop"]),
|
|
22
|
-
icon: e(
|
|
22
|
+
icon: e(r).fullscreen ? "icon-exitscreen" : "icon-fullscreen",
|
|
23
23
|
class: "w-[17px] h-[17px]"
|
|
24
24
|
}, null, 8, ["onClick", "icon"]));
|
|
25
25
|
}
|
|
26
|
-
}),
|
|
26
|
+
}), bt = { class: "ml-2" }, kt = /* @__PURE__ */ C({
|
|
27
27
|
inheritAttrs: !1,
|
|
28
28
|
__name: "helper",
|
|
29
29
|
props: {
|
|
@@ -31,28 +31,28 @@ const ma = /* @__PURE__ */ k({
|
|
|
31
31
|
maxWidth: {}
|
|
32
32
|
},
|
|
33
33
|
setup(v) {
|
|
34
|
-
const
|
|
35
|
-
return (a, t) => (
|
|
36
|
-
content:
|
|
34
|
+
const r = W();
|
|
35
|
+
return (a, t) => (f(), h(e(Ge), { placement: "topRight" }, {
|
|
36
|
+
content: _(() => [
|
|
37
37
|
I(a.$slots, "default", {}, () => [
|
|
38
|
-
|
|
38
|
+
T("div", {
|
|
39
39
|
class: "text-[14px]",
|
|
40
|
-
style:
|
|
40
|
+
style: ne({ maxWidth: a.maxWidth })
|
|
41
41
|
}, D(a.text), 5)
|
|
42
42
|
])
|
|
43
43
|
]),
|
|
44
|
-
default:
|
|
45
|
-
|
|
44
|
+
default: _(() => [
|
|
45
|
+
T("span", bt, [
|
|
46
46
|
b(Y, B({
|
|
47
47
|
icon: "icon-question-circle",
|
|
48
48
|
class: "text-[#888] w-4 h-4"
|
|
49
|
-
}, e(
|
|
49
|
+
}, e(r)), null, 16)
|
|
50
50
|
])
|
|
51
51
|
]),
|
|
52
52
|
_: 3
|
|
53
53
|
}));
|
|
54
54
|
}
|
|
55
|
-
}),
|
|
55
|
+
}), ha = /* @__PURE__ */ C({
|
|
56
56
|
__name: "layoutIcon",
|
|
57
57
|
props: {
|
|
58
58
|
icon: {
|
|
@@ -63,20 +63,20 @@ const ma = /* @__PURE__ */ k({
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
setup(v) {
|
|
66
|
-
const
|
|
67
|
-
iconUrl: `${
|
|
66
|
+
const r = v, t = Ee({
|
|
67
|
+
iconUrl: `${vt.MICROLAYOUT_ICONS}`,
|
|
68
68
|
monoColor: !0,
|
|
69
|
-
icon:
|
|
70
|
-
icons:
|
|
69
|
+
icon: r.icon,
|
|
70
|
+
icons: r.icons
|
|
71
71
|
});
|
|
72
|
-
return (
|
|
72
|
+
return (o, n) => v.icon || v.icons ? (f(), h(e(t), B({
|
|
73
73
|
key: 0,
|
|
74
74
|
icon: v.icon,
|
|
75
75
|
icons: v.icons,
|
|
76
76
|
class: ["align-middle"]
|
|
77
|
-
},
|
|
77
|
+
}, o.$attrs), null, 16, ["icon", "icons"])) : k("", !0);
|
|
78
78
|
}
|
|
79
|
-
}), Ct = { class: "hover:bg-gray-200 w-[24px] h-[24px] rounded-md" },
|
|
79
|
+
}), Ct = { class: "hover:bg-gray-200 w-[24px] h-[24px] rounded-md" }, ga = /* @__PURE__ */ C({
|
|
80
80
|
__name: "index",
|
|
81
81
|
props: {
|
|
82
82
|
saveText: {},
|
|
@@ -85,21 +85,21 @@ const ma = /* @__PURE__ */ k({
|
|
|
85
85
|
editorCtrl: {}
|
|
86
86
|
},
|
|
87
87
|
setup(v) {
|
|
88
|
-
const { useToken:
|
|
88
|
+
const { useToken: r } = Be, { token: a } = r(), t = g(!1), n = v.editorCtrl;
|
|
89
89
|
he(X.EditorControl, n), $(
|
|
90
90
|
() => n.visible.value,
|
|
91
91
|
(d) => {
|
|
92
92
|
t.value = d ?? !1;
|
|
93
93
|
}
|
|
94
|
-
),
|
|
94
|
+
), K(() => {
|
|
95
95
|
t.value = n.visible.value ?? !1;
|
|
96
96
|
});
|
|
97
|
-
const
|
|
97
|
+
const p = () => {
|
|
98
98
|
ae(n);
|
|
99
99
|
};
|
|
100
|
-
return (d,
|
|
100
|
+
return (d, c) => (f(), h(e(Xe), {
|
|
101
101
|
open: t.value,
|
|
102
|
-
"onUpdate:open":
|
|
102
|
+
"onUpdate:open": c[4] || (c[4] = (s) => t.value = s),
|
|
103
103
|
"get-container": !1,
|
|
104
104
|
closable: !1,
|
|
105
105
|
"header-style": {
|
|
@@ -118,10 +118,10 @@ const ma = /* @__PURE__ */ k({
|
|
|
118
118
|
boxShadow: "rgba(0, 0, 0, 0.3) -2px 0px 8px"
|
|
119
119
|
},
|
|
120
120
|
width: "420px",
|
|
121
|
-
onClose:
|
|
121
|
+
onClose: p
|
|
122
122
|
}, {
|
|
123
|
-
extra:
|
|
124
|
-
|
|
123
|
+
extra: _(() => [
|
|
124
|
+
T("div", Ct, [
|
|
125
125
|
b(e(Y), {
|
|
126
126
|
class: "top-[-2px] left-[2px] w-6 h-6",
|
|
127
127
|
icon: "icon-new",
|
|
@@ -130,47 +130,47 @@ const ma = /* @__PURE__ */ k({
|
|
|
130
130
|
clickable: "",
|
|
131
131
|
color: "#666",
|
|
132
132
|
position: [0, 0],
|
|
133
|
-
onClick:
|
|
133
|
+
onClick: c[0] || (c[0] = () => e(ae)(e(n)))
|
|
134
134
|
})
|
|
135
135
|
])
|
|
136
136
|
]),
|
|
137
|
-
default:
|
|
137
|
+
default: _(() => [
|
|
138
138
|
I(d.$slots, "default")
|
|
139
139
|
]),
|
|
140
|
-
footer:
|
|
140
|
+
footer: _(() => [
|
|
141
141
|
b(e(G), null, {
|
|
142
|
-
default:
|
|
143
|
-
d.cancelText !== "" ? (
|
|
142
|
+
default: _(() => [
|
|
143
|
+
d.cancelText !== "" ? (f(), h(e(z), {
|
|
144
144
|
key: 0,
|
|
145
|
-
onClick:
|
|
145
|
+
onClick: c[1] || (c[1] = () => e(ae)(e(n)))
|
|
146
146
|
}, {
|
|
147
|
-
default:
|
|
148
|
-
|
|
147
|
+
default: _(() => [
|
|
148
|
+
P(D(d.cancelText ?? "取消"), 1)
|
|
149
149
|
]),
|
|
150
150
|
_: 1
|
|
151
|
-
})) :
|
|
152
|
-
d.saveAsText !== "" && e(n).saveAsBtnVisible !== !1 ? (
|
|
151
|
+
})) : k("", !0),
|
|
152
|
+
d.saveAsText !== "" && e(n).saveAsBtnVisible !== !1 ? (f(), h(e(z), {
|
|
153
153
|
key: 1,
|
|
154
|
-
onClick:
|
|
154
|
+
onClick: c[2] || (c[2] = () => e(Ye)(e(n))),
|
|
155
155
|
type: "primary",
|
|
156
156
|
loading: e(n).isFormSaving.value
|
|
157
157
|
}, {
|
|
158
|
-
default:
|
|
159
|
-
|
|
158
|
+
default: _(() => [
|
|
159
|
+
P(D(d.saveAsText ?? "另存为"), 1)
|
|
160
160
|
]),
|
|
161
161
|
_: 1
|
|
162
|
-
}, 8, ["loading"])) :
|
|
163
|
-
d.saveText !== "" && e(n).saveBtnVisible !== !1 ? (
|
|
162
|
+
}, 8, ["loading"])) : k("", !0),
|
|
163
|
+
d.saveText !== "" && e(n).saveBtnVisible !== !1 ? (f(), h(e(z), {
|
|
164
164
|
key: 2,
|
|
165
|
-
onClick:
|
|
165
|
+
onClick: c[3] || (c[3] = () => e(be)(e(n))),
|
|
166
166
|
type: "primary",
|
|
167
167
|
loading: e(n).isFormSaving.value
|
|
168
168
|
}, {
|
|
169
|
-
default:
|
|
170
|
-
|
|
169
|
+
default: _(() => [
|
|
170
|
+
P(D(d.saveText ?? "保存"), 1)
|
|
171
171
|
]),
|
|
172
172
|
_: 1
|
|
173
|
-
}, 8, ["loading"])) :
|
|
173
|
+
}, 8, ["loading"])) : k("", !0)
|
|
174
174
|
]),
|
|
175
175
|
_: 1
|
|
176
176
|
})
|
|
@@ -178,7 +178,7 @@ const ma = /* @__PURE__ */ k({
|
|
|
178
178
|
_: 3
|
|
179
179
|
}, 8, ["open", "header-style"]));
|
|
180
180
|
}
|
|
181
|
-
}),
|
|
181
|
+
}), xa = /* @__PURE__ */ C({
|
|
182
182
|
__name: "index",
|
|
183
183
|
props: {
|
|
184
184
|
labelWidth: {},
|
|
@@ -186,20 +186,20 @@ const ma = /* @__PURE__ */ k({
|
|
|
186
186
|
editorCtrl: {}
|
|
187
187
|
},
|
|
188
188
|
setup(v) {
|
|
189
|
-
const
|
|
190
|
-
return (t,
|
|
191
|
-
const n =
|
|
192
|
-
return
|
|
193
|
-
"label-col": { flex:
|
|
189
|
+
const r = v, a = r.editorCtrl ?? ue(X.EditorControl, void 0);
|
|
190
|
+
return (t, o) => {
|
|
191
|
+
const n = Q("submit");
|
|
192
|
+
return V((f(), h(e(Fe), {
|
|
193
|
+
"label-col": { flex: r.labelWidth ?? "85px" },
|
|
194
194
|
"wrapper-col": {
|
|
195
|
-
flex:
|
|
195
|
+
flex: r.wrapperWidth ?? "1"
|
|
196
196
|
},
|
|
197
197
|
style: {
|
|
198
198
|
display: "flex",
|
|
199
199
|
flexWrap: "wrap"
|
|
200
200
|
}
|
|
201
201
|
}, {
|
|
202
|
-
default:
|
|
202
|
+
default: _(() => [
|
|
203
203
|
I(t.$slots, "default")
|
|
204
204
|
]),
|
|
205
205
|
_: 3
|
|
@@ -213,10 +213,10 @@ const ma = /* @__PURE__ */ k({
|
|
|
213
213
|
]);
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
|
-
}),
|
|
216
|
+
}), wt = { class: "w-full flex items-center" }, $t = { class: "flex-grow" }, St = { class: "w-8 mt-[-2px]" }, Tt = {
|
|
217
217
|
key: 1,
|
|
218
218
|
class: "absolute bottom-[3px] left-[85px] text-[12px] text-[#ff4d4fcc] block"
|
|
219
|
-
},
|
|
219
|
+
}, ya = /* @__PURE__ */ C({
|
|
220
220
|
inheritAttrs: !1,
|
|
221
221
|
__name: "formItem",
|
|
222
222
|
props: {
|
|
@@ -226,51 +226,61 @@ const ma = /* @__PURE__ */ k({
|
|
|
226
226
|
width: {}
|
|
227
227
|
},
|
|
228
228
|
setup(v) {
|
|
229
|
-
const
|
|
230
|
-
|
|
229
|
+
const r = v, a = W(), t = ue(X.EditorControl, void 0), o = ke(r, t), n = g(!1);
|
|
230
|
+
setTimeout(() => {
|
|
231
231
|
n.value = !0;
|
|
232
|
-
}, 30)
|
|
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
|
-
|
|
232
|
+
}, 30);
|
|
233
|
+
const p = (c, s) => {
|
|
234
|
+
if (!s)
|
|
235
|
+
return;
|
|
236
|
+
const [u, ...l] = c;
|
|
237
|
+
return c.length === 1 ? s[u] : p(l, s[u].fields);
|
|
238
|
+
}, d = re(() => {
|
|
239
|
+
var s;
|
|
240
|
+
if (!r.rule)
|
|
241
|
+
return !1;
|
|
242
|
+
const c = p(r.rule.split("."), (s = t == null ? void 0 : t.formRules) == null ? void 0 : s.value);
|
|
243
|
+
return c ? c.required ?? !0 : (Ze.error(`"${r.label}" 的验证规则 \`${r.rule}\` 不存在`), o.value.errClass = "text-[#ff4d4f]", o.value.msg = `规则 \`${r.rule}\` 不存在,请检查代码!`, !0);
|
|
244
|
+
});
|
|
245
|
+
return (c, s) => (f(), w("div", {
|
|
246
|
+
class: N(["w-full relative mb-1", c.width])
|
|
247
|
+
}, [
|
|
248
|
+
n.value ? (f(), h(e(Pe), B({
|
|
249
|
+
key: 0,
|
|
250
|
+
required: d.value,
|
|
251
|
+
class: "!w-[95%] relative"
|
|
252
|
+
}, e(a), {
|
|
253
|
+
class: [c.rule ? "" : "mb-3"]
|
|
254
|
+
}), {
|
|
255
|
+
label: _(() => [
|
|
256
|
+
T("span", {
|
|
257
|
+
class: N([e(o).errClass ? "text-[#ff4d4f]" : "", "w-full"])
|
|
258
|
+
}, D(c.label), 3)
|
|
259
|
+
]),
|
|
260
|
+
default: _(() => [
|
|
261
|
+
T("div", wt, [
|
|
262
|
+
T("div", $t, [
|
|
263
|
+
I(c.$slots, "default")
|
|
264
|
+
]),
|
|
265
|
+
T("div", St, [
|
|
266
|
+
I(c.$slots, "helper", {}, () => [
|
|
267
|
+
c.helper ? (f(), h(e(kt), {
|
|
268
|
+
key: 0,
|
|
269
|
+
text: c.helper
|
|
270
|
+
}, null, 8, ["text"])) : k("", !0)
|
|
261
271
|
])
|
|
262
272
|
])
|
|
263
|
-
])
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
273
|
+
])
|
|
274
|
+
]),
|
|
275
|
+
_: 3
|
|
276
|
+
}, 16, ["required", "class"])) : k("", !0),
|
|
277
|
+
e(o).errClass ? (f(), w("span", Tt, D(e(o).msg), 1)) : k("", !0)
|
|
278
|
+
], 2));
|
|
269
279
|
}
|
|
270
|
-
}),
|
|
280
|
+
}), Dt = { class: "w-1/3 relative mb-1" }, It = { class: "flex items-center" }, Bt = { class: "flex-grow pl-1" }, Ft = {
|
|
271
281
|
key: 0,
|
|
272
282
|
class: "absolute bottom-[3px] left-[85px] text-[12px] text-[#ff4d4fcc] block"
|
|
273
|
-
}, le = /* @__PURE__ */
|
|
283
|
+
}, le = /* @__PURE__ */ C({
|
|
274
284
|
inheritAttrs: !1,
|
|
275
285
|
__name: "searchItem",
|
|
276
286
|
props: {
|
|
@@ -279,18 +289,18 @@ const ma = /* @__PURE__ */ k({
|
|
|
279
289
|
rule: {}
|
|
280
290
|
},
|
|
281
291
|
setup(v) {
|
|
282
|
-
const
|
|
283
|
-
return (n,
|
|
284
|
-
b(e(
|
|
292
|
+
const r = v, a = W(), t = ue(X.EditorControl, void 0), o = ke(r, t);
|
|
293
|
+
return (n, p) => (f(), w("div", Dt, [
|
|
294
|
+
b(e(Pe), B({
|
|
285
295
|
required: n.rule !== void 0,
|
|
286
296
|
class: "w-[90%] relative"
|
|
287
297
|
}, e(a), {
|
|
288
298
|
class: [n.rule ? "" : "mb-3", n.width],
|
|
289
299
|
labelCol: { span: 6 }
|
|
290
300
|
}), ge({
|
|
291
|
-
default:
|
|
292
|
-
|
|
293
|
-
|
|
301
|
+
default: _(() => [
|
|
302
|
+
T("div", It, [
|
|
303
|
+
T("div", Bt, [
|
|
294
304
|
I(n.$slots, "default")
|
|
295
305
|
])
|
|
296
306
|
])
|
|
@@ -299,32 +309,33 @@ const ma = /* @__PURE__ */ k({
|
|
|
299
309
|
}, [
|
|
300
310
|
n.label ? {
|
|
301
311
|
name: "label",
|
|
302
|
-
fn:
|
|
303
|
-
|
|
304
|
-
class: N([e(
|
|
312
|
+
fn: _(() => [
|
|
313
|
+
T("span", {
|
|
314
|
+
class: N([e(o).errClass ? "text-[#ff4d4f]" : "", "w-full"])
|
|
305
315
|
}, D(n.label), 3)
|
|
306
316
|
]),
|
|
307
317
|
key: "0"
|
|
308
318
|
} : void 0
|
|
309
319
|
]), 1040, ["required", "class"]),
|
|
310
|
-
e(
|
|
320
|
+
e(o).msg ? (f(), w("span", Ft, D(e(o).msg), 1)) : k("", !0)
|
|
311
321
|
]));
|
|
312
322
|
}
|
|
313
|
-
}),
|
|
323
|
+
}), ba = /* @__PURE__ */ C({
|
|
314
324
|
__name: "index",
|
|
315
325
|
props: {
|
|
316
326
|
search: {},
|
|
317
|
-
gridCtrl: {}
|
|
327
|
+
gridCtrl: {},
|
|
328
|
+
likeFields: {}
|
|
318
329
|
},
|
|
319
330
|
emits: ["update:search"],
|
|
320
|
-
setup(v, { emit:
|
|
321
|
-
const a = v, t =
|
|
331
|
+
setup(v, { emit: r }) {
|
|
332
|
+
const a = v, t = r, o = g(0), n = g(0), p = g(0), d = (m) => {
|
|
322
333
|
let x = 0;
|
|
323
|
-
for (let
|
|
324
|
-
typeof
|
|
334
|
+
for (let S = 0; S < m.length; S++)
|
|
335
|
+
typeof m[S].type == "object" && x++;
|
|
325
336
|
return x;
|
|
326
|
-
},
|
|
327
|
-
n.value = 0,
|
|
337
|
+
}, c = ze(), s = () => {
|
|
338
|
+
n.value = 0, p.value = 0, c.default && (n.value = d(c.default({}))), a.gridCtrl.searchBar && c.control && (p.value = d(c.control({}))), o.value = 2 - (n.value + p.value) % 3;
|
|
328
339
|
};
|
|
329
340
|
$(
|
|
330
341
|
() => a.gridCtrl.searchBar,
|
|
@@ -333,37 +344,40 @@ const ma = /* @__PURE__ */ k({
|
|
|
333
344
|
}
|
|
334
345
|
);
|
|
335
346
|
const u = JSON.parse(JSON.stringify(a.search));
|
|
336
|
-
|
|
347
|
+
K(() => {
|
|
337
348
|
var x;
|
|
338
349
|
s();
|
|
339
|
-
let
|
|
350
|
+
let m = { ...a.search };
|
|
340
351
|
a.gridCtrl.gridQuery = {
|
|
341
352
|
...a.gridCtrl.gridQuery,
|
|
342
353
|
Query: {
|
|
343
354
|
...(x = a.gridCtrl.gridQuery) == null ? void 0 : x.Query,
|
|
344
|
-
...
|
|
355
|
+
...m
|
|
345
356
|
}
|
|
346
357
|
};
|
|
347
358
|
});
|
|
348
359
|
const l = () => {
|
|
349
360
|
var x;
|
|
350
|
-
let
|
|
361
|
+
let m = { ...a.search };
|
|
362
|
+
if (a.likeFields)
|
|
363
|
+
for (const S of a.likeFields)
|
|
364
|
+
m[S] && (m[S] = { $like: "%" + m[S] + "%" });
|
|
351
365
|
a.gridCtrl.gridQuery = {
|
|
352
366
|
...a.gridCtrl.gridQuery,
|
|
353
367
|
Query: {
|
|
354
368
|
...(x = a.gridCtrl.gridQuery) == null ? void 0 : x.Query,
|
|
355
|
-
...
|
|
369
|
+
...m
|
|
356
370
|
}
|
|
357
371
|
}, a.gridCtrl.reload.value = !0;
|
|
358
372
|
}, i = () => {
|
|
359
|
-
const
|
|
373
|
+
const m = JSON.parse(JSON.stringify(u));
|
|
360
374
|
for (const x in a.search)
|
|
361
|
-
|
|
362
|
-
t("update:search",
|
|
375
|
+
m[x] === void 0 && (m[x] = void 0);
|
|
376
|
+
t("update:search", m);
|
|
363
377
|
};
|
|
364
|
-
return (
|
|
365
|
-
const
|
|
366
|
-
return n.value +
|
|
378
|
+
return (m, x) => {
|
|
379
|
+
const S = Q("submit");
|
|
380
|
+
return n.value + p.value > 0 ? V((f(), h(e(Fe), {
|
|
367
381
|
key: 0,
|
|
368
382
|
"label-col": { flex: "60px" },
|
|
369
383
|
style: {
|
|
@@ -372,42 +386,42 @@ const ma = /* @__PURE__ */ k({
|
|
|
372
386
|
},
|
|
373
387
|
class: "flex mb-[10px]"
|
|
374
388
|
}, {
|
|
375
|
-
default:
|
|
376
|
-
I(
|
|
377
|
-
|
|
378
|
-
|
|
389
|
+
default: _(() => [
|
|
390
|
+
I(m.$slots, "default"),
|
|
391
|
+
m.gridCtrl.searchBar ? I(m.$slots, "control", { key: 0 }) : k("", !0),
|
|
392
|
+
o.value >= 1 ? (f(), h(le, {
|
|
379
393
|
key: 1,
|
|
380
394
|
class: "w-1/3"
|
|
381
|
-
})) :
|
|
382
|
-
|
|
395
|
+
})) : k("", !0),
|
|
396
|
+
o.value >= 2 ? (f(), h(le, {
|
|
383
397
|
key: 2,
|
|
384
398
|
class: "w-1/3"
|
|
385
|
-
})) :
|
|
386
|
-
n.value ||
|
|
399
|
+
})) : k("", !0),
|
|
400
|
+
n.value || m.gridCtrl.searchBar ? (f(), h(le, {
|
|
387
401
|
key: 3,
|
|
388
402
|
class: "w-1/3 flex justify-end text-right pr-5",
|
|
389
403
|
"wrapper-col": { flex: "auto" }
|
|
390
404
|
}, {
|
|
391
|
-
default:
|
|
405
|
+
default: _(() => [
|
|
392
406
|
b(e(G), null, {
|
|
393
|
-
default:
|
|
394
|
-
b(e(
|
|
407
|
+
default: _(() => [
|
|
408
|
+
b(e(z), {
|
|
395
409
|
type: "primary",
|
|
396
410
|
onClick: l,
|
|
397
411
|
icon: "icon-search"
|
|
398
412
|
}, {
|
|
399
|
-
default:
|
|
400
|
-
|
|
413
|
+
default: _(() => x[0] || (x[0] = [
|
|
414
|
+
P("搜索")
|
|
401
415
|
])),
|
|
402
416
|
_: 1,
|
|
403
417
|
__: [0]
|
|
404
418
|
}),
|
|
405
|
-
b(e(
|
|
419
|
+
b(e(z), {
|
|
406
420
|
onClick: i,
|
|
407
421
|
icon: "icon-reset"
|
|
408
422
|
}, {
|
|
409
|
-
default:
|
|
410
|
-
|
|
423
|
+
default: _(() => x[1] || (x[1] = [
|
|
424
|
+
P("重置")
|
|
411
425
|
])),
|
|
412
426
|
_: 1,
|
|
413
427
|
__: [1]
|
|
@@ -417,29 +431,29 @@ const ma = /* @__PURE__ */ k({
|
|
|
417
431
|
})
|
|
418
432
|
]),
|
|
419
433
|
_: 1
|
|
420
|
-
})) :
|
|
434
|
+
})) : k("", !0)
|
|
421
435
|
]),
|
|
422
436
|
_: 3
|
|
423
437
|
})), [
|
|
424
|
-
[
|
|
425
|
-
]) :
|
|
438
|
+
[S, l]
|
|
439
|
+
]) : k("", !0);
|
|
426
440
|
};
|
|
427
441
|
}
|
|
428
|
-
}), Pt = /* @__PURE__ */
|
|
442
|
+
}), Pt = /* @__PURE__ */ C({
|
|
429
443
|
__name: "tableOperate",
|
|
430
444
|
props: {
|
|
431
445
|
record: {},
|
|
432
446
|
gridCtrl: {}
|
|
433
447
|
},
|
|
434
448
|
setup(v) {
|
|
435
|
-
const
|
|
449
|
+
const r = v, a = r.gridCtrl, t = [
|
|
436
450
|
{
|
|
437
451
|
key: "Edit",
|
|
438
452
|
label: "编辑",
|
|
439
453
|
type: "primary",
|
|
440
454
|
visible: !0,
|
|
441
455
|
permit: ":edit",
|
|
442
|
-
click: () => Le(a,
|
|
456
|
+
click: () => Le(a, r.record)
|
|
443
457
|
},
|
|
444
458
|
{
|
|
445
459
|
key: "Delete",
|
|
@@ -450,111 +464,111 @@ const ma = /* @__PURE__ */ k({
|
|
|
450
464
|
permit: ":delete",
|
|
451
465
|
confirm: !0,
|
|
452
466
|
confirmText: "是否删除此记录?",
|
|
453
|
-
click: () => Re(a,
|
|
467
|
+
click: () => Re(a, r.record)
|
|
454
468
|
}
|
|
455
|
-
], { buttons:
|
|
469
|
+
], { buttons: o, menus: n } = Ce(t, 0, a.operates), p = (d) => {
|
|
456
470
|
if (typeof d.disabled == "boolean")
|
|
457
471
|
return d.disabled;
|
|
458
472
|
if (typeof d.disabled == "function")
|
|
459
|
-
return
|
|
460
|
-
if (
|
|
473
|
+
return q(d, r.record) ?? !1;
|
|
474
|
+
if (r.record.hasOwnProperty("Enabled"))
|
|
461
475
|
switch (d.key) {
|
|
462
476
|
case "Edit":
|
|
463
|
-
return !
|
|
477
|
+
return !r.record.Enabled;
|
|
464
478
|
case "Delete":
|
|
465
|
-
return !!
|
|
479
|
+
return !!r.record.Enabled;
|
|
466
480
|
}
|
|
467
481
|
return !1;
|
|
468
482
|
};
|
|
469
|
-
return (d,
|
|
470
|
-
const s =
|
|
471
|
-
return
|
|
483
|
+
return (d, c) => {
|
|
484
|
+
const s = Q("role"), u = Q("permit");
|
|
485
|
+
return f(), h(e(me), { theme: {
|
|
472
486
|
token: {
|
|
473
487
|
fontSize: 13
|
|
474
488
|
}
|
|
475
489
|
} }, {
|
|
476
|
-
default:
|
|
490
|
+
default: _(() => [
|
|
477
491
|
b(e(G), null, {
|
|
478
|
-
default:
|
|
479
|
-
(
|
|
492
|
+
default: _(() => [
|
|
493
|
+
(f(!0), w(M, null, L(e(o), (l) => (f(), w(M, {
|
|
480
494
|
key: l.key
|
|
481
495
|
}, [
|
|
482
|
-
e(H)(l,
|
|
496
|
+
e(H)(l, r.record) ? (f(), h(e(et), {
|
|
483
497
|
key: 0,
|
|
484
|
-
disabled:
|
|
498
|
+
disabled: p(l) || !l.confirm,
|
|
485
499
|
cancelText: "否",
|
|
486
500
|
okText: "是",
|
|
487
501
|
title: l.confirmText,
|
|
488
502
|
okButtonProps: { size: "small" },
|
|
489
503
|
cancelButtonProps: { size: "small" },
|
|
490
|
-
onConfirm: (i) => e(R)(l, e(a).page, e(a),
|
|
504
|
+
onConfirm: (i) => e(R)(l, e(a).page, e(a), r.record, !0)
|
|
491
505
|
}, {
|
|
492
|
-
default:
|
|
493
|
-
e(H)(l,
|
|
506
|
+
default: _(() => [
|
|
507
|
+
e(H)(l, r.record) ? V((f(), h(e(Me), {
|
|
494
508
|
key: l.key,
|
|
495
509
|
type: l.type ?? "text",
|
|
496
510
|
danger: l.danger,
|
|
497
|
-
disabled:
|
|
498
|
-
onClick: (i) => e(R)(l, e(a).page, e(a),
|
|
511
|
+
disabled: p(l),
|
|
512
|
+
onClick: (i) => e(R)(l, e(a).page, e(a), r.record),
|
|
499
513
|
size: "small",
|
|
500
|
-
style:
|
|
514
|
+
style: ne({
|
|
501
515
|
padding: l.type ?? "0px 4px"
|
|
502
516
|
})
|
|
503
517
|
}, {
|
|
504
|
-
default:
|
|
505
|
-
|
|
518
|
+
default: _(() => [
|
|
519
|
+
P(D(l.label), 1)
|
|
506
520
|
]),
|
|
507
521
|
_: 2
|
|
508
522
|
}, 1032, ["type", "danger", "disabled", "onClick", "style"])), [
|
|
509
523
|
[s, l.role],
|
|
510
524
|
[u, l.permit]
|
|
511
|
-
]) :
|
|
525
|
+
]) : k("", !0)
|
|
512
526
|
]),
|
|
513
527
|
_: 2
|
|
514
|
-
}, 1032, ["disabled", "title", "onConfirm"])) :
|
|
528
|
+
}, 1032, ["disabled", "title", "onConfirm"])) : k("", !0)
|
|
515
529
|
], 64))), 128)),
|
|
516
|
-
d.record.Enabled == 1 ? (
|
|
530
|
+
d.record.Enabled == 1 ? (f(), h(e(me), {
|
|
517
531
|
key: 0,
|
|
518
532
|
autoInsertSpaceInButton: !1
|
|
519
533
|
}, {
|
|
520
|
-
default:
|
|
521
|
-
e(n).length > 0 ? (
|
|
534
|
+
default: _(() => [
|
|
535
|
+
e(n).length > 0 ? (f(), h(e(tt), {
|
|
522
536
|
key: 0,
|
|
523
537
|
size: "small"
|
|
524
538
|
}, {
|
|
525
|
-
overlay:
|
|
526
|
-
b(e(
|
|
527
|
-
default:
|
|
528
|
-
(
|
|
539
|
+
overlay: _(() => [
|
|
540
|
+
b(e(ie), null, {
|
|
541
|
+
default: _(() => [
|
|
542
|
+
(f(!0), w(M, null, L(e(n), (l) => (f(), w(M, {
|
|
529
543
|
key: l.key
|
|
530
544
|
}, [
|
|
531
|
-
e(H)(l,
|
|
545
|
+
e(H)(l, r.record) ? V((f(), h(e(de), {
|
|
532
546
|
key: 0,
|
|
533
|
-
disabled:
|
|
534
|
-
onClick: (i) => e(R)(l, e(a).page, e(a),
|
|
547
|
+
disabled: p(l),
|
|
548
|
+
onClick: (i) => e(R)(l, e(a).page, e(a), r.record)
|
|
535
549
|
}, {
|
|
536
|
-
default:
|
|
537
|
-
|
|
550
|
+
default: _(() => [
|
|
551
|
+
P(D(l.label), 1)
|
|
538
552
|
]),
|
|
539
553
|
_: 2
|
|
540
554
|
}, 1032, ["disabled", "onClick"])), [
|
|
541
555
|
[s, l.role],
|
|
542
556
|
[u, l.permit]
|
|
543
|
-
]) :
|
|
557
|
+
]) : k("", !0)
|
|
544
558
|
], 64))), 128))
|
|
545
559
|
]),
|
|
546
560
|
_: 1
|
|
547
561
|
})
|
|
548
562
|
]),
|
|
549
|
-
default:
|
|
550
|
-
|
|
563
|
+
default: _(() => [
|
|
564
|
+
c[0] || (c[0] = P(" 更多 "))
|
|
551
565
|
]),
|
|
552
566
|
_: 1,
|
|
553
567
|
__: [0]
|
|
554
|
-
})) :
|
|
568
|
+
})) : k("", !0)
|
|
555
569
|
]),
|
|
556
570
|
_: 1
|
|
557
|
-
})) :
|
|
571
|
+
})) : k("", !0)
|
|
558
572
|
]),
|
|
559
573
|
_: 1
|
|
560
574
|
})
|
|
@@ -563,13 +577,13 @@ const ma = /* @__PURE__ */ k({
|
|
|
563
577
|
});
|
|
564
578
|
};
|
|
565
579
|
}
|
|
566
|
-
}), Mt = { class: "inline-flex [&>div]:ml-[-1px] first:[&>div]:ml-0" },
|
|
580
|
+
}), Mt = { class: "inline-flex [&>div]:ml-[-1px] first:[&>div]:ml-0" }, Nt = /* @__PURE__ */ C({
|
|
567
581
|
__name: "icontool",
|
|
568
582
|
props: {
|
|
569
583
|
gridCtrl: {}
|
|
570
584
|
},
|
|
571
585
|
setup(v) {
|
|
572
|
-
const
|
|
586
|
+
const r = v, a = r.gridCtrl, { tools: t } = Ue(r.gridCtrl), o = ye();
|
|
573
587
|
$(
|
|
574
588
|
() => a.selectable.value,
|
|
575
589
|
(d) => {
|
|
@@ -584,71 +598,71 @@ const ma = /* @__PURE__ */ k({
|
|
|
584
598
|
},
|
|
585
599
|
{ deep: !0, immediate: !0 }
|
|
586
600
|
);
|
|
587
|
-
const
|
|
588
|
-
a.columns.value.splice(0, a.columns.value.length, ...n.value),
|
|
601
|
+
const p = () => {
|
|
602
|
+
a.columns.value.splice(0, a.columns.value.length, ...n.value), o.setTableColumns(Qe.currentRoute.value.path, a.columns.value);
|
|
589
603
|
};
|
|
590
|
-
return (d,
|
|
591
|
-
(
|
|
604
|
+
return (d, c) => (f(), w("div", Mt, [
|
|
605
|
+
(f(!0), w(M, null, L(e(t), (s, u) => (f(), w(M, {
|
|
592
606
|
key: s.key
|
|
593
607
|
}, [
|
|
594
|
-
e(H)(s) && s.dropdown ? (
|
|
608
|
+
e(H)(s) && s.dropdown ? (f(), h(e(oe), {
|
|
595
609
|
key: 0,
|
|
596
610
|
placement: "bottomRight",
|
|
597
611
|
class: "p-0 rounded-none"
|
|
598
612
|
}, {
|
|
599
|
-
overlay:
|
|
600
|
-
|
|
613
|
+
overlay: _(() => [
|
|
614
|
+
T("div", {
|
|
601
615
|
class: N(["min-w-[100px] bg-white rounded shadow-md p-4", s.dropdownClass])
|
|
602
616
|
}, [
|
|
603
|
-
s.dropdown === "headset" ? (
|
|
617
|
+
s.dropdown === "headset" ? (f(), h(e(mt), {
|
|
604
618
|
key: 0,
|
|
605
619
|
modelValue: n.value,
|
|
606
|
-
"onUpdate:modelValue":
|
|
620
|
+
"onUpdate:modelValue": c[1] || (c[1] = (l) => n.value = l),
|
|
607
621
|
"item-key": "dataIndex",
|
|
608
|
-
onEnd:
|
|
622
|
+
onEnd: p,
|
|
609
623
|
handle: ".drag-handle"
|
|
610
624
|
}, {
|
|
611
|
-
default:
|
|
612
|
-
(
|
|
625
|
+
default: _(() => [
|
|
626
|
+
(f(!0), w(M, null, L(n.value, (l) => (f(), w("div", {
|
|
613
627
|
key: l.name,
|
|
614
|
-
onClick:
|
|
628
|
+
onClick: c[0] || (c[0] = J(() => {
|
|
615
629
|
}, ["stop"])),
|
|
616
630
|
class: "flex items-center mb-2 last:mb-0 select-none"
|
|
617
631
|
}, [
|
|
618
|
-
|
|
619
|
-
b(e(
|
|
632
|
+
c[2] || (c[2] = T("span", { class: "drag-handle mr-2 text-gray-400 hover:text-gray-600 cursor-move" }, "⋮⋮", -1)),
|
|
633
|
+
b(e(at), {
|
|
620
634
|
checked: l.visible !== !1,
|
|
621
635
|
onChange: J(
|
|
622
636
|
(i) => {
|
|
623
|
-
e(
|
|
637
|
+
e(qe)(l, i.target.checked);
|
|
624
638
|
},
|
|
625
639
|
["stop", "prevent"]
|
|
626
640
|
),
|
|
627
641
|
class: "text-gray-700 hover:text-gray-900 select-none"
|
|
628
642
|
}, {
|
|
629
|
-
default:
|
|
630
|
-
|
|
643
|
+
default: _(() => [
|
|
644
|
+
P(D(l.title), 1)
|
|
631
645
|
]),
|
|
632
646
|
_: 2
|
|
633
647
|
}, 1032, ["checked", "onChange"])
|
|
634
648
|
]))), 128))
|
|
635
649
|
]),
|
|
636
650
|
_: 1
|
|
637
|
-
}, 8, ["modelValue"])) :
|
|
651
|
+
}, 8, ["modelValue"])) : k("", !0)
|
|
638
652
|
], 2)
|
|
639
653
|
]),
|
|
640
|
-
default:
|
|
641
|
-
b(e(
|
|
654
|
+
default: _(() => [
|
|
655
|
+
b(e(z), {
|
|
642
656
|
class: N([
|
|
643
657
|
"px-[8px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] hover:z-10",
|
|
644
658
|
u === 0 ? "rounded-l-[5px]" : "",
|
|
645
659
|
u === e(t).length - 1 ? "rounded-r-[5px]" : ""
|
|
646
660
|
]),
|
|
647
|
-
disabled: e(
|
|
661
|
+
disabled: e(q)(s),
|
|
648
662
|
tiptext: s.label,
|
|
649
663
|
onClick: (l) => e(R)(s, e(a).page, e(a))
|
|
650
664
|
}, {
|
|
651
|
-
default:
|
|
665
|
+
default: _(() => [
|
|
652
666
|
b(e(Y), {
|
|
653
667
|
icon: s.icon,
|
|
654
668
|
class: "w-[18px] h-[18.5px]",
|
|
@@ -659,18 +673,18 @@ const ma = /* @__PURE__ */ k({
|
|
|
659
673
|
}, 1032, ["class", "disabled", "tiptext", "onClick"])
|
|
660
674
|
]),
|
|
661
675
|
_: 2
|
|
662
|
-
}, 1024)) : !s.children && e(H)(s) ? (
|
|
676
|
+
}, 1024)) : !s.children && e(H)(s) ? (f(), h(e(z), {
|
|
663
677
|
key: 1,
|
|
664
678
|
class: N([
|
|
665
679
|
"px-[8px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] hover:z-10",
|
|
666
680
|
u === 0 ? "rounded-l-[5px]" : "",
|
|
667
681
|
u === e(t).length - 1 ? "rounded-r-[5px]" : ""
|
|
668
682
|
]),
|
|
669
|
-
disabled: e(
|
|
683
|
+
disabled: e(q)(s),
|
|
670
684
|
tiptext: s.label,
|
|
671
685
|
onClick: (l) => e(R)(s, e(a).page, e(a))
|
|
672
686
|
}, {
|
|
673
|
-
default:
|
|
687
|
+
default: _(() => [
|
|
674
688
|
b(e(Y), {
|
|
675
689
|
icon: s.icon,
|
|
676
690
|
class: "w-[18px] h-[18.5px]",
|
|
@@ -678,20 +692,20 @@ const ma = /* @__PURE__ */ k({
|
|
|
678
692
|
}, null, 8, ["icon"])
|
|
679
693
|
]),
|
|
680
694
|
_: 2
|
|
681
|
-
}, 1032, ["class", "disabled", "tiptext", "onClick"])) : e(H)(s) ? (
|
|
695
|
+
}, 1032, ["class", "disabled", "tiptext", "onClick"])) : e(H)(s) ? (f(), h(e(oe), {
|
|
682
696
|
key: 2,
|
|
683
697
|
placement: "bottomRight",
|
|
684
698
|
class: "p-0 rounded-none"
|
|
685
699
|
}, {
|
|
686
|
-
overlay:
|
|
687
|
-
b(e(
|
|
688
|
-
default:
|
|
689
|
-
(
|
|
700
|
+
overlay: _(() => [
|
|
701
|
+
b(e(ie), null, {
|
|
702
|
+
default: _(() => [
|
|
703
|
+
(f(!0), w(M, null, L(s.children, (l) => (f(), h(e(de), {
|
|
690
704
|
key: l.key,
|
|
691
|
-
disabled: e(
|
|
705
|
+
disabled: e(q)(l)
|
|
692
706
|
}, {
|
|
693
|
-
default:
|
|
694
|
-
|
|
707
|
+
default: _(() => [
|
|
708
|
+
P(D(l.label), 1)
|
|
695
709
|
]),
|
|
696
710
|
_: 2
|
|
697
711
|
}, 1032, ["disabled"]))), 128))
|
|
@@ -699,19 +713,19 @@ const ma = /* @__PURE__ */ k({
|
|
|
699
713
|
_: 2
|
|
700
714
|
}, 1024)
|
|
701
715
|
]),
|
|
702
|
-
default:
|
|
703
|
-
b(e(
|
|
716
|
+
default: _(() => [
|
|
717
|
+
b(e(z), {
|
|
704
718
|
class: N([
|
|
705
719
|
"!w-[46px] px-[5px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] hover:z-10",
|
|
706
720
|
u === 0 ? "rounded-l-[5px]" : ""
|
|
707
721
|
]),
|
|
708
|
-
disabled: e(
|
|
722
|
+
disabled: e(q)(s),
|
|
709
723
|
tiptext: s.label,
|
|
710
724
|
icon: s.icon,
|
|
711
725
|
iconProps: { class: "w-[19px] h-[19px]" },
|
|
712
726
|
onClick: (l) => e(R)(s, e(a).page, e(a))
|
|
713
727
|
}, {
|
|
714
|
-
default:
|
|
728
|
+
default: _(() => [
|
|
715
729
|
b(e(Y), {
|
|
716
730
|
icon: "icon-down-arrow",
|
|
717
731
|
class: "w-[12px] h-[12px]"
|
|
@@ -721,18 +735,18 @@ const ma = /* @__PURE__ */ k({
|
|
|
721
735
|
}, 1032, ["class", "disabled", "tiptext", "icon", "onClick"])
|
|
722
736
|
]),
|
|
723
737
|
_: 2
|
|
724
|
-
}, 1024)) :
|
|
738
|
+
}, 1024)) : k("", !0)
|
|
725
739
|
], 64))), 128))
|
|
726
740
|
]));
|
|
727
741
|
}
|
|
728
|
-
}),
|
|
742
|
+
}), zt = { class: "flex justify-between mb-[10px]" }, Kt = { key: 1 }, Ot = 3, At = /* @__PURE__ */ C({
|
|
729
743
|
__name: "index",
|
|
730
744
|
props: {
|
|
731
745
|
gridCtrl: {},
|
|
732
746
|
editorCtrl: {}
|
|
733
747
|
},
|
|
734
748
|
setup(v) {
|
|
735
|
-
const
|
|
749
|
+
const r = v, a = r.gridCtrl, t = a.page, o = r.editorCtrl, n = [
|
|
736
750
|
{
|
|
737
751
|
key: "New",
|
|
738
752
|
label: "新增",
|
|
@@ -741,59 +755,59 @@ const ma = /* @__PURE__ */ k({
|
|
|
741
755
|
danger: !0,
|
|
742
756
|
permit: ":new",
|
|
743
757
|
// 默认仅受权限码控制
|
|
744
|
-
click: () =>
|
|
758
|
+
click: () => Ve(o)
|
|
745
759
|
}
|
|
746
|
-
],
|
|
760
|
+
], p = g([]), d = g([]);
|
|
747
761
|
return $(
|
|
748
762
|
() => {
|
|
749
|
-
var
|
|
750
|
-
return (
|
|
763
|
+
var c;
|
|
764
|
+
return (c = a.buttons) == null ? void 0 : c.value;
|
|
751
765
|
},
|
|
752
766
|
() => {
|
|
753
767
|
var u;
|
|
754
|
-
const { buttons:
|
|
768
|
+
const { buttons: c, menus: s } = Ce(
|
|
755
769
|
n,
|
|
756
|
-
a.flat !== void 0 ? a.flat :
|
|
770
|
+
a.flat !== void 0 ? a.flat : Ot,
|
|
757
771
|
(u = a.buttons) == null ? void 0 : u.value
|
|
758
772
|
);
|
|
759
|
-
|
|
773
|
+
p.value.splice(0, p.value.length, ...c), d.value.splice(0, d.value.length, ...s);
|
|
760
774
|
},
|
|
761
775
|
{
|
|
762
776
|
deep: !0,
|
|
763
777
|
immediate: !0
|
|
764
778
|
}
|
|
765
|
-
), (
|
|
766
|
-
const u =
|
|
767
|
-
return
|
|
779
|
+
), (c, s) => {
|
|
780
|
+
const u = Q("role"), l = Q("permit");
|
|
781
|
+
return f(), w("div", zt, [
|
|
768
782
|
b(e(G), null, {
|
|
769
|
-
default:
|
|
770
|
-
(
|
|
783
|
+
default: _(() => [
|
|
784
|
+
(f(!0), w(M, null, L(p.value, (i) => V((f(), h(e(z), {
|
|
771
785
|
key: i.key,
|
|
772
786
|
type: i.type,
|
|
773
787
|
danger: i.danger,
|
|
774
|
-
disabled: e(
|
|
788
|
+
disabled: e(q)(i),
|
|
775
789
|
icon: i.icon,
|
|
776
|
-
onClick: (
|
|
790
|
+
onClick: (m) => e(R)(i, e(t), e(a))
|
|
777
791
|
}, {
|
|
778
|
-
default:
|
|
779
|
-
|
|
792
|
+
default: _(() => [
|
|
793
|
+
P(D(i.label), 1)
|
|
780
794
|
]),
|
|
781
795
|
_: 2
|
|
782
796
|
}, 1032, ["type", "danger", "disabled", "icon", "onClick"])), [
|
|
783
797
|
[u, i.role],
|
|
784
798
|
[l, i.permit]
|
|
785
799
|
])), 128)),
|
|
786
|
-
d.value.length > 0 ? (
|
|
787
|
-
overlay:
|
|
788
|
-
b(e(
|
|
789
|
-
default:
|
|
790
|
-
(
|
|
800
|
+
d.value.length > 0 ? (f(), h(e(oe), { key: 0 }, {
|
|
801
|
+
overlay: _(() => [
|
|
802
|
+
b(e(ie), null, {
|
|
803
|
+
default: _(() => [
|
|
804
|
+
(f(!0), w(M, null, L(d.value, (i) => V((f(), h(e(de), {
|
|
791
805
|
key: i.key,
|
|
792
|
-
disabled: e(
|
|
793
|
-
onClick: (
|
|
806
|
+
disabled: e(q)(i),
|
|
807
|
+
onClick: (m) => e(R)(i, e(t), e(a))
|
|
794
808
|
}, {
|
|
795
|
-
default:
|
|
796
|
-
|
|
809
|
+
default: _(() => [
|
|
810
|
+
P(D(i.label), 1)
|
|
797
811
|
]),
|
|
798
812
|
_: 2
|
|
799
813
|
}, 1032, ["disabled", "onClick"])), [
|
|
@@ -804,31 +818,31 @@ const ma = /* @__PURE__ */ k({
|
|
|
804
818
|
_: 1
|
|
805
819
|
})
|
|
806
820
|
]),
|
|
807
|
-
default:
|
|
808
|
-
b(e(
|
|
809
|
-
default:
|
|
810
|
-
|
|
821
|
+
default: _(() => [
|
|
822
|
+
b(e(z), null, {
|
|
823
|
+
default: _(() => s[0] || (s[0] = [
|
|
824
|
+
P(" 更多操作 ")
|
|
811
825
|
])),
|
|
812
826
|
_: 1,
|
|
813
827
|
__: [0]
|
|
814
828
|
})
|
|
815
829
|
]),
|
|
816
830
|
_: 1
|
|
817
|
-
})) :
|
|
818
|
-
|
|
831
|
+
})) : k("", !0),
|
|
832
|
+
p.value.length === 0 && d.value.length === 0 ? (f(), w("span", Kt)) : k("", !0)
|
|
819
833
|
]),
|
|
820
834
|
_: 1
|
|
821
835
|
}),
|
|
822
836
|
b(e(G), { class: "mr-1" }, {
|
|
823
|
-
default:
|
|
824
|
-
(
|
|
837
|
+
default: _(() => [
|
|
838
|
+
(f(), h(Ke(Nt), { "grid-ctrl": e(a) }, null, 8, ["grid-ctrl"]))
|
|
825
839
|
]),
|
|
826
840
|
_: 1
|
|
827
841
|
})
|
|
828
842
|
]);
|
|
829
843
|
};
|
|
830
844
|
}
|
|
831
|
-
}),
|
|
845
|
+
}), Et = /* @__PURE__ */ C({
|
|
832
846
|
__name: "index",
|
|
833
847
|
props: {
|
|
834
848
|
/**
|
|
@@ -840,32 +854,32 @@ const ma = /* @__PURE__ */ k({
|
|
|
840
854
|
}
|
|
841
855
|
},
|
|
842
856
|
emits: ["change"],
|
|
843
|
-
setup(v, { emit:
|
|
844
|
-
const a = v, t = g([]),
|
|
845
|
-
|
|
857
|
+
setup(v, { emit: r }) {
|
|
858
|
+
const a = v, t = g([]), o = r, { editorCtrl: n, errInfo: p } = O(), d = (c) => {
|
|
859
|
+
p != null && p.value.errClass && n && U(n), o("change", c);
|
|
846
860
|
};
|
|
847
|
-
return
|
|
861
|
+
return K(() => {
|
|
848
862
|
if (!a.data || a.data.length != 2) {
|
|
849
|
-
console.error("Switch组件: ", a.data),
|
|
863
|
+
console.error("Switch组件: ", a.data), _t.error("Switch组件必须有且只有两个选项");
|
|
850
864
|
return;
|
|
851
865
|
}
|
|
852
866
|
$e(!1, a, t);
|
|
853
867
|
}), xe(() => {
|
|
854
868
|
Se(a);
|
|
855
|
-
}), (
|
|
869
|
+
}), (c, s) => {
|
|
856
870
|
var u;
|
|
857
|
-
return t.value.length === 2 ? (
|
|
871
|
+
return t.value.length === 2 ? (f(), h(e(lt), B({
|
|
858
872
|
key: 0,
|
|
859
|
-
class: [((u = e(
|
|
873
|
+
class: [((u = e(p)) == null ? void 0 : u.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : "", "bg-blue-300", "w-[58px]"],
|
|
860
874
|
checkedChildren: t.value[0].label,
|
|
861
875
|
checkedValue: t.value[0].value,
|
|
862
876
|
unCheckedChildren: t.value[1].label,
|
|
863
877
|
unCheckedValue: t.value[1].value,
|
|
864
878
|
onChange: d
|
|
865
|
-
},
|
|
879
|
+
}, c.$attrs), null, 16, ["class", "checkedChildren", "checkedValue", "unCheckedChildren", "unCheckedValue"])) : k("", !0);
|
|
866
880
|
};
|
|
867
881
|
}
|
|
868
|
-
}),
|
|
882
|
+
}), ka = /* @__PURE__ */ C({
|
|
869
883
|
inheritAttrs: !1,
|
|
870
884
|
__name: "index",
|
|
871
885
|
props: {
|
|
@@ -878,40 +892,40 @@ const ma = /* @__PURE__ */ k({
|
|
|
878
892
|
statusDisabled: { type: Function }
|
|
879
893
|
},
|
|
880
894
|
setup(v) {
|
|
881
|
-
const
|
|
895
|
+
const r = v, a = W(), t = r.gridCtrl;
|
|
882
896
|
t && (t.pageNo.value = 1, t.total.value = 0, t.pageSize.value = t.pageSize.value);
|
|
883
|
-
const
|
|
897
|
+
const o = g(t.pageSize.value), n = g(t.pageNo.value), p = g([]), d = g({
|
|
884
898
|
total: 0,
|
|
885
899
|
current: 1,
|
|
886
|
-
pageSize:
|
|
900
|
+
pageSize: o.value,
|
|
887
901
|
showTotal: (i) => `共 ${i} 条记录`,
|
|
888
|
-
onChange: (i,
|
|
889
|
-
d.value.current = i, d.value.pageSize =
|
|
902
|
+
onChange: (i, m) => {
|
|
903
|
+
d.value.current = i, d.value.pageSize = m, o.value = m, n.value = i, t && (t.pageNo.value = i, t.pageSize.value = m, t.remotePage && ve(t));
|
|
890
904
|
},
|
|
891
|
-
...
|
|
905
|
+
...r.pagination
|
|
892
906
|
});
|
|
893
907
|
$(
|
|
894
908
|
() => t.tableData.value,
|
|
895
909
|
(i) => {
|
|
896
|
-
i && (
|
|
910
|
+
i && (p.value = i, d.value.total = t.total.value ?? 0);
|
|
897
911
|
},
|
|
898
912
|
{ immediate: !0 }
|
|
899
913
|
), $(
|
|
900
|
-
() =>
|
|
914
|
+
() => r.tableData,
|
|
901
915
|
(i) => {
|
|
902
|
-
i && (
|
|
916
|
+
i && (p.value = i, d.value.total = i.length);
|
|
903
917
|
},
|
|
904
918
|
{ immediate: !0 }
|
|
905
919
|
);
|
|
906
|
-
const
|
|
907
|
-
onChange: (i,
|
|
908
|
-
t && (t.selectKeys.value = i, t.selectRows.value =
|
|
920
|
+
const c = g(t.columns.value), s = {
|
|
921
|
+
onChange: (i, m) => {
|
|
922
|
+
t && (t.selectKeys.value = i, t.selectRows.value = m);
|
|
909
923
|
},
|
|
910
924
|
columnWidth: "30px",
|
|
911
925
|
getCheckboxProps: (i) => ({
|
|
912
926
|
disabled: i.Enabled === 0
|
|
913
927
|
}),
|
|
914
|
-
...
|
|
928
|
+
...r.rowSelection
|
|
915
929
|
}, u = g(s);
|
|
916
930
|
$(
|
|
917
931
|
() => t.selectable.value,
|
|
@@ -922,53 +936,53 @@ const ma = /* @__PURE__ */ k({
|
|
|
922
936
|
), $(
|
|
923
937
|
() => t.columns.value,
|
|
924
938
|
() => {
|
|
925
|
-
|
|
939
|
+
c.value = we(t.columns.value);
|
|
926
940
|
},
|
|
927
941
|
{ deep: !0, immediate: !0 }
|
|
928
942
|
);
|
|
929
943
|
const l = g(!1);
|
|
930
|
-
return
|
|
944
|
+
return Oe(() => {
|
|
931
945
|
l.value && t && (t.reload.value = !0);
|
|
932
|
-
}),
|
|
933
|
-
he(X.GridControl, t), t.tableData.value ? (
|
|
946
|
+
}), K(async () => {
|
|
947
|
+
he(X.GridControl, t), t.tableData.value ? (p.value = t.tableData.value, t.total.value = p.value.length, d.value.total = t.total.value ?? 0) : t.autoload !== !1 && (t.remotePage ? p.value = (await ve(t)).rows : p.value = await je(t)), setTimeout(() => {
|
|
934
948
|
l.value = !0;
|
|
935
949
|
}, 50);
|
|
936
|
-
}), (i,
|
|
937
|
-
var
|
|
938
|
-
const x =
|
|
939
|
-
return
|
|
940
|
-
(
|
|
950
|
+
}), (i, m) => {
|
|
951
|
+
var S, F;
|
|
952
|
+
const x = Q("permit");
|
|
953
|
+
return f(), w(M, null, [
|
|
954
|
+
(S = e(t).buttons) != null && S.value.length || (F = e(t).tools) != null && F.length ? (f(), h(At, {
|
|
941
955
|
key: 0,
|
|
942
956
|
"grid-ctrl": e(t),
|
|
943
957
|
"editor-ctrl": e(t).editor
|
|
944
|
-
}, null, 8, ["grid-ctrl", "editor-ctrl"])) :
|
|
945
|
-
l.value ? (
|
|
958
|
+
}, null, 8, ["grid-ctrl", "editor-ctrl"])) : k("", !0),
|
|
959
|
+
l.value ? (f(), h(e(Ne), B({
|
|
946
960
|
key: 1,
|
|
947
961
|
class: "w-full",
|
|
948
|
-
"row-key":
|
|
949
|
-
"data-source":
|
|
962
|
+
"row-key": r.primaryKey ?? e(t).primaryKey ?? "Id",
|
|
963
|
+
"data-source": p.value,
|
|
950
964
|
loading: e(t).isGridLoading.value,
|
|
951
|
-
columns:
|
|
965
|
+
columns: c.value,
|
|
952
966
|
pagination: d.value,
|
|
953
967
|
"row-selection": u.value,
|
|
954
|
-
scroll:
|
|
968
|
+
scroll: r.scroll || { x: 700, y: 1e3 },
|
|
955
969
|
size: e(t).tableSize.value,
|
|
956
970
|
bordered: ""
|
|
957
971
|
}, e(a)), {
|
|
958
|
-
bodyCell:
|
|
972
|
+
bodyCell: _((y) => {
|
|
959
973
|
var A, E;
|
|
960
974
|
return [
|
|
961
975
|
I(i.$slots, "bodyCell", {
|
|
962
976
|
column: y == null ? void 0 : y.column,
|
|
963
977
|
record: y == null ? void 0 : y.record
|
|
964
978
|
}),
|
|
965
|
-
e(t) && ((A = y == null ? void 0 : y.column) == null ? void 0 : A.dataIndex) === "enabled" ?
|
|
979
|
+
e(t) && ((A = y == null ? void 0 : y.column) == null ? void 0 : A.dataIndex) === "enabled" ? V((f(), h(Et, {
|
|
966
980
|
key: 0,
|
|
967
981
|
checked: y.record.Enabled,
|
|
968
|
-
"onUpdate:checked": (
|
|
982
|
+
"onUpdate:checked": (pe) => y.record.Enabled = pe,
|
|
969
983
|
disabled: i.statusDisabled ? i.statusDisabled(y.record) : !1,
|
|
970
984
|
data: e(Te).EnableDisable,
|
|
971
|
-
onClick: (
|
|
985
|
+
onClick: (pe) => e(He)(e(t), y.record),
|
|
972
986
|
class: N([
|
|
973
987
|
"w-[58px]",
|
|
974
988
|
i.statusDisabled && i.statusDisabled(y.record) ? "cursor-not-allowed disabled" : ""
|
|
@@ -976,7 +990,7 @@ const ma = /* @__PURE__ */ k({
|
|
|
976
990
|
loading: y == null ? void 0 : y.record.isLoading
|
|
977
991
|
}, null, 8, ["checked", "onUpdate:checked", "disabled", "data", "onClick", "class", "loading"])), [
|
|
978
992
|
[x, ":enabled", "disable"]
|
|
979
|
-
]) :
|
|
993
|
+
]) : k("", !0),
|
|
980
994
|
e(t) && ((E = y == null ? void 0 : y.column) == null ? void 0 : E.dataIndex) === "operation" ? I(i.$slots, "operate", {
|
|
981
995
|
key: 1,
|
|
982
996
|
record: y == null ? void 0 : y.record
|
|
@@ -985,15 +999,15 @@ const ma = /* @__PURE__ */ k({
|
|
|
985
999
|
record: y == null ? void 0 : y.record,
|
|
986
1000
|
"grid-ctrl": e(t)
|
|
987
1001
|
}, null, 8, ["record", "grid-ctrl"])
|
|
988
|
-
]) :
|
|
1002
|
+
]) : k("", !0)
|
|
989
1003
|
];
|
|
990
1004
|
}),
|
|
991
1005
|
_: 3
|
|
992
|
-
}, 16, ["row-key", "data-source", "loading", "columns", "pagination", "row-selection", "scroll", "size"])) :
|
|
1006
|
+
}, 16, ["row-key", "data-source", "loading", "columns", "pagination", "row-selection", "scroll", "size"])) : k("", !0)
|
|
993
1007
|
], 64);
|
|
994
1008
|
};
|
|
995
1009
|
}
|
|
996
|
-
}),
|
|
1010
|
+
}), Yt = { class: "flex items-center gap-1" }, Lt = { class: "text-nowrap" }, Ca = /* @__PURE__ */ C({
|
|
997
1011
|
__name: "index",
|
|
998
1012
|
props: {
|
|
999
1013
|
treeCtrl: {},
|
|
@@ -1001,15 +1015,15 @@ const ma = /* @__PURE__ */ k({
|
|
|
1001
1015
|
expandedKeys: {}
|
|
1002
1016
|
},
|
|
1003
1017
|
emits: ["select", "update:selectedKeys"],
|
|
1004
|
-
setup(v, { emit:
|
|
1005
|
-
const a = v, t = W(),
|
|
1018
|
+
setup(v, { emit: r }) {
|
|
1019
|
+
const a = v, t = W(), o = a.treeCtrl, n = g([]);
|
|
1006
1020
|
$(
|
|
1007
|
-
() =>
|
|
1021
|
+
() => o.data.value,
|
|
1008
1022
|
(u) => {
|
|
1009
|
-
u && (n.value =
|
|
1023
|
+
u && (n.value = o.fieldMap ? ee(o.fieldMap, u) : u, s(a.selectedKeys ?? []));
|
|
1010
1024
|
}
|
|
1011
1025
|
);
|
|
1012
|
-
const
|
|
1026
|
+
const p = r, d = g([]);
|
|
1013
1027
|
$(
|
|
1014
1028
|
() => a.selectedKeys,
|
|
1015
1029
|
(u) => {
|
|
@@ -1017,76 +1031,76 @@ const ma = /* @__PURE__ */ k({
|
|
|
1017
1031
|
},
|
|
1018
1032
|
{ immediate: !0 }
|
|
1019
1033
|
);
|
|
1020
|
-
const
|
|
1034
|
+
const c = g(["-"]);
|
|
1021
1035
|
$(
|
|
1022
1036
|
() => a.expandedKeys,
|
|
1023
1037
|
(u) => {
|
|
1024
|
-
u && (
|
|
1038
|
+
u && (c.value = u);
|
|
1025
1039
|
},
|
|
1026
1040
|
{ immediate: !0 }
|
|
1027
1041
|
);
|
|
1028
1042
|
const s = (u, l) => {
|
|
1029
|
-
u.length === 0 && u.push(...d.value), u.length > 0 && (
|
|
1043
|
+
u.length === 0 && u.push(...d.value), u.length > 0 && (o.node.value = l == null ? void 0 : l.node.dataRef), d.value = u, p("update:selectedKeys", u), p("select", u, l);
|
|
1030
1044
|
};
|
|
1031
|
-
return
|
|
1032
|
-
|
|
1045
|
+
return K(() => {
|
|
1046
|
+
o.fieldMap || (o.fieldMap = {
|
|
1033
1047
|
label: "Name",
|
|
1034
1048
|
key: "Id",
|
|
1035
1049
|
value: "Id",
|
|
1036
1050
|
icon: "Icon"
|
|
1037
|
-
}),
|
|
1038
|
-
}), (u, l) => (
|
|
1051
|
+
}), o.data.value ? n.value = ee(o.fieldMap, o.data.value) : o.autoload && De(o);
|
|
1052
|
+
}), (u, l) => (f(), h(e(rt), B({
|
|
1039
1053
|
class: "w-full",
|
|
1040
1054
|
"show-line": !0,
|
|
1041
1055
|
"tree-data": n.value,
|
|
1042
|
-
"expanded-keys":
|
|
1043
|
-
"onUpdate:expandedKeys": l[0] || (l[0] = (i) =>
|
|
1056
|
+
"expanded-keys": c.value,
|
|
1057
|
+
"onUpdate:expandedKeys": l[0] || (l[0] = (i) => c.value = i),
|
|
1044
1058
|
"selected-keys": d.value,
|
|
1045
|
-
loading: e(
|
|
1059
|
+
loading: e(o).isTreeLoading,
|
|
1046
1060
|
onSelect: s
|
|
1047
1061
|
}, e(t)), {
|
|
1048
|
-
title:
|
|
1062
|
+
title: _(({ key: i, label: m, icon: x }) => [
|
|
1049
1063
|
I(u.$slots, "title", {
|
|
1050
|
-
label:
|
|
1064
|
+
label: m,
|
|
1051
1065
|
key: i,
|
|
1052
1066
|
icon: x
|
|
1053
1067
|
}, () => [
|
|
1054
|
-
|
|
1068
|
+
T("div", Yt, [
|
|
1055
1069
|
b(e(Y), { icon: x }, null, 8, ["icon"]),
|
|
1056
|
-
|
|
1070
|
+
T("span", Lt, D(m), 1)
|
|
1057
1071
|
])
|
|
1058
1072
|
])
|
|
1059
1073
|
]),
|
|
1060
1074
|
_: 3
|
|
1061
1075
|
}, 16, ["tree-data", "expanded-keys", "selected-keys", "loading"]));
|
|
1062
1076
|
}
|
|
1063
|
-
}),
|
|
1077
|
+
}), wa = /* @__PURE__ */ j(ht, [["__scopeId", "data-v-1e39ad49"]]), Rt = {
|
|
1064
1078
|
key: 0,
|
|
1065
1079
|
class: "absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center"
|
|
1066
|
-
},
|
|
1080
|
+
}, Ut = /* @__PURE__ */ C({
|
|
1067
1081
|
inheritAttrs: !1,
|
|
1068
1082
|
__name: "index",
|
|
1069
1083
|
props: We,
|
|
1070
1084
|
emits: ["change", "update:labels", "update:value"],
|
|
1071
|
-
setup(v, { emit:
|
|
1072
|
-
var
|
|
1073
|
-
const a = v, t = W(),
|
|
1085
|
+
setup(v, { emit: r }) {
|
|
1086
|
+
var m, x, S;
|
|
1087
|
+
const a = v, t = W(), o = g({
|
|
1074
1088
|
...a.url,
|
|
1075
|
-
url: ((
|
|
1089
|
+
url: ((m = a.url) == null ? void 0 : m.url) || "",
|
|
1076
1090
|
fieldMap: a.fieldMap || ((x = a.url) == null ? void 0 : x.fieldMap),
|
|
1077
|
-
params: a.params || ((
|
|
1091
|
+
params: a.params || ((S = a.url) == null ? void 0 : S.params),
|
|
1078
1092
|
loadingText: !1
|
|
1079
|
-
}), n =
|
|
1093
|
+
}), n = O(), { editorCtrl: p, errInfo: d, labelText: c } = n, s = g(t.placeholder);
|
|
1080
1094
|
$(
|
|
1081
|
-
() =>
|
|
1082
|
-
(
|
|
1083
|
-
|
|
1095
|
+
() => o.value.loading,
|
|
1096
|
+
(F) => {
|
|
1097
|
+
F ? s.value = "" : s.value || (s.value = "请选择" + c.value);
|
|
1084
1098
|
},
|
|
1085
1099
|
{ immediate: !0 }
|
|
1086
1100
|
);
|
|
1087
|
-
const u =
|
|
1101
|
+
const u = r;
|
|
1088
1102
|
n.inputEmit = u;
|
|
1089
|
-
const l = g([]), i = (
|
|
1103
|
+
const l = g([]), i = (F, y) => {
|
|
1090
1104
|
if (!y || y.length === 0) {
|
|
1091
1105
|
u("update:labels", []), u("update:value", []);
|
|
1092
1106
|
return;
|
|
@@ -1095,45 +1109,45 @@ const ma = /* @__PURE__ */ k({
|
|
|
1095
1109
|
u("update:labels", A), u(
|
|
1096
1110
|
"update:value",
|
|
1097
1111
|
y.map((E) => E.value)
|
|
1098
|
-
), d != null && d.value.errClass &&
|
|
1112
|
+
), d != null && d.value.errClass && p && U(p);
|
|
1099
1113
|
};
|
|
1100
|
-
return
|
|
1101
|
-
|
|
1114
|
+
return K(() => {
|
|
1115
|
+
o.value && !o.value.fieldMap && (o.value.fieldMap = {
|
|
1102
1116
|
title: "Name",
|
|
1103
1117
|
label: "Name",
|
|
1104
1118
|
value: "Id",
|
|
1105
1119
|
key: "Id"
|
|
1106
|
-
}), $e(a.autoload, a, l, n,
|
|
1120
|
+
}), $e(a.autoload, a, l, n, o.value, o.value.params);
|
|
1107
1121
|
}), xe(() => {
|
|
1108
1122
|
Se(a, n);
|
|
1109
|
-
}), (
|
|
1123
|
+
}), (F, y) => {
|
|
1110
1124
|
var A;
|
|
1111
|
-
return
|
|
1112
|
-
l.value.length ?
|
|
1125
|
+
return f(), w("div", null, [
|
|
1126
|
+
l.value.length ? k("", !0) : (f(), w("div", Rt, [
|
|
1113
1127
|
b(e(Je), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
|
|
1114
|
-
y[0] || (y[0] =
|
|
1128
|
+
y[0] || (y[0] = T("span", null, "数据加载中...", -1))
|
|
1115
1129
|
])),
|
|
1116
|
-
b(e(
|
|
1130
|
+
b(e(ot), B({
|
|
1117
1131
|
options: l.value,
|
|
1118
1132
|
class: [(A = e(d)) == null ? void 0 : A.errClass],
|
|
1119
1133
|
"allow-clear": !0,
|
|
1120
|
-
placeholder: l.value.length > 0 ? "请选择" + e(
|
|
1134
|
+
placeholder: l.value.length > 0 ? "请选择" + e(c) : "",
|
|
1121
1135
|
onChange: i
|
|
1122
1136
|
}, e(t)), null, 16, ["options", "class", "placeholder"])
|
|
1123
1137
|
]);
|
|
1124
1138
|
};
|
|
1125
1139
|
}
|
|
1126
|
-
}),
|
|
1140
|
+
}), $a = /* @__PURE__ */ j(Ut, [["__scopeId", "data-v-05e57a52"]]), Sa = /* @__PURE__ */ j(gt, [["__scopeId", "data-v-dc59fe7f"]]);
|
|
1127
1141
|
function te() {
|
|
1128
1142
|
return te = Object.assign ? Object.assign.bind() : function(v) {
|
|
1129
|
-
for (var
|
|
1130
|
-
var a = arguments[
|
|
1143
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
1144
|
+
var a = arguments[r];
|
|
1131
1145
|
for (var t in a) ({}).hasOwnProperty.call(a, t) && (v[t] = a[t]);
|
|
1132
1146
|
}
|
|
1133
1147
|
return v;
|
|
1134
1148
|
}, te.apply(null, arguments);
|
|
1135
1149
|
}
|
|
1136
|
-
const
|
|
1150
|
+
const qt = {
|
|
1137
1151
|
locale: "zh_CN",
|
|
1138
1152
|
today: "今天",
|
|
1139
1153
|
now: "此刻",
|
|
@@ -1160,10 +1174,10 @@ const Ut = {
|
|
|
1160
1174
|
nextDecade: "下一年代",
|
|
1161
1175
|
previousCentury: "上一世纪",
|
|
1162
1176
|
nextCentury: "下一世纪"
|
|
1163
|
-
},
|
|
1177
|
+
}, Qt = {
|
|
1164
1178
|
placeholder: "请选择时间",
|
|
1165
1179
|
rangePlaceholder: ["开始时间", "结束时间"]
|
|
1166
|
-
},
|
|
1180
|
+
}, ce = {
|
|
1167
1181
|
lang: te({
|
|
1168
1182
|
placeholder: "请选择日期",
|
|
1169
1183
|
yearPlaceholder: "请选择年份",
|
|
@@ -1175,51 +1189,51 @@ const Ut = {
|
|
|
1175
1189
|
rangeMonthPlaceholder: ["开始月份", "结束月份"],
|
|
1176
1190
|
rangeQuarterPlaceholder: ["开始季度", "结束季度"],
|
|
1177
1191
|
rangeWeekPlaceholder: ["开始周", "结束周"]
|
|
1178
|
-
},
|
|
1179
|
-
timePickerLocale: te({},
|
|
1192
|
+
}, qt),
|
|
1193
|
+
timePickerLocale: te({}, Qt)
|
|
1180
1194
|
};
|
|
1181
|
-
|
|
1182
|
-
const
|
|
1195
|
+
ce.lang.ok = "确定";
|
|
1196
|
+
const Ta = /* @__PURE__ */ C({
|
|
1183
1197
|
__name: "index",
|
|
1184
1198
|
props: {
|
|
1185
1199
|
valueFormat: {}
|
|
1186
1200
|
},
|
|
1187
1201
|
setup(v) {
|
|
1188
|
-
const
|
|
1189
|
-
|
|
1190
|
-
},
|
|
1191
|
-
return (d,
|
|
1202
|
+
const r = v, { editorCtrl: a, labelText: t, errInfo: o } = O(), n = () => {
|
|
1203
|
+
o != null && o.value.errClass && a && U(a);
|
|
1204
|
+
}, p = g(r.valueFormat ?? "YYYY-MM-DD");
|
|
1205
|
+
return (d, c) => {
|
|
1192
1206
|
var s;
|
|
1193
|
-
return
|
|
1194
|
-
class: N([[((s = e(
|
|
1207
|
+
return f(), h(e(st), {
|
|
1208
|
+
class: N([[((s = e(o)) == null ? void 0 : s.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""], "w-full"]),
|
|
1195
1209
|
placeholder: "请选择" + e(t),
|
|
1196
|
-
locale: e(
|
|
1197
|
-
valueFormat:
|
|
1210
|
+
locale: e(ce),
|
|
1211
|
+
valueFormat: p.value,
|
|
1198
1212
|
onBlur: n
|
|
1199
1213
|
}, null, 8, ["class", "placeholder", "locale", "valueFormat"]);
|
|
1200
1214
|
};
|
|
1201
1215
|
}
|
|
1202
|
-
}),
|
|
1216
|
+
}), Vt = /* @__PURE__ */ C({
|
|
1203
1217
|
__name: "index",
|
|
1204
1218
|
props: {
|
|
1205
1219
|
value: {}
|
|
1206
1220
|
},
|
|
1207
1221
|
emits: ["update:value"],
|
|
1208
|
-
setup(v, { emit:
|
|
1209
|
-
const { editorCtrl: a, labelText: t, errInfo:
|
|
1210
|
-
|
|
1211
|
-
},
|
|
1222
|
+
setup(v, { emit: r }) {
|
|
1223
|
+
const { editorCtrl: a, labelText: t, errInfo: o } = O(), n = () => {
|
|
1224
|
+
o != null && o.value.errClass && a && U(a);
|
|
1225
|
+
}, p = v, d = r, c = g(p.value);
|
|
1212
1226
|
$(
|
|
1213
|
-
() =>
|
|
1227
|
+
() => p.value,
|
|
1214
1228
|
(u) => {
|
|
1215
|
-
|
|
1229
|
+
c.value = u;
|
|
1216
1230
|
},
|
|
1217
1231
|
{ immediate: !0 }
|
|
1218
1232
|
// 立即同步初始值
|
|
1219
1233
|
), $(
|
|
1220
|
-
() =>
|
|
1234
|
+
() => c.value,
|
|
1221
1235
|
(u) => {
|
|
1222
|
-
if (
|
|
1236
|
+
if (c.value === "") {
|
|
1223
1237
|
d("update:value", void 0);
|
|
1224
1238
|
return;
|
|
1225
1239
|
}
|
|
@@ -1227,17 +1241,17 @@ const Sa = /* @__PURE__ */ k({
|
|
|
1227
1241
|
}
|
|
1228
1242
|
);
|
|
1229
1243
|
const s = () => {
|
|
1230
|
-
|
|
1244
|
+
c.value === "" && (c.value = void 0);
|
|
1231
1245
|
};
|
|
1232
1246
|
return (u, l) => {
|
|
1233
|
-
var i,
|
|
1234
|
-
return
|
|
1247
|
+
var i, m;
|
|
1248
|
+
return f(), h(e(se), B({
|
|
1235
1249
|
class: [
|
|
1236
|
-
(i = e(
|
|
1237
|
-
((
|
|
1250
|
+
(i = e(o)) == null ? void 0 : i.errClass,
|
|
1251
|
+
((m = e(o)) == null ? void 0 : m.errClass) === "error" && !u.$slots.addonBefore && !u.$slots.addonAfter ? "!border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""
|
|
1238
1252
|
],
|
|
1239
|
-
value:
|
|
1240
|
-
"onUpdate:value": l[0] || (l[0] = (x) =>
|
|
1253
|
+
value: c.value,
|
|
1254
|
+
"onUpdate:value": l[0] || (l[0] = (x) => c.value = x),
|
|
1241
1255
|
autocomplete: "new-password",
|
|
1242
1256
|
"allow-clear": !0,
|
|
1243
1257
|
placeholder: "请输入" + e(t),
|
|
@@ -1246,14 +1260,14 @@ const Sa = /* @__PURE__ */ k({
|
|
|
1246
1260
|
}, u.$attrs), ge({ _: 2 }, [
|
|
1247
1261
|
u.$slots.addonBefore ? {
|
|
1248
1262
|
name: "addonBefore",
|
|
1249
|
-
fn:
|
|
1263
|
+
fn: _(() => [
|
|
1250
1264
|
I(u.$slots, "addonBefore")
|
|
1251
1265
|
]),
|
|
1252
1266
|
key: "0"
|
|
1253
1267
|
} : void 0,
|
|
1254
1268
|
u.$slots.addonAfter ? {
|
|
1255
1269
|
name: "addonAfter",
|
|
1256
|
-
fn:
|
|
1270
|
+
fn: _(() => [
|
|
1257
1271
|
I(u.$slots, "addonAfter")
|
|
1258
1272
|
]),
|
|
1259
1273
|
key: "1"
|
|
@@ -1261,73 +1275,73 @@ const Sa = /* @__PURE__ */ k({
|
|
|
1261
1275
|
]), 1040, ["class", "value", "placeholder"]);
|
|
1262
1276
|
};
|
|
1263
1277
|
}
|
|
1264
|
-
}),
|
|
1278
|
+
}), jt = /* @__PURE__ */ C({
|
|
1265
1279
|
__name: "inputIcon",
|
|
1266
1280
|
props: {
|
|
1267
1281
|
value: {}
|
|
1268
1282
|
},
|
|
1269
1283
|
emits: ["update:value"],
|
|
1270
|
-
setup(v, { emit:
|
|
1271
|
-
const a = v, t =
|
|
1284
|
+
setup(v, { emit: r }) {
|
|
1285
|
+
const a = v, t = r, o = g(void 0);
|
|
1272
1286
|
return $(
|
|
1273
1287
|
() => a.value,
|
|
1274
1288
|
(n) => {
|
|
1275
|
-
|
|
1289
|
+
o.value = n ?? void 0;
|
|
1276
1290
|
},
|
|
1277
1291
|
{ immediate: !0 }
|
|
1278
1292
|
), $(
|
|
1279
|
-
() =>
|
|
1293
|
+
() => o.value,
|
|
1280
1294
|
(n) => {
|
|
1281
1295
|
t("update:value", n);
|
|
1282
1296
|
}
|
|
1283
|
-
), (n,
|
|
1297
|
+
), (n, p) => (f(), h(Vt, B({
|
|
1284
1298
|
class: ["w-[80%]"],
|
|
1285
|
-
value:
|
|
1286
|
-
"onUpdate:value":
|
|
1299
|
+
value: o.value,
|
|
1300
|
+
"onUpdate:value": p[0] || (p[0] = (d) => o.value = d)
|
|
1287
1301
|
}, n.$attrs), {
|
|
1288
|
-
addonBefore:
|
|
1302
|
+
addonBefore: _(() => [
|
|
1289
1303
|
b(e(Y), {
|
|
1290
1304
|
class: "!w-4 !h-4",
|
|
1291
|
-
icon:
|
|
1305
|
+
icon: o.value
|
|
1292
1306
|
}, null, 8, ["icon"])
|
|
1293
1307
|
]),
|
|
1294
1308
|
_: 1
|
|
1295
1309
|
}, 16, ["value"]));
|
|
1296
1310
|
}
|
|
1297
|
-
}),
|
|
1311
|
+
}), Da = /* @__PURE__ */ j(jt, [["__scopeId", "data-v-f7b3ed74"]]), Ia = /* @__PURE__ */ C({
|
|
1298
1312
|
__name: "inputPassword",
|
|
1299
1313
|
setup(v) {
|
|
1300
|
-
const { editorCtrl:
|
|
1301
|
-
t != null && t.value.errClass &&
|
|
1314
|
+
const { editorCtrl: r, labelText: a, errInfo: t } = O(), o = () => {
|
|
1315
|
+
t != null && t.value.errClass && r && U(r);
|
|
1302
1316
|
};
|
|
1303
|
-
return (n,
|
|
1317
|
+
return (n, p) => {
|
|
1304
1318
|
var d;
|
|
1305
|
-
return
|
|
1319
|
+
return f(), h(e(nt), B({
|
|
1306
1320
|
class: ((d = e(t)) == null ? void 0 : d.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
|
|
1307
1321
|
"allow-clear": !0,
|
|
1308
1322
|
autocomplete: "new-password",
|
|
1309
1323
|
placeholder: "请输入" + e(a),
|
|
1310
|
-
onBlur:
|
|
1324
|
+
onBlur: o
|
|
1311
1325
|
}, n.$attrs), null, 16, ["class", "placeholder"]);
|
|
1312
1326
|
};
|
|
1313
1327
|
}
|
|
1314
|
-
}),
|
|
1328
|
+
}), Ba = /* @__PURE__ */ C({
|
|
1315
1329
|
__name: "inputNumber",
|
|
1316
1330
|
setup(v) {
|
|
1317
|
-
const { editorCtrl:
|
|
1318
|
-
t != null && t.value.errClass &&
|
|
1331
|
+
const { editorCtrl: r, labelText: a, errInfo: t } = O(), o = () => {
|
|
1332
|
+
t != null && t.value.errClass && r && U(r);
|
|
1319
1333
|
};
|
|
1320
|
-
return (n,
|
|
1334
|
+
return (n, p) => {
|
|
1321
1335
|
var d;
|
|
1322
|
-
return
|
|
1336
|
+
return f(), h(e(ut), B({
|
|
1323
1337
|
class: [[((d = e(t)) == null ? void 0 : d.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""], "w-[50%]"],
|
|
1324
|
-
onBlur:
|
|
1338
|
+
onBlur: o,
|
|
1325
1339
|
"allow-clear": !1,
|
|
1326
1340
|
placeholder: "请输入" + e(a)
|
|
1327
1341
|
}, n.$attrs), null, 16, ["class", "placeholder"]);
|
|
1328
1342
|
};
|
|
1329
1343
|
}
|
|
1330
|
-
}),
|
|
1344
|
+
}), Ht = { class: "flex flex-col gap-2" }, Wt = { class: "w-[33%]" }, Jt = { class: "w-[64%]" }, Fa = /* @__PURE__ */ C({
|
|
1331
1345
|
__name: "index",
|
|
1332
1346
|
props: {
|
|
1333
1347
|
value: {},
|
|
@@ -1335,24 +1349,24 @@ const Sa = /* @__PURE__ */ k({
|
|
|
1335
1349
|
valueHolder: {}
|
|
1336
1350
|
},
|
|
1337
1351
|
emits: ["update:value"],
|
|
1338
|
-
setup(v, { emit:
|
|
1339
|
-
const a = v, t =
|
|
1352
|
+
setup(v, { emit: r }) {
|
|
1353
|
+
const a = v, t = r, o = g([]);
|
|
1340
1354
|
let n = !1;
|
|
1341
|
-
const
|
|
1342
|
-
|
|
1355
|
+
const p = () => {
|
|
1356
|
+
o.value = Object.entries(a.value).map(([u, l]) => ({
|
|
1343
1357
|
id: Date.now() + Math.random(),
|
|
1344
1358
|
field: u,
|
|
1345
1359
|
value: l
|
|
1346
1360
|
}));
|
|
1347
1361
|
};
|
|
1348
1362
|
$(() => a.value, () => {
|
|
1349
|
-
n ||
|
|
1363
|
+
n || p(), n = !1;
|
|
1350
1364
|
}, { immediate: !0 });
|
|
1351
1365
|
const d = () => {
|
|
1352
|
-
const u =
|
|
1366
|
+
const u = o.value.reduce((l, i) => (i.field && (l[i.field] = i.value), l), {});
|
|
1353
1367
|
n = !0, t("update:value", u);
|
|
1354
|
-
},
|
|
1355
|
-
|
|
1368
|
+
}, c = () => {
|
|
1369
|
+
o.value.push({
|
|
1356
1370
|
id: Date.now() + Math.random(),
|
|
1357
1371
|
field: "",
|
|
1358
1372
|
value: ""
|
|
@@ -1360,46 +1374,46 @@ const Sa = /* @__PURE__ */ k({
|
|
|
1360
1374
|
}, s = () => {
|
|
1361
1375
|
d();
|
|
1362
1376
|
};
|
|
1363
|
-
return (u, l) => (
|
|
1364
|
-
(
|
|
1377
|
+
return (u, l) => (f(), w("div", Ht, [
|
|
1378
|
+
(f(!0), w(M, null, L(o.value, (i) => (f(), w("div", {
|
|
1365
1379
|
key: i.id,
|
|
1366
1380
|
class: "flex items-center gap-2"
|
|
1367
1381
|
}, [
|
|
1368
|
-
|
|
1369
|
-
b(e(
|
|
1382
|
+
T("div", Wt, [
|
|
1383
|
+
b(e(se), {
|
|
1370
1384
|
value: i.field,
|
|
1371
|
-
"onUpdate:value": (
|
|
1385
|
+
"onUpdate:value": (m) => i.field = m,
|
|
1372
1386
|
title: i.field,
|
|
1373
1387
|
class: "w-full",
|
|
1374
1388
|
placeholder: u.labelHolder || "配置名",
|
|
1375
1389
|
onInput: s
|
|
1376
1390
|
}, null, 8, ["value", "onUpdate:value", "title", "placeholder"])
|
|
1377
1391
|
]),
|
|
1378
|
-
l[0] || (l[0] =
|
|
1379
|
-
|
|
1380
|
-
b(e(
|
|
1392
|
+
l[0] || (l[0] = T("div", { class: "w-[3%]" }, " = ", -1)),
|
|
1393
|
+
T("div", Jt, [
|
|
1394
|
+
b(e(se), {
|
|
1381
1395
|
value: i.value,
|
|
1382
|
-
"onUpdate:value": (
|
|
1396
|
+
"onUpdate:value": (m) => i.value = m,
|
|
1383
1397
|
placeholder: u.valueHolder,
|
|
1384
1398
|
onInput: s,
|
|
1385
1399
|
title: i.value
|
|
1386
1400
|
}, null, 8, ["value", "onUpdate:value", "placeholder", "title"])
|
|
1387
1401
|
])
|
|
1388
1402
|
]))), 128)),
|
|
1389
|
-
b(e(
|
|
1390
|
-
onClick:
|
|
1403
|
+
b(e(Me), {
|
|
1404
|
+
onClick: c,
|
|
1391
1405
|
class: "mt-1 w-[80px] !text-[12px] text-[#666] bg-[#e6f7ff] border-[#b3e0ff] hover:bg-[#b3e0ff] hover:border-[#8abeff]",
|
|
1392
1406
|
size: "small"
|
|
1393
1407
|
}, {
|
|
1394
|
-
default:
|
|
1395
|
-
|
|
1408
|
+
default: _(() => l[1] || (l[1] = [
|
|
1409
|
+
P(" 新增配置行 ")
|
|
1396
1410
|
])),
|
|
1397
1411
|
_: 1,
|
|
1398
1412
|
__: [1]
|
|
1399
1413
|
})
|
|
1400
1414
|
]));
|
|
1401
1415
|
}
|
|
1402
|
-
}),
|
|
1416
|
+
}), Gt = /* @__PURE__ */ j(xt, [["__scopeId", "data-v-f9b2ac3d"]]), Pa = /* @__PURE__ */ C({
|
|
1403
1417
|
__name: "radioStatus",
|
|
1404
1418
|
props: {
|
|
1405
1419
|
/**
|
|
@@ -1427,13 +1441,13 @@ const Sa = /* @__PURE__ */ k({
|
|
|
1427
1441
|
}
|
|
1428
1442
|
},
|
|
1429
1443
|
setup(v) {
|
|
1430
|
-
const
|
|
1431
|
-
return
|
|
1444
|
+
const r = v, a = g(JSON.parse(JSON.stringify(Te.getOptions(r.dataKey))));
|
|
1445
|
+
return r.all === !0 && a.value.unshift({
|
|
1432
1446
|
label: "全部",
|
|
1433
|
-
value:
|
|
1434
|
-
}), (t,
|
|
1447
|
+
value: r.allValue || [0, 1]
|
|
1448
|
+
}), (t, o) => (f(), h(Gt, { data: a.value }, null, 8, ["data"]));
|
|
1435
1449
|
}
|
|
1436
|
-
}), Ma = /* @__PURE__ */
|
|
1450
|
+
}), Ma = /* @__PURE__ */ C({
|
|
1437
1451
|
__name: "index",
|
|
1438
1452
|
props: {
|
|
1439
1453
|
startDate: {},
|
|
@@ -1441,8 +1455,8 @@ const Sa = /* @__PURE__ */ k({
|
|
|
1441
1455
|
valueFormat: { default: "YYYY-MM-DD" }
|
|
1442
1456
|
},
|
|
1443
1457
|
emits: ["update:startDate", "update:endDate"],
|
|
1444
|
-
setup(v, { emit:
|
|
1445
|
-
const a = v, t =
|
|
1458
|
+
setup(v, { emit: r }) {
|
|
1459
|
+
const a = v, t = r, o = O(), { errInfo: n } = o, p = re(() => a.valueFormat), d = re(() => {
|
|
1446
1460
|
const s = a.startDate, u = a.endDate;
|
|
1447
1461
|
if (!(!s || !u))
|
|
1448
1462
|
try {
|
|
@@ -1451,7 +1465,7 @@ const Sa = /* @__PURE__ */ k({
|
|
|
1451
1465
|
} catch {
|
|
1452
1466
|
return;
|
|
1453
1467
|
}
|
|
1454
|
-
}),
|
|
1468
|
+
}), c = (s, u) => {
|
|
1455
1469
|
if (!s || !u || u.length !== 2) {
|
|
1456
1470
|
t("update:startDate", null), t("update:endDate", null);
|
|
1457
1471
|
return;
|
|
@@ -1460,36 +1474,36 @@ const Sa = /* @__PURE__ */ k({
|
|
|
1460
1474
|
};
|
|
1461
1475
|
return (s, u) => {
|
|
1462
1476
|
var l;
|
|
1463
|
-
return
|
|
1477
|
+
return f(), h(e(it), {
|
|
1464
1478
|
class: N([((l = e(n)) == null ? void 0 : l.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "", "w-full"]),
|
|
1465
|
-
locale: e(
|
|
1466
|
-
"value-format":
|
|
1479
|
+
locale: e(ce),
|
|
1480
|
+
"value-format": p.value,
|
|
1467
1481
|
value: d.value,
|
|
1468
|
-
onChange:
|
|
1482
|
+
onChange: c
|
|
1469
1483
|
}, null, 8, ["class", "locale", "value-format", "value"]);
|
|
1470
1484
|
};
|
|
1471
1485
|
}
|
|
1472
|
-
}),
|
|
1486
|
+
}), Na = /* @__PURE__ */ j(yt, [["__scopeId", "data-v-bf782acb"]]), za = /* @__PURE__ */ C({
|
|
1473
1487
|
__name: "index",
|
|
1474
1488
|
setup(v) {
|
|
1475
|
-
const { editorCtrl:
|
|
1476
|
-
t != null && t.value.errClass &&
|
|
1489
|
+
const { editorCtrl: r, labelText: a, errInfo: t } = O(), o = () => {
|
|
1490
|
+
t != null && t.value.errClass && r && U(r);
|
|
1477
1491
|
};
|
|
1478
|
-
return (n,
|
|
1492
|
+
return (n, p) => {
|
|
1479
1493
|
var d;
|
|
1480
|
-
return
|
|
1494
|
+
return f(), h(e(dt), B({
|
|
1481
1495
|
class: ((d = e(t)) == null ? void 0 : d.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
|
|
1482
1496
|
"allow-clear": !0,
|
|
1483
1497
|
placeholder: "请输入" + e(a),
|
|
1484
|
-
onBlur:
|
|
1485
|
-
onKeyup:
|
|
1498
|
+
onBlur: o,
|
|
1499
|
+
onKeyup: p[0] || (p[0] = fe(J(() => {
|
|
1486
1500
|
}, ["stop"]), ["enter", "native"])),
|
|
1487
|
-
onKeydown:
|
|
1501
|
+
onKeydown: p[1] || (p[1] = fe(J(() => {
|
|
1488
1502
|
}, ["stop"]), ["enter", "native"]))
|
|
1489
1503
|
}, n.$attrs), null, 16, ["class", "placeholder"]);
|
|
1490
1504
|
};
|
|
1491
1505
|
}
|
|
1492
|
-
}),
|
|
1506
|
+
}), Xt = /* @__PURE__ */ C({
|
|
1493
1507
|
__name: "index",
|
|
1494
1508
|
props: {
|
|
1495
1509
|
autoload: { type: Boolean },
|
|
@@ -1498,8 +1512,8 @@ const Sa = /* @__PURE__ */ k({
|
|
|
1498
1512
|
value: {}
|
|
1499
1513
|
},
|
|
1500
1514
|
emits: ["change", "update:value"],
|
|
1501
|
-
setup(v, { emit:
|
|
1502
|
-
const a = v, t = g({ ...a.url }), { editorCtrl:
|
|
1515
|
+
setup(v, { emit: r }) {
|
|
1516
|
+
const a = v, t = g({ ...a.url }), { editorCtrl: o, labelText: n, errInfo: p } = O(), d = r, c = g([]), s = g([]);
|
|
1503
1517
|
a.value && a.value.every((l) => {
|
|
1504
1518
|
s.value.push(l.toString());
|
|
1505
1519
|
}), $(
|
|
@@ -1509,34 +1523,34 @@ const Sa = /* @__PURE__ */ k({
|
|
|
1509
1523
|
}
|
|
1510
1524
|
);
|
|
1511
1525
|
const u = (l) => {
|
|
1512
|
-
d("update:value", l), d("change", l), s.value = l,
|
|
1526
|
+
d("update:value", l), d("change", l), s.value = l, p != null && p.value.errClass && o && U(o);
|
|
1513
1527
|
};
|
|
1514
|
-
return
|
|
1528
|
+
return K(async () => {
|
|
1515
1529
|
if (t.value) {
|
|
1516
|
-
const l =
|
|
1530
|
+
const l = o == null ? void 0 : o.page;
|
|
1517
1531
|
if (t.value.api || (t.value.api = l == null ? void 0 : l.api), t.value.authorize === void 0 && (t.value.authorize = l == null ? void 0 : l.authorize), a.autoload) {
|
|
1518
|
-
const i = await Ie(
|
|
1532
|
+
const i = await Ie(o, {
|
|
1519
1533
|
urlKey: "list",
|
|
1520
1534
|
url: { ...t.value, url: t.value.url },
|
|
1521
1535
|
loadingText: !1,
|
|
1522
1536
|
params: a.params
|
|
1523
1537
|
});
|
|
1524
|
-
|
|
1538
|
+
c.value = (i == null ? void 0 : i.data) ?? [];
|
|
1525
1539
|
}
|
|
1526
1540
|
}
|
|
1527
1541
|
}), (l, i) => {
|
|
1528
|
-
var
|
|
1529
|
-
return
|
|
1530
|
-
class: ((
|
|
1542
|
+
var m;
|
|
1543
|
+
return f(), h(e(ct), B({
|
|
1544
|
+
class: ((m = e(p)) == null ? void 0 : m.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
|
|
1531
1545
|
placeholder: "请输入" + e(n),
|
|
1532
1546
|
targetKeys: s.value,
|
|
1533
1547
|
onChange: u
|
|
1534
1548
|
}, l.$attrs), {
|
|
1535
|
-
children:
|
|
1549
|
+
children: _(({ direction: x, disabled: S, filteredItems: F, onItemSelectAll: y, onItemSelect: A, selectedKeys: E }) => [
|
|
1536
1550
|
I(l.$slots, "children", {
|
|
1537
1551
|
direction: x,
|
|
1538
|
-
disabled:
|
|
1539
|
-
filteredItems:
|
|
1552
|
+
disabled: S,
|
|
1553
|
+
filteredItems: F,
|
|
1540
1554
|
onItemSelectAll: y,
|
|
1541
1555
|
onItemSelect: A,
|
|
1542
1556
|
selectedKeys: E
|
|
@@ -1546,7 +1560,7 @@ const Sa = /* @__PURE__ */ k({
|
|
|
1546
1560
|
}, 16, ["class", "placeholder", "targetKeys"]);
|
|
1547
1561
|
};
|
|
1548
1562
|
}
|
|
1549
|
-
}),
|
|
1563
|
+
}), Ka = /* @__PURE__ */ C({
|
|
1550
1564
|
__name: "transferTable",
|
|
1551
1565
|
props: {
|
|
1552
1566
|
/**
|
|
@@ -1572,8 +1586,8 @@ const Sa = /* @__PURE__ */ k({
|
|
|
1572
1586
|
}
|
|
1573
1587
|
},
|
|
1574
1588
|
emits: ["update:value"],
|
|
1575
|
-
setup(v, { emit:
|
|
1576
|
-
const a = v, t =
|
|
1589
|
+
setup(v, { emit: r }) {
|
|
1590
|
+
const a = v, t = r, o = g(a.autoload), n = g(a.value), p = g(a.gridCtrl.primaryKey);
|
|
1577
1591
|
$(
|
|
1578
1592
|
() => n.value,
|
|
1579
1593
|
(s) => {
|
|
@@ -1586,32 +1600,32 @@ const Sa = /* @__PURE__ */ k({
|
|
|
1586
1600
|
}
|
|
1587
1601
|
), a.gridCtrl.autoload = !1, a.gridCtrl.remotePage = !1, a.gridCtrl.selectable = g(!0), a.gridCtrl.buttons = g([]), a.gridCtrl.tools = [];
|
|
1588
1602
|
const d = ({ disabled: s, selectedKeys: u, onItemSelectAll: l, onItemSelect: i }) => ({
|
|
1589
|
-
getCheckboxProps: (
|
|
1603
|
+
getCheckboxProps: (m) => ({
|
|
1590
1604
|
// 控制是否禁止
|
|
1591
|
-
disabled: s ||
|
|
1605
|
+
disabled: s || m.disabled
|
|
1592
1606
|
}),
|
|
1593
|
-
onSelectAll(
|
|
1594
|
-
const
|
|
1595
|
-
l(
|
|
1607
|
+
onSelectAll(m, x) {
|
|
1608
|
+
const S = x.filter((F) => !F.disabled).map(({ [p.value]: F }) => F);
|
|
1609
|
+
l(S, m);
|
|
1596
1610
|
},
|
|
1597
|
-
onSelect({ [
|
|
1598
|
-
i(
|
|
1611
|
+
onSelect({ [p.value]: m }, x) {
|
|
1612
|
+
i(m, x);
|
|
1599
1613
|
},
|
|
1600
1614
|
selectedRowKeys: u
|
|
1601
|
-
}),
|
|
1602
|
-
return
|
|
1603
|
-
if (
|
|
1615
|
+
}), c = g([]);
|
|
1616
|
+
return K(async () => {
|
|
1617
|
+
if (o.value) {
|
|
1604
1618
|
const s = await Ie(a.gridCtrl, {
|
|
1605
1619
|
urlKey: "list",
|
|
1606
1620
|
url: { ...a.gridCtrl.gridUrl, url: a.gridCtrl.gridUrl.url },
|
|
1607
1621
|
params: a.gridCtrl.gridQuery,
|
|
1608
1622
|
loadingText: !1
|
|
1609
1623
|
});
|
|
1610
|
-
|
|
1624
|
+
c.value = (s == null ? void 0 : s.data) ?? [];
|
|
1611
1625
|
}
|
|
1612
|
-
}), (s, u) => (
|
|
1613
|
-
"data-source":
|
|
1614
|
-
"row-key": (l) => l[
|
|
1626
|
+
}), (s, u) => (f(), h(Xt, B({
|
|
1627
|
+
"data-source": c.value,
|
|
1628
|
+
"row-key": (l) => l[p.value],
|
|
1615
1629
|
value: n.value,
|
|
1616
1630
|
"onUpdate:value": u[0] || (u[0] = (l) => n.value = l),
|
|
1617
1631
|
"list-style": {
|
|
@@ -1621,30 +1635,30 @@ const Sa = /* @__PURE__ */ k({
|
|
|
1621
1635
|
"show-select-all": !1,
|
|
1622
1636
|
"show-search": !0,
|
|
1623
1637
|
"filter-option": (l, i) => {
|
|
1624
|
-
for (const
|
|
1625
|
-
if (i[
|
|
1638
|
+
for (const m of a.gridCtrl.columns.value)
|
|
1639
|
+
if (i[m.dataIndex].toString().indexOf(l) !== -1)
|
|
1626
1640
|
return !0;
|
|
1627
1641
|
return !1;
|
|
1628
1642
|
}
|
|
1629
1643
|
}, s.$attrs), {
|
|
1630
|
-
children:
|
|
1644
|
+
children: _(({ filteredItems: l, onItemSelectAll: i, onItemSelect: m, selectedKeys: x }) => [
|
|
1631
1645
|
b(e(Ne), {
|
|
1632
1646
|
columns: v.gridCtrl.columns.value,
|
|
1633
|
-
"row-key":
|
|
1647
|
+
"row-key": p.value,
|
|
1634
1648
|
"row-selection": d({
|
|
1635
1649
|
disabled: !1,
|
|
1636
1650
|
selectedKeys: x,
|
|
1637
1651
|
onItemSelectAll: i,
|
|
1638
|
-
onItemSelect:
|
|
1652
|
+
onItemSelect: m
|
|
1639
1653
|
}),
|
|
1640
1654
|
bordered: !1,
|
|
1641
1655
|
size: "small",
|
|
1642
1656
|
"data-source": l,
|
|
1643
1657
|
scroll: { x: 300 },
|
|
1644
|
-
"custom-row": (
|
|
1658
|
+
"custom-row": (S) => ({
|
|
1645
1659
|
onClick: () => {
|
|
1646
|
-
const
|
|
1647
|
-
|
|
1660
|
+
const F = S[p.value];
|
|
1661
|
+
m(F, !x.includes(F));
|
|
1648
1662
|
}
|
|
1649
1663
|
})
|
|
1650
1664
|
}, null, 8, ["columns", "row-key", "row-selection", "data-source", "custom-row"])
|
|
@@ -1652,7 +1666,7 @@ const Sa = /* @__PURE__ */ k({
|
|
|
1652
1666
|
_: 1
|
|
1653
1667
|
}, 16, ["data-source", "row-key", "value", "filter-option"]));
|
|
1654
1668
|
}
|
|
1655
|
-
}),
|
|
1669
|
+
}), Zt = /* @__PURE__ */ C({
|
|
1656
1670
|
__name: "index",
|
|
1657
1671
|
props: {
|
|
1658
1672
|
multiple: {
|
|
@@ -1669,10 +1683,10 @@ const Sa = /* @__PURE__ */ k({
|
|
|
1669
1683
|
}
|
|
1670
1684
|
},
|
|
1671
1685
|
emits: ["change", "update:value"],
|
|
1672
|
-
setup(v, { emit:
|
|
1673
|
-
const a = v, t = a.treeCtrl,
|
|
1674
|
-
|
|
1675
|
-
const
|
|
1686
|
+
setup(v, { emit: r }) {
|
|
1687
|
+
const a = v, t = a.treeCtrl, o = O(), { errInfo: n, labelText: p } = o, d = r;
|
|
1688
|
+
o.inputEmit = d;
|
|
1689
|
+
const c = g([]), s = g();
|
|
1676
1690
|
$(
|
|
1677
1691
|
() => a.value,
|
|
1678
1692
|
(l) => {
|
|
@@ -1682,58 +1696,58 @@ const Sa = /* @__PURE__ */ k({
|
|
|
1682
1696
|
), $(
|
|
1683
1697
|
() => t.data.value,
|
|
1684
1698
|
(l) => {
|
|
1685
|
-
l && (
|
|
1699
|
+
l && (c.value = t.fieldMap ? ee(t.fieldMap, l) : l);
|
|
1686
1700
|
},
|
|
1687
1701
|
{ immediate: !0 }
|
|
1688
1702
|
);
|
|
1689
1703
|
const u = (l) => {
|
|
1690
1704
|
a.multiple ? s.value = l ?? [] : s.value = l ?? "", d("change", s.value), d("update:value", s.value);
|
|
1691
1705
|
};
|
|
1692
|
-
return
|
|
1706
|
+
return K(() => {
|
|
1693
1707
|
t.fieldMap || (t.fieldMap = {
|
|
1694
1708
|
label: "Name",
|
|
1695
1709
|
key: "Id",
|
|
1696
1710
|
value: "Id"
|
|
1697
|
-
}), t.data.value ?
|
|
1711
|
+
}), t.data.value ? c.value = t.fieldMap ? ee(t.fieldMap, t.data.value) : t.data.value : a.treeCtrl.autoload && De(a.treeCtrl);
|
|
1698
1712
|
}), (l, i) => {
|
|
1699
|
-
var
|
|
1700
|
-
return
|
|
1701
|
-
class: [[(
|
|
1713
|
+
var m;
|
|
1714
|
+
return f(), h(e(pt), B({
|
|
1715
|
+
class: [[(m = e(n)) == null ? void 0 : m.errClass], "w-full"],
|
|
1702
1716
|
"tree-line": "",
|
|
1703
1717
|
multiple: v.multiple,
|
|
1704
1718
|
"tree-default-expanded-keys": ["-"],
|
|
1705
1719
|
value: s.value,
|
|
1706
1720
|
"onUpdate:value": i[0] || (i[0] = (x) => s.value = x),
|
|
1707
|
-
"tree-data":
|
|
1708
|
-
placeholder: "请选择" + e(
|
|
1721
|
+
"tree-data": c.value,
|
|
1722
|
+
placeholder: "请选择" + e(p),
|
|
1709
1723
|
"allow-clear": !0,
|
|
1710
1724
|
onChange: u
|
|
1711
1725
|
}, l.$attrs), null, 16, ["class", "multiple", "value", "tree-data", "placeholder"]);
|
|
1712
1726
|
};
|
|
1713
1727
|
}
|
|
1714
|
-
}),
|
|
1728
|
+
}), Oa = /* @__PURE__ */ j(Zt, [["__scopeId", "data-v-64be74cc"]]), ea = { class: "relative h-[calc(100vh-80px)] overflow-y-auto" }, ta = { class: "flex w-full h-full min-h-full" }, aa = {
|
|
1715
1729
|
key: 0,
|
|
1716
1730
|
class: "w-1/4 pr-4 min-h-full min-w-[170px] max-w-[200px]"
|
|
1717
|
-
},
|
|
1731
|
+
}, la = { class: "flex-1 h-full overflow-y-auto" }, Aa = /* @__PURE__ */ C({
|
|
1718
1732
|
__name: "index",
|
|
1719
1733
|
props: {
|
|
1720
1734
|
left: { type: Boolean }
|
|
1721
1735
|
},
|
|
1722
1736
|
setup(v) {
|
|
1723
|
-
const { useToken:
|
|
1724
|
-
return (t,
|
|
1725
|
-
b(e(
|
|
1737
|
+
const { useToken: r } = Be, { token: a } = r();
|
|
1738
|
+
return (t, o) => (f(), w("div", ea, [
|
|
1739
|
+
b(e(ft), {
|
|
1726
1740
|
class: "m-[10px] p-[10px] h-[calc(100vh-100px)] !min-h-[calc(100vh-100px)]",
|
|
1727
|
-
style:
|
|
1741
|
+
style: ne({
|
|
1728
1742
|
backgroundColor: e(a).colorBgContainer
|
|
1729
1743
|
})
|
|
1730
1744
|
}, {
|
|
1731
|
-
default:
|
|
1732
|
-
|
|
1733
|
-
t.left ? (
|
|
1745
|
+
default: _(() => [
|
|
1746
|
+
T("div", ta, [
|
|
1747
|
+
t.left ? (f(), w("div", aa, [
|
|
1734
1748
|
I(t.$slots, "left")
|
|
1735
|
-
])) :
|
|
1736
|
-
|
|
1749
|
+
])) : k("", !0),
|
|
1750
|
+
T("div", la, [
|
|
1737
1751
|
I(t.$slots, "default")
|
|
1738
1752
|
])
|
|
1739
1753
|
])
|
|
@@ -1742,63 +1756,63 @@ const Sa = /* @__PURE__ */ k({
|
|
|
1742
1756
|
}, 8, ["style"])
|
|
1743
1757
|
]));
|
|
1744
1758
|
}
|
|
1745
|
-
}),
|
|
1759
|
+
}), ra = { class: "font-['Courier'] text-[#666]" }, Ea = /* @__PURE__ */ C({
|
|
1746
1760
|
__name: "index",
|
|
1747
1761
|
setup(v) {
|
|
1748
|
-
const
|
|
1749
|
-
return
|
|
1762
|
+
const r = g("");
|
|
1763
|
+
return K(() => {
|
|
1750
1764
|
setInterval(() => {
|
|
1751
|
-
const a = /* @__PURE__ */ new Date(), t = { month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit" },
|
|
1752
|
-
|
|
1765
|
+
const a = /* @__PURE__ */ new Date(), t = { month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit" }, o = a.toLocaleString(void 0, t).replace(/\//g, "-").replace(",", "");
|
|
1766
|
+
r.value = a.getFullYear() + "-" + o;
|
|
1753
1767
|
}, 1e3);
|
|
1754
|
-
}), (a, t) => (
|
|
1768
|
+
}), (a, t) => (f(), w("div", ra, D(r.value), 1));
|
|
1755
1769
|
}
|
|
1756
1770
|
});
|
|
1757
1771
|
export {
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1772
|
+
Va as AppIcon,
|
|
1773
|
+
wa as AutoComplete,
|
|
1774
|
+
ja as Breadcrumb,
|
|
1775
|
+
z as Button,
|
|
1776
|
+
$a as Cascader,
|
|
1777
|
+
Sa as Checkbox,
|
|
1778
|
+
Aa as Content,
|
|
1779
|
+
Ta as DatePicker,
|
|
1780
|
+
Ea as Datetime,
|
|
1781
|
+
Ra as Dialog,
|
|
1782
|
+
ga as Drawer,
|
|
1783
|
+
xa as Form,
|
|
1784
|
+
ya as FormItem,
|
|
1785
|
+
_a as Fullscreen,
|
|
1786
|
+
Ha as Header,
|
|
1787
|
+
Wa as HeaderExits,
|
|
1788
|
+
kt as Helper,
|
|
1789
|
+
Ja as Icon,
|
|
1790
|
+
Nt as Icontool,
|
|
1791
|
+
Vt as Input,
|
|
1792
|
+
Da as InputIcon,
|
|
1793
|
+
Ba as InputNumber,
|
|
1794
|
+
Ia as InputPassword,
|
|
1795
|
+
ha as LayoutIcon,
|
|
1796
|
+
Ga as Menu,
|
|
1797
|
+
Xa as MenuTabs,
|
|
1798
|
+
Za as ProjectIcon,
|
|
1799
|
+
Fa as PropEditor,
|
|
1800
|
+
Gt as Radio,
|
|
1787
1801
|
Pa as RadioStatus,
|
|
1788
1802
|
Ma as RangePicker,
|
|
1789
|
-
|
|
1803
|
+
ba as Search,
|
|
1790
1804
|
le as SearchItem,
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1805
|
+
Na as Select,
|
|
1806
|
+
Et as Switch,
|
|
1807
|
+
ka as Table,
|
|
1794
1808
|
Pt as TableOperate,
|
|
1795
|
-
|
|
1809
|
+
za as Textarea,
|
|
1796
1810
|
Y as ToolIcon,
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1811
|
+
At as Toolbar,
|
|
1812
|
+
qa as Tooltip,
|
|
1813
|
+
Xt as Transfer,
|
|
1814
|
+
Ka as TransferTable,
|
|
1801
1815
|
Ca as Tree,
|
|
1802
|
-
|
|
1803
|
-
|
|
1816
|
+
Oa as TreeSelect,
|
|
1817
|
+
tl as UploadList
|
|
1804
1818
|
};
|