@web-utils/component 3.0.2 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/address-input/index.mjs +14 -14
  2. package/chat/index.mjs +39 -40
  3. package/chunk-file-uploader/index.mjs +35 -594
  4. package/chunk-file-uploader/style.css +1 -1
  5. package/chunks/FormTemp.d079292b.mjs +139 -0
  6. package/chunks/{dataformat.816df805.mjs → dataformat.e655611c.mjs} +6 -6
  7. package/chunks/detail.d6f8e347.mjs +29 -0
  8. package/chunks/{dic.3b4ba802.mjs → dic.eaac0823.mjs} +40 -40
  9. package/chunks/{event.4377230d.mjs → event.10295951.mjs} +2 -2
  10. package/chunks/form-input-mixin.78a567bc.mjs +24 -0
  11. package/chunks/form-item-mixin.57cb2019.mjs +140 -0
  12. package/chunks/{index.d91bd77a.mjs → index.57f871af.mjs} +7 -7
  13. package/chunks/{init.f0a03127.mjs → init.47f219b4.mjs} +2 -2
  14. package/chunks/input-number-mixin.41a066be.mjs +60 -0
  15. package/chunks/{util.7844e2c2.mjs → util.ae730cde.mjs} +21 -21
  16. package/count-up/index.mjs +17 -14
  17. package/data-box/index.mjs +18 -19
  18. package/data-display/index.mjs +17 -18
  19. package/data-icons/index.mjs +16 -17
  20. package/data-panel/index.mjs +20 -21
  21. package/data-pay/index.mjs +15 -16
  22. package/data-progress/index.mjs +19 -20
  23. package/data-rotate/index.mjs +35 -36
  24. package/data-table-picker/index.mjs +23 -25
  25. package/data-tabs/index.mjs +15 -16
  26. package/dialog-form/index.mjs +11 -12
  27. package/dynamic-table/index.mjs +34 -35
  28. package/easy-popup/index.mjs +56 -29
  29. package/editable-tree/index.mjs +485 -134
  30. package/element-dialog/index.mjs +127 -37
  31. package/empty-view/index.mjs +31 -13
  32. package/flex-column/index.mjs +1 -1
  33. package/flex-item/index.mjs +1 -1
  34. package/flex-row/index.mjs +1 -1
  35. package/flow/index.mjs +40 -105
  36. package/flow-designer/index.mjs +555 -615
  37. package/flow-node/index.mjs +47 -15
  38. package/flow-viewer/index.mjs +78 -167
  39. package/form-cascader/index.mjs +24 -24
  40. package/form-checkbox-group/index.mjs +35 -79
  41. package/form-date-picker/index.mjs +22 -22
  42. package/form-holder/index.mjs +1 -1
  43. package/form-input/index.mjs +86 -28
  44. package/form-input-email/index.mjs +18 -18
  45. package/form-input-id-card/index.mjs +27 -27
  46. package/form-input-number/index.mjs +59 -219
  47. package/form-input-phone-number/index.mjs +27 -27
  48. package/form-input-tag/index.mjs +38 -160
  49. package/form-input-time/index.mjs +16 -16
  50. package/form-item/index.mjs +146 -15
  51. package/form-item-group/index.mjs +164 -14
  52. package/form-radio-group/index.mjs +41 -41
  53. package/form-select/index.mjs +20 -20
  54. package/form-switch/index.mjs +19 -19
  55. package/form-textarea/index.mjs +29 -29
  56. package/form-view/index.mjs +42 -46
  57. package/fy-array/index.mjs +2 -2
  58. package/fy-cascader/index.mjs +15 -15
  59. package/fy-checkbox/index.mjs +1 -1
  60. package/fy-code/index.mjs +1 -1
  61. package/fy-curd/index.mjs +2824 -210
  62. package/fy-date/index.mjs +59 -17
  63. package/fy-draggable/index.mjs +1 -1
  64. package/fy-dynamic/index.mjs +208 -64
  65. package/fy-empty/index.mjs +29 -12
  66. package/fy-form/index.mjs +743 -178
  67. package/fy-form-design/index.mjs +1013 -1540
  68. package/fy-input/index.mjs +105 -17
  69. package/fy-input-color/index.mjs +67 -16
  70. package/fy-input-icon/index.mjs +119 -23
  71. package/fy-input-map/index.mjs +14 -15
  72. package/fy-input-number/index.mjs +1 -1
  73. package/fy-input-table/index.mjs +19 -21
  74. package/fy-input-tree/index.mjs +3 -3
  75. package/fy-radio/index.mjs +1 -1
  76. package/fy-rate/index.mjs +50 -16
  77. package/fy-select/index.mjs +126 -29
  78. package/fy-slider/index.mjs +2 -2
  79. package/fy-switch/index.mjs +1 -1
  80. package/fy-tabs/index.mjs +51 -15
  81. package/fy-time/index.mjs +1 -1
  82. package/fy-title/index.mjs +1 -1
  83. package/fy-tree/index.mjs +23 -25
  84. package/fy-u-editor/index.mjs +1 -1
  85. package/fy-upload/index.mjs +2 -2
  86. package/highlight-j-s/index.mjs +29 -19
  87. package/icon-temp/index.mjs +30 -12
  88. package/iframe-window/index.mjs +18 -19
  89. package/image-cropper/index.mjs +22 -23
  90. package/image-preview/index.mjs +1 -1
  91. package/input-number/index.mjs +173 -63
  92. package/license/index.mjs +1 -1
  93. package/loading-view/index.mjs +33 -15
  94. package/login/index.mjs +1 -1
  95. package/nav-bar/index.mjs +31 -15
  96. package/package.json +1 -1
  97. package/page/index.mjs +20 -12
  98. package/page-header/index.mjs +34 -13
  99. package/page-index-top/index.mjs +53 -100
  100. package/page-skeleton/index.mjs +35 -18
  101. package/page-skeleton-new/index.mjs +15 -16
  102. package/pageable-table/index.mjs +228 -86
  103. package/pageable-view/index.mjs +1 -1
  104. package/present-view/index.mjs +71 -75
  105. package/record-video/index.mjs +1 -1
  106. package/resize-observer/index.mjs +29 -21
  107. package/search/index.mjs +9 -9
  108. package/search-popover/index.mjs +1 -1
  109. package/sign/index.mjs +1 -1
  110. package/split-pane/index.mjs +45 -40
  111. package/swiper/index.mjs +13 -14
  112. package/table-view/index.mjs +97 -631
  113. package/text-ellipsis/index.mjs +1 -1
  114. package/tinymce-editor/index.mjs +63 -63
  115. package/toolbar/index.mjs +208 -15
  116. package/toolbar-button/index.mjs +56 -30
  117. package/verify/index.mjs +1 -1
  118. package/watermark/index.mjs +1 -1
  119. package/web-types.json +1 -1
  120. package/x-input-tag/index.mjs +118 -49
  121. package/chunks/CountUp.f1a19f35.mjs +0 -124
  122. package/chunks/CountUp.vue_vue_type_template_lang.1f68c96e.mjs +0 -8
  123. package/chunks/EasyPopup.vue_vue_type_style_index_0_lang.89350bda.mjs +0 -32
  124. package/chunks/EditableTree.vue_vue_type_style_index_0_lang.5dba9f89.mjs +0 -356
  125. package/chunks/ElementDialog.d8f3105c.mjs +0 -211
  126. package/chunks/ElementDialog.vue_vue_type_style_index_0_lang.57cb8e07.mjs +0 -95
  127. package/chunks/EmptyView.e2430422.mjs +0 -51
  128. package/chunks/EmptyView.vue_vue_type_style_index_0_lang.ffa84770.mjs +0 -23
  129. package/chunks/FlowNode.vue_vue_type_template_lang.662bdcfa.mjs +0 -37
  130. package/chunks/FormInput.vue_vue_type_template_lang.3cb79386.mjs +0 -65
  131. package/chunks/FormItem.2920ac0c.mjs +0 -45
  132. package/chunks/FormItem.vue_vue_type_style_index_0_lang.970bd712.mjs +0 -258
  133. package/chunks/FormItemGroup.41daddb6.mjs +0 -64
  134. package/chunks/FormItemGroup.vue_vue_type_style_index_0_lang.b588a8ea.mjs +0 -155
  135. package/chunks/FyCurd.8acd2983.mjs +0 -548
  136. package/chunks/FyCurd.vue_vue_type_style_index_0_lang.4fbd4b30.mjs +0 -2945
  137. package/chunks/FyDate.vue_vue_type_style_index_0_lang.429c03e3.mjs +0 -47
  138. package/chunks/FyDynamic.vue_vue_type_style_index_0_lang.304417ce.mjs +0 -151
  139. package/chunks/FyEmpty.vue_vue_type_style_index_0_lang.fc8bd24c.mjs +0 -22
  140. package/chunks/FyForm.0294e494.mjs +0 -439
  141. package/chunks/FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs +0 -737
  142. package/chunks/FyInput.vue_vue_type_template_lang.d2c56811.mjs +0 -93
  143. package/chunks/FyInputColor.vue_vue_type_template_lang.6eca0ddd.mjs +0 -56
  144. package/chunks/FyInputIcon.vue_vue_type_style_index_0_lang.11a6a221.mjs +0 -158
  145. package/chunks/FyRate.vue_vue_type_style_index_0_lang.82174185.mjs +0 -39
  146. package/chunks/FySelect.vue_vue_type_style_index_0_lang.5f0f3244.mjs +0 -102
  147. package/chunks/FyTabs.vue_vue_type_template_lang.66af5ac9.mjs +0 -41
  148. package/chunks/HighlightJS.vue_vue_type_style_index_0_lang.fefeaa3b.mjs +0 -15
  149. package/chunks/IconTemp.42c48e1f.mjs +0 -32
  150. package/chunks/IconTemp.vue_vue_type_style_index_0_lang.a0777b31.mjs +0 -23
  151. package/chunks/InputNumber.vue_vue_type_style_index_0_lang.18046bd3.mjs +0 -172
  152. package/chunks/LoadingView.vue_vue_type_style_index_0_lang.4c3fff2a.mjs +0 -23
  153. package/chunks/NavBar.vue_vue_type_style_index_0_lang.e21b57f3.mjs +0 -21
  154. package/chunks/Page.81f4b8d9.mjs +0 -32
  155. package/chunks/Page.vue_vue_type_style_index_0_lang.cb4f9bf2.mjs +0 -13
  156. package/chunks/PageHeader.vue_vue_type_style_index_0_lang.3bcca5aa.mjs +0 -26
  157. package/chunks/PageSkeleton.vue_vue_type_style_index_0_lang.8621381f.mjs +0 -88
  158. package/chunks/PageableTable.333cbdc1.mjs +0 -335
  159. package/chunks/PageableTable.vue_vue_type_style_index_0_lang.fd89fb43.mjs +0 -148
  160. package/chunks/ResizeObserver.60f728f0.mjs +0 -54
  161. package/chunks/ResizeObserver.vue_vue_type_style_index_0_lang.7079029c.mjs +0 -13
  162. package/chunks/TableColumn.8503272e.mjs +0 -106
  163. package/chunks/Toolbar.5c539dbb.mjs +0 -24
  164. package/chunks/Toolbar.vue_vue_type_style_index_0_lang.7594243c.mjs +0 -275
  165. package/chunks/ToolbarButton.vue_vue_type_style_index_0_lang.e2cb14ba.mjs +0 -31
  166. package/chunks/XInputTag.vue_vue_type_style_index_0_lang.7ad045b3.mjs +0 -74
package/fy-curd/index.mjs CHANGED
@@ -1,29 +1,2643 @@
1
- import { p as C } from "../chunks/packages.1fc9ccba.mjs";
2
- import { p as w } from "../chunks/permission.ce5d2121.mjs";
3
- import { i as y } from "../chunks/init.f0a03127.mjs";
4
- import { s as S, r as L, D as O, a as D, b as E, F as v, T as I, C as H, c as P, d as R, H as k, e as A, f as u } from "../chunks/FyCurd.vue_vue_type_style_index_0_lang.4fbd4b30.mjs";
5
- import { a as M, t as T, f as _ } from "../chunks/dataformat.816df805.mjs";
6
- import { D as f, s as K, o as $, d as n } from "../chunks/util.7844e2c2.mjs";
7
- import { isBlank as b } from "@web-utils/core";
8
- import { n as N } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
9
- const j = {
1
+ import { p as U } from "../chunks/packages.1fc9ccba.mjs";
2
+ import { p as S } from "../chunks/permission.ce5d2121.mjs";
3
+ import { i as q } from "../chunks/init.47f219b4.mjs";
4
+ import { g as G, c as X, t as J, f as Q } from "../chunks/dataformat.e655611c.mjs";
5
+ import { o as f, j as C, d as c, u as A, i as Y, a as b, k as Z, l as ee, s as te } from "../chunks/util.ae730cde.mjs";
6
+ import { isBlank as u } from "@web-utils/core";
7
+ import { s as ie } from "../chunks/slot.4b391395.mjs";
8
+ import a from "element-ui/lib/button";
9
+ import H from "element-ui/lib/card";
10
+ import { n as g } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
11
+ import { d as N } from "../chunks/detail.d6f8e347.mjs";
12
+ import { s as ne } from "../chunks/dic.eaac0823.mjs";
13
+ import re from "@web-utils/component/icon-temp";
14
+ import "@web-utils/component/icon-temp/style.css";
15
+ import se from "element-ui/lib/link";
16
+ import oe from "element-ui/lib/tooltip";
17
+ import le from "element-ui/lib/form-item";
18
+ import _ from "element-ui/lib/table-column";
19
+ import $ from "element-ui/lib/dropdown-item";
20
+ import ae from "element-ui/lib/dropdown-menu";
21
+ import ce from "element-ui/lib/dropdown";
22
+ import ue from "element-ui/lib/pagination";
23
+ import O from "element-ui/lib/drawer";
24
+ import de from "@web-utils/component/element-dialog";
25
+ import "@web-utils/component/element-dialog/style.css";
26
+ import pe from "element-ui/lib/checkbox";
27
+ import W from "element-ui/lib/table";
28
+ import B from "element-ui/lib/col";
29
+ import he from "element-ui/lib/button-group";
30
+ import me from "element-ui/lib/row";
31
+ import fe from "element-ui/lib/empty";
32
+ import ge from "element-ui/lib/form";
33
+ import _e from "element-ui/lib/tag";
34
+ const m = {
35
+ menuWidth: 220,
36
+ menuFixed: "right",
37
+ menuXsWidth: 100,
38
+ menuAlign: "center",
39
+ menuHeaderAlign: "center",
40
+ headerAlign: "left",
41
+ // 图标
42
+ cancelBtnIcon: "el-icon-circle-close",
43
+ viewBtnIcon: "el-icon-view",
44
+ editBtnIcon: "el-icon-edit",
45
+ copyBtnIcon: "el-icon-document-add",
46
+ addBtnIcon: "el-icon-plus",
47
+ printBtnIcon: "el-icon-printer",
48
+ excelBtnIcon: "el-icon-download",
49
+ delBtnIcon: "el-icon-delete",
50
+ searchBtnIcon: "el-icon-search",
51
+ emptyBtnIcon: "el-icon-delete",
52
+ saveBtnIcon: "el-icon-circle-plus-outline",
53
+ updateBtnIcon: "el-icon-circle-check",
54
+ columnBtnIcon: "el-icon-s-operation",
55
+ filterBtnIcon: "el-icon-tickets",
56
+ refreshBtnIcon: "el-icon-refresh",
57
+ // 显隐
58
+ viewBtn: !1,
59
+ editBtn: !0,
60
+ copyBtn: !1,
61
+ cancelBtn: !0,
62
+ addBtn: !0,
63
+ addRowBtn: !1,
64
+ printBtn: !1,
65
+ excelBtn: !1,
66
+ delBtn: !0,
67
+ cellBtn: !1,
68
+ dateBtn: !1,
69
+ updateBtn: !0,
70
+ saveBtn: !0,
71
+ refreshBtn: !0,
72
+ columnBtn: !0,
73
+ filterBtn: !1,
74
+ queryBtn: !0,
75
+ menuBtn: !1,
76
+ searchBtn: !0,
77
+ clearBtn: !0,
78
+ selectClearBtn: !0,
79
+ searchShow: !0,
80
+ tip: !0,
81
+ dialogWidth: "60%",
82
+ dialogDrag: !1,
83
+ formFullscreen: !1,
84
+ pageBackground: !0,
85
+ page: !0,
86
+ menu: !0,
87
+ indexLabel: "#",
88
+ indexWidth: 50,
89
+ indexFixed: "left",
90
+ selectionWidth: 50,
91
+ selectionFixed: "left",
92
+ expandWidth: 60,
93
+ expandFixed: "left",
94
+ filterMultiple: !0,
95
+ calcHeight: 300,
96
+ width: "100%",
97
+ searchGutter: 20,
98
+ searchLabelWidth: 80,
99
+ searchSpan: 6,
100
+ dropRowClass: ".el-table__body-wrapper > table > tbody",
101
+ dropColClass: ".el-table__header-wrapper tr",
102
+ ghostClass: "avue-crud__ghost"
103
+ };
104
+ var be = function() {
105
+ var e = this, t = e.$createElement, i = e._self._c || t;
106
+ return e.searchFlag ? i(H, {
107
+ directives: [{
108
+ name: "show",
109
+ rawName: "v-show",
110
+ value: e.searchShow && e.searchFlag,
111
+ expression: "searchShow && searchFlag"
112
+ }],
113
+ staticClass: "avue-crud__search",
114
+ attrs: {
115
+ shadow: e.crud.isCard
116
+ }
117
+ }, [e._t("search", null, {
118
+ row: e.searchForm,
119
+ search: e.searchForm,
120
+ size: e.crud.controlSize
121
+ }), i("FyForm", {
122
+ ref: "form",
123
+ attrs: {
124
+ option: e.option
125
+ },
126
+ on: {
127
+ submit: e.searchChange,
128
+ "reset-change": e.resetChange
129
+ },
130
+ scopedSlots: e._u([{
131
+ key: "menuForm",
132
+ fn: function(n) {
133
+ return [e._t("searchMenu", null, null, Object.assign(n, {
134
+ search: e.searchForm,
135
+ row: e.searchForm
136
+ })), e.isSearchIcon ? [e.show === !1 ? i(a, {
137
+ attrs: {
138
+ type: "text",
139
+ icon: "el-icon-arrow-down"
140
+ },
141
+ on: {
142
+ click: function(r) {
143
+ e.show = !0;
144
+ }
145
+ }
146
+ }, [e._v(" 展 开 ")]) : e._e(), e.show === !0 ? i(a, {
147
+ attrs: {
148
+ type: "text",
149
+ icon: "el-icon-arrow-up"
150
+ },
151
+ on: {
152
+ click: function(r) {
153
+ e.show = !1;
154
+ }
155
+ }
156
+ }, [e._v(" 收 缩 ")]) : e._e()] : e._e()];
157
+ }
158
+ }, e._l(e.crud.searchSlot, function(n) {
159
+ return {
160
+ key: e.getSlotName(n),
161
+ fn: function(r) {
162
+ return [e._t(n, null, null, Object.assign(r, {
163
+ search: e.searchForm,
164
+ row: e.searchForm
165
+ }))];
166
+ }
167
+ };
168
+ })], null, !0),
169
+ model: {
170
+ value: e.searchForm,
171
+ callback: function(n) {
172
+ e.searchForm = n;
173
+ },
174
+ expression: "searchForm"
175
+ }
176
+ })], 2) : e._e();
177
+ }, ve = [];
178
+ const ye = {
179
+ name: "HeaderSearch",
180
+ mixins: [ie],
181
+ inject: ["crud"],
182
+ props: {
183
+ search: Object
184
+ },
185
+ data() {
186
+ return {
187
+ show: !1,
188
+ searchIndex: 2,
189
+ searchShow: !0
190
+ };
191
+ },
192
+ computed: {
193
+ searchForm: {
194
+ get() {
195
+ return this.crud.search;
196
+ },
197
+ set(e) {
198
+ this.crud.$emit("update:search", e);
199
+ }
200
+ },
201
+ option() {
202
+ const e = this.crud.option, t = (n = []) => {
203
+ n = c(n);
204
+ const r = [];
205
+ let o = 0;
206
+ return n = n.sort((s, l) => (l.searchOrder || 0) - (s.searchOrder || 0)), n.forEach((s) => {
207
+ if (s.search) {
208
+ const l = o < this.searchIndex, d = {};
209
+ Object.keys(s).forEach((p) => {
210
+ const v = "search";
211
+ if (p !== "searchProp" && p.includes(v)) {
212
+ let h = p.replace(v, "");
213
+ if (h.length === 0)
214
+ return;
215
+ h = h.replace(h[0], h[0].toLowerCase()), d[h] = s[p];
216
+ }
217
+ }), s = Object.assign(s, d, {
218
+ type: G(s),
219
+ detail: !1,
220
+ dicFlag: s.cascader ? !0 : f(s.dicFlag, !1),
221
+ span: s.searchSpan || e.searchSpan || m.searchSpan,
222
+ control: s.searchControl,
223
+ gutter: s.searchGutter || e.searchGutter || m.searchGutter,
224
+ labelWidth: s.searchLabelWidth || e.searchLabelWidth || m.searchLabelWidth,
225
+ labelPosition: s.searchLabelPosition || e.searchLabelPosition,
226
+ size: s.searchSize || e.searchSize,
227
+ value: s.searchValue,
228
+ rules: s.searchRules,
229
+ row: s.searchRow,
230
+ bind: s.searchBin,
231
+ disabled: s.searchDisabled,
232
+ readonly: s.searchReadonly,
233
+ display: this.isSearchIcon ? this.show ? !0 : l : !0
234
+ }), r.push(s), o = o + 1;
235
+ }
236
+ }), r;
237
+ };
238
+ return ((n) => {
239
+ let r = c(n);
240
+ return r.column = t(this.crud.propOption), r = Object.assign(r, {
241
+ rowKey: e.searchRowKey || "null",
242
+ tabs: !1,
243
+ group: !1,
244
+ printBtn: !1,
245
+ mockBtn: !1,
246
+ filterDic: e.searchFilterDic,
247
+ filterNull: e.searchFilterNull,
248
+ filterParam: e.searchFilterParam,
249
+ enter: e.searchEnter,
250
+ size: e.searchSize,
251
+ submitText: e.searchBtnText || "搜 索",
252
+ submitBtn: f(e.searchBtn, m.searchSubBtn),
253
+ submitIcon: this.crud.getBtnIcon("searchBtn"),
254
+ emptyText: e.emptyBtnText || "清 空",
255
+ emptyBtn: f(e.emptyBtn, m.emptyBtn),
256
+ emptyIcon: this.crud.getBtnIcon("emptyBtn"),
257
+ menuSpan: (() => this.show || !this.isSearchIcon || e.searchMenuSpan < 6 ? e.searchMenuSpan : 6)(),
258
+ menuPosition: e.searchMenuPosition || "center",
259
+ dicFlag: !1,
260
+ dicData: this.crud.DIC
261
+ }), r;
262
+ })(e);
263
+ },
264
+ isSearchIcon() {
265
+ return f(this.crud.option.searchIcon, this.$AVUE.searchIcon) && this.searchLen > this.searchIndex;
266
+ },
267
+ searchLen() {
268
+ let e = 0;
269
+ return this.crud.propOption.forEach((t) => {
270
+ t.search && e++;
271
+ }), e;
272
+ },
273
+ searchFlag() {
274
+ return !!this.crud.$scopedSlots.search || this.searchLen !== 0;
275
+ }
276
+ },
277
+ watch: {
278
+ "crud.propOption": {
279
+ handler() {
280
+ this.dataFormat();
281
+ },
282
+ deep: !0
283
+ },
284
+ show() {
285
+ this.crud.getTableHeight();
286
+ },
287
+ searchShow() {
288
+ this.crud.getTableHeight();
289
+ },
290
+ option: {
291
+ immediate: !0,
292
+ deep: !0,
293
+ handler() {
294
+ var e;
295
+ this.searchIndex = ((e = this.option) == null ? void 0 : e.searchIndex) || 2;
296
+ }
297
+ }
298
+ },
299
+ created() {
300
+ this.initFun(), this.dataFormat();
301
+ },
302
+ methods: {
303
+ initFun() {
304
+ ["searchReset", "searchChange"].forEach((e) => {
305
+ this.crud[e] = this[e];
306
+ });
307
+ },
308
+ getSlotName(e) {
309
+ return e.replace("Search", "");
310
+ },
311
+ // 搜索回调
312
+ searchChange(e, t) {
313
+ e = C(e), this.crud.propOption.forEach((i) => {
314
+ i.searchProp && (e[i.searchProp] = e[i.prop], delete e[i.prop]);
315
+ }), this.crud.$emit("search-change", e, t);
316
+ },
317
+ // 搜索清空
318
+ resetChange() {
319
+ this.crud.$emit("search-reset", this.searchForm);
320
+ },
321
+ // 搜索清空
322
+ searchReset() {
323
+ this.$refs.form.resetForm();
324
+ },
325
+ handleSearchShow() {
326
+ this.searchShow = !this.searchShow;
327
+ },
328
+ dataFormat() {
329
+ const e = this.crud.option;
330
+ this.searchShow = f(e.searchShow, m.searchShow);
331
+ }
332
+ }
333
+ }, F = {};
334
+ var $e = /* @__PURE__ */ g(
335
+ ye,
336
+ be,
337
+ ve,
338
+ !1,
339
+ xe,
340
+ null,
341
+ null,
342
+ null
343
+ );
344
+ function xe(e) {
345
+ for (let t in F)
346
+ this[t] = F[t];
347
+ }
348
+ const we = /* @__PURE__ */ function() {
349
+ return $e.exports;
350
+ }();
351
+ var Ce = function() {
352
+ var e = this, t = e.$createElement, i = e._self._c || t;
353
+ return i("div", {
354
+ staticClass: "avue-crud__menu"
355
+ }, [e.optVal(e.crud.tableOption.menuLeft, !0) ? i("div", {
356
+ staticClass: "avue-crud__left"
357
+ }, [e.optVal(e.crud.tableOption.addBtn, e.config.addBtn) ? i(a, {
358
+ directives: [{
359
+ name: "permission",
360
+ rawName: "v-permission",
361
+ value: e.crud.getPermission("addBtn"),
362
+ expression: "crud.getPermission('addBtn')"
363
+ }],
364
+ attrs: {
365
+ type: "primary",
366
+ icon: e.crud.getBtnIcon("addBtn"),
367
+ size: e.crud.isMediumSize
368
+ },
369
+ on: {
370
+ click: e.crud.rowAdd
371
+ }
372
+ }, [e.crud.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("addBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.addRowBtn, e.config.addRowBtn) ? i(a, {
373
+ directives: [{
374
+ name: "permission",
375
+ rawName: "v-permission",
376
+ value: e.crud.getPermission("addRowBtn"),
377
+ expression: "crud.getPermission('addRowBtn')"
378
+ }],
379
+ attrs: {
380
+ type: "primary",
381
+ icon: e.crud.getBtnIcon("addBtn"),
382
+ size: e.crud.isMediumSize
383
+ },
384
+ on: {
385
+ click: e.crud.rowCellAdd
386
+ }
387
+ }, [e.crud.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("addBtn")) + " ")]], 2) : e._e(), e._t("menuLeft", null, {
388
+ size: e.crud.isMediumSize
389
+ })], 2) : e._e(), e.optVal(e.crud.tableOption.menuRight, !0) ? i("div", {
390
+ staticClass: "avue-crud__right"
391
+ }, [e.optVal(e.crud.tableOption.dateBtn, e.config.dateBtn) ? i("FyDate", {
392
+ staticStyle: {
393
+ display: "inline-block",
394
+ "margin-right": "20px"
395
+ },
396
+ attrs: {
397
+ type: "datetimerange",
398
+ "value-format": "yyyy-MM-dd HH:mm:ss",
399
+ format: "yyyy-MM-dd HH:mm:ss",
400
+ "picker-options": e.pickerOptions,
401
+ size: e.crud.isMediumSize
402
+ },
403
+ on: {
404
+ change: e.dateChange
405
+ }
406
+ }) : e._e(), e._t("menuRight", null, {
407
+ size: e.crud.isMediumSize
408
+ }), e.optVal(e.crud.tableOption.excelBtn, e.config.excelBtn) ? i(a, {
409
+ directives: [{
410
+ name: "permission",
411
+ rawName: "v-permission",
412
+ value: e.crud.getPermission("excelBtn"),
413
+ expression: "crud.getPermission('excelBtn')"
414
+ }],
415
+ attrs: {
416
+ icon: e.crud.getBtnIcon("excelBtn"),
417
+ circle: "",
418
+ size: e.crud.isMediumSize
419
+ },
420
+ on: {
421
+ click: e.rowExcel
422
+ }
423
+ }) : e._e(), e.optVal(e.crud.tableOption.printBtn, e.config.printBtn) ? i(a, {
424
+ directives: [{
425
+ name: "permission",
426
+ rawName: "v-permission",
427
+ value: e.crud.getPermission("printBtn"),
428
+ expression: "crud.getPermission('printBtn')"
429
+ }],
430
+ attrs: {
431
+ icon: e.crud.getBtnIcon("printBtn"),
432
+ circle: "",
433
+ size: e.crud.isMediumSize
434
+ },
435
+ on: {
436
+ click: e.rowPrint
437
+ }
438
+ }) : e._e(), e.optVal(e.crud.tableOption.refreshBtn, e.config.refreshBtn) ? i(a, {
439
+ directives: [{
440
+ name: "permission",
441
+ rawName: "v-permission",
442
+ value: e.crud.getPermission("refreshBtn"),
443
+ expression: "crud.getPermission('refreshBtn')"
444
+ }],
445
+ attrs: {
446
+ icon: e.crud.getBtnIcon("refreshBtn"),
447
+ circle: "",
448
+ size: e.crud.isMediumSize
449
+ },
450
+ on: {
451
+ click: e.crud.refreshChange
452
+ }
453
+ }) : e._e(), e.optVal(e.crud.tableOption.columnBtn, e.config.columnBtn) ? i(a, {
454
+ directives: [{
455
+ name: "permission",
456
+ rawName: "v-permission",
457
+ value: e.crud.getPermission("columnBtn"),
458
+ expression: "crud.getPermission('columnBtn')"
459
+ }],
460
+ attrs: {
461
+ icon: e.crud.getBtnIcon("columnBtn"),
462
+ circle: "",
463
+ size: e.crud.isMediumSize
464
+ },
465
+ on: {
466
+ click: function(n) {
467
+ return e.crud.$refs.dialogColumn.handleShow();
468
+ }
469
+ }
470
+ }) : e._e(), (e.crud.$refs.headerSearch || {}).searchFlag && e.optVal(e.crud.tableOption.searchShowBtn, !0) ? i(a, {
471
+ attrs: {
472
+ icon: e.crud.getBtnIcon("searchBtn"),
473
+ circle: "",
474
+ size: e.crud.isMediumSize
475
+ },
476
+ on: {
477
+ click: function(n) {
478
+ return e.crud.$refs.headerSearch.handleSearchShow();
479
+ }
480
+ }
481
+ }) : e._e(), e.optVal(e.crud.tableOption.filterBtn, e.config.filterBtn) ? i(a, {
482
+ directives: [{
483
+ name: "permission",
484
+ rawName: "v-permission",
485
+ value: e.crud.getPermission("filterBtn"),
486
+ expression: "crud.getPermission('filterBtn')"
487
+ }],
488
+ attrs: {
489
+ icon: e.crud.getBtnIcon("filterBtn"),
490
+ circle: "",
491
+ size: e.crud.isMediumSize
492
+ },
493
+ on: {
494
+ click: function(n) {
495
+ return e.crud.$refs.dialogFilter.handleShow();
496
+ }
497
+ }
498
+ }) : e._e()], 2) : e._e()]);
499
+ }, Se = [];
500
+ const Oe = {
501
+ name: "HeaderMenu",
502
+ directives: {
503
+ permission: S
504
+ },
505
+ inject: ["crud"],
506
+ data() {
507
+ return {
508
+ dateCreate: !1,
509
+ pickerOptions: {
510
+ shortcuts: [
511
+ {
512
+ text: "今日",
513
+ onClick(e) {
514
+ const t = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
515
+ i.setTime(i.getTime()), e.$emit("pick", [i, t]);
516
+ }
517
+ },
518
+ {
519
+ text: "昨日",
520
+ onClick(e) {
521
+ const t = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
522
+ i.setTime(i.getTime() - 3600 * 1e3 * 24 * 1), e.$emit("pick", [i, t]);
523
+ }
524
+ },
525
+ {
526
+ text: "最近一周",
527
+ onClick(e) {
528
+ const t = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
529
+ i.setTime(i.getTime() - 3600 * 1e3 * 24 * 7), e.$emit("pick", [i, t]);
530
+ }
531
+ },
532
+ {
533
+ text: "最近一个月",
534
+ onClick(e) {
535
+ const t = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
536
+ i.setTime(i.getTime() - 3600 * 1e3 * 24 * 30), e.$emit("pick", [i, t]);
537
+ }
538
+ },
539
+ {
540
+ text: "最近三个月",
541
+ onClick(e) {
542
+ const t = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
543
+ i.setTime(i.getTime() - 3600 * 1e3 * 24 * 90), e.$emit("pick", [i, t]);
544
+ }
545
+ }
546
+ ]
547
+ },
548
+ config: m
549
+ };
550
+ },
551
+ created() {
552
+ this.initFun();
553
+ },
554
+ methods: {
555
+ optVal: f,
556
+ // 日期组件回调
557
+ dateChange(e) {
558
+ this.dateCreate ? this.crud.$emit("date-change", e) : this.dateCreate = !0;
559
+ },
560
+ initFun() {
561
+ this.crud.rowExcel = this.rowExcel, this.crud.rowPrint = this.rowPrint;
562
+ },
563
+ rowExcel() {
564
+ this.crud.$refs.dialogExcel.handleShow();
565
+ },
566
+ rowPrint() {
567
+ this.$Print(this.crud.$refs.table);
568
+ }
569
+ }
570
+ }, k = {};
571
+ var Be = /* @__PURE__ */ g(
572
+ Oe,
573
+ Ce,
574
+ Se,
575
+ !1,
576
+ Fe,
577
+ null,
578
+ null,
579
+ null
580
+ );
581
+ function Fe(e) {
582
+ for (let t in k)
583
+ this[t] = k[t];
584
+ }
585
+ const ke = /* @__PURE__ */ function() {
586
+ return Be.exports;
587
+ }();
588
+ var Ie = function() {
589
+ var e = this, t = e.$createElement, i = e._self._c || t;
590
+ return e.getColumnProp(e.column, "hide") ? i(_, {
591
+ key: e.column.prop,
592
+ attrs: {
593
+ prop: e.column.prop,
594
+ label: e.column.label,
595
+ "column-key": e.column.prop,
596
+ "filter-placement": "bottom-end",
597
+ filters: e.getColumnProp(e.column, "filters"),
598
+ "filter-method": e.getColumnProp(e.column, "filterMethod") ? e.handleFilterMethod : void 0,
599
+ "filter-multiple": e.optVal(e.column.filterMultiple, !0),
600
+ "show-overflow-tooltip": e.column.overHidden,
601
+ "min-width": e.column.minWidth,
602
+ sortable: e.getColumnProp(e.column, "sortable"),
603
+ "sort-method": e.column.sortMethod,
604
+ "sort-orders": e.column.sortOrders,
605
+ "sort-by": e.column.sortBy,
606
+ resizable: e.column.resizable,
607
+ "render-header": e.column.renderHeader,
608
+ align: e.column.align || e.crud.tableOption.align,
609
+ "header-align": e.column.headerAlign || e.crud.tableOption.headerAlign,
610
+ width: e.getColumnProp(e.column, "width"),
611
+ fixed: e.getColumnProp(e.column, "fixed")
612
+ },
613
+ scopedSlots: e._u([{
614
+ key: "header",
615
+ fn: function(n) {
616
+ var r = n.$index;
617
+ return [e.crud.getSlotName(e.column, "H", e.crud.$scopedSlots) ? e._t(e.crud.getSlotName(e.column, "H"), null, null, {
618
+ column: e.column,
619
+ $index: r
620
+ }) : i("span", [e._v(e._s(e.column.label))])];
621
+ }
622
+ }, {
623
+ key: "default",
624
+ fn: function(n) {
625
+ var r = n.row, o = n.$index;
626
+ return [r.$cellEdit && e.column.cell ? i(le, {
627
+ attrs: {
628
+ prop: e.crud.isTree ? "" : `list.${o}.${e.column.prop}`,
629
+ label: e.vaildLabel(e.column, r, " "),
630
+ "label-width": e.vaildLabel(e.column, r, "1px"),
631
+ rules: e.column.rules
632
+ }
633
+ }, [i(oe, {
634
+ attrs: {
635
+ content: (e.crud.listError[`list.${o}.${e.column.prop}`] || {}).msg,
636
+ disabled: !(e.crud.listError[`list.${o}.${e.column.prop}`] || {}).valid,
637
+ placement: "top"
638
+ }
639
+ }, [e.crud.getSlotName(e.column, "F", e.crud.$scopedSlots) ? e._t(e.crud.getSlotName(e.column, "F"), null, null, {
640
+ row: r,
641
+ dic: e.crud.DIC[e.column.prop],
642
+ size: e.crud.isMediumSize,
643
+ index: o,
644
+ disabled: e.crud.btnDisabledList[o],
645
+ label: e.handleDetail(r, e.column),
646
+ $cell: r.$cellEdit
647
+ }) : i("FormTemp", e._b({
648
+ attrs: {
649
+ column: e.column,
650
+ size: e.crud.isMediumSize,
651
+ "table-data": {
652
+ index: o,
653
+ row: r,
654
+ label: e.handleDetail(r, e.column)
655
+ },
656
+ dic: (e.crud.cascaderDIC[o] || {})[e.column.prop] || e.crud.DIC[e.column.prop],
657
+ props: e.column.props || e.crud.tableOption.props,
658
+ readonly: e.column.readonly,
659
+ disabled: e.crud.disabled || e.crud.tableOption.disabled || e.column.disabled || e.crud.btnDisabledList[o],
660
+ clearable: e.optVal(e.column.clearable, !1),
661
+ "column-slot": e.crud.mainSlot
662
+ },
663
+ on: {
664
+ change: function(s) {
665
+ return e.columnChange(r, e.column, o);
666
+ }
667
+ },
668
+ scopedSlots: e._u([e._l(e.crud.mainSlot, function(s) {
669
+ return {
670
+ key: s,
671
+ fn: function(l) {
672
+ return [e._t(s, null, null, l)];
673
+ }
674
+ };
675
+ })], null, !0),
676
+ model: {
677
+ value: r[e.column.prop],
678
+ callback: function(s) {
679
+ e.$set(r, e.column.prop, s);
680
+ },
681
+ expression: "row[column.prop]"
682
+ }
683
+ }, "FormTemp", e.uploadFun(e.column, e.crud), !1))], 2)], 1) : e.crud.$scopedSlots[e.column.prop] ? e._t(e.column.prop, null, {
684
+ row: r,
685
+ index: o,
686
+ dic: e.crud.DIC[e.column.prop],
687
+ size: e.crud.isMediumSize,
688
+ label: e.handleDetail(r, e.column)
689
+ }) : [["img", "upload"].includes(e.column.type) ? i("span", {
690
+ staticClass: "avue-crud__img"
691
+ }, [e._l(e.getImgList(r, e.column), function(s, l) {
692
+ return [e.isMediaType(s, e.column.fileType) ? i(e.isMediaType(s, e.column.fileType), {
693
+ key: l,
694
+ tag: "Component",
695
+ attrs: {
696
+ src: s
697
+ },
698
+ on: {
699
+ click: function(d) {
700
+ return d.stopPropagation(), e.openImg(r, e.column, l);
701
+ }
702
+ }
703
+ }) : i("i", {
704
+ key: l,
705
+ staticClass: "el-icon-document",
706
+ attrs: {
707
+ src: s
708
+ },
709
+ on: {
710
+ click: function(d) {
711
+ return d.stopPropagation(), e.openImg(r, e.column, l);
712
+ }
713
+ }
714
+ })];
715
+ })], 2) : e.column.type === "url" ? i("span", e._l(e.corArray(r, e.column), function(s, l) {
716
+ return i(se, {
717
+ key: l,
718
+ attrs: {
719
+ type: "primary",
720
+ href: s,
721
+ target: e.column.target || "_blank"
722
+ }
723
+ }, [e._v(e._s(s))]);
724
+ }), 1) : e.column.type === "rate" ? i("span", [i("FyRate", {
725
+ attrs: {
726
+ disabled: ""
727
+ },
728
+ model: {
729
+ value: r[e.column.prop],
730
+ callback: function(s) {
731
+ e.$set(r, e.column.prop, s);
732
+ },
733
+ expression: "row[column.prop]"
734
+ }
735
+ })], 1) : e.column.type === "color" ? i("i", {
736
+ staticClass: "avue-crud__color",
737
+ style: {
738
+ backgroundColor: r[e.column.prop]
739
+ }
740
+ }) : e.column.type === "icon" ? i("IconTemp", {
741
+ attrs: {
742
+ text: r[e.column.prop]
743
+ }
744
+ }) : e.column.html ? i("span", {
745
+ domProps: {
746
+ innerHTML: e._s(e.handleDetail(r, e.column))
747
+ }
748
+ }) : i("span", {
749
+ domProps: {
750
+ textContent: e._s(e.handleDetail(r, e.column))
751
+ }
752
+ })]];
753
+ }
754
+ }], null, !0)
755
+ }) : e._e();
756
+ }, Pe = [];
757
+ const w = {}, De = {
758
+ name: "ColumnSlot",
759
+ components: { IconTemp: re, FormTemp: () => import("../chunks/FormTemp.d079292b.mjs") },
760
+ inject: ["dynamic", "crud"],
761
+ props: {
762
+ column: Object,
763
+ columnOption: Array
764
+ },
765
+ created() {
766
+ const e = ["getColumnProp", "handleFilterMethod", "handleFilters"];
767
+ Object.keys(this.dynamic).forEach((t) => {
768
+ e.includes(t) && (this[t] = this.dynamic[t]);
769
+ });
770
+ },
771
+ methods: {
772
+ isBlank: u,
773
+ optVal: f,
774
+ uploadFun: A,
775
+ isMediaType(e, t) {
776
+ return Y(e, t);
777
+ },
778
+ vaildLabel(e, t, i) {
779
+ if (e.rules && t.$cellEdit)
780
+ return i;
781
+ },
782
+ columnChange(e, t, i) {
783
+ const n = `${i}-${t.prop}`;
784
+ w[n] || (this.handleChange(t, e), typeof t.change == "function" && t.cell === !0 && t.change({ row: e, column: t, index: i, value: e[t.prop] })), w[n] = !0, this.$nextTick(() => {
785
+ w[n] = !1;
786
+ });
787
+ },
788
+ handleChange(e, t) {
789
+ e.cascader && this.$nextTick(() => {
790
+ const i = e.cascader;
791
+ i.forEach((n) => {
792
+ const r = n, o = t[e.prop], s = t.$index, l = this.findObject(this.columnOption, r);
793
+ u(l) || (u(this.crud.cascaderDIC[s]) && this.$set(this.crud.cascaderDIC, s, {}), this.crud.cascaderIndexList.includes(s) && i.forEach((d) => {
794
+ this.$set(this.crud.cascaderDIC[s], d.prop, []), i.forEach((p) => t[p] = "");
795
+ }), !(u(i) || u(o) || u(l)) && ne({
796
+ column: l,
797
+ value: o,
798
+ form: t
799
+ }).then((d) => {
800
+ const p = d || [];
801
+ this.crud.cascaderIndexList.includes(s) || this.crud.cascaderIndexList.push(s), this.crud.cascaderDicList[s] || this.$set(this.crud.cascaderDicList, s, {}), this.crud.cascaderDicList[s][r] || this.$set(this.crud.cascaderDicList[s], r, p), this.$set(this.crud.cascaderDIC[s], r, p), !u(p[l.cascaderIndex]) && !u(p) && !u(l.cascaderIndex) && (t[r] = p[l.cascaderIndex][(l.props || {}).value || b.value]);
802
+ }));
803
+ });
804
+ });
805
+ },
806
+ handleDetail(e, t) {
807
+ const i = t.parentProp ? (this.crud.cascaderDIC[e.$index] || {})[t.prop] : this.crud.DIC[t.prop], n = N(e, t, this.crud.tableOption, i);
808
+ return !u(i) && this.crud.tableOption.filterDic !== !0 && (e[`$${t.prop}`] = n), n;
809
+ },
810
+ corArray(e, t) {
811
+ let i = this.handleDetail(e, t);
812
+ return Array.isArray(i) || (i = u(i) ? [] : i.split(Z)), c(i);
813
+ },
814
+ openImg(e, t, i) {
815
+ let n = this.getImgList(e, t);
816
+ n = n.map((r) => ({ thumbUrl: r, url: r, type: t.fileType })), this.$ImagePreview(n, i);
817
+ },
818
+ getImgList(e, t) {
819
+ var o, s;
820
+ const i = ((o = t.propsHttp) == null ? void 0 : o.home) || "", n = ((s = t.props) == null ? void 0 : s.value) || b.value, r = this.corArray(e, t);
821
+ return r.forEach((l, d) => {
822
+ r[d] = i + (l[n] ? l[n] : l);
823
+ }), r;
824
+ }
825
+ }
826
+ }, I = {};
827
+ var Me = /* @__PURE__ */ g(
828
+ De,
829
+ Ie,
830
+ Pe,
831
+ !1,
832
+ ze,
833
+ null,
834
+ null,
835
+ null
836
+ );
837
+ function ze(e) {
838
+ for (let t in I)
839
+ this[t] = I[t];
840
+ }
841
+ const K = /* @__PURE__ */ function() {
842
+ return Me.exports;
843
+ }();
844
+ var Te = function() {
845
+ var e = this, t = e.$createElement, i = e._self._c || t;
846
+ return e.getColumnProp(e.columnOption, "hide") ? i(_, {
847
+ key: e.columnOption.prop,
848
+ attrs: {
849
+ prop: e.columnOption.prop,
850
+ label: e.columnOption.label,
851
+ "filter-placement": "bottom-end",
852
+ filters: e.getColumnProp(e.columnOption, "filters"),
853
+ "filter-method": e.getColumnProp(e.columnOption, "filterMethod") ? e.handleFilterMethod : void 0,
854
+ "filter-multiple": e.optVal(e.columnOption.filterMultiple, !0),
855
+ "show-overflow-tooltip": e.columnOption.overHidden,
856
+ "min-width": e.columnOption.minWidth,
857
+ sortable: e.getColumnProp(e.columnOption, "sortable"),
858
+ "render-header": e.columnOption.renderHeader,
859
+ align: e.columnOption.align || e.crud.tableOption.align,
860
+ "header-align": e.columnOption.headerAlign || e.crud.tableOption.headerAlign,
861
+ width: e.getColumnProp(e.columnOption, "width"),
862
+ fixed: e.getColumnProp(e.columnOption, "fixed")
863
+ }
864
+ }, [e._l(e.columnOption.children, function(n) {
865
+ return [n.children && n.children.length > 0 ? i("ColumnDynamic", {
866
+ key: n.prop,
867
+ attrs: {
868
+ "column-option": n
869
+ },
870
+ scopedSlots: e._u([e._l(e.crud.mainSlot, function(r) {
871
+ return {
872
+ key: r,
873
+ fn: function(o) {
874
+ return [e._t(r, null, null, o)];
875
+ }
876
+ };
877
+ })], null, !0)
878
+ }) : i("ColumnSlot", {
879
+ key: n.prop,
880
+ attrs: {
881
+ column: n,
882
+ "column-option": e.columnOption.children
883
+ },
884
+ scopedSlots: e._u([e._l(e.crud.mainSlot, function(r) {
885
+ return {
886
+ key: r,
887
+ fn: function(o) {
888
+ return [e._t(r, null, null, o)];
889
+ }
890
+ };
891
+ })], null, !0)
892
+ })];
893
+ })], 2) : e._e();
894
+ }, Ee = [];
895
+ const Le = {
896
+ name: "ColumnDynamic",
897
+ components: { ColumnSlot: K },
898
+ inject: ["dynamic", "crud"],
899
+ props: {
900
+ columnOption: Object
901
+ },
902
+ created() {
903
+ const e = ["getColumnProp", "handleFilterMethod", "handleFilters"];
904
+ Object.keys(this.dynamic).forEach((t) => {
905
+ e.includes(t) && (this[t] = this.dynamic[t]);
906
+ });
907
+ },
908
+ methods: {
909
+ optVal: f
910
+ }
911
+ }, P = {};
912
+ var Ve = /* @__PURE__ */ g(
913
+ Le,
914
+ Te,
915
+ Ee,
916
+ !1,
917
+ je,
918
+ null,
919
+ null,
920
+ null
921
+ );
922
+ function je(e) {
923
+ for (let t in P)
924
+ this[t] = P[t];
925
+ }
926
+ const Re = /* @__PURE__ */ function() {
927
+ return Ve.exports;
928
+ }();
929
+ var Ae = function() {
930
+ var e = this, t = e.$createElement, i = e._self._c || t;
931
+ return i("div", [e._t("header"), e._l(e.list, function(n) {
932
+ return [n.children && n.children.length > 0 ? i("ColumnDynamic", {
933
+ key: n.pop,
934
+ attrs: {
935
+ "column-option": n
936
+ },
937
+ scopedSlots: e._u([e._l(e.crud.mainSlot, function(r) {
938
+ return {
939
+ key: r,
940
+ fn: function(o) {
941
+ return [e._t(r, null, null, o)];
942
+ }
943
+ };
944
+ })], null, !0)
945
+ }) : i("ColumnSlot", {
946
+ key: n.prop,
947
+ attrs: {
948
+ column: n,
949
+ "column-option": e.columnOption
950
+ },
951
+ scopedSlots: e._u([e._l(e.crud.mainSlot, function(r) {
952
+ return {
953
+ key: r,
954
+ fn: function(o) {
955
+ return [e._t(r, null, null, o)];
956
+ }
957
+ };
958
+ })], null, !0)
959
+ })];
960
+ }), e._t("footer")], 2);
961
+ }, He = [];
962
+ const Ne = {
963
+ name: "Column",
964
+ components: { ColumnDynamic: Re, ColumnSlot: K },
965
+ inject: ["crud"],
966
+ provide() {
967
+ return {
968
+ crud: this.crud,
969
+ dynamic: this
970
+ };
971
+ },
972
+ props: {
973
+ columnOption: Array
974
+ },
975
+ computed: {
976
+ list() {
977
+ let e = [...this.columnOption];
978
+ return e = ee(
979
+ e,
980
+ "index",
981
+ (t, i) => {
982
+ var n, r;
983
+ return ((n = this.crud.objectOption[t.prop]) == null ? void 0 : n.index) - ((r = this.crud.objectOption[i.prop]) == null ? void 0 : r.index);
984
+ }
985
+ ), e;
986
+ }
987
+ },
988
+ methods: {
989
+ // 表格筛选逻辑
990
+ handleFilterMethod(e, t, i) {
991
+ const n = this.columnOption.filter((r) => r.prop === i.property)[0];
992
+ return typeof n.filterMethod == "function" ? n.filterMethod(e, t, n) : t[n.prop] === e;
993
+ },
994
+ // 表格筛选字典
995
+ handleFilters(e, t) {
996
+ if (t !== !0)
997
+ return;
998
+ const i = this.crud.DIC[e.prop] || [], n = [];
999
+ return u(i) ? this.crud.cellForm.list.forEach((r) => {
1000
+ n.map((o) => o.text).includes(r[e.prop]) || n.push({
1001
+ text: r[e.prop],
1002
+ value: r[e.prop]
1003
+ });
1004
+ }) : i.forEach((r) => {
1005
+ const o = e.props || this.crud.tableOption.props || {};
1006
+ n.push({
1007
+ text: r[o.label || b.label],
1008
+ value: r[o.value || b.value]
1009
+ });
1010
+ }), n;
1011
+ },
1012
+ getColumnProp(e, t) {
1013
+ const i = this.crud.objectOption[e.prop] || {};
1014
+ if (t === "filterMethod")
1015
+ return i == null ? void 0 : i.filters;
1016
+ if (this.crud.isMobile && ["fixed"].includes(t))
1017
+ return !1;
1018
+ const n = i == null ? void 0 : i[t];
1019
+ if (!(t === "width" && n === 0))
1020
+ return t === "filters" ? this.handleFilters(e, n) : t === "hide" ? (i == null ? void 0 : i.hide) !== !0 : n;
1021
+ }
1022
+ }
1023
+ }, D = {};
1024
+ var We = /* @__PURE__ */ g(
1025
+ Ne,
1026
+ Ae,
1027
+ He,
1028
+ !1,
1029
+ Ke,
1030
+ null,
1031
+ null,
1032
+ null
1033
+ );
1034
+ function Ke(e) {
1035
+ for (let t in D)
1036
+ this[t] = D[t];
1037
+ }
1038
+ const Ue = /* @__PURE__ */ function() {
1039
+ return We.exports;
1040
+ }();
1041
+ var qe = function() {
1042
+ var e = this, t = e.$createElement, i = e._self._c || t;
1043
+ return i("div", [i(_, {
1044
+ attrs: {
1045
+ width: "1px"
1046
+ }
1047
+ }), e.crud.tableOption.expand ? i(_, {
1048
+ key: "expand",
1049
+ attrs: {
1050
+ type: "expand",
1051
+ width: e.crud.tableOption.expandWidth || e.config.expandWidth,
1052
+ fixed: e.optVal(e.crud.tableOption.expandFixed, e.config.expandFixed),
1053
+ align: "center"
1054
+ },
1055
+ scopedSlots: e._u([{
1056
+ key: "default",
1057
+ fn: function(n) {
1058
+ var r = n.row;
1059
+ return [e._t("expand", null, {
1060
+ row: r,
1061
+ index: r.$index
1062
+ })];
1063
+ }
1064
+ }], null, !0)
1065
+ }) : e._e(), e.crud.tableOption.selection ? i(_, {
1066
+ key: "selection",
1067
+ attrs: {
1068
+ fixed: e.optVal(e.crud.tableOption.selectionFixed, e.config.selectionFixed),
1069
+ type: "selection",
1070
+ selectable: e.crud.tableOption.selectable,
1071
+ "reserve-selection": e.optVal(e.crud.tableOption.reserveSelection),
1072
+ width: e.crud.tableOption.selectionWidth || e.config.selectionWidth,
1073
+ align: "center"
1074
+ }
1075
+ }) : e._e(), e.optVal(e.crud.tableOption.index) ? i(_, {
1076
+ key: "index",
1077
+ attrs: {
1078
+ fixed: e.optVal(e.crud.tableOption.indexFixed, e.config.indexFixed),
1079
+ label: e.crud.tableOption.indexLabel || e.config.indexLabel,
1080
+ type: "index",
1081
+ width: e.crud.tableOption.indexWidth || e.config.indexWidth,
1082
+ index: e.indexMethod,
1083
+ align: "center"
1084
+ }
1085
+ }) : e._e()], 1);
1086
+ }, Ge = [];
1087
+ const Xe = {
1088
+ name: "ColumnDefault",
1089
+ inject: ["crud"],
1090
+ data() {
1091
+ return {
1092
+ config: m
1093
+ };
1094
+ },
1095
+ mounted() {
1096
+ this.setSort();
1097
+ },
1098
+ methods: {
1099
+ optVal: f,
1100
+ indexMethod(e) {
1101
+ return e + 1 + ((this.crud.page.currentPage || 1) - 1) * (this.crud.page.pageSize || 10);
1102
+ },
1103
+ setSort() {
1104
+ this.rowDrop(), this.columnDrop();
1105
+ },
1106
+ rowDrop() {
1107
+ const e = this.crud.$refs.table.$el.querySelectorAll(this.config.dropRowClass)[0];
1108
+ this.crud.tableDrop("row", e, (t) => {
1109
+ const i = t.oldIndex, n = t.newIndex, r = this.crud.list.splice(i, 1)[0];
1110
+ this.crud.list.splice(n, 0, r), this.crud.$emit("sortable-change", i, n), this.crud.refreshTable(() => this.rowDrop());
1111
+ });
1112
+ },
1113
+ columnDrop() {
1114
+ const e = this.crud.$refs.table.$el.querySelector(this.config.dropColClass);
1115
+ let t = 0;
1116
+ ["selection", "index", "expand"].forEach((i) => {
1117
+ this.crud.tableOption[i] && (t += 1);
1118
+ }), this.crud.tableDrop("column", e, (i) => {
1119
+ this.crud.headerSort(i.oldIndex - t, i.newIndex - t), this.columnDrop();
1120
+ });
1121
+ }
1122
+ }
1123
+ }, M = {};
1124
+ var Je = /* @__PURE__ */ g(
1125
+ Xe,
1126
+ qe,
1127
+ Ge,
1128
+ !1,
1129
+ Qe,
1130
+ null,
1131
+ null,
1132
+ null
1133
+ );
1134
+ function Qe(e) {
1135
+ for (let t in M)
1136
+ this[t] = M[t];
1137
+ }
1138
+ const Ye = /* @__PURE__ */ function() {
1139
+ return Je.exports;
1140
+ }();
1141
+ var Ze = function() {
1142
+ var e = this, t = e.$createElement, i = e._self._c || t;
1143
+ return e.optVal(e.crud.tableOption.menu, e.config.menu) && e.crud.getPermission("menu") ? i(_, {
1144
+ key: "menu",
1145
+ staticClass: "avue-crud__btn",
1146
+ attrs: {
1147
+ prop: "menu",
1148
+ fixed: e.optVal(e.crud.tableOption.menuFixed, e.config.menuFixed),
1149
+ label: e.crud.tableOption.menuTitle || "操作",
1150
+ align: e.crud.tableOption.menuAlign || e.config.menuAlign,
1151
+ "header-align": e.crud.tableOption.menuHeaderAlign || e.config.menuHeaderAlign,
1152
+ width: e.crud.isMobile ? e.crud.tableOption.menuXsWidth || e.config.menuXsWidth : e.crud.tableOption.menuWidth || e.config.menuWidth
1153
+ },
1154
+ scopedSlots: e._u([{
1155
+ key: "default",
1156
+ fn: function(n) {
1157
+ var r = n.row, o = n.$index;
1158
+ return [e.isMenu ? i(ce, {
1159
+ attrs: {
1160
+ size: e.crud.isMediumSize
1161
+ },
1162
+ scopedSlots: e._u([{
1163
+ key: "dropdown",
1164
+ fn: function() {
1165
+ return [i(ae, [e.optVal(e.crud.tableOption.viewBtn, e.config.viewBtn) ? i($, {
1166
+ directives: [{
1167
+ name: "permission",
1168
+ rawName: "v-permission",
1169
+ value: e.crud.getPermission("viewBtn", r, o),
1170
+ expression: "crud.getPermission('viewBtn', row, $index)"
1171
+ }],
1172
+ attrs: {
1173
+ icon: e.crud.getBtnIcon("viewBtn")
1174
+ },
1175
+ nativeOn: {
1176
+ click: function(s) {
1177
+ return e.crud.rowView(r, o);
1178
+ }
1179
+ }
1180
+ }, [e._v(" " + e._s(e.crud.menuIcon("viewBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.editBtn, e.config.editBtn) ? i($, {
1181
+ directives: [{
1182
+ name: "permission",
1183
+ rawName: "v-permission",
1184
+ value: e.crud.getPermission("editBtn", r, o),
1185
+ expression: "crud.getPermission('editBtn', row, $index)"
1186
+ }],
1187
+ attrs: {
1188
+ icon: e.crud.getBtnIcon("editBtn")
1189
+ },
1190
+ nativeOn: {
1191
+ click: function(s) {
1192
+ return e.crud.rowEdit(r, o);
1193
+ }
1194
+ }
1195
+ }, [e._v(" " + e._s(e.crud.menuIcon("editBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.copyBtn, e.config.copyBtn) ? i($, {
1196
+ directives: [{
1197
+ name: "permission",
1198
+ rawName: "v-permission",
1199
+ value: e.crud.getPermission("copyBtn", r, o),
1200
+ expression: "crud.getPermission('copyBtn', row, $index)"
1201
+ }],
1202
+ attrs: {
1203
+ icon: e.crud.getBtnIcon("copyBtn")
1204
+ },
1205
+ nativeOn: {
1206
+ click: function(s) {
1207
+ return e.crud.rowCopy(r);
1208
+ }
1209
+ }
1210
+ }, [e._v(" " + e._s(e.crud.menuIcon("copyBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.delBtn, e.config.delBtn) ? i($, {
1211
+ directives: [{
1212
+ name: "permission",
1213
+ rawName: "v-permission",
1214
+ value: e.crud.getPermission("delBtn", r, o),
1215
+ expression: "crud.getPermission('delBtn', row, $index)"
1216
+ }],
1217
+ attrs: {
1218
+ icon: e.crud.getBtnIcon("delBtn")
1219
+ },
1220
+ nativeOn: {
1221
+ click: function(s) {
1222
+ return e.crud.rowDel(r, o);
1223
+ }
1224
+ }
1225
+ }, [e._v(" " + e._s(e.crud.menuIcon("delBtn")) + " ")]) : e._e(), e._t("menuBtn", null, {
1226
+ row: r,
1227
+ type: e.menuText("primary"),
1228
+ disabled: e.crud.btnDisabled,
1229
+ size: e.crud.isMediumSize,
1230
+ index: o
1231
+ })], 2)];
1232
+ },
1233
+ proxy: !0
1234
+ }], null, !0)
1235
+ }, [i(a, {
1236
+ attrs: {
1237
+ type: "text",
1238
+ size: e.crud.isMediumSize
1239
+ }
1240
+ }, [e._v(" " + e._s(e.crud.tableOption.menuBtnTitle || "按钮") + " "), i("i", {
1241
+ staticClass: "el-icon-arrow-down el-icon--right"
1242
+ })])], 1) : ["button", "text", "icon"].includes(e.menuType) ? [e.optVal(e.crud.tableOption.cellBtn, e.config.cellBtn) ? [e.optVal(e.crud.tableOption.editBtn, e.config.editBtn) && !r.$cellEdit ? i(a, {
1243
+ directives: [{
1244
+ name: "permission",
1245
+ rawName: "v-permission",
1246
+ value: e.crud.getPermission("editBtn", r, o),
1247
+ expression: "crud.getPermission('editBtn', row, $index)"
1248
+ }],
1249
+ attrs: {
1250
+ type: e.menuText("primary"),
1251
+ icon: e.crud.getBtnIcon("editBtn"),
1252
+ size: e.crud.isMediumSize,
1253
+ disabled: e.crud.btnDisabledList[o]
1254
+ },
1255
+ on: {
1256
+ click: function(s) {
1257
+ return s.stopPropagation(), e.crud.rowCell(r, o);
1258
+ }
1259
+ }
1260
+ }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("editBtn")) + " ")]], 2) : e.optVal(e.crud.tableOption.saveBtn, e.config.saveBtn) && r.$cellEdit ? i(a, {
1261
+ directives: [{
1262
+ name: "permission",
1263
+ rawName: "v-permission",
1264
+ value: e.crud.getPermission("saveBtn", r, o),
1265
+ expression: "crud.getPermission('saveBtn', row, $index)"
1266
+ }],
1267
+ attrs: {
1268
+ type: e.menuText("primary"),
1269
+ icon: e.crud.getBtnIcon("saveBtn"),
1270
+ size: e.crud.isMediumSize,
1271
+ disabled: e.crud.btnDisabledList[o]
1272
+ },
1273
+ on: {
1274
+ click: function(s) {
1275
+ return s.stopPropagation(), e.crud.rowCell(r, o);
1276
+ }
1277
+ }
1278
+ }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("saveBtn")) + " ")]], 2) : e._e(), r.$cellEdit ? i(a, {
1279
+ attrs: {
1280
+ type: e.menuText("danger"),
1281
+ icon: e.crud.getBtnIcon("cancelBtn"),
1282
+ size: e.crud.isMediumSize,
1283
+ disabled: e.crud.btnDisabledList[o]
1284
+ },
1285
+ on: {
1286
+ click: function(s) {
1287
+ return s.stopPropagation(), e.crud.rowCancel(r, o);
1288
+ }
1289
+ }
1290
+ }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("cancelBtn")) + " ")]], 2) : e._e()] : e._e(), e.optVal(e.crud.tableOption.viewBtn, e.config.viewBtn) ? i(a, {
1291
+ directives: [{
1292
+ name: "permission",
1293
+ rawName: "v-permission",
1294
+ value: e.crud.getPermission("viewBtn", r, o),
1295
+ expression: "crud.getPermission('viewBtn', row, $index)"
1296
+ }],
1297
+ attrs: {
1298
+ type: e.menuText("success"),
1299
+ icon: e.crud.getBtnIcon("viewBtn"),
1300
+ size: e.crud.isMediumSize,
1301
+ disabled: e.btnDisabled
1302
+ },
1303
+ on: {
1304
+ click: function(s) {
1305
+ return s.stopPropagation(), e.crud.rowView(r, o);
1306
+ }
1307
+ }
1308
+ }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("viewBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.editBtn, e.config.editBtn) && !e.crud.tableOption.cellBtn ? i(a, {
1309
+ directives: [{
1310
+ name: "permission",
1311
+ rawName: "v-permission",
1312
+ value: e.crud.getPermission("editBtn", r, o),
1313
+ expression: "crud.getPermission('editBtn', row, $index)"
1314
+ }],
1315
+ attrs: {
1316
+ type: e.menuText("primary"),
1317
+ icon: e.crud.getBtnIcon("editBtn"),
1318
+ size: e.crud.isMediumSize,
1319
+ disabled: e.btnDisabled
1320
+ },
1321
+ on: {
1322
+ click: function(s) {
1323
+ return s.stopPropagation(), e.crud.rowEdit(r, o);
1324
+ }
1325
+ }
1326
+ }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("editBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.copyBtn, e.config.copyBtn) ? i(a, {
1327
+ directives: [{
1328
+ name: "permission",
1329
+ rawName: "v-permission",
1330
+ value: e.crud.getPermission("copyBtn", r, o),
1331
+ expression: "crud.getPermission('copyBtn', row, $index)"
1332
+ }],
1333
+ attrs: {
1334
+ type: e.menuText("primary"),
1335
+ icon: e.crud.getBtnIcon("copyBtn"),
1336
+ size: e.crud.isMediumSize,
1337
+ disabled: e.btnDisabled
1338
+ },
1339
+ on: {
1340
+ click: function(s) {
1341
+ return s.stopPropagation(), e.crud.rowCopy(r);
1342
+ }
1343
+ }
1344
+ }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("copyBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.delBtn, e.config.delBtn) && !r.$cellEdit ? i(a, {
1345
+ directives: [{
1346
+ name: "permission",
1347
+ rawName: "v-permission",
1348
+ value: e.crud.getPermission("delBtn", r, o),
1349
+ expression: "crud.getPermission('delBtn', row, $index)"
1350
+ }],
1351
+ attrs: {
1352
+ type: e.menuText("danger"),
1353
+ icon: e.crud.getBtnIcon("delBtn"),
1354
+ size: e.crud.isMediumSize,
1355
+ disabled: e.btnDisabled
1356
+ },
1357
+ on: {
1358
+ click: function(s) {
1359
+ return s.stopPropagation(), e.crud.rowDel(r, o);
1360
+ }
1361
+ }
1362
+ }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("delBtn")) + " ")]], 2) : e._e()] : e._e(), e._t("menu", null, {
1363
+ row: r,
1364
+ type: e.menuText("primary"),
1365
+ disabled: e.crud.btnDisabled,
1366
+ size: e.crud.isMediumSize,
1367
+ index: o
1368
+ })];
1369
+ }
1370
+ }], null, !0)
1371
+ }) : e._e();
1372
+ }, et = [];
1373
+ const tt = {
1374
+ name: "ColumnMenu",
1375
+ directives: {
1376
+ permission: S
1377
+ },
1378
+ inject: ["crud"],
1379
+ data() {
1380
+ return {
1381
+ config: m
1382
+ };
1383
+ },
1384
+ computed: {
1385
+ menuType() {
1386
+ return this.crud.tableOption.menuType || this.$AVUE.menuType || "button";
1387
+ },
1388
+ isIconMenu() {
1389
+ return this.menuType === "icon";
1390
+ },
1391
+ isTextMenu() {
1392
+ return this.menuType === "text";
1393
+ },
1394
+ isMenu() {
1395
+ return this.menuType === "menu";
1396
+ }
1397
+ },
1398
+ methods: {
1399
+ optVal: f,
1400
+ menuText(e) {
1401
+ return ["text", "menu"].includes(this.menuType) ? "text" : e;
1402
+ }
1403
+ }
1404
+ }, z = {};
1405
+ var it = /* @__PURE__ */ g(
1406
+ tt,
1407
+ Ze,
1408
+ et,
1409
+ !1,
1410
+ nt,
1411
+ null,
1412
+ null,
1413
+ null
1414
+ );
1415
+ function nt(e) {
1416
+ for (let t in z)
1417
+ this[t] = z[t];
1418
+ }
1419
+ const rt = /* @__PURE__ */ function() {
1420
+ return it.exports;
1421
+ }();
1422
+ var st = function() {
1423
+ var e = this, t = e.$createElement, i = e._self._c || t;
1424
+ return e.pageFlag && e.optVal(e.crud.tableOption.page, !0) ? i(H, {
1425
+ staticClass: "avue-pagination",
1426
+ attrs: {
1427
+ shadow: e.crud.isCard
1428
+ }
1429
+ }, [e._t("page"), i(ue, {
1430
+ staticStyle: {
1431
+ "margin-top": "25px"
1432
+ },
1433
+ attrs: {
1434
+ small: e.crud.size === "mini",
1435
+ disabled: e.defaultPage.disabled,
1436
+ "hide-on-single-page": e.defaultPage.single,
1437
+ "pager-count": e.defaultPage.pagerCount,
1438
+ "current-page": e.defaultPage.currentPage,
1439
+ background: e.defaultPage.background,
1440
+ "page-size": e.defaultPage.pageSize,
1441
+ "page-sizes": e.defaultPage.pageSizes,
1442
+ layout: e.defaultPage.layout,
1443
+ total: e.defaultPage.total
1444
+ },
1445
+ on: {
1446
+ "update:currentPage": function(n) {
1447
+ return e.$set(e.defaultPage, "currentPage", n);
1448
+ },
1449
+ "update:current-page": function(n) {
1450
+ return e.$set(e.defaultPage, "currentPage", n);
1451
+ },
1452
+ "size-change": e.sizeChange,
1453
+ "prev-click": e.prevClick,
1454
+ "next-click": e.nextClick,
1455
+ "current-change": e.currentChange
1456
+ }
1457
+ })], 2) : e._e();
1458
+ }, ot = [];
1459
+ const lt = {
1460
+ name: "TablePage",
1461
+ inject: ["crud"],
1462
+ data() {
1463
+ return {
1464
+ defaultPage: {
1465
+ single: !1,
1466
+ total: 0,
1467
+ // 总页数
1468
+ pagerCount: 7,
1469
+ // 超过多少条隐藏
1470
+ currentPage: 1,
1471
+ // 当前页数
1472
+ pageSize: 10,
1473
+ // 每页显示多少条
1474
+ pageSizes: [10, 20, 30, 40, 50, 100],
1475
+ layout: "total, sizes, prev, pager, next, jumper",
1476
+ background: !0
1477
+ // 背景颜色
1478
+ }
1479
+ };
1480
+ },
1481
+ computed: {
1482
+ pageFlag() {
1483
+ return this.defaultPage.total !== 0;
1484
+ }
1485
+ },
1486
+ watch: {
1487
+ "crud.page": {
1488
+ handler() {
1489
+ this.pageInit();
1490
+ },
1491
+ deep: !0
1492
+ },
1493
+ pageFlag() {
1494
+ this.crud.getTableHeight();
1495
+ },
1496
+ // 如果当前页面删除没数据了调用第一页
1497
+ "defaultPage.total"() {
1498
+ this.defaultPage.total === (this.defaultPage.currentPage - 1) * this.defaultPage.pageSize && this.defaultPage.total !== 0 && (this.defaultPage.currentPage = this.defaultPage.currentPage - 1, this.currentChange(this.defaultPage.currentPage));
1499
+ }
1500
+ },
1501
+ created() {
1502
+ this.crud.isMobile && (this.defaultPage.layout = "total, sizes, prev, pager, next"), this.pageInit(), this.crud.$emit("on-load", this.defaultPage);
1503
+ },
1504
+ methods: {
1505
+ optVal: f,
1506
+ pageInit() {
1507
+ this.defaultPage = Object.assign(this.defaultPage, this.crud.page), this.updateValue();
1508
+ },
1509
+ updateValue() {
1510
+ this.crud.$emit("update:page", this.defaultPage);
1511
+ },
1512
+ // 下一页事件
1513
+ nextClick(e) {
1514
+ this.crud.$emit("next-click", e);
1515
+ },
1516
+ // 上一页事件
1517
+ prevClick(e) {
1518
+ this.crud.$emit("prev-click", e);
1519
+ },
1520
+ // 页大小回调
1521
+ sizeChange(e) {
1522
+ this.defaultPage.currentPage = 1, this.defaultPage.pageSize = e, this.updateValue(), this.crud.$emit("on-load", this.defaultPage), this.crud.$emit("size-change", e);
1523
+ },
1524
+ // 页码回调
1525
+ currentChange(e) {
1526
+ this.updateValue(), this.crud.$emit("on-load", this.defaultPage), this.crud.$emit("current-change", e);
1527
+ }
1528
+ }
1529
+ }, T = {};
1530
+ var at = /* @__PURE__ */ g(
1531
+ lt,
1532
+ st,
1533
+ ot,
1534
+ !1,
1535
+ ct,
1536
+ null,
1537
+ null,
1538
+ null
1539
+ );
1540
+ function ct(e) {
1541
+ for (let t in T)
1542
+ this[t] = T[t];
1543
+ }
1544
+ const ut = /* @__PURE__ */ function() {
1545
+ return at.exports;
1546
+ }();
1547
+ var dt = function() {
1548
+ var e = this, t = e.$createElement, i = e._self._c || t;
1549
+ return e.boxVisible ? i(e.dialogType, e._b({
1550
+ tag: "Component",
1551
+ staticClass: "dialog-form",
1552
+ attrs: {
1553
+ "lock-scroll": "",
1554
+ "show-full-screen": "",
1555
+ "destroy-on-close": e.crud.tableOption.dialogDestroy,
1556
+ "wrapper-closable": e.crud.tableOption.dialogClickModal,
1557
+ direction: e.direction,
1558
+ "custom-class": e.crud.tableOption.dialogCustomClass,
1559
+ "modal-append-to-body": "",
1560
+ "append-to-body": "",
1561
+ top: e.dialogTop,
1562
+ title: e.dialogTitle,
1563
+ "close-on-press-escape": e.crud.tableOption.dialogEscape,
1564
+ "close-on-click-modal": e.optVal(e.crud.tableOption.dialogClickModal, !1),
1565
+ modal: e.crud.tableOption.dialogModal,
1566
+ "show-close": e.crud.tableOption.dialogCloseBtn,
1567
+ visible: e.boxVisible,
1568
+ "before-close": e.hide
1569
+ },
1570
+ on: {
1571
+ "update:visible": function(n) {
1572
+ e.boxVisible = n;
1573
+ }
1574
+ }
1575
+ }, "Component", e.params, !1), [i("FyForm", e._b({
1576
+ ref: "tableForm",
1577
+ attrs: {
1578
+ status: e.disabled,
1579
+ option: e.option
1580
+ },
1581
+ on: {
1582
+ "update:status": function(n) {
1583
+ e.disabled = n;
1584
+ },
1585
+ change: e.handleChange,
1586
+ submit: e.handleSubmit,
1587
+ "reset-change": e.hide,
1588
+ "tab-click": e.handleTabClick,
1589
+ error: e.handleError
1590
+ },
1591
+ scopedSlots: e._u([e._l(e.crud.formSlot, function(n) {
1592
+ return {
1593
+ key: e.getSlotName(n),
1594
+ fn: function(r) {
1595
+ return [e._t(n, null, null, Object.assign(r, {
1596
+ type: e.boxType
1597
+ }))];
1598
+ }
1599
+ };
1600
+ })], null, !0),
1601
+ model: {
1602
+ value: e.crud.tableForm,
1603
+ callback: function(n) {
1604
+ e.$set(e.crud, "tableForm", n);
1605
+ },
1606
+ expression: "crud.tableForm"
1607
+ }
1608
+ }, "FyForm", e.uploadFun({}, e.crud), !1)), i("span", {
1609
+ staticClass: "avue-dialog__footer",
1610
+ class: `avue-dialog__footer--${e.dialogMenuPosition}`
1611
+ }, [e.optVal(e.option.submitBtn, !0) && !e.isView ? i(a, {
1612
+ attrs: {
1613
+ loading: e.disabled,
1614
+ size: e.crud.controlSize,
1615
+ icon: e.option.submitIcon,
1616
+ type: "primary"
1617
+ },
1618
+ on: {
1619
+ click: e.submit
1620
+ }
1621
+ }, [e._v(" " + e._s(e.option.submitText) + " ")]) : e._e(), e.optVal(e.option.emptyBtn, !0) && !e.isView ? i(a, {
1622
+ attrs: {
1623
+ disabled: e.disabled,
1624
+ size: e.crud.controlSize,
1625
+ icon: e.option.emptyIcon
1626
+ },
1627
+ on: {
1628
+ click: e.reset
1629
+ }
1630
+ }, [e._v(" " + e._s(e.option.emptyText) + " ")]) : e._e(), e._t("menuForm", null, {
1631
+ disabled: e.disabled,
1632
+ size: e.crud.controlSize,
1633
+ type: e.boxType
1634
+ })], 2)], 1) : e._e();
1635
+ }, pt = [];
1636
+ const ht = {
1637
+ name: "FyDialogForm",
1638
+ components: {
1639
+ ElDrawer: O,
1640
+ ElementDialog: de
1641
+ },
1642
+ inject: ["crud"],
1643
+ data() {
1644
+ return {
1645
+ disabled: !1,
1646
+ boxType: "",
1647
+ fullscreen: !1,
1648
+ size: null,
1649
+ boxVisible: !1
1650
+ };
1651
+ },
1652
+ computed: {
1653
+ option() {
1654
+ const e = c(this.crud.tableOption);
1655
+ return e.boxType = this.boxType, e.column = c(this.crud.propOption), e.menuBtn = !1, this.isAdd ? (e.submitBtn = e.saveBtn, e.submitText = this.crud.menuIcon("saveBtn"), e.submitIcon = this.crud.getBtnIcon("saveBtn")) : this.isEdit ? (e.submitBtn = e.updateBtn, e.submitText = this.crud.menuIcon("updateBtn"), e.submitIcon = this.crud.getBtnIcon("updateBtn")) : this.isView && (e.detail = !0), e.emptyBtn = e.cancelBtn, e.emptyText = this.crud.menuIcon("cancelBtn"), e.emptyIcon = this.crud.getBtnIcon("cancelBtn"), this.crud.isGroup || (e.dicFlag = !1, e.dicData = this.crud.DIC), u(e.dicFlag) || e.column.forEach((t) => {
1656
+ t.boxType = this.boxType, t.dicFlag = t.dicFlag || e.dicFlag;
1657
+ }), e;
1658
+ },
1659
+ isView() {
1660
+ return this.boxType === "view";
1661
+ },
1662
+ isAdd() {
1663
+ return this.boxType === "add";
1664
+ },
1665
+ isEdit() {
1666
+ return this.boxType === "edit";
1667
+ },
1668
+ direction() {
1669
+ return this.crud.tableOption.dialogDirection;
1670
+ },
1671
+ width() {
1672
+ return f(`${this.crud.tableOption.dialogWidth}`, this.crud.isMobile ? "100%" : `${m.dialogWidth}`);
1673
+ },
1674
+ dialogType() {
1675
+ return this.isDrawer ? "ElDrawer" : "ElementDialog";
1676
+ },
1677
+ dialogTop() {
1678
+ return !this.isDrawer && !this.fullscreen ? this.crud.tableOption.dialogTop : "0";
1679
+ },
1680
+ isDrawer() {
1681
+ return this.crud.tableOption.dialogType === "drawer";
1682
+ },
1683
+ params() {
1684
+ return this.isDrawer ? {
1685
+ size: this.fullscreen ? "100%" : this.width,
1686
+ direction: this.crud.tableOption.dialogDirection
1687
+ } : {
1688
+ width: this.width,
1689
+ fullscreen: this.fullscreen
1690
+ };
1691
+ },
1692
+ dialogTitle() {
1693
+ const e = `${this.boxType}`;
1694
+ if (!u(this.boxType)) {
1695
+ const t = {
1696
+ tipStartTitle: "当前表格已选择",
1697
+ tipEndTitle: "项",
1698
+ editTitle: "编 辑",
1699
+ copyTitle: "复 制",
1700
+ addTitle: "新 增",
1701
+ viewTitle: "查 看",
1702
+ filterTitle: "过滤条件",
1703
+ showTitle: "列显隐"
1704
+ };
1705
+ return this.crud.tableOption[`${e}Title`] || t[`${e}Title`];
1706
+ }
1707
+ return "";
1708
+ },
1709
+ dialogMenuPosition() {
1710
+ return this.crud.option.dialogMenuPosition || "right";
1711
+ }
1712
+ },
1713
+ methods: {
1714
+ optVal: f,
1715
+ uploadFun: A,
1716
+ submit() {
1717
+ this.$refs.tableForm.submit();
1718
+ },
1719
+ reset() {
1720
+ this.$refs.tableForm.resetForm(!1);
1721
+ },
1722
+ getSlotName(e) {
1723
+ return e.replace("Form", "");
1724
+ },
1725
+ initFun() {
1726
+ ["clearValidate", "validate", "resetForm", "validateField"].forEach((e) => {
1727
+ this.crud[e] = this.$refs.tableForm[e];
1728
+ });
1729
+ },
1730
+ handleChange() {
1731
+ this.crud.setVal();
1732
+ },
1733
+ handleTabClick(e, t) {
1734
+ this.crud.$emit("tab-click", e, t);
1735
+ },
1736
+ handleFullScreen() {
1737
+ this.isDrawer && (u(this.size) ? this.size = "100%" : this.size = ""), this.fullscreen = !this.fullscreen;
1738
+ },
1739
+ handleError(e) {
1740
+ this.crud.$emit("error", e);
1741
+ },
1742
+ handleSubmit(e, t) {
1743
+ this.isAdd ? this.rowSave(t) : this.isEdit && this.rowUpdate(t);
1744
+ },
1745
+ // 保存
1746
+ rowSave(e) {
1747
+ this.crud.$emit("row-save", C(this.crud.tableForm, ["$"]), this.closeDialog, e);
1748
+ },
1749
+ // 更新
1750
+ rowUpdate(e) {
1751
+ this.crud.$emit(
1752
+ "row-update",
1753
+ C(this.crud.tableForm, ["$"]),
1754
+ this.crud.tableIndex,
1755
+ this.closeDialog,
1756
+ e
1757
+ );
1758
+ },
1759
+ closeDialog(e) {
1760
+ e = c(e), e && (() => {
1761
+ if (this.isEdit) {
1762
+ const { parentList: i, index: n } = this.crud.findData(e[this.crud.rowKey]);
1763
+ if (i) {
1764
+ const r = i.splice(n, 1)[0];
1765
+ e[this.crud.childrenKey] = r[this.crud.childrenKey], i.splice(n, 0, e);
1766
+ }
1767
+ } else if (this.isAdd) {
1768
+ const { item: i } = this.crud.findData(e[this.crud.rowParentKey]);
1769
+ i ? (i[this.crud.childrenKey] || this.$set(i, this.crud.childrenKey, []), this.crud.tableOption.lazy && this.$set(i, this.crud.hasChildrenKey, !0), i[this.crud.childrenKey].push(e)) : this.crud.list.push(e);
1770
+ }
1771
+ })(), this.hide();
1772
+ },
1773
+ // 隐藏表单
1774
+ hide(e) {
1775
+ const t = () => {
1776
+ e && e(), this.crud.tableIndex = -1, this.crud.tableForm = {}, this.crud.setVal(), this.boxVisible = !1;
1777
+ };
1778
+ typeof this.crud.beforeClose == "function" ? this.crud.beforeClose(t, this.boxType) : t();
1779
+ },
1780
+ // 显示表单
1781
+ show(e) {
1782
+ this.boxType = e;
1783
+ const t = () => {
1784
+ this.fullscreen = this.crud.tableOption.dialogFullscreen, this.boxVisible = !0, this.$nextTick(() => {
1785
+ this.initFun();
1786
+ });
1787
+ };
1788
+ typeof this.crud.beforeOpen == "function" ? this.crud.beforeOpen(t, this.boxType) : t();
1789
+ }
1790
+ }
1791
+ }, E = {};
1792
+ var mt = /* @__PURE__ */ g(
1793
+ ht,
1794
+ dt,
1795
+ pt,
1796
+ !1,
1797
+ ft,
1798
+ null,
1799
+ null,
1800
+ null
1801
+ );
1802
+ function ft(e) {
1803
+ for (let t in E)
1804
+ this[t] = E[t];
1805
+ }
1806
+ const gt = /* @__PURE__ */ function() {
1807
+ return mt.exports;
1808
+ }();
1809
+ var _t = function() {
1810
+ var e = this, t = e.$createElement, i = e._self._c || t;
1811
+ return e.columnBox ? i("div", [i(O, {
1812
+ staticClass: "avue-crud__dialog avue-crud__column avue-dialog",
1813
+ attrs: {
1814
+ "lock-scroll": "",
1815
+ "append-to-body": "",
1816
+ title: "列显隐",
1817
+ size: e.crud.isMobile ? "100%" : "40%",
1818
+ visible: e.columnBox
1819
+ },
1820
+ on: {
1821
+ "update:visible": function(n) {
1822
+ e.columnBox = n;
1823
+ }
1824
+ }
1825
+ }, [i(W, {
1826
+ ref: "table",
1827
+ attrs: {
1828
+ data: e.data,
1829
+ height: "100%",
1830
+ size: "small",
1831
+ border: ""
1832
+ }
1833
+ }, [i(_, {
1834
+ key: "label",
1835
+ attrs: {
1836
+ align: "center",
1837
+ width: "100",
1838
+ "header-align": "center",
1839
+ prop: "label",
1840
+ label: "列名"
1841
+ }
1842
+ }), e._l(e.defaultColumn, function(n, r) {
1843
+ return [n.hide !== !0 ? i(_, {
1844
+ key: r,
1845
+ attrs: {
1846
+ label: n.label,
1847
+ prop: n.prop,
1848
+ align: "center",
1849
+ "header-align": "center"
1850
+ },
1851
+ scopedSlots: e._u([{
1852
+ key: "default",
1853
+ fn: function(o) {
1854
+ var s = o.row;
1855
+ return [i(pe, {
1856
+ on: {
1857
+ change: function(l) {
1858
+ return e.handleChange(n.prop);
1859
+ }
1860
+ },
1861
+ model: {
1862
+ value: e.crud.objectOption[s.prop][n.prop],
1863
+ callback: function(l) {
1864
+ e.$set(e.crud.objectOption[s.prop], n.prop, l);
1865
+ },
1866
+ expression: "crud.objectOption[row.prop][item.prop]"
1867
+ }
1868
+ })];
1869
+ }
1870
+ }], null, !0)
1871
+ }) : e._e()];
1872
+ })], 2)], 1)], 1) : e._e();
1873
+ }, bt = [];
1874
+ const vt = {
1875
+ name: "DialogColumn",
1876
+ inject: ["crud"],
1877
+ data() {
1878
+ return {
1879
+ data: [],
1880
+ columnBox: !1
1881
+ };
1882
+ },
1883
+ computed: {
1884
+ defaultColumn() {
1885
+ return [
1886
+ {
1887
+ label: "隐藏",
1888
+ prop: "hide"
1889
+ },
1890
+ {
1891
+ label: "冻结",
1892
+ prop: "fixed"
1893
+ },
1894
+ {
1895
+ label: "过滤",
1896
+ prop: "filters"
1897
+ },
1898
+ {
1899
+ label: "排序",
1900
+ prop: "sortable"
1901
+ },
1902
+ {
1903
+ label: "序号",
1904
+ prop: "index",
1905
+ hide: !0
1906
+ },
1907
+ {
1908
+ label: "宽度",
1909
+ prop: "width",
1910
+ hide: !0
1911
+ }
1912
+ ];
1913
+ }
1914
+ },
1915
+ methods: {
1916
+ handleShow() {
1917
+ this.data = [], this.crud.propOption.forEach((e) => {
1918
+ e.showColumn !== !1 && this.data.push(e);
1919
+ }), this.columnBox = !0, this.$nextTick(() => this.rowDrop());
1920
+ },
1921
+ handleChange(e) {
1922
+ ["hide", "filters"].includes(e) && this.crud.refreshTable();
1923
+ },
1924
+ rowDrop() {
1925
+ const e = this.$refs.table.$el.querySelectorAll(m.dropRowClass)[0];
1926
+ this.crud.tableDrop("column", e, (t) => {
1927
+ const i = t.oldIndex, n = t.newIndex;
1928
+ this.crud.headerSort(i, n), this.crud.refreshTable(() => this.rowDrop());
1929
+ });
1930
+ }
1931
+ }
1932
+ }, L = {};
1933
+ var yt = /* @__PURE__ */ g(
1934
+ vt,
1935
+ _t,
1936
+ bt,
1937
+ !1,
1938
+ $t,
1939
+ null,
1940
+ null,
1941
+ null
1942
+ );
1943
+ function $t(e) {
1944
+ for (let t in L)
1945
+ this[t] = L[t];
1946
+ }
1947
+ const xt = /* @__PURE__ */ function() {
1948
+ return yt.exports;
1949
+ }();
1950
+ var wt = function() {
1951
+ var e = this, t = e.$createElement, i = e._self._c || t;
1952
+ return e.box ? i("div", [i("ElementDialog", {
1953
+ staticClass: "avue-dialog",
1954
+ attrs: {
1955
+ title: "导出",
1956
+ "lock-scroll": "",
1957
+ visible: e.box,
1958
+ width: e.crud.isMobile ? "100%" : "30%"
1959
+ },
1960
+ on: {
1961
+ "update:visible": function(n) {
1962
+ e.box = n;
1963
+ }
1964
+ },
1965
+ scopedSlots: e._u([{
1966
+ key: "footer",
1967
+ fn: function() {
1968
+ return [i("span", {
1969
+ staticClass: "dialog-footer"
1970
+ }, [i(a, {
1971
+ attrs: {
1972
+ type: "primary",
1973
+ size: e.crud.isMediumSize
1974
+ },
1975
+ on: {
1976
+ click: e.handleSubmit
1977
+ }
1978
+ }, [e._v("确定")]), i(a, {
1979
+ attrs: {
1980
+ size: e.crud.isMediumSize
1981
+ },
1982
+ on: {
1983
+ click: function(n) {
1984
+ e.box = !1;
1985
+ }
1986
+ }
1987
+ }, [e._v("取消")])], 1)];
1988
+ },
1989
+ proxy: !0
1990
+ }], null, !1, 2375905330)
1991
+ }, [i("FyForm", {
1992
+ attrs: {
1993
+ option: e.option
1994
+ },
1995
+ model: {
1996
+ value: e.form,
1997
+ callback: function(n) {
1998
+ e.form = n;
1999
+ },
2000
+ expression: "form"
2001
+ }
2002
+ })], 1)], 1) : e._e();
2003
+ }, Ct = [];
2004
+ const St = {
2005
+ name: "DialogExcel",
2006
+ inject: ["crud"],
2007
+ data() {
2008
+ return {
2009
+ option: {},
2010
+ columnOption: {},
2011
+ box: !1,
2012
+ form: {
2013
+ name: this.crud.tableOption.title
2014
+ }
2015
+ };
2016
+ },
2017
+ methods: {
2018
+ handleShow() {
2019
+ this.getColumnOption(), this.getOption(), this.box = !0;
2020
+ },
2021
+ handleSubmit() {
2022
+ this.$Export.excel({
2023
+ title: this.form.name,
2024
+ columns: this.getColumn(),
2025
+ data: this.handleSum()
2026
+ }), this.box = !1;
2027
+ },
2028
+ // 计算统计
2029
+ handleSum() {
2030
+ const e = this.crud.tableOption, t = this.crud.propOption, i = this.form.type ? this.crud.list : this.crud.tableSelect, n = [];
2031
+ return this.form.params.includes("data") && i.forEach((r) => {
2032
+ const o = c(r);
2033
+ t.forEach((s) => {
2034
+ const l = s.parentProp ? (this.crud.cascaderDIC[s.$index] || {})[s.prop] : this.crud.DIC[s.prop];
2035
+ o[s.prop] = N(o, s, e, l);
2036
+ }), n.push(o);
2037
+ }), this.form.params.includes("sum") && e.showSummary && n.push(this.crud.sumsList), n;
2038
+ },
2039
+ getOption() {
2040
+ this.option = {
2041
+ submitBtn: !1,
2042
+ emptyBtn: !1,
2043
+ column: [
2044
+ {
2045
+ label: "文件名",
2046
+ prop: "name",
2047
+ span: 24
2048
+ },
2049
+ {
2050
+ label: "选择数据",
2051
+ prop: "type",
2052
+ span: 24,
2053
+ type: "select",
2054
+ dicData: [
2055
+ {
2056
+ label: "当前数据(当前页全部的数据)",
2057
+ value: !0
2058
+ },
2059
+ {
2060
+ label: "选中的数据(当前页选中的数据)",
2061
+ disabled: this.crud.tableOption.selection !== !0,
2062
+ value: !1
2063
+ }
2064
+ ]
2065
+ },
2066
+ {
2067
+ label: "选择字段",
2068
+ prop: "prop",
2069
+ type: "tree",
2070
+ multiple: !0,
2071
+ checkStrictly: !0,
2072
+ span: 24,
2073
+ props: {
2074
+ value: "prop"
2075
+ },
2076
+ dicData: this.columnOption
2077
+ },
2078
+ {
2079
+ label: "参数设置",
2080
+ prop: "params",
2081
+ type: "checkbox",
2082
+ span: 24,
2083
+ value: ["header", "data"].concat(
2084
+ (() => {
2085
+ const e = [];
2086
+ return this.crud.isHeader && e.push("headers"), this.crud.isShowSummary && e.push("sum"), e;
2087
+ })()
2088
+ ),
2089
+ dicData: [
2090
+ {
2091
+ label: "表头",
2092
+ disabled: !0,
2093
+ value: "header"
2094
+ },
2095
+ {
2096
+ label: "数据源",
2097
+ value: "data"
2098
+ }
2099
+ ].concat(
2100
+ (() => {
2101
+ const e = [];
2102
+ return e.push({
2103
+ label: "复杂表头",
2104
+ value: "headers",
2105
+ disabled: !this.crud.isHeader
2106
+ }), e.push({
2107
+ label: "合计统计",
2108
+ value: "sum",
2109
+ disabled: !this.crud.isShowSummary
2110
+ }), e;
2111
+ })()
2112
+ )
2113
+ }
2114
+ ]
2115
+ }, this.form.type = this.crud.selectLen === 0;
2116
+ },
2117
+ getColumnOption() {
2118
+ const e = c(this.crud.columnOption), t = [], i = (n = []) => {
2119
+ n.forEach((r, o) => {
2120
+ const s = r.children;
2121
+ s && !Array.isArray(s) ? delete r.children : r.showColumn === !1 ? n.splice(o, 1) : (t.push(r.prop), r.children && i(s));
2122
+ });
2123
+ };
2124
+ i(e), this.columnOption = e, this.form.prop = t;
2125
+ },
2126
+ getColumn() {
2127
+ const e = c(this.columnOption), t = this.$refs.form.getPropRef("prop").$refs.temp.getHalfList();
2128
+ if (!this.form.params)
2129
+ return [];
2130
+ if (this.form.params.includes("headers")) {
2131
+ const i = (n = []) => {
2132
+ n.forEach((r, o) => {
2133
+ t.includes(r.prop) ? r.children && i(r.children) : n.splice(o, 1);
2134
+ });
2135
+ };
2136
+ return i(e), e;
2137
+ } else {
2138
+ const i = [], n = (r = []) => {
2139
+ r.forEach((o) => {
2140
+ o.children ? n(o.children) : t.includes(o.prop) && i.push(o);
2141
+ });
2142
+ };
2143
+ return n(e), i;
2144
+ }
2145
+ }
2146
+ }
2147
+ }, V = {};
2148
+ var Ot = /* @__PURE__ */ g(
2149
+ St,
2150
+ wt,
2151
+ Ct,
2152
+ !1,
2153
+ Bt,
2154
+ null,
2155
+ null,
2156
+ null
2157
+ );
2158
+ function Bt(e) {
2159
+ for (let t in V)
2160
+ this[t] = V[t];
2161
+ }
2162
+ const Ft = /* @__PURE__ */ function() {
2163
+ return Ot.exports;
2164
+ }();
2165
+ var kt = function() {
2166
+ var e = this, t = e.$createElement, i = e._self._c || t;
2167
+ return e.box ? i("div", [i(O, {
2168
+ staticClass: "avue-dialog",
2169
+ class: ["avue-crud__dialog", "avue-crud__filter"],
2170
+ attrs: {
2171
+ "lock-scroll": "",
2172
+ "append-to-body": "",
2173
+ title: "过滤条件",
2174
+ size: e.crud.isMobile ? "100%" : "60%",
2175
+ visible: e.box
2176
+ },
2177
+ on: {
2178
+ "update:visible": function(n) {
2179
+ e.box = n;
2180
+ }
2181
+ }
2182
+ }, [i(me, {
2183
+ attrs: {
2184
+ span: 24
2185
+ }
2186
+ }, [i("div", {
2187
+ staticClass: "avue-crud__filter-menu"
2188
+ }, [i(he, [i(a, {
2189
+ attrs: {
2190
+ type: "primary",
2191
+ size: e.crud.isMediumSize
2192
+ },
2193
+ on: {
2194
+ click: e.handleAdd
2195
+ }
2196
+ }, [e._v(" 新增条件 ")]), i(a, {
2197
+ attrs: {
2198
+ type: "primary",
2199
+ size: e.crud.isMediumSize
2200
+ },
2201
+ on: {
2202
+ click: e.handleClear
2203
+ }
2204
+ }, [e._v(" 清空条件 ")]), i(a, {
2205
+ attrs: {
2206
+ type: "primary",
2207
+ size: e.crud.isMediumSize
2208
+ },
2209
+ on: {
2210
+ click: e.handleValueClear
2211
+ }
2212
+ }, [e._v(" 清空数据 ")])], 1)], 1), e._l(e.list, function(n, r) {
2213
+ return i(B, {
2214
+ key: r,
2215
+ staticClass: "avue-crud__filter-item",
2216
+ attrs: {
2217
+ md: 12,
2218
+ xs: 24,
2219
+ sm: 12
2220
+ }
2221
+ }, [i("FySelect", {
2222
+ staticClass: "avue-crud__filter-label",
2223
+ attrs: {
2224
+ dic: e.columnOption,
2225
+ clearable: !1,
2226
+ size: e.crud.isMediumSize
2227
+ },
2228
+ on: {
2229
+ change: function(o) {
2230
+ return e.handleChange(r);
2231
+ }
2232
+ },
2233
+ model: {
2234
+ value: n.text,
2235
+ callback: function(o) {
2236
+ e.$set(n, "text", o);
2237
+ },
2238
+ expression: "column.text"
2239
+ }
2240
+ }), i("FySelect", {
2241
+ staticClass: "avue-crud__filter-symbol",
2242
+ attrs: {
2243
+ dic: e.symbolDic,
2244
+ clearable: !1,
2245
+ size: e.crud.isMediumSize
2246
+ },
2247
+ model: {
2248
+ value: n.symbol,
2249
+ callback: function(o) {
2250
+ e.$set(n, "symbol", o);
2251
+ },
2252
+ expression: "column.symbol"
2253
+ }
2254
+ }), i("FyInput", {
2255
+ staticClass: "avue-crud__filter-value",
2256
+ attrs: {
2257
+ size: e.crud.isMediumSize
2258
+ },
2259
+ model: {
2260
+ value: n.value,
2261
+ callback: function(o) {
2262
+ e.$set(n, "value", o);
2263
+ },
2264
+ expression: "column.value"
2265
+ }
2266
+ }), i(a, {
2267
+ staticClass: "avue-crud__filter-icon",
2268
+ attrs: {
2269
+ type: "danger",
2270
+ size: "mini",
2271
+ circle: "",
2272
+ icon: "el-icon-minus"
2273
+ },
2274
+ on: {
2275
+ click: function(o) {
2276
+ return e.handleDelete(r);
2277
+ }
2278
+ }
2279
+ })], 1);
2280
+ }), i(B, {
2281
+ staticClass: "avue-form__menu avue-form__menu--right",
2282
+ attrs: {
2283
+ span: 24
2284
+ }
2285
+ }, [i(a, {
2286
+ attrs: {
2287
+ type: "primary",
2288
+ size: e.crud.isMediumSize
2289
+ },
2290
+ on: {
2291
+ click: e.handleSubmit
2292
+ }
2293
+ }, [e._v(" 确 定 ")]), i(a, {
2294
+ attrs: {
2295
+ size: e.crud.isMediumSize
2296
+ },
2297
+ on: {
2298
+ click: function(n) {
2299
+ e.box = !1;
2300
+ }
2301
+ }
2302
+ }, [e._v(" 取 消 ")])], 1)], 2)], 1)], 1) : e._e();
2303
+ }, It = [];
2304
+ const Pt = {
2305
+ name: "DialogFilter",
2306
+ inject: ["crud"],
2307
+ data() {
2308
+ return {
2309
+ box: !1,
2310
+ columnObj: {},
2311
+ symbolDic: [
2312
+ {
2313
+ label: "=",
2314
+ value: "="
2315
+ },
2316
+ {
2317
+ label: "≠",
2318
+ value: "≠"
2319
+ },
2320
+ {
2321
+ label: "like",
2322
+ value: "like"
2323
+ },
2324
+ {
2325
+ label: ">",
2326
+ value: ">"
2327
+ },
2328
+ {
2329
+ label: "≥",
2330
+ value: "≥"
2331
+ },
2332
+ {
2333
+ label: "<",
2334
+ value: "<"
2335
+ },
2336
+ {
2337
+ label: "≤",
2338
+ value: "≤"
2339
+ },
2340
+ {
2341
+ label: "∈",
2342
+ value: "∈"
2343
+ }
2344
+ ],
2345
+ list: [],
2346
+ columnOption: {}
2347
+ };
2348
+ },
2349
+ methods: {
2350
+ handleShow() {
2351
+ this.getColumnOption(), this.box = !0;
2352
+ },
2353
+ getColumnOption() {
2354
+ const e = [];
2355
+ c(this.crud.propOption).forEach((i) => {
2356
+ i.showColumn !== !1 && e.push(
2357
+ Object.assign(i, {
2358
+ value: i.prop
2359
+ })
2360
+ );
2361
+ }), this.columnOption = e, this.columnObj = this.columnOption[0];
2362
+ },
2363
+ handleDelete(e) {
2364
+ this.list.splice(e, 1);
2365
+ },
2366
+ handleClear() {
2367
+ this.list = [];
2368
+ },
2369
+ handleValueClear() {
2370
+ this.list.forEach((e) => {
2371
+ e.value = "";
2372
+ });
2373
+ },
2374
+ handleSubmit() {
2375
+ const e = [];
2376
+ this.list.forEach((t) => {
2377
+ e.push([t.text, t.symbol, t.value]);
2378
+ }), this.crud.$emit("filter", e), this.box = !1;
2379
+ },
2380
+ handleChange(e) {
2381
+ this.list[e].value = "";
2382
+ },
2383
+ handleAdd() {
2384
+ const e = this.columnObj.prop;
2385
+ this.list.push({
2386
+ text: e,
2387
+ value: "",
2388
+ symbol: this.symbolDic[0].value
2389
+ });
2390
+ }
2391
+ }
2392
+ }, j = {};
2393
+ var Dt = /* @__PURE__ */ g(
2394
+ Pt,
2395
+ kt,
2396
+ It,
2397
+ !1,
2398
+ Mt,
2399
+ null,
2400
+ null,
2401
+ null
2402
+ );
2403
+ function Mt(e) {
2404
+ for (let t in j)
2405
+ this[t] = j[t];
2406
+ }
2407
+ const zt = /* @__PURE__ */ function() {
2408
+ return Dt.exports;
2409
+ }();
2410
+ var Tt = function() {
2411
+ var e = this, t = e.$createElement, i = e._self._c || t;
2412
+ return i("div", {
2413
+ staticClass: "avue-crud avue-crud--card"
2414
+ }, [e.tableOption.title ? i(e.tableOption.titleSize || "h2", {
2415
+ tag: "Component",
2416
+ style: e.tableOption.titleStyle
2417
+ }, [e._v(" " + e._s(e.tableOption.title) + " ")]) : e._e(), i("HeaderSearch", {
2418
+ ref: "headerSearch",
2419
+ scopedSlots: e._u([{
2420
+ key: "search",
2421
+ fn: function(n) {
2422
+ return [e._t("search", null, null, n)];
2423
+ }
2424
+ }, {
2425
+ key: "searchMenu",
2426
+ fn: function(n) {
2427
+ return [e._t("searchMenu", null, null, n)];
2428
+ }
2429
+ }, e._l(e.searchSlot, function(n) {
2430
+ return {
2431
+ key: n,
2432
+ fn: function(r) {
2433
+ return [e._t(n, null, null, r)];
2434
+ }
2435
+ };
2436
+ })], null, !0)
2437
+ }), e.optVal(e.tableOption.header, !0) ? i("HeaderMenu", {
2438
+ ref: "headerMenu",
2439
+ scopedSlots: e._u([{
2440
+ key: "menuLeft",
2441
+ fn: function(n) {
2442
+ return [e._t("menuLeft", null, null, n)];
2443
+ }
2444
+ }, {
2445
+ key: "menuRight",
2446
+ fn: function(n) {
2447
+ return [e._t("menuRight", null, null, n)];
2448
+ }
2449
+ }], null, !0)
2450
+ }) : e._e(), e.optVal(e.tableOption.tip, e.config.tip) && e.tableOption.selection ? i(_e, {
2451
+ staticClass: "avue-crud__tip"
2452
+ }, [i("span", {
2453
+ staticClass: "avue-crud__tip-name"
2454
+ }, [e._v(" 当前表格已选择 "), i("span", {
2455
+ staticClass: "avue-crud__tip-count"
2456
+ }, [e._v(e._s(e.selectLen))]), e._v(" 项 ")]), e.optVal(e.tableOption.selectClearBtn, e.config.selectClearBtn) && e.tableOption.selection ? i(a, {
2457
+ directives: [{
2458
+ name: "permission",
2459
+ rawName: "v-permission",
2460
+ value: e.getPermission("selectClearBtn"),
2461
+ expression: "getPermission('selectClearBtn')"
2462
+ }],
2463
+ attrs: {
2464
+ type: "text",
2465
+ size: "small"
2466
+ },
2467
+ on: {
2468
+ click: e.selectClear
2469
+ }
2470
+ }, [e._v(" 清 空 ")]) : e._e(), e._t("tip")], 2) : e._e(), e._t("header"), i(ge, {
2471
+ ref: "cellForm",
2472
+ attrs: {
2473
+ model: e.cellForm,
2474
+ "show-message": !1
2475
+ },
2476
+ on: {
2477
+ validate: e.handleValidate
2478
+ }
2479
+ }, [i(W, {
2480
+ directives: [{
2481
+ name: "loading",
2482
+ rawName: "v-loading",
2483
+ value: e.tableLoading,
2484
+ expression: "tableLoading"
2485
+ }],
2486
+ key: e.reload,
2487
+ ref: "table",
2488
+ class: {
2489
+ "avue-crud--indeterminate": e.optVal(e.tableOption.indeterminate, !1)
2490
+ },
2491
+ attrs: {
2492
+ data: e.cellForm.list,
2493
+ "row-key": e.rowKey,
2494
+ size: e.$AVUE.tableSize || e.controlSize,
2495
+ lazy: e.optVal(e.tableOption.lazy, !1),
2496
+ load: e.treeLoad,
2497
+ "tree-props": e.treeProps,
2498
+ "expand-row-keys": e.tableOption.expandRowKeys,
2499
+ "default-expand-all": e.tableOption.defaultExpandAll,
2500
+ "highlight-current-row": e.tableOption.highlightCurrentRow,
2501
+ "show-summary": e.tableOption.showSummary,
2502
+ "summary-method": e.tableSummaryMethod,
2503
+ "span-method": e.tableSpanMethod,
2504
+ stripe: e.tableOption.stripe,
2505
+ "show-header": e.tableOption.showHeader,
2506
+ "default-sort": e.tableOption.defaultSort,
2507
+ "row-class-name": e.rowClassName,
2508
+ "cell-class-name": e.cellClassName,
2509
+ "row-style": e.rowStyle,
2510
+ "cell-style": e.cellStyle,
2511
+ fit: e.tableOption.fit,
2512
+ "header-cell-class-name": e.headerCellClassName,
2513
+ "max-height": e.isAutoHeight ? e.tableHeight : e.tableOption.maxHeight,
2514
+ height: e.tableHeight,
2515
+ width: e.setPx(e.tableOption.width, e.config.width),
2516
+ border: e.tableOption.border
2517
+ },
2518
+ on: {
2519
+ "current-change": e.currentRowChange,
2520
+ "expand-change": e.expandChange,
2521
+ "header-dragend": e.headerDragend,
2522
+ "row-click": e.rowClick,
2523
+ "row-dblclick": e.rowDblclick,
2524
+ "cell-mouse-enter": e.cellMouseEnter,
2525
+ "cell-mouse-leave": e.cellMouseLeave,
2526
+ "cell-click": e.cellClick,
2527
+ "header-click": e.headerClick,
2528
+ "row-contextmenu": e.rowContextmenu,
2529
+ "header-contextmenu": e.headerContextmenu,
2530
+ "cell-dblclick": e.cellDblclick,
2531
+ "filter-change": e.filterChange,
2532
+ "selection-change": e.selectionChange,
2533
+ select: e.select,
2534
+ "select-all": e.selectAll,
2535
+ "sort-change": e.sortChange
2536
+ },
2537
+ scopedSlots: e._u([{
2538
+ key: "empty",
2539
+ fn: function() {
2540
+ return [e.$slots.empty ? e._t("empty") : i(fe, {
2541
+ staticClass: "avue-crud__empty",
2542
+ attrs: {
2543
+ "image-size": 100,
2544
+ description: e.tableOption.emptyText
2545
+ }
2546
+ })];
2547
+ },
2548
+ proxy: !0
2549
+ }], null, !0)
2550
+ }, [i("Column", {
2551
+ attrs: {
2552
+ "column-option": e.columnOption
2553
+ },
2554
+ scopedSlots: e._u([{
2555
+ key: "header",
2556
+ fn: function() {
2557
+ return [i("ColumnDefault", {
2558
+ ref: "columnDefault",
2559
+ scopedSlots: e._u([{
2560
+ key: "expand",
2561
+ fn: function(n) {
2562
+ var r = n.row, o = n.index;
2563
+ return [e._t("expand", null, {
2564
+ row: r,
2565
+ index: o
2566
+ })];
2567
+ }
2568
+ }], null, !0)
2569
+ })];
2570
+ },
2571
+ proxy: !0
2572
+ }, e._l(e.mainSlot, function(n) {
2573
+ return {
2574
+ key: n,
2575
+ fn: function(r) {
2576
+ return [e._t(n, null, null, r)];
2577
+ }
2578
+ };
2579
+ }), {
2580
+ key: "footer",
2581
+ fn: function() {
2582
+ return [i("ColumnMenu", {
2583
+ scopedSlots: e._u([{
2584
+ key: "menu",
2585
+ fn: function(n) {
2586
+ return [e._t("menu", null, null, n)];
2587
+ }
2588
+ }, {
2589
+ key: "menuBtn",
2590
+ fn: function(n) {
2591
+ return [e._t("menuBtn", null, null, n)];
2592
+ }
2593
+ }], null, !0)
2594
+ })];
2595
+ },
2596
+ proxy: !0
2597
+ }], null, !0)
2598
+ })], 1)], 1), e._t("footer"), i("TablePage", {
2599
+ ref: "tablePage"
2600
+ }), i("FyDialogForm", {
2601
+ ref: "dialogForm",
2602
+ scopedSlots: e._u([e._l(e.formSlot, function(n) {
2603
+ return {
2604
+ key: n,
2605
+ fn: function(r) {
2606
+ return [e._t(n, null, null, r)];
2607
+ }
2608
+ };
2609
+ }), {
2610
+ key: "menuForm",
2611
+ fn: function(n) {
2612
+ return [e._t("menuForm", null, null, n)];
2613
+ }
2614
+ }], null, !0)
2615
+ }), i("DialogColumn", {
2616
+ ref: "dialogColumn"
2617
+ }), i("DialogExcel", {
2618
+ ref: "dialogExcel"
2619
+ }), i("DialogFilter", {
2620
+ ref: "dialogFilter"
2621
+ })], 2);
2622
+ }, Et = [];
2623
+ const Lt = {
10
2624
  name: "FyCurd",
11
2625
  components: {
12
- DialogFilter: O,
13
- DialogExcel: D,
14
- DialogColumn: E,
15
- FyDialogForm: v,
16
- TablePage: I,
17
- ColumnMenu: H,
18
- ColumnDefault: P,
19
- Column: R,
20
- HeaderMenu: k,
21
- HeaderSearch: A
2626
+ DialogFilter: zt,
2627
+ DialogExcel: Ft,
2628
+ DialogColumn: xt,
2629
+ FyDialogForm: gt,
2630
+ TablePage: ut,
2631
+ ColumnMenu: rt,
2632
+ ColumnDefault: Ye,
2633
+ Column: Ue,
2634
+ HeaderMenu: ke,
2635
+ HeaderSearch: we
22
2636
  },
23
2637
  directives: {
24
- permission: w
2638
+ permission: S
25
2639
  },
26
- mixins: [y],
2640
+ mixins: [q],
27
2641
  provide() {
28
2642
  return {
29
2643
  crud: this
@@ -85,7 +2699,7 @@ const j = {
85
2699
  cellForm: {
86
2700
  list: []
87
2701
  },
88
- config: u,
2702
+ config: m,
89
2703
  list: [],
90
2704
  listError: {},
91
2705
  tableForm: {},
@@ -115,13 +2729,13 @@ const j = {
115
2729
  return this.tableOption.columnSort;
116
2730
  },
117
2731
  rowParentKey() {
118
- return this.option.rowParentKey || f.rowParentKey;
2732
+ return this.option.rowParentKey || b.rowParentKey;
119
2733
  },
120
2734
  childrenKey() {
121
- return this.treeProps.children || f.children;
2735
+ return this.treeProps.children || b.children;
122
2736
  },
123
2737
  hasChildrenKey() {
124
- return this.treeProps.hasChildren || f.hasChildren;
2738
+ return this.treeProps.hasChildren || b.hasChildren;
125
2739
  },
126
2740
  treeProps() {
127
2741
  return this.tableOption.treeProps || {};
@@ -136,37 +2750,37 @@ const j = {
136
2750
  return this.getSlotList(["Search"], this.$scopedSlots, this.propOption);
137
2751
  },
138
2752
  mainSlot() {
139
- const t = [];
140
- return this.propOption.forEach((e) => {
141
- this.$scopedSlots[e.prop] && t.push(e.prop);
142
- }), this.getSlotList(["Header", "Form"], this.$scopedSlots, this.propOption).concat(t);
2753
+ const e = [];
2754
+ return this.propOption.forEach((t) => {
2755
+ this.$scopedSlots[t.prop] && e.push(t.prop);
2756
+ }), this.getSlotList(["Header", "Form"], this.$scopedSlots, this.propOption).concat(e);
143
2757
  },
144
2758
  calcHeight() {
145
2759
  return (this.tableOption.calcHeight || 0) + this.$AVUE.calcHeight;
146
2760
  },
147
2761
  propOption() {
148
- let t = [];
149
- function e(s = []) {
150
- Array.isArray(s) && s.forEach((i) => {
151
- Array.isArray(i.children) ? e(i.children) : t.push(i);
2762
+ let e = [];
2763
+ function t(i = []) {
2764
+ Array.isArray(i) && i.forEach((n) => {
2765
+ Array.isArray(n.children) ? t(n.children) : e.push(n);
152
2766
  });
153
2767
  }
154
- return e(this.columnOption), t = M(t), t;
2768
+ return t(this.columnOption), e = X(e), e;
155
2769
  },
156
2770
  isShowSummary() {
157
2771
  return this.option.showSummary;
158
2772
  },
159
2773
  isHeader() {
160
- let t = !1;
161
- return this.columnOption.forEach((e) => {
162
- e.children && (t = !0);
163
- }), t;
2774
+ let e = !1;
2775
+ return this.columnOption.forEach((t) => {
2776
+ t.children && (e = !0);
2777
+ }), e;
164
2778
  },
165
2779
  isTree() {
166
- let t = !1;
167
- return this.data.forEach((e) => {
168
- e.children && (t = !0);
169
- }), t;
2780
+ let e = !1;
2781
+ return this.data.forEach((t) => {
2782
+ t.children && (e = !0);
2783
+ }), e;
170
2784
  },
171
2785
  isCard() {
172
2786
  return this.option.card ? "always" : "never";
@@ -215,206 +2829,206 @@ const j = {
215
2829
  this.dataInit(), this.getTableHeight(), this.refreshTable();
216
2830
  },
217
2831
  methods: {
218
- setPx: K,
219
- optVal: $,
220
- handleValidate(t, e, s) {
221
- this.listError[t] || this.$set(this.listError, t, { valid: !1, msg: "" }), this.listError[t].valid = !e, this.listError[t].msg = s;
2832
+ setPx: te,
2833
+ optVal: f,
2834
+ handleValidate(e, t, i) {
2835
+ this.listError[e] || this.$set(this.listError, e, { valid: !1, msg: "" }), this.listError[e].valid = !t, this.listError[e].msg = i;
222
2836
  },
223
- getPermission(t, e, s) {
224
- return typeof this.permission == "function" ? this.permission(t, e, s) : b(this.permission[t]) ? !0 : this.permission[t];
2837
+ getPermission(e, t, i) {
2838
+ return typeof this.permission == "function" ? this.permission(e, t, i) : u(this.permission[e]) ? !0 : this.permission[e];
225
2839
  },
226
2840
  getTableHeight() {
227
2841
  this.isAutoHeight ? this.$nextTick(() => {
228
- const t = this.$refs.table, e = this.$refs.tablePage;
229
- if (!t)
2842
+ const e = this.$refs.table, t = this.$refs.tablePage;
2843
+ if (!e)
230
2844
  return;
231
- const s = t.$el, i = e.$el.offsetHeight || 20;
232
- this.tableHeight = document.documentElement.clientHeight - s.offsetTop - i - this.calcHeight;
2845
+ const i = e.$el, n = t.$el.offsetHeight || 20;
2846
+ this.tableHeight = document.documentElement.clientHeight - i.offsetTop - n - this.calcHeight;
233
2847
  }) : this.tableHeight = this.tableOption.height;
234
2848
  },
235
2849
  doLayout() {
236
2850
  this.$refs.table.doLayout();
237
2851
  },
238
- refreshTable(t) {
2852
+ refreshTable(e) {
239
2853
  this.reload = Math.random(), this.$nextTick(() => {
240
- t && t();
2854
+ e && e();
241
2855
  });
242
2856
  },
243
2857
  // 树懒加载
244
- treeLoad(t, e, s) {
245
- this.$emit("tree-load", t, e, (i) => {
246
- t.children = i, s(i);
2858
+ treeLoad(e, t, i) {
2859
+ this.$emit("tree-load", e, t, (n) => {
2860
+ e.children = n, i(n);
247
2861
  });
248
2862
  },
249
- menuIcon(t) {
250
- return $(this.tableOption[`${t}Text`], T(`crud.${t}`));
2863
+ menuIcon(e) {
2864
+ return f(this.tableOption[`${e}Text`], J(`crud.${e}`));
251
2865
  },
252
- getBtnIcon(t) {
253
- const e = `${t}Icon`;
254
- return this.tableOption[e] || u[e];
2866
+ getBtnIcon(e) {
2867
+ const t = `${e}Icon`;
2868
+ return this.tableOption[t] || m[t];
255
2869
  },
256
2870
  // 对部分表单字段进行校验的方法
257
- validateField(t) {
258
- return this.$refs.dialogForm.$refs.tableForm.validateField(t);
2871
+ validateField(e) {
2872
+ return this.$refs.dialogForm.$refs.tableForm.validateField(e);
259
2873
  },
260
2874
  selectClear() {
261
- this.$emit("selection-clear", n(this.tableSelect)), this.$refs.table.clearSelection();
2875
+ this.$emit("selection-clear", c(this.tableSelect)), this.$refs.table.clearSelection();
262
2876
  },
263
- toggleRowSelection(t, e) {
264
- this.$refs.table.toggleRowSelection(t, e);
2877
+ toggleRowSelection(e, t) {
2878
+ this.$refs.table.toggleRowSelection(e, t);
265
2879
  },
266
- toggleRowExpansion(t, e) {
267
- this.$refs.table.toggleRowExpansion(t, e);
2880
+ toggleRowExpansion(e, t) {
2881
+ this.$refs.table.toggleRowExpansion(e, t);
268
2882
  },
269
- setCurrentRow(t) {
270
- this.$refs.table.setCurrentRow(t);
2883
+ setCurrentRow(e) {
2884
+ this.$refs.table.setCurrentRow(e);
271
2885
  },
272
2886
  dataInit() {
273
- this.list = this.data, this.list.forEach((t, e) => {
274
- t.$cellEdit && !this.cascaderFormList[e] && (this.cascaderFormList[e] = n(t)), this.$set(t, "$cellEdit", t.$cellEdit || !1), this.$set(t, "$index", e);
2887
+ this.list = this.data, this.list.forEach((e, t) => {
2888
+ e.$cellEdit && !this.cascaderFormList[t] && (this.cascaderFormList[t] = c(e)), this.$set(e, "$cellEdit", e.$cellEdit || !1), this.$set(e, "$index", t);
275
2889
  });
276
2890
  },
277
2891
  // 拖动表头事件
278
- headerDragend(t, e, s, i) {
279
- this.objectOption[s.property] && this.$set(this.objectOption[s.property], "width", t), this.$emit("header-dragend", t, e, s, i);
2892
+ headerDragend(e, t, i, n) {
2893
+ this.objectOption[i.property] && this.$set(this.objectOption[i.property], "width", e), this.$emit("header-dragend", e, t, i, n);
280
2894
  },
281
- headerSort(t, e) {
282
- const s = this.columnOption, i = s.splice(t, 1)[0];
283
- s.splice(e, 0, i), this.refreshTable();
2895
+ headerSort(e, t) {
2896
+ const i = this.columnOption, n = i.splice(e, 1)[0];
2897
+ i.splice(t, 0, n), this.refreshTable();
284
2898
  },
285
2899
  // 清除过滤器执行函数
286
- clearFilter(t) {
287
- this.$refs.table.clearFilter(t);
2900
+ clearFilter(e) {
2901
+ this.$refs.table.clearFilter(e);
288
2902
  },
289
2903
  // 展开或则关闭
290
- expandChange(t, e) {
291
- this.$emit("expand-change", t, e);
2904
+ expandChange(e, t) {
2905
+ this.$emit("expand-change", e, t);
292
2906
  },
293
2907
  // 设置单选
294
- currentRowChange(t, e) {
295
- this.$emit("current-row-change", t, e);
2908
+ currentRowChange(e, t) {
2909
+ this.$emit("current-row-change", e, t);
296
2910
  },
297
2911
  // 刷新事件
298
2912
  refreshChange() {
299
2913
  this.$emit("refresh-change");
300
2914
  },
301
2915
  // 选中实例
302
- toggleSelection(t) {
303
- t ? t.forEach((e) => {
304
- this.$refs.table.toggleRowSelection(e);
2916
+ toggleSelection(e) {
2917
+ e ? e.forEach((t) => {
2918
+ this.$refs.table.toggleRowSelection(t);
305
2919
  }) : this.$refs.table.clearSelection();
306
2920
  },
307
2921
  // 选择回调
308
- selectionChange(t) {
309
- this.tableSelect = t, this.$emit("selection-change", this.tableSelect);
2922
+ selectionChange(e) {
2923
+ this.tableSelect = e, this.$emit("selection-change", this.tableSelect);
310
2924
  },
311
2925
  // 单个选择回调
312
- select(t, e) {
313
- this.$emit("select", t, e);
2926
+ select(e, t) {
2927
+ this.$emit("select", e, t);
314
2928
  },
315
2929
  // 点击勾选全选 Checkbox
316
- selectAll(t) {
317
- this.$emit("select-all", t);
2930
+ selectAll(e) {
2931
+ this.$emit("select-all", e);
318
2932
  },
319
2933
  // 筛选回调用
320
- filterChange(t) {
321
- this.$emit("filter-change", t);
2934
+ filterChange(e) {
2935
+ this.$emit("filter-change", e);
322
2936
  },
323
2937
  // 排序回调
324
- sortChange(t) {
325
- this.$emit("sort-change", t);
2938
+ sortChange(e) {
2939
+ this.$emit("sort-change", e);
326
2940
  },
327
2941
  // 行双击
328
- rowDblclick(t, e) {
329
- this.$emit("row-dblclick", t, e);
2942
+ rowDblclick(e, t) {
2943
+ this.$emit("row-dblclick", e, t);
330
2944
  },
331
2945
  // 行单机
332
- rowClick(t, e, s) {
333
- this.$emit("row-click", t, e, s);
2946
+ rowClick(e, t, i) {
2947
+ this.$emit("row-click", e, t, i);
334
2948
  },
335
2949
  // 清空排序
336
2950
  clearSort() {
337
2951
  this.$refs.table.clearSort();
338
2952
  },
339
2953
  // 当单元格 hover 进入时会触发该事件
340
- cellMouseEnter(t, e, s, i) {
341
- this.$emit("cell-mouse-enter", t, e, s, i);
2954
+ cellMouseEnter(e, t, i, n) {
2955
+ this.$emit("cell-mouse-enter", e, t, i, n);
342
2956
  },
343
2957
  // 当单元格 hover 退出时会触发该事件
344
- cellMouseLeave(t, e, s, i) {
345
- this.$emit("cell-mouse-leave", t, e, s, i);
2958
+ cellMouseLeave(e, t, i, n) {
2959
+ this.$emit("cell-mouse-leave", e, t, i, n);
346
2960
  },
347
2961
  // 当某个单元格被点击时会触发该事件
348
- cellClick(t, e, s, i) {
349
- this.$emit("cell-click", t, e, s, i);
2962
+ cellClick(e, t, i, n) {
2963
+ this.$emit("cell-click", e, t, i, n);
350
2964
  },
351
2965
  // 当某一列的表头被点击时会触发该事件
352
- headerClick(t, e) {
353
- this.$emit("header-click", t, e);
2966
+ headerClick(e, t) {
2967
+ this.$emit("header-click", e, t);
354
2968
  },
355
2969
  // 当某一行被鼠标右键点击时会触发该事件
356
- rowContextmenu(t, e, s) {
357
- this.$emit("row-contextmenu", t, e, s);
2970
+ rowContextmenu(e, t, i) {
2971
+ this.$emit("row-contextmenu", e, t, i);
358
2972
  },
359
2973
  // 当某一列的表头被鼠标右键点击时触发该事件
360
- headerContextmenu(t, e) {
361
- this.$emit("header-contextmenu", t, e);
2974
+ headerContextmenu(e, t) {
2975
+ this.$emit("header-contextmenu", e, t);
362
2976
  },
363
2977
  // 当某个单元格被双击击时会触发该事件
364
- cellDblclick(t, e, s, i) {
365
- this.$emit("cell-dblclick", t, e, s, i);
2978
+ cellDblclick(e, t, i, n) {
2979
+ this.$emit("cell-dblclick", e, t, i, n);
366
2980
  },
367
2981
  // 单元格新增
368
- rowCellAdd(t = {}) {
369
- const e = this.list.length, s = _(this.propOption).tableForm;
370
- t = n(
2982
+ rowCellAdd(e = {}) {
2983
+ const t = this.list.length, i = Q(this.propOption).tableForm;
2984
+ e = c(
371
2985
  Object.assign(
372
2986
  {
373
2987
  $cellEdit: !0,
374
- $index: e
2988
+ $index: t
375
2989
  },
376
- s,
377
- t
2990
+ i,
2991
+ e
378
2992
  )
379
- ), this.list.push(t);
2993
+ ), this.list.push(e);
380
2994
  },
381
2995
  // 行取消
382
- rowCancel(t, e) {
383
- b(t[this.rowKey]) ? (this.list.splice(e, 1), delete this.cascaderDIC[e]) : (this.cascaderFormList[e].$cellEdit = !1, this.$set(this.cascaderDIC, e, this.cascaderDicList[e]), this.$set(this.list, e, this.cascaderFormList[e])), delete this.cascaderDicList[e], delete this.cascaderFormList[e], this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(e), 1);
2996
+ rowCancel(e, t) {
2997
+ u(e[this.rowKey]) ? (this.list.splice(t, 1), delete this.cascaderDIC[t]) : (this.cascaderFormList[t].$cellEdit = !1, this.$set(this.cascaderDIC, t, this.cascaderDicList[t]), this.$set(this.list, t, this.cascaderFormList[t])), delete this.cascaderDicList[t], delete this.cascaderFormList[t], this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(t), 1);
384
2998
  },
385
2999
  // 行编辑点击
386
- rowCell(t, e) {
387
- t.$cellEdit ? this.rowCellUpdate(t, e) : this.rowCellEdit(t, e);
3000
+ rowCell(e, t) {
3001
+ e.$cellEdit ? this.rowCellUpdate(e, t) : this.rowCellEdit(e, t);
388
3002
  },
389
- rowCellUpdate(t, e) {
390
- t = n(t);
391
- const s = this.validateCellField(e), i = () => {
392
- this.btnDisabledList[e] = !1, this.btnDisabled = !1, this.list[e].$cellEdit = !1, this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(e), 1), delete this.cascaderFormList[e];
3003
+ rowCellUpdate(e, t) {
3004
+ e = c(e);
3005
+ const i = this.validateCellField(t), n = () => {
3006
+ this.btnDisabledList[t] = !1, this.btnDisabled = !1, this.list[t].$cellEdit = !1, this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(t), 1), delete this.cascaderFormList[t];
393
3007
  }, r = () => {
394
- this.btnDisabledList[e] = !1, this.btnDisabled = !1;
3008
+ this.btnDisabledList[t] = !1, this.btnDisabled = !1;
395
3009
  };
396
- s && (this.btnDisabledList[e] = !0, this.btnDisabled = !0, b(t[this.rowKey]) ? this.$emit("row-save", t, i, r) : this.$emit("row-update", t, e, i, r));
3010
+ i && (this.btnDisabledList[t] = !0, this.btnDisabled = !0, u(e[this.rowKey]) ? this.$emit("row-save", e, n, r) : this.$emit("row-update", e, t, n, r));
397
3011
  },
398
3012
  // 单元格编辑
399
- rowCellEdit(t, e) {
400
- t.$cellEdit = !0, this.cascaderFormList[e] = n(t), this.cascaderDicList[e] = n(this.cascaderDIC[e]);
3013
+ rowCellEdit(e, t) {
3014
+ e.$cellEdit = !0, this.cascaderFormList[t] = c(e), this.cascaderDicList[t] = c(this.cascaderDIC[t]);
401
3015
  },
402
3016
  // 对部分表单字段进行校验
403
3017
  validateCellForm() {
404
- return new Promise((t) => {
405
- this.$refs.cellForm.validate((e, s) => {
406
- t(s);
3018
+ return new Promise((e) => {
3019
+ this.$refs.cellForm.validate((t, i) => {
3020
+ e(i);
407
3021
  });
408
3022
  });
409
3023
  },
410
- validateCellField(t) {
411
- let e = !0;
412
- for (const s of this.$refs.cellForm.fields)
413
- if (s.prop.split(".")[1] === `${t}` && this.$refs.cellForm.validateField(s.prop, (i) => {
414
- i && (e = !1);
415
- }), !e)
3024
+ validateCellField(e) {
3025
+ let t = !0;
3026
+ for (const i of this.$refs.cellForm.fields)
3027
+ if (i.prop.split(".")[1] === `${e}` && this.$refs.cellForm.validateField(i.prop, (n) => {
3028
+ n && (t = !1);
3029
+ }), !t)
416
3030
  break;
417
- return e;
3031
+ return t;
418
3032
  },
419
3033
  rowAdd() {
420
3034
  this.$refs.dialogForm.show("add");
@@ -428,121 +3042,121 @@ const j = {
428
3042
  closeDialog() {
429
3043
  return this.$refs.dialogForm.closeDialog();
430
3044
  },
431
- getPropRef(t) {
432
- return this.$refs.dialogForm.$refs.tableForm.getPropRef(t);
3045
+ getPropRef(e) {
3046
+ return this.$refs.dialogForm.$refs.tableForm.getPropRef(e);
433
3047
  },
434
3048
  setVal() {
435
3049
  this.$emit("input", this.tableForm), this.$emit("change", this.tableForm);
436
3050
  },
437
3051
  // 编辑
438
- rowEdit(t, e) {
439
- this.tableForm = n(t), this.tableIndex = e, this.setVal(), this.$refs.dialogForm.show("edit");
3052
+ rowEdit(e, t) {
3053
+ this.tableForm = c(e), this.tableIndex = t, this.setVal(), this.$refs.dialogForm.show("edit");
440
3054
  },
441
3055
  // 复制
442
- rowCopy(t) {
443
- this.tableForm = n(t), delete this.tableForm[this.rowKey], this.tableIndex = -1, this.setVal(), this.$refs.dialogForm.show("add");
3056
+ rowCopy(e) {
3057
+ this.tableForm = c(e), delete this.tableForm[this.rowKey], this.tableIndex = -1, this.setVal(), this.$refs.dialogForm.show("add");
444
3058
  },
445
3059
  // 查看
446
- rowView(t, e) {
447
- this.tableForm = n(t), this.tableIndex = e, this.setVal(), this.$refs.dialogForm.show("view");
3060
+ rowView(e, t) {
3061
+ this.tableForm = c(e), this.tableIndex = t, this.setVal(), this.$refs.dialogForm.show("view");
448
3062
  },
449
3063
  // 删除
450
- rowDel(t, e) {
451
- this.$emit("row-del", t, e, () => {
452
- const { parentList: s, index: i } = this.findData(t[this.rowKey]);
453
- s && s.splice(i, 1);
3064
+ rowDel(e, t) {
3065
+ this.$emit("row-del", e, t, () => {
3066
+ const { parentList: i, index: n } = this.findData(e[this.rowKey]);
3067
+ i && i.splice(n, 1);
454
3068
  });
455
3069
  },
456
3070
  // 合并行
457
- tableSpanMethod(t) {
3071
+ tableSpanMethod(e) {
458
3072
  if (typeof this.spanMethod == "function")
459
- return this.spanMethod(t);
3073
+ return this.spanMethod(e);
460
3074
  },
461
3075
  // 合集统计逻辑
462
- tableSummaryMethod(t) {
463
- const e = {};
3076
+ tableSummaryMethod(e) {
3077
+ const t = {};
464
3078
  if (typeof this.summaryMethod == "function")
465
- return this.summaryMethod(t);
466
- const { columns: s, data: i } = t, r = [];
467
- return s.length > 0 && s.forEach((a, l) => {
468
- const c = this.sumColumnList.find((d) => d.name === a.property);
469
- if (c) {
470
- const d = c.decimals || 2, m = c.label || "";
471
- let g = 1;
472
- switch (c.type) {
3079
+ return this.summaryMethod(e);
3080
+ const { columns: i, data: n } = e, r = [];
3081
+ return i.length > 0 && i.forEach((o, s) => {
3082
+ const l = this.sumColumnList.find((d) => d.name === o.property);
3083
+ if (l) {
3084
+ const d = l.decimals || 2, p = l.label || "";
3085
+ let v = 1;
3086
+ switch (l.type) {
473
3087
  case "count":
474
- r[l] = m + i.length;
3088
+ r[s] = p + n.length;
475
3089
  break;
476
3090
  case "avg":
477
- r[l] = i.map((o) => Number(o[a.property])).reduce((o, h) => {
478
- const p = Number(h);
479
- return isNaN(p) ? o : (o * (g - 1) + h) / g++;
480
- }, 0), r[l] = m + r[l].toFixed(d);
3091
+ r[s] = n.map((h) => Number(h[o.property])).reduce((h, y) => {
3092
+ const x = Number(y);
3093
+ return isNaN(x) ? h : (h * (v - 1) + y) / v++;
3094
+ }, 0), r[s] = p + r[s].toFixed(d);
481
3095
  break;
482
3096
  case "sum":
483
- r[l] = i.map((o) => Number(o[a.property])).reduce((o, h) => {
484
- const p = Number(h);
485
- return isNaN(p) ? o : o + h;
486
- }, 0), r[l] = m + r[l].toFixed(d);
3097
+ r[s] = n.map((h) => Number(h[o.property])).reduce((h, y) => {
3098
+ const x = Number(y);
3099
+ return isNaN(x) ? h : h + y;
3100
+ }, 0), r[s] = p + r[s].toFixed(d);
487
3101
  break;
488
3102
  }
489
- e[a.property] = r[l];
3103
+ t[o.property] = r[s];
490
3104
  } else
491
- r[l] = "";
492
- }), this.sumsList = e, r;
3105
+ r[s] = "";
3106
+ }), this.sumsList = t, r;
493
3107
  },
494
- tableDrop(t, e, s) {
3108
+ tableDrop(e, t, i) {
495
3109
  if (this.isSortable !== !0) {
496
- if (t === "row" && !this.isRowSort)
3110
+ if (e === "row" && !this.isRowSort)
497
3111
  return;
498
- if (t === "column" && !this.isColumnSort)
3112
+ if (e === "column" && !this.isColumnSort)
499
3113
  return;
500
3114
  }
501
3115
  if (!window.Sortable) {
502
- C.logs("Sortable");
3116
+ U.logs("Sortable");
503
3117
  return;
504
3118
  }
505
- window.Sortable.create(e, {
506
- ghostClass: u.ghostClass,
507
- chosenClass: u.ghostClass,
3119
+ window.Sortable.create(t, {
3120
+ ghostClass: m.ghostClass,
3121
+ chosenClass: m.ghostClass,
508
3122
  animation: 500,
509
3123
  delay: 0,
510
- onEnd: (i) => s(i)
3124
+ onEnd: (n) => i(n)
511
3125
  });
512
3126
  },
513
- findData(t) {
514
- let e = {};
515
- const s = (i, r) => {
516
- i.forEach((a, l) => {
517
- a[this.rowKey] === t && (e = {
518
- item: a,
519
- index: l,
520
- parentList: i,
3127
+ findData(e) {
3128
+ let t = {};
3129
+ const i = (n, r) => {
3130
+ n.forEach((o, s) => {
3131
+ o[this.rowKey] === e && (t = {
3132
+ item: o,
3133
+ index: s,
3134
+ parentList: n,
521
3135
  parent: r
522
- }), a[this.childrenKey] && s(a[this.childrenKey], a);
3136
+ }), o[this.childrenKey] && i(o[this.childrenKey], o);
523
3137
  });
524
3138
  };
525
- return s(this.list), e;
3139
+ return i(this.list), t;
526
3140
  }
527
3141
  }
528
- }, F = {};
529
- var x = /* @__PURE__ */ N(
530
- j,
531
- L,
532
- S,
3142
+ }, R = {};
3143
+ var Vt = /* @__PURE__ */ g(
3144
+ Lt,
3145
+ Tt,
3146
+ Et,
533
3147
  !1,
534
- V,
3148
+ jt,
535
3149
  null,
536
3150
  null,
537
3151
  null
538
3152
  );
539
- function V(t) {
540
- for (let e in F)
541
- this[e] = F[e];
3153
+ function jt(e) {
3154
+ for (let t in R)
3155
+ this[t] = R[t];
542
3156
  }
543
- const Y = /* @__PURE__ */ function() {
544
- return x.exports;
3157
+ const vi = /* @__PURE__ */ function() {
3158
+ return Vt.exports;
545
3159
  }();
546
3160
  export {
547
- Y as default
3161
+ vi as default
548
3162
  };