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.
- package/dist/{401-D9fdZqkE.js → 401-D_pa_Pnl.js} +1 -1
- package/dist/{401-CU6PWkYt.mjs → 401-tWrEsA80.mjs} +1 -1
- package/dist/{404-Dy_Jb19z.mjs → 404-CtNEj2R1.mjs} +1 -1
- package/dist/{404-Dy_Jb19z.mjs.gz → 404-CtNEj2R1.mjs.gz} +0 -0
- package/dist/{404-CVYVZDOp.js → 404-DzWVfzOE.js} +1 -1
- package/dist/{404-CVYVZDOp.js.gz → 404-DzWVfzOE.js.gz} +0 -0
- package/dist/{account-bqFDKumj.mjs → account-DuG2eqI9.mjs} +2 -2
- package/dist/account-DuG2eqI9.mjs.gz +0 -0
- package/dist/{account-C-DV8Mx6.js → account-uMV0NjHa.js} +1 -1
- package/dist/account-uMV0NjHa.js.gz +0 -0
- package/dist/{aside-BDqzV6zw.js → aside-BpbcOb10.js} +1 -1
- package/dist/{aside-YKEgPDZW.mjs → aside-iGuCxPDp.mjs} +3 -3
- package/dist/{btnIndex-DV89yeVB.mjs → btnIndex-B9MrEtmf.mjs} +2 -2
- package/dist/btnIndex-B9MrEtmf.mjs.gz +0 -0
- package/dist/{btnIndex-C9-v44fJ.js → btnIndex-BNmUP0AA.js} +1 -1
- package/dist/{classic-D4Kmr6fm.js → classic-B13rCly-.js} +1 -1
- package/dist/{classic-Dyvp8vfW.mjs → classic-C0oA9Yb2.mjs} +5 -5
- package/dist/{columns-CRirYK20.js → columns-Dg_RDldt.js} +1 -1
- package/dist/{columns-Dvq6E1Mn.mjs → columns-RPRohazl.mjs} +5 -5
- package/dist/{columnsAside-BDbPuupb.js → columnsAside-BdfVxhfi.js} +1 -1
- package/dist/{columnsAside-DjGVJJTd.mjs → columnsAside-CPcs06IW.mjs} +1 -1
- package/dist/{contextmenu-jLVq_0Xn.js → contextmenu-B726BUx8.js} +1 -1
- package/dist/{contextmenu-z9rv6elh.mjs → contextmenu-Bbip36tz.mjs} +1 -1
- package/dist/{contextmenu-BITqKri7.js → contextmenu-CvG230Ys.js} +1 -1
- package/dist/{contextmenu-sOYwkPHk.mjs → contextmenu-DE62nl1K.mjs} +1 -1
- package/dist/{copyMenuConfig-DNXyw2fB.js → copyMenuConfig-DKQiEWow.js} +1 -1
- package/dist/{copyMenuConfig-CDbGGanV.mjs → copyMenuConfig-DR32vpc8.mjs} +1 -1
- package/dist/{copyMenuConfig.vue_vue_type_script_setup_true_lang-Cp1yBzdn.js → copyMenuConfig.vue_vue_type_script_setup_true_lang-BoPu1wn5.js} +1 -1
- 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
- package/dist/{copySystem-BfIy74LQ.mjs → copySystem-BRISbN0c.mjs} +1 -1
- package/dist/{copySystem-BttSNXtV.js → copySystem-BoLJPdlL.js} +1 -1
- 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
- package/dist/{copySystem.vue_vue_type_script_setup_true_lang-AYfZDVxG.js → copySystem.vue_vue_type_script_setup_true_lang-ng2mkZRm.js} +1 -1
- package/dist/{defaults-Bw4v6G-S.js → defaults-C4PsiM_1.js} +1 -1
- package/dist/{defaults-BHrQG9-V.mjs → defaults-DBXmaqAs.mjs} +4 -4
- package/dist/{dialog-HzDa6vY_.js → dialog-B8EWjOKo.js} +1 -1
- package/dist/{dialog-BFDMQMpr.mjs → dialog-BDeYAKi8.mjs} +1 -1
- package/dist/{dialog-B1N9_Ref.js → dialog-Cp4PesvT.js} +1 -1
- package/dist/{dialog-CGi0A91c.js → dialog-DIAbWrH7.js} +1 -1
- package/dist/{dialog-CS7sL_9E.mjs → dialog-bCzOfStM.mjs} +1 -1
- package/dist/{dialog-BLhtTkus.mjs → dialog-yX99oSG2.mjs} +1 -1
- 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
- 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
- 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
- package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang--koM1rDJ.js.gz +0 -0
- 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
- package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-DQrc9XWS.mjs.gz +0 -0
- package/dist/{dictDialog-Dp5G1bBl.js → dictDialog-DeZlHTK8.js} +1 -1
- package/dist/{dictDialog-Cj_4s1eI.mjs → dictDialog-qQ0SM6mo.mjs} +1 -1
- 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
- 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
- package/dist/{dictItemDialog-CY2QS-xo.mjs → dictItemDialog-BHNkPx3R.mjs} +1 -1
- package/dist/{dictItemDialog-dO3QfbT0.js → dictItemDialog-nYouCT_X.js} +1 -1
- package/dist/{dictItemDialog.vue_vue_type_script_setup_true_lang-BmlNmLbQ.mjs → dictItemDialog.vue_vue_type_script_setup_true_lang-B7TW97Rv.mjs} +2 -2
- package/dist/{dictItemDialog.vue_vue_type_script_setup_true_lang-BO5fgDqb.js → dictItemDialog.vue_vue_type_script_setup_true_lang-CzOl9YWc.js} +1 -1
- package/dist/{editDialog-8vwRj9-4.mjs → editDialog-PPdDhe77.mjs} +1 -1
- package/dist/{editDialog-CB6Vk8Ch.js → editDialog-yDvEGf5d.js} +1 -1
- package/dist/{formConfig-BE7jjbgI.mjs → formConfig-CnzkNobl.mjs} +79 -9
- package/dist/formConfig-CnzkNobl.mjs.gz +0 -0
- package/dist/formConfig-DbpseZE1.js +1 -0
- package/dist/{header-CzPs0Z36.js → header-2lxcdAtf.js} +1 -1
- package/dist/{header--u7DS0WG.mjs → header-B_hdTwQt.mjs} +2 -2
- package/dist/{horizontal-Bcv1yzdR.js → horizontal-D3lztVx9.js} +1 -1
- package/dist/{horizontal-3BLriLab.mjs → horizontal-D6uYcVV0.mjs} +2 -2
- package/dist/{hsAttrBtn-BV6pRTMG.mjs → hsAttrBtn-BId2LPGW.mjs} +1 -1
- package/dist/{hsAttrBtn-Cs7cDGIw.js → hsAttrBtn-Dm92qeaF.js} +1 -1
- 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
- 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
- package/dist/{hsAttrForm-H5AwBfwg.mjs → hsAttrForm-Cokawcn2.mjs} +1 -1
- package/dist/{hsAttrForm-zgCkcTpG.js → hsAttrForm-Dl80LoJi.js} +1 -1
- package/dist/{hsAttrForm.vue_vue_type_script_setup_true_lang-p1ZTjUK2.mjs → hsAttrForm.vue_vue_type_script_setup_true_lang-BMbtICww.mjs} +2 -2
- package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-BMbtICww.mjs.gz +0 -0
- package/dist/{hsAttrForm.vue_vue_type_script_setup_true_lang-BX2tx5_-.js → hsAttrForm.vue_vue_type_script_setup_true_lang-CJMcfNWw.js} +1 -1
- package/dist/{hsBtnConfigList-B3mBRp3X.mjs → hsBtnConfigList-C19iSgZ9.mjs} +14 -9
- package/dist/hsBtnConfigList-DTAH0fCu.js +1 -0
- package/dist/{hsBtnItemConfig-CX1Ha6ky.js → hsBtnItemConfig-CEMcZe_h.js} +1 -1
- package/dist/{hsBtnItemConfig-i5iD4Phc.mjs → hsBtnItemConfig-zpsaY8dt.mjs} +1 -1
- package/dist/{hsBtnItemConfig.vue_vue_type_script_setup_true_lang-BreNnMk0.js → hsBtnItemConfig.vue_vue_type_script_setup_true_lang-BAlgZbON.js} +1 -1
- 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
- package/dist/{hsBtnPanel-Cy3ocV0x.js → hsBtnPanel-Cunjykv2.js} +1 -1
- package/dist/{hsBtnPanel-Bg63rOGd.mjs → hsBtnPanel-h_eFBCZ2.mjs} +1 -1
- 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
- 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
- package/dist/{hsExpand-DwYnBJiS.mjs → hsExpand-CkZm8rUz.mjs} +1 -1
- package/dist/{hsExpand-B8_Zfr4b.js → hsExpand-DDdQEHSc.js} +1 -1
- 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
- package/dist/{hsExpand.vue_vue_type_script_setup_true_lang-Dsa5eP6k.mjs → hsExpand.vue_vue_type_script_setup_true_lang-D8YdJXEj.mjs} +1 -1
- package/dist/{hsFormConfig-BDXqlU1Z.mjs → hsFormConfig-BGwvnlcp.mjs} +1 -1
- package/dist/{hsFormConfig-DD3AJtYR.js → hsFormConfig-D13Y72pC.js} +1 -1
- package/dist/{hsFormConfigList-Cj6JmCRg.mjs → hsFormConfigList-C1-Oeb9D.mjs} +13 -8
- package/dist/hsFormConfigList-C1-Oeb9D.mjs.gz +0 -0
- package/dist/hsFormConfigList-Dz0KTnCt.js +1 -0
- package/dist/{hsFormPanel-cONTsW7b.mjs → hsFormPanel-B8YifLnn.mjs} +7 -8
- package/dist/hsFormPanel-B8YifLnn.mjs.gz +0 -0
- package/dist/hsFormPanel-cfvPezjG.js +1 -0
- package/dist/{hsFormParse--9pBBPHh.js → hsFormParse-BT5Tp3jY.js} +1 -1
- package/dist/{hsFormParse-DamJpMS0.mjs → hsFormParse-DRzPxbQP.mjs} +1 -1
- package/dist/{hsFormParse.vue_vue_type_script_setup_true_lang-CUtqmF9_.mjs → hsFormParse.vue_vue_type_script_setup_true_lang-BBeucJCj.mjs} +1 -1
- package/dist/{hsFormParse.vue_vue_type_script_setup_true_lang-BEb7ahJm.js → hsFormParse.vue_vue_type_script_setup_true_lang-C99MnWdp.js} +1 -1
- package/dist/{hsPanelItem-IxiMNrX-.mjs → hsPanelItem-DAPFkaxi.mjs} +1 -1
- package/dist/{hsPanelItem-lCFLdGSI.js → hsPanelItem-DzaUk-is.js} +1 -1
- 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
- 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
- package/dist/{iframes-BQDA82uP.mjs → iframes-BjPZZ8c1.mjs} +1 -1
- package/dist/{iframes-COI2zfOj.js → iframes-DTwaTua7.js} +1 -1
- package/dist/{index copy-BKNgM0Ek.mjs → index copy-BjPx9BNT.mjs } +1 -1
- package/dist/index copy-BjPx9BNT.mjs.gz +0 -0
- package/dist/{index copy-BQ67zqfl.js → index copy-CjmejP8D.js } +1 -1
- package/dist/index copy-CjmejP8D.js.gz +0 -0
- package/dist/{index-Cf0C42VI.mjs → index--lfoOtsB.mjs} +1 -1
- package/dist/{index-DKzypJqe.js → index-3NIwgc1v.js} +1 -1
- package/dist/{index-CKAOxjpT.mjs → index-4bsaylHA.mjs} +1 -1
- package/dist/{index-o0bJ7tuy.js → index-67SqxdzO.js} +1 -1
- package/dist/{index-D0YgVMBn.js → index-B-BpjLqQ.js} +1 -1
- package/dist/index-B-BpjLqQ.js.gz +0 -0
- package/dist/{index-C4QvX8Bc.mjs → index-B3-lvS6P.mjs} +1 -1
- package/dist/{index-DXcqNh0C.mjs → index-B5ujCJQ2.mjs} +2 -2
- package/dist/{index-DvtLJ_Is.js → index-B62lsfyd.js} +1 -1
- package/dist/{index-BF-r4tdm.js → index-B9lgK81Q.js} +1 -1
- package/dist/{index-BkmDhpwm.js → index-B9vZWgC_.js} +1 -1
- package/dist/{index-u90ge6v6.mjs → index-BASeEhbB.mjs} +3 -3
- package/dist/{index-C7ZNTGYR.mjs → index-BBRYo3Ga.mjs} +1 -1
- package/dist/{index-BDh7gafl.mjs → index-BDvXBWGU.mjs} +3 -3
- package/dist/{index-D-exFdW6.mjs → index-BKZ-Mf0o.mjs} +754 -411
- package/dist/{index-D-exFdW6.mjs.gz → index-BKZ-Mf0o.mjs.gz} +0 -0
- package/dist/{index-DyusnHgN.mjs → index-BQ8g4zs0.mjs} +1 -1
- package/dist/{index-DO9eaZXv.mjs → index-BWrKYFFm.mjs} +1 -1
- package/dist/{index-B53ZC4m0.mjs → index-BYeSix4_.mjs} +1 -1
- package/dist/{index-BJZjoaAP.js → index-BaLebTV1.js} +1 -1
- package/dist/{index-4i92F0Z3.mjs → index-BsOzLcN6.mjs} +3 -3
- package/dist/{index-DYIOBXbw.mjs → index-Bt7gHYfQ.mjs} +2 -2
- package/dist/index-Bt7gHYfQ.mjs.gz +0 -0
- package/dist/{index-CdmL54dR.mjs → index-BtIrAZH5.mjs} +4 -4
- package/dist/index-BtIrAZH5.mjs.gz +0 -0
- package/dist/{index-DJUOgYIP.mjs → index-CB4GQvwm.mjs} +1 -1
- package/dist/{index-BbwYnESR.js → index-CDEMGD-T.js} +1 -1
- package/dist/{index-CGvVWCOt.js → index-CLwjWDX1.js} +1 -1
- package/dist/{index-CGB2Yw3y.mjs → index-CN_MdZZf.mjs} +1 -1
- package/dist/{index-DLuCdmPj.mjs → index-CSOhLH9t.mjs} +1 -1
- package/dist/{index-Ch9RNNpC.mjs → index-CVJeDn_E.mjs} +1 -1
- package/dist/{index-Uns2uNjk.js → index-CXB7m0ib.js} +1 -1
- package/dist/index-CXB7m0ib.js.gz +0 -0
- package/dist/{index-CdwX2Fia.mjs → index-Cg972NZS.mjs} +1 -1
- package/dist/{index-sElXJiCI.js → index-CiOeW42R.js} +1 -1
- package/dist/{index-zp05b1y0.js → index-CloJkuiC.js} +1 -1
- package/dist/{index-Dcjq4ZUq.mjs → index-Cob9ytG-.mjs} +5 -5
- package/dist/{index-DsYTUTAH.mjs → index-CrCTnzf6.mjs} +1 -1
- package/dist/{index-Jzxg3t26.mjs → index-CvD5KiXP.mjs} +4 -4
- package/dist/{index-CsuITCiC.js → index-CxglWCov.js} +1 -1
- package/dist/{index-NZNIx17l.js → index-D02E8sa-.js} +1 -1
- package/dist/{index-DAXEpvlm.mjs → index-D0lqS-5Y.mjs} +4 -4
- package/dist/{index-28cx-587.js → index-D16bXZWj.js} +1 -1
- package/dist/{index-CZTavK9b.js → index-D4VEfRnP.js} +1 -1
- package/dist/{index-ai3DQCeM.js → index-D4xfMQ9o.js} +1 -1
- package/dist/{index-CK6Qsaoi.mjs → index-D5uHNo7O.mjs} +3 -3
- package/dist/index-D5uHNo7O.mjs.gz +0 -0
- package/dist/{index-D50yecV-.js → index-D8HKYOG6.js} +1 -1
- package/dist/{index-DXX-Zxsm.mjs → index-DGGgJ5Kb.mjs} +2 -2
- package/dist/{index-aSfiSSUJ.js → index-DIBSmTL2.js} +1 -1
- package/dist/{index-DdgMr3re.js → index-DK9e99IT.js} +1 -1
- package/dist/index-DK9e99IT.js.gz +0 -0
- package/dist/{index-BPdqLM75.mjs → index-DKVg3KyB.mjs} +1 -1
- package/dist/{index-DpkRDr2O.js → index-DPv7Ali6.js} +1 -1
- package/dist/{index-_Rnvwegz.mjs → index-DWUXz7up.mjs} +3 -3
- package/dist/{index-B4S6qinT.mjs → index-DXyXBF1A.mjs} +2 -2
- package/dist/index-DXyXBF1A.mjs.gz +0 -0
- package/dist/{index-DV0H4BeO.mjs → index-DbCRHkdS.mjs} +3 -3
- package/dist/{index-ob5EylUt.js → index-DbEdBB4g.js} +1 -1
- package/dist/{index-CpKDWWKi.mjs → index-DcdkXz6X.mjs} +1 -1
- package/dist/{index-BxEPU3MQ.js → index-De5O8TTv.js} +1 -1
- package/dist/{index-DdLKvTDG.mjs → index-Dkbt5eC7.mjs} +1 -1
- package/dist/{index-P0EehP7M.js → index-DlTqC-_K.js} +1 -1
- package/dist/{index-BPd2T1ar.js → index-Dw6964Th.js} +1 -1
- package/dist/{index-0MAOALRL.js → index-Dxd3o8vt.js} +1 -1
- package/dist/{index-DUXJdTnb.mjs → index-Dz3AspXt.mjs} +1 -1
- package/dist/index-Dz3AspXt.mjs.gz +0 -0
- package/dist/{index-DLxAjCFt.js → index-Dz3dNGo7.js} +1 -1
- package/dist/index-DzNK4FNv.mjs +4 -0
- package/dist/{index-B2Af59vH.js → index-IfLdRvGK.js} +1 -1
- package/dist/{index-UgHhaKUj.js → index-QhUGwPEo.js} +5 -5
- package/dist/{index-UgHhaKUj.js.gz → index-QhUGwPEo.js.gz} +0 -0
- package/dist/{index-B8NC9Gkd.mjs → index-RDhhe26z.mjs} +1 -1
- package/dist/{index-D2k34L6z.js → index-S0ZtD6Fs.js} +1 -1
- package/dist/{index-VMGKrFd-.js → index-Utepvz9B.js} +1 -1
- package/dist/{index-D255lLv-.mjs → index-dzWxDNM2.mjs} +1 -1
- package/dist/{index-CBauZXJ5.js → index-egBDTT89.js} +1 -1
- package/dist/{index-DYfj6Jrh.js → index-fnGmSMeU.js} +1 -1
- package/dist/{index-425QyuEF.js → index-h0F6XTJx.js} +1 -1
- package/dist/{index-XiZ4Wtrp.mjs → index-hg7Ff8aZ.mjs} +1 -1
- package/dist/{index-CXQefxl9.mjs → index-is2PebnR.mjs} +2 -2
- package/dist/{index-DfSS7vje.js → index-jv0mcS6e.js} +1 -1
- package/dist/{index-B0nVASUy.js → index-pF3nxVMq.js} +1 -1
- package/dist/{index-ESGY_-G1.js → index-vB-N5Fky.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +59 -59
- package/dist/{index.vue_vue_type_script_setup_true_lang-B6x6wQre.js → index.vue_vue_type_script_setup_true_lang-BjLYJfUz.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-DGvDeXbn.mjs → index.vue_vue_type_script_setup_true_lang-BsaTOA91.mjs} +1 -1
- package/dist/index.vue_vue_type_script_setup_true_lang-BsaTOA91.mjs.gz +0 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-CtreXlrw.mjs → index.vue_vue_type_script_setup_true_lang-CgK5cfIB.mjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-_RuhuRU6.js → index.vue_vue_type_script_setup_true_lang-Cpuuj3Np.js} +1 -1
- 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
- package/dist/{index.vue_vue_type_script_setup_true_lang-CdSEbsk5.js → index.vue_vue_type_script_setup_true_lang-DvR2kwDx.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-B5b3ejWF.mjs → index.vue_vue_type_script_setup_true_lang-Ms4uvSEY.mjs} +4 -4
- 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
- package/dist/{link-DkreOVdl.js → link-CacRMrfr.js} +1 -1
- package/dist/{link-3NniFpex.mjs → link-Dz1kKLN6.mjs} +1 -1
- package/dist/{list-C2BGInHK.js → list-BbWRw7IU.js} +1 -1
- package/dist/{list-Kl1xXjC9.mjs → list-CuBj4gtu.mjs} +1 -1
- package/dist/{main-D6byOv3A.js → main-BJAbPZv2.js} +1 -1
- package/dist/{main-BG9extUk.mjs → main-BTQTR3GO.mjs} +3 -3
- package/dist/{mobile-D9kLAOnN.mjs → mobile-CZepZCO3.mjs} +1 -1
- package/dist/{mobile-WAUfy6xs.js → mobile-ROg5DKxY.js} +1 -1
- package/dist/{parent-BuGEIafw.mjs → parent-BNwm2yGJ.mjs} +2 -2
- package/dist/{parent-Ccm8yT66.js → parent-ZFb17O1O.js} +1 -1
- package/dist/{popup-DBVsfuZN.mjs → popup-Bdlx1lHO.mjs} +1 -1
- package/dist/{popup-DfXTWUOB.js → popup-CAElBr2t.js} +1 -1
- 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
- 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
- package/dist/{replaceRules-DIR6dXEC.js → replaceRules-B-L9moMs.js} +1 -1
- package/dist/{replaceRules-DcRdJdPC.mjs → replaceRules-DVbKcvS_.mjs} +1 -1
- package/dist/{roleItem-Dr1nk21X.mjs → roleItem-B11Kkyc3.mjs} +1 -1
- package/dist/{roleItem-C3LjB9Kj.js → roleItem-C2ZFVRE_.js} +1 -1
- package/dist/{saveForm-CFMsrN3J.mjs → saveForm-ChSIkw9S.mjs} +5 -5
- package/dist/saveForm-DQhB6mJO.js +1 -0
- package/dist/{scan-Bs8pXWfq.mjs → scan-Dol7Tssy.mjs} +1 -1
- package/dist/scan-Dol7Tssy.mjs.gz +0 -0
- package/dist/{scan--v7fmWHT.js → scan-gnpRzEfQ.js} +1 -1
- package/dist/scan-gnpRzEfQ.js.gz +0 -0
- package/dist/{search-eP8AAD9i.js → search-0BqVBtcK.js} +1 -1
- package/dist/{search-CSudu9n7.mjs → search-Cz1Ay3p1.mjs} +1 -1
- package/dist/{selectConfig-CoVFqaG7.mjs → selectConfig-BAnZ7pot.mjs} +1 -1
- package/dist/selectConfig-BAnZ7pot.mjs.gz +0 -0
- package/dist/{selectConfig-CxBC5wr3.js → selectConfig-Dly2wY_R.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/style.css.gz +0 -0
- package/dist/{subItem-Dvp1hy84.js → subItem-C0ceTu_5.js} +1 -1
- package/dist/{subItem-DJAap9v_.mjs → subItem-iWoGYdru.mjs} +1 -1
- package/dist/{tagsView-qyF3ouxo.mjs → tagsView-BtR_mW8D.mjs} +2 -2
- package/dist/tagsView-BtR_mW8D.mjs.gz +0 -0
- package/dist/{tagsView-D4LAiqpB.js → tagsView-L4Kk1gPR.js} +2 -2
- package/dist/tagsView-L4Kk1gPR.js.gz +0 -0
- package/dist/{transverse-OA3Txjjz.mjs → transverse-CAHQ_sAH.mjs} +3 -3
- package/dist/{transverse-vLM6h46E.js → transverse-CDE2H6oV.js} +1 -1
- package/dist/types/components/business/bcTable/utils/type.d.ts +19 -2
- package/dist/types/components/business/bcTable/utils/useTable.d.ts +5 -2
- package/dist/types/utils/download.d.ts +11 -3
- package/dist/types/utils/storage.d.ts +8 -2
- package/dist/{uploadAvatar-CNjHIRn7.mjs → uploadAvatar-CPV2AjBU.mjs} +1 -1
- package/dist/uploadAvatar-CPV2AjBU.mjs.gz +0 -0
- package/dist/{uploadAvatar-DarhlCjN.js → uploadAvatar-_wUajUdO.js} +1 -1
- package/dist/uploadAvatar-_wUajUdO.js.gz +0 -0
- package/dist/{useSaveForm-ish-CkqC.mjs → useSaveForm-C7nNkxSA.mjs} +194 -162
- package/dist/useSaveForm-C7nNkxSA.mjs.gz +0 -0
- package/dist/useSaveForm-UlwEhWjA.js +1 -0
- package/dist/useSaveForm-UlwEhWjA.js.gz +0 -0
- package/dist/{user-DnHrmjbr.js → user-BxEQHQTA.js} +1 -1
- package/dist/{user-B4Iv1wPL.mjs → user-CXhrbcsH.mjs} +4 -4
- package/dist/user-CXhrbcsH.mjs.gz +0 -0
- package/dist/{userNews-BrTvr8Ct.mjs → userNews-CsYwLI1G.mjs} +1 -1
- package/dist/{userNews-BqnV3HfE.js → userNews-D3fUDwqT.js} +1 -1
- package/dist/{userSelect--cWl_sVP.mjs → userSelect-Cuzt5Drp.mjs} +1 -1
- package/dist/{userSelect-7ZClEHfN.js → userSelect-Dz1YYg_B.js} +1 -1
- 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
- package/dist/{userSelect.vue_vue_type_script_setup_true_lang-BELR4lXN.mjs → userSelect.vue_vue_type_script_setup_true_lang-Bq0DXoSv.mjs} +1 -1
- package/dist/{vertical-CL4bSmFu.js → vertical-CfpR8JnI.js} +1 -1
- package/dist/{vertical--9NawynL.mjs → vertical-zM1FU0i3.mjs} +2 -2
- package/package.json +1 -1
- package/dist/account-C-DV8Mx6.js.gz +0 -0
- package/dist/account-bqFDKumj.mjs.gz +0 -0
- package/dist/btnIndex-DV89yeVB.mjs.gz +0 -0
- package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-B9yYMoCl.mjs.gz +0 -0
- package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-BaXz07HH.js.gz +0 -0
- package/dist/formConfig-BE7jjbgI.mjs.gz +0 -0
- package/dist/formConfig-Cy2EBlaq.js +0 -1
- package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-p1ZTjUK2.mjs.gz +0 -0
- package/dist/hsBtnConfigList-opLCTwmZ.js +0 -1
- package/dist/hsFormConfigList-Cj6JmCRg.mjs.gz +0 -0
- package/dist/hsFormConfigList-RDLUqHFM.js +0 -1
- package/dist/hsFormPanel-BWDujyeu.js +0 -1
- package/dist/hsFormPanel-cONTsW7b.mjs.gz +0 -0
- package/dist/index copy-BKNgM0Ek.mjs.gz +0 -0
- package/dist/index copy-BQ67zqfl.js.gz +0 -0
- package/dist/index-B4S6qinT.mjs.gz +0 -0
- package/dist/index-CIq8eH9j.mjs +0 -4
- package/dist/index-CK6Qsaoi.mjs.gz +0 -0
- package/dist/index-CdmL54dR.mjs.gz +0 -0
- package/dist/index-D0YgVMBn.js.gz +0 -0
- package/dist/index-DUXJdTnb.mjs.gz +0 -0
- package/dist/index-DYIOBXbw.mjs.gz +0 -0
- package/dist/index-DdgMr3re.js.gz +0 -0
- package/dist/index-Uns2uNjk.js.gz +0 -0
- package/dist/index.vue_vue_type_script_setup_true_lang-DGvDeXbn.mjs.gz +0 -0
- package/dist/saveForm-BJ3q9eHJ.js +0 -1
- package/dist/scan--v7fmWHT.js.gz +0 -0
- package/dist/scan-Bs8pXWfq.mjs.gz +0 -0
- package/dist/selectConfig-CoVFqaG7.mjs.gz +0 -0
- package/dist/tagsView-D4LAiqpB.js.gz +0 -0
- package/dist/tagsView-qyF3ouxo.mjs.gz +0 -0
- package/dist/uploadAvatar-CNjHIRn7.mjs.gz +0 -0
- package/dist/uploadAvatar-DarhlCjN.js.gz +0 -0
- package/dist/useSaveForm-BMNy1iTK.js +0 -1
- package/dist/useSaveForm-BMNy1iTK.js.gz +0 -0
- package/dist/useSaveForm-ish-CkqC.mjs.gz +0 -0
- 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 {
|
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
|
-
|
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
|
-
|
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 = {
|
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
|
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
|
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
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
unref(dialogData).currentConfig
|
369
|
-
|
370
|
-
|
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(
|
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:
|
387
|
-
}, toDisplayString(
|
369
|
+
key: btnItem.id
|
370
|
+
}, toDisplayString(btnItem.data.name) + "--" + toDisplayString(btnItem.data.key), 1);
|
388
371
|
}), 128))
|
389
372
|
])
|
390
|
-
])
|
391
|
-
|
392
|
-
|
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-
|
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
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
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
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
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
|