@web-utils/component 3.0.2 → 3.0.4

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