auto-vue-basic 0.0.41 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auto-vue-basic.es.js +394 -384
- package/dist/auto-vue-basic.umd.js +1 -1
- package/dist/types/api/log.d.ts +7 -0
- package/dist/types/router/index.d.ts +1 -2
- package/dist/types/router/log.d.ts +2 -0
- package/dist/types/types/log.d.ts +35 -0
- package/dist/types/utils/time.d.ts +0 -0
- package/dist/types/views/log/error/index.vue.d.ts +5 -0
- package/dist/types/views/log/request/index.vue.d.ts +5 -0
- package/dist/types/views/log/sql/index.vue.d.ts +5 -0
- package/dist/version.js +1 -1
- package/package.json +3 -3
@@ -1 +1 @@
|
|
1
|
-
(function(E,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):(E=typeof globalThis<"u"?globalThis:E||self,e(E.AutoVueBasic={},E.Vue,E["auto-vue-manual"]))})(this,function(E,e,l){"use strict";const F=l.createAutoApi("admin",{},"key"),u=l.createAutoApi("role",{},"key"),j=e.defineComponent({__name:"AdminFormModal",emits:["refresh"],setup(N,{expose:V,emit:g}){const T=g,C={key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]},{modal:h,title:f,form:a,formData:d,requesting:n,executing:b,open:m,modify:i,submit:x,closed:y}=l.useForm(T,C,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"}]},s=e.ref([]),r=async()=>{const o=await u.list();s.value=Array.isArray(o==null?void 0:o.data)?o.data:[]};return e.onBeforeMount(async()=>{await r()}),V({open:m,modify:i}),(o,t)=>{const _=e.resolveComponent("el-input"),k=e.resolveComponent("el-form-item"),U=e.resolveComponent("el-radio-button"),c=e.resolveComponent("el-radio-group"),w=e.resolveComponent("el-checkbox"),p=e.resolveComponent("el-checkbox-group"),B=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(h),"onUpdate:modelValue":t[7]||(t[7]=R=>e.isRef(h)?h.value=R:null),title:e.unref(f)(),width:"600px",executing:e.unref(b),onClosed:e.unref(y),onSubmit:e.unref(x)},{default:e.withCtx(()=>[e.createVNode(B,{ref_key:"form",ref:a,model:e.unref(d),"label-width":"auto",rules:A,disabled:e.unref(n)||e.unref(b)},{default:e.withCtx(()=>[e.createVNode(k,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(d).username,"onUpdate:modelValue":t[0]||(t[0]=R=>e.unref(d).username=R),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(k,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(d).phone,"onUpdate:modelValue":t[1]||(t[1]=R=>e.unref(d).phone=R),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(k,{label:e.unref(l.Translate)("base.password"),prop:"password",required:!e.unref(d).key},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(d).password,"onUpdate:modelValue":t[2]||(t[2]=R=>e.unref(d).password=R),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(k,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(d).email,"onUpdate:modelValue":t[3]||(t[3]=R=>e.unref(d).email=R),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(k,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(d).language,"onUpdate:modelValue":t[4]||(t[4]=R=>e.unref(d).language=R)},{default:e.withCtx(()=>[e.createVNode(U,{value:"zh-CN"},{default:e.withCtx(()=>t[8]||(t[8]=[e.createTextVNode("zh-CN")])),_:1,__:[8]}),e.createVNode(U,{value:"en-US"},{default:e.withCtx(()=>t[9]||(t[9]=[e.createTextVNode("en-US")])),_:1,__:[9]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(k,{label:e.unref(l.Translate)("menu.Role"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(d).roles,"onUpdate:modelValue":t[5]||(t[5]=R=>e.unref(d).roles=R)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,R=>(e.openBlock(),e.createBlock(w,{key:R.key,value:R.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(R.translate),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(k,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(d).remark,"onUpdate:modelValue":t[6]||(t[6]=R=>e.unref(d).remark=R),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(N){const V={keyword:""},g=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:m})=>e.createVNode(l.BasicAvatar,{src:m.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:m})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[m.username]),e.createVNode("div",null,[m.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:m})=>e.createVNode(l.ModifyButton,{onModify:()=>b({key:m.key})},null)}],{requesting:T}=l.useLoading(F),{tableRef:C,formModalRef:h,keyword:f,search:a,reset:d,openFormModal:n,editFormModal:b}=l.useCrudPage(V);return(m,i)=>{const x=e.resolveComponent("el-input"),y=e.resolveComponent("el-space"),A=e.resolveComponent("el-page-header"),s=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(s,{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(T),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(n)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(y,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(x,{class:"basic-search-input",modelValue:e.unref(f).keyword,"onUpdate:modelValue":i[0]||(i[0]=r=>e.unref(f).keyword=r),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:i[1]||(i[1]=e.withKeys(r=>e.unref(a)(),["enter"])),onClear:i[2]||(i[2]=r=>e.unref(a)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(T),onSearch:i[3]||(i[3]=r=>e.unref(a)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:C,size:"small",columns:g,url:e.unref(F).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(f),autoSearch:""},null,8,["url","search-param"]),e.createVNode(j,{ref_key:"formModalRef",ref:h,onRefresh:e.unref(d)},null,8,["onRefresh"])]),_:1})}}}),I=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),L=l.createAutoApi("translation",{},"key"),Y=e.defineComponent({__name:"LangFormModal",emits:["refresh"],setup(N,{expose:V,emit:g}){const T=g,C={id:0,key:"",module:"",language:"",result:"",remark:""},h={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:f,title:a,form:d,formData:n,requesting:b,executing:m,open:i,modify:x,submit:y,closed:A}=l.useForm(T,C,L);return V({open:i,modify:x}),(s,r)=>{const o=e.resolveComponent("el-input"),t=e.resolveComponent("el-form-item"),_=e.resolveComponent("el-radio-button"),k=e.resolveComponent("el-radio-group"),U=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(f),"onUpdate:modelValue":r[5]||(r[5]=c=>e.isRef(f)?f.value=c:null),title:e.unref(a)(),width:"600px",executing:e.unref(m),onClosed:e.unref(A),onSubmit:e.unref(y)},{default:e.withCtx(()=>[e.createVNode(U,{ref_key:"form",ref:d,model:e.unref(n),"label-width":"auto",rules:h,disabled:e.unref(b)||e.unref(m)},{default:e.withCtx(()=>[e.createVNode(t,{label:e.unref(l.Translate)("language.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(n).module,"onUpdate:modelValue":r[0]||(r[0]=c=>e.unref(n).module=c),placeholder:e.unref(l.Translate)("language.placeholder.module")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(t,{label:e.unref(l.Translate)("language.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(n).key,"onUpdate:modelValue":r[1]||(r[1]=c=>e.unref(n).key=c),placeholder:e.unref(l.Translate)("language.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(t,{label:e.unref(l.Translate)("language.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(n).language,"onUpdate:modelValue":r[2]||(r[2]=c=>e.unref(n).language=c)},{default:e.withCtx(()=>[e.createVNode(_,{label:"zh-CN"},{default:e.withCtx(()=>r[6]||(r[6]=[e.createTextVNode("zh-CN")])),_:1,__:[6]}),e.createVNode(_,{label:"en-US"},{default:e.withCtx(()=>r[7]||(r[7]=[e.createTextVNode("en-US")])),_:1,__:[7]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(t,{label:e.unref(l.Translate)("language.result"),prop:"result",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(n).result,"onUpdate:modelValue":r[3]||(r[3]=c=>e.unref(n).result=c),placeholder:e.unref(l.Translate)("language.placeholder.result")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(t,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(n).remark,"onUpdate:modelValue":r[4]||(r[4]=c=>e.unref(n).remark=c),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"])}}}),O=e.defineComponent({__name:"index",setup(N){const V={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:L.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:m})=>e.createVNode(l.ModifyButton,{onModify:()=>b({id:m.id})},null)}],{requesting:T}=l.useLoading(L),{tableRef:C,formModalRef:h,keyword:f,search:a,reset:d,openFormModal:n,editFormModal:b}=l.useCrudPage(V);return(m,i)=>{const x=e.resolveComponent("el-input"),y=e.resolveComponent("el-radio-button"),A=e.resolveComponent("el-radio-group"),s=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(T),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(n)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(s,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(x,{class:"basic-search-input",modelValue:e.unref(f).keyword,"onUpdate:modelValue":i[0]||(i[0]=t=>e.unref(f).keyword=t),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:i[1]||(i[1]=e.withKeys(t=>e.unref(a)(),["enter"])),onClear:i[2]||(i[2]=t=>e.unref(a)())},null,8,["modelValue","placeholder"]),e.createVNode(A,{modelValue:e.unref(f).status,"onUpdate:modelValue":i[3]||(i[3]=t=>e.unref(f).status=t),onChange:i[4]||(i[4]=t=>e.unref(a)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],t=>e.createVNode(y,{key:t,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${t}`),value:t},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(T),onSearch:i[5]||(i[5]=t=>e.unref(a)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:C,size:"small",columns:g,url:e.unref(L).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(f),autoSearch:""},null,8,["url","search-param"]),e.createVNode(Y,{ref_key:"formModalRef",ref:h,onRefresh:e.unref(d)},null,8,["onRefresh"])]),_:1})}}}),G=Object.freeze(Object.defineProperty({__proto__:null,default:O},Symbol.toStringTag,{value:"Module"})),D={tops:"tops",rules:"rules"},S=l.AutoApiUtils.createAutoApi("menu",D,"id",Object.keys(D),[],["TOP_MENU_LIST","MENU_LIST"]),$=l.createAutoApi("rule",{},"key");/*! Element Plus Icons Vue v2.3.1 */var W=e.defineComponent({name:"Key",__name:"key",setup(N){return(V,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"})]))}}),H=W;const J=e.defineComponent({__name:"TopMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(N,{emit:V}){const g=V,T=N,{requesting:C}=l.useLoading(S),{value:h,options:f,change:a,refresh:d,filterOptions:n}=l.useSelect(e.toRef(T,"modelValue"),g,{key:"TOP_MENU_LIST",api:S,url:S.urls.tops,isArray:!0});return(b,m)=>{const i=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(i,{class:"w-full",modelValue:e.unref(h),"onUpdate:modelValue":m[1]||(m[1]=x=>e.isRef(h)?h.value=x:null),options:e.unref(f),multiple:N.multiple,disabled:e.unref(C),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(n),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(C),onRefresh:m[0]||(m[0]=x=>e.unref(d)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),Q=e.defineComponent({__name:"MenuFormModal",emits:["refresh"],setup(N,{expose:V,emit:g}){const T=g,C={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}},h={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:f,title:a,form:d,formData:n,requesting:b,executing:m,open:i,modify:x,submit:y,closed:A}=l.useForm(T,C,S);return V({open:i,modify:x}),(s,r)=>{const o=e.resolveComponent("el-form-item"),t=e.resolveComponent("el-col"),_=e.resolveComponent("el-input-number"),k=e.resolveComponent("el-row"),U=e.resolveComponent("el-input"),c=e.resolveComponent("el-switch"),w=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(f),"onUpdate:modelValue":r[17]||(r[17]=p=>e.isRef(f)?f.value=p:null),title:e.unref(a)(),width:"1000px",executing:e.unref(m),onClosed:e.unref(A),onSubmit:e.unref(y)},{default:e.withCtx(()=>[e.createVNode(w,{ref_key:"form",ref:d,model:e.unref(n),"label-width":"auto",rules:h,disabled:e.unref(b)||e.unref(m)},{default:e.withCtx(()=>[e.createVNode(k,{gutter:20},{default:e.withCtx(()=>[e.createVNode(t,{span:12},{default:e.withCtx(()=>[e.createVNode(k,{gutter:10},{default:e.withCtx(()=>[e.createVNode(t,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(J,{modelValue:e.unref(n).menu_id,"onUpdate:modelValue":r[0]||(r[0]=p=>e.unref(n).menu_id=p)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(t,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(_,{class:"w-full",modelValue:e.unref(n).sort,"onUpdate:modelValue":r[1]||(r[1]=p=>e.unref(n).sort=p),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(U,{modelValue:e.unref(n).module,"onUpdate:modelValue":r[2]||(r[2]=p=>e.unref(n).module=p),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(U,{modelValue:e.unref(n).name,"onUpdate:modelValue":r[3]||(r[3]=p=>e.unref(n).name=p),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(U,{modelValue:e.unref(n).en_name,"onUpdate:modelValue":r[4]||(r[4]=p=>e.unref(n).en_name=p),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(U,{modelValue:e.unref(n).component,"onUpdate:modelValue":r[5]||(r[5]=p=>e.unref(n).component=p),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(U,{modelValue:e.unref(n).url,"onUpdate:modelValue":r[6]||(r[6]=p=>e.unref(n).url=p),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(U,{modelValue:e.unref(n).remark,"onUpdate:modelValue":r[7]||(r[7]=p=>e.unref(n).remark=p),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(t,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(n).icon,"onUpdate:modelValue":r[8]||(r[8]=p=>e.unref(n).icon=p),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:r[9]||(r[9]=p=>{e.unref(n).meta.icon=p})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+e.unref(n).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(U,{modelValue:e.unref(n).meta.title,"onUpdate:modelValue":r[10]||(r[10]=p=>e.unref(n).meta.title=p),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(U,{modelValue:e.unref(n).meta.active,"onUpdate:modelValue":r[11]||(r[11]=p=>e.unref(n).meta.active=p),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(k,null,{default:e.withCtx(()=>[e.createVNode(t,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(n).meta.link,"onUpdate:modelValue":r[12]||(r[12]=p=>e.unref(n).meta.link=p)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(t,{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(c,{modelValue:e.unref(n).meta.keep_alive,"onUpdate:modelValue":r[13]||(r[13]=p=>e.unref(n).meta.keep_alive=p)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(t,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(n).meta.hide,"onUpdate:modelValue":r[14]||(r[14]=p=>e.unref(n).meta.hide=p)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(t,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(n).meta.full,"onUpdate:modelValue":r[15]||(r[15]=p=>e.unref(n).meta.full=p)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(t,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(n).meta.affix,"onUpdate:modelValue":r[16]||(r[16]=p=>e.unref(n).meta.affix=p)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),X=e.defineComponent({__name:"MenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(N,{emit:V}){const g=V,T=N,{requesting:C}=l.useLoading(S),{value:h,options:f,change:a,refresh:d,filterOptions:n}=l.useSelect(e.toRef(T,"modelValue"),g,{key:"MENU_LIST",api:S,isArray:!0});return(b,m)=>{const i=e.resolveComponent("el-space"),x=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(x,{class:"w-full",modelValue:e.unref(h),"onUpdate:modelValue":m[1]||(m[1]=y=>e.isRef(h)?h.value=y:null),options:e.unref(f),multiple:N.multiple,disabled:e.unref(C),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(n),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(C),onRefresh:m[0]||(m[0]=y=>e.unref(d)(!0))},null,8,["loading"])]),default:e.withCtx(({item:y})=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${y.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(y.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),Z=e.defineComponent({__name:"MenuRuleFormModal",emits:["refresh"],setup(N,{expose:V,emit:g}){const T=g,C={key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""},h={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:f,title:a,form:d,formData:n,requesting:b,executing:m,open:i,modify:x,submit:y,closed:A}=l.useForm(T,C,$);return V({open:i,modify:x}),(s,r)=>{const o=e.resolveComponent("el-form-item"),t=e.resolveComponent("el-input-number"),_=e.resolveComponent("el-input"),k=e.resolveComponent("el-col"),U=e.resolveComponent("el-row"),c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(f),"onUpdate:modelValue":r[6]||(r[6]=w=>e.isRef(f)?f.value=w:null),title:e.unref(a)("menu.rules"),width:"1000px",executing:e.unref(m),onClosed:e.unref(A),onSubmit:e.unref(y)},{default:e.withCtx(()=>[e.createVNode(c,{ref_key:"form",ref:d,model:e.unref(n),"label-width":"auto",rules:h,disabled:e.unref(b)||e.unref(m)},{default:e.withCtx(()=>[e.createVNode(U,{gutter:20},{default:e.withCtx(()=>[e.createVNode(k,{span:10},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(X,{modelValue:e.unref(n).menu_id,"onUpdate:modelValue":r[0]||(r[0]=w=>e.unref(n).menu_id=w)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(t,{class:"w-full",modelValue:e.unref(n).sort,"onUpdate:modelValue":r[1]||(r[1]=w=>e.unref(n).sort=w),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(_,{modelValue:e.unref(n).name,"onUpdate:modelValue":r[2]||(r[2]=w=>e.unref(n).name=w),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(_,{modelValue:e.unref(n).en_name,"onUpdate:modelValue":r[3]||(r[3]=w=>e.unref(n).en_name=w),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(_,{modelValue:e.unref(n).remark,"onUpdate:modelValue":r[4]||(r[4]=w=>e.unref(n).remark=w),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(k,{span:14},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(n).urls,"onUpdate:modelValue":r[5]||(r[5]=w=>e.unref(n).urls=w),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 P(N){return typeof N=="function"||Object.prototype.toString.call(N)==="[object Object]"&&!e.isVNode(N)}const K=e.defineComponent({__name:"index",setup(N){const V={keyword:"",status:0},g=e.ref(""),T=[{label:l.Translate("base.sort"),prop:"sort",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:s})=>e.createVNode("span",{class:"iconfont "+s.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:s})=>{var r;return e.createVNode(e.Fragment,null,[(r=s.menu)==null?void 0:r.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:s})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var r;return[(r=s.rules)==null?void 0:r.map(o=>e.createVNode(e.resolveComponent("el-popover"),{visible:g.value===o.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:o.key,onClick:()=>y({key:o.key}),onClose:()=>g.value=o.key},{default:()=>[o.translate]}),default:()=>{let t,_;return e.createVNode("div",null,[e.createVNode("p",null,null),e.createVNode("p",null,[`${l.Translate("base.confirm base.delete menu.rules")}: ${s.translate}-${o.translate} ?`]),e.createVNode("div",{style:"text-align: right; margin: 0"},[e.createVNode(e.resolveComponent("el-button"),{size:"small",text:!0,onClick:()=>g.value=""},P(t=l.Translate("base.cancel"))?t:{default:()=>[t]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>A(o.key)},P(_=l.Translate("base.confirm"))?_:{default:()=>[_]})])])}}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:S.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:s})=>e.createVNode(l.ModifyButton,{onModify:()=>m({id:s.id})},null)}],{requesting:C}=l.useLoading(S),{tableRef:h,formModalRef:f,keyword:a,search:d,reset:n,openFormModal:b,editFormModal:m}=l.useCrudPage(V),{formModalRef:i,openFormModal:x,editFormModal:y}=l.useCrudPage(),A=s=>{$[l.DEFAULT_REMOVE_KEY]({key:s}).then(()=>{g.value="",n()})};return(s,r)=>{const o=e.resolveComponent("el-button"),t=e.resolveComponent("el-input"),_=e.resolveComponent("el-radio-button"),k=e.resolveComponent("el-radio-group"),U=e.resolveComponent("el-space"),c=e.resolveComponent("el-page-header"),w=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(w,{class:"basic-card flex-full","body-class":"flex-1",onClick:r[5]||(r[5]=()=>g.value="")},{header:e.withCtx(()=>[e.createVNode(c,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(n)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(b)},null,8,["onOpen"]),e.createVNode(o,{circle:"",icon:e.unref(H),onClick:e.unref(x)},null,8,["icon","onClick"])]),content:e.withCtx(()=>[e.createVNode(U,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(t,{class:"basic-search-input",modelValue:e.unref(a).keyword,"onUpdate:modelValue":r[0]||(r[0]=p=>e.unref(a).keyword=p),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:r[1]||(r[1]=e.withKeys(p=>e.unref(d)(),["enter"])),onClear:r[2]||(r[2]=p=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(k,{modelValue:e.unref(a).status,"onUpdate:modelValue":r[3]||(r[3]=p=>e.unref(a).status=p),onChange:r[4]||(r[4]=p=>e.unref(d)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],p=>e.createVNode(_,{key:p,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${p}`),value:p},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:e.unref(d)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:h,size:"small",columns:T,url:e.unref(S).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),autoSearch:""},null,8,["url","search-param"]),e.createVNode(Q,{ref_key:"formModalRef",ref:f,onRefresh:e.unref(n)},null,8,["onRefresh"]),e.createVNode(Z,{ref_key:"ruleFormModalRef",ref:i,onRefresh:e.unref(n)},null,8,["onRefresh"])]),_:1})}}}),M=Object.freeze(Object.defineProperty({__proto__:null,default:K},Symbol.toStringTag,{value:"Module"})),v={class:"rule-check"},ee={style:{width:"80px","line-height":"36px"}},le=e.defineComponent({__name:"RulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(N,{expose:V,emit:g}){const{requesting:T}=l.useLoading(S),C=N,h=g,f=e.ref(!1),a=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:d,refresh:n}=l.useSelect(e.toRef(C,"modelValue"),h,{key:"RULE_CHECK",api:S,url:S.urls.rules,isArray:!0},!1);function b(){d.value.forEach(s=>{var r;(r=s.rules)!=null&&r.length&&(a.MenuAll[s.id]=!1,a.MenuIndeterminate[s.id]=!1,a.MenuList[s.id]=[])})}function m(s){d.value.forEach(r=>{var o;(o=r.rules)!=null&&o.length&&(a.MenuList[r.id]=s?r.rules.map(t=>t.key):[])}),x()}function i(s,r){const o=d.value.find(t=>t.id===r);a.MenuList[r]=s&&o?o.rules.map(t=>t.key):[],x()}function x(){d.value.forEach(s=>{var t,_;const r=((t=s.rules)==null?void 0:t.length)||0,o=((_=a.MenuList[s.id])==null?void 0:_.length)||0;a.MenuAll[s.id]=o===r&&r>0,a.MenuIndeterminate[s.id]=o>0&&o<r}),a.checkAll=Object.values(a.MenuAll).every(Boolean),a.indeterminate=!a.checkAll&&Object.values(a.MenuList).some(s=>s.length>0),h("update:modelValue",Object.values(a.MenuList).flat())}function y(){a.checkAll=!1,a.indeterminate=!1,a.MenuAll={},a.MenuList={},a.MenuIndeterminate={},b(),h("update:modelValue",[]),f.value=!1}function A(s){var r;if(Array.isArray(d.value)&&d.value.length>0){for(let o of d.value)if(Array.isArray(o.rules)&&o.rules.length>0)for(let t of o.rules)s.some(_=>_===t.key)&&(a.MenuList[o.id]=(((r=a.MenuList)==null?void 0:r[o.id])||[]).concat([t.key]));x(),f.value=!0}}return e.onMounted(async()=>{var s;(s=d.value)!=null&&s.length||await n(),!f.value&&C.modelValue&&A(C.modelValue)}),e.watch(()=>C.modelValue,s=>{e.nextTick(()=>{var r;f.value||!((r=d.value)!=null&&r.length)||s&&s.length>0&&A(s)})},{deep:!0,immediate:!0}),V({generateOption:A,cleanChecked:y}),(s,r)=>{const o=e.resolveComponent("el-checkbox"),t=e.resolveComponent("el-space"),_=e.resolveComponent("el-text"),k=e.resolveComponent("el-divider"),U=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",v,[e.createVNode(t,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(o,{"model-value":a.checkAll,indeterminate:a.indeterminate,id:"all",disabled:N.disabled,onChange:m},{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(T),text:"",size:"small",onRefresh:r[0]||(r[0]=c=>e.unref(n)(!0))},null,8,["loading"])]),_:1}),e.createVNode(t,{direction:"vertical",alignment:"start",class:"rule-check-content"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),c=>(e.openBlock(),e.createElementBlock("div",{key:c.id},[e.createVNode(t,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(o,{style:{"min-width":"150px"},"model-value":a.MenuAll[c.id],disabled:N.disabled||!c.rules||c.rules.length<=0,indeterminate:a.MenuIndeterminate[c.id],onChange:w=>i(w,c.id)},{default:e.withCtx(()=>[e.createVNode(_,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(k,{direction:"vertical"}),c.rules?(e.openBlock(),e.createBlock(U,{key:0,modelValue:a.MenuList[c.id],"onUpdate:modelValue":w=>a.MenuList[c.id]=w,disabled:N.disabled,style:{margin:"auto"},onChange:x},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.rules,w=>(e.openBlock(),e.createBlock(o,{key:w.key,value:w.key},{default:e.withCtx(()=>[e.createElementVNode("div",ee,e.toDisplayString(w.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),re=e.defineComponent({__name:"RoleFormModal",emits:["refresh"],setup(N,{expose:V,emit:g}){const T=g,C=e.ref(),h={key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]},f={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:d,form:n,formData:b,requesting:m,executing:i,open:x,modify:y,submit:A,closed:s}=l.useForm(T,h,u),r=()=>{var o;(o=C.value)==null||o.cleanChecked(),s()};return V({open:x,modify:y}),(o,t)=>{const _=e.resolveComponent("el-input"),k=e.resolveComponent("el-form-item"),U=e.resolveComponent("el-col"),c=e.resolveComponent("el-input-number"),w=e.resolveComponent("el-row"),p=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(a),"onUpdate:modelValue":t[6]||(t[6]=B=>e.isRef(a)?a.value=B:null),title:e.unref(d)(),width:"1000px",executing:e.unref(i),onClosed:r,onSubmit:e.unref(A)},{default:e.withCtx(()=>[e.createVNode(p,{ref_key:"form",ref:n,model:e.unref(b),"label-width":"auto",rules:f,disabled:e.unref(m)||e.unref(i)},{default:e.withCtx(()=>[e.createVNode(w,{gutter:20},{default:e.withCtx(()=>[e.createVNode(U,{span:12},{default:e.withCtx(()=>[e.createVNode(k,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(b).module,"onUpdate:modelValue":t[0]||(t[0]=B=>e.unref(b).module=B),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(U,{span:12},{default:e.withCtx(()=>[e.createVNode(k,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(c,{class:"w-full",modelValue:e.unref(b).sort,"onUpdate:modelValue":t[1]||(t[1]=B=>e.unref(b).sort=B),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(k,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(b).name,"onUpdate:modelValue":t[2]||(t[2]=B=>e.unref(b).name=B),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(k,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(b).en_name,"onUpdate:modelValue":t[3]||(t[3]=B=>e.unref(b).en_name=B),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(k,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(b).remark,"onUpdate:modelValue":t[4]||(t[4]=B=>e.unref(b).remark=B),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(k,{label:e.unref(l.Translate)("base.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(le,{ref_key:"rulesCheck",ref:C,modelValue:e.unref(b).rules,"onUpdate:modelValue":t[5]||(t[5]=B=>e.unref(b).rules=B),disabled:e.unref(m)||e.unref(i)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onSubmit"])}}}),z=e.defineComponent({__name:"index",setup(N){const V={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:m})=>e.createVNode(l.ModifyButton,{onModify:()=>b({key:m.key})},null)}],{requesting:T}=l.useLoading(u),{tableRef:C,formModalRef:h,keyword:f,search:a,reset:d,openFormModal:n,editFormModal:b}=l.useCrudPage(V);return(m,i)=>{const x=e.resolveComponent("el-input"),y=e.resolveComponent("el-space"),A=e.resolveComponent("el-page-header"),s=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(s,{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(T),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(n)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(y,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(x,{class:"basic-search-input",modelValue:e.unref(f).keyword,"onUpdate:modelValue":i[0]||(i[0]=r=>e.unref(f).keyword=r),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:i[1]||(i[1]=e.withKeys(r=>e.unref(a)(),["enter"])),onClear:i[2]||(i[2]=r=>e.unref(a)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(T),onSearch:i[3]||(i[3]=r=>e.unref(a)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:C,size:"small",columns:g,url:e.unref(u).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(f),autoSearch:""},null,8,["url","search-param"]),e.createVNode(re,{ref_key:"formModalRef",ref:h,onRefresh:e.unref(d)},null,8,["onRefresh"])]),_:1})}}}),te=Object.freeze(Object.defineProperty({__proto__:null,default:z},Symbol.toStringTag,{value:"Module"})),ne={install:(N,V)=>{Reflect.ownKeys(N._context.provides).some(g=>String(g)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.log(Reflect.ownKeys(N._context.provides))},version:"__VERSION__"},oe=Object.assign({"./views/admin/index.vue":I,"./views/language/index.vue":G,"./views/menu/index.vue":M,"./views/role/index.vue":te});E.AdminsPage=q,E.LanguagesPage=O,E.MenusPage=K,E.RolesPage=z,E.basicModules=oe,E.default=ne,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
1
|
+
(function(E,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):(E=typeof globalThis<"u"?globalThis:E||self,e(E.AutoVueBasic={},E.Vue,E["auto-vue-manual"]))})(this,function(E,e,l){"use strict";const F=l.createAutoApi("admin",{},"key"),u=l.createAutoApi("role",{},"key"),j=e.defineComponent({__name:"AdminFormModal",emits:["refresh"],setup(x,{expose:y,emit:C}){const T=C,w={key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]},{modal:h,title:f,form:a,formData:d,requesting:n,executing:b,open:i,modify:s,submit:k,closed:U}=l.useForm(T,w,F),R={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"}]},p=e.ref([]),r=async()=>{const o=await u.list();p.value=Array.isArray(o==null?void 0:o.data)?o.data:[]};return e.onBeforeMount(async()=>{await r()}),y({open:i,modify:s}),(o,t)=>{const _=e.resolveComponent("el-input"),g=e.resolveComponent("el-form-item"),A=e.resolveComponent("el-radio-button"),c=e.resolveComponent("el-radio-group"),N=e.resolveComponent("el-checkbox"),m=e.resolveComponent("el-checkbox-group"),V=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(h),"onUpdate:modelValue":t[7]||(t[7]=B=>e.isRef(h)?h.value=B:null),title:e.unref(f)(),width:"600px",executing:e.unref(b),onClosed:e.unref(U),onSubmit:e.unref(k)},{default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:a,model:e.unref(d),"label-width":"auto",rules:R,disabled:e.unref(n)||e.unref(b)},{default:e.withCtx(()=>[e.createVNode(g,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(d).username,"onUpdate:modelValue":t[0]||(t[0]=B=>e.unref(d).username=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(g,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(d).phone,"onUpdate:modelValue":t[1]||(t[1]=B=>e.unref(d).phone=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(g,{label:e.unref(l.Translate)("base.password"),prop:"password",required:!e.unref(d).key},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(d).password,"onUpdate:modelValue":t[2]||(t[2]=B=>e.unref(d).password=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(g,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(d).email,"onUpdate:modelValue":t[3]||(t[3]=B=>e.unref(d).email=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(g,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(d).language,"onUpdate:modelValue":t[4]||(t[4]=B=>e.unref(d).language=B)},{default:e.withCtx(()=>[e.createVNode(A,{value:"zh-CN"},{default:e.withCtx(()=>t[8]||(t[8]=[e.createTextVNode("zh-CN")])),_:1,__:[8]}),e.createVNode(A,{value:"en-US"},{default:e.withCtx(()=>t[9]||(t[9]=[e.createTextVNode("en-US")])),_:1,__:[9]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(g,{label:e.unref(l.Translate)("menu.Role"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(d).roles,"onUpdate:modelValue":t[5]||(t[5]=B=>e.unref(d).roles=B)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,B=>(e.openBlock(),e.createBlock(N,{key:B.key,value:B.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.translate),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(g,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(d).remark,"onUpdate:modelValue":t[6]||(t[6]=B=>e.unref(d).remark=B),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 y={keyword:""},C=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:i})=>e.createVNode(l.BasicAvatar,{src:i.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:i})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[i.username]),e.createVNode("div",null,[i.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:i})=>e.createVNode(l.ModifyButton,{onModify:()=>b({key:i.key})},null)}],{requesting:T}=l.useLoading(F),{tableRef:w,formModalRef:h,keyword:f,search:a,reset:d,openFormModal:n,editFormModal:b}=l.useCrudPage(y);return(i,s)=>{const k=e.resolveComponent("el-input"),U=e.resolveComponent("el-space"),R=e.resolveComponent("el-page-header"),p=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(p,{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(T),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(n)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(U,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(k,{class:"basic-search-input",modelValue:e.unref(f).keyword,"onUpdate:modelValue":s[0]||(s[0]=r=>e.unref(f).keyword=r),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:s[1]||(s[1]=e.withKeys(r=>e.unref(a)(),["enter"])),onClear:s[2]||(s[2]=r=>e.unref(a)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(T),onSearch:s[3]||(s[3]=r=>e.unref(a)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:w,size:"small",columns:C,url:e.unref(F).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(f),autoSearch:""},null,8,["url","search-param"]),e.createVNode(j,{ref_key:"formModalRef",ref:h,onRefresh:e.unref(d)},null,8,["onRefresh"])]),_:1})}}}),I=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),L=l.createAutoApi("translation",{},"key"),Y=e.defineComponent({__name:"LangFormModal",emits:["refresh"],setup(x,{expose:y,emit:C}){const T=C,w={id:0,key:"",module:"",language:"",result:"",remark:""},h={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:f,title:a,form:d,formData:n,requesting:b,executing:i,open:s,modify:k,submit:U,closed:R}=l.useForm(T,w,L);return y({open:s,modify:k}),(p,r)=>{const o=e.resolveComponent("el-input"),t=e.resolveComponent("el-form-item"),_=e.resolveComponent("el-radio-button"),g=e.resolveComponent("el-radio-group"),A=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(f),"onUpdate:modelValue":r[5]||(r[5]=c=>e.isRef(f)?f.value=c:null),title:e.unref(a)(),width:"600px",executing:e.unref(i),onClosed:e.unref(R),onSubmit:e.unref(U)},{default:e.withCtx(()=>[e.createVNode(A,{ref_key:"form",ref:d,model:e.unref(n),"label-width":"auto",rules:h,disabled:e.unref(b)||e.unref(i)},{default:e.withCtx(()=>[e.createVNode(t,{label:e.unref(l.Translate)("language.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(n).module,"onUpdate:modelValue":r[0]||(r[0]=c=>e.unref(n).module=c),placeholder:e.unref(l.Translate)("language.placeholder.module")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(t,{label:e.unref(l.Translate)("language.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(n).key,"onUpdate:modelValue":r[1]||(r[1]=c=>e.unref(n).key=c),placeholder:e.unref(l.Translate)("language.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(t,{label:e.unref(l.Translate)("language.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(n).language,"onUpdate:modelValue":r[2]||(r[2]=c=>e.unref(n).language=c)},{default:e.withCtx(()=>[e.createVNode(_,{label:"zh-CN"},{default:e.withCtx(()=>r[6]||(r[6]=[e.createTextVNode("zh-CN")])),_:1,__:[6]}),e.createVNode(_,{label:"en-US"},{default:e.withCtx(()=>r[7]||(r[7]=[e.createTextVNode("en-US")])),_:1,__:[7]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(t,{label:e.unref(l.Translate)("language.result"),prop:"result",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(n).result,"onUpdate:modelValue":r[3]||(r[3]=c=>e.unref(n).result=c),placeholder:e.unref(l.Translate)("language.placeholder.result")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(t,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(n).remark,"onUpdate:modelValue":r[4]||(r[4]=c=>e.unref(n).remark=c),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"])}}}),O=e.defineComponent({__name:"index",setup(x){const y={keyword:"",status:0},C=[{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:L.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:i})=>e.createVNode(l.ModifyButton,{onModify:()=>b({id:i.id})},null)}],{requesting:T}=l.useLoading(L),{tableRef:w,formModalRef:h,keyword:f,search:a,reset:d,openFormModal:n,editFormModal:b}=l.useCrudPage(y);return(i,s)=>{const k=e.resolveComponent("el-input"),U=e.resolveComponent("el-radio-button"),R=e.resolveComponent("el-radio-group"),p=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(T),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(n)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(p,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(k,{class:"basic-search-input",modelValue:e.unref(f).keyword,"onUpdate:modelValue":s[0]||(s[0]=t=>e.unref(f).keyword=t),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:s[1]||(s[1]=e.withKeys(t=>e.unref(a)(),["enter"])),onClear:s[2]||(s[2]=t=>e.unref(a)())},null,8,["modelValue","placeholder"]),e.createVNode(R,{modelValue:e.unref(f).status,"onUpdate:modelValue":s[3]||(s[3]=t=>e.unref(f).status=t),onChange:s[4]||(s[4]=t=>e.unref(a)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],t=>e.createVNode(U,{key:t,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${t}`),value:t},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(T),onSearch:s[5]||(s[5]=t=>e.unref(a)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:w,size:"small",columns:C,url:e.unref(L).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(f),autoSearch:""},null,8,["url","search-param"]),e.createVNode(Y,{ref_key:"formModalRef",ref:h,onRefresh:e.unref(d)},null,8,["onRefresh"])]),_:1})}}}),G=Object.freeze(Object.defineProperty({__proto__:null,default:O},Symbol.toStringTag,{value:"Module"})),D={tops:"tops",rules:"rules"},S=l.AutoApiUtils.createAutoApi("menu",D,"id",Object.keys(D),[],["TOP_MENU_LIST","MENU_LIST"]),$=l.createAutoApi("rule",{},"key");/*! Element Plus Icons Vue v2.3.1 */var W=e.defineComponent({name:"Key",__name:"key",setup(x){return(y,C)=>(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"})]))}}),H=W;const J=e.defineComponent({__name:"TopMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{emit:y}){const C=y,T=x,{requesting:w}=l.useLoading(S),{value:h,options:f,change:a,refresh:d,filterOptions:n}=l.useSelect(e.toRef(T,"modelValue"),C,{key:"TOP_MENU_LIST",api:S,url:S.urls.tops,isArray:!0});return(b,i)=>{const s=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(s,{class:"w-full",modelValue:e.unref(h),"onUpdate:modelValue":i[1]||(i[1]=k=>e.isRef(h)?h.value=k:null),options:e.unref(f),multiple:x.multiple,disabled:e.unref(w),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(n),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(w),onRefresh:i[0]||(i[0]=k=>e.unref(d)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),Q=e.defineComponent({__name:"MenuFormModal",emits:["refresh"],setup(x,{expose:y,emit:C}){const T=C,w={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}},h={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:f,title:a,form:d,formData:n,requesting:b,executing:i,open:s,modify:k,submit:U,closed:R}=l.useForm(T,w,S);return y({open:s,modify:k}),(p,r)=>{const o=e.resolveComponent("el-form-item"),t=e.resolveComponent("el-col"),_=e.resolveComponent("el-input-number"),g=e.resolveComponent("el-row"),A=e.resolveComponent("el-input"),c=e.resolveComponent("el-switch"),N=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(f),"onUpdate:modelValue":r[17]||(r[17]=m=>e.isRef(f)?f.value=m:null),title:e.unref(a)(),width:"1000px",executing:e.unref(i),onClosed:e.unref(R),onSubmit:e.unref(U)},{default:e.withCtx(()=>[e.createVNode(N,{ref_key:"form",ref:d,model:e.unref(n),"label-width":"auto",rules:h,disabled:e.unref(b)||e.unref(i)},{default:e.withCtx(()=>[e.createVNode(g,{gutter:20},{default:e.withCtx(()=>[e.createVNode(t,{span:12},{default:e.withCtx(()=>[e.createVNode(g,{gutter:10},{default:e.withCtx(()=>[e.createVNode(t,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(J,{modelValue:e.unref(n).menu_id,"onUpdate:modelValue":r[0]||(r[0]=m=>e.unref(n).menu_id=m)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(t,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(_,{class:"w-full",modelValue:e.unref(n).sort,"onUpdate:modelValue":r[1]||(r[1]=m=>e.unref(n).sort=m),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(A,{modelValue:e.unref(n).module,"onUpdate:modelValue":r[2]||(r[2]=m=>e.unref(n).module=m),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(A,{modelValue:e.unref(n).name,"onUpdate:modelValue":r[3]||(r[3]=m=>e.unref(n).name=m),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(A,{modelValue:e.unref(n).en_name,"onUpdate:modelValue":r[4]||(r[4]=m=>e.unref(n).en_name=m),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(A,{modelValue:e.unref(n).component,"onUpdate:modelValue":r[5]||(r[5]=m=>e.unref(n).component=m),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(A,{modelValue:e.unref(n).url,"onUpdate:modelValue":r[6]||(r[6]=m=>e.unref(n).url=m),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(A,{modelValue:e.unref(n).remark,"onUpdate:modelValue":r[7]||(r[7]=m=>e.unref(n).remark=m),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(t,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(n).icon,"onUpdate:modelValue":r[8]||(r[8]=m=>e.unref(n).icon=m),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:r[9]||(r[9]=m=>{e.unref(n).meta.icon=m})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+e.unref(n).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(A,{modelValue:e.unref(n).meta.title,"onUpdate:modelValue":r[10]||(r[10]=m=>e.unref(n).meta.title=m),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(A,{modelValue:e.unref(n).meta.active,"onUpdate:modelValue":r[11]||(r[11]=m=>e.unref(n).meta.active=m),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(g,null,{default:e.withCtx(()=>[e.createVNode(t,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(n).meta.link,"onUpdate:modelValue":r[12]||(r[12]=m=>e.unref(n).meta.link=m)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(t,{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(c,{modelValue:e.unref(n).meta.keep_alive,"onUpdate:modelValue":r[13]||(r[13]=m=>e.unref(n).meta.keep_alive=m)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(t,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(n).meta.hide,"onUpdate:modelValue":r[14]||(r[14]=m=>e.unref(n).meta.hide=m)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(t,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(n).meta.full,"onUpdate:modelValue":r[15]||(r[15]=m=>e.unref(n).meta.full=m)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(t,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(n).meta.affix,"onUpdate:modelValue":r[16]||(r[16]=m=>e.unref(n).meta.affix=m)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),X=e.defineComponent({__name:"MenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{emit:y}){const C=y,T=x,{requesting:w}=l.useLoading(S),{value:h,options:f,change:a,refresh:d,filterOptions:n}=l.useSelect(e.toRef(T,"modelValue"),C,{key:"MENU_LIST",api:S,isArray:!0});return(b,i)=>{const s=e.resolveComponent("el-space"),k=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(k,{class:"w-full",modelValue:e.unref(h),"onUpdate:modelValue":i[1]||(i[1]=U=>e.isRef(h)?h.value=U:null),options:e.unref(f),multiple:x.multiple,disabled:e.unref(w),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(n),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(w),onRefresh:i[0]||(i[0]=U=>e.unref(d)(!0))},null,8,["loading"])]),default:e.withCtx(({item:U})=>[e.createVNode(s,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${U.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(U.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),Z=e.defineComponent({__name:"MenuRuleFormModal",emits:["refresh"],setup(x,{expose:y,emit:C}){const T=C,w={key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""},h={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:f,title:a,form:d,formData:n,requesting:b,executing:i,open:s,modify:k,submit:U,closed:R}=l.useForm(T,w,$);return y({open:s,modify:k}),(p,r)=>{const o=e.resolveComponent("el-form-item"),t=e.resolveComponent("el-input-number"),_=e.resolveComponent("el-input"),g=e.resolveComponent("el-col"),A=e.resolveComponent("el-row"),c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(f),"onUpdate:modelValue":r[6]||(r[6]=N=>e.isRef(f)?f.value=N:null),title:e.unref(a)("menu.rules"),width:"1000px",executing:e.unref(i),onClosed:e.unref(R),onSubmit:e.unref(U)},{default:e.withCtx(()=>[e.createVNode(c,{ref_key:"form",ref:d,model:e.unref(n),"label-width":"auto",rules:h,disabled:e.unref(b)||e.unref(i)},{default:e.withCtx(()=>[e.createVNode(A,{gutter:20},{default:e.withCtx(()=>[e.createVNode(g,{span:10},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(X,{modelValue:e.unref(n).menu_id,"onUpdate:modelValue":r[0]||(r[0]=N=>e.unref(n).menu_id=N)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(t,{class:"w-full",modelValue:e.unref(n).sort,"onUpdate:modelValue":r[1]||(r[1]=N=>e.unref(n).sort=N),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(_,{modelValue:e.unref(n).name,"onUpdate:modelValue":r[2]||(r[2]=N=>e.unref(n).name=N),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(_,{modelValue:e.unref(n).en_name,"onUpdate:modelValue":r[3]||(r[3]=N=>e.unref(n).en_name=N),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(_,{modelValue:e.unref(n).remark,"onUpdate:modelValue":r[4]||(r[4]=N=>e.unref(n).remark=N),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(g,{span:14},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(n).urls,"onUpdate:modelValue":r[5]||(r[5]=N=>e.unref(n).urls=N),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 P(x){return typeof x=="function"||Object.prototype.toString.call(x)==="[object Object]"&&!e.isVNode(x)}const K=e.defineComponent({__name:"index",setup(x){const y={keyword:"",status:0},C=e.ref(""),T=[{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(t=>e.createVNode(e.resolveComponent("el-popover"),{visible:C.value===t.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:t.key,onClick:()=>R({key:t.key}),onClose:()=>C.value=t.key},{default:()=>[t.translate]}),default:()=>{let _,g;return e.createVNode("div",null,[e.createVNode("p",null,null),e.createVNode("p",null,[`${l.Translate("base.confirm base.delete menu.rules")}: ${r.translate}-${t.translate} ?`]),e.createVNode("div",{style:"text-align: right; margin: 0"},[e.createVNode(e.resolveComponent("el-button"),{size:"small",text:!0,onClick:()=>C.value=""},P(_=l.Translate("base.cancel"))?_:{default:()=>[_]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>p(t.key)},P(g=l.Translate("base.confirm"))?g:{default:()=>[g]})])])}}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:S.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:()=>s({id:r.id})},null)}],{requesting:w}=l.useLoading(S),{tableRef:h,formModalRef:f,keyword:a,search:d,refresh:n,reset:b,openFormModal:i,editFormModal:s}=l.useCrudPage(y),{formModalRef:k,openFormModal:U,editFormModal:R}=l.useCrudPage(),p=r=>{$[l.DEFAULT_REMOVE_KEY]({key:r}).then(()=>{C.value="",n()})};return(r,o)=>{const t=e.resolveComponent("el-button"),_=e.resolveComponent("el-input"),g=e.resolveComponent("el-radio-button"),A=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-space"),N=e.resolveComponent("el-page-header"),m=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(m,{class:"basic-card flex-full","body-class":"flex-1",onClick:o[5]||(o[5]=()=>C.value="")},{header:e.withCtx(()=>[e.createVNode(N,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(w),onRefresh:e.unref(b)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(i)},null,8,["onOpen"]),e.createVNode(t,{circle:"",icon:e.unref(H),onClick:e.unref(U)},null,8,["icon","onClick"])]),content:e.withCtx(()=>[e.createVNode(c,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(_,{class:"basic-search-input",modelValue:e.unref(a).keyword,"onUpdate:modelValue":o[0]||(o[0]=V=>e.unref(a).keyword=V),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:o[1]||(o[1]=e.withKeys(V=>e.unref(d)(),["enter"])),onClear:o[2]||(o[2]=V=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(A,{modelValue:e.unref(a).status,"onUpdate:modelValue":o[3]||(o[3]=V=>e.unref(a).status=V),onChange:o[4]||(o[4]=V=>e.unref(d)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],V=>e.createVNode(g,{key:V,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${V}`),value:V},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(w),onSearch:e.unref(d)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:h,size:"small",columns:T,url:e.unref(S).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),autoSearch:""},null,8,["url","search-param"]),e.createVNode(Q,{ref_key:"formModalRef",ref:f,onRefresh:e.unref(b)},null,8,["onRefresh"]),e.createVNode(Z,{ref_key:"ruleFormModalRef",ref:k,onRefresh:e.unref(n)},null,8,["onRefresh"])]),_:1})}}}),M=Object.freeze(Object.defineProperty({__proto__:null,default:K},Symbol.toStringTag,{value:"Module"})),v={class:"rule-check"},ee={style:{width:"80px","line-height":"36px"}},le=e.defineComponent({__name:"RulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(x,{expose:y,emit:C}){const{requesting:T}=l.useLoading(S),w=x,h=C,f=e.ref(!1),a=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:d,refresh:n}=l.useSelect(e.toRef(w,"modelValue"),h,{key:"RULE_CHECK",api:S,url:S.urls.rules,isArray:!0},!1);function b(){d.value.forEach(p=>{var r;(r=p.rules)!=null&&r.length&&(a.MenuAll[p.id]=!1,a.MenuIndeterminate[p.id]=!1,a.MenuList[p.id]=[])})}function i(p){d.value.forEach(r=>{var o;(o=r.rules)!=null&&o.length&&(a.MenuList[r.id]=p?r.rules.map(t=>t.key):[])}),k()}function s(p,r){const o=d.value.find(t=>t.id===r);a.MenuList[r]=p&&o?o.rules.map(t=>t.key):[],k()}function k(){d.value.forEach(p=>{var t,_;const r=((t=p.rules)==null?void 0:t.length)||0,o=((_=a.MenuList[p.id])==null?void 0:_.length)||0;a.MenuAll[p.id]=o===r&&r>0,a.MenuIndeterminate[p.id]=o>0&&o<r}),a.checkAll=Object.values(a.MenuAll).every(Boolean),a.indeterminate=!a.checkAll&&Object.values(a.MenuList).some(p=>p.length>0),h("update:modelValue",Object.values(a.MenuList).flat())}function U(){a.checkAll=!1,a.indeterminate=!1,a.MenuAll={},a.MenuList={},a.MenuIndeterminate={},b(),h("update:modelValue",[]),f.value=!1}function R(p){var r;if(Array.isArray(d.value)&&d.value.length>0){for(let o of d.value)if(Array.isArray(o.rules)&&o.rules.length>0)for(let t of o.rules)p.some(_=>_===t.key)&&(a.MenuList[o.id]=(((r=a.MenuList)==null?void 0:r[o.id])||[]).concat([t.key]));k(),f.value=!0}}return e.onMounted(async()=>{var p;(p=d.value)!=null&&p.length||await n(),!f.value&&w.modelValue&&R(w.modelValue)}),e.watch(()=>w.modelValue,p=>{e.nextTick(()=>{var r;f.value||!((r=d.value)!=null&&r.length)||p&&p.length>0&&R(p)})},{deep:!0,immediate:!0}),y({generateOption:R,cleanChecked:U}),(p,r)=>{const o=e.resolveComponent("el-checkbox"),t=e.resolveComponent("el-space"),_=e.resolveComponent("el-text"),g=e.resolveComponent("el-divider"),A=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",v,[e.createVNode(t,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(o,{"model-value":a.checkAll,indeterminate:a.indeterminate,id:"all",disabled:x.disabled,onChange:i},{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(T),text:"",size:"small",onRefresh:r[0]||(r[0]=c=>e.unref(n)(!0))},null,8,["loading"])]),_:1}),e.createVNode(t,{direction:"vertical",alignment:"start",class:"rule-check-content"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),c=>(e.openBlock(),e.createElementBlock("div",{key:c.id},[e.createVNode(t,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(o,{style:{"min-width":"150px"},"model-value":a.MenuAll[c.id],disabled:x.disabled||!c.rules||c.rules.length<=0,indeterminate:a.MenuIndeterminate[c.id],onChange:N=>s(N,c.id)},{default:e.withCtx(()=>[e.createVNode(_,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(g,{direction:"vertical"}),c.rules?(e.openBlock(),e.createBlock(A,{key:0,modelValue:a.MenuList[c.id],"onUpdate:modelValue":N=>a.MenuList[c.id]=N,disabled:x.disabled,style:{margin:"auto"},onChange:k},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.rules,N=>(e.openBlock(),e.createBlock(o,{key:N.key,value:N.key},{default:e.withCtx(()=>[e.createElementVNode("div",ee,e.toDisplayString(N.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),re=e.defineComponent({__name:"RoleFormModal",emits:["refresh"],setup(x,{expose:y,emit:C}){const T=C,w=e.ref(),h={key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]},f={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:d,form:n,formData:b,requesting:i,executing:s,open:k,modify:U,submit:R,closed:p}=l.useForm(T,h,u),r=()=>{var o;(o=w.value)==null||o.cleanChecked(),p()};return y({open:k,modify:U}),(o,t)=>{const _=e.resolveComponent("el-input"),g=e.resolveComponent("el-form-item"),A=e.resolveComponent("el-col"),c=e.resolveComponent("el-input-number"),N=e.resolveComponent("el-row"),m=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(a),"onUpdate:modelValue":t[6]||(t[6]=V=>e.isRef(a)?a.value=V:null),title:e.unref(d)(),width:"1000px",executing:e.unref(s),onClosed:r,onSubmit:e.unref(R)},{default:e.withCtx(()=>[e.createVNode(m,{ref_key:"form",ref:n,model:e.unref(b),"label-width":"auto",rules:f,disabled:e.unref(i)||e.unref(s)},{default:e.withCtx(()=>[e.createVNode(N,{gutter:20},{default:e.withCtx(()=>[e.createVNode(A,{span:12},{default:e.withCtx(()=>[e.createVNode(g,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(b).module,"onUpdate:modelValue":t[0]||(t[0]=V=>e.unref(b).module=V),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(A,{span:12},{default:e.withCtx(()=>[e.createVNode(g,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(c,{class:"w-full",modelValue:e.unref(b).sort,"onUpdate:modelValue":t[1]||(t[1]=V=>e.unref(b).sort=V),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(g,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(b).name,"onUpdate:modelValue":t[2]||(t[2]=V=>e.unref(b).name=V),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(g,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(b).en_name,"onUpdate:modelValue":t[3]||(t[3]=V=>e.unref(b).en_name=V),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(g,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(b).remark,"onUpdate:modelValue":t[4]||(t[4]=V=>e.unref(b).remark=V),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(g,{label:e.unref(l.Translate)("base.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(le,{ref_key:"rulesCheck",ref:w,modelValue:e.unref(b).rules,"onUpdate:modelValue":t[5]||(t[5]=V=>e.unref(b).rules=V),disabled:e.unref(i)||e.unref(s)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onSubmit"])}}}),z=e.defineComponent({__name:"index",setup(x){const y={keyword:""},C=[{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:i})=>e.createVNode(l.ModifyButton,{onModify:()=>b({key:i.key})},null)}],{requesting:T}=l.useLoading(u),{tableRef:w,formModalRef:h,keyword:f,search:a,reset:d,openFormModal:n,editFormModal:b}=l.useCrudPage(y);return(i,s)=>{const k=e.resolveComponent("el-input"),U=e.resolveComponent("el-space"),R=e.resolveComponent("el-page-header"),p=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(p,{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(T),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(n)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(U,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(k,{class:"basic-search-input",modelValue:e.unref(f).keyword,"onUpdate:modelValue":s[0]||(s[0]=r=>e.unref(f).keyword=r),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:s[1]||(s[1]=e.withKeys(r=>e.unref(a)(),["enter"])),onClear:s[2]||(s[2]=r=>e.unref(a)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(T),onSearch:s[3]||(s[3]=r=>e.unref(a)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:w,size:"small",columns:C,url:e.unref(u).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(f),autoSearch:""},null,8,["url","search-param"]),e.createVNode(re,{ref_key:"formModalRef",ref:h,onRefresh:e.unref(d)},null,8,["onRefresh"])]),_:1})}}}),te=Object.freeze(Object.defineProperty({__proto__:null,default:z},Symbol.toStringTag,{value:"Module"})),ne={install:(x,y)=>{Reflect.ownKeys(x._context.provides).some(C=>String(C)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.log(Reflect.ownKeys(x._context.provides))},version:"__VERSION__"},oe=Object.assign({"./views/admin/index.vue":I,"./views/language/index.vue":G,"./views/menu/index.vue":M,"./views/role/index.vue":te});E.AdminsPage=q,E.LanguagesPage=O,E.MenusPage=K,E.RolesPage=z,E.basicModules=oe,E.default=ne,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
export declare const routes: RouteRecordRaw[];
|
1
|
+
export * from './log';
|
@@ -0,0 +1,35 @@
|
|
1
|
+
export interface RequestLogResponse {
|
2
|
+
time: string;
|
3
|
+
tag: Record<string, string>;
|
4
|
+
event: string;
|
5
|
+
trace_id: string;
|
6
|
+
span_id: string;
|
7
|
+
agent: string;
|
8
|
+
ip: string;
|
9
|
+
service: string;
|
10
|
+
url: string;
|
11
|
+
method: string;
|
12
|
+
code: string;
|
13
|
+
body: string;
|
14
|
+
cost: number;
|
15
|
+
}
|
16
|
+
export interface SQLLogResponse {
|
17
|
+
time: string;
|
18
|
+
tag: Record<string, string>;
|
19
|
+
location: string;
|
20
|
+
type: string;
|
21
|
+
sql: string;
|
22
|
+
cost: number;
|
23
|
+
rows: number;
|
24
|
+
slow: boolean;
|
25
|
+
error: string;
|
26
|
+
}
|
27
|
+
export interface ErrorLogResponse {
|
28
|
+
time: string;
|
29
|
+
tag: Record<string, string>;
|
30
|
+
service: string;
|
31
|
+
type: string;
|
32
|
+
trace_id: string;
|
33
|
+
span_id: string;
|
34
|
+
error: string;
|
35
|
+
}
|
File without changes
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
2
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
3
|
+
tableRef: any;
|
4
|
+
}, any>;
|
5
|
+
export default _default;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
2
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
3
|
+
tableRef: any;
|
4
|
+
}, any>;
|
5
|
+
export default _default;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
2
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
3
|
+
tableRef: any;
|
4
|
+
}, any>;
|
5
|
+
export default _default;
|
package/dist/version.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const __VERSION__ = "0.0.
|
1
|
+
export const __VERSION__ = "0.0.41'
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "auto-vue-basic",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.42",
|
4
4
|
"type": "module",
|
5
5
|
"main": "./dist/auto-vue-basic.umd.js",
|
6
6
|
"module": "./dist/auto-vue-basic.es.js",
|
@@ -19,7 +19,7 @@
|
|
19
19
|
},
|
20
20
|
"dependencies": {
|
21
21
|
"@element-plus/icons-vue": "^2.3.1",
|
22
|
-
"auto-vue-manual": ">=0.1.
|
22
|
+
"auto-vue-manual": ">=0.1.93",
|
23
23
|
"axios": "^1.7.9",
|
24
24
|
"element-plus": "^2.9.3",
|
25
25
|
"mitt": "^3.0.1",
|
@@ -49,7 +49,7 @@
|
|
49
49
|
},
|
50
50
|
"peerDependencies": {
|
51
51
|
"@element-plus/icons-vue": "^2.3.1",
|
52
|
-
"auto-vue-manual": ">=0.1.
|
52
|
+
"auto-vue-manual": ">=0.1.93",
|
53
53
|
"element-plus": "^2.9.3",
|
54
54
|
"sass": "^1.77.6",
|
55
55
|
"sass-loader": "^16.0.4",
|