ss-component-new 1.1.916 → 1.1.917

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 (77) hide show
  1. package/dist/{animationData-DxPNNQ6Q.cjs → animationData-BxCcRPZ5.cjs} +1 -1
  2. package/dist/{animationData-Dk6B49FY.js → animationData-CfTiH3Ud.js} +1 -1
  3. package/dist/{index-Czo5Fc6M.cjs → index-B-qSWQ9d.cjs} +1 -1
  4. package/dist/{index-BHKYxCMh.js → index-B35rZU2l.js} +6 -6
  5. package/dist/{index-BQxLWOfN.js → index-B3shqLJM.js} +1 -1
  6. package/dist/{index-DNHyHoEs.js → index-B5de973-.js} +1 -1
  7. package/dist/{index-DGqZ-VH5.cjs → index-B8Bt5Kc6.cjs} +1 -1
  8. package/dist/{index-D1Ndrhmi.cjs → index-B9uru_cT.cjs} +1 -1
  9. package/dist/{index-BiQvEadm.cjs → index-BCfg5pjp.cjs} +1 -1
  10. package/dist/{index-DGAqECgB.js → index-BRXibRYH.js} +1 -1
  11. package/dist/{index-kRGNu35S.cjs → index-BUbNf_rj.cjs} +1 -1
  12. package/dist/{index-spRlk5uC.js → index-BWCa_Qr3.js} +2 -2
  13. package/dist/{index-B4D0tkat.cjs → index-BZQKmBg3.cjs} +1 -1
  14. package/dist/{index-D9ic27Ez.js → index-Be89K6rB.js} +3 -3
  15. package/dist/{index-C-0GzU0h.js → index-BiggDECg.js} +36 -36
  16. package/dist/{index-B9kwp8t3.js → index-Bj0i_Qk0.js} +1 -1
  17. package/dist/{index-DQ7FgCZB.js → index-Boxvk9wf.js} +1 -1
  18. package/dist/{index-DZ9t-Zdb.js → index-C03MfD4r.js} +2 -2
  19. package/dist/{index--YbNQnmi.cjs → index-CP0O1SEX.cjs} +1 -1
  20. package/dist/{index-edYXgLHY.cjs → index-CPxgYT8Y.cjs} +1 -1
  21. package/dist/{index-Bi0MVVgA.cjs → index-CYR1cOmN.cjs} +1 -1
  22. package/dist/{index-CldtDY3p.js → index-CYWeM2A2.js} +1 -1
  23. package/dist/{index-nDGQESaP.cjs → index-CYmnQqOV.cjs} +1 -1
  24. package/dist/{index-DuMM_JUz.cjs → index-Cmpx1RdG.cjs} +1 -1
  25. package/dist/{index-KoQQ0Bxf.js → index-CsMQDXQk.js} +1 -1
  26. package/dist/{index-sHbeYjP9.cjs → index-Cxw8LmU3.cjs} +1 -1
  27. package/dist/{index-Bai_C75w.cjs → index-CyzKYBU1.cjs} +1 -1
  28. package/dist/{index-Do1AWhgC.js → index-DFhj7ZnO.js} +1 -1
  29. package/dist/{index-DbYDANN1.cjs → index-DILqpWCi.cjs} +1 -1
  30. package/dist/{index-C4p_XCBh.js → index-Dmj_XlRJ.js} +4 -4
  31. package/dist/{index-B_oN21E0.js → index-DnyAUDVD.js} +1 -1
  32. package/dist/{index-CSfF1xAJ.js → index-DweqMv7Y.js} +3 -3
  33. package/dist/{index-CuO2TQxf.cjs → index-Dzv3gj2b.cjs} +1 -1
  34. package/dist/{index-De9Fj4tI.js → index-FAmaor7y.js} +1 -1
  35. package/dist/{index-CLfD3RTW.js → index-Hna4XUc2.js} +1 -1
  36. package/dist/{index-GzTydrMH.js → index-HtG0P_JN.js} +13 -13
  37. package/dist/{index-DQtX_UfX.js → index-JKsH0liA.js} +3 -3
  38. package/dist/index-O6qXMoyO.cjs +1 -0
  39. package/dist/{index-DtzAP7jy.cjs → index-Oy_yEimw.cjs} +1 -1
  40. package/dist/{index-LomgYsp9.cjs → index-SwAnfzZf.cjs} +1 -1
  41. package/dist/{index-DKP_JfEy.cjs → index-WQynbOva.cjs} +1 -1
  42. package/dist/{index-e4g4i91-.cjs → index-jMcvgN3C.cjs} +1 -1
  43. package/dist/{index-BVajtv9V.js → index-jbqfiF8Y.js} +658 -655
  44. package/dist/{index-B4phFllm.cjs → index-n_ZZK4do.cjs} +1 -1
  45. package/dist/{index-Bdl6L2QU.js → index-q-rO-Vj2.js} +3 -3
  46. package/dist/{index-CuPSR5Xw.cjs → index-wlGclr31.cjs} +1 -1
  47. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BUq-ueXS.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DTT47cO8.cjs} +56 -56
  48. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BbT913O_.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-aivbbzWu.js} +1718 -1713
  49. package/dist/{index.vue_vue_type_style_index_0_scoped_6ecb5a6a_lang-DTQ0MRbS.js → index.vue_vue_type_style_index_0_scoped_6ecb5a6a_lang-UtQlB4mS.js} +8243 -8214
  50. package/dist/{index.vue_vue_type_style_index_0_scoped_6ecb5a6a_lang-K6a4NvFH.cjs → index.vue_vue_type_style_index_0_scoped_6ecb5a6a_lang-fBiZApDs.cjs} +13 -13
  51. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-Jc8nuhvr.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-CLdCA6i3.js} +4 -4
  52. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-CvAissIy.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-CV1tkB3H.cjs} +1 -1
  53. package/dist/{index.vue_vue_type_style_index_1_lang-CrSJqp8H.cjs → index.vue_vue_type_style_index_1_lang-9htxIQIP.cjs} +1 -1
  54. package/dist/{index.vue_vue_type_style_index_1_lang-Bz7GcFbU.js → index.vue_vue_type_style_index_1_lang-Bh80XgxM.js} +1 -1
  55. package/dist/{main-BEBjHm_r.js → main-B8qsaDpC.js} +2 -2
  56. package/dist/{main-Dz8rrTyC.cjs → main-FTIA6Lkw.cjs} +1 -1
  57. package/dist/obj/model.mtl +42 -0
  58. package/dist/obj/model.obj +26110 -0
  59. package/dist/ss-component.cjs +1 -1
  60. package/dist/ss-component.css +1 -1
  61. package/dist/ss-component.js +9 -9
  62. package/dist/ss-component2.cjs +1 -1
  63. package/dist/ss-component2.js +11 -11
  64. package/dist/{threeLatheView-DOzF1zpB.js → threeLatheView-COJKteTM.js} +2 -2
  65. package/dist/{threeLatheView-uZTaLW4n.cjs → threeLatheView-Cyo_eLlA.cjs} +1 -1
  66. package/dist/{threeModel-BmkILqpF.cjs → threeModel-Djh-POJf.cjs} +1 -1
  67. package/dist/{threeModel-BlmY_gVD.js → threeModel-ql_8tao-.js} +2 -2
  68. package/dist/{threeSceneView-DsuKL6BC.js → threeSceneView-4ob-ZV0I.js} +3 -3
  69. package/dist/{threeSceneView-BIIyRtQ3.cjs → threeSceneView-9IiOAeOk.cjs} +1 -1
  70. package/dist/{threeSceneViewForCPMPIP-S8ANS5ZV.cjs → threeSceneViewForCPMPIP-CJLtTek-.cjs} +1 -1
  71. package/dist/{threeSceneViewForCPMPIP-Bs6r854d.js → threeSceneViewForCPMPIP-WCFMIlRy.js} +1 -1
  72. package/dist/{threeViewerHost-DHuxGg6S.cjs → threeViewerHost-D5YYwfCI.cjs} +1 -1
  73. package/dist/{threeViewerHost-BjkbSV5D.js → threeViewerHost-gq4oC6L-.js} +2 -2
  74. package/package.json +1 -1
  75. package/public/obj/model.mtl +42 -0
  76. package/public/obj/model.obj +26110 -0
  77. package/dist/index-wdbFIMjN.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";const y=require("./index.vue_vue_type_style_index_1_lang-C6Wqwl0x.cjs"),T=require("./xlsx-BPHygxEf.cjs"),_=require("./threeViewerHost-DHuxGg6S.cjs"),U=require("./index-1z9RrjZc.cjs");function P(r){try{const c=new URL(r).pathname,i=c.substring(c.lastIndexOf("/")+1);return decodeURIComponent(i)}catch(c){return console.error("无法解析URL以提取文件名:",r,c),"未知文件名"}}function S(r){if(!r)return;const c=r.match(/filename\*\s*=\s*([^;]+)/i);if(c){let n=c[1].trim();n=n.replace(/^"(.*)"$/,"$1");const h=n.split("''");if(h.length===2){const m=h[0].toUpperCase(),f=h[1];try{if(m==="UTF-8")return decodeURIComponent(f)}catch{}return f}try{return decodeURIComponent(n)}catch{return n}}const i=r.match(/filename\s*=\s*("?)([^";]+)\1/i);if(i)return i[2].trim()}async function K(r){let c,i;if(/^https?:\/\//.test(r))try{const n=await fetch(r,{method:"GET",cache:"no-store"});if(!n.ok)throw new Error(`下载文件失败: ${n.statusText} (URL: ${r})`);c=await n.blob(),i=P(r)}catch(n){throw console.error("使用 fetch 下载文件时出错:",n),n}else try{const n=await _.downloadAvatarApi({url:r});if(n.status!==200)throw new Error(`下载失败: ${n.status}`);const h=n.headers["content-disposition"];i=S(h)||"无文件名",c=n.data}catch(n){throw console.error("通过 API 下载文件时出错:",n),n}return new File([c],i,{type:c.type})}function N(r){return new Promise((c,i)=>{const n=new FileReader;n.onload=h=>{var m;try{const f=(m=h.target)==null?void 0:m.result,u=T.readSync(f,{type:"array"}),F=u.Sheets[u.SheetNames[0]],E=T.utils.sheet_to_json(F);c(E)}catch(f){i(f)}},n.readAsArrayBuffer(r)})}const V=async()=>{const r="弯管仿真加工分析";let c={};const i=sessionStorage.getItem("systemKey"),n=await y.getItemData(`${r}/管件解析`,i,"");let h=["管长","外径"],m={};n==null||n.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{h.includes(a==null?void 0:a.key)&&(m[a.key]=a.value)}))}))});const f=m.管长,u=m.外径;console.log("管长",f,"外径",u,m);const F=f,E=u/2,d=await y.getItemData(`${r}/加工位姿生成`,i,"");let A=["夹持长度"],g={};d==null||d.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{A.includes(a==null?void 0:a.key)&&(g[a.key]=a.value)}))}))});const k=g.夹持长度;console.log("夹持长度",k,g);const $=Number(k),w={},b=await y.getItemData(`${r}/仿真动画生成`,i,"");b==null||b.forEach(e=>{var s,o,l,a,R,L;if((e==null?void 0:e.comp)==="Table"){let x=[],D=(l=(o=(s=e==null?void 0:e.compData)==null?void 0:s.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:o.contents)==null?void 0:l.map(t=>t==null?void 0:t.label),C=(L=(R=(a=e==null?void 0:e.compData)==null?void 0:a.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:R.contents)==null?void 0:L.map(t=>(t=t==null?void 0:t.filter(p=>!(p!=null&&p.id)),t));C==null||C.forEach(t=>{x.push(y.getValueToObjectValue(t,D==null?void 0:D.filter(p=>p!=="操作")))}),w[e.name]=x,w[e.name+"Content"]=e}});const I=U.cloneDeep(w);return c={initialPipeLength:F,pipeRadius:E,clampLength:$,animationData:I},c},q=async()=>{const r="双弯管仿真加工分析";let c={};const i=sessionStorage.getItem("systemKey"),n=await y.getItemData(`${r}/管件解析`,i,"");let h=["管长","外径"],m={};n==null||n.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{h.includes(a==null?void 0:a.key)&&(m[a.key]=a.value)}))}))});const f=m.管长,u=m.外径;console.log("管长",f,"外径",u,m);const F=f,E=u/2,d=await y.getItemData(`${r}/加工工艺生成`,i,"");let A=["夹持位置"],g={};d==null||d.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{A.includes(a==null?void 0:a.key)&&(g[a.key]=a.value)}))}))});const k=g.夹持位置;console.log("夹持长度",k,g);const $=Number(k),w={},b=await y.getItemData(`${r}/仿真动画生成`,i,"");b==null||b.forEach(e=>{var s,o,l,a,R,L;if((e==null?void 0:e.comp)==="Table"){let x=[],D=(l=(o=(s=e==null?void 0:e.compData)==null?void 0:s.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:o.contents)==null?void 0:l.map(t=>t==null?void 0:t.label),C=(L=(R=(a=e==null?void 0:e.compData)==null?void 0:a.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:R.contents)==null?void 0:L.map(t=>(t=t==null?void 0:t.filter(p=>!(p!=null&&p.id)),t));C==null||C.forEach(t=>{x.push(y.getValueToObjectValue(t,D==null?void 0:D.filter(p=>p!=="操作")))}),w[e.name]=x,w[e.name+"Content"]=e}});const I=U.cloneDeep(w);return c={initialPipeLength:F,pipeRadius:E,clampLength:$,animationData:I},c},B=async r=>await K(r),j=async r=>await N(r),X=async r=>{const c=await B(r);return await j(c)};exports.fetchDoubleRobotAnimationData=q;exports.fetchSingleRobotAnimationData=V;exports.initXYZBCList=X;
1
+ "use strict";const y=require("./index.vue_vue_type_style_index_1_lang-C6Wqwl0x.cjs"),T=require("./xlsx-BPHygxEf.cjs"),_=require("./threeViewerHost-D5YYwfCI.cjs"),U=require("./index-1z9RrjZc.cjs");function P(r){try{const c=new URL(r).pathname,i=c.substring(c.lastIndexOf("/")+1);return decodeURIComponent(i)}catch(c){return console.error("无法解析URL以提取文件名:",r,c),"未知文件名"}}function S(r){if(!r)return;const c=r.match(/filename\*\s*=\s*([^;]+)/i);if(c){let n=c[1].trim();n=n.replace(/^"(.*)"$/,"$1");const h=n.split("''");if(h.length===2){const m=h[0].toUpperCase(),f=h[1];try{if(m==="UTF-8")return decodeURIComponent(f)}catch{}return f}try{return decodeURIComponent(n)}catch{return n}}const i=r.match(/filename\s*=\s*("?)([^";]+)\1/i);if(i)return i[2].trim()}async function K(r){let c,i;if(/^https?:\/\//.test(r))try{const n=await fetch(r,{method:"GET",cache:"no-store"});if(!n.ok)throw new Error(`下载文件失败: ${n.statusText} (URL: ${r})`);c=await n.blob(),i=P(r)}catch(n){throw console.error("使用 fetch 下载文件时出错:",n),n}else try{const n=await _.downloadAvatarApi({url:r});if(n.status!==200)throw new Error(`下载失败: ${n.status}`);const h=n.headers["content-disposition"];i=S(h)||"无文件名",c=n.data}catch(n){throw console.error("通过 API 下载文件时出错:",n),n}return new File([c],i,{type:c.type})}function N(r){return new Promise((c,i)=>{const n=new FileReader;n.onload=h=>{var m;try{const f=(m=h.target)==null?void 0:m.result,u=T.readSync(f,{type:"array"}),F=u.Sheets[u.SheetNames[0]],E=T.utils.sheet_to_json(F);c(E)}catch(f){i(f)}},n.readAsArrayBuffer(r)})}const V=async()=>{const r="弯管仿真加工分析";let c={};const i=sessionStorage.getItem("systemKey"),n=await y.getItemData(`${r}/管件解析`,i,"");let h=["管长","外径"],m={};n==null||n.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{h.includes(a==null?void 0:a.key)&&(m[a.key]=a.value)}))}))});const f=m.管长,u=m.外径;console.log("管长",f,"外径",u,m);const F=f,E=u/2,d=await y.getItemData(`${r}/加工位姿生成`,i,"");let A=["夹持长度"],g={};d==null||d.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{A.includes(a==null?void 0:a.key)&&(g[a.key]=a.value)}))}))});const k=g.夹持长度;console.log("夹持长度",k,g);const $=Number(k),w={},b=await y.getItemData(`${r}/仿真动画生成`,i,"");b==null||b.forEach(e=>{var s,o,l,a,R,L;if((e==null?void 0:e.comp)==="Table"){let x=[],D=(l=(o=(s=e==null?void 0:e.compData)==null?void 0:s.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:o.contents)==null?void 0:l.map(t=>t==null?void 0:t.label),C=(L=(R=(a=e==null?void 0:e.compData)==null?void 0:a.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:R.contents)==null?void 0:L.map(t=>(t=t==null?void 0:t.filter(p=>!(p!=null&&p.id)),t));C==null||C.forEach(t=>{x.push(y.getValueToObjectValue(t,D==null?void 0:D.filter(p=>p!=="操作")))}),w[e.name]=x,w[e.name+"Content"]=e}});const I=U.cloneDeep(w);return c={initialPipeLength:F,pipeRadius:E,clampLength:$,animationData:I},c},q=async()=>{const r="双弯管仿真加工分析";let c={};const i=sessionStorage.getItem("systemKey"),n=await y.getItemData(`${r}/管件解析`,i,"");let h=["管长","外径"],m={};n==null||n.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{h.includes(a==null?void 0:a.key)&&(m[a.key]=a.value)}))}))});const f=m.管长,u=m.外径;console.log("管长",f,"外径",u,m);const F=f,E=u/2,d=await y.getItemData(`${r}/加工工艺生成`,i,"");let A=["夹持位置"],g={};d==null||d.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{A.includes(a==null?void 0:a.key)&&(g[a.key]=a.value)}))}))});const k=g.夹持位置;console.log("夹持长度",k,g);const $=Number(k),w={},b=await y.getItemData(`${r}/仿真动画生成`,i,"");b==null||b.forEach(e=>{var s,o,l,a,R,L;if((e==null?void 0:e.comp)==="Table"){let x=[],D=(l=(o=(s=e==null?void 0:e.compData)==null?void 0:s.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:o.contents)==null?void 0:l.map(t=>t==null?void 0:t.label),C=(L=(R=(a=e==null?void 0:e.compData)==null?void 0:a.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:R.contents)==null?void 0:L.map(t=>(t=t==null?void 0:t.filter(p=>!(p!=null&&p.id)),t));C==null||C.forEach(t=>{x.push(y.getValueToObjectValue(t,D==null?void 0:D.filter(p=>p!=="操作")))}),w[e.name]=x,w[e.name+"Content"]=e}});const I=U.cloneDeep(w);return c={initialPipeLength:F,pipeRadius:E,clampLength:$,animationData:I},c},B=async r=>await K(r),j=async r=>await N(r),X=async r=>{const c=await B(r);return await j(c)};exports.fetchDoubleRobotAnimationData=q;exports.fetchSingleRobotAnimationData=V;exports.initXYZBCList=X;
@@ -1,6 +1,6 @@
1
1
  import { i as C, k as x } from "./index.vue_vue_type_style_index_1_lang-BO0ESRoA.js";
2
2
  import { r as K, u as S } from "./xlsx-ByPOQ6N_.js";
3
- import { d as I } from "./threeViewerHost-BjkbSV5D.js";
3
+ import { d as I } from "./threeViewerHost-gq4oC6L-.js";
4
4
  import { c as P } from "./index-BQYjK74w.js";
5
5
  function N(r) {
6
6
  try {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./index-BiQvEadm.cjs"),m=require("./index-Bai_C75w.cjs"),d=require("./index-kRGNu35S.cjs"),h=require("./index.vue_vue_type_style_index_1_lang-C6Wqwl0x.cjs"),u=require("./index-1z9RrjZc.cjs"),C=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),f={class:"menu-module"},k={class:"table-wrap","element-loading-text":"加载中..."},v={class:"module-dialog-default"},x=e.defineComponent({__name:"index",setup(b){const t=e.reactive({...p.State}),r=e.ref(null),a=h.useMenuState(u.pinia),{configMenu:n}=u.storeToRefs(a);return e.onMounted(()=>{var l;t.formatFormData(n.value),e.nextTick(()=>{var o,i;(i=r.value)==null||i.setCurrentKey((o=n.value)==null?void 0:o.path),a.setActiveMenuPath("/平台管理/菜单管理")}),n.value&&t.getInitialSubStructure((l=n.value)==null?void 0:l.path)}),(l,o)=>{const i=e.resolveComponent("el-tree"),c=e.resolveComponent("el-splitter-panel"),g=e.resolveComponent("el-splitter"),s=e.resolveComponent("el-button"),_=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",f,[e.createVNode(g,null,{default:e.withCtx(()=>[e.createVNode(c,{size:208,class:"tree-wrap",min:200},{default:e.withCtx(()=>[e.createVNode(i,{ref_key:"treeRef",ref:r,data:t.treeData,"expand-on-click-node":!1,"node-key":"path",props:{children:"children",label:"label",path:"path"},"highlight-current":"","default-expand-all":"","check-on-click-leaf":!1,"check-strictly":"",onNodeClick:t.clickNodeTrigger},null,8,["data","onNodeClick"])]),_:1}),e.createVNode(c,{min:500},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",k,[e.createVNode(m.ssTable,{itemData:t.menuPageData,changedContent:t.changedRow,operatingForm:t.operatingForm,onOnFormChange:t.changeTrigger,onChange:t.handleItemDataChange,onClickTrigger:t.clickTrigger,onOnButtonClick:t.clickRowButton},null,8,["itemData","changedContent","operatingForm","onOnFormChange","onChange","onClickTrigger","onOnButtonClick"])])),[[_,t.tableLoading]])]),_:1})]),_:1}),e.createVNode(d.ssDialog,{class:"module-dialog",title:t.dialogInfo.title,visible:t.dialogInfo.show,width:t.dialogInfo.width,onBeforeDestroy:t.beforeDialogDestroy},{default:e.withCtx(()=>[e.createElementVNode("div",v,[e.createVNode(d.ssForm,{rowContents:t.renderFormData,isEnableWrap:!1,isEdit:!0,onChange:t.changeTrigger,onClickTrigger:t.clickTrigger},null,8,["rowContents","onChange","onClickTrigger"])])]),footer:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(s,{onClick:t.beforeDialogDestroy,id:"themeBorderButton"},{default:e.withCtx(()=>o[0]||(o[0]=[e.createTextVNode("取消")])),_:1,__:[0]},8,["onClick"]),e.createVNode(s,{id:"themeButton",onClick:t.clickSubmitForm},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode(" 确认 ")])),_:1,__:[1]},8,["onClick"])])]),_:1},8,["title","visible","width","onBeforeDestroy"])])}}}),w=C._export_sfc(x,[["__scopeId","data-v-74868a06"]]);exports.default=w;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./index-BCfg5pjp.cjs"),m=require("./index-CyzKYBU1.cjs"),d=require("./index-BUbNf_rj.cjs"),h=require("./index.vue_vue_type_style_index_1_lang-C6Wqwl0x.cjs"),u=require("./index-1z9RrjZc.cjs"),C=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),f={class:"menu-module"},k={class:"table-wrap","element-loading-text":"加载中..."},v={class:"module-dialog-default"},x=e.defineComponent({__name:"index",setup(b){const t=e.reactive({...p.State}),r=e.ref(null),a=h.useMenuState(u.pinia),{configMenu:n}=u.storeToRefs(a);return e.onMounted(()=>{var l;t.formatFormData(n.value),e.nextTick(()=>{var o,i;(i=r.value)==null||i.setCurrentKey((o=n.value)==null?void 0:o.path),a.setActiveMenuPath("/平台管理/菜单管理")}),n.value&&t.getInitialSubStructure((l=n.value)==null?void 0:l.path)}),(l,o)=>{const i=e.resolveComponent("el-tree"),c=e.resolveComponent("el-splitter-panel"),g=e.resolveComponent("el-splitter"),s=e.resolveComponent("el-button"),_=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",f,[e.createVNode(g,null,{default:e.withCtx(()=>[e.createVNode(c,{size:208,class:"tree-wrap",min:200},{default:e.withCtx(()=>[e.createVNode(i,{ref_key:"treeRef",ref:r,data:t.treeData,"expand-on-click-node":!1,"node-key":"path",props:{children:"children",label:"label",path:"path"},"highlight-current":"","default-expand-all":"","check-on-click-leaf":!1,"check-strictly":"",onNodeClick:t.clickNodeTrigger},null,8,["data","onNodeClick"])]),_:1}),e.createVNode(c,{min:500},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",k,[e.createVNode(m.ssTable,{itemData:t.menuPageData,changedContent:t.changedRow,operatingForm:t.operatingForm,onOnFormChange:t.changeTrigger,onChange:t.handleItemDataChange,onClickTrigger:t.clickTrigger,onOnButtonClick:t.clickRowButton},null,8,["itemData","changedContent","operatingForm","onOnFormChange","onChange","onClickTrigger","onOnButtonClick"])])),[[_,t.tableLoading]])]),_:1})]),_:1}),e.createVNode(d.ssDialog,{class:"module-dialog",title:t.dialogInfo.title,visible:t.dialogInfo.show,width:t.dialogInfo.width,onBeforeDestroy:t.beforeDialogDestroy},{default:e.withCtx(()=>[e.createElementVNode("div",v,[e.createVNode(d.ssForm,{rowContents:t.renderFormData,isEnableWrap:!1,isEdit:!0,onChange:t.changeTrigger,onClickTrigger:t.clickTrigger},null,8,["rowContents","onChange","onClickTrigger"])])]),footer:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(s,{onClick:t.beforeDialogDestroy,id:"themeBorderButton"},{default:e.withCtx(()=>o[0]||(o[0]=[e.createTextVNode("取消")])),_:1,__:[0]},8,["onClick"]),e.createVNode(s,{id:"themeButton",onClick:t.clickSubmitForm},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode(" 确认 ")])),_:1,__:[1]},8,["onClick"])])]),_:1},8,["title","visible","width","onBeforeDestroy"])])}}}),w=C._export_sfc(x,[["__scopeId","data-v-74868a06"]]);exports.default=w;
@@ -1,18 +1,18 @@
1
1
  import { watch as u, onMounted as g, onUnmounted as C, resolveComponent as S, createElementBlock as v, openBlock as B, createVNode as I } from "vue";
2
- import "./index-BVajtv9V.js";
2
+ import "./index-jbqfiF8Y.js";
3
3
  import { u as K } from "./index-BQYjK74w.js";
4
4
  import "./array-Dv1oMcqh.js";
5
5
  import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- import "./index.vue_vue_type_style_index_0_scoped_92477073_lang-Jc8nuhvr.js";
7
- import "./index.vue_vue_type_style_index_0_scoped_6ecb5a6a_lang-DTQ0MRbS.js";
6
+ import "./index.vue_vue_type_style_index_0_scoped_92477073_lang-CLdCA6i3.js";
7
+ import "./index.vue_vue_type_style_index_0_scoped_6ecb5a6a_lang-UtQlB4mS.js";
8
8
  import "./index-BHtNKL1L.js";
9
- import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BbT913O_.js";
9
+ import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-aivbbzWu.js";
10
10
  import "./STLLoader-CXf8uOlr.js";
11
11
  import "./index.vue_vue_type_style_index_1_lang-BO0ESRoA.js";
12
- import "./index.vue_vue_type_style_index_1_lang-Bz7GcFbU.js";
12
+ import "./index.vue_vue_type_style_index_1_lang-Bh80XgxM.js";
13
13
  import "./index-BElzOYyY.js";
14
14
  import "vue-router";
15
- import "./index-Bdl6L2QU.js";
15
+ import "./index-q-rO-Vj2.js";
16
16
  import "./index-G3hG5Qn0.js";
17
17
  const j = {
18
18
  __name: "index",
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as z, reactive as R, onMounted as T, watch as A, nextTick as U, resolveComponent as i, createElementBlock as k, openBlock as u, createVNode as c, withCtx as l, createElementVNode as _, toDisplayString as g, Fragment as v, renderList as B, createBlock as b, createTextVNode as f, withDirectives as I, vShow as P } from "vue";
2
- import { s as E } from "./index-C4p_XCBh.js";
2
+ import { s as E } from "./index-Dmj_XlRJ.js";
3
3
  import { u as F, aK as x } from "./index.vue_vue_type_style_index_1_lang-BO0ESRoA.js";
4
4
  import { s as O, c as H } from "./index-BQYjK74w.js";
5
5
  import { _ as K } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1,4 +1,4 @@
1
- import { _ as b } from "./index.vue_vue_type_style_index_0_scoped_92477073_lang-Jc8nuhvr.js";
1
+ import { _ as b } from "./index.vue_vue_type_style_index_0_scoped_92477073_lang-CLdCA6i3.js";
2
2
  import { resolveComponent as r, createElementBlock as i, openBlock as n, Fragment as p, createVNode as l, createCommentVNode as k, withCtx as s, createElementVNode as d, normalizeStyle as w, toDisplayString as c, renderList as v, createTextVNode as _, createBlock as B, resolveDynamicComponent as I } from "vue";
3
3
  import { _ as L } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  const V = ["title"], $ = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Bai_C75w.cjs"),n=require("./index-Do5OjDGD.cjs"),u=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),r=e.ref([]),i=e.computed(()=>[{key:"extraButton",contents:[{label:"清空",background:"#f56c6c",color:"#ffffff"}]},{key:"rowButton",contents:[]},{key:"header",contents:[{label:"模块名称",prop:"module",filterable:!0},{label:"操作类型",prop:"type",filterable:!0},{label:"账号",prop:"account",filterable:!0},{label:"姓名",prop:"userName",filterable:!0},{label:"时间",prop:"timeStamp",sortable:!0}]},{key:"tableContents",contents:r.value}]),p=Object.freeze(Object.defineProperty({__proto__:null,pageData:i,tableData:r},Symbol.toStringTag,{value:"Module"})),b={class:"log-wrap"},d=e.defineComponent({__name:"index",setup(_){const t=e.reactive({...p});e.onMounted(async()=>{t.tableData=await n.getLogTableDataAsync("operate")});const c=l=>{var a;n.clickButton(l,(a=t.tableData)==null?void 0:a.map(o=>o.id),o=>{o&&(t.tableData=[])})};return(l,a)=>(e.openBlock(),e.createElementBlock("div",b,[e.createVNode(s.ssTable,{itemData:t.pageData,allowOperate:!1,allowSelect:!1,onOnButtonClick:c},null,8,["itemData"])]))}}),f=u._export_sfc(d,[["__scopeId","data-v-3d3b471d"]]);exports.default=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CyzKYBU1.cjs"),n=require("./index-Do5OjDGD.cjs"),u=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),r=e.ref([]),i=e.computed(()=>[{key:"extraButton",contents:[{label:"清空",background:"#f56c6c",color:"#ffffff"}]},{key:"rowButton",contents:[]},{key:"header",contents:[{label:"模块名称",prop:"module",filterable:!0},{label:"操作类型",prop:"type",filterable:!0},{label:"账号",prop:"account",filterable:!0},{label:"姓名",prop:"userName",filterable:!0},{label:"时间",prop:"timeStamp",sortable:!0}]},{key:"tableContents",contents:r.value}]),p=Object.freeze(Object.defineProperty({__proto__:null,pageData:i,tableData:r},Symbol.toStringTag,{value:"Module"})),b={class:"log-wrap"},d=e.defineComponent({__name:"index",setup(_){const t=e.reactive({...p});e.onMounted(async()=>{t.tableData=await n.getLogTableDataAsync("operate")});const c=l=>{var a;n.clickButton(l,(a=t.tableData)==null?void 0:a.map(o=>o.id),o=>{o&&(t.tableData=[])})};return(l,a)=>(e.openBlock(),e.createElementBlock("div",b,[e.createVNode(s.ssTable,{itemData:t.pageData,allowOperate:!1,allowSelect:!1,onOnButtonClick:c},null,8,["itemData"])]))}}),f=u._export_sfc(d,[["__scopeId","data-v-3d3b471d"]]);exports.default=f;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),T=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),N=require("./index.vue_vue_type_style_index_1_lang-C6Wqwl0x.cjs"),F=require("vue-router"),g=require("./index-1z9RrjZc.cjs"),H=require("./index-Dd-UIjhs.cjs"),W={},z={class:"left-wrap"},ee={class:"left-bg"};function te(C,S){return e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("div",ee,[e.renderSlot(C.$slots,"img",{},void 0,!0)])])}const ae=T._export_sfc(W,[["render",te],["__scopeId","data-v-9b7ee6c9"]]),ne={class:"right-wrap"},oe={class:"right-title"},se={class:"right-content"},re={class:"tab-content"},ce={class:"tab-tips"},le=e.defineComponent({__name:"index",props:{tabList:{type:Array,default:[]},loading:{type:Boolean,default:!1}},emits:["clickLogin","handleTabClick"],setup(C,{emit:S}){const _=e.ref("account"),l=S,b=()=>{l("clickLogin",_.value)},v=()=>{l("handleTabClick",_.value)};return(p,m)=>{const f=e.resolveComponent("el-button"),h=e.resolveComponent("el-tab-pane"),A=e.resolveComponent("el-tabs");return e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("div",oe,[e.renderSlot(p.$slots,"title",{},void 0,!0)]),e.createElementVNode("div",se,[e.createVNode(A,{modelValue:_.value,"onUpdate:modelValue":m[0]||(m[0]=w=>_.value=w),class:"right-tabs",onTabClick:v},{default:e.withCtx(()=>[e.createVNode(h,{name:"account"},{label:e.withCtx(()=>[e.renderSlot(p.$slots,"tabLabel2",{},void 0,!0)]),default:e.withCtx(()=>[e.createElementVNode("div",re,[e.renderSlot(p.$slots,"tabContent2",{},void 0,!0)]),e.createElementVNode("div",{class:"tab-button special",onClick:b},[e.createVNode(f,{loading:C.loading},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"tabButton2",{},void 0,!0)]),_:3},8,["loading"])]),e.createElementVNode("div",ce,[e.renderSlot(p.$slots,"tabTips2",{},void 0,!0)])]),_:3})]),_:3},8,["modelValue"])])])}}}),ie=T._export_sfc(le,[["__scopeId","data-v-3ebcb6e2"]]),de={class:"account-wrap"},ue=e.defineComponent({__name:"index",props:{activeTabName:{type:String,default:""},isClickLogin:{type:Boolean,default:!1}},emits:["handleLoginFormChange"],setup(C,{emit:S}){const _=C,l=e.reactive({account:"",password:""}),b=e.reactive({account:[{required:!0,message:"请输入账号",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]}),v=e.ref(null),p=S;return e.watch(()=>_.isClickLogin,m=>{var f;m&&((f=v.value)==null||f.validate(h=>{var A;for(let w in l)l.hasOwnProperty(w)&&(l[w]=(A=l[w])==null?void 0:A.trim());p("handleLoginFormChange",h,h?l:null)}))},{immediate:!0}),e.watch(()=>_.activeTabName,m=>{var f;m&&((f=v.value)==null||f.resetFields())}),(m,f)=>{const h=e.resolveComponent("svg-icon"),A=e.resolveComponent("el-input"),w=e.resolveComponent("el-form-item"),B=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",de,[e.createVNode(B,{model:l,rules:b,ref_key:"formRef",ref:v},{default:e.withCtx(()=>[e.createVNode(w,{label:"",prop:"account"},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:l.account,"onUpdate:modelValue":f[0]||(f[0]=k=>l.account=k),placeholder:"请输入账号",clearable:""},{prefix:e.withCtx(()=>[e.createVNode(h,{name:"account",style:{width:"15px",height:"15px"}})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(w,{label:"",prop:"password"},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:l.password,"onUpdate:modelValue":f[1]||(f[1]=k=>l.password=k),type:"password",placeholder:"请输入密码","show-password":"",clearable:""},{prefix:e.withCtx(()=>[e.createVNode(h,{name:"password",style:{width:"15px",height:"15px"}})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])])}}}),pe=T._export_sfc(ue,[["__scopeId","data-v-702adefe"]]),fe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAAAAXNSR0IArs4c6QAAAd9JREFUWEftl71OAkEQx/97QC8XEj+iiTGexo/OnvgE0ChPIIXHQwgP4amxsYZGnkCtpbAxxiyJFEqCJie1yK7ZixhUuNtZYkLUa2/+M7+ZnbnbYTB87P3bIpi1BWCt34UEzpkUF35huWjimpmIlCbp8TMGbA7RX/uus27i2xjI9rgMC+i7jpFvI5EC+XEg2+NlSKTBMKmTuS5QlB2ApgRqz66TVXGDCmmIPhh7RxGl0bXrT15pWNLjVQZkdBuwF0i3qaPAv8StMNvjDwBmdIGQwJyfd+51xn7i4GbekvE7bd8SLQUUOi3fnElR0v3GvEPvaQOpHiIDKe9SlIQlTtq7K41BwexjPosXsQNmkWCCpjYCoqRMtP0HiirY76uQBWQRS1xalhCvnW4aQDmqCmHvR6rQsB/oKIMyClDOd53KoGxTHs8IoGpSKWOgeCI29ZhfaA0EOmpMi26n+beBAIzXkanjGLemDlpkrMbepGmjNMZTFuXY9D0dSF09wE7bhaWrsKD2IV+FgNrNtilwVKCK7zo5SgDqJY0EFJPMeSos1ilAKa++ISBruhoSUNi3Z1hA2+PqyLR/uPRLvm6qJnbqkk9dg0ziEDQV8qJIcE42DRbFnkp3lSZHiRZ8WqXfAFwe+He0YFLSAAAAAElFTkSuQmCC",ye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAx1JREFUWEfFV01oE1EQnnmpYJRGL/6gYsGLVCoUzMGLNrO1B4sYKooXQT0JWtSK4KEHEVERPCjUHgqCQlFED4raUmP3bS0UhRQKnrTorQdFBBOkBZP97AuJbNo0+2KF7GlJ3sz3zcw3M2+Z6vxwnfHJmkAqlVrT0NCwB8BepdQuAOuJaEMxgK/M/M33/UlmfpvL5cY7Ojp+2gQXSiCdTq/IZrNniOg0gM1WTplniKi/sbHxbjwe/13NpioBrXUcwB0iarUBrnBmipnPiUh6KfslCXiet9/3/af/CFxmppQ6nEgkhiv5qkhAa90N4Ob/AC/5YOZLItK30OciAlrrAwAe24Iz8yul1A0imgPQ5ft+75LpZj4qIi+D/5cRMILLZDJejTXvcRxnwDgdGxtrzufzS9abiKZisVgiKMwyAlrr8wCu2UZvzjHzgIj0mHet9fH59uyvqnrmXhG5/bc0pZehoaFYNBpN27ZaoLY/mPk1EeUAmDnRFEJgZnZ2Nt7Z2ZkpBFA6rLXeB+B5LdEXM/ARwPZa7Jg5KSJvygi4rnuFiC7aOlJKPSCiR4lEYrw4L0aIaKWl/S3HcS6XEfA8b9T3/d2WDoxORhzHmQxk0JSv2cZeKfVunnj7whJ8ALDNwkFBpMy8Q0SOBQhMA9hkYW9sv4jIzoUEvgFYbeHAEOgFcKK9vf1JUf0tAN5b2BaOMPMvETHLrEyEtgQKTmKx2NpSP7uue4GIri6XgG0JTARDInIkkP5hs6ZrILC4BLWIkJlPicigAZyYmIjOzc19twU35yqKsJY2zGazG5PJZNY4c103SUQPayFARIvb0HYQMfOoiBwMpL8PwEkiMkPMkAl9Kg4i21HMzGdF5F4JxfO8TwA+Axg33RGGzsyVR3GxnUKXETM3iUih5lrrFiK6T0TdRPQCwCoLApWXkTG0WceRSKS1ra1tugSUSqWa5397RkRbwsBD13ExqqoXEqXUYD6fvx6JRLYCOEREXQDWWYCb9q1+IQkIq35XsoC46ncpDWSiftfyEom6fpgEhVW3TzMbdS/nTOi34XKc29j+AXyzojCfNKqJAAAAAElFTkSuQmCC",ge={class:"card-wrap"},me={class:"card-icon card"},Ae={class:"card-input"},he={class:"card-icon info"},be=e.defineComponent({__name:"index",props:{activeTabName:{type:String,default:""}},emits:["handleCardInput"],setup(C,{emit:S}){const _=C,l=e.ref(""),b=S,v=p=>{b("handleCardInput",p==null?void 0:p.trim())};return e.watch(()=>_.activeTabName,p=>{p&&(l.value="")}),(p,m)=>{const f=e.resolveComponent("el-image"),h=e.resolveComponent("el-input");return e.openBlock(),e.createElementBlock("div",ge,[e.createElementVNode("div",me,[e.createVNode(f,{src:e.unref(fe),fit:"contain"},null,8,["src"])]),e.createElementVNode("div",Ae,[e.createVNode(h,{modelValue:l.value,"onUpdate:modelValue":m[0]||(m[0]=A=>l.value=A),onChange:v,clearable:""},null,8,["modelValue"])]),e.createElementVNode("div",he,[e.createVNode(f,{src:e.unref(ye),fit:"contain"},null,8,["src"])])])}}}),ve=T._export_sfc(be,[["__scopeId","data-v-cd989d3c"]]);function _e(){const C={account:"superadmin",password:"1c8e7623312244c1feb677732278fb8b2af6af1a5335fdaebbdb2720137b372b7871292d11165b83b2967b9c39fa37027d63d37a2f36d764257b566dcfa99f334faa8995301601aec549adf39aef8d89c8788da03a9164937a5f73af20a15ea60d47c7cf01cf",tenantId:-1,code:"",codeId:0};return g.service({url:"/api/sysAuth/login",method:"post",data:C})}const Ce={class:"login-wrap"},we={class:"login-body"},Ee={class:"login-body-item left"},Ne={class:"title"},Se={class:"login-body-item right"},Ie=e.defineComponent({__name:"index",emits:["change"],setup(C,{emit:S}){const _=F.useRouter(),l=g.useLoginState(g.pinia),{systemKey:b,systemInfo:v,loginUserInfo:p}=g.storeToRefs(l),m=e.ref({sysCTitle:"",sysETitle:"",loginTitle:"账户密码登录",tabs:[{name:"刷卡登录",btnLabel:"请刷卡登录",tips:"温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"},{name:"用户名登录",btnLabel:"登录",tips:"温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"}]}),f=e.ref(""),h=e.ref(!1),A=e.ref(!1),w=()=>{h.value=!0},B=a=>{h.value=!1,D(a)},k=(a,n)=>{h.value=!1,a&&D(n)},M=a=>N.getFirstArrayProperty(a),P=a=>{let n;const o=N.convertArrayToTree(a),s=N.addPathToTree(o),i=N.getLeafNodesRecursive(s),u=N.groupByField(i,"parentPath");return n=N.handleRowAuthorityRender(u),n},Q=(a,n)=>{var s,i,u;const o=(n==null?void 0:n.userRoles)??(n==null?void 0:n.角色名称);try{if(n.layer&&((s=n==null?void 0:n.layer)==null?void 0:s.toUpperCase())==="SUPERADMIN")return"superAdmin";if(Array.isArray(o)){if((o==null?void 0:o.length)===1){const r=a==null?void 0:a.find(t=>(t==null?void 0:t.roleName)===(o==null?void 0:o[0])||t.角色名称===(o==null?void 0:o[0])),y=M(r),c=P(r==null?void 0:r[y]);return r&&c&&Array.isArray(c)?r?c==null?void 0:c.flatMap(t=>t.checkedButtons):[]:[]}if((o==null?void 0:o.length)>1){let r=a==null?void 0:a.filter(t=>o==null?void 0:o.includes(t.roleName||(t==null?void 0:t.角色名称)));const y=M(r==null?void 0:r[0]),c=(u=(i=r==null?void 0:r.map(t=>Array.isArray(t==null?void 0:t[y])?t==null?void 0:t[y]:[]))==null?void 0:i.flat())==null?void 0:u.flatMap(t=>t.checkedButtons);return(c==null?void 0:c.length)===0?g.ElMessage.error("该用户没有权限,请联系管理员"):new Set(c)}}if(typeof o=="string"){const r=a==null?void 0:a.find(t=>(t==null?void 0:t.roleName)===o||(t==null?void 0:t.角色名称)===o),y=M(r),c=P(r==null?void 0:r[y]);return r&&c&&Array.isArray(c)?r?c==null?void 0:c.flatMap(t=>t.checkedButtons):[]:[]}}catch(r){throw new Error(r)}},q=async a=>{var n,o;try{let s=[];const i=await g.getInsofDataApi({key:{systemKey:b.value?b.value:a==null?void 0:a.systemKey,pageKey:"系统管理/角色管理",type:"data"}});if(i.data.code===200){const u=(o=(n=i.data)==null?void 0:n.result)==null?void 0:o.map(r=>r.value.tableData);s=Q(u,a)}if(s)return Array.isArray(s)?Array.from(s):s;throw g.ElMessage.error("获取用户权限失败,请联系管理员"),new Error("获取用户权限失败,请联系管理员")}catch(s){throw g.ElMessage.error("获取用户权限失败,请联系管理员"),new Error(s)}},O=async a=>{var n,o,s,i,u,r,y;try{let c=[],t,I,x;b.value?x={pageKey:"系统管理/用户管理",type:"data",systemKey:b.value}:x={pageKey:"系统管理/用户管理",type:"data"};const R=await g.getInsofDataApi({key:x});let K;if(!sessionStorage.getItem("systemKey")||sessionStorage.getItem("systemKey")===""?K=await g.getInsofDataApi({key:{layer:"superAdmin"}}):K=await g.getInsofDataApi({key:{layer:"superAdmin",systemKey:sessionStorage.getItem("systemKey")}}),R.data.code===200&&K.data.code===200){const j=(o=(n=K.data)==null?void 0:n.result)==null?void 0:o.map(d=>{var E,V;return{...d.value.tableData,layer:(E=d.key)==null?void 0:E.layer,systemKey:(V=d==null?void 0:d.key)==null?void 0:V.systemKey,id:d.id}}),$=(i=(s=R.data)==null?void 0:s.result)==null?void 0:i.map(d=>{var E,V;return{...d.value.tableData,layer:(E=d.key)==null?void 0:E.layer,systemKey:(V=d==null?void 0:d.key)==null?void 0:V.systemKey,id:d.id}}),U=[...j,...$];if(t=U==null?void 0:U.find(d=>(d==null?void 0:d.account)===(a==null?void 0:a.account)||(d==null?void 0:d.账号)===(a==null?void 0:a.account)),t){if(((u=t.layer)==null?void 0:u.toUpperCase())!=="SUPERADMIN"&&(!(t!=null&&t.状态)||(t==null?void 0:t.状态)==="禁用"||(t==null?void 0:t.status)==="禁用")){g.ElMessage.error("该用户已被禁用,请联系管理员"),A.value=!1;return}c=await q(t);const{privateKey:d}=await l.getModelSecretAsync(t);let E;if(t.password?E=((r=t.layer)==null?void 0:r.toUpperCase())==="SUPERADMIN"?t.password:N.decryptData(t.password,d):E=((y=t.layer)==null?void 0:y.toUpperCase())==="SUPERADMIN"?t.password:N.resetPassword,(a==null?void 0:a.password)===E)I=t;else throw I=null,g.ElMessage.error("输入的密码错误,请重新输入"),A.value=!1,new Error("输入的密码错误,请重新输入")}else return g.ElMessage.error("该用户不存在,请重新输入")}return I&&c?{matchedUser:I,userAuthority:c}:void 0}catch(c){throw new Error(c)}},J=async a=>{var o,s,i;const n=await O(a);if(n!=null&&n.matchedUser){l.setLoginUserInfo(n.matchedUser),sessionStorage.setItem("authority",JSON.stringify(n.userAuthority));const u=((s=(o=n.matchedUser)==null?void 0:o.layer)==null?void 0:s.toUpperCase())==="SUPERADMIN";return sessionStorage.setItem("isSuperAdmin",JSON.stringify(u)),sessionStorage.setItem("systemKey",b.value?b.value:(i=n.matchedUser)==null?void 0:i.systemKey),await X(n.matchedUser),!0}else throw A.value=!1,new Error("该用户数据处理失败,请联系管理员")},X=async a=>{var o,s,i,u,r,y,c,t,I;const n=await g.getInsofDataApi({key:{layer:"superAdmin",systemKey:b.value?b.value:a==null?void 0:a.systemKey}});if(n.data.code===200&&(o=n.data)!=null&&o.result&&Array.isArray((s=n.data)==null?void 0:s.result)&&((u=(i=n.data)==null?void 0:i.result)==null?void 0:u.length)>0){const x=(I=(t=(c=(y=(r=n.data)==null?void 0:r.result)==null?void 0:y[0])==null?void 0:c.value)==null?void 0:t.tableData)==null?void 0:I.account;l.setSuperAdminInfo({account:x})}},G=async()=>{var a,n,o;try{const s=await _e();return((a=s==null?void 0:s.data)==null?void 0:a.code)===200?(sessionStorage.setItem("loginToken",(o=(n=s.data)==null?void 0:n.result)==null?void 0:o.accessToken),!0):!1}catch(s){g.ElMessage.error(s)}},Z=async()=>{var a,n,o;try{const s=await g.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});return((a=s==null?void 0:s.data)==null?void 0:a.code)===200?(sessionStorage.setItem("magicToken",(o=(n=s.data)==null?void 0:n.result)==null?void 0:o.accessToken),!0):!1}catch(s){g.ElMessage.error(s)}},D=async a=>{var i,u,r,y;A.value=!0;let n=[J(a),G(),Z()];const o=await Promise.all(n);(o==null?void 0:o.every(c=>c))&&(await H.verifyStructureDataToStore(),_.push("/"),l.setLogRecordAsync({type:"登录",data:{account:((i=p.value)==null?void 0:i.account)??((u=p.value)==null?void 0:u.账号),userName:((r=p.value)==null?void 0:r.姓名)||((y=p.value)==null?void 0:y.userName)||"未知"}},"/login","login"))},Y=a=>{f.value=a,h.value=!1,A.value=!1},L=a=>/^[\u4e00-\u9fa5\s,。!?《》“”【】]+$/.test(a);return(a,n)=>(e.openBlock(),e.createElementBlock("div",Ce,[e.createElementVNode("div",we,[e.createElementVNode("div",Ee,[e.createVNode(ae,{class:"login-left-bg"},{img:e.withCtx(()=>{var o,s,i,u,r,y;return[e.createElementVNode("div",Ne,[e.createElementVNode("div",null,e.toDisplayString((o=e.unref(v))!=null&&o.EnglishName&&L((s=e.unref(v))==null?void 0:s.EnglishName)?(i=e.unref(v))==null?void 0:i.EnglishName:"ISIP"),1),e.createElementVNode("div",null,e.toDisplayString((u=e.unref(v))!=null&&u.chineseName&&L((r=e.unref(v))==null?void 0:r.chineseName)?(y=e.unref(v))==null?void 0:y.chineseName:"集约化监造监督信息化平台"),1)]),n[0]||(n[0]=e.createElementVNode("div",{class:"divide-line"},null,-1))]}),_:1})]),e.createElementVNode("div",Se,[e.createVNode(ie,{loading:A.value,onClickLogin:w,onHandleTabClick:Y},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value.loginTitle),1)]),tabLabel1:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value.tabs[0].name),1)]),tabContent1:e.withCtx(()=>[e.createVNode(ve,{activeTabName:f.value,onHandleCardInput:B},null,8,["activeTabName"])]),tabButton1:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value.tabs[0].btnLabel),1)]),tabLabel2:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value.tabs[1].name),1)]),tabContent2:e.withCtx(()=>[e.createVNode(pe,{activeTabName:f.value,isClickLogin:h.value,onHandleLoginFormChange:k},null,8,["activeTabName","isClickLogin"])]),tabButton2:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value.tabs[1].btnLabel),1)]),_:1},8,["loading"])])])]))}}),ke=T._export_sfc(Ie,[["__scopeId","data-v-fd51939c"]]);exports.default=ke;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),T=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),N=require("./index.vue_vue_type_style_index_1_lang-C6Wqwl0x.cjs"),W=require("vue-router"),g=require("./index-1z9RrjZc.cjs"),$=require("./index-Dd-UIjhs.cjs"),H={},z={class:"left-wrap"},ee={class:"left-bg"};function te(C,S){return e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("div",ee,[e.renderSlot(C.$slots,"img",{},void 0,!0)])])}const ae=T._export_sfc(H,[["render",te],["__scopeId","data-v-9b7ee6c9"]]),ne={class:"right-wrap"},oe={class:"right-title"},se={class:"right-content"},re={class:"tab-content"},ce={class:"tab-tips"},le=e.defineComponent({__name:"index",props:{tabList:{type:Array,default:[]},loading:{type:Boolean,default:!1}},emits:["clickLogin","handleTabClick"],setup(C,{emit:S}){const _=e.ref("account"),l=S,b=()=>{l("clickLogin",_.value)},v=()=>{l("handleTabClick",_.value)};return(p,m)=>{const f=e.resolveComponent("el-button"),h=e.resolveComponent("el-tab-pane"),A=e.resolveComponent("el-tabs");return e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("div",oe,[e.renderSlot(p.$slots,"title",{},void 0,!0)]),e.createElementVNode("div",se,[e.createVNode(A,{modelValue:_.value,"onUpdate:modelValue":m[0]||(m[0]=w=>_.value=w),class:"right-tabs",onTabClick:v},{default:e.withCtx(()=>[e.createVNode(h,{name:"account"},{label:e.withCtx(()=>[e.renderSlot(p.$slots,"tabLabel2",{},void 0,!0)]),default:e.withCtx(()=>[e.createElementVNode("div",re,[e.renderSlot(p.$slots,"tabContent2",{},void 0,!0)]),e.createElementVNode("div",{class:"tab-button special",onClick:b},[e.createVNode(f,{loading:C.loading},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"tabButton2",{},void 0,!0)]),_:3},8,["loading"])]),e.createElementVNode("div",ce,[e.renderSlot(p.$slots,"tabTips2",{},void 0,!0)])]),_:3})]),_:3},8,["modelValue"])])])}}}),ie=T._export_sfc(le,[["__scopeId","data-v-3ebcb6e2"]]),de={class:"account-wrap"},ue=e.defineComponent({__name:"index",props:{activeTabName:{type:String,default:""},isClickLogin:{type:Boolean,default:!1}},emits:["handleLoginFormChange"],setup(C,{emit:S}){const _=C,l=e.reactive({account:"",password:""}),b=e.reactive({account:[{required:!0,message:"请输入账号",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]}),v=e.ref(null),p=S;return e.watch(()=>_.isClickLogin,m=>{var f;m&&((f=v.value)==null||f.validate(h=>{var A;for(let w in l)l.hasOwnProperty(w)&&(l[w]=(A=l[w])==null?void 0:A.trim());p("handleLoginFormChange",h,h?l:null)}))},{immediate:!0}),e.watch(()=>_.activeTabName,m=>{var f;m&&((f=v.value)==null||f.resetFields())}),(m,f)=>{const h=e.resolveComponent("svg-icon"),A=e.resolveComponent("el-input"),w=e.resolveComponent("el-form-item"),B=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",de,[e.createVNode(B,{model:l,rules:b,ref_key:"formRef",ref:v},{default:e.withCtx(()=>[e.createVNode(w,{label:"",prop:"account"},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:l.account,"onUpdate:modelValue":f[0]||(f[0]=I=>l.account=I),placeholder:"请输入账号",clearable:""},{prefix:e.withCtx(()=>[e.createVNode(h,{name:"account",style:{width:"15px",height:"15px"}})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(w,{label:"",prop:"password"},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:l.password,"onUpdate:modelValue":f[1]||(f[1]=I=>l.password=I),type:"password",placeholder:"请输入密码","show-password":"",clearable:""},{prefix:e.withCtx(()=>[e.createVNode(h,{name:"password",style:{width:"15px",height:"15px"}})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])])}}}),pe=T._export_sfc(ue,[["__scopeId","data-v-702adefe"]]),fe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAAAAXNSR0IArs4c6QAAAd9JREFUWEftl71OAkEQx/97QC8XEj+iiTGexo/OnvgE0ChPIIXHQwgP4amxsYZGnkCtpbAxxiyJFEqCJie1yK7ZixhUuNtZYkLUa2/+M7+ZnbnbYTB87P3bIpi1BWCt34UEzpkUF35huWjimpmIlCbp8TMGbA7RX/uus27i2xjI9rgMC+i7jpFvI5EC+XEg2+NlSKTBMKmTuS5QlB2ApgRqz66TVXGDCmmIPhh7RxGl0bXrT15pWNLjVQZkdBuwF0i3qaPAv8StMNvjDwBmdIGQwJyfd+51xn7i4GbekvE7bd8SLQUUOi3fnElR0v3GvEPvaQOpHiIDKe9SlIQlTtq7K41BwexjPosXsQNmkWCCpjYCoqRMtP0HiirY76uQBWQRS1xalhCvnW4aQDmqCmHvR6rQsB/oKIMyClDOd53KoGxTHs8IoGpSKWOgeCI29ZhfaA0EOmpMi26n+beBAIzXkanjGLemDlpkrMbepGmjNMZTFuXY9D0dSF09wE7bhaWrsKD2IV+FgNrNtilwVKCK7zo5SgDqJY0EFJPMeSos1ilAKa++ISBruhoSUNi3Z1hA2+PqyLR/uPRLvm6qJnbqkk9dg0ziEDQV8qJIcE42DRbFnkp3lSZHiRZ8WqXfAFwe+He0YFLSAAAAAElFTkSuQmCC",ye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAx1JREFUWEfFV01oE1EQnnmpYJRGL/6gYsGLVCoUzMGLNrO1B4sYKooXQT0JWtSK4KEHEVERPCjUHgqCQlFED4raUmP3bS0UhRQKnrTorQdFBBOkBZP97AuJbNo0+2KF7GlJ3sz3zcw3M2+Z6vxwnfHJmkAqlVrT0NCwB8BepdQuAOuJaEMxgK/M/M33/UlmfpvL5cY7Ojp+2gQXSiCdTq/IZrNniOg0gM1WTplniKi/sbHxbjwe/13NpioBrXUcwB0iarUBrnBmipnPiUh6KfslCXiet9/3/af/CFxmppQ6nEgkhiv5qkhAa90N4Ob/AC/5YOZLItK30OciAlrrAwAe24Iz8yul1A0imgPQ5ft+75LpZj4qIi+D/5cRMILLZDJejTXvcRxnwDgdGxtrzufzS9abiKZisVgiKMwyAlrr8wCu2UZvzjHzgIj0mHet9fH59uyvqnrmXhG5/bc0pZehoaFYNBpN27ZaoLY/mPk1EeUAmDnRFEJgZnZ2Nt7Z2ZkpBFA6rLXeB+B5LdEXM/ARwPZa7Jg5KSJvygi4rnuFiC7aOlJKPSCiR4lEYrw4L0aIaKWl/S3HcS6XEfA8b9T3/d2WDoxORhzHmQxk0JSv2cZeKfVunnj7whJ8ALDNwkFBpMy8Q0SOBQhMA9hkYW9sv4jIzoUEvgFYbeHAEOgFcKK9vf1JUf0tAN5b2BaOMPMvETHLrEyEtgQKTmKx2NpSP7uue4GIri6XgG0JTARDInIkkP5hs6ZrILC4BLWIkJlPicigAZyYmIjOzc19twU35yqKsJY2zGazG5PJZNY4c103SUQPayFARIvb0HYQMfOoiBwMpL8PwEkiMkPMkAl9Kg4i21HMzGdF5F4JxfO8TwA+Axg33RGGzsyVR3GxnUKXETM3iUih5lrrFiK6T0TdRPQCwCoLApWXkTG0WceRSKS1ra1tugSUSqWa5397RkRbwsBD13ExqqoXEqXUYD6fvx6JRLYCOEREXQDWWYCb9q1+IQkIq35XsoC46ncpDWSiftfyEom6fpgEhVW3TzMbdS/nTOi34XKc29j+AXyzojCfNKqJAAAAAElFTkSuQmCC",ge={class:"card-wrap"},me={class:"card-icon card"},Ae={class:"card-input"},he={class:"card-icon info"},be=e.defineComponent({__name:"index",props:{activeTabName:{type:String,default:""}},emits:["handleCardInput"],setup(C,{emit:S}){const _=C,l=e.ref(""),b=S,v=p=>{b("handleCardInput",p==null?void 0:p.trim())};return e.watch(()=>_.activeTabName,p=>{p&&(l.value="")}),(p,m)=>{const f=e.resolveComponent("el-image"),h=e.resolveComponent("el-input");return e.openBlock(),e.createElementBlock("div",ge,[e.createElementVNode("div",me,[e.createVNode(f,{src:e.unref(fe),fit:"contain"},null,8,["src"])]),e.createElementVNode("div",Ae,[e.createVNode(h,{modelValue:l.value,"onUpdate:modelValue":m[0]||(m[0]=A=>l.value=A),onChange:v,clearable:""},null,8,["modelValue"])]),e.createElementVNode("div",he,[e.createVNode(f,{src:e.unref(ye),fit:"contain"},null,8,["src"])])])}}}),ve=T._export_sfc(be,[["__scopeId","data-v-cd989d3c"]]);function _e(){const C={account:"superadmin",password:"1c8e7623312244c1feb677732278fb8b2af6af1a5335fdaebbdb2720137b372b7871292d11165b83b2967b9c39fa37027d63d37a2f36d764257b566dcfa99f334faa8995301601aec549adf39aef8d89c8788da03a9164937a5f73af20a15ea60d47c7cf01cf",tenantId:-1,code:"",codeId:0};return g.service({url:"/api/sysAuth/login",method:"post",data:C})}const Ce={class:"login-wrap"},we={class:"login-body"},Ee={class:"login-body-item left"},Ne={class:"title"},Se={class:"login-body-item right"},ke=e.defineComponent({__name:"index",emits:["change"],setup(C,{emit:S}){const _=W.useRouter(),l=g.useLoginState(g.pinia),{systemKey:b,systemInfo:v,loginUserInfo:p}=g.storeToRefs(l),m=e.ref({sysCTitle:"",sysETitle:"",loginTitle:"账户密码登录",tabs:[{name:"刷卡登录",btnLabel:"请刷卡登录",tips:"温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"},{name:"用户名登录",btnLabel:"登录",tips:"温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"}]}),f=e.ref(""),h=e.ref(!1),A=e.ref(!1),w=()=>{h.value=!0},B=a=>{h.value=!1,L(a)},I=(a,n)=>{h.value=!1,a&&L(n)},M=a=>N.getFirstArrayProperty(a),D=a=>{let n;const o=N.convertArrayToTree(a),s=N.addPathToTree(o),i=N.getLeafNodesRecursive(s),u=N.groupByField(i,"parentPath");return n=N.handleRowAuthorityRender(u),n},Q=(a,n)=>{var s,i,u;const o=(n==null?void 0:n.userRoles)??(n==null?void 0:n.角色名称);try{if(n.layer&&((s=n==null?void 0:n.layer)==null?void 0:s.toUpperCase())==="SUPERADMIN")return"superAdmin";if(Array.isArray(o)){if((o==null?void 0:o.length)===1){const r=a==null?void 0:a.find(t=>(t==null?void 0:t.roleName)===(o==null?void 0:o[0])||t.角色名称===(o==null?void 0:o[0])),y=M(r),c=D(r==null?void 0:r[y]);return r&&c&&Array.isArray(c)?r?c==null?void 0:c.flatMap(t=>t.checkedButtons):[]:[]}if((o==null?void 0:o.length)>1){let r=a==null?void 0:a.filter(t=>o==null?void 0:o.includes(t.roleName||(t==null?void 0:t.角色名称)));const y=M(r==null?void 0:r[0]),c=(u=(i=r==null?void 0:r.map(t=>Array.isArray(t==null?void 0:t[y])?t==null?void 0:t[y]:[]))==null?void 0:i.flat())==null?void 0:u.flatMap(t=>t.checkedButtons);return(c==null?void 0:c.length)===0?g.ElMessage.error("该用户没有权限,请联系管理员"):new Set(c)}}if(typeof o=="string"){const r=a==null?void 0:a.find(t=>(t==null?void 0:t.roleName)===o||(t==null?void 0:t.角色名称)===o),y=M(r),c=D(r==null?void 0:r[y]);return r&&c&&Array.isArray(c)?r?c==null?void 0:c.flatMap(t=>t.checkedButtons):[]:[]}}catch(r){throw new Error(r)}},q=async a=>{var n,o;try{let s=[];const i=await g.getInsofDataApi({key:{systemKey:b.value?b.value:a==null?void 0:a.systemKey,pageKey:"系统管理/角色管理",type:"data"}});if(i.data.code===200){const u=(o=(n=i.data)==null?void 0:n.result)==null?void 0:o.map(r=>r.value.tableData);s=Q(u,a)}if(s)return Array.isArray(s)?Array.from(s):s;throw g.ElMessage.error("获取用户权限失败,请联系管理员"),new Error("获取用户权限失败,请联系管理员")}catch(s){throw g.ElMessage.error("获取用户权限失败,请联系管理员"),new Error(s)}},O=async a=>{var n,o,s,i,u,r,y;try{let c=[],t,k,x;b.value?x={pageKey:"系统管理/用户管理",type:"data",systemKey:b.value}:x={pageKey:"系统管理/用户管理",type:"data"};const R=await g.getInsofDataApi({key:x});let K;if(!sessionStorage.getItem("systemKey")||sessionStorage.getItem("systemKey")===""?K=await g.getInsofDataApi({key:{layer:"superAdmin"}}):K=await g.getInsofDataApi({key:{layer:"superAdmin",systemKey:sessionStorage.getItem("systemKey")}}),R.data.code===200&&K.data.code===200){const j=(o=(n=K.data)==null?void 0:n.result)==null?void 0:o.map(d=>{var E,V;return{...d.value.tableData,layer:(E=d.key)==null?void 0:E.layer,systemKey:(V=d==null?void 0:d.key)==null?void 0:V.systemKey,id:d.id}}),F=(i=(s=R.data)==null?void 0:s.result)==null?void 0:i.map(d=>{var E,V;return{...d.value.tableData,layer:(E=d.key)==null?void 0:E.layer,systemKey:(V=d==null?void 0:d.key)==null?void 0:V.systemKey,id:d.id}}),U=[...j,...F];if(t=U==null?void 0:U.find(d=>(d==null?void 0:d.account)===(a==null?void 0:a.account)||(d==null?void 0:d.账号)===(a==null?void 0:a.account)),t){if(((u=t.layer)==null?void 0:u.toUpperCase())!=="SUPERADMIN"&&(!(t!=null&&t.状态)||(t==null?void 0:t.状态)==="禁用"||(t==null?void 0:t.status)==="禁用")){g.ElMessage.error("该用户已被禁用,请联系管理员"),A.value=!1;return}c=await q(t);const{privateKey:d}=await l.getModelSecretAsync(t);let E;if(t.password?E=((r=t.layer)==null?void 0:r.toUpperCase())==="SUPERADMIN"?t.password:N.decryptData(t.password,d):E=((y=t.layer)==null?void 0:y.toUpperCase())==="SUPERADMIN"?t.password:N.resetPassword,(a==null?void 0:a.password)===E)k=t;else throw k=null,g.ElMessage.error("输入的密码错误,请重新输入"),A.value=!1,new Error("输入的密码错误,请重新输入")}else return g.ElMessage.error("该用户不存在,请重新输入")}return k&&c?{matchedUser:k,userAuthority:c}:void 0}catch(c){throw new Error(c)}},J=async a=>{var o,s,i;const n=await O(a);if(n!=null&&n.matchedUser){l.setLoginUserInfo(n.matchedUser),sessionStorage.setItem("authority",JSON.stringify(n.userAuthority));const u=((s=(o=n.matchedUser)==null?void 0:o.layer)==null?void 0:s.toUpperCase())==="SUPERADMIN";return sessionStorage.setItem("isSuperAdmin",JSON.stringify(u)),sessionStorage.setItem("systemKey",b.value?b.value:(i=n.matchedUser)==null?void 0:i.systemKey),await X(n.matchedUser),!0}else throw A.value=!1,new Error("该用户数据处理失败,请联系管理员")},X=async a=>{var o,s,i,u,r,y,c,t,k;const n=await g.getInsofDataApi({key:{layer:"superAdmin",systemKey:b.value?b.value:a==null?void 0:a.systemKey}});if(n.data.code===200&&(o=n.data)!=null&&o.result&&Array.isArray((s=n.data)==null?void 0:s.result)&&((u=(i=n.data)==null?void 0:i.result)==null?void 0:u.length)>0){const x=(k=(t=(c=(y=(r=n.data)==null?void 0:r.result)==null?void 0:y[0])==null?void 0:c.value)==null?void 0:t.tableData)==null?void 0:k.account;l.setSuperAdminInfo({account:x})}},G=async()=>{var a,n,o;try{const s=await _e();return((a=s==null?void 0:s.data)==null?void 0:a.code)===200?(sessionStorage.setItem("loginToken",(o=(n=s.data)==null?void 0:n.result)==null?void 0:o.accessToken),!0):!1}catch(s){g.ElMessage.error(s)}},Z=async()=>{var a,n,o;try{const s=await g.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});return((a=s==null?void 0:s.data)==null?void 0:a.code)===200?(sessionStorage.setItem("magicToken",(o=(n=s.data)==null?void 0:n.result)==null?void 0:o.accessToken),!0):!1}catch(s){g.ElMessage.error(s)}},L=async a=>{var i,u,r,y;A.value=!0;let n=[J(a),G(),Z()];const o=await Promise.all(n);(o==null?void 0:o.every(c=>c))&&(await $.verifyStructureDataToStore(),_.push("/"),l.setLogRecordAsync({type:"登录",data:{account:((i=p.value)==null?void 0:i.account)??((u=p.value)==null?void 0:u.账号),userName:((r=p.value)==null?void 0:r.姓名)||((y=p.value)==null?void 0:y.userName)||"未知"}},"/login","login"))},Y=a=>{f.value=a,h.value=!1,A.value=!1},P=a=>/^[\u4e00-\u9fa5\s,。!?《》“”【】]+$/.test(a);return(a,n)=>(e.openBlock(),e.createElementBlock("div",Ce,[e.createElementVNode("div",we,[e.createElementVNode("div",Ee,[e.createVNode(ae,{class:"login-left-bg"},{img:e.withCtx(()=>{var o,s,i,u,r,y;return[e.createElementVNode("div",Ne,[e.createElementVNode("div",null,e.toDisplayString((o=e.unref(v))!=null&&o.EnglishName&&P((s=e.unref(v))==null?void 0:s.EnglishName)?(i=e.unref(v))==null?void 0:i.EnglishName:"INSOFWORKS"),1),e.createElementVNode("div",null,e.toDisplayString((u=e.unref(v))!=null&&u.chineseName&&P((r=e.unref(v))==null?void 0:r.chineseName)?(y=e.unref(v))==null?void 0:y.chineseName:"工业软件集成开发平台"),1)]),n[0]||(n[0]=e.createElementVNode("div",{class:"divide-line"},null,-1))]}),_:1})]),e.createElementVNode("div",Se,[e.createVNode(ie,{loading:A.value,onClickLogin:w,onHandleTabClick:Y},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value.loginTitle),1)]),tabLabel1:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value.tabs[0].name),1)]),tabContent1:e.withCtx(()=>[e.createVNode(ve,{activeTabName:f.value,onHandleCardInput:B},null,8,["activeTabName"])]),tabButton1:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value.tabs[0].btnLabel),1)]),tabLabel2:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value.tabs[1].name),1)]),tabContent2:e.withCtx(()=>[e.createVNode(pe,{activeTabName:f.value,isClickLogin:h.value,onHandleLoginFormChange:I},null,8,["activeTabName","isClickLogin"])]),tabButton2:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value.tabs[1].btnLabel),1)]),_:1},8,["loading"])])])]))}}),Ie=T._export_sfc(ke,[["__scopeId","data-v-4f653334"]]);exports.default=Ie;
@@ -1 +1 @@
1
- "use strict";const g=require("vue"),O=require("./index.vue_vue_type_style_index_1_lang-C6Wqwl0x.cjs"),i=require("./index-1z9RrjZc.cjs"),pe=require("./index-Bai_C75w.cjs"),A=O.useModelComp(i.pinia),m=pe.useUnit(i.pinia),I=O.useMenuState(i.pinia),{menus:ee,configMenu:B,activeMenuPath:q,cacheStructures:E}=i.storeToRefs(I),j=g.ref(!1),te=g.computed(()=>{var e,t;return[{key:"extraButton",contents:[]},{key:"rowButton",contents:[{label:"修改"}]},{key:"header",contents:[{label:"菜单名称",prop:"title",isFormColHidden:!1},{label:"菜单类型",prop:"menuType",formType:"select",options:[{label:"系统菜单",value:"集团"},{label:"公司",value:"公司"}],isTableColHidden:!1,isFormColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:(t=(e=i.cloneDeep(ee.value))==null?void 0:e.map(l=>({...l,menuType:"系统菜单"})))==null?void 0:t.filter(l=>l.title!=="系统管理"&&l.title!=="平台管理")}]}),$=g.ref([]),H=g.ref([{label:"新建"}]),fe=g.computed(()=>[{key:"extraButton",contents:H.value},{key:"rowButton",contents:[{label:"修改"},{label:"删除"}]},{key:"header",contents:[{label:"操作类型",prop:"operateType",formType:"select",options:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标",prop:"operateIcon",formType:"inputPopover",value:""},{label:"操作触发事件",prop:"trigger",formType:"select",options:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"配置一:",prop:"dialogConfig",formType:"button",value:"弹窗内容",isTableColHidden:!0},{label:"配置二:",prop:"contentConfig",formType:"button",value:"模块内容",isTableColHidden:!0},{label:"继承配置:",prop:"allowInherit",formType:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1,isTableColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:$.value}]),J=g.ref([]),k=g.ref({}),de=g.ref({}),_=g.ref([{label:"菜单",prop:"path",isFormColHidden:!0,value:""},{label:"操作类型:",prop:"operateType",type:"select",contents:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标:",prop:"operateIcon",type:"inputPopover",value:""},{label:"操作触发事件:",prop:"trigger",type:"select",contents:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"生成的菜单图标:",prop:"menuIcon",type:"inputPopover",value:""},{label:"配置一:",prop:"dialogConfig",type:"button",value:"操作触发的弹窗结构"},{label:"配置二:",prop:"contentConfig",type:"button",value:"操作生成的模块结构",isFormColHidden:!1},{label:"",prop:"structureIds",type:"input",value:[],isFormColHidden:!0},{label:"继承配置:",prop:"allowInherit",type:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),R=e=>{var t;J.value=e?(t=_.value)==null?void 0:t.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l:{...l,value:e?e[l==null?void 0:l.prop]:""}):_.value},ie=g.ref([{label:"查询"},{label:"重置"}]),ge=async()=>{},le=e=>e.map(t=>t.childMenus&&t.childMenus.length>0?{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title,children:le(t.childMenus)}:{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title}),v=g.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),U=g.ref([]),C=g.ref({}),h=g.ref(null),ae=g.ref([]),oe=g.computed(()=>{var e;return(e=le(ee.value))==null?void 0:e.filter(t=>t.title!=="系统管理"&&t.title!=="平台管理")}),ne=async e=>{var l,u,n,c;const t=await i.getInsofDataApi({key:{type:"subStructure",systemKey:sessionStorage.getItem("systemKey"),pageKey:e,version:1}});if(((l=t==null?void 0:t.data)==null?void 0:l.code)===200&&(u=t.data)!=null&&u.result){const r=(c=(n=t.data)==null?void 0:n.result)==null?void 0:c.map(p=>{var f;return{id:p==null?void 0:p.id,...(f=p==null?void 0:p.value)==null?void 0:f.pageData}});ae.value=r,I.setCacheStructures({key:"contentConfig",data:r})}},ve=async e=>{var t;j.value=!0,h.value={...e,rootNode:i.findRootNodeByPath(oe.value,e.path)},I.setCacheStructures(null),(e==null?void 0:e.level)===0?H.value.splice(0):(H.value=[{label:"新建"}],U.value=(t=e==null?void 0:e.path)==null?void 0:t.split("/")),await I.setConfigMenu(null),await ne(e==null?void 0:e.path),await F(e)},ye=e=>{switch(e){case"新建":return"create";case"修改":return"update";case"删除":return"delete"}},be=async(e,t)=>{var l,u;if(!h.value)return i.ElMessage.warning("请先选择菜单");if(v.type=ye(e),U.value=[],A.setSubmitCurStructure(!1),m.setSelectTitle([]),C.value=i.cloneDeep(t),v.type!=="delete"){switch(v.type){case"create":R(null),await I.setConfigMenu(null);break;case"update":R(C.value),await I.setConfigMenu(C.value),console.log("clickRowButton",C.value);break}await g.nextTick(),v.title=`【${v.type==="create"?(l=h.value)==null?void 0:l.path:(u=C.value)==null?void 0:u.path}】菜单配置${e}`,v.show=!0}else await re(C.value,v.type)},ue=g.ref(!0),he=async e=>{var t;k.value=e,await I.setConfigMenu({...k.value,path:(t=h.value)==null?void 0:t.path}),ue.value=(e==null?void 0:e.operateType)!=="新增"};g.watch(()=>ue.value,async e=>{var t;await g.nextTick(),J.value=(t=_.value)==null?void 0:t.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l.prop==="contentConfig"?{...l,isFormColHidden:e}:l:{...l,value:k.value?k.value[l==null?void 0:l.prop]:""})},{immediate:!0,deep:!0});const Ce=g.ref(null),Ie=async(e,t)=>{var r,p,f,s,b;if(v.type==="create"){const a=(p=(r=E.value)==null?void 0:r.filter(d=>(d==null?void 0:d.key)===t))==null?void 0:p.flatMap(d=>d==null?void 0:d.data);A.setItemData(a),I.setCacheStructures({key:t,data:a})}if(console.log("getTriggerStructures1",e==null?void 0:e.structureIds,t),!(e!=null&&e.structureIds)||((f=e==null?void 0:e.structureIds)==null?void 0:f.length)===0)return;const l=(b=(s=e==null?void 0:e.structureIds)==null?void 0:s.filter(a=>(a==null?void 0:a.key)===t))==null?void 0:b.map(a=>a==null?void 0:a.id);let u=l==null?void 0:l.map(a=>{if(a)return i.getInsofDataApi({id:a})});const n=await Promise.all(u),c=n==null?void 0:n.every(a=>{var d;return((d=a==null?void 0:a.data)==null?void 0:d.code)===200});if(console.log("getTriggerStructures2",e==null?void 0:e.structureIds,t,n),c&&(n==null?void 0:n.length)>0){const a=n==null?void 0:n.map(d=>{var T,M,w,N,P,o,K;return{id:(w=(M=(T=d==null?void 0:d.data)==null?void 0:T.result)==null?void 0:M[0])==null?void 0:w.id,...(K=(o=(P=(N=d==null?void 0:d.data)==null?void 0:N.result)==null?void 0:P[0])==null?void 0:o.value)==null?void 0:K.pageData}});A.setItemData(a),I.setCacheStructures({key:t,data:a})}},ke=async e=>{var n,c,r,p,f;const t=e==="操作触发的弹窗结构"?"dialogConfig":"contentConfig";I.setButtonTriggerType(t),await Ie(C.value,t);let l;(n=k.value)!=null&&n.subMenus&&((c=k.value)==null?void 0:c.subMenus.length)>0&&(l=(r=U.value)==null?void 0:r.map(s=>({value:s})),l.unshift({value:(p=C.value)==null?void 0:p.title}));let u;v.type==="create"?u={...k.value,path:(f=h.value)==null?void 0:f.path}:v.type==="update"&&(u=B.value),await I.setConfigMenu(u),m.setSelectTitle(l),A.setIsEdit("edit")},F=async e=>{var l,u,n,c,r,p;const t=await i.getInsofDataApi({key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:q.value+"/"+(e==null?void 0:e.path),tableId:""}});((l=t==null?void 0:t.data)==null?void 0:l.code)===200&&(u=t.data)!=null&&u.result&&($.value=((c=(n=t.data)==null?void 0:n.result)==null?void 0:c.length)>0?(p=(r=t.data)==null?void 0:r.result)==null?void 0:p.map(f=>{var s;return{id:f==null?void 0:f.id,...(s=f==null?void 0:f.value)==null?void 0:s.tableData}}):[]),j.value=!1},x=async(e,t,l="contentConfig")=>{var u,n,c,r,p,f;try{let s,b;t==="create"?(s={key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:q.value+"/"+((u=h.value)==null?void 0:u.path),type:"structure",rootNodePath:(c=(n=h.value)==null?void 0:n.rootNode)==null?void 0:c.path,structureBelong:l,parentTable:"",version:1},value:{pageData:e}},b=i.createInsofDataApi):t==="update"?(s={id:e==null?void 0:e.id,value:{pageData:e}},b=i.updateInsofDataApi):t==="delete"&&(s={id:e},b=i.deleteInsofDataApi);const a=await b(s);if(((r=a==null?void 0:a.data)==null?void 0:r.code)!==200)throw i.ElMessage.error("保存响应失败"),new Error("保存响应失败");const d=t==="create"?(p=a==null?void 0:a.data)==null?void 0:p.result:e==null?void 0:e.id;return{status:((f=a==null?void 0:a.data)==null?void 0:f.code)===200,data:{id:d,key:l}}}catch{i.ElMessage.error("保存响应失败")}},Y=(e,t)=>{var f,s,b;const l=(f=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:f.map(a=>a==null?void 0:a.id),u=t.filter(a=>!(l!=null&&l.includes(a))),n=l==null?void 0:l.filter(a=>!t.includes(a));let c=null,r=null,p=null;return c=[...u,...n].filter(a=>a),r=(s=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:s.filter(a=>!(a!=null&&a.id)),p=(b=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:b.filter(a=>a==null?void 0:a.id).filter(a=>Object.keys(a).length>1),{deleteIds:c,createComps:r,updateComps:p}},Z=(e,t)=>{var u,n,c,r,p,f;let l=[];return((u=t==null?void 0:t.deleteIds)==null?void 0:u.length)>0&&((n=t==null?void 0:t.deleteIds)==null||n.forEach(s=>{l.push(x(s,"delete",e))})),((c=t==null?void 0:t.createComps)==null?void 0:c.length)>0&&((r=t==null?void 0:t.createComps)==null||r.forEach(s=>{l.push(x(s,"create",e))})),((p=t==null?void 0:t.updateComps)==null?void 0:p.length)>0&&((f=t==null?void 0:t.updateComps)==null||f.forEach(s=>{s!=null&&s.id&&l.push(x(s,"update",e))})),l},Te=e=>{const t=new Map;return e.forEach(l=>{t.set(l.id,l)}),Array.from(t.values())},Me=async(e,t)=>{var l,u,n,c,r,p,f;try{const s=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="contentConfig"),b=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="dialogConfig");await g.nextTick();const a=(n=(u=(l=E.value)==null?void 0:l.filter(o=>(o==null?void 0:o.key)==="dialogConfig"))==null?void 0:u.flatMap(o=>o==null?void 0:o.data))==null?void 0:n.map(o=>o==null?void 0:o.id);let d=(p=(r=(c=E.value)==null?void 0:c.filter(o=>(o==null?void 0:o.key)==="contentConfig"))==null?void 0:r.flatMap(o=>o==null?void 0:o.data))==null?void 0:p.map(o=>o==null?void 0:o.id);d=[...d,...(f=ae.value)==null?void 0:f.map(o=>o==null?void 0:o.id)];const T=Y(b,a),M=Y(s,d),w=Z("dialogConfig",T),N=Z("contentConfig",M),P=[...w,...N];await Promise.all(P).then(o=>{var z,G,L,V,Q,W,X;if(!(o==null?void 0:o.every(y=>y.status)))return;let S=(z=o==null?void 0:o.flatMap(y=>y==null?void 0:y.data))==null?void 0:z.filter(y=>(y==null?void 0:y.id)!==null&&(y==null?void 0:y.id)!==void 0);if(((G=T==null?void 0:T.updateComps)==null?void 0:G.length)===0&&v.type==="update"){const y=(V=(L=C.value)==null?void 0:L.structureIds)==null?void 0:V.filter(D=>(D==null?void 0:D.key)==="dialogConfig");S=[...S,...y]}if(((Q=M==null?void 0:M.updateComps)==null?void 0:Q.length)===0&&v.type==="update"){const y=(X=(W=C.value)==null?void 0:W.structureIds)==null?void 0:X.filter(D=>(D==null?void 0:D.key)==="contentConfig");S=[...S,...y]}const ce=Te(S);re({...t,isNotInitial:!0,structureIds:ce},v.type)}).catch(o=>{i.ElMessage.error(o)})}catch(s){throw i.ElMessage.error(s),new Error(s)}},re=async(e,t)=>{var n,c;let l,u;t==="create"?(l={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:q.value+"/"+((n=h.value)==null?void 0:n.path),tableId:"",rootNodePath:e==null?void 0:e.rootNodePath},value:{tableData:e}},u=i.createInsofDataApi):t==="update"?(l={id:e==null?void 0:e.id,value:{tableData:e}},u=i.updateInsofDataApi):t==="delete"&&(l={ids:[e.id,...(c=e==null?void 0:e.structureIds)==null?void 0:c.map(r=>r.id)]},u=i.batchDeleteInsofDataApi),O.handleSubmitAsync(u,l,t).then(r=>{t==="create"&&$.value.push({...e,id:r}),t&&r&&i.ElMessage.success("响应成功"),F(h.value)})},De=async()=>{var l,u,n,c,r;const e=JSON.parse(i.cloneDeep(JSON.stringify(E.value)));await g.nextTick();const t=v.type==="create"?{...B.value,rootNodePath:(u=(l=h.value)==null?void 0:l.rootNode)==null?void 0:u.path}:{...B.value,rootNodePath:(c=(n=h.value)==null?void 0:n.rootNode)==null?void 0:c.path,id:(r=C.value)==null?void 0:r.id};await Me(e,t),k.value={},v.show=!1,await F(h.value)},Se=()=>{v.show=!1},se={comp:"Group",name:"/平台管理/菜单管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:te.value,name:""}]}]},we=Object.freeze(Object.defineProperty({__proto__:null,beforeDialogDestroy:Se,buttonValue:ie,changeTrigger:he,changedRow:de,clickNodeTrigger:ve,clickRowButton:be,clickSubmitForm:De,clickTrigger:ke,dialogInfo:v,formatFormData:R,getInitialSubStructure:ne,getTableDataAsync:F,handleItemDataChange:ge,inputForm:k,menuPageData:fe,operatingForm:Ce,pageData:te,renderFormData:J,tableLoading:j,tempMenuPageData:se,treeData:oe},Symbol.toStringTag,{value:"Module"}));exports.State=we;exports.tempMenuPageData=se;
1
+ "use strict";const g=require("vue"),O=require("./index.vue_vue_type_style_index_1_lang-C6Wqwl0x.cjs"),i=require("./index-1z9RrjZc.cjs"),pe=require("./index-CyzKYBU1.cjs"),A=O.useModelComp(i.pinia),m=pe.useUnit(i.pinia),I=O.useMenuState(i.pinia),{menus:ee,configMenu:B,activeMenuPath:q,cacheStructures:E}=i.storeToRefs(I),j=g.ref(!1),te=g.computed(()=>{var e,t;return[{key:"extraButton",contents:[]},{key:"rowButton",contents:[{label:"修改"}]},{key:"header",contents:[{label:"菜单名称",prop:"title",isFormColHidden:!1},{label:"菜单类型",prop:"menuType",formType:"select",options:[{label:"系统菜单",value:"集团"},{label:"公司",value:"公司"}],isTableColHidden:!1,isFormColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:(t=(e=i.cloneDeep(ee.value))==null?void 0:e.map(l=>({...l,menuType:"系统菜单"})))==null?void 0:t.filter(l=>l.title!=="系统管理"&&l.title!=="平台管理")}]}),$=g.ref([]),H=g.ref([{label:"新建"}]),fe=g.computed(()=>[{key:"extraButton",contents:H.value},{key:"rowButton",contents:[{label:"修改"},{label:"删除"}]},{key:"header",contents:[{label:"操作类型",prop:"operateType",formType:"select",options:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标",prop:"operateIcon",formType:"inputPopover",value:""},{label:"操作触发事件",prop:"trigger",formType:"select",options:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"配置一:",prop:"dialogConfig",formType:"button",value:"弹窗内容",isTableColHidden:!0},{label:"配置二:",prop:"contentConfig",formType:"button",value:"模块内容",isTableColHidden:!0},{label:"继承配置:",prop:"allowInherit",formType:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1,isTableColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:$.value}]),J=g.ref([]),k=g.ref({}),de=g.ref({}),_=g.ref([{label:"菜单",prop:"path",isFormColHidden:!0,value:""},{label:"操作类型:",prop:"operateType",type:"select",contents:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标:",prop:"operateIcon",type:"inputPopover",value:""},{label:"操作触发事件:",prop:"trigger",type:"select",contents:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"生成的菜单图标:",prop:"menuIcon",type:"inputPopover",value:""},{label:"配置一:",prop:"dialogConfig",type:"button",value:"操作触发的弹窗结构"},{label:"配置二:",prop:"contentConfig",type:"button",value:"操作生成的模块结构",isFormColHidden:!1},{label:"",prop:"structureIds",type:"input",value:[],isFormColHidden:!0},{label:"继承配置:",prop:"allowInherit",type:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),R=e=>{var t;J.value=e?(t=_.value)==null?void 0:t.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l:{...l,value:e?e[l==null?void 0:l.prop]:""}):_.value},ie=g.ref([{label:"查询"},{label:"重置"}]),ge=async()=>{},le=e=>e.map(t=>t.childMenus&&t.childMenus.length>0?{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title,children:le(t.childMenus)}:{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title}),v=g.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),U=g.ref([]),C=g.ref({}),h=g.ref(null),ae=g.ref([]),oe=g.computed(()=>{var e;return(e=le(ee.value))==null?void 0:e.filter(t=>t.title!=="系统管理"&&t.title!=="平台管理")}),ne=async e=>{var l,u,n,c;const t=await i.getInsofDataApi({key:{type:"subStructure",systemKey:sessionStorage.getItem("systemKey"),pageKey:e,version:1}});if(((l=t==null?void 0:t.data)==null?void 0:l.code)===200&&(u=t.data)!=null&&u.result){const r=(c=(n=t.data)==null?void 0:n.result)==null?void 0:c.map(p=>{var f;return{id:p==null?void 0:p.id,...(f=p==null?void 0:p.value)==null?void 0:f.pageData}});ae.value=r,I.setCacheStructures({key:"contentConfig",data:r})}},ve=async e=>{var t;j.value=!0,h.value={...e,rootNode:i.findRootNodeByPath(oe.value,e.path)},I.setCacheStructures(null),(e==null?void 0:e.level)===0?H.value.splice(0):(H.value=[{label:"新建"}],U.value=(t=e==null?void 0:e.path)==null?void 0:t.split("/")),await I.setConfigMenu(null),await ne(e==null?void 0:e.path),await F(e)},ye=e=>{switch(e){case"新建":return"create";case"修改":return"update";case"删除":return"delete"}},be=async(e,t)=>{var l,u;if(!h.value)return i.ElMessage.warning("请先选择菜单");if(v.type=ye(e),U.value=[],A.setSubmitCurStructure(!1),m.setSelectTitle([]),C.value=i.cloneDeep(t),v.type!=="delete"){switch(v.type){case"create":R(null),await I.setConfigMenu(null);break;case"update":R(C.value),await I.setConfigMenu(C.value),console.log("clickRowButton",C.value);break}await g.nextTick(),v.title=`【${v.type==="create"?(l=h.value)==null?void 0:l.path:(u=C.value)==null?void 0:u.path}】菜单配置${e}`,v.show=!0}else await re(C.value,v.type)},ue=g.ref(!0),he=async e=>{var t;k.value=e,await I.setConfigMenu({...k.value,path:(t=h.value)==null?void 0:t.path}),ue.value=(e==null?void 0:e.operateType)!=="新增"};g.watch(()=>ue.value,async e=>{var t;await g.nextTick(),J.value=(t=_.value)==null?void 0:t.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l.prop==="contentConfig"?{...l,isFormColHidden:e}:l:{...l,value:k.value?k.value[l==null?void 0:l.prop]:""})},{immediate:!0,deep:!0});const Ce=g.ref(null),Ie=async(e,t)=>{var r,p,f,s,b;if(v.type==="create"){const a=(p=(r=E.value)==null?void 0:r.filter(d=>(d==null?void 0:d.key)===t))==null?void 0:p.flatMap(d=>d==null?void 0:d.data);A.setItemData(a),I.setCacheStructures({key:t,data:a})}if(console.log("getTriggerStructures1",e==null?void 0:e.structureIds,t),!(e!=null&&e.structureIds)||((f=e==null?void 0:e.structureIds)==null?void 0:f.length)===0)return;const l=(b=(s=e==null?void 0:e.structureIds)==null?void 0:s.filter(a=>(a==null?void 0:a.key)===t))==null?void 0:b.map(a=>a==null?void 0:a.id);let u=l==null?void 0:l.map(a=>{if(a)return i.getInsofDataApi({id:a})});const n=await Promise.all(u),c=n==null?void 0:n.every(a=>{var d;return((d=a==null?void 0:a.data)==null?void 0:d.code)===200});if(console.log("getTriggerStructures2",e==null?void 0:e.structureIds,t,n),c&&(n==null?void 0:n.length)>0){const a=n==null?void 0:n.map(d=>{var T,M,w,N,P,o,K;return{id:(w=(M=(T=d==null?void 0:d.data)==null?void 0:T.result)==null?void 0:M[0])==null?void 0:w.id,...(K=(o=(P=(N=d==null?void 0:d.data)==null?void 0:N.result)==null?void 0:P[0])==null?void 0:o.value)==null?void 0:K.pageData}});A.setItemData(a),I.setCacheStructures({key:t,data:a})}},ke=async e=>{var n,c,r,p,f;const t=e==="操作触发的弹窗结构"?"dialogConfig":"contentConfig";I.setButtonTriggerType(t),await Ie(C.value,t);let l;(n=k.value)!=null&&n.subMenus&&((c=k.value)==null?void 0:c.subMenus.length)>0&&(l=(r=U.value)==null?void 0:r.map(s=>({value:s})),l.unshift({value:(p=C.value)==null?void 0:p.title}));let u;v.type==="create"?u={...k.value,path:(f=h.value)==null?void 0:f.path}:v.type==="update"&&(u=B.value),await I.setConfigMenu(u),m.setSelectTitle(l),A.setIsEdit("edit")},F=async e=>{var l,u,n,c,r,p;const t=await i.getInsofDataApi({key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:q.value+"/"+(e==null?void 0:e.path),tableId:""}});((l=t==null?void 0:t.data)==null?void 0:l.code)===200&&(u=t.data)!=null&&u.result&&($.value=((c=(n=t.data)==null?void 0:n.result)==null?void 0:c.length)>0?(p=(r=t.data)==null?void 0:r.result)==null?void 0:p.map(f=>{var s;return{id:f==null?void 0:f.id,...(s=f==null?void 0:f.value)==null?void 0:s.tableData}}):[]),j.value=!1},x=async(e,t,l="contentConfig")=>{var u,n,c,r,p,f;try{let s,b;t==="create"?(s={key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:q.value+"/"+((u=h.value)==null?void 0:u.path),type:"structure",rootNodePath:(c=(n=h.value)==null?void 0:n.rootNode)==null?void 0:c.path,structureBelong:l,parentTable:"",version:1},value:{pageData:e}},b=i.createInsofDataApi):t==="update"?(s={id:e==null?void 0:e.id,value:{pageData:e}},b=i.updateInsofDataApi):t==="delete"&&(s={id:e},b=i.deleteInsofDataApi);const a=await b(s);if(((r=a==null?void 0:a.data)==null?void 0:r.code)!==200)throw i.ElMessage.error("保存响应失败"),new Error("保存响应失败");const d=t==="create"?(p=a==null?void 0:a.data)==null?void 0:p.result:e==null?void 0:e.id;return{status:((f=a==null?void 0:a.data)==null?void 0:f.code)===200,data:{id:d,key:l}}}catch{i.ElMessage.error("保存响应失败")}},Y=(e,t)=>{var f,s,b;const l=(f=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:f.map(a=>a==null?void 0:a.id),u=t.filter(a=>!(l!=null&&l.includes(a))),n=l==null?void 0:l.filter(a=>!t.includes(a));let c=null,r=null,p=null;return c=[...u,...n].filter(a=>a),r=(s=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:s.filter(a=>!(a!=null&&a.id)),p=(b=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:b.filter(a=>a==null?void 0:a.id).filter(a=>Object.keys(a).length>1),{deleteIds:c,createComps:r,updateComps:p}},Z=(e,t)=>{var u,n,c,r,p,f;let l=[];return((u=t==null?void 0:t.deleteIds)==null?void 0:u.length)>0&&((n=t==null?void 0:t.deleteIds)==null||n.forEach(s=>{l.push(x(s,"delete",e))})),((c=t==null?void 0:t.createComps)==null?void 0:c.length)>0&&((r=t==null?void 0:t.createComps)==null||r.forEach(s=>{l.push(x(s,"create",e))})),((p=t==null?void 0:t.updateComps)==null?void 0:p.length)>0&&((f=t==null?void 0:t.updateComps)==null||f.forEach(s=>{s!=null&&s.id&&l.push(x(s,"update",e))})),l},Te=e=>{const t=new Map;return e.forEach(l=>{t.set(l.id,l)}),Array.from(t.values())},Me=async(e,t)=>{var l,u,n,c,r,p,f;try{const s=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="contentConfig"),b=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="dialogConfig");await g.nextTick();const a=(n=(u=(l=E.value)==null?void 0:l.filter(o=>(o==null?void 0:o.key)==="dialogConfig"))==null?void 0:u.flatMap(o=>o==null?void 0:o.data))==null?void 0:n.map(o=>o==null?void 0:o.id);let d=(p=(r=(c=E.value)==null?void 0:c.filter(o=>(o==null?void 0:o.key)==="contentConfig"))==null?void 0:r.flatMap(o=>o==null?void 0:o.data))==null?void 0:p.map(o=>o==null?void 0:o.id);d=[...d,...(f=ae.value)==null?void 0:f.map(o=>o==null?void 0:o.id)];const T=Y(b,a),M=Y(s,d),w=Z("dialogConfig",T),N=Z("contentConfig",M),P=[...w,...N];await Promise.all(P).then(o=>{var z,G,L,V,Q,W,X;if(!(o==null?void 0:o.every(y=>y.status)))return;let S=(z=o==null?void 0:o.flatMap(y=>y==null?void 0:y.data))==null?void 0:z.filter(y=>(y==null?void 0:y.id)!==null&&(y==null?void 0:y.id)!==void 0);if(((G=T==null?void 0:T.updateComps)==null?void 0:G.length)===0&&v.type==="update"){const y=(V=(L=C.value)==null?void 0:L.structureIds)==null?void 0:V.filter(D=>(D==null?void 0:D.key)==="dialogConfig");S=[...S,...y]}if(((Q=M==null?void 0:M.updateComps)==null?void 0:Q.length)===0&&v.type==="update"){const y=(X=(W=C.value)==null?void 0:W.structureIds)==null?void 0:X.filter(D=>(D==null?void 0:D.key)==="contentConfig");S=[...S,...y]}const ce=Te(S);re({...t,isNotInitial:!0,structureIds:ce},v.type)}).catch(o=>{i.ElMessage.error(o)})}catch(s){throw i.ElMessage.error(s),new Error(s)}},re=async(e,t)=>{var n,c;let l,u;t==="create"?(l={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:q.value+"/"+((n=h.value)==null?void 0:n.path),tableId:"",rootNodePath:e==null?void 0:e.rootNodePath},value:{tableData:e}},u=i.createInsofDataApi):t==="update"?(l={id:e==null?void 0:e.id,value:{tableData:e}},u=i.updateInsofDataApi):t==="delete"&&(l={ids:[e.id,...(c=e==null?void 0:e.structureIds)==null?void 0:c.map(r=>r.id)]},u=i.batchDeleteInsofDataApi),O.handleSubmitAsync(u,l,t).then(r=>{t==="create"&&$.value.push({...e,id:r}),t&&r&&i.ElMessage.success("响应成功"),F(h.value)})},De=async()=>{var l,u,n,c,r;const e=JSON.parse(i.cloneDeep(JSON.stringify(E.value)));await g.nextTick();const t=v.type==="create"?{...B.value,rootNodePath:(u=(l=h.value)==null?void 0:l.rootNode)==null?void 0:u.path}:{...B.value,rootNodePath:(c=(n=h.value)==null?void 0:n.rootNode)==null?void 0:c.path,id:(r=C.value)==null?void 0:r.id};await Me(e,t),k.value={},v.show=!1,await F(h.value)},Se=()=>{v.show=!1},se={comp:"Group",name:"/平台管理/菜单管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:te.value,name:""}]}]},we=Object.freeze(Object.defineProperty({__proto__:null,beforeDialogDestroy:Se,buttonValue:ie,changeTrigger:he,changedRow:de,clickNodeTrigger:ve,clickRowButton:be,clickSubmitForm:De,clickTrigger:ke,dialogInfo:v,formatFormData:R,getInitialSubStructure:ne,getTableDataAsync:F,handleItemDataChange:ge,inputForm:k,menuPageData:fe,operatingForm:Ce,pageData:te,renderFormData:J,tableLoading:j,tempMenuPageData:se,treeData:oe},Symbol.toStringTag,{value:"Module"}));exports.State=we;exports.tempMenuPageData=se;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as n, reactive as o, onMounted as r, createElementBlock as s, openBlock as c, createVNode as m } from "vue";
2
- import { s as u } from "./index-C4p_XCBh.js";
2
+ import { s as u } from "./index-Dmj_XlRJ.js";
3
3
  import { S as i } from "./index-8GjQSOsl.js";
4
4
  import { u as p, aH as l } from "./index.vue_vue_type_style_index_1_lang-BO0ESRoA.js";
5
5
  import { s as d } from "./index-BQYjK74w.js";