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