easy-ep-ui 0.1.1 → 0.2.0
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/LICENSE +172 -0
- package/README.md +29 -14
- package/dist/easy-ep-ui.js +1 -1
- package/dist/style.css +1 -1
- package/es/charts/BaseBar/index.d.ts +2 -0
- package/es/charts/BaseBar/src/index.vue.d.ts +45 -0
- package/es/charts/BaseLine/index.d.ts +2 -0
- package/es/charts/BaseLine/src/index.vue.d.ts +47 -0
- package/es/charts/BasePie/index.d.ts +2 -0
- package/es/charts/BasePie/src/index.vue.d.ts +41 -0
- package/es/charts/BaseRadar/index.d.ts +2 -0
- package/es/charts/BaseRadar/src/index.vue.d.ts +47 -0
- package/es/charts/config.d.ts +32 -0
- package/es/charts/index.d.ts +8 -0
- package/es/charts/useChart.d.ts +21 -0
- package/es/components/ee-dept-cascader/index.d.ts +2 -0
- package/es/components/ee-dept-cascader/src/index.vue.d.ts +26 -0
- package/es/components/ee-dept-cascader/type.d.ts +39 -0
- package/es/components/ee-dict-select/src/index.vue.d.ts +19 -18
- package/es/components/ee-dict-select/type.d.ts +54 -0
- package/es/components/ee-form-dialog/src/index.vue.d.ts +108 -8
- package/es/components/ee-form-table/src/components/FormAuto.vue.d.ts +115 -0
- package/es/components/ee-form-table/src/components/FormDrawer.vue.d.ts +280 -7
- package/es/components/ee-form-table/src/components/TableToolbar.vue.d.ts +10 -3
- package/es/components/ee-form-table/src/constants.d.ts +2 -2
- package/es/components/ee-form-table/src/hooks/useCrud.d.ts +3 -1
- package/es/components/ee-form-table/src/hooks/useExport.d.ts +2 -0
- package/es/components/ee-form-table/src/hooks/useForm.d.ts +4 -2
- package/es/components/ee-form-table/src/hooks/useTable.d.ts +28 -11
- package/es/components/ee-form-table/src/index.vue.d.ts +33 -2
- package/es/components/ee-form-table/types.d.ts +86 -1
- package/es/components/ee-remote-select/index.d.ts +2 -0
- package/es/components/ee-remote-select/src/index.vue.d.ts +30 -0
- package/es/components/ee-remote-select/type.d.ts +53 -0
- package/es/components/ee-role-select/index.d.ts +2 -0
- package/es/components/ee-role-select/src/index.vue.d.ts +29 -0
- package/es/components/ee-role-select/type.d.ts +44 -0
- package/es/components/ee-search-bar/src/index.vue.d.ts +80 -10
- package/es/components/ee-status-tag/src/index.vue.d.ts +1 -1
- package/es/components/ee-user-select/index.d.ts +2 -0
- package/es/components/ee-user-select/src/index.vue.d.ts +29 -0
- package/es/components/ee-user-select/type.d.ts +46 -0
- package/es/hooks/index.d.ts +4 -0
- package/es/hooks/useRemoteSelectPagination.d.ts +68 -0
- package/es/hooks/useSelectEcho.d.ts +27 -0
- package/es/index.d.ts +50 -2
- package/es/index.mjs +3119 -1092
- package/es/locale/en.d.ts +3 -0
- package/es/locale/index.d.ts +91 -0
- package/es/locale/useLocale.d.ts +13 -0
- package/es/locale/zh-cn.d.ts +3 -0
- package/es/style.css +1 -1
- package/es/utils/types.d.ts +39 -0
- package/lib/charts/BaseBar/index.d.ts +2 -0
- package/lib/charts/BaseBar/src/index.vue.d.ts +45 -0
- package/lib/charts/BaseLine/index.d.ts +2 -0
- package/lib/charts/BaseLine/src/index.vue.d.ts +47 -0
- package/lib/charts/BasePie/index.d.ts +2 -0
- package/lib/charts/BasePie/src/index.vue.d.ts +41 -0
- package/lib/charts/BaseRadar/index.d.ts +2 -0
- package/lib/charts/BaseRadar/src/index.vue.d.ts +47 -0
- package/lib/charts/config.d.ts +32 -0
- package/lib/charts/index.d.ts +8 -0
- package/lib/charts/useChart.d.ts +21 -0
- package/lib/components/ee-dept-cascader/index.d.ts +2 -0
- package/lib/components/ee-dept-cascader/src/index.vue.d.ts +26 -0
- package/lib/components/ee-dept-cascader/type.d.ts +39 -0
- package/lib/components/ee-dict-select/src/index.vue.d.ts +19 -18
- package/lib/components/ee-dict-select/type.d.ts +54 -0
- package/lib/components/ee-form-dialog/src/index.vue.d.ts +108 -8
- package/lib/components/ee-form-table/src/components/FormAuto.vue.d.ts +115 -0
- package/lib/components/ee-form-table/src/components/FormDrawer.vue.d.ts +280 -7
- package/lib/components/ee-form-table/src/components/TableToolbar.vue.d.ts +10 -3
- package/lib/components/ee-form-table/src/constants.d.ts +2 -2
- package/lib/components/ee-form-table/src/hooks/useCrud.d.ts +3 -1
- package/lib/components/ee-form-table/src/hooks/useExport.d.ts +2 -0
- package/lib/components/ee-form-table/src/hooks/useForm.d.ts +4 -2
- package/lib/components/ee-form-table/src/hooks/useTable.d.ts +28 -11
- package/lib/components/ee-form-table/src/index.vue.d.ts +33 -2
- package/lib/components/ee-form-table/types.d.ts +86 -1
- package/lib/components/ee-remote-select/index.d.ts +2 -0
- package/lib/components/ee-remote-select/src/index.vue.d.ts +30 -0
- package/lib/components/ee-remote-select/type.d.ts +53 -0
- package/lib/components/ee-role-select/index.d.ts +2 -0
- package/lib/components/ee-role-select/src/index.vue.d.ts +29 -0
- package/lib/components/ee-role-select/type.d.ts +44 -0
- package/lib/components/ee-search-bar/src/index.vue.d.ts +80 -10
- package/lib/components/ee-status-tag/src/index.vue.d.ts +1 -1
- package/lib/components/ee-user-select/index.d.ts +2 -0
- package/lib/components/ee-user-select/src/index.vue.d.ts +29 -0
- package/lib/components/ee-user-select/type.d.ts +46 -0
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/useRemoteSelectPagination.d.ts +68 -0
- package/lib/hooks/useSelectEcho.d.ts +27 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +50 -2
- package/lib/locale/en.d.ts +3 -0
- package/lib/locale/index.d.ts +91 -0
- package/lib/locale/useLocale.d.ts +13 -0
- package/lib/locale/zh-cn.d.ts +3 -0
- package/lib/style.css +1 -1
- package/lib/utils/types.d.ts +39 -0
- package/package.json +5 -2
package/es/index.mjs
CHANGED
|
@@ -1,59 +1,261 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ElSelect as
|
|
3
|
-
|
|
1
|
+
import { inject as he, ref as A, defineComponent as H, computed as V, onMounted as Z, openBlock as i, createBlock as w, unref as a, mergeProps as I, withCtx as v, createElementBlock as D, Fragment as O, renderList as K, createTextVNode as M, toDisplayString as F, createVNode as T, resolveDynamicComponent as Fa, createCommentVNode as L, createElementVNode as N, reactive as Ra, watch as re, renderSlot as Y, withModifiers as yl, normalizeClass as Aa, resolveComponent as wl, normalizeStyle as Cl, createSlots as Sl, normalizeProps as ua, guardReactiveProps as da, shallowRef as xl, nextTick as Fe, onUnmounted as zl } from "vue";
|
|
2
|
+
import { ElMessage as J, ElSelect as ue, ElOption as de, ElTag as Dl, ElForm as Ye, ElRow as Je, ElCol as xe, ElFormItem as ze, ElInput as ge, ElDatePicker as ve, ElButton as q, ElDialog as Ua, ElRadioGroup as ca, ElRadio as Qe, ElCheckboxGroup as fa, ElCheckbox as Ce, ElSwitch as $a, ElMessageBox as Ma, ElInputNumber as Ia, ElTooltip as Sa, ElPopover as Vl, ElDivider as kl, ElIcon as Oa, ElDrawer as Tl, ElDescriptions as xa, ElDescriptionsItem as za, ElTable as Da, ElTableColumn as we, ElPopconfirm as El, ElDropdown as Pl, ElDropdownMenu as Bl, ElDropdownItem as Fl, ElEmpty as Rl, ElPagination as Al, ElCascader as Ul } from "element-plus";
|
|
3
|
+
import * as $l from "echarts";
|
|
4
|
+
const Se = {
|
|
5
|
+
formTable: {
|
|
6
|
+
operation: "操作",
|
|
7
|
+
add: "新增",
|
|
8
|
+
edit: "编辑",
|
|
9
|
+
delete: "删除",
|
|
10
|
+
view: "查看",
|
|
11
|
+
import: "导入",
|
|
12
|
+
export: "导出",
|
|
13
|
+
batchDelete: "批量删除",
|
|
14
|
+
refresh: "刷新",
|
|
15
|
+
columnSetting: "列设置",
|
|
16
|
+
search: "查询",
|
|
17
|
+
reset: "重置",
|
|
18
|
+
expand: "展开",
|
|
19
|
+
collapse: "收起",
|
|
20
|
+
empty: "暂无数据",
|
|
21
|
+
confirm: "确定",
|
|
22
|
+
cancel: "取消",
|
|
23
|
+
close: "关闭",
|
|
24
|
+
confirmDelete: "确认删除",
|
|
25
|
+
confirmDeleteMsg: "确定要删除该条数据吗?",
|
|
26
|
+
confirmBatchDelete: "确认批量删除",
|
|
27
|
+
confirmBatchDeleteMsg: "确定要删除选中的 {count} 条数据吗?",
|
|
28
|
+
addTitle: "新增",
|
|
29
|
+
editTitle: "编辑",
|
|
30
|
+
viewTitle: "查看",
|
|
31
|
+
addSuccess: "新增成功",
|
|
32
|
+
editSuccess: "编辑成功",
|
|
33
|
+
deleteSuccess: "删除成功",
|
|
34
|
+
batchDeleteSuccess: "批量删除成功",
|
|
35
|
+
refreshSuccess: "刷新成功",
|
|
36
|
+
exportSuccess: "导出成功",
|
|
37
|
+
exportFail: "导出失败",
|
|
38
|
+
requestFailed: "请求失败",
|
|
39
|
+
deleteFailed: "删除失败",
|
|
40
|
+
batchDeleteFailed: "批量删除失败",
|
|
41
|
+
installXlsx: "请安装 xlsx 依赖: npm install xlsx",
|
|
42
|
+
exportFileName: "export.xlsx",
|
|
43
|
+
inputPlaceholder: "请输入{label}",
|
|
44
|
+
selectPlaceholder: "请选择{label}",
|
|
45
|
+
dateRangeTo: "至",
|
|
46
|
+
dateRangeStart: "开始日期",
|
|
47
|
+
dateRangeEnd: "结束日期",
|
|
48
|
+
version: "版本",
|
|
49
|
+
versionTitle: "版本历史",
|
|
50
|
+
moreActions: "更多操作",
|
|
51
|
+
rowIndex: "行号",
|
|
52
|
+
selectionLabel: "选择框"
|
|
53
|
+
},
|
|
54
|
+
searchBar: {
|
|
55
|
+
search: "搜索",
|
|
56
|
+
reset: "重置",
|
|
57
|
+
expand: "展开",
|
|
58
|
+
collapse: "收起",
|
|
59
|
+
inputPlaceholder: "请输入{label}",
|
|
60
|
+
selectPlaceholder: "请选择{label}",
|
|
61
|
+
dateRangeTo: "至",
|
|
62
|
+
dateRangeStart: "开始日期",
|
|
63
|
+
dateRangeEnd: "结束日期"
|
|
64
|
+
},
|
|
65
|
+
formDialog: {
|
|
66
|
+
confirm: "确定",
|
|
67
|
+
cancel: "取消",
|
|
68
|
+
title: "表单",
|
|
69
|
+
inputPlaceholder: "请输入{label}",
|
|
70
|
+
textareaPlaceholder: "请输入{label}",
|
|
71
|
+
selectPlaceholder: "请选择{label}",
|
|
72
|
+
datePickerPlaceholder: "请选择{label}"
|
|
73
|
+
},
|
|
74
|
+
remoteSelect: {
|
|
75
|
+
loading: "加载中...",
|
|
76
|
+
noMore: "没有更多数据了",
|
|
77
|
+
loadMore: "加载更多",
|
|
78
|
+
searchPlaceholder: "请输入关键词搜索",
|
|
79
|
+
requestFailed: "请求失败",
|
|
80
|
+
noData: "暂无数据"
|
|
81
|
+
}
|
|
82
|
+
}, La = "eeLocale";
|
|
83
|
+
function _() {
|
|
84
|
+
const e = he(La, Se);
|
|
85
|
+
function l(t, r, o) {
|
|
86
|
+
try {
|
|
87
|
+
const m = e[t];
|
|
88
|
+
let h = m == null ? void 0 : m[r];
|
|
89
|
+
if (h == null) {
|
|
90
|
+
const u = Se[t];
|
|
91
|
+
h = u == null ? void 0 : u[r];
|
|
92
|
+
}
|
|
93
|
+
if (h == null) return r;
|
|
94
|
+
if (o)
|
|
95
|
+
for (const [u, C] of Object.entries(o))
|
|
96
|
+
h = h.replace(`{${u}}`, String(C));
|
|
97
|
+
return h;
|
|
98
|
+
} catch {
|
|
99
|
+
return r;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return { locale: e, t: l };
|
|
103
|
+
}
|
|
104
|
+
function Ze(e) {
|
|
105
|
+
const {
|
|
106
|
+
requestInstance: l,
|
|
107
|
+
apiUrl: t,
|
|
108
|
+
pageNumKey: r = "pageNum",
|
|
109
|
+
pageSizeKey: o = "pageSize",
|
|
110
|
+
pageSize: m = 20,
|
|
111
|
+
searchKey: h = "keyword",
|
|
112
|
+
extraParams: u = {},
|
|
113
|
+
labelField: C = "label",
|
|
114
|
+
valueField: g = "value",
|
|
115
|
+
debounceDelay: b = 300
|
|
116
|
+
} = e, n = l ?? he(aa);
|
|
117
|
+
if (!n)
|
|
118
|
+
throw new Error("[EasyEPUI] 请配置 requestInstance:可通过 app.use(EasyEpUI, { requestInstance }) 全局注入,或通过 props 传入");
|
|
119
|
+
const d = n, { t: s } = _(), p = A(!1), c = A([]), k = A(!1), f = A(0);
|
|
120
|
+
let z = 1, U = "", le = null;
|
|
121
|
+
async function G(E, oe = !0) {
|
|
122
|
+
oe && (z = 1, k.value = !1, E !== void 0 && (U = E)), p.value = !0;
|
|
123
|
+
try {
|
|
124
|
+
const B = {
|
|
125
|
+
[r]: z,
|
|
126
|
+
[o]: m,
|
|
127
|
+
...u
|
|
128
|
+
};
|
|
129
|
+
U && (B[h] = U);
|
|
130
|
+
const P = await d.get(t, { params: B }), te = pe(P.data).map((ne) => ({
|
|
131
|
+
...ne,
|
|
132
|
+
label: ne[C],
|
|
133
|
+
value: ne[g]
|
|
134
|
+
}));
|
|
135
|
+
oe ? c.value = te : c.value = [...c.value, ...te], f.value = be(P.data), c.value.length >= f.value && (k.value = !0);
|
|
136
|
+
} catch (B) {
|
|
137
|
+
J.error((B == null ? void 0 : B.msg) || (B == null ? void 0 : B.message) || s("remoteSelect", "requestFailed")), oe && (c.value = []);
|
|
138
|
+
} finally {
|
|
139
|
+
p.value = !1;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function pe(E) {
|
|
143
|
+
return Array.isArray(E) ? E : E != null && E.rows ? E.rows : E != null && E.list ? E.list : E != null && E.records ? E.records : E != null && E.data ? Array.isArray(E.data) ? E.data : pe(E.data) : E != null && E.items ? E.items : [];
|
|
144
|
+
}
|
|
145
|
+
function be(E) {
|
|
146
|
+
return E != null && E.total ? Number(E.total) : E != null && E.count ? Number(E.count) : Array.isArray(E) ? E.length : E != null && E.data && typeof E.data == "object" && !Array.isArray(E.data) ? be(E.data) : 0;
|
|
147
|
+
}
|
|
148
|
+
async function Ve() {
|
|
149
|
+
p.value || k.value || (z++, await G(void 0, !1));
|
|
150
|
+
}
|
|
151
|
+
function ke() {
|
|
152
|
+
U = "", z = 1, c.value = [], k.value = !1, f.value = 0;
|
|
153
|
+
}
|
|
154
|
+
function Te(E) {
|
|
155
|
+
U = E, le && clearTimeout(le), le = setTimeout(() => {
|
|
156
|
+
G(U, !0);
|
|
157
|
+
}, b);
|
|
158
|
+
}
|
|
159
|
+
return {
|
|
160
|
+
/** 是否正在加载 */
|
|
161
|
+
loading: p,
|
|
162
|
+
/** 当前选项列表 */
|
|
163
|
+
options: c,
|
|
164
|
+
/** 是否没有更多数据 */
|
|
165
|
+
noMore: k,
|
|
166
|
+
loadData: G,
|
|
167
|
+
loadMore: Ve,
|
|
168
|
+
resetList: ke,
|
|
169
|
+
onKeywordChange: Te
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
const $e = /* @__PURE__ */ H({
|
|
4
173
|
name: "EeDictSelect",
|
|
5
174
|
__name: "index",
|
|
6
175
|
props: {
|
|
7
176
|
modelValue: {},
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
177
|
+
dictCode: {},
|
|
178
|
+
apiUrl: {},
|
|
179
|
+
detailEchoUrl: {},
|
|
180
|
+
mode: { default: "single" },
|
|
11
181
|
labelField: { default: "label" },
|
|
182
|
+
valueField: { default: "value" },
|
|
183
|
+
searchKey: { default: "keyword" },
|
|
184
|
+
pageSize: { default: 50 },
|
|
185
|
+
extraParams: {},
|
|
186
|
+
requestInstance: {},
|
|
187
|
+
options: {},
|
|
188
|
+
placeholder: {},
|
|
189
|
+
clearable: { type: Boolean, default: !0 },
|
|
190
|
+
disabled: { type: Boolean },
|
|
191
|
+
readonly: { type: Boolean },
|
|
192
|
+
filterable: { type: Boolean, default: !0 },
|
|
12
193
|
size: { default: "default" }
|
|
13
194
|
},
|
|
14
|
-
emits: ["update:modelValue", "change", "clear", "focus", "
|
|
15
|
-
setup(e, { emit:
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
195
|
+
emits: ["update:modelValue", "change", "clear", "blur", "focus", "search", "load-success"],
|
|
196
|
+
setup(e, { emit: l }) {
|
|
197
|
+
const t = e, r = l;
|
|
198
|
+
_();
|
|
199
|
+
const {
|
|
200
|
+
loading: o,
|
|
201
|
+
options: m,
|
|
202
|
+
loadData: h
|
|
203
|
+
} = Ze({
|
|
204
|
+
apiUrl: u(),
|
|
205
|
+
pageNumKey: "pageNum",
|
|
206
|
+
pageSizeKey: "pageSize",
|
|
207
|
+
pageSize: t.pageSize,
|
|
208
|
+
searchKey: t.searchKey,
|
|
209
|
+
extraParams: C(),
|
|
210
|
+
labelField: t.labelField,
|
|
211
|
+
valueField: t.valueField
|
|
212
|
+
});
|
|
213
|
+
function u() {
|
|
214
|
+
return t.apiUrl ? t.apiUrl : "/api/system/dict/data/list";
|
|
215
|
+
}
|
|
216
|
+
function C() {
|
|
217
|
+
const b = { ...t.extraParams || {} };
|
|
218
|
+
return t.dictCode && !t.apiUrl && (b.dictCode = t.dictCode), b;
|
|
30
219
|
}
|
|
31
|
-
|
|
220
|
+
const g = V(() => t.options ? t.options : m.value.map((b) => ({
|
|
221
|
+
value: b[t.valueField],
|
|
222
|
+
label: b[t.labelField],
|
|
223
|
+
disabled: b.disabled ?? !1
|
|
224
|
+
})));
|
|
225
|
+
return Z(() => {
|
|
226
|
+
t.options || h(void 0, !0);
|
|
227
|
+
}), (b, n) => (i(), w(a(ue), I(b.$attrs, {
|
|
32
228
|
"model-value": e.modelValue,
|
|
33
|
-
loading:
|
|
229
|
+
loading: a(o),
|
|
230
|
+
multiple: e.mode === "multiple",
|
|
231
|
+
placeholder: e.placeholder,
|
|
232
|
+
clearable: e.clearable,
|
|
233
|
+
disabled: e.disabled,
|
|
234
|
+
readonly: e.readonly,
|
|
235
|
+
filterable: e.filterable,
|
|
34
236
|
size: e.size,
|
|
35
|
-
"onUpdate:modelValue":
|
|
36
|
-
onChange:
|
|
37
|
-
onClear:
|
|
38
|
-
|
|
39
|
-
|
|
237
|
+
"onUpdate:modelValue": n[0] || (n[0] = (d) => r("update:modelValue", d)),
|
|
238
|
+
onChange: n[1] || (n[1] = (d) => r("change", d)),
|
|
239
|
+
onClear: n[2] || (n[2] = (d) => r("clear")),
|
|
240
|
+
onBlur: n[3] || (n[3] = (d) => r("blur", d)),
|
|
241
|
+
onFocus: n[4] || (n[4] = (d) => r("focus", d))
|
|
40
242
|
}), {
|
|
41
|
-
default:
|
|
42
|
-
(i(!0), D(
|
|
43
|
-
key:
|
|
44
|
-
label:
|
|
45
|
-
value:
|
|
46
|
-
disabled:
|
|
243
|
+
default: v(() => [
|
|
244
|
+
(i(!0), D(O, null, K(g.value, (d) => (i(), w(a(de), {
|
|
245
|
+
key: d.value,
|
|
246
|
+
label: d.label,
|
|
247
|
+
value: d.value,
|
|
248
|
+
disabled: d.disabled
|
|
47
249
|
}, null, 8, ["label", "value", "disabled"]))), 128))
|
|
48
250
|
]),
|
|
49
251
|
_: 1
|
|
50
|
-
}, 16, ["model-value", "loading", "size"]));
|
|
252
|
+
}, 16, ["model-value", "loading", "multiple", "placeholder", "clearable", "disabled", "readonly", "filterable", "size"]));
|
|
51
253
|
}
|
|
52
254
|
});
|
|
53
|
-
|
|
54
|
-
e.component(
|
|
255
|
+
$e.install = (e) => {
|
|
256
|
+
e.component($e.name ?? "EeDictSelect", $e);
|
|
55
257
|
};
|
|
56
|
-
const
|
|
258
|
+
const Me = /* @__PURE__ */ H({
|
|
57
259
|
name: "EeStatusTag",
|
|
58
260
|
__name: "index",
|
|
59
261
|
props: {
|
|
@@ -64,17 +266,17 @@ const oe = /* @__PURE__ */ K({
|
|
|
64
266
|
defaultEffect: { default: "light" }
|
|
65
267
|
},
|
|
66
268
|
setup(e) {
|
|
67
|
-
const
|
|
68
|
-
return (
|
|
69
|
-
var m,
|
|
70
|
-
return i(),
|
|
71
|
-
type: ((m =
|
|
72
|
-
effect: ((
|
|
269
|
+
const l = e, t = V(() => l.mapping.find((r) => r.value === l.value));
|
|
270
|
+
return (r, o) => {
|
|
271
|
+
var m, h;
|
|
272
|
+
return i(), w(a(Dl), I(r.$attrs, {
|
|
273
|
+
type: ((m = t.value) == null ? void 0 : m.type) ?? e.defaultType,
|
|
274
|
+
effect: ((h = t.value) == null ? void 0 : h.effect) ?? e.defaultEffect
|
|
73
275
|
}), {
|
|
74
|
-
default:
|
|
75
|
-
var
|
|
276
|
+
default: v(() => {
|
|
277
|
+
var u;
|
|
76
278
|
return [
|
|
77
|
-
|
|
279
|
+
M(F(((u = t.value) == null ? void 0 : u.label) ?? e.fallbackLabel ?? e.value), 1)
|
|
78
280
|
];
|
|
79
281
|
}),
|
|
80
282
|
_: 1
|
|
@@ -82,10 +284,10 @@ const oe = /* @__PURE__ */ K({
|
|
|
82
284
|
};
|
|
83
285
|
}
|
|
84
286
|
});
|
|
85
|
-
|
|
86
|
-
e.component(
|
|
287
|
+
Me.install = (e) => {
|
|
288
|
+
e.component(Me.name ?? "EeStatusTag", Me);
|
|
87
289
|
};
|
|
88
|
-
const
|
|
290
|
+
const Ml = { class: "ee-search-bar" }, Il = /* @__PURE__ */ H({
|
|
89
291
|
name: "EeSearchBar",
|
|
90
292
|
__name: "index",
|
|
91
293
|
props: {
|
|
@@ -98,125 +300,125 @@ const Pa = { class: "ee-search-bar" }, xa = /* @__PURE__ */ K({
|
|
|
98
300
|
size: { default: "default" }
|
|
99
301
|
},
|
|
100
302
|
emits: ["update:modelValue", "search", "reset"],
|
|
101
|
-
setup(e, { emit:
|
|
102
|
-
const
|
|
103
|
-
const
|
|
104
|
-
return
|
|
105
|
-
}),
|
|
106
|
-
function k() {
|
|
107
|
-
a("search", { ...l.modelValue });
|
|
108
|
-
}
|
|
303
|
+
setup(e, { emit: l }) {
|
|
304
|
+
const { t } = _(), r = e, o = l, m = A(), h = A(!1), u = V(() => {
|
|
305
|
+
const d = 24 - C.value.reduce((s, p) => s + (p.span ?? 6), 0) % 24;
|
|
306
|
+
return d === 24 ? 6 : d;
|
|
307
|
+
}), C = V(() => !r.collapsible || h.value ? r.fields : r.fields.slice(0, r.collapsedCount));
|
|
109
308
|
function g() {
|
|
110
|
-
|
|
111
|
-
l.fields.forEach((u) => {
|
|
112
|
-
o[u.prop] = "";
|
|
113
|
-
}), a("update:modelValue", o), a("reset");
|
|
309
|
+
o("search", { ...r.modelValue });
|
|
114
310
|
}
|
|
115
|
-
|
|
116
|
-
|
|
311
|
+
function b() {
|
|
312
|
+
const n = {};
|
|
313
|
+
r.fields.forEach((d) => {
|
|
314
|
+
n[d.prop] = "";
|
|
315
|
+
}), o("update:modelValue", n), o("reset");
|
|
316
|
+
}
|
|
317
|
+
return (n, d) => (i(), D("div", Ml, [
|
|
318
|
+
T(a(Ye), I({
|
|
117
319
|
ref_key: "formRef",
|
|
118
|
-
ref:
|
|
320
|
+
ref: m,
|
|
119
321
|
model: e.modelValue,
|
|
120
322
|
inline: e.inline,
|
|
121
323
|
"label-width": e.labelWidth,
|
|
122
324
|
size: e.size
|
|
123
|
-
},
|
|
124
|
-
default:
|
|
125
|
-
|
|
126
|
-
default:
|
|
127
|
-
(i(!0), D(
|
|
128
|
-
key:
|
|
129
|
-
span:
|
|
325
|
+
}, n.$attrs), {
|
|
326
|
+
default: v(() => [
|
|
327
|
+
T(a(Je), null, {
|
|
328
|
+
default: v(() => [
|
|
329
|
+
(i(!0), D(O, null, K(C.value, (s) => (i(), w(a(xe), {
|
|
330
|
+
key: s.prop,
|
|
331
|
+
span: s.span ?? 6
|
|
130
332
|
}, {
|
|
131
|
-
default:
|
|
132
|
-
|
|
133
|
-
label:
|
|
134
|
-
prop:
|
|
333
|
+
default: v(() => [
|
|
334
|
+
T(a(ze), {
|
|
335
|
+
label: s.label,
|
|
336
|
+
prop: s.prop
|
|
135
337
|
}, {
|
|
136
|
-
default:
|
|
137
|
-
(
|
|
338
|
+
default: v(() => [
|
|
339
|
+
(s.type ?? "input") === "input" ? (i(), w(a(ge), {
|
|
138
340
|
key: 0,
|
|
139
|
-
modelValue: e.modelValue[
|
|
140
|
-
"onUpdate:modelValue": (
|
|
141
|
-
placeholder:
|
|
341
|
+
modelValue: e.modelValue[s.prop],
|
|
342
|
+
"onUpdate:modelValue": (p) => e.modelValue[s.prop] = p,
|
|
343
|
+
placeholder: s.placeholder ?? a(t)("searchBar", "inputPlaceholder", { label: s.label }),
|
|
142
344
|
clearable: ""
|
|
143
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) :
|
|
345
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : s.type === "select" ? (i(), w(a(ue), {
|
|
144
346
|
key: 1,
|
|
145
|
-
modelValue: e.modelValue[
|
|
146
|
-
"onUpdate:modelValue": (
|
|
147
|
-
placeholder:
|
|
347
|
+
modelValue: e.modelValue[s.prop],
|
|
348
|
+
"onUpdate:modelValue": (p) => e.modelValue[s.prop] = p,
|
|
349
|
+
placeholder: s.placeholder ?? a(t)("searchBar", "selectPlaceholder", { label: s.label }),
|
|
148
350
|
clearable: ""
|
|
149
351
|
}, {
|
|
150
|
-
default:
|
|
151
|
-
(i(!0), D(
|
|
152
|
-
key:
|
|
153
|
-
label:
|
|
154
|
-
value:
|
|
352
|
+
default: v(() => [
|
|
353
|
+
(i(!0), D(O, null, K(s.options ?? [], (p) => (i(), w(a(de), {
|
|
354
|
+
key: p.value,
|
|
355
|
+
label: p.label,
|
|
356
|
+
value: p.value
|
|
155
357
|
}, null, 8, ["label", "value"]))), 128))
|
|
156
358
|
]),
|
|
157
359
|
_: 2
|
|
158
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) :
|
|
360
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) : s.type === "date" ? (i(), w(a(ve), {
|
|
159
361
|
key: 2,
|
|
160
|
-
modelValue: e.modelValue[
|
|
161
|
-
"onUpdate:modelValue": (
|
|
162
|
-
placeholder:
|
|
362
|
+
modelValue: e.modelValue[s.prop],
|
|
363
|
+
"onUpdate:modelValue": (p) => e.modelValue[s.prop] = p,
|
|
364
|
+
placeholder: s.placeholder ?? a(t)("searchBar", "selectPlaceholder", { label: s.label }),
|
|
163
365
|
style: { width: "100%" }
|
|
164
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) :
|
|
366
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : s.type === "date-range" ? (i(), w(a(ve), {
|
|
165
367
|
key: 3,
|
|
166
|
-
modelValue: e.modelValue[
|
|
167
|
-
"onUpdate:modelValue": (
|
|
368
|
+
modelValue: e.modelValue[s.prop],
|
|
369
|
+
"onUpdate:modelValue": (p) => e.modelValue[s.prop] = p,
|
|
168
370
|
type: "daterange",
|
|
169
|
-
"range-separator":
|
|
170
|
-
"start-placeholder":
|
|
171
|
-
"end-placeholder":
|
|
371
|
+
"range-separator": a(t)("searchBar", "dateRangeTo"),
|
|
372
|
+
"start-placeholder": a(t)("searchBar", "dateRangeStart"),
|
|
373
|
+
"end-placeholder": a(t)("searchBar", "dateRangeEnd"),
|
|
172
374
|
style: { width: "100%" }
|
|
173
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) :
|
|
375
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : s.component ? (i(), w(Fa(s.component), {
|
|
174
376
|
key: 4,
|
|
175
|
-
modelValue: e.modelValue[
|
|
176
|
-
"onUpdate:modelValue": (
|
|
177
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])) :
|
|
377
|
+
modelValue: e.modelValue[s.prop],
|
|
378
|
+
"onUpdate:modelValue": (p) => e.modelValue[s.prop] = p
|
|
379
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : L("", !0)
|
|
178
380
|
]),
|
|
179
381
|
_: 2
|
|
180
382
|
}, 1032, ["label", "prop"])
|
|
181
383
|
]),
|
|
182
384
|
_: 2
|
|
183
385
|
}, 1032, ["span"]))), 128)),
|
|
184
|
-
|
|
185
|
-
default:
|
|
186
|
-
|
|
187
|
-
default:
|
|
188
|
-
|
|
386
|
+
T(a(xe), { span: u.value }, {
|
|
387
|
+
default: v(() => [
|
|
388
|
+
T(a(ze), null, {
|
|
389
|
+
default: v(() => [
|
|
390
|
+
T(a(q), {
|
|
189
391
|
type: "primary",
|
|
190
392
|
size: e.size,
|
|
191
393
|
round: "",
|
|
192
|
-
onClick:
|
|
394
|
+
onClick: g
|
|
193
395
|
}, {
|
|
194
|
-
default:
|
|
195
|
-
|
|
196
|
-
])
|
|
396
|
+
default: v(() => [
|
|
397
|
+
M(F(a(t)("searchBar", "search")), 1)
|
|
398
|
+
]),
|
|
197
399
|
_: 1
|
|
198
400
|
}, 8, ["size"]),
|
|
199
|
-
|
|
401
|
+
T(a(q), {
|
|
200
402
|
size: e.size,
|
|
201
403
|
round: "",
|
|
202
|
-
onClick:
|
|
404
|
+
onClick: b
|
|
203
405
|
}, {
|
|
204
|
-
default:
|
|
205
|
-
|
|
206
|
-
])
|
|
406
|
+
default: v(() => [
|
|
407
|
+
M(F(a(t)("searchBar", "reset")), 1)
|
|
408
|
+
]),
|
|
207
409
|
_: 1
|
|
208
410
|
}, 8, ["size"]),
|
|
209
|
-
e.collapsible && e.fields.length > e.collapsedCount ? (i(),
|
|
411
|
+
e.collapsible && e.fields.length > e.collapsedCount ? (i(), w(a(q), {
|
|
210
412
|
key: 0,
|
|
211
413
|
text: "",
|
|
212
414
|
size: e.size,
|
|
213
|
-
onClick:
|
|
415
|
+
onClick: d[0] || (d[0] = (s) => h.value = !h.value)
|
|
214
416
|
}, {
|
|
215
|
-
default:
|
|
216
|
-
|
|
417
|
+
default: v(() => [
|
|
418
|
+
M(F(h.value ? a(t)("searchBar", "collapse") : a(t)("searchBar", "expand")), 1)
|
|
217
419
|
]),
|
|
218
420
|
_: 1
|
|
219
|
-
}, 8, ["size"])) :
|
|
421
|
+
}, 8, ["size"])) : L("", !0)
|
|
220
422
|
]),
|
|
221
423
|
_: 1
|
|
222
424
|
})
|
|
@@ -231,21 +433,21 @@ const Pa = { class: "ee-search-bar" }, xa = /* @__PURE__ */ K({
|
|
|
231
433
|
}, 16, ["model", "inline", "label-width", "size"])
|
|
232
434
|
]));
|
|
233
435
|
}
|
|
234
|
-
}),
|
|
235
|
-
const
|
|
236
|
-
for (const [
|
|
237
|
-
|
|
238
|
-
return
|
|
239
|
-
},
|
|
240
|
-
|
|
241
|
-
e.component(
|
|
436
|
+
}), De = (e, l) => {
|
|
437
|
+
const t = e.__vccOpts || e;
|
|
438
|
+
for (const [r, o] of l)
|
|
439
|
+
t[r] = o;
|
|
440
|
+
return t;
|
|
441
|
+
}, Ie = /* @__PURE__ */ De(Il, [["__scopeId", "data-v-fe481020"]]);
|
|
442
|
+
Ie.install = (e) => {
|
|
443
|
+
e.component(Ie.name ?? "EeSearchBar", Ie);
|
|
242
444
|
};
|
|
243
|
-
const
|
|
445
|
+
const Ol = { class: "ee-form-dialog-footer" }, Ll = /* @__PURE__ */ H({
|
|
244
446
|
name: "EeFormDialog",
|
|
245
447
|
__name: "index",
|
|
246
448
|
props: {
|
|
247
449
|
modelValue: { type: Boolean },
|
|
248
|
-
title: { default: "
|
|
450
|
+
title: { default: "" },
|
|
249
451
|
formData: {},
|
|
250
452
|
fields: {},
|
|
251
453
|
rules: {},
|
|
@@ -255,10 +457,10 @@ const Ta = { class: "ee-form-dialog-footer" }, Ua = /* @__PURE__ */ K({
|
|
|
255
457
|
size: { default: "default" }
|
|
256
458
|
},
|
|
257
459
|
emits: ["update:modelValue", "submit", "cancel"],
|
|
258
|
-
setup(e, { emit:
|
|
259
|
-
const
|
|
260
|
-
const
|
|
261
|
-
for (const
|
|
460
|
+
setup(e, { emit: l }) {
|
|
461
|
+
const { t } = _(), r = e, o = l, m = A(), h = V(() => {
|
|
462
|
+
const g = {};
|
|
463
|
+
for (const b of Object.keys(r))
|
|
262
464
|
[
|
|
263
465
|
"modelValue",
|
|
264
466
|
"title",
|
|
@@ -268,150 +470,150 @@ const Ta = { class: "ee-form-dialog-footer" }, Ua = /* @__PURE__ */ K({
|
|
|
268
470
|
"width",
|
|
269
471
|
"labelWidth",
|
|
270
472
|
"loading"
|
|
271
|
-
].includes(
|
|
272
|
-
return
|
|
473
|
+
].includes(b) || (g[b] = r[b]);
|
|
474
|
+
return g;
|
|
273
475
|
});
|
|
274
|
-
function
|
|
275
|
-
|
|
476
|
+
function u() {
|
|
477
|
+
o("update:modelValue", !1), o("cancel");
|
|
276
478
|
}
|
|
277
|
-
async function
|
|
278
|
-
if (
|
|
479
|
+
async function C() {
|
|
480
|
+
if (m.value)
|
|
279
481
|
try {
|
|
280
|
-
await
|
|
482
|
+
await m.value.validate(), o("submit", { ...r.formData });
|
|
281
483
|
} catch {
|
|
282
484
|
}
|
|
283
485
|
}
|
|
284
|
-
return (
|
|
486
|
+
return (g, b) => (i(), w(a(Ua), I(g.$attrs, {
|
|
285
487
|
"model-value": e.modelValue,
|
|
286
488
|
title: e.title,
|
|
287
489
|
width: e.width,
|
|
288
|
-
"onUpdate:modelValue":
|
|
289
|
-
onClose:
|
|
490
|
+
"onUpdate:modelValue": b[0] || (b[0] = (n) => o("update:modelValue", n)),
|
|
491
|
+
onClose: u
|
|
290
492
|
}), {
|
|
291
|
-
footer:
|
|
292
|
-
|
|
293
|
-
|
|
493
|
+
footer: v(() => [
|
|
494
|
+
N("span", Ol, [
|
|
495
|
+
T(a(q), {
|
|
294
496
|
size: e.size,
|
|
295
497
|
round: "",
|
|
296
|
-
onClick:
|
|
498
|
+
onClick: u
|
|
297
499
|
}, {
|
|
298
|
-
default:
|
|
299
|
-
|
|
300
|
-
])
|
|
500
|
+
default: v(() => [
|
|
501
|
+
M(F(a(t)("formDialog", "cancel")), 1)
|
|
502
|
+
]),
|
|
301
503
|
_: 1
|
|
302
504
|
}, 8, ["size"]),
|
|
303
|
-
|
|
505
|
+
T(a(q), {
|
|
304
506
|
type: "primary",
|
|
305
507
|
size: e.size,
|
|
306
508
|
round: "",
|
|
307
509
|
loading: e.loading,
|
|
308
|
-
onClick:
|
|
510
|
+
onClick: C
|
|
309
511
|
}, {
|
|
310
|
-
default:
|
|
311
|
-
|
|
312
|
-
])
|
|
512
|
+
default: v(() => [
|
|
513
|
+
M(F(a(t)("formDialog", "confirm")), 1)
|
|
514
|
+
]),
|
|
313
515
|
_: 1
|
|
314
516
|
}, 8, ["size", "loading"])
|
|
315
517
|
])
|
|
316
518
|
]),
|
|
317
|
-
default:
|
|
318
|
-
|
|
519
|
+
default: v(() => [
|
|
520
|
+
T(a(Ye), I({
|
|
319
521
|
ref_key: "formRef",
|
|
320
|
-
ref:
|
|
522
|
+
ref: m,
|
|
321
523
|
model: e.formData,
|
|
322
524
|
rules: e.rules,
|
|
323
525
|
"label-width": e.labelWidth,
|
|
324
526
|
size: e.size
|
|
325
|
-
},
|
|
326
|
-
default:
|
|
327
|
-
|
|
328
|
-
default:
|
|
329
|
-
(i(!0), D(
|
|
330
|
-
key:
|
|
331
|
-
span:
|
|
527
|
+
}, h.value), {
|
|
528
|
+
default: v(() => [
|
|
529
|
+
T(a(Je), { gutter: 20 }, {
|
|
530
|
+
default: v(() => [
|
|
531
|
+
(i(!0), D(O, null, K(e.fields, (n) => (i(), w(a(xe), {
|
|
532
|
+
key: n.prop,
|
|
533
|
+
span: n.span ?? 24
|
|
332
534
|
}, {
|
|
333
|
-
default:
|
|
334
|
-
|
|
335
|
-
label:
|
|
336
|
-
prop:
|
|
535
|
+
default: v(() => [
|
|
536
|
+
T(a(ze), {
|
|
537
|
+
label: n.label,
|
|
538
|
+
prop: n.prop
|
|
337
539
|
}, {
|
|
338
|
-
default:
|
|
339
|
-
(
|
|
540
|
+
default: v(() => [
|
|
541
|
+
(n.type ?? "input") === "input" ? (i(), w(a(ge), {
|
|
340
542
|
key: 0,
|
|
341
|
-
modelValue: e.formData[
|
|
342
|
-
"onUpdate:modelValue": (
|
|
343
|
-
placeholder:
|
|
344
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) :
|
|
543
|
+
modelValue: e.formData[n.prop],
|
|
544
|
+
"onUpdate:modelValue": (d) => e.formData[n.prop] = d,
|
|
545
|
+
placeholder: n.placeholder ?? a(t)("formDialog", "inputPlaceholder", { label: n.label })
|
|
546
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.type === "textarea" ? (i(), w(a(ge), {
|
|
345
547
|
key: 1,
|
|
346
|
-
modelValue: e.formData[
|
|
347
|
-
"onUpdate:modelValue": (
|
|
548
|
+
modelValue: e.formData[n.prop],
|
|
549
|
+
"onUpdate:modelValue": (d) => e.formData[n.prop] = d,
|
|
348
550
|
type: "textarea",
|
|
349
|
-
placeholder:
|
|
551
|
+
placeholder: n.placeholder ?? a(t)("formDialog", "textareaPlaceholder", { label: n.label }),
|
|
350
552
|
rows: 3
|
|
351
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) :
|
|
553
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.type === "select" ? (i(), w(a(ue), {
|
|
352
554
|
key: 2,
|
|
353
|
-
modelValue: e.formData[
|
|
354
|
-
"onUpdate:modelValue": (
|
|
355
|
-
placeholder:
|
|
555
|
+
modelValue: e.formData[n.prop],
|
|
556
|
+
"onUpdate:modelValue": (d) => e.formData[n.prop] = d,
|
|
557
|
+
placeholder: n.placeholder ?? a(t)("formDialog", "selectPlaceholder", { label: n.label }),
|
|
356
558
|
style: { width: "100%" }
|
|
357
559
|
}, {
|
|
358
|
-
default:
|
|
359
|
-
(i(!0), D(
|
|
360
|
-
key:
|
|
361
|
-
label:
|
|
362
|
-
value:
|
|
560
|
+
default: v(() => [
|
|
561
|
+
(i(!0), D(O, null, K(n.options ?? [], (d) => (i(), w(a(de), {
|
|
562
|
+
key: d.value,
|
|
563
|
+
label: d.label,
|
|
564
|
+
value: d.value
|
|
363
565
|
}, null, 8, ["label", "value"]))), 128))
|
|
364
566
|
]),
|
|
365
567
|
_: 2
|
|
366
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) :
|
|
568
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.type === "radio" ? (i(), w(a(ca), {
|
|
367
569
|
key: 3,
|
|
368
|
-
modelValue: e.formData[
|
|
369
|
-
"onUpdate:modelValue": (
|
|
570
|
+
modelValue: e.formData[n.prop],
|
|
571
|
+
"onUpdate:modelValue": (d) => e.formData[n.prop] = d
|
|
370
572
|
}, {
|
|
371
|
-
default:
|
|
372
|
-
(i(!0), D(
|
|
373
|
-
key:
|
|
374
|
-
label:
|
|
573
|
+
default: v(() => [
|
|
574
|
+
(i(!0), D(O, null, K(n.options ?? [], (d) => (i(), w(a(Qe), {
|
|
575
|
+
key: d.value,
|
|
576
|
+
label: d.value
|
|
375
577
|
}, {
|
|
376
|
-
default:
|
|
377
|
-
|
|
578
|
+
default: v(() => [
|
|
579
|
+
M(F(d.label), 1)
|
|
378
580
|
]),
|
|
379
581
|
_: 2
|
|
380
582
|
}, 1032, ["label"]))), 128))
|
|
381
583
|
]),
|
|
382
584
|
_: 2
|
|
383
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) :
|
|
585
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : n.type === "checkbox" ? (i(), w(a(fa), {
|
|
384
586
|
key: 4,
|
|
385
|
-
modelValue: e.formData[
|
|
386
|
-
"onUpdate:modelValue": (
|
|
587
|
+
modelValue: e.formData[n.prop],
|
|
588
|
+
"onUpdate:modelValue": (d) => e.formData[n.prop] = d
|
|
387
589
|
}, {
|
|
388
|
-
default:
|
|
389
|
-
(i(!0), D(
|
|
390
|
-
key:
|
|
391
|
-
label:
|
|
590
|
+
default: v(() => [
|
|
591
|
+
(i(!0), D(O, null, K(n.options ?? [], (d) => (i(), w(a(Ce), {
|
|
592
|
+
key: d.value,
|
|
593
|
+
label: d.value
|
|
392
594
|
}, {
|
|
393
|
-
default:
|
|
394
|
-
|
|
595
|
+
default: v(() => [
|
|
596
|
+
M(F(d.label), 1)
|
|
395
597
|
]),
|
|
396
598
|
_: 2
|
|
397
599
|
}, 1032, ["label"]))), 128))
|
|
398
600
|
]),
|
|
399
601
|
_: 2
|
|
400
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) :
|
|
602
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : n.type === "switch" ? (i(), w(a($a), {
|
|
401
603
|
key: 5,
|
|
402
|
-
modelValue: e.formData[
|
|
403
|
-
"onUpdate:modelValue": (
|
|
404
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])) :
|
|
604
|
+
modelValue: e.formData[n.prop],
|
|
605
|
+
"onUpdate:modelValue": (d) => e.formData[n.prop] = d
|
|
606
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : n.type === "date" ? (i(), w(a(ve), {
|
|
405
607
|
key: 6,
|
|
406
|
-
modelValue: e.formData[
|
|
407
|
-
"onUpdate:modelValue": (
|
|
408
|
-
placeholder:
|
|
608
|
+
modelValue: e.formData[n.prop],
|
|
609
|
+
"onUpdate:modelValue": (d) => e.formData[n.prop] = d,
|
|
610
|
+
placeholder: n.placeholder ?? a(t)("formDialog", "datePickerPlaceholder", { label: n.label }),
|
|
409
611
|
style: { width: "100%" }
|
|
410
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) :
|
|
612
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.component ? (i(), w(Fa(n.component), {
|
|
411
613
|
key: 7,
|
|
412
|
-
modelValue: e.formData[
|
|
413
|
-
"onUpdate:modelValue": (
|
|
414
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])) :
|
|
614
|
+
modelValue: e.formData[n.prop],
|
|
615
|
+
"onUpdate:modelValue": (d) => e.formData[n.prop] = d
|
|
616
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : L("", !0)
|
|
415
617
|
]),
|
|
416
618
|
_: 2
|
|
417
619
|
}, 1032, ["label", "prop"])
|
|
@@ -428,42 +630,153 @@ const Ta = { class: "ee-form-dialog-footer" }, Ua = /* @__PURE__ */ K({
|
|
|
428
630
|
_: 1
|
|
429
631
|
}, 16, ["model-value", "title", "width"]));
|
|
430
632
|
}
|
|
431
|
-
}),
|
|
432
|
-
|
|
433
|
-
e.component(
|
|
633
|
+
}), Oe = /* @__PURE__ */ De(Ll, [["__scopeId", "data-v-929d8568"]]);
|
|
634
|
+
Oe.install = (e) => {
|
|
635
|
+
e.component(Oe.name ?? "EeFormDialog", Oe);
|
|
434
636
|
};
|
|
435
|
-
|
|
637
|
+
/*! Element Plus Icons Vue v2.3.2 */
|
|
638
|
+
var Nl = /* @__PURE__ */ H({
|
|
639
|
+
name: "Delete",
|
|
640
|
+
__name: "delete",
|
|
641
|
+
setup(e) {
|
|
642
|
+
return (l, t) => (i(), D("svg", {
|
|
643
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
644
|
+
viewBox: "0 0 1024 1024"
|
|
645
|
+
}, [
|
|
646
|
+
N("path", {
|
|
647
|
+
fill: "currentColor",
|
|
648
|
+
d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"
|
|
649
|
+
})
|
|
650
|
+
]));
|
|
651
|
+
}
|
|
652
|
+
}), Kl = Nl, ql = /* @__PURE__ */ H({
|
|
653
|
+
name: "Edit",
|
|
654
|
+
__name: "edit",
|
|
655
|
+
setup(e) {
|
|
656
|
+
return (l, t) => (i(), D("svg", {
|
|
657
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
658
|
+
viewBox: "0 0 1024 1024"
|
|
659
|
+
}, [
|
|
660
|
+
N("path", {
|
|
661
|
+
fill: "currentColor",
|
|
662
|
+
d: "M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"
|
|
663
|
+
}),
|
|
664
|
+
N("path", {
|
|
665
|
+
fill: "currentColor",
|
|
666
|
+
d: "m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"
|
|
667
|
+
})
|
|
668
|
+
]));
|
|
669
|
+
}
|
|
670
|
+
}), Hl = ql, Wl = /* @__PURE__ */ H({
|
|
671
|
+
name: "MoreFilled",
|
|
672
|
+
__name: "more-filled",
|
|
673
|
+
setup(e) {
|
|
674
|
+
return (l, t) => (i(), D("svg", {
|
|
675
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
676
|
+
viewBox: "0 0 1024 1024"
|
|
677
|
+
}, [
|
|
678
|
+
N("path", {
|
|
679
|
+
fill: "currentColor",
|
|
680
|
+
d: "M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"
|
|
681
|
+
})
|
|
682
|
+
]));
|
|
683
|
+
}
|
|
684
|
+
}), jl = Wl, Gl = /* @__PURE__ */ H({
|
|
685
|
+
name: "Rank",
|
|
686
|
+
__name: "rank",
|
|
687
|
+
setup(e) {
|
|
688
|
+
return (l, t) => (i(), D("svg", {
|
|
689
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
690
|
+
viewBox: "0 0 1024 1024"
|
|
691
|
+
}, [
|
|
692
|
+
N("path", {
|
|
693
|
+
fill: "currentColor",
|
|
694
|
+
d: "m186.496 544 41.408 41.344a32 32 0 1 1-45.248 45.312l-96-96a32 32 0 0 1 0-45.312l96-96a32 32 0 1 1 45.248 45.312L186.496 480h290.816V186.432l-41.472 41.472a32 32 0 1 1-45.248-45.184l96-96.128a32 32 0 0 1 45.312 0l96 96.064a32 32 0 0 1-45.248 45.184l-41.344-41.28V480H832l-41.344-41.344a32 32 0 0 1 45.248-45.312l96 96a32 32 0 0 1 0 45.312l-96 96a32 32 0 0 1-45.248-45.312L832 544H541.312v293.44l41.344-41.28a32 32 0 1 1 45.248 45.248l-96 96a32 32 0 0 1-45.312 0l-96-96a32 32 0 1 1 45.312-45.248l41.408 41.408V544z"
|
|
695
|
+
})
|
|
696
|
+
]));
|
|
697
|
+
}
|
|
698
|
+
}), Xl = Gl, Yl = /* @__PURE__ */ H({
|
|
699
|
+
name: "Refresh",
|
|
700
|
+
__name: "refresh",
|
|
701
|
+
setup(e) {
|
|
702
|
+
return (l, t) => (i(), D("svg", {
|
|
703
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
704
|
+
viewBox: "0 0 1024 1024"
|
|
705
|
+
}, [
|
|
706
|
+
N("path", {
|
|
707
|
+
fill: "currentColor",
|
|
708
|
+
d: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"
|
|
709
|
+
})
|
|
710
|
+
]));
|
|
711
|
+
}
|
|
712
|
+
}), Jl = Yl, Ql = /* @__PURE__ */ H({
|
|
713
|
+
name: "Setting",
|
|
714
|
+
__name: "setting",
|
|
715
|
+
setup(e) {
|
|
716
|
+
return (l, t) => (i(), D("svg", {
|
|
717
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
718
|
+
viewBox: "0 0 1024 1024"
|
|
719
|
+
}, [
|
|
720
|
+
N("path", {
|
|
721
|
+
fill: "currentColor",
|
|
722
|
+
d: "M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357 357 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a352 352 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357 357 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294 294 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293 293 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294 294 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288 288 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293 293 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a288 288 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"
|
|
723
|
+
})
|
|
724
|
+
]));
|
|
725
|
+
}
|
|
726
|
+
}), Zl = Ql, _l = /* @__PURE__ */ H({
|
|
727
|
+
name: "View",
|
|
728
|
+
__name: "view",
|
|
729
|
+
setup(e) {
|
|
730
|
+
return (l, t) => (i(), D("svg", {
|
|
731
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
732
|
+
viewBox: "0 0 1024 1024"
|
|
733
|
+
}, [
|
|
734
|
+
N("path", {
|
|
735
|
+
fill: "currentColor",
|
|
736
|
+
d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"
|
|
737
|
+
})
|
|
738
|
+
]));
|
|
739
|
+
}
|
|
740
|
+
}), et = _l;
|
|
741
|
+
const Na = [10, 20, 50, 100], at = "total, sizes, prev, pager, next, jumper", Va = {
|
|
436
742
|
show: !0,
|
|
437
743
|
cols: 3,
|
|
438
744
|
maxRow: 2,
|
|
439
745
|
foldable: !0,
|
|
440
746
|
foldDefault: !0
|
|
441
|
-
},
|
|
747
|
+
}, ka = { show: !1 }, lt = {
|
|
442
748
|
show: !0,
|
|
443
749
|
pageSize: 20,
|
|
444
|
-
pageSizes:
|
|
750
|
+
pageSizes: Na,
|
|
445
751
|
background: !0
|
|
446
|
-
},
|
|
752
|
+
}, tt = { show: !1 }, Ta = {
|
|
447
753
|
show: !0,
|
|
448
754
|
showView: !1,
|
|
449
755
|
showEdit: !0,
|
|
450
756
|
showDelete: !0,
|
|
757
|
+
showVersion: !1,
|
|
451
758
|
confirmDelete: !0,
|
|
452
|
-
deleteConfirmTitle: "
|
|
453
|
-
deleteConfirmMessage: "
|
|
454
|
-
|
|
759
|
+
deleteConfirmTitle: "",
|
|
760
|
+
deleteConfirmMessage: "",
|
|
761
|
+
buttonMode: "text",
|
|
762
|
+
maxButtons: 3
|
|
763
|
+
}, Ea = { show: !1 }, ot = {
|
|
455
764
|
show: !0,
|
|
456
765
|
showAdd: !1,
|
|
457
766
|
showImport: !1,
|
|
458
767
|
showExport: !1,
|
|
459
|
-
showBatchDelete: !1
|
|
460
|
-
|
|
768
|
+
showBatchDelete: !1,
|
|
769
|
+
showRefresh: !0
|
|
770
|
+
}, Pa = { show: !1 }, rt = {
|
|
461
771
|
mode: "drawer",
|
|
462
772
|
width: "40%",
|
|
463
773
|
closeOnReset: !0,
|
|
464
|
-
addTitle: "
|
|
465
|
-
editTitle: "
|
|
466
|
-
|
|
774
|
+
addTitle: "",
|
|
775
|
+
editTitle: "",
|
|
776
|
+
viewTitle: "",
|
|
777
|
+
formCols: 2,
|
|
778
|
+
formLabelWidth: "80px"
|
|
779
|
+
}, nt = [
|
|
467
780
|
"data",
|
|
468
781
|
"loading",
|
|
469
782
|
"size",
|
|
@@ -472,8 +785,9 @@ const Le = [10, 20, 50, 100], Fa = "total, sizes, prev, pager, next, jumper", Te
|
|
|
472
785
|
"height",
|
|
473
786
|
"max-height",
|
|
474
787
|
"highlight-current-row",
|
|
475
|
-
"row-key"
|
|
476
|
-
|
|
788
|
+
"row-key",
|
|
789
|
+
"readOnly"
|
|
790
|
+
], it = [
|
|
477
791
|
"prop",
|
|
478
792
|
"label",
|
|
479
793
|
"width",
|
|
@@ -482,356 +796,420 @@ const Le = [10, 20, 50, 100], Fa = "total, sizes, prev, pager, next, jumper", Te
|
|
|
482
796
|
"fixed",
|
|
483
797
|
"sortable",
|
|
484
798
|
"show",
|
|
799
|
+
"showTooltip",
|
|
485
800
|
"formatter",
|
|
486
801
|
"dictKey",
|
|
487
802
|
"slotName",
|
|
488
803
|
"search",
|
|
804
|
+
"form",
|
|
489
805
|
"auth",
|
|
490
806
|
"children",
|
|
491
807
|
"className"
|
|
492
808
|
];
|
|
493
|
-
function
|
|
494
|
-
const
|
|
495
|
-
function
|
|
496
|
-
return !
|
|
809
|
+
function st(e) {
|
|
810
|
+
const l = V(() => !!e.authChecker);
|
|
811
|
+
function t(r) {
|
|
812
|
+
return !r || !e.authChecker ? !0 : e.authChecker(r);
|
|
497
813
|
}
|
|
498
|
-
return { authPass:
|
|
814
|
+
return { authPass: t, authEnabled: l };
|
|
499
815
|
}
|
|
500
|
-
function
|
|
501
|
-
function
|
|
816
|
+
function ut(e) {
|
|
817
|
+
function l(r, o) {
|
|
502
818
|
var m;
|
|
503
|
-
return
|
|
819
|
+
return r || (o && ((m = e.dictMap) != null && m[o]) ? e.dictMap[o] : []);
|
|
504
820
|
}
|
|
505
|
-
function
|
|
506
|
-
var
|
|
507
|
-
if (!
|
|
508
|
-
const m = e.dictMap[
|
|
509
|
-
return (m == null ? void 0 : m.label) ?? String(
|
|
821
|
+
function t(r, o) {
|
|
822
|
+
var h;
|
|
823
|
+
if (!r || !((h = e.dictMap) != null && h[r])) return String(o ?? "");
|
|
824
|
+
const m = e.dictMap[r].find((u) => u.value === o);
|
|
825
|
+
return (m == null ? void 0 : m.label) ?? String(o ?? "");
|
|
510
826
|
}
|
|
511
|
-
return { resolvedDict:
|
|
827
|
+
return { resolvedDict: l, dictLabel: t };
|
|
512
828
|
}
|
|
513
|
-
function
|
|
514
|
-
const
|
|
829
|
+
function dt(e) {
|
|
830
|
+
const l = A(!0), t = Ra({}), r = V(() => e.searchConfig === !1 ? ka : e.searchConfig === !0 ? { ...Va } : e.searchConfig ? { ...Va, ...e.searchConfig } : ka), o = V(() => r.value.show), m = V(() => r.value.cols || 3), h = V(() => e.columns.filter((f) => {
|
|
515
831
|
var z;
|
|
516
|
-
return (z =
|
|
517
|
-
}).map((
|
|
518
|
-
const z =
|
|
832
|
+
return (z = f.search) == null ? void 0 : z.enable;
|
|
833
|
+
}).map((f) => {
|
|
834
|
+
const z = f.search;
|
|
519
835
|
return {
|
|
520
836
|
...z,
|
|
521
|
-
prop:
|
|
522
|
-
label:
|
|
523
|
-
field: z.field ||
|
|
524
|
-
placeholder: z.placeholder ||
|
|
525
|
-
dictKey:
|
|
837
|
+
prop: f.prop,
|
|
838
|
+
label: f.label,
|
|
839
|
+
field: z.field || f.prop,
|
|
840
|
+
placeholder: z.placeholder || f.label,
|
|
841
|
+
dictKey: f.dictKey,
|
|
526
842
|
props: z.props || {}
|
|
527
843
|
};
|
|
528
|
-
})),
|
|
529
|
-
() =>
|
|
844
|
+
})), u = V(() => r.value.maxRow || 2), C = V(() => m.value * u.value), g = V(
|
|
845
|
+
() => r.value.foldable !== !1 && h.value.length > C.value
|
|
530
846
|
);
|
|
531
|
-
|
|
532
|
-
|
|
847
|
+
Z(() => {
|
|
848
|
+
r.value.foldDefault !== !1 && (l.value = !1);
|
|
533
849
|
});
|
|
534
|
-
const
|
|
535
|
-
function
|
|
536
|
-
|
|
537
|
-
|
|
850
|
+
const b = V(() => !l.value && g.value ? h.value.slice(0, C.value) : h.value), n = V(() => 24 / m.value);
|
|
851
|
+
function d() {
|
|
852
|
+
h.value.forEach((f) => {
|
|
853
|
+
t[f.field] = f.defaultValue ?? "";
|
|
538
854
|
});
|
|
539
855
|
}
|
|
540
|
-
function
|
|
541
|
-
const
|
|
542
|
-
return
|
|
543
|
-
|
|
544
|
-
}),
|
|
856
|
+
function s() {
|
|
857
|
+
const f = {};
|
|
858
|
+
return h.value.forEach((z) => {
|
|
859
|
+
f[z.field] = z.defaultValue ?? "";
|
|
860
|
+
}), f;
|
|
545
861
|
}
|
|
546
|
-
function
|
|
547
|
-
const
|
|
548
|
-
for (const [z,
|
|
549
|
-
|
|
550
|
-
return
|
|
862
|
+
function p() {
|
|
863
|
+
const f = {};
|
|
864
|
+
for (const [z, U] of Object.entries(t))
|
|
865
|
+
U !== "" && U !== null && U !== void 0 && (f[z] = U);
|
|
866
|
+
return f;
|
|
551
867
|
}
|
|
552
|
-
function
|
|
553
|
-
Object.assign(
|
|
868
|
+
function c() {
|
|
869
|
+
Object.assign(t, s());
|
|
554
870
|
}
|
|
555
|
-
function
|
|
556
|
-
|
|
871
|
+
function k() {
|
|
872
|
+
l.value = !l.value;
|
|
557
873
|
}
|
|
558
874
|
return {
|
|
559
|
-
searchExpanded:
|
|
560
|
-
searchParams:
|
|
561
|
-
searchCfg:
|
|
562
|
-
showSearch:
|
|
875
|
+
searchExpanded: l,
|
|
876
|
+
searchParams: t,
|
|
877
|
+
searchCfg: r,
|
|
878
|
+
showSearch: o,
|
|
563
879
|
searchCols: m,
|
|
564
|
-
allSearchFields:
|
|
565
|
-
visibleSearchFields:
|
|
880
|
+
allSearchFields: h,
|
|
881
|
+
visibleSearchFields: b,
|
|
566
882
|
showFoldBtn: g,
|
|
567
|
-
actionColSpan:
|
|
568
|
-
initSearchParams:
|
|
569
|
-
getDefaultSearchParams:
|
|
570
|
-
getActiveSearchParams:
|
|
571
|
-
resetSearchParams:
|
|
572
|
-
toggleFold:
|
|
883
|
+
actionColSpan: n,
|
|
884
|
+
initSearchParams: d,
|
|
885
|
+
getDefaultSearchParams: s,
|
|
886
|
+
getActiveSearchParams: p,
|
|
887
|
+
resetSearchParams: c,
|
|
888
|
+
toggleFold: k
|
|
573
889
|
};
|
|
574
890
|
}
|
|
575
|
-
function
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
891
|
+
function ct(e) {
|
|
892
|
+
var s;
|
|
893
|
+
const t = ((s = he("eeGlobalConfig", {}).formTable) == null ? void 0 : s.pagination) || {}, r = {
|
|
894
|
+
...lt,
|
|
895
|
+
...t
|
|
896
|
+
}, o = Ra({ current: 1, pageSize: r.pageSize, total: 0 }), m = V(() => e.pagination === !1 ? tt : e.pagination === !0 ? { ...r } : e.pagination ? { ...r, ...e.pagination } : { ...r }), h = V(() => m.value.show !== !1), u = V(() => m.value.pageSizes || Na), C = V(
|
|
897
|
+
() => m.value.layout || at
|
|
898
|
+
), g = V(() => m.value.background !== !1);
|
|
899
|
+
Z(() => {
|
|
900
|
+
e.pagination && typeof e.pagination == "object" && (e.pagination.pageSize && (o.pageSize = e.pagination.pageSize), e.pagination.total !== void 0 && (o.total = e.pagination.total));
|
|
901
|
+
}), re(
|
|
582
902
|
() => e.pagination,
|
|
583
|
-
(
|
|
584
|
-
typeof
|
|
903
|
+
(p) => {
|
|
904
|
+
typeof p == "object" && p && (p.total !== void 0 && (o.total = p.total), p.pageSize && (o.pageSize = p.pageSize));
|
|
585
905
|
},
|
|
586
906
|
{ deep: !0 }
|
|
587
907
|
);
|
|
588
|
-
function
|
|
589
|
-
|
|
908
|
+
function b(p) {
|
|
909
|
+
o.current = p;
|
|
590
910
|
}
|
|
591
|
-
function
|
|
592
|
-
|
|
911
|
+
function n(p) {
|
|
912
|
+
o.pageSize = p;
|
|
593
913
|
}
|
|
594
|
-
function
|
|
595
|
-
|
|
914
|
+
function d() {
|
|
915
|
+
o.current = 1;
|
|
596
916
|
}
|
|
597
917
|
return {
|
|
598
|
-
pageState:
|
|
599
|
-
paginationCfg:
|
|
600
|
-
showPagination:
|
|
601
|
-
pageSizesComputed:
|
|
602
|
-
paginationLayoutComputed:
|
|
603
|
-
paginationBgComputed:
|
|
604
|
-
setPage:
|
|
605
|
-
setPageSize:
|
|
606
|
-
resetPage:
|
|
918
|
+
pageState: o,
|
|
919
|
+
paginationCfg: m,
|
|
920
|
+
showPagination: h,
|
|
921
|
+
pageSizesComputed: u,
|
|
922
|
+
paginationLayoutComputed: C,
|
|
923
|
+
paginationBgComputed: g,
|
|
924
|
+
setPage: b,
|
|
925
|
+
setPageSize: n,
|
|
926
|
+
resetPage: d
|
|
607
927
|
};
|
|
608
928
|
}
|
|
609
|
-
function
|
|
610
|
-
const
|
|
929
|
+
function ft(e, l) {
|
|
930
|
+
const t = A(), r = A([]), o = A(null), m = A(!1), h = A([]), u = A([]), C = A({}), g = V(() => ({
|
|
611
931
|
show: !1,
|
|
612
932
|
type: "multiple",
|
|
613
933
|
reserveSelection: !1,
|
|
614
934
|
...e.selectionConfig
|
|
615
|
-
})),
|
|
935
|
+
})), b = V(() => ({
|
|
616
936
|
show: !1,
|
|
617
937
|
...e.columnSetting
|
|
618
|
-
})),
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
938
|
+
})), n = V(() => b.value.show), d = V(() => b.value.storageKey || "ee-form-table-columns"), s = A(!1), p = A(!1), c = V(() => {
|
|
939
|
+
const B = e.columns.filter((P) => P.prop);
|
|
940
|
+
if (u.value.length > 0) {
|
|
941
|
+
const P = [];
|
|
942
|
+
for (const j of u.value) {
|
|
943
|
+
const te = B.find((ne) => ne.prop === j);
|
|
944
|
+
te && P.push(te);
|
|
945
|
+
}
|
|
946
|
+
for (const j of B)
|
|
947
|
+
P.some((te) => te.prop === j.prop) || P.push(j);
|
|
948
|
+
return P;
|
|
949
|
+
}
|
|
950
|
+
return B;
|
|
951
|
+
});
|
|
952
|
+
function k() {
|
|
953
|
+
try {
|
|
954
|
+
const B = {
|
|
955
|
+
checkedColumns: h.value,
|
|
956
|
+
columnOrder: u.value,
|
|
957
|
+
columnWidths: C.value,
|
|
958
|
+
showIndex: s.value,
|
|
959
|
+
selectionVisible: p.value
|
|
960
|
+
};
|
|
961
|
+
localStorage.setItem(d.value, JSON.stringify(B));
|
|
962
|
+
} catch {
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
function f() {
|
|
966
|
+
try {
|
|
967
|
+
const B = localStorage.getItem(d.value);
|
|
968
|
+
if (!B) return;
|
|
969
|
+
const P = JSON.parse(B);
|
|
970
|
+
P.checkedColumns && (h.value = P.checkedColumns), P.columnOrder && (u.value = P.columnOrder), P.columnWidths && (C.value = P.columnWidths), P.showIndex !== void 0 && (s.value = P.showIndex), P.selectionVisible !== void 0 && (p.value = P.selectionVisible);
|
|
971
|
+
} catch {
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
Z(() => {
|
|
975
|
+
f();
|
|
976
|
+
const B = c.value.map((j) => j.prop), P = [.../* @__PURE__ */ new Set([...h.value.filter((j) => B.includes(j)), ...B])];
|
|
977
|
+
h.value = P, s.value === !1 && b.value.showIndex && (s.value = !0), p.value === !1 && g.value.show && (p.value = !0);
|
|
978
|
+
}), re(
|
|
622
979
|
() => e.columns,
|
|
623
980
|
() => {
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
];
|
|
981
|
+
const B = c.value.map((P) => P.prop);
|
|
982
|
+
h.value = [.../* @__PURE__ */ new Set([
|
|
983
|
+
...h.value.filter((P) => B.includes(P)),
|
|
984
|
+
...B
|
|
985
|
+
])];
|
|
630
986
|
},
|
|
631
987
|
{ deep: !0 }
|
|
632
988
|
);
|
|
633
|
-
const
|
|
634
|
-
() =>
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
989
|
+
const z = V(() => c.value.filter(
|
|
990
|
+
(P) => P.show !== !1 && h.value.includes(P.prop) && l.authPass(P.auth)
|
|
991
|
+
).map((P) => ({
|
|
992
|
+
...P,
|
|
993
|
+
width: C.value[P.prop] ?? P.width
|
|
994
|
+
}))), U = V(() => e.tableHeight || void 0), le = V(() => e.tableMaxHeight || void 0), G = V(() => e.autoHeight ? { minHeight: `calc(100vh - ${(typeof e.autoHeight == "object" ? e.autoHeight : {}).offset || 200}px)` } : {});
|
|
995
|
+
function pe(B) {
|
|
996
|
+
r.value = B;
|
|
997
|
+
}
|
|
998
|
+
function be(B) {
|
|
999
|
+
const P = e.rowKey || "id";
|
|
1000
|
+
o.value = B[P], r.value = [B];
|
|
1001
|
+
}
|
|
1002
|
+
function Ve(B) {
|
|
1003
|
+
const P = h.value.indexOf(B);
|
|
1004
|
+
P !== -1 ? h.value.splice(P, 1) : h.value.push(B), k();
|
|
1005
|
+
}
|
|
1006
|
+
function ke() {
|
|
1007
|
+
s.value = !s.value, k();
|
|
1008
|
+
}
|
|
1009
|
+
function Te() {
|
|
1010
|
+
p.value = !p.value, k();
|
|
1011
|
+
}
|
|
1012
|
+
function E(B, P) {
|
|
1013
|
+
const j = [...u.value.length > 0 ? u.value : c.value.map((ne) => ne.prop)], [te] = j.splice(B, 1);
|
|
1014
|
+
j.splice(P, 0, te), u.value = j, k();
|
|
1015
|
+
}
|
|
1016
|
+
function oe(B, P) {
|
|
1017
|
+
P && P.property && (C.value[P.property] = B, k());
|
|
644
1018
|
}
|
|
645
1019
|
return {
|
|
646
|
-
tableRef:
|
|
647
|
-
selection:
|
|
648
|
-
singleSelection:
|
|
1020
|
+
tableRef: t,
|
|
1021
|
+
selection: r,
|
|
1022
|
+
singleSelection: o,
|
|
649
1023
|
columnSettingVisible: m,
|
|
650
|
-
checkedColumns:
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
1024
|
+
checkedColumns: h,
|
|
1025
|
+
columnOrder: u,
|
|
1026
|
+
columnWidths: C,
|
|
1027
|
+
selectionCfg: g,
|
|
1028
|
+
columnSettingCfg: b,
|
|
1029
|
+
showColumnSetting: n,
|
|
1030
|
+
showIndex: s,
|
|
1031
|
+
selectionVisible: p,
|
|
1032
|
+
allColumns: c,
|
|
1033
|
+
visibleColumns: z,
|
|
1034
|
+
tableComputedHeight: U,
|
|
1035
|
+
tableMaxHeightProp: le,
|
|
1036
|
+
tableWrapperStyle: G,
|
|
1037
|
+
handleSelectionChange: pe,
|
|
1038
|
+
handleSingleSelect: be,
|
|
1039
|
+
toggleColumn: Ve,
|
|
1040
|
+
toggleIndex: ke,
|
|
1041
|
+
toggleSelection: Te,
|
|
1042
|
+
moveColumn: E,
|
|
1043
|
+
onColumnResize: oe,
|
|
1044
|
+
saveToStorage: k
|
|
661
1045
|
};
|
|
662
1046
|
}
|
|
663
|
-
function
|
|
664
|
-
const
|
|
665
|
-
var
|
|
666
|
-
return !!((
|
|
1047
|
+
function mt(e, l) {
|
|
1048
|
+
const t = A([]), r = A(!1), o = V(() => {
|
|
1049
|
+
var n;
|
|
1050
|
+
return !!((n = e.crudConfig) != null && n.api.list);
|
|
667
1051
|
});
|
|
668
1052
|
async function m() {
|
|
669
|
-
var
|
|
670
|
-
if ((
|
|
671
|
-
|
|
1053
|
+
var n;
|
|
1054
|
+
if ((n = e.crudConfig) != null && n.api.list) {
|
|
1055
|
+
r.value = !0;
|
|
672
1056
|
try {
|
|
673
|
-
const
|
|
674
|
-
page:
|
|
675
|
-
pageSize:
|
|
1057
|
+
const d = {
|
|
1058
|
+
page: l.pageState.current,
|
|
1059
|
+
pageSize: l.pageState.pageSize,
|
|
676
1060
|
...e.crudConfig.baseParams
|
|
677
|
-
},
|
|
678
|
-
Object.assign(
|
|
679
|
-
const
|
|
680
|
-
|
|
681
|
-
} catch (
|
|
682
|
-
|
|
1061
|
+
}, s = l.getActiveSearchParams();
|
|
1062
|
+
Object.assign(d, s);
|
|
1063
|
+
const p = await e.crudConfig.api.list(d);
|
|
1064
|
+
t.value = p.data || [], l.setTotal(p.total ?? 0);
|
|
1065
|
+
} catch (d) {
|
|
1066
|
+
l.emit("request-error", d), J.error((d == null ? void 0 : d.message) || l.t("formTable", "requestFailed"));
|
|
683
1067
|
} finally {
|
|
684
|
-
|
|
1068
|
+
r.value = !1;
|
|
685
1069
|
}
|
|
686
1070
|
}
|
|
687
1071
|
}
|
|
688
|
-
async function
|
|
689
|
-
|
|
1072
|
+
async function h() {
|
|
1073
|
+
l.resetPage(), await m();
|
|
690
1074
|
}
|
|
691
|
-
async function
|
|
692
|
-
var
|
|
693
|
-
if (!((
|
|
694
|
-
|
|
1075
|
+
async function u(n) {
|
|
1076
|
+
var d;
|
|
1077
|
+
if (!((d = e.crudConfig) != null && d.api.delete)) {
|
|
1078
|
+
l.emit("delete", n);
|
|
695
1079
|
return;
|
|
696
1080
|
}
|
|
697
|
-
|
|
1081
|
+
r.value = !0;
|
|
698
1082
|
try {
|
|
699
|
-
const
|
|
700
|
-
await e.crudConfig.api.delete(
|
|
701
|
-
} catch (
|
|
702
|
-
|
|
1083
|
+
const s = n[e.rowKey || "id"];
|
|
1084
|
+
await e.crudConfig.api.delete(s), J.success(l.t("formTable", "deleteSuccess")), l.emit("delete-success"), await m();
|
|
1085
|
+
} catch (s) {
|
|
1086
|
+
l.emit("request-error", s), J.error((s == null ? void 0 : s.message) || l.t("formTable", "deleteFailed"));
|
|
703
1087
|
} finally {
|
|
704
|
-
|
|
1088
|
+
r.value = !1;
|
|
705
1089
|
}
|
|
706
1090
|
}
|
|
707
|
-
async function
|
|
708
|
-
|
|
709
|
-
await V(u);
|
|
710
|
-
return;
|
|
711
|
-
}
|
|
712
|
-
try {
|
|
713
|
-
await Pe.confirm(
|
|
714
|
-
O || "确定要删除该条数据吗?",
|
|
715
|
-
b || "确认删除",
|
|
716
|
-
{ confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }
|
|
717
|
-
), await V(u);
|
|
718
|
-
} catch {
|
|
719
|
-
}
|
|
1091
|
+
async function C(n) {
|
|
1092
|
+
await u(n);
|
|
720
1093
|
}
|
|
721
|
-
async function g(
|
|
722
|
-
var
|
|
723
|
-
if (!((
|
|
724
|
-
|
|
1094
|
+
async function g(n) {
|
|
1095
|
+
var d;
|
|
1096
|
+
if (!((d = e.crudConfig) != null && d.api.batchDelete)) {
|
|
1097
|
+
l.emit("batch-delete", n);
|
|
725
1098
|
return;
|
|
726
1099
|
}
|
|
727
|
-
|
|
1100
|
+
r.value = !0;
|
|
728
1101
|
try {
|
|
729
|
-
await e.crudConfig.api.batchDelete(
|
|
730
|
-
} catch (
|
|
731
|
-
|
|
1102
|
+
await e.crudConfig.api.batchDelete(n), J.success(l.t("formTable", "batchDeleteSuccess")), l.emit("batch-delete-success"), l.selection.value = [], await m();
|
|
1103
|
+
} catch (s) {
|
|
1104
|
+
l.emit("request-error", s), J.error((s == null ? void 0 : s.message) || l.t("formTable", "batchDeleteFailed"));
|
|
732
1105
|
} finally {
|
|
733
|
-
|
|
1106
|
+
r.value = !1;
|
|
734
1107
|
}
|
|
735
1108
|
}
|
|
736
|
-
async function
|
|
737
|
-
const
|
|
738
|
-
if (
|
|
1109
|
+
async function b() {
|
|
1110
|
+
const n = l.selection.value;
|
|
1111
|
+
if (n.length !== 0)
|
|
739
1112
|
try {
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
"
|
|
743
|
-
|
|
1113
|
+
const d = l.t("formTable", "confirm"), s = l.t("formTable", "cancel");
|
|
1114
|
+
await Ma.confirm(
|
|
1115
|
+
l.t("formTable", "confirmBatchDeleteMsg", { count: n.length }),
|
|
1116
|
+
l.t("formTable", "confirmBatchDelete"),
|
|
1117
|
+
{ confirmButtonText: d, cancelButtonText: s, type: "warning" }
|
|
744
1118
|
);
|
|
745
|
-
const
|
|
746
|
-
await g(
|
|
1119
|
+
const p = n.map((c) => c[e.rowKey || "id"]);
|
|
1120
|
+
await g(p);
|
|
747
1121
|
} catch {
|
|
748
1122
|
}
|
|
749
1123
|
}
|
|
750
1124
|
return {
|
|
751
|
-
internalData:
|
|
752
|
-
loadingState:
|
|
753
|
-
hasCrud:
|
|
1125
|
+
internalData: t,
|
|
1126
|
+
loadingState: r,
|
|
1127
|
+
hasCrud: o,
|
|
754
1128
|
fetchData: m,
|
|
755
|
-
refreshTable:
|
|
756
|
-
doDelete:
|
|
757
|
-
handleDelete:
|
|
1129
|
+
refreshTable: h,
|
|
1130
|
+
doDelete: u,
|
|
1131
|
+
handleDelete: C,
|
|
758
1132
|
doBatchDelete: g,
|
|
759
|
-
handleBatchDelete:
|
|
1133
|
+
handleBatchDelete: b
|
|
760
1134
|
};
|
|
761
1135
|
}
|
|
762
|
-
function
|
|
763
|
-
const
|
|
764
|
-
...
|
|
1136
|
+
function ht(e) {
|
|
1137
|
+
const l = A(!1), t = A("add"), r = A(null), o = A({}), m = A(!1), h = {
|
|
1138
|
+
...rt,
|
|
765
1139
|
...e.drawerConfig
|
|
766
|
-
},
|
|
767
|
-
function
|
|
768
|
-
|
|
1140
|
+
}, u = h.mode || "drawer";
|
|
1141
|
+
function C() {
|
|
1142
|
+
t.value = "add", r.value = null, o.value = {}, l.value = !0;
|
|
1143
|
+
}
|
|
1144
|
+
function g(d) {
|
|
1145
|
+
t.value = "edit", r.value = d, o.value = { ...d }, l.value = !0;
|
|
769
1146
|
}
|
|
770
|
-
function
|
|
771
|
-
|
|
1147
|
+
function b(d) {
|
|
1148
|
+
t.value = "view", r.value = d, o.value = { ...d }, l.value = !0;
|
|
772
1149
|
}
|
|
773
|
-
function
|
|
774
|
-
|
|
1150
|
+
function n() {
|
|
1151
|
+
l.value = !1;
|
|
775
1152
|
}
|
|
776
1153
|
return {
|
|
777
|
-
formVisible:
|
|
778
|
-
|
|
779
|
-
editingRow:
|
|
780
|
-
formData:
|
|
1154
|
+
formVisible: l,
|
|
1155
|
+
formMode: t,
|
|
1156
|
+
editingRow: r,
|
|
1157
|
+
formData: o,
|
|
781
1158
|
saving: m,
|
|
782
|
-
drawerMode:
|
|
783
|
-
drawerCfg:
|
|
784
|
-
openAdd:
|
|
1159
|
+
drawerMode: u,
|
|
1160
|
+
drawerCfg: h,
|
|
1161
|
+
openAdd: C,
|
|
785
1162
|
openEdit: g,
|
|
786
|
-
|
|
1163
|
+
openView: b,
|
|
1164
|
+
closeForm: n
|
|
787
1165
|
};
|
|
788
1166
|
}
|
|
789
|
-
function
|
|
790
|
-
const
|
|
791
|
-
async function
|
|
792
|
-
var
|
|
793
|
-
|
|
1167
|
+
function gt(e, l) {
|
|
1168
|
+
const t = A(!1);
|
|
1169
|
+
async function r() {
|
|
1170
|
+
var o, m, h, u, C;
|
|
1171
|
+
t.value = !0, l.setLoading(!0);
|
|
794
1172
|
try {
|
|
795
1173
|
const g = await import("xlsx").catch(() => null);
|
|
796
1174
|
if (!g) {
|
|
797
|
-
|
|
1175
|
+
J.warning(l.t("formTable", "installXlsx"));
|
|
798
1176
|
return;
|
|
799
1177
|
}
|
|
800
|
-
const
|
|
801
|
-
let
|
|
802
|
-
if (
|
|
803
|
-
const
|
|
1178
|
+
const b = ((o = e.exportConfig) == null ? void 0 : o.mode) || "current";
|
|
1179
|
+
let n;
|
|
1180
|
+
if (b === "all" && ((h = (m = e.crudConfig) == null ? void 0 : m.api) != null && h.list)) {
|
|
1181
|
+
const f = {
|
|
804
1182
|
page: 1,
|
|
805
1183
|
pageSize: 99999,
|
|
806
1184
|
...e.crudConfig.baseParams
|
|
807
|
-
}, z =
|
|
808
|
-
Object.assign(
|
|
1185
|
+
}, z = l.getActiveSearchParams();
|
|
1186
|
+
Object.assign(f, z), n = (await e.crudConfig.api.list(f)).data || [];
|
|
809
1187
|
} else
|
|
810
|
-
|
|
811
|
-
const
|
|
812
|
-
|
|
813
|
-
...
|
|
814
|
-
(
|
|
815
|
-
var
|
|
1188
|
+
n = [...l.getCurrentData()];
|
|
1189
|
+
const d = ((u = e.exportConfig) == null ? void 0 : u.ignoreColumn) || [], s = l.visibleColumns.value.filter((f) => !d.includes(f.prop)).map((f) => ({ prop: f.prop, label: f.label })), p = [
|
|
1190
|
+
s.map((f) => f.label),
|
|
1191
|
+
...n.map(
|
|
1192
|
+
(f) => s.map((z) => {
|
|
1193
|
+
var le;
|
|
816
1194
|
if (z.prop === "action") return "";
|
|
817
|
-
const
|
|
818
|
-
return
|
|
1195
|
+
const U = (le = e.columns.find((G) => G.prop === z.prop)) == null ? void 0 : le.dictKey;
|
|
1196
|
+
return U ? l.dictLabel(U, f[z.prop]) : f[z.prop] ?? "";
|
|
819
1197
|
})
|
|
820
1198
|
)
|
|
821
|
-
],
|
|
822
|
-
g.utils.book_append_sheet(
|
|
1199
|
+
], c = g.utils.aoa_to_sheet(p), k = g.utils.book_new();
|
|
1200
|
+
g.utils.book_append_sheet(k, c, "Sheet1"), g.writeFile(k, ((C = e.exportConfig) == null ? void 0 : C.fileName) || l.t("formTable", "exportFileName")), J.success(l.t("formTable", "exportSuccess"));
|
|
823
1201
|
} catch (g) {
|
|
824
|
-
|
|
1202
|
+
J.error((g == null ? void 0 : g.message) || l.t("formTable", "exportFail"));
|
|
825
1203
|
} finally {
|
|
826
|
-
|
|
1204
|
+
l.setLoading(!1), t.value = !1;
|
|
827
1205
|
}
|
|
828
1206
|
}
|
|
829
|
-
return { handleExport:
|
|
1207
|
+
return { handleExport: r, exporting: t };
|
|
830
1208
|
}
|
|
831
|
-
const
|
|
1209
|
+
const vt = {
|
|
832
1210
|
key: 0,
|
|
833
1211
|
class: "ee-search-area"
|
|
834
|
-
},
|
|
1212
|
+
}, pt = /* @__PURE__ */ H({
|
|
835
1213
|
__name: "SearchArea",
|
|
836
1214
|
props: {
|
|
837
1215
|
showSearch: { type: Boolean },
|
|
@@ -846,163 +1224,164 @@ const qa = {
|
|
|
846
1224
|
},
|
|
847
1225
|
emits: ["search", "reset", "toggle-fold"],
|
|
848
1226
|
setup(e) {
|
|
849
|
-
|
|
850
|
-
|
|
1227
|
+
const { t: l } = _();
|
|
1228
|
+
return (t, r) => e.showSearch ? (i(), D("div", vt, [
|
|
1229
|
+
T(a(Ye), {
|
|
851
1230
|
model: e.searchParams,
|
|
852
1231
|
"label-width": "auto",
|
|
853
1232
|
size: e.size
|
|
854
1233
|
}, {
|
|
855
|
-
default:
|
|
856
|
-
|
|
857
|
-
default:
|
|
858
|
-
(i(!0), D(
|
|
859
|
-
key: String(
|
|
1234
|
+
default: v(() => [
|
|
1235
|
+
T(a(Je), { gutter: 12 }, {
|
|
1236
|
+
default: v(() => [
|
|
1237
|
+
(i(!0), D(O, null, K(e.visibleSearchFields, (o) => (i(), w(a(xe), {
|
|
1238
|
+
key: String(o.prop),
|
|
860
1239
|
span: 24 / e.searchCols
|
|
861
1240
|
}, {
|
|
862
|
-
default:
|
|
863
|
-
|
|
864
|
-
label: String(
|
|
1241
|
+
default: v(() => [
|
|
1242
|
+
T(a(ze), {
|
|
1243
|
+
label: String(o.label)
|
|
865
1244
|
}, {
|
|
866
|
-
default:
|
|
867
|
-
|
|
1245
|
+
default: v(() => [
|
|
1246
|
+
o.type === "input" ? (i(), w(a(ge), I({
|
|
868
1247
|
key: 0,
|
|
869
|
-
modelValue: e.searchParams[
|
|
870
|
-
"onUpdate:modelValue": (
|
|
871
|
-
placeholder: String(
|
|
1248
|
+
modelValue: e.searchParams[o.field],
|
|
1249
|
+
"onUpdate:modelValue": (m) => e.searchParams[o.field] = m,
|
|
1250
|
+
placeholder: String(o.placeholder || a(l)("formTable", "inputPlaceholder", { label: o.label })),
|
|
872
1251
|
clearable: ""
|
|
873
|
-
}, { ref_for: !0 },
|
|
1252
|
+
}, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.type === "number" ? (i(), w(a(Ia), I({
|
|
874
1253
|
key: 1,
|
|
875
|
-
modelValue: e.searchParams[
|
|
876
|
-
"onUpdate:modelValue": (
|
|
877
|
-
placeholder: String(
|
|
1254
|
+
modelValue: e.searchParams[o.field],
|
|
1255
|
+
"onUpdate:modelValue": (m) => e.searchParams[o.field] = m,
|
|
1256
|
+
placeholder: String(o.placeholder || a(l)("formTable", "inputPlaceholder", { label: o.label })),
|
|
878
1257
|
style: { width: "100%" }
|
|
879
|
-
}, { ref_for: !0 },
|
|
1258
|
+
}, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.type === "select" ? (i(), w(a(ue), I({
|
|
880
1259
|
key: 2,
|
|
881
|
-
modelValue: e.searchParams[
|
|
882
|
-
"onUpdate:modelValue": (
|
|
883
|
-
placeholder: String(
|
|
1260
|
+
modelValue: e.searchParams[o.field],
|
|
1261
|
+
"onUpdate:modelValue": (m) => e.searchParams[o.field] = m,
|
|
1262
|
+
placeholder: String(o.placeholder || a(l)("formTable", "selectPlaceholder", { label: o.label })),
|
|
884
1263
|
clearable: "",
|
|
885
1264
|
style: { width: "100%" }
|
|
886
|
-
}, { ref_for: !0 },
|
|
887
|
-
default:
|
|
888
|
-
var
|
|
1265
|
+
}, { ref_for: !0 }, o.props || {}), {
|
|
1266
|
+
default: v(() => {
|
|
1267
|
+
var m;
|
|
889
1268
|
return [
|
|
890
|
-
(i(!0), D(
|
|
891
|
-
(
|
|
892
|
-
|
|
893
|
-
), (
|
|
894
|
-
key:
|
|
895
|
-
label:
|
|
896
|
-
value:
|
|
1269
|
+
(i(!0), D(O, null, K(e.resolveDict(
|
|
1270
|
+
(m = o.props) == null ? void 0 : m.options,
|
|
1271
|
+
o.dictKey
|
|
1272
|
+
), (h) => (i(), w(a(de), {
|
|
1273
|
+
key: h.value,
|
|
1274
|
+
label: h.label,
|
|
1275
|
+
value: h.value
|
|
897
1276
|
}, null, 8, ["label", "value"]))), 128))
|
|
898
1277
|
];
|
|
899
1278
|
}),
|
|
900
1279
|
_: 2
|
|
901
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder"])) :
|
|
1280
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.type === "radio" ? (i(), w(a(ca), I({
|
|
902
1281
|
key: 3,
|
|
903
|
-
modelValue: e.searchParams[
|
|
904
|
-
"onUpdate:modelValue": (
|
|
905
|
-
}, { ref_for: !0 },
|
|
906
|
-
default:
|
|
907
|
-
var
|
|
1282
|
+
modelValue: e.searchParams[o.field],
|
|
1283
|
+
"onUpdate:modelValue": (m) => e.searchParams[o.field] = m
|
|
1284
|
+
}, { ref_for: !0 }, o.props || {}), {
|
|
1285
|
+
default: v(() => {
|
|
1286
|
+
var m;
|
|
908
1287
|
return [
|
|
909
|
-
(i(!0), D(
|
|
910
|
-
(
|
|
911
|
-
|
|
912
|
-
), (
|
|
913
|
-
key:
|
|
914
|
-
value:
|
|
1288
|
+
(i(!0), D(O, null, K(e.resolveDict(
|
|
1289
|
+
(m = o.props) == null ? void 0 : m.options,
|
|
1290
|
+
o.dictKey
|
|
1291
|
+
), (h) => (i(), w(a(Qe), {
|
|
1292
|
+
key: h.value,
|
|
1293
|
+
value: h.value
|
|
915
1294
|
}, {
|
|
916
|
-
default:
|
|
917
|
-
|
|
1295
|
+
default: v(() => [
|
|
1296
|
+
M(F(h.label), 1)
|
|
918
1297
|
]),
|
|
919
1298
|
_: 2
|
|
920
1299
|
}, 1032, ["value"]))), 128))
|
|
921
1300
|
];
|
|
922
1301
|
}),
|
|
923
1302
|
_: 2
|
|
924
|
-
}, 1040, ["modelValue", "onUpdate:modelValue"])) :
|
|
1303
|
+
}, 1040, ["modelValue", "onUpdate:modelValue"])) : o.type === "checkbox" ? (i(), w(a(fa), I({
|
|
925
1304
|
key: 4,
|
|
926
|
-
modelValue: e.searchParams[
|
|
927
|
-
"onUpdate:modelValue": (
|
|
928
|
-
}, { ref_for: !0 },
|
|
929
|
-
default:
|
|
930
|
-
var
|
|
1305
|
+
modelValue: e.searchParams[o.field],
|
|
1306
|
+
"onUpdate:modelValue": (m) => e.searchParams[o.field] = m
|
|
1307
|
+
}, { ref_for: !0 }, o.props || {}), {
|
|
1308
|
+
default: v(() => {
|
|
1309
|
+
var m;
|
|
931
1310
|
return [
|
|
932
|
-
(i(!0), D(
|
|
933
|
-
(
|
|
934
|
-
|
|
935
|
-
), (
|
|
936
|
-
key:
|
|
937
|
-
value:
|
|
938
|
-
label:
|
|
1311
|
+
(i(!0), D(O, null, K(e.resolveDict(
|
|
1312
|
+
(m = o.props) == null ? void 0 : m.options,
|
|
1313
|
+
o.dictKey
|
|
1314
|
+
), (h) => (i(), w(a(Ce), {
|
|
1315
|
+
key: h.value,
|
|
1316
|
+
value: h.value,
|
|
1317
|
+
label: h.label
|
|
939
1318
|
}, null, 8, ["value", "label"]))), 128))
|
|
940
1319
|
];
|
|
941
1320
|
}),
|
|
942
1321
|
_: 2
|
|
943
|
-
}, 1040, ["modelValue", "onUpdate:modelValue"])) :
|
|
1322
|
+
}, 1040, ["modelValue", "onUpdate:modelValue"])) : o.type === "date" ? (i(), w(a(ve), I({
|
|
944
1323
|
key: 5,
|
|
945
|
-
modelValue: e.searchParams[
|
|
946
|
-
"onUpdate:modelValue": (
|
|
947
|
-
placeholder: String(
|
|
1324
|
+
modelValue: e.searchParams[o.field],
|
|
1325
|
+
"onUpdate:modelValue": (m) => e.searchParams[o.field] = m,
|
|
1326
|
+
placeholder: String(o.placeholder || a(l)("formTable", "selectPlaceholder", { label: o.label })),
|
|
948
1327
|
style: { width: "100%" }
|
|
949
|
-
}, { ref_for: !0 },
|
|
1328
|
+
}, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.type === "date-range" ? (i(), w(a(ve), I({
|
|
950
1329
|
key: 6,
|
|
951
|
-
modelValue: e.searchParams[
|
|
952
|
-
"onUpdate:modelValue": (
|
|
1330
|
+
modelValue: e.searchParams[o.field],
|
|
1331
|
+
"onUpdate:modelValue": (m) => e.searchParams[o.field] = m,
|
|
953
1332
|
type: "daterange",
|
|
954
|
-
"range-separator": "
|
|
955
|
-
"start-placeholder": "
|
|
956
|
-
"end-placeholder": "
|
|
1333
|
+
"range-separator": a(l)("formTable", "dateRangeTo"),
|
|
1334
|
+
"start-placeholder": a(l)("formTable", "dateRangeStart"),
|
|
1335
|
+
"end-placeholder": a(l)("formTable", "dateRangeEnd"),
|
|
957
1336
|
style: { width: "100%" }
|
|
958
|
-
}, { ref_for: !0 },
|
|
1337
|
+
}, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : o.type === "textarea" ? (i(), w(a(ge), I({
|
|
959
1338
|
key: 7,
|
|
960
|
-
modelValue: e.searchParams[
|
|
961
|
-
"onUpdate:modelValue": (
|
|
962
|
-
placeholder: String(
|
|
1339
|
+
modelValue: e.searchParams[o.field],
|
|
1340
|
+
"onUpdate:modelValue": (m) => e.searchParams[o.field] = m,
|
|
1341
|
+
placeholder: String(o.placeholder || a(l)("formTable", "inputPlaceholder", { label: o.label })),
|
|
963
1342
|
type: "textarea"
|
|
964
|
-
}, { ref_for: !0 },
|
|
1343
|
+
}, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : L("", !0)
|
|
965
1344
|
]),
|
|
966
1345
|
_: 2
|
|
967
1346
|
}, 1032, ["label"])
|
|
968
1347
|
]),
|
|
969
1348
|
_: 2
|
|
970
1349
|
}, 1032, ["span"]))), 128)),
|
|
971
|
-
|
|
972
|
-
default:
|
|
973
|
-
|
|
974
|
-
default:
|
|
975
|
-
|
|
1350
|
+
T(a(xe), { span: e.actionColSpan }, {
|
|
1351
|
+
default: v(() => [
|
|
1352
|
+
T(a(ze), null, {
|
|
1353
|
+
default: v(() => [
|
|
1354
|
+
T(a(q), {
|
|
976
1355
|
type: "primary",
|
|
977
1356
|
round: "",
|
|
978
|
-
onClick:
|
|
1357
|
+
onClick: r[0] || (r[0] = (o) => t.$emit("search"))
|
|
979
1358
|
}, {
|
|
980
|
-
default:
|
|
981
|
-
|
|
982
|
-
])
|
|
1359
|
+
default: v(() => [
|
|
1360
|
+
M(F(a(l)("formTable", "search")), 1)
|
|
1361
|
+
]),
|
|
983
1362
|
_: 1
|
|
984
1363
|
}),
|
|
985
|
-
|
|
1364
|
+
T(a(q), {
|
|
986
1365
|
round: "",
|
|
987
|
-
onClick:
|
|
1366
|
+
onClick: r[1] || (r[1] = (o) => t.$emit("reset"))
|
|
988
1367
|
}, {
|
|
989
|
-
default:
|
|
990
|
-
|
|
991
|
-
])
|
|
1368
|
+
default: v(() => [
|
|
1369
|
+
M(F(a(l)("formTable", "reset")), 1)
|
|
1370
|
+
]),
|
|
992
1371
|
_: 1
|
|
993
1372
|
}),
|
|
994
|
-
e.showFoldBtn ? (i(),
|
|
1373
|
+
e.showFoldBtn ? (i(), w(a(q), {
|
|
995
1374
|
key: 0,
|
|
996
1375
|
text: "",
|
|
997
1376
|
size: e.size,
|
|
998
|
-
onClick:
|
|
1377
|
+
onClick: r[2] || (r[2] = (o) => t.$emit("toggle-fold"))
|
|
999
1378
|
}, {
|
|
1000
|
-
default:
|
|
1001
|
-
|
|
1379
|
+
default: v(() => [
|
|
1380
|
+
M(F(e.searchExpanded ? a(l)("formTable", "collapse") : a(l)("formTable", "expand")), 1)
|
|
1002
1381
|
]),
|
|
1003
1382
|
_: 1
|
|
1004
|
-
}, 8, ["size"])) :
|
|
1005
|
-
|
|
1383
|
+
}, 8, ["size"])) : L("", !0),
|
|
1384
|
+
Y(t.$slots, "search-action", { params: e.searchParams })
|
|
1006
1385
|
]),
|
|
1007
1386
|
_: 3
|
|
1008
1387
|
})
|
|
@@ -1015,220 +1394,628 @@ const qa = {
|
|
|
1015
1394
|
]),
|
|
1016
1395
|
_: 3
|
|
1017
1396
|
}, 8, ["model", "size"])
|
|
1018
|
-
])) :
|
|
1397
|
+
])) : L("", !0);
|
|
1019
1398
|
}
|
|
1020
|
-
}),
|
|
1399
|
+
}), bt = {
|
|
1021
1400
|
key: 0,
|
|
1022
1401
|
class: "ee-toolbar"
|
|
1023
|
-
},
|
|
1402
|
+
}, yt = { class: "ee-toolbar-left" }, wt = { class: "ee-toolbar-right" }, Ct = { class: "ee-column-setting" }, St = { class: "ee-column-setting-special" }, xt = { class: "ee-column-setting-item ee-column-setting-item--special" }, zt = { class: "ee-column-setting-item ee-column-setting-item--special" }, Dt = ["onDragstart", "onDragover"], Vt = /* @__PURE__ */ H({
|
|
1024
1403
|
__name: "TableToolbar",
|
|
1025
1404
|
props: {
|
|
1026
1405
|
show: { type: Boolean },
|
|
1027
1406
|
toolbarCfg: {},
|
|
1028
1407
|
size: {},
|
|
1408
|
+
refreshing: { type: Boolean },
|
|
1029
1409
|
deps: {}
|
|
1030
1410
|
},
|
|
1031
|
-
emits: ["add", "import", "export", "batch-delete", "refresh"
|
|
1411
|
+
emits: ["add", "import", "export", "batch-delete", "refresh"],
|
|
1032
1412
|
setup(e) {
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1413
|
+
const { t: l } = _(), t = e, r = A(!1), o = A(-1), m = A(-1);
|
|
1414
|
+
function h(g) {
|
|
1415
|
+
o.value = g;
|
|
1416
|
+
}
|
|
1417
|
+
function u(g) {
|
|
1418
|
+
o.value !== g && (m.value = g);
|
|
1419
|
+
}
|
|
1420
|
+
function C() {
|
|
1421
|
+
o.value >= 0 && m.value >= 0 && o.value !== m.value && t.deps.moveColumn(o.value, m.value), o.value = -1, m.value = -1;
|
|
1422
|
+
}
|
|
1423
|
+
return (g, b) => e.show ? (i(), D("div", bt, [
|
|
1424
|
+
N("div", yt, [
|
|
1425
|
+
e.toolbarCfg.showAdd && e.deps.authPass(e.toolbarCfg.addAuth) ? (i(), w(a(q), {
|
|
1036
1426
|
key: 0,
|
|
1037
1427
|
type: "primary",
|
|
1038
1428
|
size: e.size,
|
|
1039
1429
|
round: "",
|
|
1040
|
-
onClick:
|
|
1430
|
+
onClick: b[0] || (b[0] = (n) => g.$emit("add"))
|
|
1041
1431
|
}, {
|
|
1042
|
-
default:
|
|
1043
|
-
|
|
1432
|
+
default: v(() => [
|
|
1433
|
+
M(F(e.toolbarCfg.addText || a(l)("formTable", "add")), 1)
|
|
1044
1434
|
]),
|
|
1045
1435
|
_: 1
|
|
1046
|
-
}, 8, ["size"])) :
|
|
1047
|
-
e.toolbarCfg.showImport && e.deps.authPass(e.toolbarCfg.importAuth) ? (i(),
|
|
1436
|
+
}, 8, ["size"])) : L("", !0),
|
|
1437
|
+
e.toolbarCfg.showImport && e.deps.authPass(e.toolbarCfg.importAuth) ? (i(), w(a(q), {
|
|
1048
1438
|
key: 1,
|
|
1049
1439
|
size: e.size,
|
|
1050
1440
|
round: "",
|
|
1051
|
-
onClick:
|
|
1441
|
+
onClick: b[1] || (b[1] = (n) => g.$emit("import"))
|
|
1052
1442
|
}, {
|
|
1053
|
-
default:
|
|
1054
|
-
|
|
1443
|
+
default: v(() => [
|
|
1444
|
+
M(F(e.toolbarCfg.importText || a(l)("formTable", "import")), 1)
|
|
1055
1445
|
]),
|
|
1056
1446
|
_: 1
|
|
1057
|
-
}, 8, ["size"])) :
|
|
1058
|
-
e.toolbarCfg.showExport && e.deps.authPass(e.toolbarCfg.exportAuth) ? (i(),
|
|
1447
|
+
}, 8, ["size"])) : L("", !0),
|
|
1448
|
+
e.toolbarCfg.showExport && e.deps.authPass(e.toolbarCfg.exportAuth) ? (i(), w(a(q), {
|
|
1059
1449
|
key: 2,
|
|
1060
1450
|
size: e.size,
|
|
1061
1451
|
round: "",
|
|
1062
|
-
onClick:
|
|
1452
|
+
onClick: b[2] || (b[2] = (n) => g.$emit("export"))
|
|
1063
1453
|
}, {
|
|
1064
|
-
default:
|
|
1065
|
-
|
|
1454
|
+
default: v(() => [
|
|
1455
|
+
M(F(e.toolbarCfg.exportText || a(l)("formTable", "export")), 1)
|
|
1066
1456
|
]),
|
|
1067
1457
|
_: 1
|
|
1068
|
-
}, 8, ["size"])) :
|
|
1069
|
-
e.toolbarCfg.showBatchDelete && e.deps.selectionCount > 0 && e.deps.authPass(e.toolbarCfg.batchDeleteAuth) ? (i(),
|
|
1458
|
+
}, 8, ["size"])) : L("", !0),
|
|
1459
|
+
e.toolbarCfg.showBatchDelete && e.deps.selectionCount > 0 && e.deps.authPass(e.toolbarCfg.batchDeleteAuth) ? (i(), w(a(q), {
|
|
1070
1460
|
key: 3,
|
|
1071
1461
|
type: "danger",
|
|
1072
1462
|
size: e.size,
|
|
1073
1463
|
round: "",
|
|
1074
|
-
onClick:
|
|
1464
|
+
onClick: b[3] || (b[3] = (n) => g.$emit("batch-delete"))
|
|
1075
1465
|
}, {
|
|
1076
|
-
default:
|
|
1077
|
-
|
|
1466
|
+
default: v(() => [
|
|
1467
|
+
M(F(e.toolbarCfg.batchDeleteText || a(l)("formTable", "batchDelete")), 1)
|
|
1078
1468
|
]),
|
|
1079
1469
|
_: 1
|
|
1080
|
-
}, 8, ["size"])) :
|
|
1081
|
-
(i(!0), D(
|
|
1082
|
-
key:
|
|
1470
|
+
}, 8, ["size"])) : L("", !0),
|
|
1471
|
+
(i(!0), D(O, null, K(e.toolbarCfg.customButtons || [], (n) => (i(), D(O, {
|
|
1472
|
+
key: n.code
|
|
1083
1473
|
}, [
|
|
1084
|
-
e.deps.authPass(
|
|
1474
|
+
e.deps.authPass(n.auth) ? (i(), w(a(q), {
|
|
1085
1475
|
key: 0,
|
|
1086
|
-
type:
|
|
1476
|
+
type: n.type,
|
|
1087
1477
|
size: e.size,
|
|
1088
1478
|
round: "",
|
|
1089
|
-
onClick:
|
|
1479
|
+
onClick: n.handler
|
|
1090
1480
|
}, {
|
|
1091
|
-
default:
|
|
1092
|
-
|
|
1481
|
+
default: v(() => [
|
|
1482
|
+
M(F(n.text), 1)
|
|
1093
1483
|
]),
|
|
1094
1484
|
_: 2
|
|
1095
|
-
}, 1032, ["type", "size", "onClick"])) :
|
|
1485
|
+
}, 1032, ["type", "size", "onClick"])) : L("", !0)
|
|
1096
1486
|
], 64))), 128))
|
|
1097
1487
|
]),
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1488
|
+
N("div", wt, [
|
|
1489
|
+
T(a(Sa), {
|
|
1490
|
+
content: a(l)("formTable", "refresh")
|
|
1491
|
+
}, {
|
|
1492
|
+
default: v(() => [
|
|
1493
|
+
e.toolbarCfg.showRefresh !== !1 ? (i(), w(a(q), {
|
|
1494
|
+
key: 0,
|
|
1495
|
+
icon: a(Jl),
|
|
1103
1496
|
size: e.size,
|
|
1497
|
+
loading: e.refreshing,
|
|
1104
1498
|
circle: "",
|
|
1105
|
-
onClick:
|
|
1106
|
-
}, null, 8, ["size"])
|
|
1499
|
+
onClick: b[4] || (b[4] = (n) => g.$emit("refresh"))
|
|
1500
|
+
}, null, 8, ["icon", "size", "loading"])) : L("", !0)
|
|
1107
1501
|
]),
|
|
1108
1502
|
_: 1
|
|
1109
|
-
}),
|
|
1110
|
-
e.deps.showColumnSetting ? (i(),
|
|
1503
|
+
}, 8, ["content"]),
|
|
1504
|
+
e.deps.showColumnSetting ? (i(), w(a(Vl), {
|
|
1111
1505
|
key: 0,
|
|
1112
|
-
|
|
1506
|
+
visible: r.value,
|
|
1507
|
+
trigger: "click",
|
|
1508
|
+
placement: "bottom-end",
|
|
1509
|
+
width: 240,
|
|
1510
|
+
onShow: b[5] || (b[5] = (n) => r.value = !0),
|
|
1511
|
+
onHide: b[6] || (b[6] = (n) => r.value = !1)
|
|
1113
1512
|
}, {
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1513
|
+
reference: v(() => [
|
|
1514
|
+
T(a(Sa), {
|
|
1515
|
+
content: a(l)("formTable", "columnSetting")
|
|
1516
|
+
}, {
|
|
1517
|
+
default: v(() => [
|
|
1518
|
+
T(a(q), {
|
|
1519
|
+
icon: a(Zl),
|
|
1520
|
+
size: e.size,
|
|
1521
|
+
circle: ""
|
|
1522
|
+
}, null, 8, ["icon", "size"])
|
|
1523
|
+
]),
|
|
1524
|
+
_: 1
|
|
1525
|
+
}, 8, ["content"])
|
|
1526
|
+
]),
|
|
1527
|
+
default: v(() => [
|
|
1528
|
+
N("div", Ct, [
|
|
1529
|
+
N("div", St, [
|
|
1530
|
+
N("div", xt, [
|
|
1531
|
+
T(a(Ce), {
|
|
1532
|
+
"model-value": e.deps.showIndex,
|
|
1533
|
+
onChange: e.deps.toggleIndex
|
|
1534
|
+
}, {
|
|
1535
|
+
default: v(() => [
|
|
1536
|
+
M(F(a(l)("formTable", "rowIndex")), 1)
|
|
1537
|
+
]),
|
|
1538
|
+
_: 1
|
|
1539
|
+
}, 8, ["model-value", "onChange"])
|
|
1540
|
+
]),
|
|
1541
|
+
N("div", zt, [
|
|
1542
|
+
T(a(Ce), {
|
|
1543
|
+
"model-value": e.deps.selectionVisible,
|
|
1544
|
+
onChange: e.deps.toggleSelection
|
|
1545
|
+
}, {
|
|
1546
|
+
default: v(() => [
|
|
1547
|
+
M(F(a(l)("formTable", "selectionLabel")), 1)
|
|
1548
|
+
]),
|
|
1549
|
+
_: 1
|
|
1550
|
+
}, 8, ["model-value", "onChange"])
|
|
1551
|
+
])
|
|
1552
|
+
]),
|
|
1553
|
+
e.deps.allColumns.length > 0 ? (i(), w(a(kl), {
|
|
1554
|
+
key: 0,
|
|
1555
|
+
style: { margin: "8px 0" }
|
|
1556
|
+
})) : L("", !0),
|
|
1557
|
+
(i(!0), D(O, null, K(e.deps.allColumns, (n, d) => (i(), D("div", {
|
|
1558
|
+
key: n.prop,
|
|
1559
|
+
class: Aa(["ee-column-setting-item", { "ee-column-setting-item--drag-over": m.value === d }]),
|
|
1560
|
+
draggable: !0,
|
|
1561
|
+
onDragstart: (s) => h(d),
|
|
1562
|
+
onDragover: yl((s) => u(d), ["prevent"]),
|
|
1563
|
+
onDragend: C
|
|
1564
|
+
}, [
|
|
1565
|
+
T(a(Ce), {
|
|
1566
|
+
"model-value": e.deps.checkedColumns.includes(n.prop),
|
|
1567
|
+
onChange: (s) => e.deps.toggleColumn(n.prop)
|
|
1568
|
+
}, {
|
|
1569
|
+
default: v(() => [
|
|
1570
|
+
M(F(n.label), 1)
|
|
1571
|
+
]),
|
|
1572
|
+
_: 2
|
|
1573
|
+
}, 1032, ["model-value", "onChange"]),
|
|
1574
|
+
T(a(Oa), { class: "ee-column-setting-drag" }, {
|
|
1575
|
+
default: v(() => [
|
|
1576
|
+
T(a(Xl))
|
|
1577
|
+
]),
|
|
1578
|
+
_: 1
|
|
1579
|
+
})
|
|
1580
|
+
], 42, Dt))), 128))
|
|
1581
|
+
])
|
|
1121
1582
|
]),
|
|
1122
1583
|
_: 1
|
|
1123
|
-
})) :
|
|
1124
|
-
|
|
1584
|
+
}, 8, ["visible"])) : L("", !0),
|
|
1585
|
+
Y(g.$slots, "toolbar-right", {}, void 0, !0)
|
|
1125
1586
|
])
|
|
1126
|
-
])) :
|
|
1587
|
+
])) : L("", !0);
|
|
1588
|
+
}
|
|
1589
|
+
}), kt = /* @__PURE__ */ De(Vt, [["__scopeId", "data-v-951992f2"]]), Ba = /* @__PURE__ */ H({
|
|
1590
|
+
__name: "FormAuto",
|
|
1591
|
+
props: {
|
|
1592
|
+
formData: {},
|
|
1593
|
+
columns: {},
|
|
1594
|
+
formMode: {},
|
|
1595
|
+
formCols: {},
|
|
1596
|
+
formLabelWidth: {},
|
|
1597
|
+
size: {},
|
|
1598
|
+
dictMap: {}
|
|
1599
|
+
},
|
|
1600
|
+
setup(e, { expose: l }) {
|
|
1601
|
+
const { t } = _(), r = e, o = A();
|
|
1602
|
+
l({
|
|
1603
|
+
validate: () => {
|
|
1604
|
+
var s;
|
|
1605
|
+
return (s = o.value) == null ? void 0 : s.validate();
|
|
1606
|
+
},
|
|
1607
|
+
resetFields: () => {
|
|
1608
|
+
var s;
|
|
1609
|
+
return (s = o.value) == null ? void 0 : s.resetFields();
|
|
1610
|
+
}
|
|
1611
|
+
});
|
|
1612
|
+
const m = V(() => r.columns.filter((s) => !s.form || s.form.hide ? !1 : r.formMode === "add" ? s.form.add !== !1 : r.formMode === "edit" ? s.form.edit !== !1 : !1));
|
|
1613
|
+
function h(s) {
|
|
1614
|
+
var p;
|
|
1615
|
+
return ((p = s.form) == null ? void 0 : p.type) || "input";
|
|
1616
|
+
}
|
|
1617
|
+
function u(s) {
|
|
1618
|
+
var p;
|
|
1619
|
+
return ((p = s.form) == null ? void 0 : p.props) || {};
|
|
1620
|
+
}
|
|
1621
|
+
function C(s) {
|
|
1622
|
+
var c;
|
|
1623
|
+
if ((c = s.form) != null && c.placeholder) return s.form.placeholder;
|
|
1624
|
+
const p = h(s);
|
|
1625
|
+
return p === "select" || p === "date" || p === "date-range" ? t("formTable", "selectPlaceholder", { label: s.label }) : t("formTable", "inputPlaceholder", { label: s.label });
|
|
1626
|
+
}
|
|
1627
|
+
function g(s) {
|
|
1628
|
+
var p;
|
|
1629
|
+
return !!(r.formMode === "edit" && ((p = s.form) != null && p.readonly));
|
|
1630
|
+
}
|
|
1631
|
+
function b(s) {
|
|
1632
|
+
var c;
|
|
1633
|
+
const p = ((c = s.form) == null ? void 0 : c.colSpan) || 1;
|
|
1634
|
+
return Math.round(24 / r.formCols * p);
|
|
1635
|
+
}
|
|
1636
|
+
function n(s) {
|
|
1637
|
+
var p, c, k;
|
|
1638
|
+
return (p = s.form) != null && p.dictKey && ((c = r.dictMap) != null && c[s.form.dictKey]) ? r.dictMap[s.form.dictKey] : ((k = s.form) == null ? void 0 : k.options) || [];
|
|
1639
|
+
}
|
|
1640
|
+
function d(s) {
|
|
1641
|
+
var c, k;
|
|
1642
|
+
const p = (c = s.form) == null ? void 0 : c.rules;
|
|
1643
|
+
if ((k = s.form) != null && k.required) {
|
|
1644
|
+
const f = { required: !0, message: t("formTable", "inputPlaceholder", { label: s.label }), trigger: "blur" };
|
|
1645
|
+
return p ? [...p, f] : [f];
|
|
1646
|
+
}
|
|
1647
|
+
return p;
|
|
1648
|
+
}
|
|
1649
|
+
return (s, p) => (i(), w(a(Ye), {
|
|
1650
|
+
ref_key: "formRef",
|
|
1651
|
+
ref: o,
|
|
1652
|
+
model: e.formData,
|
|
1653
|
+
"label-width": e.formLabelWidth,
|
|
1654
|
+
size: e.size,
|
|
1655
|
+
"label-position": "top"
|
|
1656
|
+
}, {
|
|
1657
|
+
default: v(() => [
|
|
1658
|
+
T(a(Je), { gutter: 20 }, {
|
|
1659
|
+
default: v(() => [
|
|
1660
|
+
(i(!0), D(O, null, K(m.value, (c) => (i(), w(a(xe), {
|
|
1661
|
+
key: c.prop,
|
|
1662
|
+
span: b(c)
|
|
1663
|
+
}, {
|
|
1664
|
+
default: v(() => {
|
|
1665
|
+
var k;
|
|
1666
|
+
return [
|
|
1667
|
+
T(a(ze), {
|
|
1668
|
+
prop: c.prop,
|
|
1669
|
+
label: c.label,
|
|
1670
|
+
rules: d(c),
|
|
1671
|
+
required: (k = c.form) == null ? void 0 : k.required
|
|
1672
|
+
}, {
|
|
1673
|
+
default: v(() => [
|
|
1674
|
+
h(c) === "input" ? (i(), w(a(ge), I({
|
|
1675
|
+
key: 0,
|
|
1676
|
+
modelValue: e.formData[c.prop],
|
|
1677
|
+
"onUpdate:modelValue": (f) => e.formData[c.prop] = f
|
|
1678
|
+
}, { ref_for: !0 }, u(c), {
|
|
1679
|
+
placeholder: C(c),
|
|
1680
|
+
disabled: g(c),
|
|
1681
|
+
clearable: ""
|
|
1682
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(c) === "number" ? (i(), w(a(Ia), I({
|
|
1683
|
+
key: 1,
|
|
1684
|
+
modelValue: e.formData[c.prop],
|
|
1685
|
+
"onUpdate:modelValue": (f) => e.formData[c.prop] = f
|
|
1686
|
+
}, { ref_for: !0 }, u(c), {
|
|
1687
|
+
placeholder: C(c),
|
|
1688
|
+
disabled: g(c),
|
|
1689
|
+
style: { width: "100%" }
|
|
1690
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(c) === "select" ? (i(), w(a(ue), I({
|
|
1691
|
+
key: 2,
|
|
1692
|
+
modelValue: e.formData[c.prop],
|
|
1693
|
+
"onUpdate:modelValue": (f) => e.formData[c.prop] = f
|
|
1694
|
+
}, { ref_for: !0 }, u(c), {
|
|
1695
|
+
placeholder: C(c),
|
|
1696
|
+
disabled: g(c),
|
|
1697
|
+
clearable: "",
|
|
1698
|
+
style: { width: "100%" }
|
|
1699
|
+
}), {
|
|
1700
|
+
default: v(() => [
|
|
1701
|
+
(i(!0), D(O, null, K(n(c), (f) => (i(), w(a(de), {
|
|
1702
|
+
key: f.value,
|
|
1703
|
+
label: f.label,
|
|
1704
|
+
value: f.value
|
|
1705
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
1706
|
+
]),
|
|
1707
|
+
_: 2
|
|
1708
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(c) === "radio" ? (i(), w(a(ca), I({
|
|
1709
|
+
key: 3,
|
|
1710
|
+
modelValue: e.formData[c.prop],
|
|
1711
|
+
"onUpdate:modelValue": (f) => e.formData[c.prop] = f
|
|
1712
|
+
}, { ref_for: !0 }, u(c), {
|
|
1713
|
+
disabled: g(c)
|
|
1714
|
+
}), {
|
|
1715
|
+
default: v(() => [
|
|
1716
|
+
(i(!0), D(O, null, K(n(c), (f) => (i(), w(a(Qe), {
|
|
1717
|
+
key: f.value,
|
|
1718
|
+
value: f.value
|
|
1719
|
+
}, {
|
|
1720
|
+
default: v(() => [
|
|
1721
|
+
M(F(f.label), 1)
|
|
1722
|
+
]),
|
|
1723
|
+
_: 2
|
|
1724
|
+
}, 1032, ["value"]))), 128))
|
|
1725
|
+
]),
|
|
1726
|
+
_: 2
|
|
1727
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : h(c) === "checkbox" ? (i(), w(a(fa), I({
|
|
1728
|
+
key: 4,
|
|
1729
|
+
modelValue: e.formData[c.prop],
|
|
1730
|
+
"onUpdate:modelValue": (f) => e.formData[c.prop] = f
|
|
1731
|
+
}, { ref_for: !0 }, u(c), {
|
|
1732
|
+
disabled: g(c)
|
|
1733
|
+
}), {
|
|
1734
|
+
default: v(() => [
|
|
1735
|
+
(i(!0), D(O, null, K(n(c), (f) => (i(), w(a(Ce), {
|
|
1736
|
+
key: f.value,
|
|
1737
|
+
value: f.value,
|
|
1738
|
+
label: f.label
|
|
1739
|
+
}, null, 8, ["value", "label"]))), 128))
|
|
1740
|
+
]),
|
|
1741
|
+
_: 2
|
|
1742
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : h(c) === "date" ? (i(), w(a(ve), I({
|
|
1743
|
+
key: 5,
|
|
1744
|
+
modelValue: e.formData[c.prop],
|
|
1745
|
+
"onUpdate:modelValue": (f) => e.formData[c.prop] = f
|
|
1746
|
+
}, { ref_for: !0 }, u(c), {
|
|
1747
|
+
placeholder: C(c),
|
|
1748
|
+
disabled: g(c),
|
|
1749
|
+
style: { width: "100%" }
|
|
1750
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(c) === "date-range" ? (i(), w(a(ve), I({
|
|
1751
|
+
key: 6,
|
|
1752
|
+
modelValue: e.formData[c.prop],
|
|
1753
|
+
"onUpdate:modelValue": (f) => e.formData[c.prop] = f,
|
|
1754
|
+
type: "daterange"
|
|
1755
|
+
}, { ref_for: !0 }, u(c), {
|
|
1756
|
+
placeholder: C(c),
|
|
1757
|
+
disabled: g(c),
|
|
1758
|
+
style: { width: "100%" }
|
|
1759
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(c) === "textarea" ? (i(), w(a(ge), I({
|
|
1760
|
+
key: 7,
|
|
1761
|
+
modelValue: e.formData[c.prop],
|
|
1762
|
+
"onUpdate:modelValue": (f) => e.formData[c.prop] = f,
|
|
1763
|
+
type: "textarea"
|
|
1764
|
+
}, { ref_for: !0 }, u(c), {
|
|
1765
|
+
placeholder: C(c),
|
|
1766
|
+
disabled: g(c)
|
|
1767
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(c) === "switch" ? (i(), w(a($a), I({
|
|
1768
|
+
key: 8,
|
|
1769
|
+
modelValue: e.formData[c.prop],
|
|
1770
|
+
"onUpdate:modelValue": (f) => e.formData[c.prop] = f
|
|
1771
|
+
}, { ref_for: !0 }, u(c), {
|
|
1772
|
+
disabled: g(c)
|
|
1773
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : L("", !0)
|
|
1774
|
+
]),
|
|
1775
|
+
_: 2
|
|
1776
|
+
}, 1032, ["prop", "label", "rules", "required"])
|
|
1777
|
+
];
|
|
1778
|
+
}),
|
|
1779
|
+
_: 2
|
|
1780
|
+
}, 1032, ["span"]))), 128))
|
|
1781
|
+
]),
|
|
1782
|
+
_: 1
|
|
1783
|
+
})
|
|
1784
|
+
]),
|
|
1785
|
+
_: 1
|
|
1786
|
+
}, 8, ["model", "label-width", "size"]));
|
|
1127
1787
|
}
|
|
1128
|
-
}),
|
|
1788
|
+
}), Tt = /* @__PURE__ */ H({
|
|
1129
1789
|
__name: "FormDrawer",
|
|
1130
1790
|
props: {
|
|
1131
1791
|
visible: { type: Boolean },
|
|
1132
1792
|
drawerMode: {},
|
|
1133
|
-
|
|
1793
|
+
formMode: {},
|
|
1134
1794
|
editingRow: {},
|
|
1135
1795
|
formData: {},
|
|
1136
1796
|
drawerCfg: {},
|
|
1797
|
+
columns: {},
|
|
1137
1798
|
size: {},
|
|
1138
|
-
saving: { type: Boolean }
|
|
1799
|
+
saving: { type: Boolean },
|
|
1800
|
+
dictMap: {}
|
|
1139
1801
|
},
|
|
1140
1802
|
emits: ["update:visible", "save"],
|
|
1141
|
-
setup(e) {
|
|
1142
|
-
|
|
1803
|
+
setup(e, { emit: l }) {
|
|
1804
|
+
const { t } = _(), r = e, o = l, m = A();
|
|
1805
|
+
async function h() {
|
|
1806
|
+
if (m.value)
|
|
1807
|
+
try {
|
|
1808
|
+
await m.value.validate();
|
|
1809
|
+
} catch {
|
|
1810
|
+
return;
|
|
1811
|
+
}
|
|
1812
|
+
o("save");
|
|
1813
|
+
}
|
|
1814
|
+
const u = V(() => r.formMode === "view" ? r.drawerCfg.viewTitle || t("formTable", "viewTitle") : r.formMode === "edit" ? r.drawerCfg.editTitle || t("formTable", "editTitle") : r.drawerCfg.addTitle || t("formTable", "addTitle")), C = V(() => {
|
|
1815
|
+
var g;
|
|
1816
|
+
return (g = r.columns) != null && g.length ? r.columns.map((b) => {
|
|
1817
|
+
const n = r.formData[b.prop];
|
|
1818
|
+
return {
|
|
1819
|
+
key: b.prop,
|
|
1820
|
+
label: b.label,
|
|
1821
|
+
value: n != null && n !== "" ? String(n) : "-",
|
|
1822
|
+
isEmpty: n == null || n === ""
|
|
1823
|
+
};
|
|
1824
|
+
}) : Object.keys(r.formData).map((b) => {
|
|
1825
|
+
const n = r.formData[b];
|
|
1826
|
+
return {
|
|
1827
|
+
key: b,
|
|
1828
|
+
label: b,
|
|
1829
|
+
value: n != null && n !== "" ? String(n) : "-",
|
|
1830
|
+
isEmpty: n == null || n === ""
|
|
1831
|
+
};
|
|
1832
|
+
});
|
|
1833
|
+
});
|
|
1834
|
+
return (g, b) => e.drawerMode === "drawer" ? (i(), w(a(Tl), {
|
|
1143
1835
|
key: 0,
|
|
1144
1836
|
"model-value": e.visible,
|
|
1145
|
-
"onUpdate:modelValue":
|
|
1146
|
-
title:
|
|
1837
|
+
"onUpdate:modelValue": b[2] || (b[2] = (n) => g.$emit("update:visible", n)),
|
|
1838
|
+
title: u.value,
|
|
1147
1839
|
size: e.drawerCfg.width || "40%",
|
|
1148
1840
|
"destroy-on-close": e.drawerCfg.closeOnReset !== !1
|
|
1149
1841
|
}, {
|
|
1150
|
-
footer:
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1842
|
+
footer: v(() => [
|
|
1843
|
+
e.formMode !== "view" ? (i(), D(O, { key: 0 }, [
|
|
1844
|
+
T(a(q), {
|
|
1845
|
+
size: e.size,
|
|
1846
|
+
round: "",
|
|
1847
|
+
onClick: b[0] || (b[0] = (n) => g.$emit("update:visible", !1))
|
|
1848
|
+
}, {
|
|
1849
|
+
default: v(() => [
|
|
1850
|
+
M(F(a(t)("formTable", "cancel")), 1)
|
|
1851
|
+
]),
|
|
1852
|
+
_: 1
|
|
1853
|
+
}, 8, ["size"]),
|
|
1854
|
+
T(a(q), {
|
|
1855
|
+
type: "primary",
|
|
1856
|
+
size: e.size,
|
|
1857
|
+
round: "",
|
|
1858
|
+
loading: e.saving,
|
|
1859
|
+
onClick: h
|
|
1860
|
+
}, {
|
|
1861
|
+
default: v(() => [
|
|
1862
|
+
M(F(a(t)("formTable", "confirm")), 1)
|
|
1863
|
+
]),
|
|
1864
|
+
_: 1
|
|
1865
|
+
}, 8, ["size", "loading"])
|
|
1866
|
+
], 64)) : (i(), w(a(q), {
|
|
1867
|
+
key: 1,
|
|
1163
1868
|
size: e.size,
|
|
1164
1869
|
round: "",
|
|
1165
|
-
|
|
1166
|
-
onClick: l[1] || (l[1] = (a) => n.$emit("save"))
|
|
1870
|
+
onClick: b[1] || (b[1] = (n) => g.$emit("update:visible", !1))
|
|
1167
1871
|
}, {
|
|
1168
|
-
default:
|
|
1169
|
-
|
|
1170
|
-
])
|
|
1872
|
+
default: v(() => [
|
|
1873
|
+
M(F(a(t)("formTable", "close")), 1)
|
|
1874
|
+
]),
|
|
1171
1875
|
_: 1
|
|
1172
|
-
}, 8, ["size"
|
|
1876
|
+
}, 8, ["size"]))
|
|
1173
1877
|
]),
|
|
1174
|
-
default:
|
|
1175
|
-
|
|
1878
|
+
default: v(() => [
|
|
1879
|
+
e.formMode !== "view" ? Y(g.$slots, e.formMode + "-form", {
|
|
1880
|
+
key: 0,
|
|
1176
1881
|
row: e.editingRow,
|
|
1177
1882
|
formData: e.formData
|
|
1178
|
-
})
|
|
1883
|
+
}, () => [
|
|
1884
|
+
T(Ba, {
|
|
1885
|
+
ref_key: "formAutoRef",
|
|
1886
|
+
ref: m,
|
|
1887
|
+
"form-data": e.formData,
|
|
1888
|
+
columns: e.columns || [],
|
|
1889
|
+
"form-mode": e.formMode,
|
|
1890
|
+
"form-cols": e.drawerCfg.formCols || 2,
|
|
1891
|
+
"form-label-width": e.drawerCfg.formLabelWidth || "80px",
|
|
1892
|
+
size: e.size,
|
|
1893
|
+
"dict-map": e.dictMap
|
|
1894
|
+
}, null, 8, ["form-data", "columns", "form-mode", "form-cols", "form-label-width", "size", "dict-map"])
|
|
1895
|
+
]) : Y(g.$slots, "view-form", {
|
|
1896
|
+
key: 1,
|
|
1897
|
+
row: e.editingRow,
|
|
1898
|
+
formData: e.formData
|
|
1899
|
+
}, () => [
|
|
1900
|
+
T(a(xa), {
|
|
1901
|
+
column: 1,
|
|
1902
|
+
border: ""
|
|
1903
|
+
}, {
|
|
1904
|
+
default: v(() => [
|
|
1905
|
+
(i(!0), D(O, null, K(C.value, (n) => (i(), w(a(za), {
|
|
1906
|
+
key: n.key,
|
|
1907
|
+
label: n.label
|
|
1908
|
+
}, {
|
|
1909
|
+
default: v(() => [
|
|
1910
|
+
M(F(n.isEmpty ? a(t)("formTable", "empty") : n.value), 1)
|
|
1911
|
+
]),
|
|
1912
|
+
_: 2
|
|
1913
|
+
}, 1032, ["label"]))), 128))
|
|
1914
|
+
]),
|
|
1915
|
+
_: 1
|
|
1916
|
+
})
|
|
1917
|
+
])
|
|
1179
1918
|
]),
|
|
1180
1919
|
_: 3
|
|
1181
|
-
}, 8, ["model-value", "title", "size", "destroy-on-close"])) : (i(),
|
|
1920
|
+
}, 8, ["model-value", "title", "size", "destroy-on-close"])) : (i(), w(a(Ua), {
|
|
1182
1921
|
key: 1,
|
|
1183
1922
|
"model-value": e.visible,
|
|
1184
|
-
"onUpdate:modelValue":
|
|
1185
|
-
title:
|
|
1923
|
+
"onUpdate:modelValue": b[5] || (b[5] = (n) => g.$emit("update:visible", n)),
|
|
1924
|
+
title: u.value,
|
|
1186
1925
|
width: e.drawerCfg.width || "600px",
|
|
1187
1926
|
"destroy-on-close": e.drawerCfg.closeOnReset !== !1
|
|
1188
1927
|
}, {
|
|
1189
|
-
footer:
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1928
|
+
footer: v(() => [
|
|
1929
|
+
e.formMode !== "view" ? (i(), D(O, { key: 0 }, [
|
|
1930
|
+
T(a(q), {
|
|
1931
|
+
size: e.size,
|
|
1932
|
+
round: "",
|
|
1933
|
+
onClick: b[3] || (b[3] = (n) => g.$emit("update:visible", !1))
|
|
1934
|
+
}, {
|
|
1935
|
+
default: v(() => [
|
|
1936
|
+
M(F(a(t)("formTable", "cancel")), 1)
|
|
1937
|
+
]),
|
|
1938
|
+
_: 1
|
|
1939
|
+
}, 8, ["size"]),
|
|
1940
|
+
T(a(q), {
|
|
1941
|
+
type: "primary",
|
|
1942
|
+
size: e.size,
|
|
1943
|
+
round: "",
|
|
1944
|
+
loading: e.saving,
|
|
1945
|
+
onClick: h
|
|
1946
|
+
}, {
|
|
1947
|
+
default: v(() => [
|
|
1948
|
+
M(F(a(t)("formTable", "confirm")), 1)
|
|
1949
|
+
]),
|
|
1950
|
+
_: 1
|
|
1951
|
+
}, 8, ["size", "loading"])
|
|
1952
|
+
], 64)) : (i(), w(a(q), {
|
|
1953
|
+
key: 1,
|
|
1202
1954
|
size: e.size,
|
|
1203
1955
|
round: "",
|
|
1204
|
-
|
|
1205
|
-
onClick: l[4] || (l[4] = (a) => n.$emit("save"))
|
|
1956
|
+
onClick: b[4] || (b[4] = (n) => g.$emit("update:visible", !1))
|
|
1206
1957
|
}, {
|
|
1207
|
-
default:
|
|
1208
|
-
|
|
1209
|
-
])
|
|
1958
|
+
default: v(() => [
|
|
1959
|
+
M(F(a(t)("formTable", "close")), 1)
|
|
1960
|
+
]),
|
|
1210
1961
|
_: 1
|
|
1211
|
-
}, 8, ["size"
|
|
1962
|
+
}, 8, ["size"]))
|
|
1212
1963
|
]),
|
|
1213
|
-
default:
|
|
1214
|
-
|
|
1964
|
+
default: v(() => [
|
|
1965
|
+
e.formMode !== "view" ? Y(g.$slots, e.formMode + "-form", {
|
|
1966
|
+
key: 0,
|
|
1215
1967
|
row: e.editingRow,
|
|
1216
1968
|
formData: e.formData
|
|
1217
|
-
})
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1969
|
+
}, () => [
|
|
1970
|
+
T(Ba, {
|
|
1971
|
+
ref_key: "formAutoRef",
|
|
1972
|
+
ref: m,
|
|
1973
|
+
"form-data": e.formData,
|
|
1974
|
+
columns: e.columns || [],
|
|
1975
|
+
"form-mode": e.formMode,
|
|
1976
|
+
"form-cols": e.drawerCfg.formCols || 2,
|
|
1977
|
+
"form-label-width": e.drawerCfg.formLabelWidth || "80px",
|
|
1978
|
+
size: e.size,
|
|
1979
|
+
"dict-map": e.dictMap
|
|
1980
|
+
}, null, 8, ["form-data", "columns", "form-mode", "form-cols", "form-label-width", "size", "dict-map"])
|
|
1981
|
+
]) : Y(g.$slots, "view-form", {
|
|
1982
|
+
key: 1,
|
|
1983
|
+
row: e.editingRow,
|
|
1984
|
+
formData: e.formData
|
|
1985
|
+
}, () => [
|
|
1986
|
+
T(a(xa), {
|
|
1987
|
+
column: 1,
|
|
1988
|
+
border: ""
|
|
1989
|
+
}, {
|
|
1990
|
+
default: v(() => [
|
|
1991
|
+
(i(!0), D(O, null, K(C.value, (n) => (i(), w(a(za), {
|
|
1992
|
+
key: n.key,
|
|
1993
|
+
label: n.label
|
|
1994
|
+
}, {
|
|
1995
|
+
default: v(() => [
|
|
1996
|
+
M(F(n.isEmpty ? a(t)("formTable", "empty") : n.value), 1)
|
|
1997
|
+
]),
|
|
1998
|
+
_: 2
|
|
1999
|
+
}, 1032, ["label"]))), 128))
|
|
2000
|
+
]),
|
|
2001
|
+
_: 1
|
|
2002
|
+
})
|
|
2003
|
+
])
|
|
2004
|
+
]),
|
|
2005
|
+
_: 3
|
|
2006
|
+
}, 8, ["model-value", "title", "width", "destroy-on-close"]));
|
|
2007
|
+
}
|
|
2008
|
+
}), Et = { key: 0 }, Pt = { key: 1 }, Bt = { key: 2 }, Ft = { class: "ee-action-btns" }, Rt = {
|
|
2009
|
+
key: 0,
|
|
2010
|
+
class: "ee-pagination"
|
|
2011
|
+
}, Le = /* @__PURE__ */ H({
|
|
2012
|
+
name: "EeFormTable",
|
|
2013
|
+
__name: "index",
|
|
2014
|
+
props: {
|
|
1229
2015
|
columns: {},
|
|
1230
2016
|
data: {},
|
|
1231
2017
|
loading: { type: Boolean, default: !1 },
|
|
2018
|
+
readOnly: { type: Boolean, default: !1 },
|
|
1232
2019
|
searchConfig: {},
|
|
1233
2020
|
pagination: {},
|
|
1234
2021
|
actionConfig: { type: [Object, Boolean] },
|
|
@@ -1242,7 +2029,7 @@ const qa = {
|
|
|
1242
2029
|
dictMap: {},
|
|
1243
2030
|
authChecker: {},
|
|
1244
2031
|
authMode: { default: "hide" },
|
|
1245
|
-
emptyText: { default: "
|
|
2032
|
+
emptyText: { default: "" },
|
|
1246
2033
|
tableHeight: {},
|
|
1247
2034
|
tableMaxHeight: {},
|
|
1248
2035
|
size: { default: "default" },
|
|
@@ -1252,444 +2039,1684 @@ const qa = {
|
|
|
1252
2039
|
rowKey: { default: "id" }
|
|
1253
2040
|
},
|
|
1254
2041
|
emits: ["search", "search-reset", "page-change", "selection-change", "current-change", "size-change", "sort-change", "row-click", "row-dblclick", "view", "add", "edit", "delete", "batch-delete", "import", "export", "add-success", "edit-success", "delete-success", "batch-delete-success", "request-error", "column-visible-change", "form-save"],
|
|
1255
|
-
setup(e, { expose:
|
|
1256
|
-
const
|
|
1257
|
-
searchExpanded:
|
|
1258
|
-
searchParams:
|
|
1259
|
-
showSearch:
|
|
1260
|
-
searchCols:
|
|
1261
|
-
visibleSearchFields:
|
|
2042
|
+
setup(e, { expose: l, emit: t }) {
|
|
2043
|
+
const { t: r } = _(), o = e, m = he("eeGlobalConfig", {}), h = V(() => o.readOnly ?? m.readOnly ?? !1), u = t, C = st(o), g = ut(o), {
|
|
2044
|
+
searchExpanded: b,
|
|
2045
|
+
searchParams: n,
|
|
2046
|
+
showSearch: d,
|
|
2047
|
+
searchCols: s,
|
|
2048
|
+
visibleSearchFields: p,
|
|
1262
2049
|
showFoldBtn: c,
|
|
1263
|
-
actionColSpan:
|
|
1264
|
-
initSearchParams:
|
|
1265
|
-
getActiveSearchParams:
|
|
1266
|
-
resetSearchParams:
|
|
1267
|
-
toggleFold:
|
|
1268
|
-
} =
|
|
1269
|
-
pageState:
|
|
1270
|
-
showPagination:
|
|
1271
|
-
pageSizesComputed:
|
|
1272
|
-
paginationLayoutComputed:
|
|
1273
|
-
paginationBgComputed:
|
|
1274
|
-
setPage:
|
|
1275
|
-
setPageSize:
|
|
1276
|
-
resetPage:
|
|
1277
|
-
} =
|
|
1278
|
-
tableRef:
|
|
1279
|
-
selection:
|
|
1280
|
-
singleSelection:
|
|
1281
|
-
columnSettingVisible:
|
|
1282
|
-
checkedColumns:
|
|
1283
|
-
showColumnSetting:
|
|
1284
|
-
allColumns:
|
|
1285
|
-
visibleColumns:
|
|
1286
|
-
tableComputedHeight:
|
|
1287
|
-
tableMaxHeightProp:
|
|
1288
|
-
tableWrapperStyle:
|
|
1289
|
-
selectionCfg:
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
2050
|
+
actionColSpan: k,
|
|
2051
|
+
initSearchParams: f,
|
|
2052
|
+
getActiveSearchParams: z,
|
|
2053
|
+
resetSearchParams: U,
|
|
2054
|
+
toggleFold: le
|
|
2055
|
+
} = dt(o), {
|
|
2056
|
+
pageState: G,
|
|
2057
|
+
showPagination: pe,
|
|
2058
|
+
pageSizesComputed: be,
|
|
2059
|
+
paginationLayoutComputed: Ve,
|
|
2060
|
+
paginationBgComputed: ke,
|
|
2061
|
+
setPage: Te,
|
|
2062
|
+
setPageSize: E,
|
|
2063
|
+
resetPage: oe
|
|
2064
|
+
} = ct(o), B = ft(o, { authPass: C.authPass }), {
|
|
2065
|
+
tableRef: P,
|
|
2066
|
+
selection: j,
|
|
2067
|
+
singleSelection: te,
|
|
2068
|
+
columnSettingVisible: ne,
|
|
2069
|
+
checkedColumns: Ka,
|
|
2070
|
+
showColumnSetting: qa,
|
|
2071
|
+
allColumns: Ha,
|
|
2072
|
+
visibleColumns: la,
|
|
2073
|
+
tableComputedHeight: Wa,
|
|
2074
|
+
tableMaxHeightProp: ja,
|
|
2075
|
+
tableWrapperStyle: Ga,
|
|
2076
|
+
selectionCfg: ce,
|
|
2077
|
+
showIndex: ma,
|
|
2078
|
+
selectionVisible: ta,
|
|
2079
|
+
handleSelectionChange: Xa,
|
|
2080
|
+
handleSingleSelect: Ya
|
|
2081
|
+
} = B, Ja = mt(o, {
|
|
2082
|
+
searchParams: n,
|
|
2083
|
+
getActiveSearchParams: z,
|
|
2084
|
+
pageState: G,
|
|
2085
|
+
resetPage: oe,
|
|
2086
|
+
setTotal: (y) => {
|
|
2087
|
+
G.total = y;
|
|
1299
2088
|
},
|
|
1300
|
-
selection:
|
|
1301
|
-
emit: (
|
|
2089
|
+
selection: j,
|
|
2090
|
+
emit: (y, ...S) => u(y, ...S),
|
|
2091
|
+
t: r
|
|
1302
2092
|
}), {
|
|
1303
|
-
internalData:
|
|
1304
|
-
loadingState:
|
|
1305
|
-
hasCrud:
|
|
1306
|
-
fetchData:
|
|
1307
|
-
refreshTable:
|
|
1308
|
-
handleDelete:
|
|
1309
|
-
handleBatchDelete:
|
|
1310
|
-
} =
|
|
1311
|
-
visibleColumns:
|
|
1312
|
-
getActiveSearchParams:
|
|
1313
|
-
dictLabel:
|
|
1314
|
-
internalData:
|
|
1315
|
-
fetchData:
|
|
1316
|
-
setLoading: (
|
|
1317
|
-
|
|
2093
|
+
internalData: oa,
|
|
2094
|
+
loadingState: ha,
|
|
2095
|
+
hasCrud: fe,
|
|
2096
|
+
fetchData: ie,
|
|
2097
|
+
refreshTable: ga,
|
|
2098
|
+
handleDelete: va,
|
|
2099
|
+
handleBatchDelete: Qa
|
|
2100
|
+
} = Ja, W = ht(o), ra = A(!1), Re = A(!1), Ee = A([]), pa = A([]), { handleExport: Za } = gt(o, {
|
|
2101
|
+
visibleColumns: la,
|
|
2102
|
+
getActiveSearchParams: z,
|
|
2103
|
+
dictLabel: g.dictLabel,
|
|
2104
|
+
internalData: oa,
|
|
2105
|
+
fetchData: ie,
|
|
2106
|
+
setLoading: (y) => {
|
|
2107
|
+
ha.value = y;
|
|
1318
2108
|
},
|
|
1319
|
-
getCurrentData: () =>
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
2109
|
+
getCurrentData: () => o.data || oa.value,
|
|
2110
|
+
t: r
|
|
2111
|
+
}), se = V(() => ({
|
|
2112
|
+
visible: !!W.formVisible.value,
|
|
2113
|
+
drawerMode: W.drawerMode,
|
|
2114
|
+
formMode: W.formMode.value || "add",
|
|
2115
|
+
editingRow: W.editingRow.value ?? null,
|
|
2116
|
+
formData: W.formData.value ?? {},
|
|
2117
|
+
drawerCfg: W.drawerCfg,
|
|
2118
|
+
saving: W.saving.value ?? !1,
|
|
2119
|
+
onVisibleChange: (y) => {
|
|
2120
|
+
W.formVisible.value = y;
|
|
1330
2121
|
}
|
|
1331
|
-
})),
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
2122
|
+
})), ee = V(() => {
|
|
2123
|
+
if (o.actionConfig === !1) return Ea;
|
|
2124
|
+
const y = {
|
|
2125
|
+
...Ta,
|
|
2126
|
+
label: r("formTable", "operation"),
|
|
2127
|
+
viewText: r("formTable", "view"),
|
|
2128
|
+
editText: r("formTable", "edit"),
|
|
2129
|
+
deleteText: r("formTable", "delete"),
|
|
2130
|
+
versionText: r("formTable", "version"),
|
|
2131
|
+
deleteConfirmTitle: r("formTable", "confirmDelete"),
|
|
2132
|
+
deleteConfirmMessage: r("formTable", "confirmDeleteMsg")
|
|
2133
|
+
};
|
|
2134
|
+
if (o.actionConfig === !0) return y;
|
|
2135
|
+
if (!o.actionConfig) return Ea;
|
|
2136
|
+
const S = { ...y, ...o.actionConfig };
|
|
2137
|
+
return h.value && (S.showView = S.showView ?? !0, S.showEdit = !1, S.showDelete = !1, S.showVersion = !1), S;
|
|
2138
|
+
}), Pe = V(() => ee.value.buttonMode || "text"), Ae = V(() => Math.max(1, ee.value.maxButtons ?? Ta.maxButtons)), _a = V(() => {
|
|
2139
|
+
const y = ee.value;
|
|
2140
|
+
if (y.width) return y.width;
|
|
2141
|
+
const S = Pe.value, $ = Ae.value, x = S === "icon" ? 34 : S === "icon-text" ? 78 : 60, R = sa.value || [];
|
|
2142
|
+
let X = 0, ye = !1;
|
|
2143
|
+
for (const Ue of R) {
|
|
2144
|
+
const Be = ia(Ue);
|
|
2145
|
+
X = Math.max(X, Math.min(Be, $)), Be > $ && (ye = !0);
|
|
1335
2146
|
}
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
2147
|
+
return X = Math.max(1, X), X * x + (X - 1) * 2 + (ye ? 32 : 0) + 36;
|
|
2148
|
+
});
|
|
2149
|
+
function na(y) {
|
|
2150
|
+
const S = ee.value, $ = [];
|
|
2151
|
+
if (S.beforeButtons)
|
|
2152
|
+
for (const R of S.beforeButtons)
|
|
2153
|
+
(!R.show || R.show(y)) && C.authPass(R.auth) && $.push({
|
|
2154
|
+
text: R.text,
|
|
2155
|
+
iconComponent: R.icon,
|
|
2156
|
+
type: R.type,
|
|
2157
|
+
handler: () => R.handler(y)
|
|
2158
|
+
});
|
|
2159
|
+
S.showView && C.authPass(S.viewAuth) && $.push({
|
|
2160
|
+
text: S.viewText || r("formTable", "view"),
|
|
2161
|
+
iconComponent: et,
|
|
2162
|
+
type: "primary",
|
|
2163
|
+
handler: () => {
|
|
2164
|
+
S.onView ? S.onView(y) : il(y);
|
|
2165
|
+
}
|
|
2166
|
+
}), S.showEdit && C.authPass(S.editAuth) && $.push({
|
|
2167
|
+
text: S.editText || r("formTable", "edit"),
|
|
2168
|
+
iconComponent: Hl,
|
|
2169
|
+
type: "primary",
|
|
2170
|
+
handler: () => {
|
|
2171
|
+
S.onEdit ? S.onEdit(y) : nl(y);
|
|
2172
|
+
}
|
|
2173
|
+
}), S.showDelete && C.authPass(S.deleteAuth) && $.push({
|
|
2174
|
+
text: S.deleteText || r("formTable", "delete"),
|
|
2175
|
+
iconComponent: Kl,
|
|
2176
|
+
type: "danger",
|
|
2177
|
+
_isDelete: !0,
|
|
2178
|
+
handler: () => {
|
|
2179
|
+
S.onDelete ? S.onDelete(y) : sl(y);
|
|
2180
|
+
}
|
|
2181
|
+
}), S.showVersion && C.authPass(S.versionAuth) && $.push({
|
|
2182
|
+
text: S.versionText || r("formTable", "version"),
|
|
2183
|
+
type: "primary",
|
|
2184
|
+
handler: () => hl(y)
|
|
2185
|
+
});
|
|
2186
|
+
const x = S.afterButtons || S.customButtons || [];
|
|
2187
|
+
for (const R of x)
|
|
2188
|
+
(!R.show || R.show(y)) && C.authPass(R.auth) && $.push({
|
|
2189
|
+
text: R.text,
|
|
2190
|
+
iconComponent: R.icon,
|
|
2191
|
+
type: R.type || "default",
|
|
2192
|
+
handler: () => R.handler(y)
|
|
2193
|
+
});
|
|
2194
|
+
return $;
|
|
2195
|
+
}
|
|
2196
|
+
function ia(y) {
|
|
2197
|
+
return na(y).length;
|
|
2198
|
+
}
|
|
2199
|
+
const ba = V(() => {
|
|
2200
|
+
if (o.toolbarConfig === !1) return Pa;
|
|
2201
|
+
const y = { ...ot };
|
|
2202
|
+
if (o.toolbarConfig === !0) return { ...y, show: !0 };
|
|
2203
|
+
if (!o.toolbarConfig) return Pa;
|
|
2204
|
+
const S = { ...y, ...o.toolbarConfig };
|
|
2205
|
+
return h.value && (S.showAdd = !1, S.showImport = !1, S.showExport = !1, S.showBatchDelete = !1), S;
|
|
2206
|
+
}), sa = V(() => fe.value ? oa.value : o.data || []);
|
|
2207
|
+
re(sa, (y) => {
|
|
2208
|
+
!fe.value && y && (typeof o.pagination == "object" && o.pagination && "total" in o.pagination || (G.total = y.length));
|
|
2209
|
+
}, { immediate: !0 });
|
|
2210
|
+
const el = V(() => ha.value || o.loading);
|
|
2211
|
+
function al() {
|
|
2212
|
+
oe();
|
|
2213
|
+
const y = z();
|
|
2214
|
+
u("search", y), fe.value && ie();
|
|
2215
|
+
}
|
|
2216
|
+
function ll() {
|
|
2217
|
+
U(), u("search-reset"), fe.value ? ie() : u("search", {});
|
|
2218
|
+
}
|
|
2219
|
+
function tl(y) {
|
|
2220
|
+
Te(y), u("current-change", y), u("page-change", { currentPage: y, pageSize: G.pageSize }), fe.value && ie();
|
|
2221
|
+
}
|
|
2222
|
+
function ol(y) {
|
|
2223
|
+
E(y), oe(), u("size-change", y), u("page-change", { currentPage: 1, pageSize: y }), fe.value && ie();
|
|
2224
|
+
}
|
|
2225
|
+
function rl() {
|
|
2226
|
+
var S;
|
|
2227
|
+
W.openAdd();
|
|
2228
|
+
const y = {};
|
|
2229
|
+
for (const $ of o.columns)
|
|
2230
|
+
((S = $.form) == null ? void 0 : S.defaultValue) !== void 0 && (y[$.prop] = $.form.defaultValue);
|
|
2231
|
+
W.formData.value = { ...y }, u("add");
|
|
2232
|
+
}
|
|
2233
|
+
function nl(y) {
|
|
2234
|
+
W.openEdit(y), u("edit", y);
|
|
2235
|
+
}
|
|
2236
|
+
function il(y) {
|
|
2237
|
+
W.openView(y), u("view", y);
|
|
2238
|
+
}
|
|
2239
|
+
function sl(y) {
|
|
2240
|
+
va(y);
|
|
2241
|
+
}
|
|
2242
|
+
async function ul(y) {
|
|
2243
|
+
try {
|
|
2244
|
+
await Ma.confirm(
|
|
2245
|
+
ee.value.deleteConfirmMessage || r("formTable", "confirmDeleteMsg"),
|
|
2246
|
+
ee.value.deleteConfirmTitle || r("formTable", "confirmDelete"),
|
|
2247
|
+
{ confirmButtonText: r("formTable", "confirm"), cancelButtonText: r("formTable", "cancel"), type: "warning" }
|
|
2248
|
+
), va(y);
|
|
2249
|
+
} catch {
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
function dl() {
|
|
2253
|
+
Qa();
|
|
2254
|
+
}
|
|
2255
|
+
function cl() {
|
|
2256
|
+
u("export"), Za();
|
|
2257
|
+
}
|
|
2258
|
+
async function fl() {
|
|
2259
|
+
ra.value = !0;
|
|
1378
2260
|
try {
|
|
1379
|
-
|
|
1380
|
-
} catch (s) {
|
|
1381
|
-
r("request-error", s);
|
|
2261
|
+
await ga(), J.success(r("formTable", "refreshSuccess"));
|
|
1382
2262
|
} finally {
|
|
1383
|
-
|
|
2263
|
+
ra.value = !1;
|
|
1384
2264
|
}
|
|
1385
2265
|
}
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
2266
|
+
async function ml() {
|
|
2267
|
+
var y, S;
|
|
2268
|
+
W.saving.value = !0;
|
|
2269
|
+
try {
|
|
2270
|
+
u("form-save", { ...W.formData.value }, W.formMode.value === "edit"), W.formMode.value === "edit" && ((y = o.crudConfig) != null && y.api.edit) ? (await o.crudConfig.api.edit(W.formData.value), J.success(r("formTable", "editSuccess")), u("edit-success")) : W.formMode.value === "add" && ((S = o.crudConfig) != null && S.api.add) && (await o.crudConfig.api.add(W.formData.value), J.success(r("formTable", "addSuccess")), u("add-success")), W.closeForm(), await ie();
|
|
2271
|
+
} catch ($) {
|
|
2272
|
+
u("request-error", $);
|
|
2273
|
+
} finally {
|
|
2274
|
+
W.saving.value = !1;
|
|
2275
|
+
}
|
|
2276
|
+
}
|
|
2277
|
+
async function hl(y) {
|
|
2278
|
+
var x, R, X, ye, Ue, Be, ya, wa;
|
|
2279
|
+
const S = y[o.rowKey || "rowKey"], $ = o.crudConfig;
|
|
2280
|
+
if ((x = $ == null ? void 0 : $.api) != null && x.version)
|
|
2281
|
+
try {
|
|
2282
|
+
const Q = await $.api.version(S);
|
|
2283
|
+
Ee.value = Q;
|
|
2284
|
+
} catch (Q) {
|
|
2285
|
+
u("request-error", Q), J.error((Q == null ? void 0 : Q.message) || r("formTable", "requestFailed"));
|
|
2286
|
+
return;
|
|
2287
|
+
}
|
|
2288
|
+
else if ((R = $ == null ? void 0 : $.urls) != null && R.version || (X = $ == null ? void 0 : $.versionConfig) != null && X.url)
|
|
2289
|
+
try {
|
|
2290
|
+
const Q = $.requestInstance || he("eeRequestInstance", null);
|
|
2291
|
+
if (Q) {
|
|
2292
|
+
const pl = ((ye = $.versionConfig) == null ? void 0 : ye.url) || ((Ue = $.urls) == null ? void 0 : Ue.version), bl = { ...(Be = $.versionConfig) == null ? void 0 : Be.params, ...(ya = $.params) == null ? void 0 : ya.version, id: S }, Ca = await Q.get(pl, { params: bl });
|
|
2293
|
+
Ee.value = ((wa = Ca.data) == null ? void 0 : wa.data) || Ca.data || [];
|
|
2294
|
+
}
|
|
2295
|
+
} catch (Q) {
|
|
2296
|
+
u("request-error", Q);
|
|
2297
|
+
return;
|
|
2298
|
+
}
|
|
2299
|
+
else {
|
|
2300
|
+
J.warning(r("formTable", "requestFailed"));
|
|
2301
|
+
return;
|
|
2302
|
+
}
|
|
2303
|
+
Ee.value.length > 0 && (pa.value = Object.keys(Ee.value[0]).map((Q) => ({
|
|
2304
|
+
prop: Q,
|
|
2305
|
+
label: Q
|
|
2306
|
+
}))), Re.value = !0;
|
|
2307
|
+
}
|
|
2308
|
+
const gl = V(() => {
|
|
1393
2309
|
const y = {};
|
|
1394
|
-
for (const
|
|
1395
|
-
|
|
2310
|
+
for (const S of Object.keys(o))
|
|
2311
|
+
!nt.includes(S) && !S.startsWith("on") && (y[S] = o[S]);
|
|
1396
2312
|
return y;
|
|
2313
|
+
});
|
|
2314
|
+
function vl(y) {
|
|
2315
|
+
const S = {};
|
|
2316
|
+
for (const [$, x] of Object.entries(y))
|
|
2317
|
+
it.includes($) || (S[$] = x);
|
|
2318
|
+
return S;
|
|
1397
2319
|
}
|
|
1398
|
-
return
|
|
1399
|
-
|
|
1400
|
-
}),
|
|
1401
|
-
refresh:
|
|
2320
|
+
return Z(() => {
|
|
2321
|
+
f(), fe.value && ie();
|
|
2322
|
+
}), l({
|
|
2323
|
+
refresh: ga,
|
|
1402
2324
|
/* 刷新表格 */
|
|
1403
|
-
fetchData:
|
|
2325
|
+
fetchData: ie,
|
|
1404
2326
|
/* 手动请求数据 */
|
|
1405
|
-
getSelection: () =>
|
|
2327
|
+
getSelection: () => j.value,
|
|
1406
2328
|
/* 获取选中行 */
|
|
1407
|
-
tableRef:
|
|
2329
|
+
tableRef: P
|
|
1408
2330
|
/* el-table 引用 */
|
|
1409
|
-
}), (
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
"show-search": !!t(g),
|
|
1414
|
-
"search-params": t(k),
|
|
1415
|
-
"visible-search-fields": t(u),
|
|
1416
|
-
"search-cols": t(o),
|
|
1417
|
-
"action-col-span": t(b),
|
|
1418
|
-
"show-fold-btn": !!t(c),
|
|
1419
|
-
"search-expanded": !!t(V),
|
|
1420
|
-
size: e.size,
|
|
1421
|
-
"resolve-dict": t(p).resolvedDict,
|
|
1422
|
-
onSearch: oa,
|
|
1423
|
-
onReset: na,
|
|
1424
|
-
onToggleFold: t(h)
|
|
1425
|
-
}, {
|
|
1426
|
-
"search-action": d(({ params: s }) => [
|
|
1427
|
-
I(v.$slots, "search-action", { params: s })
|
|
1428
|
-
]),
|
|
1429
|
-
_: 3
|
|
1430
|
-
}, 8, ["show-search", "search-params", "visible-search-fields", "search-cols", "action-col-span", "show-fold-btn", "search-expanded", "size", "resolve-dict", "onToggleFold"]),
|
|
1431
|
-
w(Qa, {
|
|
1432
|
-
show: !!$e.value.show,
|
|
1433
|
-
"toolbar-cfg": $e.value,
|
|
1434
|
-
size: e.size,
|
|
1435
|
-
deps: {
|
|
1436
|
-
authPass: t(m).authPass,
|
|
1437
|
-
selectionCount: t(ee).length,
|
|
1438
|
-
showColumnSetting: !!t(Ke)
|
|
1439
|
-
},
|
|
1440
|
-
onAdd: ua,
|
|
1441
|
-
onImport: y[0] || (y[0] = (s) => v.$emit("import")),
|
|
1442
|
-
onExport: ma,
|
|
1443
|
-
onBatchDelete: ca,
|
|
1444
|
-
onRefresh: y[1] || (y[1] = (s) => t(Ee)()),
|
|
1445
|
-
onColumnSetting: y[2] || (y[2] = (s) => ae.value = !0)
|
|
1446
|
-
}, {
|
|
1447
|
-
"toolbar-right": d(() => [
|
|
1448
|
-
I(v.$slots, "toolbar-right")
|
|
1449
|
-
]),
|
|
1450
|
-
_: 3
|
|
1451
|
-
}, 8, ["show", "toolbar-cfg", "size", "deps"]),
|
|
1452
|
-
ue("div", {
|
|
1453
|
-
class: "ee-table-wrapper",
|
|
1454
|
-
style: ba(t(Ye))
|
|
2331
|
+
}), (y, S) => {
|
|
2332
|
+
const $ = wl("el-dialog");
|
|
2333
|
+
return i(), D("div", {
|
|
2334
|
+
class: Aa(["ee-form-table", [`ee-size--${e.size}`, { "ee-stripe": e.stripe, "ee-border": e.border }]])
|
|
1455
2335
|
}, [
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
2336
|
+
T(pt, {
|
|
2337
|
+
"show-search": !!a(d),
|
|
2338
|
+
"search-params": a(n),
|
|
2339
|
+
"visible-search-fields": a(p),
|
|
2340
|
+
"search-cols": a(s),
|
|
2341
|
+
"action-col-span": a(k),
|
|
2342
|
+
"show-fold-btn": !!a(c),
|
|
2343
|
+
"search-expanded": !!a(b),
|
|
1461
2344
|
size: e.size,
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
"
|
|
1468
|
-
|
|
1469
|
-
t(Ze)(s), v.$emit("selection-change", s);
|
|
1470
|
-
}),
|
|
1471
|
-
onRowClick: y[4] || (y[4] = (s) => v.$emit("row-click", s)),
|
|
1472
|
-
onRowDblclick: y[5] || (y[5] = (s) => v.$emit("row-dblclick", s)),
|
|
1473
|
-
onSortChange: y[6] || (y[6] = (s) => v.$emit("sort-change", s))
|
|
1474
|
-
}, ga.value), {
|
|
1475
|
-
empty: d(() => [
|
|
1476
|
-
I(v.$slots, "empty", {}, () => [
|
|
1477
|
-
w(t(Ea), {
|
|
1478
|
-
description: e.emptyText || "暂无数据"
|
|
1479
|
-
}, null, 8, ["description"])
|
|
1480
|
-
])
|
|
2345
|
+
"resolve-dict": a(g).resolvedDict,
|
|
2346
|
+
onSearch: al,
|
|
2347
|
+
onReset: ll,
|
|
2348
|
+
onToggleFold: a(le)
|
|
2349
|
+
}, {
|
|
2350
|
+
"search-action": v(({ params: x }) => [
|
|
2351
|
+
Y(y.$slots, "search-action", { params: x })
|
|
1481
2352
|
]),
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
2353
|
+
_: 3
|
|
2354
|
+
}, 8, ["show-search", "search-params", "visible-search-fields", "search-cols", "action-col-span", "show-fold-btn", "search-expanded", "size", "resolve-dict", "onToggleFold"]),
|
|
2355
|
+
T(kt, {
|
|
2356
|
+
show: !!ba.value.show,
|
|
2357
|
+
"toolbar-cfg": ba.value,
|
|
2358
|
+
size: e.size,
|
|
2359
|
+
refreshing: ra.value,
|
|
2360
|
+
deps: {
|
|
2361
|
+
authPass: a(C).authPass,
|
|
2362
|
+
selectionCount: a(j).length,
|
|
2363
|
+
showColumnSetting: !!a(qa),
|
|
2364
|
+
allColumns: a(Ha),
|
|
2365
|
+
checkedColumns: a(Ka),
|
|
2366
|
+
toggleColumn: a(B).toggleColumn,
|
|
2367
|
+
moveColumn: a(B).moveColumn,
|
|
2368
|
+
showIndex: a(ma),
|
|
2369
|
+
toggleIndex: a(B).toggleIndex,
|
|
2370
|
+
selectionVisible: a(ta),
|
|
2371
|
+
toggleSelection: a(B).toggleSelection
|
|
2372
|
+
},
|
|
2373
|
+
onAdd: rl,
|
|
2374
|
+
onImport: S[0] || (S[0] = (x) => y.$emit("import")),
|
|
2375
|
+
onExport: cl,
|
|
2376
|
+
onBatchDelete: dl,
|
|
2377
|
+
onRefresh: fl
|
|
2378
|
+
}, {
|
|
2379
|
+
"toolbar-right": v(() => [
|
|
2380
|
+
Y(y.$slots, "toolbar-right")
|
|
2381
|
+
]),
|
|
2382
|
+
_: 3
|
|
2383
|
+
}, 8, ["show", "toolbar-cfg", "size", "refreshing", "deps"]),
|
|
2384
|
+
N("div", {
|
|
2385
|
+
class: "ee-table-wrapper",
|
|
2386
|
+
style: Cl(a(Ga))
|
|
2387
|
+
}, [
|
|
2388
|
+
T(a(Da), I({
|
|
2389
|
+
ref_key: "tableRef",
|
|
2390
|
+
ref: P,
|
|
2391
|
+
data: sa.value,
|
|
2392
|
+
loading: el.value,
|
|
2393
|
+
size: e.size,
|
|
2394
|
+
stripe: e.stripe,
|
|
2395
|
+
border: e.border,
|
|
2396
|
+
height: a(Wa),
|
|
2397
|
+
"max-height": a(ja),
|
|
2398
|
+
"highlight-current-row": e.highlightCurrentRow,
|
|
2399
|
+
"row-key": e.rowKey,
|
|
2400
|
+
onSelectionChange: S[1] || (S[1] = (x) => {
|
|
2401
|
+
a(Xa)(x), y.$emit("selection-change", x);
|
|
2402
|
+
}),
|
|
2403
|
+
onRowClick: S[2] || (S[2] = (x) => y.$emit("row-click", x)),
|
|
2404
|
+
onRowDblclick: S[3] || (S[3] = (x) => y.$emit("row-dblclick", x)),
|
|
2405
|
+
onSortChange: S[4] || (S[4] = (x) => y.$emit("sort-change", x)),
|
|
2406
|
+
onHeaderDragend: S[5] || (S[5] = (x, R, X) => a(B).onColumnResize(x, X))
|
|
2407
|
+
}, gl.value), {
|
|
2408
|
+
empty: v(() => [
|
|
2409
|
+
Y(y.$slots, "empty", {}, () => [
|
|
2410
|
+
T(a(Rl), {
|
|
2411
|
+
description: e.emptyText || a(r)("formTable", "empty")
|
|
2412
|
+
}, null, 8, ["description"])
|
|
2413
|
+
])
|
|
2414
|
+
]),
|
|
2415
|
+
default: v(() => [
|
|
2416
|
+
a(ma) ? (i(), w(a(we), {
|
|
2417
|
+
key: 0,
|
|
2418
|
+
type: "index",
|
|
2419
|
+
width: "55",
|
|
2420
|
+
fixed: "left",
|
|
2421
|
+
label: a(r)("formTable", "rowIndex"),
|
|
2422
|
+
align: "center"
|
|
2423
|
+
}, null, 8, ["label"])) : L("", !0),
|
|
2424
|
+
a(ce).show && a(ta) && a(ce).type === "multiple" ? (i(), w(a(we), {
|
|
2425
|
+
key: 1,
|
|
2426
|
+
type: "selection",
|
|
2427
|
+
width: "50",
|
|
2428
|
+
fixed: "left",
|
|
2429
|
+
align: "center",
|
|
2430
|
+
selectable: a(ce).disabledRow ? (x) => !a(ce).disabledRow(x) : void 0,
|
|
2431
|
+
"reserve-selection": a(ce).reserveSelection
|
|
2432
|
+
}, null, 8, ["selectable", "reserve-selection"])) : L("", !0),
|
|
2433
|
+
a(ce).show && a(ta) && a(ce).type === "single" ? (i(), w(a(we), {
|
|
2434
|
+
key: 2,
|
|
2435
|
+
width: "50",
|
|
2436
|
+
fixed: "left",
|
|
2437
|
+
align: "center"
|
|
2438
|
+
}, {
|
|
2439
|
+
default: v(({ row: x }) => [
|
|
2440
|
+
T(a(Qe), {
|
|
2441
|
+
"model-value": a(te) === x[e.rowKey || "id"],
|
|
2442
|
+
value: x[e.rowKey || "id"],
|
|
2443
|
+
onChange: () => {
|
|
2444
|
+
a(Ya)(x), y.$emit("selection-change", a(j));
|
|
2445
|
+
}
|
|
2446
|
+
}, null, 8, ["model-value", "value", "onChange"])
|
|
2447
|
+
]),
|
|
2448
|
+
_: 1
|
|
2449
|
+
})) : L("", !0),
|
|
2450
|
+
(i(!0), D(O, null, K(a(la), (x) => (i(), w(a(we), I({
|
|
2451
|
+
key: x.prop,
|
|
2452
|
+
prop: x.prop,
|
|
2453
|
+
label: x.label,
|
|
2454
|
+
width: x.width,
|
|
2455
|
+
"min-width": x.minWidth,
|
|
2456
|
+
fixed: x.fixed,
|
|
2457
|
+
sortable: x.sortable,
|
|
2458
|
+
align: x.align || "center",
|
|
2459
|
+
"show-overflow-tooltip": x.showTooltip,
|
|
2460
|
+
"class-name": x.className
|
|
2461
|
+
}, { ref_for: !0 }, vl(x)), {
|
|
2462
|
+
default: v((R) => [
|
|
2463
|
+
Y(y.$slots, x.slotName || x.prop, {
|
|
2464
|
+
row: R.row,
|
|
2465
|
+
index: R.$index,
|
|
2466
|
+
column: x
|
|
2467
|
+
}, () => [
|
|
2468
|
+
x.formatter ? (i(), D("span", Et, F(x.formatter(R.row, x, R.row[x.prop], R.$index)), 1)) : x.dictKey ? (i(), D("span", Pt, F(a(g).dictLabel(x.dictKey, R.row[x.prop])), 1)) : (i(), D("span", Bt, F(R.row[x.prop] ?? "-"), 1))
|
|
2469
|
+
])
|
|
2470
|
+
]),
|
|
2471
|
+
_: 2
|
|
2472
|
+
}, 1040, ["prop", "label", "width", "min-width", "fixed", "sortable", "align", "show-overflow-tooltip", "class-name"]))), 128)),
|
|
2473
|
+
ee.value.show ? (i(), w(a(we), {
|
|
2474
|
+
key: 3,
|
|
2475
|
+
label: ee.value.label || a(r)("formTable", "operation"),
|
|
2476
|
+
width: _a.value,
|
|
2477
|
+
fixed: ee.value.fixed ?? "right",
|
|
2478
|
+
align: ee.value.align || "center",
|
|
2479
|
+
"class-name": "ee-action-column"
|
|
2480
|
+
}, {
|
|
2481
|
+
default: v(({ row: x }) => [
|
|
2482
|
+
N("span", Ft, [
|
|
2483
|
+
Y(y.$slots, "action-before", { row: x }),
|
|
2484
|
+
(i(!0), D(O, null, K(na(x), (R, X) => (i(), D(O, { key: X }, [
|
|
2485
|
+
X < Ae.value || ia(x) === 1 ? (i(), D(O, { key: 0 }, [
|
|
2486
|
+
R._isDelete && ee.value.confirmDelete !== !1 ? (i(), w(a(El), {
|
|
2487
|
+
key: 0,
|
|
2488
|
+
title: ee.value.deleteConfirmMessage || a(r)("formTable", "confirmDeleteMsg"),
|
|
2489
|
+
"confirm-button-text": a(r)("formTable", "confirm"),
|
|
2490
|
+
"cancel-button-text": a(r)("formTable", "cancel"),
|
|
2491
|
+
onConfirm: R.handler
|
|
2492
|
+
}, {
|
|
2493
|
+
reference: v(() => [
|
|
2494
|
+
T(a(q), {
|
|
2495
|
+
type: R.type || "primary",
|
|
2496
|
+
size: e.size,
|
|
2497
|
+
icon: R.iconComponent,
|
|
2498
|
+
round: Pe.value === "icon",
|
|
2499
|
+
link: "",
|
|
2500
|
+
class: "ee-action-btn"
|
|
2501
|
+
}, {
|
|
2502
|
+
default: v(() => [
|
|
2503
|
+
M(F(Pe.value === "icon" ? "" : R.text), 1)
|
|
2504
|
+
]),
|
|
2505
|
+
_: 2
|
|
2506
|
+
}, 1032, ["type", "size", "icon", "round"])
|
|
2507
|
+
]),
|
|
2508
|
+
_: 2
|
|
2509
|
+
}, 1032, ["title", "confirm-button-text", "cancel-button-text", "onConfirm"])) : (i(), w(a(q), {
|
|
2510
|
+
key: 1,
|
|
2511
|
+
type: R.type || "primary",
|
|
2512
|
+
size: e.size,
|
|
2513
|
+
icon: R.iconComponent,
|
|
2514
|
+
round: Pe.value === "icon",
|
|
2515
|
+
link: "",
|
|
2516
|
+
onClick: R.handler,
|
|
2517
|
+
class: "ee-action-btn"
|
|
2518
|
+
}, {
|
|
2519
|
+
default: v(() => [
|
|
2520
|
+
M(F(Pe.value === "icon" ? "" : R.text), 1)
|
|
2521
|
+
]),
|
|
2522
|
+
_: 2
|
|
2523
|
+
}, 1032, ["type", "size", "icon", "round", "onClick"]))
|
|
2524
|
+
], 64)) : L("", !0)
|
|
2525
|
+
], 64))), 128)),
|
|
2526
|
+
ia(x) > Ae.value ? (i(), w(a(Pl), {
|
|
2527
|
+
key: 0,
|
|
2528
|
+
trigger: "click",
|
|
2529
|
+
size: e.size
|
|
2530
|
+
}, {
|
|
2531
|
+
dropdown: v(() => [
|
|
2532
|
+
T(a(Bl), null, {
|
|
2533
|
+
default: v(() => [
|
|
2534
|
+
(i(!0), D(O, null, K(na(x).slice(Ae.value), (R, X) => (i(), w(a(Fl), {
|
|
2535
|
+
key: X,
|
|
2536
|
+
onClick: (ye) => R._isDelete && ee.value.confirmDelete !== !1 ? ul(x) : R.handler()
|
|
2537
|
+
}, {
|
|
2538
|
+
default: v(() => [
|
|
2539
|
+
M(F(R.text), 1)
|
|
2540
|
+
]),
|
|
2541
|
+
_: 2
|
|
2542
|
+
}, 1032, ["onClick"]))), 128))
|
|
2543
|
+
]),
|
|
2544
|
+
_: 2
|
|
2545
|
+
}, 1024)
|
|
2546
|
+
]),
|
|
2547
|
+
default: v(() => [
|
|
2548
|
+
T(a(q), {
|
|
2549
|
+
size: e.size,
|
|
2550
|
+
link: "",
|
|
2551
|
+
class: "ee-action-btn"
|
|
2552
|
+
}, {
|
|
2553
|
+
default: v(() => [
|
|
2554
|
+
T(a(Oa), null, {
|
|
2555
|
+
default: v(() => [
|
|
2556
|
+
T(a(jl))
|
|
2557
|
+
]),
|
|
2558
|
+
_: 1
|
|
2559
|
+
})
|
|
2560
|
+
]),
|
|
2561
|
+
_: 1
|
|
2562
|
+
}, 8, ["size"])
|
|
2563
|
+
]),
|
|
2564
|
+
_: 2
|
|
2565
|
+
}, 1032, ["size"])) : L("", !0),
|
|
2566
|
+
Y(y.$slots, "action", { row: x })
|
|
2567
|
+
])
|
|
2568
|
+
]),
|
|
2569
|
+
_: 3
|
|
2570
|
+
}, 8, ["label", "width", "fixed", "align"])) : L("", !0)
|
|
2571
|
+
]),
|
|
2572
|
+
_: 3
|
|
2573
|
+
}, 16, ["data", "loading", "size", "stripe", "border", "height", "max-height", "highlight-current-row", "row-key"])
|
|
2574
|
+
], 4),
|
|
2575
|
+
a(pe) ? (i(), D("div", Rt, [
|
|
2576
|
+
T(a(Al), {
|
|
2577
|
+
"current-page": a(G).current,
|
|
2578
|
+
"onUpdate:currentPage": S[6] || (S[6] = (x) => a(G).current = x),
|
|
2579
|
+
"page-size": a(G).pageSize,
|
|
2580
|
+
"onUpdate:pageSize": S[7] || (S[7] = (x) => a(G).pageSize = x),
|
|
2581
|
+
"page-sizes": a(be),
|
|
2582
|
+
total: a(G).total,
|
|
2583
|
+
layout: a(Ve),
|
|
2584
|
+
background: a(ke),
|
|
2585
|
+
size: e.size,
|
|
2586
|
+
onCurrentChange: tl,
|
|
2587
|
+
onSizeChange: ol
|
|
2588
|
+
}, null, 8, ["current-page", "page-size", "page-sizes", "total", "layout", "background", "size"])
|
|
2589
|
+
])) : L("", !0),
|
|
2590
|
+
T(Tt, {
|
|
2591
|
+
visible: se.value.visible,
|
|
2592
|
+
"drawer-mode": se.value.drawerMode,
|
|
2593
|
+
"form-mode": se.value.formMode,
|
|
2594
|
+
"editing-row": se.value.editingRow,
|
|
2595
|
+
"form-data": se.value.formData,
|
|
2596
|
+
"drawer-cfg": se.value.drawerCfg,
|
|
2597
|
+
columns: a(la),
|
|
2598
|
+
size: e.size,
|
|
2599
|
+
saving: se.value.saving,
|
|
2600
|
+
"dict-map": e.dictMap,
|
|
2601
|
+
"onUpdate:visible": se.value.onVisibleChange,
|
|
2602
|
+
onSave: ml
|
|
2603
|
+
}, Sl({ _: 2 }, [
|
|
2604
|
+
y.$slots["add-form"] ? {
|
|
2605
|
+
name: "add-form",
|
|
2606
|
+
fn: v((x) => [
|
|
2607
|
+
Y(y.$slots, "add-form", ua(da(x)))
|
|
2608
|
+
]),
|
|
2609
|
+
key: "0"
|
|
2610
|
+
} : void 0,
|
|
2611
|
+
y.$slots["edit-form"] ? {
|
|
2612
|
+
name: "edit-form",
|
|
2613
|
+
fn: v((x) => [
|
|
2614
|
+
Y(y.$slots, "edit-form", ua(da(x)))
|
|
2615
|
+
]),
|
|
2616
|
+
key: "1"
|
|
2617
|
+
} : void 0,
|
|
2618
|
+
y.$slots["view-form"] ? {
|
|
2619
|
+
name: "view-form",
|
|
2620
|
+
fn: v((x) => [
|
|
2621
|
+
Y(y.$slots, "view-form", ua(da(x)))
|
|
2622
|
+
]),
|
|
2623
|
+
key: "2"
|
|
2624
|
+
} : void 0
|
|
2625
|
+
]), 1032, ["visible", "drawer-mode", "form-mode", "editing-row", "form-data", "drawer-cfg", "columns", "size", "saving", "dict-map", "onUpdate:visible"]),
|
|
2626
|
+
T($, {
|
|
2627
|
+
modelValue: Re.value,
|
|
2628
|
+
"onUpdate:modelValue": S[9] || (S[9] = (x) => Re.value = x),
|
|
2629
|
+
title: a(r)("formTable", "versionTitle"),
|
|
2630
|
+
width: "700px",
|
|
2631
|
+
"close-on-click-modal": !1
|
|
2632
|
+
}, {
|
|
2633
|
+
footer: v(() => [
|
|
2634
|
+
T(a(q), {
|
|
2635
|
+
size: e.size,
|
|
2636
|
+
round: "",
|
|
2637
|
+
onClick: S[8] || (S[8] = (x) => Re.value = !1)
|
|
1495
2638
|
}, {
|
|
1496
|
-
default:
|
|
1497
|
-
|
|
1498
|
-
"model-value": t(je) === s[e.rowKey || "id"],
|
|
1499
|
-
value: s[e.rowKey || "id"],
|
|
1500
|
-
onChange: () => {
|
|
1501
|
-
t(Je)(s), v.$emit("selection-change", t(ee));
|
|
1502
|
-
}
|
|
1503
|
-
}, null, 8, ["model-value", "value", "onChange"])
|
|
2639
|
+
default: v(() => [
|
|
2640
|
+
M(F(a(r)("formTable", "close")), 1)
|
|
1504
2641
|
]),
|
|
1505
2642
|
_: 1
|
|
1506
|
-
}
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
"
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
align: s.align || "center",
|
|
1516
|
-
"class-name": s.className
|
|
1517
|
-
}, { ref_for: !0 }, ha(s)), {
|
|
1518
|
-
default: d(($) => [
|
|
1519
|
-
I(v.$slots, s.slotName || s.prop, {
|
|
1520
|
-
row: $.row,
|
|
1521
|
-
index: $.$index,
|
|
1522
|
-
column: s
|
|
1523
|
-
}, () => [
|
|
1524
|
-
s.formatter ? (i(), D("span", et, F(s.formatter($.row, s, $.row[s.prop], $.$index)), 1)) : s.dictKey ? (i(), D("span", at, F(t(p).dictLabel(s.dictKey, $.row[s.prop])), 1)) : (i(), D("span", tt, F($.row[s.prop] ?? "-"), 1))
|
|
1525
|
-
])
|
|
1526
|
-
]),
|
|
1527
|
-
_: 2
|
|
1528
|
-
}, 1040, ["prop", "label", "width", "min-width", "fixed", "sortable", "align", "class-name"]))), 128)),
|
|
1529
|
-
U.value.show ? (i(), f(t(te), {
|
|
1530
|
-
key: 2,
|
|
1531
|
-
label: U.value.label || "操作",
|
|
1532
|
-
width: U.value.width,
|
|
1533
|
-
fixed: U.value.fixed ?? "right",
|
|
1534
|
-
align: U.value.align || "center"
|
|
2643
|
+
}, 8, ["size"])
|
|
2644
|
+
]),
|
|
2645
|
+
default: v(() => [
|
|
2646
|
+
T(a(Da), {
|
|
2647
|
+
data: Ee.value,
|
|
2648
|
+
border: "",
|
|
2649
|
+
stripe: "",
|
|
2650
|
+
size: "small",
|
|
2651
|
+
"max-height": "400"
|
|
1535
2652
|
}, {
|
|
1536
|
-
default:
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
onClick: ($) => v.$emit("view", s)
|
|
1544
|
-
}, {
|
|
1545
|
-
default: d(() => [
|
|
1546
|
-
S(F(U.value.viewText || "查看"), 1)
|
|
1547
|
-
]),
|
|
1548
|
-
_: 1
|
|
1549
|
-
}, 8, ["size", "onClick"])) : P("", !0),
|
|
1550
|
-
U.value.showEdit && t(m).authPass(U.value.editAuth) ? (i(), f(t(E), {
|
|
1551
|
-
key: 1,
|
|
1552
|
-
type: "primary",
|
|
1553
|
-
link: "",
|
|
1554
|
-
size: e.size,
|
|
1555
|
-
onClick: ($) => sa(s)
|
|
1556
|
-
}, {
|
|
1557
|
-
default: d(() => [
|
|
1558
|
-
S(F(U.value.editText || "编辑"), 1)
|
|
1559
|
-
]),
|
|
1560
|
-
_: 1
|
|
1561
|
-
}, 8, ["size", "onClick"])) : P("", !0),
|
|
1562
|
-
U.value.showDelete && t(m).authPass(U.value.deleteAuth) ? (i(), f(t(E), {
|
|
1563
|
-
key: 2,
|
|
1564
|
-
type: "danger",
|
|
1565
|
-
link: "",
|
|
1566
|
-
size: e.size,
|
|
1567
|
-
onClick: ($) => da(s)
|
|
1568
|
-
}, {
|
|
1569
|
-
default: d(() => [
|
|
1570
|
-
S(F(U.value.deleteText || "删除"), 1)
|
|
1571
|
-
]),
|
|
1572
|
-
_: 1
|
|
1573
|
-
}, 8, ["size", "onClick"])) : P("", !0),
|
|
1574
|
-
(i(!0), D(B, null, A(U.value.customButtons || [], ($) => (i(), D(B, {
|
|
1575
|
-
key: $.code
|
|
1576
|
-
}, [
|
|
1577
|
-
(!$.show || $.show(s)) && t(m).authPass($.auth) ? (i(), f(t(E), {
|
|
1578
|
-
key: 0,
|
|
1579
|
-
type: $.type || "default",
|
|
1580
|
-
link: "",
|
|
1581
|
-
size: e.size,
|
|
1582
|
-
onClick: (it) => $.handler(s)
|
|
1583
|
-
}, {
|
|
1584
|
-
default: d(() => [
|
|
1585
|
-
S(F($.text), 1)
|
|
1586
|
-
]),
|
|
1587
|
-
_: 2
|
|
1588
|
-
}, 1032, ["type", "size", "onClick"])) : P("", !0)
|
|
1589
|
-
], 64))), 128)),
|
|
1590
|
-
I(v.$slots, "action", { row: s })
|
|
2653
|
+
default: v(() => [
|
|
2654
|
+
(i(!0), D(O, null, K(pa.value, (x) => (i(), w(a(we), {
|
|
2655
|
+
key: x.prop,
|
|
2656
|
+
prop: x.prop,
|
|
2657
|
+
label: x.label,
|
|
2658
|
+
width: x.width
|
|
2659
|
+
}, null, 8, ["prop", "label", "width"]))), 128))
|
|
1591
2660
|
]),
|
|
1592
|
-
_:
|
|
1593
|
-
}, 8, ["
|
|
2661
|
+
_: 1
|
|
2662
|
+
}, 8, ["data"])
|
|
1594
2663
|
]),
|
|
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
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
2664
|
+
_: 1
|
|
2665
|
+
}, 8, ["modelValue", "title"])
|
|
2666
|
+
], 2);
|
|
2667
|
+
};
|
|
2668
|
+
}
|
|
2669
|
+
});
|
|
2670
|
+
Le.install = (e) => {
|
|
2671
|
+
e.component(Le.name ?? "EeFormTable", Le);
|
|
2672
|
+
};
|
|
2673
|
+
const At = {
|
|
2674
|
+
key: 1,
|
|
2675
|
+
class: "ee-no-more"
|
|
2676
|
+
}, Ut = { class: "ee-loading-tip" }, $t = /* @__PURE__ */ H({
|
|
2677
|
+
name: "EeRemoteSelect",
|
|
2678
|
+
__name: "index",
|
|
2679
|
+
props: {
|
|
2680
|
+
modelValue: {},
|
|
2681
|
+
apiUrl: {},
|
|
2682
|
+
detailEchoUrl: {},
|
|
2683
|
+
mode: { default: "single" },
|
|
2684
|
+
labelField: { default: "label" },
|
|
2685
|
+
valueField: { default: "value" },
|
|
2686
|
+
searchKey: { default: "keyword" },
|
|
2687
|
+
pageNumKey: { default: "pageNum" },
|
|
2688
|
+
pageSizeKey: { default: "pageSize" },
|
|
2689
|
+
pageSize: { default: 20 },
|
|
2690
|
+
extraParams: {},
|
|
2691
|
+
requestInstance: {},
|
|
2692
|
+
placeholder: {},
|
|
2693
|
+
clearable: { type: Boolean, default: !0 },
|
|
2694
|
+
disabled: { type: Boolean },
|
|
2695
|
+
readonly: { type: Boolean },
|
|
2696
|
+
filterable: { type: Boolean, default: !0 },
|
|
2697
|
+
size: { default: "default" },
|
|
2698
|
+
options: {}
|
|
2699
|
+
},
|
|
2700
|
+
emits: ["update:modelValue", "change", "clear", "blur", "focus", "search", "load-success"],
|
|
2701
|
+
setup(e, { emit: l }) {
|
|
2702
|
+
const t = e, r = l, { t: o } = _(), {
|
|
2703
|
+
loading: m,
|
|
2704
|
+
options: h,
|
|
2705
|
+
noMore: u,
|
|
2706
|
+
loadData: C,
|
|
2707
|
+
loadMore: g,
|
|
2708
|
+
resetList: b,
|
|
2709
|
+
onKeywordChange: n
|
|
2710
|
+
} = Ze({
|
|
2711
|
+
apiUrl: t.apiUrl,
|
|
2712
|
+
pageNumKey: t.pageNumKey,
|
|
2713
|
+
pageSizeKey: t.pageSizeKey,
|
|
2714
|
+
pageSize: t.pageSize,
|
|
2715
|
+
searchKey: t.searchKey,
|
|
2716
|
+
extraParams: t.extraParams,
|
|
2717
|
+
labelField: t.labelField,
|
|
2718
|
+
valueField: t.valueField
|
|
2719
|
+
});
|
|
2720
|
+
function d(k) {
|
|
2721
|
+
return {
|
|
2722
|
+
value: k[t.valueField],
|
|
2723
|
+
label: k[t.labelField],
|
|
2724
|
+
disabled: k.disabled ?? !1
|
|
2725
|
+
};
|
|
2726
|
+
}
|
|
2727
|
+
const s = V(() => t.options ? t.options.map(d) : h.value.map(d));
|
|
2728
|
+
async function p(k = !1) {
|
|
2729
|
+
t.options || await C(void 0, !0);
|
|
2730
|
+
}
|
|
2731
|
+
function c(k) {
|
|
2732
|
+
k && s.value.length === 0 && !t.options && p();
|
|
2733
|
+
}
|
|
2734
|
+
return Z(() => {
|
|
2735
|
+
p();
|
|
2736
|
+
}), re(() => t.apiUrl, () => {
|
|
2737
|
+
b(), p();
|
|
2738
|
+
}), (k, f) => (i(), w(a(ue), I(k.$attrs, {
|
|
2739
|
+
"model-value": e.modelValue,
|
|
2740
|
+
loading: a(m),
|
|
2741
|
+
multiple: e.mode === "multiple",
|
|
2742
|
+
placeholder: e.placeholder,
|
|
2743
|
+
clearable: e.clearable,
|
|
2744
|
+
disabled: e.disabled,
|
|
2745
|
+
readonly: e.readonly,
|
|
2746
|
+
filterable: e.filterable,
|
|
2747
|
+
size: e.size,
|
|
2748
|
+
remote: !t.options,
|
|
2749
|
+
"remote-method": t.options ? void 0 : a(n),
|
|
2750
|
+
"onUpdate:modelValue": f[1] || (f[1] = (z) => r("update:modelValue", z)),
|
|
2751
|
+
onChange: f[2] || (f[2] = (z) => r("change", z)),
|
|
2752
|
+
onClear: f[3] || (f[3] = (z) => r("clear")),
|
|
2753
|
+
onBlur: f[4] || (f[4] = (z) => r("blur", z)),
|
|
2754
|
+
onFocus: f[5] || (f[5] = (z) => r("focus", z)),
|
|
2755
|
+
onVisibleChange: c
|
|
2756
|
+
}), {
|
|
2757
|
+
loading: v(() => [
|
|
2758
|
+
N("div", Ut, [
|
|
2759
|
+
N("span", null, F(a(o)("remoteSelect", "loading")), 1)
|
|
2760
|
+
])
|
|
2761
|
+
]),
|
|
2762
|
+
default: v(() => [
|
|
2763
|
+
(i(!0), D(O, null, K(s.value, (z) => (i(), w(a(de), {
|
|
2764
|
+
key: z.value,
|
|
2765
|
+
label: z.label,
|
|
2766
|
+
value: z.value,
|
|
2767
|
+
disabled: z.disabled
|
|
2768
|
+
}, null, 8, ["label", "value", "disabled"]))), 128)),
|
|
2769
|
+
!t.options && !a(u) && !a(m) && s.value.length > 0 ? (i(), D("div", {
|
|
2770
|
+
key: 0,
|
|
2771
|
+
class: "ee-load-more",
|
|
2772
|
+
onClick: f[0] || (f[0] = //@ts-ignore
|
|
2773
|
+
(...z) => a(g) && a(g)(...z))
|
|
2774
|
+
}, [
|
|
2775
|
+
N("span", null, F(a(o)("remoteSelect", "loadMore")), 1)
|
|
2776
|
+
])) : L("", !0),
|
|
2777
|
+
!t.options && a(u) && s.value.length > 0 ? (i(), D("div", At, [
|
|
2778
|
+
N("span", null, F(a(o)("remoteSelect", "noMore")), 1)
|
|
2779
|
+
])) : L("", !0)
|
|
2780
|
+
]),
|
|
2781
|
+
_: 1
|
|
2782
|
+
}, 16, ["model-value", "loading", "multiple", "placeholder", "clearable", "disabled", "readonly", "filterable", "size", "remote", "remote-method"]));
|
|
2783
|
+
}
|
|
2784
|
+
}), Ne = /* @__PURE__ */ De($t, [["__scopeId", "data-v-21c5d143"]]);
|
|
2785
|
+
Ne.install = (e) => {
|
|
2786
|
+
e.component(Ne.name ?? "EeRemoteSelect", Ne);
|
|
2787
|
+
};
|
|
2788
|
+
const Ke = /* @__PURE__ */ H({
|
|
2789
|
+
name: "EeDeptCascader",
|
|
2790
|
+
__name: "index",
|
|
2791
|
+
props: {
|
|
2792
|
+
modelValue: {},
|
|
2793
|
+
deptApiUrl: { default: "/api/system/dept/tree" },
|
|
2794
|
+
detailEchoUrl: { default: "/api/system/dept/detail" },
|
|
2795
|
+
labelField: { default: "label" },
|
|
2796
|
+
valueField: { default: "value" },
|
|
2797
|
+
childrenField: { default: "children" },
|
|
2798
|
+
showAllLevels: { type: Boolean, default: !0 },
|
|
2799
|
+
extraParams: {},
|
|
2800
|
+
requestInstance: {},
|
|
2801
|
+
placeholder: {},
|
|
2802
|
+
clearable: { type: Boolean, default: !0 },
|
|
2803
|
+
disabled: { type: Boolean },
|
|
2804
|
+
size: { default: "default" }
|
|
2805
|
+
},
|
|
2806
|
+
emits: ["update:modelValue", "change", "clear", "blur", "focus", "load-success"],
|
|
2807
|
+
setup(e, { emit: l }) {
|
|
2808
|
+
const t = e, r = l;
|
|
2809
|
+
function o(f) {
|
|
2810
|
+
r("update:modelValue", f);
|
|
2811
|
+
}
|
|
2812
|
+
function m(f) {
|
|
2813
|
+
r("change", f);
|
|
2814
|
+
}
|
|
2815
|
+
function h() {
|
|
2816
|
+
r("clear");
|
|
2817
|
+
}
|
|
2818
|
+
function u(f) {
|
|
2819
|
+
r("blur", f);
|
|
2820
|
+
}
|
|
2821
|
+
function C(f) {
|
|
2822
|
+
r("focus", f);
|
|
2823
|
+
}
|
|
2824
|
+
const g = t.requestInstance ?? he(aa);
|
|
2825
|
+
if (!g)
|
|
2826
|
+
throw new Error("[EasyEPUI] 请配置 requestInstance:可通过 app.use(EasyEpUI, { requestInstance }) 全局注入,或通过 props 传入");
|
|
2827
|
+
const b = g, { t: n } = _(), d = A([]), s = A(!1), p = V(() => ({
|
|
2828
|
+
label: t.labelField,
|
|
2829
|
+
value: t.valueField,
|
|
2830
|
+
children: t.childrenField,
|
|
2831
|
+
multiple: !1,
|
|
2832
|
+
checkStrictly: !0
|
|
2833
|
+
}));
|
|
2834
|
+
async function c() {
|
|
2835
|
+
s.value = !0;
|
|
2836
|
+
try {
|
|
2837
|
+
const f = { ...t.extraParams || {} }, U = (await b.get(t.deptApiUrl, { params: f })).data, le = Array.isArray(U) ? U : (U == null ? void 0 : U.data) ?? [];
|
|
2838
|
+
d.value = k(le), r("load-success", d.value);
|
|
2839
|
+
} catch (f) {
|
|
2840
|
+
J.error((f == null ? void 0 : f.msg) || (f == null ? void 0 : f.message) || n("remoteSelect", "requestFailed")), d.value = [];
|
|
2841
|
+
} finally {
|
|
2842
|
+
s.value = !1;
|
|
2843
|
+
}
|
|
2844
|
+
}
|
|
2845
|
+
function k(f) {
|
|
2846
|
+
return f.map((z) => {
|
|
2847
|
+
const U = {
|
|
2848
|
+
...z,
|
|
2849
|
+
label: z[t.labelField] ?? "",
|
|
2850
|
+
value: z[t.valueField] ?? ""
|
|
2851
|
+
};
|
|
2852
|
+
return z[t.childrenField] && Array.isArray(z[t.childrenField]) && z[t.childrenField].length > 0 && (U.children = k(z[t.childrenField])), U;
|
|
2853
|
+
});
|
|
2854
|
+
}
|
|
2855
|
+
return Z(() => {
|
|
2856
|
+
c();
|
|
2857
|
+
}), (f, z) => (i(), w(a(Ul), I(f.$attrs, {
|
|
2858
|
+
"model-value": e.modelValue,
|
|
2859
|
+
options: d.value,
|
|
2860
|
+
props: p.value,
|
|
2861
|
+
placeholder: e.placeholder,
|
|
2862
|
+
clearable: e.clearable,
|
|
2863
|
+
disabled: e.disabled,
|
|
2864
|
+
size: e.size,
|
|
2865
|
+
"show-all-levels": e.showAllLevels,
|
|
2866
|
+
"onUpdate:modelValue": z[0] || (z[0] = (U) => o(U)),
|
|
2867
|
+
onChange: z[1] || (z[1] = (U) => m(U)),
|
|
2868
|
+
onClear: z[2] || (z[2] = (U) => h()),
|
|
2869
|
+
onBlur: z[3] || (z[3] = (U) => u(U)),
|
|
2870
|
+
onFocus: z[4] || (z[4] = (U) => C(U))
|
|
2871
|
+
}), null, 16, ["model-value", "options", "props", "placeholder", "clearable", "disabled", "size", "show-all-levels"]));
|
|
1669
2872
|
}
|
|
1670
2873
|
});
|
|
1671
|
-
|
|
1672
|
-
e.component(
|
|
2874
|
+
Ke.install = (e) => {
|
|
2875
|
+
e.component(Ke.name ?? "EeDeptCascader", Ke);
|
|
1673
2876
|
};
|
|
1674
|
-
const
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
2877
|
+
const Mt = {
|
|
2878
|
+
key: 1,
|
|
2879
|
+
class: "ee-no-more"
|
|
2880
|
+
}, It = { class: "ee-loading-tip" }, Ot = /* @__PURE__ */ H({
|
|
2881
|
+
name: "EeUserSelect",
|
|
2882
|
+
__name: "index",
|
|
2883
|
+
props: {
|
|
2884
|
+
modelValue: {},
|
|
2885
|
+
apiUrl: { default: "/api/system/user/page" },
|
|
2886
|
+
detailEchoUrl: { default: "/api/system/user/detail" },
|
|
2887
|
+
mode: { default: "single" },
|
|
2888
|
+
deptId: {},
|
|
2889
|
+
labelField: { default: "label" },
|
|
2890
|
+
valueField: { default: "value" },
|
|
2891
|
+
searchKey: { default: "keyword" },
|
|
2892
|
+
extraParams: {},
|
|
2893
|
+
requestInstance: {},
|
|
2894
|
+
placeholder: {},
|
|
2895
|
+
clearable: { type: Boolean, default: !0 },
|
|
2896
|
+
disabled: { type: Boolean },
|
|
2897
|
+
readonly: { type: Boolean },
|
|
2898
|
+
filterable: { type: Boolean, default: !0 },
|
|
2899
|
+
size: { default: "default" }
|
|
2900
|
+
},
|
|
2901
|
+
emits: ["update:modelValue", "change", "clear", "blur", "focus", "search", "load-success"],
|
|
2902
|
+
setup(e, { emit: l }) {
|
|
2903
|
+
const t = e, r = l, { t: o } = _(), m = V(() => {
|
|
2904
|
+
const c = { ...t.extraParams || {} };
|
|
2905
|
+
return t.deptId !== void 0 && t.deptId !== null && t.deptId !== "" && (c.deptId = t.deptId), c;
|
|
2906
|
+
}), {
|
|
2907
|
+
loading: h,
|
|
2908
|
+
options: u,
|
|
2909
|
+
noMore: C,
|
|
2910
|
+
loadData: g,
|
|
2911
|
+
loadMore: b,
|
|
2912
|
+
resetList: n,
|
|
2913
|
+
onKeywordChange: d
|
|
2914
|
+
} = Ze({
|
|
2915
|
+
apiUrl: t.apiUrl,
|
|
2916
|
+
pageSizeKey: "pageSize",
|
|
2917
|
+
pageNumKey: "pageNum",
|
|
2918
|
+
pageSize: 20,
|
|
2919
|
+
searchKey: t.searchKey,
|
|
2920
|
+
extraParams: m.value,
|
|
2921
|
+
labelField: t.labelField,
|
|
2922
|
+
valueField: t.valueField
|
|
2923
|
+
}), s = V(() => u.value.map((c) => ({
|
|
2924
|
+
value: c[t.valueField],
|
|
2925
|
+
label: c[t.labelField],
|
|
2926
|
+
disabled: c.disabled ?? !1
|
|
2927
|
+
})));
|
|
2928
|
+
function p(c) {
|
|
2929
|
+
c && s.value.length === 0 && g(void 0, !0);
|
|
2930
|
+
}
|
|
2931
|
+
return Z(() => {
|
|
2932
|
+
g(void 0, !0);
|
|
2933
|
+
}), re(() => t.deptId, () => {
|
|
2934
|
+
n(), g(void 0, !0);
|
|
2935
|
+
}), (c, k) => (i(), w(a(ue), I(c.$attrs, {
|
|
2936
|
+
"model-value": e.modelValue,
|
|
2937
|
+
loading: a(h),
|
|
2938
|
+
multiple: e.mode === "multiple",
|
|
2939
|
+
placeholder: e.placeholder,
|
|
2940
|
+
clearable: e.clearable,
|
|
2941
|
+
disabled: e.disabled,
|
|
2942
|
+
readonly: e.readonly,
|
|
2943
|
+
filterable: e.filterable,
|
|
2944
|
+
size: e.size,
|
|
2945
|
+
remote: !0,
|
|
2946
|
+
"remote-method": a(d),
|
|
2947
|
+
"onUpdate:modelValue": k[1] || (k[1] = (f) => r("update:modelValue", f)),
|
|
2948
|
+
onChange: k[2] || (k[2] = (f) => r("change", f)),
|
|
2949
|
+
onClear: k[3] || (k[3] = (f) => r("clear")),
|
|
2950
|
+
onBlur: k[4] || (k[4] = (f) => r("blur", f)),
|
|
2951
|
+
onFocus: k[5] || (k[5] = (f) => r("focus", f)),
|
|
2952
|
+
onVisibleChange: p
|
|
2953
|
+
}), {
|
|
2954
|
+
loading: v(() => [
|
|
2955
|
+
N("div", It, [
|
|
2956
|
+
N("span", null, F(a(o)("remoteSelect", "loading")), 1)
|
|
2957
|
+
])
|
|
2958
|
+
]),
|
|
2959
|
+
default: v(() => [
|
|
2960
|
+
(i(!0), D(O, null, K(s.value, (f) => (i(), w(a(de), {
|
|
2961
|
+
key: f.value,
|
|
2962
|
+
label: f.label,
|
|
2963
|
+
value: f.value,
|
|
2964
|
+
disabled: f.disabled
|
|
2965
|
+
}, null, 8, ["label", "value", "disabled"]))), 128)),
|
|
2966
|
+
!a(C) && !a(h) && s.value.length > 0 ? (i(), D("div", {
|
|
2967
|
+
key: 0,
|
|
2968
|
+
class: "ee-load-more",
|
|
2969
|
+
onClick: k[0] || (k[0] = //@ts-ignore
|
|
2970
|
+
(...f) => a(b) && a(b)(...f))
|
|
2971
|
+
}, [
|
|
2972
|
+
N("span", null, F(a(o)("remoteSelect", "loadMore")), 1)
|
|
2973
|
+
])) : L("", !0),
|
|
2974
|
+
a(C) && s.value.length > 0 ? (i(), D("div", Mt, [
|
|
2975
|
+
N("span", null, F(a(o)("remoteSelect", "noMore")), 1)
|
|
2976
|
+
])) : L("", !0)
|
|
2977
|
+
]),
|
|
2978
|
+
_: 1
|
|
2979
|
+
}, 16, ["model-value", "loading", "multiple", "placeholder", "clearable", "disabled", "readonly", "filterable", "size", "remote-method"]));
|
|
2980
|
+
}
|
|
2981
|
+
}), qe = /* @__PURE__ */ De(Ot, [["__scopeId", "data-v-6e78b80d"]]);
|
|
2982
|
+
qe.install = (e) => {
|
|
2983
|
+
e.component(qe.name ?? "EeUserSelect", qe);
|
|
2984
|
+
};
|
|
2985
|
+
const Lt = {
|
|
2986
|
+
key: 1,
|
|
2987
|
+
class: "ee-no-more"
|
|
2988
|
+
}, Nt = { class: "ee-loading-tip" }, Kt = /* @__PURE__ */ H({
|
|
2989
|
+
name: "EeRoleSelect",
|
|
2990
|
+
__name: "index",
|
|
2991
|
+
props: {
|
|
2992
|
+
modelValue: {},
|
|
2993
|
+
apiUrl: { default: "/api/system/role/page" },
|
|
2994
|
+
detailEchoUrl: { default: "/api/system/role/detail" },
|
|
2995
|
+
mode: { default: "single" },
|
|
2996
|
+
labelField: { default: "label" },
|
|
2997
|
+
valueField: { default: "value" },
|
|
2998
|
+
searchKey: { default: "keyword" },
|
|
2999
|
+
extraParams: {},
|
|
3000
|
+
requestInstance: {},
|
|
3001
|
+
placeholder: {},
|
|
3002
|
+
clearable: { type: Boolean, default: !0 },
|
|
3003
|
+
disabled: { type: Boolean },
|
|
3004
|
+
readonly: { type: Boolean },
|
|
3005
|
+
filterable: { type: Boolean, default: !0 },
|
|
3006
|
+
size: { default: "default" }
|
|
3007
|
+
},
|
|
3008
|
+
emits: ["update:modelValue", "change", "clear", "blur", "focus", "search", "load-success"],
|
|
3009
|
+
setup(e, { emit: l }) {
|
|
3010
|
+
const t = e, r = l, { t: o } = _(), {
|
|
3011
|
+
loading: m,
|
|
3012
|
+
options: h,
|
|
3013
|
+
noMore: u,
|
|
3014
|
+
loadData: C,
|
|
3015
|
+
loadMore: g,
|
|
3016
|
+
onKeywordChange: b
|
|
3017
|
+
} = Ze({
|
|
3018
|
+
apiUrl: t.apiUrl,
|
|
3019
|
+
pageSizeKey: "pageSize",
|
|
3020
|
+
pageNumKey: "pageNum",
|
|
3021
|
+
pageSize: 20,
|
|
3022
|
+
searchKey: t.searchKey,
|
|
3023
|
+
extraParams: t.extraParams,
|
|
3024
|
+
labelField: t.labelField,
|
|
3025
|
+
valueField: t.valueField
|
|
3026
|
+
}), n = V(() => h.value.map((s) => ({
|
|
3027
|
+
value: s[t.valueField],
|
|
3028
|
+
label: s[t.labelField],
|
|
3029
|
+
disabled: s.disabled ?? !1
|
|
3030
|
+
})));
|
|
3031
|
+
function d(s) {
|
|
3032
|
+
s && n.value.length === 0 && C(void 0, !0);
|
|
3033
|
+
}
|
|
3034
|
+
return Z(() => {
|
|
3035
|
+
C(void 0, !0);
|
|
3036
|
+
}), (s, p) => (i(), w(a(ue), I(s.$attrs, {
|
|
3037
|
+
"model-value": e.modelValue,
|
|
3038
|
+
loading: a(m),
|
|
3039
|
+
multiple: e.mode === "multiple",
|
|
3040
|
+
placeholder: e.placeholder,
|
|
3041
|
+
clearable: e.clearable,
|
|
3042
|
+
disabled: e.disabled,
|
|
3043
|
+
readonly: e.readonly,
|
|
3044
|
+
filterable: e.filterable,
|
|
3045
|
+
size: e.size,
|
|
3046
|
+
remote: !0,
|
|
3047
|
+
"remote-method": a(b),
|
|
3048
|
+
"onUpdate:modelValue": p[1] || (p[1] = (c) => r("update:modelValue", c)),
|
|
3049
|
+
onChange: p[2] || (p[2] = (c) => r("change", c)),
|
|
3050
|
+
onClear: p[3] || (p[3] = (c) => r("clear")),
|
|
3051
|
+
onBlur: p[4] || (p[4] = (c) => r("blur", c)),
|
|
3052
|
+
onFocus: p[5] || (p[5] = (c) => r("focus", c)),
|
|
3053
|
+
onVisibleChange: d
|
|
3054
|
+
}), {
|
|
3055
|
+
loading: v(() => [
|
|
3056
|
+
N("div", Nt, [
|
|
3057
|
+
N("span", null, F(a(o)("remoteSelect", "loading")), 1)
|
|
3058
|
+
])
|
|
3059
|
+
]),
|
|
3060
|
+
default: v(() => [
|
|
3061
|
+
(i(!0), D(O, null, K(n.value, (c) => (i(), w(a(de), {
|
|
3062
|
+
key: c.value,
|
|
3063
|
+
label: c.label,
|
|
3064
|
+
value: c.value,
|
|
3065
|
+
disabled: c.disabled
|
|
3066
|
+
}, null, 8, ["label", "value", "disabled"]))), 128)),
|
|
3067
|
+
!a(u) && !a(m) && n.value.length > 0 ? (i(), D("div", {
|
|
3068
|
+
key: 0,
|
|
3069
|
+
class: "ee-load-more",
|
|
3070
|
+
onClick: p[0] || (p[0] = //@ts-ignore
|
|
3071
|
+
(...c) => a(g) && a(g)(...c))
|
|
3072
|
+
}, [
|
|
3073
|
+
N("span", null, F(a(o)("remoteSelect", "loadMore")), 1)
|
|
3074
|
+
])) : L("", !0),
|
|
3075
|
+
a(u) && n.value.length > 0 ? (i(), D("div", Lt, [
|
|
3076
|
+
N("span", null, F(a(o)("remoteSelect", "noMore")), 1)
|
|
3077
|
+
])) : L("", !0)
|
|
3078
|
+
]),
|
|
3079
|
+
_: 1
|
|
3080
|
+
}, 16, ["model-value", "loading", "multiple", "placeholder", "clearable", "disabled", "readonly", "filterable", "size", "remote-method"]));
|
|
3081
|
+
}
|
|
3082
|
+
}), He = /* @__PURE__ */ De(Kt, [["__scopeId", "data-v-58cd12c9"]]);
|
|
3083
|
+
He.install = (e) => {
|
|
3084
|
+
e.component(He.name ?? "EeRoleSelect", He);
|
|
3085
|
+
};
|
|
3086
|
+
const qt = [
|
|
3087
|
+
"#409eff",
|
|
3088
|
+
"#67c23a",
|
|
3089
|
+
"#e6a23c",
|
|
3090
|
+
"#f56c6c",
|
|
3091
|
+
"#909399",
|
|
3092
|
+
"#8b5cf6",
|
|
3093
|
+
"#ec4899",
|
|
3094
|
+
"#06b6d4",
|
|
3095
|
+
"#f97316",
|
|
3096
|
+
"#6366f1"
|
|
3097
|
+
], me = "PingFang SC, Microsoft YaHei, sans-serif", _e = {
|
|
3098
|
+
color: qt,
|
|
3099
|
+
title: {
|
|
3100
|
+
textStyle: {
|
|
3101
|
+
fontSize: 16,
|
|
3102
|
+
fontWeight: 600,
|
|
3103
|
+
fontFamily: me,
|
|
3104
|
+
color: "#303133"
|
|
3105
|
+
},
|
|
3106
|
+
subtextStyle: {
|
|
3107
|
+
fontSize: 12,
|
|
3108
|
+
fontFamily: me,
|
|
3109
|
+
color: "#909399"
|
|
3110
|
+
},
|
|
3111
|
+
left: 0,
|
|
3112
|
+
top: 0
|
|
3113
|
+
},
|
|
3114
|
+
tooltip: {
|
|
3115
|
+
trigger: "axis",
|
|
3116
|
+
backgroundColor: "rgba(255, 255, 255, 0.95)",
|
|
3117
|
+
borderWidth: 0,
|
|
3118
|
+
borderRadius: 4,
|
|
3119
|
+
padding: [8, 12],
|
|
3120
|
+
textStyle: {
|
|
3121
|
+
fontSize: 12,
|
|
3122
|
+
fontFamily: me,
|
|
3123
|
+
color: "#303133"
|
|
3124
|
+
},
|
|
3125
|
+
extraCssText: "box-shadow: 0 2px 12px rgba(0,0,0,0.1);"
|
|
3126
|
+
},
|
|
3127
|
+
legend: {
|
|
3128
|
+
type: "plain",
|
|
3129
|
+
top: 30,
|
|
3130
|
+
left: 0,
|
|
3131
|
+
itemWidth: 14,
|
|
3132
|
+
itemHeight: 10,
|
|
3133
|
+
textStyle: {
|
|
3134
|
+
fontSize: 12,
|
|
3135
|
+
fontFamily: me,
|
|
3136
|
+
color: "#606266"
|
|
3137
|
+
}
|
|
3138
|
+
},
|
|
3139
|
+
grid: {
|
|
3140
|
+
top: 70,
|
|
3141
|
+
right: 20,
|
|
3142
|
+
bottom: 30,
|
|
3143
|
+
left: 50,
|
|
3144
|
+
containLabel: !0
|
|
3145
|
+
},
|
|
3146
|
+
xAxis: {
|
|
3147
|
+
type: "category",
|
|
3148
|
+
axisLine: {
|
|
3149
|
+
show: !0,
|
|
3150
|
+
lineStyle: {
|
|
3151
|
+
color: "#dcdfe6",
|
|
3152
|
+
width: 1
|
|
3153
|
+
}
|
|
3154
|
+
},
|
|
3155
|
+
axisTick: {
|
|
3156
|
+
alignWithLabel: !0
|
|
3157
|
+
},
|
|
3158
|
+
axisLabel: {
|
|
3159
|
+
fontSize: 11,
|
|
3160
|
+
fontFamily: me,
|
|
3161
|
+
color: "#909399"
|
|
3162
|
+
},
|
|
3163
|
+
splitLine: {
|
|
3164
|
+
show: !1
|
|
3165
|
+
}
|
|
3166
|
+
},
|
|
3167
|
+
yAxis: {
|
|
3168
|
+
type: "value",
|
|
3169
|
+
axisLine: {
|
|
3170
|
+
show: !1
|
|
3171
|
+
},
|
|
3172
|
+
axisTick: {
|
|
3173
|
+
show: !1
|
|
3174
|
+
},
|
|
3175
|
+
axisLabel: {
|
|
3176
|
+
fontSize: 11,
|
|
3177
|
+
fontFamily: me,
|
|
3178
|
+
color: "#909399"
|
|
3179
|
+
},
|
|
3180
|
+
splitLine: {
|
|
3181
|
+
show: !0,
|
|
3182
|
+
lineStyle: {
|
|
3183
|
+
color: "#ebeef5",
|
|
3184
|
+
type: "dashed"
|
|
3185
|
+
}
|
|
3186
|
+
}
|
|
3187
|
+
},
|
|
3188
|
+
series: {
|
|
3189
|
+
bar: {
|
|
3190
|
+
barMaxWidth: 40,
|
|
3191
|
+
itemStyle: {
|
|
3192
|
+
borderRadius: [2, 2, 0, 0]
|
|
3193
|
+
}
|
|
3194
|
+
},
|
|
3195
|
+
line: {
|
|
3196
|
+
lineStyle: {
|
|
3197
|
+
width: 2
|
|
3198
|
+
},
|
|
3199
|
+
itemStyle: {
|
|
3200
|
+
borderWidth: 2
|
|
3201
|
+
}
|
|
3202
|
+
},
|
|
3203
|
+
pie: {
|
|
3204
|
+
label: {
|
|
3205
|
+
fontSize: 12,
|
|
3206
|
+
fontFamily: me,
|
|
3207
|
+
color: "#606266"
|
|
3208
|
+
},
|
|
3209
|
+
labelLine: {
|
|
3210
|
+
lineStyle: {
|
|
3211
|
+
color: "#dcdfe6"
|
|
3212
|
+
}
|
|
3213
|
+
}
|
|
3214
|
+
},
|
|
3215
|
+
radar: {
|
|
3216
|
+
lineStyle: {
|
|
3217
|
+
width: 2
|
|
3218
|
+
},
|
|
3219
|
+
areaStyle: {
|
|
3220
|
+
opacity: 0.15
|
|
3221
|
+
}
|
|
3222
|
+
}
|
|
3223
|
+
}
|
|
3224
|
+
}, Ht = {
|
|
3225
|
+
text: "数据加载中...",
|
|
3226
|
+
color: "#409eff",
|
|
3227
|
+
textColor: "#909399",
|
|
3228
|
+
maskColor: "rgba(255, 255, 255, 0.8)",
|
|
3229
|
+
fontSize: 13
|
|
3230
|
+
};
|
|
3231
|
+
function ae(e, l) {
|
|
3232
|
+
if (!l) return e;
|
|
3233
|
+
const t = { ...e };
|
|
3234
|
+
for (const r of Object.keys(l)) {
|
|
3235
|
+
const o = l[r];
|
|
3236
|
+
o != null && (Array.isArray(o) || Array.isArray(t[r]) ? t[r] = o : typeof o == "object" && typeof t[r] == "object" ? t[r] = ae(t[r], o) : t[r] = o);
|
|
3237
|
+
}
|
|
3238
|
+
return t;
|
|
3239
|
+
}
|
|
3240
|
+
function ea(e, l = {}) {
|
|
3241
|
+
const t = xl(), r = A(!1);
|
|
3242
|
+
let o = null, m = null;
|
|
3243
|
+
function h() {
|
|
3244
|
+
e.value && (t.value && t.value.dispose(), t.value = $l.init(e.value), r.value = !0);
|
|
3245
|
+
}
|
|
3246
|
+
function u(d, s = !1) {
|
|
3247
|
+
t.value && t.value.setOption(d, { notMerge: s });
|
|
3248
|
+
}
|
|
3249
|
+
function C() {
|
|
3250
|
+
m && clearTimeout(m), m = setTimeout(() => {
|
|
3251
|
+
var d;
|
|
3252
|
+
(d = t.value) == null || d.resize();
|
|
3253
|
+
}, 200);
|
|
3254
|
+
}
|
|
3255
|
+
function g() {
|
|
3256
|
+
var d;
|
|
3257
|
+
(d = t.value) == null || d.showLoading("default", Ht);
|
|
3258
|
+
}
|
|
3259
|
+
function b() {
|
|
3260
|
+
var d;
|
|
3261
|
+
(d = t.value) == null || d.hideLoading();
|
|
3262
|
+
}
|
|
3263
|
+
function n() {
|
|
3264
|
+
o && (o.disconnect(), o = null), m && (clearTimeout(m), m = null), t.value && (t.value.dispose(), t.value = void 0), r.value = !1;
|
|
3265
|
+
}
|
|
3266
|
+
return Z(() => {
|
|
3267
|
+
Fe(() => {
|
|
3268
|
+
h(), l.isAutoResize !== !1 && e.value && (o = new ResizeObserver(() => C()), o.observe(e.value));
|
|
3269
|
+
});
|
|
3270
|
+
}), zl(() => {
|
|
3271
|
+
n();
|
|
3272
|
+
}), {
|
|
3273
|
+
instance: t,
|
|
3274
|
+
isReady: r,
|
|
3275
|
+
setOption: u,
|
|
3276
|
+
handleResize: C,
|
|
3277
|
+
showLoading: g,
|
|
3278
|
+
hideLoading: b,
|
|
3279
|
+
destroy: n
|
|
3280
|
+
};
|
|
3281
|
+
}
|
|
3282
|
+
const We = /* @__PURE__ */ H({
|
|
3283
|
+
name: "EeBaseBar",
|
|
3284
|
+
__name: "index",
|
|
3285
|
+
props: {
|
|
3286
|
+
width: { default: "100%" },
|
|
3287
|
+
height: { default: "400px" },
|
|
3288
|
+
xAxisData: { default: () => [] },
|
|
3289
|
+
seriesData: { default: () => [] },
|
|
3290
|
+
isStack: { type: Boolean, default: !1 },
|
|
3291
|
+
barWidth: {},
|
|
3292
|
+
title: {},
|
|
3293
|
+
legendShow: { type: Boolean, default: !0 },
|
|
3294
|
+
tooltipShow: { type: Boolean, default: !0 },
|
|
3295
|
+
extraOption: {},
|
|
3296
|
+
isAutoResize: { type: Boolean, default: !0 }
|
|
3297
|
+
},
|
|
3298
|
+
setup(e) {
|
|
3299
|
+
const l = e, t = A(), { isReady: r, setOption: o, showLoading: m, hideLoading: h } = ea(t, {
|
|
3300
|
+
isAutoResize: l.isAutoResize
|
|
3301
|
+
}), u = V(() => l.seriesData.map((g) => ({
|
|
3302
|
+
name: g.name,
|
|
3303
|
+
type: "bar",
|
|
3304
|
+
data: g.data,
|
|
3305
|
+
barWidth: l.barWidth,
|
|
3306
|
+
stack: l.isStack ? "total" : g.stack || void 0,
|
|
3307
|
+
itemStyle: g.color ? { color: g.color } : void 0
|
|
3308
|
+
}))), C = V(() => {
|
|
3309
|
+
let g = ae({}, _e);
|
|
3310
|
+
return g = ae(g, {
|
|
3311
|
+
tooltip: { show: l.tooltipShow, trigger: "axis" },
|
|
3312
|
+
legend: { show: l.legendShow, data: l.seriesData.map((b) => b.name) },
|
|
3313
|
+
title: l.title ? { text: l.title, show: !0 } : { show: !1 },
|
|
3314
|
+
grid: { top: l.title ? 70 : 40 },
|
|
3315
|
+
xAxis: { data: l.xAxisData },
|
|
3316
|
+
series: u.value
|
|
3317
|
+
}), l.extraOption && (g = ae(g, l.extraOption)), g;
|
|
3318
|
+
});
|
|
3319
|
+
return re(C, (g) => {
|
|
3320
|
+
r.value && o(g, !0);
|
|
3321
|
+
}, { deep: !0 }), Z(() => {
|
|
3322
|
+
Fe(() => {
|
|
3323
|
+
(l.xAxisData.length > 0 || l.seriesData.length > 0) && o(C.value, !0);
|
|
3324
|
+
});
|
|
3325
|
+
}), (g, b) => (i(), D("div", I({
|
|
3326
|
+
ref_key: "chartRef",
|
|
3327
|
+
ref: t,
|
|
3328
|
+
style: { width: e.width, height: e.height }
|
|
3329
|
+
}, g.$attrs), null, 16));
|
|
3330
|
+
}
|
|
3331
|
+
});
|
|
3332
|
+
We.install = (e) => {
|
|
3333
|
+
e.component(We.name ?? "EeBaseBar", We);
|
|
3334
|
+
};
|
|
3335
|
+
const je = /* @__PURE__ */ H({
|
|
3336
|
+
name: "EeBaseLine",
|
|
3337
|
+
__name: "index",
|
|
3338
|
+
props: {
|
|
3339
|
+
width: { default: "100%" },
|
|
3340
|
+
height: { default: "400px" },
|
|
3341
|
+
xAxisData: { default: () => [] },
|
|
3342
|
+
seriesData: { default: () => [] },
|
|
3343
|
+
isSmooth: { type: Boolean, default: !1 },
|
|
3344
|
+
showSymbol: { type: Boolean, default: !0 },
|
|
3345
|
+
isArea: { type: Boolean, default: !1 },
|
|
3346
|
+
title: {},
|
|
3347
|
+
legendShow: { type: Boolean, default: !0 },
|
|
3348
|
+
tooltipShow: { type: Boolean, default: !0 },
|
|
3349
|
+
extraOption: {},
|
|
3350
|
+
isAutoResize: { type: Boolean, default: !0 }
|
|
3351
|
+
},
|
|
3352
|
+
setup(e) {
|
|
3353
|
+
const l = e, t = A(), { isReady: r, setOption: o } = ea(t, {
|
|
3354
|
+
isAutoResize: l.isAutoResize
|
|
3355
|
+
}), m = V(() => l.seriesData.map((u) => ({
|
|
3356
|
+
name: u.name,
|
|
3357
|
+
type: "line",
|
|
3358
|
+
data: u.data,
|
|
3359
|
+
smooth: l.isSmooth,
|
|
3360
|
+
showSymbol: l.showSymbol,
|
|
3361
|
+
symbol: "circle",
|
|
3362
|
+
symbolSize: 6,
|
|
3363
|
+
lineStyle: u.color ? { color: u.color } : void 0,
|
|
3364
|
+
itemStyle: u.color ? { color: u.color } : void 0,
|
|
3365
|
+
areaStyle: l.isArea ? { opacity: 0.15 } : void 0
|
|
3366
|
+
}))), h = V(() => {
|
|
3367
|
+
let u = ae({}, _e);
|
|
3368
|
+
return u = ae(u, {
|
|
3369
|
+
tooltip: { show: l.tooltipShow, trigger: "axis" },
|
|
3370
|
+
legend: { show: l.legendShow, data: l.seriesData.map((C) => C.name) },
|
|
3371
|
+
title: l.title ? { text: l.title, show: !0 } : { show: !1 },
|
|
3372
|
+
grid: { top: l.title ? 70 : 40 },
|
|
3373
|
+
xAxis: { data: l.xAxisData },
|
|
3374
|
+
series: m.value
|
|
3375
|
+
}), l.extraOption && (u = ae(u, l.extraOption)), u;
|
|
3376
|
+
});
|
|
3377
|
+
return re(h, (u) => {
|
|
3378
|
+
r.value && o(u, !0);
|
|
3379
|
+
}, { deep: !0 }), Z(() => {
|
|
3380
|
+
Fe(() => {
|
|
3381
|
+
(l.xAxisData.length > 0 || l.seriesData.length > 0) && o(h.value, !0);
|
|
3382
|
+
});
|
|
3383
|
+
}), (u, C) => (i(), D("div", I({
|
|
3384
|
+
ref_key: "chartRef",
|
|
3385
|
+
ref: t,
|
|
3386
|
+
style: { width: e.width, height: e.height }
|
|
3387
|
+
}, u.$attrs), null, 16));
|
|
3388
|
+
}
|
|
3389
|
+
});
|
|
3390
|
+
je.install = (e) => {
|
|
3391
|
+
e.component(je.name ?? "EeBaseLine", je);
|
|
3392
|
+
};
|
|
3393
|
+
const Ge = /* @__PURE__ */ H({
|
|
3394
|
+
name: "EeBasePie",
|
|
3395
|
+
__name: "index",
|
|
3396
|
+
props: {
|
|
3397
|
+
width: { default: "100%" },
|
|
3398
|
+
height: { default: "400px" },
|
|
3399
|
+
pieData: { default: () => [] },
|
|
3400
|
+
isRing: { type: Boolean, default: !1 },
|
|
3401
|
+
radius: {},
|
|
3402
|
+
labelShow: { type: Boolean, default: !0 },
|
|
3403
|
+
title: {},
|
|
3404
|
+
legendShow: { type: Boolean, default: !0 },
|
|
3405
|
+
tooltipShow: { type: Boolean, default: !0 },
|
|
3406
|
+
extraOption: {},
|
|
3407
|
+
isAutoResize: { type: Boolean, default: !0 }
|
|
3408
|
+
},
|
|
3409
|
+
setup(e) {
|
|
3410
|
+
const l = e, t = A(), { isReady: r, setOption: o } = ea(t, {
|
|
3411
|
+
isAutoResize: l.isAutoResize
|
|
3412
|
+
}), m = V(() => l.radius ? l.radius : l.isRing ? ["40%", "60%"] : ["0%", "60%"]), h = V(() => {
|
|
3413
|
+
let u = ae({}, _e);
|
|
3414
|
+
return u = ae(u, {
|
|
3415
|
+
tooltip: { show: l.tooltipShow, trigger: "item" },
|
|
3416
|
+
legend: { show: l.legendShow, top: "bottom" },
|
|
3417
|
+
title: l.title ? { text: l.title, show: !0 } : { show: !1 },
|
|
3418
|
+
grid: void 0,
|
|
3419
|
+
xAxis: void 0,
|
|
3420
|
+
yAxis: void 0,
|
|
3421
|
+
series: [{
|
|
3422
|
+
type: "pie",
|
|
3423
|
+
radius: m.value,
|
|
3424
|
+
center: ["50%", "50%"],
|
|
3425
|
+
data: l.pieData,
|
|
3426
|
+
label: { show: l.labelShow },
|
|
3427
|
+
emphasis: {
|
|
3428
|
+
itemStyle: {
|
|
3429
|
+
shadowBlur: 10,
|
|
3430
|
+
shadowOffsetX: 0,
|
|
3431
|
+
shadowColor: "rgba(0, 0, 0, 0.15)"
|
|
3432
|
+
}
|
|
3433
|
+
}
|
|
3434
|
+
}]
|
|
3435
|
+
}), l.extraOption && (u = ae(u, l.extraOption)), u;
|
|
3436
|
+
});
|
|
3437
|
+
return re(h, (u) => {
|
|
3438
|
+
r.value && o(u, !0);
|
|
3439
|
+
}, { deep: !0 }), Z(() => {
|
|
3440
|
+
Fe(() => {
|
|
3441
|
+
l.pieData.length > 0 && o(h.value, !0);
|
|
3442
|
+
});
|
|
3443
|
+
}), (u, C) => (i(), D("div", I({
|
|
3444
|
+
ref_key: "chartRef",
|
|
3445
|
+
ref: t,
|
|
3446
|
+
style: { width: e.width, height: e.height }
|
|
3447
|
+
}, u.$attrs), null, 16));
|
|
3448
|
+
}
|
|
3449
|
+
});
|
|
3450
|
+
Ge.install = (e) => {
|
|
3451
|
+
e.component(Ge.name ?? "EeBasePie", Ge);
|
|
3452
|
+
};
|
|
3453
|
+
const Xe = /* @__PURE__ */ H({
|
|
3454
|
+
name: "EeBaseRadar",
|
|
3455
|
+
__name: "index",
|
|
3456
|
+
props: {
|
|
3457
|
+
width: { default: "100%" },
|
|
3458
|
+
height: { default: "400px" },
|
|
3459
|
+
indicator: { default: () => [] },
|
|
3460
|
+
seriesData: { default: () => [] },
|
|
3461
|
+
isFill: { type: Boolean, default: !0 },
|
|
3462
|
+
title: {},
|
|
3463
|
+
legendShow: { type: Boolean, default: !0 },
|
|
3464
|
+
tooltipShow: { type: Boolean, default: !0 },
|
|
3465
|
+
extraOption: {},
|
|
3466
|
+
isAutoResize: { type: Boolean, default: !0 }
|
|
3467
|
+
},
|
|
3468
|
+
setup(e) {
|
|
3469
|
+
const l = e, t = A(), { isReady: r, setOption: o } = ea(t, {
|
|
3470
|
+
isAutoResize: l.isAutoResize
|
|
3471
|
+
}), m = V(() => l.seriesData.map((u) => ({
|
|
3472
|
+
name: u.name,
|
|
3473
|
+
type: "radar",
|
|
3474
|
+
data: [u.value],
|
|
3475
|
+
symbol: "none",
|
|
3476
|
+
lineStyle: u.color ? { color: u.color } : void 0,
|
|
3477
|
+
itemStyle: u.color ? { color: u.color } : void 0,
|
|
3478
|
+
areaStyle: l.isFill ? { opacity: 0.15 } : void 0
|
|
3479
|
+
}))), h = V(() => {
|
|
3480
|
+
let u = ae({}, _e);
|
|
3481
|
+
return u = ae(u, {
|
|
3482
|
+
tooltip: { show: l.tooltipShow, trigger: "item" },
|
|
3483
|
+
legend: { show: l.legendShow, data: l.seriesData.map((C) => C.name) },
|
|
3484
|
+
title: l.title ? { text: l.title, show: !0 } : { show: !1 },
|
|
3485
|
+
grid: void 0,
|
|
3486
|
+
xAxis: void 0,
|
|
3487
|
+
yAxis: void 0,
|
|
3488
|
+
radar: {
|
|
3489
|
+
indicator: l.indicator,
|
|
3490
|
+
radius: "65%",
|
|
3491
|
+
shape: "polygon",
|
|
3492
|
+
name: {
|
|
3493
|
+
textStyle: { fontSize: 12, color: "#606266" }
|
|
3494
|
+
},
|
|
3495
|
+
splitLine: { lineStyle: { color: "#ebeef5" } },
|
|
3496
|
+
splitArea: { areaStyle: { color: ["rgba(64,158,255,0.02)", "rgba(64,158,255,0.05)"] } },
|
|
3497
|
+
axisLine: { lineStyle: { color: "#dcdfe6" } }
|
|
3498
|
+
},
|
|
3499
|
+
series: m.value
|
|
3500
|
+
}), l.extraOption && (u = ae(u, l.extraOption)), u;
|
|
3501
|
+
});
|
|
3502
|
+
return re(h, (u) => {
|
|
3503
|
+
r.value && o(u, !0);
|
|
3504
|
+
}, { deep: !0 }), Z(() => {
|
|
3505
|
+
Fe(() => {
|
|
3506
|
+
l.indicator.length > 0 && l.seriesData.length > 0 && o(h.value, !0);
|
|
3507
|
+
});
|
|
3508
|
+
}), (u, C) => (i(), D("div", I({
|
|
3509
|
+
ref_key: "chartRef",
|
|
3510
|
+
ref: t,
|
|
3511
|
+
style: { width: e.width, height: e.height }
|
|
3512
|
+
}, u.$attrs), null, 16));
|
|
3513
|
+
}
|
|
3514
|
+
});
|
|
3515
|
+
Xe.install = (e) => {
|
|
3516
|
+
e.component(Xe.name ?? "EeBaseRadar", Xe);
|
|
3517
|
+
};
|
|
3518
|
+
const Wt = [
|
|
3519
|
+
We,
|
|
3520
|
+
je,
|
|
3521
|
+
Ge,
|
|
3522
|
+
Xe
|
|
3523
|
+
], jt = {
|
|
3524
|
+
formTable: {
|
|
3525
|
+
operation: "Actions",
|
|
3526
|
+
add: "Add",
|
|
3527
|
+
edit: "Edit",
|
|
3528
|
+
delete: "Delete",
|
|
3529
|
+
view: "View",
|
|
3530
|
+
import: "Import",
|
|
3531
|
+
export: "Export",
|
|
3532
|
+
batchDelete: "Batch Delete",
|
|
3533
|
+
refresh: "Refresh",
|
|
3534
|
+
columnSetting: "Columns",
|
|
3535
|
+
search: "Search",
|
|
3536
|
+
reset: "Reset",
|
|
3537
|
+
expand: "Expand",
|
|
3538
|
+
collapse: "Collapse",
|
|
3539
|
+
empty: "No data",
|
|
3540
|
+
confirm: "OK",
|
|
3541
|
+
cancel: "Cancel",
|
|
3542
|
+
close: "Close",
|
|
3543
|
+
confirmDelete: "Confirm Delete",
|
|
3544
|
+
confirmDeleteMsg: "Are you sure you want to delete this item?",
|
|
3545
|
+
confirmBatchDelete: "Confirm Batch Delete",
|
|
3546
|
+
confirmBatchDeleteMsg: "Are you sure you want to delete the selected {count} items?",
|
|
3547
|
+
addTitle: "Add",
|
|
3548
|
+
editTitle: "Edit",
|
|
3549
|
+
viewTitle: "View",
|
|
3550
|
+
addSuccess: "Add successful",
|
|
3551
|
+
editSuccess: "Update successful",
|
|
3552
|
+
deleteSuccess: "Delete successful",
|
|
3553
|
+
batchDeleteSuccess: "Batch delete successful",
|
|
3554
|
+
refreshSuccess: "Refresh successful",
|
|
3555
|
+
exportSuccess: "Export successful",
|
|
3556
|
+
exportFail: "Export failed",
|
|
3557
|
+
requestFailed: "Request failed",
|
|
3558
|
+
deleteFailed: "Delete failed",
|
|
3559
|
+
batchDeleteFailed: "Batch delete failed",
|
|
3560
|
+
installXlsx: "Please install xlsx dependency: npm install xlsx",
|
|
3561
|
+
exportFileName: "export.xlsx",
|
|
3562
|
+
inputPlaceholder: "Please enter {label}",
|
|
3563
|
+
selectPlaceholder: "Please select {label}",
|
|
3564
|
+
dateRangeTo: "to",
|
|
3565
|
+
dateRangeStart: "Start date",
|
|
3566
|
+
dateRangeEnd: "End date",
|
|
3567
|
+
version: "Version",
|
|
3568
|
+
versionTitle: "Version History",
|
|
3569
|
+
moreActions: "More Actions",
|
|
3570
|
+
rowIndex: "#",
|
|
3571
|
+
selectionLabel: "Selection"
|
|
3572
|
+
},
|
|
3573
|
+
searchBar: {
|
|
3574
|
+
search: "Search",
|
|
3575
|
+
reset: "Reset",
|
|
3576
|
+
expand: "Expand",
|
|
3577
|
+
collapse: "Collapse",
|
|
3578
|
+
inputPlaceholder: "Please enter {label}",
|
|
3579
|
+
selectPlaceholder: "Please select {label}",
|
|
3580
|
+
dateRangeTo: "to",
|
|
3581
|
+
dateRangeStart: "Start date",
|
|
3582
|
+
dateRangeEnd: "End date"
|
|
3583
|
+
},
|
|
3584
|
+
formDialog: {
|
|
3585
|
+
confirm: "OK",
|
|
3586
|
+
cancel: "Cancel",
|
|
3587
|
+
title: "Form",
|
|
3588
|
+
inputPlaceholder: "Please enter {label}",
|
|
3589
|
+
textareaPlaceholder: "Please enter {label}",
|
|
3590
|
+
selectPlaceholder: "Please select {label}",
|
|
3591
|
+
datePickerPlaceholder: "Please select {label}"
|
|
3592
|
+
},
|
|
3593
|
+
remoteSelect: {
|
|
3594
|
+
loading: "Loading...",
|
|
3595
|
+
noMore: "No more data",
|
|
3596
|
+
loadMore: "Load more",
|
|
3597
|
+
searchPlaceholder: "Please enter keyword",
|
|
3598
|
+
requestFailed: "Request failed",
|
|
3599
|
+
noData: "No data"
|
|
3600
|
+
}
|
|
3601
|
+
};
|
|
3602
|
+
function Gt(e, l) {
|
|
3603
|
+
if (!e) return l;
|
|
3604
|
+
const t = {};
|
|
3605
|
+
for (const r of ["formTable", "searchBar", "formDialog", "remoteSelect"])
|
|
3606
|
+
t[r] = { ...l[r], ...e[r] };
|
|
3607
|
+
return t;
|
|
3608
|
+
}
|
|
3609
|
+
function _t(e) {
|
|
3610
|
+
const {
|
|
3611
|
+
requestInstance: l,
|
|
3612
|
+
detailApiUrl: t,
|
|
3613
|
+
labelField: r = "label",
|
|
3614
|
+
valueField: o = "value",
|
|
3615
|
+
mode: m = "single"
|
|
3616
|
+
} = e, h = l ?? he(aa);
|
|
3617
|
+
if (!h)
|
|
3618
|
+
throw new Error("[EasyEPUI] 请配置 requestInstance:可通过 app.use(EasyEpUI, { requestInstance }) 全局注入,或通过 props 传入");
|
|
3619
|
+
const u = h;
|
|
3620
|
+
_();
|
|
3621
|
+
const C = A("");
|
|
3622
|
+
function g(d) {
|
|
3623
|
+
return typeof d == "number" ? !0 : typeof d == "string" ? /^\d+(\.\d+)?$/.test(d.trim()) : !1;
|
|
3624
|
+
}
|
|
3625
|
+
async function b(d) {
|
|
3626
|
+
try {
|
|
3627
|
+
const p = (await u.get(t, { params: { id: d } })).data, c = (p == null ? void 0 : p.data) || p;
|
|
3628
|
+
return String(c ? c[r] ?? c[o] ?? "" : d);
|
|
3629
|
+
} catch {
|
|
3630
|
+
return String(d);
|
|
3631
|
+
}
|
|
3632
|
+
}
|
|
3633
|
+
async function n(d) {
|
|
3634
|
+
if (d == null || d === "") {
|
|
3635
|
+
C.value = m === "multiple" ? [] : "";
|
|
3636
|
+
return;
|
|
3637
|
+
}
|
|
3638
|
+
if (m === "multiple" && Array.isArray(d)) {
|
|
3639
|
+
if (d.length === 0) {
|
|
3640
|
+
C.value = [];
|
|
3641
|
+
return;
|
|
3642
|
+
}
|
|
3643
|
+
const s = d[0];
|
|
3644
|
+
if (g(s)) {
|
|
3645
|
+
const p = await Promise.all(d.map((c) => b(c)));
|
|
3646
|
+
C.value = p;
|
|
3647
|
+
} else
|
|
3648
|
+
C.value = d;
|
|
3649
|
+
} else {
|
|
3650
|
+
if (m === "multiple") {
|
|
3651
|
+
C.value = [];
|
|
3652
|
+
return;
|
|
3653
|
+
}
|
|
3654
|
+
const s = d;
|
|
3655
|
+
g(s) ? C.value = await b(s) : C.value = String(s);
|
|
3656
|
+
}
|
|
3657
|
+
}
|
|
3658
|
+
return {
|
|
3659
|
+
/** 当前回显文本(单选为 string,多选为 string[]) */
|
|
3660
|
+
echoText: C,
|
|
3661
|
+
echoValue: n
|
|
3662
|
+
};
|
|
3663
|
+
}
|
|
3664
|
+
const Xt = {
|
|
3665
|
+
"zh-cn": Se,
|
|
3666
|
+
en: jt
|
|
3667
|
+
}, aa = "eeRequestInstance", Yt = [
|
|
3668
|
+
$e,
|
|
3669
|
+
Me,
|
|
3670
|
+
Ie,
|
|
3671
|
+
Oe,
|
|
3672
|
+
Le,
|
|
3673
|
+
Ne,
|
|
3674
|
+
Ke,
|
|
3675
|
+
qe,
|
|
3676
|
+
He,
|
|
3677
|
+
...Wt
|
|
1680
3678
|
];
|
|
1681
|
-
function
|
|
1682
|
-
|
|
1683
|
-
|
|
3679
|
+
function Jt(e, l) {
|
|
3680
|
+
let t = Se;
|
|
3681
|
+
l != null && l.locale && (typeof l.locale == "string" ? t = Xt[l.locale] || Se : t = Gt(l.locale, Se)), e.provide(La, t), l != null && l.requestInstance && e.provide(aa, l.requestInstance), e.provide("eeGlobalConfig", {
|
|
3682
|
+
size: l == null ? void 0 : l.size,
|
|
3683
|
+
readOnly: l == null ? void 0 : l.readOnly,
|
|
3684
|
+
formTable: l == null ? void 0 : l.formTable,
|
|
3685
|
+
searchBar: l == null ? void 0 : l.searchBar,
|
|
3686
|
+
formDialog: l == null ? void 0 : l.formDialog,
|
|
3687
|
+
dictSelect: l == null ? void 0 : l.dictSelect,
|
|
3688
|
+
statusTag: l == null ? void 0 : l.statusTag,
|
|
3689
|
+
remoteSelect: l == null ? void 0 : l.remoteSelect,
|
|
3690
|
+
deptCascader: l == null ? void 0 : l.deptCascader,
|
|
3691
|
+
userSelect: l == null ? void 0 : l.userSelect,
|
|
3692
|
+
roleSelect: l == null ? void 0 : l.roleSelect
|
|
3693
|
+
}), Yt.forEach((r) => {
|
|
3694
|
+
e.use(r);
|
|
1684
3695
|
});
|
|
1685
3696
|
}
|
|
1686
|
-
const
|
|
3697
|
+
const eo = { install: Jt };
|
|
1687
3698
|
export {
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
3699
|
+
La as EE_LOCALE_KEY,
|
|
3700
|
+
aa as EE_REQUEST_KEY,
|
|
3701
|
+
We as EeBaseBar,
|
|
3702
|
+
je as EeBaseLine,
|
|
3703
|
+
Ge as EeBasePie,
|
|
3704
|
+
Xe as EeBaseRadar,
|
|
3705
|
+
Ke as EeDeptCascader,
|
|
3706
|
+
$e as EeDictSelect,
|
|
3707
|
+
Oe as EeFormDialog,
|
|
3708
|
+
Le as EeFormTable,
|
|
3709
|
+
Ne as EeRemoteSelect,
|
|
3710
|
+
He as EeRoleSelect,
|
|
3711
|
+
Ie as EeSearchBar,
|
|
3712
|
+
Me as EeStatusTag,
|
|
3713
|
+
qe as EeUserSelect,
|
|
3714
|
+
_e as GLOBAL_CHART_CONFIG,
|
|
3715
|
+
ae as deepMerge,
|
|
3716
|
+
eo as default,
|
|
3717
|
+
Jt as install,
|
|
3718
|
+
Gt as mergeLocale,
|
|
3719
|
+
ea as useChart,
|
|
3720
|
+
Ze as useRemoteSelectPagination,
|
|
3721
|
+
_t as useSelectEcho
|
|
1695
3722
|
};
|