ss-component-new 1.1.113 → 1.1.116

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 (87) hide show
  1. package/dist/array-DLX9HpUG.js +1956 -0
  2. package/dist/array-tWsmTH5r.cjs +7 -0
  3. package/dist/{cloneDeep-BfzU0pBe.js → cloneDeep-B2CowBmY.js} +42 -48
  4. package/dist/cloneDeep-Fj9bqNcO.cjs +1 -0
  5. package/dist/index-2BSH90QR.cjs +6 -0
  6. package/dist/{index-BTt24r3U.cjs → index-B2V71oy_.cjs} +1 -1
  7. package/dist/{index-DxyREQkR.js → index-B5nXV29K.js} +78 -76
  8. package/dist/index-B6bxf0h2.js +196 -0
  9. package/dist/{index-COPrDtid.js → index-BEAnS4I-.js} +1 -1
  10. package/dist/{index-CyQkKXnK.js → index-BGhy_ENi.js} +255 -187
  11. package/dist/index-BNf8v3E7.cjs +1 -0
  12. package/dist/index-BXJIxGj9.cjs +1 -0
  13. package/dist/index-BYNM1Eo-.js +432 -0
  14. package/dist/index-B_pYEWlS.cjs +6 -0
  15. package/dist/index-Bo8JGvd0.cjs +1 -0
  16. package/dist/index-BvvxVAFa.cjs +1 -0
  17. package/dist/index-C1qnTNzC.cjs +1 -0
  18. package/dist/index-C86gx6Ye.cjs +1 -0
  19. package/dist/{index-B4WYIlOz.cjs → index-CbuB7VDV.cjs} +1 -1
  20. package/dist/{index-B3iQoZwc.js → index-CdRgYGoU.js} +631 -625
  21. package/dist/{index-BpJeYb4X.js → index-CeJMZbXG.js} +1 -1
  22. package/dist/index-D0yDjxaf.cjs +1 -0
  23. package/dist/index-DCRZ9Y1m.js +199 -0
  24. package/dist/index-DD3Jbedk.cjs +1 -0
  25. package/dist/index-DH5pTE-1.js +304 -0
  26. package/dist/index-DQ8UtE2z.js +74 -0
  27. package/dist/index-DTs391JS.js +208 -0
  28. package/dist/{index-BMLnfdpX.js → index-DYee8R31.js} +4 -3
  29. package/dist/{index-BH3F6_ql.js → index-DdiwlYxv.js} +1025 -1121
  30. package/dist/{index-ChXKNVG8.cjs → index-DjHNYg39.cjs} +1 -1
  31. package/dist/{index-b_11tfuG.js → index-DmA5-mTS.js} +6 -6
  32. package/dist/{index-DLartnmY.js → index-M_Td6T9I.js} +1 -1
  33. package/dist/index-MpVy5A_K.cjs +1 -0
  34. package/dist/index-ULdYt3Gk.js +138 -0
  35. package/dist/index-Uak9xh_Z.cjs +1 -0
  36. package/dist/index-YlTnI4EI.cjs +1 -0
  37. package/dist/{index-CqJa9o1o.cjs → index-kHFiVhmA.cjs} +1 -1
  38. package/dist/{index-DWiZqfBA.js → index-vARVx4Lc.js} +4 -4
  39. package/dist/index.vue_vue_type_style_index_0_scoped_77dec451_lang-BKTdfLNp.cjs +1 -0
  40. package/dist/index.vue_vue_type_style_index_0_scoped_77dec451_lang-C2CUHQVo.js +7 -0
  41. package/dist/index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-DSLx4cvQ.js +235 -0
  42. package/dist/index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-DlqdNpcl.cjs +1 -0
  43. package/dist/login-CBjdvGjn.js +47 -0
  44. package/dist/login-CHZ1VF7_.cjs +1 -0
  45. package/dist/main-3fUagSVX.cjs +1 -0
  46. package/dist/{main-DAPxADXM.js → main-7GSU9TqI.js} +25 -24
  47. package/dist/menu-BnTNA2Lx.cjs +1 -0
  48. package/dist/menu-DxrO5JEn.js +34 -0
  49. package/dist/{modelComp-CHWFvhCq.js → modelComp-BsNooORx.js} +1 -1
  50. package/dist/modelComp-b_KDs0lh.cjs +1 -0
  51. package/dist/pinia-8zVC1cUT.cjs +11 -0
  52. package/dist/pinia-DB5lI5eD.js +4723 -0
  53. package/dist/{request-BK6KCyS9.js → request-3QszTjDN.js} +1 -1
  54. package/dist/{request-BrHEv9dn.cjs → request-SLgezlvU.cjs} +1 -1
  55. package/dist/ss-component.cjs +1 -1
  56. package/dist/ss-component.css +1 -1
  57. package/dist/ss-component.js +6 -6
  58. package/dist/ss-component2.cjs +1 -1
  59. package/dist/ss-component2.js +1 -1
  60. package/package.json +3 -3
  61. package/dist/array-BYRvPg11.cjs +0 -7
  62. package/dist/array-DyxKeexo.js +0 -1732
  63. package/dist/cloneDeep-WwDap0fL.cjs +0 -1
  64. package/dist/index-5dGTUAu_.cjs +0 -1
  65. package/dist/index-BIRKKGuW.cjs +0 -1
  66. package/dist/index-BUxzwz5l.cjs +0 -1
  67. package/dist/index-CBHJLZo4.cjs +0 -1
  68. package/dist/index-CVBCwf2F.cjs +0 -6
  69. package/dist/index-CbphQpiC.cjs +0 -1
  70. package/dist/index-CdEEK8I0.js +0 -408
  71. package/dist/index-CumtOgAw.cjs +0 -7
  72. package/dist/index-DVEWSdUo.cjs +0 -1
  73. package/dist/index-DmoecEm1.js +0 -205
  74. package/dist/index-DzJuDGl8.cjs +0 -1
  75. package/dist/index-EIbm0jBZ.js +0 -2707
  76. package/dist/index-EQOXj03f.cjs +0 -1
  77. package/dist/index-QWm4yJ7u.js +0 -135
  78. package/dist/index-smYHb1Ta.js +0 -456
  79. package/dist/index-uMboxmjq.cjs +0 -6
  80. package/dist/index.vue_vue_type_style_index_0_scoped_77dec451_lang-CF5e1L_i.cjs +0 -1
  81. package/dist/index.vue_vue_type_style_index_0_scoped_77dec451_lang-DrStz9iD.js +0 -2
  82. package/dist/index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-CgrtbAG0.cjs +0 -1
  83. package/dist/index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-CqiRIG3B.js +0 -192
  84. package/dist/main-DS-YP1Wn.cjs +0 -1
  85. package/dist/menu-BIINB-0Y.js +0 -1013
  86. package/dist/menu-B_Az9K_F.cjs +0 -11
  87. package/dist/modelComp-DY1RniW6.cjs +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const or=require("vue"),Ab=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ji=require("./cloneDeep-WwDap0fL.cjs");/*! *****************************************************************************
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const or=require("vue"),Ab=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ji=require("./cloneDeep-Fj9bqNcO.cjs");/*! *****************************************************************************
2
2
  Copyright (c) Microsoft Corporation.
3
3
 
4
4
  Permission to use, copy, modify, and/or distribute this software for any
@@ -1,11 +1,11 @@
1
1
  import { createElementBlock as r, openBlock as n, Fragment as k, renderList as y, unref as F, createElementVNode as c, createBlock as h, resolveDynamicComponent as $, toDisplayString as C, ref as I, watch as L, resolveComponent as b, createVNode as R, withCtx as g, createCommentVNode as T } from "vue";
2
- import { s as U, g as M } from "./array-DyxKeexo.js";
3
- import { p as V } from "./index-smYHb1Ta.js";
4
- import { E as j } from "./index-BH3F6_ql.js";
5
- import { u as w } from "./modelComp-CHWFvhCq.js";
6
- import { s as x } from "./menu-BIINB-0Y.js";
2
+ import { s as U, g as M } from "./array-DLX9HpUG.js";
3
+ import { p as V } from "./index-DCRZ9Y1m.js";
4
+ import { E as j } from "./index-DdiwlYxv.js";
5
+ import { u as w } from "./modelComp-BsNooORx.js";
6
+ import { s as x } from "./pinia-DB5lI5eD.js";
7
7
  import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
- import { c as v } from "./cloneDeep-BfzU0pBe.js";
8
+ import { c as v } from "./cloneDeep-B2CowBmY.js";
9
9
  const q = { class: "type-select" }, z = ["onClick"], A = { class: "list-icon" }, G = {
10
10
  __name: "index",
11
11
  setup(N) {
@@ -1,6 +1,6 @@
1
1
  import { ref as Sp, onMounted as Ab, watch as vL, onUnmounted as cL, createElementBlock as Mb, openBlock as Ib, createVNode as pL } from "vue";
2
2
  import { _ as Lb } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
- import { c as Ki } from "./cloneDeep-BfzU0pBe.js";
3
+ import { c as Ki } from "./cloneDeep-B2CowBmY.js";
4
4
  /*! *****************************************************************************
5
5
  Copyright (c) Microsoft Corporation.
6
6
 
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),h=require("./index-B_pYEWlS.cjs"),m=require("./index-DD3Jbedk.cjs"),C=require("./index-kHFiVhmA.cjs"),y=require("./index-Bo8JGvd0.cjs"),f=require("vue-router"),v=require("./modelComp-b_KDs0lh.cjs"),b=require("./pinia-8zVC1cUT.cjs"),_=require("./menu-BnTNA2Lx.cjs"),k=require("./cloneDeep-Fj9bqNcO.cjs"),q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S=o.ref([{label:"机构名称",value:"",name:"deptName"}]),x=a=>{console.log("handleQueryChange",a)},u=o.ref([{key:"extraButton",contents:[{label:"新增"}]},{key:"rowButton",contents:[{label:"编辑"},{label:"删除"}]},{key:"tableIndex",contents:[]},{key:"header",contents:[{label:"机构名称",prop:"deptName"},{label:"机构类型",prop:"deptType",formType:"Select",options:[{label:"集团",value:"集团"},{label:"公司",value:"公司"},{label:"部门",value:"部门"},{label:"区域",value:"区域"},{label:"组",value:"组"}]},{label:"机构状态",formType:"Radio",prop:"deptStatus",options:[{label:"启用",value:"启用"},{label:"禁用",value:"禁用"}]},{label:"操作"}]},{key:"tableContents",contents:[]}]),w=a=>{var e;u.value=(e=u.value)==null?void 0:e.map(n=>n.key==="tableContents"?{...n,contents:a.content}:n),console.log("handleItemDataChange",a),y.submitTableAsyncByVerify(a.singleContent,a.buttonName)},I=a=>{console.log("onDoubleClick",a)},T=(a,e)=>{console.log("onButtonClick",a,e)},A=async a=>{const e=await y.handleSubmitAsync(C.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:a}}),n=e==null?void 0:e.map(t=>{var l;return{id:t.id,rowData:(l=t==null?void 0:t.value)==null?void 0:l.rowData}});return console.log("tempRes",n),n==null?void 0:n.map(t=>{var l;if(Array.isArray(t==null?void 0:t.rowData)){let r={id:t.id};return(l=t==null?void 0:t.rowData)==null||l.forEach((p,s)=>{r[`a${s}`]=p}),r}else return{...t.rowData,id:t.id}})},B=Object.freeze(Object.defineProperty({__proto__:null,getPageDataAsync:A,handleItemDataChange:w,handleQueryChange:x,onButtonClick:T,onDoubleClick:I,pageData:u,queryFormData:S},Symbol.toStringTag,{value:"Module"})),M={class:"role-wrapper"},P=o.defineComponent({__name:"index",setup(a){const e=o.reactive({...B}),n=f.useRoute(),t=v.useModelComp(),{itemData:l}=b.storeToRefs(t),r=_.useMenuState(),{menus:p,activeMenuPath:s}=b.storeToRefs(r);return o.onMounted(()=>{const d=k.cloneDeep(l.value),i={comp:"Group",name:n.path,pageData:e.pageData};t.setItemData([...d,i]),s.value&&e.getPageDataAsync(s.value).then(D=>{var g;e.pageData=(g=e.pageData)==null?void 0:g.map(c=>c.key==="tableContents"?{...c,contents:D}:c),console.log(111,e.pageData)})}),(d,i)=>(o.openBlock(),o.createElementBlock("div",M,[o.createVNode(h.ssForm,{class:"role-header",rowContents:e.queryFormData,isEnableWrap:!1,isEdit:!0,onChange:e.handleQueryChange},null,8,["rowContents","onChange"]),o.createVNode(m.ssTable,{class:"role-body",itemData:e.pageData,onChange:e.handleItemDataChange},null,8,["itemData","onChange"])]))}}),N=q._export_sfc(P,[["__scopeId","data-v-14a14a71"]]);exports.default=N;
@@ -0,0 +1,138 @@
1
+ import { defineComponent as R, reactive as M, onMounted as N, watch as T, resolveComponent as s, createElementBlock as k, openBlock as m, Fragment as D, createElementVNode as u, createVNode as n, withCtx as a, toDisplayString as p, renderList as A, createBlock as E, createTextVNode as g } from "vue";
2
+ import { s as F } from "./index-CdRgYGoU.js";
3
+ import { s as I } from "./index-BYNM1Eo-.js";
4
+ import { S as b } from "./index-DH5pTE-1.js";
5
+ import { u as P } from "./menu-DxrO5JEn.js";
6
+ import { s as y } from "./pinia-DB5lI5eD.js";
7
+ import { u as U } from "./modelComp-BsNooORx.js";
8
+ import { useRoute as O } from "vue-router";
9
+ import { c as v } from "./cloneDeep-B2CowBmY.js";
10
+ import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
+ const G = { class: "role-wrapper" }, L = { class: "role-dialog-header" }, Q = { class: "node-text" }, W = { class: "dialog-footer" }, j = /* @__PURE__ */ R({
12
+ __name: "index",
13
+ setup(H) {
14
+ const x = P(), { menus: w, activeMenuPath: _ } = y(x), e = M({ ...b }), { treeRef: B } = b, C = U(), { itemData: V } = y(C), z = O();
15
+ return N(() => {
16
+ console.log("state", e);
17
+ const l = v(V.value), t = {
18
+ comp: "Group",
19
+ name: z.path,
20
+ pageData: e.pageData
21
+ };
22
+ C.setItemData([...l, t]), _.value && e.getPageDataAsync(_.value).then((d) => {
23
+ var c;
24
+ e.pageData = (c = e.pageData) == null ? void 0 : c.map((r) => r.key === "tableContents" ? {
25
+ ...r,
26
+ contents: d
27
+ } : r), console.log(111, e.pageData);
28
+ });
29
+ }), T(() => w.value, (l) => {
30
+ const t = v(l);
31
+ e.menuData = e.addButtonsToTree(t, ["查询", "新增", "编辑", "删除"]), console.log("menus123", e.menuData, l);
32
+ }, {
33
+ immediate: !0,
34
+ deep: !0
35
+ }), (l, t) => {
36
+ const d = s("el-checkbox"), c = s("el-checkbox-group"), r = s("el-tree"), f = s("el-button"), S = s("el-dialog");
37
+ return m(), k(D, null, [
38
+ u("div", G, [
39
+ n(F, {
40
+ class: "role-header",
41
+ rowContents: e.queryFormData,
42
+ isEnableWrap: !0,
43
+ isEdit: !0,
44
+ onChange: e.handleQueryChange
45
+ }, null, 8, ["rowContents", "onChange"]),
46
+ n(I, {
47
+ class: "role-body",
48
+ itemData: e.pageDataFiltered,
49
+ changedContent: e.changedRow,
50
+ onChange: e.handleItemDataChange,
51
+ onContentChange: e.handleContentChange,
52
+ onOnButtonClick: e.clickRowButton
53
+ }, null, 8, ["itemData", "changedContent", "onChange", "onContentChange", "onOnButtonClick"])
54
+ ]),
55
+ n(S, {
56
+ modelValue: e.authorizeDialog.show,
57
+ "onUpdate:modelValue": t[0] || (t[0] = (h) => e.authorizeDialog.show = h),
58
+ width: e.authorizeDialog.width,
59
+ draggable: e.authorizeDialog.draggable,
60
+ "before-close": e.closeAuthorizeDialog,
61
+ class: "role-dialog"
62
+ }, {
63
+ header: a(() => [
64
+ u("div", L, p(e.authorizeDialog.title), 1)
65
+ ]),
66
+ footer: a(() => [
67
+ u("div", W, [
68
+ n(f, {
69
+ onClick: e.closeAuthorizeDialog
70
+ }, {
71
+ default: a(() => t[1] || (t[1] = [
72
+ g("取消")
73
+ ])),
74
+ _: 1,
75
+ __: [1]
76
+ }, 8, ["onClick"]),
77
+ n(f, {
78
+ type: "primary",
79
+ onClick: e.clickSubmitAuthority
80
+ }, {
81
+ default: a(() => t[2] || (t[2] = [
82
+ g(" 确认 ")
83
+ ])),
84
+ _: 1,
85
+ __: [2]
86
+ }, 8, ["onClick"])
87
+ ])
88
+ ]),
89
+ default: a(() => [
90
+ n(r, {
91
+ class: "role-tree",
92
+ ref_key: "treeRef",
93
+ ref: B,
94
+ data: e.menuData,
95
+ "node-key": "path",
96
+ props: { children: "children", label: "title", path: "path" },
97
+ "check-strictly": "",
98
+ "highlight-current": "",
99
+ "default-expand-all": "",
100
+ style: { height: "500px", "overflow-y": "auto" },
101
+ "check-on-click-leaf": !1,
102
+ onCheckChange: e.handleNodeCheckChange
103
+ }, {
104
+ default: a(({ node: h, data: i }) => [
105
+ u("span", Q, p(h.label), 1),
106
+ n(c, {
107
+ modelValue: i.checkedButtons,
108
+ "onUpdate:modelValue": (o) => i.checkedButtons = o,
109
+ onChange: (o) => e.handleNodeBtnChange(o, i),
110
+ class: "node-buttons"
111
+ }, {
112
+ default: a(() => [
113
+ (m(!0), k(D, null, A(i.renderButtons, (o) => (m(), E(d, {
114
+ key: o.title,
115
+ label: o.title,
116
+ value: o.path
117
+ }, {
118
+ default: a(() => [
119
+ g(p(o.title), 1)
120
+ ]),
121
+ _: 2
122
+ }, 1032, ["label", "value"]))), 128))
123
+ ]),
124
+ _: 2
125
+ }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])
126
+ ]),
127
+ _: 1
128
+ }, 8, ["data", "onCheckChange"])
129
+ ]),
130
+ _: 1
131
+ }, 8, ["modelValue", "width", "draggable", "before-close"])
132
+ ], 64);
133
+ };
134
+ }
135
+ }), ne = /* @__PURE__ */ q(j, [["__scopeId", "data-v-e63356d7"]]);
136
+ export {
137
+ ne as default
138
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),b=require("./index-B_pYEWlS.cjs"),q=require("./index-DD3Jbedk.cjs"),y=require("./index-Bo8JGvd0.cjs"),D=require("./pinia-8zVC1cUT.cjs"),P=require("./modelComp-b_KDs0lh.cjs"),x=require("vue-router"),k=require("./menu-BnTNA2Lx.cjs"),N=require("./cloneDeep-Fj9bqNcO.cjs"),S=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),B={class:"role-wrapper"},M=a.defineComponent({__name:"index",setup(I){const h=k.useMenuState(),{activeMenuPath:c}=D.storeToRefs(h),l=P.useModelComp(),{itemData:_}=D.storeToRefs(l),C=x.useRoute(),e=a.reactive({...y.State});return a.onMounted(()=>{const u=N.cloneDeep(_.value),i={comp:"Group",name:C.path,pageData:e.pageData};if(l.setItemData([...u,i]),c.value){e.getPageDataAsync(c.value).then(n=>{var s;e.pageData=(s=e.pageData)==null?void 0:s.map(o=>o.key==="tableContents"?{...o,contents:n}:o)});const f=e.getPageDataAsync("/role"),v=e.getPageDataAsync("/dept");Promise.all([f,v]).then(n=>{var p,d,m;console.log(888,n);const s=(p=n==null?void 0:n[0])==null?void 0:p.map(t=>({label:t.roleName,value:t.roleName})),o=(d=n==null?void 0:n[1])==null?void 0:d.map(t=>({label:t.deptName,value:t.deptName}));e.pageData=(m=e.pageData)==null?void 0:m.map(t=>{var g;return t.key==="header"?{...t,contents:(g=t.contents)==null?void 0:g.map(r=>r.label==="所属机构"?{...r,options:o}:r.label==="角色"?{...r,options:s}:r)}:t})})}}),(u,i)=>(a.openBlock(),a.createElementBlock("div",B,[a.createVNode(b.ssForm,{class:"role-header",rowContents:e.queryFormData,isEnableWrap:!1,isEdit:!0,onChange:e.handleQueryChange},null,8,["rowContents","onChange"]),a.createVNode(q.ssTable,{class:"role-body",itemData:e.pageData,onChange:e.handleItemDataChange,onOnButtonClick:e.onButtonClick},null,8,["itemData","onChange","onOnButtonClick"])]))}}),O=S._export_sfc(M,[["__scopeId","data-v-4b0300c4"]]);exports.default=O;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),B=require("./menu-BnTNA2Lx.cjs"),x=require("./pinia-8zVC1cUT.cjs"),S=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=e.defineComponent({__name:"menuItem",props:{menuList:{type:Array,default:()=>[]}},emits:["clickMenu","openMenu","closeMenu"],setup(u,{emit:i}){const l=i,c=n=>{l("clickMenu",n)},p=n=>{l("openMenu",n)},r=n=>{l("closeMenu",n)};return e.onMounted(()=>{}),(n,k)=>{const a=e.resolveComponent("MenuItem",!0),d=e.resolveComponent("el-sub-menu"),m=e.resolveComponent("el-menu-item");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.menuList,t=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.children&&t.children.length>0?(e.openBlock(),e.createBlock(d,{index:t.path,key:t.path},{title:e.withCtx(()=>[e.renderSlot(n.$slots,"title",{menu:t})]),default:e.withCtx(()=>[e.createVNode(a,{menuList:t.children,onClickMenu:c,onOpenMenu:p,onCloseMenu:r},e.createSlots({_:2},[e.renderList(n.$slots,(M,s)=>({name:s,fn:e.withCtx(_=>[e.renderSlot(n.$slots,s,e.mergeProps({ref_for:!0},_))])}))]),1032,["menuList"])]),_:2},1032,["index"])):(e.openBlock(),e.createBlock(m,{index:t.path,key:t.path,onClick:M=>c(t)},{title:e.withCtx(()=>[e.renderSlot(n.$slots,"title",{menu:t})]),_:2},1032,["index","onClick"]))],64))),256)}}}),L=e.defineComponent({__name:"index",props:{menuList:{type:Array,default:()=>[]}},emits:["clickMenu","openMenu","closeMenu","changeMenuStyle"],setup(u,{emit:i}){const l=B.useMenuState(),{activeMenuPath:c,activeMenuOpenPaths:p}=x.storeToRefs(l),r=i,n=t=>{r("clickMenu",t)},k=t=>{r("openMenu",t),console.log("openMenu2",t)},a=t=>{r("closeMenu",t)},d=e.computed(()=>c.value),m=e.computed(()=>p.value);return(t,M)=>{const s=e.resolveComponent("el-sub-menu"),_=e.resolveComponent("el-menu-item"),f=e.resolveComponent("el-menu");return e.openBlock(),e.createBlock(f,{class:"menu-wrap","default-active":d.value,"default-openeds":m.value,"unique-opened":!0,"collapse-transition":!1,"popper-offset":12,onOpen:k,onClose:a},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.menuList,o=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o.children&&o.children.length>0?(e.openBlock(),e.createBlock(s,{index:o.path,key:o.path},{title:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{menu:o},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(g,{menuList:o.children,onClickMenu:n},e.createSlots({_:2},[e.renderList(t.$slots,(C,h)=>({name:h,fn:e.withCtx(v=>[e.renderSlot(t.$slots,h,e.mergeProps({ref_for:!0},v),void 0,!0)])}))]),1032,["menuList"])]),_:2},1032,["index"])):(e.openBlock(),e.createBlock(_,{index:o.path,key:o.path,onClick:C=>n(o)},{title:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{menu:o},void 0,!0)]),_:2},1032,["index","onClick"]))],64))),256))]),_:3},8,["default-active","default-openeds"])}}}),y=S._export_sfc(L,[["__scopeId","data-v-cd5548ec"]]);exports.default=y;
@@ -1 +1 @@
1
- "use strict";const e=require("./request-BrHEv9dn.cjs");function a(t){return e.service({url:"/api/insofData/add",method:"post",data:t})}function i(t){return e.service({url:"/api/insofData/get",method:"post",data:t})}function n(t){return e.service({url:"/api/insofData/update",method:"post",data:t})}function o(t){return e.service({url:"/api/insofData/delete",method:"post",data:t})}exports.createInsofDataApi=a;exports.deleteInsofDataApi=o;exports.getInsofDataApi=i;exports.updateInsofDataApi=n;
1
+ "use strict";const e=require("./request-SLgezlvU.cjs");function a(t){return e.service({url:"/api/insofData/add",method:"post",data:t})}function i(t){return e.service({url:"/api/insofData/get",method:"post",data:t})}function n(t){return e.service({url:"/api/insofData/update",method:"post",data:t})}function o(t){return e.service({url:"/api/insofData/delete",method:"post",data:t})}exports.createInsofDataApi=a;exports.deleteInsofDataApi=o;exports.getInsofDataApi=i;exports.updateInsofDataApi=n;
@@ -1,9 +1,9 @@
1
1
  import { resolveComponent as n, createElementBlock as r, openBlock as c, createVNode as m } from "vue";
2
- import "./array-DyxKeexo.js";
3
- import "./index-smYHb1Ta.js";
2
+ import "./array-DLX9HpUG.js";
3
+ import "./index-DCRZ9Y1m.js";
4
4
  import { _ as s } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- import "./index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-CqiRIG3B.js";
6
- import "./index.vue_vue_type_style_index_0_scoped_77dec451_lang-DrStz9iD.js";
5
+ import "./index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-DSLx4cvQ.js";
6
+ import "./index.vue_vue_type_style_index_0_scoped_77dec451_lang-C2CUHQVo.js";
7
7
  const u = {
8
8
  __name: "index",
9
9
  props: {
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue");require("./request-SLgezlvU.cjs");const i=require("./pinia-8zVC1cUT.cjs"),n=require("./login-CHZ1VF7_.cjs"),r=require("./index-BXJIxGj9.cjs");e.ref([]);const t=n.useLoginState(r.pinia),{superAdminInfo:o}=i.storeToRefs(t);
@@ -0,0 +1,7 @@
1
+ import { ref as o } from "vue";
2
+ import "./request-3QszTjDN.js";
3
+ import { s as r } from "./pinia-DB5lI5eD.js";
4
+ import { u as t } from "./login-CBjdvGjn.js";
5
+ import { p as i } from "./index-DCRZ9Y1m.js";
6
+ o([]);
7
+ const m = t(i), { superAdminInfo: a } = r(m);
@@ -0,0 +1,235 @@
1
+ import { defineAsyncComponent as q, computed as h, onMounted as U, resolveComponent as z, createBlock as I, openBlock as O, withCtx as H, resolveDynamicComponent as Q, defineComponent as X, ref as P, watch as A } from "vue";
2
+ import { E as Y } from "./index-DdiwlYxv.js";
3
+ import { u as Z } from "./menu-DxrO5JEn.js";
4
+ import { s as v } from "./pinia-DB5lI5eD.js";
5
+ import { u as V } from "./modelComp-BsNooORx.js";
6
+ import { useRouter as x } from "vue-router";
7
+ import { u as ee } from "./login-CBjdvGjn.js";
8
+ import { g as se } from "./index-BEAnS4I-.js";
9
+ import { c as D } from "./cloneDeep-B2CowBmY.js";
10
+ const S = q(() => import("./index-DYee8R31.js"));
11
+ S.install = (a) => {
12
+ a.component("ssMenu", S);
13
+ };
14
+ const te = {
15
+ __name: "index",
16
+ props: {
17
+ name: String
18
+ },
19
+ setup(a) {
20
+ const f = a, p = h(() => Y[f.name]);
21
+ return U(() => {
22
+ }), (b, _) => {
23
+ const y = z("el-icon");
24
+ return O(), I(y, null, {
25
+ default: H(() => [
26
+ (O(), I(Q(p.value)))
27
+ ]),
28
+ _: 1
29
+ });
30
+ };
31
+ }
32
+ }, ge = X({
33
+ name: "menu",
34
+ components: {
35
+ ssMenu: S,
36
+ DynamicIcon: te
37
+ },
38
+ setup() {
39
+ const a = Z(), f = V(), p = x(), { rawMenu: b, menuTriggerType: _ } = v(a), { itemData: y } = v(f), L = ee(), { systemPages: F, loginUserAuthority: re } = v(L), g = P([]);
40
+ let c;
41
+ ((e) => {
42
+ e[e.Menu = 0] = "Menu", e[e.FolderOpened = 1] = "FolderOpened";
43
+ })(c || (c = {}));
44
+ const d = (e) => {
45
+ let s = [], t = [];
46
+ return e == null || e.forEach((r) => {
47
+ s = C(r, t);
48
+ }), console.log("splitMenu", s), s;
49
+ }, C = (e, s) => {
50
+ const t = s, r = [];
51
+ e == null || e.forEach((l) => {
52
+ Array.isArray(l) ? r.push({ children: C(l, []) }) : r.push({ title: l });
53
+ });
54
+ let n = r.reduce((l, u) => (Object.entries(u).forEach(([o, i]) => {
55
+ l[o] === void 0 ? i != null && i.title ? l[o] = [i] : l[o] = i : (Array.isArray(l[o]) || (l[o] = [{ title: l[o] }]), i != null && i.title || Array.isArray(i) ? l[o].push(i) : l[o].push({ title: i }));
56
+ }), l), {});
57
+ return n = K(D(n)), t.push(n), Array.isArray(t) && (t == null ? void 0 : t.length) > 1 ? t : t == null ? void 0 : t[0];
58
+ }, K = (e) => {
59
+ var s, t, r;
60
+ return Array.isArray(e == null ? void 0 : e.title) && ((s = e == null ? void 0 : e.title) == null ? void 0 : s.length) === ((r = (t = e == null ? void 0 : e.title) == null ? void 0 : t.filter((n) => n.title)) == null ? void 0 : r.length) ? e == null ? void 0 : e.title : Array.isArray(e == null ? void 0 : e.children) ? N(e) : e;
61
+ }, N = (e) => {
62
+ var t;
63
+ const s = e;
64
+ return s.children = (t = s.children) == null ? void 0 : t.map((r) => {
65
+ var n;
66
+ return (n = r == null ? void 0 : r.title) != null && n.children ? r == null ? void 0 : r.title : r;
67
+ }), s;
68
+ }, R = (e, s = "", t = 0) => {
69
+ var u;
70
+ const r = D(y.value);
71
+ let n = e;
72
+ const l = (u = r == null ? void 0 : r.filter((o) => {
73
+ var i;
74
+ return ((i = o.comp) == null ? void 0 : i.toUpperCase()) === "GROUP";
75
+ })) == null ? void 0 : u.map((o) => o.name);
76
+ return Array.isArray(n) || (n = [n]), n == null ? void 0 : n.map((o) => {
77
+ const i = s ? `${s}/${o.title}` : o.title, m = {
78
+ ...o,
79
+ path: i,
80
+ level: t,
81
+ icon: c[`${t}`],
82
+ carryData: l == null ? void 0 : l.includes(i),
83
+ isPenultimate: !o.children
84
+ //便于角色授权菜单那里给叶子节点添加按钮节点
85
+ };
86
+ return o.children && o.children.length > 0 && (m.children = R(o.children, i, t + 1)), m;
87
+ });
88
+ }, $ = h(() => {
89
+ let e = R(g.value);
90
+ if ((e == null ? void 0 : e.length) === 0)
91
+ return p.push("/"), [];
92
+ const s = [
93
+ {
94
+ title: "系统管理",
95
+ path: "/",
96
+ level: 0,
97
+ icon: c[0],
98
+ carryData: !1,
99
+ children: [
100
+ {
101
+ title: "角色管理",
102
+ path: "/role",
103
+ level: 1,
104
+ icon: c[1],
105
+ carryData: !0,
106
+ isRouter: !0
107
+ },
108
+ {
109
+ title: "部门管理",
110
+ path: "/dept",
111
+ level: 1,
112
+ icon: c[1],
113
+ carryData: !0,
114
+ isRouter: !0
115
+ },
116
+ {
117
+ title: "用户管理",
118
+ path: "/user",
119
+ level: 1,
120
+ icon: c[1],
121
+ carryData: !0,
122
+ isRouter: !0
123
+ },
124
+ {
125
+ title: "级别管控",
126
+ path: "/priority",
127
+ level: 1,
128
+ icon: c[1],
129
+ carryData: !0,
130
+ isRouter: !0
131
+ }
132
+ ]
133
+ }
134
+ ];
135
+ return e = M.value ? [...e, ...s] : e, console.log("是否是超管-menus:", T.value, e), B(T.value), console.log("renderMenuList", e, M.value), a.setMenus(e), e;
136
+ }), B = (e) => {
137
+ const s = Array.from(new Set(e.map((t) => t.substring(0, t.lastIndexOf("/")))));
138
+ console.log("是否是超管-result:", s);
139
+ }, J = (e) => {
140
+ console.log("clickMenu", e), a.setMenuTriggerType("click"), a.setActiveMenuPath(e == null ? void 0 : e.path), e.isRouter ? p.push(e.path) : p.push("/");
141
+ }, j = (e) => {
142
+ console.log(555, e), _.value === "click" ? a.setActiveMenuPath(e) : a.setMenuTriggerType("click"), e != null && e.startsWith("/") ? p.push(e) : p.push("/");
143
+ }, k = (e) => {
144
+ a.setActiveMenuPath(e);
145
+ }, G = P([
146
+ {
147
+ name: "--ssComponent-menu-bg",
148
+ value: "#426ec4"
149
+ },
150
+ {
151
+ name: "--ssComponent-submenu-hover-bg",
152
+ value: "#00000033"
153
+ },
154
+ {
155
+ name: "--ssComponent-submenu-open-bg",
156
+ value: "#2DA0FF"
157
+ },
158
+ {
159
+ name: "--ssComponent-submenu-open-inline-bg",
160
+ value: "#1C4275"
161
+ },
162
+ {
163
+ name: "--ssComponent-menuitem-hover-bg",
164
+ value: "#1d7bef"
165
+ },
166
+ {
167
+ name: "--ssComponent-menuitem-active-bg",
168
+ value: "#1d7bef"
169
+ }
170
+ ]), W = () => {
171
+ var s;
172
+ const e = document.documentElement;
173
+ (s = G.value) == null || s.forEach((t) => {
174
+ e.style.setProperty(t.name, t.value);
175
+ });
176
+ };
177
+ U(() => {
178
+ console.log("loginUserAuthority", sessionStorage.getItem("authority"));
179
+ });
180
+ const M = h(() => {
181
+ const e = sessionStorage.getItem("isSuperAdmin");
182
+ return e ? JSON.parse(e) : !1;
183
+ }), T = h(() => {
184
+ const e = sessionStorage.getItem("authority");
185
+ return e ? JSON.parse(e) : [];
186
+ }), w = async () => {
187
+ var t, r, n, l, u, o, i, m;
188
+ let e;
189
+ const s = await se({
190
+ key: {
191
+ systemKey: sessionStorage.getItem("systemKey"),
192
+ pageKey: "Menu"
193
+ }
194
+ });
195
+ return s.data.code === 200 && (e = (m = (i = (o = (u = (l = (n = (r = (t = s == null ? void 0 : s.data) == null ? void 0 : t.result) == null ? void 0 : r[0]) == null ? void 0 : n.value) == null ? void 0 : l.compData) == null ? void 0 : u[0]) == null ? void 0 : o.compData) == null ? void 0 : i[0]) == null ? void 0 : m.contents, console.log("getModelMenus", e)), e;
196
+ };
197
+ return A(() => b.value, (e) => {
198
+ var s, t, r;
199
+ if (e) {
200
+ const n = (r = (t = (s = D(e)) == null ? void 0 : s.compData) == null ? void 0 : t[0]) == null ? void 0 : r.contents;
201
+ g.value = d(n), console.log("rawMenus", n), console.log("menuList", g.value);
202
+ } else
203
+ a.setActiveMenuPath("");
204
+ }, {
205
+ immediate: !0
206
+ }), A(() => F.value, (e) => {
207
+ var r, n, l, u, o;
208
+ const s = e == null ? void 0 : e.find((i) => {
209
+ var m, E;
210
+ return ((E = (m = i.key) == null ? void 0 : m.pageKey) == null ? void 0 : E.toUpperCase()) === "MENU";
211
+ }), t = (o = (u = (l = (n = (r = s == null ? void 0 : s.value) == null ? void 0 : r.compData) == null ? void 0 : n[0]) == null ? void 0 : l.compData) == null ? void 0 : u[0]) == null ? void 0 : o.contents;
212
+ console.log("systemPages", t), g.value = d(t);
213
+ }), A(() => M.value, async (e) => {
214
+ if (console.log("是否是超管:", e), e) {
215
+ const s = await w();
216
+ g.value = d(s);
217
+ } else {
218
+ const s = await w();
219
+ g.value = d(s);
220
+ }
221
+ }, {
222
+ immediate: !0,
223
+ deep: !0
224
+ }), {
225
+ renderMenuList: $,
226
+ clickMenu: J,
227
+ openMenu: j,
228
+ closeMenu: k,
229
+ changeMenuStyle: W
230
+ };
231
+ }
232
+ });
233
+ export {
234
+ ge as _
235
+ };
@@ -0,0 +1 @@
1
+ "use strict";const u=require("vue"),$=require("./index-2BSH90QR.cjs"),k=require("./menu-BnTNA2Lx.cjs"),A=require("./pinia-8zVC1cUT.cjs"),J=require("./modelComp-b_KDs0lh.cjs"),j=require("vue-router"),G=require("./login-CHZ1VF7_.cjs"),W=require("./index-kHFiVhmA.cjs"),v=require("./cloneDeep-Fj9bqNcO.cjs"),D=u.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-YlTnI4EI.cjs")));D.install=a=>{a.component("ssMenu",D)};const z={__name:"index",props:{name:String},setup(a){const y=a,d=u.computed(()=>$.ElIcons[y.name]);return u.onMounted(()=>{}),(S,b)=>{const M=u.resolveComponent("el-icon");return u.openBlock(),u.createBlock(M,null,{default:u.withCtx(()=>[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(d.value)))]),_:1})}}},H=u.defineComponent({name:"menu",components:{ssMenu:D,DynamicIcon:z},setup(){const a=k.useMenuState(),y=J.useModelComp(),d=j.useRouter(),{rawMenu:S,menuTriggerType:b}=A.storeToRefs(a),{itemData:M}=A.storeToRefs(y),w=G.useLoginState(),{systemPages:E,loginUserAuthority:Q}=A.storeToRefs(w),g=u.ref([]);let p;(e=>{e[e.Menu=0]="Menu",e[e.FolderOpened=1]="FolderOpened"})(p||(p={}));const h=e=>{let s=[],t=[];return e==null||e.forEach(r=>{s=_(r,t)}),console.log("splitMenu",s),s},_=(e,s)=>{const t=s,r=[];e==null||e.forEach(l=>{Array.isArray(l)?r.push({children:_(l,[])}):r.push({title:l})});let n=r.reduce((l,c)=>(Object.entries(c).forEach(([o,i])=>{l[o]===void 0?i!=null&&i.title?l[o]=[i]:l[o]=i:(Array.isArray(l[o])||(l[o]=[{title:l[o]}]),i!=null&&i.title||Array.isArray(i)?l[o].push(i):l[o].push({title:i}))}),l),{});return n=I(v.cloneDeep(n)),t.push(n),Array.isArray(t)&&(t==null?void 0:t.length)>1?t:t==null?void 0:t[0]},I=e=>{var s,t,r;return Array.isArray(e==null?void 0:e.title)&&((s=e==null?void 0:e.title)==null?void 0:s.length)===((r=(t=e==null?void 0:e.title)==null?void 0:t.filter(n=>n.title))==null?void 0:r.length)?e==null?void 0:e.title:Array.isArray(e==null?void 0:e.children)?O(e):e},O=e=>{var t;const s=e;return s.children=(t=s.children)==null?void 0:t.map(r=>{var n;return(n=r==null?void 0:r.title)!=null&&n.children?r==null?void 0:r.title:r}),s},R=(e,s="",t=0)=>{var c;const r=v.cloneDeep(M.value);let n=e;const l=(c=r==null?void 0:r.filter(o=>{var i;return((i=o.comp)==null?void 0:i.toUpperCase())==="GROUP"}))==null?void 0:c.map(o=>o.name);return Array.isArray(n)||(n=[n]),n==null?void 0:n.map(o=>{const i=s?`${s}/${o.title}`:o.title,m={...o,path:i,level:t,icon:p[`${t}`],carryData:l==null?void 0:l.includes(i),isPenultimate:!o.children};return o.children&&o.children.length>0&&(m.children=R(o.children,i,t+1)),m})},P=u.computed(()=>{let e=R(g.value);if((e==null?void 0:e.length)===0)return d.push("/"),[];const s=[{title:"系统管理",path:"/",level:0,icon:p[0],carryData:!1,children:[{title:"角色管理",path:"/role",level:1,icon:p[1],carryData:!0,isRouter:!0},{title:"部门管理",path:"/dept",level:1,icon:p[1],carryData:!0,isRouter:!0},{title:"用户管理",path:"/user",level:1,icon:p[1],carryData:!0,isRouter:!0},{title:"级别管控",path:"/priority",level:1,icon:p[1],carryData:!0,isRouter:!0}]}];return e=f.value?[...e,...s]:e,console.log("是否是超管-menus:",C.value,e),U(C.value),console.log("renderMenuList",e,f.value),a.setMenus(e),e}),U=e=>{const s=Array.from(new Set(e.map(t=>t.substring(0,t.lastIndexOf("/")))));console.log("是否是超管-result:",s)},B=e=>{console.log("clickMenu",e),a.setMenuTriggerType("click"),a.setActiveMenuPath(e==null?void 0:e.path),e.isRouter?d.push(e.path):d.push("/")},L=e=>{console.log(555,e),b.value==="click"?a.setActiveMenuPath(e):a.setMenuTriggerType("click"),e!=null&&e.startsWith("/")?d.push(e):d.push("/")},F=e=>{a.setActiveMenuPath(e)},K=u.ref([{name:"--ssComponent-menu-bg",value:"#426ec4"},{name:"--ssComponent-submenu-hover-bg",value:"#00000033"},{name:"--ssComponent-submenu-open-bg",value:"#2DA0FF"},{name:"--ssComponent-submenu-open-inline-bg",value:"#1C4275"},{name:"--ssComponent-menuitem-hover-bg",value:"#1d7bef"},{name:"--ssComponent-menuitem-active-bg",value:"#1d7bef"}]),N=()=>{var s;const e=document.documentElement;(s=K.value)==null||s.forEach(t=>{e.style.setProperty(t.name,t.value)})};u.onMounted(()=>{console.log("loginUserAuthority",sessionStorage.getItem("authority"))});const f=u.computed(()=>{const e=sessionStorage.getItem("isSuperAdmin");return e?JSON.parse(e):!1}),C=u.computed(()=>{const e=sessionStorage.getItem("authority");return e?JSON.parse(e):[]}),T=async()=>{var t,r,n,l,c,o,i,m;let e;const s=await W.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"Menu"}});return s.data.code===200&&(e=(m=(i=(o=(c=(l=(n=(r=(t=s==null?void 0:s.data)==null?void 0:t.result)==null?void 0:r[0])==null?void 0:n.value)==null?void 0:l.compData)==null?void 0:c[0])==null?void 0:o.compData)==null?void 0:i[0])==null?void 0:m.contents,console.log("getModelMenus",e)),e};return u.watch(()=>S.value,e=>{var s,t,r;if(e){const n=(r=(t=(s=v.cloneDeep(e))==null?void 0:s.compData)==null?void 0:t[0])==null?void 0:r.contents;g.value=h(n),console.log("rawMenus",n),console.log("menuList",g.value)}else a.setActiveMenuPath("")},{immediate:!0}),u.watch(()=>E.value,e=>{var r,n,l,c,o;const s=e==null?void 0:e.find(i=>{var m,q;return((q=(m=i.key)==null?void 0:m.pageKey)==null?void 0:q.toUpperCase())==="MENU"}),t=(o=(c=(l=(n=(r=s==null?void 0:s.value)==null?void 0:r.compData)==null?void 0:n[0])==null?void 0:l.compData)==null?void 0:c[0])==null?void 0:o.contents;console.log("systemPages",t),g.value=h(t)}),u.watch(()=>f.value,async e=>{if(console.log("是否是超管:",e),e){const s=await T();g.value=h(s)}else{const s=await T();g.value=h(s)}},{immediate:!0,deep:!0}),{renderMenuList:P,clickMenu:B,openMenu:L,closeMenu:F,changeMenuStyle:N}}});exports._sfc_main=H;
@@ -0,0 +1,47 @@
1
+ import { d as i } from "./pinia-DB5lI5eD.js";
2
+ import { g as o } from "./index-BEAnS4I-.js";
3
+ import { c as n } from "./cloneDeep-B2CowBmY.js";
4
+ const d = i("loginState", {
5
+ state: () => ({
6
+ superAdminInfo: {
7
+ superAdmin: "",
8
+ key: ""
9
+ },
10
+ systemPages: [],
11
+ loginUserAuthority: []
12
+ }),
13
+ actions: {
14
+ setLoginUserAuthority(e) {
15
+ this.loginUserAuthority = e;
16
+ },
17
+ setSystemPages(e) {
18
+ this.systemPages = e;
19
+ },
20
+ async getSuperAdminInfoAsync() {
21
+ var t, r, a;
22
+ const e = await o({
23
+ key: {
24
+ // systemKey: sessionStorage.getItem("systemKey"),
25
+ pageKey: "/user",
26
+ layer: "superAdmin"
27
+ }
28
+ });
29
+ if (e.data.code === 200) {
30
+ if (!e.data.result || e.data.result.length === 0) return;
31
+ const s = n((t = e.data.result) == null ? void 0 : t[0]);
32
+ this.superAdminInfo.superAdmin = (a = (r = s == null ? void 0 : s.value) == null ? void 0 : r.rowData) == null ? void 0 : a.userName, this.superAdminInfo.key = s == null ? void 0 : s.key.systemKey;
33
+ }
34
+ return this.superAdminInfo;
35
+ }
36
+ },
37
+ persist: [
38
+ {
39
+ key: "loginState",
40
+ storage: localStorage,
41
+ pick: ["superAdminInfo"]
42
+ }
43
+ ]
44
+ });
45
+ export {
46
+ d as u
47
+ };
@@ -0,0 +1 @@
1
+ "use strict";const n=require("./pinia-8zVC1cUT.cjs"),a=require("./index-kHFiVhmA.cjs"),o=require("./cloneDeep-Fj9bqNcO.cjs"),u=n.defineStore("loginState",{state:()=>({superAdminInfo:{superAdmin:"",key:""},systemPages:[],loginUserAuthority:[]}),actions:{setLoginUserAuthority(e){this.loginUserAuthority=e},setSystemPages(e){this.systemPages=e},async getSuperAdminInfoAsync(){var t,i,r;const e=await a.getInsofDataApi({key:{pageKey:"/user",layer:"superAdmin"}});if(e.data.code===200){if(!e.data.result||e.data.result.length===0)return;const s=o.cloneDeep((t=e.data.result)==null?void 0:t[0]);this.superAdminInfo.superAdmin=(r=(i=s==null?void 0:s.value)==null?void 0:i.rowData)==null?void 0:r.userName,this.superAdminInfo.key=s==null?void 0:s.key.systemKey}return this.superAdminInfo}},persist:[{key:"loginState",storage:localStorage,pick:["superAdminInfo"]}]});exports.useLoginState=u;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),O=require("./index-C86gx6Ye.cjs"),T=require("./index-BXJIxGj9.cjs"),Q=require("./modelComp-b_KDs0lh.cjs"),U=require("./pinia-8zVC1cUT.cjs"),I=require("./array-tWsmTH5r.cjs"),X=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),h=require("./cloneDeep-Fj9bqNcO.cjs"),ee=require("./menu-BnTNA2Lx.cjs"),V=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"}],s=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"LineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"}],te={key:0,class:"show-content"},ne={class:"item-view-group"},oe={__name:"index",props:{content:String,jsonContents:Array},emits:["change"],setup(j,{emit:E}){const t=j,D=E,g=Q.useModelComp(T.pinia),{itemData:p}=U.storeToRefs(g),_=e.ref([]),C=e.ref([]),F=c=>{D("change",{wholeValue:_.value,editValue:c})},S=c=>{const k=h.cloneDeep(_.value),b=k==null?void 0:k.map((i,B)=>(B===(c==null?void 0:c.index)&&(i.compData=c==null?void 0:c.contents),i));_.value=b};e.watch(()=>p.value,()=>{var c;!p.value||((c=p.value)==null?void 0:c.length)===0||(C.value=p.value,_.value=p.value)},{deep:!0,immediate:!0}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{var k;if(((k=t==null?void 0:t.jsonContents)==null?void 0:k.length)>0){g.setOriginalData(t==null?void 0:t.jsonContents),g.setItemData(t==null?void 0:t.jsonContents);return}if(!(t!=null&&t.content)||(t==null?void 0:t.content)==="")return;const c=I.expandStringToJson(t==null?void 0:t.content);g.setOriginalData(c),g.setItemData(c)},{deep:!0,immediate:!0});const N=c=>I.getComponent(c);return(c,k)=>{var b;return((b=C.value)==null?void 0:b.length)>0?(e.openBlock(),e.createElementBlock("div",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(i,B)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:B},[e.createElementVNode("div",ne,e.toDisplayString(i.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N(i.comp)),{itemData:i==null?void 0:i.compData,childItemData:i==null?void 0:i.itemChildData,key:B,onChange:F,index:B,onContentChange:S},null,40,["itemData","childItemData","index"]))]))),128))])):e.createCommentVNode("",!0)}}},ae=X._export_sfc(oe,[["__scopeId","data-v-869e6e20"]]),re={class:"add-model-content"},le={key:0,class:"model-import-data"},ce={class:"import-button"},se={key:0},ue={key:1,class:"model-operate"},ie={class:"model-select"},de={class:"model-fill"},me={key:2,class:"model-view ssComponent"},ye={__name:"main",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change"],setup(j,{emit:E}){const t=j,D=E,g=e.ref(""),p=e.ref([]),_=e.ref(0),C=Q.useModelComp(T.pinia);ee.useMenuState(T.pinia);const{itemData:F,originalData:S}=U.storeToRefs(C),N=e.ref(null),c=e.ref(0),k=e.ref(""),b=()=>{_.value=window.innerWidth},i=async r=>{var u;const a=(u=h.cloneDeep(r==null?void 0:r.wholeValue))==null?void 0:u.map(o=>{var y;return(o==null?void 0:o.comp)==="Form"&&(o.compData=(y=o.compData)==null?void 0:y.map(f=>((f==null?void 0:f.key)==="formContent"&&(f.contents=I.arrayToNumberArray(f==null?void 0:f.contents)),f))),o});D("change",{originalContents:S.value,currentContents:r==null?void 0:r.wholeValue,editContent:r==null?void 0:r.editValue,stringContent:B(h.cloneDeep(r==null?void 0:r.wholeValue)),arrayToContents:a})},B=r=>{var u;let a=[];return(u=h.cloneDeep(r))==null||u.forEach(o=>{var y,f;V!=null&&V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp))&&a.push(((y=V==null?void 0:V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp)))==null?void 0:y.key)+"="+o.name+"/r/n"),(f=o==null?void 0:o.compData)==null||f.forEach(n=>{var $,q,J,A,M,R,L,z,W,H,P,G;if(s!=null&&s.find(d=>(d==null?void 0:d.value)===(n==null?void 0:n.key)))if(!(($=n==null?void 0:n.contents)!=null&&$.length))a.push(((q=s==null?void 0:s.find(d=>(d==null?void 0:d.value)===(n==null?void 0:n.key)))==null?void 0:q.key)+"="+(n.contents===!0?'""':"Vertical")+"/r/n");else{let d=(J=n==null?void 0:n.contents)==null?void 0:J[0];if(!d)return;if(Object.keys(d).includes("label")&&Object.keys(d).includes("key")&&Object.keys(d).includes("width"))if(((M=(A=n.contents)==null?void 0:A.filter(m=>m.width!==1))==null?void 0:M.length)===0){const m=(R=h.cloneDeep(n==null?void 0:n.contents))==null?void 0:R.map(l=>({[l.label]:l.value}));a.push(((L=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:L.key)+"="+JSON.stringify(m)+"/r/n")}else{let m=[];(z=h.cloneDeep(n==null?void 0:n.contents))==null||z.reduce((l,x)=>{var K;return l[x.label]=x.key,((K=Object.keys(h.cloneDeep(l)))==null?void 0:K.length)>=x.width&&(m.push(h.cloneDeep(l)),l={}),l},{}),a.push(((W=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:W.key)+"="+JSON.stringify(m)+"/r/n")}else if(Object.keys(d).includes("label")){const m=(H=h.cloneDeep(n==null?void 0:n.contents))==null?void 0:H.map(l=>l.label);a.push(((P=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:P.key)+"="+JSON.stringify(m)+"/r/n")}else a.push(((G=s==null?void 0:s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))==null?void 0:G.key)+"="+JSON.stringify(n==null?void 0:n.contents)+"/r/n")}})}),JSON.stringify(a)},w=e.ref([]),Y=()=>{N.value.click()},Z=r=>{const a=r.target.files[0];if(!a)return;const u=new FileReader;u.onload=o=>{try{g.value=o.target.result,w.value=v(o.target.result),c.value++}catch(y){console.error("解析失败:",y)}},u.onerror=o=>{console.error("文件读取错误:",o)},u.readAsText(a)};e.onMounted(()=>{window.addEventListener("resize",b)}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{g.value=t==null?void 0:t.content,p.value=t==null?void 0:t.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>c.value,()=>{var r;((r=w.value)==null?void 0:r.length)!==0&&(C.setOriginalData(w.value),C.setItemData(w.value))},{deep:!0,immediate:!0});const v=r=>{let a=r.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");a=a.replace(/(\w+)\s*:/g,"$1:"),a=a.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),a=a.replace(/,\s*([}\]])/g,"$1"),a=a.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(a)}catch(u){try{const y=new Function(`return ${a}`)();if(Array.isArray(y)||typeof y=="object")return y;throw new Error(`解析结果不是有效的数组或对象: ${u}`)}catch(o){throw new Error(`无法解析JSON: ${o.message}`)}}};return(r,a)=>{var u;return e.openBlock(),e.createElementBlock("div",re,[((u=t==null?void 0:t.jsonContents)==null?void 0:u.length)===0?(e.openBlock(),e.createElementBlock("div",le,[e.createElementVNode("div",ce,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:N,accept:".txt",onChange:Z,style:{display:"none"}},null,544),e.createElementVNode("button",{onClick:Y,class:"import-button-content"},"导入文件"),k.value?(e.openBlock(),e.createElementBlock("span",se,e.toDisplayString(k.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",ie,[e.createVNode(O.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:_.value},[e.createVNode(O.modelShow)])),e.createElementVNode("div",de,[e.createVNode(O.modelFill)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="view"?(e.openBlock(),e.createElementBlock("div",me,[(e.openBlock(),e.createBlock(ae,{content:g.value,onChange:i,jsonContents:p.value,key:_.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},fe=X._export_sfc(ye,[["__scopeId","data-v-b25bde75"]]);exports.default=fe;