ss-component-new 1.1.216 → 1.1.217

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 (83) hide show
  1. package/dist/{array-OdzxNxuR.cjs → array-DKtWXVEP.cjs} +1 -1
  2. package/dist/{array-C9vEQ7nq.js → array-WylKFttK.js} +7 -7
  3. package/dist/{cloneDeep-BBqBZFIq.js → cloneDeep-BFW8Aiu6.js} +1 -1
  4. package/dist/{cloneDeep-CYoAyRxZ.cjs → cloneDeep-CS-r0cHI.cjs} +1 -1
  5. package/dist/{index-aEGvpA7T.cjs → index--2NlTcCj.cjs} +1 -1
  6. package/dist/index-04LFjA8f.cjs +1 -0
  7. package/dist/{index-CHNZSkmv.cjs → index-B-e1oDw1.cjs} +1 -1
  8. package/dist/{index-COL04UY9.cjs → index-BA-dUSh4.cjs} +1 -1
  9. package/dist/index-BBolmvai.cjs +1 -0
  10. package/dist/{index-IAeC8kLA.js → index-BFjNzbPx.js} +1 -1
  11. package/dist/{index-qJs77bnY.js → index-BH3VzSxM.js} +1 -1
  12. package/dist/{index-CdpzQZqc.js → index-BQu-R8TG.js} +3 -3
  13. package/dist/{index-hZVGPsVh.cjs → index-BUy4zhZ-.cjs} +1 -1
  14. package/dist/{index-BijE4Wwu.js → index-BVTSv_QA.js} +4 -4
  15. package/dist/{index-CUPpf1Bs.js → index-BYN-dNCk.js} +1 -1
  16. package/dist/{index-BslQkitn.js → index-BaEXuCt6.js} +8 -8
  17. package/dist/{index-qZwHPKfj.js → index-BqSc-Qgd.js} +7 -7
  18. package/dist/index-BxPM18Tu.js +35 -0
  19. package/dist/{index-BaxdaS2r.cjs → index-C0Zu2FnQ.cjs} +1 -1
  20. package/dist/{index-HFP9m131.cjs → index-CAN1Mk0w.cjs} +1 -1
  21. package/dist/index-CJwMTIta.cjs +1 -0
  22. package/dist/{index-DijpiEh5.js → index-CSPaqrWi.js} +1 -1
  23. package/dist/{index-k9GWOovi.js → index-CYhi7Ov2.js} +1 -1
  24. package/dist/{index-DgVA8gp2.js → index-CdTxWgUz.js} +1 -1
  25. package/dist/{index-DrkOGAME.cjs → index-CeYJoUFw.cjs} +1 -1
  26. package/dist/index-CjryodNV.js +31 -0
  27. package/dist/{index-CiopOtdu.js → index-CjvQ5JEB.js} +5 -5
  28. package/dist/{index--ePFWoUS.cjs → index-CkkUjEMc.cjs} +1 -1
  29. package/dist/{index-zZJmb7Uc.js → index-ColRrYSz.js} +6 -6
  30. package/dist/index-Cs3JmNyi.js +337 -0
  31. package/dist/{index-DqpQ4hdK.js → index-CydUw3nq.js} +502 -496
  32. package/dist/index-D5eXER8D.cjs +1 -0
  33. package/dist/{index-hsNjpUU4.js → index-DG7eZ5PI.js} +4 -4
  34. package/dist/{index-D0P3kZml.js → index-DIxkaeG7.js} +94 -94
  35. package/dist/{index-DfJDegwM.js → index-DLdKE5x6.js} +22 -22
  36. package/dist/index-DWIv2ZKW.js +573 -0
  37. package/dist/{index-BiXjXFp9.js → index-DYVEOKnb.js} +187 -190
  38. package/dist/{index-BmauorY8.cjs → index-DgQZA0-E.cjs} +1 -1
  39. package/dist/{index-BlaI93hx.js → index-Djaf7nld.js} +2388 -2380
  40. package/dist/{index-Bcrp84yK.cjs → index-DoPUosGJ.cjs} +1 -1
  41. package/dist/{index-BCthdnpk.cjs → index-Dvl2AIk4.cjs} +33 -33
  42. package/dist/{index-BAdnANet.cjs → index-DzqMad42.cjs} +1 -1
  43. package/dist/{index-BoY9wCFS.cjs → index-MYK9hxRM.cjs} +1 -1
  44. package/dist/{index-CBK-dnPg.cjs → index-RnbWVYwb.cjs} +1 -1
  45. package/dist/{index-DwtDH7ED.cjs → index-Z5_1qEtB.cjs} +1 -1
  46. package/dist/{index-Ba6XEcEz.cjs → index-ZbrNyZLK.cjs} +1 -1
  47. package/dist/{index-fwBdg-nE.js → index-cvLK0IGM.js} +4 -4
  48. package/dist/{index-GkUqDhX8.cjs → index-ijewHwvn.cjs} +3 -3
  49. package/dist/{index-BcAtmuDY.cjs → index-jZm0qYeq.cjs} +1 -1
  50. package/dist/index-lJZYQmvd.cjs +1 -0
  51. package/dist/index.vue_vue_type_script_setup_true_lang-AxDIgE3P.cjs +1 -0
  52. package/dist/{index.vue_vue_type_script_setup_true_lang-DYldacky.cjs → index.vue_vue_type_script_setup_true_lang-CMIgv0jB.cjs} +1 -1
  53. package/dist/{index.vue_vue_type_script_setup_true_lang-AiNMyGJ7.js → index.vue_vue_type_script_setup_true_lang-C_VFNLAG.js} +1 -1
  54. package/dist/index.vue_vue_type_script_setup_true_lang-V3Sau6GC.js +191 -0
  55. package/dist/{index.vue_vue_type_style_index_0_scoped_94584be3_lang-D1hGwflH.cjs → index.vue_vue_type_style_index_0_scoped_94584be3_lang-BlnuzqG0.cjs} +1 -1
  56. package/dist/{index.vue_vue_type_style_index_0_scoped_94584be3_lang-DxEykEfi.js → index.vue_vue_type_style_index_0_scoped_94584be3_lang-wf5FyFnR.js} +8 -8
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_997b1786_lang-Cs4cUtiF.js → index.vue_vue_type_style_index_0_scoped_997b1786_lang-CIXHcer_.js} +6 -6
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_997b1786_lang-BZeGEcmU.cjs → index.vue_vue_type_style_index_0_scoped_997b1786_lang-D_mUnfcR.cjs} +1 -1
  59. package/dist/{login-CR_3X_1O.cjs → login-BCiFFTOZ.cjs} +1 -1
  60. package/dist/{login-NbZRtwgT.js → login-CLQA1iWQ.js} +2 -2
  61. package/dist/{main-DrYI_jad.cjs → main-CFDaKf6J.cjs} +1 -1
  62. package/dist/{main-DQMvOABx.js → main-MjZQO4l6.js} +6 -6
  63. package/dist/{menu-CBhnPDYb.js → menu-CSkF56XI.js} +1 -1
  64. package/dist/{menu-BA21hxQ_.cjs → menu-DS_lbp75.cjs} +1 -1
  65. package/dist/{modelComp-DQfbaYAQ.js → modelComp-BDqjxQL-.js} +1 -1
  66. package/dist/{modelComp-1tvANjyw.cjs → modelComp-Bc8EAgAr.cjs} +1 -1
  67. package/dist/ss-component.cjs +1 -1
  68. package/dist/ss-component.css +2 -2
  69. package/dist/ss-component.js +7 -7
  70. package/dist/ss-component2.cjs +1 -1
  71. package/dist/ss-component2.js +1 -1
  72. package/package.json +1 -1
  73. package/dist/index-BANLmq8o.js +0 -62
  74. package/dist/index-CEmeUoO6.js +0 -500
  75. package/dist/index-CN9z0Gle.js +0 -299
  76. package/dist/index-Ct43RH6k.cjs +0 -1
  77. package/dist/index-Cyh6mzsW.cjs +0 -1
  78. package/dist/index-D4Q1LEpt.cjs +0 -1
  79. package/dist/index-HOk4bk_S.cjs +0 -1
  80. package/dist/index-OWhH1dnj.cjs +0 -1
  81. package/dist/index-iysyHTbP.js +0 -31
  82. package/dist/index.vue_vue_type_script_setup_true_lang-BQW8FrAo.cjs +0 -1
  83. package/dist/index.vue_vue_type_script_setup_true_lang-Cs_PPDcy.js +0 -182
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue");require("./array-OdzxNxuR.cjs");require("./index-DwtDH7ED.cjs");const r=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");require("./index.vue_vue_type_style_index_0_scoped_997b1786_lang-BZeGEcmU.cjs");require("./menu-BA21hxQ_.cjs");require("./index.vue_vue_type_style_index_0_scoped_94584be3_lang-D1hGwflH.cjs");require("./index-BCthdnpk.cjs");require("./index-DrkOGAME.cjs");require("./login-CR_3X_1O.cjs");const u={__name:"index",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0},nodeDev:{type:String,default:""}},setup(n){const e=n;return(i,d)=>{const o=t.resolveComponent("router-view");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(o,{mode:e==null?void 0:e.mode,content:e==null?void 0:e.content,jsonContents:e==null?void 0:e.jsonContents,showButton:e==null?void 0:e.showButton,nodeDev:e==null?void 0:e.nodeDev},null,8,["mode","content","jsonContents","showButton","nodeDev"])])}}},c=r._export_sfc(u,[["__scopeId","data-v-6d9cffc6"]]);exports.default=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue");require("./array-DKtWXVEP.cjs");require("./index-Z5_1qEtB.cjs");const r=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");require("./index.vue_vue_type_style_index_0_scoped_997b1786_lang-D_mUnfcR.cjs");require("./menu-DS_lbp75.cjs");require("./index.vue_vue_type_style_index_0_scoped_94584be3_lang-BlnuzqG0.cjs");require("./index-Dvl2AIk4.cjs");require("./index-CeYJoUFw.cjs");require("./login-BCiFFTOZ.cjs");const u={__name:"index",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0},nodeDev:{type:String,default:""}},setup(n){const e=n;return(i,d)=>{const o=t.resolveComponent("router-view");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(o,{mode:e==null?void 0:e.mode,content:e==null?void 0:e.content,jsonContents:e==null?void 0:e.jsonContents,showButton:e==null?void 0:e.showButton,nodeDev:e==null?void 0:e.nodeDev},null,8,["mode","content","jsonContents","showButton","nodeDev"])])}}},c=r._export_sfc(u,[["__scopeId","data-v-6d9cffc6"]]);exports.default=c;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),O=require("./index-RnbWVYwb.cjs"),ne=require("./index-CkkUjEMc.cjs"),z=require("./index-Z5_1qEtB.cjs"),ae=require("./modelComp-Bc8EAgAr.cjs"),P=require("./menu-DS_lbp75.cjs"),j=require("./array-DKtWXVEP.cjs"),A=require("./index-Dvl2AIk4.cjs"),le=require("./index.vue_vue_type_style_index_0_scoped_94584be3_lang-BlnuzqG0.cjs"),ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),oe=require("./index-CeYJoUFw.cjs"),re=require("./login-BCiFFTOZ.cjs"),se=require("./index-DzqMad42.cjs"),Z=require("./cloneDeep-CS-r0cHI.cjs"),ie={class:"bread-content"},ce=["onClick"],de={key:0,class:"split-title"},ue={__name:"index",props:{breadArray:{type:Array,default:()=>[]}},emits:["click"],setup(J,{emit:W}){const o=J,B=e.ref([]),N=W;e.onMounted(()=>{B.value=o==null?void 0:o.breadArray}),e.watch(()=>o==null?void 0:o.breadArray,()=>{B.value=o==null?void 0:o.breadArray},{deep:!0,immediate:!0});const i=_=>{N("click",_)};return(_,K)=>(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(F,q)=>{var $;return e.openBlock(),e.createElementBlock("div",{key:q,class:"bread-item"},[e.createElementVNode("div",{class:"bread-title",onClick:m=>i(F),style:e.normalizeStyle({opacity:(($=B.value)==null?void 0:$.length)-1===q?"0.7":"1"})},e.toDisplayString(F.value),13,ce),q!==B.value.length-1&&Array.isArray(B.value)?(e.openBlock(),e.createElementBlock("div",de,e.toDisplayString("/"))):e.createCommentVNode("",!0)])}),128))]))}},ve=ee._export_sfc(ue,[["__scopeId","data-v-ded7e2bd"]]),ge={class:"system-wrap"},fe={class:"item-menu-content"},ye={class:"item-left-content"},_e={class:"avatar"},he={class:"select-icon"},Ce={key:0,class:"model-operate"},ke={class:"model-select"},me={class:"model-fill"},we={key:1,class:"show-main-content"},pe={class:"show-content"},De={class:"item-view-group"},Be={class:"show-item-content"},Ne={class:"item-view-group"},Se={key:2,class:"show-main-content"},Ee={__name:"index",props:{content:String,jsonContents:Array},emits:["change","contentChange"],setup(J,{emit:W}){const o=re.useLoginState(),{loginUserInfo:B,cryptoInfo:N}=P.storeToRefs(o);e.onMounted(()=>{se.ElNotification({title:"温馨提示:",type:"success",message:"欢迎使用系统",duration:1e3})});const i=J,_=ae.useModelComp(z.pinia);A.useFormToTableComp(z.pinia);const K=e.ref(!0),F=P.useMenuState();e.ref(!0);const{itemData:q,isEdit:$}=P.storeToRefs(_),m=A.useUnit(z.pinia),{activeMenuPath:b,activeMenuOpenPaths:H,menuTriggerType:G,menus:U}=P.storeToRefs(F),{selectIndex:Q,selectTitle:I}=P.storeToRefs(m);e.ref([]);const L=e.ref(!1),v=e.ref([]),X=()=>{_.setIsEdit("edit")},Y=()=>{_.setIsEdit("view")},u=async(t,s="data")=>{var d,c,k,l,S,y;if((t==null?void 0:t.type)==="delete")await A.deleteTableContents((d=t==null?void 0:t.singleContent)==null?void 0:d.id);else if((t==null?void 0:t.buttonName)==="新增"){let E={};for(let C in t==null?void 0:t.singleContent)C!=="id"&&C!=="index"&&(E[C]=t==null?void 0:t.singleContent[C]);await A.addTableContents(s,b.value,t==null?void 0:t.index,sessionStorage.getItem("systemKey"),Object.values(E),t==null?void 0:t.column)}else if((t==null?void 0:t.buttonName)==="编辑"){let E={},C=(c=t==null?void 0:t.singleContent)==null?void 0:c.id;for(let r in t==null?void 0:t.singleContent)r!=="id"&&r!=="index"&&(E[r]=t==null?void 0:t.singleContent[r]);await A.fixTableContents(s,b.value,t==null?void 0:t.index,C,sessionStorage.getItem("systemKey"),Object.values(E),t==null?void 0:t.column)}let h=(l=(k=I.value)==null?void 0:k[I.value.length-1])!=null&&l.key?parseInt((y=(S=I.value)==null?void 0:S[I.value.length-1])==null?void 0:y.key):"";v.value=await A.getItemData(b.value,sessionStorage.getItem("systemKey"),h),_.setItemData(v.value)},f=t=>{v.value=t,_.setItemData(v.value)},V=async t=>{var h,d;await A.fixFormContents(t==null?void 0:t.index,{comp:"Form",compData:(h=Z.cloneDeep(t==null?void 0:t.contents))==null?void 0:h.filter(c=>c.contents),name:""});const s=(d=Z.cloneDeep(v.value))==null?void 0:d.map(c=>((c==null?void 0:c.id)===(t==null?void 0:t.index)&&(c.compData=t==null?void 0:t.contents),c));_.setItemData(s)},w=async t=>{var s;if((t==null?void 0:t.key)==="main"||I.value.length===1)v.value=await A.getItemData(b.value,sessionStorage.getItem("systemKey")),m.setSelectIndex(""),m.setSelectMenu(""),m.setSelectTitle([]);else{const h=[],d=(t==null?void 0:t.key)===""||!(t!=null&&t.key)?"":parseInt(t==null?void 0:t.key);v.value=await A.getItemData(b.value,sessionStorage.getItem("systemKey"),d);let c=-1;(s=I.value)==null||s.forEach((k,l)=>{(k==null?void 0:k.key)===(t==null?void 0:t.key)&&(c=l),(c===-1||c>=l)&&h.push(k)}),m.setSelectTitle(h),d!==""?m.setSelectMenu(t==null?void 0:t.key):(m.setSelectIndex(""),m.setSelectMenu(""))}_.setItemData(v.value)},T=t=>{var s,h,d;return((h=(s=B.value)==null?void 0:s.layer)==null?void 0:h.toUpperCase())==="SUPERADMIN"||((d=B.value)==null?void 0:d.account)===(t==null?void 0:t.account)},D=async(t,s=[],h)=>{const d=getPageDataAsync("/系统管理/角色管理"),c=getPageDataAsync("/系统管理/部门管理");return await Promise.all([d,c]).then(l=>{var E,C;const S=(E=l==null?void 0:l[0])==null?void 0:E.map(r=>({label:r==null?void 0:r.roleName,value:r==null?void 0:r.roleName})),y=(C=l==null?void 0:l[1])==null?void 0:C.map(r=>({label:r==null?void 0:r.deptName,value:r==null?void 0:r.deptName}));return h?t==null?void 0:t.map(r=>{var M;return{...r,compData:(M=r==null?void 0:r.compData)==null?void 0:M.map(a=>{var n,x;return(a==null?void 0:a.key)==="header"?{...a,contents:(n=a==null?void 0:a.contents)==null?void 0:n.map(p=>p.prop==="userDept"?{...p,options:y}:p.prop==="userRoles"?{...p,options:S}:p)}:(a==null?void 0:a.key)==="tableContents"?{...a,contents:(x=a==null?void 0:a.contents)==null?void 0:x.map(p=>{var g;return{...p,password:T(p)?decryptData(p==null?void 0:p.password,(g=N==null?void 0:N.value)==null?void 0:g.privateKey):p==null?void 0:p.password}})}:a})}}):t==null?void 0:t.map(r=>{var M;return{...r,compData:(M=r==null?void 0:r.compData)==null?void 0:M.map(a=>{var n,x,p;return(a==null?void 0:a.key)==="rowButton"||(a==null?void 0:a.key)==="extraButton"?{...a,contents:(n=a==null?void 0:a.contents)==null?void 0:n.filter(g=>s==null?void 0:s.includes(g==null?void 0:g.label))}:(a==null?void 0:a.key)==="header"?{...a,contents:(x=a==null?void 0:a.contents)==null?void 0:x.map(g=>g.prop==="userDept"?{...g,options:y}:g.prop==="userRoles"?{...g,options:S}:g)}:(a==null?void 0:a.key)==="tableContents"?{...a,contents:(p=a==null?void 0:a.contents)==null?void 0:p.map(g=>{var te;return{...g,password:T(g)?decryptData(g==null?void 0:g.password,(te=N==null?void 0:N.value)==null?void 0:te.privateKey):g==null?void 0:g.password}})}:a})}})})};e.watch(()=>b.value,async t=>{if(t){oe.verifyStructureDataToStore();const s=await A.getItemData(t,sessionStorage.getItem("systemKey"),"",b.value);_.setExtraContents([]);const h=sessionStorage.getItem("authority"),d=JSON.parse(h||"");if(Array.isArray(d)){const c=Array.isArray(d)&&(d==null?void 0:d.filter(l=>l==null?void 0:l.includes(t))),k=c==null?void 0:c.map(l=>{var S;return((S=l==null?void 0:l.split("/"))==null?void 0:S.pop())||""});v.value=t==="/系统管理/用户管理"?await D(s,k,!1):s==null?void 0:s.map(l=>{var S;return{...l,compData:(S=l==null?void 0:l.compData)==null?void 0:S.map(y=>{var E;return(y==null?void 0:y.key)==="rowButton"||(y==null?void 0:y.key)==="extraButton"?{...y,contents:(E=y==null?void 0:y.contents)==null?void 0:E.filter(C=>k==null?void 0:k.includes(C==null?void 0:C.label))}:y})}}),_.setItemData(v.value)}else typeof d=="string"&&(d==null?void 0:d.toUpperCase())==="SUPERADMIN"?(v.value=t==="/系统管理/用户管理"?await D(s,null,!0):s,_.setItemData(v.value)):(v.value=[],_.setItemData(v.value));console.log(134,v.value),m.setSelectTitle([]),m.setSelectIndex(""),m.setSelectMenu(""),I.value=b.value.split("/").filter(c=>c!=="").map(c=>({value:c.trim()}))}},{immediate:!0}),e.watch(()=>[i==null?void 0:i.content,i==null?void 0:i.jsonContents],async()=>{var h,d,c,k;if(((h=i==null?void 0:i.jsonContents)==null?void 0:h.length)>0){_.setOriginalData(i==null?void 0:i.jsonContents);return}if(!(i!=null&&i.content)||((d=i==null?void 0:i.content)==null?void 0:d.length)===0)return;L.value=!0,K.value=!0;let t=[],s=[];m.setSelectTitle([]),m.setSelectIndex(""),m.setSelectMenu(""),(k=(c=i==null?void 0:i.content)==null?void 0:c.filter(l=>l!==""))==null||k.forEach(l=>{j.isExpandStringToJson(l)?s.push(j.expandStringToJson(l)):j.expandNewStringToJson(l)?s.push(j.expandNewStringToJson(l)):s.push(j.expandContentStringToJson(l))}),t=s==null?void 0:s[0],await le.savePageDataAsync(t),_.setOriginalData(t),L.value=!1},{deep:!0,immediate:!0});const R=t=>j.getComponent(t);return(t,s)=>{const h=e.resolveComponent("el-aside"),d=e.resolveComponent("svg-icon"),c=e.resolveComponent("el-avatar"),k=e.resolveComponent("el-header"),l=e.resolveComponent("router-view"),S=e.resolveComponent("el-main"),y=e.resolveComponent("el-container"),E=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",ge,[e.withDirectives((e.openBlock(),e.createBlock(y,{"element-loading-text":"正在加载页面数据..."},{default:e.withCtx(()=>[e.unref($)==="view"?(e.openBlock(),e.createBlock(h,{key:0,width:"250px"},{default:e.withCtx(()=>[e.createVNode(ne.default)]),_:1})):e.createCommentVNode("",!0),e.createVNode(y,null,{default:e.withCtx(()=>[e.createVNode(k,null,{default:e.withCtx(()=>{var C;return[e.createElementVNode("div",fe,[e.createElementVNode("div",ye,[e.unref($)==="edit"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"select-icon",onClick:Y},e.toDisplayString("返回页面"))):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(ve,{key:e.unref(I),breadArray:e.unref(I),onClick:w},null,8,["breadArray"]))]),e.createElementVNode("div",_e,[e.unref($)==="view"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"select-icon",onClick:X},[e.createElementVNode("div",null,[e.createVNode(d,{name:"write"})]),s[0]||(s[0]=e.createElementVNode("div",null,e.toDisplayString("修改布局"),-1))])):e.createCommentVNode("",!0),e.createElementVNode("div",he,[e.renderSlot(t.$slots,"default",{},void 0,!0)]),e.createVNode(c,{size:35,src:(C=e.unref(B))==null?void 0:C.avatarUrl},{default:e.withCtx(()=>{var r;return[e.createTextVNode(e.toDisplayString(((r=e.unref(B))==null?void 0:r.account)??"未知"),1)]}),_:1},8,["src"])])])]}),_:3}),e.createVNode(S,null,{default:e.withCtx(()=>{var C,r,M,a;return[e.unref($)==="edit"?(e.openBlock(),e.createElementBlock("div",Ce,[e.createElementVNode("div",ke,[e.createVNode(O.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:t.innerWidth},[e.createVNode(O.modelShow)])),e.createElementVNode("div",me,[e.createVNode(O.modelFill)])])):t.$route.path==="/"&&((C=v.value)==null?void 0:C.length)>0&&e.unref($)==="view"?(e.openBlock(),e.createElementBlock("div",we,[e.createElementVNode("div",pe,[(r=v.value)!=null&&r.find(n=>n.comp==="FormTop")?(e.openBlock(),e.createElementBlock("div",{class:"show-header",key:t.index},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((M=v.value)==null?void 0:M.filter(n=>n.comp==="FormTop"),(n,x)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:x},[e.createElementVNode("div",De,e.toDisplayString(n.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(R(n.comp)),{itemData:n==null?void 0:n.compData,childItemData:n==null?void 0:n.itemChildData,key:(n==null?void 0:n.id)??x,onChange:u,index:(n==null?void 0:n.id)??x,onContentChange:V,onPageChange:f},null,40,["itemData","childItemData","index"]))]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((a=v.value)==null?void 0:a.filter(n=>n.comp!=="FormTop"),(n,x)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:x},[e.createElementVNode("div",Ne,e.toDisplayString(n.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(R(n.comp)),{itemData:n==null?void 0:n.compData,childItemData:n==null?void 0:n.itemChildData,key:(n==null?void 0:n.id)??x,onChange:u,index:(n==null?void 0:n.id)??x,onContentChange:V,onPageChange:f},null,40,["itemData","childItemData","index"]))]))),128))])])])):e.unref($)==="view"?(e.openBlock(),e.createElementBlock("div",Se,[e.createVNode(l)])):e.createCommentVNode("",!0)]}),_:1})]),_:3})]),_:3})),[[E,L.value]])])}}},xe=ee._export_sfc(Ee,[["__scopeId","data-v-cff7606f"]]),Ie={class:"add-model-content"},Ve={key:0,class:"model-operate"},Te={class:"model-select"},$e={class:"model-fill"},Ae={key:1,class:"model-view"},be={key:0,class:"model-import-data"},Fe={class:"import-button"},Me={__name:"index",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change","contentChange"],setup(J,{emit:W}){const o=J,B=W,N=e.ref([]),i=e.ref([]),_=e.ref([]),K=e.ref(0),F=ae.useModelComp(z.pinia),q=P.useMenuState(z.pinia),{itemData:$,originalData:m}=P.storeToRefs(F),{activeMenuPath:b}=P.storeToRefs(q),H=e.ref(null),G=e.ref(0),U=e.ref([]);e.ref("");const Q=e.ref(0),I=u=>{B("contentChange",u)},L=u=>{var V;const f=(V=Z.cloneDeep(u==null?void 0:u.wholeValue))==null?void 0:V.map(w=>{var T;return(w==null?void 0:w.comp)==="Form"&&(w.compData=(T=w.compData)==null?void 0:T.map(D=>((D==null?void 0:D.key)==="formContent"&&(D.contents=j.arrayToNumberArray(D==null?void 0:D.contents)),D))),w});B("change",{originalContents:m.value,currentContents:u==null?void 0:u.wholeValue,editContent:u==null?void 0:u.editValue,arrayToContents:f})};e.watch(()=>i.value,()=>{Q.value===i.value.length&&i.value.length!==0&&(N.value=i.value)},{deep:!0,immediate:!0});const v=()=>{H.value.click()},X=async u=>{const f=u.target.files;if(!f)return;new FileReader,N.value=[],i.value=[],Q.value=f.length;const V=Array.from(f).map(async w=>await new Promise(T=>{const D=new FileReader;D.onload=R=>{try{i.value.push(R.target.result),U.value=Y(R.target.result),G.value++}catch(t){console.error("解析失败:",t);return}},D.onerror=()=>T(`读取 ${w.name} 失败`),D.readAsText(w)}));await Promise.all(V)};e.watch(()=>[o==null?void 0:o.content,o==null?void 0:o.jsonContents],()=>{N.value=o.content,_.value=o==null?void 0:o.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>G.value,()=>{var u;((u=U.value)==null?void 0:u.length)!==0&&(F.setOriginalData(U.value),F.setItemData(U.value))},{deep:!0,immediate:!0});const Y=u=>{let f=u.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");f=f.replace(/(\w+)\s*:/g,"$1:"),f=f.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),f=f.replace(/,\s*([}\]])/g,"$1"),f=f.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(f)}catch(V){try{const T=new Function(`return ${f}`)();if(Array.isArray(T)||typeof T=="object")return T;throw new Error(`解析结果不是有效的数组或对象: ${V}`)}catch(w){throw new Error(`无法解析JSON: ${w.message}`)}}};return(u,f)=>{const V=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Ie,[(o==null?void 0:o.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Te,[e.createVNode(O.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:K.value},[e.createVNode(O.modelShow)])),e.createElementVNode("div",$e,[e.createVNode(O.modelFill)])])):e.createCommentVNode("",!0),(o==null?void 0:o.mode)==="view"?(e.openBlock(),e.createElementBlock("div",Ae,[(e.openBlock(),e.createBlock(xe,{content:N.value,onChange:L,jsonContents:_.value,onContentChange:I,key:K.value},{default:e.withCtx(()=>{var w;return[((w=o==null?void 0:o.jsonContents)==null?void 0:w.length)===0&&(o!=null&&o.showButton)?(e.openBlock(),e.createElementBlock("div",be,[e.createElementVNode("div",Fe,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:H,accept:".txt, .inm",onChange:X,style:{display:"none"},multiple:""},null,544),e.createVNode(V,{name:"import"}),e.createElementVNode("div",{onClick:v},e.toDisplayString("导入文件"))])])):e.createCommentVNode("",!0)]}),_:1},8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},Pe=ee._export_sfc(Me,[["__scopeId","data-v-94584be3"]]);exports.default=Pe;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as w, onMounted as V, resolveComponent as l, createElementBlock as d, openBlock as o, Fragment as _, renderList as m, createBlock as r, createCommentVNode as I, withCtx as s, createVNode as g, createSlots as b, renderSlot as u, mergeProps as O, computed as S } from "vue";
2
- import { u as q, s as E } from "./menu-CBhnPDYb.js";
2
+ import { u as q, s as E } from "./menu-CSkF56XI.js";
3
3
  import { _ as F } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  const R = /* @__PURE__ */ w({
5
5
  __name: "menuItem",
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./index.vue_vue_type_script_setup_true_lang-AiNMyGJ7.js";
1
+ import { _ as f } from "./index.vue_vue_type_script_setup_true_lang-C_VFNLAG.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import { ref as Sp, onMounted as Ab, watch as vL, onUnmounted as cL, createElementBlock as Mb, openBlock as Ib, createVNode as pL } from "vue";
2
2
  import { _ as Lb } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
- import { c as Ki } from "./cloneDeep-BBqBZFIq.js";
3
+ import { c as Ki } from "./cloneDeep-BFW8Aiu6.js";
4
4
  /*! *****************************************************************************
5
5
  Copyright (c) Microsoft Corporation.
6
6
 
@@ -1 +1 @@
1
- "use strict";const a=require("./index-DwtDH7ED.cjs"),f=require("./login-CR_3X_1O.cjs"),o=require("./menu-BA21hxQ_.cjs"),D=o.useMenuState(a.pinia),m=f.useLoginState(a.pinia),I=()=>{const S=a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),d=a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure"}});Promise.all([S,d]).then(t=>{var r,u,n,i,c,g,l,y;const e=t==null?void 0:t[0],s=t==null?void 0:t[1];if(e.data.code===200){const p=(l=(g=(c=(i=(n=(u=(r=e==null?void 0:e.data)==null?void 0:r.result)==null?void 0:u[0])==null?void 0:n.value)==null?void 0:i.pageData)==null?void 0:c.compData)==null?void 0:g[0])==null?void 0:l.contents;D.setRawMenus(p??[])}else o.ElMessage.error("获取模型菜单响应失败");s.data.code===200?s.data.result&&((y=s.data.result)==null?void 0:y.length)>0&&(m.setStructureData(s.data.result),m.setIsStructureExist(!0)):o.ElMessage.error("获取模型结构响应失败")})};exports.verifyStructureDataToStore=I;
1
+ "use strict";const a=require("./index-Z5_1qEtB.cjs"),f=require("./login-BCiFFTOZ.cjs"),o=require("./menu-DS_lbp75.cjs"),D=o.useMenuState(a.pinia),m=f.useLoginState(a.pinia),I=()=>{const S=a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),d=a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure"}});Promise.all([S,d]).then(t=>{var r,u,n,i,c,g,l,y;const e=t==null?void 0:t[0],s=t==null?void 0:t[1];if(e.data.code===200){const p=(l=(g=(c=(i=(n=(u=(r=e==null?void 0:e.data)==null?void 0:r.result)==null?void 0:u[0])==null?void 0:n.value)==null?void 0:i.pageData)==null?void 0:c.compData)==null?void 0:g[0])==null?void 0:l.contents;D.setRawMenus(p??[])}else o.ElMessage.error("获取模型菜单响应失败");s.data.code===200?s.data.result&&((y=s.data.result)==null?void 0:y.length)>0&&(m.setStructureData(s.data.result),m.setIsStructureExist(!0)):o.ElMessage.error("获取模型结构响应失败")})};exports.verifyStructureDataToStore=I;
@@ -0,0 +1,31 @@
1
+ import { defineComponent as t, reactive as o, onMounted as r, createElementBlock as n, openBlock as s, createVNode as a } from "vue";
2
+ import { s as c } from "./index-CjvQ5JEB.js";
3
+ import { s as m } from "./index-Djaf7nld.js";
4
+ import { S as i } from "./index-cvLK0IGM.js";
5
+ import { g as l } from "./index-DIxkaeG7.js";
6
+ import { _ as d } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
+ const p = { class: "role-wrapper" }, _ = /* @__PURE__ */ t({
8
+ __name: "index",
9
+ setup(u) {
10
+ const e = o({ ...i });
11
+ return r(async () => {
12
+ e.structureId = await l();
13
+ }), (f, h) => (s(), n("div", p, [
14
+ a(c, {
15
+ class: "role-header",
16
+ rowContents: e.queryFormData,
17
+ isEnableWrap: !1,
18
+ isEdit: !0,
19
+ onChange: e.handleQueryChange
20
+ }, null, 8, ["rowContents", "onChange"]),
21
+ a(m, {
22
+ class: "role-body",
23
+ itemData: e.pageData,
24
+ onChange: e.handleItemDataChange
25
+ }, null, 8, ["itemData", "onChange"])
26
+ ]));
27
+ }
28
+ }), y = /* @__PURE__ */ d(_, [["__scopeId", "data-v-ff9d10a0"]]);
29
+ export {
30
+ y as default
31
+ };
@@ -1,10 +1,10 @@
1
1
  import { ref as H, resolveComponent as X, createBlock as j, openBlock as D, withCtx as L, createElementBlock as B, Fragment as ut, renderList as at, createTextVNode as zt, toDisplayString as Et, watch as xt, renderSlot as rt, createCommentVNode as K, resolveDynamicComponent as ue, createSlots as qt, mergeProps as ze, onMounted as Kt, normalizeProps as Nn, guardReactiveProps as Fn, defineComponent as Xe, nextTick as Xt, createVNode as ft, normalizeStyle as yt, createElementVNode as ot, unref as We, h as tn, reactive as vn, computed as en, onBeforeUnmount as Bn, toRefs as Vn, normalizeClass as Ln } from "vue";
2
2
  import { _ as Rt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
- import { c as ke } from "./cloneDeep-BBqBZFIq.js";
4
- import { E as yn } from "./menu-CBhnPDYb.js";
5
- import Wn from "./index-DijpiEh5.js";
6
- import { _ as Un } from "./index.vue_vue_type_script_setup_true_lang-AiNMyGJ7.js";
7
- import { c as nn } from "./index-qZwHPKfj.js";
3
+ import { c as ke } from "./cloneDeep-BFW8Aiu6.js";
4
+ import { E as yn } from "./menu-CSkF56XI.js";
5
+ import Wn from "./index-CSPaqrWi.js";
6
+ import { _ as Un } from "./index.vue_vue_type_script_setup_true_lang-C_VFNLAG.js";
7
+ import { c as nn } from "./index-BqSc-Qgd.js";
8
8
  function Yn(o) {
9
9
  return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
10
10
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index.vue_vue_type_style_index_0_scoped_997b1786_lang-BZeGEcmU.cjs"),e=require("vue"),c=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function l(n,i,a,p,_,M){const t=e.resolveComponent("DynamicIcon"),s=e.resolveComponent("ssMenu");return e.openBlock(),e.createBlock(s,{menuList:n.renderMenuList,onClickMenu:n.clickMenu,onOpenMenu:n.openMenu,onCloseMenu:n.closeMenu,onChangeMenuStyle:n.changeMenuStyle,class:"menuList-wrap"},{title:e.withCtx(({menu:o})=>[e.createVNode(t,{name:o.icon??""},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(o.title??""),1)]),_:1},8,["menuList","onClickMenu","onOpenMenu","onCloseMenu","onChangeMenuStyle"])}const r=c._export_sfc(u._sfc_main,[["render",l],["__scopeId","data-v-997b1786"]]);exports.default=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index.vue_vue_type_style_index_0_scoped_997b1786_lang-D_mUnfcR.cjs"),e=require("vue"),c=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function l(n,i,a,p,_,M){const t=e.resolveComponent("DynamicIcon"),s=e.resolveComponent("ssMenu");return e.openBlock(),e.createBlock(s,{menuList:n.renderMenuList,onClickMenu:n.clickMenu,onOpenMenu:n.openMenu,onCloseMenu:n.closeMenu,onChangeMenuStyle:n.changeMenuStyle,class:"menuList-wrap"},{title:e.withCtx(({menu:o})=>[e.createVNode(t,{name:o.icon??""},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(o.title??""),1)]),_:1},8,["menuList","onClickMenu","onOpenMenu","onCloseMenu","onChangeMenuStyle"])}const r=c._export_sfc(u._sfc_main,[["render",l],["__scopeId","data-v-997b1786"]]);exports.default=r;
@@ -1,11 +1,11 @@
1
1
  import { createElementBlock as r, openBlock as n, Fragment as k, renderList as y, unref as F, createElementVNode as c, createBlock as h, resolveDynamicComponent as $, toDisplayString as C, ref as I, watch as L, resolveComponent as b, createVNode as R, withCtx as g, createCommentVNode as T } from "vue";
2
- import { s as U, g as M } from "./array-C9vEQ7nq.js";
3
- import { p as V } from "./index-CUPpf1Bs.js";
4
- import { a as j } from "./index-qZwHPKfj.js";
5
- import { u as w } from "./modelComp-DQfbaYAQ.js";
6
- import { s as x } from "./menu-CBhnPDYb.js";
2
+ import { s as U, g as M } from "./array-WylKFttK.js";
3
+ import { p as V } from "./index-BYN-dNCk.js";
4
+ import { a as j } from "./index-BqSc-Qgd.js";
5
+ import { u as w } from "./modelComp-BDqjxQL-.js";
6
+ import { s as x } from "./menu-CSkF56XI.js";
7
7
  import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
- import { c as v } from "./cloneDeep-BBqBZFIq.js";
8
+ import { c as v } from "./cloneDeep-BFW8Aiu6.js";
9
9
  const q = { class: "type-select" }, z = ["onClick"], A = { class: "list-icon" }, G = {
10
10
  __name: "index",
11
11
  setup(B) {
@@ -0,0 +1,337 @@
1
+ import { ref as c, reactive as T, computed as z, defineComponent as H, onMounted as J, resolveDirective as Z, createElementBlock as U, openBlock as w, createElementVNode as y, withDirectives as G, createVNode as _, unref as B, createBlock as Q } from "vue";
2
+ import { e as X, b as Y, c as ee } from "./index-BqSc-Qgd.js";
3
+ import { u as M } from "./login-CLQA1iWQ.js";
4
+ import { s as k, u as te, E as K } from "./menu-CSkF56XI.js";
5
+ import { g as V, u as ae } from "./index-BYN-dNCk.js";
6
+ import { e as S } from "./crypto-BRyGpjGR.js";
7
+ import { s as se, _ as re } from "./index.vue_vue_type_script_setup_true_lang-V3Sau6GC.js";
8
+ import { s as oe, c as ne } from "./index-CjvQ5JEB.js";
9
+ import { _ as le } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
+ const $ = M(), { loginUserInfo: l, cryptoInfo: I } = k($), ie = te(), { activeMenuPath: v } = k(ie);
11
+ var R, N, P, x;
12
+ const ue = c([
13
+ {
14
+ label: "",
15
+ name: "account",
16
+ value: (R = l.value) == null ? void 0 : R.account
17
+ },
18
+ {
19
+ label: "",
20
+ name: "userDept",
21
+ value: (N = l.value) == null ? void 0 : N.userDept
22
+ },
23
+ {
24
+ label: "",
25
+ name: "userRoles",
26
+ value: (x = (P = l.value) == null ? void 0 : P.userRoles) == null ? void 0 : x.join("、")
27
+ }
28
+ ]), de = () => {
29
+ }, m = c(!1), E = T({
30
+ dialogTitle: "电子签名",
31
+ dialogWidth: "30%",
32
+ dialogShow: !1,
33
+ url: ""
34
+ }), A = c([
35
+ {
36
+ label: "签字版",
37
+ icon: X,
38
+ type: "button",
39
+ disabled: !1
40
+ },
41
+ {
42
+ label: "电子签名",
43
+ icon: Y,
44
+ type: "button",
45
+ disabled: !1
46
+ },
47
+ {
48
+ label: "上传手写签名",
49
+ icon: ee,
50
+ type: "buttonUpload",
51
+ disabled: !1
52
+ }
53
+ ]), F = c(!1), pe = z(() => {
54
+ var t;
55
+ const s = sessionStorage.getItem("authority"), e = JSON.parse(s || "");
56
+ return Array.isArray(e) ? (F.value = !(e != null && e.includes(`${v.value}/上传头像`)), (t = A.value) == null ? void 0 : t.map((r) => ({
57
+ ...r,
58
+ disabled: !(e != null && e.includes(`${v.value}/签名`))
59
+ }))) : typeof e == "string" && (e == null ? void 0 : e.toUpperCase()) === "SUPERADMIN" ? A.value : [];
60
+ }), ge = (s) => {
61
+ E.dialogShow = s.label === "电子签名";
62
+ }, L = () => {
63
+ E.dialogShow = !1;
64
+ }, q = async (s) => {
65
+ var t, r, o, n, a, i, d, g, p;
66
+ const e = await V({
67
+ id: s,
68
+ key: {
69
+ systemKey: sessionStorage.getItem("systemKey"),
70
+ type: "data",
71
+ pageKey: "/系统管理/用户管理"
72
+ }
73
+ });
74
+ if (((t = e == null ? void 0 : e.data) == null ? void 0 : t.code) === 200 && e.data.result && Array.isArray(e.data.result) && e.data.result.length > 0) {
75
+ const f = {
76
+ ...(n = (o = (r = e.data.result) == null ? void 0 : r[0]) == null ? void 0 : o.value) == null ? void 0 : n.tableData,
77
+ id: (i = (a = e.data.result) == null ? void 0 : a[0]) == null ? void 0 : i.id,
78
+ layer: (p = (g = (d = e.data.result) == null ? void 0 : d[0]) == null ? void 0 : g.key) == null ? void 0 : p.layer
79
+ };
80
+ $.setLoginUserInfo(f);
81
+ }
82
+ }, O = async (s) => {
83
+ var e, t, r, o;
84
+ try {
85
+ console.log(11122, l.value);
86
+ const n = await ae({
87
+ id: (e = l.value) == null ? void 0 : e.id,
88
+ key: {
89
+ type: "data",
90
+ systemKey: sessionStorage.getItem("systemKey"),
91
+ pageKey: "/系统管理/用户管理",
92
+ layer: (t = l.value) == null ? void 0 : t.layer
93
+ },
94
+ value: {
95
+ tableData: s
96
+ }
97
+ });
98
+ ((r = n == null ? void 0 : n.data) == null ? void 0 : r.code) === 200 && (L(), K.success("修改成功"), await q((o = l.value) == null ? void 0 : o.id), m.value = !1);
99
+ } catch {
100
+ K.error("修改响应失败"), m.value = !1;
101
+ }
102
+ }, ce = async (s, e) => {
103
+ var r;
104
+ const t = {
105
+ ...l.value,
106
+ status: ((r = l.value) == null ? void 0 : r.status) ?? "启用",
107
+ // password: encryptData(loginUserInfo.value?.password, cryptoInfo?.publicKey),
108
+ [s]: e
109
+ };
110
+ m.value = !0, console.log(3434, l.value), await O(t);
111
+ }, b = T({
112
+ baseCols: [],
113
+ otherCols: []
114
+ }), D = c([]), W = c(), fe = (s, e, t) => {
115
+ var n, a, i, d, g, p;
116
+ let r, o;
117
+ ((a = (n = l.value) == null ? void 0 : n.layer) == null ? void 0 : a.toUpperCase()) !== "SUPERADMIN" ? (r = S((i = l.value) == null ? void 0 : i.password, (d = I.value) == null ? void 0 : d.publicKey), o = S(e, (g = I.value) == null ? void 0 : g.publicKey)) : (r = (p = l.value) == null ? void 0 : p.password, o = e), console.log(89891, r, l.value), console.log(89892, o), r === o ? t() : t(new Error("输入的密码与原密码不匹配,请重新输入"));
118
+ }, ye = (s, e, t) => {
119
+ e ? /^(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?=.*[!@#$%^&*(),.?":{}|<>]).{6,}$/.test(e) ? t() : t(new Error("密码必须包含大写字母、小写字母、数字和特殊字符,并且长度至少为6个字符")) : t(new Error("请输入密码"));
120
+ }, ve = (s, e, t) => {
121
+ var r;
122
+ e !== ((r = W.value) == null ? void 0 : r.newtPass) ? t(new Error("两次输入的密码不一致")) : t();
123
+ }, be = async () => {
124
+ var e, t, r, o, n, a, i, d, g;
125
+ const s = await V({
126
+ key: {
127
+ systemKey: sessionStorage.getItem("systemKey"),
128
+ type: "structure",
129
+ pageKey: "/系统管理/用户管理"
130
+ }
131
+ });
132
+ if (((e = s == null ? void 0 : s.data) == null ? void 0 : e.code) === 200 && s.data.result && ((t = s.data.result) == null ? void 0 : t.length) > 0) {
133
+ const p = (i = (a = (n = (o = (r = s.data.result) == null ? void 0 : r[0]) == null ? void 0 : o.value) == null ? void 0 : n.pageData) == null ? void 0 : a.compData) == null ? void 0 : i.find((u) => (u == null ? void 0 : u.key) === "header"), f = ["password", "status", "userDept", "avatar", "signature", "account", "userRoles", "layer"];
134
+ b.baseCols = p && ((d = p.contents) == null ? void 0 : d.map((u) => ({
135
+ ...u,
136
+ isFormColHidden: (f == null ? void 0 : f.includes(u == null ? void 0 : u.prop)) || (u == null ? void 0 : u.label) === "操作"
137
+ })));
138
+ const h = (g = p.contents) == null ? void 0 : g.find((u) => (u == null ? void 0 : u.prop) === "password"), j = [
139
+ {
140
+ ...h,
141
+ label: "当前密码",
142
+ prop: "currentPass",
143
+ validator: fe
144
+ },
145
+ {
146
+ ...h,
147
+ label: "新密码",
148
+ prop: "newtPass",
149
+ validator: ye
150
+ },
151
+ {
152
+ ...h,
153
+ label: "确认密码",
154
+ prop: "confirmNewPass",
155
+ validator: ve
156
+ }
157
+ ];
158
+ b.otherCols = j, we(l.value);
159
+ }
160
+ }, me = (s) => {
161
+ W.value = s;
162
+ }, he = async ({ content: s, buttonName: e }) => {
163
+ var r, o, n, a, i;
164
+ let t;
165
+ e === "确定" && (t = {
166
+ ...l.value,
167
+ status: ((r = l.value) == null ? void 0 : r.status) ?? "启用",
168
+ // 目前是超管密码明文传输,非超管用户密码加密传输
169
+ password: ((n = (o = l.value) == null ? void 0 : o.layer) == null ? void 0 : n.toUpperCase()) === "SUPERADMIN" ? s == null ? void 0 : s.confirmNewPass : S(s == null ? void 0 : s.confirmNewPass, (a = I.value) == null ? void 0 : a.publicKey)
170
+ }), e === "保存基本信息" && (t = {
171
+ ...l.value,
172
+ ...s,
173
+ status: ((i = l.value) == null ? void 0 : i.status) ?? "启用"
174
+ }), m.value = !0, await O(t);
175
+ }, C = () => {
176
+ const s = {
177
+ base: [
178
+ {
179
+ label: "保存基本信息"
180
+ }
181
+ ],
182
+ other: [
183
+ {
184
+ label: "重置",
185
+ background: "#b7b8b8"
186
+ },
187
+ {
188
+ label: "确定"
189
+ }
190
+ ]
191
+ }, e = sessionStorage.getItem("authority"), t = JSON.parse(e || "");
192
+ if (console.log("refreshTabsContents", t, v.value), Array.isArray(t)) {
193
+ const r = t != null && t.includes(`${v.value}/基本信息`) ? s == null ? void 0 : s.base : [], o = t != null && t.includes(`${v.value}/修改密码`) ? s == null ? void 0 : s.other : [];
194
+ return {
195
+ base: r,
196
+ other: o
197
+ };
198
+ } else return typeof t == "string" && (t == null ? void 0 : t.toUpperCase()) === "SUPERADMIN" ? s : null;
199
+ }, we = (s) => {
200
+ var e, t, r, o, n;
201
+ C(), D.value = [
202
+ {
203
+ value: "基础信息",
204
+ label: "基础信息",
205
+ children: [
206
+ {
207
+ type: "form",
208
+ content: {
209
+ rowContents: (e = b.baseCols) == null ? void 0 : e.map((a) => ({
210
+ ...a,
211
+ width: 2,
212
+ type: a == null ? void 0 : a.formType,
213
+ name: a == null ? void 0 : a.prop,
214
+ contents: a == null ? void 0 : a.options,
215
+ value: s[a == null ? void 0 : a.prop]
216
+ })),
217
+ formRules: {
218
+ userName: [
219
+ { required: !0, message: "输入不能为空", trigger: "blur" }
220
+ ],
221
+ birthDay: [
222
+ { required: !0, message: "输入不能为空", trigger: "blur" }
223
+ ],
224
+ phone: [
225
+ { required: !0, message: "输入不能为空", trigger: "blur" }
226
+ ]
227
+ },
228
+ buttonValue: (t = C()) == null ? void 0 : t.base,
229
+ isEnableWrap: !1,
230
+ isButtonRow: !1
231
+ },
232
+ value: ""
233
+ }
234
+ ]
235
+ },
236
+ {
237
+ value: "修改密码",
238
+ label: "修改密码",
239
+ children: [
240
+ {
241
+ type: "form",
242
+ content: {
243
+ rowContents: (r = b.otherCols) == null ? void 0 : r.map((a) => ({
244
+ ...a,
245
+ width: 1,
246
+ type: a == null ? void 0 : a.formType,
247
+ name: a == null ? void 0 : a.prop,
248
+ contents: a == null ? void 0 : a.options
249
+ })),
250
+ formRules: (o = b.otherCols) == null ? void 0 : o.reduce((a, i) => (a[i.prop] = [
251
+ { required: !0, message: "输入有误", trigger: "change" },
252
+ {
253
+ validator: (d, g, p) => i.validator(d, g, p),
254
+ trigger: "blur"
255
+ }
256
+ ], a), {}),
257
+ buttonValue: (n = C()) == null ? void 0 : n.other,
258
+ isEnableWrap: !1
259
+ },
260
+ value: ""
261
+ }
262
+ ]
263
+ }
264
+ ], console.log(12341, s, D.value);
265
+ }, _e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
266
+ __proto__: null,
267
+ beforeSignDestroy: L,
268
+ changeFormTrigger: me,
269
+ clickFormButton: de,
270
+ clickSignButton: ge,
271
+ clickTabButton: he,
272
+ getUserTableHeadersAsync: be,
273
+ loading: m,
274
+ refreshLoginUserInfoAsync: q,
275
+ rowContents: ue,
276
+ signPadInfo: E,
277
+ signTypes: pe,
278
+ submitImageAsync: ce,
279
+ tabsContents: D,
280
+ tempSignTypes: A,
281
+ uploadDisabled: F
282
+ }, Symbol.toStringTag, { value: "Module" })), Ce = { class: "personal-wrapper" }, Se = { class: "personal-box left" }, Ie = { class: "base-avatar" }, Ae = { class: "center-avatar" }, De = { class: "base-info" }, Te = { class: "base-signature" }, ke = { class: "personal-box right" }, Ee = /* @__PURE__ */ H({
283
+ __name: "index",
284
+ setup(s) {
285
+ const e = T({ ..._e }), t = M(), { loginUserInfo: r } = k(t), o = c(0);
286
+ return J(async () => {
287
+ var n;
288
+ await e.getUserTableHeadersAsync(), console.log(11121, r.value), o.value++, e.refreshLoginUserInfoAsync((n = r == null ? void 0 : r.value) == null ? void 0 : n.id);
289
+ }), (n, a) => {
290
+ const i = Z("loading");
291
+ return w(), U("div", Ce, [
292
+ y("div", Se, [
293
+ y("div", Ie, [
294
+ G((w(), U("div", Ae, [
295
+ _(se, {
296
+ disabled: e.uploadDisabled,
297
+ userInfo: B(r),
298
+ onSubmitImage: a[0] || (a[0] = (d) => e.submitImageAsync("avatarUrl", d))
299
+ }, null, 8, ["disabled", "userInfo"])
300
+ ])), [
301
+ [i, e.loading]
302
+ ])
303
+ ]),
304
+ y("div", De, [
305
+ _(oe, {
306
+ rowContents: e.rowContents,
307
+ isEnableWrap: !1,
308
+ isButtonRow: !0,
309
+ isEdit: !1
310
+ }, null, 8, ["rowContents"])
311
+ ]),
312
+ y("div", Te, [
313
+ _(re, {
314
+ userInfo: B(r),
315
+ signPadInfo: e.signPadInfo,
316
+ signTypes: e.signTypes,
317
+ onClickSignButton: e.clickSignButton,
318
+ onBeforeDestroy: e.beforeSignDestroy,
319
+ onClickSubmitSign: a[1] || (a[1] = (d) => e.submitImageAsync("signature", d))
320
+ }, null, 8, ["userInfo", "signPadInfo", "signTypes", "onClickSignButton", "onBeforeDestroy"])
321
+ ])
322
+ ]),
323
+ y("div", ke, [
324
+ (w(), Q(ne, {
325
+ key: o.value,
326
+ tabsContents: e.tabsContents,
327
+ onChangeTrigger: e.changeFormTrigger,
328
+ onClickTrigger: e.clickTabButton
329
+ }, null, 8, ["tabsContents", "onChangeTrigger", "onClickTrigger"]))
330
+ ])
331
+ ]);
332
+ };
333
+ }
334
+ }), $e = /* @__PURE__ */ le(Ee, [["__scopeId", "data-v-feb3642d"]]);
335
+ export {
336
+ $e as default
337
+ };