hs-admin-ui 9.4.7 → 9.4.9

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 (304) hide show
  1. package/dist/{401-D9fdZqkE.js → 401-D_pa_Pnl.js} +1 -1
  2. package/dist/{401-CU6PWkYt.mjs → 401-tWrEsA80.mjs} +1 -1
  3. package/dist/{404-Dy_Jb19z.mjs → 404-CtNEj2R1.mjs} +1 -1
  4. package/dist/{404-Dy_Jb19z.mjs.gz → 404-CtNEj2R1.mjs.gz} +0 -0
  5. package/dist/{404-CVYVZDOp.js → 404-DzWVfzOE.js} +1 -1
  6. package/dist/{404-CVYVZDOp.js.gz → 404-DzWVfzOE.js.gz} +0 -0
  7. package/dist/{account-bqFDKumj.mjs → account-DuG2eqI9.mjs} +2 -2
  8. package/dist/account-DuG2eqI9.mjs.gz +0 -0
  9. package/dist/{account-C-DV8Mx6.js → account-uMV0NjHa.js} +1 -1
  10. package/dist/account-uMV0NjHa.js.gz +0 -0
  11. package/dist/{aside-BDqzV6zw.js → aside-BpbcOb10.js} +1 -1
  12. package/dist/{aside-YKEgPDZW.mjs → aside-iGuCxPDp.mjs} +3 -3
  13. package/dist/{btnIndex-DV89yeVB.mjs → btnIndex-B9MrEtmf.mjs} +2 -2
  14. package/dist/btnIndex-B9MrEtmf.mjs.gz +0 -0
  15. package/dist/{btnIndex-C9-v44fJ.js → btnIndex-BNmUP0AA.js} +1 -1
  16. package/dist/{classic-D4Kmr6fm.js → classic-B13rCly-.js} +1 -1
  17. package/dist/{classic-Dyvp8vfW.mjs → classic-C0oA9Yb2.mjs} +5 -5
  18. package/dist/{columns-CRirYK20.js → columns-Dg_RDldt.js} +1 -1
  19. package/dist/{columns-Dvq6E1Mn.mjs → columns-RPRohazl.mjs} +5 -5
  20. package/dist/{columnsAside-BDbPuupb.js → columnsAside-BdfVxhfi.js} +1 -1
  21. package/dist/{columnsAside-DjGVJJTd.mjs → columnsAside-CPcs06IW.mjs} +1 -1
  22. package/dist/{contextmenu-jLVq_0Xn.js → contextmenu-B726BUx8.js} +1 -1
  23. package/dist/{contextmenu-z9rv6elh.mjs → contextmenu-Bbip36tz.mjs} +1 -1
  24. package/dist/{contextmenu-BITqKri7.js → contextmenu-CvG230Ys.js} +1 -1
  25. package/dist/{contextmenu-sOYwkPHk.mjs → contextmenu-DE62nl1K.mjs} +1 -1
  26. package/dist/{copyMenuConfig-DNXyw2fB.js → copyMenuConfig-DKQiEWow.js} +1 -1
  27. package/dist/{copyMenuConfig-CDbGGanV.mjs → copyMenuConfig-DR32vpc8.mjs} +1 -1
  28. package/dist/{copyMenuConfig.vue_vue_type_script_setup_true_lang-Cp1yBzdn.js → copyMenuConfig.vue_vue_type_script_setup_true_lang-BoPu1wn5.js} +1 -1
  29. package/dist/{copyMenuConfig.vue_vue_type_script_setup_true_lang-Dyn2-t0w.mjs → copyMenuConfig.vue_vue_type_script_setup_true_lang-Dz9KIoYD.mjs} +1 -1
  30. package/dist/{copySystem-BfIy74LQ.mjs → copySystem-BRISbN0c.mjs} +1 -1
  31. package/dist/{copySystem-BttSNXtV.js → copySystem-BoLJPdlL.js} +1 -1
  32. package/dist/{copySystem.vue_vue_type_script_setup_true_lang-DTJ-xd1Y.mjs → copySystem.vue_vue_type_script_setup_true_lang-CTRqnoyg.mjs} +1 -1
  33. package/dist/{copySystem.vue_vue_type_script_setup_true_lang-AYfZDVxG.js → copySystem.vue_vue_type_script_setup_true_lang-ng2mkZRm.js} +1 -1
  34. package/dist/{defaults-Bw4v6G-S.js → defaults-C4PsiM_1.js} +1 -1
  35. package/dist/{defaults-BHrQG9-V.mjs → defaults-DBXmaqAs.mjs} +4 -4
  36. package/dist/{dialog-HzDa6vY_.js → dialog-B8EWjOKo.js} +1 -1
  37. package/dist/{dialog-BFDMQMpr.mjs → dialog-BDeYAKi8.mjs} +1 -1
  38. package/dist/{dialog-B1N9_Ref.js → dialog-Cp4PesvT.js} +1 -1
  39. package/dist/{dialog-CGi0A91c.js → dialog-DIAbWrH7.js} +1 -1
  40. package/dist/{dialog-CS7sL_9E.mjs → dialog-bCzOfStM.mjs} +1 -1
  41. package/dist/{dialog-BLhtTkus.mjs → dialog-yX99oSG2.mjs} +1 -1
  42. package/dist/{dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-dgdZ7ppG.mjs → dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-BMN3nFhe.mjs} +2 -2
  43. package/dist/{dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-C_Mhxmmx.js → dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-DygA4DwJ.js} +1 -1
  44. package/dist/{dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-BaXz07HH.js → dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang--koM1rDJ.js} +1 -1
  45. package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang--koM1rDJ.js.gz +0 -0
  46. package/dist/{dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-B9yYMoCl.mjs → dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-DQrc9XWS.mjs} +2 -2
  47. package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-DQrc9XWS.mjs.gz +0 -0
  48. package/dist/{dictDialog-Dp5G1bBl.js → dictDialog-DeZlHTK8.js} +1 -1
  49. package/dist/{dictDialog-Cj_4s1eI.mjs → dictDialog-qQ0SM6mo.mjs} +1 -1
  50. package/dist/{dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-CwSMalvQ.mjs → dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-C8jaYDm_.mjs} +2 -2
  51. package/dist/{dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-CAh9PTzN.js → dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-CA-HJS6Q.js} +1 -1
  52. package/dist/{dictItemDialog-CY2QS-xo.mjs → dictItemDialog-BHNkPx3R.mjs} +1 -1
  53. package/dist/{dictItemDialog-dO3QfbT0.js → dictItemDialog-nYouCT_X.js} +1 -1
  54. package/dist/{dictItemDialog.vue_vue_type_script_setup_true_lang-BmlNmLbQ.mjs → dictItemDialog.vue_vue_type_script_setup_true_lang-B7TW97Rv.mjs} +2 -2
  55. package/dist/{dictItemDialog.vue_vue_type_script_setup_true_lang-BO5fgDqb.js → dictItemDialog.vue_vue_type_script_setup_true_lang-CzOl9YWc.js} +1 -1
  56. package/dist/{editDialog-8vwRj9-4.mjs → editDialog-PPdDhe77.mjs} +1 -1
  57. package/dist/{editDialog-CB6Vk8Ch.js → editDialog-yDvEGf5d.js} +1 -1
  58. package/dist/{formConfig-BE7jjbgI.mjs → formConfig-CnzkNobl.mjs} +79 -9
  59. package/dist/formConfig-CnzkNobl.mjs.gz +0 -0
  60. package/dist/formConfig-DbpseZE1.js +1 -0
  61. package/dist/{header-CzPs0Z36.js → header-2lxcdAtf.js} +1 -1
  62. package/dist/{header--u7DS0WG.mjs → header-B_hdTwQt.mjs} +2 -2
  63. package/dist/{horizontal-Bcv1yzdR.js → horizontal-D3lztVx9.js} +1 -1
  64. package/dist/{horizontal-3BLriLab.mjs → horizontal-D6uYcVV0.mjs} +2 -2
  65. package/dist/{hsAttrBtn-BV6pRTMG.mjs → hsAttrBtn-BId2LPGW.mjs} +1 -1
  66. package/dist/{hsAttrBtn-Cs7cDGIw.js → hsAttrBtn-Dm92qeaF.js} +1 -1
  67. package/dist/{hsAttrBtn.vue_vue_type_script_setup_true_lang-DSN5o-86.mjs → hsAttrBtn.vue_vue_type_script_setup_true_lang-7eGEAuLY.mjs} +3 -3
  68. package/dist/{hsAttrBtn.vue_vue_type_script_setup_true_lang-DpfFd3VV.js → hsAttrBtn.vue_vue_type_script_setup_true_lang-BUb_O2Rq.js} +1 -1
  69. package/dist/{hsAttrForm-H5AwBfwg.mjs → hsAttrForm-Cokawcn2.mjs} +1 -1
  70. package/dist/{hsAttrForm-zgCkcTpG.js → hsAttrForm-Dl80LoJi.js} +1 -1
  71. package/dist/{hsAttrForm.vue_vue_type_script_setup_true_lang-p1ZTjUK2.mjs → hsAttrForm.vue_vue_type_script_setup_true_lang-BMbtICww.mjs} +2 -2
  72. package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-BMbtICww.mjs.gz +0 -0
  73. package/dist/{hsAttrForm.vue_vue_type_script_setup_true_lang-BX2tx5_-.js → hsAttrForm.vue_vue_type_script_setup_true_lang-CJMcfNWw.js} +1 -1
  74. package/dist/{hsBtnConfigList-B3mBRp3X.mjs → hsBtnConfigList-C19iSgZ9.mjs} +14 -9
  75. package/dist/hsBtnConfigList-DTAH0fCu.js +1 -0
  76. package/dist/{hsBtnItemConfig-CX1Ha6ky.js → hsBtnItemConfig-CEMcZe_h.js} +1 -1
  77. package/dist/{hsBtnItemConfig-i5iD4Phc.mjs → hsBtnItemConfig-zpsaY8dt.mjs} +1 -1
  78. package/dist/{hsBtnItemConfig.vue_vue_type_script_setup_true_lang-BreNnMk0.js → hsBtnItemConfig.vue_vue_type_script_setup_true_lang-BAlgZbON.js} +1 -1
  79. package/dist/{hsBtnItemConfig.vue_vue_type_script_setup_true_lang-DLwZ9yMK.mjs → hsBtnItemConfig.vue_vue_type_script_setup_true_lang-Df-D0w0i.mjs} +1 -1
  80. package/dist/{hsBtnPanel-Cy3ocV0x.js → hsBtnPanel-Cunjykv2.js} +1 -1
  81. package/dist/{hsBtnPanel-Bg63rOGd.mjs → hsBtnPanel-h_eFBCZ2.mjs} +1 -1
  82. package/dist/{hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-MLpKlR8a.mjs → hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-CPwy-8ij.mjs} +4 -4
  83. package/dist/{hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-CB6qYpGm.js → hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-CTBTH1EK.js} +1 -1
  84. package/dist/{hsExpand-DwYnBJiS.mjs → hsExpand-CkZm8rUz.mjs} +1 -1
  85. package/dist/{hsExpand-B8_Zfr4b.js → hsExpand-DDdQEHSc.js} +1 -1
  86. package/dist/{hsExpand.vue_vue_type_script_setup_true_lang-0_OU_WpT.js → hsExpand.vue_vue_type_script_setup_true_lang-0utdtbEy.js} +1 -1
  87. package/dist/{hsExpand.vue_vue_type_script_setup_true_lang-Dsa5eP6k.mjs → hsExpand.vue_vue_type_script_setup_true_lang-D8YdJXEj.mjs} +1 -1
  88. package/dist/{hsFormConfig-BDXqlU1Z.mjs → hsFormConfig-BGwvnlcp.mjs} +1 -1
  89. package/dist/{hsFormConfig-DD3AJtYR.js → hsFormConfig-D13Y72pC.js} +1 -1
  90. package/dist/{hsFormConfigList-Cj6JmCRg.mjs → hsFormConfigList-C1-Oeb9D.mjs} +13 -8
  91. package/dist/hsFormConfigList-C1-Oeb9D.mjs.gz +0 -0
  92. package/dist/hsFormConfigList-Dz0KTnCt.js +1 -0
  93. package/dist/{hsFormPanel-cONTsW7b.mjs → hsFormPanel-B8YifLnn.mjs} +7 -8
  94. package/dist/hsFormPanel-B8YifLnn.mjs.gz +0 -0
  95. package/dist/hsFormPanel-cfvPezjG.js +1 -0
  96. package/dist/{hsFormParse--9pBBPHh.js → hsFormParse-BT5Tp3jY.js} +1 -1
  97. package/dist/{hsFormParse-DamJpMS0.mjs → hsFormParse-DRzPxbQP.mjs} +1 -1
  98. package/dist/{hsFormParse.vue_vue_type_script_setup_true_lang-CUtqmF9_.mjs → hsFormParse.vue_vue_type_script_setup_true_lang-BBeucJCj.mjs} +1 -1
  99. package/dist/{hsFormParse.vue_vue_type_script_setup_true_lang-BEb7ahJm.js → hsFormParse.vue_vue_type_script_setup_true_lang-C99MnWdp.js} +1 -1
  100. package/dist/{hsPanelItem-IxiMNrX-.mjs → hsPanelItem-DAPFkaxi.mjs} +1 -1
  101. package/dist/{hsPanelItem-lCFLdGSI.js → hsPanelItem-DzaUk-is.js} +1 -1
  102. package/dist/{hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-DOEHnJbc.mjs → hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-DPndINS2.mjs} +1 -1
  103. package/dist/{hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-bxWEky3C.js → hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-apICNLYV.js} +1 -1
  104. package/dist/{iframes-BQDA82uP.mjs → iframes-BjPZZ8c1.mjs} +1 -1
  105. package/dist/{iframes-COI2zfOj.js → iframes-DTwaTua7.js} +1 -1
  106. package/dist/{index copy-BKNgM0Ek.mjs → index copy-BjPx9BNT.mjs } +1 -1
  107. package/dist/index copy-BjPx9BNT.mjs.gz +0 -0
  108. package/dist/{index copy-BQ67zqfl.js → index copy-CjmejP8D.js } +1 -1
  109. package/dist/index copy-CjmejP8D.js.gz +0 -0
  110. package/dist/{index-Cf0C42VI.mjs → index--lfoOtsB.mjs} +1 -1
  111. package/dist/{index-DKzypJqe.js → index-3NIwgc1v.js} +1 -1
  112. package/dist/{index-CKAOxjpT.mjs → index-4bsaylHA.mjs} +1 -1
  113. package/dist/{index-o0bJ7tuy.js → index-67SqxdzO.js} +1 -1
  114. package/dist/{index-D0YgVMBn.js → index-B-BpjLqQ.js} +1 -1
  115. package/dist/index-B-BpjLqQ.js.gz +0 -0
  116. package/dist/{index-C4QvX8Bc.mjs → index-B3-lvS6P.mjs} +1 -1
  117. package/dist/{index-DXcqNh0C.mjs → index-B5ujCJQ2.mjs} +2 -2
  118. package/dist/{index-DvtLJ_Is.js → index-B62lsfyd.js} +1 -1
  119. package/dist/{index-BF-r4tdm.js → index-B9lgK81Q.js} +1 -1
  120. package/dist/{index-BkmDhpwm.js → index-B9vZWgC_.js} +1 -1
  121. package/dist/{index-u90ge6v6.mjs → index-BASeEhbB.mjs} +3 -3
  122. package/dist/{index-C7ZNTGYR.mjs → index-BBRYo3Ga.mjs} +1 -1
  123. package/dist/{index-BDh7gafl.mjs → index-BDvXBWGU.mjs} +3 -3
  124. package/dist/{index-D-exFdW6.mjs → index-BKZ-Mf0o.mjs} +754 -411
  125. package/dist/{index-D-exFdW6.mjs.gz → index-BKZ-Mf0o.mjs.gz} +0 -0
  126. package/dist/{index-DyusnHgN.mjs → index-BQ8g4zs0.mjs} +1 -1
  127. package/dist/{index-DO9eaZXv.mjs → index-BWrKYFFm.mjs} +1 -1
  128. package/dist/{index-B53ZC4m0.mjs → index-BYeSix4_.mjs} +1 -1
  129. package/dist/{index-BJZjoaAP.js → index-BaLebTV1.js} +1 -1
  130. package/dist/{index-4i92F0Z3.mjs → index-BsOzLcN6.mjs} +3 -3
  131. package/dist/{index-DYIOBXbw.mjs → index-Bt7gHYfQ.mjs} +2 -2
  132. package/dist/index-Bt7gHYfQ.mjs.gz +0 -0
  133. package/dist/{index-CdmL54dR.mjs → index-BtIrAZH5.mjs} +4 -4
  134. package/dist/index-BtIrAZH5.mjs.gz +0 -0
  135. package/dist/{index-DJUOgYIP.mjs → index-CB4GQvwm.mjs} +1 -1
  136. package/dist/{index-BbwYnESR.js → index-CDEMGD-T.js} +1 -1
  137. package/dist/{index-CGvVWCOt.js → index-CLwjWDX1.js} +1 -1
  138. package/dist/{index-CGB2Yw3y.mjs → index-CN_MdZZf.mjs} +1 -1
  139. package/dist/{index-DLuCdmPj.mjs → index-CSOhLH9t.mjs} +1 -1
  140. package/dist/{index-Ch9RNNpC.mjs → index-CVJeDn_E.mjs} +1 -1
  141. package/dist/{index-Uns2uNjk.js → index-CXB7m0ib.js} +1 -1
  142. package/dist/index-CXB7m0ib.js.gz +0 -0
  143. package/dist/{index-CdwX2Fia.mjs → index-Cg972NZS.mjs} +1 -1
  144. package/dist/{index-sElXJiCI.js → index-CiOeW42R.js} +1 -1
  145. package/dist/{index-zp05b1y0.js → index-CloJkuiC.js} +1 -1
  146. package/dist/{index-Dcjq4ZUq.mjs → index-Cob9ytG-.mjs} +5 -5
  147. package/dist/{index-DsYTUTAH.mjs → index-CrCTnzf6.mjs} +1 -1
  148. package/dist/{index-Jzxg3t26.mjs → index-CvD5KiXP.mjs} +4 -4
  149. package/dist/{index-CsuITCiC.js → index-CxglWCov.js} +1 -1
  150. package/dist/{index-NZNIx17l.js → index-D02E8sa-.js} +1 -1
  151. package/dist/{index-DAXEpvlm.mjs → index-D0lqS-5Y.mjs} +4 -4
  152. package/dist/{index-28cx-587.js → index-D16bXZWj.js} +1 -1
  153. package/dist/{index-CZTavK9b.js → index-D4VEfRnP.js} +1 -1
  154. package/dist/{index-ai3DQCeM.js → index-D4xfMQ9o.js} +1 -1
  155. package/dist/{index-CK6Qsaoi.mjs → index-D5uHNo7O.mjs} +3 -3
  156. package/dist/index-D5uHNo7O.mjs.gz +0 -0
  157. package/dist/{index-D50yecV-.js → index-D8HKYOG6.js} +1 -1
  158. package/dist/{index-DXX-Zxsm.mjs → index-DGGgJ5Kb.mjs} +2 -2
  159. package/dist/{index-aSfiSSUJ.js → index-DIBSmTL2.js} +1 -1
  160. package/dist/{index-DdgMr3re.js → index-DK9e99IT.js} +1 -1
  161. package/dist/index-DK9e99IT.js.gz +0 -0
  162. package/dist/{index-BPdqLM75.mjs → index-DKVg3KyB.mjs} +1 -1
  163. package/dist/{index-DpkRDr2O.js → index-DPv7Ali6.js} +1 -1
  164. package/dist/{index-_Rnvwegz.mjs → index-DWUXz7up.mjs} +3 -3
  165. package/dist/{index-B4S6qinT.mjs → index-DXyXBF1A.mjs} +2 -2
  166. package/dist/index-DXyXBF1A.mjs.gz +0 -0
  167. package/dist/{index-DV0H4BeO.mjs → index-DbCRHkdS.mjs} +3 -3
  168. package/dist/{index-ob5EylUt.js → index-DbEdBB4g.js} +1 -1
  169. package/dist/{index-CpKDWWKi.mjs → index-DcdkXz6X.mjs} +1 -1
  170. package/dist/{index-BxEPU3MQ.js → index-De5O8TTv.js} +1 -1
  171. package/dist/{index-DdLKvTDG.mjs → index-Dkbt5eC7.mjs} +1 -1
  172. package/dist/{index-P0EehP7M.js → index-DlTqC-_K.js} +1 -1
  173. package/dist/{index-BPd2T1ar.js → index-Dw6964Th.js} +1 -1
  174. package/dist/{index-0MAOALRL.js → index-Dxd3o8vt.js} +1 -1
  175. package/dist/{index-DUXJdTnb.mjs → index-Dz3AspXt.mjs} +1 -1
  176. package/dist/index-Dz3AspXt.mjs.gz +0 -0
  177. package/dist/{index-DLxAjCFt.js → index-Dz3dNGo7.js} +1 -1
  178. package/dist/index-DzNK4FNv.mjs +4 -0
  179. package/dist/{index-B2Af59vH.js → index-IfLdRvGK.js} +1 -1
  180. package/dist/{index-UgHhaKUj.js → index-QhUGwPEo.js} +5 -5
  181. package/dist/{index-UgHhaKUj.js.gz → index-QhUGwPEo.js.gz} +0 -0
  182. package/dist/{index-B8NC9Gkd.mjs → index-RDhhe26z.mjs} +1 -1
  183. package/dist/{index-D2k34L6z.js → index-S0ZtD6Fs.js} +1 -1
  184. package/dist/{index-VMGKrFd-.js → index-Utepvz9B.js} +1 -1
  185. package/dist/{index-D255lLv-.mjs → index-dzWxDNM2.mjs} +1 -1
  186. package/dist/{index-CBauZXJ5.js → index-egBDTT89.js} +1 -1
  187. package/dist/{index-DYfj6Jrh.js → index-fnGmSMeU.js} +1 -1
  188. package/dist/{index-425QyuEF.js → index-h0F6XTJx.js} +1 -1
  189. package/dist/{index-XiZ4Wtrp.mjs → index-hg7Ff8aZ.mjs} +1 -1
  190. package/dist/{index-CXQefxl9.mjs → index-is2PebnR.mjs} +2 -2
  191. package/dist/{index-DfSS7vje.js → index-jv0mcS6e.js} +1 -1
  192. package/dist/{index-B0nVASUy.js → index-pF3nxVMq.js} +1 -1
  193. package/dist/{index-ESGY_-G1.js → index-vB-N5Fky.js} +1 -1
  194. package/dist/index.js +1 -1
  195. package/dist/index.mjs +59 -59
  196. package/dist/{index.vue_vue_type_script_setup_true_lang-B6x6wQre.js → index.vue_vue_type_script_setup_true_lang-BjLYJfUz.js} +1 -1
  197. package/dist/{index.vue_vue_type_script_setup_true_lang-DGvDeXbn.mjs → index.vue_vue_type_script_setup_true_lang-BsaTOA91.mjs} +1 -1
  198. package/dist/index.vue_vue_type_script_setup_true_lang-BsaTOA91.mjs.gz +0 -0
  199. package/dist/{index.vue_vue_type_script_setup_true_lang-CtreXlrw.mjs → index.vue_vue_type_script_setup_true_lang-CgK5cfIB.mjs} +1 -1
  200. package/dist/{index.vue_vue_type_script_setup_true_lang-_RuhuRU6.js → index.vue_vue_type_script_setup_true_lang-Cpuuj3Np.js} +1 -1
  201. package/dist/{index.vue_vue_type_script_setup_true_lang-DFZ01jD7.js → index.vue_vue_type_script_setup_true_lang-Dbg-A_q8.js} +1 -1
  202. package/dist/{index.vue_vue_type_script_setup_true_lang-CdSEbsk5.js → index.vue_vue_type_script_setup_true_lang-DvR2kwDx.js} +1 -1
  203. package/dist/{index.vue_vue_type_script_setup_true_lang-B5b3ejWF.mjs → index.vue_vue_type_script_setup_true_lang-Ms4uvSEY.mjs} +4 -4
  204. package/dist/{index.vue_vue_type_script_setup_true_lang-D-AN5KfS.mjs → index.vue_vue_type_script_setup_true_lang-q75XtUR9.mjs} +1 -1
  205. package/dist/{link-DkreOVdl.js → link-CacRMrfr.js} +1 -1
  206. package/dist/{link-3NniFpex.mjs → link-Dz1kKLN6.mjs} +1 -1
  207. package/dist/{list-C2BGInHK.js → list-BbWRw7IU.js} +1 -1
  208. package/dist/{list-Kl1xXjC9.mjs → list-CuBj4gtu.mjs} +1 -1
  209. package/dist/{main-D6byOv3A.js → main-BJAbPZv2.js} +1 -1
  210. package/dist/{main-BG9extUk.mjs → main-BTQTR3GO.mjs} +3 -3
  211. package/dist/{mobile-D9kLAOnN.mjs → mobile-CZepZCO3.mjs} +1 -1
  212. package/dist/{mobile-WAUfy6xs.js → mobile-ROg5DKxY.js} +1 -1
  213. package/dist/{parent-BuGEIafw.mjs → parent-BNwm2yGJ.mjs} +2 -2
  214. package/dist/{parent-Ccm8yT66.js → parent-ZFb17O1O.js} +1 -1
  215. package/dist/{popup-DBVsfuZN.mjs → popup-Bdlx1lHO.mjs} +1 -1
  216. package/dist/{popup-DfXTWUOB.js → popup-CAElBr2t.js} +1 -1
  217. package/dist/{popup.vue_vue_type_script_setup_true_name_editorPopup_lang-CUunsX1f.js → popup.vue_vue_type_script_setup_true_name_editorPopup_lang-C4sBs-K4.js} +1 -1
  218. package/dist/{popup.vue_vue_type_script_setup_true_name_editorPopup_lang-BnWjoMve.mjs → popup.vue_vue_type_script_setup_true_name_editorPopup_lang-CtWaCTyR.mjs} +1 -1
  219. package/dist/{replaceRules-DIR6dXEC.js → replaceRules-B-L9moMs.js} +1 -1
  220. package/dist/{replaceRules-DcRdJdPC.mjs → replaceRules-DVbKcvS_.mjs} +1 -1
  221. package/dist/{roleItem-Dr1nk21X.mjs → roleItem-B11Kkyc3.mjs} +1 -1
  222. package/dist/{roleItem-C3LjB9Kj.js → roleItem-C2ZFVRE_.js} +1 -1
  223. package/dist/{saveForm-CFMsrN3J.mjs → saveForm-ChSIkw9S.mjs} +5 -5
  224. package/dist/saveForm-DQhB6mJO.js +1 -0
  225. package/dist/{scan-Bs8pXWfq.mjs → scan-Dol7Tssy.mjs} +1 -1
  226. package/dist/scan-Dol7Tssy.mjs.gz +0 -0
  227. package/dist/{scan--v7fmWHT.js → scan-gnpRzEfQ.js} +1 -1
  228. package/dist/scan-gnpRzEfQ.js.gz +0 -0
  229. package/dist/{search-eP8AAD9i.js → search-0BqVBtcK.js} +1 -1
  230. package/dist/{search-CSudu9n7.mjs → search-Cz1Ay3p1.mjs} +1 -1
  231. package/dist/{selectConfig-CoVFqaG7.mjs → selectConfig-BAnZ7pot.mjs} +1 -1
  232. package/dist/selectConfig-BAnZ7pot.mjs.gz +0 -0
  233. package/dist/{selectConfig-CxBC5wr3.js → selectConfig-Dly2wY_R.js} +1 -1
  234. package/dist/style.css +1 -1
  235. package/dist/style.css.gz +0 -0
  236. package/dist/{subItem-Dvp1hy84.js → subItem-C0ceTu_5.js} +1 -1
  237. package/dist/{subItem-DJAap9v_.mjs → subItem-iWoGYdru.mjs} +1 -1
  238. package/dist/{tagsView-qyF3ouxo.mjs → tagsView-BtR_mW8D.mjs} +2 -2
  239. package/dist/tagsView-BtR_mW8D.mjs.gz +0 -0
  240. package/dist/{tagsView-D4LAiqpB.js → tagsView-L4Kk1gPR.js} +2 -2
  241. package/dist/tagsView-L4Kk1gPR.js.gz +0 -0
  242. package/dist/{transverse-OA3Txjjz.mjs → transverse-CAHQ_sAH.mjs} +3 -3
  243. package/dist/{transverse-vLM6h46E.js → transverse-CDE2H6oV.js} +1 -1
  244. package/dist/types/components/business/bcTable/utils/type.d.ts +19 -2
  245. package/dist/types/components/business/bcTable/utils/useTable.d.ts +5 -2
  246. package/dist/types/utils/download.d.ts +11 -3
  247. package/dist/types/utils/storage.d.ts +8 -2
  248. package/dist/{uploadAvatar-CNjHIRn7.mjs → uploadAvatar-CPV2AjBU.mjs} +1 -1
  249. package/dist/uploadAvatar-CPV2AjBU.mjs.gz +0 -0
  250. package/dist/{uploadAvatar-DarhlCjN.js → uploadAvatar-_wUajUdO.js} +1 -1
  251. package/dist/uploadAvatar-_wUajUdO.js.gz +0 -0
  252. package/dist/{useSaveForm-ish-CkqC.mjs → useSaveForm-C7nNkxSA.mjs} +194 -162
  253. package/dist/useSaveForm-C7nNkxSA.mjs.gz +0 -0
  254. package/dist/useSaveForm-UlwEhWjA.js +1 -0
  255. package/dist/useSaveForm-UlwEhWjA.js.gz +0 -0
  256. package/dist/{user-DnHrmjbr.js → user-BxEQHQTA.js} +1 -1
  257. package/dist/{user-B4Iv1wPL.mjs → user-CXhrbcsH.mjs} +4 -4
  258. package/dist/user-CXhrbcsH.mjs.gz +0 -0
  259. package/dist/{userNews-BrTvr8Ct.mjs → userNews-CsYwLI1G.mjs} +1 -1
  260. package/dist/{userNews-BqnV3HfE.js → userNews-D3fUDwqT.js} +1 -1
  261. package/dist/{userSelect--cWl_sVP.mjs → userSelect-Cuzt5Drp.mjs} +1 -1
  262. package/dist/{userSelect-7ZClEHfN.js → userSelect-Dz1YYg_B.js} +1 -1
  263. package/dist/{userSelect.vue_vue_type_script_setup_true_lang-IjP4G-2z.js → userSelect.vue_vue_type_script_setup_true_lang-Bi4EQ0pH.js} +1 -1
  264. package/dist/{userSelect.vue_vue_type_script_setup_true_lang-BELR4lXN.mjs → userSelect.vue_vue_type_script_setup_true_lang-Bq0DXoSv.mjs} +1 -1
  265. package/dist/{vertical-CL4bSmFu.js → vertical-CfpR8JnI.js} +1 -1
  266. package/dist/{vertical--9NawynL.mjs → vertical-zM1FU0i3.mjs} +2 -2
  267. package/package.json +1 -1
  268. package/dist/account-C-DV8Mx6.js.gz +0 -0
  269. package/dist/account-bqFDKumj.mjs.gz +0 -0
  270. package/dist/btnIndex-DV89yeVB.mjs.gz +0 -0
  271. package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-B9yYMoCl.mjs.gz +0 -0
  272. package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-BaXz07HH.js.gz +0 -0
  273. package/dist/formConfig-BE7jjbgI.mjs.gz +0 -0
  274. package/dist/formConfig-Cy2EBlaq.js +0 -1
  275. package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-p1ZTjUK2.mjs.gz +0 -0
  276. package/dist/hsBtnConfigList-opLCTwmZ.js +0 -1
  277. package/dist/hsFormConfigList-Cj6JmCRg.mjs.gz +0 -0
  278. package/dist/hsFormConfigList-RDLUqHFM.js +0 -1
  279. package/dist/hsFormPanel-BWDujyeu.js +0 -1
  280. package/dist/hsFormPanel-cONTsW7b.mjs.gz +0 -0
  281. package/dist/index copy-BKNgM0Ek.mjs.gz +0 -0
  282. package/dist/index copy-BQ67zqfl.js.gz +0 -0
  283. package/dist/index-B4S6qinT.mjs.gz +0 -0
  284. package/dist/index-CIq8eH9j.mjs +0 -4
  285. package/dist/index-CK6Qsaoi.mjs.gz +0 -0
  286. package/dist/index-CdmL54dR.mjs.gz +0 -0
  287. package/dist/index-D0YgVMBn.js.gz +0 -0
  288. package/dist/index-DUXJdTnb.mjs.gz +0 -0
  289. package/dist/index-DYIOBXbw.mjs.gz +0 -0
  290. package/dist/index-DdgMr3re.js.gz +0 -0
  291. package/dist/index-Uns2uNjk.js.gz +0 -0
  292. package/dist/index.vue_vue_type_script_setup_true_lang-DGvDeXbn.mjs.gz +0 -0
  293. package/dist/saveForm-BJ3q9eHJ.js +0 -1
  294. package/dist/scan--v7fmWHT.js.gz +0 -0
  295. package/dist/scan-Bs8pXWfq.mjs.gz +0 -0
  296. package/dist/selectConfig-CoVFqaG7.mjs.gz +0 -0
  297. package/dist/tagsView-D4LAiqpB.js.gz +0 -0
  298. package/dist/tagsView-qyF3ouxo.mjs.gz +0 -0
  299. package/dist/uploadAvatar-CNjHIRn7.mjs.gz +0 -0
  300. package/dist/uploadAvatar-DarhlCjN.js.gz +0 -0
  301. package/dist/useSaveForm-BMNy1iTK.js +0 -1
  302. package/dist/useSaveForm-BMNy1iTK.js.gz +0 -0
  303. package/dist/useSaveForm-ish-CkqC.mjs.gz +0 -0
  304. package/dist/user-B4Iv1wPL.mjs.gz +0 -0
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),e=require("./uploadAvatar.vue_vue_type_style_index_0_scoped_99513ec9_lang-B-YXXUWn.js"),i=require("./index-UgHhaKUj.js"),s={data:function(){return{w:0,h:0,scale:1,x:0,y:0,loading:!0,trueWidth:0,trueHeight:0,move:!0,moveX:0,moveY:0,crop:!1,cropping:!1,cropW:0,cropH:0,cropOldW:0,cropOldH:0,canChangeX:!1,canChangeY:!1,changeCropTypeX:1,changeCropTypeY:1,cropX:0,cropY:0,cropChangeX:0,cropChangeY:0,cropOffsertX:0,cropOffsertY:0,support:"",touches:[],touchNow:!1,rotate:0,isIos:!1,orientation:0,imgs:"",coe:.2,scaling:!1,scalingSet:"",coeStatus:"",isCanShow:!0}},props:{img:{type:[String,Blob,null,File],default:""},outputSize:{type:Number,default:1},outputType:{type:String,default:"jpeg"},info:{type:Boolean,default:!0},canScale:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!1},autoCropWidth:{type:[Number,String],default:0},autoCropHeight:{type:[Number,String],default:0},fixed:{type:Boolean,default:!1},fixedNumber:{type:Array,default:()=>[1,1]},fixedBox:{type:Boolean,default:!1},full:{type:Boolean,default:!1},canMove:{type:Boolean,default:!0},canMoveBox:{type:Boolean,default:!0},original:{type:Boolean,default:!1},centerBox:{type:Boolean,default:!1},high:{type:Boolean,default:!0},infoTrue:{type:Boolean,default:!1},maxImgSize:{type:[Number,String],default:2e3},enlarge:{type:[Number,String],default:1},preW:{type:[Number,String],default:0},mode:{type:String,default:"contain"},limitMinSize:{type:[Number,Array,String],default:()=>10,validator:function(t){return Array.isArray(t)?Number(t[0])>=0&&Number(t[1])>=0:Number(t)>=0}},fillColor:{type:String,default:""}},computed:{cropInfo(){let t={};if(t.top=this.cropOffsertY>21?"-21px":"0px",t.width=this.cropW>0?this.cropW:0,t.height=this.cropH>0?this.cropH:0,this.infoTrue){let e=1;this.high&&!this.full&&(e=window.devicePixelRatio),1!==this.enlarge&!this.full&&(e=Math.abs(Number(this.enlarge))),t.width=t.width*e,t.height=t.height*e,this.full&&(t.width=t.width/this.scale,t.height=t.height/this.scale)}return t.width=t.width.toFixed(0),t.height=t.height.toFixed(0),t},isIE:()=>!!window.ActiveXObject||"ActiveXObject"in window,passive(){return this.isIE?null:{passive:!1}}},watch:{img(){this.checkedImg()},imgs(t){""!==t&&this.reload()},cropW(){this.showPreview()},cropH(){this.showPreview()},cropOffsertX(){this.showPreview()},cropOffsertY(){this.showPreview()},scale(t,e){this.showPreview()},x(){this.showPreview()},y(){this.showPreview()},autoCrop(t){t&&this.goAutoCrop()},autoCropWidth(){this.autoCrop&&this.goAutoCrop()},autoCropHeight(){this.autoCrop&&this.goAutoCrop()},mode(){this.checkedImg()},rotate(){this.showPreview(),(this.autoCrop||this.cropW>0||this.cropH>0)&&this.goAutoCrop(this.cropW,this.cropH)}},methods:{getVersion(t){var e=navigator.userAgent.split(" "),i="";let s=0;const o=new RegExp(t,"i");for(var h=0;h<e.length;h++)o.test(e[h])&&(i=e[h]);return s=i?i.split("/")[1].split("."):["0","0","0"],s},checkOrientationImage(t,e,i,s){if(this.getVersion("chrome")[0]>=81)e=-1;else if(this.getVersion("safari")[0]>=605){const t=this.getVersion("version");t[0]>13&&t[1]>1&&(e=-1)}else{const t=navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/);if(t){let i=t[1];i=i.split("_"),(i[0]>13||i[0]>=13&&i[1]>=4)&&(e=-1)}}let o=document.createElement("canvas"),h=o.getContext("2d");switch(h.save(),e){case 2:o.width=i,o.height=s,h.translate(i,0),h.scale(-1,1);break;case 3:o.width=i,o.height=s,h.translate(i/2,s/2),h.rotate(180*Math.PI/180),h.translate(-i/2,-s/2);break;case 4:o.width=i,o.height=s,h.translate(0,s),h.scale(1,-1);break;case 5:o.height=i,o.width=s,h.rotate(.5*Math.PI),h.scale(1,-1);break;case 6:o.width=s,o.height=i,h.translate(s/2,i/2),h.rotate(90*Math.PI/180),h.translate(-i/2,-s/2);break;case 7:o.height=i,o.width=s,h.rotate(.5*Math.PI),h.translate(i,-s),h.scale(-1,1);break;case 8:o.height=i,o.width=s,h.translate(s/2,i/2),h.rotate(-90*Math.PI/180),h.translate(-i/2,-s/2);break;default:o.width=i,o.height=s}h.drawImage(t,0,0,i,s),h.restore(),o.toBlob((t=>{let e=URL.createObjectURL(t);URL.revokeObjectURL(this.imgs),this.imgs=e}),"image/"+this.outputType,1)},checkedImg(){if(null===this.img||""===this.img)return this.imgs="",void this.clearCrop();this.loading=!0,this.scale=1,this.rotate=0,this.clearCrop();let t=new Image;if(t.onload=()=>{if(""===this.img)return this.$emit("imgLoad","error"),this.$emit("img-load","error"),this.$emit("img-load",new Error("图片不能为空")),!1;let i=t.width,s=t.height;e.Exif.getData(t).then((e=>{this.orientation=e.orientation||1;let o=Number(this.maxImgSize);!this.orientation&&i<o&s<o?this.imgs=this.img:(i>o&&(s=s/i*o,i=o),s>o&&(i=i/s*o,s=o),this.checkOrientationImage(t,this.orientation,i,s))})).catch((t=>{this.$emit("img-load","error"),this.$emit("img-load-error",t)}))},t.onerror=()=>{this.$emit("imgLoad","error"),this.$emit("img-load","error"),this.$emit("img-load-error",error)},"data"!==this.img.substr(0,4)&&(t.crossOrigin=""),this.isIE){var i=new XMLHttpRequest;i.onload=function(){var e=URL.createObjectURL(this.response);t.src=e},i.open("GET",this.img,!0),i.responseType="blob",i.send()}else t.src=this.img},startMove(t){if(t.preventDefault(),this.move&&!this.crop){if(!this.canMove)return!1;this.moveX=("clientX"in t?t.clientX:t.touches[0].clientX)-this.x,this.moveY=("clientY"in t?t.clientY:t.touches[0].clientY)-this.y,t.touches?(window.addEventListener("touchmove",this.moveImg),window.addEventListener("touchend",this.leaveImg),2==t.touches.length&&(this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale))):(window.addEventListener("mousemove",this.moveImg),window.addEventListener("mouseup",this.leaveImg)),this.$emit("imgMoving",{moving:!0,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})}else this.cropping=!0,window.addEventListener("mousemove",this.createCrop),window.addEventListener("mouseup",this.endCrop),window.addEventListener("touchmove",this.createCrop),window.addEventListener("touchend",this.endCrop),this.cropOffsertX=t.offsetX?t.offsetX:t.touches[0].pageX-this.$refs.cropper.offsetLeft,this.cropOffsertY=t.offsetY?t.offsetY:t.touches[0].pageY-this.$refs.cropper.offsetTop,this.cropX="clientX"in t?t.clientX:t.touches[0].clientX,this.cropY="clientY"in t?t.clientY:t.touches[0].clientY,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.cropW=0,this.cropH=0},touchScale(t){t.preventDefault();let e=this.scale;var i=this.touches[0].clientX,s=this.touches[0].clientY,o=t.touches[0].clientX,h=t.touches[0].clientY,r=this.touches[1].clientX,a=this.touches[1].clientY,c=t.touches[1].clientX,n=t.touches[1].clientY,p=Math.sqrt(Math.pow(i-r,2)+Math.pow(s-a,2)),l=Math.sqrt(Math.pow(o-c,2)+Math.pow(h-n,2))-p,d=1,u=(d=(d=d/this.trueWidth>d/this.trueHeight?d/this.trueHeight:d/this.trueWidth)>.1?.1:d)*l;if(!this.touchNow){if(this.touchNow=!0,l>0?e+=Math.abs(u):l<0&&e>Math.abs(u)&&(e-=Math.abs(u)),this.touches=t.touches,setTimeout((()=>{this.touchNow=!1}),8),!this.checkoutImgAxis(this.x,this.y,e))return!1;this.scale=e}},cancelTouchScale(t){window.removeEventListener("touchmove",this.touchScale)},moveImg(t){if(t.preventDefault(),t.touches&&2===t.touches.length)return this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale),window.removeEventListener("touchmove",this.moveImg),!1;let e,i,s="clientX"in t?t.clientX:t.touches[0].clientX,o="clientY"in t?t.clientY:t.touches[0].clientY;e=s-this.moveX,i=o-this.moveY,this.$nextTick((()=>{if(this.centerBox){let t,s,o,h,r=this.getImgAxis(e,i,this.scale),a=this.getCropAxis(),c=this.trueHeight*this.scale,n=this.trueWidth*this.scale;switch(this.rotate){case 1:case-1:case 3:case-3:t=this.cropOffsertX-this.trueWidth*(1-this.scale)/2+(c-n)/2,s=this.cropOffsertY-this.trueHeight*(1-this.scale)/2+(n-c)/2,o=t-c+this.cropW,h=s-n+this.cropH;break;default:t=this.cropOffsertX-this.trueWidth*(1-this.scale)/2,s=this.cropOffsertY-this.trueHeight*(1-this.scale)/2,o=t-n+this.cropW,h=s-c+this.cropH}r.x1>=a.x1&&(e=t),r.y1>=a.y1&&(i=s),r.x2<=a.x2&&(e=o),r.y2<=a.y2&&(i=h)}this.x=e,this.y=i,this.$emit("imgMoving",{moving:!0,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})}))},leaveImg(t){window.removeEventListener("mousemove",this.moveImg),window.removeEventListener("touchmove",this.moveImg),window.removeEventListener("mouseup",this.leaveImg),window.removeEventListener("touchend",this.leaveImg),this.$emit("imgMoving",{moving:!1,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!1,axis:this.getImgAxis()})},scaleImg(){this.canScale&&window.addEventListener(this.support,this.changeSize,this.passive)},cancelScale(){this.canScale&&window.removeEventListener(this.support,this.changeSize)},changeSize(t){t.preventDefault();let e=this.scale;var i=t.deltaY||t.wheelDelta;i=navigator.userAgent.indexOf("Firefox")>0?30*i:i,this.isIE&&(i=-i);var s=this.coe,o=(s=s/this.trueWidth>s/this.trueHeight?s/this.trueHeight:s/this.trueWidth)*i;o<0?e+=Math.abs(o):e>Math.abs(o)&&(e-=Math.abs(o));let h=o<0?"add":"reduce";if(h!==this.coeStatus&&(this.coeStatus=h,this.coe=.2),this.scaling||(this.scalingSet=setTimeout((()=>{this.scaling=!1,this.coe=this.coe+=.01}),50)),this.scaling=!0,!this.checkoutImgAxis(this.x,this.y,e))return!1;this.scale=e},changeScale(t){let e=this.scale;t=t||1;var i=20;if((t*=i=i/this.trueWidth>i/this.trueHeight?i/this.trueHeight:i/this.trueWidth)>0?e+=Math.abs(t):e>Math.abs(t)&&(e-=Math.abs(t)),!this.checkoutImgAxis(this.x,this.y,e))return!1;this.scale=e},createCrop(t){t.preventDefault();var e="clientX"in t?t.clientX:t.touches?t.touches[0].clientX:0,i="clientY"in t?t.clientY:t.touches?t.touches[0].clientY:0;this.$nextTick((()=>{var t=e-this.cropX,s=i-this.cropY;if(t>0?(this.cropW=t+this.cropChangeX>this.w?this.w-this.cropChangeX:t,this.cropOffsertX=this.cropChangeX):(this.cropW=this.w-this.cropChangeX+Math.abs(t)>this.w?this.cropChangeX:Math.abs(t),this.cropOffsertX=this.cropChangeX+t>0?this.cropChangeX+t:0),this.fixed){var o=this.cropW/this.fixedNumber[0]*this.fixedNumber[1];o+this.cropOffsertY>this.h?(this.cropH=this.h-this.cropOffsertY,this.cropW=this.cropH/this.fixedNumber[1]*this.fixedNumber[0],this.cropOffsertX=t>0?this.cropChangeX:this.cropChangeX-this.cropW):this.cropH=o,this.cropOffsertY=this.cropOffsertY}else s>0?(this.cropH=s+this.cropChangeY>this.h?this.h-this.cropChangeY:s,this.cropOffsertY=this.cropChangeY):(this.cropH=this.h-this.cropChangeY+Math.abs(s)>this.h?this.cropChangeY:Math.abs(s),this.cropOffsertY=this.cropChangeY+s>0?this.cropChangeY+s:0)}))},changeCropSize(t,e,i,s,o){t.preventDefault(),window.addEventListener("mousemove",this.changeCropNow),window.addEventListener("mouseup",this.changeCropEnd),window.addEventListener("touchmove",this.changeCropNow),window.addEventListener("touchend",this.changeCropEnd),this.canChangeX=e,this.canChangeY=i,this.changeCropTypeX=s,this.changeCropTypeY=o,this.cropX="clientX"in t?t.clientX:t.touches[0].clientX,this.cropY="clientY"in t?t.clientY:t.touches[0].clientY,this.cropOldW=this.cropW,this.cropOldH=this.cropH,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.fixed&&this.canChangeX&&this.canChangeY&&(this.canChangeY=0),this.$emit("changeCropSize",{width:this.cropW,height:this.cropH}),this.$emit("change-crop-size",{width:this.cropW,height:this.cropH})},changeCropNow(t){t.preventDefault();var e="clientX"in t?t.clientX:t.touches?t.touches[0].clientX:0,i="clientY"in t?t.clientY:t.touches?t.touches[0].clientY:0;let s=this.w,o=this.h,h=0,r=0;if(this.centerBox){let t=this.getImgAxis(),e=t.x2,i=t.y2;h=t.x1>0?t.x1:0,r=t.y1>0?t.y1:0,s>e&&(s=e),o>i&&(o=i)}const[a,c]=this.checkCropLimitSize();this.$nextTick((()=>{var t=e-this.cropX,n=i-this.cropY;if(this.canChangeX&&(1===this.changeCropTypeX?this.cropOldW-t<a?(this.cropW=a,this.cropOffsertX=this.cropOldW+this.cropChangeX-h-a):this.cropOldW-t>0?(this.cropW=s-this.cropChangeX-t<=s-h?this.cropOldW-t:this.cropOldW+this.cropChangeX-h,this.cropOffsertX=s-this.cropChangeX-t<=s-h?this.cropChangeX+t:h):(this.cropW=Math.abs(t)+this.cropChangeX<=s?Math.abs(t)-this.cropOldW:s-this.cropOldW-this.cropChangeX,this.cropOffsertX=this.cropChangeX+this.cropOldW):2===this.changeCropTypeX&&(this.cropOldW+t<a?this.cropW=a:this.cropOldW+t>0?(this.cropW=this.cropOldW+t+this.cropOffsertX<=s?this.cropOldW+t:s-this.cropOffsertX,this.cropOffsertX=this.cropChangeX):(this.cropW=s-this.cropChangeX+Math.abs(t+this.cropOldW)<=s-h?Math.abs(t+this.cropOldW):this.cropChangeX-h,this.cropOffsertX=s-this.cropChangeX+Math.abs(t+this.cropOldW)<=s-h?this.cropChangeX-Math.abs(t+this.cropOldW):h))),this.canChangeY&&(1===this.changeCropTypeY?this.cropOldH-n<c?(this.cropH=c,this.cropOffsertY=this.cropOldH+this.cropChangeY-r-c):this.cropOldH-n>0?(this.cropH=o-this.cropChangeY-n<=o-r?this.cropOldH-n:this.cropOldH+this.cropChangeY-r,this.cropOffsertY=o-this.cropChangeY-n<=o-r?this.cropChangeY+n:r):(this.cropH=Math.abs(n)+this.cropChangeY<=o?Math.abs(n)-this.cropOldH:o-this.cropOldH-this.cropChangeY,this.cropOffsertY=this.cropChangeY+this.cropOldH):2===this.changeCropTypeY&&(this.cropOldH+n<c?this.cropH=c:this.cropOldH+n>0?(this.cropH=this.cropOldH+n+this.cropOffsertY<=o?this.cropOldH+n:o-this.cropOffsertY,this.cropOffsertY=this.cropChangeY):(this.cropH=o-this.cropChangeY+Math.abs(n+this.cropOldH)<=o-r?Math.abs(n+this.cropOldH):this.cropChangeY-r,this.cropOffsertY=o-this.cropChangeY+Math.abs(n+this.cropOldH)<=o-r?this.cropChangeY-Math.abs(n+this.cropOldH):r))),this.canChangeX&&this.fixed){var p=this.cropW/this.fixedNumber[0]*this.fixedNumber[1];p<c?(this.cropH=c,this.cropW=this.fixedNumber[0]*c/this.fixedNumber[1],1===this.changeCropTypeX&&(this.cropOffsertX=this.cropChangeX+(this.cropOldW-this.cropW))):p+this.cropOffsertY>o?(this.cropH=o-this.cropOffsertY,this.cropW=this.cropH/this.fixedNumber[1]*this.fixedNumber[0],1===this.changeCropTypeX&&(this.cropOffsertX=this.cropChangeX+(this.cropOldW-this.cropW))):this.cropH=p}if(this.canChangeY&&this.fixed){var l=this.cropH/this.fixedNumber[1]*this.fixedNumber[0];l<a?(this.cropW=a,this.cropH=this.fixedNumber[1]*a/this.fixedNumber[0]):l+this.cropOffsertX>s?(this.cropW=s-this.cropOffsertX,this.cropH=this.cropW/this.fixedNumber[0]*this.fixedNumber[1]):this.cropW=l}this.$emit("cropSizing",{cropW:this.cropW,cropH:this.cropH}),this.$emit("crop-sizing",{cropW:this.cropW,cropH:this.cropH})}))},checkCropLimitSize(){let{cropW:t,cropH:e,limitMinSize:i}=this,s=new Array;return s=Array.isArray(i)?i:[i,i],t=parseFloat(s[0]),e=parseFloat(s[1]),[t,e]},changeCropEnd(t){window.removeEventListener("mousemove",this.changeCropNow),window.removeEventListener("mouseup",this.changeCropEnd),window.removeEventListener("touchmove",this.changeCropNow),window.removeEventListener("touchend",this.changeCropEnd)},calculateSize(t,e,i,s,o,h){const r=t/e;let a=o,c=h;return a<i&&(a=i,c=Math.ceil(a/r)),c<s&&(c=s,a=Math.ceil(c*r),a<i&&(a=i,c=Math.ceil(a/r))),a<o&&(a=o,c=Math.ceil(a/r)),c<h&&(c=h,a=Math.ceil(c*r)),{width:a,height:c}},endCrop(){0===this.cropW&&0===this.cropH&&(this.cropping=!1);let[t,e]=this.checkCropLimitSize();const{width:i,height:s}=this.fixed?this.calculateSize(this.fixedNumber[0],this.fixedNumber[1],t,e,this.cropW,this.cropH):{width:t,height:e};i>this.cropW&&(this.cropW=i,this.cropOffsertX+i>this.w&&(this.cropOffsertX=this.w-i)),s>this.cropH&&(this.cropH=s,this.cropOffsertY+s>this.h&&(this.cropOffsertY=this.h-s)),window.removeEventListener("mousemove",this.createCrop),window.removeEventListener("mouseup",this.endCrop),window.removeEventListener("touchmove",this.createCrop),window.removeEventListener("touchend",this.endCrop)},startCrop(){this.crop=!0},stopCrop(){this.crop=!1},clearCrop(){this.cropping=!1,this.cropW=0,this.cropH=0},cropMove(t){if(t.preventDefault(),!this.canMoveBox)return this.crop=!1,this.startMove(t),!1;if(t.touches&&2===t.touches.length)return this.crop=!1,this.startMove(t),this.leaveCrop(),!1;window.addEventListener("mousemove",this.moveCrop),window.addEventListener("mouseup",this.leaveCrop),window.addEventListener("touchmove",this.moveCrop),window.addEventListener("touchend",this.leaveCrop);let e,i,s="clientX"in t?t.clientX:t.touches[0].clientX,o="clientY"in t?t.clientY:t.touches[0].clientY;e=s-this.cropOffsertX,i=o-this.cropOffsertY,this.cropX=e,this.cropY=i,this.$emit("cropMoving",{moving:!0,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})},moveCrop(t,e){let i=0,s=0;t&&(t.preventDefault(),i="clientX"in t?t.clientX:t.touches[0].clientX,s="clientY"in t?t.clientY:t.touches[0].clientY),this.$nextTick((()=>{let t,o,h=i-this.cropX,r=s-this.cropY;if(e&&(h=this.cropOffsertX,r=this.cropOffsertY),t=h<=0?0:h+this.cropW>this.w?this.w-this.cropW:h,o=r<=0?0:r+this.cropH>this.h?this.h-this.cropH:r,this.centerBox){let e=this.getImgAxis();t<=e.x1&&(t=e.x1),t+this.cropW>e.x2&&(t=e.x2-this.cropW),o<=e.y1&&(o=e.y1),o+this.cropH>e.y2&&(o=e.y2-this.cropH)}this.cropOffsertX=t,this.cropOffsertY=o,this.$emit("cropMoving",{moving:!0,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})}))},getImgAxis(t,e,i){t=t||this.x,e=e||this.y,i=i||this.scale;let s={x1:0,x2:0,y1:0,y2:0},o=this.trueWidth*i,h=this.trueHeight*i;switch(this.rotate){case 0:s.x1=t+this.trueWidth*(1-i)/2,s.x2=s.x1+this.trueWidth*i,s.y1=e+this.trueHeight*(1-i)/2,s.y2=s.y1+this.trueHeight*i;break;case 1:case-1:case 3:case-3:s.x1=t+this.trueWidth*(1-i)/2+(o-h)/2,s.x2=s.x1+this.trueHeight*i,s.y1=e+this.trueHeight*(1-i)/2+(h-o)/2,s.y2=s.y1+this.trueWidth*i;break;default:s.x1=t+this.trueWidth*(1-i)/2,s.x2=s.x1+this.trueWidth*i,s.y1=e+this.trueHeight*(1-i)/2,s.y2=s.y1+this.trueHeight*i}return s},getCropAxis(){let t={x1:0,x2:0,y1:0,y2:0};return t.x1=this.cropOffsertX,t.x2=t.x1+this.cropW,t.y1=this.cropOffsertY,t.y2=t.y1+this.cropH,t},leaveCrop(t){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.$emit("cropMoving",{moving:!1,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!1,axis:this.getCropAxis()})},getCropChecked(t){let e=document.createElement("canvas"),i=new Image,s=this.rotate,o=this.trueWidth,h=this.trueHeight,r=this.cropOffsertX,a=this.cropOffsertY;function c(t,i){e.width=Math.round(t),e.height=Math.round(i)}i.onload=()=>{if(0!==this.cropW){let t=e.getContext("2d"),n=1;this.high&!this.full&&(n=window.devicePixelRatio),1!==this.enlarge&!this.full&&(n=Math.abs(Number(this.enlarge)));let p=this.cropW*n,l=this.cropH*n,d=o*this.scale*n,u=h*this.scale*n,g=(this.x-r+this.trueWidth*(1-this.scale)/2)*n,m=(this.y-a+this.trueHeight*(1-this.scale)/2)*n;switch(c(p,l),t.save(),this.fillColor&&(t.fillStyle=this.fillColor,t.fillRect(0,0,e.width,e.height)),s){case 0:this.full?(c(p/this.scale,l/this.scale),t.drawImage(i,g/this.scale,m/this.scale,d/this.scale,u/this.scale)):t.drawImage(i,g,m,d,u);break;case 1:case-3:this.full?(c(p/this.scale,l/this.scale),g=g/this.scale+(d/this.scale-u/this.scale)/2,m=m/this.scale+(u/this.scale-d/this.scale)/2,t.rotate(90*s*Math.PI/180),t.drawImage(i,m,-g-u/this.scale,d/this.scale,u/this.scale)):(g+=(d-u)/2,m+=(u-d)/2,t.rotate(90*s*Math.PI/180),t.drawImage(i,m,-g-u,d,u));break;case 2:case-2:this.full?(c(p/this.scale,l/this.scale),t.rotate(90*s*Math.PI/180),g/=this.scale,m/=this.scale,t.drawImage(i,-g-d/this.scale,-m-u/this.scale,d/this.scale,u/this.scale)):(t.rotate(90*s*Math.PI/180),t.drawImage(i,-g-d,-m-u,d,u));break;case 3:case-1:this.full?(c(p/this.scale,l/this.scale),g=g/this.scale+(d/this.scale-u/this.scale)/2,m=m/this.scale+(u/this.scale-d/this.scale)/2,t.rotate(90*s*Math.PI/180),t.drawImage(i,-m-d/this.scale,g,d/this.scale,u/this.scale)):(g+=(d-u)/2,m+=(u-d)/2,t.rotate(90*s*Math.PI/180),t.drawImage(i,-m-d,g,d,u));break;default:this.full?(c(p/this.scale,l/this.scale),t.drawImage(i,g/this.scale,m/this.scale,d/this.scale,u/this.scale)):t.drawImage(i,g,m,d,u)}t.restore()}else{let t=o*this.scale,r=h*this.scale,a=e.getContext("2d");switch(a.save(),this.fillColor&&(a.fillStyle=this.fillColor,a.fillRect(0,0,e.width,e.height)),s){case 0:c(t,r),a.drawImage(i,0,0,t,r);break;case 1:case-3:c(r,t),a.rotate(90*s*Math.PI/180),a.drawImage(i,0,-r,t,r);break;case 2:case-2:c(t,r),a.rotate(90*s*Math.PI/180),a.drawImage(i,-t,-r,t,r);break;case 3:case-1:c(r,t),a.rotate(90*s*Math.PI/180),a.drawImage(i,-t,0,t,r);break;default:c(t,r),a.drawImage(i,0,0,t,r)}a.restore()}t(e)},"data"!==this.img.substr(0,4)&&(i.crossOrigin="Anonymous"),i.src=this.imgs},getCropData(t){this.getCropChecked((e=>{t(e.toDataURL("image/"+this.outputType,this.outputSize))}))},getCropBlob(t){this.getCropChecked((e=>{e.toBlob((e=>t(e)),"image/"+this.outputType,this.outputSize)}))},showPreview(){if(!this.isCanShow)return!1;this.isCanShow=!1,setTimeout((()=>{this.isCanShow=!0}),16);let t=this.cropW,e=this.cropH,i=this.scale;var s={};s.div={width:`${t}px`,height:`${e}px`};let o=(this.x-this.cropOffsertX)/i,h=(this.y-this.cropOffsertY)/i;s.w=t,s.h=e,s.url=this.imgs,s.img={width:`${this.trueWidth}px`,height:`${this.trueHeight}px`,transform:`scale(${i})translate3d(${o}px, ${h}px, 0px)rotateZ(${90*this.rotate}deg)`},s.html=`\n <div class="show-preview" style="width: ${s.w}px; height: ${s.h}px; overflow: hidden">\n <div style="width: ${t}px; height: ${e}px">\n <img src=${s.url} style="width: ${this.trueWidth}px; height: ${this.trueHeight}px; transform:\n scale(${i})translate3d(${o}px, ${h}px, 0px)rotateZ(${90*this.rotate}deg)">\n </div>\n </div>`,this.$emit("realTime",s),this.$emit("real-time",s)},reload(){let t=new Image;t.onload=()=>{this.w=parseFloat(window.getComputedStyle(this.$refs.cropper).width),this.h=parseFloat(window.getComputedStyle(this.$refs.cropper).height),this.trueWidth=t.width,this.trueHeight=t.height,this.original?this.scale=1:this.scale=this.checkedMode(),this.$nextTick((()=>{this.x=-(this.trueWidth-this.trueWidth*this.scale)/2+(this.w-this.trueWidth*this.scale)/2,this.y=-(this.trueHeight-this.trueHeight*this.scale)/2+(this.h-this.trueHeight*this.scale)/2,this.loading=!1,this.autoCrop&&this.goAutoCrop(),this.$emit("img-load","success"),this.$emit("imgLoad","success"),setTimeout((()=>{this.showPreview()}),20)}))},t.onerror=()=>{this.$emit("imgLoad","error"),this.$emit("img-load","error")},t.src=this.imgs},checkedMode(){let t=1,e=this.trueWidth,i=this.trueHeight;const s=this.mode.split(" ");switch(s[0]){case"contain":this.trueWidth>this.w&&(t=this.w/this.trueWidth),this.trueHeight*t>this.h&&(t=this.h/this.trueHeight);break;case"cover":e=this.w,t=e/this.trueWidth,i*=t,i<this.h&&(i=this.h,t=i/this.trueHeight);break;default:try{let o=s[0];if(-1!==o.search("px")){o=o.replace("px",""),e=parseFloat(o);const h=e/this.trueWidth;let r=1,a=s[1];-1!==a.search("px")&&(a=a.replace("px",""),i=parseFloat(a),r=i/this.trueHeight),t=Math.min(h,r)}if(-1!==o.search("%")&&(o=o.replace("%",""),e=parseFloat(o)/100*this.w,t=e/this.trueWidth),2===s.length&&"auto"===o){let e=s[1];-1!==e.search("px")&&(e=e.replace("px",""),i=parseFloat(e),t=i/this.trueHeight),-1!==e.search("%")&&(e=e.replace("%",""),i=parseFloat(e)/100*this.h,t=i/this.trueHeight)}}catch(o){t=1}}return t},goAutoCrop(t,e){if(""===this.imgs||null===this.imgs)return;this.clearCrop(),this.cropping=!0;let i=this.w,s=this.h;if(this.centerBox){const t=Math.abs(this.rotate)%2>0;let e=(t?this.trueHeight:this.trueWidth)*this.scale,o=(t?this.trueWidth:this.trueHeight)*this.scale;i=e<i?e:i,s=o<s?o:s}var o=t||parseFloat(this.autoCropWidth),h=e||parseFloat(this.autoCropHeight);0!==o&&0!==h||(o=.8*i,h=.8*s),o=o>i?i:o,h=h>s?s:h,this.fixed&&(h=o/this.fixedNumber[0]*this.fixedNumber[1]),h>this.h&&(o=(h=this.h)/this.fixedNumber[1]*this.fixedNumber[0]),this.changeCrop(o,h)},changeCrop(t,e){if(this.centerBox){let i=this.getImgAxis();t>i.x2-i.x1&&(e=(t=i.x2-i.x1)/this.fixedNumber[0]*this.fixedNumber[1]),e>i.y2-i.y1&&(t=(e=i.y2-i.y1)/this.fixedNumber[1]*this.fixedNumber[0])}this.cropW=t,this.cropH=e,this.checkCropLimitSize(),this.$nextTick((()=>{this.cropOffsertX=(this.w-this.cropW)/2,this.cropOffsertY=(this.h-this.cropH)/2,this.centerBox&&this.moveCrop(null,!0)}))},refresh(){this.img,this.imgs="",this.scale=1,this.crop=!1,this.rotate=0,this.w=0,this.h=0,this.trueWidth=0,this.trueHeight=0,this.clearCrop(),this.$nextTick((()=>{this.checkedImg()}))},rotateLeft(){this.rotate=this.rotate<=-3?0:this.rotate-1},rotateRight(){this.rotate=this.rotate>=3?0:this.rotate+1},rotateClear(){this.rotate=0},checkoutImgAxis(t,e,i){t=t||this.x,e=e||this.y,i=i||this.scale;let s=!0;if(this.centerBox){let o=this.getImgAxis(t,e,i),h=this.getCropAxis();o.x1>=h.x1&&(s=!1),o.x2<=h.x2&&(s=!1),o.y1>=h.y1&&(s=!1),o.y2<=h.y2&&(s=!1)}return s}},mounted(){this.support="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";let t=this;var e=navigator.userAgent;this.isIOS=!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,i,s){for(var o=atob(this.toDataURL(i,s).split(",")[1]),h=o.length,r=new Uint8Array(h),a=0;a<h;a++)r[a]=o.charCodeAt(a);e(new Blob([r],{type:t.type||"image/png"}))}}),this.showPreview(),this.checkedImg()},destroyed(){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.cancelScale()}},o={key:0,class:"cropper-box"},h=["src"],r={class:"cropper-view-box"},a=["src"],c={key:1};const n=i._export_sfc(s,[["render",function(e,i,s,n,p,l){return t.openBlock(),t.createElementBlock("div",{class:"vue-cropper",ref:"cropper",onMouseover:i[28]||(i[28]=(...t)=>l.scaleImg&&l.scaleImg(...t)),onMouseout:i[29]||(i[29]=(...t)=>l.cancelScale&&l.cancelScale(...t))},[e.imgs?(t.openBlock(),t.createElementBlock("div",o,[t.withDirectives(t.createElementVNode("div",{class:"cropper-box-canvas",style:t.normalizeStyle({width:e.trueWidth+"px",height:e.trueHeight+"px",transform:"scale("+e.scale+","+e.scale+") translate3d("+e.x/e.scale+"px,"+e.y/e.scale+"px,0)rotateZ("+90*e.rotate+"deg)"})},[t.createElementVNode("img",{src:e.imgs,alt:"cropper-img",ref:"cropperImg"},null,8,h)],4),[[t.vShow,!e.loading]])])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["cropper-drag-box",{"cropper-move":e.move&&!e.crop,"cropper-crop":e.crop,"cropper-modal":e.cropping}]),onMousedown:i[0]||(i[0]=(...t)=>l.startMove&&l.startMove(...t)),onTouchstart:i[1]||(i[1]=(...t)=>l.startMove&&l.startMove(...t))},null,34),t.withDirectives(t.createElementVNode("div",{class:"cropper-crop-box",style:t.normalizeStyle({width:e.cropW+"px",height:e.cropH+"px",transform:"translate3d("+e.cropOffsertX+"px,"+e.cropOffsertY+"px,0)"})},[t.createElementVNode("span",r,[t.createElementVNode("img",{style:t.normalizeStyle({width:e.trueWidth+"px",height:e.trueHeight+"px",transform:"scale("+e.scale+","+e.scale+") translate3d("+(e.x-e.cropOffsertX)/e.scale+"px,"+(e.y-e.cropOffsertY)/e.scale+"px,0)rotateZ("+90*e.rotate+"deg)"}),src:e.imgs,alt:"cropper-img"},null,12,a)]),t.createElementVNode("span",{class:"cropper-face cropper-move",onMousedown:i[2]||(i[2]=(...t)=>l.cropMove&&l.cropMove(...t)),onTouchstart:i[3]||(i[3]=(...t)=>l.cropMove&&l.cropMove(...t))},null,32),s.info?(t.openBlock(),t.createElementBlock("span",{key:0,class:"crop-info",style:t.normalizeStyle({top:l.cropInfo.top})},t.toDisplayString(l.cropInfo.width)+" × "+t.toDisplayString(l.cropInfo.height),5)):t.createCommentVNode("",!0),s.fixedBox?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",c,[t.createElementVNode("span",{class:"crop-line line-w",onMousedown:i[4]||(i[4]=t=>l.changeCropSize(t,!1,!0,0,1)),onTouchstart:i[5]||(i[5]=t=>l.changeCropSize(t,!1,!0,0,1))},null,32),t.createElementVNode("span",{class:"crop-line line-a",onMousedown:i[6]||(i[6]=t=>l.changeCropSize(t,!0,!1,1,0)),onTouchstart:i[7]||(i[7]=t=>l.changeCropSize(t,!0,!1,1,0))},null,32),t.createElementVNode("span",{class:"crop-line line-s",onMousedown:i[8]||(i[8]=t=>l.changeCropSize(t,!1,!0,0,2)),onTouchstart:i[9]||(i[9]=t=>l.changeCropSize(t,!1,!0,0,2))},null,32),t.createElementVNode("span",{class:"crop-line line-d",onMousedown:i[10]||(i[10]=t=>l.changeCropSize(t,!0,!1,2,0)),onTouchstart:i[11]||(i[11]=t=>l.changeCropSize(t,!0,!1,2,0))},null,32),t.createElementVNode("span",{class:"crop-point point1",onMousedown:i[12]||(i[12]=t=>l.changeCropSize(t,!0,!0,1,1)),onTouchstart:i[13]||(i[13]=t=>l.changeCropSize(t,!0,!0,1,1))},null,32),t.createElementVNode("span",{class:"crop-point point2",onMousedown:i[14]||(i[14]=t=>l.changeCropSize(t,!1,!0,0,1)),onTouchstart:i[15]||(i[15]=t=>l.changeCropSize(t,!1,!0,0,1))},null,32),t.createElementVNode("span",{class:"crop-point point3",onMousedown:i[16]||(i[16]=t=>l.changeCropSize(t,!0,!0,2,1)),onTouchstart:i[17]||(i[17]=t=>l.changeCropSize(t,!0,!0,2,1))},null,32),t.createElementVNode("span",{class:"crop-point point4",onMousedown:i[18]||(i[18]=t=>l.changeCropSize(t,!0,!1,1,0)),onTouchstart:i[19]||(i[19]=t=>l.changeCropSize(t,!0,!1,1,0))},null,32),t.createElementVNode("span",{class:"crop-point point5",onMousedown:i[20]||(i[20]=t=>l.changeCropSize(t,!0,!1,2,0)),onTouchstart:i[21]||(i[21]=t=>l.changeCropSize(t,!0,!1,2,0))},null,32),t.createElementVNode("span",{class:"crop-point point6",onMousedown:i[22]||(i[22]=t=>l.changeCropSize(t,!0,!0,1,2)),onTouchstart:i[23]||(i[23]=t=>l.changeCropSize(t,!0,!0,1,2))},null,32),t.createElementVNode("span",{class:"crop-point point7",onMousedown:i[24]||(i[24]=t=>l.changeCropSize(t,!1,!0,0,2)),onTouchstart:i[25]||(i[25]=t=>l.changeCropSize(t,!1,!0,0,2))},null,32),t.createElementVNode("span",{class:"crop-point point8",onMousedown:i[26]||(i[26]=t=>l.changeCropSize(t,!0,!0,2,2)),onTouchstart:i[27]||(i[27]=t=>l.changeCropSize(t,!0,!0,2,2))},null,32)]))],4),[[t.vShow,e.cropping]])],544)}],["__scopeId","data-v-168a3964"]]),p={class:"h-full"},l={class:"avatar-upload-preview"},d=["src"],u=t.defineComponent({__name:"uploadAvatar",props:{avatar:{default:""},close:{type:Function,default:close},proxyId:{default:""}},setup(e){const{postSinglefile:s,postUpdateFile:o}=i.useFileController(),h=e;let r=t.ref({});t.onMounted((async()=>{r.value=await i.systemStore.get("userInfo")}));let{avatar:a}=t.toRefs(h);const c=t.reactive({img:"",autoCrop:!0,autoCropWidth:200,autoCropHeight:200,fixedBox:!1,outputSize:.5,outputType:"jpeg",canScale:!1,fixed:!1,fixedNumber:[1,1],full:!0,canMoveBox:!1,original:!1,centerBox:!1,infoTrue:!0,filename:""}),u=t.ref({}),g=t.ref({});t.ref(!1);let m=t=>{"left"==t&&g.value.rotateLeft(),"right"==t&&g.value.rotateRight()},f=t=>{const e=t||1;g.value.changeScale(e)},v=()=>{g.value.refresh()};const w=t=>{u.value=t};let x=()=>{},C=t=>{if(!["image/png","image/jpg","image/jpeg","image/PNG","image/JPG","image/JPEG","image/gif"].includes(t.type))return i.ElMessage.error("图片格式有误,请重新上传"),!1;{const e=new FileReader;e.readAsDataURL(t),e.onload=()=>{c.img=e.result,c.filename=t.name}}},y=()=>{c.img||i.ElMessage.warning("请先选择图片"),g.value.getCropBlob((async t=>{const e=await s({data:{file:t},proxy:h.proxyId}),i=await o({data:{id:r.value.id,attchIdArrStr:e.data.id,attachType:2},proxy:h.proxyId});h.close(i)}))};return t.onMounted((()=>{setTimeout((()=>{c.img=a.value}),100)})),(e,i)=>{const s=t.resolveComponent("el-col"),o=t.resolveComponent("el-row"),h=t.resolveComponent("bc-icon"),r=t.resolveComponent("el-button"),a=t.resolveComponent("hs-upload");return t.openBlock(),t.createElementBlock("div",p,[t.createVNode(o,null,{default:t.withCtx((()=>[t.createVNode(s,{xs:24,md:13,style:{height:"350px"}},{default:t.withCtx((()=>[t.createVNode(n,{ref_key:"cropperRef",ref:g,img:c.img,info:!0,infoTrue:c.infoTrue,"auto-crop":c.autoCrop,"fixed-box":c.fixedBox,fixedNumber:c.fixedNumber,fixed:c.fixed,centerBox:c.centerBox,outputType:"png",onRealTime:w},null,8,["img","infoTrue","auto-crop","fixed-box","fixedNumber","fixed","centerBox"])])),_:1}),t.createVNode(s,{xs:24,md:11,style:{height:"350px"}},{default:t.withCtx((()=>[t.createElementVNode("div",l,[t.createElementVNode("img",{src:u.value.url,style:t.normalizeStyle(u.value.img)},null,12,d)])])),_:1})])),_:1}),t.createVNode(o,{class:"ptb2 py-3"},{default:t.withCtx((()=>[t.createVNode(s,{lg:2,md:2},{default:t.withCtx((()=>[t.createVNode(a,{action:"#","http-request":t.unref(x),"show-file-list":!1,"before-upload":t.unref(C),accept:"image/*"},{default:t.withCtx((()=>[t.createVNode(r,{size:"default"},{default:t.withCtx((()=>[i[6]||(i[6]=t.createTextVNode(" 选择 ")),t.createVNode(h,{name:"ele-UploadFilled"})])),_:1})])),_:1},8,["http-request","before-upload"])])),_:1}),t.createVNode(s,{lg:{span:1,offset:1},md:2},{default:t.withCtx((()=>[t.createVNode(r,{size:"default",icon:"ele-Plus",onClick:i[0]||(i[0]=e=>t.unref(f)(1))})])),_:1}),t.createVNode(s,{lg:{span:1,offset:1},md:2},{default:t.withCtx((()=>[t.createVNode(r,{size:"default",icon:"ele-Minus",onClick:i[1]||(i[1]=e=>t.unref(f)(-1))})])),_:1}),t.createVNode(s,{lg:{span:1,offset:1},md:2},{default:t.withCtx((()=>[t.createVNode(r,{size:"default",icon:"ele-RefreshLeft",onClick:i[2]||(i[2]=e=>t.unref(m)("left"))})])),_:1}),t.createVNode(s,{lg:{span:1,offset:1},md:2},{default:t.withCtx((()=>[t.createVNode(r,{size:"default",icon:"ele-RefreshRight",onClick:i[3]||(i[3]=e=>t.unref(m)("right"))})])),_:1}),t.createVNode(s,{lg:{span:1,offset:1},md:2},{default:t.withCtx((()=>[t.createVNode(r,{size:"default",onClick:i[4]||(i[4]=e=>t.unref(v)())},{default:t.withCtx((()=>i[7]||(i[7]=[t.createTextVNode("重 置")]))),_:1})])),_:1}),t.createVNode(s,{lg:{span:1,offset:7},md:2},{default:t.withCtx((()=>[t.createVNode(r,{size:"default",type:"primary",onClick:i[5]||(i[5]=e=>t.unref(y)())},{default:t.withCtx((()=>i[8]||(i[8]=[t.createTextVNode("提 交")]))),_:1})])),_:1})])),_:1})])}}}),g=i._export_sfc(u,[["__scopeId","data-v-99513ec9"]]);exports.default=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),e=require("./uploadAvatar.vue_vue_type_style_index_0_scoped_99513ec9_lang-B-YXXUWn.js"),i=require("./index-QhUGwPEo.js"),s={data:function(){return{w:0,h:0,scale:1,x:0,y:0,loading:!0,trueWidth:0,trueHeight:0,move:!0,moveX:0,moveY:0,crop:!1,cropping:!1,cropW:0,cropH:0,cropOldW:0,cropOldH:0,canChangeX:!1,canChangeY:!1,changeCropTypeX:1,changeCropTypeY:1,cropX:0,cropY:0,cropChangeX:0,cropChangeY:0,cropOffsertX:0,cropOffsertY:0,support:"",touches:[],touchNow:!1,rotate:0,isIos:!1,orientation:0,imgs:"",coe:.2,scaling:!1,scalingSet:"",coeStatus:"",isCanShow:!0}},props:{img:{type:[String,Blob,null,File],default:""},outputSize:{type:Number,default:1},outputType:{type:String,default:"jpeg"},info:{type:Boolean,default:!0},canScale:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!1},autoCropWidth:{type:[Number,String],default:0},autoCropHeight:{type:[Number,String],default:0},fixed:{type:Boolean,default:!1},fixedNumber:{type:Array,default:()=>[1,1]},fixedBox:{type:Boolean,default:!1},full:{type:Boolean,default:!1},canMove:{type:Boolean,default:!0},canMoveBox:{type:Boolean,default:!0},original:{type:Boolean,default:!1},centerBox:{type:Boolean,default:!1},high:{type:Boolean,default:!0},infoTrue:{type:Boolean,default:!1},maxImgSize:{type:[Number,String],default:2e3},enlarge:{type:[Number,String],default:1},preW:{type:[Number,String],default:0},mode:{type:String,default:"contain"},limitMinSize:{type:[Number,Array,String],default:()=>10,validator:function(t){return Array.isArray(t)?Number(t[0])>=0&&Number(t[1])>=0:Number(t)>=0}},fillColor:{type:String,default:""}},computed:{cropInfo(){let t={};if(t.top=this.cropOffsertY>21?"-21px":"0px",t.width=this.cropW>0?this.cropW:0,t.height=this.cropH>0?this.cropH:0,this.infoTrue){let e=1;this.high&&!this.full&&(e=window.devicePixelRatio),1!==this.enlarge&!this.full&&(e=Math.abs(Number(this.enlarge))),t.width=t.width*e,t.height=t.height*e,this.full&&(t.width=t.width/this.scale,t.height=t.height/this.scale)}return t.width=t.width.toFixed(0),t.height=t.height.toFixed(0),t},isIE:()=>!!window.ActiveXObject||"ActiveXObject"in window,passive(){return this.isIE?null:{passive:!1}}},watch:{img(){this.checkedImg()},imgs(t){""!==t&&this.reload()},cropW(){this.showPreview()},cropH(){this.showPreview()},cropOffsertX(){this.showPreview()},cropOffsertY(){this.showPreview()},scale(t,e){this.showPreview()},x(){this.showPreview()},y(){this.showPreview()},autoCrop(t){t&&this.goAutoCrop()},autoCropWidth(){this.autoCrop&&this.goAutoCrop()},autoCropHeight(){this.autoCrop&&this.goAutoCrop()},mode(){this.checkedImg()},rotate(){this.showPreview(),(this.autoCrop||this.cropW>0||this.cropH>0)&&this.goAutoCrop(this.cropW,this.cropH)}},methods:{getVersion(t){var e=navigator.userAgent.split(" "),i="";let s=0;const o=new RegExp(t,"i");for(var h=0;h<e.length;h++)o.test(e[h])&&(i=e[h]);return s=i?i.split("/")[1].split("."):["0","0","0"],s},checkOrientationImage(t,e,i,s){if(this.getVersion("chrome")[0]>=81)e=-1;else if(this.getVersion("safari")[0]>=605){const t=this.getVersion("version");t[0]>13&&t[1]>1&&(e=-1)}else{const t=navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/);if(t){let i=t[1];i=i.split("_"),(i[0]>13||i[0]>=13&&i[1]>=4)&&(e=-1)}}let o=document.createElement("canvas"),h=o.getContext("2d");switch(h.save(),e){case 2:o.width=i,o.height=s,h.translate(i,0),h.scale(-1,1);break;case 3:o.width=i,o.height=s,h.translate(i/2,s/2),h.rotate(180*Math.PI/180),h.translate(-i/2,-s/2);break;case 4:o.width=i,o.height=s,h.translate(0,s),h.scale(1,-1);break;case 5:o.height=i,o.width=s,h.rotate(.5*Math.PI),h.scale(1,-1);break;case 6:o.width=s,o.height=i,h.translate(s/2,i/2),h.rotate(90*Math.PI/180),h.translate(-i/2,-s/2);break;case 7:o.height=i,o.width=s,h.rotate(.5*Math.PI),h.translate(i,-s),h.scale(-1,1);break;case 8:o.height=i,o.width=s,h.translate(s/2,i/2),h.rotate(-90*Math.PI/180),h.translate(-i/2,-s/2);break;default:o.width=i,o.height=s}h.drawImage(t,0,0,i,s),h.restore(),o.toBlob((t=>{let e=URL.createObjectURL(t);URL.revokeObjectURL(this.imgs),this.imgs=e}),"image/"+this.outputType,1)},checkedImg(){if(null===this.img||""===this.img)return this.imgs="",void this.clearCrop();this.loading=!0,this.scale=1,this.rotate=0,this.clearCrop();let t=new Image;if(t.onload=()=>{if(""===this.img)return this.$emit("imgLoad","error"),this.$emit("img-load","error"),this.$emit("img-load",new Error("图片不能为空")),!1;let i=t.width,s=t.height;e.Exif.getData(t).then((e=>{this.orientation=e.orientation||1;let o=Number(this.maxImgSize);!this.orientation&&i<o&s<o?this.imgs=this.img:(i>o&&(s=s/i*o,i=o),s>o&&(i=i/s*o,s=o),this.checkOrientationImage(t,this.orientation,i,s))})).catch((t=>{this.$emit("img-load","error"),this.$emit("img-load-error",t)}))},t.onerror=()=>{this.$emit("imgLoad","error"),this.$emit("img-load","error"),this.$emit("img-load-error",error)},"data"!==this.img.substr(0,4)&&(t.crossOrigin=""),this.isIE){var i=new XMLHttpRequest;i.onload=function(){var e=URL.createObjectURL(this.response);t.src=e},i.open("GET",this.img,!0),i.responseType="blob",i.send()}else t.src=this.img},startMove(t){if(t.preventDefault(),this.move&&!this.crop){if(!this.canMove)return!1;this.moveX=("clientX"in t?t.clientX:t.touches[0].clientX)-this.x,this.moveY=("clientY"in t?t.clientY:t.touches[0].clientY)-this.y,t.touches?(window.addEventListener("touchmove",this.moveImg),window.addEventListener("touchend",this.leaveImg),2==t.touches.length&&(this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale))):(window.addEventListener("mousemove",this.moveImg),window.addEventListener("mouseup",this.leaveImg)),this.$emit("imgMoving",{moving:!0,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})}else this.cropping=!0,window.addEventListener("mousemove",this.createCrop),window.addEventListener("mouseup",this.endCrop),window.addEventListener("touchmove",this.createCrop),window.addEventListener("touchend",this.endCrop),this.cropOffsertX=t.offsetX?t.offsetX:t.touches[0].pageX-this.$refs.cropper.offsetLeft,this.cropOffsertY=t.offsetY?t.offsetY:t.touches[0].pageY-this.$refs.cropper.offsetTop,this.cropX="clientX"in t?t.clientX:t.touches[0].clientX,this.cropY="clientY"in t?t.clientY:t.touches[0].clientY,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.cropW=0,this.cropH=0},touchScale(t){t.preventDefault();let e=this.scale;var i=this.touches[0].clientX,s=this.touches[0].clientY,o=t.touches[0].clientX,h=t.touches[0].clientY,r=this.touches[1].clientX,a=this.touches[1].clientY,c=t.touches[1].clientX,n=t.touches[1].clientY,p=Math.sqrt(Math.pow(i-r,2)+Math.pow(s-a,2)),l=Math.sqrt(Math.pow(o-c,2)+Math.pow(h-n,2))-p,d=1,u=(d=(d=d/this.trueWidth>d/this.trueHeight?d/this.trueHeight:d/this.trueWidth)>.1?.1:d)*l;if(!this.touchNow){if(this.touchNow=!0,l>0?e+=Math.abs(u):l<0&&e>Math.abs(u)&&(e-=Math.abs(u)),this.touches=t.touches,setTimeout((()=>{this.touchNow=!1}),8),!this.checkoutImgAxis(this.x,this.y,e))return!1;this.scale=e}},cancelTouchScale(t){window.removeEventListener("touchmove",this.touchScale)},moveImg(t){if(t.preventDefault(),t.touches&&2===t.touches.length)return this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale),window.removeEventListener("touchmove",this.moveImg),!1;let e,i,s="clientX"in t?t.clientX:t.touches[0].clientX,o="clientY"in t?t.clientY:t.touches[0].clientY;e=s-this.moveX,i=o-this.moveY,this.$nextTick((()=>{if(this.centerBox){let t,s,o,h,r=this.getImgAxis(e,i,this.scale),a=this.getCropAxis(),c=this.trueHeight*this.scale,n=this.trueWidth*this.scale;switch(this.rotate){case 1:case-1:case 3:case-3:t=this.cropOffsertX-this.trueWidth*(1-this.scale)/2+(c-n)/2,s=this.cropOffsertY-this.trueHeight*(1-this.scale)/2+(n-c)/2,o=t-c+this.cropW,h=s-n+this.cropH;break;default:t=this.cropOffsertX-this.trueWidth*(1-this.scale)/2,s=this.cropOffsertY-this.trueHeight*(1-this.scale)/2,o=t-n+this.cropW,h=s-c+this.cropH}r.x1>=a.x1&&(e=t),r.y1>=a.y1&&(i=s),r.x2<=a.x2&&(e=o),r.y2<=a.y2&&(i=h)}this.x=e,this.y=i,this.$emit("imgMoving",{moving:!0,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})}))},leaveImg(t){window.removeEventListener("mousemove",this.moveImg),window.removeEventListener("touchmove",this.moveImg),window.removeEventListener("mouseup",this.leaveImg),window.removeEventListener("touchend",this.leaveImg),this.$emit("imgMoving",{moving:!1,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!1,axis:this.getImgAxis()})},scaleImg(){this.canScale&&window.addEventListener(this.support,this.changeSize,this.passive)},cancelScale(){this.canScale&&window.removeEventListener(this.support,this.changeSize)},changeSize(t){t.preventDefault();let e=this.scale;var i=t.deltaY||t.wheelDelta;i=navigator.userAgent.indexOf("Firefox")>0?30*i:i,this.isIE&&(i=-i);var s=this.coe,o=(s=s/this.trueWidth>s/this.trueHeight?s/this.trueHeight:s/this.trueWidth)*i;o<0?e+=Math.abs(o):e>Math.abs(o)&&(e-=Math.abs(o));let h=o<0?"add":"reduce";if(h!==this.coeStatus&&(this.coeStatus=h,this.coe=.2),this.scaling||(this.scalingSet=setTimeout((()=>{this.scaling=!1,this.coe=this.coe+=.01}),50)),this.scaling=!0,!this.checkoutImgAxis(this.x,this.y,e))return!1;this.scale=e},changeScale(t){let e=this.scale;t=t||1;var i=20;if((t*=i=i/this.trueWidth>i/this.trueHeight?i/this.trueHeight:i/this.trueWidth)>0?e+=Math.abs(t):e>Math.abs(t)&&(e-=Math.abs(t)),!this.checkoutImgAxis(this.x,this.y,e))return!1;this.scale=e},createCrop(t){t.preventDefault();var e="clientX"in t?t.clientX:t.touches?t.touches[0].clientX:0,i="clientY"in t?t.clientY:t.touches?t.touches[0].clientY:0;this.$nextTick((()=>{var t=e-this.cropX,s=i-this.cropY;if(t>0?(this.cropW=t+this.cropChangeX>this.w?this.w-this.cropChangeX:t,this.cropOffsertX=this.cropChangeX):(this.cropW=this.w-this.cropChangeX+Math.abs(t)>this.w?this.cropChangeX:Math.abs(t),this.cropOffsertX=this.cropChangeX+t>0?this.cropChangeX+t:0),this.fixed){var o=this.cropW/this.fixedNumber[0]*this.fixedNumber[1];o+this.cropOffsertY>this.h?(this.cropH=this.h-this.cropOffsertY,this.cropW=this.cropH/this.fixedNumber[1]*this.fixedNumber[0],this.cropOffsertX=t>0?this.cropChangeX:this.cropChangeX-this.cropW):this.cropH=o,this.cropOffsertY=this.cropOffsertY}else s>0?(this.cropH=s+this.cropChangeY>this.h?this.h-this.cropChangeY:s,this.cropOffsertY=this.cropChangeY):(this.cropH=this.h-this.cropChangeY+Math.abs(s)>this.h?this.cropChangeY:Math.abs(s),this.cropOffsertY=this.cropChangeY+s>0?this.cropChangeY+s:0)}))},changeCropSize(t,e,i,s,o){t.preventDefault(),window.addEventListener("mousemove",this.changeCropNow),window.addEventListener("mouseup",this.changeCropEnd),window.addEventListener("touchmove",this.changeCropNow),window.addEventListener("touchend",this.changeCropEnd),this.canChangeX=e,this.canChangeY=i,this.changeCropTypeX=s,this.changeCropTypeY=o,this.cropX="clientX"in t?t.clientX:t.touches[0].clientX,this.cropY="clientY"in t?t.clientY:t.touches[0].clientY,this.cropOldW=this.cropW,this.cropOldH=this.cropH,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.fixed&&this.canChangeX&&this.canChangeY&&(this.canChangeY=0),this.$emit("changeCropSize",{width:this.cropW,height:this.cropH}),this.$emit("change-crop-size",{width:this.cropW,height:this.cropH})},changeCropNow(t){t.preventDefault();var e="clientX"in t?t.clientX:t.touches?t.touches[0].clientX:0,i="clientY"in t?t.clientY:t.touches?t.touches[0].clientY:0;let s=this.w,o=this.h,h=0,r=0;if(this.centerBox){let t=this.getImgAxis(),e=t.x2,i=t.y2;h=t.x1>0?t.x1:0,r=t.y1>0?t.y1:0,s>e&&(s=e),o>i&&(o=i)}const[a,c]=this.checkCropLimitSize();this.$nextTick((()=>{var t=e-this.cropX,n=i-this.cropY;if(this.canChangeX&&(1===this.changeCropTypeX?this.cropOldW-t<a?(this.cropW=a,this.cropOffsertX=this.cropOldW+this.cropChangeX-h-a):this.cropOldW-t>0?(this.cropW=s-this.cropChangeX-t<=s-h?this.cropOldW-t:this.cropOldW+this.cropChangeX-h,this.cropOffsertX=s-this.cropChangeX-t<=s-h?this.cropChangeX+t:h):(this.cropW=Math.abs(t)+this.cropChangeX<=s?Math.abs(t)-this.cropOldW:s-this.cropOldW-this.cropChangeX,this.cropOffsertX=this.cropChangeX+this.cropOldW):2===this.changeCropTypeX&&(this.cropOldW+t<a?this.cropW=a:this.cropOldW+t>0?(this.cropW=this.cropOldW+t+this.cropOffsertX<=s?this.cropOldW+t:s-this.cropOffsertX,this.cropOffsertX=this.cropChangeX):(this.cropW=s-this.cropChangeX+Math.abs(t+this.cropOldW)<=s-h?Math.abs(t+this.cropOldW):this.cropChangeX-h,this.cropOffsertX=s-this.cropChangeX+Math.abs(t+this.cropOldW)<=s-h?this.cropChangeX-Math.abs(t+this.cropOldW):h))),this.canChangeY&&(1===this.changeCropTypeY?this.cropOldH-n<c?(this.cropH=c,this.cropOffsertY=this.cropOldH+this.cropChangeY-r-c):this.cropOldH-n>0?(this.cropH=o-this.cropChangeY-n<=o-r?this.cropOldH-n:this.cropOldH+this.cropChangeY-r,this.cropOffsertY=o-this.cropChangeY-n<=o-r?this.cropChangeY+n:r):(this.cropH=Math.abs(n)+this.cropChangeY<=o?Math.abs(n)-this.cropOldH:o-this.cropOldH-this.cropChangeY,this.cropOffsertY=this.cropChangeY+this.cropOldH):2===this.changeCropTypeY&&(this.cropOldH+n<c?this.cropH=c:this.cropOldH+n>0?(this.cropH=this.cropOldH+n+this.cropOffsertY<=o?this.cropOldH+n:o-this.cropOffsertY,this.cropOffsertY=this.cropChangeY):(this.cropH=o-this.cropChangeY+Math.abs(n+this.cropOldH)<=o-r?Math.abs(n+this.cropOldH):this.cropChangeY-r,this.cropOffsertY=o-this.cropChangeY+Math.abs(n+this.cropOldH)<=o-r?this.cropChangeY-Math.abs(n+this.cropOldH):r))),this.canChangeX&&this.fixed){var p=this.cropW/this.fixedNumber[0]*this.fixedNumber[1];p<c?(this.cropH=c,this.cropW=this.fixedNumber[0]*c/this.fixedNumber[1],1===this.changeCropTypeX&&(this.cropOffsertX=this.cropChangeX+(this.cropOldW-this.cropW))):p+this.cropOffsertY>o?(this.cropH=o-this.cropOffsertY,this.cropW=this.cropH/this.fixedNumber[1]*this.fixedNumber[0],1===this.changeCropTypeX&&(this.cropOffsertX=this.cropChangeX+(this.cropOldW-this.cropW))):this.cropH=p}if(this.canChangeY&&this.fixed){var l=this.cropH/this.fixedNumber[1]*this.fixedNumber[0];l<a?(this.cropW=a,this.cropH=this.fixedNumber[1]*a/this.fixedNumber[0]):l+this.cropOffsertX>s?(this.cropW=s-this.cropOffsertX,this.cropH=this.cropW/this.fixedNumber[0]*this.fixedNumber[1]):this.cropW=l}this.$emit("cropSizing",{cropW:this.cropW,cropH:this.cropH}),this.$emit("crop-sizing",{cropW:this.cropW,cropH:this.cropH})}))},checkCropLimitSize(){let{cropW:t,cropH:e,limitMinSize:i}=this,s=new Array;return s=Array.isArray(i)?i:[i,i],t=parseFloat(s[0]),e=parseFloat(s[1]),[t,e]},changeCropEnd(t){window.removeEventListener("mousemove",this.changeCropNow),window.removeEventListener("mouseup",this.changeCropEnd),window.removeEventListener("touchmove",this.changeCropNow),window.removeEventListener("touchend",this.changeCropEnd)},calculateSize(t,e,i,s,o,h){const r=t/e;let a=o,c=h;return a<i&&(a=i,c=Math.ceil(a/r)),c<s&&(c=s,a=Math.ceil(c*r),a<i&&(a=i,c=Math.ceil(a/r))),a<o&&(a=o,c=Math.ceil(a/r)),c<h&&(c=h,a=Math.ceil(c*r)),{width:a,height:c}},endCrop(){0===this.cropW&&0===this.cropH&&(this.cropping=!1);let[t,e]=this.checkCropLimitSize();const{width:i,height:s}=this.fixed?this.calculateSize(this.fixedNumber[0],this.fixedNumber[1],t,e,this.cropW,this.cropH):{width:t,height:e};i>this.cropW&&(this.cropW=i,this.cropOffsertX+i>this.w&&(this.cropOffsertX=this.w-i)),s>this.cropH&&(this.cropH=s,this.cropOffsertY+s>this.h&&(this.cropOffsertY=this.h-s)),window.removeEventListener("mousemove",this.createCrop),window.removeEventListener("mouseup",this.endCrop),window.removeEventListener("touchmove",this.createCrop),window.removeEventListener("touchend",this.endCrop)},startCrop(){this.crop=!0},stopCrop(){this.crop=!1},clearCrop(){this.cropping=!1,this.cropW=0,this.cropH=0},cropMove(t){if(t.preventDefault(),!this.canMoveBox)return this.crop=!1,this.startMove(t),!1;if(t.touches&&2===t.touches.length)return this.crop=!1,this.startMove(t),this.leaveCrop(),!1;window.addEventListener("mousemove",this.moveCrop),window.addEventListener("mouseup",this.leaveCrop),window.addEventListener("touchmove",this.moveCrop),window.addEventListener("touchend",this.leaveCrop);let e,i,s="clientX"in t?t.clientX:t.touches[0].clientX,o="clientY"in t?t.clientY:t.touches[0].clientY;e=s-this.cropOffsertX,i=o-this.cropOffsertY,this.cropX=e,this.cropY=i,this.$emit("cropMoving",{moving:!0,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})},moveCrop(t,e){let i=0,s=0;t&&(t.preventDefault(),i="clientX"in t?t.clientX:t.touches[0].clientX,s="clientY"in t?t.clientY:t.touches[0].clientY),this.$nextTick((()=>{let t,o,h=i-this.cropX,r=s-this.cropY;if(e&&(h=this.cropOffsertX,r=this.cropOffsertY),t=h<=0?0:h+this.cropW>this.w?this.w-this.cropW:h,o=r<=0?0:r+this.cropH>this.h?this.h-this.cropH:r,this.centerBox){let e=this.getImgAxis();t<=e.x1&&(t=e.x1),t+this.cropW>e.x2&&(t=e.x2-this.cropW),o<=e.y1&&(o=e.y1),o+this.cropH>e.y2&&(o=e.y2-this.cropH)}this.cropOffsertX=t,this.cropOffsertY=o,this.$emit("cropMoving",{moving:!0,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})}))},getImgAxis(t,e,i){t=t||this.x,e=e||this.y,i=i||this.scale;let s={x1:0,x2:0,y1:0,y2:0},o=this.trueWidth*i,h=this.trueHeight*i;switch(this.rotate){case 0:s.x1=t+this.trueWidth*(1-i)/2,s.x2=s.x1+this.trueWidth*i,s.y1=e+this.trueHeight*(1-i)/2,s.y2=s.y1+this.trueHeight*i;break;case 1:case-1:case 3:case-3:s.x1=t+this.trueWidth*(1-i)/2+(o-h)/2,s.x2=s.x1+this.trueHeight*i,s.y1=e+this.trueHeight*(1-i)/2+(h-o)/2,s.y2=s.y1+this.trueWidth*i;break;default:s.x1=t+this.trueWidth*(1-i)/2,s.x2=s.x1+this.trueWidth*i,s.y1=e+this.trueHeight*(1-i)/2,s.y2=s.y1+this.trueHeight*i}return s},getCropAxis(){let t={x1:0,x2:0,y1:0,y2:0};return t.x1=this.cropOffsertX,t.x2=t.x1+this.cropW,t.y1=this.cropOffsertY,t.y2=t.y1+this.cropH,t},leaveCrop(t){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.$emit("cropMoving",{moving:!1,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!1,axis:this.getCropAxis()})},getCropChecked(t){let e=document.createElement("canvas"),i=new Image,s=this.rotate,o=this.trueWidth,h=this.trueHeight,r=this.cropOffsertX,a=this.cropOffsertY;function c(t,i){e.width=Math.round(t),e.height=Math.round(i)}i.onload=()=>{if(0!==this.cropW){let t=e.getContext("2d"),n=1;this.high&!this.full&&(n=window.devicePixelRatio),1!==this.enlarge&!this.full&&(n=Math.abs(Number(this.enlarge)));let p=this.cropW*n,l=this.cropH*n,d=o*this.scale*n,u=h*this.scale*n,g=(this.x-r+this.trueWidth*(1-this.scale)/2)*n,m=(this.y-a+this.trueHeight*(1-this.scale)/2)*n;switch(c(p,l),t.save(),this.fillColor&&(t.fillStyle=this.fillColor,t.fillRect(0,0,e.width,e.height)),s){case 0:this.full?(c(p/this.scale,l/this.scale),t.drawImage(i,g/this.scale,m/this.scale,d/this.scale,u/this.scale)):t.drawImage(i,g,m,d,u);break;case 1:case-3:this.full?(c(p/this.scale,l/this.scale),g=g/this.scale+(d/this.scale-u/this.scale)/2,m=m/this.scale+(u/this.scale-d/this.scale)/2,t.rotate(90*s*Math.PI/180),t.drawImage(i,m,-g-u/this.scale,d/this.scale,u/this.scale)):(g+=(d-u)/2,m+=(u-d)/2,t.rotate(90*s*Math.PI/180),t.drawImage(i,m,-g-u,d,u));break;case 2:case-2:this.full?(c(p/this.scale,l/this.scale),t.rotate(90*s*Math.PI/180),g/=this.scale,m/=this.scale,t.drawImage(i,-g-d/this.scale,-m-u/this.scale,d/this.scale,u/this.scale)):(t.rotate(90*s*Math.PI/180),t.drawImage(i,-g-d,-m-u,d,u));break;case 3:case-1:this.full?(c(p/this.scale,l/this.scale),g=g/this.scale+(d/this.scale-u/this.scale)/2,m=m/this.scale+(u/this.scale-d/this.scale)/2,t.rotate(90*s*Math.PI/180),t.drawImage(i,-m-d/this.scale,g,d/this.scale,u/this.scale)):(g+=(d-u)/2,m+=(u-d)/2,t.rotate(90*s*Math.PI/180),t.drawImage(i,-m-d,g,d,u));break;default:this.full?(c(p/this.scale,l/this.scale),t.drawImage(i,g/this.scale,m/this.scale,d/this.scale,u/this.scale)):t.drawImage(i,g,m,d,u)}t.restore()}else{let t=o*this.scale,r=h*this.scale,a=e.getContext("2d");switch(a.save(),this.fillColor&&(a.fillStyle=this.fillColor,a.fillRect(0,0,e.width,e.height)),s){case 0:c(t,r),a.drawImage(i,0,0,t,r);break;case 1:case-3:c(r,t),a.rotate(90*s*Math.PI/180),a.drawImage(i,0,-r,t,r);break;case 2:case-2:c(t,r),a.rotate(90*s*Math.PI/180),a.drawImage(i,-t,-r,t,r);break;case 3:case-1:c(r,t),a.rotate(90*s*Math.PI/180),a.drawImage(i,-t,0,t,r);break;default:c(t,r),a.drawImage(i,0,0,t,r)}a.restore()}t(e)},"data"!==this.img.substr(0,4)&&(i.crossOrigin="Anonymous"),i.src=this.imgs},getCropData(t){this.getCropChecked((e=>{t(e.toDataURL("image/"+this.outputType,this.outputSize))}))},getCropBlob(t){this.getCropChecked((e=>{e.toBlob((e=>t(e)),"image/"+this.outputType,this.outputSize)}))},showPreview(){if(!this.isCanShow)return!1;this.isCanShow=!1,setTimeout((()=>{this.isCanShow=!0}),16);let t=this.cropW,e=this.cropH,i=this.scale;var s={};s.div={width:`${t}px`,height:`${e}px`};let o=(this.x-this.cropOffsertX)/i,h=(this.y-this.cropOffsertY)/i;s.w=t,s.h=e,s.url=this.imgs,s.img={width:`${this.trueWidth}px`,height:`${this.trueHeight}px`,transform:`scale(${i})translate3d(${o}px, ${h}px, 0px)rotateZ(${90*this.rotate}deg)`},s.html=`\n <div class="show-preview" style="width: ${s.w}px; height: ${s.h}px; overflow: hidden">\n <div style="width: ${t}px; height: ${e}px">\n <img src=${s.url} style="width: ${this.trueWidth}px; height: ${this.trueHeight}px; transform:\n scale(${i})translate3d(${o}px, ${h}px, 0px)rotateZ(${90*this.rotate}deg)">\n </div>\n </div>`,this.$emit("realTime",s),this.$emit("real-time",s)},reload(){let t=new Image;t.onload=()=>{this.w=parseFloat(window.getComputedStyle(this.$refs.cropper).width),this.h=parseFloat(window.getComputedStyle(this.$refs.cropper).height),this.trueWidth=t.width,this.trueHeight=t.height,this.original?this.scale=1:this.scale=this.checkedMode(),this.$nextTick((()=>{this.x=-(this.trueWidth-this.trueWidth*this.scale)/2+(this.w-this.trueWidth*this.scale)/2,this.y=-(this.trueHeight-this.trueHeight*this.scale)/2+(this.h-this.trueHeight*this.scale)/2,this.loading=!1,this.autoCrop&&this.goAutoCrop(),this.$emit("img-load","success"),this.$emit("imgLoad","success"),setTimeout((()=>{this.showPreview()}),20)}))},t.onerror=()=>{this.$emit("imgLoad","error"),this.$emit("img-load","error")},t.src=this.imgs},checkedMode(){let t=1,e=this.trueWidth,i=this.trueHeight;const s=this.mode.split(" ");switch(s[0]){case"contain":this.trueWidth>this.w&&(t=this.w/this.trueWidth),this.trueHeight*t>this.h&&(t=this.h/this.trueHeight);break;case"cover":e=this.w,t=e/this.trueWidth,i*=t,i<this.h&&(i=this.h,t=i/this.trueHeight);break;default:try{let o=s[0];if(-1!==o.search("px")){o=o.replace("px",""),e=parseFloat(o);const h=e/this.trueWidth;let r=1,a=s[1];-1!==a.search("px")&&(a=a.replace("px",""),i=parseFloat(a),r=i/this.trueHeight),t=Math.min(h,r)}if(-1!==o.search("%")&&(o=o.replace("%",""),e=parseFloat(o)/100*this.w,t=e/this.trueWidth),2===s.length&&"auto"===o){let e=s[1];-1!==e.search("px")&&(e=e.replace("px",""),i=parseFloat(e),t=i/this.trueHeight),-1!==e.search("%")&&(e=e.replace("%",""),i=parseFloat(e)/100*this.h,t=i/this.trueHeight)}}catch(o){t=1}}return t},goAutoCrop(t,e){if(""===this.imgs||null===this.imgs)return;this.clearCrop(),this.cropping=!0;let i=this.w,s=this.h;if(this.centerBox){const t=Math.abs(this.rotate)%2>0;let e=(t?this.trueHeight:this.trueWidth)*this.scale,o=(t?this.trueWidth:this.trueHeight)*this.scale;i=e<i?e:i,s=o<s?o:s}var o=t||parseFloat(this.autoCropWidth),h=e||parseFloat(this.autoCropHeight);0!==o&&0!==h||(o=.8*i,h=.8*s),o=o>i?i:o,h=h>s?s:h,this.fixed&&(h=o/this.fixedNumber[0]*this.fixedNumber[1]),h>this.h&&(o=(h=this.h)/this.fixedNumber[1]*this.fixedNumber[0]),this.changeCrop(o,h)},changeCrop(t,e){if(this.centerBox){let i=this.getImgAxis();t>i.x2-i.x1&&(e=(t=i.x2-i.x1)/this.fixedNumber[0]*this.fixedNumber[1]),e>i.y2-i.y1&&(t=(e=i.y2-i.y1)/this.fixedNumber[1]*this.fixedNumber[0])}this.cropW=t,this.cropH=e,this.checkCropLimitSize(),this.$nextTick((()=>{this.cropOffsertX=(this.w-this.cropW)/2,this.cropOffsertY=(this.h-this.cropH)/2,this.centerBox&&this.moveCrop(null,!0)}))},refresh(){this.img,this.imgs="",this.scale=1,this.crop=!1,this.rotate=0,this.w=0,this.h=0,this.trueWidth=0,this.trueHeight=0,this.clearCrop(),this.$nextTick((()=>{this.checkedImg()}))},rotateLeft(){this.rotate=this.rotate<=-3?0:this.rotate-1},rotateRight(){this.rotate=this.rotate>=3?0:this.rotate+1},rotateClear(){this.rotate=0},checkoutImgAxis(t,e,i){t=t||this.x,e=e||this.y,i=i||this.scale;let s=!0;if(this.centerBox){let o=this.getImgAxis(t,e,i),h=this.getCropAxis();o.x1>=h.x1&&(s=!1),o.x2<=h.x2&&(s=!1),o.y1>=h.y1&&(s=!1),o.y2<=h.y2&&(s=!1)}return s}},mounted(){this.support="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";let t=this;var e=navigator.userAgent;this.isIOS=!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,i,s){for(var o=atob(this.toDataURL(i,s).split(",")[1]),h=o.length,r=new Uint8Array(h),a=0;a<h;a++)r[a]=o.charCodeAt(a);e(new Blob([r],{type:t.type||"image/png"}))}}),this.showPreview(),this.checkedImg()},destroyed(){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.cancelScale()}},o={key:0,class:"cropper-box"},h=["src"],r={class:"cropper-view-box"},a=["src"],c={key:1};const n=i._export_sfc(s,[["render",function(e,i,s,n,p,l){return t.openBlock(),t.createElementBlock("div",{class:"vue-cropper",ref:"cropper",onMouseover:i[28]||(i[28]=(...t)=>l.scaleImg&&l.scaleImg(...t)),onMouseout:i[29]||(i[29]=(...t)=>l.cancelScale&&l.cancelScale(...t))},[e.imgs?(t.openBlock(),t.createElementBlock("div",o,[t.withDirectives(t.createElementVNode("div",{class:"cropper-box-canvas",style:t.normalizeStyle({width:e.trueWidth+"px",height:e.trueHeight+"px",transform:"scale("+e.scale+","+e.scale+") translate3d("+e.x/e.scale+"px,"+e.y/e.scale+"px,0)rotateZ("+90*e.rotate+"deg)"})},[t.createElementVNode("img",{src:e.imgs,alt:"cropper-img",ref:"cropperImg"},null,8,h)],4),[[t.vShow,!e.loading]])])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["cropper-drag-box",{"cropper-move":e.move&&!e.crop,"cropper-crop":e.crop,"cropper-modal":e.cropping}]),onMousedown:i[0]||(i[0]=(...t)=>l.startMove&&l.startMove(...t)),onTouchstart:i[1]||(i[1]=(...t)=>l.startMove&&l.startMove(...t))},null,34),t.withDirectives(t.createElementVNode("div",{class:"cropper-crop-box",style:t.normalizeStyle({width:e.cropW+"px",height:e.cropH+"px",transform:"translate3d("+e.cropOffsertX+"px,"+e.cropOffsertY+"px,0)"})},[t.createElementVNode("span",r,[t.createElementVNode("img",{style:t.normalizeStyle({width:e.trueWidth+"px",height:e.trueHeight+"px",transform:"scale("+e.scale+","+e.scale+") translate3d("+(e.x-e.cropOffsertX)/e.scale+"px,"+(e.y-e.cropOffsertY)/e.scale+"px,0)rotateZ("+90*e.rotate+"deg)"}),src:e.imgs,alt:"cropper-img"},null,12,a)]),t.createElementVNode("span",{class:"cropper-face cropper-move",onMousedown:i[2]||(i[2]=(...t)=>l.cropMove&&l.cropMove(...t)),onTouchstart:i[3]||(i[3]=(...t)=>l.cropMove&&l.cropMove(...t))},null,32),s.info?(t.openBlock(),t.createElementBlock("span",{key:0,class:"crop-info",style:t.normalizeStyle({top:l.cropInfo.top})},t.toDisplayString(l.cropInfo.width)+" × "+t.toDisplayString(l.cropInfo.height),5)):t.createCommentVNode("",!0),s.fixedBox?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",c,[t.createElementVNode("span",{class:"crop-line line-w",onMousedown:i[4]||(i[4]=t=>l.changeCropSize(t,!1,!0,0,1)),onTouchstart:i[5]||(i[5]=t=>l.changeCropSize(t,!1,!0,0,1))},null,32),t.createElementVNode("span",{class:"crop-line line-a",onMousedown:i[6]||(i[6]=t=>l.changeCropSize(t,!0,!1,1,0)),onTouchstart:i[7]||(i[7]=t=>l.changeCropSize(t,!0,!1,1,0))},null,32),t.createElementVNode("span",{class:"crop-line line-s",onMousedown:i[8]||(i[8]=t=>l.changeCropSize(t,!1,!0,0,2)),onTouchstart:i[9]||(i[9]=t=>l.changeCropSize(t,!1,!0,0,2))},null,32),t.createElementVNode("span",{class:"crop-line line-d",onMousedown:i[10]||(i[10]=t=>l.changeCropSize(t,!0,!1,2,0)),onTouchstart:i[11]||(i[11]=t=>l.changeCropSize(t,!0,!1,2,0))},null,32),t.createElementVNode("span",{class:"crop-point point1",onMousedown:i[12]||(i[12]=t=>l.changeCropSize(t,!0,!0,1,1)),onTouchstart:i[13]||(i[13]=t=>l.changeCropSize(t,!0,!0,1,1))},null,32),t.createElementVNode("span",{class:"crop-point point2",onMousedown:i[14]||(i[14]=t=>l.changeCropSize(t,!1,!0,0,1)),onTouchstart:i[15]||(i[15]=t=>l.changeCropSize(t,!1,!0,0,1))},null,32),t.createElementVNode("span",{class:"crop-point point3",onMousedown:i[16]||(i[16]=t=>l.changeCropSize(t,!0,!0,2,1)),onTouchstart:i[17]||(i[17]=t=>l.changeCropSize(t,!0,!0,2,1))},null,32),t.createElementVNode("span",{class:"crop-point point4",onMousedown:i[18]||(i[18]=t=>l.changeCropSize(t,!0,!1,1,0)),onTouchstart:i[19]||(i[19]=t=>l.changeCropSize(t,!0,!1,1,0))},null,32),t.createElementVNode("span",{class:"crop-point point5",onMousedown:i[20]||(i[20]=t=>l.changeCropSize(t,!0,!1,2,0)),onTouchstart:i[21]||(i[21]=t=>l.changeCropSize(t,!0,!1,2,0))},null,32),t.createElementVNode("span",{class:"crop-point point6",onMousedown:i[22]||(i[22]=t=>l.changeCropSize(t,!0,!0,1,2)),onTouchstart:i[23]||(i[23]=t=>l.changeCropSize(t,!0,!0,1,2))},null,32),t.createElementVNode("span",{class:"crop-point point7",onMousedown:i[24]||(i[24]=t=>l.changeCropSize(t,!1,!0,0,2)),onTouchstart:i[25]||(i[25]=t=>l.changeCropSize(t,!1,!0,0,2))},null,32),t.createElementVNode("span",{class:"crop-point point8",onMousedown:i[26]||(i[26]=t=>l.changeCropSize(t,!0,!0,2,2)),onTouchstart:i[27]||(i[27]=t=>l.changeCropSize(t,!0,!0,2,2))},null,32)]))],4),[[t.vShow,e.cropping]])],544)}],["__scopeId","data-v-168a3964"]]),p={class:"h-full"},l={class:"avatar-upload-preview"},d=["src"],u=t.defineComponent({__name:"uploadAvatar",props:{avatar:{default:""},close:{type:Function,default:close},proxyId:{default:""}},setup(e){const{postSinglefile:s,postUpdateFile:o}=i.useFileController(),h=e;let r=t.ref({});t.onMounted((async()=>{r.value=await i.systemStore.get("userInfo")}));let{avatar:a}=t.toRefs(h);const c=t.reactive({img:"",autoCrop:!0,autoCropWidth:200,autoCropHeight:200,fixedBox:!1,outputSize:.5,outputType:"jpeg",canScale:!1,fixed:!1,fixedNumber:[1,1],full:!0,canMoveBox:!1,original:!1,centerBox:!1,infoTrue:!0,filename:""}),u=t.ref({}),g=t.ref({});t.ref(!1);let m=t=>{"left"==t&&g.value.rotateLeft(),"right"==t&&g.value.rotateRight()},f=t=>{const e=t||1;g.value.changeScale(e)},v=()=>{g.value.refresh()};const w=t=>{u.value=t};let x=()=>{},C=t=>{if(!["image/png","image/jpg","image/jpeg","image/PNG","image/JPG","image/JPEG","image/gif"].includes(t.type))return i.ElMessage.error("图片格式有误,请重新上传"),!1;{const e=new FileReader;e.readAsDataURL(t),e.onload=()=>{c.img=e.result,c.filename=t.name}}},y=()=>{c.img||i.ElMessage.warning("请先选择图片"),g.value.getCropBlob((async t=>{const e=await s({data:{file:t},proxy:h.proxyId}),i=await o({data:{id:r.value.id,attchIdArrStr:e.data.id,attachType:2},proxy:h.proxyId});h.close(i)}))};return t.onMounted((()=>{setTimeout((()=>{c.img=a.value}),100)})),(e,i)=>{const s=t.resolveComponent("el-col"),o=t.resolveComponent("el-row"),h=t.resolveComponent("bc-icon"),r=t.resolveComponent("el-button"),a=t.resolveComponent("hs-upload");return t.openBlock(),t.createElementBlock("div",p,[t.createVNode(o,null,{default:t.withCtx((()=>[t.createVNode(s,{xs:24,md:13,style:{height:"350px"}},{default:t.withCtx((()=>[t.createVNode(n,{ref_key:"cropperRef",ref:g,img:c.img,info:!0,infoTrue:c.infoTrue,"auto-crop":c.autoCrop,"fixed-box":c.fixedBox,fixedNumber:c.fixedNumber,fixed:c.fixed,centerBox:c.centerBox,outputType:"png",onRealTime:w},null,8,["img","infoTrue","auto-crop","fixed-box","fixedNumber","fixed","centerBox"])])),_:1}),t.createVNode(s,{xs:24,md:11,style:{height:"350px"}},{default:t.withCtx((()=>[t.createElementVNode("div",l,[t.createElementVNode("img",{src:u.value.url,style:t.normalizeStyle(u.value.img)},null,12,d)])])),_:1})])),_:1}),t.createVNode(o,{class:"ptb2 py-3"},{default:t.withCtx((()=>[t.createVNode(s,{lg:2,md:2},{default:t.withCtx((()=>[t.createVNode(a,{action:"#","http-request":t.unref(x),"show-file-list":!1,"before-upload":t.unref(C),accept:"image/*"},{default:t.withCtx((()=>[t.createVNode(r,{size:"default"},{default:t.withCtx((()=>[i[6]||(i[6]=t.createTextVNode(" 选择 ")),t.createVNode(h,{name:"ele-UploadFilled"})])),_:1})])),_:1},8,["http-request","before-upload"])])),_:1}),t.createVNode(s,{lg:{span:1,offset:1},md:2},{default:t.withCtx((()=>[t.createVNode(r,{size:"default",icon:"ele-Plus",onClick:i[0]||(i[0]=e=>t.unref(f)(1))})])),_:1}),t.createVNode(s,{lg:{span:1,offset:1},md:2},{default:t.withCtx((()=>[t.createVNode(r,{size:"default",icon:"ele-Minus",onClick:i[1]||(i[1]=e=>t.unref(f)(-1))})])),_:1}),t.createVNode(s,{lg:{span:1,offset:1},md:2},{default:t.withCtx((()=>[t.createVNode(r,{size:"default",icon:"ele-RefreshLeft",onClick:i[2]||(i[2]=e=>t.unref(m)("left"))})])),_:1}),t.createVNode(s,{lg:{span:1,offset:1},md:2},{default:t.withCtx((()=>[t.createVNode(r,{size:"default",icon:"ele-RefreshRight",onClick:i[3]||(i[3]=e=>t.unref(m)("right"))})])),_:1}),t.createVNode(s,{lg:{span:1,offset:1},md:2},{default:t.withCtx((()=>[t.createVNode(r,{size:"default",onClick:i[4]||(i[4]=e=>t.unref(v)())},{default:t.withCtx((()=>i[7]||(i[7]=[t.createTextVNode("重 置")]))),_:1})])),_:1}),t.createVNode(s,{lg:{span:1,offset:7},md:2},{default:t.withCtx((()=>[t.createVNode(r,{size:"default",type:"primary",onClick:i[5]||(i[5]=e=>t.unref(y)())},{default:t.withCtx((()=>i[8]||(i[8]=[t.createTextVNode("提 交")]))),_:1})])),_:1})])),_:1})])}}}),g=i._export_sfc(u,[["__scopeId","data-v-99513ec9"]]);exports.default=g;
Binary file
@@ -1,5 +1,5 @@
1
- import { reactive, computed, defineComponent, onMounted, ref, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, unref, Fragment, renderList, createBlock, toDisplayString, createCommentVNode } from "vue";
2
- import { z as v4, e as _, B as treeToList, d as ElMessage, S as Session, h as useFieldConfigController, C as useMenuController, i as useSystemController, _ as _export_sfc, g as showPopup, H as HsMessage, D as HsMessageBox } from "./index-D-exFdW6.mjs";
1
+ import { reactive, computed, defineComponent, onMounted, ref, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, unref, Fragment, renderList, createBlock, toDisplayString, createCommentVNode, createTextVNode } from "vue";
2
+ import { r as v4, e as _, A as treeToList, d as ElMessage, S as Session, h as useFieldConfigController, B as useMenuController, i as useSystemController, _ as _export_sfc, g as showPopup, H as HsMessageBox, C as HsMessage } from "./index-BKZ-Mf0o.mjs";
3
3
  let formData = {
4
4
  config_name: "",
5
5
  config_unique_id: v4(),
@@ -109,7 +109,6 @@ function useCloneConfig(props) {
109
109
  return;
110
110
  dialogData.configList = _.cloneDeep(res.data).map((item) => {
111
111
  let fieldData = JSON.parse(item.field_json);
112
- console.log("fieldData", fieldData, systemData);
113
112
  fieldData.btns = fieldData.btns.map((btnItem) => {
114
113
  if (!props.linkItem) {
115
114
  btnItem.id = v4();
@@ -243,55 +242,49 @@ function useCloneConfig(props) {
243
242
  let config = _.cloneDeep(dialogData.currentConfig);
244
243
  config.config_name = "";
245
244
  config.config_unique_id = v4();
246
- return Promise.resolve(config);
245
+ props.close(config);
247
246
  } else {
248
247
  ElMessage.warning("请选择配置");
249
- return Promise.reject();
250
248
  }
251
249
  };
252
- function confirmLinkCommon() {
250
+ function confirmLinkCommon(type) {
253
251
  if (dialogData.currentConfig) {
254
252
  let config = _.cloneDeep(dialogData.currentConfig);
255
- return Promise.resolve({
253
+ props.close({
254
+ type,
256
255
  config,
257
256
  dialogData
258
257
  });
259
258
  } else {
260
259
  ElMessage.warning("请选择配置");
261
- return Promise.reject();
262
260
  }
263
261
  }
264
262
  return { initData, onChangeMenu, onChangeConfig, onChangeSystem, dialogData, confirm, confirmLinkCommon };
265
263
  }
266
- const _hoisted_1 = { class: "h-full" };
267
- const _hoisted_2 = { style: { "height": "50px" } };
268
- const _hoisted_3 = {
264
+ const _hoisted_1 = { class: "h-full flex flex-col" };
265
+ const _hoisted_2 = { class: "flex-1" };
266
+ const _hoisted_3 = { style: { "height": "50px" } };
267
+ const _hoisted_4 = {
269
268
  key: 0,
270
269
  class: "w-full",
271
270
  style: { "height": "calc(100% - 50px)", "overflow": "auto" }
272
271
  };
273
- const _hoisted_4 = { key: 0 };
274
- const _hoisted_5 = { class: "flex px-4 flex-wrap" };
272
+ const _hoisted_5 = { key: 0 };
275
273
  const _hoisted_6 = { class: "flex px-4 flex-wrap" };
274
+ const _hoisted_7 = { class: "flex px-4 flex-wrap" };
275
+ const _hoisted_8 = { class: "h-16 flex items-center justify-center" };
276
276
  const _sfc_main = /* @__PURE__ */ defineComponent({
277
277
  __name: "cloneConfigDialog",
278
278
  props: {
279
+ close: Function,
279
280
  linkItem: Boolean
280
281
  },
281
- setup(__props, { expose: __expose }) {
282
+ setup(__props) {
282
283
  const props = __props;
283
284
  const { dialogData, initData, onChangeMenu, onChangeConfig, onChangeSystem, confirm, confirmLinkCommon } = useCloneConfig(props);
284
285
  onMounted(() => {
285
286
  initData();
286
287
  });
287
- __expose({
288
- getData() {
289
- return {
290
- confirm,
291
- confirmLinkCommon
292
- };
293
- }
294
- });
295
288
  const casProp = ref({ label: "title", value: "id" });
296
289
  return (_ctx, _cache) => {
297
290
  const _component_hs_option = resolveComponent("hs-option");
@@ -299,102 +292,149 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
299
292
  const _component_hs_form_item = resolveComponent("hs-form-item");
300
293
  const _component_hs_cascader = resolveComponent("hs-cascader");
301
294
  const _component_hs_form = resolveComponent("hs-form");
295
+ const _component_hs_button = resolveComponent("hs-button");
302
296
  return openBlock(), createElementBlock("div", _hoisted_1, [
303
297
  createElementVNode("div", _hoisted_2, [
304
- createVNode(_component_hs_form, { inline: "" }, {
305
- default: withCtx(() => [
306
- createVNode(_component_hs_form_item, { label: "系统:" }, {
307
- default: withCtx(() => [
308
- createVNode(_component_hs_select, {
309
- disabled: __props.linkItem,
310
- onChange: unref(onChangeSystem),
311
- modelValue: unref(dialogData).currentSystemValue,
312
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(dialogData).currentSystemValue = $event),
313
- style: { "width": "240px" }
314
- }, {
315
- default: withCtx(() => [
316
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(dialogData).systemList, (item) => {
317
- return openBlock(), createBlock(_component_hs_option, {
318
- key: item.project_code,
319
- label: item.project_name,
320
- value: item.project_code
321
- }, null, 8, ["label", "value"]);
322
- }), 128))
323
- ]),
324
- _: 1
325
- }, 8, ["disabled", "onChange", "modelValue"])
326
- ]),
327
- _: 1
328
- }),
329
- createVNode(_component_hs_form_item, { label: "菜单:" }, {
330
- default: withCtx(() => [
331
- createVNode(_component_hs_cascader, {
332
- onChange: unref(onChangeMenu),
333
- modelValue: unref(dialogData).currentMenuValue,
334
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(dialogData).currentMenuValue = $event),
335
- options: unref(dialogData).menuList,
336
- props: casProp.value
337
- }, null, 8, ["onChange", "modelValue", "options", "props"])
338
- ]),
339
- _: 1
340
- }),
341
- createVNode(_component_hs_form_item, { label: "配置:" }, {
342
- default: withCtx(() => [
343
- createVNode(_component_hs_select, {
344
- onChange: unref(onChangeConfig),
345
- modelValue: unref(dialogData).currentConfigValue,
346
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(dialogData).currentConfigValue = $event),
347
- style: { "width": "240px" }
348
- }, {
349
- default: withCtx(() => [
350
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(dialogData).configList, (item) => {
351
- return openBlock(), createBlock(_component_hs_option, {
352
- key: item.config_unique_id,
353
- label: item.config_name,
354
- value: item.config_unique_id
355
- }, null, 8, ["label", "value"]);
356
- }), 128))
357
- ]),
358
- _: 1
359
- }, 8, ["onChange", "modelValue"])
360
- ]),
361
- _: 1
362
- })
363
- ]),
364
- _: 1
365
- })
366
- ]),
367
- unref(dialogData).currentConfig ? (openBlock(), createElementBlock("div", _hoisted_3, [
368
- unref(dialogData).currentConfig.btns.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4, [
369
- _cache[3] || (_cache[3] = createElementVNode("div", { class: "title font-medium my-2" }, "按钮", -1)),
370
- createElementVNode("div", _hoisted_5, [
371
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(dialogData).currentConfig.btns, (btnItem) => {
372
- return openBlock(), createElementBlock("div", {
373
- class: "p-2 mx-2 border-dashed rounded-md border flex-nowrap mb-2",
374
- key: btnItem.id
375
- }, toDisplayString(btnItem.data.name) + "--" + toDisplayString(btnItem.data.key), 1);
376
- }), 128))
377
- ])
378
- ])) : createCommentVNode("", true),
379
- unref(dialogData).currentConfig.forms ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(dialogData).currentConfig.forms, (formItem, formIndex) => {
380
- return openBlock(), createElementBlock("div", { key: formIndex }, [
381
- _cache[4] || (_cache[4] = createElementVNode("div", { class: "title font-medium my-2" }, "表单项", -1)),
298
+ createElementVNode("div", _hoisted_3, [
299
+ createVNode(_component_hs_form, { inline: "" }, {
300
+ default: withCtx(() => [
301
+ createVNode(_component_hs_form_item, { label: "系统:" }, {
302
+ default: withCtx(() => [
303
+ createVNode(_component_hs_select, {
304
+ disabled: __props.linkItem,
305
+ onChange: unref(onChangeSystem),
306
+ modelValue: unref(dialogData).currentSystemValue,
307
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(dialogData).currentSystemValue = $event),
308
+ style: { "width": "240px" }
309
+ }, {
310
+ default: withCtx(() => [
311
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(dialogData).systemList, (item) => {
312
+ return openBlock(), createBlock(_component_hs_option, {
313
+ key: item.project_code,
314
+ label: item.project_name,
315
+ value: item.project_code
316
+ }, null, 8, ["label", "value"]);
317
+ }), 128))
318
+ ]),
319
+ _: 1
320
+ }, 8, ["disabled", "onChange", "modelValue"])
321
+ ]),
322
+ _: 1
323
+ }),
324
+ createVNode(_component_hs_form_item, { label: "菜单:" }, {
325
+ default: withCtx(() => [
326
+ createVNode(_component_hs_cascader, {
327
+ onChange: unref(onChangeMenu),
328
+ modelValue: unref(dialogData).currentMenuValue,
329
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(dialogData).currentMenuValue = $event),
330
+ options: unref(dialogData).menuList,
331
+ props: casProp.value
332
+ }, null, 8, ["onChange", "modelValue", "options", "props"])
333
+ ]),
334
+ _: 1
335
+ }),
336
+ createVNode(_component_hs_form_item, { label: "配置:" }, {
337
+ default: withCtx(() => [
338
+ createVNode(_component_hs_select, {
339
+ onChange: unref(onChangeConfig),
340
+ modelValue: unref(dialogData).currentConfigValue,
341
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(dialogData).currentConfigValue = $event),
342
+ style: { "width": "240px" }
343
+ }, {
344
+ default: withCtx(() => [
345
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(dialogData).configList, (item) => {
346
+ return openBlock(), createBlock(_component_hs_option, {
347
+ key: item.config_unique_id,
348
+ label: item.config_name,
349
+ value: item.config_unique_id
350
+ }, null, 8, ["label", "value"]);
351
+ }), 128))
352
+ ]),
353
+ _: 1
354
+ }, 8, ["onChange", "modelValue"])
355
+ ]),
356
+ _: 1
357
+ })
358
+ ]),
359
+ _: 1
360
+ })
361
+ ]),
362
+ unref(dialogData).currentConfig ? (openBlock(), createElementBlock("div", _hoisted_4, [
363
+ unref(dialogData).currentConfig.btns.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_5, [
364
+ _cache[6] || (_cache[6] = createElementVNode("div", { class: "title font-medium my-2" }, "按钮", -1)),
382
365
  createElementVNode("div", _hoisted_6, [
383
- (openBlock(true), createElementBlock(Fragment, null, renderList(formItem.form.formConfig, (formConfigItem, formConfigIndex) => {
366
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(dialogData).currentConfig.btns, (btnItem) => {
384
367
  return openBlock(), createElementBlock("div", {
385
368
  class: "p-2 mx-2 border-dashed rounded-md border flex-nowrap mb-2",
386
- key: formConfigIndex
387
- }, toDisplayString(formConfigItem.data.elementItem[0].baseData.label) + "--" + toDisplayString(formConfigItem.data.elementItem[0].baseData.prop), 1);
369
+ key: btnItem.id
370
+ }, toDisplayString(btnItem.data.name) + "--" + toDisplayString(btnItem.data.key), 1);
388
371
  }), 128))
389
372
  ])
390
- ]);
391
- }), 128)) : createCommentVNode("", true)
392
- ])) : createCommentVNode("", true)
373
+ ])) : createCommentVNode("", true),
374
+ unref(dialogData).currentConfig.forms ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(dialogData).currentConfig.forms, (formItem, formIndex) => {
375
+ return openBlock(), createElementBlock("div", { key: formIndex }, [
376
+ _cache[7] || (_cache[7] = createElementVNode("div", { class: "title font-medium my-2" }, "表单项", -1)),
377
+ createElementVNode("div", _hoisted_7, [
378
+ (openBlock(true), createElementBlock(Fragment, null, renderList(formItem.form.formConfig, (formConfigItem, formConfigIndex) => {
379
+ return openBlock(), createElementBlock("div", {
380
+ class: "p-2 mx-2 border-dashed rounded-md border flex-nowrap mb-2",
381
+ key: formConfigIndex
382
+ }, toDisplayString(formConfigItem.data.elementItem[0].baseData.label) + "--" + toDisplayString(formConfigItem.data.elementItem[0].baseData.prop), 1);
383
+ }), 128))
384
+ ])
385
+ ]);
386
+ }), 128)) : createCommentVNode("", true)
387
+ ])) : createCommentVNode("", true)
388
+ ]),
389
+ createElementVNode("footer", _hoisted_8, [
390
+ createVNode(_component_hs_button, {
391
+ size: "default",
392
+ onClick: _cache[3] || (_cache[3] = ($event) => __props.close("cancel"))
393
+ }, {
394
+ default: withCtx(() => _cache[8] || (_cache[8] = [
395
+ createTextVNode("关闭")
396
+ ])),
397
+ _: 1
398
+ }),
399
+ !__props.linkItem ? (openBlock(), createBlock(_component_hs_button, {
400
+ key: 0,
401
+ type: "primary",
402
+ size: "default",
403
+ onClick: unref(confirm)
404
+ }, {
405
+ default: withCtx(() => _cache[9] || (_cache[9] = [
406
+ createTextVNode("确定")
407
+ ])),
408
+ _: 1
409
+ }, 8, ["onClick"])) : createCommentVNode("", true),
410
+ __props.linkItem ? (openBlock(), createBlock(_component_hs_button, {
411
+ key: 1,
412
+ type: "primary",
413
+ size: "default",
414
+ onClick: _cache[4] || (_cache[4] = ($event) => unref(confirmLinkCommon)("merge"))
415
+ }, {
416
+ default: withCtx(() => _cache[10] || (_cache[10] = [
417
+ createTextVNode("合并当前配置")
418
+ ])),
419
+ _: 1
420
+ })) : createCommentVNode("", true),
421
+ __props.linkItem ? (openBlock(), createBlock(_component_hs_button, {
422
+ key: 2,
423
+ type: "primary",
424
+ size: "default",
425
+ onClick: _cache[5] || (_cache[5] = ($event) => unref(confirmLinkCommon)("link"))
426
+ }, {
427
+ default: withCtx(() => _cache[11] || (_cache[11] = [
428
+ createTextVNode("引用当前配置")
429
+ ])),
430
+ _: 1
431
+ })) : createCommentVNode("", true)
432
+ ])
393
433
  ]);
394
434
  };
395
435
  }
396
436
  });
397
- const cloneConfigDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6fa015d8"]]);
437
+ const cloneConfigDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5e8600d6"]]);
398
438
  const cloneConfigDialog$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
399
439
  __proto__: null,
400
440
  default: cloneConfigDialog
@@ -585,19 +625,10 @@ function useSaveForm(emits, saveFormRef, props) {
585
625
  const openCloneDialog = () => {
586
626
  showPopup(cloneConfigDialog, null, {
587
627
  title: "请选择所需配置",
588
- mask: true,
589
- confirmButtonText: "确定",
590
- showFooter: true,
591
- async success({ type, close, data }) {
592
- if (type == "cancel") {
593
- close();
594
- } else if (type == "confirm") {
595
- let { confirm } = data;
596
- let resData = await confirm();
597
- if (resData) {
598
- cloneConfig(resData);
599
- }
600
- close();
628
+ showFooter: false,
629
+ success(res) {
630
+ if (res.data) {
631
+ cloneConfig(res.data);
601
632
  }
602
633
  }
603
634
  });
@@ -608,52 +639,53 @@ function useSaveForm(emits, saveFormRef, props) {
608
639
  { linkItem: true },
609
640
  {
610
641
  title: "请选择所需配置",
611
- mask: true,
612
- confirmButtonText: "确定",
613
- showFooter: true,
614
- async success({ type, close, data }) {
615
- var _a;
616
- if (type == "cancel") {
617
- close();
618
- } else if (type == "confirm") {
619
- let { confirmLinkCommon } = data;
620
- const resData = await confirmLinkCommon();
621
- const menuInfo = JSON.parse(window.localStorage.getItem("_CURRENT_MENT_FORM_INFO") || "{}");
622
- const common_menu_id = resData.dialogData.currentMenuValue[resData.dialogData.currentMenuValue.length - 1];
623
- const linkConfig = {
624
- // 即将被关联的配置数据信息
625
- common_config_unique_id: resData.config.config_unique_id,
626
- common_menu_id,
627
- common_config_name: resData.config.config_name,
628
- common_page_name: resData.dialogData.currentMenuName,
629
- // 当前要关联的配置数据信息
630
- config_name: formConfig2.value.formData.config_name,
631
- page_name: menuInfo.title,
632
- config_unique_id: formConfig2.value.formData.config_unique_id,
633
- menu_id: menuInfo.id,
634
- project_code: resData.dialogData.currentSystemValue
635
- };
636
- if ((_a = linkUniqueInfo.value) == null ? void 0 : _a.id) {
637
- linkConfig.id = linkUniqueInfo.value.id;
638
- }
639
- postSaveConfigRelate(linkConfig).then((res) => {
640
- if (res.code === 1) {
641
- HsMessage.success("关联成功");
642
- postgGtConfigRelate({
643
- config_unique_id: formConfig2.value.formData.config_unique_id,
644
- menu_id: menuInfo.id,
645
- project_code: menuInfo.project_code
646
- }).then((res2) => {
647
- linkUniqueInfo.value = _.get(res2, "data", {});
648
- });
649
- close();
650
- }
651
- });
652
- }
642
+ showFooter: false,
643
+ async success(res) {
644
+ const configFn = {
645
+ linkConfigData,
646
+ mergeConfigData
647
+ };
648
+ _.get(configFn, `${res.data.type}ConfigData`)(res.data);
653
649
  }
654
650
  }
655
651
  );
656
652
  }
653
+ function linkConfigData(resData) {
654
+ var _a;
655
+ const menuInfo = JSON.parse(window.localStorage.getItem("_CURRENT_MENT_FORM_INFO") || "{}");
656
+ const common_menu_id = resData.dialogData.currentMenuValue[resData.dialogData.currentMenuValue.length - 1];
657
+ const linkConfig = {
658
+ // 即将被关联的配置数据信息
659
+ common_config_unique_id: resData.config.config_unique_id,
660
+ common_menu_id,
661
+ common_config_name: resData.config.config_name,
662
+ common_page_name: resData.dialogData.currentMenuName,
663
+ // 当前要关联的配置数据信息
664
+ config_name: formConfig2.value.formData.config_name,
665
+ page_name: menuInfo.title,
666
+ config_unique_id: formConfig2.value.formData.config_unique_id,
667
+ menu_id: menuInfo.id,
668
+ project_code: resData.dialogData.currentSystemValue
669
+ };
670
+ if ((_a = linkUniqueInfo.value) == null ? void 0 : _a.id) {
671
+ linkConfig.id = linkUniqueInfo.value.id;
672
+ }
673
+ postSaveConfigRelate(linkConfig).then((res) => {
674
+ if (res.code === 1) {
675
+ HsMessage.success("关联成功");
676
+ postgGtConfigRelate({
677
+ config_unique_id: formConfig2.value.formData.config_unique_id,
678
+ menu_id: menuInfo.id,
679
+ project_code: menuInfo.project_code
680
+ }).then((res2) => {
681
+ linkUniqueInfo.value = _.get(res2, "data", {});
682
+ });
683
+ }
684
+ });
685
+ }
686
+ function mergeConfigData(resData) {
687
+ emits("merge", resData.config);
688
+ }
657
689
  function deleteLinkCommonDialog() {
658
690
  HsMessageBox.alert("确定删除当前引用吗", "提示", {
659
691
  showCancelButton: true,
Binary file