@web-utils/component 2.0.14 → 2.2.0

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