ss-component-new 1.1.613 → 1.1.615
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-C2gWLtuP.js → index-B6QaCaqA.js} +1914 -1900
- package/dist/{index-B7MJ84rl.js → index-BIWYupwC.js} +2 -2
- package/dist/{index-Chwdv_Xm.cjs → index-BIwbRfZV.cjs} +1 -1
- package/dist/{index-BTcprbvh.cjs → index-BKmSTTMQ.cjs} +1 -1
- package/dist/{index-B4CjnKtd.cjs → index-BQsnTc3q.cjs} +1 -1
- package/dist/{index-D_HszcpC.js → index-BUBSx35j.js} +2 -2
- package/dist/{index-A885uuFC.js → index-BaFFVLSx.js} +2 -2
- package/dist/{index-ByqiusUf.js → index-Bexz-XTn.js} +2 -2
- package/dist/{index-B4gAKBoa.cjs → index-BmMtgdyD.cjs} +1 -1
- package/dist/{index-Bh3pY3Jj.js → index-Bo5LxH0R.js} +4 -4
- package/dist/{index-CPq1CV6b.cjs → index-C4MoAi8A.cjs} +1 -1
- package/dist/{index-CtxOJNHA.cjs → index-C8Ajhm1J.cjs} +1 -1
- package/dist/index-C8OcDHI8.cjs +1 -0
- package/dist/{index-j-V6cmGh.js → index-C8xCpRxo.js} +147 -146
- package/dist/{index-DY7U0ulO.cjs → index-CZ89rQnr.cjs} +1 -1
- package/dist/index-C_0I-i8V.cjs +1 -0
- package/dist/{index-DDffuw8C.cjs → index-CcnA-z8S.cjs} +168 -168
- package/dist/{index-DHXlo9Tk.js → index-CeIrTIy_.js} +2 -2
- package/dist/{index-DVNL8B38.js → index-CfcFMIgE.js} +1 -1
- package/dist/{index-C8JbYV9i.js → index-ClJ1cGzL.js} +3 -3
- package/dist/{index-8Juw-vHr.cjs → index-CrC-SpUw.cjs} +1 -1
- package/dist/{index-BscVxcWg.cjs → index-CshDokGB.cjs} +1 -1
- package/dist/{index-CjbW-TOF.js → index-CupbZVTS.js} +249 -243
- package/dist/{index-5cKa20gg.js → index-D3AT3gF-.js} +2 -2
- package/dist/{index-u76SwcjA.cjs → index-D9JIHP4v.cjs} +1 -1
- package/dist/{index-DaljBanN.js → index-DOSx4wIZ.js} +1 -1
- package/dist/{index-DYxoBbtJ.cjs → index-DZ5qhDQe.cjs} +1 -1
- package/dist/{index-DnS2Ulaz.js → index-DhvQs7gl.js} +1 -1
- package/dist/{index-CjfSFVch.cjs → index-Dm7SM4YC.cjs} +1 -1
- package/dist/{index-CoQ5q08W.cjs → index-DmRE2cVC.cjs} +1 -1
- package/dist/{index-uOFoDGfr.js → index-DtVpV7EJ.js} +6 -7
- package/dist/{index-C2oTEiOz.cjs → index-DwEIuuNm.cjs} +1 -1
- package/dist/{index-DuYtDUrA.cjs → index-DxrHtk8v.cjs} +1 -1
- package/dist/index-GmDBztwV.js +133 -0
- package/dist/{index-B_jcwz8h.js → index-LThj-yaI.js} +4 -4
- package/dist/{index-DXmRodF3.cjs → index-OvZBqXdL.cjs} +1 -1
- package/dist/{index-z9FzE2kG.cjs → index-WwP4JICq.cjs} +1 -1
- package/dist/{index-B7STLPQk.js → index-XO8F4SuQ.js} +1 -1
- package/dist/{index-C8IGgf80.js → index-f8bHzA1N.js} +1 -1
- package/dist/{index-DCT9raO7.js → index-kBsp3BdQ.js} +10 -10
- package/dist/{index-CIk03V2m.js → index-sYouPqTP.js} +6 -6
- package/dist/{index-BnolyTQo.cjs → index-zePkpBVb.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-BBjmwIHl.js → index.vue_vue_type_script_setup_true_lang-6ThktX0W.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-C0WdqAD3.cjs → index.vue_vue_type_script_setup_true_lang-D2XdpbX2.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-8sKf69T7.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CCe3D1Fi.cjs} +58 -58
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BBtXjJyn.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Ce-Qmyx6.js} +5046 -5034
- package/dist/{index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-DIyem6Zd.js → index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-BJv6YZwy.js} +59 -59
- package/dist/{index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-DfW-NcWK.cjs → index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-IWNNVYfV.cjs} +5 -5
- package/dist/{index.vue_vue_type_style_index_0_scoped_57a7854d_lang-Bj6wXs-K.js → index.vue_vue_type_style_index_0_scoped_57a7854d_lang-Bnu-UWuz.js} +18 -18
- package/dist/{index.vue_vue_type_style_index_0_scoped_57a7854d_lang-CoP3t1MS.cjs → index.vue_vue_type_style_index_0_scoped_57a7854d_lang-IfwcHebz.cjs} +1 -1
- package/dist/{main-DEB71tXS.cjs → main-BPiaiKSm.cjs} +1 -1
- package/dist/{main-DSnZpabn.js → main-CNizRBdz.js} +2 -2
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +7 -7
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +9 -9
- package/dist/{threeModel-j-ksghdx.cjs → threeModel-BpduEcPZ.cjs} +1 -1
- package/dist/{threeModel-BuK8iClH.js → threeModel-vh07xxLE.js} +1 -1
- package/package.json +1 -1
- package/dist/index-6DTZ5srt.cjs +0 -1
- package/dist/index-B8Kd-FiX.cjs +0 -1
- package/dist/index-BefuyAwv.js +0 -125
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.vue_vue_type_script_setup_true_lang-D2XdpbX2.cjs");exports.default=e._sfc_main;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const u=require("vue"),l=require("./menu-B98fDP-p.cjs"),X=require("./login--G67Cn_f.cjs"),ve=require("./modelComp-RmvEs7pM.cjs"),C=require("./crypto-CRbcEKIz.cjs"),de=require("./index-Cbht3RG4.cjs"),F=l.defineStore("authorityState",{state:()=>({routerPageStructures:[]}),actions:{setRouterPageStructure(e){this.routerPageStructures=e}}}),Ae=l.useMenuState(l.pinia),{activeMenuPath:d}=l.storeToRefs(Ae),Y=X.useLoginState(l.pinia),{structureData:be}=l.storeToRefs(Y),ke=F(l.pinia),{routerPageStructures:Se}=l.storeToRefs(ke),Z=ve.useModelComp(l.pinia),Be=u.ref([{label:"角色名称",value:"",name:"roleName"}]),Te=u.ref([{label:"查询"},{label:"重置"}]),J=u.reactive({isFilter:!1,filterForm:{}}),Ce=u.ref(!1),De=e=>{J.isFilter=!0,J.filterForm=e},m=u.ref([]),ee=u.ref([]),te=u.ref(""),Pe=u.computed(()=>{var r,s,t,n,a;const e=(r=Se.value)==null?void 0:r.find(o=>{var c;return((c=o==null?void 0:o.comp)==null?void 0:c.toUpperCase())==="TABLE"});if(e){te.value=e.name,ee.value=(n=(t=(s=e==null?void 0:e.compData)==null?void 0:s.find(c=>(c==null?void 0:c.key)==="header"))==null?void 0:t.contents)==null?void 0:n.filter(c=>(c==null?void 0:c.label)!=="操作");const o=(a=e==null?void 0:e.compData)==null?void 0:a.map(c=>{if((c==null?void 0:c.key)==="rowButton"){let h=[];return P.value?h=[...c==null?void 0:c.contents,{label:"授权"}]:h=c==null?void 0:c.contents,{...c,contents:h}}return c});return ne(o),o}return[]}),Ke=e=>{U(e.singleContent,e.buttonName,$.value)},b=u.ref({}),x=u.ref(),D=async(e,r,s)=>{var t,n;try{const a=await e(r);return((t=a==null?void 0:a.data)==null?void 0:t.code)===200?(s!=="查询"&&await Y.setLogRecordAsync({type:s,data:r},d.value),a.data.result||((n=a==null?void 0:a.data)==null?void 0:n.code)===200):null}catch(a){l.ElMessage.error(a)}},Me=(e,r)=>{const s=new Map(r.map(n=>[n.path,n.checkedButtons]));function t(n){var o,c;const a=(o=n==null?void 0:n.path)!=null&&o.startsWith("/")?(c=n==null?void 0:n.path)==null?void 0:c.substring(1):n==null?void 0:n.path;s.has(a)&&(n.checkedButtons=s.get(a)),n.children&&n.children.length>0&&n.children.forEach(t)}e.forEach(t)},se=e=>e==null?void 0:e.map(r=>{var t;const s={...r,checkedButtons:[]};return s.children&&((t=s.children)==null?void 0:t.length)>0&&(s.children=se(s.children)),s}),O=e=>{for(const r in e)if(Array.isArray(e[r]))return r;return""},re=e=>{const r=[];let s=0;for(;s<e.length;)if(typeof e[s]=="string"){const t={title:e[s]};s+1<e.length&&Array.isArray(e[s+1])?(t.children=re(e[s+1]),s+=2):s+=1,r.push(t)}return r},j=e=>{const r=[];let s=0;for(;s<(e==null?void 0:e.length);){const t={title:e==null?void 0:e[s]};s+1<(e==null?void 0:e.length)&&Array.isArray(e==null?void 0:e[s+1])?(t.children=re(e==null?void 0:e[s+1]),s+=2):s+=1,r.push(t)}return r},R=(e,r="",s=new Map)=>e==null?void 0:e.map(t=>{const n=r?`${r}/${t.title}`:t.title;if(s.has(n))return s.get(n);const a={...t,path:n};return t.children&&t.children.length>0&&(a.children=R(t.children,n,s)),s.set(n,a),a}),W=(e,r)=>e.reduce((s,t)=>{const n=t[r];return s[n]||(s[n]=[]),s[n].push(t),s},{}),L=e=>{const r=[];function s(t,n){!t.children||t.children.length===0?r.push({...t,parentPath:n||""}):t.children.forEach(a=>s(a,t.path||n))}return e.forEach(t=>s(t,"")),r},q=e=>Object.entries(e).map(([s,t])=>({path:s,checkedButtons:t==null?void 0:t.map(n=>n==null?void 0:n.path)})),Ee=e=>Object.prototype.toString.call(e)==="[object Object]"&&e!==null,we=e=>{const r={},s=Array.isArray(e)?e==null?void 0:e.filter(t=>{var n;return!(Ee(t)&&((n=Object.keys(t))!=null&&n.includes("id")))}):null;return s&&(s==null||s.forEach((t,n)=>{if(n<=0)return;const a=`a${n}`;r[a]=t})),r},k=u.ref(""),ne=e=>{var n;const r=e==null?void 0:e.find(a=>(a==null?void 0:a.key)==="tableContents");if(!r)return"";const s=(n=r==null?void 0:r.contents)==null?void 0:n[0],t=we(s);k.value=O(t)},Ie=e=>{if(!Array.isArray(e))return!1;for(let r of e){if(typeof r!="object"||r===null||typeof r.path!="string"||!Array.isArray(r.checkedButtons))return!1;for(let s of r.checkedButtons)if(typeof s!="string")return!1}return!0},Re=e=>{const r=[];for(const s in e)e[s].forEach(n=>{var h,i;const a=(h=n.path)!=null&&h.startsWith("/")?(i=n.path)==null?void 0:i.substring(1):n.path,o=a==null?void 0:a.split("/");let c=r;o.forEach(y=>{let p=c.find(v=>v.title===y);p||(p={title:y,path:n.path,children:[]},c.push(p)),c=p.children})});return r},$e=e=>{const r={};return e.forEach(s=>{const{path:t,checkedButtons:n}=s,a=t,o=n.map(c=>({title:c.split("/").pop()||"",path:c,parentPath:a}));r[a]=o}),r},ae=e=>{let r=[];for(const s of e){let t=[s.title];if(s.children&&Array.isArray(s.children)){let n=ae(s.children);n.length>0&&t.push(n)}r.push(t)}return r},Ne=e=>{const r=[];for(const s of e){if(!Array.isArray(s)||s.length!==2)continue;const[t,n]=s,a=ce(n),o=r.indexOf(t);o===-1?r.push(t,a):r[o+1]=oe(r[o+1],a)}return r},ce=e=>{const r=[];for(const s of e)if(Array.isArray(s)){if(s.length===1&&typeof s[0]=="string")r.push(s[0]);else if(s.length===2&&typeof s[0]=="string"){const[t,n]=s;r.push(t,ce(n))}}return r},oe=(e,r)=>{const s=[...e];let t=0;for(;t<r.length;){const n=r[t];if(typeof n=="string"){const a=s.indexOf(n);a===-1?s.push(n,r[t+1]):s[a+1]=oe(s[a+1],r[t+1]),t+=2}else s.push(n),t+=1}return s},Fe=async(e,r)=>{var s,t;if(b.value=l.cloneDeep(r),Z.setRefreshCurStructure(!1),(s=S.value)==null||s.splice(0),e==="授权"){if(!k.value){l.ElMessage.error("请正确定义角色权限");return}const n=Ie(b.value[k.value]);let a;if(n)a=b.value[k.value];else{const c=j(b.value[k.value]),h=R(c),i=L(h),y=W(i,"parentPath");a=q(y)}if(!a||!Array.isArray(a)){l.ElMessage.error("权限数据处理出错了,请联系管理员");return}A.title=`【${r.a0}】授权`,A.show=!0,await u.nextTick();const o=a==null?void 0:a.map(c=>c==null?void 0:c.path);(t=x.value)==null||t.setCheckedKeys(o),Me(K.value,a)}},xe=()=>{A.show=!1},E=u.ref(),Oe=async e=>{const r=await D(l.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:e}},"查询"),s=r==null?void 0:r.map(t=>{var n;return{id:t.id,tableData:(n=t==null?void 0:t.value)==null?void 0:n.tableData}});return s==null?void 0:s.map(t=>{var n;if(Array.isArray(t==null?void 0:t.tableData)){let a={id:t.id};return(n=t==null?void 0:t.tableData)==null||n.forEach((o,c)=>{a[`a${c}`]=o}),a}else return{...t.tableData,id:t.id}})},_=(e,r)=>{let s={};return r==null||r.forEach((t,n)=>{t.label&&e&&(s[t.label]=(e==null?void 0:e[`a${n}`])??null)}),s},U=(e,r,s)=>{var a,o,c,h;const t=l.cloneDeep(e);t!=null&&t.id&&delete t.id;const n=_(t,ee.value);r==="新增"?D(l.createInsofDataApi,{key:{type:"data",systemKey:sessionStorage.getItem("systemKey"),pageKey:(a=d.value)!=null&&a.startsWith("/")?(o=d.value)==null?void 0:o.substring(1):d.value,tableId:s},value:{tableData:n}},r).then(i=>{E.value={...e,newId:i},r&&i&&l.ElMessage.success(r+"成功")}):r==="编辑"?D(l.updateInsofDataApi,{id:e.id,key:{type:"data",systemKey:sessionStorage.getItem("systemKey"),pageKey:(c=d.value)!=null&&c.startsWith("/")?(h=d.value)==null?void 0:h.substring(1):d.value,tableId:s},value:{tableData:n}},r).then(i=>{r&&i&&l.ElMessage.success(r+"成功"),A.show=!1}):r==="删除"&&D(l.deleteInsofDataApi,{id:e.id},r).then(i=>{r&&i&&l.ElMessage.success(r+"成功")}),Z.setRefreshCurStructure(!0)},le=e=>{let r=[];return e==null||e.forEach(s=>{var t;if(s.checkedButtons&&((t=s.checkedButtons)==null?void 0:t.length)>0){const n={path:s.path,checkedButtons:s.checkedButtons};r=r.concat(n)}s.children&&(r=r.concat(le(s.children)))}),r},je=()=>{const e=le(K.value),r=$e(e),s=Re(r),t=ae(s),n=Ne(t);E.value={...b.value,[k.value]:n},u.nextTick(()=>{U(E.value,"编辑",$.value)})},A=u.reactive({show:!1,title:"角色授权",width:"35%",draggable:!0}),We=({isPenultimate:e},r)=>{var s,t;return console.log("isPenultimate",e,r),((t=(s=r==null?void 0:r.data)==null?void 0:s.renderButtons)==null?void 0:t.length)>0?"is-penultimate":""},$=u.ref(0),ue=async e=>{var t,n,a,o,c;let r;const s=await l.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure",pageKey:e!=null&&e.startsWith("/")?e==null?void 0:e.substring(1):e}});return((t=s==null?void 0:s.data)==null?void 0:t.code)===200&&(n=s==null?void 0:s.data)!=null&&n.result&&((a=s==null?void 0:s.data)==null?void 0:a.result.length)>0&&(r=(c=(o=s==null?void 0:s.data.result)==null?void 0:o[0])==null?void 0:c.id,$.value=r),r},K=u.ref([]),Le=u.ref([{path:"资源管理",buttons:["查询","新增","编辑","删除"]},{path:"资源管理/人员",buttons:["查询","新增","编辑","删除"]}]),qe=(e,r)=>{var s;e.checkedButtons=r?(s=e.renderButtons)==null?void 0:s.map(t=>t.path):[]},S=u.ref([]),_e=(e,r)=>{var s,t,n;r.checkedButtons=e,((s=r.checkedButtons)==null?void 0:s.length)===((t=r.renderButtons)==null?void 0:t.length)?S.value.push(r.path):(e==null?void 0:e.length)===0&&(S.value=(n=S.value)==null?void 0:n.filter(a=>a!==r.path))};u.watch(()=>S.value.length,()=>{var e;(e=x.value)==null||e.setCheckedKeys([...S.value])});u.watch(()=>A.show,e=>{e||(K.value=se(K.value))});const he=u.computed(()=>{var s;const e=(s=l.cloneDeep(be.value))==null?void 0:s.filter(t=>{var n,a;return((a=(n=t==null?void 0:t.key)==null?void 0:n.pageKey)==null?void 0:a.toUpperCase())!=="MENU"});return e==null?void 0:e.map(t=>{var o,c,h,i,y,p,v,G;const n=/button/i;let a=(h=(c=(o=t==null?void 0:t.value)==null?void 0:o.pageData)==null?void 0:c.compData)==null?void 0:h.filter(T=>n.test(T==null?void 0:T.key));return a=Array.from(new Set(a==null?void 0:a.flatMap(T=>T.contents.map(ge=>ge.label)))),{path:(y=(i=t==null?void 0:t.key)==null?void 0:i.pageKey)!=null&&y.startsWith("/")?(v=(p=t==null?void 0:t.key)==null?void 0:p.pageKey)==null?void 0:v.substring(1):(G=t==null?void 0:t.key)==null?void 0:G.pageKey,buttons:a}})}),Ue=u.ref([]),Ve=e=>{const s=[e==null?void 0:e.find(t=>(t==null?void 0:t.title)==="平台管理")].flatMap(t=>t==null?void 0:t.children);return s==null?void 0:s.map(t=>{var n,a;return{path:(n=t==null?void 0:t.path)!=null&&n.startsWith("/")?(a=t==null?void 0:t.path)==null?void 0:a.substring(1):t.path,buttons:["新增","查看","编辑","删除"]}})},H=(e,r)=>{var s;if(e.carryData){if(e.path==="系统管理/个人中心"){const t=["基本信息","上传头像","签名","修改密码"];return t==null?void 0:t.map(n=>{var a,o;return{title:n,path:(a=e==null?void 0:e.path)!=null&&a.startsWith("/")?((o=e==null?void 0:e.path)==null?void 0:o.substring(1))+"/"+n:e.path+"/"+n}})}return(s=r==null?void 0:r.buttons)==null?void 0:s.map(t=>{var n,a;return{title:t,path:(n=e==null?void 0:e.path)!=null&&n.startsWith("/")?((a=e==null?void 0:e.path)==null?void 0:a.substring(1))+"/"+t:e.path+"/"+t}})}return[]},ie=(e,r)=>{if(Array.isArray(e))return e==null?void 0:e.map(s=>{var a,o;const t=(a=s==null?void 0:s.path)!=null&&a.startsWith("/")?(o=s==null?void 0:s.path)==null?void 0:o.substring(1):s==null?void 0:s.path,n=r==null?void 0:r.find(c=>(c==null?void 0:c.path)===t);return s.children&&s.children.length>0?{...s,renderButtons:H(s,n),checkedButtons:[],children:ie(s.children,he.value)}:{...s,renderButtons:H(s,n),checkedButtons:[]}})},ze={comp:"Group",name:"/系统管理/角色管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:m.value,name:""}]}]},Qe=Object.freeze(Object.defineProperty({__proto__:null,addButtonsToTree:ie,addPathToTree:R,authorizeDialog:A,buttonValue:Te,changedRow:E,clickRow:b,clickRowButton:Fe,clickSubmitAuthority:je,closeAuthorizeDialog:xe,compName:te,convertArrayToTree:j,convertIndexToLabel:_,customNodeClass:We,getActivePageStructureId:ue,getAuthorityKey:ne,getFirstArrayProperty:O,getLeafNodesRecursive:L,getPageDataAsync:Oe,groupByField:W,handleAddSysMenusButtons:Ve,handleItemDataChange:Ke,handleNodeBtnChange:_e,handleNodeCheckChange:qe,handleQueryChange:De,handleRowAuthorityRender:q,handleSubmitAsync:D,isPageDataExist:Ce,menuData:K,menusButtons:Le,pageData:m,pageDataFiltered:Pe,queryFormData:Be,structureButtons:he,structureId:$,submitTableAsyncByVerify:U,tempRolePageData:ze,tempSysMenus:Ue,treeRef:x},Symbol.toStringTag,{value:"Module"})),fe=X.useLoginState(l.pinia),{superAdminInfo:Ge,cryptoInfo:f}=l.storeToRefs(fe),Je=l.useMenuState(l.pinia),{activeMenuPath:g}=l.storeToRefs(Je),M="123456",He=F(l.pinia),{routerPageStructures:Xe}=l.storeToRefs(He),V=u.ref(0),Ye=u.ref([{label:"用户名称",value:"",name:"userName"}]),P=u.computed(()=>{const e=sessionStorage.getItem("isSuperAdmin");return e?JSON.parse(e):!1}),Ze=e=>{console.log("handleQueryChange",e)},z=u.ref([]),ye=u.ref(""),w=u.computed(()=>{var r,s,t,n,a;const e=(r=Xe.value)==null?void 0:r.find(o=>{var c;return((c=o==null?void 0:o.comp)==null?void 0:c.toUpperCase())==="TABLE"});if(e){ye.value=e.name,z.value=(n=(t=(s=e==null?void 0:e.compData)==null?void 0:s.find(c=>(c==null?void 0:c.key)==="header"))==null?void 0:t.contents)==null?void 0:n.filter(c=>(c==null?void 0:c.label)!=="操作");const o=(a=e==null?void 0:e.compData)==null?void 0:a.map(c=>{if((c==null?void 0:c.key)==="rowButton"){const h=[...c==null?void 0:c.contents,{label:"重置密码"}];return{...c,contents:h}}return c});return console.log(245,o),o}return[]}),me=e=>{N(e.singleContent,e.buttonName,V.value)},I=u.ref(),et=e=>{console.log("onDoubleClick",e)},tt=(e,r)=>{e==="重置密码"&&de.ElMessageBox.confirm(`该操作将会重置【${r==null?void 0:r.account}】的密码,确认重置?`,"警告",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{I.value={...r,password:M},N(I.value,e,V.value)}).catch(()=>{l.ElMessage.info("取消重置")})},pe=()=>{Q(g.value).then(e=>{var s;const r=Array.isArray(e)&&(e==null?void 0:e.filter(t=>(t==null?void 0:t.account)!==Ge.value.account));w.value=(s=w.value)==null?void 0:s.map(t=>t.key==="tableContents"?{...t,contents:r==null?void 0:r.map(n=>{var a;return{...n,password:C.decryptData(n==null?void 0:n.password,(a=f==null?void 0:f.value)==null?void 0:a.privateKey)}})}:t)})},B=async(e,r,s)=>{var t,n;try{const a=await e(r);return((t=a==null?void 0:a.data)==null?void 0:t.code)===200?(s!=="查询"&&await fe.setLogRecordAsync({type:s,data:r},g.value),a.data.result||((n=a==null?void 0:a.data)==null?void 0:n.code)===200):null}catch(a){l.ElMessage.error(a)}},N=(e,r,s)=>{var a,o,c,h,i,y;const t=l.cloneDeep(e);t!=null&&t.id&&delete t.id;const n=_(t,z.value);C.isEncryptAvailable()&&n&&(!n.password&&P.value?n.password=C.encryptData(M,(a=f==null?void 0:f.value)==null?void 0:a.publicKey):n.password&&P.value&&(n.password=C.encryptData(n==null?void 0:n.password,(o=f==null?void 0:f.value)==null?void 0:o.publicKey))),r==="新增"?B(l.createInsofDataApi,{key:{type:"data",layer:n==null?void 0:n.layer,systemKey:sessionStorage.getItem("systemKey"),pageKey:(c=g.value)!=null&&c.startsWith("/")?(h=g.value)==null?void 0:h.substring(1):g.value,tableId:s},value:{tableData:n}},r).then(p=>{var v;I.value={...e,newId:p,password:P.value?C.decryptData((e==null?void 0:e.password)??M,(v=f==null?void 0:f.value)==null?void 0:v.privateKey):e==null?void 0:e.password},r&&p&&l.ElMessage.success(r+"成功")}):r==="编辑"||r==="重置密码"?B(l.updateInsofDataApi,{id:e.id,key:{type:"data",layer:n==null?void 0:n.layer,systemKey:sessionStorage.getItem("systemKey"),pageKey:(i=g.value)!=null&&i.startsWith("/")?(y=g.value)==null?void 0:y.substring(1):g.value,tableId:s},value:{tableData:n}},r).then(()=>{r==="重置密码"&&pe(),r&&l.ElMessage.success(r+"成功"),A.show=!1}):r==="删除"&&B(l.deleteInsofDataApi,{id:e.id},r).then(()=>{r&&l.ElMessage.success(r+"成功")})},Q=async e=>{const r=await B(l.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:e}},"查询"),s=r==null?void 0:r.map(t=>{var n,a;return{id:t.id,layer:(n=t.key)==null?void 0:n.layer,tableData:(a=t==null?void 0:t.value)==null?void 0:a.tableData}});return s==null?void 0:s.map(t=>{var n;if(!Array.isArray(t==null?void 0:t.tableData))return{...t.tableData,layer:(n=t.key)==null?void 0:n.layer,id:t.id}})},st={comp:"Group",name:"/系统管理/用户管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:w.value,name:""}]}]},rt=Object.freeze(Object.defineProperty({__proto__:null,changedRow:I,clickRowButton:tt,columns:z,compName:ye,getPageDataAsync:Q,handleItemDataChange:me,handleQueryChange:Ze,handleSubmitAsync:B,loginUserIsSuper:P,onDoubleClick:et,pageData:w,queryFormData:Ye,refreshUserTableData:pe,resetPassword:M,structureId:V,submitTableAsyncByVerify:N,tempUserPageData:st},Symbol.toStringTag,{value:"Module"}));exports.State=rt;exports.State$1=Qe;exports.addPathToTree=R;exports.convertArrayToTree=j;exports.getActivePageStructureId=ue;exports.getFirstArrayProperty=O;exports.getLeafNodesRecursive=L;exports.getPageDataAsync=Q;exports.groupByField=W;exports.handleRowAuthorityRender=q;exports.handleSubmitAsync=B;exports.resetPassword=M;exports.submitTableAsyncByVerify=N;exports.useAuthorityState=F;
|