ss-component-new 1.1.113 → 1.1.115

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 (53) hide show
  1. package/dist/{array-DyxKeexo.js → array-B1nKYchL.js} +269 -266
  2. package/dist/array-Bv_j-DQ6.cjs +7 -0
  3. package/dist/cloneDeep-BkHxCZQ6.cjs +1 -0
  4. package/dist/{cloneDeep-BfzU0pBe.js → cloneDeep-DDG2sYfV.js} +2 -8
  5. package/dist/{index-BTt24r3U.cjs → index-B2YxsOFS.cjs} +1 -1
  6. package/dist/{index-CVBCwf2F.cjs → index-B9CeiT-K.cjs} +1 -1
  7. package/dist/{index-COPrDtid.js → index-BDQh7_bN.js} +1 -1
  8. package/dist/index-BKH3emIo.js +400 -0
  9. package/dist/{index-CbphQpiC.cjs → index-BOMVVmWM.cjs} +1 -1
  10. package/dist/index-BZEbgud2.cjs +6 -0
  11. package/dist/index-BeUperzd.cjs +1 -0
  12. package/dist/index-BgZXex98.js +199 -0
  13. package/dist/{index-BH3F6_ql.js → index-BrXeR-w4.js} +1025 -1121
  14. package/dist/{index-DWiZqfBA.js → index-Bx4Vzo3K.js} +3 -3
  15. package/dist/{index-5dGTUAu_.cjs → index-ByH4hihL.cjs} +1 -1
  16. package/dist/{index-CyQkKXnK.js → index-C1474J4s.js} +2 -2
  17. package/dist/{index-DVEWSdUo.cjs → index-CfR4fhRH.cjs} +1 -1
  18. package/dist/index-CosMCnZD.js +456 -0
  19. package/dist/{index-CBHJLZo4.cjs → index-DGEVn6kJ.cjs} +1 -1
  20. package/dist/index-DHZKgJQ-.cjs +1 -0
  21. package/dist/{index-b_11tfuG.js → index-DbEFJXIu.js} +4 -4
  22. package/dist/{index-CdEEK8I0.js → index-DcJXJfJq.js} +68 -69
  23. package/dist/{index-B3iQoZwc.js → index-DmZPczSP.js} +3 -3
  24. package/dist/{index-QWm4yJ7u.js → index-FuXHUCO7.js} +2 -2
  25. package/dist/index-PctLLbfg.cjs +1 -0
  26. package/dist/{index-DxyREQkR.js → index-RTJn4TlV.js} +5 -5
  27. package/dist/{index-BpJeYb4X.js → index-RUWVqYLT.js} +1 -1
  28. package/dist/{index-ChXKNVG8.cjs → index-fstYT4Ji.cjs} +1 -1
  29. package/dist/{index-EQOXj03f.cjs → index-pKfoDOT3.cjs} +1 -1
  30. package/dist/{index-CqJa9o1o.cjs → index-tXx4uqsB.cjs} +1 -1
  31. package/dist/{index-B4WYIlOz.cjs → index-xFolZMqB.cjs} +1 -1
  32. package/dist/{index-DLartnmY.js → index-x_myaReY.js} +1 -1
  33. package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-CqiRIG3B.js → index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-Bwb6U8rC.js} +22 -22
  34. package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-CgrtbAG0.cjs → index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-CF3B2HoM.cjs} +1 -1
  35. package/dist/{main-DS-YP1Wn.cjs → main-BhZ-c5nF.cjs} +1 -1
  36. package/dist/{main-DAPxADXM.js → main-CaHX_enG.js} +4 -4
  37. package/dist/{request-BrHEv9dn.cjs → request-CNnOyEMG.cjs} +1 -1
  38. package/dist/{request-BK6KCyS9.js → request-_jH8DsLJ.js} +1 -1
  39. package/dist/ss-component.cjs +1 -1
  40. package/dist/ss-component.css +1 -1
  41. package/dist/ss-component.js +6 -6
  42. package/dist/ss-component2.cjs +1 -1
  43. package/dist/ss-component2.js +1 -1
  44. package/package.json +1 -1
  45. package/dist/array-BYRvPg11.cjs +0 -7
  46. package/dist/cloneDeep-WwDap0fL.cjs +0 -1
  47. package/dist/index-BIRKKGuW.cjs +0 -1
  48. package/dist/index-BUxzwz5l.cjs +0 -1
  49. package/dist/index-CumtOgAw.cjs +0 -7
  50. package/dist/index-DmoecEm1.js +0 -205
  51. package/dist/index-EIbm0jBZ.js +0 -2707
  52. package/dist/index-smYHb1Ta.js +0 -456
  53. package/dist/index-uMboxmjq.cjs +0 -6
@@ -1,8 +1,8 @@
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-B1nKYchL.js";
3
+ import "./index-CosMCnZD.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";
5
+ import "./index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-Bwb6U8rC.js";
6
6
  import "./index.vue_vue_type_style_index_0_scoped_77dec451_lang-DrStz9iD.js";
7
7
  const u = {
8
8
  __name: "index",
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),o=require("./index-uMboxmjq.cjs"),w=r=>r,_=o.buildProps({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:o.definePropType([String,Object,Array])},offset:{type:o.definePropType(Array),default:[0,0]},badgeClass:{type:String}}),L=e.defineComponent({name:"ElBadge"}),D=e.defineComponent({...L,props:_,setup(r,{expose:a}){const n=r,t=o.useNamespace("badge"),i=e.computed(()=>n.isDot?"":o.isNumber(n.value)&&o.isNumber(n.max)?n.max<n.value?`${n.max}+`:`${n.value}`:`${n.value}`),f=e.computed(()=>{var s,c,g,v,m;return[{backgroundColor:n.color,marginRight:o.addUnit(-((c=(s=n.offset)==null?void 0:s[0])!=null?c:0)),marginTop:o.addUnit((v=(g=n.offset)==null?void 0:g[1])!=null?v:0)},(m=n.badgeStyle)!=null?m:{}]});return a({content:i}),(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(t).b())},[e.renderSlot(s.$slots,"default"),e.createVNode(e.Transition,{name:`${e.unref(t).namespace.value}-zoom-in-center`,persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("sup",{class:e.normalizeClass([e.unref(t).e("content"),e.unref(t).em("content",s.type),e.unref(t).is("fixed",!!s.$slots.default),e.unref(t).is("dot",s.isDot),e.unref(t).is("hide-zero",!s.showZero&&n.value===0),s.badgeClass]),style:e.normalizeStyle(e.unref(f))},[e.renderSlot(s.$slots,"content",{value:e.unref(i)},()=>[e.createTextVNode(e.toDisplayString(e.unref(i)),1)])],6),[[e.vShow,!s.hidden&&(e.unref(i)||s.isDot||s.$slots.content)]])]),_:3},8,["name"])],2))}});var F=o._export_sfc(D,[["__file","badge.vue"]]);const j=o.withInstall(F),H=o.buildProps({a11y:{type:Boolean,default:!0},locale:{type:o.definePropType(Object)},size:o.useSizeProp,button:{type:o.definePropType(Object)},experimentalFeatures:{type:o.definePropType(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:o.definePropType(Object)},zIndex:Number,namespace:{type:String,default:"el"},...o.useEmptyValuesProps}),d={};e.defineComponent({name:"ElConfigProvider",props:H,setup(r,{slots:a}){e.watch(()=>r.message,t=>{Object.assign(d,t??{})},{immediate:!0,deep:!0});const n=o.provideGlobalConfig(r);return()=>e.renderSlot(a,"default",{config:n==null?void 0:n.value})}});const E=["success","info","warning","error"],u=w({customClass:"",dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:o.isClient?document.body:void 0}),A=o.buildProps({customClass:{type:String,default:u.customClass},dangerouslyUseHTMLString:{type:Boolean,default:u.dangerouslyUseHTMLString},duration:{type:Number,default:u.duration},icon:{type:o.iconPropType,default:u.icon},id:{type:String,default:u.id},message:{type:o.definePropType([String,Object,Function]),default:u.message},onClose:{type:o.definePropType(Function),default:u.onClose},showClose:{type:Boolean,default:u.showClose},type:{type:String,values:E,default:u.type},plain:{type:Boolean,default:u.plain},offset:{type:Number,default:u.offset},zIndex:{type:Number,default:u.zIndex},grouping:{type:Boolean,default:u.grouping},repeatNum:{type:Number,default:u.repeatNum}}),R={destroy:()=>!0},p=e.shallowReactive([]),U=r=>{const a=p.findIndex(i=>i.id===r),n=p[a];let t;return a>0&&(t=p[a-1]),{current:n,prev:t}},Z=r=>{const{prev:a}=U(r);return a?a.vm.exposed.bottom.value:0},q=(r,a)=>p.findIndex(t=>t.id===r)>0?16:a,G=e.defineComponent({name:"ElMessage"}),W=e.defineComponent({...G,props:A,emits:R,setup(r,{expose:a,emit:n}){const t=r,{Close:i}=o.TypeComponents,f=e.ref(!1),{ns:s,zIndex:c}=o.useGlobalComponentSettings("message"),{currentZIndex:g,nextZIndex:v}=c,m=e.ref(),C=e.ref(!1),B=e.ref(0);let h;const M=e.computed(()=>t.type?t.type==="error"?"danger":t.type:"info"),P=e.computed(()=>{const l=t.type;return{[s.bm("icon",l)]:l&&o.TypeComponentsMap[l]}}),N=e.computed(()=>t.icon||o.TypeComponentsMap[t.type]||""),$=e.computed(()=>Z(t.id)),S=e.computed(()=>q(t.id,t.offset)+$.value),O=e.computed(()=>B.value+S.value),x=e.computed(()=>({top:`${S.value}px`,zIndex:g.value}));function T(){t.duration!==0&&({stop:h}=o.useTimeoutFn(()=>{b()},t.duration))}function k(){h==null||h()}function b(){C.value=!1,e.nextTick(()=>{var l;f.value||((l=t.onClose)==null||l.call(t),n("destroy"))})}function I({code:l}){l===o.EVENT_CODE.esc&&b()}return e.onMounted(()=>{T(),v(),C.value=!0}),e.watch(()=>t.repeatNum,()=>{k(),T()}),o.useEventListener(document,"keydown",I),o.useResizeObserver(m,()=>{B.value=m.value.getBoundingClientRect().height}),a({visible:C,bottom:O,close:b}),(l,ne)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(s).b("fade"),onBeforeEnter:V=>f.value=!0,onBeforeLeave:l.onClose,onAfterLeave:V=>l.$emit("destroy"),persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{id:l.id,ref_key:"messageRef",ref:m,class:e.normalizeClass([e.unref(s).b(),{[e.unref(s).m(l.type)]:l.type},e.unref(s).is("closable",l.showClose),e.unref(s).is("plain",l.plain),l.customClass]),style:e.normalizeStyle(e.unref(x)),role:"alert",onMouseenter:k,onMouseleave:T},[l.repeatNum>1?(e.openBlock(),e.createBlock(e.unref(j),{key:0,value:l.repeatNum,type:e.unref(M),class:e.normalizeClass(e.unref(s).e("badge"))},null,8,["value","type","class"])):e.createCommentVNode("v-if",!0),e.unref(N)?(e.openBlock(),e.createBlock(e.unref(o.ElIcon),{key:1,class:e.normalizeClass([e.unref(s).e("icon"),e.unref(P)])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(N))))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),e.renderSlot(l.$slots,"default",{},()=>[l.dangerouslyUseHTMLString?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),e.createElementVNode("p",{class:e.normalizeClass(e.unref(s).e("content")),innerHTML:l.message},null,10,["innerHTML"])],2112)):(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(e.unref(s).e("content"))},e.toDisplayString(l.message),3))]),l.showClose?(e.openBlock(),e.createBlock(e.unref(o.ElIcon),{key:2,class:e.normalizeClass(e.unref(s).e("closeBtn")),onClick:e.withModifiers(b,["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(i))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0)],46,["id"]),[[e.vShow,C.value]])]),_:3},8,["name","onBeforeEnter","onBeforeLeave","onAfterLeave"]))}});var J=o._export_sfc(W,[["__file","message.vue"]]);let K=1;const z=r=>{const a=!r||o.isString(r)||e.isVNode(r)||o.isFunction(r)?{message:r}:r,n={...u,...a};if(!n.appendTo)n.appendTo=document.body;else if(o.isString(n.appendTo)){let t=document.querySelector(n.appendTo);o.isElement(t)||(o.debugWarn("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body),n.appendTo=t}return o.isBoolean(d.grouping)&&!n.grouping&&(n.grouping=d.grouping),o.isNumber(d.duration)&&n.duration===3e3&&(n.duration=d.duration),o.isNumber(d.offset)&&n.offset===16&&(n.offset=d.offset),o.isBoolean(d.showClose)&&!n.showClose&&(n.showClose=d.showClose),n},Q=r=>{const a=p.indexOf(r);if(a===-1)return;p.splice(a,1);const{handler:n}=r;n.close()},X=({appendTo:r,...a},n)=>{const t=`message_${K++}`,i=a.onClose,f=document.createElement("div"),s={...a,id:t,onClose:()=>{i==null||i(),Q(m)},onDestroy:()=>{e.render(null,f)}},c=e.createVNode(J,s,o.isFunction(s.message)||e.isVNode(s.message)?{default:o.isFunction(s.message)?s.message:()=>s.message}:null);c.appContext=n||y._context,e.render(c,f),r.appendChild(f.firstElementChild);const g=c.component,m={id:t,vnode:c,vm:g,handler:{close:()=>{g.exposed.close()}},props:c.component.props};return m},y=(r={},a)=>{if(!o.isClient)return{close:()=>{}};const n=z(r);if(n.grouping&&p.length){const i=p.find(({vnode:f})=>{var s;return((s=f.props)==null?void 0:s.message)===n.message});if(i)return i.props.repeatNum+=1,i.props.type=n.type,i.handler}if(o.isNumber(d.max)&&p.length>=d.max)return{close:()=>{}};const t=X(n,a);return p.push(t),t.handler};E.forEach(r=>{y[r]=(a={},n)=>{const t=z(a);return y({...t,type:r},n)}});function Y(r){const a=[...p];for(const n of a)(!r||r===n.props.type)&&n.handler.close()}y.closeAll=Y;y._context=null;const ee=o.withInstallFunction(y,"$message");exports.ElMessage=ee;exports.mutable=w;
1
+ "use strict";const e=require("vue"),o=require("./index-BZEbgud2.cjs"),V=r=>r,_=o.buildProps({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:o.definePropType([String,Object,Array])},offset:{type:o.definePropType(Array),default:[0,0]},badgeClass:{type:String}}),L=e.defineComponent({name:"ElBadge"}),D=e.defineComponent({...L,props:_,setup(r,{expose:a}){const n=r,t=o.useNamespace("badge"),i=e.computed(()=>n.isDot?"":o.isNumber(n.value)&&o.isNumber(n.max)?n.max<n.value?`${n.max}+`:`${n.value}`:`${n.value}`),f=e.computed(()=>{var s,c,g,v,m;return[{backgroundColor:n.color,marginRight:o.addUnit(-((c=(s=n.offset)==null?void 0:s[0])!=null?c:0)),marginTop:o.addUnit((v=(g=n.offset)==null?void 0:g[1])!=null?v:0)},(m=n.badgeStyle)!=null?m:{}]});return a({content:i}),(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(t).b())},[e.renderSlot(s.$slots,"default"),e.createVNode(e.Transition,{name:`${e.unref(t).namespace.value}-zoom-in-center`,persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("sup",{class:e.normalizeClass([e.unref(t).e("content"),e.unref(t).em("content",s.type),e.unref(t).is("fixed",!!s.$slots.default),e.unref(t).is("dot",s.isDot),e.unref(t).is("hide-zero",!s.showZero&&n.value===0),s.badgeClass]),style:e.normalizeStyle(e.unref(f))},[e.renderSlot(s.$slots,"content",{value:e.unref(i)},()=>[e.createTextVNode(e.toDisplayString(e.unref(i)),1)])],6),[[e.vShow,!s.hidden&&(e.unref(i)||s.isDot||s.$slots.content)]])]),_:3},8,["name"])],2))}});var F=o._export_sfc(D,[["__file","badge.vue"]]);const j=o.withInstall(F),H=o.buildProps({a11y:{type:Boolean,default:!0},locale:{type:o.definePropType(Object)},size:o.useSizeProp,button:{type:o.definePropType(Object)},experimentalFeatures:{type:o.definePropType(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:o.definePropType(Object)},zIndex:Number,namespace:{type:String,default:"el"},...o.useEmptyValuesProps}),d={};e.defineComponent({name:"ElConfigProvider",props:H,setup(r,{slots:a}){e.watch(()=>r.message,t=>{Object.assign(d,t??{})},{immediate:!0,deep:!0});const n=o.provideGlobalConfig(r);return()=>e.renderSlot(a,"default",{config:n==null?void 0:n.value})}});const w=["success","info","warning","error"],u=V({customClass:"",dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:o.isClient?document.body:void 0}),A=o.buildProps({customClass:{type:String,default:u.customClass},dangerouslyUseHTMLString:{type:Boolean,default:u.dangerouslyUseHTMLString},duration:{type:Number,default:u.duration},icon:{type:o.iconPropType,default:u.icon},id:{type:String,default:u.id},message:{type:o.definePropType([String,Object,Function]),default:u.message},onClose:{type:o.definePropType(Function),default:u.onClose},showClose:{type:Boolean,default:u.showClose},type:{type:String,values:w,default:u.type},plain:{type:Boolean,default:u.plain},offset:{type:Number,default:u.offset},zIndex:{type:Number,default:u.zIndex},grouping:{type:Boolean,default:u.grouping},repeatNum:{type:Number,default:u.repeatNum}}),R={destroy:()=>!0},p=e.shallowReactive([]),U=r=>{const a=p.findIndex(i=>i.id===r),n=p[a];let t;return a>0&&(t=p[a-1]),{current:n,prev:t}},Z=r=>{const{prev:a}=U(r);return a?a.vm.exposed.bottom.value:0},q=(r,a)=>p.findIndex(t=>t.id===r)>0?16:a,G=e.defineComponent({name:"ElMessage"}),W=e.defineComponent({...G,props:A,emits:R,setup(r,{expose:a,emit:n}){const t=r,{Close:i}=o.TypeComponents,f=e.ref(!1),{ns:s,zIndex:c}=o.useGlobalComponentSettings("message"),{currentZIndex:g,nextZIndex:v}=c,m=e.ref(),C=e.ref(!1),B=e.ref(0);let h;const z=e.computed(()=>t.type?t.type==="error"?"danger":t.type:"info"),M=e.computed(()=>{const l=t.type;return{[s.bm("icon",l)]:l&&o.TypeComponentsMap[l]}}),N=e.computed(()=>t.icon||o.TypeComponentsMap[t.type]||""),$=e.computed(()=>Z(t.id)),S=e.computed(()=>q(t.id,t.offset)+$.value),P=e.computed(()=>B.value+S.value),O=e.computed(()=>({top:`${S.value}px`,zIndex:g.value}));function T(){t.duration!==0&&({stop:h}=o.useTimeoutFn(()=>{b()},t.duration))}function k(){h==null||h()}function b(){C.value=!1,e.nextTick(()=>{var l;f.value||((l=t.onClose)==null||l.call(t),n("destroy"))})}function x({code:l}){l===o.EVENT_CODE.esc&&b()}return e.onMounted(()=>{T(),v(),C.value=!0}),e.watch(()=>t.repeatNum,()=>{k(),T()}),o.useEventListener(document,"keydown",x),o.useResizeObserver(m,()=>{B.value=m.value.getBoundingClientRect().height}),a({visible:C,bottom:P,close:b}),(l,ne)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(s).b("fade"),onBeforeEnter:I=>f.value=!0,onBeforeLeave:l.onClose,onAfterLeave:I=>l.$emit("destroy"),persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{id:l.id,ref_key:"messageRef",ref:m,class:e.normalizeClass([e.unref(s).b(),{[e.unref(s).m(l.type)]:l.type},e.unref(s).is("closable",l.showClose),e.unref(s).is("plain",l.plain),l.customClass]),style:e.normalizeStyle(e.unref(O)),role:"alert",onMouseenter:k,onMouseleave:T},[l.repeatNum>1?(e.openBlock(),e.createBlock(e.unref(j),{key:0,value:l.repeatNum,type:e.unref(z),class:e.normalizeClass(e.unref(s).e("badge"))},null,8,["value","type","class"])):e.createCommentVNode("v-if",!0),e.unref(N)?(e.openBlock(),e.createBlock(e.unref(o.ElIcon),{key:1,class:e.normalizeClass([e.unref(s).e("icon"),e.unref(M)])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(N))))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),e.renderSlot(l.$slots,"default",{},()=>[l.dangerouslyUseHTMLString?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),e.createElementVNode("p",{class:e.normalizeClass(e.unref(s).e("content")),innerHTML:l.message},null,10,["innerHTML"])],2112)):(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(e.unref(s).e("content"))},e.toDisplayString(l.message),3))]),l.showClose?(e.openBlock(),e.createBlock(e.unref(o.ElIcon),{key:2,class:e.normalizeClass(e.unref(s).e("closeBtn")),onClick:e.withModifiers(b,["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(i))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0)],46,["id"]),[[e.vShow,C.value]])]),_:3},8,["name","onBeforeEnter","onBeforeLeave","onAfterLeave"]))}});var J=o._export_sfc(W,[["__file","message.vue"]]);let K=1;const E=r=>{const a=!r||o.isString(r)||e.isVNode(r)||o.isFunction$1(r)?{message:r}:r,n={...u,...a};if(!n.appendTo)n.appendTo=document.body;else if(o.isString(n.appendTo)){let t=document.querySelector(n.appendTo);o.isElement(t)||(o.debugWarn("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body),n.appendTo=t}return o.isBoolean(d.grouping)&&!n.grouping&&(n.grouping=d.grouping),o.isNumber(d.duration)&&n.duration===3e3&&(n.duration=d.duration),o.isNumber(d.offset)&&n.offset===16&&(n.offset=d.offset),o.isBoolean(d.showClose)&&!n.showClose&&(n.showClose=d.showClose),n},Q=r=>{const a=p.indexOf(r);if(a===-1)return;p.splice(a,1);const{handler:n}=r;n.close()},X=({appendTo:r,...a},n)=>{const t=`message_${K++}`,i=a.onClose,f=document.createElement("div"),s={...a,id:t,onClose:()=>{i==null||i(),Q(m)},onDestroy:()=>{e.render(null,f)}},c=e.createVNode(J,s,o.isFunction$1(s.message)||e.isVNode(s.message)?{default:o.isFunction$1(s.message)?s.message:()=>s.message}:null);c.appContext=n||y._context,e.render(c,f),r.appendChild(f.firstElementChild);const g=c.component,m={id:t,vnode:c,vm:g,handler:{close:()=>{g.exposed.close()}},props:c.component.props};return m},y=(r={},a)=>{if(!o.isClient)return{close:()=>{}};const n=E(r);if(n.grouping&&p.length){const i=p.find(({vnode:f})=>{var s;return((s=f.props)==null?void 0:s.message)===n.message});if(i)return i.props.repeatNum+=1,i.props.type=n.type,i.handler}if(o.isNumber(d.max)&&p.length>=d.max)return{close:()=>{}};const t=X(n,a);return p.push(t),t.handler};w.forEach(r=>{y[r]=(a={},n)=>{const t=E(a);return y({...t,type:r},n)}});function Y(r){const a=[...p];for(const n of a)(!r||r===n.props.type)&&n.handler.close()}y.closeAll=Y;y._context=null;const ee=o.withInstallFunction(y,"$message");exports.ElMessage=ee;
@@ -1,8 +1,8 @@
1
1
  import { createElementBlock as d, openBlock as D, createElementVNode as A, renderSlot as R, defineComponent as Y, ref as k, resolveComponent as S, createVNode as C, withCtx as E, reactive as m, watch as M, unref as U, toDisplayString as c, createTextVNode as l } from "vue";
2
2
  import { _ as a } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
- import { u as O, l as H } from "./index-BH3F6_ql.js";
3
+ import { u as O, l as H } from "./index-BrXeR-w4.js";
4
4
  import { useRouter as P } from "vue-router";
5
- import "./request-BK6KCyS9.js";
5
+ import "./request-_jH8DsLJ.js";
6
6
  import { u as v, s as j } from "./menu-BIINB-0Y.js";
7
7
  const r = {}, h = { class: "header-wrapper" }, G = { class: "header-horizontal" }, b = { class: "header-logo" }, Z = { class: "header-cTitle" }, N = { class: "header-horizontal" }, W = { class: "header-eTitle" };
8
8
  function f(o, e) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-CVBCwf2F.cjs"),a=require("./index-BIRKKGuW.cjs"),l=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),r=e.ref([{label:"机构名称",value:"",name:"a0"}]),s=t=>{console.log("handleQueryChange",t)},c=e.ref([{key:"extraButton",contents:[{label:"新增"}]},{key:"rowButton",contents:[{label:"编辑"},{label:"删除"}]},{key:"tableIndex",contents:[]},{key:"header",contents:[{label:"机构名称"},{label:"机构类型",formType:"Select",options:[{label:"集团",value:"集团"},{label:"公司",value:"公司"},{label:"部门",value:"部门"},{label:"区域",value:"区域"},{label:"组",value:"组"}]},{label:"机构状态"},{label:"操作"}]},{key:"tableContents",contents:[["数设科技","集团","启动"],["开发部","部门","启动"],["国核","组","启动"]]}]),u=t=>{console.log("handleItemDataChange",t)},i=t=>{console.log("onDoubleClick",t)},d=(t,n)=>{console.log("onButtonClick",t,n)},b=Object.freeze(Object.defineProperty({__proto__:null,handleItemDataChange:u,handleQueryChange:s,itemData:c,onButtonClick:d,onDoubleClick:i,queryFormData:r},Symbol.toStringTag,{value:"Module"})),g={class:"role-wrapper"},h=e.defineComponent({__name:"index",setup(t){const n=e.reactive({...b});return e.onMounted(()=>{console.log("state",n)}),(m,p)=>(e.openBlock(),e.createElementBlock("div",g,[e.createVNode(o.ssForm,{class:"role-header",rowContents:n.queryFormData,isEnableWrap:!1,isEdit:!0,onChange:n.handleQueryChange},null,8,["rowContents","onChange"]),e.createVNode(a.ssTable,{class:"role-body",itemData:n.itemData,onChange:n.handleItemDataChange},null,8,["itemData","onChange"])]))}}),_=l._export_sfc(h,[["__scopeId","data-v-93a308ef"]]);exports.default=_;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-B9CeiT-K.cjs"),a=require("./index-BeUperzd.cjs"),l=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),r=e.ref([{label:"机构名称",value:"",name:"a0"}]),s=t=>{console.log("handleQueryChange",t)},c=e.ref([{key:"extraButton",contents:[{label:"新增"}]},{key:"rowButton",contents:[{label:"编辑"},{label:"删除"}]},{key:"tableIndex",contents:[]},{key:"header",contents:[{label:"机构名称"},{label:"机构类型",formType:"Select",options:[{label:"集团",value:"集团"},{label:"公司",value:"公司"},{label:"部门",value:"部门"},{label:"区域",value:"区域"},{label:"组",value:"组"}]},{label:"机构状态"},{label:"操作"}]},{key:"tableContents",contents:[["数设科技","集团","启动"],["开发部","部门","启动"],["国核","组","启动"]]}]),u=t=>{console.log("handleItemDataChange",t)},i=t=>{console.log("onDoubleClick",t)},d=(t,n)=>{console.log("onButtonClick",t,n)},b=Object.freeze(Object.defineProperty({__proto__:null,handleItemDataChange:u,handleQueryChange:s,itemData:c,onButtonClick:d,onDoubleClick:i,queryFormData:r},Symbol.toStringTag,{value:"Module"})),g={class:"role-wrapper"},h=e.defineComponent({__name:"index",setup(t){const n=e.reactive({...b});return e.onMounted(()=>{console.log("state",n)}),(m,p)=>(e.openBlock(),e.createElementBlock("div",g,[e.createVNode(o.ssForm,{class:"role-header",rowContents:n.queryFormData,isEnableWrap:!1,isEdit:!0,onChange:n.handleQueryChange},null,8,["rowContents","onChange"]),e.createVNode(a.ssTable,{class:"role-body",itemData:n.itemData,onChange:n.handleItemDataChange},null,8,["itemData","onChange"])]))}}),_=l._export_sfc(h,[["__scopeId","data-v-93a308ef"]]);exports.default=_;
@@ -0,0 +1,456 @@
1
+ import { ref as v, watch as Be, onMounted as Ze, createElementBlock as W, openBlock as R, createBlock as Ve, createVNode as Fe, createSlots as Me, withCtx as Z, Fragment as we, renderList as Le, createElementVNode as V, normalizeStyle as ea, toDisplayString as M, createCommentVNode as aa } from "vue";
2
+ import { g as ia, c as la, d as Re, s as Se } from "./menu-BIINB-0Y.js";
3
+ import { a as ra, b as sa, s as na } from "./index-DmZPczSP.js";
4
+ import { c as g } from "./cloneDeep-DDG2sYfV.js";
5
+ import { _ as oa } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
+ const He = (n, f) => {
7
+ const e = n.storage || sessionStorage, a = n.key || f.$id;
8
+ if (n.paths) {
9
+ const i = n.paths.reduce((o, t) => (o[t] = f.$state[t], o), {});
10
+ e.setItem(a, JSON.stringify(i));
11
+ } else
12
+ e.setItem(a, JSON.stringify(f.$state));
13
+ };
14
+ var da = ({ options: n, store: f }) => {
15
+ var e, a, i, o;
16
+ if ((e = n.persist) != null && e.enabled) {
17
+ const t = [{
18
+ key: f.$id,
19
+ storage: sessionStorage
20
+ }], b = (i = (a = n.persist) == null ? void 0 : a.strategies) != null && i.length ? (o = n.persist) == null ? void 0 : o.strategies : t;
21
+ b.forEach((O) => {
22
+ const m = O.storage || sessionStorage, $ = O.key || f.$id, j = m.getItem($);
23
+ j && (f.$patch(JSON.parse(j)), He(O, f));
24
+ }), f.$subscribe(() => {
25
+ b.forEach((O) => {
26
+ He(O, f);
27
+ });
28
+ });
29
+ }
30
+ };
31
+ const w = ia() || la();
32
+ w.use(da);
33
+ const fa = Re("formToTableComp", {
34
+ state: () => ({
35
+ selectArray: [],
36
+ selectString: ""
37
+ }),
38
+ actions: {
39
+ setSelectArray(n) {
40
+ this.selectArray = n;
41
+ },
42
+ setSelectString(n) {
43
+ this.selectString = n;
44
+ }
45
+ }
46
+ }), ca = Re("unit", {
47
+ state: () => ({
48
+ selectIndex: "",
49
+ selectMenu: "",
50
+ selectTitle: []
51
+ }),
52
+ actions: {
53
+ setSelectIndex(n) {
54
+ this.selectIndex = n;
55
+ },
56
+ setSelectMenu(n) {
57
+ this.selectMenu = n;
58
+ },
59
+ setSelectTitle(n) {
60
+ this.selectTitle = n;
61
+ }
62
+ }
63
+ }), ua = (n, f) => {
64
+ const e = f == null ? void 0 : f.split("-");
65
+ return Je(n, e);
66
+ }, Je = (n, f) => {
67
+ var i;
68
+ let e = n, a = f;
69
+ return Array.isArray(e) ? e = e == null ? void 0 : e[parseInt(g(a == null ? void 0 : a[0]))] : Array.isArray(e == null ? void 0 : e.children) && (e = (i = e == null ? void 0 : e.children) == null ? void 0 : i[parseInt(g(a == null ? void 0 : a[0]))]), a == null || a.shift(), (a == null ? void 0 : a.length) > 0 && (e = Je(e, a)), e;
70
+ }, ze = (n, f) => {
71
+ let e = n, a = f;
72
+ return Array.isArray(e) && (e = e == null ? void 0 : e.map((i, o) => {
73
+ if (Array.isArray(i)) {
74
+ let t = {};
75
+ return i = i == null ? void 0 : i.forEach((b, O) => {
76
+ var m;
77
+ (m = a == null ? void 0 : a[O]) != null && m.prop ? t[a[O].prop] = b : Array.isArray(b) && (t.children = ze(b, a));
78
+ }), Object.assign(t, { id: o });
79
+ } else
80
+ return i;
81
+ })), e;
82
+ }, Ke = (n, f, e) => {
83
+ let a = n, i = f;
84
+ return a = a == null ? void 0 : a.map((o, t) => {
85
+ var b, O;
86
+ return !Array.isArray(o) || !((b = i == null ? void 0 : i[t]) != null && b.label) && !e || (o.unshift(((O = i == null ? void 0 : i[t]) == null ? void 0 : O.label) ?? ""), o.some((m) => Array.isArray(m)) && (o = o == null ? void 0 : o.map((m) => {
87
+ var $;
88
+ return Array.isArray(m) && (m = Ke(m, ($ = i == null ? void 0 : i[t]) == null ? void 0 : $.children, e)), m;
89
+ }))), o;
90
+ }), a;
91
+ }, ha = (n, f, e) => {
92
+ if (f === "")
93
+ return n == null ? void 0 : n.filter((a) => (a == null ? void 0 : a.id) !== e);
94
+ {
95
+ const a = f.split("-");
96
+ return pa(n, a, e);
97
+ }
98
+ }, pa = (n, f, e) => {
99
+ let a = n, i = f;
100
+ return (i == null ? void 0 : i.length) === 0 ? a = a == null ? void 0 : a.filter((o) => o.id !== e) : a = a == null ? void 0 : a.map((o) => (o.id.toString() === (i == null ? void 0 : i[0]) && (i == null || i.shift(), o = Ue(o, i, e)), o)), a;
101
+ }, Ue = (n, f, e) => {
102
+ var o, t;
103
+ let a = n, i = f;
104
+ return (i == null ? void 0 : i.length) === 0 ? a.children = (o = a.children) == null ? void 0 : o.filter((b) => b.id !== e) : a.children = (t = a.children) == null ? void 0 : t.map((b) => (b.id.toString() === (i == null ? void 0 : i[0]) && (i == null || i.shift(), b = Ue(b, i, e)), b)), a;
105
+ }, ya = (n, f, e) => {
106
+ if (f === "")
107
+ return e;
108
+ {
109
+ const a = f.split("-");
110
+ return ta(n, a, e);
111
+ }
112
+ }, ta = (n, f, e) => {
113
+ let a = n, i = f;
114
+ return (i == null ? void 0 : i.length) === 0 ? a = e : a = a == null ? void 0 : a.map((o) => (o.id.toString() === (i == null ? void 0 : i[0]) && (i == null || i.shift(), o = We(o, i, e)), o)), a;
115
+ }, We = (n, f, e) => {
116
+ var o;
117
+ let a = n, i = f;
118
+ return (i == null ? void 0 : i.length) === 0 ? a.children = e : a.children = (o = a.children) == null ? void 0 : o.map((t) => (t.id.toString() === (i == null ? void 0 : i[0]) && (i == null || i.shift(), t = We(t, i, e)), t)), a;
119
+ }, H = v(0), G = (n) => (H.value++, n == null ? void 0 : n.map((e) => Array.isArray(e) ? G(e) : {
120
+ label: (e == null ? void 0 : e.label) ?? "",
121
+ prop: (e == null ? void 0 : e.label) === "操作" ? "operate" : (e == null ? void 0 : e.prop) ?? "a" + H.value,
122
+ width: e != null && e.width ? parseInt(e.width) : "",
123
+ fixed: (e == null ? void 0 : e.fixed) ?? void 0,
124
+ sortable: (e == null ? void 0 : e.sortable) ?? !1,
125
+ align: (e == null ? void 0 : e.align) ?? "center",
126
+ showOverflowTooltip: (e == null ? void 0 : e.showOverflowTooltip) ?? !0,
127
+ isNotDrag: (e == null ? void 0 : e.isNotDrag) ?? !1,
128
+ isEditCol: (e == null ? void 0 : e.isEditCol) ?? !1,
129
+ isOperate: (e == null ? void 0 : e.isOperate) ?? !1,
130
+ id: (e == null ? void 0 : e.id) ?? H.value,
131
+ type: (e == null ? void 0 : e.label) === "操作" ? "operate" : void 0,
132
+ formType: (e == null ? void 0 : e.formType) ?? "",
133
+ isHidden: e == null ? void 0 : e.isHidden,
134
+ options: (e == null ? void 0 : e.options) ?? [],
135
+ children: G(e.children) ?? void 0
136
+ })), ga = (n) => {
137
+ const f = [];
138
+ function e(a) {
139
+ if (Array.isArray(a))
140
+ for (const i of a)
141
+ !i.children || i.children.length === 0 ? f.push(i) : e(i.children);
142
+ }
143
+ return e(n), f;
144
+ }, Pe = (n) => g(n).map((e) => (Array.isArray(e) && (e = e.map((a) => (Array.isArray(a) ? a = G(a) : (a = {
145
+ label: (a == null ? void 0 : a.label) ?? "",
146
+ prop: (a == null ? void 0 : a.label) === "操作" ? "operate" : (a == null ? void 0 : a.prop) ?? "a" + H.value,
147
+ width: a != null && a.width ? parseInt(a.width) : "",
148
+ fixed: (a == null ? void 0 : a.fixed) ?? void 0,
149
+ sortable: (a == null ? void 0 : a.sortable) ?? !1,
150
+ align: (a == null ? void 0 : a.align) ?? "center",
151
+ showOverflowTooltip: (a == null ? void 0 : a.showOverflowTooltip) ?? !0,
152
+ isNotDrag: (a == null ? void 0 : a.isNotDrag) ?? !1,
153
+ isEditCol: (a == null ? void 0 : a.isEditCol) ?? !1,
154
+ isOperate: (a == null ? void 0 : a.isOperate) ?? !1,
155
+ id: (a == null ? void 0 : a.id) ?? H.value,
156
+ type: (a == null ? void 0 : a.label) === "操作" ? "operate" : void 0,
157
+ formType: (a == null ? void 0 : a.formType) ?? "",
158
+ isHidden: a == null ? void 0 : a.isHidden,
159
+ options: (a == null ? void 0 : a.options) ?? [],
160
+ children: G(a.children)
161
+ }, H.value++), a))), e)), L = (n, f) => {
162
+ var i;
163
+ if (f.length === 0) return n;
164
+ let e = n;
165
+ const a = parseInt(f[0]);
166
+ if (isNaN(a) || a < 0 || a >= e.length)
167
+ return null;
168
+ if (e = e[a], f.length - 1 === 0) {
169
+ if (e && Array.isArray(e[e.length - 1]))
170
+ return e[e.length - 1];
171
+ if (Array.isArray(e))
172
+ return e;
173
+ }
174
+ return e && Array.isArray(e[e.length - 1]) && (f.shift(), Array.isArray((i = e[e.length - 1]) == null ? void 0 : i[0]) ? e = L(e[e.length - 1], f) : e = L([e[e.length - 1]], f)), e;
175
+ }, Aa = { class: "table-content" }, ba = ["onClick"], Ta = {
176
+ key: 0,
177
+ class: "dialog-footer"
178
+ }, va = {
179
+ __name: "index",
180
+ props: {
181
+ itemData: {
182
+ type: Array,
183
+ default: () => []
184
+ },
185
+ childItemData: {
186
+ type: Array,
187
+ default: () => []
188
+ },
189
+ index: Number,
190
+ changedContent: {
191
+ type: Object,
192
+ default: () => {
193
+ }
194
+ }
195
+ },
196
+ emits: ["change", "contentChange", "onButtonClick"],
197
+ setup(n, { emit: f }) {
198
+ const e = n, a = f, i = v([]), o = v([]), t = v(""), b = v(), O = v(!0), m = v(0), $ = v(!1), j = v(""), B = v(!1), J = v([]), q = v(!1), I = v([]), Q = v([]), ee = v(), z = v(), Ge = fa(w), K = v(), U = ca(w), { selectIndex: ae, selectMenu: x, selectTitle: X } = Se(U), { selectString: F } = Se(Ge), qe = v(720), Ie = () => {
199
+ B.value = !1;
200
+ }, Qe = (r) => {
201
+ var c, y, l, u, T, k;
202
+ if (le(r), r != null && r.children && Array.isArray(r == null ? void 0 : r.children)) {
203
+ const p = !Array.isArray(X.value) && ((c = X.value) == null ? void 0 : c.key) !== "main" ? [] : X.value;
204
+ p.push({
205
+ key: x.value === "" ? (y = r == null ? void 0 : r.id) == null ? void 0 : y.toString() : x.value + "-" + ((l = r == null ? void 0 : r.id) == null ? void 0 : l.toString()),
206
+ value: r[(u = Object.keys(r)) == null ? void 0 : u.filter((A) => A !== "index" && A !== "id")[0]]
207
+ }), U.setSelectMenu(x.value === "" ? (T = r == null ? void 0 : r.id) == null ? void 0 : T.toString() : x.value + "-" + ((k = r == null ? void 0 : r.id) == null ? void 0 : k.toString())), U.setSelectTitle(p), U.setSelectIndex(e != null && e.index || (e == null ? void 0 : e.index) === 0 ? e == null ? void 0 : e.index.toString() : "");
208
+ }
209
+ }, ie = (r) => {
210
+ var y;
211
+ const c = (y = g(e.itemData)) == null ? void 0 : y.map((l) => ((l == null ? void 0 : l.key) === "tableContents" && (l.contents = r), l));
212
+ a("contentChange", {
213
+ contents: c,
214
+ index: e.index
215
+ });
216
+ };
217
+ Be(
218
+ () => e.changedContent,
219
+ () => {
220
+ var y, l;
221
+ if (!e.changedContent) return;
222
+ let r = (y = o.value) == null ? void 0 : y.map((u) => {
223
+ var T;
224
+ return u.id === ((T = e.changedContent) == null ? void 0 : T.id) && (u = {
225
+ ...e.changedContent,
226
+ id: e.changedContent.newId
227
+ }, delete u.newId), u;
228
+ });
229
+ const c = (l = e.itemData) == null ? void 0 : l.map((u) => ((u == null ? void 0 : u.key) === "tableContents" && (u.contents = r), u));
230
+ o.value = r, a("contentChange", {
231
+ contents: c,
232
+ index: e.index
233
+ }), a("change", {
234
+ content: r,
235
+ index: e == null ? void 0 : e.index,
236
+ buttonName: ""
237
+ });
238
+ },
239
+ { deep: !0, immediate: !0 }
240
+ );
241
+ const le = (r) => {
242
+ var c;
243
+ if (r != null && r.children && Array.isArray(r == null ? void 0 : r.children)) {
244
+ let y = [];
245
+ const l = g(ee.value);
246
+ (c = r == null ? void 0 : r.children) == null || c.forEach((u, T) => {
247
+ if (!Array.isArray(u))
248
+ y.push(u);
249
+ else {
250
+ let k = {};
251
+ u == null || u.forEach((p, A) => {
252
+ var P;
253
+ (P = l == null ? void 0 : l[A]) != null && P.prop ? k[l[A].prop] = p : Array.isArray(p) && (k.children = p);
254
+ }), y.push(Object.assign(k, { id: T }));
255
+ }
256
+ }), o.value = y;
257
+ }
258
+ }, re = (r, c) => {
259
+ var y;
260
+ if (t.value = "", q.value = !0, O.value = !0, a("onButtonClick", r, c), r === "删除") {
261
+ o.value = (y = g(o.value)) == null ? void 0 : y.filter((u) => (u == null ? void 0 : u.id) !== (c == null ? void 0 : c.id));
262
+ const l = ha(K.value, x.value, c == null ? void 0 : c.id);
263
+ ie(l), a("change", {
264
+ content: l,
265
+ singleContent: c,
266
+ index: e == null ? void 0 : e.index,
267
+ buttonName: r
268
+ });
269
+ } else r === "新增" ? (j.value = "新增", Y(""), B.value = !0) : r === "编辑" ? (j.value = "编辑", Y(c), B.value = !0) : r === "详情" && (j.value = "详情", Y(c), q.value = !1, O.value = !1, B.value = !0);
270
+ }, Y = (r) => {
271
+ var y;
272
+ const c = [];
273
+ (y = g(i.value)) == null || y.forEach((l, u) => {
274
+ l.label !== "" && (l == null ? void 0 : l.label) !== "操作" && c.push({
275
+ label: (l == null ? void 0 : l.label) ?? "",
276
+ name: (l == null ? void 0 : l.prop) ?? "t" + u,
277
+ type: !(l != null && l.formType) || (l == null ? void 0 : l.formType) === "" ? "Input" : l == null ? void 0 : l.formType,
278
+ value: (r == null ? void 0 : r[l == null ? void 0 : l.prop]) ?? "",
279
+ id: (l == null ? void 0 : l.id) ?? u,
280
+ contents: (l == null ? void 0 : l.options) ?? [],
281
+ width: 1,
282
+ isHidden: l == null ? void 0 : l.isHidden
283
+ });
284
+ }), r === "" || !r || (t.value = r == null ? void 0 : r.id), Q.value = c, console.log(111, Q.value);
285
+ };
286
+ Ze(() => {
287
+ });
288
+ const Xe = () => {
289
+ let r, c = g(o.value);
290
+ t.value === "" ? (m.value++, c.push(Object.assign(z.value, { id: m.value })), r = Object.assign(z.value, { id: m.value })) : c = c == null ? void 0 : c.map((l) => ((l == null ? void 0 : l.id) === t.value && (l = Object.assign(l, z.value), r = l), l)), o.value = c;
291
+ const y = ya(K.value, x.value, c);
292
+ ie(y), B.value = !1, a("change", {
293
+ content: y,
294
+ singleContent: r,
295
+ index: e == null ? void 0 : e.index,
296
+ buttonName: j.value
297
+ });
298
+ }, Ye = (r) => {
299
+ z.value = r;
300
+ };
301
+ return Be(
302
+ () => [e.itemData, F.value, ae.value, x.value],
303
+ () => {
304
+ var P, se, ne, oe, de, fe, ce, ue, he, pe, ye, te, ge, Ae, be, Te, ve, me, ke, De, Oe, Ee, xe, Ne, _e;
305
+ console.log(666, e.itemData);
306
+ const r = (P = g(e.itemData)) == null ? void 0 : P.filter((d) => (d == null ? void 0 : d.key) === "header"), c = (se = g(e.itemData)) == null ? void 0 : se.filter((d) => (d == null ? void 0 : d.key) === "tableIndexColumn")[0], y = (ne = g(e.itemData)) == null ? void 0 : ne.find((d) => (d == null ? void 0 : d.key) === "page"), l = (oe = g(e.itemData)) == null ? void 0 : oe.find((d) => (d == null ? void 0 : d.key) === "rowButton"), u = (de = g(e.itemData)) == null ? void 0 : de.find((d) => (d == null ? void 0 : d.key) === "extraButton"), T = (fe = g(e.itemData)) == null ? void 0 : fe.filter((d) => (d == null ? void 0 : d.key) === "tableContents"), k = (ce = g(e.itemData)) == null ? void 0 : ce.filter((d) => (d == null ? void 0 : d.key) === "tableIndex");
307
+ $.value = (y == null ? void 0 : y.contents) ?? !0;
308
+ let p = [];
309
+ F.value === "" ? p = r == null ? void 0 : r[0] : p = (r == null ? void 0 : r.find((d) => (d == null ? void 0 : d.selectLabel) === "(" + F.value + ")")) ?? (r == null ? void 0 : r.find((d) => !(d != null && d.selectLabel)));
310
+ let A = [];
311
+ if (F.value === "" ? A = k == null ? void 0 : k[0] : A = (k == null ? void 0 : k.find((d) => (d == null ? void 0 : d.selectLabel) === "(" + F.value + ")")) ?? (k == null ? void 0 : k.find((d) => !(d != null && d.selectLabel))), ((ue = p == null ? void 0 : p.contents) == null ? void 0 : ue.length) > 0) {
312
+ let d = [];
313
+ if (A != null && A.contents && ((he = A == null ? void 0 : A.contents) == null ? void 0 : he.length) !== 0 && d.push({
314
+ label: (c == null ? void 0 : c.contents) ?? "",
315
+ prop: "index",
316
+ sortable: !1
317
+ }), p != null && p.contents.some((h) => Array.isArray(h) && (h == null ? void 0 : h.find((s) => s.children)))) {
318
+ if (x.value === "")
319
+ d = (pe = Pe(g(p == null ? void 0 : p.contents))[0]) == null ? void 0 : pe.filter((h) => !Array.isArray(h));
320
+ else {
321
+ const h = x.value.split("-");
322
+ d = (ye = L(Pe(g(p == null ? void 0 : p.contents)), h)) == null ? void 0 : ye.filter((s) => !Array.isArray(s));
323
+ }
324
+ d.unshift({
325
+ label: (c == null ? void 0 : c.contents) ?? "",
326
+ prop: "index",
327
+ sortable: !1
328
+ });
329
+ } else {
330
+ const h = p != null && p.contents.some((s) => Array.isArray(s)) ? (te = p == null ? void 0 : p.contents) == null ? void 0 : te[0] : p == null ? void 0 : p.contents;
331
+ h == null || h.forEach((s, C) => {
332
+ (s == null ? void 0 : s.label) !== "" && d.push({
333
+ label: (s == null ? void 0 : s.label) ?? "",
334
+ prop: (s == null ? void 0 : s.label) === "操作" ? "operate" : (s == null ? void 0 : s.prop) ?? "a" + C,
335
+ width: s != null && s.width ? parseInt(s.width) : "",
336
+ fixed: (s == null ? void 0 : s.fixed) ?? void 0,
337
+ sortable: (s == null ? void 0 : s.sortable) ?? !1,
338
+ align: (s == null ? void 0 : s.align) ?? "center",
339
+ showOverflowTooltip: (s == null ? void 0 : s.showOverflowTooltip) ?? !0,
340
+ isNotDrag: (s == null ? void 0 : s.isNotDrag) ?? !1,
341
+ isEditCol: (s == null ? void 0 : s.isEditCol) ?? !1,
342
+ isOperate: (s == null ? void 0 : s.isOperate) ?? !1,
343
+ id: (s == null ? void 0 : s.id) ?? C,
344
+ type: (s == null ? void 0 : s.label) === "操作" ? "operate" : void 0,
345
+ formType: (s == null ? void 0 : s.formType) ?? "",
346
+ isHidden: s == null ? void 0 : s.isHidden,
347
+ options: (s == null ? void 0 : s.options) ?? []
348
+ });
349
+ });
350
+ }
351
+ i.value = d;
352
+ let S = (Ae = (ge = ga(g(i.value))) == null ? void 0 : ge.filter((h) => (h == null ? void 0 : h.type) !== "operate")) == null ? void 0 : Ae.map((h, s) => ({
353
+ prop: (h == null ? void 0 : h.prop) ?? "a" + s
354
+ }));
355
+ ee.value = S;
356
+ let D = [];
357
+ if (F.value === "" ? D = T == null ? void 0 : T[0] : D = (T == null ? void 0 : T.find((h) => (h == null ? void 0 : h.selectLabel) === "(" + F.value + ")")) ?? (T == null ? void 0 : T.find((h) => !(h != null && h.selectLabel))), ((be = D == null ? void 0 : D.contents) == null ? void 0 : be.length) !== 0) {
358
+ let h = Array.isArray((Te = D == null ? void 0 : D.contents) == null ? void 0 : Te[0]) && ((ve = D == null ? void 0 : D.contents) != null && ve[0].every((E) => Array.isArray(E))) ? (me = g(D == null ? void 0 : D.contents)) == null ? void 0 : me[0] : g(D == null ? void 0 : D.contents);
359
+ A != null && A.contents && ((ke = A == null ? void 0 : A.contents) == null ? void 0 : ke.length) !== 0 && (h = (De = g(h)) == null ? void 0 : De.map((E, je) => {
360
+ if (!Array.isArray(E)) {
361
+ let N = {};
362
+ for (let _ in E)
363
+ _ !== "id" && _ !== "index" && (N[_] = E[_]);
364
+ E = Object.values(N);
365
+ }
366
+ return E;
367
+ }));
368
+ const s = !!((Oe = i.value) != null && Oe.find((E) => E.prop === "index"));
369
+ h = Ke(g(h), A == null ? void 0 : A.contents, s);
370
+ const C = [];
371
+ h == null || h.forEach((E, je) => {
372
+ let N = {};
373
+ Array.isArray(E) ? E == null || E.forEach((_, Ce) => {
374
+ var $e;
375
+ ($e = S == null ? void 0 : S[Ce]) != null && $e.prop && !Array.isArray(_) ? N[S[Ce].prop] = _ : Array.isArray(_) && (N.children = ze(_, S));
376
+ }) : N = E, N.id ? C.push(N) : C.push(Object.assign(N, { id: je }));
377
+ }), o.value = C;
378
+ } else {
379
+ let h = (Ee = g(S)) == null ? void 0 : Ee.reduce((s, C) => (s[C.prop] = "测试数据", s), {});
380
+ b.value = h, o.value = [Object.assign({}, b.value, { id: m.value })];
381
+ }
382
+ } else
383
+ i.value = [], o.value = [];
384
+ if (((xe = l == null ? void 0 : l.contents) == null ? void 0 : xe.length) > 0 ? J.value = l == null ? void 0 : l.contents : J.value = [], ((Ne = u == null ? void 0 : u.contents) == null ? void 0 : Ne.length) > 0 ? I.value = u == null ? void 0 : u.contents : I.value = [], m.value = ((_e = o == null ? void 0 : o.value) == null ? void 0 : _e.length) ?? 0, ae.value !== "") {
385
+ const d = ua(g(o.value), x.value);
386
+ K.value = o.value, le(d);
387
+ } else
388
+ K.value = o.value;
389
+ },
390
+ { deep: !0, immediate: !0 }
391
+ ), (r, c) => {
392
+ var y;
393
+ return R(), W("div", Aa, [
394
+ (R(), Ve(ra, {
395
+ columns: i.value,
396
+ key: i.value,
397
+ tableData: o.value,
398
+ isShowPagination: $.value,
399
+ isShowEdit: !1,
400
+ isShowDelete: !1,
401
+ onDbClickRow: Qe,
402
+ extraButton: I.value,
403
+ onButtonClick: c[0] || (c[0] = (l) => re(l, ""))
404
+ }, Me({ _: 2 }, [
405
+ ((y = J.value) == null ? void 0 : y.length) > 0 ? {
406
+ name: "actions",
407
+ fn: Z(({ item: l }) => [
408
+ (R(!0), W(we, null, Le(J.value, (u, T) => (R(), W("div", { key: T }, [
409
+ V("div", {
410
+ style: ea({ color: u == null ? void 0 : u.textColor }),
411
+ class: "extra-button-label",
412
+ onClick: (k) => re(u == null ? void 0 : u.label, l)
413
+ }, M(u == null ? void 0 : u.label), 13, ba)
414
+ ]))), 128))
415
+ ]),
416
+ key: "0"
417
+ } : void 0
418
+ ]), 1032, ["columns", "tableData", "isShowPagination", "extraButton"])),
419
+ Fe(sa, {
420
+ title: j.value,
421
+ visible: B.value,
422
+ width: qe.value,
423
+ onBeforeDestroy: Ie
424
+ }, {
425
+ default: Z(() => [
426
+ Fe(na, {
427
+ rowContents: Q.value,
428
+ isEnableWrap: !1,
429
+ onChange: Ye,
430
+ isEdit: O.value
431
+ }, null, 8, ["rowContents", "isEdit"])
432
+ ]),
433
+ footer: Z(() => [
434
+ q.value ? (R(), W("div", Ta, [
435
+ V("div", {
436
+ onClick: c[1] || (c[1] = (l) => B.value = !1),
437
+ class: "cancel-button"
438
+ }, M("取消")),
439
+ V("div", {
440
+ class: "ok-button",
441
+ onClick: Xe
442
+ }, M("确认"))
443
+ ])) : aa("", !0)
444
+ ]),
445
+ _: 1
446
+ }, 8, ["title", "visible", "width"])
447
+ ]);
448
+ };
449
+ }
450
+ }, xa = /* @__PURE__ */ oa(va, [["__scopeId", "data-v-d7c918e5"]]);
451
+ export {
452
+ ca as a,
453
+ w as p,
454
+ xa as s,
455
+ fa as u
456
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),J=require("./index-CbphQpiC.cjs"),G=require("./index-B4WYIlOz.cjs"),$=require("./index-BIRKKGuW.cjs"),F=require("./modelComp-DY1RniW6.cjs"),I=require("./menu-B_Az9K_F.cjs"),T=require("./array-BYRvPg11.cjs");require("./index.vue_vue_type_style_index_0_scoped_77dec451_lang-CF5e1L_i.cjs");const P=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M=require("./cloneDeep-WwDap0fL.cjs"),L={class:"bread-content"},H=["onClick"],W={key:0},z={__name:"index",props:{breadArray:{type:Array,default:()=>[]}},emits:["click"],setup(g,{emit:D}){const t=g,_=e.ref([]),y=D;e.onMounted(()=>{_.value=t==null?void 0:t.breadArray}),e.watch(()=>t==null?void 0:t.breadArray,()=>{_.value=t==null?void 0:t.breadArray},{deep:!0,immediate:!0});const p=B=>{y("click",B)};return(B,C)=>(e.openBlock(),e.createElementBlock("div",L,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(f,h)=>(e.openBlock(),e.createElementBlock("div",{key:h,class:"bread-item"},[e.createElementVNode("div",{class:"bread-title",onClick:E=>p(f)},e.toDisplayString(f.value),9,H),h!==_.value.length-1&&Array.isArray(_.value)?(e.openBlock(),e.createElementBlock("div",W,e.toDisplayString("/"))):e.createCommentVNode("",!0)]))),128))]))}},K=P._export_sfc(z,[["__scopeId","data-v-ebb4c8e5"]]);function Q(g){var _,y,p,B;const D=(y=(_=g==null?void 0:g[0])==null?void 0:_.compData)==null?void 0:y.filter(C=>C.key!=="formContent"),t=(B=(p=g==null?void 0:g[0])==null?void 0:p.compData)==null?void 0:B.filter(C=>C.key==="formContent");console.log("handleFormModel:",D,t,g)}const X={class:"system-wrap"},Y={key:0,class:"show-content"},Z={key:0,class:"item-menu-content"},ee={key:0,class:"item-view-group"},te={__name:"index",props:{content:String,jsonContents:Array},emits:["change","contentChange"],setup(g,{emit:D}){const t=g,_=D,y=F.useModelComp($.pinia);$.useFormToTableComp($.pinia);const p=e.ref(!0),B=I.useMenuState(),C=e.ref(!0),{itemData:f}=I.storeToRefs(y),h=$.useUnit($.pinia),{activeMenuPath:E,activeMenuOpenPaths:O,menuTriggerType:U,menus:b}=I.storeToRefs(B),{selectIndex:x,selectTitle:m}=I.storeToRefs(h),w=e.ref([]),S=e.ref([]),V=n=>{var r,l,a;const o=(r=f.value)==null?void 0:r.find(u=>u.name===E.value);S.value=(a=(l=o==null?void 0:o.compData)==null?void 0:l[0])==null?void 0:a.contents,C.value=!0,C.value&&(C.value=!1),_("change",{wholeValue:w.value,editValue:n})},j=n=>{var c,s,v;const o=M.cloneDeep(w.value),r=o==null?void 0:o.map((i,d)=>(d===(n==null?void 0:n.index)&&(i.compData=n==null?void 0:n.contents),i));let l="";(s=(c=M.cloneDeep(r))==null?void 0:c.filter(i=>(i==null?void 0:i.comp)==="Form"))==null||s.forEach(i=>{var d;(d=i==null?void 0:i.compData)==null||d.forEach(k=>{var A;(k==null?void 0:k.key)==="formContent"&&((A=k==null?void 0:k.contents)==null||A.forEach(N=>{N.value!==""&&(l=l===""?N==null?void 0:N.value:l+"-"+(N==null?void 0:N.value))}))})});let a=m==null?void 0:m.value;(a==null?void 0:a.length)>0?a[0]={key:"main",value:l}:(Array.isArray(a)||(a=[]),a.push({key:"main",value:l})),h.setSelectTitle(a),p.value=!1,w.value=r;const u=(v=f.value)==null?void 0:v.map((i,d)=>{var k;return i.name===E.value&&(i.compData=(k=i.compData)==null?void 0:k.map(A=>((A==null?void 0:A.key)==="groupContents"&&(A.contents=w.value),A))),i});y.setItemData(u),C.value&&(C.value=!1),_("contentChange",{wholeContent:f.value})},q=n=>{var o,r;if((n==null?void 0:n.key)==="main"||m.value.length===1)h.setSelectIndex(""),h.setSelectMenu(""),h.setSelectTitle((o=m.value)==null?void 0:o[0]);else{const l=[];let a=-1;(r=m.value)==null||r.forEach((u,c)=>{(u==null?void 0:u.key)===(n==null?void 0:n.key)&&(a=c),(a===-1||a>=c)&&l.push(u)}),h.setSelectTitle(l),h.setSelectMenu(n==null?void 0:n.key)}};e.watch(()=>f.value,()=>{var o,r,l,a,u,c,s,v;if(!f.value||((o=f.value)==null?void 0:o.length)===0||!p.value)return;let n=null;if(!E.value&&Array.isArray(f.value))n=(l=(r=M.cloneDeep(f.value))==null?void 0:r.filter(i=>(i==null?void 0:i.comp)==="Group"))==null?void 0:l[0],B.setActiveMenuPath(n==null?void 0:n.name);else if(Array.isArray(f.value)){const i=(a=M.cloneDeep(f.value))==null?void 0:a.filter(d=>(d==null?void 0:d.comp)==="Group");n=i==null?void 0:i.find(d=>d.name===E.value)}S.value=(c=(u=n==null?void 0:n.compData)==null?void 0:u[0])==null?void 0:c.contents,w.value=(v=(s=n==null?void 0:n.compData)==null?void 0:s[0])==null?void 0:v.contents},{deep:!0,immediate:!0}),e.watch(()=>E.value,n=>{var o,r,l,a,u,c;if(n){const s=(o=M.cloneDeep(f.value))==null?void 0:o.find(v=>v.name===n);if(n&&s){S.value=(l=(r=s==null?void 0:s.compData)==null?void 0:r[0])==null?void 0:l.contents,w.value=(u=(a=s==null?void 0:s.compData)==null?void 0:a[0])==null?void 0:u.contents;const v=(c=S.value)==null?void 0:c.filter(i=>i.comp==="Form");Q(v)}else S.value=[],w.value=[];h.setSelectTitle([]),h.setSelectIndex(""),h.setSelectMenu("")}},{immediate:!0}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{var l,a,u,c;if(((l=t==null?void 0:t.jsonContents)==null?void 0:l.length)>0){y.setOriginalData(t==null?void 0:t.jsonContents),y.setItemData(t==null?void 0:t.jsonContents);return}if(!(t!=null&&t.content)||((a=t==null?void 0:t.content)==null?void 0:a.length)===0)return;p.value=!0;let n=[],o=[];h.setSelectTitle([]),h.setSelectIndex(""),h.setSelectMenu(""),(c=(u=t==null?void 0:t.content)==null?void 0:u.filter(s=>s!==""))==null||c.forEach(s=>{T.isExpandStringToJson(s)?o.push(T.expandStringToJson(s)):T.expandNewStringToJson(s)?o.push(T.expandNewStringToJson(s)):o.push(T.expandContentStringToJson(s))}),n=o==null?void 0:o[0];const r=Array.isArray(n)&&(n==null?void 0:n.find(s=>{var v;return((v=s.comp)==null?void 0:v.toUpperCase())==="MENU"}));B.setRawMenu(r??{}),y.setOriginalData(n),y.setItemData(n)},{deep:!0,immediate:!0});const R=n=>T.getComponent(n);return(n,o)=>{const r=e.resolveComponent("el-aside"),l=e.resolveComponent("router-view"),a=e.resolveComponent("el-main"),u=e.resolveComponent("el-container");return e.openBlock(),e.createElementBlock("div",X,[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(r,{width:"250px"},{default:e.withCtx(()=>[e.createVNode(G.default)]),_:1}),e.createVNode(a,null,{default:e.withCtx(()=>{var c,s,v,i;return[n.$route.path==="/"&&((c=S.value)==null?void 0:c.length)>0?(e.openBlock(),e.createElementBlock("div",Y,[Array.isArray(e.unref(m))&&((s=e.unref(m))==null?void 0:s.length)>1||Array.isArray(e.unref(m))&&!((v=e.unref(m))!=null&&v.find(d=>(d==null?void 0:d.key)==="main"))&&((i=e.unref(m))==null?void 0:i.length)===1||!Array.isArray(e.unref(m))&&e.unref(m).key!=="main"?(e.openBlock(),e.createElementBlock("div",Z,[(e.openBlock(),e.createBlock(K,{key:e.unref(m),breadArray:e.unref(m),onClick:q},null,8,["breadArray"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(d,k)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:k},[e.unref(x)===""||k.toString()===e.unref(x)?(e.openBlock(),e.createElementBlock("div",ee,e.toDisplayString(d.name),1)):e.createCommentVNode("",!0),e.unref(x)===""||k.toString()===e.unref(x)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(R(d.comp)),{itemData:d==null?void 0:d.compData,childItemData:d==null?void 0:d.itemChildData,key:k,onChange:V,index:k,onContentChange:j},null,40,["itemData","childItemData","index"])):e.createCommentVNode("",!0)]))),128))])])):(e.openBlock(),e.createBlock(l,{key:1}))]}),_:1})]),_:1})])}}},ne=P._export_sfc(te,[["__scopeId","data-v-7661c32b"]]),oe={class:"add-model-content"},ae={key:0,class:"model-import-data"},re={class:"import-button"},le={key:0},ce={key:1,class:"model-operate"},se={class:"model-select"},ue={class:"model-fill"},ie={key:2,class:"model-view"},de={__name:"index",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change","contentChange"],setup(g,{emit:D}){const t=g,_=D,y=e.ref([]),p=e.ref([]),B=e.ref([]),C=e.ref(0),f=F.useModelComp($.pinia),h=I.useMenuState($.pinia),{itemData:E,originalData:O}=I.storeToRefs(f),{activeMenuPath:U}=I.storeToRefs(h),b=e.ref(null),x=e.ref(0),m=e.ref([]),w=e.ref(""),S=e.ref(0),V=o=>{_("contentChange",o)},j=o=>{var l;const r=(l=M.cloneDeep(o==null?void 0:o.wholeValue))==null?void 0:l.map(a=>{var u;return(a==null?void 0:a.comp)==="Form"&&(a.compData=(u=a.compData)==null?void 0:u.map(c=>((c==null?void 0:c.key)==="formContent"&&(c.contents=T.arrayToNumberArray(c==null?void 0:c.contents)),c))),a});_("change",{originalContents:O.value,currentContents:o==null?void 0:o.wholeValue,editContent:o==null?void 0:o.editValue,arrayToContents:r})};e.watch(()=>p.value,()=>{S.value===p.value.length&&p.value.length!==0&&(y.value=p.value)},{deep:!0,immediate:!0});const q=()=>{b.value.click()},R=async o=>{const r=o.target.files;if(!r)return;new FileReader,y.value=[],p.value=[],S.value=r.length;const l=Array.from(r).map(async a=>await new Promise(u=>{const c=new FileReader;c.onload=s=>{try{p.value.push(s.target.result),m.value=n(s.target.result),x.value++}catch(v){console.error("解析失败:",v);return}},c.onerror=()=>u(`读取 ${a.name} 失败`),c.readAsText(a)}));await Promise.all(l)};e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{y.value=t.content,B.value=t==null?void 0:t.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>x.value,()=>{var o;((o=m.value)==null?void 0:o.length)!==0&&(f.setOriginalData(m.value),f.setItemData(m.value))},{deep:!0,immediate:!0});const n=o=>{let r=o.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");r=r.replace(/(\w+)\s*:/g,"$1:"),r=r.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),r=r.replace(/,\s*([}\]])/g,"$1"),r=r.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(r)}catch(l){try{const u=new Function(`return ${r}`)();if(Array.isArray(u)||typeof u=="object")return u;throw new Error(`解析结果不是有效的数组或对象: ${l}`)}catch(a){throw new Error(`无法解析JSON: ${a.message}`)}}};return(o,r)=>{var l;return e.openBlock(),e.createElementBlock("div",oe,[((l=t==null?void 0:t.jsonContents)==null?void 0:l.length)===0&&(t!=null&&t.showButton)?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",re,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:b,accept:".txt, .inm",onChange:R,style:{display:"none"},multiple:""},null,544),e.createElementVNode("button",{onClick:q,class:"import-button-content"},"导入文件"),w.value?(e.openBlock(),e.createElementBlock("span",le,e.toDisplayString(w.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",se,[e.createVNode(J.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:C.value},[e.createVNode(J.modelShow)])),e.createElementVNode("div",ue,[e.createVNode(J.modelFill)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="view"?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(ne,{content:y.value,onChange:j,jsonContents:B.value,onContentChange:V,key:C.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},me=P._export_sfc(de,[["__scopeId","data-v-77dec451"]]);exports.default=me;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),J=require("./index-BOMVVmWM.cjs"),G=require("./index-xFolZMqB.cjs"),$=require("./index-BeUperzd.cjs"),F=require("./modelComp-DY1RniW6.cjs"),I=require("./menu-B_Az9K_F.cjs"),T=require("./array-Bv_j-DQ6.cjs");require("./index.vue_vue_type_style_index_0_scoped_77dec451_lang-CF5e1L_i.cjs");const P=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M=require("./cloneDeep-BkHxCZQ6.cjs"),L={class:"bread-content"},H=["onClick"],W={key:0},z={__name:"index",props:{breadArray:{type:Array,default:()=>[]}},emits:["click"],setup(g,{emit:D}){const t=g,_=e.ref([]),y=D;e.onMounted(()=>{_.value=t==null?void 0:t.breadArray}),e.watch(()=>t==null?void 0:t.breadArray,()=>{_.value=t==null?void 0:t.breadArray},{deep:!0,immediate:!0});const p=B=>{y("click",B)};return(B,C)=>(e.openBlock(),e.createElementBlock("div",L,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(f,h)=>(e.openBlock(),e.createElementBlock("div",{key:h,class:"bread-item"},[e.createElementVNode("div",{class:"bread-title",onClick:E=>p(f)},e.toDisplayString(f.value),9,H),h!==_.value.length-1&&Array.isArray(_.value)?(e.openBlock(),e.createElementBlock("div",W,e.toDisplayString("/"))):e.createCommentVNode("",!0)]))),128))]))}},K=P._export_sfc(z,[["__scopeId","data-v-ebb4c8e5"]]);function Q(g){var _,y,p,B;const D=(y=(_=g==null?void 0:g[0])==null?void 0:_.compData)==null?void 0:y.filter(C=>C.key!=="formContent"),t=(B=(p=g==null?void 0:g[0])==null?void 0:p.compData)==null?void 0:B.filter(C=>C.key==="formContent");console.log("handleFormModel:",D,t,g)}const X={class:"system-wrap"},Y={key:0,class:"show-content"},Z={key:0,class:"item-menu-content"},ee={key:0,class:"item-view-group"},te={__name:"index",props:{content:String,jsonContents:Array},emits:["change","contentChange"],setup(g,{emit:D}){const t=g,_=D,y=F.useModelComp($.pinia);$.useFormToTableComp($.pinia);const p=e.ref(!0),B=I.useMenuState(),C=e.ref(!0),{itemData:f}=I.storeToRefs(y),h=$.useUnit($.pinia),{activeMenuPath:E,activeMenuOpenPaths:O,menuTriggerType:U,menus:b}=I.storeToRefs(B),{selectIndex:x,selectTitle:m}=I.storeToRefs(h),w=e.ref([]),S=e.ref([]),V=n=>{var r,l,a;const o=(r=f.value)==null?void 0:r.find(u=>u.name===E.value);S.value=(a=(l=o==null?void 0:o.compData)==null?void 0:l[0])==null?void 0:a.contents,C.value=!0,C.value&&(C.value=!1),_("change",{wholeValue:w.value,editValue:n})},j=n=>{var c,s,v;const o=M.cloneDeep(w.value),r=o==null?void 0:o.map((i,d)=>(d===(n==null?void 0:n.index)&&(i.compData=n==null?void 0:n.contents),i));let l="";(s=(c=M.cloneDeep(r))==null?void 0:c.filter(i=>(i==null?void 0:i.comp)==="Form"))==null||s.forEach(i=>{var d;(d=i==null?void 0:i.compData)==null||d.forEach(k=>{var A;(k==null?void 0:k.key)==="formContent"&&((A=k==null?void 0:k.contents)==null||A.forEach(N=>{N.value!==""&&(l=l===""?N==null?void 0:N.value:l+"-"+(N==null?void 0:N.value))}))})});let a=m==null?void 0:m.value;(a==null?void 0:a.length)>0?a[0]={key:"main",value:l}:(Array.isArray(a)||(a=[]),a.push({key:"main",value:l})),h.setSelectTitle(a),p.value=!1,w.value=r;const u=(v=f.value)==null?void 0:v.map((i,d)=>{var k;return i.name===E.value&&(i.compData=(k=i.compData)==null?void 0:k.map(A=>((A==null?void 0:A.key)==="groupContents"&&(A.contents=w.value),A))),i});y.setItemData(u),C.value&&(C.value=!1),_("contentChange",{wholeContent:f.value})},q=n=>{var o,r;if((n==null?void 0:n.key)==="main"||m.value.length===1)h.setSelectIndex(""),h.setSelectMenu(""),h.setSelectTitle((o=m.value)==null?void 0:o[0]);else{const l=[];let a=-1;(r=m.value)==null||r.forEach((u,c)=>{(u==null?void 0:u.key)===(n==null?void 0:n.key)&&(a=c),(a===-1||a>=c)&&l.push(u)}),h.setSelectTitle(l),h.setSelectMenu(n==null?void 0:n.key)}};e.watch(()=>f.value,()=>{var o,r,l,a,u,c,s,v;if(!f.value||((o=f.value)==null?void 0:o.length)===0||!p.value)return;let n=null;if(!E.value&&Array.isArray(f.value))n=(l=(r=M.cloneDeep(f.value))==null?void 0:r.filter(i=>(i==null?void 0:i.comp)==="Group"))==null?void 0:l[0],B.setActiveMenuPath(n==null?void 0:n.name);else if(Array.isArray(f.value)){const i=(a=M.cloneDeep(f.value))==null?void 0:a.filter(d=>(d==null?void 0:d.comp)==="Group");n=i==null?void 0:i.find(d=>d.name===E.value)}S.value=(c=(u=n==null?void 0:n.compData)==null?void 0:u[0])==null?void 0:c.contents,w.value=(v=(s=n==null?void 0:n.compData)==null?void 0:s[0])==null?void 0:v.contents},{deep:!0,immediate:!0}),e.watch(()=>E.value,n=>{var o,r,l,a,u,c;if(n){const s=(o=M.cloneDeep(f.value))==null?void 0:o.find(v=>v.name===n);if(n&&s){S.value=(l=(r=s==null?void 0:s.compData)==null?void 0:r[0])==null?void 0:l.contents,w.value=(u=(a=s==null?void 0:s.compData)==null?void 0:a[0])==null?void 0:u.contents;const v=(c=S.value)==null?void 0:c.filter(i=>i.comp==="Form");Q(v)}else S.value=[],w.value=[];h.setSelectTitle([]),h.setSelectIndex(""),h.setSelectMenu("")}},{immediate:!0}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{var l,a,u,c;if(((l=t==null?void 0:t.jsonContents)==null?void 0:l.length)>0){y.setOriginalData(t==null?void 0:t.jsonContents),y.setItemData(t==null?void 0:t.jsonContents);return}if(!(t!=null&&t.content)||((a=t==null?void 0:t.content)==null?void 0:a.length)===0)return;p.value=!0;let n=[],o=[];h.setSelectTitle([]),h.setSelectIndex(""),h.setSelectMenu(""),(c=(u=t==null?void 0:t.content)==null?void 0:u.filter(s=>s!==""))==null||c.forEach(s=>{T.isExpandStringToJson(s)?o.push(T.expandStringToJson(s)):T.expandNewStringToJson(s)?o.push(T.expandNewStringToJson(s)):o.push(T.expandContentStringToJson(s))}),n=o==null?void 0:o[0];const r=Array.isArray(n)&&(n==null?void 0:n.find(s=>{var v;return((v=s.comp)==null?void 0:v.toUpperCase())==="MENU"}));B.setRawMenu(r??{}),y.setOriginalData(n),y.setItemData(n)},{deep:!0,immediate:!0});const R=n=>T.getComponent(n);return(n,o)=>{const r=e.resolveComponent("el-aside"),l=e.resolveComponent("router-view"),a=e.resolveComponent("el-main"),u=e.resolveComponent("el-container");return e.openBlock(),e.createElementBlock("div",X,[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(r,{width:"250px"},{default:e.withCtx(()=>[e.createVNode(G.default)]),_:1}),e.createVNode(a,null,{default:e.withCtx(()=>{var c,s,v,i;return[n.$route.path==="/"&&((c=S.value)==null?void 0:c.length)>0?(e.openBlock(),e.createElementBlock("div",Y,[Array.isArray(e.unref(m))&&((s=e.unref(m))==null?void 0:s.length)>1||Array.isArray(e.unref(m))&&!((v=e.unref(m))!=null&&v.find(d=>(d==null?void 0:d.key)==="main"))&&((i=e.unref(m))==null?void 0:i.length)===1||!Array.isArray(e.unref(m))&&e.unref(m).key!=="main"?(e.openBlock(),e.createElementBlock("div",Z,[(e.openBlock(),e.createBlock(K,{key:e.unref(m),breadArray:e.unref(m),onClick:q},null,8,["breadArray"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(d,k)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:k},[e.unref(x)===""||k.toString()===e.unref(x)?(e.openBlock(),e.createElementBlock("div",ee,e.toDisplayString(d.name),1)):e.createCommentVNode("",!0),e.unref(x)===""||k.toString()===e.unref(x)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(R(d.comp)),{itemData:d==null?void 0:d.compData,childItemData:d==null?void 0:d.itemChildData,key:k,onChange:V,index:k,onContentChange:j},null,40,["itemData","childItemData","index"])):e.createCommentVNode("",!0)]))),128))])])):(e.openBlock(),e.createBlock(l,{key:1}))]}),_:1})]),_:1})])}}},ne=P._export_sfc(te,[["__scopeId","data-v-7661c32b"]]),oe={class:"add-model-content"},ae={key:0,class:"model-import-data"},re={class:"import-button"},le={key:0},ce={key:1,class:"model-operate"},se={class:"model-select"},ue={class:"model-fill"},ie={key:2,class:"model-view"},de={__name:"index",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change","contentChange"],setup(g,{emit:D}){const t=g,_=D,y=e.ref([]),p=e.ref([]),B=e.ref([]),C=e.ref(0),f=F.useModelComp($.pinia),h=I.useMenuState($.pinia),{itemData:E,originalData:O}=I.storeToRefs(f),{activeMenuPath:U}=I.storeToRefs(h),b=e.ref(null),x=e.ref(0),m=e.ref([]),w=e.ref(""),S=e.ref(0),V=o=>{_("contentChange",o)},j=o=>{var l;const r=(l=M.cloneDeep(o==null?void 0:o.wholeValue))==null?void 0:l.map(a=>{var u;return(a==null?void 0:a.comp)==="Form"&&(a.compData=(u=a.compData)==null?void 0:u.map(c=>((c==null?void 0:c.key)==="formContent"&&(c.contents=T.arrayToNumberArray(c==null?void 0:c.contents)),c))),a});_("change",{originalContents:O.value,currentContents:o==null?void 0:o.wholeValue,editContent:o==null?void 0:o.editValue,arrayToContents:r})};e.watch(()=>p.value,()=>{S.value===p.value.length&&p.value.length!==0&&(y.value=p.value)},{deep:!0,immediate:!0});const q=()=>{b.value.click()},R=async o=>{const r=o.target.files;if(!r)return;new FileReader,y.value=[],p.value=[],S.value=r.length;const l=Array.from(r).map(async a=>await new Promise(u=>{const c=new FileReader;c.onload=s=>{try{p.value.push(s.target.result),m.value=n(s.target.result),x.value++}catch(v){console.error("解析失败:",v);return}},c.onerror=()=>u(`读取 ${a.name} 失败`),c.readAsText(a)}));await Promise.all(l)};e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{y.value=t.content,B.value=t==null?void 0:t.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>x.value,()=>{var o;((o=m.value)==null?void 0:o.length)!==0&&(f.setOriginalData(m.value),f.setItemData(m.value))},{deep:!0,immediate:!0});const n=o=>{let r=o.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");r=r.replace(/(\w+)\s*:/g,"$1:"),r=r.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),r=r.replace(/,\s*([}\]])/g,"$1"),r=r.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(r)}catch(l){try{const u=new Function(`return ${r}`)();if(Array.isArray(u)||typeof u=="object")return u;throw new Error(`解析结果不是有效的数组或对象: ${l}`)}catch(a){throw new Error(`无法解析JSON: ${a.message}`)}}};return(o,r)=>{var l;return e.openBlock(),e.createElementBlock("div",oe,[((l=t==null?void 0:t.jsonContents)==null?void 0:l.length)===0&&(t!=null&&t.showButton)?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",re,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:b,accept:".txt, .inm",onChange:R,style:{display:"none"},multiple:""},null,544),e.createElementVNode("button",{onClick:q,class:"import-button-content"},"导入文件"),w.value?(e.openBlock(),e.createElementBlock("span",le,e.toDisplayString(w.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",se,[e.createVNode(J.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:C.value},[e.createVNode(J.modelShow)])),e.createElementVNode("div",ue,[e.createVNode(J.modelFill)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="view"?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(ne,{content:y.value,onChange:j,jsonContents:B.value,onContentChange:V,key:C.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},me=P._export_sfc(de,[["__scopeId","data-v-77dec451"]]);exports.default=me;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),D=require("./index-B9CeiT-K.cjs"),v=require("./index-BeUperzd.cjs"),r=require("./index-tXx4uqsB.cjs"),c=require("./menu-B_Az9K_F.cjs"),g=require("./index-ByH4hihL.cjs"),C=require("./modelComp-DY1RniW6.cjs"),_=require("vue-router"),k=require("./cloneDeep-BkHxCZQ6.cjs"),I=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S=c.useMenuState(),{activeMenuPath:i}=c.storeToRefs(S),x=n.ref([{label:"用户名称",value:"",name:"a0"}]),y=n.ref(!1),q=e=>{console.log("handleQueryChange",e)},A=n.ref([{key:"extraButton",contents:[{label:"新增"}]},{key:"rowButton",contents:[{label:"编辑"},{label:"删除",textColor:"red"}]},{key:"tableIndex",contents:[]},{key:"header",contents:[{label:"用户名称"},{label:"工号"},{label:"所属部门"},{label:"角色集合",formType:"multiSelect",options:[{label:"超级管理员",value:"超级管理员"},{label:"普通管理员",value:"普通管理员"}]},{label:"操作"}]},{key:"tableContents",contents:[["superAdmin","195467","集团","超级管理员"]]}]),B=e=>{var a;console.log("handleItemDataChange",e);const t=(a=e.content)==null?void 0:a.map(s=>Object.keys(s).filter(l=>l.startsWith("a")).map(l=>s[l]));f(t,e.buttonName)},M=e=>{console.log("onDoubleClick",e)},T=(e,t)=>{console.log("onButtonClick",e,t)},m=n.ref(),u=async(e,t)=>{var s;const a=await e(t);if(((s=a==null?void 0:a.data)==null?void 0:s.code)===200)return a.data.result},w=async()=>{var t;const e=await u(r.getInsofDataApi,{key:{compKey:i.value}});return{isExist:(e==null?void 0:e.length)>0,data:(t=e==null?void 0:e[0])==null?void 0:t.value.pageData}},E=async()=>{const e=await u(r.getInsofDataApi,{key:{compKey:i.value,layer:"superAdmin"}});console.log("getSuperAdminInfo",e)},f=(e,t)=>{y.value?u(r.updateInsofDataApi,{instanceId:1,unitDefinitionId:1,key:{compKey:i.value},value:{pageData:e}}).then(a=>{console.log(345,a),g.ElMessage.success(t+"成功"),setTimeout(()=>{m.value=null},2e3)}):u(r.createInsofDataApi,{instanceId:1,unitDefinitionId:1,key:{compKey:i.value,layer:"superAdmin"},value:{pageData:e}}).then(()=>{g.ElMessage.success(t+"成功"),setTimeout(()=>{m.value=null},2e3)})},O=Object.freeze(Object.defineProperty({__proto__:null,changedRow:m,getSuperAdminInfo:E,handleItemDataChange:B,handleQueryChange:q,handleSubmitAsync:u,isPageDataExist:y,onButtonClick:T,onDoubleClick:M,pageData:A,queryFormData:x,submitTableAsyncByVerify:f,verifySubmitDataExist:w},Symbol.toStringTag,{value:"Module"})),R={class:"role-wrapper"},P=n.defineComponent({__name:"index",setup(e){const t=c.useMenuState(),{menus:a,activeMenuPath:s}=c.storeToRefs(t),l=C.useModelComp(),{itemData:b}=c.storeToRefs(l),h=_.useRoute(),o=n.reactive({...O});return n.onMounted(()=>{const p=k.cloneDeep(b.value),d={comp:"Group",name:h.path,pageData:o.pageData};console.log(123,[...p,d]),l.setItemData([...p,d]),console.log("state",o),o.getSuperAdminInfo()}),(p,d)=>(n.openBlock(),n.createElementBlock("div",R,[n.createVNode(D.ssForm,{class:"role-header",rowContents:o.queryFormData,isEnableWrap:!1,isEdit:!0,onChange:o.handleQueryChange},null,8,["rowContents","onChange"]),n.createVNode(v.ssTable,{class:"role-body",itemData:o.pageData,onChange:o.handleItemDataChange,onOnButtonClick:o.onButtonClick},null,8,["itemData","onChange","onOnButtonClick"])]))}}),j=I._export_sfc(P,[["__scopeId","data-v-641714aa"]]);exports.default=j;
@@ -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";
2
+ import { s as U, g as M } from "./array-B1nKYchL.js";
3
+ import { p as V } from "./index-CosMCnZD.js";
4
+ import { E as j } from "./index-BrXeR-w4.js";
5
5
  import { u as w } from "./modelComp-CHWFvhCq.js";
6
6
  import { s as x } from "./menu-BIINB-0Y.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-DDG2sYfV.js";
9
9
  const q = { class: "type-select" }, z = ["onClick"], A = { class: "list-icon" }, G = {
10
10
  __name: "index",
11
11
  setup(N) {