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