@syzh-syzh/base 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/dist/chunks/{Dept-Dd2p4Wkb.js → Dept-D4rLt7Bv.js} +1 -1
  2. package/dist/chunks/{Depttype-fqKViLJe.js → Depttype-DUUx7AKD.js} +1 -1
  3. package/dist/chunks/{Verify-DVhrCu84.js → Verify-DYGNYWYm.js} +1 -1
  4. package/dist/chunks/{app-Be1mLO8p.js → app-DF-d0Ixy.js} +1 -1
  5. package/dist/chunks/{apps-CeKgLtg0.js → apps-jsdn0aKz.js} +1 -1
  6. package/dist/chunks/{areadept-DUNmYfSz.js → areadept-Bm6hT5Oz.js} +1 -1
  7. package/dist/chunks/{cfgtype-Bj5sRz-y.js → cfgtype-CdPE2jvx.js} +1 -1
  8. package/dist/chunks/{col-q7_P9YZT.js → col-aJRlNzXI.js} +1 -1
  9. package/dist/chunks/daibanevent--FXrPe2D.js +1 -0
  10. package/dist/chunks/{data-c6A9Zlbv.js → data-DjuA6hrl.js} +1 -1
  11. package/dist/chunks/{data-RGEMwAJV.js → data-J49nBb_1.js} +1 -1
  12. package/dist/chunks/{dayjs.min-CiINHjbP.js → dayjs.min-DyGzrGFv.js} +1 -1
  13. package/dist/chunks/{deptgxfw-DQiNm58K.js → deptgxfw-CSWTif3F.js} +1 -1
  14. package/dist/chunks/{detail-BjI2Shty.js → detail-Cf87gxMK.js} +1 -1
  15. package/dist/chunks/{dict-BJza1yFZ.js → dict-BACFwNyw.js} +1 -1
  16. package/dist/chunks/{dict-CPL0HcgK.js → dict-D0GT4LDn.js} +1 -1
  17. package/dist/chunks/{dispose-Bza-e_UK.js → dispose-nELSJf-R.js} +1 -1
  18. package/dist/chunks/{eventfb-DX8RbbPC.js → eventfb-k8sqPNnb.js} +1 -1
  19. package/dist/chunks/{eventsource-Rc95ti_Z.js → eventsource-4NTh5tDL.js} +1 -1
  20. package/dist/chunks/exportjs-Db0DABfN.js +1 -0
  21. package/dist/chunks/{gaopinevent-CF5saX0f.js → gaopinevent-DFomvqAu.js} +1 -1
  22. package/dist/chunks/{grade-CtbRM5uK.js → grade-B34NLafi.js} +1 -1
  23. package/dist/chunks/grid-table-DZl7-bH7.js +1 -0
  24. package/dist/chunks/{griddept-R8zD8r7M.js → griddept-CG3EHj2j.js} +1 -1
  25. package/dist/chunks/{gridgrid-CdD_M_4x.js → gridgrid-DYZGjCx0.js} +1 -1
  26. package/dist/chunks/{gridtype-Bts5eIJ5.js → gridtype-BLWnb_lj.js} +1 -1
  27. package/dist/chunks/{home-B6jg8pW2.js → home-DCQ3w8Xh.js} +1 -1
  28. package/dist/chunks/{index-BM-2nayS.js → index-4oBRJdv3.js} +1 -1
  29. package/dist/chunks/{index-9CPCUBjj.js → index-B-V8jsgs.js} +1 -1
  30. package/dist/chunks/{index-BLjJYXZV.js → index-BAr6Ik6O.js} +1 -1
  31. package/dist/chunks/{index-C5anz_wS.js → index-BEyiOR42.js} +1 -1
  32. package/dist/chunks/index-BJaBtlyk.js +1 -0
  33. package/dist/chunks/{index-CioVtH2P.js → index-BQ38dRuR.js} +1 -1
  34. package/dist/chunks/{index-MUP_-CZX.js → index-BZvZKuju.js} +1 -1
  35. package/dist/chunks/index-BsRT2_f9.js +1 -0
  36. package/dist/chunks/{index-CSYaeoIJ.js → index-BygocWfM.js} +1 -1
  37. package/dist/chunks/index-BzPJkQKb.js +1 -0
  38. package/dist/chunks/index-C0LisjCR.js +1 -0
  39. package/dist/chunks/index-C1nvHlD0.js +1 -0
  40. package/dist/chunks/{index-B4aTdOIq.js → index-C5BCSm1Q.js} +1 -1
  41. package/dist/chunks/{index-7lu0U-5G.js → index-CA5PR4zj.js} +1 -1
  42. package/dist/chunks/{index-Cl8u5C-n.js → index-CD6W221l.js} +1 -1
  43. package/dist/chunks/{index-zcDGU2cn.js → index-CKqzWtfU.js} +1 -1
  44. package/dist/chunks/{index-CZBF1fAl.js → index-CKvR6yV2.js} +1 -1
  45. package/dist/chunks/{index-bAxG5-9b.js → index-CdRtkgOM.js} +1 -1
  46. package/dist/chunks/index-ChXOYSk2.js +1 -0
  47. package/dist/chunks/{index-D5vknga-.js → index-Ciy_4RE-.js} +1 -1
  48. package/dist/chunks/{index-DJI7H3uY.js → index-CnvxVYWo.js} +1 -1
  49. package/dist/chunks/index-CocUqB7D.js +1 -0
  50. package/dist/chunks/{index-DcpCfHbD.js → index-CrV-LSTB.js} +1 -1
  51. package/dist/chunks/index-Cu1H_GRi.js +1 -0
  52. package/dist/chunks/{index-B418xftX.js → index-D-mCAkEi.js} +1 -1
  53. package/dist/chunks/{index-BJwSLHUo.js → index-D-vbgF-C.js} +1 -1
  54. package/dist/chunks/{index-BCwsIyO0.js → index-D2R_Mn2v.js} +1 -1
  55. package/dist/chunks/{index-C24qpRSR.js → index-DEIYUQ7t.js} +1 -1
  56. package/dist/chunks/index-DEKhaClp.js +1 -0
  57. package/dist/chunks/index-DGNI8tMa.js +1 -0
  58. package/dist/chunks/{index-DtnWKVNi.js → index-DNzrFH_R.js} +1 -1
  59. package/dist/chunks/{index-B4dPU4SO.js → index-DPkDwA-M.js} +1 -1
  60. package/dist/chunks/{index-D0FbqdVm.js → index-DUVni83c.js} +1 -1
  61. package/dist/chunks/{index-4a1qzhnJ.js → index-DUWs6Vq_.js} +1 -1
  62. package/dist/chunks/{index-tiZy9p41.js → index-DUyLJxwb.js} +1 -1
  63. package/dist/chunks/{index-Cq_z8cyX.js → index-DYYqzo6m.js} +1 -1
  64. package/dist/chunks/{index-C39aenVA.js → index-DeyTdqpN.js} +1 -1
  65. package/dist/chunks/index-DfbDOYxP.js +1 -0
  66. package/dist/chunks/{index-2TnjKuD3.js → index-DlLxSVbf.js} +1 -1
  67. package/dist/chunks/{index-DETjLpHs.js → index-DmhBbwxz.js} +1 -1
  68. package/dist/chunks/{index-BQlPpgGo.js → index-DqLkx6is.js} +1 -1
  69. package/dist/chunks/index-DvwB4VNP.js +1 -0
  70. package/dist/chunks/{index-nGtgSNYN.js → index-Dx8Ueghj.js} +1 -1
  71. package/dist/chunks/{index-D3MaI9Ts.js → index-DyaMTKKX.js} +1 -1
  72. package/dist/chunks/{index-DOJMkSNg.js → index-Gv3MruGy.js} +1 -1
  73. package/dist/chunks/{index-D8Gy1KB1.js → index-HN3dyUvt.js} +1 -1
  74. package/dist/chunks/index-JqQty7FK.js +1 -0
  75. package/dist/chunks/index-K2HxbnEx.js +1 -0
  76. package/dist/chunks/{index-BQT-0enA.js → index-NS8utFmY.js} +1 -1
  77. package/dist/chunks/index-_Lhd99cQ.js +1 -0
  78. package/dist/chunks/{index-I3rE2YO-.js → index-jcTOxXUr.js} +1 -1
  79. package/dist/chunks/{index-B4IOu1cc.js → index-ww55-EeJ.js} +1 -1
  80. package/dist/chunks/{index-D8Nn1M-x.js → index-zO2JxiUH.js} +1 -1
  81. package/dist/chunks/{logLogin-nEV3CEx0.js → logLogin-C3wZtJlx.js} +1 -1
  82. package/dist/chunks/{logMqysmsg-Bt-8o6oV.js → logMqysmsg-C6tRSDbP.js} +1 -1
  83. package/dist/chunks/{logMsg-CSzNJZuk.js → logMsg-B9WA-2iT.js} +1 -1
  84. package/dist/chunks/{logQuartz-DiRqxO6L.js → logQuartz-Cb0RGOfJ.js} +1 -1
  85. package/dist/chunks/{login-DBsiRitW.js → login-BCvOy6p9.js} +1 -1
  86. package/dist/chunks/{logmqerror-CTEmzDX1.js → logmqerror-BAWGjETi.js} +1 -1
  87. package/dist/chunks/{logoperate-B77Gm5ip.js → logoperate-BqV8GSPb.js} +1 -1
  88. package/dist/chunks/{maparea-CaT72r6G.js → maparea-C8XiSvPQ.js} +1 -1
  89. package/dist/chunks/{nodeadd-r1JOHqdp.js → nodeadd-qxCufmCV.js} +1 -1
  90. package/dist/chunks/{opradd-lvCqwI3f.js → opradd-K9ceCg6D.js} +1 -1
  91. package/dist/chunks/{oprauthadd-CFphlB61.js → oprauthadd-Dn9-Qilh.js} +1 -1
  92. package/dist/chunks/{oprtype-B21XN6KX.js → oprtype-CqjLFJKB.js} +1 -1
  93. package/dist/chunks/{regions-BVUaONVK.js → regions-B1FvFl14.js} +1 -1
  94. package/dist/chunks/{regionstype-DkFcrk5r.js → regionstype-CEmqbvPq.js} +1 -1
  95. package/dist/chunks/{role-Da5_11dG.js → role-1JRvAReL.js} +1 -1
  96. package/dist/chunks/{shangbaoevent-BfnTUsvX.js → shangbaoevent-BUR2sMhv.js} +1 -1
  97. package/dist/chunks/{shangbaoeventfl-Cjbd4I2n.js → shangbaoeventfl-1KCqzXcu.js} +1 -1
  98. package/dist/chunks/{source-BKpgi1HI.js → source-U8QsYHOr.js} +1 -1
  99. package/dist/chunks/{sysholidays-CJ1lMUY6.js → sysholidays-CLcd2RwQ.js} +1 -1
  100. package/dist/chunks/{sysright-manage-k_iOBDm3.js → sysright-manage-D52aocYn.js} +1 -1
  101. package/dist/chunks/{taskfx-DaEJvSQ5.js → taskfx-BxPIidzr.js} +1 -1
  102. package/dist/chunks/{taskmatter-C-JEWYL6.js → taskmatter-DoAO7Azd.js} +1 -1
  103. package/dist/chunks/{tasknode-02ubdikd.js → tasknode-BcdPhTv4.js} +1 -1
  104. package/dist/chunks/{tasknodelog-DvuWeOS5.js → tasknodelog-BeMY8ao8.js} +1 -1
  105. package/dist/chunks/{tasktype-ukszBmYn.js → tasktype-D_Lyea-g.js} +1 -1
  106. package/dist/chunks/{tzgg-M7tbO6Qb.js → tzgg-DuNRf90a.js} +1 -1
  107. package/dist/chunks/{tzggtype-BpfX5N55.js → tzggtype-C3qIlYlg.js} +1 -1
  108. package/dist/chunks/{weather-DeJg8K0H.js → weather-LXmG51PN.js} +1 -1
  109. package/dist/chunks/{wfEventAdd-_OLEMy_n.js → wfEventAdd-CRCwYp2E.js} +1 -1
  110. package/dist/chunks/{wfclass-C5qN4EnB.js → wfclass-DloD80Yn.js} +1 -1
  111. package/dist/chunks/{wfdef-DYYtFFhY.js → wfdef-DIGhdM92.js} +1 -1
  112. package/dist/chunks/{wfeventall-Bbkr73KA.js → wfeventall-C5xvgw_M.js} +1 -1
  113. package/dist/chunks/{wfeventdone-BA5CISwM.js → wfeventdone-BBp_ttad.js} +1 -1
  114. package/dist/chunks/{wfeventlog-CUJtv9l_.js → wfeventlog-CfEzRjnF.js} +1 -1
  115. package/dist/chunks/{wfeventtask-CRK2R-Xa.js → wfeventtask-z2UITxqv.js} +1 -1
  116. package/dist/chunks/{wfeventyqsqsp-oeADrugR.js → wfeventyqsqsp-B61FsUNd.js} +1 -1
  117. package/dist/chunks/{wfjixiao--pwwmy4K.js → wfjixiao-n0nprHHg.js} +1 -1
  118. package/dist/chunks/{wfnode-DsiHnp8I.js → wfnode-DyQwt6MG.js} +1 -1
  119. package/dist/chunks/{wfopr-DmRx3ZLg.js → wfopr-Bdq2rC52.js} +1 -1
  120. package/dist/chunks/{wfoprcfg-DERHNDXQ.js → wfoprcfg-BnP9iNM5.js} +1 -1
  121. package/dist/chunks/wfyqsqcfg-DV6qpJ-r.js +1 -0
  122. package/dist/chunks/{wfyqsqcfg-CeDZz4Ac.js → wfyqsqcfg-DVTyQRCT.js} +1 -1
  123. package/dist/chunks/{wfzdy-C_ErUVqz.js → wfzdy-RicZ8x7p.js} +1 -1
  124. package/dist/resolver.js +1 -1
  125. package/dist/sybase.css +1 -1
  126. package/dist/sybase.js +1 -1
  127. package/dist/utils.js +1 -1
  128. package/package.json +5 -3
  129. package/dist/chunks/daibanevent-DpxWsl1p.js +0 -1
  130. package/dist/chunks/grid-table-DCLqczWt.js +0 -1
  131. package/dist/chunks/index-B-WcpfOt.js +0 -1
  132. package/dist/chunks/index-BJGJiaqX.js +0 -1
  133. package/dist/chunks/index-Byw2EJLP.js +0 -1
  134. package/dist/chunks/index-CH4BDIHQ.js +0 -1
  135. package/dist/chunks/index-COnm1sUg.js +0 -1
  136. package/dist/chunks/index-DAkPRXfo.js +0 -1
  137. package/dist/chunks/index-DSUyf4Ba.js +0 -1
  138. package/dist/chunks/index-Dkr89ayA.js +0 -1
  139. package/dist/chunks/index-Dm5LBJI4.js +0 -1
  140. package/dist/chunks/index-DsxbAE1h.js +0 -1
  141. package/dist/chunks/index-Dw9B2qPC.js +0 -1
  142. package/dist/chunks/index-Q8jvtsBz.js +0 -1
  143. package/dist/chunks/index-Y0a5B4Fi.js +0 -1
  144. package/dist/chunks/index-ZDJDPsD6.js +0 -1
  145. package/dist/chunks/index-zg_UVMkI.js +0 -1
  146. package/dist/chunks/wfyqsqcfg-DLH53Z3Z.js +0 -1
@@ -1 +1 @@
1
- import{ref as e,reactive as a,computed as l,onMounted as t,resolveComponent as i,createElementBlock as d,openBlock as n,createVNode as u,createElementVNode as r,withCtx as o,unref as s,createTextVNode as p,Fragment as c,renderList as v,toDisplayString as f,shallowRef as y,toRefs as m,resolveDirective as _,withDirectives as b,createBlock as g,withKeys as $,vShow as k,isRef as S,createCommentVNode as w}from"vue";import{a4 as V,e as C,a6 as j,G as x,t as K,J as A}from"./dict-CPL0HcgK.js";import{_ as D}from"./lv-CmTz0kLM.js";import{_ as P}from"./index-Cq_z8cyX.js";import{_ as U}from"./index-B4IOu1cc.js";import{_ as z}from"./index-CCuSgHmL.js";import{d as O}from"./dayjs.min-CiINHjbP.js";import{u as N}from"./dict-BJza1yFZ.js";import{a as q,s as J,b as R,c as E,d as L,e as M}from"./Dept-Dd2p4Wkb.js";import{s as T,a as Y,g as F}from"./deptgxfw-DQiNm58K.js";import{f as H,a as B}from"./regions-BVUaONVK.js";import{d as G,a as I,g as Q,b as W,c as X}from"./areadept-DUNmYfSz.js";import{g as Z}from"./Depttype-fqKViLJe.js";const ee={class:"lt-wrap"},ae={class:"lt-body"},le={class:"lt-buttons"},te={class:"lt-header"},ie={class:"lt-muted"},de={class:"lt-body"},ne={class:"lt-item-label"};var ue=/* @__PURE__ */D({__name:"index",props:{apis:{type:Object,required:!0},keys:{type:Object,default:()=>({idKey:"id",nameKey:"name",parentKey:"parentid",hasChildKey:"isexistschild"})},rootParams:{type:Object,required:!0},interfaceParams:{type:Object,required:!0}},setup(y){const m=y,_=e(),b=e([]),g=a(/* @__PURE__ */new Map),$=e(/* @__PURE__ */new Set),k=e(/* @__PURE__ */new Set),S=e([]),w=l(()=>{const e=[];for(const a of S.value){const l=g.get(String(a));l?e.push(l):e.push({id:String(a),label:String(a)})}return e});function C(e){const a=String(e?.[m.keys.value.idKey]),l={id:a,label:e?.[m.keys.value.nameKey]??a,isLeaf:0===Number(e?.[m.keys.value.hasChildKey]),raw:e};return g.set(a,l),l}async function j(e){const a=await m.apis.fetchChildren(e);return(Array.isArray(a)?a:Array.isArray(a?.records)?a.records:[]).map(C)}t(async()=>{try{const e=await j({...m.rootParams,[m.keys.value.parentKey]:Number(m.rootParams.value)});b.value=e,await D()}catch(e){}});const x=async(e,a)=>{try{const l=e.data?.raw,t=l?.[m.keys.value.idKey];if(null==t)return a([]);const i={...m.rootParams,[m.keys.value.parentKey]:Number(t)};a(await j(i))}catch(l){a([])}};function K(e,a){const l=new Set(a.checkedKeys.map(e=>String(e)));$.value=l}function A(e){if(k.value.clear(),e)for(const a of w.value)k.value.add(a.id)}async function D(){if("function"==typeof m.apis.fetchSearch)try{const e=await m.apis.fetchSearch(m.interfaceParams);let a=[],l=[];if(Array.isArray(e)?a=e.map(String):Array.isArray(e?.records)&&(a=e.records.map(e=>String(e[m.keys.value.idKey])),l=e.records),S.value=a,l.length)for(const t of l){const e=String(t[m.keys.value.idKey]);g.has(e)||C(t)}}catch(e){}}function P(){if("function"==typeof m.apis.fetchAdd){const e={...m.interfaceParams,[m.interfaceParams.key]:Array.from($.value)};m.apis.fetchAdd(e).then(e=>{V.msgSuccess("绑定成功"),function(){if(!$.value.size)return;const e=new Set(S.value.map(e=>String(e)));for(const a of $.value)e.add(a);S.value=Array.from(e),_.value?.setCheckedKeys([]),$.value.clear()}(),D()}).catch(e=>{_.value?.setCheckedKeys([]),$.value.clear()})}}function U(){if("function"==typeof m.apis.fetchDel){const e={...m.interfaceParams,[m.interfaceParams.key]:Array.from(k.value)};m.apis.fetchDel(e).then(e=>{V.msgSuccess("删除成功"),function(){if(!k.value.size)return;const e=S.value.filter(e=>!k.value.has(String(e)));k.value.clear(),S.value=e}(),D()})}}return(e,a)=>{const l=i("el-tree"),t=i("el-card"),y=i("el-button"),m=i("el-space"),g=i("el-checkbox");return n(),d("div",ee,[u(t,{class:"lt-panel",shadow:"hover"},{header:o(()=>[...a[0]||(a[0]=[r("div",{class:"lt-header"},[r("span",null,"待选")],-1)])]),default:o(()=>[r("div",ae,[u(l,{ref_key:"leftTreeRef",ref:_,data:s(b),load:x,lazy:"","node-key":"id","show-checkbox":"","check-strictly":"","highlight-current":"",props:{label:"label",children:"children",isLeaf:"isLeaf"},onCheck:K},null,8,["data"])])]),_:1}),r("div",le,[u(m,{direction:"vertical"},{default:o(()=>[u(y,{type:"primary",icon:"Right",disabled:0===s($).size,onClick:P},{default:o(()=>[...a[1]||(a[1]=[p(" 添加 ",-1)])]),_:1},8,["disabled"]),u(y,{type:"primary",icon:"Back",disabled:0===s(k).size,onClick:U},{default:o(()=>[...a[2]||(a[2]=[p(" 移除 ",-1)])]),_:1},8,["disabled"])]),_:1})]),u(t,{class:"lt-panel",shadow:"hover"},{header:o(()=>[r("div",te,[a[4]||(a[4]=r("span",null,"已选",-1)),r("span",ie,"("+f(s(w).length)+")",1),u(g,{indeterminate:s(k).size>0&&s(k).size<s(w).length,"model-value":s(w).length>0&&s(k).size===s(w).length,onChange:A,style:{"margin-left":"auto"}},{default:o(()=>[...a[3]||(a[3]=[p(" 全选 ",-1)])]),_:1},8,["indeterminate","model-value"])])]),default:o(()=>[r("div",de,[(n(!0),d(c,null,v(s(w),e=>(n(),d("div",{key:e.id,class:"lt-item"},[u(g,{"model-value":s(k).has(e.id),onChange:a=>{return l=e.id,void(a?k.value.add(l):k.value.delete(l));var l}},null,8,["model-value","onChange"]),r("span",ne,f(e.label),1)]))),128))])]),_:1})])}}},[["__scopeId","data-v-441c17b3"]]);const re={class:"app-container"},oe={class:"dialog-footer"},se={class:"dialog-footer"},pe={class:"dialog-footer"},ce={__name:"index",setup(t){const D=O,{sys_deptdept_state:ee}=N("sys_dept@dept_state"),ae=e([]),le=e([]),te=e(!0),ie=e(!0),de=e([]),ne=e(!0),ce=e(!0),ve=e(0),fe=e(""),ye=e([]),me=e(!0),_e=e([]),he=e(),be=y({}),ge=e(""),$e=e({}),ke=a({}),Se={fetchChildren:q,fetchSearch:F,fetchAdd:Y,fetchDel:T},we=e({}),Ve=a({}),Ce={fetchChildren:H,fetchSearch:Q,fetchAdd:I,fetchDel:G},je=e([]),xe=e([{label:"部门名称",visible:!0},{label:"部门编号",visible:!0},{label:"部门类型",visible:!0},{label:"状态",visible:!0},{label:"JSON信息",visible:!1},{label:"排序",visible:!1},{label:"备注",visible:!1},{label:"创建时间",visible:!0}].map((e,a)=>({key:`key${a}`,...e}))),Ke=a({form:{},sysareatypeForm:{areatypeid:void 0,deptid:void 0},queryParams:{pageNo:1,pageSize:10,selectinfo:void 0},rules:{},open:!1,deptgxfwOrAreadepOpen:!1,deptidareatypeidOpen:!1}),{queryParams:Ae,form:De,rules:Pe,deptgxfwOrAreadepOpen:Ue,open:ze,deptidareatypeidOpen:Oe,sysareatypeForm:Ne}=m(Ke),qe=e(),Je=e(),Re=e(!0),Ee=l(()=>[{[`${ge.value}id`]:"0",[`${ge.value}_name`]:"根目录",children:Le.value}]),Le=l(()=>C(le.value,`${ge.value}id`,`${ge.value}_parentid`));function Me(){ge.value="dept",Ae.value[`${ge.value}_parentid`]=0,Ae.value[`${ge.value}_state`]=void 0,Pe.value={[`${ge.value}_no`]:[{required:!0,message:"部门编号不能为空",trigger:"blur"}],[`${ge.value}_name`]:[{required:!0,message:"部门名称不能为空",trigger:"blur"}],[`${ge.value}_parentid`]:[{required:!0,message:"父级部门不能为空",trigger:"blur"}],[`${ge.value}_depttypeid`]:[{required:!0,message:"部门类型不能为空",trigger:"blur"}]},be.value={search:q,add:M,delete:L,edit:E,detail:R},ke.value={idKey:`${ge.value}id`,nameKey:`${ge.value}_name`,parentKey:`${ge.value}_parentid`,hasChildKey:`${ge.value}_isexistschild`},Ve.value={idKey:"areaid",nameKey:"area_name",parentKey:"area_parentid",hasChildKey:"area_isexistschild"},Ie()}function Te(){te.value=!0,be.value.search({...Ae.value,...Re.value?{pageSize:1e4}:{}}).then(e=>{Re.value?(ae.value=[],le.value=He(e.records||[])):(ae.value=e.records||[],me.value=!me.value),ve.value=e.rowCount||0,te.value=!1})}async function Ye(e,a,l){e.children=await Fe(e.deptid),le.value=He(e.children),l(e.children)}async function Fe(e){te.value=!0,Ae.value.dept_parentid=e;const a=await be.value.search({...Ae.value,pageSize:1e4});return te.value=!1,a.records||[]}function He(e){const a=new Map(le.value.map(e=>[e[`${ge.value}id`],e]));return e.forEach(e=>a.set(e[`${ge.value}id`],e)),Array.from(a.values())}function Be(){Ue.value=!1,Oe.value=!1,ze.value=!1,ze.title=void 0,Ge()}function Ge(){x(qe.value),De.value={[`${ge.value}id`]:void 0,[`${ge.value}_no`]:void 0,[`${ge.value}_name`]:void 0,[`${ge.value}_json`]:void 0,[`${ge.value}_sort`]:0,[`${ge.value}_depttypeid`]:void 0,[`${ge.value}_state`]:1,[`${ge.value}_note`]:void 0},Ne.value={areatypeid:void 0,deptid:void 0}}function Ie(){Ae.value.selectinfo||Ae.value[`${ge.value}_depttypeid`]||Ae.value[`${ge.value}_state`]?(Ae.value[`${ge.value}_parentid`]=void 0,Re.value=!1):(Ae.value[`${ge.value}_parentid`]=0,Re.value=!0),Ae.value.pageNo=1,Te()}function Qe(){x(Je.value),Ae.value.dept_parentid=0,Ae.value[`${ge.value}_state`]=void 0,le.value=[],Me()}function We(e){Ge(),ze.value=!0,fe.value="添加部门",De.value.dictid=Ae.value[`${ge.value}_dictid`],e&&(De.value[`${ge.value}_parentid`]=e[`${ge.value}id`])}function Xe(e){de.value=e.map(e=>e[`${ge.value}id`]),ne.value=1!=e.length,ce.value=!e.length}function Ze(e){Ge();const a=e[`${ge.value}id`]||de.value;be.value.detail(a).then(e=>{let a=e[`${ge.value}_json`]?e[`${ge.value}_json`]:void 0;De.value=Object.assign({},e,{[`${ge.value}_json`]:a&&0===Object.keys(a).length?void 0:JSON.stringify(a)}),ze.value=!0,fe.value="修改"})}function ea(){qe.value.validate(e=>{e&&(null!=De.value[`${ge.value}id`]?be.value.edit(aa()).then(e=>{V.msgSuccess("修改成功"),ze.value=!1,Fe(e[`${ge.value}_parentid`]).then(a=>{le.value=He(a),_e.value.includes(e[`${ge.value}_parentid`])&&(_e.value=_e.value.filter(a=>a!=e[`${ge.value}_parentid`])),_e.value.includes(e[`${ge.value}_parentid`])||_e.value.push(e[`${ge.value}_parentid`]),setTimeout(()=>{me.value=!me.value},0)})}):be.value.add(aa()).then(e=>{V.msgSuccess("新增成功"),ze.value=!1,Re.value?Fe(e[`${ge.value}_parentid`]).then(e=>{le.value=He(e),setTimeout(()=>{me.value=!me.value},0)}):Te()}))})}function aa(){let e,a=JSON.parse(JSON.stringify(De.value));return K(a[`${ge.value}_json`])||(e=A(a[`${ge.value}_json`])),a.dept_json=e,a}function la(e){const a=e[`${ge.value}id`]?[e[`${ge.value}id`]]:de.value;V.confirm('是否确认删除部门id为"'+a+'"的数据项?').then(function(){return be.value.delete(a)}).then(()=>{Te(),Re.value&&(le.value=le.value.filter(e=>!a.includes(e[`${ge.value}id`])),_e.value=_e.value.filter(e=>!a.includes(e)),me.value=!me.value),V.msgSuccess("删除成功")}).catch(()=>{})}function ta(){J().then(()=>{V.msgSuccess("刷新缓存成功")})}function ia(){W(Ne.value).then(e=>{V.msgSuccess("行政区划类型绑定成功"),Oe.value=!1,Ge()})}function da(){X(Ne.value).then(e=>{V.msgSuccess("删除成功"),Oe.value=!1,Ge()})}return Me(),Z({pageNo:1,pageSize:1e4}).then(e=>{ye.value=e.records}),(e,a)=>{const l=i("el-option"),t=i("el-select"),y=i("el-form-item"),m=i("el-input"),V=i("el-button"),C=i("el-form"),x=i("el-col"),K=z,A=i("el-row"),O=i("el-table-column"),N=U,q=i("el-table"),J=P,R=i("el-tree-select"),E=i("el-input-number"),L=i("el-radio"),M=i("el-radio-group"),T=i("el-dialog"),Y=ue,F=_("hasPermi"),H=_("loading");return n(),d("div",re,[b(u(C,{model:s(Ae),ref_key:"queryRef",ref:Je,inline:!0},{default:o(()=>[u(y,{label:"部门类型",prop:`${s(ge)}_depttypeid`},{default:o(()=>[u(t,{modelValue:s(Ae)[`${s(ge)}_depttypeid`],"onUpdate:modelValue":a[0]||(a[0]=e=>s(Ae)[`${s(ge)}_depttypeid`]=e),style:{width:"200px"},placeholder:"请选择部门类型"},{default:o(()=>[(n(!0),d(c,null,v(s(ye),e=>(n(),g(l,{key:e.depttypeid,label:e.depttype_name,value:e.depttypeid},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["prop"]),u(y,{label:"",prop:"selectinfo"},{default:o(()=>[u(m,{modelValue:s(Ae).selectinfo,"onUpdate:modelValue":a[1]||(a[1]=e=>s(Ae).selectinfo=e),placeholder:"请输入搜索内容",clearable:"",style:{width:"240px"},onKeyup:$(Ie,["enter"])},null,8,["modelValue"])]),_:1}),u(y,{label:"状态",prop:"menu_state"},{default:o(()=>[u(t,{modelValue:s(Ae)[`${s(ge)}_state`],"onUpdate:modelValue":a[2]||(a[2]=e=>s(Ae)[`${s(ge)}_state`]=e),placeholder:"请选择状态",clearable:"",style:{width:"200px"}},{default:o(()=>[(n(!0),d(c,null,v(s(ee),e=>(n(),g(l,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),u(y,null,{default:o(()=>[u(V,{type:"primary",icon:"Search",onClick:Ie},{default:o(()=>[...a[18]||(a[18]=[p("搜索",-1)])]),_:1}),u(V,{icon:"Refresh",onClick:Qe},{default:o(()=>[...a[19]||(a[19]=[p("重置",-1)])]),_:1})]),_:1})]),_:1},8,["model"]),[[k,s(ie)]]),u(A,{gutter:10,class:"mb8"},{default:o(()=>[u(x,{span:1.5},{default:o(()=>[b((n(),g(V,{type:"primary",plain:"",icon:"Plus",onClick:We},{default:o(()=>[...a[20]||(a[20]=[p("新增",-1)])]),_:1})),[[F,["SysDeptAdd"]]])]),_:1}),u(x,{span:1.5},{default:o(()=>[b((n(),g(V,{type:"success",plain:"",icon:"Edit",disabled:s(ne),onClick:Ze},{default:o(()=>[...a[21]||(a[21]=[p("修改",-1)])]),_:1},8,["disabled"])),[[F,["SysDeptEdit"]]])]),_:1}),u(x,{span:1.5},{default:o(()=>[b((n(),g(V,{type:"danger",plain:"",icon:"Delete",disabled:s(ce),onClick:la},{default:o(()=>[...a[22]||(a[22]=[p("删除",-1)])]),_:1},8,["disabled"])),[[F,["SysDeptDelete"]]])]),_:1}),u(x,{span:1.5},{default:o(()=>[b((n(),g(V,{type:"danger",plain:"",icon:"Refresh",onClick:ta},{default:o(()=>[...a[23]||(a[23]=[p("刷新缓存",-1)])]),_:1})),[[F,["SysDeptRefresh"]]])]),_:1}),u(K,{showSearch:s(ie),"onUpdate:showSearch":a[3]||(a[3]=e=>S(ie)?ie.value=e:null),onQueryTable:Te,columns:s(xe)},null,8,["showSearch","columns"])]),_:1}),b((n(),g(q,{key:s(me),ref_key:"treetable",ref:he,"row-key":e=>String(e.deptid),data:s(Re)?s(Le):s(ae),"tree-props":{children:"children",hasChildren:"dept_isexistschild",checkStrictly:!0},onSelectionChange:Xe,lazy:!!s(Re),load:Ye,border:""},{default:o(()=>[u(O,{type:"selection",width:"55",align:"center"}),s(xe)[0].visible?(n(),g(O,{key:0,label:"部门名称",align:"left",prop:`${s(ge)}_name`},null,8,["prop"])):w("",!0),s(xe)[1].visible?(n(),g(O,{key:1,label:"部门编号",align:"center",prop:`${s(ge)}_no`},null,8,["prop"])):w("",!0),s(xe)[2].visible?(n(),g(O,{key:2,label:"部门类型",align:"center",width:"120"},{default:o(e=>[r("span",null,f(s(j)(s(ye),a=>e.row[`${s(ge)}_depttypeid`]==a.depttypeid).value?.depttype_name),1)]),_:1})):w("",!0),s(xe)[3].visible?(n(),g(O,{key:3,label:"状态",align:"center",width:"100"},{default:o(e=>[u(N,{options:s(ee),value:e.row[`${s(ge)}_state`]},null,8,["options","value"])]),_:1})):w("",!0),s(xe)[4].visible?(n(),g(O,{key:4,label:"JSON信息",align:"center"},{default:o(({row:e})=>[r("span",null,f(JSON.stringify(e[`${s(ge)}_json`])),1)]),_:1})):w("",!0),s(xe)[5].visible?(n(),g(O,{key:5,label:"排序",align:"center",prop:`${s(ge)}_sort`,width:"100"},null,8,["prop"])):w("",!0),s(xe)[6].visible?(n(),g(O,{key:6,label:"备注",align:"center","show-overflow-tooltip":!0,prop:`${s(ge)}_note`},null,8,["prop"])):w("",!0),s(xe)[7].visible?(n(),g(O,{key:7,label:"创建时间",align:"center",width:"180"},{default:o(e=>[r("span",null,f(s(D)(e.row[`${s(ge)}_create_time`]).format("YYYY-MM-DD HH:mm:ss")),1)]),_:1})):w("",!0),u(O,{label:"操作",align:"center",width:"530","class-name":"small-padding fixed-width"},{default:o(e=>[b((n(),g(V,{link:"",type:"primary",icon:"Plus",onClick:a=>We(e.row)},{default:o(()=>[...a[24]||(a[24]=[p("新增下级",-1)])]),_:2},1032,["onClick"])),[[F,["SysDeptAdd"]]]),b((n(),g(V,{link:"",type:"primary",onClick:a=>{return l=e.row,Ue.value=!0,fe.value="管辖范围绑定",void($e.value={parentdeptid:l.deptid,key:"childdeptidList"});var l}},{default:o(()=>[...a[25]||(a[25]=[p("管辖范围",-1)])]),_:2},1032,["onClick"])),[[F,["SysDeptMange"]]]),b((n(),g(V,{link:"",type:"primary",onClick:a=>{return l=e.row,Ue.value=!0,fe.value="行政区划绑定",void(we.value={deptid:l.deptid,key:"areaidList"});var l}},{default:o(()=>[...a[26]||(a[26]=[p(" 行政区划 ",-1)])]),_:2},1032,["onClick"])),[[F,["SysDeptArea"]]]),b((n(),g(V,{link:"",type:"primary",onClick:a=>{return l=e.row,B({pageNo:1,pageSize:1e4}).then(e=>{e?.records&&(je.value=e.records)}),Oe.value=!0,fe.value="行政区划类型绑定",void(Ne.value.deptid=l.deptid);var l}},{default:o(()=>[...a[27]||(a[27]=[p(" 行政区划类型 ",-1)])]),_:2},1032,["onClick"])),[[F,["SysDeptAreaType"]]]),b((n(),g(V,{link:"",type:"primary",icon:"Edit",onClick:a=>Ze(e.row)},{default:o(()=>[...a[28]||(a[28]=[p("修改",-1)])]),_:2},1032,["onClick"])),[[F,["SysDeptEdit"]]]),b((n(),g(V,{link:"",type:"primary",icon:"Delete",onClick:a=>la(e.row)},{default:o(()=>[...a[29]||(a[29]=[p("删除",-1)])]),_:2},1032,["onClick"])),[[F,["SysDeptDelete"]]])]),_:1})]),_:1},8,["row-key","data","lazy"])),[[H,s(te)]]),b(u(J,{total:s(ve),page:s(Ae).pageNo,"onUpdate:page":a[4]||(a[4]=e=>s(Ae).pageNo=e),limit:s(Ae).pageSize,"onUpdate:limit":a[5]||(a[5]=e=>s(Ae).pageSize=e),onPagination:Te},null,8,["total","page","limit"]),[[k,s(ve)>0&&!s(Re)]]),u(T,{title:s(fe),modelValue:s(ze),"onUpdate:modelValue":a[14]||(a[14]=e=>S(ze)?ze.value=e:null),width:"500px","append-to-body":"",draggable:"","destroy-on-close":""},{footer:o(()=>[r("div",oe,[u(V,{type:"primary",onClick:ea},{default:o(()=>[...a[30]||(a[30]=[p("确 定",-1)])]),_:1}),u(V,{onClick:Be},{default:o(()=>[...a[31]||(a[31]=[p("取 消",-1)])]),_:1})])]),default:o(()=>[u(C,{ref_key:"dataRef",ref:qe,model:s(De),rules:s(Pe),"label-width":"80px"},{default:o(()=>[u(y,{label:"父级部门",prop:`${s(ge)}_parentid`},{default:o(()=>[u(R,{modelValue:s(De)[`${s(ge)}_parentid`],"onUpdate:modelValue":a[6]||(a[6]=e=>s(De)[`${s(ge)}_parentid`]=e),data:s(Ee),props:{value:`${s(ge)}id`,label:`${s(ge)}_name`,children:"children"},"value-ey":`${s(ge)}id`,placeholder:"选择父级部门","check-strictly":""},null,8,["modelValue","data","props","value-ey"])]),_:1},8,["prop"]),u(y,{label:"部门类型",prop:`${s(ge)}_depttypeid`},{default:o(()=>[u(t,{modelValue:s(De)[`${s(ge)}_depttypeid`],"onUpdate:modelValue":a[7]||(a[7]=e=>s(De)[`${s(ge)}_depttypeid`]=e),placeholder:"请选择部门类型"},{default:o(()=>[(n(!0),d(c,null,v(s(ye),e=>(n(),g(l,{key:e.depttypeid,label:e.depttype_name,value:e.depttypeid},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["prop"]),u(y,{label:"部门名称",prop:`${s(ge)}_name`},{default:o(()=>[u(m,{modelValue:s(De)[`${s(ge)}_name`],"onUpdate:modelValue":a[8]||(a[8]=e=>s(De)[`${s(ge)}_name`]=e),placeholder:"请输入部门名称"},null,8,["modelValue"])]),_:1},8,["prop"]),u(y,{label:"部门编号",prop:`${s(ge)}_no`},{default:o(()=>[u(m,{modelValue:s(De)[`${s(ge)}_no`],"onUpdate:modelValue":a[9]||(a[9]=e=>s(De)[`${s(ge)}_no`]=e),placeholder:"请输入部门编号"},null,8,["modelValue"])]),_:1},8,["prop"]),u(y,{label:"数据Json",prop:`${s(ge)}_json`},{default:o(()=>[u(m,{modelValue:s(De)[`${s(ge)}_json`],"onUpdate:modelValue":a[10]||(a[10]=e=>s(De)[`${s(ge)}_json`]=e),placeholder:"请输入其他属性"},null,8,["modelValue"])]),_:1},8,["prop"]),u(y,{label:"显示排序"},{default:o(()=>[u(E,{modelValue:s(De)[`${s(ge)}_sort`],"onUpdate:modelValue":a[11]||(a[11]=e=>s(De)[`${s(ge)}_sort`]=e),"controls-position":"right",min:0},null,8,["modelValue"])]),_:1}),u(y,{label:"状态"},{default:o(()=>[u(M,{modelValue:s(De)[`${s(ge)}_state`],"onUpdate:modelValue":a[12]||(a[12]=e=>s(De)[`${s(ge)}_state`]=e)},{default:o(()=>[(n(!0),d(c,null,v(s(ee),e=>(n(),g(L,{key:e.value,value:e.value},{default:o(()=>[p(f(e.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1}),u(y,{label:"备注"},{default:o(()=>[u(m,{modelValue:s(De)[`${s(ge)}_note`],"onUpdate:modelValue":a[13]||(a[13]=e=>s(De)[`${s(ge)}_note`]=e),type:"textarea",placeholder:"请输入内容"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title","modelValue"]),u(T,{title:s(fe),modelValue:s(Ue),"onUpdate:modelValue":a[15]||(a[15]=e=>S(Ue)?Ue.value=e:null),width:"800px","align-center":"","append-to-body":"",draggable:"","destroy-on-close":""},{footer:o(()=>[r("div",se,[u(V,{onClick:Be},{default:o(()=>[...a[32]||(a[32]=[p("取 消",-1)])]),_:1})])]),default:o(()=>[u(Y,{apis:"管辖范围绑定"===s(fe)?Se:Ce,rootParams:{value:0,pageNo:0,pageSize:1e4},keys:"管辖范围绑定"===s(fe)?s(ke):s(Ve),interfaceParams:"管辖范围绑定"===s(fe)?s($e):s(we)},null,8,["apis","keys","interfaceParams"])]),_:1},8,["title","modelValue"]),u(T,{title:s(fe),modelValue:s(Oe),"onUpdate:modelValue":a[17]||(a[17]=e=>S(Oe)?Oe.value=e:null),width:"500px","append-to-body":"",draggable:"","destroy-on-close":""},{footer:o(()=>[r("div",pe,[u(V,{type:"primary",onClick:ia},{default:o(()=>[...a[33]||(a[33]=[p(" 添 加 ",-1)])]),_:1}),u(V,{type:"danger",onClick:da},{default:o(()=>[...a[34]||(a[34]=[p("删 除",-1)])]),_:1})])]),default:o(()=>[u(t,{modelValue:s(Ne).areatypeid,"onUpdate:modelValue":a[16]||(a[16]=e=>s(Ne).areatypeid=e),placeholder:"请选择行政区划类型"},{default:o(()=>[(n(!0),d(c,null,v(s(je),e=>(n(),g(l,{key:e.areatypeid,label:e.areatype_name,value:e.areatypeid},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["title","modelValue"])])}}};export{ce as default};
1
+ import{ref as e,reactive as a,computed as l,onMounted as t,resolveComponent as i,createElementBlock as d,openBlock as n,createVNode as u,createElementVNode as r,withCtx as o,unref as s,createTextVNode as p,Fragment as c,renderList as v,toDisplayString as f,shallowRef as y,toRefs as m,resolveDirective as _,withDirectives as b,createBlock as g,withKeys as $,vShow as k,isRef as S,createCommentVNode as w}from"vue";import{a5 as V,e as C,a7 as j,G as x,t as K,J as A}from"./dict-D0GT4LDn.js";import{_ as D}from"./lv-CmTz0kLM.js";import{_ as P}from"./index-DYYqzo6m.js";import{_ as z}from"./index-ww55-EeJ.js";import{_ as O}from"./index-CCuSgHmL.js";import{d as U}from"./dayjs.min-DyGzrGFv.js";import{u as N}from"./dict-BACFwNyw.js";import{a as q,s as J,b as R,c as E,d as L,e as M}from"./Dept-D4rLt7Bv.js";import{s as T,a as Y,g as F}from"./deptgxfw-CSWTif3F.js";import{f as H,a as Q}from"./regions-B1FvFl14.js";import{d as B,a as G,g as I,b as W,c as X}from"./areadept-Bm6hT5Oz.js";import{g as Z}from"./Depttype-DUUx7AKD.js";const ee={class:"lt-wrap"},ae={class:"lt-body"},le={class:"lt-buttons"},te={class:"lt-header"},ie={class:"lt-muted"},de={class:"lt-body"},ne={class:"lt-item-label"};var ue=/* @__PURE__ */D({__name:"index",props:{apis:{type:Object,required:!0},keys:{type:Object,default:()=>({idKey:"id",nameKey:"name",parentKey:"parentid",hasChildKey:"isexistschild"})},rootParams:{type:Object,required:!0},interfaceParams:{type:Object,required:!0}},setup(y){const m=y,_=e(),b=e([]),g=a(/* @__PURE__ */new Map),$=e(/* @__PURE__ */new Set),k=e(/* @__PURE__ */new Set),S=e([]),w=l(()=>{const e=[];for(const a of S.value){const l=g.get(String(a));l?e.push(l):e.push({id:String(a),label:String(a)})}return e});function C(e){const a=String(e?.[m.keys.value.idKey]),l={id:a,label:e?.[m.keys.value.nameKey]??a,isLeaf:0===Number(e?.[m.keys.value.hasChildKey]),raw:e};return g.set(a,l),l}async function j(e){const a=await m.apis.fetchChildren(e);return(Array.isArray(a)?a:Array.isArray(a?.records)?a.records:[]).map(C)}t(async()=>{try{const e=await j({...m.rootParams,[m.keys.value.parentKey]:Number(m.rootParams.value)});b.value=e,await D()}catch(e){}});const x=async(e,a)=>{try{const l=e.data?.raw,t=l?.[m.keys.value.idKey];if(null==t)return a([]);const i={...m.rootParams,[m.keys.value.parentKey]:Number(t)};a(await j(i))}catch(l){a([])}};function K(e,a){const l=new Set(a.checkedKeys.map(e=>String(e)));$.value=l}function A(e){if(k.value.clear(),e)for(const a of w.value)k.value.add(a.id)}async function D(){if("function"==typeof m.apis.fetchSearch)try{const e=await m.apis.fetchSearch(m.interfaceParams);let a=[],l=[];if(Array.isArray(e)?a=e.map(String):Array.isArray(e?.records)&&(a=e.records.map(e=>String(e[m.keys.value.idKey])),l=e.records),S.value=a,l.length)for(const t of l){const e=String(t[m.keys.value.idKey]);g.has(e)||C(t)}}catch(e){}}function P(){if("function"==typeof m.apis.fetchAdd){const e={...m.interfaceParams,[m.interfaceParams.key]:Array.from($.value)};m.apis.fetchAdd(e).then(e=>{V.msgSuccess("绑定成功"),function(){if(!$.value.size)return;const e=new Set(S.value.map(e=>String(e)));for(const a of $.value)e.add(a);S.value=Array.from(e),_.value?.setCheckedKeys([]),$.value.clear()}(),D()}).catch(e=>{_.value?.setCheckedKeys([]),$.value.clear()})}}function z(){if("function"==typeof m.apis.fetchDel){const e={...m.interfaceParams,[m.interfaceParams.key]:Array.from(k.value)};m.apis.fetchDel(e).then(e=>{V.msgSuccess("删除成功"),function(){if(!k.value.size)return;const e=S.value.filter(e=>!k.value.has(String(e)));k.value.clear(),S.value=e}(),D()})}}return(e,a)=>{const l=i("el-tree"),t=i("el-card"),y=i("el-button"),m=i("el-space"),g=i("el-checkbox");return n(),d("div",ee,[u(t,{class:"lt-panel",shadow:"hover"},{header:o(()=>[...a[0]||(a[0]=[r("div",{class:"lt-header"},[r("span",null,"待选")],-1)])]),default:o(()=>[r("div",ae,[u(l,{ref_key:"leftTreeRef",ref:_,data:s(b),load:x,lazy:"","node-key":"id","show-checkbox":"","check-strictly":"","highlight-current":"",props:{label:"label",children:"children",isLeaf:"isLeaf"},onCheck:K},null,8,["data"])])]),_:1}),r("div",le,[u(m,{direction:"vertical"},{default:o(()=>[u(y,{type:"primary",icon:"Right",disabled:0===s($).size,onClick:P},{default:o(()=>[...a[1]||(a[1]=[p(" 添加 ",-1)])]),_:1},8,["disabled"]),u(y,{type:"primary",icon:"Back",disabled:0===s(k).size,onClick:z},{default:o(()=>[...a[2]||(a[2]=[p(" 移除 ",-1)])]),_:1},8,["disabled"])]),_:1})]),u(t,{class:"lt-panel",shadow:"hover"},{header:o(()=>[r("div",te,[a[4]||(a[4]=r("span",null,"已选",-1)),r("span",ie,"("+f(s(w).length)+")",1),u(g,{indeterminate:s(k).size>0&&s(k).size<s(w).length,"model-value":s(w).length>0&&s(k).size===s(w).length,onChange:A,style:{"margin-left":"auto"}},{default:o(()=>[...a[3]||(a[3]=[p(" 全选 ",-1)])]),_:1},8,["indeterminate","model-value"])])]),default:o(()=>[r("div",de,[(n(!0),d(c,null,v(s(w),e=>(n(),d("div",{key:e.id,class:"lt-item"},[u(g,{"model-value":s(k).has(e.id),onChange:a=>{return l=e.id,void(a?k.value.add(l):k.value.delete(l));var l}},null,8,["model-value","onChange"]),r("span",ne,f(e.label),1)]))),128))])]),_:1})])}}},[["__scopeId","data-v-441c17b3"]]);const re={class:"app-container"},oe={class:"dialog-footer"},se={class:"dialog-footer"},pe={class:"dialog-footer"},ce={__name:"index",setup(t){const D=U,{sys_deptdept_state:ee}=N("sys_dept@dept_state"),ae=e([]),le=e([]),te=e(!0),ie=e(!0),de=e([]),ne=e(!0),ce=e(!0),ve=e(0),fe=e(""),ye=e([]),me=e(!0),_e=e([]),he=e(),be=y({}),ge=e(""),$e=e({}),ke=a({}),Se={fetchChildren:q,fetchSearch:F,fetchAdd:Y,fetchDel:T},we=e({}),Ve=a({}),Ce={fetchChildren:H,fetchSearch:I,fetchAdd:G,fetchDel:B},je=e([]),xe=e([{label:"部门名称",visible:!0},{label:"部门编号",visible:!0},{label:"部门类型",visible:!0},{label:"状态",visible:!0},{label:"JSON信息",visible:!1},{label:"排序",visible:!1},{label:"备注",visible:!1},{label:"创建时间",visible:!0}].map((e,a)=>({key:`key${a}`,...e}))),Ke=a({form:{},sysareatypeForm:{areatypeid:void 0,deptid:void 0},queryParams:{pageNo:1,pageSize:10,selectinfo:void 0},rules:{},open:!1,deptgxfwOrAreadepOpen:!1,deptidareatypeidOpen:!1}),{queryParams:Ae,form:De,rules:Pe,deptgxfwOrAreadepOpen:ze,open:Oe,deptidareatypeidOpen:Ue,sysareatypeForm:Ne}=m(Ke),qe=e(),Je=e(),Re=e(!0),Ee=l(()=>[{[`${ge.value}id`]:"0",[`${ge.value}_name`]:"根目录",children:Le.value}]),Le=l(()=>C(le.value,`${ge.value}id`,`${ge.value}_parentid`));function Me(){ge.value="dept",Ae.value[`${ge.value}_parentid`]=0,Ae.value[`${ge.value}_state`]=void 0,Pe.value={[`${ge.value}_no`]:[{required:!0,message:"部门编号不能为空",trigger:"blur"}],[`${ge.value}_name`]:[{required:!0,message:"部门名称不能为空",trigger:"blur"}],[`${ge.value}_parentid`]:[{required:!0,message:"父级部门不能为空",trigger:"blur"}],[`${ge.value}_depttypeid`]:[{required:!0,message:"部门类型不能为空",trigger:"blur"}]},be.value={search:q,add:M,delete:L,edit:E,detail:R},ke.value={idKey:`${ge.value}id`,nameKey:`${ge.value}_name`,parentKey:`${ge.value}_parentid`,hasChildKey:`${ge.value}_isexistschild`},Ve.value={idKey:"areaid",nameKey:"area_name",parentKey:"area_parentid",hasChildKey:"area_isexistschild"},Ge()}function Te(){te.value=!0,be.value.search({...Ae.value,...Re.value?{pageSize:1e4}:{}}).then(e=>{Re.value?(ae.value=[],le.value=He(e.records||[])):(ae.value=e.records||[],me.value=!me.value),ve.value=e.rowCount||0,te.value=!1})}async function Ye(e,a,l){e.children=await Fe(e.deptid),le.value=He(e.children),l(e.children)}async function Fe(e){te.value=!0,Ae.value.dept_parentid=e;const a=await be.value.search({...Ae.value,pageSize:1e4});return te.value=!1,a.records||[]}function He(e){const a=new Map(le.value.map(e=>[e[`${ge.value}id`],e]));return e.forEach(e=>a.set(e[`${ge.value}id`],e)),Array.from(a.values())}function Qe(){ze.value=!1,Ue.value=!1,Oe.value=!1,Oe.title=void 0,Be()}function Be(){x(qe.value),De.value={[`${ge.value}id`]:void 0,[`${ge.value}_no`]:void 0,[`${ge.value}_name`]:void 0,[`${ge.value}_json`]:void 0,[`${ge.value}_sort`]:0,[`${ge.value}_depttypeid`]:void 0,[`${ge.value}_state`]:1,[`${ge.value}_note`]:void 0},Ne.value={areatypeid:void 0,deptid:void 0}}function Ge(){Ae.value.selectinfo||Ae.value[`${ge.value}_depttypeid`]||Ae.value[`${ge.value}_state`]?(Ae.value[`${ge.value}_parentid`]=void 0,Re.value=!1):(Ae.value[`${ge.value}_parentid`]=0,Re.value=!0),Ae.value.pageNo=1,Te()}function Ie(){x(Je.value),Ae.value.dept_parentid=0,Ae.value[`${ge.value}_state`]=void 0,le.value=[],Me()}function We(e){Be(),Oe.value=!0,fe.value="添加部门",De.value.dictid=Ae.value[`${ge.value}_dictid`],e&&(De.value[`${ge.value}_parentid`]=e[`${ge.value}id`])}function Xe(e){de.value=e.map(e=>e[`${ge.value}id`]),ne.value=1!=e.length,ce.value=!e.length}function Ze(e){Be();const a=e[`${ge.value}id`]||de.value;be.value.detail(a).then(e=>{let a=e[`${ge.value}_json`]?e[`${ge.value}_json`]:void 0;De.value=Object.assign({},e,{[`${ge.value}_json`]:a&&0===Object.keys(a).length?void 0:JSON.stringify(a)}),Oe.value=!0,fe.value="修改"})}function ea(){qe.value.validate(e=>{e&&(null!=De.value[`${ge.value}id`]?be.value.edit(aa()).then(e=>{V.msgSuccess("修改成功"),Oe.value=!1,Fe(e[`${ge.value}_parentid`]).then(a=>{le.value=He(a),_e.value.includes(e[`${ge.value}_parentid`])&&(_e.value=_e.value.filter(a=>a!=e[`${ge.value}_parentid`])),_e.value.includes(e[`${ge.value}_parentid`])||_e.value.push(e[`${ge.value}_parentid`]),setTimeout(()=>{me.value=!me.value},0)})}):be.value.add(aa()).then(e=>{V.msgSuccess("新增成功"),Oe.value=!1,Re.value?Fe(e[`${ge.value}_parentid`]).then(e=>{le.value=He(e),setTimeout(()=>{me.value=!me.value},0)}):Te()}))})}function aa(){let e,a=JSON.parse(JSON.stringify(De.value));return K(a[`${ge.value}_json`])||(e=A(a[`${ge.value}_json`])),a.dept_json=e,a}function la(e){const a=e[`${ge.value}id`]?[e[`${ge.value}id`]]:de.value;V.confirm('是否确认删除部门id为"'+a+'"的数据项?').then(function(){return be.value.delete(a)}).then(()=>{Te(),Re.value&&(le.value=le.value.filter(e=>!a.includes(e[`${ge.value}id`])),_e.value=_e.value.filter(e=>!a.includes(e)),me.value=!me.value),V.msgSuccess("删除成功")}).catch(()=>{})}function ta(){J().then(()=>{V.msgSuccess("刷新缓存成功")})}function ia(){W(Ne.value).then(e=>{V.msgSuccess("行政区划类型绑定成功"),Ue.value=!1,Be()})}function da(){X(Ne.value).then(e=>{V.msgSuccess("删除成功"),Ue.value=!1,Be()})}return Me(),Z({pageNo:1,pageSize:1e4}).then(e=>{ye.value=e.records}),(e,a)=>{const l=i("el-option"),t=i("el-select"),y=i("el-form-item"),m=i("el-input"),V=i("el-button"),C=i("el-form"),x=i("el-col"),K=O,A=i("el-row"),U=i("el-table-column"),N=z,q=i("el-table"),J=P,R=i("el-tree-select"),E=i("el-input-number"),L=i("el-radio"),M=i("el-radio-group"),T=i("el-dialog"),Y=ue,F=_("hasPermi"),H=_("loading");return n(),d("div",re,[b(u(C,{model:s(Ae),ref_key:"queryRef",ref:Je,inline:!0},{default:o(()=>[u(y,{label:"部门类型",prop:`${s(ge)}_depttypeid`},{default:o(()=>[u(t,{modelValue:s(Ae)[`${s(ge)}_depttypeid`],"onUpdate:modelValue":a[0]||(a[0]=e=>s(Ae)[`${s(ge)}_depttypeid`]=e),style:{width:"200px"},placeholder:"请选择部门类型"},{default:o(()=>[(n(!0),d(c,null,v(s(ye),e=>(n(),g(l,{key:e.depttypeid,label:e.depttype_name,value:e.depttypeid},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["prop"]),u(y,{label:"",prop:"selectinfo"},{default:o(()=>[u(m,{modelValue:s(Ae).selectinfo,"onUpdate:modelValue":a[1]||(a[1]=e=>s(Ae).selectinfo=e),placeholder:"请输入搜索内容",clearable:"",style:{width:"240px"},onKeyup:$(Ge,["enter"])},null,8,["modelValue"])]),_:1}),u(y,{label:"状态",prop:"menu_state"},{default:o(()=>[u(t,{modelValue:s(Ae)[`${s(ge)}_state`],"onUpdate:modelValue":a[2]||(a[2]=e=>s(Ae)[`${s(ge)}_state`]=e),placeholder:"请选择状态",clearable:"",style:{width:"200px"}},{default:o(()=>[(n(!0),d(c,null,v(s(ee),e=>(n(),g(l,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),u(y,null,{default:o(()=>[u(V,{type:"primary",icon:"Search",onClick:Ge},{default:o(()=>[...a[18]||(a[18]=[p("搜索",-1)])]),_:1}),u(V,{icon:"Refresh",onClick:Ie},{default:o(()=>[...a[19]||(a[19]=[p("重置",-1)])]),_:1})]),_:1})]),_:1},8,["model"]),[[k,s(ie)]]),u(A,{gutter:10,class:"mb8"},{default:o(()=>[u(x,{span:1.5},{default:o(()=>[b((n(),g(V,{type:"primary",plain:"",icon:"Plus",onClick:We},{default:o(()=>[...a[20]||(a[20]=[p("新增",-1)])]),_:1})),[[F,["SysDeptAdd"]]])]),_:1}),u(x,{span:1.5},{default:o(()=>[b((n(),g(V,{type:"success",plain:"",icon:"Edit",disabled:s(ne),onClick:Ze},{default:o(()=>[...a[21]||(a[21]=[p("修改",-1)])]),_:1},8,["disabled"])),[[F,["SysDeptEdit"]]])]),_:1}),u(x,{span:1.5},{default:o(()=>[b((n(),g(V,{type:"danger",plain:"",icon:"Delete",disabled:s(ce),onClick:la},{default:o(()=>[...a[22]||(a[22]=[p("删除",-1)])]),_:1},8,["disabled"])),[[F,["SysDeptDelete"]]])]),_:1}),u(x,{span:1.5},{default:o(()=>[b((n(),g(V,{type:"danger",plain:"",icon:"Refresh",onClick:ta},{default:o(()=>[...a[23]||(a[23]=[p("刷新缓存",-1)])]),_:1})),[[F,["SysDeptRefresh"]]])]),_:1}),u(K,{showSearch:s(ie),"onUpdate:showSearch":a[3]||(a[3]=e=>S(ie)?ie.value=e:null),onQueryTable:Te,columns:s(xe)},null,8,["showSearch","columns"])]),_:1}),b((n(),g(q,{key:s(me),ref_key:"treetable",ref:he,"row-key":e=>String(e.deptid),data:s(Re)?s(Le):s(ae),"tree-props":{children:"children",hasChildren:"dept_isexistschild",checkStrictly:!0},onSelectionChange:Xe,lazy:!!s(Re),load:Ye,border:""},{default:o(()=>[u(U,{type:"selection",width:"55",align:"center"}),s(xe)[0].visible?(n(),g(U,{key:0,label:"部门名称",align:"left",prop:`${s(ge)}_name`},null,8,["prop"])):w("",!0),s(xe)[1].visible?(n(),g(U,{key:1,label:"部门编号",align:"center",prop:`${s(ge)}_no`},null,8,["prop"])):w("",!0),s(xe)[2].visible?(n(),g(U,{key:2,label:"部门类型",align:"center",width:"120"},{default:o(e=>[r("span",null,f(s(j)(s(ye),a=>e.row[`${s(ge)}_depttypeid`]==a.depttypeid).value?.depttype_name),1)]),_:1})):w("",!0),s(xe)[3].visible?(n(),g(U,{key:3,label:"状态",align:"center",width:"100"},{default:o(e=>[u(N,{options:s(ee),value:e.row[`${s(ge)}_state`]},null,8,["options","value"])]),_:1})):w("",!0),s(xe)[4].visible?(n(),g(U,{key:4,label:"JSON信息",align:"center"},{default:o(({row:e})=>[r("span",null,f(JSON.stringify(e[`${s(ge)}_json`])),1)]),_:1})):w("",!0),s(xe)[5].visible?(n(),g(U,{key:5,label:"排序",align:"center",prop:`${s(ge)}_sort`,width:"100"},null,8,["prop"])):w("",!0),s(xe)[6].visible?(n(),g(U,{key:6,label:"备注",align:"center","show-overflow-tooltip":!0,prop:`${s(ge)}_note`},null,8,["prop"])):w("",!0),s(xe)[7].visible?(n(),g(U,{key:7,label:"创建时间",align:"center",width:"180"},{default:o(e=>[r("span",null,f(s(D)(e.row[`${s(ge)}_create_time`]).format("YYYY-MM-DD HH:mm:ss")),1)]),_:1})):w("",!0),u(U,{label:"操作",align:"center",width:"530","class-name":"small-padding fixed-width"},{default:o(e=>[b((n(),g(V,{link:"",type:"primary",icon:"Plus",onClick:a=>We(e.row)},{default:o(()=>[...a[24]||(a[24]=[p("新增下级",-1)])]),_:2},1032,["onClick"])),[[F,["SysDeptAdd"]]]),b((n(),g(V,{link:"",type:"primary",onClick:a=>{return l=e.row,ze.value=!0,fe.value="管辖范围绑定",void($e.value={parentdeptid:l.deptid,key:"childdeptidList"});var l}},{default:o(()=>[...a[25]||(a[25]=[p("管辖范围",-1)])]),_:2},1032,["onClick"])),[[F,["SysDeptMange"]]]),b((n(),g(V,{link:"",type:"primary",onClick:a=>{return l=e.row,ze.value=!0,fe.value="行政区划绑定",void(we.value={deptid:l.deptid,key:"areaidList"});var l}},{default:o(()=>[...a[26]||(a[26]=[p(" 行政区划 ",-1)])]),_:2},1032,["onClick"])),[[F,["SysDeptArea"]]]),b((n(),g(V,{link:"",type:"primary",onClick:a=>{return l=e.row,Q({pageNo:1,pageSize:1e4}).then(e=>{e?.records&&(je.value=e.records)}),Ue.value=!0,fe.value="行政区划类型绑定",void(Ne.value.deptid=l.deptid);var l}},{default:o(()=>[...a[27]||(a[27]=[p(" 行政区划类型 ",-1)])]),_:2},1032,["onClick"])),[[F,["SysDeptAreaType"]]]),b((n(),g(V,{link:"",type:"primary",icon:"Edit",onClick:a=>Ze(e.row)},{default:o(()=>[...a[28]||(a[28]=[p("修改",-1)])]),_:2},1032,["onClick"])),[[F,["SysDeptEdit"]]]),b((n(),g(V,{link:"",type:"primary",icon:"Delete",onClick:a=>la(e.row)},{default:o(()=>[...a[29]||(a[29]=[p("删除",-1)])]),_:2},1032,["onClick"])),[[F,["SysDeptDelete"]]])]),_:1})]),_:1},8,["row-key","data","lazy"])),[[H,s(te)]]),b(u(J,{total:s(ve),page:s(Ae).pageNo,"onUpdate:page":a[4]||(a[4]=e=>s(Ae).pageNo=e),limit:s(Ae).pageSize,"onUpdate:limit":a[5]||(a[5]=e=>s(Ae).pageSize=e),onPagination:Te},null,8,["total","page","limit"]),[[k,s(ve)>0&&!s(Re)]]),u(T,{title:s(fe),modelValue:s(Oe),"onUpdate:modelValue":a[14]||(a[14]=e=>S(Oe)?Oe.value=e:null),width:"500px","append-to-body":"",draggable:"","destroy-on-close":""},{footer:o(()=>[r("div",oe,[u(V,{type:"primary",onClick:ea},{default:o(()=>[...a[30]||(a[30]=[p("确 定",-1)])]),_:1}),u(V,{onClick:Qe},{default:o(()=>[...a[31]||(a[31]=[p("取 消",-1)])]),_:1})])]),default:o(()=>[u(C,{ref_key:"dataRef",ref:qe,model:s(De),rules:s(Pe),"label-width":"80px"},{default:o(()=>[u(y,{label:"父级部门",prop:`${s(ge)}_parentid`},{default:o(()=>[u(R,{modelValue:s(De)[`${s(ge)}_parentid`],"onUpdate:modelValue":a[6]||(a[6]=e=>s(De)[`${s(ge)}_parentid`]=e),data:s(Ee),props:{value:`${s(ge)}id`,label:`${s(ge)}_name`,children:"children"},"value-ey":`${s(ge)}id`,placeholder:"选择父级部门","check-strictly":""},null,8,["modelValue","data","props","value-ey"])]),_:1},8,["prop"]),u(y,{label:"部门类型",prop:`${s(ge)}_depttypeid`},{default:o(()=>[u(t,{modelValue:s(De)[`${s(ge)}_depttypeid`],"onUpdate:modelValue":a[7]||(a[7]=e=>s(De)[`${s(ge)}_depttypeid`]=e),placeholder:"请选择部门类型"},{default:o(()=>[(n(!0),d(c,null,v(s(ye),e=>(n(),g(l,{key:e.depttypeid,label:e.depttype_name,value:e.depttypeid},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["prop"]),u(y,{label:"部门名称",prop:`${s(ge)}_name`},{default:o(()=>[u(m,{modelValue:s(De)[`${s(ge)}_name`],"onUpdate:modelValue":a[8]||(a[8]=e=>s(De)[`${s(ge)}_name`]=e),placeholder:"请输入部门名称"},null,8,["modelValue"])]),_:1},8,["prop"]),u(y,{label:"部门编号",prop:`${s(ge)}_no`},{default:o(()=>[u(m,{modelValue:s(De)[`${s(ge)}_no`],"onUpdate:modelValue":a[9]||(a[9]=e=>s(De)[`${s(ge)}_no`]=e),placeholder:"请输入部门编号"},null,8,["modelValue"])]),_:1},8,["prop"]),u(y,{label:"数据Json",prop:`${s(ge)}_json`},{default:o(()=>[u(m,{modelValue:s(De)[`${s(ge)}_json`],"onUpdate:modelValue":a[10]||(a[10]=e=>s(De)[`${s(ge)}_json`]=e),placeholder:"请输入其他属性"},null,8,["modelValue"])]),_:1},8,["prop"]),u(y,{label:"显示排序"},{default:o(()=>[u(E,{modelValue:s(De)[`${s(ge)}_sort`],"onUpdate:modelValue":a[11]||(a[11]=e=>s(De)[`${s(ge)}_sort`]=e),"controls-position":"right",min:0},null,8,["modelValue"])]),_:1}),u(y,{label:"状态"},{default:o(()=>[u(M,{modelValue:s(De)[`${s(ge)}_state`],"onUpdate:modelValue":a[12]||(a[12]=e=>s(De)[`${s(ge)}_state`]=e)},{default:o(()=>[(n(!0),d(c,null,v(s(ee),e=>(n(),g(L,{key:e.value,value:e.value},{default:o(()=>[p(f(e.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1}),u(y,{label:"备注"},{default:o(()=>[u(m,{modelValue:s(De)[`${s(ge)}_note`],"onUpdate:modelValue":a[13]||(a[13]=e=>s(De)[`${s(ge)}_note`]=e),type:"textarea",placeholder:"请输入内容"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title","modelValue"]),u(T,{title:s(fe),modelValue:s(ze),"onUpdate:modelValue":a[15]||(a[15]=e=>S(ze)?ze.value=e:null),width:"800px","align-center":"","append-to-body":"",draggable:"","destroy-on-close":""},{footer:o(()=>[r("div",se,[u(V,{onClick:Qe},{default:o(()=>[...a[32]||(a[32]=[p("取 消",-1)])]),_:1})])]),default:o(()=>[u(Y,{apis:"管辖范围绑定"===s(fe)?Se:Ce,rootParams:{value:0,pageNo:0,pageSize:1e4},keys:"管辖范围绑定"===s(fe)?s(ke):s(Ve),interfaceParams:"管辖范围绑定"===s(fe)?s($e):s(we)},null,8,["apis","keys","interfaceParams"])]),_:1},8,["title","modelValue"]),u(T,{title:s(fe),modelValue:s(Ue),"onUpdate:modelValue":a[17]||(a[17]=e=>S(Ue)?Ue.value=e:null),width:"500px","append-to-body":"",draggable:"","destroy-on-close":""},{footer:o(()=>[r("div",pe,[u(V,{type:"primary",onClick:ia},{default:o(()=>[...a[33]||(a[33]=[p(" 添 加 ",-1)])]),_:1}),u(V,{type:"danger",onClick:da},{default:o(()=>[...a[34]||(a[34]=[p("删 除",-1)])]),_:1})])]),default:o(()=>[u(t,{modelValue:s(Ne).areatypeid,"onUpdate:modelValue":a[16]||(a[16]=e=>s(Ne).areatypeid=e),placeholder:"请选择行政区划类型"},{default:o(()=>[(n(!0),d(c,null,v(s(je),e=>(n(),g(l,{key:e.areatypeid,label:e.areatype_name,value:e.areatypeid},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["title","modelValue"])])}}};export{ce as default};
@@ -1 +1 @@
1
- import{a3 as n}from"./dict-CPL0HcgK.js";var o,e={exports:{}};var a=/* @__PURE__ */n((o||(o=1,e.exports=function(){function n(n){var a=[];return n.AMapUI&&a.push(o(n.AMapUI)),n.Loca&&a.push(e(n.Loca)),Promise.all(a)}function o(n){return new Promise(function(h,o){var e=[];if(n.plugins)for(var i=0;i<n.plugins.length;i+=1)-1==p.AMapUI.plugins.indexOf(n.plugins[i])&&e.push(n.plugins[i]);if(t.AMapUI===a.failed)o("前次请求 AMapUI 失败");else if(t.AMapUI===a.notload){t.AMapUI=a.loading,p.AMapUI.version=n.version||p.AMapUI.version,i=p.AMapUI.version;var l=document.body||document.head,r=document.createElement("script");r.type="text/javascript",r.src="https://webapi.amap.com/ui/"+i+"/main.js",r.onerror=function(n){t.AMapUI=a.failed,o("请求 AMapUI 失败")},r.onload=function(){if(t.AMapUI=a.loaded,e.length)window.AMapUI.loadUI(e,function(){for(var n=0,o=e.length;n<o;n++){var a=e[n].split("/").slice(-1)[0];window.AMapUI[a]=arguments[n]}for(h();s.AMapUI.length;)s.AMapUI.splice(0,1)[0]()});else for(h();s.AMapUI.length;)s.AMapUI.splice(0,1)[0]()},l.appendChild(r)}else t.AMapUI===a.loaded?n.version&&n.version!==p.AMapUI.version?o("不允许多个版本 AMapUI 混用"):e.length?window.AMapUI.loadUI(e,function(){for(var n=0,o=e.length;n<o;n++){var a=e[n].split("/").slice(-1)[0];window.AMapUI[a]=arguments[n]}h()}):h():n.version&&n.version!==p.AMapUI.version?o("不允许多个版本 AMapUI 混用"):s.AMapUI.push(function(n){n?o(n):e.length?window.AMapUI.loadUI(e,function(){for(var n=0,o=e.length;n<o;n++){var a=e[n].split("/").slice(-1)[0];window.AMapUI[a]=arguments[n]}h()}):h()})})}function e(n){return new Promise(function(h,o){if(t.Loca===a.failed)o("前次请求 Loca 失败");else if(t.Loca===a.notload){t.Loca=a.loading,p.Loca.version=n.version||p.Loca.version;var e=p.Loca.version,i=p.AMap.version.startsWith("2"),l=e.startsWith("2");if(i&&!l||!i&&l)o("JSAPI 与 Loca 版本不对应!!");else{i=p.key,l=document.body||document.head;var r=document.createElement("script");r.type="text/javascript",r.src="https://webapi.amap.com/loca?v="+e+"&key="+i,r.onerror=function(n){t.Loca=a.failed,o("请求 AMapUI 失败")},r.onload=function(){for(t.Loca=a.loaded,h();s.Loca.length;)s.Loca.splice(0,1)[0]()},l.appendChild(r)}}else t.Loca===a.loaded?n.version&&n.version!==p.Loca.version?o("不允许多个版本 Loca 混用"):h():n.version&&n.version!==p.Loca.version?o("不允许多个版本 Loca 混用"):s.Loca.push(function(n){n?o(n):o()})})}if(!window)throw Error("AMap JSAPI can only be used in Browser.");var a,i;(i=a||(a={})).notload="notload",i.loading="loading",i.loaded="loaded",i.failed="failed";var p={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},t={AMap:a.notload,AMapUI:a.notload,Loca:a.notload},s={AMapUI:[],Loca:[]},l=[],r=function(n){"function"==typeof n&&(t.AMap===a.loaded?n(window.AMap):l.push(n))};return{load:function(o){return new Promise(function(h,e){if(t.AMap==a.failed)e("");else if(t.AMap==a.notload){var i=o.key,s=o.version,d=o.plugins;i?(window.AMap&&"lbs.amap.com"!==location.host&&e("禁止多种API加载方式混用"),p.key=i,p.AMap.version=s||p.AMap.version,p.AMap.plugins=d||p.AMap.plugins,t.AMap=a.loading,s=document.body||document.head,window.___onAPILoaded=function(i){if(delete window.___onAPILoaded,i)t.AMap=a.failed,e(i);else for(t.AMap=a.loaded,n(o).then(function(){h(window.AMap)}).catch(e);l.length;)l.splice(0,1)[0]()},(d=document.createElement("script")).type="text/javascript",d.src="https://webapi.amap.com/maps?callback=___onAPILoaded&v="+p.AMap.version+"&key="+i+"&plugin="+p.AMap.plugins.join(","),d.onerror=function(n){t.AMap=a.failed,e(n)},s.appendChild(d)):e("请填写key")}else if(t.AMap==a.loaded)if(o.key&&o.key!==p.key)e("多个不一致的 key");else if(o.version&&o.version!==p.AMap.version)e("不允许多个版本 JSAPI 混用");else{if(i=[],o.plugins)for(s=0;s<o.plugins.length;s+=1)-1==p.AMap.plugins.indexOf(o.plugins[s])&&i.push(o.plugins[s]);i.length?window.AMap.plugin(i,function(){n(o).then(function(){h(window.AMap)}).catch(e)}):n(o).then(function(){h(window.AMap)}).catch(e)}else if(o.key&&o.key!==p.key)e("多个不一致的 key");else if(o.version&&o.version!==p.AMap.version)e("不允许多个版本 JSAPI 混用");else{var c=[];if(o.plugins)for(s=0;s<o.plugins.length;s+=1)-1==p.AMap.plugins.indexOf(o.plugins[s])&&c.push(o.plugins[s]);r(function(){c.length?window.AMap.plugin(c,function(){n(o).then(function(){h(window.AMap)}).catch(e)}):n(o).then(function(){h(window.AMap)}).catch(e)})}})},reset:function(){delete window.AMap,delete window.AMapUI,delete window.Loca,p={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},t={AMap:a.notload,AMapUI:a.notload,Loca:a.notload},s={AMap:[],AMapUI:[],Loca:[]}}}}()),e.exports));export{a as A};
1
+ import{a4 as n}from"./dict-D0GT4LDn.js";var o,e={exports:{}};var a=/* @__PURE__ */n((o||(o=1,e.exports=function(){function n(n){var a=[];return n.AMapUI&&a.push(o(n.AMapUI)),n.Loca&&a.push(e(n.Loca)),Promise.all(a)}function o(n){return new Promise(function(h,o){var e=[];if(n.plugins)for(var i=0;i<n.plugins.length;i+=1)-1==p.AMapUI.plugins.indexOf(n.plugins[i])&&e.push(n.plugins[i]);if(t.AMapUI===a.failed)o("前次请求 AMapUI 失败");else if(t.AMapUI===a.notload){t.AMapUI=a.loading,p.AMapUI.version=n.version||p.AMapUI.version,i=p.AMapUI.version;var l=document.body||document.head,r=document.createElement("script");r.type="text/javascript",r.src="https://webapi.amap.com/ui/"+i+"/main.js",r.onerror=function(n){t.AMapUI=a.failed,o("请求 AMapUI 失败")},r.onload=function(){if(t.AMapUI=a.loaded,e.length)window.AMapUI.loadUI(e,function(){for(var n=0,o=e.length;n<o;n++){var a=e[n].split("/").slice(-1)[0];window.AMapUI[a]=arguments[n]}for(h();s.AMapUI.length;)s.AMapUI.splice(0,1)[0]()});else for(h();s.AMapUI.length;)s.AMapUI.splice(0,1)[0]()},l.appendChild(r)}else t.AMapUI===a.loaded?n.version&&n.version!==p.AMapUI.version?o("不允许多个版本 AMapUI 混用"):e.length?window.AMapUI.loadUI(e,function(){for(var n=0,o=e.length;n<o;n++){var a=e[n].split("/").slice(-1)[0];window.AMapUI[a]=arguments[n]}h()}):h():n.version&&n.version!==p.AMapUI.version?o("不允许多个版本 AMapUI 混用"):s.AMapUI.push(function(n){n?o(n):e.length?window.AMapUI.loadUI(e,function(){for(var n=0,o=e.length;n<o;n++){var a=e[n].split("/").slice(-1)[0];window.AMapUI[a]=arguments[n]}h()}):h()})})}function e(n){return new Promise(function(h,o){if(t.Loca===a.failed)o("前次请求 Loca 失败");else if(t.Loca===a.notload){t.Loca=a.loading,p.Loca.version=n.version||p.Loca.version;var e=p.Loca.version,i=p.AMap.version.startsWith("2"),l=e.startsWith("2");if(i&&!l||!i&&l)o("JSAPI 与 Loca 版本不对应!!");else{i=p.key,l=document.body||document.head;var r=document.createElement("script");r.type="text/javascript",r.src="https://webapi.amap.com/loca?v="+e+"&key="+i,r.onerror=function(n){t.Loca=a.failed,o("请求 AMapUI 失败")},r.onload=function(){for(t.Loca=a.loaded,h();s.Loca.length;)s.Loca.splice(0,1)[0]()},l.appendChild(r)}}else t.Loca===a.loaded?n.version&&n.version!==p.Loca.version?o("不允许多个版本 Loca 混用"):h():n.version&&n.version!==p.Loca.version?o("不允许多个版本 Loca 混用"):s.Loca.push(function(n){n?o(n):o()})})}if(!window)throw Error("AMap JSAPI can only be used in Browser.");var a,i;(i=a||(a={})).notload="notload",i.loading="loading",i.loaded="loaded",i.failed="failed";var p={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},t={AMap:a.notload,AMapUI:a.notload,Loca:a.notload},s={AMapUI:[],Loca:[]},l=[],r=function(n){"function"==typeof n&&(t.AMap===a.loaded?n(window.AMap):l.push(n))};return{load:function(o){return new Promise(function(h,e){if(t.AMap==a.failed)e("");else if(t.AMap==a.notload){var i=o.key,s=o.version,d=o.plugins;i?(window.AMap&&"lbs.amap.com"!==location.host&&e("禁止多种API加载方式混用"),p.key=i,p.AMap.version=s||p.AMap.version,p.AMap.plugins=d||p.AMap.plugins,t.AMap=a.loading,s=document.body||document.head,window.___onAPILoaded=function(i){if(delete window.___onAPILoaded,i)t.AMap=a.failed,e(i);else for(t.AMap=a.loaded,n(o).then(function(){h(window.AMap)}).catch(e);l.length;)l.splice(0,1)[0]()},(d=document.createElement("script")).type="text/javascript",d.src="https://webapi.amap.com/maps?callback=___onAPILoaded&v="+p.AMap.version+"&key="+i+"&plugin="+p.AMap.plugins.join(","),d.onerror=function(n){t.AMap=a.failed,e(n)},s.appendChild(d)):e("请填写key")}else if(t.AMap==a.loaded)if(o.key&&o.key!==p.key)e("多个不一致的 key");else if(o.version&&o.version!==p.AMap.version)e("不允许多个版本 JSAPI 混用");else{if(i=[],o.plugins)for(s=0;s<o.plugins.length;s+=1)-1==p.AMap.plugins.indexOf(o.plugins[s])&&i.push(o.plugins[s]);i.length?window.AMap.plugin(i,function(){n(o).then(function(){h(window.AMap)}).catch(e)}):n(o).then(function(){h(window.AMap)}).catch(e)}else if(o.key&&o.key!==p.key)e("多个不一致的 key");else if(o.version&&o.version!==p.AMap.version)e("不允许多个版本 JSAPI 混用");else{var c=[];if(o.plugins)for(s=0;s<o.plugins.length;s+=1)-1==p.AMap.plugins.indexOf(o.plugins[s])&&c.push(o.plugins[s]);r(function(){c.length?window.AMap.plugin(c,function(){n(o).then(function(){h(window.AMap)}).catch(e)}):n(o).then(function(){h(window.AMap)}).catch(e)})}})},reset:function(){delete window.AMap,delete window.AMapUI,delete window.Loca,p={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},t={AMap:a.notload,AMapUI:a.notload,Loca:a.notload},s={AMap:[],AMapUI:[],Loca:[]}}}}()),e.exports));export{a as A};