auto-vue-basic 0.0.45 → 0.0.46

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.
@@ -1189,7 +1189,7 @@ const Ke = /* @__PURE__ */ D({
1189
1189
  urls: [
1190
1190
  {
1191
1191
  required: !0,
1192
- message: a("base.placeholder.input base.rules"),
1192
+ message: a("base.placeholder.input menu.rules"),
1193
1193
  trigger: "blur"
1194
1194
  }
1195
1195
  ]
@@ -1294,7 +1294,7 @@ const Ke = /* @__PURE__ */ D({
1294
1294
  l(U, { span: 14 }, {
1295
1295
  default: o(() => [
1296
1296
  l(u, {
1297
- label: e(a)("base.rules"),
1297
+ label: e(a)("menu.rules"),
1298
1298
  prop: "urls"
1299
1299
  }, {
1300
1300
  default: o(() => [
@@ -1852,7 +1852,7 @@ const je = /* @__PURE__ */ D({
1852
1852
  _: 1
1853
1853
  }, 8, ["label"]),
1854
1854
  l(U, {
1855
- label: e(a)("base.rules"),
1855
+ label: e(a)("menu.rules"),
1856
1856
  prop: "rules"
1857
1857
  }, {
1858
1858
  default: o(() => [
@@ -1 +1 @@
1
- (function(L,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("auto-vue-manual")):typeof define=="function"&&define.amd?define(["exports","vue","auto-vue-manual"],e):(L=typeof globalThis<"u"?globalThis:L||self,e(L.AutoVueBasic={},L.Vue,L["auto-vue-manual"]))})(this,function(L,e,l){"use strict";const F=l.createAutoApi("admin",{},"key"),O=l.createAutoApi("role",{},"key"),Q=e.defineComponent({__name:"AdminFormModal",emits:["refresh"],setup(x,{expose:w,emit:g}){const C=g,b={key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]},{modal:m,title:i,form:a,formData:s,requesting:t,executing:f,open:p,modify:d,submit:N,closed:T}=l.useForm(C,b,F),A={username:[{required:!0,message:l.Translate("base.placeholder.input base.username"),trigger:"blur"}],phone:[{required:!0,validator:l.RulesUtils.phoneRule,message:l.Translate("base.placeholder.input base.phone"),trigger:"blur"}],password:[{required:!1,message:l.Translate("base.placeholder.input base.password"),trigger:"blur"}],email:[{required:!0,message:l.Translate("base.placeholder.input base.email"),trigger:"blur"}],language:[{required:!0,message:l.Translate("base.placeholder.select base.language"),trigger:"change"}],roles:[{required:!0,type:"Array",message:l.Translate("base.placeholder.select menu.Role"),trigger:"change"}]},c=e.ref([]),r=async()=>{const o=await O.list();c.value=Array.isArray(o==null?void 0:o.data)?o.data:[]};return e.onBeforeMount(async()=>{await r()}),w({open:p,modify:d}),(o,n)=>{const k=e.resolveComponent("el-input"),y=e.resolveComponent("el-form-item"),R=e.resolveComponent("el-radio-button"),h=e.resolveComponent("el-radio-group"),V=e.resolveComponent("el-checkbox"),_=e.resolveComponent("el-checkbox-group"),U=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":n[7]||(n[7]=E=>e.isRef(m)?m.value=E:null),title:e.unref(i)(),width:"600px",executing:e.unref(f),onClosed:e.unref(T),onSubmit:e.unref(N)},{default:e.withCtx(()=>[e.createVNode(U,{ref_key:"form",ref:a,model:e.unref(s),"label-width":"auto",rules:A,disabled:e.unref(t)||e.unref(f)},{default:e.withCtx(()=>[e.createVNode(y,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(s).username,"onUpdate:modelValue":n[0]||(n[0]=E=>e.unref(s).username=E),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(y,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(s).phone,"onUpdate:modelValue":n[1]||(n[1]=E=>e.unref(s).phone=E),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(y,{label:e.unref(l.Translate)("base.password"),prop:"password",required:!e.unref(s).key},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(s).password,"onUpdate:modelValue":n[2]||(n[2]=E=>e.unref(s).password=E),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(y,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(s).email,"onUpdate:modelValue":n[3]||(n[3]=E=>e.unref(s).email=E),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(y,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(s).language,"onUpdate:modelValue":n[4]||(n[4]=E=>e.unref(s).language=E)},{default:e.withCtx(()=>[e.createVNode(R,{value:"zh-CN"},{default:e.withCtx(()=>n[8]||(n[8]=[e.createTextVNode("zh-CN")])),_:1,__:[8]}),e.createVNode(R,{value:"en-US"},{default:e.withCtx(()=>n[9]||(n[9]=[e.createTextVNode("en-US")])),_:1,__:[9]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(y,{label:e.unref(l.Translate)("menu.Role"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(s).roles,"onUpdate:modelValue":n[5]||(n[5]=E=>e.unref(s).roles=E)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,E=>(e.openBlock(),e.createBlock(V,{key:E.key,value:E.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E.translate),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(y,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(s).remark,"onUpdate:modelValue":n[6]||(n[6]=E=>e.unref(s).remark=E),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),q=e.defineComponent({__name:"index",setup(x){const w={keyword:""},g=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:p})=>e.createVNode(l.BasicAvatar,{src:p.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:p})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[p.username]),e.createVNode("div",null,[p.email])]})},{label:l.Translate("base.phone"),prop:"phone",width:140},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.login_at"),prop:"login_at",width:160},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:p})=>e.createVNode(l.ModifyButton,{onModify:()=>f({key:p.key})},null)}],{requesting:C}=l.useLoading(F),{tableRef:b,formModalRef:m,keyword:i,search:a,reset:s,openFormModal:t,editFormModal:f}=l.useCrudPage(w);return(p,d)=>{const N=e.resolveComponent("el-input"),T=e.resolveComponent("el-space"),A=e.resolveComponent("el-page-header"),c=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(c,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(A,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(s)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(t)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(T,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(N,{class:"basic-search-input",modelValue:e.unref(i).keyword,"onUpdate:modelValue":d[0]||(d[0]=r=>e.unref(i).keyword=r),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:d[1]||(d[1]=e.withKeys(r=>e.unref(a)(),["enter"])),onClear:d[2]||(d[2]=r=>e.unref(a)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:d[3]||(d[3]=r=>e.unref(a)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:b,size:"small",columns:g,url:e.unref(F).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(i),autoSearch:""},null,8,["url","search-param"]),e.createVNode(Q,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(s)},null,8,["onRefresh"])]),_:1})}}}),J=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),D=l.createAutoApi("translation",{},"key"),X=e.defineComponent({__name:"LangFormModal",emits:["refresh"],setup(x,{expose:w,emit:g}){const C=g,b={id:0,key:"",module:"",language:"",result:"",remark:""},m={module:[{required:!0,message:l.Translate("language.placeholder.module"),trigger:"blur"}],key:[{required:!0,message:l.Translate("language.placeholder.key"),trigger:"blur"}],language:[{required:!0,message:l.Translate("language.placeholder.language"),trigger:"change"}],result:[{required:!0,message:l.Translate("language.placeholder.result"),trigger:"blur"}]},{modal:i,title:a,form:s,formData:t,requesting:f,executing:p,open:d,modify:N,submit:T,closed:A}=l.useForm(C,b,D);return w({open:d,modify:N}),(c,r)=>{const o=e.resolveComponent("el-input"),n=e.resolveComponent("el-form-item"),k=e.resolveComponent("el-radio-button"),y=e.resolveComponent("el-radio-group"),R=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":r[5]||(r[5]=h=>e.isRef(i)?i.value=h:null),title:e.unref(a)(),width:"600px",executing:e.unref(p),onClosed:e.unref(A),onSubmit:e.unref(T)},{default:e.withCtx(()=>[e.createVNode(R,{ref_key:"form",ref:s,model:e.unref(t),"label-width":"auto",rules:m,disabled:e.unref(f)||e.unref(p)},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("language.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).module,"onUpdate:modelValue":r[0]||(r[0]=h=>e.unref(t).module=h),placeholder:e.unref(l.Translate)("language.placeholder.module")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("language.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).key,"onUpdate:modelValue":r[1]||(r[1]=h=>e.unref(t).key=h),placeholder:e.unref(l.Translate)("language.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("language.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(t).language,"onUpdate:modelValue":r[2]||(r[2]=h=>e.unref(t).language=h)},{default:e.withCtx(()=>[e.createVNode(k,{label:"zh-CN"},{default:e.withCtx(()=>r[6]||(r[6]=[e.createTextVNode("zh-CN")])),_:1,__:[6]}),e.createVNode(k,{label:"en-US"},{default:e.withCtx(()=>r[7]||(r[7]=[e.createTextVNode("en-US")])),_:1,__:[7]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("language.result"),prop:"result",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).result,"onUpdate:modelValue":r[3]||(r[3]=h=>e.unref(t).result=h),placeholder:e.unref(l.Translate)("language.placeholder.result")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[4]||(r[4]=h=>e.unref(t).remark=h),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),$=e.defineComponent({__name:"index",setup(x){const w={keyword:"",status:0},g=[{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.language"),prop:"language",width:100},{label:l.Translate("base.key"),prop:"key",width:200},{label:l.Translate("base.result"),prop:"result",width:200},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:D.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:p})=>e.createVNode(l.ModifyButton,{onModify:()=>f({id:p.id})},null)}],{requesting:C}=l.useLoading(D),{tableRef:b,formModalRef:m,keyword:i,search:a,reset:s,openFormModal:t,editFormModal:f}=l.useCrudPage(w);return(p,d)=>{const N=e.resolveComponent("el-input"),T=e.resolveComponent("el-radio-button"),A=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-space"),r=e.resolveComponent("el-page-header"),o=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(o,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(r,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(s)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(t)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(c,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(N,{class:"basic-search-input",modelValue:e.unref(i).keyword,"onUpdate:modelValue":d[0]||(d[0]=n=>e.unref(i).keyword=n),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:d[1]||(d[1]=e.withKeys(n=>e.unref(a)(),["enter"])),onClear:d[2]||(d[2]=n=>e.unref(a)())},null,8,["modelValue","placeholder"]),e.createVNode(A,{modelValue:e.unref(i).status,"onUpdate:modelValue":d[3]||(d[3]=n=>e.unref(i).status=n),onChange:d[4]||(d[4]=n=>e.unref(a)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],n=>e.createVNode(T,{key:n,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${n}`),value:n},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:d[5]||(d[5]=n=>e.unref(a)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:b,size:"small",columns:g,url:e.unref(D).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(i),autoSearch:""},null,8,["url","search-param"]),e.createVNode(X,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(s)},null,8,["onRefresh"])]),_:1})}}}),Z=Object.freeze(Object.defineProperty({__proto__:null,default:$},Symbol.toStringTag,{value:"Module"})),P={tops:"tops",rules:"rules"},B=l.AutoApiUtils.createAutoApi("menu",P,"id",Object.keys(P),[],["TOP_MENU_LIST","MENU_LIST"]),z=l.createAutoApi("rule",{},"key");/*! Element Plus Icons Vue v2.3.1 */var u=e.defineComponent({name:"Key",__name:"key",setup(x){return(w,g)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M448 456.064V96a32 32 0 0 1 32-32.064L672 64a32 32 0 0 1 0 64H512v128h160a32 32 0 0 1 0 64H512v128a256 256 0 1 1-64 8.064M512 896a192 192 0 1 0 0-384 192 192 0 0 0 0 384"})]))}}),M=u;const v=e.defineComponent({__name:"TopMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{emit:w}){const g=w,C=x,{requesting:b}=l.useLoading(B),{value:m,options:i,change:a,refresh:s,filterOptions:t}=l.useSelect(e.toRef(C,"modelValue"),g,{key:"TOP_MENU_LIST",api:B,url:B.urls.tops,isArray:!0});return(f,p)=>{const d=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(d,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":p[1]||(p[1]=N=>e.isRef(m)?m.value=N:null),options:e.unref(i),multiple:x.multiple,disabled:e.unref(b),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(t),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(b),onRefresh:p[0]||(p[0]=N=>e.unref(s)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),ee=e.defineComponent({__name:"MenuFormModal",emits:["refresh"],setup(x,{expose:w,emit:g}){const C=g,b={id:0,menu_id:0,module:"",sort:0,name:"",en_name:"",url:"",component:"",icon:"",remark:"",meta:{active:"",icon:"",title:"",affix:!1,full:!1,hide:!1,keep_alive:!1,link:!1}},m={sort:[{required:!0,type:"number",message:l.Translate("base.placeholder.input base.sort"),trigger:"blur"}],module:[{required:!0,message:l.Translate("base.placeholder.input menu.module"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}],url:[{required:!0,message:l.Translate("base.placeholder.input base.url"),trigger:"blur"}],component:[{required:!0,message:l.Translate("base.placeholder.input menu.component"),trigger:"blur"}]},{modal:i,title:a,form:s,formData:t,requesting:f,executing:p,open:d,modify:N,submit:T,closed:A}=l.useForm(C,b,B);return w({open:d,modify:N}),(c,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-col"),k=e.resolveComponent("el-input-number"),y=e.resolveComponent("el-row"),R=e.resolveComponent("el-input"),h=e.resolveComponent("el-switch"),V=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":r[17]||(r[17]=_=>e.isRef(i)?i.value=_:null),title:e.unref(a)(),width:"1000px",executing:e.unref(p),onClosed:e.unref(A),onSubmit:e.unref(T)},{default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:s,model:e.unref(t),"label-width":"auto",rules:m,disabled:e.unref(f)||e.unref(p)},{default:e.withCtx(()=>[e.createVNode(y,{gutter:20},{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(y,{gutter:10},{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(v,{modelValue:e.unref(t).menu_id,"onUpdate:modelValue":r[0]||(r[0]=_=>e.unref(t).menu_id=_)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(k,{class:"w-full",modelValue:e.unref(t).sort,"onUpdate:modelValue":r[1]||(r[1]=_=>e.unref(t).sort=_),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(o,{label:e.unref(l.Translate)("menu.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(t).module,"onUpdate:modelValue":r[2]||(r[2]=_=>e.unref(t).module=_),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[3]||(r[3]=_=>e.unref(t).name=_),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[4]||(r[4]=_=>e.unref(t).en_name=_),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("menu.component"),prop:"component"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(t).component,"onUpdate:modelValue":r[5]||(r[5]=_=>e.unref(t).component=_),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.url"),prop:"url"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(t).url,"onUpdate:modelValue":r[6]||(r[6]=_=>e.unref(t).url=_),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[7]||(r[7]=_=>e.unref(t).remark=_),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(t).icon,"onUpdate:modelValue":r[8]||(r[8]=_=>e.unref(t).icon=_),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:r[9]||(r[9]=_=>{e.unref(t).meta.icon=_})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+e.unref(t).icon)},null,2)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.title"),prop:"meta.title"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(t).meta.title,"onUpdate:modelValue":r[10]||(r[10]=_=>e.unref(t).meta.title=_),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("menu.active"),prop:"meta.active"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(t).meta.active,"onUpdate:modelValue":r[11]||(r[11]=_=>e.unref(t).meta.active=_),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(y,null,{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(t).meta.link,"onUpdate:modelValue":r[12]||(r[12]=_=>e.unref(t).meta.link=_)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.keep_alive"),prop:"meta.keep_alive"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(t).meta.keep_alive,"onUpdate:modelValue":r[13]||(r[13]=_=>e.unref(t).meta.keep_alive=_)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(t).meta.hide,"onUpdate:modelValue":r[14]||(r[14]=_=>e.unref(t).meta.hide=_)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(t).meta.full,"onUpdate:modelValue":r[15]||(r[15]=_=>e.unref(t).meta.full=_)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(t).meta.affix,"onUpdate:modelValue":r[16]||(r[16]=_=>e.unref(t).meta.affix=_)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),le=e.defineComponent({__name:"MenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{emit:w}){const g=w,C=x,{requesting:b}=l.useLoading(B),{value:m,options:i,change:a,refresh:s,filterOptions:t}=l.useSelect(e.toRef(C,"modelValue"),g,{key:"MENU_LIST",api:B,isArray:!0});return(f,p)=>{const d=e.resolveComponent("el-space"),N=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(N,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":p[1]||(p[1]=T=>e.isRef(m)?m.value=T:null),options:e.unref(i),multiple:x.multiple,disabled:e.unref(b),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(t),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(b),onRefresh:p[0]||(p[0]=T=>e.unref(s)(!0))},null,8,["loading"])]),default:e.withCtx(({item:T})=>[e.createVNode(d,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${T.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(T.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),re=e.defineComponent({__name:"MenuRuleFormModal",emits:["refresh"],setup(x,{expose:w,emit:g}){const C=g,b={key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""},m={menu_id:[{required:!0,type:"number",message:l.Translate("base.placeholder.select menu.Menu"),trigger:"blur"}],sort:[{required:!0,type:"number",message:l.Translate("base.placeholder.input base.sort"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}],urls:[{required:!0,message:l.Translate("base.placeholder.input base.rules"),trigger:"blur"}]},{modal:i,title:a,form:s,formData:t,requesting:f,executing:p,open:d,modify:N,submit:T,closed:A}=l.useForm(C,b,z);return w({open:d,modify:N}),(c,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input-number"),k=e.resolveComponent("el-input"),y=e.resolveComponent("el-col"),R=e.resolveComponent("el-row"),h=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":r[6]||(r[6]=V=>e.isRef(i)?i.value=V:null),title:e.unref(a)("menu.rules"),width:"1000px",executing:e.unref(p),onClosed:e.unref(A),onSubmit:e.unref(T)},{default:e.withCtx(()=>[e.createVNode(h,{ref_key:"form",ref:s,model:e.unref(t),"label-width":"auto",rules:m,disabled:e.unref(f)||e.unref(p)},{default:e.withCtx(()=>[e.createVNode(R,{gutter:20},{default:e.withCtx(()=>[e.createVNode(y,{span:10},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(le,{modelValue:e.unref(t).menu_id,"onUpdate:modelValue":r[0]||(r[0]=V=>e.unref(t).menu_id=V)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(n,{class:"w-full",modelValue:e.unref(t).sort,"onUpdate:modelValue":r[1]||(r[1]=V=>e.unref(t).sort=V),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[2]||(r[2]=V=>e.unref(t).name=V),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[3]||(r[3]=V=>e.unref(t).en_name=V),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[4]||(r[4]=V=>e.unref(t).remark=V),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(y,{span:14},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(t).urls,"onUpdate:modelValue":r[5]||(r[5]=V=>e.unref(t).urls=V),type:"textarea",rows:11,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}});function K(x){return typeof x=="function"||Object.prototype.toString.call(x)==="[object Object]"&&!e.isVNode(x)}const j=e.defineComponent({__name:"index",setup(x){const w={keyword:"",status:0},g=e.ref(""),C=[{label:l.Translate("base.sort"),prop:"sort",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:r})=>e.createVNode("span",{class:"iconfont "+r.icon,style:"font-size: 16px;"},null)},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.parent"),prop:"parent",width:120,render:({row:r})=>{var o;return e.createVNode(e.Fragment,null,[(o=r.menu)==null?void 0:o.name])}},{label:l.Translate("base.name"),prop:"translate",width:120},{label:l.Translate("base.url"),prop:"url",align:"left",width:200},{label:l.Translate("menu.component"),prop:"component",align:"left",width:200},{label:l.Translate("menu.rules"),prop:"rules",width:0,align:"left",render:({row:r})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var o;return[(o=r.rules)==null?void 0:o.map(n=>e.createVNode(e.resolveComponent("el-popover"),{visible:g.value===n.key,title:l.Translate("message.title.warning"),placement:"top-end",width:220},{reference:()=>e.createVNode(e.resolveComponent("el-tag"),{class:"cursor-pointer",closable:!0,key:n.key,onClick:()=>A({key:n.key}),onClose:()=>g.value=n.key},{default:()=>[n.translate]}),default:()=>{let k,y;return e.createVNode("div",null,[e.createVNode("p",null,null),e.createVNode("p",null,[`${l.Translate("base.confirm base.delete menu.rules")}: ${r.translate}-${n.translate} ?`]),e.createVNode("div",{style:"text-align: right; margin: 0"},[e.createVNode(e.resolveComponent("el-button"),{size:"small",text:!0,onClick:()=>g.value=""},K(k=l.Translate("base.cancel"))?k:{default:()=>[k]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>c(n.key)},K(y=l.Translate("base.confirm"))?y:{default:()=>[y]})])])}}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:B.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:r})=>e.createVNode(l.ModifyButton,{onModify:()=>d({id:r.id})},null)}],{requesting:b}=l.useLoading(B),{tableRef:m,formModalRef:i,keyword:a,search:s,refresh:t,reset:f,openFormModal:p,editFormModal:d}=l.useCrudPage(w),{formModalRef:N,openFormModal:T,editFormModal:A}=l.useCrudPage(),c=r=>{z[l.DEFAULT_REMOVE_KEY]({key:r}).then(()=>{g.value="",t()})};return(r,o)=>{const n=e.resolveComponent("el-button"),k=e.resolveComponent("el-input"),y=e.resolveComponent("el-radio-button"),R=e.resolveComponent("el-radio-group"),h=e.resolveComponent("el-space"),V=e.resolveComponent("el-page-header"),_=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(_,{class:"basic-card flex-full","body-class":"flex-1",onClick:o[5]||(o[5]=()=>g.value="")},{header:e.withCtx(()=>[e.createVNode(V,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(p)},null,8,["onOpen"]),e.createVNode(n,{circle:"",icon:e.unref(M),onClick:e.unref(T)},null,8,["icon","onClick"])]),content:e.withCtx(()=>[e.createVNode(h,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(k,{class:"basic-search-input",modelValue:e.unref(a).keyword,"onUpdate:modelValue":o[0]||(o[0]=U=>e.unref(a).keyword=U),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:o[1]||(o[1]=e.withKeys(U=>e.unref(s)(),["enter"])),onClear:o[2]||(o[2]=U=>e.unref(s)())},null,8,["modelValue","placeholder"]),e.createVNode(R,{modelValue:e.unref(a).status,"onUpdate:modelValue":o[3]||(o[3]=U=>e.unref(a).status=U),onChange:o[4]||(o[4]=U=>e.unref(s)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],U=>e.createVNode(y,{key:U,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${U}`),value:U},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:e.unref(s)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:m,size:"small",columns:C,url:e.unref(B).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),autoSearch:""},null,8,["url","search-param"]),e.createVNode(ee,{ref_key:"formModalRef",ref:i,onRefresh:e.unref(f)},null,8,["onRefresh"]),e.createVNode(re,{ref_key:"ruleFormModalRef",ref:N,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),te=Object.freeze(Object.defineProperty({__proto__:null,default:j},Symbol.toStringTag,{value:"Module"})),ne={class:"rule-check"},oe={style:{width:"80px","line-height":"36px"}},ae=((x,w)=>{const g=x.__vccOpts||x;for(const[C,b]of w)g[C]=b;return g})(e.defineComponent({__name:"RulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(x,{expose:w,emit:g}){const{requesting:C}=l.useLoading(B),b=x,m=g,i=e.ref(!1),a=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:s,refresh:t}=l.useSelect(e.toRef(b,"modelValue"),m,{key:"RULE_CHECK",api:B,url:B.urls.rules,isArray:!0},!1);function f(){s.value.forEach(c=>{var r;(r=c.rules)!=null&&r.length&&(a.MenuAll[c.id]=!1,a.MenuIndeterminate[c.id]=!1,a.MenuList[c.id]=[])})}function p(c){s.value.forEach(r=>{var o;(o=r.rules)!=null&&o.length&&(a.MenuList[r.id]=c?r.rules.map(n=>n.key):[])}),N()}function d(c,r){const o=s.value.find(n=>n.id===r);a.MenuList[r]=c&&o?o.rules.map(n=>n.key):[],N()}function N(){s.value.forEach(c=>{var n,k;const r=((n=c.rules)==null?void 0:n.length)||0,o=((k=a.MenuList[c.id])==null?void 0:k.length)||0;a.MenuAll[c.id]=o===r&&r>0,a.MenuIndeterminate[c.id]=o>0&&o<r}),a.checkAll=Object.values(a.MenuAll).every(Boolean),a.indeterminate=!a.checkAll&&Object.values(a.MenuList).some(c=>c.length>0),m("update:modelValue",Object.values(a.MenuList).flat())}function T(){a.checkAll=!1,a.indeterminate=!1,a.MenuAll={},a.MenuList={},a.MenuIndeterminate={},f(),m("update:modelValue",[]),i.value=!1}function A(c){var r;if(Array.isArray(s.value)&&s.value.length>0){for(let o of s.value)if(Array.isArray(o.rules)&&o.rules.length>0)for(let n of o.rules)c.some(k=>k===n.key)&&(a.MenuList[o.id]=(((r=a.MenuList)==null?void 0:r[o.id])||[]).concat([n.key]));N(),i.value=!0}}return e.onMounted(async()=>{var c;(c=s.value)!=null&&c.length||await t(),!i.value&&b.modelValue&&A(b.modelValue)}),e.watch(()=>b.modelValue,c=>{e.nextTick(()=>{var r;i.value||!((r=s.value)!=null&&r.length)||c&&c.length>0&&A(c)})},{deep:!0,immediate:!0}),w({generateOption:A,cleanChecked:T}),(c,r)=>{const o=e.resolveComponent("el-checkbox"),n=e.resolveComponent("el-space"),k=e.resolveComponent("el-text"),y=e.resolveComponent("el-divider"),R=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",ne,[e.createVNode(n,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(o,{"model-value":a.checkAll,indeterminate:a.indeterminate,id:"all",disabled:x.disabled,onChange:p},{default:e.withCtx(()=>r[1]||(r[1]=[e.createElementVNode("span",null,"全选",-1)])),_:1,__:[1]},8,["model-value","indeterminate","disabled"]),e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),text:"",size:"small",onRefresh:r[0]||(r[0]=h=>e.unref(t)(!0))},null,8,["loading"])]),_:1}),e.createVNode(n,{direction:"vertical",alignment:"start",class:"rule-check-content"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),h=>(e.openBlock(),e.createElementBlock("div",{key:h.id},[e.createVNode(n,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(o,{style:{"min-width":"150px"},"model-value":a.MenuAll[h.id],disabled:x.disabled||!h.rules||h.rules.length<=0,indeterminate:a.MenuIndeterminate[h.id],onChange:V=>d(V,h.id)},{default:e.withCtx(()=>[e.createVNode(k,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(y,{direction:"vertical"}),h.rules?(e.openBlock(),e.createBlock(R,{key:0,modelValue:a.MenuList[h.id],"onUpdate:modelValue":V=>a.MenuList[h.id]=V,disabled:x.disabled,style:{margin:"auto"},onChange:N},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.rules,V=>(e.openBlock(),e.createBlock(o,{key:V.key,value:V.key},{default:e.withCtx(()=>[e.createElementVNode("div",oe,e.toDisplayString(V.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),[["__scopeId","data-v-fcb04ec2"]]),se=e.defineComponent({__name:"RoleFormModal",emits:["refresh"],setup(x,{expose:w,emit:g}){const C=g,b=e.ref(),m={key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]},i={name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}]},{modal:a,title:s,form:t,formData:f,requesting:p,executing:d,open:N,modify:T,submit:A,closed:c}=l.useForm(C,m,O),r=()=>{var o;(o=b.value)==null||o.cleanChecked(),c()};return w({open:N,modify:T}),(o,n)=>{const k=e.resolveComponent("el-input"),y=e.resolveComponent("el-form-item"),R=e.resolveComponent("el-col"),h=e.resolveComponent("el-input-number"),V=e.resolveComponent("el-row"),_=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(a),"onUpdate:modelValue":n[6]||(n[6]=U=>e.isRef(a)?a.value=U:null),title:e.unref(s)(),width:"1000px",executing:e.unref(d),onClosed:r,onSubmit:e.unref(A)},{default:e.withCtx(()=>[e.createVNode(_,{ref_key:"form",ref:t,model:e.unref(f),"label-width":"auto",rules:i,disabled:e.unref(p)||e.unref(d)},{default:e.withCtx(()=>[e.createVNode(V,{gutter:20},{default:e.withCtx(()=>[e.createVNode(R,{span:12},{default:e.withCtx(()=>[e.createVNode(y,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(f).module,"onUpdate:modelValue":n[0]||(n[0]=U=>e.unref(f).module=U),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(R,{span:12},{default:e.withCtx(()=>[e.createVNode(y,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(h,{class:"w-full",modelValue:e.unref(f).sort,"onUpdate:modelValue":n[1]||(n[1]=U=>e.unref(f).sort=U),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(y,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(f).name,"onUpdate:modelValue":n[2]||(n[2]=U=>e.unref(f).name=U),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(y,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(f).en_name,"onUpdate:modelValue":n[3]||(n[3]=U=>e.unref(f).en_name=U),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(y,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(f).remark,"onUpdate:modelValue":n[4]||(n[4]=U=>e.unref(f).remark=U),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(y,{label:e.unref(l.Translate)("base.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(ae,{ref_key:"rulesCheck",ref:b,modelValue:e.unref(f).rules,"onUpdate:modelValue":n[5]||(n[5]=U=>e.unref(f).rules=U),disabled:e.unref(p)||e.unref(d)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onSubmit"])}}}),I=e.defineComponent({__name:"index",setup(x){const w={keyword:""},g=[{label:l.Translate("base.sort"),prop:"sort",width:80},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.name"),prop:"translate",width:120},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:180},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:p})=>e.createVNode(l.ModifyButton,{onModify:()=>f({key:p.key})},null)}],{requesting:C}=l.useLoading(O),{tableRef:b,formModalRef:m,keyword:i,search:a,reset:s,openFormModal:t,editFormModal:f}=l.useCrudPage(w);return(p,d)=>{const N=e.resolveComponent("el-input"),T=e.resolveComponent("el-space"),A=e.resolveComponent("el-page-header"),c=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(c,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(A,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(s)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(t)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(T,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(N,{class:"basic-search-input",modelValue:e.unref(i).keyword,"onUpdate:modelValue":d[0]||(d[0]=r=>e.unref(i).keyword=r),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:d[1]||(d[1]=e.withKeys(r=>e.unref(a)(),["enter"])),onClear:d[2]||(d[2]=r=>e.unref(a)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:d[3]||(d[3]=r=>e.unref(a)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:b,size:"small",columns:g,url:e.unref(O).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(i),autoSearch:""},null,8,["url","search-param"]),e.createVNode(se,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(s)},null,8,["onRefresh"])]),_:1})}}}),de=Object.freeze(Object.defineProperty({__proto__:null,default:I},Symbol.toStringTag,{value:"Module"})),Y={request:"request",error:"error",sql:"SQL"},S=l.AutoApiUtils.createAutoApi("log",Y,"id",Object.keys(Y),[],[]),H=e.defineComponent({__name:"index",setup(x){const w={dates:[l.TimeUtils.getCurrentHour().format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentHour(1).format(l.TimeUtils.DATE_VALUE_FORMAT)]},g=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:s})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(s.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:C}=l.useLoading(S),{tableRef:b,keyword:m,search:i,reset:a}=l.useCrudPage(w);return(s,t)=>{const f=e.resolveComponent("el-date-picker"),p=e.resolveComponent("el-space"),d=e.resolveComponent("el-page-header"),N=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(N,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(d,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(a)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(p,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(m).dates,"onUpdate:modelValue":t[0]||(t[0]=T=>e.unref(m).dates=T),class:"basic-search-datetimerange","value-format":e.unref(l.TimeUtils).DATE_HOUR_FORMAT,format:e.unref(l.TimeUtils).DATE_SHOW_FORMAT,type:"datetimerange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:t[1]||(t[1]=T=>e.unref(i)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:t[2]||(t[2]=T=>e.unref(i)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:b,size:"small",columns:g,url:e.unref(S).urls.request,"search-param":e.unref(m),autoSearch:""},null,8,["url","search-param"])]),_:1})}}}),ie=Object.freeze(Object.defineProperty({__proto__:null,default:H},Symbol.toStringTag,{value:"Module"})),W=e.defineComponent({__name:"index",setup(x){const w={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentDate(0).format(l.TimeUtils.DATE_VALUE_FORMAT)]},g=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:s})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(s.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:C}=l.useLoading(S),{tableRef:b,keyword:m,search:i,reset:a}=l.useCrudPage(w);return(s,t)=>{const f=e.resolveComponent("el-date-picker"),p=e.resolveComponent("el-space"),d=e.resolveComponent("el-page-header"),N=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(N,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(d,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(a)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(p,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(m).dates,"onUpdate:modelValue":t[0]||(t[0]=T=>e.unref(m).dates=T),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_VALUE_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,type:"daterange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:t[1]||(t[1]=T=>e.unref(i)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:t[2]||(t[2]=T=>e.unref(i)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:b,size:"small",columns:g,url:e.unref(S).urls.error,"search-param":e.unref(m),autoSearch:""},null,8,["url","search-param"])]),_:1})}}}),pe=Object.freeze(Object.defineProperty({__proto__:null,default:W},Symbol.toStringTag,{value:"Module"})),G=e.defineComponent({__name:"index",setup(x){const w={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentDate().format(l.TimeUtils.DATE_VALUE_FORMAT)]},g=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:s})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(s.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:C}=l.useLoading(S),{tableRef:b,keyword:m,search:i,reset:a}=l.useCrudPage(w);return(s,t)=>{const f=e.resolveComponent("el-date-picker"),p=e.resolveComponent("el-space"),d=e.resolveComponent("el-page-header"),N=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(N,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(d,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(a)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(p,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(m).dates,"onUpdate:modelValue":t[0]||(t[0]=T=>e.unref(m).dates=T),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_HOUR_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,type:"daterange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:t[1]||(t[1]=T=>e.unref(i)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:t[2]||(t[2]=T=>e.unref(i)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:b,size:"small",columns:g,url:e.unref(S).urls.sql,"search-param":e.unref(m),autoSearch:""},null,8,["url","search-param"])]),_:1})}}}),me=Object.freeze(Object.defineProperty({__proto__:null,default:G},Symbol.toStringTag,{value:"Module"})),fe=()=>Promise.resolve().then(()=>ie),ce=()=>Promise.resolve().then(()=>pe),_e=()=>Promise.resolve().then(()=>me),be=[{path:l.REQUEST_LOG_URL,name:"RequestLog",component:fe,meta:{title:l.Translate("menu.RequestLog")}},{path:l.ERROR_LOG_URL,name:"ErrorLog",component:ce,meta:{title:l.Translate("menu.ErrorLog")}},{path:l.SQL_LOG_URL,name:"SqlLog",component:_e,meta:{title:l.Translate("menu.SqlLog")}}],he={install:x=>{Reflect.ownKeys(x._context.provides).some(w=>String(w)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.warn(Reflect.ownKeys(x._context.provides))},version:"__VERSION__"},ge=Object.assign({"./views/admin/index.vue":J,"./views/language/index.vue":Z,"./views/menu/index.vue":te,"./views/role/index.vue":de});L.AdminsPage=q,L.ErrorLogsPage=W,L.LanguagesPage=$,L.LogRoutes=be,L.MenusPage=j,L.RequestLogsPage=H,L.RolesPage=I,L.SQLLogsPage=G,L.basicModules=ge,L.default=he,Object.defineProperties(L,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(L,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("auto-vue-manual")):typeof define=="function"&&define.amd?define(["exports","vue","auto-vue-manual"],e):(L=typeof globalThis<"u"?globalThis:L||self,e(L.AutoVueBasic={},L.Vue,L["auto-vue-manual"]))})(this,function(L,e,l){"use strict";const F=l.createAutoApi("admin",{},"key"),O=l.createAutoApi("role",{},"key"),Q=e.defineComponent({__name:"AdminFormModal",emits:["refresh"],setup(x,{expose:w,emit:g}){const C=g,b={key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]},{modal:m,title:i,form:a,formData:s,requesting:t,executing:f,open:p,modify:d,submit:N,closed:T}=l.useForm(C,b,F),A={username:[{required:!0,message:l.Translate("base.placeholder.input base.username"),trigger:"blur"}],phone:[{required:!0,validator:l.RulesUtils.phoneRule,message:l.Translate("base.placeholder.input base.phone"),trigger:"blur"}],password:[{required:!1,message:l.Translate("base.placeholder.input base.password"),trigger:"blur"}],email:[{required:!0,message:l.Translate("base.placeholder.input base.email"),trigger:"blur"}],language:[{required:!0,message:l.Translate("base.placeholder.select base.language"),trigger:"change"}],roles:[{required:!0,type:"Array",message:l.Translate("base.placeholder.select menu.Role"),trigger:"change"}]},c=e.ref([]),r=async()=>{const o=await O.list();c.value=Array.isArray(o==null?void 0:o.data)?o.data:[]};return e.onBeforeMount(async()=>{await r()}),w({open:p,modify:d}),(o,n)=>{const k=e.resolveComponent("el-input"),y=e.resolveComponent("el-form-item"),R=e.resolveComponent("el-radio-button"),h=e.resolveComponent("el-radio-group"),V=e.resolveComponent("el-checkbox"),_=e.resolveComponent("el-checkbox-group"),U=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":n[7]||(n[7]=E=>e.isRef(m)?m.value=E:null),title:e.unref(i)(),width:"600px",executing:e.unref(f),onClosed:e.unref(T),onSubmit:e.unref(N)},{default:e.withCtx(()=>[e.createVNode(U,{ref_key:"form",ref:a,model:e.unref(s),"label-width":"auto",rules:A,disabled:e.unref(t)||e.unref(f)},{default:e.withCtx(()=>[e.createVNode(y,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(s).username,"onUpdate:modelValue":n[0]||(n[0]=E=>e.unref(s).username=E),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(y,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(s).phone,"onUpdate:modelValue":n[1]||(n[1]=E=>e.unref(s).phone=E),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(y,{label:e.unref(l.Translate)("base.password"),prop:"password",required:!e.unref(s).key},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(s).password,"onUpdate:modelValue":n[2]||(n[2]=E=>e.unref(s).password=E),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(y,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(s).email,"onUpdate:modelValue":n[3]||(n[3]=E=>e.unref(s).email=E),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(y,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(s).language,"onUpdate:modelValue":n[4]||(n[4]=E=>e.unref(s).language=E)},{default:e.withCtx(()=>[e.createVNode(R,{value:"zh-CN"},{default:e.withCtx(()=>n[8]||(n[8]=[e.createTextVNode("zh-CN")])),_:1,__:[8]}),e.createVNode(R,{value:"en-US"},{default:e.withCtx(()=>n[9]||(n[9]=[e.createTextVNode("en-US")])),_:1,__:[9]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(y,{label:e.unref(l.Translate)("menu.Role"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(s).roles,"onUpdate:modelValue":n[5]||(n[5]=E=>e.unref(s).roles=E)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,E=>(e.openBlock(),e.createBlock(V,{key:E.key,value:E.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E.translate),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(y,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(s).remark,"onUpdate:modelValue":n[6]||(n[6]=E=>e.unref(s).remark=E),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),q=e.defineComponent({__name:"index",setup(x){const w={keyword:""},g=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:p})=>e.createVNode(l.BasicAvatar,{src:p.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:p})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[p.username]),e.createVNode("div",null,[p.email])]})},{label:l.Translate("base.phone"),prop:"phone",width:140},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.login_at"),prop:"login_at",width:160},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:p})=>e.createVNode(l.ModifyButton,{onModify:()=>f({key:p.key})},null)}],{requesting:C}=l.useLoading(F),{tableRef:b,formModalRef:m,keyword:i,search:a,reset:s,openFormModal:t,editFormModal:f}=l.useCrudPage(w);return(p,d)=>{const N=e.resolveComponent("el-input"),T=e.resolveComponent("el-space"),A=e.resolveComponent("el-page-header"),c=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(c,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(A,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(s)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(t)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(T,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(N,{class:"basic-search-input",modelValue:e.unref(i).keyword,"onUpdate:modelValue":d[0]||(d[0]=r=>e.unref(i).keyword=r),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:d[1]||(d[1]=e.withKeys(r=>e.unref(a)(),["enter"])),onClear:d[2]||(d[2]=r=>e.unref(a)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:d[3]||(d[3]=r=>e.unref(a)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:b,size:"small",columns:g,url:e.unref(F).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(i),autoSearch:""},null,8,["url","search-param"]),e.createVNode(Q,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(s)},null,8,["onRefresh"])]),_:1})}}}),J=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),D=l.createAutoApi("translation",{},"key"),X=e.defineComponent({__name:"LangFormModal",emits:["refresh"],setup(x,{expose:w,emit:g}){const C=g,b={id:0,key:"",module:"",language:"",result:"",remark:""},m={module:[{required:!0,message:l.Translate("language.placeholder.module"),trigger:"blur"}],key:[{required:!0,message:l.Translate("language.placeholder.key"),trigger:"blur"}],language:[{required:!0,message:l.Translate("language.placeholder.language"),trigger:"change"}],result:[{required:!0,message:l.Translate("language.placeholder.result"),trigger:"blur"}]},{modal:i,title:a,form:s,formData:t,requesting:f,executing:p,open:d,modify:N,submit:T,closed:A}=l.useForm(C,b,D);return w({open:d,modify:N}),(c,r)=>{const o=e.resolveComponent("el-input"),n=e.resolveComponent("el-form-item"),k=e.resolveComponent("el-radio-button"),y=e.resolveComponent("el-radio-group"),R=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":r[5]||(r[5]=h=>e.isRef(i)?i.value=h:null),title:e.unref(a)(),width:"600px",executing:e.unref(p),onClosed:e.unref(A),onSubmit:e.unref(T)},{default:e.withCtx(()=>[e.createVNode(R,{ref_key:"form",ref:s,model:e.unref(t),"label-width":"auto",rules:m,disabled:e.unref(f)||e.unref(p)},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("language.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).module,"onUpdate:modelValue":r[0]||(r[0]=h=>e.unref(t).module=h),placeholder:e.unref(l.Translate)("language.placeholder.module")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("language.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).key,"onUpdate:modelValue":r[1]||(r[1]=h=>e.unref(t).key=h),placeholder:e.unref(l.Translate)("language.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("language.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(t).language,"onUpdate:modelValue":r[2]||(r[2]=h=>e.unref(t).language=h)},{default:e.withCtx(()=>[e.createVNode(k,{label:"zh-CN"},{default:e.withCtx(()=>r[6]||(r[6]=[e.createTextVNode("zh-CN")])),_:1,__:[6]}),e.createVNode(k,{label:"en-US"},{default:e.withCtx(()=>r[7]||(r[7]=[e.createTextVNode("en-US")])),_:1,__:[7]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("language.result"),prop:"result",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).result,"onUpdate:modelValue":r[3]||(r[3]=h=>e.unref(t).result=h),placeholder:e.unref(l.Translate)("language.placeholder.result")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[4]||(r[4]=h=>e.unref(t).remark=h),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),$=e.defineComponent({__name:"index",setup(x){const w={keyword:"",status:0},g=[{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.language"),prop:"language",width:100},{label:l.Translate("base.key"),prop:"key",width:200},{label:l.Translate("base.result"),prop:"result",width:200},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:D.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:p})=>e.createVNode(l.ModifyButton,{onModify:()=>f({id:p.id})},null)}],{requesting:C}=l.useLoading(D),{tableRef:b,formModalRef:m,keyword:i,search:a,reset:s,openFormModal:t,editFormModal:f}=l.useCrudPage(w);return(p,d)=>{const N=e.resolveComponent("el-input"),T=e.resolveComponent("el-radio-button"),A=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-space"),r=e.resolveComponent("el-page-header"),o=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(o,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(r,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(s)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(t)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(c,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(N,{class:"basic-search-input",modelValue:e.unref(i).keyword,"onUpdate:modelValue":d[0]||(d[0]=n=>e.unref(i).keyword=n),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:d[1]||(d[1]=e.withKeys(n=>e.unref(a)(),["enter"])),onClear:d[2]||(d[2]=n=>e.unref(a)())},null,8,["modelValue","placeholder"]),e.createVNode(A,{modelValue:e.unref(i).status,"onUpdate:modelValue":d[3]||(d[3]=n=>e.unref(i).status=n),onChange:d[4]||(d[4]=n=>e.unref(a)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],n=>e.createVNode(T,{key:n,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${n}`),value:n},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:d[5]||(d[5]=n=>e.unref(a)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:b,size:"small",columns:g,url:e.unref(D).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(i),autoSearch:""},null,8,["url","search-param"]),e.createVNode(X,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(s)},null,8,["onRefresh"])]),_:1})}}}),Z=Object.freeze(Object.defineProperty({__proto__:null,default:$},Symbol.toStringTag,{value:"Module"})),P={tops:"tops",rules:"rules"},B=l.AutoApiUtils.createAutoApi("menu",P,"id",Object.keys(P),[],["TOP_MENU_LIST","MENU_LIST"]),z=l.createAutoApi("rule",{},"key");/*! Element Plus Icons Vue v2.3.1 */var u=e.defineComponent({name:"Key",__name:"key",setup(x){return(w,g)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M448 456.064V96a32 32 0 0 1 32-32.064L672 64a32 32 0 0 1 0 64H512v128h160a32 32 0 0 1 0 64H512v128a256 256 0 1 1-64 8.064M512 896a192 192 0 1 0 0-384 192 192 0 0 0 0 384"})]))}}),M=u;const v=e.defineComponent({__name:"TopMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{emit:w}){const g=w,C=x,{requesting:b}=l.useLoading(B),{value:m,options:i,change:a,refresh:s,filterOptions:t}=l.useSelect(e.toRef(C,"modelValue"),g,{key:"TOP_MENU_LIST",api:B,url:B.urls.tops,isArray:!0});return(f,p)=>{const d=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(d,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":p[1]||(p[1]=N=>e.isRef(m)?m.value=N:null),options:e.unref(i),multiple:x.multiple,disabled:e.unref(b),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(t),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(b),onRefresh:p[0]||(p[0]=N=>e.unref(s)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),ee=e.defineComponent({__name:"MenuFormModal",emits:["refresh"],setup(x,{expose:w,emit:g}){const C=g,b={id:0,menu_id:0,module:"",sort:0,name:"",en_name:"",url:"",component:"",icon:"",remark:"",meta:{active:"",icon:"",title:"",affix:!1,full:!1,hide:!1,keep_alive:!1,link:!1}},m={sort:[{required:!0,type:"number",message:l.Translate("base.placeholder.input base.sort"),trigger:"blur"}],module:[{required:!0,message:l.Translate("base.placeholder.input menu.module"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}],url:[{required:!0,message:l.Translate("base.placeholder.input base.url"),trigger:"blur"}],component:[{required:!0,message:l.Translate("base.placeholder.input menu.component"),trigger:"blur"}]},{modal:i,title:a,form:s,formData:t,requesting:f,executing:p,open:d,modify:N,submit:T,closed:A}=l.useForm(C,b,B);return w({open:d,modify:N}),(c,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-col"),k=e.resolveComponent("el-input-number"),y=e.resolveComponent("el-row"),R=e.resolveComponent("el-input"),h=e.resolveComponent("el-switch"),V=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":r[17]||(r[17]=_=>e.isRef(i)?i.value=_:null),title:e.unref(a)(),width:"1000px",executing:e.unref(p),onClosed:e.unref(A),onSubmit:e.unref(T)},{default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:s,model:e.unref(t),"label-width":"auto",rules:m,disabled:e.unref(f)||e.unref(p)},{default:e.withCtx(()=>[e.createVNode(y,{gutter:20},{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(y,{gutter:10},{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(v,{modelValue:e.unref(t).menu_id,"onUpdate:modelValue":r[0]||(r[0]=_=>e.unref(t).menu_id=_)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(k,{class:"w-full",modelValue:e.unref(t).sort,"onUpdate:modelValue":r[1]||(r[1]=_=>e.unref(t).sort=_),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(o,{label:e.unref(l.Translate)("menu.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(t).module,"onUpdate:modelValue":r[2]||(r[2]=_=>e.unref(t).module=_),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[3]||(r[3]=_=>e.unref(t).name=_),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[4]||(r[4]=_=>e.unref(t).en_name=_),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("menu.component"),prop:"component"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(t).component,"onUpdate:modelValue":r[5]||(r[5]=_=>e.unref(t).component=_),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.url"),prop:"url"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(t).url,"onUpdate:modelValue":r[6]||(r[6]=_=>e.unref(t).url=_),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[7]||(r[7]=_=>e.unref(t).remark=_),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(t).icon,"onUpdate:modelValue":r[8]||(r[8]=_=>e.unref(t).icon=_),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:r[9]||(r[9]=_=>{e.unref(t).meta.icon=_})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+e.unref(t).icon)},null,2)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.title"),prop:"meta.title"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(t).meta.title,"onUpdate:modelValue":r[10]||(r[10]=_=>e.unref(t).meta.title=_),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("menu.active"),prop:"meta.active"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(t).meta.active,"onUpdate:modelValue":r[11]||(r[11]=_=>e.unref(t).meta.active=_),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(y,null,{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(t).meta.link,"onUpdate:modelValue":r[12]||(r[12]=_=>e.unref(t).meta.link=_)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.keep_alive"),prop:"meta.keep_alive"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(t).meta.keep_alive,"onUpdate:modelValue":r[13]||(r[13]=_=>e.unref(t).meta.keep_alive=_)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(t).meta.hide,"onUpdate:modelValue":r[14]||(r[14]=_=>e.unref(t).meta.hide=_)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(t).meta.full,"onUpdate:modelValue":r[15]||(r[15]=_=>e.unref(t).meta.full=_)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(t).meta.affix,"onUpdate:modelValue":r[16]||(r[16]=_=>e.unref(t).meta.affix=_)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),le=e.defineComponent({__name:"MenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{emit:w}){const g=w,C=x,{requesting:b}=l.useLoading(B),{value:m,options:i,change:a,refresh:s,filterOptions:t}=l.useSelect(e.toRef(C,"modelValue"),g,{key:"MENU_LIST",api:B,isArray:!0});return(f,p)=>{const d=e.resolveComponent("el-space"),N=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(N,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":p[1]||(p[1]=T=>e.isRef(m)?m.value=T:null),options:e.unref(i),multiple:x.multiple,disabled:e.unref(b),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(t),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(b),onRefresh:p[0]||(p[0]=T=>e.unref(s)(!0))},null,8,["loading"])]),default:e.withCtx(({item:T})=>[e.createVNode(d,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${T.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(T.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),re=e.defineComponent({__name:"MenuRuleFormModal",emits:["refresh"],setup(x,{expose:w,emit:g}){const C=g,b={key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""},m={menu_id:[{required:!0,type:"number",message:l.Translate("base.placeholder.select menu.Menu"),trigger:"blur"}],sort:[{required:!0,type:"number",message:l.Translate("base.placeholder.input base.sort"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}],urls:[{required:!0,message:l.Translate("base.placeholder.input menu.rules"),trigger:"blur"}]},{modal:i,title:a,form:s,formData:t,requesting:f,executing:p,open:d,modify:N,submit:T,closed:A}=l.useForm(C,b,z);return w({open:d,modify:N}),(c,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input-number"),k=e.resolveComponent("el-input"),y=e.resolveComponent("el-col"),R=e.resolveComponent("el-row"),h=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":r[6]||(r[6]=V=>e.isRef(i)?i.value=V:null),title:e.unref(a)("menu.rules"),width:"1000px",executing:e.unref(p),onClosed:e.unref(A),onSubmit:e.unref(T)},{default:e.withCtx(()=>[e.createVNode(h,{ref_key:"form",ref:s,model:e.unref(t),"label-width":"auto",rules:m,disabled:e.unref(f)||e.unref(p)},{default:e.withCtx(()=>[e.createVNode(R,{gutter:20},{default:e.withCtx(()=>[e.createVNode(y,{span:10},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(le,{modelValue:e.unref(t).menu_id,"onUpdate:modelValue":r[0]||(r[0]=V=>e.unref(t).menu_id=V)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(n,{class:"w-full",modelValue:e.unref(t).sort,"onUpdate:modelValue":r[1]||(r[1]=V=>e.unref(t).sort=V),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[2]||(r[2]=V=>e.unref(t).name=V),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[3]||(r[3]=V=>e.unref(t).en_name=V),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[4]||(r[4]=V=>e.unref(t).remark=V),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(y,{span:14},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(t).urls,"onUpdate:modelValue":r[5]||(r[5]=V=>e.unref(t).urls=V),type:"textarea",rows:11,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}});function K(x){return typeof x=="function"||Object.prototype.toString.call(x)==="[object Object]"&&!e.isVNode(x)}const j=e.defineComponent({__name:"index",setup(x){const w={keyword:"",status:0},g=e.ref(""),C=[{label:l.Translate("base.sort"),prop:"sort",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:r})=>e.createVNode("span",{class:"iconfont "+r.icon,style:"font-size: 16px;"},null)},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.parent"),prop:"parent",width:120,render:({row:r})=>{var o;return e.createVNode(e.Fragment,null,[(o=r.menu)==null?void 0:o.name])}},{label:l.Translate("base.name"),prop:"translate",width:120},{label:l.Translate("base.url"),prop:"url",align:"left",width:200},{label:l.Translate("menu.component"),prop:"component",align:"left",width:200},{label:l.Translate("menu.rules"),prop:"rules",width:0,align:"left",render:({row:r})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var o;return[(o=r.rules)==null?void 0:o.map(n=>e.createVNode(e.resolveComponent("el-popover"),{visible:g.value===n.key,title:l.Translate("message.title.warning"),placement:"top-end",width:220},{reference:()=>e.createVNode(e.resolveComponent("el-tag"),{class:"cursor-pointer",closable:!0,key:n.key,onClick:()=>A({key:n.key}),onClose:()=>g.value=n.key},{default:()=>[n.translate]}),default:()=>{let k,y;return e.createVNode("div",null,[e.createVNode("p",null,null),e.createVNode("p",null,[`${l.Translate("base.confirm base.delete menu.rules")}: ${r.translate}-${n.translate} ?`]),e.createVNode("div",{style:"text-align: right; margin: 0"},[e.createVNode(e.resolveComponent("el-button"),{size:"small",text:!0,onClick:()=>g.value=""},K(k=l.Translate("base.cancel"))?k:{default:()=>[k]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>c(n.key)},K(y=l.Translate("base.confirm"))?y:{default:()=>[y]})])])}}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:B.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:r})=>e.createVNode(l.ModifyButton,{onModify:()=>d({id:r.id})},null)}],{requesting:b}=l.useLoading(B),{tableRef:m,formModalRef:i,keyword:a,search:s,refresh:t,reset:f,openFormModal:p,editFormModal:d}=l.useCrudPage(w),{formModalRef:N,openFormModal:T,editFormModal:A}=l.useCrudPage(),c=r=>{z[l.DEFAULT_REMOVE_KEY]({key:r}).then(()=>{g.value="",t()})};return(r,o)=>{const n=e.resolveComponent("el-button"),k=e.resolveComponent("el-input"),y=e.resolveComponent("el-radio-button"),R=e.resolveComponent("el-radio-group"),h=e.resolveComponent("el-space"),V=e.resolveComponent("el-page-header"),_=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(_,{class:"basic-card flex-full","body-class":"flex-1",onClick:o[5]||(o[5]=()=>g.value="")},{header:e.withCtx(()=>[e.createVNode(V,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(p)},null,8,["onOpen"]),e.createVNode(n,{circle:"",icon:e.unref(M),onClick:e.unref(T)},null,8,["icon","onClick"])]),content:e.withCtx(()=>[e.createVNode(h,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(k,{class:"basic-search-input",modelValue:e.unref(a).keyword,"onUpdate:modelValue":o[0]||(o[0]=U=>e.unref(a).keyword=U),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:o[1]||(o[1]=e.withKeys(U=>e.unref(s)(),["enter"])),onClear:o[2]||(o[2]=U=>e.unref(s)())},null,8,["modelValue","placeholder"]),e.createVNode(R,{modelValue:e.unref(a).status,"onUpdate:modelValue":o[3]||(o[3]=U=>e.unref(a).status=U),onChange:o[4]||(o[4]=U=>e.unref(s)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],U=>e.createVNode(y,{key:U,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${U}`),value:U},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:e.unref(s)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:m,size:"small",columns:C,url:e.unref(B).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),autoSearch:""},null,8,["url","search-param"]),e.createVNode(ee,{ref_key:"formModalRef",ref:i,onRefresh:e.unref(f)},null,8,["onRefresh"]),e.createVNode(re,{ref_key:"ruleFormModalRef",ref:N,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),te=Object.freeze(Object.defineProperty({__proto__:null,default:j},Symbol.toStringTag,{value:"Module"})),ne={class:"rule-check"},oe={style:{width:"80px","line-height":"36px"}},ae=((x,w)=>{const g=x.__vccOpts||x;for(const[C,b]of w)g[C]=b;return g})(e.defineComponent({__name:"RulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(x,{expose:w,emit:g}){const{requesting:C}=l.useLoading(B),b=x,m=g,i=e.ref(!1),a=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:s,refresh:t}=l.useSelect(e.toRef(b,"modelValue"),m,{key:"RULE_CHECK",api:B,url:B.urls.rules,isArray:!0},!1);function f(){s.value.forEach(c=>{var r;(r=c.rules)!=null&&r.length&&(a.MenuAll[c.id]=!1,a.MenuIndeterminate[c.id]=!1,a.MenuList[c.id]=[])})}function p(c){s.value.forEach(r=>{var o;(o=r.rules)!=null&&o.length&&(a.MenuList[r.id]=c?r.rules.map(n=>n.key):[])}),N()}function d(c,r){const o=s.value.find(n=>n.id===r);a.MenuList[r]=c&&o?o.rules.map(n=>n.key):[],N()}function N(){s.value.forEach(c=>{var n,k;const r=((n=c.rules)==null?void 0:n.length)||0,o=((k=a.MenuList[c.id])==null?void 0:k.length)||0;a.MenuAll[c.id]=o===r&&r>0,a.MenuIndeterminate[c.id]=o>0&&o<r}),a.checkAll=Object.values(a.MenuAll).every(Boolean),a.indeterminate=!a.checkAll&&Object.values(a.MenuList).some(c=>c.length>0),m("update:modelValue",Object.values(a.MenuList).flat())}function T(){a.checkAll=!1,a.indeterminate=!1,a.MenuAll={},a.MenuList={},a.MenuIndeterminate={},f(),m("update:modelValue",[]),i.value=!1}function A(c){var r;if(Array.isArray(s.value)&&s.value.length>0){for(let o of s.value)if(Array.isArray(o.rules)&&o.rules.length>0)for(let n of o.rules)c.some(k=>k===n.key)&&(a.MenuList[o.id]=(((r=a.MenuList)==null?void 0:r[o.id])||[]).concat([n.key]));N(),i.value=!0}}return e.onMounted(async()=>{var c;(c=s.value)!=null&&c.length||await t(),!i.value&&b.modelValue&&A(b.modelValue)}),e.watch(()=>b.modelValue,c=>{e.nextTick(()=>{var r;i.value||!((r=s.value)!=null&&r.length)||c&&c.length>0&&A(c)})},{deep:!0,immediate:!0}),w({generateOption:A,cleanChecked:T}),(c,r)=>{const o=e.resolveComponent("el-checkbox"),n=e.resolveComponent("el-space"),k=e.resolveComponent("el-text"),y=e.resolveComponent("el-divider"),R=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",ne,[e.createVNode(n,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(o,{"model-value":a.checkAll,indeterminate:a.indeterminate,id:"all",disabled:x.disabled,onChange:p},{default:e.withCtx(()=>r[1]||(r[1]=[e.createElementVNode("span",null,"全选",-1)])),_:1,__:[1]},8,["model-value","indeterminate","disabled"]),e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),text:"",size:"small",onRefresh:r[0]||(r[0]=h=>e.unref(t)(!0))},null,8,["loading"])]),_:1}),e.createVNode(n,{direction:"vertical",alignment:"start",class:"rule-check-content"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),h=>(e.openBlock(),e.createElementBlock("div",{key:h.id},[e.createVNode(n,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(o,{style:{"min-width":"150px"},"model-value":a.MenuAll[h.id],disabled:x.disabled||!h.rules||h.rules.length<=0,indeterminate:a.MenuIndeterminate[h.id],onChange:V=>d(V,h.id)},{default:e.withCtx(()=>[e.createVNode(k,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(y,{direction:"vertical"}),h.rules?(e.openBlock(),e.createBlock(R,{key:0,modelValue:a.MenuList[h.id],"onUpdate:modelValue":V=>a.MenuList[h.id]=V,disabled:x.disabled,style:{margin:"auto"},onChange:N},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.rules,V=>(e.openBlock(),e.createBlock(o,{key:V.key,value:V.key},{default:e.withCtx(()=>[e.createElementVNode("div",oe,e.toDisplayString(V.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),[["__scopeId","data-v-fcb04ec2"]]),se=e.defineComponent({__name:"RoleFormModal",emits:["refresh"],setup(x,{expose:w,emit:g}){const C=g,b=e.ref(),m={key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]},i={name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}]},{modal:a,title:s,form:t,formData:f,requesting:p,executing:d,open:N,modify:T,submit:A,closed:c}=l.useForm(C,m,O),r=()=>{var o;(o=b.value)==null||o.cleanChecked(),c()};return w({open:N,modify:T}),(o,n)=>{const k=e.resolveComponent("el-input"),y=e.resolveComponent("el-form-item"),R=e.resolveComponent("el-col"),h=e.resolveComponent("el-input-number"),V=e.resolveComponent("el-row"),_=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(a),"onUpdate:modelValue":n[6]||(n[6]=U=>e.isRef(a)?a.value=U:null),title:e.unref(s)(),width:"1000px",executing:e.unref(d),onClosed:r,onSubmit:e.unref(A)},{default:e.withCtx(()=>[e.createVNode(_,{ref_key:"form",ref:t,model:e.unref(f),"label-width":"auto",rules:i,disabled:e.unref(p)||e.unref(d)},{default:e.withCtx(()=>[e.createVNode(V,{gutter:20},{default:e.withCtx(()=>[e.createVNode(R,{span:12},{default:e.withCtx(()=>[e.createVNode(y,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(f).module,"onUpdate:modelValue":n[0]||(n[0]=U=>e.unref(f).module=U),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(R,{span:12},{default:e.withCtx(()=>[e.createVNode(y,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(h,{class:"w-full",modelValue:e.unref(f).sort,"onUpdate:modelValue":n[1]||(n[1]=U=>e.unref(f).sort=U),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(y,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(f).name,"onUpdate:modelValue":n[2]||(n[2]=U=>e.unref(f).name=U),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(y,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(f).en_name,"onUpdate:modelValue":n[3]||(n[3]=U=>e.unref(f).en_name=U),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(y,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(f).remark,"onUpdate:modelValue":n[4]||(n[4]=U=>e.unref(f).remark=U),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(y,{label:e.unref(l.Translate)("menu.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(ae,{ref_key:"rulesCheck",ref:b,modelValue:e.unref(f).rules,"onUpdate:modelValue":n[5]||(n[5]=U=>e.unref(f).rules=U),disabled:e.unref(p)||e.unref(d)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onSubmit"])}}}),I=e.defineComponent({__name:"index",setup(x){const w={keyword:""},g=[{label:l.Translate("base.sort"),prop:"sort",width:80},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.name"),prop:"translate",width:120},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:180},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:p})=>e.createVNode(l.ModifyButton,{onModify:()=>f({key:p.key})},null)}],{requesting:C}=l.useLoading(O),{tableRef:b,formModalRef:m,keyword:i,search:a,reset:s,openFormModal:t,editFormModal:f}=l.useCrudPage(w);return(p,d)=>{const N=e.resolveComponent("el-input"),T=e.resolveComponent("el-space"),A=e.resolveComponent("el-page-header"),c=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(c,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(A,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(s)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(t)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(T,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(N,{class:"basic-search-input",modelValue:e.unref(i).keyword,"onUpdate:modelValue":d[0]||(d[0]=r=>e.unref(i).keyword=r),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:d[1]||(d[1]=e.withKeys(r=>e.unref(a)(),["enter"])),onClear:d[2]||(d[2]=r=>e.unref(a)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:d[3]||(d[3]=r=>e.unref(a)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:b,size:"small",columns:g,url:e.unref(O).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(i),autoSearch:""},null,8,["url","search-param"]),e.createVNode(se,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(s)},null,8,["onRefresh"])]),_:1})}}}),de=Object.freeze(Object.defineProperty({__proto__:null,default:I},Symbol.toStringTag,{value:"Module"})),Y={request:"request",error:"error",sql:"SQL"},S=l.AutoApiUtils.createAutoApi("log",Y,"id",Object.keys(Y),[],[]),H=e.defineComponent({__name:"index",setup(x){const w={dates:[l.TimeUtils.getCurrentHour().format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentHour(1).format(l.TimeUtils.DATE_VALUE_FORMAT)]},g=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:s})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(s.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:C}=l.useLoading(S),{tableRef:b,keyword:m,search:i,reset:a}=l.useCrudPage(w);return(s,t)=>{const f=e.resolveComponent("el-date-picker"),p=e.resolveComponent("el-space"),d=e.resolveComponent("el-page-header"),N=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(N,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(d,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(a)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(p,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(m).dates,"onUpdate:modelValue":t[0]||(t[0]=T=>e.unref(m).dates=T),class:"basic-search-datetimerange","value-format":e.unref(l.TimeUtils).DATE_HOUR_FORMAT,format:e.unref(l.TimeUtils).DATE_SHOW_FORMAT,type:"datetimerange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:t[1]||(t[1]=T=>e.unref(i)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:t[2]||(t[2]=T=>e.unref(i)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:b,size:"small",columns:g,url:e.unref(S).urls.request,"search-param":e.unref(m),autoSearch:""},null,8,["url","search-param"])]),_:1})}}}),ie=Object.freeze(Object.defineProperty({__proto__:null,default:H},Symbol.toStringTag,{value:"Module"})),W=e.defineComponent({__name:"index",setup(x){const w={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentDate(0).format(l.TimeUtils.DATE_VALUE_FORMAT)]},g=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:s})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(s.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:C}=l.useLoading(S),{tableRef:b,keyword:m,search:i,reset:a}=l.useCrudPage(w);return(s,t)=>{const f=e.resolveComponent("el-date-picker"),p=e.resolveComponent("el-space"),d=e.resolveComponent("el-page-header"),N=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(N,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(d,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(a)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(p,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(m).dates,"onUpdate:modelValue":t[0]||(t[0]=T=>e.unref(m).dates=T),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_VALUE_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,type:"daterange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:t[1]||(t[1]=T=>e.unref(i)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:t[2]||(t[2]=T=>e.unref(i)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:b,size:"small",columns:g,url:e.unref(S).urls.error,"search-param":e.unref(m),autoSearch:""},null,8,["url","search-param"])]),_:1})}}}),pe=Object.freeze(Object.defineProperty({__proto__:null,default:W},Symbol.toStringTag,{value:"Module"})),G=e.defineComponent({__name:"index",setup(x){const w={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentDate().format(l.TimeUtils.DATE_VALUE_FORMAT)]},g=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:s})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(s.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:C}=l.useLoading(S),{tableRef:b,keyword:m,search:i,reset:a}=l.useCrudPage(w);return(s,t)=>{const f=e.resolveComponent("el-date-picker"),p=e.resolveComponent("el-space"),d=e.resolveComponent("el-page-header"),N=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(N,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(d,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(a)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(p,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(m).dates,"onUpdate:modelValue":t[0]||(t[0]=T=>e.unref(m).dates=T),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_HOUR_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,type:"daterange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:t[1]||(t[1]=T=>e.unref(i)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:t[2]||(t[2]=T=>e.unref(i)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:b,size:"small",columns:g,url:e.unref(S).urls.sql,"search-param":e.unref(m),autoSearch:""},null,8,["url","search-param"])]),_:1})}}}),me=Object.freeze(Object.defineProperty({__proto__:null,default:G},Symbol.toStringTag,{value:"Module"})),fe=()=>Promise.resolve().then(()=>ie),ce=()=>Promise.resolve().then(()=>pe),_e=()=>Promise.resolve().then(()=>me),be=[{path:l.REQUEST_LOG_URL,name:"RequestLog",component:fe,meta:{title:l.Translate("menu.RequestLog")}},{path:l.ERROR_LOG_URL,name:"ErrorLog",component:ce,meta:{title:l.Translate("menu.ErrorLog")}},{path:l.SQL_LOG_URL,name:"SqlLog",component:_e,meta:{title:l.Translate("menu.SqlLog")}}],he={install:x=>{Reflect.ownKeys(x._context.provides).some(w=>String(w)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.warn(Reflect.ownKeys(x._context.provides))},version:"__VERSION__"},ge=Object.assign({"./views/admin/index.vue":J,"./views/language/index.vue":Z,"./views/menu/index.vue":te,"./views/role/index.vue":de});L.AdminsPage=q,L.ErrorLogsPage=W,L.LanguagesPage=$,L.LogRoutes=be,L.MenusPage=j,L.RequestLogsPage=H,L.RolesPage=I,L.SQLLogsPage=G,L.basicModules=ge,L.default=he,Object.defineProperties(L,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const __VERSION__ = "0.0.44'
1
+ export const __VERSION__ = "0.0.45'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auto-vue-basic",
3
- "version": "0.0.45",
3
+ "version": "0.0.46",
4
4
  "type": "module",
5
5
  "main": "./dist/auto-vue-basic.umd.js",
6
6
  "module": "./dist/auto-vue-basic.es.js",