@vancone/console-component 0.1.1-beta.4 → 0.1.1-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -2038,7 +2038,7 @@ const Be = (e) => {
|
|
|
2038
2038
|
if (s.mode !== "view" && ((u = C.formItemAttributes) == null ? void 0 : u.editable) === !1 || s.mode === "view" && ((c = C.formItemAttributes) == null ? void 0 : c.type) === "password")
|
|
2039
2039
|
return !1;
|
|
2040
2040
|
let E = (v = C.formItemAttributes) == null ? void 0 : v.showCondition;
|
|
2041
|
-
return E && E.field && E.value
|
|
2041
|
+
return E && E.field && E.value !== void 0 ? r[E.field] === E.value : _;
|
|
2042
2042
|
}
|
|
2043
2043
|
) : []);
|
|
2044
2044
|
Se([() => s.id, () => s.sessionId], () => {
|
|
@@ -2230,7 +2230,7 @@ const Be = (e) => {
|
|
|
2230
2230
|
]);
|
|
2231
2231
|
};
|
|
2232
2232
|
}
|
|
2233
|
-
}), lo = /* @__PURE__ */ pe(Fs, [["__scopeId", "data-v-
|
|
2233
|
+
}), lo = /* @__PURE__ */ pe(Fs, [["__scopeId", "data-v-83dfae03"]]), Gs = { class: "console-dialog__body" }, Ls = {
|
|
2234
2234
|
key: 0,
|
|
2235
2235
|
class: "process-view"
|
|
2236
2236
|
}, js = { class: "operation-button-wrapper" }, io = /* @__PURE__ */ _e({
|
|
@@ -8,4 +8,4 @@ Only state can be modified.`);i[0]="$state",Ce=!1,r.set(s,i,r.state.value),Ce=!0
|
|
|
8
8
|
state: () => new MyClass()
|
|
9
9
|
Found in store "${u.$id}".`),M&&s&&n.hydrate&&n.hydrate(u.$state,M),f=!0,b=!0,u}/*! #__NO_SIDE_EFFECTS__ */function pn(t,o,n){let r,a;const s=typeof o=="function";r=t,a=s?n:o;function i(l,c){const f=e.hasInjectionContext();if(l=(process.env.NODE_ENV==="test"&&Se&&Se._testing?null:l)||(f?e.inject(it,null):null),l&&xe(l),process.env.NODE_ENV!=="production"&&!Se)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
10
10
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
11
|
-
This will fail in production.`);l=Se,l._s.has(r)||(s?Qe(r,o,a,l):Vt(r,a,l),process.env.NODE_ENV!=="production"&&(i._pinia=l));const b=l._s.get(r);if(process.env.NODE_ENV!=="production"&&c){const _="__hot:"+r,S=s?Qe(_,o,a,l,!0):Vt(_,te({},a),l,!0);c._hotUpdate(S),delete l.state.value[_],l._s.delete(_)}if(process.env.NODE_ENV!=="production"&&_e){const _=e.getCurrentInstance();if(_&&_.proxy&&!c){const S=_.proxy,O="_pStores"in S?S._pStores:S._pStores={};O[r]=b}}return b}return i.$id=r,i}const fn=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,mn=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,un=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function hn(t,o){if(t==="__proto__"||t==="constructor"&&o&&typeof o=="object"&&"prototype"in o){gn(t);return}return o}function gn(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)}function _n(t,o={}){if(typeof t!="string")return t;const n=t.trim();if(t[0]==='"'&&t.endsWith('"')&&!t.includes("\\"))return n.slice(1,-1);if(n.length<=9){const r=n.toLowerCase();if(r==="true")return!0;if(r==="false")return!1;if(r==="undefined")return;if(r==="null")return null;if(r==="nan")return Number.NaN;if(r==="infinity")return Number.POSITIVE_INFINITY;if(r==="-infinity")return Number.NEGATIVE_INFINITY}if(!un.test(t)){if(o.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(fn.test(t)||mn.test(t)){if(o.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,hn)}return JSON.parse(t)}catch(r){if(o.strict)throw r;return t}}function bn(t,o){if(t==null)return;let n=t;for(let r=0;r<o.length;r++){if(n==null||n[o[r]]==null)return;n=n[o[r]]}return n}function Ke(t,o,n){if(n.length===0)return o;const r=n[0];return n.length>1&&(o=Ke(typeof t!="object"||t===null||!Object.prototype.hasOwnProperty.call(t,r)?Number.isInteger(Number(n[1]))?[]:{}:t[r],o,Array.prototype.slice.call(n,1))),Number.isInteger(Number(r))&&Array.isArray(t)?t.slice()[r]:Object.assign({},t,{[r]:o})}function Et(t,o){if(t==null||o.length===0)return t;if(o.length===1){if(t==null)return t;if(Number.isInteger(o[0])&&Array.isArray(t))return Array.prototype.slice.call(t,0).splice(o[0],1);const n={};for(const r in t)n[r]=t[r];return delete n[o[0]],n}if(t[o[0]]==null){if(Number.isInteger(o[0])&&Array.isArray(t))return Array.prototype.concat.call([],t);const n={};for(const r in t)n[r]=t[r];return n}return Ke(t,Et(t[o[0]],Array.prototype.slice.call(o,1)),[o[0]])}function St(t,o){return o.map(n=>n.split(".")).map(n=>[n,bn(t,n)]).filter(n=>n[1]!==void 0).reduce((n,r)=>Ke(n,r[1],r[0]),{})}function xt(t,o){return o.map(n=>n.split(".")).reduce((n,r)=>Et(n,r),t)}function Bt(t,{storage:o,serializer:n,key:r,debug:a,pick:s,omit:i,beforeHydrate:l,afterHydrate:c},f,b=!0){try{b&&(l==null||l(f));const _=o.getItem(r);if(_){const S=n.deserialize(_),O=s?St(S,s):S,M=i?xt(O,i):O;t.$patch(M)}b&&(c==null||c(f))}catch(_){a&&console.error("[pinia-plugin-persistedstate]",_)}}function Ot(t,{storage:o,serializer:n,key:r,debug:a,pick:s,omit:i}){try{const l=s?St(t,s):t,c=i?xt(l,i):l,f=n.serialize(c);o.setItem(r,f)}catch(l){a&&console.error("[pinia-plugin-persistedstate]",l)}}function yn(t,o,n){const{pinia:r,store:a,options:{persist:s=n}}=t;if(!s)return;if(!(a.$id in r.state.value)){const c=r._s.get(a.$id.replace("__hot:",""));c&&Promise.resolve().then(()=>c.$persist());return}const l=(Array.isArray(s)?s:s===!0?[{}]:[s]).map(o);a.$hydrate=({runHooks:c=!0}={})=>{l.forEach(f=>{Bt(a,f,t,c)})},a.$persist=()=>{l.forEach(c=>{Ot(a.$state,c)})},l.forEach(c=>{Bt(a,c,t),a.$subscribe((f,b)=>Ot(b,c),{detached:!0})})}function wn(t={}){return function(o){var n;yn(o,r=>{var a,s,i,l,c,f,b;return{key:(t.key?t.key:_=>_)((a=r.key)!=null?a:o.store.$id),debug:(i=(s=r.debug)!=null?s:t.debug)!=null?i:!1,serializer:(c=(l=r.serializer)!=null?l:t.serializer)!=null?c:{serialize:_=>JSON.stringify(_),deserialize:_=>_n(_)},storage:(b=(f=r.storage)!=null?f:t.storage)!=null?b:window.localStorage,beforeHydrate:r.beforeHydrate,afterHydrate:r.afterHydrate,pick:r.pick,omit:r.omit}},(n=t.auto)!=null?n:!1)}}var kn=wn();const Re=sn();Re.use(kn);const $t=pn("console",{state:()=>({menu:{collapsed:!0}}),persist:!0}),Cn={key:0,class:"menu-wrapper"},Xe=j(e.defineComponent({__name:"SideMenu",props:{menuCollapsed:{type:Boolean}},emits:["update:menuCollapsed"],setup(t,{emit:o}){$t(Re);const n=F.useRoute(),r=e.computed(()=>{var s;const a=n.meta.activeMenu;if(a==="{model}"){let i=n.params.app?`${n.params.app}/${n.params.model}`:n.params.model;return"/"+((s=rt[n.params.model])!=null?s:i)}else return a});return(a,s)=>{const i=e.resolveComponent("el-menu");return e.unref(ze).length>0?(e.openBlock(),e.createElementBlock("div",Cn,[e.createVNode(i,{class:"menu","default-active":r.value,router:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ze),l=>(e.openBlock(),e.createBlock(To,{key:l.path,menu:l},null,8,["menu"]))),128))]),_:1},8,["default-active"])])):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-c70ca2ba"]]),Nn={class:"container"},Pt=e.defineComponent({__name:"ConsoleApp",props:{title:{},helpDocUrl:{}},setup(t){const o=$t(Re),n=F.useRoute(),r=e.ref(o.menu.collapsed),a=e.ref(),s=t;return(i,l)=>{const c=e.resolveComponent("router-view"),f=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(n).query.embedded!=="true"?(e.openBlock(),e.createBlock(Ge,{key:0,title:s.title,helpDocUrl:s.helpDocUrl},null,8,["title","helpDocUrl"])):e.createCommentVNode("",!0),e.createElementVNode("div",Nn,[e.unref(n).query.embedded!=="true"?(e.openBlock(),e.createBlock(Xe,{key:0,menuCollapsed:r.value,"onUpdate:menuCollapsed":l[0]||(l[0]=b=>r.value=b)},null,8,["menuCollapsed"])):e.createCommentVNode("",!0),e.createVNode(f,{class:"main-scrollbar"},{default:e.withCtx(()=>[e.createElementVNode("main",{ref_key:"mainWrapperRef",ref:a,class:"main-wrapper"},[e.createVNode(c)],512)]),_:1})])],64)}}}),Vn={xmlns:"http://www.w3.org/2000/svg",width:"800",height:"800"};function En(t,o){return e.openBlock(),e.createElementBlock("svg",Vn,o[0]||(o[0]=[e.createStaticVNode('<defs><linearGradient id="a" x1="399.126" x2="399.126" y1="159.978" y2="715.47" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4f2fb"></stop><stop offset="1" stop-color="#e1eef5"></stop></linearGradient><linearGradient id="b" x1="481.607" x2="481.607" y1="594.251" y2="423.306" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".362" stop-color="#b4c9db"></stop><stop offset=".898" stop-color="#ecf0f9"></stop></linearGradient><linearGradient id="c" x1="114.87" x2="114.87" y1="540.843" y2="403.668" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".227" stop-color="#d0dceb"></stop><stop offset=".789" stop-color="#ecf1fb"></stop></linearGradient><linearGradient id="d" x1="114.872" x2="114.872" y1="418.9" y2="570.033" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ecf1fb"></stop><stop offset=".818" stop-color="#b6c9dd"></stop></linearGradient><linearGradient id="e" x1="615.999" x2="615.999" y1="449.321" y2="360.996" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".227" stop-color="#d0dceb"></stop><stop offset=".789" stop-color="#ecf1fb"></stop></linearGradient><linearGradient id="f" x1="616" x2="616" y1="370.804" y2="468.116" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ecf1fb"></stop><stop offset=".818" stop-color="#b6c9dd"></stop></linearGradient><linearGradient id="g" x1="672.709" x2="672.709" y1="544.867" y2="510.536" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".227" stop-color="#d0dceb"></stop><stop offset=".789" stop-color="#ecf1fb"></stop></linearGradient><linearGradient id="h" x1="672.77" x2="672.77" y1="514.871" y2="570.135" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ecf1fb"></stop><stop offset=".818" stop-color="#b6c9dd"></stop></linearGradient><linearGradient id="i" x1="461.917" x2="427.163" y1="86.714" y2="146.91" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ffdb80"></stop><stop offset="1" stop-color="#ffbb24"></stop></linearGradient><linearGradient id="j" x1="419.58" x2="419.58" y1="117.18" y2="174.634" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f9fafe"></stop><stop offset="1" stop-color="#e5edf7"></stop></linearGradient><linearGradient id="k" x1="-1967.352" x2="-2213.626" y1="525.737" y2="279.463" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".15" stop-color="#9fb6cc"></stop><stop offset="1" stop-color="#d5e1f2"></stop></linearGradient><linearGradient id="l" x1="-1980.099" x2="-2214.789" y1="526.438" y2="291.748" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".15" stop-color="#b6cadc"></stop><stop offset="1" stop-color="#dfe8f9"></stop></linearGradient><linearGradient id="m" x1="441.358" x2="329.96" y1="472.657" y2="361.259" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".15" stop-color="#9fb6cc"></stop><stop offset="1" stop-color="#bccde1"></stop></linearGradient><linearGradient id="n" x1="569.328" x2="454.912" y1="597.606" y2="483.19" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".15" stop-color="#afc5d8"></stop><stop offset="1" stop-color="#dfe8f9"></stop></linearGradient><linearGradient id="o" x1="562.331" x2="453.712" y1="598.807" y2="490.188" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#c7d4e5"></stop><stop offset=".687" stop-color="#e8eff8"></stop></linearGradient><linearGradient id="p" x1="219.375" x2="219.375" y1="553.783" y2="478.333" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#fad96e"></stop><stop offset="1" stop-color="#ffb32c"></stop></linearGradient><linearGradient id="q" x1="220.421" x2="220.421" y1="465.465" y2="489.367" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4ae98"></stop><stop offset="1" stop-color="#fad1bb"></stop></linearGradient><linearGradient id="r" x1="-840.016" x2="-828.333" y1="946.367" y2="864.11" gradientTransform="rotate(-8.082 -3028.264 -6569.32)" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#fad96e"></stop><stop offset="1" stop-color="#ffa91f"></stop></linearGradient><linearGradient id="s" x1="-7035.52" x2="-7023.838" y1="66.46" y2="-15.798" gradientTransform="scale(-1 1)rotate(-8.082 -118.132 -47761.005)" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#fad96e"></stop><stop offset="1" stop-color="#ffa91f"></stop></linearGradient><linearGradient id="t" x1="219.375" x2="219.375" y1="526.535" y2="574.482" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#275c89"></stop><stop offset="1" stop-color="#013f7c"></stop></linearGradient><linearGradient id="u" x1="6174.812" x2="6157.838" y1="595.174" y2="595.174" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4b9a4"></stop><stop offset=".652" stop-color="#fad1bb"></stop></linearGradient><linearGradient id="v" x1="196.36" x2="283.925" y1="576.466" y2="576.466" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#18264b"></stop><stop offset=".652" stop-color="#2d3c65"></stop></linearGradient><linearGradient id="w" x1="176.617" x2="176.617" y1="604.946" y2="586.928" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#4673bc"></stop><stop offset=".652" stop-color="#6a94e0"></stop></linearGradient><linearGradient id="x" x1="238.667" x2="255.641" y1="595.174" y2="595.174" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4b9a4"></stop><stop offset=".652" stop-color="#fad1bb"></stop></linearGradient><linearGradient id="y" x1="158.041" x2="245.606" y1="576.466" y2="576.466" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#445677"></stop><stop offset="1" stop-color="#293861"></stop></linearGradient><linearGradient id="z" x1="265.35" x2="265.35" y1="604.946" y2="586.928" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#4673bc"></stop><stop offset=".652" stop-color="#6a94e0"></stop></linearGradient><linearGradient id="A" x1="236.065" x2="204.828" y1="459.983" y2="459.983" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4b9a4"></stop><stop offset=".652" stop-color="#fad1bb"></stop></linearGradient><linearGradient id="B" x1="200.53" x2="236.795" y1="447.908" y2="447.908" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#4f5c7c"></stop><stop offset="1" stop-color="#274168"></stop></linearGradient></defs><path fill="url(#a)" d="M482.38 201.33c-38.37 30.29-120.74 33.81-181.17-2.22s-172-31.38-202.22 34.87 37.19 131.33 12.78 178.98S6.01 528.01 61.8 609.36s126.6 60.62 169.22 52.45c84.17-16.13 189.79 115.67 308.62 16.13 68.47-57.35 170.44 42.09 210.17-81.36 32.78-101.86-85.67-139.5-49.97-208.03 37.96-72.88 30.67-159.24-10.46-201.06-38.31-38.96-140.75-38.46-207 13.84"></path><path fill="url(#b)" d="M393.48 423.31h216.44l-22.53 49.03s59.19 57.86-14.13 121.91c-134.28-44.17-221.74-37.1-219.98-38.87 1.77-1.77 40.2-132.07 40.2-132.07"></path><path fill="url(#c)" d="M115.65 403.91s-.22-.57-.52.04c-2.7 5.49-27.15 64.96-29.09 110.86 0 0-4.08 26.37 30.11 26.02 28.54-.29 27.78-24.6 27.68-32.79-.38-33.22-28.18-104.13-28.18-104.13"></path><path fill="url(#d)" d="M114.87 570.03c-.55 0-1-.45-1-1V419.9c0-.55.45-1 1-1s1 .45 1 1v149.13c0 .56-.45 1-1 1"></path><path fill="url(#e)" d="M616.5 361.15s-.14-.37-.33.03c-1.74 3.53-17.48 41.83-18.73 71.38 0 0-2.63 16.98 19.39 16.76 18.38-.18 17.89-15.84 17.82-21.11-.25-21.4-18.15-67.06-18.15-67.06"></path><path fill="url(#f)" d="M616 468.12c-.36 0-.64-.29-.64-.64v-96.02c0-.36.29-.64.64-.64.36 0 .64.29.64.64v96.02c0 .35-.28.64-.64.64"></path><path fill="url(#g)" d="M689.88 527.7c0 9.48-7.69 17.17-17.17 17.17s-17.17-7.69-17.17-17.17 7.69-17.17 17.17-17.17 17.17 7.69 17.17 17.17"></path><path fill="url(#h)" d="M672.77 570.13c-.29 0-.53-.24-.53-.53v-54.2c0-.29.24-.53.53-.53s.53.24.53.53v54.21c0 .29-.24.52-.53.52"></path><path fill="url(#i)" d="M479.29 116.81c0 19.19-15.56 34.75-34.75 34.75s-34.75-15.56-34.75-34.75 15.56-34.75 34.75-34.75 34.75 15.56 34.75 34.75"></path><path fill="url(#j)" d="M464.32 135.76h-34.57c-2.23-10.61-11.65-18.58-22.93-18.58s-20.69 7.97-22.93 18.58h-9.05c-10.73 0-19.44 8.7-19.44 19.44 0 10.73 8.7 19.44 19.44 19.44h89.47c10.73 0 19.44-8.7 19.44-19.44s-8.7-19.44-19.43-19.44"></path><path fill="url(#k)" d="M235.65 388.64c0-24.52-.03-49.03.01-73.54.02-14.37 4.24-18.36 17.97-20.53 41.87-6.61 82.03-18.72 117.91-42.29 10.38-6.82 18.3-7.59 29.06-.47 34.85 23.06 73.26 37.11 114.55 42.8 13.12 1.81 16.84 5.88 16.85 19.25.04 45.72-.4 91.44.18 137.15.34 26.77-8.17 49.99-24.02 70.73-31.46 41.17-74.88 63.76-122.21 80.03-2.5.86-5.83.67-8.36-.23-38.47-13.74-74.58-31.84-104.15-61.09-22.97-22.73-37.84-49.56-37.79-83.22.03-22.87 0-45.73 0-68.59"></path><path fill="url(#l)" d="M234.76 396.09c0-23.21-.03-46.42.01-69.63.02-13.61 4.06-17.38 17.23-19.43 40.15-6.26 78.67-17.72 113.07-40.04 9.95-6.46 17.55-7.18 27.86-.44 33.42 21.83 70.25 35.14 109.84 40.52 12.58 1.71 16.14 5.56 16.15 18.22.03 43.28-.38 86.57.18 129.84.33 25.34-7.83 47.33-23.03 66.96-30.17 38.98-71.81 60.36-117.19 75.77-2.4.81-5.59.64-8.01-.22-36.89-13.01-71.52-30.14-99.87-57.84-22.03-21.52-36.28-46.91-36.23-78.78.02-21.65 0-43.29-.01-64.93"></path><path fill="url(#m)" d="M398.42 430.39c23.18-5.61 40.41-26.11 40.41-50.49 0-28.68-23.85-52.01-53.17-52.01s-53.17 23.33-53.17 52.01c0 24.38 17.24 44.88 40.41 50.49v85.2h25.52v-36.38h32.67v-24.96h-32.67zM358 379.91c0-14.91 12.41-27.05 27.65-27.05S413.3 365 413.3 379.91s-12.41 27.05-27.65 27.05S358 394.82 358 379.91"></path><path fill="#fff" d="M394.5 433.67c21.8-5.39 38.01-25.1 38.01-48.54 0-27.58-22.43-50.01-50.01-50.01s-50.01 22.43-50.01 50.01c0 23.44 16.21 43.15 38.01 48.54v81.92h24v-34.98h30.73v-24H394.5zm-38.01-48.54c0-14.34 11.67-26.01 26.01-26.01s26.01 11.67 26.01 26.01-11.67 26.01-26.01 26.01-26.01-11.67-26.01-26.01"></path><path fill="url(#n)" d="M593.02 540.4c0 44.68-36.22 80.9-80.9 80.9s-80.9-36.22-80.9-80.9 36.22-80.9 80.9-80.9 80.9 36.22 80.9 80.9"></path><path fill="url(#o)" d="M584.83 544.5c0 42.42-34.39 76.81-76.81 76.81s-76.81-34.39-76.81-76.81 34.39-76.81 76.81-76.81 76.81 34.39 76.81 76.81"></path><path fill="#fff" d="m525.32 542.26 23.01-23.01c4.44-4.44 4.44-11.63 0-16.06-4.44-4.44-11.63-4.44-16.06 0l-23.01 23.01-23.01-23.01c-4.44-4.44-11.63-4.44-16.06 0-4.44 4.44-4.44 11.63 0 16.06l23.01 23.01-23.01 23.01c-4.44 4.44-4.44 11.63 0 16.06 2.22 2.22 5.13 3.33 8.03 3.33s5.81-1.11 8.03-3.33l23.01-23.01 23.01 23.01c2.22 2.22 5.13 3.33 8.03 3.33s5.81-1.11 8.03-3.33c4.44-4.44 4.44-11.63 0-16.06z"></path><path fill="url(#p)" d="M211.59 478.69s-18.31-2.53-24.25 5.88c-5.95 8.41-8.12 29.95-8.12 29.95l13.78-.73-1.16 25.09 25.42 14.9 36.22-19.48-5.51-22.73 11.57-3.02s-3.45-32.99-19.55-28.12c-8.27.89-10.88.74-10.88.74s-2.18 6.94-9.65 6.35-7.87-8.83-7.87-8.83"></path><path fill="url(#q)" d="m213.42 468.32-3.8 16.97c-.18.8.24 1.61.99 1.92 1.97.8 5.9 2.16 9.95 2.16 4.2 0 8.16-2.3 9.98-3.53.63-.42.89-1.21.65-1.93l-5.82-17.31a1.68 1.68 0 0 0-1.88-1.12l-8.72 1.55c-.67.12-1.2.63-1.35 1.29"></path><path fill="url(#r)" d="M190.69 481.63c5.33-1.77 12.55-.59 12.85 11.37.29 11.95-11.42 31-7.22 37.63 4.25 6.71 13.34 16.25 19.12 21.68-1.34 6.38-4.98 11.75-4.98 11.75s-21.31-9.83-30.59-19.68-4.6-32.43-.3-48.5c3.24-12.12 11.12-14.25 11.12-14.25"></path><path fill="url(#s)" d="M246.53 481.63c-5.33-1.77-12.55-.59-12.85 11.37-.29 11.95 11.42 31 7.22 37.63-4.25 6.71-13.34 16.25-19.12 21.68 1.34 6.38 4.98 11.75 4.98 11.75s21.31-9.83 30.59-19.68 4.6-32.43.3-48.5c-3.24-12.12-11.12-14.25-11.12-14.25"></path><path fill="url(#t)" d="M193.27 574.48h51.74c2.34 0 4.44-1.78 5.25-4.45l10.43-34.31c1.35-4.45-1.35-9.19-5.25-9.19h-72.12c-3.86 0-6.57 4.65-5.28 9.09l9.96 34.31c.79 2.73 2.9 4.55 5.27 4.55"></path><path fill="#fff" d="M191.21 590.26s-.8-1.76-1.41-1.95c-.62-.19-9.46-.54-12.69-1.38s-12.54-2.16-16.52 1.61c-3.47 3.29-4.62 10.97.67 15.39 1.98 1.72 3.93 2.23 11.28 1.89s18-.27 20.34-3.67c-.09-5.63-1.67-11.89-1.67-11.89"></path><path fill="url(#u)" d="M199.42 588.31s-8.54 1.92-11.6 1.64c-3.05-.28-.5 12.02-.5 12.02s8.16.56 15.37-1.52c2.44-9.43-3.27-12.14-3.27-12.14"></path><path fill="url(#v)" d="m196.36 587.86 4.44 13.81s95.43-12.57 81.79-43.54c-11.4-25.89-86.23 29.73-86.23 29.73"></path><path fill="url(#w)" d="M190.1 588.93s3.5 1.37 3.94 6.24-1 8.15-8.43 9.05-9.32.56-13.98.68c-4.66.11-11.43.56-12.43-8.3s8.06-11.12 17.46-8.86c2.95.57 13.44 1.19 13.44 1.19"></path><path fill="#fff" d="M250.76 590.26s.8-1.76 1.41-1.95c.62-.19 9.46-.54 12.69-1.38s11.9-2.23 16.28 1.51c4.06 3.47 4.33 11.14-.3 15.37-1.98 1.72-4.07 2.35-11.42 2.01s-18-.27-20.34-3.67c.09-5.63 1.68-11.89 1.68-11.89"></path><path fill="url(#x)" d="M242.55 588.31s8.54 1.92 11.6 1.64.5 12.02.5 12.02-8.16.56-15.37-1.52c-2.45-9.43 3.27-12.14 3.27-12.14"></path><path fill="url(#y)" d="m245.61 587.86-4.44 13.81s-95.43-12.57-81.79-43.54c11.4-25.89 86.23 29.73 86.23 29.73"></path><path fill="url(#z)" d="M251.87 588.93s-3.5 1.37-3.94 6.24 1 8.15 8.43 9.05 9.32.56 13.98.68c4.66.11 11.43.56 12.43-8.3s-8.06-11.12-17.46-8.86c-2.96.57-13.44 1.19-13.44 1.19"></path><path fill="url(#A)" d="M235.39 461.53c.57-.81.93-2.88.46-3.48-.84-.68-1.63-.29-2.23.3.14-4.94-.31-9.05-.42-10.09-.31-3.03-3.39-8.58-13.46-8.58s-12.03 7.27-12.03 7.27-.66 5.14-.46 11.38c-.6-.57-1.39-.95-2.21-.28-.46.61-.1 2.68.46 3.48.57.81.93 2.73 1.03 3.79.1 1.01-.63 3.69 2.02 3.35 1.58 6.33 7.99 11.61 11.96 11.61 4.35 0 10.13-5.32 11.77-11.62 2.71.37 1.97-2.33 2.07-3.35.12-1.05.48-2.97 1.04-3.78"></path><path fill="url(#B)" d="M227 437.52s-1.97-6.19-9.5-4.71c-7.54 1.48-8.05 5.04-11 5.18-5.05.24-9.09 6.53-2.61 13.19 2.88 2.97.45 4.24 1.82 6.87s1.36 5.18 1.36 5.18 2.41-7.69.82-10.97c-.82-1.69 2.81-2.15 7.33-1.75s11.65-1.09 12.21-4.17c1.34 6.31 2.67 6.97 4.37 7.93s1.8 8.58 1.8 8.58.3-5.6 1.48-6.87c.98-2.07 2.88-10.2.73-12.17s-.35-8.29-8.81-6.29"></path>',33)]))}const Sn={render:En},xn={},Bn={class:"wrapper"},On={class:"content"};function $n(t,o){const n=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Bn,[o[4]||(o[4]=e.createElementVNode("img",{src:Sn},null,-1)),e.createElementVNode("div",On,[o[3]||(o[3]=e.createElementVNode("h1",null,"You have no permission to access the page.",-1)),e.createVNode(n,{type:"primary"},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("Apply")])),_:1}),e.createVNode(n,{onClick:o[0]||(o[0]=r=>t.$router.go(-1))},{default:e.withCtx(()=>o[2]||(o[2]=[e.createTextVNode("Go Back")])),_:1})])])}const It=j(xn,[["render",$n],["__scopeId","data-v-0155b361"]]),Pn={};function In(t,o){const n=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(n)}const Dt=j(Pn,[["render",In]]),Dn={class:"card-wrapper"},Mn=["onClick"],Tn={class:"card-inner-wrapper"},An={class:"card-title"},Un={class:"icon"},Ze=j(e.defineComponent({__name:"TabCard",props:{cards:{},tableRef:{}},setup(t){const{t:o}=pe.useI18n(),n=F.useRoute(),r=F.useRouter(),a=t,s=e.ref(a.cards[0].key);function i(l){l.disabled||(s.value=l.key,a.tableRef.updateConfigAndRefresh(l.model),r.push({path:n.path,query:Gt(Fe({},n.query),{tab:l.key})}))}return e.onMounted(()=>{let l;if(n.query.tab!==void 0){for(let c of a.cards)if(c.key===n.query.tab){s.value=c.key,l=c;break}}e.nextTick(()=>{a.tableRef&&a.cards&&a.cards.length>0&&a.tableRef.updateConfigAndRefresh((l!=null?l:a.cards[0]).model)})}),e.watch(()=>a.cards,l=>{if(n.query.tab!==void 0){for(let c of a.cards)if(c.key===n.query.tab){s.value=c.key;break}}else l&&l.length>0&&(s.value=l[0].key,a.tableRef.updateConfigAndRefresh(a.cards[0].model))},{deep:!0}),(l,c)=>(e.openBlock(),e.createElementBlock("div",Dn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.cards,f=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["card",{"card-selected":s.value===f.key}]),onClick:b=>i(f)},[e.createElementVNode("div",Tn,[e.createElementVNode("div",An,[e.createElementVNode("div",Un,[f.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.icon),{key:0,class:"svg-icon"})):e.createCommentVNode("",!0)]),e.createElementVNode("span",{style:e.normalizeStyle({color:f.disabled?"#aaa":"black"})},e.toDisplayString(e.unref(o)(f.label)),5)]),e.createElementVNode("span",null,e.toDisplayString(f.count),1)])],10,Mn))),256))]))}}),[["__scopeId","data-v-047a86e6"]]);function me(t,o,n){switch(o){case"POST":return v.post(t,n);case"PUT":return v.put(t,n);case"DELETE":return v.delete(t+"/"+n);default:return v.get(t,{params:n})}}const Be=t=>{const o=Object.keys(t);let n={};o.forEach(r=>{n[r]=void 0}),Object.assign(t,n)},Rn={key:1,class:"view-span"},Mt=j(e.defineComponent({__name:"FormView",props:{id:{},sessionId:{},mode:{},model:{},disableInline:{type:Boolean},closeDialogFunc:{type:Function},afterSubmitFunc:{type:Function}},emits:["update:id"],setup(t,{expose:o,emit:n}){const{t:r}=Ee.global,a=t,s=e.reactive({}),i=e.ref(!1),l=e.ref(),c=e.reactive({}),f=e.ref(!0),b=w=>a.mode==="view"&&(U(w,void 0)||U(w,"input")||U(w,"select")||U(w,"password")),_=e.computed(()=>a.model.fields?a.model.fields.filter(w=>{var V,p,d,h;let u=w.visible!==!1&&((V=w.formItemAttributes)==null?void 0:V.visible)!==!1;if(a.mode!=="view"&&((p=w.formItemAttributes)==null?void 0:p.editable)===!1||a.mode==="view"&&((d=w.formItemAttributes)==null?void 0:d.type)==="password")return!1;let C=(h=w.formItemAttributes)==null?void 0:h.showCondition;return C&&C.field&&C.value?(console.log("formData[cond.field]",s[C.field]),console.log("cond.value",C.value),s[C.field]===C.value):u}):[]);e.watch([()=>a.id,()=>a.sessionId],()=>{O()});function S(){const w=a.model.fields;let u={};w==null||w.forEach(C=>{var V,p,d,h,N,P,A,y,B;if(s[C.prop]=null,C.visible!==!1&&((V=C.formItemAttributes)==null?void 0:V.visible)!==!1){if(((p=C.formItemAttributes)==null?void 0:p.defaultValue)!==void 0?s[C.prop]=(d=C.formItemAttributes)==null?void 0:d.defaultValue:s[C.prop]=void 0,a.mode!=="view"){let G=(h=C.formItemAttributes)==null?void 0:h.validationRule;G!==void 0&&(u[C.prop]=G),Object.assign(c,u)}const g=C.formItemAttributes,m=g==null?void 0:g.type,k=(N=g==null?void 0:g.selectAttributes)==null?void 0:N.api,D=(P=g==null?void 0:g.selectAttributes)==null?void 0:P.valueMappingField,q=(A=g==null?void 0:g.selectAttributes)==null?void 0:A.labelMappingField;if(m==="select"&&k){let G=k;const K=(y=g==null?void 0:g.selectAttributes)==null?void 0:y.queryParamName,re=(B=g==null?void 0:g.selectAttributes)==null?void 0:B.queryParamValueField;K&&(G=`${G}?${K}=${a.id}`),re||me(G,"GET",{}).then(({data:X})=>{var Z;if((Z=C.formItemAttributes)!=null&&Z.selectAttributes){let H=[];Array.isArray(X.data)?H=X.data:X.data.list&&Array.isArray(X.data.list)&&(H=X.data.list),C.formItemAttributes.selectAttributes.options=H.map(L=>({value:D?L[D]:L.value,label:q?L[q]:L.label}))}})}}})}function O(){var w;console.log("init form",a.id,a.model),$(),f.value=(w=a.model.useI18n)!=null?w:!0,S(),(a.mode==="update"||a.mode==="view")&&a.id!==void 0&&a.id!==""&&a.model.api!==""&&(i.value=!0,me(`${a.model.api}/${a.id}`,"GET",{}).then(({data:u})=>{Be(s),Object.assign(s,u.data),i.value=!1}))}function M(){return new Promise((w,u)=>{var V,p,d,h;((p=(V=a.model.formConfig)==null?void 0:V.functions)==null?void 0:p.beforeSubmit)!==void 0&&Object.assign(s,(h=(d=a.model.formConfig)==null?void 0:d.functions)==null?void 0:h.beforeSubmit(s));let C=a.mode==="create"?"POST":"PUT";a.model.api&&me(a.model.api,C,s).then(({data:N})=>{var P,A,y,B;N.code===0&&(a.closeDialogFunc&&a.closeDialogFunc(),((A=(P=a.model.formConfig)==null?void 0:P.functions)==null?void 0:A.afterSubmit)!==void 0&&((B=(y=a.model.formConfig)==null?void 0:y.functions)==null||B.afterSubmit(N.data)),a.afterSubmitFunc&&a.afterSubmitFunc(),w())})})}function $(){var w;(w=l.value)==null||w.resetFields()}function I(w){return w.label?f?r(w.label):w.label:w.prop.slice(0,1).toUpperCase()+w.prop.slice(1).toLowerCase()}function E(w){var u,C,V,p;if(w){if(U(w,"select")){const d=(C=(u=w.tableColumnAttributes)==null?void 0:u.functions)==null?void 0:C.transformValue;if(d)return d(s[w.prop]);const h=(p=(V=w.formItemAttributes)==null?void 0:V.selectAttributes)==null?void 0:p.viewModeLabelField;if(h)return s[h]}return s[w.prop]}}function z(w){var u;return((u=w.formItemAttributes)==null?void 0:u.updatable)===!1&&a.mode==="update"}function T(w,u){var V,p;const C=(p=(V=u.formItemAttributes)==null?void 0:V.type)!=null?p:"input";switch(w){case"input":return a.mode==="view"?!1:C==="input"||C==="password";case"select":return!0;default:return console.log("Error: unrecognized form component type: ",w),!0}}function U(w,u){var C;return((C=w.formItemAttributes)==null?void 0:C.type)===u}function Y(w){var u;for(let C of a.model.fields){const V=(u=C.formItemAttributes)==null?void 0:u.selectAttributes;if(!(!C.formItemAttributes||C.formItemAttributes.type!=="select"||!V||!V.queryParamValueField)&&V.queryParamValueField===w.prop){const p=V.api;if(p){let d=p;const h=V.queryParamName;h&&(d=`${d}?${h}=${s[V.queryParamValueField]}`),me(d,"GET",{}).then(({data:N})=>{if(V){let P=[];Array.isArray(N.data)?P=N.data:N.data.list&&Array.isArray(N.data.list)&&(P=N.data.list),V.options=P.map(A=>({value:V.valueMappingField?A[V.valueMappingField]:A.value,label:V.labelMappingField?A[V.labelMappingField]:A.label}))}})}}}}return e.onMounted(()=>{O()}),o({refresh:O,reset:$,submit:M,formData:s}),(w,u)=>{const C=e.resolveComponent("el-input"),V=e.resolveComponent("el-switch"),p=e.resolveComponent("el-date-picker"),d=e.resolveComponent("el-option"),h=e.resolveComponent("el-select"),N=e.resolveComponent("el-form-item"),P=e.resolveComponent("el-form"),A=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createBlock(P,{ref_key:"formRef",ref:l,model:s,rules:c,"label-width":"auto","label-position":"left","require-asterisk-position":"right",inline:!a.disableInline},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,y=>(e.openBlock(),e.createBlock(N,{class:"form-item",style:e.normalizeStyle({width:a.disableInline?"100%":"calc(50% - 32px)"}),prop:y.prop,label:I(y)},{default:e.withCtx(()=>{var B;return[T("input",y)?(e.openBlock(),e.createBlock(C,{key:0,type:U(y,"password")?"password":"text",modelValue:s[y.prop],"onUpdate:modelValue":g=>s[y.prop]=g,placeholder:(B=y.formItemAttributes)==null?void 0:B.placeholder,disabled:z(y)},null,8,["type","modelValue","onUpdate:modelValue","placeholder","disabled"])):e.createCommentVNode("",!0),b(y)?(e.openBlock(),e.createElementBlock("span",Rn,e.toDisplayString(E(y)),1)):e.createCommentVNode("",!0),U(y,"switch")?(e.openBlock(),e.createBlock(V,{key:2,modelValue:s[y.prop],"onUpdate:modelValue":g=>s[y.prop]=g},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0),U(y,"datepicker")?(e.openBlock(),e.createBlock(p,{key:3,type:"date",modelValue:s[y.prop],"onUpdate:modelValue":g=>s[y.prop]=g},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0),U(y,"select")&&w.mode!=="view"?(e.openBlock(),e.createBlock(h,{key:4,modelValue:s[y.prop],"onUpdate:modelValue":g=>s[y.prop]=g,disabled:z(y),onChange:g=>Y(y)},{default:e.withCtx(()=>{var g,m;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((m=(g=y.formItemAttributes)==null?void 0:g.selectAttributes)==null?void 0:m.options,k=>(e.openBlock(),e.createBlock(d,{value:k.value,label:k.label},null,8,["value","label"]))),256))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["style","prop","label"]))),256))]),_:1},8,["model","rules","inline"])),[[A,i.value]])}}}),[["__scopeId","data-v-f97054ef"]]),Fn={class:"console-dialog__body"},Ln={key:0,class:"process-view"},Gn={class:"operation-button-wrapper"},Tt=e.defineComponent({__name:"FormDialog",props:{id:{},mode:{},model:{},visible:{type:Boolean},showProcess:{type:Boolean},afterSubmitFunc:{type:Function}},emits:["update:visible","update:id"],setup(t,{expose:o,emit:n}){const{t:r}=pe.useI18n(),a=t,s=e.ref(0),i=n,l=e.ref();e.watch(()=>a.visible,()=>{a.visible&&s.value++});function c(){l.value&&l.value.refresh()}function f(){i("update:visible",!1),l.value.reset()}function b(){l.value.submit()}return o({close:f,refresh:c}),(_,S)=>{const O=e.resolveComponent("el-step"),M=e.resolveComponent("el-steps"),$=e.resolveComponent("el-button"),I=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(I,{class:"console-dialog",title:"Edit","align-center":"","model-value":a.visible,width:"800px",onClose:f},{footer:e.withCtx(()=>{var E;return[e.createElementVNode("div",{class:"dialog-footer",style:e.normalizeStyle({width:a.showProcess?"calc(100% - 350px)":"auto"})},[e.createElementVNode("div",Gn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((E=a.model.formConfig)==null?void 0:E.dialogButtons,z=>(e.openBlock(),e.createBlock($,{onClick:T=>z.function(l.value.formData)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)(z.label)),1)]),_:2},1032,["onClick"]))),256))]),e.createElementVNode("div",null,[e.createVNode($,{onClick:f},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("common.basic.cancel")),1)]),_:1}),e.createVNode($,{type:"primary",onClick:b},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("common.basic.save")),1)]),_:1})])],4)]}),default:e.withCtx(()=>[e.createElementVNode("div",Fn,[e.createVNode(Mt,{class:"form-view",style:e.normalizeStyle({width:_.showProcess?"calc(100% - 280px)":"100%"}),ref_key:"formViewRef",ref:l,id:a.id,sessionId:s.value,mode:a.mode,model:a.model,afterSubmitFunc:a.afterSubmitFunc,closeDialogFunc:f,disableInline:a.showProcess},null,8,["style","id","sessionId","mode","model","afterSubmitFunc","disableInline"]),_.showProcess?(e.openBlock(),e.createElementBlock("div",Ln,[S[0]||(S[0]=e.createElementVNode("h1",null,"流程动态",-1)),e.createVNode(M,{style:{height:"90%"},direction:"vertical",active:1},{default:e.withCtx(()=>[e.createVNode(O,{title:"Step 1"}),e.createVNode(O,{title:"Step 2"})]),_:1})])):e.createCommentVNode("",!0)])]),_:1},8,["model-value"])}}}),zn={class:"toolbar"},jn={class:"tool-buttons"},qn={class:"tool-buttons"},Hn={key:2},Oe=j(e.defineComponent({__name:"TableView",props:{model:{}},setup(t,{expose:o}){const{t:n}=Ee.global,r=t,a=e.reactive([]),s=e.reactive({showPane:!0}),i=e.ref(""),l=e.ref(!0),c=e.ref(!1),f=F.useRouter(),b=e.ref(""),_=e.reactive([]),S=e.reactive([]),O=e.ref(),M=e.ref([]),$=e.ref("create"),I=e.ref(!0),E=e.ref(!1),z=e.ref(""),T=e.reactive({pageSize:10,pageNo:1,totalElements:0}),U=e.computed(()=>a.filter(m=>{var k,D;return((k=m.formItemAttributes)==null?void 0:k.type)!=="password"&&m.visible!==!1&&((D=m.tableColumnAttributes)==null?void 0:D.visible)!==!1}));function Y(m,k){var K,re,X,Z;let D=k.row[m.prop];const q=(re=(K=m.tableColumnAttributes)==null?void 0:K.functions)==null?void 0:re.transformValue,G=(X=m.tableColumnAttributes)==null?void 0:X.transformValueMappings;if(q)D=q(D);else if(G&&G.length>0){for(let H of G)if(D===H.value){D=n(H.label);break}}else if(((Z=m.formItemAttributes)==null?void 0:Z.type)==="select"){const H=m.formItemAttributes.selectAttributes;if(H){if(H.viewModeLabelField)D=k.row[H.viewModeLabelField];else if(H.options&&H.options.length>0){for(let L of H.options)if(L.value===k.row[m.prop]){D=L.label;break}}}}return D}function w(m,k){var D,q;return m.label?n(m.label):(q=(D=m.functions)==null?void 0:D.transformLabel)==null?void 0:q.call(D,k.$index,k.row)}function u(m){Be(r.model),Object.assign(r.model,m)}function C(){var k,D,q;if(I.value=!0,!r.model||!r.model.api)return;Be(s),s.showPane=!0,Object.assign(s,(k=r.model.tableConfig)!=null?k:{}),a.splice(0,a.length,...r.model.fields),i.value=(D=r.model.route)!=null?D:"",l.value=(q=r.model.useI18n)!=null?q:!0;let m=Fe({},s.queryParams);m.pageSize=T.pageSize,m.pageNo=T.pageNo,m.search=b.value,me(r.model.api,"GET",m).then(({data:G})=>{const{list:K,totalCount:re}=G.data;_.splice(0,_.length,...K),T.totalElements=re,I.value=!1})}function V(){var m,k;s.createPageRoutePath!==void 0?f.push(s.createPageRoutePath):((m=s.functions)==null?void 0:m.create)!==void 0?(k=s.functions)==null||k.create():($.value="create",z.value="",c.value=!0)}function p(m,k){r.model.api&&me(r.model.api,"DELETE",k.id).then(({data:D})=>{D.code===0&&(c.value=!1,C())})}function d(){he.ElMessageBox.confirm("The selected items will be deleted. Continue?",n("common.table.warning"),{confirmButtonText:n("common.basic.confirm"),cancelButtonText:n("common.basic.cancel"),type:"warning"}).then(()=>{var m,k;if(((m=s.functions)==null?void 0:m.batchDelete)!==void 0)(k=s.functions)==null||k.batchDelete(M.value);else{const D=M.value.map(q=>q.id);v.delete(`${r.model.api}/${D.join(",")}`).then(({data:q})=>{q.code===0&&(c.value=!1,C())})}O.value.clearSelection()}).catch(()=>{O.value.clearSelection()})}function h(m){T.pageSize=m,C()}function N(m){T.pageNo=m,C()}function P(m,k){s.editPageRoutePath!==void 0?f.push({path:s.editPageRoutePath,query:{id:k.id}}):(z.value=k.id,$.value="update",c.value=!0)}function A(){let m=window.location.origin+r.model.api+"/export";const k=s.queryParams;k!==void 0&&Object.keys(k).length>0&&(m+="?",Object.entries(s.queryParams).map(D=>{m+=`${D[0]}=${D[1]}&`})),window.open(m)}function y(m){M.value=m}function B(m){return m.label?l.value?n(m.label):m.label:m.prop.slice(0,1).toUpperCase()+m.prop.slice(1).toLowerCase()}function g(m){m?(E.value=!0,S.splice(0,S.length,..._),_.splice(0,_.length,...M.value)):(E.value=!1,_.splice(0,_.length,...S))}return e.watch(()=>r.model,()=>{C()},{deep:!0,immediate:!0}),o({multipleSelection:M,refresh:C,updateConfigAndRefresh:u}),(m,k)=>{const D=e.resolveComponent("el-checkbox"),q=e.resolveComponent("el-badge"),G=e.resolveComponent("el-button"),K=e.resolveComponent("el-icon"),re=e.resolveComponent("el-tooltip"),X=e.resolveComponent("el-input"),Z=e.resolveComponent("el-table-column"),H=e.resolveComponent("router-link"),L=e.resolveComponent("el-tag"),le=e.resolveComponent("el-popconfirm"),ce=e.resolveComponent("el-table"),$e=e.resolveComponent("el-pagination"),or=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"table-view-wrapper":s.showPane})},[e.createElementVNode("div",zn,[e.createElementVNode("div",jn,[s.selectMode?(e.openBlock(),e.createBlock(q,{key:0,value:M.value.length,type:"primary",class:"selected-badge"},{default:e.withCtx(()=>[e.createVNode(D,{class:"selected-checkbox",border:!0,label:e.unref(n)("common.table.viewSelected"),onChange:g},null,8,["label"])]),_:1},8,["value"])):e.createCommentVNode("",!0),!s.selectMode&&!s.readOnly&&s.creatable!==!1?(e.openBlock(),e.createBlock(G,{key:1,type:"primary",onClick:V},{default:e.withCtx(()=>{var Q,R;return[e.createTextVNode(e.toDisplayString(((Q=s.labels)==null?void 0:Q.create)!=null?e.unref(n)((R=s.labels)==null?void 0:R.create):e.unref(n)("common.table.create")),1)]}),_:1})):e.createCommentVNode("",!0),!s.selectMode&&!s.readOnly&&s.deletable!==!1?(e.openBlock(),e.createBlock(G,{key:2,disabled:M.value.length==0,type:"danger",plain:"",onClick:d},{default:e.withCtx(()=>{var Q,R;return[e.createTextVNode(e.toDisplayString(((Q=s.labels)==null?void 0:Q.delete)!=null?e.unref(n)((R=s.labels)==null?void 0:R.delete):e.unref(n)("common.table.delete")),1)]}),_:1},8,["disabled"])):e.createCommentVNode("",!0),e.createVNode(G,{icon:e.unref(oe.Refresh),onClick:C},null,8,["icon"]),s.tooltip?(e.openBlock(),e.createBlock(re,{key:3,effect:"dark",content:e.unref(n)(s.tooltip),placement:"right"},{default:e.withCtx(()=>[e.createVNode(K,{style:{color:"#8ba74f"}},{default:e.withCtx(()=>[e.createVNode(e.unref(oe.QuestionFilled))]),_:1})]),_:1},8,["content"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",qn,[s.export?(e.openBlock(),e.createBlock(G,{key:0,class:"button-export",onClick:A},{default:e.withCtx(()=>[e.createVNode(K,null,{default:e.withCtx(()=>[e.createVNode(e.unref(oe.Download))]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(X,{placeholder:`${e.unref(n)("common.table.search")}...`,modelValue:b.value,"onUpdate:modelValue":k[0]||(k[0]=Q=>b.value=Q)},{append:e.withCtx(()=>[e.createVNode(G,{style:{"margin-left":"-20px"},icon:e.unref(oe.Search),onClick:C},null,8,["icon"])]),_:1},8,["placeholder","modelValue"])])]),e.withDirectives((e.openBlock(),e.createBlock(ce,{border:!0,ref_key:"tableRef",ref:O,data:_,onSelectionChange:y,class:"table"},{default:e.withCtx(()=>{var Q;return[s.readOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z,{key:0,type:"selection",width:"50"})),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,R=>{var ue;return e.openBlock(),e.createBlock(Z,{prop:R.prop,label:B(R),width:(ue=R.tableColumnAttributes)==null?void 0:ue.width,"show-overflow-tooltip":""},{default:e.withCtx(ye=>{var we,Pe,Rt;return[(we=R.tableColumnAttributes)!=null&&we.link?(e.openBlock(),e.createBlock(H,{key:0,class:"router-link",to:`/${i.value}/detail?id=${ye.row.id}`},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(Y(R,ye)),1)]),_:2},1032,["to"])):(Pe=R.tableColumnAttributes)!=null&&Pe.routerLink?(e.openBlock(),e.createBlock(H,{key:1,class:"router-link",to:R.tableColumnAttributes.routerLink.replace("{id}",ye.row.id)},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(Y(R,ye)),1)]),_:2},1032,["to"])):(e.openBlock(),e.createElementBlock("span",Hn,e.toDisplayString(Y(R,ye)),1)),((Rt=R.tableColumnAttributes)==null?void 0:Rt.type)==="tag"?(e.openBlock(),e.createBlock(L,{key:3},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ye.row[R.prop]),1)]),_:2},1024)):e.createCommentVNode("",!0)]}),_:2},1032,["prop","label","width"])}),256)),s.operations===void 0&&!((Q=s.selectMode)!=null&&Q)&&!s.readOnly?(e.openBlock(),e.createBlock(Z,{key:1,label:e.unref(n)("common.table.operation"),width:"120"},{default:e.withCtx(R=>[s.updatable!==!1?(e.openBlock(),e.createBlock(G,{key:0,link:"",type:"primary",class:"operation-button",onClick:ue=>P(R.$index,R.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("common.table.edit")),1)]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),e.createVNode(le,{title:"Are you sure to delete this?",onConfirm:ue=>p(R.$index,R.row)},{reference:e.withCtx(()=>[s.deletable!==!1?(e.openBlock(),e.createBlock(G,{key:0,link:"",type:"primary",class:"operation-button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("common.table.delete")),1)]),_:1})):e.createCommentVNode("",!0)]),_:2},1032,["onConfirm"])]),_:1},8,["label"])):e.createCommentVNode("",!0),s.operations!==void 0&&!s.readOnly?(e.openBlock(),e.createBlock(Z,{key:2,label:e.unref(n)("common.table.operation"),width:"120"},{default:e.withCtx(R=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.operations,ue=>(e.openBlock(),e.createBlock(G,{class:"operation-button",link:"",type:"primary",key:ue.label,onClick:ye=>{var we,Pe;return((Pe=(we=ue.functions)==null?void 0:we.click)==null?void 0:Pe.call(we,R.$index,R.row))&&C()}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w(ue,R)),1)]),_:2},1032,["onClick"]))),128))]),_:1},8,["label"])):e.createCommentVNode("",!0)]}),_:1},8,["data"])),[[or,I.value]]),E.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e,{key:0,size:"small",background:"",onSizeChange:h,onCurrentChange:N,currentPage:T.pageNo,"onUpdate:currentPage":k[1]||(k[1]=Q=>T.pageNo=Q),"page-sizes":[10,20,50,100],"page-size":T.pageSize,layout:"total, sizes, prev, pager, next",total:T.totalElements},null,8,["currentPage","page-size","total"])),e.createVNode(Tt,{model:m.model,mode:$.value,id:z.value,afterSubmitFunc:C,visible:c.value,"onUpdate:visible":k[2]||(k[2]=Q=>c.value=Q)},null,8,["model","mode","id","visible"])],2)}}}),[["__scopeId","data-v-682537f9"]]),Jn={class:"nav-bar"},Wn={key:0,class:"info-card-wrapper"},Yn={class:"icon-wrapper"},Qn={class:"info-wrapper"},Kn={class:"title-wrapper"},Xn={class:"tabs-wrapper"},Zn={class:"dialog-footer"},At=j(e.defineComponent({__name:"DetailPage",setup(t){const{t:o}=pe.useI18n(),n=F.useRoute(),r=F.useRouter(),a=e.computed(()=>n.query.id),s=e.ref(!1),i=e.ref(!1),l=e.ref("view"),c=e.ref(),f=e.ref(-1),b=e.ref(),_=e.ref(),S=e.ref("summary"),O=e.ref(""),M=e.ref(""),$=e.ref(""),I=e.ref(0),E=e.reactive({api:"",fields:[]}),z=e.reactive([]);let T=[];e.watch([()=>r.currentRoute.value,ee],()=>{u()},{immediate:!0,deep:!0});function U(p){f.value=parseInt(p.index)-1}function Y(){var N;let p=(N=T[f.value].api)==null?void 0:N.replace("/select","");p=p==null?void 0:p.substring(p.lastIndexOf("/"));const d=E.api+"/"+a.value+p,h=_.value.multipleSelection.map(P=>P.id);me(d,"POST",h).then(()=>{b.value.refresh(),i.value=!1})}function w(p,d,h){var A;h.functions||(h.functions={}),h.functions.create=()=>{i.value=!0,_.value&&_.value.refresh()};let N=ae.cloneDeep(d);N.tableConfig||(N.tableConfig={}),N.tableConfig.selectMode=!0,N.tableConfig.queryParams={},p.queryParamName&&(N.tableConfig.queryParams[p.queryParamName]=a.value);for(var P in N.fields)N.fields[P].tableColumnAttributes&&(A=N.fields[P].tableColumnAttributes)!=null&&A.link&&(N.fields[P].tableColumnAttributes.link=!1);T.push(N),h.labels={create:"common.table.add",delete:"common.table.remove"},h.functions.batchDelete=y=>{var k;let B=(k=T[f.value].api)==null?void 0:k.replace("/select","");B=B==null?void 0:B.substring(B.lastIndexOf("/"));const g=E.api+"/"+a.value+B,m=y.map(D=>D.id);v.delete(`${g}/${m.join(",")}`).then(({data:D})=>{D.code===0&&b.value.refresh()})},h.operations=[{label:"common.table.remove",functions:{click:(y,B)=>{var k;let g=(k=T[f.value].api)==null?void 0:k.replace("/select","");g=g==null?void 0:g.substring(g.lastIndexOf("/"));const m=E.api+"/"+a.value+g;me(m,"DELETE",B.id).then(()=>{b.value.refresh()})}}}],N.api+="/select"}function u(){var N,P,A;z.splice(0);const p=n.params.model;if(ee.value[p]===void 0){console.warn("Detail page model not exist:",p);return}else console.debug("Detail page model found:",p,ee.value[p]);Be(E);const d=ae.cloneDeep(ee.value[p]);Object.assign(E,d),I.value++,f.value=-1,S.value="summary";const h=(P=(N=E.pageConfig)==null?void 0:N.detailPage)==null?void 0:P.tabs;if(h)for(let y of h){const B=ae.cloneDeep(ee.value[y.modelKey]);if(z.push(B),y.type==="table"){B.tableConfig||(B.tableConfig={});let g=B.tableConfig;g.showPane=!1,y.modelRelationType==="associated"?w(y,B,g):y.modelRelationType==="child"&&(T.push({fields:[]}),B.formConfig===void 0&&(B.formConfig={}),B.formConfig.functions===void 0&&(B.formConfig.functions={}),y.queryParamName&&(B.formConfig.functions.beforeSubmit=m=>{m[y.queryParamName]=a.value})),g.queryParams||(g.queryParams={}),y.queryParamName&&(g.queryParams[y.queryParamName]=a.value),y.queryParams&&Object.assign(g.queryParams,y.queryParams),g.readOnly=(A=y.readOnly)!=null?A:!1,y.includeFields&&(B.fields=B.fields.filter(m=>{var k;return(k=y.includeFields)==null?void 0:k.includes(m.prop)})),y.excludeFields&&(B.fields=B.fields.filter(m=>{var k;return!((k=y.excludeFields)!=null&&k.includes(m.prop))})),y.tooltip&&(g.tooltip=y.tooltip)}}}e.watch([()=>{var p,d;return(d=(p=E.pageConfig)==null?void 0:p.detailPage)==null?void 0:d.infoCard},()=>{var p;return(p=c.value)==null?void 0:p.formData}],p=>{e.nextTick(()=>{var h,N,P;const d=(N=(h=E.pageConfig)==null?void 0:h.detailPage)==null?void 0:N.infoCard;d&&(O.value=d.titleFieldProp?c.value.formData[d.titleFieldProp]:"",M.value=d.subtitleFieldProp?c.value.formData[d.subtitleFieldProp]:"",$.value=d.tagFieldProp?c.value.formData[d.tagFieldProp]:"",(P=E.fields)==null||P.forEach(A=>{var y,B;if(A.prop===d.tagFieldProp){const g=(B=(y=A.tableColumnAttributes)==null?void 0:y.functions)==null?void 0:B.transformValue;g&&($.value=g($.value))}}))})},{immediate:!0,deep:!0});function C(){s.value=!0}function V(){c.value.refresh()}return(p,d)=>{var G,K,re,X,Z,H;const h=e.resolveComponent("el-breadcrumb-item"),N=e.resolveComponent("el-breadcrumb"),P=e.resolveComponent("el-button"),A=e.resolveComponent("el-icon"),y=e.resolveComponent("el-dropdown-item"),B=e.resolveComponent("el-dropdown-menu"),g=e.resolveComponent("el-dropdown"),m=e.resolveComponent("el-tag"),k=e.resolveComponent("el-tab-pane"),D=e.resolveComponent("el-tabs"),q=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Jn,[e.createVNode(N,null,{default:e.withCtx(()=>{var L,le;return[e.createVNode(h,{to:{path:`/${(le=(L=E==null?void 0:E.breadcrumbRoute)!=null?L:E==null?void 0:E.route)!=null?le:""}`}},{default:e.withCtx(()=>{var ce;return[e.createTextVNode(e.toDisplayString(e.unref(o)((ce=E==null?void 0:E.name)!=null?ce:"")),1)]}),_:1},8,["to"]),e.createVNode(h,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.basic.detail")),1)]),_:1})]}),_:1}),e.createElementVNode("div",null,[e.createVNode(P,{type:"primary",onClick:C},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.table.edit")),1)]),_:1}),e.createVNode(P,{type:"danger",plain:"",disabled:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.table.delete")),1)]),_:1}),((K=(G=E.pageConfig)==null?void 0:G.detailPage)==null?void 0:K.operationButtons)!==void 0?(e.openBlock(),e.createBlock(g,{key:0},{dropdown:e.withCtx(()=>[e.createVNode(B,null,{default:e.withCtx(()=>{var L,le;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((le=(L=E.pageConfig)==null?void 0:L.detailPage)==null?void 0:le.operationButtons,ce=>(e.openBlock(),e.createBlock(y,{onClick:$e=>ce.function(c.value.formData)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)(ce.label)),1)]),_:2},1032,["onClick"]))),256))]}),_:1})]),default:e.withCtx(()=>[e.createVNode(P,{style:{margin:"0 10px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.basic.more")),1),e.createVNode(A,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(oe.ArrowDown))]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(P,{icon:e.unref(oe.Refresh),onClick:V},null,8,["icon"])])]),(X=(re=E.pageConfig)==null?void 0:re.detailPage)!=null&&X.infoCard?(e.openBlock(),e.createElementBlock("div",Wn,[e.createElementVNode("div",Yn,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((Z=E.pageConfig.detailPage.infoCard.icon)!=null?Z:""),{class:"icon"}))]),e.createElementVNode("div",Qn,[e.createElementVNode("div",Kn,[e.createElementVNode("h1",null,e.toDisplayString(O.value),1),((H=$.value)==null?void 0:H.length)>0?(e.openBlock(),e.createBlock(m,{key:0,size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString($.value),1)]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("span",null,e.toDisplayString(M.value),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",Xn,[e.createVNode(D,{modelValue:S.value,"onUpdate:modelValue":d[0]||(d[0]=L=>S.value=L),onTabClick:U},{default:e.withCtx(()=>{var L,le;return[e.createVNode(k,{label:e.unref(o)("common.basic.summary"),name:"summary"},{default:e.withCtx(()=>[e.createVNode(Mt,{ref_key:"formViewRef",ref:c,id:a.value,sessionId:I.value,mode:l.value,model:E},null,8,["id","sessionId","mode","model"])]),_:1},8,["label"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((le=(L=E.pageConfig)==null?void 0:L.detailPage)==null?void 0:le.tabs,ce=>{var $e;return e.openBlock(),e.createBlock(k,{label:e.unref(o)(($e=ce.name)!=null?$e:"")},null,8,["label"])}),256))]}),_:1},8,["modelValue"]),f.value>=0?(e.openBlock(),e.createBlock(Oe,{key:0,ref_key:"tabPaneTableRef",ref:b,model:z[f.value]},null,8,["model"])):e.createCommentVNode("",!0),e.createVNode(q,{modelValue:i.value,"onUpdate:modelValue":d[2]||(d[2]=L=>i.value=L),title:e.unref(o)("common.table.select"),width:"800px"},{footer:e.withCtx(()=>[e.createElementVNode("span",Zn,[e.createVNode(P,{onClick:d[1]||(d[1]=L=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.basic.cancel")),1)]),_:1}),e.createVNode(P,{type:"primary",onClick:Y},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.basic.save")),1)]),_:1})])]),default:e.withCtx(()=>[f.value>=0?(e.openBlock(),e.createBlock(Oe,{key:0,ref_key:"selectTableRef",ref:_,model:e.unref(T)[f.value]},null,8,["model"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])]),e.createVNode(Tt,{id:a.value,mode:"update",visible:s.value,"onUpdate:visible":d[3]||(d[3]=L=>s.value=L),model:E,afterSubmitFunc:V},null,8,["id","visible","model"])],64)}}}),[["__scopeId","data-v-f9250724"]]),vn={class:"page-title"},Ut=j(e.defineComponent({__name:"TablePage",setup(t){const{t:o}=pe.useI18n(),n=F.useRoute(),r=F.useRouter(),a=e.ref(),s=e.ref([]),i=e.reactive({api:"",fields:[]}),l=e.reactive(Fe({},i));function c(){var b,_,S,O,M;s.value=[],i.pageConfig&&((_=(b=i.pageConfig)==null?void 0:b.tablePage)!=null&&_.tabViewAttributes)&&(s.value=(M=(O=(S=i.pageConfig)==null?void 0:S.tablePage)==null?void 0:O.tabViewAttributes)==null?void 0:M.map($=>{let I;return $.modelKey&&ee.value[$.modelKey]?I=ae.cloneDeep(ee.value[$.modelKey]):I=ae.cloneDeep(i),$.queryParams&&(I.tableConfig||(I.tableConfig={}),I.tableConfig.queryParams=$.queryParams),$.fields&&(I.fields=$.fields),$.modelKey&&(I.breadcrumbRoute=i.route),{key:$.key,label:$.label,icon:$.icon,disabled:$.disabled,model:I}}))}function f(){var S,O;console.log("Init table page, loading model:",n.params.model),console.log("Current model list",ee.value);const b=n.params.model;if(ee.value[b]===void 0){console.warn("Model not found",b);return}Be(i);const _=ae.cloneDeep(ee.value[b]);Object.assign(i,_),(O=(S=i.pageConfig)==null?void 0:S.tablePage)!=null&&O.tabViewAttributes||Object.assign(l,i),c()}return e.watch([()=>r.currentRoute.value,ee],()=>{f()},{immediate:!0,deep:!0}),(b,_)=>{var O;const S=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h1",vn,e.toDisplayString(e.unref(o)((O=i.name)!=null?O:"")),1),e.createVNode(S,null,{default:e.withCtx(()=>{var M,$;return[($=(M=i.pageConfig)==null?void 0:M.tablePage)!=null&&$.tabViewAttributes?(e.openBlock(),e.createBlock(Ze,{key:0,class:"tabs-wrapper",cards:s.value,tableRef:a.value},null,8,["cards","tableRef"])):e.createCommentVNode("",!0)]}),_:1}),e.createVNode(Oe,{class:"table-wrapper",ref_key:"tableRef",ref:a,model:l},null,8,["model"])],64)}}}),[["__scopeId","data-v-d24124ee"]]),er=[ve,Pt,Ge,It,Dt,Xe,Ze,Oe,At,Ut],tr=t=>{t&&t.component&&er.forEach(o=>{console.log("component",o.__name,o),t.component(o.__name,o)})};x.Building=ve,x.ConsoleApp=Pt,x.DetailPage=At,x.Header=Ge,x.NoPermission=It,x.Secondary=Dt,x.SideMenu=Xe,x.TabCard=Ze,x.TablePage=Ut,x.TableView=Oe,x.activeMenuMapping=rt,x.default=tr,x.en=ot,x.i18n=Ee,x.menuList=ze,x.modelList=ee,x.pinia=Re,x.zh=nt,Object.defineProperties(x,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
11
|
+
This will fail in production.`);l=Se,l._s.has(r)||(s?Qe(r,o,a,l):Vt(r,a,l),process.env.NODE_ENV!=="production"&&(i._pinia=l));const b=l._s.get(r);if(process.env.NODE_ENV!=="production"&&c){const _="__hot:"+r,S=s?Qe(_,o,a,l,!0):Vt(_,te({},a),l,!0);c._hotUpdate(S),delete l.state.value[_],l._s.delete(_)}if(process.env.NODE_ENV!=="production"&&_e){const _=e.getCurrentInstance();if(_&&_.proxy&&!c){const S=_.proxy,O="_pStores"in S?S._pStores:S._pStores={};O[r]=b}}return b}return i.$id=r,i}const fn=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,mn=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,un=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function hn(t,o){if(t==="__proto__"||t==="constructor"&&o&&typeof o=="object"&&"prototype"in o){gn(t);return}return o}function gn(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)}function _n(t,o={}){if(typeof t!="string")return t;const n=t.trim();if(t[0]==='"'&&t.endsWith('"')&&!t.includes("\\"))return n.slice(1,-1);if(n.length<=9){const r=n.toLowerCase();if(r==="true")return!0;if(r==="false")return!1;if(r==="undefined")return;if(r==="null")return null;if(r==="nan")return Number.NaN;if(r==="infinity")return Number.POSITIVE_INFINITY;if(r==="-infinity")return Number.NEGATIVE_INFINITY}if(!un.test(t)){if(o.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(fn.test(t)||mn.test(t)){if(o.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,hn)}return JSON.parse(t)}catch(r){if(o.strict)throw r;return t}}function bn(t,o){if(t==null)return;let n=t;for(let r=0;r<o.length;r++){if(n==null||n[o[r]]==null)return;n=n[o[r]]}return n}function Ke(t,o,n){if(n.length===0)return o;const r=n[0];return n.length>1&&(o=Ke(typeof t!="object"||t===null||!Object.prototype.hasOwnProperty.call(t,r)?Number.isInteger(Number(n[1]))?[]:{}:t[r],o,Array.prototype.slice.call(n,1))),Number.isInteger(Number(r))&&Array.isArray(t)?t.slice()[r]:Object.assign({},t,{[r]:o})}function Et(t,o){if(t==null||o.length===0)return t;if(o.length===1){if(t==null)return t;if(Number.isInteger(o[0])&&Array.isArray(t))return Array.prototype.slice.call(t,0).splice(o[0],1);const n={};for(const r in t)n[r]=t[r];return delete n[o[0]],n}if(t[o[0]]==null){if(Number.isInteger(o[0])&&Array.isArray(t))return Array.prototype.concat.call([],t);const n={};for(const r in t)n[r]=t[r];return n}return Ke(t,Et(t[o[0]],Array.prototype.slice.call(o,1)),[o[0]])}function St(t,o){return o.map(n=>n.split(".")).map(n=>[n,bn(t,n)]).filter(n=>n[1]!==void 0).reduce((n,r)=>Ke(n,r[1],r[0]),{})}function xt(t,o){return o.map(n=>n.split(".")).reduce((n,r)=>Et(n,r),t)}function Bt(t,{storage:o,serializer:n,key:r,debug:a,pick:s,omit:i,beforeHydrate:l,afterHydrate:c},f,b=!0){try{b&&(l==null||l(f));const _=o.getItem(r);if(_){const S=n.deserialize(_),O=s?St(S,s):S,M=i?xt(O,i):O;t.$patch(M)}b&&(c==null||c(f))}catch(_){a&&console.error("[pinia-plugin-persistedstate]",_)}}function Ot(t,{storage:o,serializer:n,key:r,debug:a,pick:s,omit:i}){try{const l=s?St(t,s):t,c=i?xt(l,i):l,f=n.serialize(c);o.setItem(r,f)}catch(l){a&&console.error("[pinia-plugin-persistedstate]",l)}}function yn(t,o,n){const{pinia:r,store:a,options:{persist:s=n}}=t;if(!s)return;if(!(a.$id in r.state.value)){const c=r._s.get(a.$id.replace("__hot:",""));c&&Promise.resolve().then(()=>c.$persist());return}const l=(Array.isArray(s)?s:s===!0?[{}]:[s]).map(o);a.$hydrate=({runHooks:c=!0}={})=>{l.forEach(f=>{Bt(a,f,t,c)})},a.$persist=()=>{l.forEach(c=>{Ot(a.$state,c)})},l.forEach(c=>{Bt(a,c,t),a.$subscribe((f,b)=>Ot(b,c),{detached:!0})})}function wn(t={}){return function(o){var n;yn(o,r=>{var a,s,i,l,c,f,b;return{key:(t.key?t.key:_=>_)((a=r.key)!=null?a:o.store.$id),debug:(i=(s=r.debug)!=null?s:t.debug)!=null?i:!1,serializer:(c=(l=r.serializer)!=null?l:t.serializer)!=null?c:{serialize:_=>JSON.stringify(_),deserialize:_=>_n(_)},storage:(b=(f=r.storage)!=null?f:t.storage)!=null?b:window.localStorage,beforeHydrate:r.beforeHydrate,afterHydrate:r.afterHydrate,pick:r.pick,omit:r.omit}},(n=t.auto)!=null?n:!1)}}var kn=wn();const Re=sn();Re.use(kn);const $t=pn("console",{state:()=>({menu:{collapsed:!0}}),persist:!0}),Cn={key:0,class:"menu-wrapper"},Xe=j(e.defineComponent({__name:"SideMenu",props:{menuCollapsed:{type:Boolean}},emits:["update:menuCollapsed"],setup(t,{emit:o}){$t(Re);const n=F.useRoute(),r=e.computed(()=>{var s;const a=n.meta.activeMenu;if(a==="{model}"){let i=n.params.app?`${n.params.app}/${n.params.model}`:n.params.model;return"/"+((s=rt[n.params.model])!=null?s:i)}else return a});return(a,s)=>{const i=e.resolveComponent("el-menu");return e.unref(ze).length>0?(e.openBlock(),e.createElementBlock("div",Cn,[e.createVNode(i,{class:"menu","default-active":r.value,router:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ze),l=>(e.openBlock(),e.createBlock(To,{key:l.path,menu:l},null,8,["menu"]))),128))]),_:1},8,["default-active"])])):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-c70ca2ba"]]),Nn={class:"container"},Pt=e.defineComponent({__name:"ConsoleApp",props:{title:{},helpDocUrl:{}},setup(t){const o=$t(Re),n=F.useRoute(),r=e.ref(o.menu.collapsed),a=e.ref(),s=t;return(i,l)=>{const c=e.resolveComponent("router-view"),f=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(n).query.embedded!=="true"?(e.openBlock(),e.createBlock(Ge,{key:0,title:s.title,helpDocUrl:s.helpDocUrl},null,8,["title","helpDocUrl"])):e.createCommentVNode("",!0),e.createElementVNode("div",Nn,[e.unref(n).query.embedded!=="true"?(e.openBlock(),e.createBlock(Xe,{key:0,menuCollapsed:r.value,"onUpdate:menuCollapsed":l[0]||(l[0]=b=>r.value=b)},null,8,["menuCollapsed"])):e.createCommentVNode("",!0),e.createVNode(f,{class:"main-scrollbar"},{default:e.withCtx(()=>[e.createElementVNode("main",{ref_key:"mainWrapperRef",ref:a,class:"main-wrapper"},[e.createVNode(c)],512)]),_:1})])],64)}}}),Vn={xmlns:"http://www.w3.org/2000/svg",width:"800",height:"800"};function En(t,o){return e.openBlock(),e.createElementBlock("svg",Vn,o[0]||(o[0]=[e.createStaticVNode('<defs><linearGradient id="a" x1="399.126" x2="399.126" y1="159.978" y2="715.47" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4f2fb"></stop><stop offset="1" stop-color="#e1eef5"></stop></linearGradient><linearGradient id="b" x1="481.607" x2="481.607" y1="594.251" y2="423.306" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".362" stop-color="#b4c9db"></stop><stop offset=".898" stop-color="#ecf0f9"></stop></linearGradient><linearGradient id="c" x1="114.87" x2="114.87" y1="540.843" y2="403.668" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".227" stop-color="#d0dceb"></stop><stop offset=".789" stop-color="#ecf1fb"></stop></linearGradient><linearGradient id="d" x1="114.872" x2="114.872" y1="418.9" y2="570.033" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ecf1fb"></stop><stop offset=".818" stop-color="#b6c9dd"></stop></linearGradient><linearGradient id="e" x1="615.999" x2="615.999" y1="449.321" y2="360.996" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".227" stop-color="#d0dceb"></stop><stop offset=".789" stop-color="#ecf1fb"></stop></linearGradient><linearGradient id="f" x1="616" x2="616" y1="370.804" y2="468.116" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ecf1fb"></stop><stop offset=".818" stop-color="#b6c9dd"></stop></linearGradient><linearGradient id="g" x1="672.709" x2="672.709" y1="544.867" y2="510.536" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".227" stop-color="#d0dceb"></stop><stop offset=".789" stop-color="#ecf1fb"></stop></linearGradient><linearGradient id="h" x1="672.77" x2="672.77" y1="514.871" y2="570.135" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ecf1fb"></stop><stop offset=".818" stop-color="#b6c9dd"></stop></linearGradient><linearGradient id="i" x1="461.917" x2="427.163" y1="86.714" y2="146.91" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ffdb80"></stop><stop offset="1" stop-color="#ffbb24"></stop></linearGradient><linearGradient id="j" x1="419.58" x2="419.58" y1="117.18" y2="174.634" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f9fafe"></stop><stop offset="1" stop-color="#e5edf7"></stop></linearGradient><linearGradient id="k" x1="-1967.352" x2="-2213.626" y1="525.737" y2="279.463" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".15" stop-color="#9fb6cc"></stop><stop offset="1" stop-color="#d5e1f2"></stop></linearGradient><linearGradient id="l" x1="-1980.099" x2="-2214.789" y1="526.438" y2="291.748" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".15" stop-color="#b6cadc"></stop><stop offset="1" stop-color="#dfe8f9"></stop></linearGradient><linearGradient id="m" x1="441.358" x2="329.96" y1="472.657" y2="361.259" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".15" stop-color="#9fb6cc"></stop><stop offset="1" stop-color="#bccde1"></stop></linearGradient><linearGradient id="n" x1="569.328" x2="454.912" y1="597.606" y2="483.19" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".15" stop-color="#afc5d8"></stop><stop offset="1" stop-color="#dfe8f9"></stop></linearGradient><linearGradient id="o" x1="562.331" x2="453.712" y1="598.807" y2="490.188" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#c7d4e5"></stop><stop offset=".687" stop-color="#e8eff8"></stop></linearGradient><linearGradient id="p" x1="219.375" x2="219.375" y1="553.783" y2="478.333" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#fad96e"></stop><stop offset="1" stop-color="#ffb32c"></stop></linearGradient><linearGradient id="q" x1="220.421" x2="220.421" y1="465.465" y2="489.367" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4ae98"></stop><stop offset="1" stop-color="#fad1bb"></stop></linearGradient><linearGradient id="r" x1="-840.016" x2="-828.333" y1="946.367" y2="864.11" gradientTransform="rotate(-8.082 -3028.264 -6569.32)" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#fad96e"></stop><stop offset="1" stop-color="#ffa91f"></stop></linearGradient><linearGradient id="s" x1="-7035.52" x2="-7023.838" y1="66.46" y2="-15.798" gradientTransform="scale(-1 1)rotate(-8.082 -118.132 -47761.005)" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#fad96e"></stop><stop offset="1" stop-color="#ffa91f"></stop></linearGradient><linearGradient id="t" x1="219.375" x2="219.375" y1="526.535" y2="574.482" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#275c89"></stop><stop offset="1" stop-color="#013f7c"></stop></linearGradient><linearGradient id="u" x1="6174.812" x2="6157.838" y1="595.174" y2="595.174" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4b9a4"></stop><stop offset=".652" stop-color="#fad1bb"></stop></linearGradient><linearGradient id="v" x1="196.36" x2="283.925" y1="576.466" y2="576.466" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#18264b"></stop><stop offset=".652" stop-color="#2d3c65"></stop></linearGradient><linearGradient id="w" x1="176.617" x2="176.617" y1="604.946" y2="586.928" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#4673bc"></stop><stop offset=".652" stop-color="#6a94e0"></stop></linearGradient><linearGradient id="x" x1="238.667" x2="255.641" y1="595.174" y2="595.174" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4b9a4"></stop><stop offset=".652" stop-color="#fad1bb"></stop></linearGradient><linearGradient id="y" x1="158.041" x2="245.606" y1="576.466" y2="576.466" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#445677"></stop><stop offset="1" stop-color="#293861"></stop></linearGradient><linearGradient id="z" x1="265.35" x2="265.35" y1="604.946" y2="586.928" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#4673bc"></stop><stop offset=".652" stop-color="#6a94e0"></stop></linearGradient><linearGradient id="A" x1="236.065" x2="204.828" y1="459.983" y2="459.983" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4b9a4"></stop><stop offset=".652" stop-color="#fad1bb"></stop></linearGradient><linearGradient id="B" x1="200.53" x2="236.795" y1="447.908" y2="447.908" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#4f5c7c"></stop><stop offset="1" stop-color="#274168"></stop></linearGradient></defs><path fill="url(#a)" d="M482.38 201.33c-38.37 30.29-120.74 33.81-181.17-2.22s-172-31.38-202.22 34.87 37.19 131.33 12.78 178.98S6.01 528.01 61.8 609.36s126.6 60.62 169.22 52.45c84.17-16.13 189.79 115.67 308.62 16.13 68.47-57.35 170.44 42.09 210.17-81.36 32.78-101.86-85.67-139.5-49.97-208.03 37.96-72.88 30.67-159.24-10.46-201.06-38.31-38.96-140.75-38.46-207 13.84"></path><path fill="url(#b)" d="M393.48 423.31h216.44l-22.53 49.03s59.19 57.86-14.13 121.91c-134.28-44.17-221.74-37.1-219.98-38.87 1.77-1.77 40.2-132.07 40.2-132.07"></path><path fill="url(#c)" d="M115.65 403.91s-.22-.57-.52.04c-2.7 5.49-27.15 64.96-29.09 110.86 0 0-4.08 26.37 30.11 26.02 28.54-.29 27.78-24.6 27.68-32.79-.38-33.22-28.18-104.13-28.18-104.13"></path><path fill="url(#d)" d="M114.87 570.03c-.55 0-1-.45-1-1V419.9c0-.55.45-1 1-1s1 .45 1 1v149.13c0 .56-.45 1-1 1"></path><path fill="url(#e)" d="M616.5 361.15s-.14-.37-.33.03c-1.74 3.53-17.48 41.83-18.73 71.38 0 0-2.63 16.98 19.39 16.76 18.38-.18 17.89-15.84 17.82-21.11-.25-21.4-18.15-67.06-18.15-67.06"></path><path fill="url(#f)" d="M616 468.12c-.36 0-.64-.29-.64-.64v-96.02c0-.36.29-.64.64-.64.36 0 .64.29.64.64v96.02c0 .35-.28.64-.64.64"></path><path fill="url(#g)" d="M689.88 527.7c0 9.48-7.69 17.17-17.17 17.17s-17.17-7.69-17.17-17.17 7.69-17.17 17.17-17.17 17.17 7.69 17.17 17.17"></path><path fill="url(#h)" d="M672.77 570.13c-.29 0-.53-.24-.53-.53v-54.2c0-.29.24-.53.53-.53s.53.24.53.53v54.21c0 .29-.24.52-.53.52"></path><path fill="url(#i)" d="M479.29 116.81c0 19.19-15.56 34.75-34.75 34.75s-34.75-15.56-34.75-34.75 15.56-34.75 34.75-34.75 34.75 15.56 34.75 34.75"></path><path fill="url(#j)" d="M464.32 135.76h-34.57c-2.23-10.61-11.65-18.58-22.93-18.58s-20.69 7.97-22.93 18.58h-9.05c-10.73 0-19.44 8.7-19.44 19.44 0 10.73 8.7 19.44 19.44 19.44h89.47c10.73 0 19.44-8.7 19.44-19.44s-8.7-19.44-19.43-19.44"></path><path fill="url(#k)" d="M235.65 388.64c0-24.52-.03-49.03.01-73.54.02-14.37 4.24-18.36 17.97-20.53 41.87-6.61 82.03-18.72 117.91-42.29 10.38-6.82 18.3-7.59 29.06-.47 34.85 23.06 73.26 37.11 114.55 42.8 13.12 1.81 16.84 5.88 16.85 19.25.04 45.72-.4 91.44.18 137.15.34 26.77-8.17 49.99-24.02 70.73-31.46 41.17-74.88 63.76-122.21 80.03-2.5.86-5.83.67-8.36-.23-38.47-13.74-74.58-31.84-104.15-61.09-22.97-22.73-37.84-49.56-37.79-83.22.03-22.87 0-45.73 0-68.59"></path><path fill="url(#l)" d="M234.76 396.09c0-23.21-.03-46.42.01-69.63.02-13.61 4.06-17.38 17.23-19.43 40.15-6.26 78.67-17.72 113.07-40.04 9.95-6.46 17.55-7.18 27.86-.44 33.42 21.83 70.25 35.14 109.84 40.52 12.58 1.71 16.14 5.56 16.15 18.22.03 43.28-.38 86.57.18 129.84.33 25.34-7.83 47.33-23.03 66.96-30.17 38.98-71.81 60.36-117.19 75.77-2.4.81-5.59.64-8.01-.22-36.89-13.01-71.52-30.14-99.87-57.84-22.03-21.52-36.28-46.91-36.23-78.78.02-21.65 0-43.29-.01-64.93"></path><path fill="url(#m)" d="M398.42 430.39c23.18-5.61 40.41-26.11 40.41-50.49 0-28.68-23.85-52.01-53.17-52.01s-53.17 23.33-53.17 52.01c0 24.38 17.24 44.88 40.41 50.49v85.2h25.52v-36.38h32.67v-24.96h-32.67zM358 379.91c0-14.91 12.41-27.05 27.65-27.05S413.3 365 413.3 379.91s-12.41 27.05-27.65 27.05S358 394.82 358 379.91"></path><path fill="#fff" d="M394.5 433.67c21.8-5.39 38.01-25.1 38.01-48.54 0-27.58-22.43-50.01-50.01-50.01s-50.01 22.43-50.01 50.01c0 23.44 16.21 43.15 38.01 48.54v81.92h24v-34.98h30.73v-24H394.5zm-38.01-48.54c0-14.34 11.67-26.01 26.01-26.01s26.01 11.67 26.01 26.01-11.67 26.01-26.01 26.01-26.01-11.67-26.01-26.01"></path><path fill="url(#n)" d="M593.02 540.4c0 44.68-36.22 80.9-80.9 80.9s-80.9-36.22-80.9-80.9 36.22-80.9 80.9-80.9 80.9 36.22 80.9 80.9"></path><path fill="url(#o)" d="M584.83 544.5c0 42.42-34.39 76.81-76.81 76.81s-76.81-34.39-76.81-76.81 34.39-76.81 76.81-76.81 76.81 34.39 76.81 76.81"></path><path fill="#fff" d="m525.32 542.26 23.01-23.01c4.44-4.44 4.44-11.63 0-16.06-4.44-4.44-11.63-4.44-16.06 0l-23.01 23.01-23.01-23.01c-4.44-4.44-11.63-4.44-16.06 0-4.44 4.44-4.44 11.63 0 16.06l23.01 23.01-23.01 23.01c-4.44 4.44-4.44 11.63 0 16.06 2.22 2.22 5.13 3.33 8.03 3.33s5.81-1.11 8.03-3.33l23.01-23.01 23.01 23.01c2.22 2.22 5.13 3.33 8.03 3.33s5.81-1.11 8.03-3.33c4.44-4.44 4.44-11.63 0-16.06z"></path><path fill="url(#p)" d="M211.59 478.69s-18.31-2.53-24.25 5.88c-5.95 8.41-8.12 29.95-8.12 29.95l13.78-.73-1.16 25.09 25.42 14.9 36.22-19.48-5.51-22.73 11.57-3.02s-3.45-32.99-19.55-28.12c-8.27.89-10.88.74-10.88.74s-2.18 6.94-9.65 6.35-7.87-8.83-7.87-8.83"></path><path fill="url(#q)" d="m213.42 468.32-3.8 16.97c-.18.8.24 1.61.99 1.92 1.97.8 5.9 2.16 9.95 2.16 4.2 0 8.16-2.3 9.98-3.53.63-.42.89-1.21.65-1.93l-5.82-17.31a1.68 1.68 0 0 0-1.88-1.12l-8.72 1.55c-.67.12-1.2.63-1.35 1.29"></path><path fill="url(#r)" d="M190.69 481.63c5.33-1.77 12.55-.59 12.85 11.37.29 11.95-11.42 31-7.22 37.63 4.25 6.71 13.34 16.25 19.12 21.68-1.34 6.38-4.98 11.75-4.98 11.75s-21.31-9.83-30.59-19.68-4.6-32.43-.3-48.5c3.24-12.12 11.12-14.25 11.12-14.25"></path><path fill="url(#s)" d="M246.53 481.63c-5.33-1.77-12.55-.59-12.85 11.37-.29 11.95 11.42 31 7.22 37.63-4.25 6.71-13.34 16.25-19.12 21.68 1.34 6.38 4.98 11.75 4.98 11.75s21.31-9.83 30.59-19.68 4.6-32.43.3-48.5c-3.24-12.12-11.12-14.25-11.12-14.25"></path><path fill="url(#t)" d="M193.27 574.48h51.74c2.34 0 4.44-1.78 5.25-4.45l10.43-34.31c1.35-4.45-1.35-9.19-5.25-9.19h-72.12c-3.86 0-6.57 4.65-5.28 9.09l9.96 34.31c.79 2.73 2.9 4.55 5.27 4.55"></path><path fill="#fff" d="M191.21 590.26s-.8-1.76-1.41-1.95c-.62-.19-9.46-.54-12.69-1.38s-12.54-2.16-16.52 1.61c-3.47 3.29-4.62 10.97.67 15.39 1.98 1.72 3.93 2.23 11.28 1.89s18-.27 20.34-3.67c-.09-5.63-1.67-11.89-1.67-11.89"></path><path fill="url(#u)" d="M199.42 588.31s-8.54 1.92-11.6 1.64c-3.05-.28-.5 12.02-.5 12.02s8.16.56 15.37-1.52c2.44-9.43-3.27-12.14-3.27-12.14"></path><path fill="url(#v)" d="m196.36 587.86 4.44 13.81s95.43-12.57 81.79-43.54c-11.4-25.89-86.23 29.73-86.23 29.73"></path><path fill="url(#w)" d="M190.1 588.93s3.5 1.37 3.94 6.24-1 8.15-8.43 9.05-9.32.56-13.98.68c-4.66.11-11.43.56-12.43-8.3s8.06-11.12 17.46-8.86c2.95.57 13.44 1.19 13.44 1.19"></path><path fill="#fff" d="M250.76 590.26s.8-1.76 1.41-1.95c.62-.19 9.46-.54 12.69-1.38s11.9-2.23 16.28 1.51c4.06 3.47 4.33 11.14-.3 15.37-1.98 1.72-4.07 2.35-11.42 2.01s-18-.27-20.34-3.67c.09-5.63 1.68-11.89 1.68-11.89"></path><path fill="url(#x)" d="M242.55 588.31s8.54 1.92 11.6 1.64.5 12.02.5 12.02-8.16.56-15.37-1.52c-2.45-9.43 3.27-12.14 3.27-12.14"></path><path fill="url(#y)" d="m245.61 587.86-4.44 13.81s-95.43-12.57-81.79-43.54c11.4-25.89 86.23 29.73 86.23 29.73"></path><path fill="url(#z)" d="M251.87 588.93s-3.5 1.37-3.94 6.24 1 8.15 8.43 9.05 9.32.56 13.98.68c4.66.11 11.43.56 12.43-8.3s-8.06-11.12-17.46-8.86c-2.96.57-13.44 1.19-13.44 1.19"></path><path fill="url(#A)" d="M235.39 461.53c.57-.81.93-2.88.46-3.48-.84-.68-1.63-.29-2.23.3.14-4.94-.31-9.05-.42-10.09-.31-3.03-3.39-8.58-13.46-8.58s-12.03 7.27-12.03 7.27-.66 5.14-.46 11.38c-.6-.57-1.39-.95-2.21-.28-.46.61-.1 2.68.46 3.48.57.81.93 2.73 1.03 3.79.1 1.01-.63 3.69 2.02 3.35 1.58 6.33 7.99 11.61 11.96 11.61 4.35 0 10.13-5.32 11.77-11.62 2.71.37 1.97-2.33 2.07-3.35.12-1.05.48-2.97 1.04-3.78"></path><path fill="url(#B)" d="M227 437.52s-1.97-6.19-9.5-4.71c-7.54 1.48-8.05 5.04-11 5.18-5.05.24-9.09 6.53-2.61 13.19 2.88 2.97.45 4.24 1.82 6.87s1.36 5.18 1.36 5.18 2.41-7.69.82-10.97c-.82-1.69 2.81-2.15 7.33-1.75s11.65-1.09 12.21-4.17c1.34 6.31 2.67 6.97 4.37 7.93s1.8 8.58 1.8 8.58.3-5.6 1.48-6.87c.98-2.07 2.88-10.2.73-12.17s-.35-8.29-8.81-6.29"></path>',33)]))}const Sn={render:En},xn={},Bn={class:"wrapper"},On={class:"content"};function $n(t,o){const n=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Bn,[o[4]||(o[4]=e.createElementVNode("img",{src:Sn},null,-1)),e.createElementVNode("div",On,[o[3]||(o[3]=e.createElementVNode("h1",null,"You have no permission to access the page.",-1)),e.createVNode(n,{type:"primary"},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("Apply")])),_:1}),e.createVNode(n,{onClick:o[0]||(o[0]=r=>t.$router.go(-1))},{default:e.withCtx(()=>o[2]||(o[2]=[e.createTextVNode("Go Back")])),_:1})])])}const It=j(xn,[["render",$n],["__scopeId","data-v-0155b361"]]),Pn={};function In(t,o){const n=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(n)}const Dt=j(Pn,[["render",In]]),Dn={class:"card-wrapper"},Mn=["onClick"],Tn={class:"card-inner-wrapper"},An={class:"card-title"},Un={class:"icon"},Ze=j(e.defineComponent({__name:"TabCard",props:{cards:{},tableRef:{}},setup(t){const{t:o}=pe.useI18n(),n=F.useRoute(),r=F.useRouter(),a=t,s=e.ref(a.cards[0].key);function i(l){l.disabled||(s.value=l.key,a.tableRef.updateConfigAndRefresh(l.model),r.push({path:n.path,query:Gt(Fe({},n.query),{tab:l.key})}))}return e.onMounted(()=>{let l;if(n.query.tab!==void 0){for(let c of a.cards)if(c.key===n.query.tab){s.value=c.key,l=c;break}}e.nextTick(()=>{a.tableRef&&a.cards&&a.cards.length>0&&a.tableRef.updateConfigAndRefresh((l!=null?l:a.cards[0]).model)})}),e.watch(()=>a.cards,l=>{if(n.query.tab!==void 0){for(let c of a.cards)if(c.key===n.query.tab){s.value=c.key;break}}else l&&l.length>0&&(s.value=l[0].key,a.tableRef.updateConfigAndRefresh(a.cards[0].model))},{deep:!0}),(l,c)=>(e.openBlock(),e.createElementBlock("div",Dn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.cards,f=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["card",{"card-selected":s.value===f.key}]),onClick:b=>i(f)},[e.createElementVNode("div",Tn,[e.createElementVNode("div",An,[e.createElementVNode("div",Un,[f.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.icon),{key:0,class:"svg-icon"})):e.createCommentVNode("",!0)]),e.createElementVNode("span",{style:e.normalizeStyle({color:f.disabled?"#aaa":"black"})},e.toDisplayString(e.unref(o)(f.label)),5)]),e.createElementVNode("span",null,e.toDisplayString(f.count),1)])],10,Mn))),256))]))}}),[["__scopeId","data-v-047a86e6"]]);function me(t,o,n){switch(o){case"POST":return v.post(t,n);case"PUT":return v.put(t,n);case"DELETE":return v.delete(t+"/"+n);default:return v.get(t,{params:n})}}const Be=t=>{const o=Object.keys(t);let n={};o.forEach(r=>{n[r]=void 0}),Object.assign(t,n)},Rn={key:1,class:"view-span"},Mt=j(e.defineComponent({__name:"FormView",props:{id:{},sessionId:{},mode:{},model:{},disableInline:{type:Boolean},closeDialogFunc:{type:Function},afterSubmitFunc:{type:Function}},emits:["update:id"],setup(t,{expose:o,emit:n}){const{t:r}=Ee.global,a=t,s=e.reactive({}),i=e.ref(!1),l=e.ref(),c=e.reactive({}),f=e.ref(!0),b=w=>a.mode==="view"&&(U(w,void 0)||U(w,"input")||U(w,"select")||U(w,"password")),_=e.computed(()=>a.model.fields?a.model.fields.filter(w=>{var V,p,d,h;let u=w.visible!==!1&&((V=w.formItemAttributes)==null?void 0:V.visible)!==!1;if(a.mode!=="view"&&((p=w.formItemAttributes)==null?void 0:p.editable)===!1||a.mode==="view"&&((d=w.formItemAttributes)==null?void 0:d.type)==="password")return!1;let C=(h=w.formItemAttributes)==null?void 0:h.showCondition;return C&&C.field&&C.value!==void 0?s[C.field]===C.value:u}):[]);e.watch([()=>a.id,()=>a.sessionId],()=>{O()});function S(){const w=a.model.fields;let u={};w==null||w.forEach(C=>{var V,p,d,h,N,P,A,y,B;if(s[C.prop]=null,C.visible!==!1&&((V=C.formItemAttributes)==null?void 0:V.visible)!==!1){if(((p=C.formItemAttributes)==null?void 0:p.defaultValue)!==void 0?s[C.prop]=(d=C.formItemAttributes)==null?void 0:d.defaultValue:s[C.prop]=void 0,a.mode!=="view"){let G=(h=C.formItemAttributes)==null?void 0:h.validationRule;G!==void 0&&(u[C.prop]=G),Object.assign(c,u)}const g=C.formItemAttributes,m=g==null?void 0:g.type,k=(N=g==null?void 0:g.selectAttributes)==null?void 0:N.api,D=(P=g==null?void 0:g.selectAttributes)==null?void 0:P.valueMappingField,q=(A=g==null?void 0:g.selectAttributes)==null?void 0:A.labelMappingField;if(m==="select"&&k){let G=k;const K=(y=g==null?void 0:g.selectAttributes)==null?void 0:y.queryParamName,re=(B=g==null?void 0:g.selectAttributes)==null?void 0:B.queryParamValueField;K&&(G=`${G}?${K}=${a.id}`),re||me(G,"GET",{}).then(({data:X})=>{var Z;if((Z=C.formItemAttributes)!=null&&Z.selectAttributes){let H=[];Array.isArray(X.data)?H=X.data:X.data.list&&Array.isArray(X.data.list)&&(H=X.data.list),C.formItemAttributes.selectAttributes.options=H.map(L=>({value:D?L[D]:L.value,label:q?L[q]:L.label}))}})}}})}function O(){var w;console.log("init form",a.id,a.model),$(),f.value=(w=a.model.useI18n)!=null?w:!0,S(),(a.mode==="update"||a.mode==="view")&&a.id!==void 0&&a.id!==""&&a.model.api!==""&&(i.value=!0,me(`${a.model.api}/${a.id}`,"GET",{}).then(({data:u})=>{Be(s),Object.assign(s,u.data),i.value=!1}))}function M(){return new Promise((w,u)=>{var V,p,d,h;((p=(V=a.model.formConfig)==null?void 0:V.functions)==null?void 0:p.beforeSubmit)!==void 0&&Object.assign(s,(h=(d=a.model.formConfig)==null?void 0:d.functions)==null?void 0:h.beforeSubmit(s));let C=a.mode==="create"?"POST":"PUT";a.model.api&&me(a.model.api,C,s).then(({data:N})=>{var P,A,y,B;N.code===0&&(a.closeDialogFunc&&a.closeDialogFunc(),((A=(P=a.model.formConfig)==null?void 0:P.functions)==null?void 0:A.afterSubmit)!==void 0&&((B=(y=a.model.formConfig)==null?void 0:y.functions)==null||B.afterSubmit(N.data)),a.afterSubmitFunc&&a.afterSubmitFunc(),w())})})}function $(){var w;(w=l.value)==null||w.resetFields()}function I(w){return w.label?f?r(w.label):w.label:w.prop.slice(0,1).toUpperCase()+w.prop.slice(1).toLowerCase()}function E(w){var u,C,V,p;if(w){if(U(w,"select")){const d=(C=(u=w.tableColumnAttributes)==null?void 0:u.functions)==null?void 0:C.transformValue;if(d)return d(s[w.prop]);const h=(p=(V=w.formItemAttributes)==null?void 0:V.selectAttributes)==null?void 0:p.viewModeLabelField;if(h)return s[h]}return s[w.prop]}}function z(w){var u;return((u=w.formItemAttributes)==null?void 0:u.updatable)===!1&&a.mode==="update"}function T(w,u){var V,p;const C=(p=(V=u.formItemAttributes)==null?void 0:V.type)!=null?p:"input";switch(w){case"input":return a.mode==="view"?!1:C==="input"||C==="password";case"select":return!0;default:return console.log("Error: unrecognized form component type: ",w),!0}}function U(w,u){var C;return((C=w.formItemAttributes)==null?void 0:C.type)===u}function Y(w){var u;for(let C of a.model.fields){const V=(u=C.formItemAttributes)==null?void 0:u.selectAttributes;if(!(!C.formItemAttributes||C.formItemAttributes.type!=="select"||!V||!V.queryParamValueField)&&V.queryParamValueField===w.prop){const p=V.api;if(p){let d=p;const h=V.queryParamName;h&&(d=`${d}?${h}=${s[V.queryParamValueField]}`),me(d,"GET",{}).then(({data:N})=>{if(V){let P=[];Array.isArray(N.data)?P=N.data:N.data.list&&Array.isArray(N.data.list)&&(P=N.data.list),V.options=P.map(A=>({value:V.valueMappingField?A[V.valueMappingField]:A.value,label:V.labelMappingField?A[V.labelMappingField]:A.label}))}})}}}}return e.onMounted(()=>{O()}),o({refresh:O,reset:$,submit:M,formData:s}),(w,u)=>{const C=e.resolveComponent("el-input"),V=e.resolveComponent("el-switch"),p=e.resolveComponent("el-date-picker"),d=e.resolveComponent("el-option"),h=e.resolveComponent("el-select"),N=e.resolveComponent("el-form-item"),P=e.resolveComponent("el-form"),A=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createBlock(P,{ref_key:"formRef",ref:l,model:s,rules:c,"label-width":"auto","label-position":"left","require-asterisk-position":"right",inline:!a.disableInline},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,y=>(e.openBlock(),e.createBlock(N,{class:"form-item",style:e.normalizeStyle({width:a.disableInline?"100%":"calc(50% - 32px)"}),prop:y.prop,label:I(y)},{default:e.withCtx(()=>{var B;return[T("input",y)?(e.openBlock(),e.createBlock(C,{key:0,type:U(y,"password")?"password":"text",modelValue:s[y.prop],"onUpdate:modelValue":g=>s[y.prop]=g,placeholder:(B=y.formItemAttributes)==null?void 0:B.placeholder,disabled:z(y)},null,8,["type","modelValue","onUpdate:modelValue","placeholder","disabled"])):e.createCommentVNode("",!0),b(y)?(e.openBlock(),e.createElementBlock("span",Rn,e.toDisplayString(E(y)),1)):e.createCommentVNode("",!0),U(y,"switch")?(e.openBlock(),e.createBlock(V,{key:2,modelValue:s[y.prop],"onUpdate:modelValue":g=>s[y.prop]=g},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0),U(y,"datepicker")?(e.openBlock(),e.createBlock(p,{key:3,type:"date",modelValue:s[y.prop],"onUpdate:modelValue":g=>s[y.prop]=g},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0),U(y,"select")&&w.mode!=="view"?(e.openBlock(),e.createBlock(h,{key:4,modelValue:s[y.prop],"onUpdate:modelValue":g=>s[y.prop]=g,disabled:z(y),onChange:g=>Y(y)},{default:e.withCtx(()=>{var g,m;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((m=(g=y.formItemAttributes)==null?void 0:g.selectAttributes)==null?void 0:m.options,k=>(e.openBlock(),e.createBlock(d,{value:k.value,label:k.label},null,8,["value","label"]))),256))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["style","prop","label"]))),256))]),_:1},8,["model","rules","inline"])),[[A,i.value]])}}}),[["__scopeId","data-v-83dfae03"]]),Fn={class:"console-dialog__body"},Ln={key:0,class:"process-view"},Gn={class:"operation-button-wrapper"},Tt=e.defineComponent({__name:"FormDialog",props:{id:{},mode:{},model:{},visible:{type:Boolean},showProcess:{type:Boolean},afterSubmitFunc:{type:Function}},emits:["update:visible","update:id"],setup(t,{expose:o,emit:n}){const{t:r}=pe.useI18n(),a=t,s=e.ref(0),i=n,l=e.ref();e.watch(()=>a.visible,()=>{a.visible&&s.value++});function c(){l.value&&l.value.refresh()}function f(){i("update:visible",!1),l.value.reset()}function b(){l.value.submit()}return o({close:f,refresh:c}),(_,S)=>{const O=e.resolveComponent("el-step"),M=e.resolveComponent("el-steps"),$=e.resolveComponent("el-button"),I=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(I,{class:"console-dialog",title:"Edit","align-center":"","model-value":a.visible,width:"800px",onClose:f},{footer:e.withCtx(()=>{var E;return[e.createElementVNode("div",{class:"dialog-footer",style:e.normalizeStyle({width:a.showProcess?"calc(100% - 350px)":"auto"})},[e.createElementVNode("div",Gn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((E=a.model.formConfig)==null?void 0:E.dialogButtons,z=>(e.openBlock(),e.createBlock($,{onClick:T=>z.function(l.value.formData)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)(z.label)),1)]),_:2},1032,["onClick"]))),256))]),e.createElementVNode("div",null,[e.createVNode($,{onClick:f},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("common.basic.cancel")),1)]),_:1}),e.createVNode($,{type:"primary",onClick:b},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("common.basic.save")),1)]),_:1})])],4)]}),default:e.withCtx(()=>[e.createElementVNode("div",Fn,[e.createVNode(Mt,{class:"form-view",style:e.normalizeStyle({width:_.showProcess?"calc(100% - 280px)":"100%"}),ref_key:"formViewRef",ref:l,id:a.id,sessionId:s.value,mode:a.mode,model:a.model,afterSubmitFunc:a.afterSubmitFunc,closeDialogFunc:f,disableInline:a.showProcess},null,8,["style","id","sessionId","mode","model","afterSubmitFunc","disableInline"]),_.showProcess?(e.openBlock(),e.createElementBlock("div",Ln,[S[0]||(S[0]=e.createElementVNode("h1",null,"流程动态",-1)),e.createVNode(M,{style:{height:"90%"},direction:"vertical",active:1},{default:e.withCtx(()=>[e.createVNode(O,{title:"Step 1"}),e.createVNode(O,{title:"Step 2"})]),_:1})])):e.createCommentVNode("",!0)])]),_:1},8,["model-value"])}}}),zn={class:"toolbar"},jn={class:"tool-buttons"},qn={class:"tool-buttons"},Hn={key:2},Oe=j(e.defineComponent({__name:"TableView",props:{model:{}},setup(t,{expose:o}){const{t:n}=Ee.global,r=t,a=e.reactive([]),s=e.reactive({showPane:!0}),i=e.ref(""),l=e.ref(!0),c=e.ref(!1),f=F.useRouter(),b=e.ref(""),_=e.reactive([]),S=e.reactive([]),O=e.ref(),M=e.ref([]),$=e.ref("create"),I=e.ref(!0),E=e.ref(!1),z=e.ref(""),T=e.reactive({pageSize:10,pageNo:1,totalElements:0}),U=e.computed(()=>a.filter(m=>{var k,D;return((k=m.formItemAttributes)==null?void 0:k.type)!=="password"&&m.visible!==!1&&((D=m.tableColumnAttributes)==null?void 0:D.visible)!==!1}));function Y(m,k){var K,re,X,Z;let D=k.row[m.prop];const q=(re=(K=m.tableColumnAttributes)==null?void 0:K.functions)==null?void 0:re.transformValue,G=(X=m.tableColumnAttributes)==null?void 0:X.transformValueMappings;if(q)D=q(D);else if(G&&G.length>0){for(let H of G)if(D===H.value){D=n(H.label);break}}else if(((Z=m.formItemAttributes)==null?void 0:Z.type)==="select"){const H=m.formItemAttributes.selectAttributes;if(H){if(H.viewModeLabelField)D=k.row[H.viewModeLabelField];else if(H.options&&H.options.length>0){for(let L of H.options)if(L.value===k.row[m.prop]){D=L.label;break}}}}return D}function w(m,k){var D,q;return m.label?n(m.label):(q=(D=m.functions)==null?void 0:D.transformLabel)==null?void 0:q.call(D,k.$index,k.row)}function u(m){Be(r.model),Object.assign(r.model,m)}function C(){var k,D,q;if(I.value=!0,!r.model||!r.model.api)return;Be(s),s.showPane=!0,Object.assign(s,(k=r.model.tableConfig)!=null?k:{}),a.splice(0,a.length,...r.model.fields),i.value=(D=r.model.route)!=null?D:"",l.value=(q=r.model.useI18n)!=null?q:!0;let m=Fe({},s.queryParams);m.pageSize=T.pageSize,m.pageNo=T.pageNo,m.search=b.value,me(r.model.api,"GET",m).then(({data:G})=>{const{list:K,totalCount:re}=G.data;_.splice(0,_.length,...K),T.totalElements=re,I.value=!1})}function V(){var m,k;s.createPageRoutePath!==void 0?f.push(s.createPageRoutePath):((m=s.functions)==null?void 0:m.create)!==void 0?(k=s.functions)==null||k.create():($.value="create",z.value="",c.value=!0)}function p(m,k){r.model.api&&me(r.model.api,"DELETE",k.id).then(({data:D})=>{D.code===0&&(c.value=!1,C())})}function d(){he.ElMessageBox.confirm("The selected items will be deleted. Continue?",n("common.table.warning"),{confirmButtonText:n("common.basic.confirm"),cancelButtonText:n("common.basic.cancel"),type:"warning"}).then(()=>{var m,k;if(((m=s.functions)==null?void 0:m.batchDelete)!==void 0)(k=s.functions)==null||k.batchDelete(M.value);else{const D=M.value.map(q=>q.id);v.delete(`${r.model.api}/${D.join(",")}`).then(({data:q})=>{q.code===0&&(c.value=!1,C())})}O.value.clearSelection()}).catch(()=>{O.value.clearSelection()})}function h(m){T.pageSize=m,C()}function N(m){T.pageNo=m,C()}function P(m,k){s.editPageRoutePath!==void 0?f.push({path:s.editPageRoutePath,query:{id:k.id}}):(z.value=k.id,$.value="update",c.value=!0)}function A(){let m=window.location.origin+r.model.api+"/export";const k=s.queryParams;k!==void 0&&Object.keys(k).length>0&&(m+="?",Object.entries(s.queryParams).map(D=>{m+=`${D[0]}=${D[1]}&`})),window.open(m)}function y(m){M.value=m}function B(m){return m.label?l.value?n(m.label):m.label:m.prop.slice(0,1).toUpperCase()+m.prop.slice(1).toLowerCase()}function g(m){m?(E.value=!0,S.splice(0,S.length,..._),_.splice(0,_.length,...M.value)):(E.value=!1,_.splice(0,_.length,...S))}return e.watch(()=>r.model,()=>{C()},{deep:!0,immediate:!0}),o({multipleSelection:M,refresh:C,updateConfigAndRefresh:u}),(m,k)=>{const D=e.resolveComponent("el-checkbox"),q=e.resolveComponent("el-badge"),G=e.resolveComponent("el-button"),K=e.resolveComponent("el-icon"),re=e.resolveComponent("el-tooltip"),X=e.resolveComponent("el-input"),Z=e.resolveComponent("el-table-column"),H=e.resolveComponent("router-link"),L=e.resolveComponent("el-tag"),le=e.resolveComponent("el-popconfirm"),ce=e.resolveComponent("el-table"),$e=e.resolveComponent("el-pagination"),or=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"table-view-wrapper":s.showPane})},[e.createElementVNode("div",zn,[e.createElementVNode("div",jn,[s.selectMode?(e.openBlock(),e.createBlock(q,{key:0,value:M.value.length,type:"primary",class:"selected-badge"},{default:e.withCtx(()=>[e.createVNode(D,{class:"selected-checkbox",border:!0,label:e.unref(n)("common.table.viewSelected"),onChange:g},null,8,["label"])]),_:1},8,["value"])):e.createCommentVNode("",!0),!s.selectMode&&!s.readOnly&&s.creatable!==!1?(e.openBlock(),e.createBlock(G,{key:1,type:"primary",onClick:V},{default:e.withCtx(()=>{var Q,R;return[e.createTextVNode(e.toDisplayString(((Q=s.labels)==null?void 0:Q.create)!=null?e.unref(n)((R=s.labels)==null?void 0:R.create):e.unref(n)("common.table.create")),1)]}),_:1})):e.createCommentVNode("",!0),!s.selectMode&&!s.readOnly&&s.deletable!==!1?(e.openBlock(),e.createBlock(G,{key:2,disabled:M.value.length==0,type:"danger",plain:"",onClick:d},{default:e.withCtx(()=>{var Q,R;return[e.createTextVNode(e.toDisplayString(((Q=s.labels)==null?void 0:Q.delete)!=null?e.unref(n)((R=s.labels)==null?void 0:R.delete):e.unref(n)("common.table.delete")),1)]}),_:1},8,["disabled"])):e.createCommentVNode("",!0),e.createVNode(G,{icon:e.unref(oe.Refresh),onClick:C},null,8,["icon"]),s.tooltip?(e.openBlock(),e.createBlock(re,{key:3,effect:"dark",content:e.unref(n)(s.tooltip),placement:"right"},{default:e.withCtx(()=>[e.createVNode(K,{style:{color:"#8ba74f"}},{default:e.withCtx(()=>[e.createVNode(e.unref(oe.QuestionFilled))]),_:1})]),_:1},8,["content"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",qn,[s.export?(e.openBlock(),e.createBlock(G,{key:0,class:"button-export",onClick:A},{default:e.withCtx(()=>[e.createVNode(K,null,{default:e.withCtx(()=>[e.createVNode(e.unref(oe.Download))]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(X,{placeholder:`${e.unref(n)("common.table.search")}...`,modelValue:b.value,"onUpdate:modelValue":k[0]||(k[0]=Q=>b.value=Q)},{append:e.withCtx(()=>[e.createVNode(G,{style:{"margin-left":"-20px"},icon:e.unref(oe.Search),onClick:C},null,8,["icon"])]),_:1},8,["placeholder","modelValue"])])]),e.withDirectives((e.openBlock(),e.createBlock(ce,{border:!0,ref_key:"tableRef",ref:O,data:_,onSelectionChange:y,class:"table"},{default:e.withCtx(()=>{var Q;return[s.readOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z,{key:0,type:"selection",width:"50"})),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,R=>{var ue;return e.openBlock(),e.createBlock(Z,{prop:R.prop,label:B(R),width:(ue=R.tableColumnAttributes)==null?void 0:ue.width,"show-overflow-tooltip":""},{default:e.withCtx(ye=>{var we,Pe,Rt;return[(we=R.tableColumnAttributes)!=null&&we.link?(e.openBlock(),e.createBlock(H,{key:0,class:"router-link",to:`/${i.value}/detail?id=${ye.row.id}`},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(Y(R,ye)),1)]),_:2},1032,["to"])):(Pe=R.tableColumnAttributes)!=null&&Pe.routerLink?(e.openBlock(),e.createBlock(H,{key:1,class:"router-link",to:R.tableColumnAttributes.routerLink.replace("{id}",ye.row.id)},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(Y(R,ye)),1)]),_:2},1032,["to"])):(e.openBlock(),e.createElementBlock("span",Hn,e.toDisplayString(Y(R,ye)),1)),((Rt=R.tableColumnAttributes)==null?void 0:Rt.type)==="tag"?(e.openBlock(),e.createBlock(L,{key:3},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ye.row[R.prop]),1)]),_:2},1024)):e.createCommentVNode("",!0)]}),_:2},1032,["prop","label","width"])}),256)),s.operations===void 0&&!((Q=s.selectMode)!=null&&Q)&&!s.readOnly?(e.openBlock(),e.createBlock(Z,{key:1,label:e.unref(n)("common.table.operation"),width:"120"},{default:e.withCtx(R=>[s.updatable!==!1?(e.openBlock(),e.createBlock(G,{key:0,link:"",type:"primary",class:"operation-button",onClick:ue=>P(R.$index,R.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("common.table.edit")),1)]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),e.createVNode(le,{title:"Are you sure to delete this?",onConfirm:ue=>p(R.$index,R.row)},{reference:e.withCtx(()=>[s.deletable!==!1?(e.openBlock(),e.createBlock(G,{key:0,link:"",type:"primary",class:"operation-button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("common.table.delete")),1)]),_:1})):e.createCommentVNode("",!0)]),_:2},1032,["onConfirm"])]),_:1},8,["label"])):e.createCommentVNode("",!0),s.operations!==void 0&&!s.readOnly?(e.openBlock(),e.createBlock(Z,{key:2,label:e.unref(n)("common.table.operation"),width:"120"},{default:e.withCtx(R=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.operations,ue=>(e.openBlock(),e.createBlock(G,{class:"operation-button",link:"",type:"primary",key:ue.label,onClick:ye=>{var we,Pe;return((Pe=(we=ue.functions)==null?void 0:we.click)==null?void 0:Pe.call(we,R.$index,R.row))&&C()}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w(ue,R)),1)]),_:2},1032,["onClick"]))),128))]),_:1},8,["label"])):e.createCommentVNode("",!0)]}),_:1},8,["data"])),[[or,I.value]]),E.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e,{key:0,size:"small",background:"",onSizeChange:h,onCurrentChange:N,currentPage:T.pageNo,"onUpdate:currentPage":k[1]||(k[1]=Q=>T.pageNo=Q),"page-sizes":[10,20,50,100],"page-size":T.pageSize,layout:"total, sizes, prev, pager, next",total:T.totalElements},null,8,["currentPage","page-size","total"])),e.createVNode(Tt,{model:m.model,mode:$.value,id:z.value,afterSubmitFunc:C,visible:c.value,"onUpdate:visible":k[2]||(k[2]=Q=>c.value=Q)},null,8,["model","mode","id","visible"])],2)}}}),[["__scopeId","data-v-682537f9"]]),Jn={class:"nav-bar"},Wn={key:0,class:"info-card-wrapper"},Yn={class:"icon-wrapper"},Qn={class:"info-wrapper"},Kn={class:"title-wrapper"},Xn={class:"tabs-wrapper"},Zn={class:"dialog-footer"},At=j(e.defineComponent({__name:"DetailPage",setup(t){const{t:o}=pe.useI18n(),n=F.useRoute(),r=F.useRouter(),a=e.computed(()=>n.query.id),s=e.ref(!1),i=e.ref(!1),l=e.ref("view"),c=e.ref(),f=e.ref(-1),b=e.ref(),_=e.ref(),S=e.ref("summary"),O=e.ref(""),M=e.ref(""),$=e.ref(""),I=e.ref(0),E=e.reactive({api:"",fields:[]}),z=e.reactive([]);let T=[];e.watch([()=>r.currentRoute.value,ee],()=>{u()},{immediate:!0,deep:!0});function U(p){f.value=parseInt(p.index)-1}function Y(){var N;let p=(N=T[f.value].api)==null?void 0:N.replace("/select","");p=p==null?void 0:p.substring(p.lastIndexOf("/"));const d=E.api+"/"+a.value+p,h=_.value.multipleSelection.map(P=>P.id);me(d,"POST",h).then(()=>{b.value.refresh(),i.value=!1})}function w(p,d,h){var A;h.functions||(h.functions={}),h.functions.create=()=>{i.value=!0,_.value&&_.value.refresh()};let N=ae.cloneDeep(d);N.tableConfig||(N.tableConfig={}),N.tableConfig.selectMode=!0,N.tableConfig.queryParams={},p.queryParamName&&(N.tableConfig.queryParams[p.queryParamName]=a.value);for(var P in N.fields)N.fields[P].tableColumnAttributes&&(A=N.fields[P].tableColumnAttributes)!=null&&A.link&&(N.fields[P].tableColumnAttributes.link=!1);T.push(N),h.labels={create:"common.table.add",delete:"common.table.remove"},h.functions.batchDelete=y=>{var k;let B=(k=T[f.value].api)==null?void 0:k.replace("/select","");B=B==null?void 0:B.substring(B.lastIndexOf("/"));const g=E.api+"/"+a.value+B,m=y.map(D=>D.id);v.delete(`${g}/${m.join(",")}`).then(({data:D})=>{D.code===0&&b.value.refresh()})},h.operations=[{label:"common.table.remove",functions:{click:(y,B)=>{var k;let g=(k=T[f.value].api)==null?void 0:k.replace("/select","");g=g==null?void 0:g.substring(g.lastIndexOf("/"));const m=E.api+"/"+a.value+g;me(m,"DELETE",B.id).then(()=>{b.value.refresh()})}}}],N.api+="/select"}function u(){var N,P,A;z.splice(0);const p=n.params.model;if(ee.value[p]===void 0){console.warn("Detail page model not exist:",p);return}else console.debug("Detail page model found:",p,ee.value[p]);Be(E);const d=ae.cloneDeep(ee.value[p]);Object.assign(E,d),I.value++,f.value=-1,S.value="summary";const h=(P=(N=E.pageConfig)==null?void 0:N.detailPage)==null?void 0:P.tabs;if(h)for(let y of h){const B=ae.cloneDeep(ee.value[y.modelKey]);if(z.push(B),y.type==="table"){B.tableConfig||(B.tableConfig={});let g=B.tableConfig;g.showPane=!1,y.modelRelationType==="associated"?w(y,B,g):y.modelRelationType==="child"&&(T.push({fields:[]}),B.formConfig===void 0&&(B.formConfig={}),B.formConfig.functions===void 0&&(B.formConfig.functions={}),y.queryParamName&&(B.formConfig.functions.beforeSubmit=m=>{m[y.queryParamName]=a.value})),g.queryParams||(g.queryParams={}),y.queryParamName&&(g.queryParams[y.queryParamName]=a.value),y.queryParams&&Object.assign(g.queryParams,y.queryParams),g.readOnly=(A=y.readOnly)!=null?A:!1,y.includeFields&&(B.fields=B.fields.filter(m=>{var k;return(k=y.includeFields)==null?void 0:k.includes(m.prop)})),y.excludeFields&&(B.fields=B.fields.filter(m=>{var k;return!((k=y.excludeFields)!=null&&k.includes(m.prop))})),y.tooltip&&(g.tooltip=y.tooltip)}}}e.watch([()=>{var p,d;return(d=(p=E.pageConfig)==null?void 0:p.detailPage)==null?void 0:d.infoCard},()=>{var p;return(p=c.value)==null?void 0:p.formData}],p=>{e.nextTick(()=>{var h,N,P;const d=(N=(h=E.pageConfig)==null?void 0:h.detailPage)==null?void 0:N.infoCard;d&&(O.value=d.titleFieldProp?c.value.formData[d.titleFieldProp]:"",M.value=d.subtitleFieldProp?c.value.formData[d.subtitleFieldProp]:"",$.value=d.tagFieldProp?c.value.formData[d.tagFieldProp]:"",(P=E.fields)==null||P.forEach(A=>{var y,B;if(A.prop===d.tagFieldProp){const g=(B=(y=A.tableColumnAttributes)==null?void 0:y.functions)==null?void 0:B.transformValue;g&&($.value=g($.value))}}))})},{immediate:!0,deep:!0});function C(){s.value=!0}function V(){c.value.refresh()}return(p,d)=>{var G,K,re,X,Z,H;const h=e.resolveComponent("el-breadcrumb-item"),N=e.resolveComponent("el-breadcrumb"),P=e.resolveComponent("el-button"),A=e.resolveComponent("el-icon"),y=e.resolveComponent("el-dropdown-item"),B=e.resolveComponent("el-dropdown-menu"),g=e.resolveComponent("el-dropdown"),m=e.resolveComponent("el-tag"),k=e.resolveComponent("el-tab-pane"),D=e.resolveComponent("el-tabs"),q=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Jn,[e.createVNode(N,null,{default:e.withCtx(()=>{var L,le;return[e.createVNode(h,{to:{path:`/${(le=(L=E==null?void 0:E.breadcrumbRoute)!=null?L:E==null?void 0:E.route)!=null?le:""}`}},{default:e.withCtx(()=>{var ce;return[e.createTextVNode(e.toDisplayString(e.unref(o)((ce=E==null?void 0:E.name)!=null?ce:"")),1)]}),_:1},8,["to"]),e.createVNode(h,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.basic.detail")),1)]),_:1})]}),_:1}),e.createElementVNode("div",null,[e.createVNode(P,{type:"primary",onClick:C},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.table.edit")),1)]),_:1}),e.createVNode(P,{type:"danger",plain:"",disabled:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.table.delete")),1)]),_:1}),((K=(G=E.pageConfig)==null?void 0:G.detailPage)==null?void 0:K.operationButtons)!==void 0?(e.openBlock(),e.createBlock(g,{key:0},{dropdown:e.withCtx(()=>[e.createVNode(B,null,{default:e.withCtx(()=>{var L,le;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((le=(L=E.pageConfig)==null?void 0:L.detailPage)==null?void 0:le.operationButtons,ce=>(e.openBlock(),e.createBlock(y,{onClick:$e=>ce.function(c.value.formData)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)(ce.label)),1)]),_:2},1032,["onClick"]))),256))]}),_:1})]),default:e.withCtx(()=>[e.createVNode(P,{style:{margin:"0 10px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.basic.more")),1),e.createVNode(A,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(oe.ArrowDown))]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(P,{icon:e.unref(oe.Refresh),onClick:V},null,8,["icon"])])]),(X=(re=E.pageConfig)==null?void 0:re.detailPage)!=null&&X.infoCard?(e.openBlock(),e.createElementBlock("div",Wn,[e.createElementVNode("div",Yn,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((Z=E.pageConfig.detailPage.infoCard.icon)!=null?Z:""),{class:"icon"}))]),e.createElementVNode("div",Qn,[e.createElementVNode("div",Kn,[e.createElementVNode("h1",null,e.toDisplayString(O.value),1),((H=$.value)==null?void 0:H.length)>0?(e.openBlock(),e.createBlock(m,{key:0,size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString($.value),1)]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("span",null,e.toDisplayString(M.value),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",Xn,[e.createVNode(D,{modelValue:S.value,"onUpdate:modelValue":d[0]||(d[0]=L=>S.value=L),onTabClick:U},{default:e.withCtx(()=>{var L,le;return[e.createVNode(k,{label:e.unref(o)("common.basic.summary"),name:"summary"},{default:e.withCtx(()=>[e.createVNode(Mt,{ref_key:"formViewRef",ref:c,id:a.value,sessionId:I.value,mode:l.value,model:E},null,8,["id","sessionId","mode","model"])]),_:1},8,["label"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((le=(L=E.pageConfig)==null?void 0:L.detailPage)==null?void 0:le.tabs,ce=>{var $e;return e.openBlock(),e.createBlock(k,{label:e.unref(o)(($e=ce.name)!=null?$e:"")},null,8,["label"])}),256))]}),_:1},8,["modelValue"]),f.value>=0?(e.openBlock(),e.createBlock(Oe,{key:0,ref_key:"tabPaneTableRef",ref:b,model:z[f.value]},null,8,["model"])):e.createCommentVNode("",!0),e.createVNode(q,{modelValue:i.value,"onUpdate:modelValue":d[2]||(d[2]=L=>i.value=L),title:e.unref(o)("common.table.select"),width:"800px"},{footer:e.withCtx(()=>[e.createElementVNode("span",Zn,[e.createVNode(P,{onClick:d[1]||(d[1]=L=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.basic.cancel")),1)]),_:1}),e.createVNode(P,{type:"primary",onClick:Y},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.basic.save")),1)]),_:1})])]),default:e.withCtx(()=>[f.value>=0?(e.openBlock(),e.createBlock(Oe,{key:0,ref_key:"selectTableRef",ref:_,model:e.unref(T)[f.value]},null,8,["model"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])]),e.createVNode(Tt,{id:a.value,mode:"update",visible:s.value,"onUpdate:visible":d[3]||(d[3]=L=>s.value=L),model:E,afterSubmitFunc:V},null,8,["id","visible","model"])],64)}}}),[["__scopeId","data-v-f9250724"]]),vn={class:"page-title"},Ut=j(e.defineComponent({__name:"TablePage",setup(t){const{t:o}=pe.useI18n(),n=F.useRoute(),r=F.useRouter(),a=e.ref(),s=e.ref([]),i=e.reactive({api:"",fields:[]}),l=e.reactive(Fe({},i));function c(){var b,_,S,O,M;s.value=[],i.pageConfig&&((_=(b=i.pageConfig)==null?void 0:b.tablePage)!=null&&_.tabViewAttributes)&&(s.value=(M=(O=(S=i.pageConfig)==null?void 0:S.tablePage)==null?void 0:O.tabViewAttributes)==null?void 0:M.map($=>{let I;return $.modelKey&&ee.value[$.modelKey]?I=ae.cloneDeep(ee.value[$.modelKey]):I=ae.cloneDeep(i),$.queryParams&&(I.tableConfig||(I.tableConfig={}),I.tableConfig.queryParams=$.queryParams),$.fields&&(I.fields=$.fields),$.modelKey&&(I.breadcrumbRoute=i.route),{key:$.key,label:$.label,icon:$.icon,disabled:$.disabled,model:I}}))}function f(){var S,O;console.log("Init table page, loading model:",n.params.model),console.log("Current model list",ee.value);const b=n.params.model;if(ee.value[b]===void 0){console.warn("Model not found",b);return}Be(i);const _=ae.cloneDeep(ee.value[b]);Object.assign(i,_),(O=(S=i.pageConfig)==null?void 0:S.tablePage)!=null&&O.tabViewAttributes||Object.assign(l,i),c()}return e.watch([()=>r.currentRoute.value,ee],()=>{f()},{immediate:!0,deep:!0}),(b,_)=>{var O;const S=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h1",vn,e.toDisplayString(e.unref(o)((O=i.name)!=null?O:"")),1),e.createVNode(S,null,{default:e.withCtx(()=>{var M,$;return[($=(M=i.pageConfig)==null?void 0:M.tablePage)!=null&&$.tabViewAttributes?(e.openBlock(),e.createBlock(Ze,{key:0,class:"tabs-wrapper",cards:s.value,tableRef:a.value},null,8,["cards","tableRef"])):e.createCommentVNode("",!0)]}),_:1}),e.createVNode(Oe,{class:"table-wrapper",ref_key:"tableRef",ref:a,model:l},null,8,["model"])],64)}}}),[["__scopeId","data-v-d24124ee"]]),er=[ve,Pt,Ge,It,Dt,Xe,Ze,Oe,At,Ut],tr=t=>{t&&t.component&&er.forEach(o=>{console.log("component",o.__name,o),t.component(o.__name,o)})};x.Building=ve,x.ConsoleApp=Pt,x.DetailPage=At,x.Header=Ge,x.NoPermission=It,x.Secondary=Dt,x.SideMenu=Xe,x.TabCard=Ze,x.TablePage=Ut,x.TableView=Oe,x.activeMenuMapping=rt,x.default=tr,x.en=ot,x.i18n=Ee,x.menuList=ze,x.modelList=ee,x.pinia=Re,x.zh=nt,Object.defineProperties(x,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|