auto-vue-basic 0.0.37 → 0.0.38
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.
@@ -1294,11 +1294,13 @@ const De = /* @__PURE__ */ D({
|
|
1294
1294
|
{
|
1295
1295
|
label: a("base.url"),
|
1296
1296
|
prop: "url",
|
1297
|
+
align: "left",
|
1297
1298
|
width: 200
|
1298
1299
|
},
|
1299
1300
|
{
|
1300
1301
|
label: a("menu.component"),
|
1301
1302
|
prop: "component",
|
1303
|
+
align: "left",
|
1302
1304
|
width: 200
|
1303
1305
|
},
|
1304
1306
|
{
|
@@ -1 +1 @@
|
|
1
|
-
(function(u,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):(u=typeof globalThis<"u"?globalThis:u||self,e(u.AutoVueBasic={},u.Vue,u["auto-vue-manual"]))})(this,function(u,e,l){"use strict";const q=l.createAutoApi("admin",{},"key"),L=l.createAutoApi("role",{},"key"),P=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:V,emit:w}){const y=w,x={key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]},{modal:C,title:f,form:a,formData:d,requesting:t,executing:m,open:b,modify:_,submit:h,closed:B}=l.useForm(y,x,q),U={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 base.roles"),trigger:"change"}]},p=e.ref([]),s=async()=>{const o=await L.list();p.value=Array.isArray(o==null?void 0:o.data)?o.data:[]};return V({openOrModify:async o=>{p.value.length||await s(),o?_({key:o}):b()}}),(o,n)=>{const N=e.resolveComponent("el-input"),T=e.resolveComponent("el-form-item"),c=e.resolveComponent("el-radio-button"),g=e.resolveComponent("el-radio-group"),A=e.resolveComponent("el-checkbox"),i=e.resolveComponent("el-checkbox-group"),S=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(C),"onUpdate:modelValue":n[7]||(n[7]=R=>e.isRef(C)?C.value=R:null),title:e.unref(f)(),width:"600px",executing:e.unref(m),onClosed:e.unref(B),onSubmit:e.unref(h)},{default:e.withCtx(()=>[e.createVNode(S,{ref_key:"form",ref:a,model:e.unref(d),"label-width":"auto",rules:U,disabled:e.unref(t)||e.unref(m)},{default:e.withCtx(()=>[e.createVNode(T,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(d).username,"onUpdate:modelValue":n[0]||(n[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(T,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(d).phone,"onUpdate:modelValue":n[1]||(n[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(T,{label:e.unref(l.Translate)("base.password"),prop:"password",required:!e.unref(d).key},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(d).password,"onUpdate:modelValue":n[2]||(n[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(T,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(d).email,"onUpdate:modelValue":n[3]||(n[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(T,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(d).language,"onUpdate:modelValue":n[4]||(n[4]=R=>e.unref(d).language=R)},{default:e.withCtx(()=>[e.createVNode(c,{value:"zh-CN"},{default:e.withCtx(()=>n[8]||(n[8]=[e.createTextVNode("zh-CN")])),_:1,__:[8]}),e.createVNode(c,{value:"en-US"},{default:e.withCtx(()=>n[9]||(n[9]=[e.createTextVNode("en-US")])),_:1,__:[9]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(T,{label:e.unref(l.Translate)("base.roles"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(d).roles,"onUpdate:modelValue":n[5]||(n[5]=R=>e.unref(d).roles=R)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,R=>(e.openBlock(),e.createBlock(A,{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(T,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(d).remark,"onUpdate:modelValue":n[6]||(n[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"])}}}),z=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(k){const V={keyword:""},w=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:_})=>e.createVNode(e.resolveComponent("el-avatar"),{size:"default",src:_.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:_})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[_.username]),e.createVNode("div",null,[_.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:_})=>e.createVNode(l.ModifyButton,{onModify:()=>b(_.key)},null)}],{requesting:y}=l.useLoading(q),{tableRef:x,infoRef:C,keyword:f,search:a,refresh:d,reset:t,openInfo:m,modifyInfo:b}=l.useTablePage(V);return(_,h)=>{const B=e.resolveComponent("el-input"),U=e.resolveComponent("el-space"),p=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(p,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(y),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(m)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(U,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(B,{class:"basic-search-input",modelValue:e.unref(f).keyword,"onUpdate:modelValue":h[0]||(h[0]=r=>e.unref(f).keyword=r),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(a),["enter"]),onClear:e.unref(a)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(y),onSearch:e.unref(a)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:x,size:"small",columns:w,url:e.unref(q).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(f),autoSearch:""},null,8,["url","search-param"]),e.createVNode(P,{ref_key:"infoRef",ref:C,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),O=l.createAutoApi("translate",{},"key"),j=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:V,emit:w}){const y=w,x={id:0,key:"",module:"",language:"",result:"",remark:""},C={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:t,requesting:m,executing:b,open:_,modify:h,submit:B,closed:U}=l.useForm(y,x,O);return V({openOrModify:s=>{s?h({id:s}):_()}}),(s,r)=>{const o=e.resolveComponent("el-input"),n=e.resolveComponent("el-form-item"),N=e.resolveComponent("el-radio-button"),T=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(f),"onUpdate:modelValue":r[5]||(r[5]=g=>e.isRef(f)?f.value=g:null),title:e.unref(a)(),width:"600px",executing:e.unref(b),onClosed:e.unref(U),onSubmit:e.unref(B)},{default:e.withCtx(()=>[e.createVNode(c,{ref_key:"form",ref:d,model:e.unref(t),"label-width":"auto",rules:C,disabled:e.unref(m)||e.unref(b)},{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]=g=>e.unref(t).module=g),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]=g=>e.unref(t).key=g),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(T,{modelValue:e.unref(t).language,"onUpdate:modelValue":r[2]||(r[2]=g=>e.unref(t).language=g)},{default:e.withCtx(()=>[e.createVNode(N,{label:"zh-CN"},{default:e.withCtx(()=>r[6]||(r[6]=[e.createTextVNode("zh-CN")])),_:1,__:[6]}),e.createVNode(N,{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]=g=>e.unref(t).result=g),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]=g=>e.unref(t).remark=g),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"])}}}),Y=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(k){const V={keyword:"",status:0},w=[{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:O.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:_})=>e.createVNode(l.ModifyButton,{onModify:()=>b(_.id)},null)}],{requesting:y}=l.useLoading(O),{tableRef:x,infoRef:C,keyword:f,search:a,refresh:d,reset:t,openInfo:m,modifyInfo:b}=l.useTablePage(V);return(_,h)=>{const B=e.resolveComponent("el-input"),U=e.resolveComponent("el-radio-button"),p=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(y),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(m)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(s,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(B,{class:"basic-search-input",modelValue:e.unref(f).keyword,"onUpdate:modelValue":h[0]||(h[0]=n=>e.unref(f).keyword=n),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(a),["enter"]),onClear:e.unref(a)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(p,{modelValue:e.unref(f).status,"onUpdate:modelValue":h[1]||(h[1]=n=>e.unref(f).status=n),onChange:e.unref(a)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],n=>e.createVNode(U,{key:n,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${n}`),value:n},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(y),onSearch:e.unref(a)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:x,size:"small",columns:w,url:e.unref(O).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(f),autoSearch:""},null,8,["url","search-param"]),e.createVNode(j,{ref_key:"infoRef",ref:C,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),D={tops:"tops",rules:"rules"},E=l.AutoApiUtils.createAutoApi("menu",D,"id",Object.keys(D),[],["TOP_MENU_LIST","MENU_LIST"]),F=l.createAutoApi("rule",{},"key");/*! Element Plus Icons Vue v2.3.1 */var G=e.defineComponent({name:"Key",__name:"key",setup(k){return(V,w)=>(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"})]))}}),W=G;const H=e.defineComponent({__name:"topMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(k,{emit:V}){const w=V,y=k,{requesting:x}=l.useLoading(E),{value:C,options:f,change:a,refresh:d,filterOptions:t}=l.useSelect(e.toRef(y,"modelValue"),w,{key:"TOP_MENU_LIST",api:E,url:E.urls.tops,isArray:!0});return(m,b)=>{const _=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(_,{class:"w-full",modelValue:e.unref(C),"onUpdate:modelValue":b[1]||(b[1]=h=>e.isRef(C)?C.value=h:null),options:e.unref(f),multiple:k.multiple,disabled:e.unref(x),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(x),onRefresh:b[0]||(b[0]=h=>e.unref(d)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),J=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:V,emit:w}){const y=w,x={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}},C={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:t,requesting:m,executing:b,open:_,modify:h,submit:B,closed:U}=l.useForm(y,x,E);return V({openOrModify:s=>{s?h({id:s}):_()}}),(s,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-col"),N=e.resolveComponent("el-input-number"),T=e.resolveComponent("el-row"),c=e.resolveComponent("el-input"),g=e.resolveComponent("el-switch"),A=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(f),"onUpdate:modelValue":r[17]||(r[17]=i=>e.isRef(f)?f.value=i:null),title:e.unref(a)(),width:"1000px",executing:e.unref(b),onClosed:e.unref(U),onSubmit:e.unref(B)},{default:e.withCtx(()=>[e.createVNode(A,{ref_key:"form",ref:d,model:e.unref(t),"label-width":"auto",rules:C,disabled:e.unref(m)||e.unref(b)},{default:e.withCtx(()=>[e.createVNode(T,{gutter:20},{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(T,{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(H,{modelValue:e.unref(t).menu_id,"onUpdate:modelValue":r[0]||(r[0]=i=>e.unref(t).menu_id=i)},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(N,{class:"w-full",modelValue:e.unref(t).sort,"onUpdate:modelValue":r[1]||(r[1]=i=>e.unref(t).sort=i),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(c,{modelValue:e.unref(t).module,"onUpdate:modelValue":r[2]||(r[2]=i=>e.unref(t).module=i),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(c,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[3]||(r[3]=i=>e.unref(t).name=i),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(c,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[4]||(r[4]=i=>e.unref(t).en_name=i),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(c,{modelValue:e.unref(t).component,"onUpdate:modelValue":r[5]||(r[5]=i=>e.unref(t).component=i),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(c,{modelValue:e.unref(t).url,"onUpdate:modelValue":r[6]||(r[6]=i=>e.unref(t).url=i),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(c,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[7]||(r[7]=i=>e.unref(t).remark=i),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(c,{modelValue:e.unref(t).icon,"onUpdate:modelValue":r[8]||(r[8]=i=>e.unref(t).icon=i),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:r[9]||(r[9]=i=>{e.unref(t).meta.icon=i})},{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(c,{modelValue:e.unref(t).meta.title,"onUpdate:modelValue":r[10]||(r[10]=i=>e.unref(t).meta.title=i),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(c,{modelValue:e.unref(t).meta.active,"onUpdate:modelValue":r[11]||(r[11]=i=>e.unref(t).meta.active=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(T,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(g,{modelValue:e.unref(t).meta.link,"onUpdate:modelValue":r[12]||(r[12]=i=>e.unref(t).meta.link=i)},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(g,{modelValue:e.unref(t).meta.keep_alive,"onUpdate:modelValue":r[13]||(r[13]=i=>e.unref(t).meta.keep_alive=i)},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(g,{modelValue:e.unref(t).meta.hide,"onUpdate:modelValue":r[14]||(r[14]=i=>e.unref(t).meta.hide=i)},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(g,{modelValue:e.unref(t).meta.full,"onUpdate:modelValue":r[15]||(r[15]=i=>e.unref(t).meta.full=i)},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(g,{modelValue:e.unref(t).meta.affix,"onUpdate:modelValue":r[16]||(r[16]=i=>e.unref(t).meta.affix=i)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),Q=e.defineComponent({__name:"menuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(k,{emit:V}){const w=V,y=k,{requesting:x}=l.useLoading(E),{value:C,options:f,change:a,refresh:d,filterOptions:t}=l.useSelect(e.toRef(y,"modelValue"),w,{key:"MENU_LIST",api:E,isArray:!0});return(m,b)=>{const _=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(_,{class:"w-full",modelValue:e.unref(C),"onUpdate:modelValue":b[1]||(b[1]=h=>e.isRef(C)?C.value=h:null),options:e.unref(f),multiple:k.multiple,disabled:e.unref(x),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(x),onRefresh:b[0]||(b[0]=h=>e.unref(d)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),X=e.defineComponent({__name:"rule",emits:["refresh"],setup(k,{expose:V,emit:w}){const y=w,x={key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""},C={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:t,requesting:m,executing:b,open:_,modify:h,submit:B,closed:U}=l.useForm(y,x,F);return V({openOrModify:s=>{s?h({key:s}):_()}}),(s,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input-number"),N=e.resolveComponent("el-input"),T=e.resolveComponent("el-col"),c=e.resolveComponent("el-row"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(f),"onUpdate:modelValue":r[6]||(r[6]=A=>e.isRef(f)?f.value=A:null),title:e.unref(a)("base.rules"),width:"1000px",executing:e.unref(b),onClosed:e.unref(U),onSubmit:e.unref(B)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:d,model:e.unref(t),"label-width":"auto",rules:C,disabled:e.unref(m)||e.unref(b)},{default:e.withCtx(()=>[e.createVNode(c,{gutter:20},{default:e.withCtx(()=>[e.createVNode(T,{span:10},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(Q,{modelValue:e.unref(t).menu_id,"onUpdate:modelValue":r[0]||(r[0]=A=>e.unref(t).menu_id=A)},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]=A=>e.unref(t).sort=A),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(N,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[2]||(r[2]=A=>e.unref(t).name=A),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(N,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[3]||(r[3]=A=>e.unref(t).en_name=A),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(N,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[4]||(r[4]=A=>e.unref(t).remark=A),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(T,{span:14},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(t).urls,"onUpdate:modelValue":r[5]||(r[5]=A=>e.unref(t).urls=A),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(k){return typeof k=="function"||Object.prototype.toString.call(k)==="[object Object]"&&!e.isVNode(k)}const $=e.defineComponent({__name:"index",setup(k){const V={keyword:"",status:0},w=e.ref(""),y=[{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",width:200},{label:l.Translate("menu.component"),prop:"component",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:w.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:()=>U(o.key),onClose:()=>w.value=o.key},{default:()=>[o.translate]}),default:()=>{let n,N;return e.createVNode("div",null,[e.createVNode("p",null,null),e.createVNode("p",null,[`${l.Translate("base.confirm base.delete base.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:()=>w.value=""},K(n=l.Translate("base.cancel"))?n:{default:()=>[n]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>p(o.key)},K(N=l.Translate("base.confirm"))?N:{default:()=>[N]})])])}}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:E.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:()=>_(s.id)},null)}],{requesting:x}=l.useLoading(E),{tableRef:C,infoRef:f,keyword:a,search:d,refresh:t,reset:m,openInfo:b,modifyInfo:_}=l.useTablePage(V),{infoRef:h,openInfo:B,modifyInfo:U}=l.useTablePage(),p=s=>{F[l.DEFAULT_REMOVE_KEY]({key:s}).then(()=>{w.value="",t()})};return(s,r)=>{const o=e.resolveComponent("el-button"),n=e.resolveComponent("el-input"),N=e.resolveComponent("el-radio-button"),T=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-space"),g=e.resolveComponent("el-page-header"),A=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(A,{class:"basic-card flex-full","body-class":"flex-1",onClick:r[2]||(r[2]=()=>w.value="")},{header:e.withCtx(()=>[e.createVNode(g,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(x),onRefresh:e.unref(t)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(b)},null,8,["onOpen"]),e.createVNode(o,{circle:"",onClick:e.unref(B),icon:e.unref(W)},null,8,["onClick","icon"])]),content:e.withCtx(()=>[e.createVNode(c,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(n,{class:"basic-search-input",modelValue:e.unref(a).keyword,"onUpdate:modelValue":r[0]||(r[0]=i=>e.unref(a).keyword=i),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(d),["enter"]),onClear:e.unref(d)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(T,{modelValue:e.unref(a).status,"onUpdate:modelValue":r[1]||(r[1]=i=>e.unref(a).status=i),onChange:e.unref(d)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],i=>e.createVNode(N,{key:i,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${i}`),value:i},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(x),onSearch:e.unref(d)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:C,size:"small",columns:y,url:e.unref(E).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),autoSearch:""},null,8,["url","search-param"]),e.createVNode(J,{ref_key:"infoRef",ref:f,onRefresh:e.unref(m)},null,8,["onRefresh"]),e.createVNode(X,{ref_key:"ruleRef",ref:h,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),Z=Object.freeze(Object.defineProperty({__proto__:null,default:$},Symbol.toStringTag,{value:"Module"})),M={class:"rule-check"},v={style:{width:"80px","line-height":"36px"}},ee=e.defineComponent({__name:"rulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(k,{expose:V,emit:w}){const{requesting:y}=l.useLoading(E),x=k,C=w,f=e.ref(!1),a=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:d,refresh:t}=l.useSelect(e.toRef(x,"modelValue"),C,{key:"RULE_CHECK",api:E,url:E.urls.rules,isArray:!0},!1);function m(){d.value.forEach(p=>{var s;(s=p.rules)!=null&&s.length&&(a.MenuAll[p.id]=!1,a.MenuIndeterminate[p.id]=!1,a.MenuList[p.id]=[])})}function b(p){d.value.forEach(s=>{var r;(r=s.rules)!=null&&r.length&&(a.MenuList[s.id]=p?s.rules.map(o=>o.key):[])}),h()}function _(p,s){const r=d.value.find(o=>o.id===s);a.MenuList[s]=p&&r?r.rules.map(o=>o.key):[],h()}function h(){d.value.forEach(p=>{var o,n;const s=((o=p.rules)==null?void 0:o.length)||0,r=((n=a.MenuList[p.id])==null?void 0:n.length)||0;a.MenuAll[p.id]=r===s&&s>0,a.MenuIndeterminate[p.id]=r>0&&r<s}),a.checkAll=Object.values(a.MenuAll).every(Boolean),a.indeterminate=!a.checkAll&&Object.values(a.MenuList).some(p=>p.length>0),C("update:modelValue",Object.values(a.MenuList).flat())}function B(){a.checkAll=!1,a.indeterminate=!1,a.MenuAll={},a.MenuList={},a.MenuIndeterminate={},m(),C("update:modelValue",[]),f.value=!1}function U(p){var s;if(Array.isArray(d.value)&&d.value.length>0){for(let r of d.value)if(Array.isArray(r.rules)&&r.rules.length>0)for(let o of r.rules)p.some(n=>n===o.key)&&(a.MenuList[r.id]=(((s=a.MenuList)==null?void 0:s[r.id])||[]).concat([o.key]));h(),f.value=!0}}return e.onMounted(async()=>{var p;(p=d.value)!=null&&p.length||await t(),!f.value&&x.modelValue&&U(x.modelValue)}),e.watch(()=>x.modelValue,p=>{e.nextTick(()=>{var s;f.value||!((s=d.value)!=null&&s.length)||p&&p.length>0&&U(p)})},{deep:!0,immediate:!0}),V({generateOption:U,cleanChecked:B}),(p,s)=>{const r=e.resolveComponent("el-checkbox"),o=e.resolveComponent("el-space"),n=e.resolveComponent("el-text"),N=e.resolveComponent("el-divider"),T=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",M,[e.createVNode(o,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(r,{"model-value":a.checkAll,indeterminate:a.indeterminate,id:"all",disabled:k.disabled,onChange:b},{default:e.withCtx(()=>s[1]||(s[1]=[e.createElementVNode("span",null,"全选",-1)])),_:1,__:[1]},8,["model-value","indeterminate","disabled"]),e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(y),text:"",size:"small",onRefresh:s[0]||(s[0]=c=>e.unref(t)(!0))},null,8,["loading"])]),_:1}),e.createVNode(o,{direction:"vertical",alignment:"start"},{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(o,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(r,{style:{"min-width":"150px"},"model-value":a.MenuAll[c.id],disabled:k.disabled||!c.rules||c.rules.length<=0,indeterminate:a.MenuIndeterminate[c.id],onChange:g=>_(g,c.id)},{default:e.withCtx(()=>[e.createVNode(n,{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(N,{direction:"vertical"}),c.rules?(e.openBlock(),e.createBlock(T,{key:0,modelValue:a.MenuList[c.id],"onUpdate:modelValue":g=>a.MenuList[c.id]=g,disabled:k.disabled,style:{margin:"auto"},onChange:h},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.rules,g=>(e.openBlock(),e.createBlock(r,{key:g.key,value:g.key},{default:e.withCtx(()=>[e.createElementVNode("div",v,e.toDisplayString(g.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),le=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:V,emit:w}){const y=w,x=e.ref(),C={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:t,formData:m,requesting:b,executing:_,open:h,modify:B,submit:U,closed:p}=l.useForm(y,C,L),s=o=>{o?B({key:o}):h()},r=()=>{var o;(o=x.value)==null||o.cleanChecked(),p()};return V({openOrModify:s}),(o,n)=>{const N=e.resolveComponent("el-input"),T=e.resolveComponent("el-form-item"),c=e.resolveComponent("el-col"),g=e.resolveComponent("el-input-number"),A=e.resolveComponent("el-row"),i=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(a),"onUpdate:modelValue":n[6]||(n[6]=S=>e.isRef(a)?a.value=S:null),title:e.unref(d)(),width:"1000px",executing:e.unref(_),onClosed:r,onSubmit:e.unref(U)},{default:e.withCtx(()=>[e.createVNode(i,{ref_key:"form",ref:t,model:e.unref(m),"label-width":"auto",rules:f,disabled:e.unref(b)||e.unref(_)},{default:e.withCtx(()=>[e.createVNode(A,{gutter:20},{default:e.withCtx(()=>[e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(T,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(m).module,"onUpdate:modelValue":n[0]||(n[0]=S=>e.unref(m).module=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(T,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(g,{class:"w-full",modelValue:e.unref(m).sort,"onUpdate:modelValue":n[1]||(n[1]=S=>e.unref(m).sort=S),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(T,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(m).name,"onUpdate:modelValue":n[2]||(n[2]=S=>e.unref(m).name=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(T,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(m).en_name,"onUpdate:modelValue":n[3]||(n[3]=S=>e.unref(m).en_name=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(T,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(m).remark,"onUpdate:modelValue":n[4]||(n[4]=S=>e.unref(m).remark=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(T,{label:e.unref(l.Translate)("base.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(ee,{ref_key:"rulesCheck",ref:x,modelValue:e.unref(m).rules,"onUpdate:modelValue":n[5]||(n[5]=S=>e.unref(m).rules=S),disabled:e.unref(b)||e.unref(_)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onSubmit"])}}}),I=e.defineComponent({__name:"index",setup(k){const V={keyword:""},w=[{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:_})=>e.createVNode(l.ModifyButton,{onModify:()=>b(_.key)},null)}],{requesting:y}=l.useLoading(L),{tableRef:x,infoRef:C,keyword:f,search:a,refresh:d,reset:t,openInfo:m,modifyInfo:b}=l.useTablePage(V);return(_,h)=>{const B=e.resolveComponent("el-input"),U=e.resolveComponent("el-space"),p=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(p,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(y),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(m)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(U,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(B,{class:"basic-search-input",modelValue:e.unref(f).keyword,"onUpdate:modelValue":h[0]||(h[0]=r=>e.unref(f).keyword=r),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(a),["enter"]),onClear:e.unref(a)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(y),onSearch:e.unref(a)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:x,size:"small",columns:w,url:e.unref(L).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(f),autoSearch:""},null,8,["url","search-param"]),e.createVNode(le,{ref_key:"infoRef",ref:C,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),re=Object.freeze(Object.defineProperty({__proto__:null,default:I},Symbol.toStringTag,{value:"Module"})),te={install:(k,V)=>{Reflect.ownKeys(k._context.provides).some(w=>String(w)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.log(Reflect.ownKeys(k._context.provides))},version:"__VERSION__"},ne=Object.assign({"./views/admin/index.vue":z,"./views/language/index.vue":Y,"./views/menu/index.vue":Z,"./views/role/index.vue":re});u.MenusPage=$,u.RolesPage=I,u.basicModules=ne,u.default=te,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
1
|
+
(function(u,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):(u=typeof globalThis<"u"?globalThis:u||self,e(u.AutoVueBasic={},u.Vue,u["auto-vue-manual"]))})(this,function(u,e,l){"use strict";const q=l.createAutoApi("admin",{},"key"),L=l.createAutoApi("role",{},"key"),P=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:V,emit:w}){const y=w,x={key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]},{modal:C,title:f,form:a,formData:d,requesting:t,executing:m,open:b,modify:_,submit:h,closed:B}=l.useForm(y,x,q),U={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 base.roles"),trigger:"change"}]},p=e.ref([]),s=async()=>{const o=await L.list();p.value=Array.isArray(o==null?void 0:o.data)?o.data:[]};return V({openOrModify:async o=>{p.value.length||await s(),o?_({key:o}):b()}}),(o,n)=>{const N=e.resolveComponent("el-input"),T=e.resolveComponent("el-form-item"),c=e.resolveComponent("el-radio-button"),g=e.resolveComponent("el-radio-group"),A=e.resolveComponent("el-checkbox"),i=e.resolveComponent("el-checkbox-group"),S=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(C),"onUpdate:modelValue":n[7]||(n[7]=R=>e.isRef(C)?C.value=R:null),title:e.unref(f)(),width:"600px",executing:e.unref(m),onClosed:e.unref(B),onSubmit:e.unref(h)},{default:e.withCtx(()=>[e.createVNode(S,{ref_key:"form",ref:a,model:e.unref(d),"label-width":"auto",rules:U,disabled:e.unref(t)||e.unref(m)},{default:e.withCtx(()=>[e.createVNode(T,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(d).username,"onUpdate:modelValue":n[0]||(n[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(T,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(d).phone,"onUpdate:modelValue":n[1]||(n[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(T,{label:e.unref(l.Translate)("base.password"),prop:"password",required:!e.unref(d).key},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(d).password,"onUpdate:modelValue":n[2]||(n[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(T,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(d).email,"onUpdate:modelValue":n[3]||(n[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(T,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(d).language,"onUpdate:modelValue":n[4]||(n[4]=R=>e.unref(d).language=R)},{default:e.withCtx(()=>[e.createVNode(c,{value:"zh-CN"},{default:e.withCtx(()=>n[8]||(n[8]=[e.createTextVNode("zh-CN")])),_:1,__:[8]}),e.createVNode(c,{value:"en-US"},{default:e.withCtx(()=>n[9]||(n[9]=[e.createTextVNode("en-US")])),_:1,__:[9]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(T,{label:e.unref(l.Translate)("base.roles"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(d).roles,"onUpdate:modelValue":n[5]||(n[5]=R=>e.unref(d).roles=R)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,R=>(e.openBlock(),e.createBlock(A,{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(T,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(d).remark,"onUpdate:modelValue":n[6]||(n[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"])}}}),z=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(k){const V={keyword:""},w=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:_})=>e.createVNode(e.resolveComponent("el-avatar"),{size:"default",src:_.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:_})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[_.username]),e.createVNode("div",null,[_.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:_})=>e.createVNode(l.ModifyButton,{onModify:()=>b(_.key)},null)}],{requesting:y}=l.useLoading(q),{tableRef:x,infoRef:C,keyword:f,search:a,refresh:d,reset:t,openInfo:m,modifyInfo:b}=l.useTablePage(V);return(_,h)=>{const B=e.resolveComponent("el-input"),U=e.resolveComponent("el-space"),p=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(p,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(y),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(m)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(U,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(B,{class:"basic-search-input",modelValue:e.unref(f).keyword,"onUpdate:modelValue":h[0]||(h[0]=r=>e.unref(f).keyword=r),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(a),["enter"]),onClear:e.unref(a)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(y),onSearch:e.unref(a)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:x,size:"small",columns:w,url:e.unref(q).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(f),autoSearch:""},null,8,["url","search-param"]),e.createVNode(P,{ref_key:"infoRef",ref:C,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),O=l.createAutoApi("translate",{},"key"),j=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:V,emit:w}){const y=w,x={id:0,key:"",module:"",language:"",result:"",remark:""},C={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:t,requesting:m,executing:b,open:_,modify:h,submit:B,closed:U}=l.useForm(y,x,O);return V({openOrModify:s=>{s?h({id:s}):_()}}),(s,r)=>{const o=e.resolveComponent("el-input"),n=e.resolveComponent("el-form-item"),N=e.resolveComponent("el-radio-button"),T=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(f),"onUpdate:modelValue":r[5]||(r[5]=g=>e.isRef(f)?f.value=g:null),title:e.unref(a)(),width:"600px",executing:e.unref(b),onClosed:e.unref(U),onSubmit:e.unref(B)},{default:e.withCtx(()=>[e.createVNode(c,{ref_key:"form",ref:d,model:e.unref(t),"label-width":"auto",rules:C,disabled:e.unref(m)||e.unref(b)},{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]=g=>e.unref(t).module=g),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]=g=>e.unref(t).key=g),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(T,{modelValue:e.unref(t).language,"onUpdate:modelValue":r[2]||(r[2]=g=>e.unref(t).language=g)},{default:e.withCtx(()=>[e.createVNode(N,{label:"zh-CN"},{default:e.withCtx(()=>r[6]||(r[6]=[e.createTextVNode("zh-CN")])),_:1,__:[6]}),e.createVNode(N,{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]=g=>e.unref(t).result=g),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]=g=>e.unref(t).remark=g),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"])}}}),Y=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(k){const V={keyword:"",status:0},w=[{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:O.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:_})=>e.createVNode(l.ModifyButton,{onModify:()=>b(_.id)},null)}],{requesting:y}=l.useLoading(O),{tableRef:x,infoRef:C,keyword:f,search:a,refresh:d,reset:t,openInfo:m,modifyInfo:b}=l.useTablePage(V);return(_,h)=>{const B=e.resolveComponent("el-input"),U=e.resolveComponent("el-radio-button"),p=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(y),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(m)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(s,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(B,{class:"basic-search-input",modelValue:e.unref(f).keyword,"onUpdate:modelValue":h[0]||(h[0]=n=>e.unref(f).keyword=n),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(a),["enter"]),onClear:e.unref(a)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(p,{modelValue:e.unref(f).status,"onUpdate:modelValue":h[1]||(h[1]=n=>e.unref(f).status=n),onChange:e.unref(a)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],n=>e.createVNode(U,{key:n,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${n}`),value:n},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(y),onSearch:e.unref(a)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:x,size:"small",columns:w,url:e.unref(O).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(f),autoSearch:""},null,8,["url","search-param"]),e.createVNode(j,{ref_key:"infoRef",ref:C,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),D={tops:"tops",rules:"rules"},E=l.AutoApiUtils.createAutoApi("menu",D,"id",Object.keys(D),[],["TOP_MENU_LIST","MENU_LIST"]),F=l.createAutoApi("rule",{},"key");/*! Element Plus Icons Vue v2.3.1 */var G=e.defineComponent({name:"Key",__name:"key",setup(k){return(V,w)=>(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"})]))}}),W=G;const H=e.defineComponent({__name:"topMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(k,{emit:V}){const w=V,y=k,{requesting:x}=l.useLoading(E),{value:C,options:f,change:a,refresh:d,filterOptions:t}=l.useSelect(e.toRef(y,"modelValue"),w,{key:"TOP_MENU_LIST",api:E,url:E.urls.tops,isArray:!0});return(m,b)=>{const _=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(_,{class:"w-full",modelValue:e.unref(C),"onUpdate:modelValue":b[1]||(b[1]=h=>e.isRef(C)?C.value=h:null),options:e.unref(f),multiple:k.multiple,disabled:e.unref(x),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(x),onRefresh:b[0]||(b[0]=h=>e.unref(d)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),J=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:V,emit:w}){const y=w,x={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}},C={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:t,requesting:m,executing:b,open:_,modify:h,submit:B,closed:U}=l.useForm(y,x,E);return V({openOrModify:s=>{s?h({id:s}):_()}}),(s,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-col"),N=e.resolveComponent("el-input-number"),T=e.resolveComponent("el-row"),c=e.resolveComponent("el-input"),g=e.resolveComponent("el-switch"),A=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(f),"onUpdate:modelValue":r[17]||(r[17]=i=>e.isRef(f)?f.value=i:null),title:e.unref(a)(),width:"1000px",executing:e.unref(b),onClosed:e.unref(U),onSubmit:e.unref(B)},{default:e.withCtx(()=>[e.createVNode(A,{ref_key:"form",ref:d,model:e.unref(t),"label-width":"auto",rules:C,disabled:e.unref(m)||e.unref(b)},{default:e.withCtx(()=>[e.createVNode(T,{gutter:20},{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(T,{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(H,{modelValue:e.unref(t).menu_id,"onUpdate:modelValue":r[0]||(r[0]=i=>e.unref(t).menu_id=i)},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(N,{class:"w-full",modelValue:e.unref(t).sort,"onUpdate:modelValue":r[1]||(r[1]=i=>e.unref(t).sort=i),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(c,{modelValue:e.unref(t).module,"onUpdate:modelValue":r[2]||(r[2]=i=>e.unref(t).module=i),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(c,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[3]||(r[3]=i=>e.unref(t).name=i),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(c,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[4]||(r[4]=i=>e.unref(t).en_name=i),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(c,{modelValue:e.unref(t).component,"onUpdate:modelValue":r[5]||(r[5]=i=>e.unref(t).component=i),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(c,{modelValue:e.unref(t).url,"onUpdate:modelValue":r[6]||(r[6]=i=>e.unref(t).url=i),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(c,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[7]||(r[7]=i=>e.unref(t).remark=i),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(c,{modelValue:e.unref(t).icon,"onUpdate:modelValue":r[8]||(r[8]=i=>e.unref(t).icon=i),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:r[9]||(r[9]=i=>{e.unref(t).meta.icon=i})},{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(c,{modelValue:e.unref(t).meta.title,"onUpdate:modelValue":r[10]||(r[10]=i=>e.unref(t).meta.title=i),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(c,{modelValue:e.unref(t).meta.active,"onUpdate:modelValue":r[11]||(r[11]=i=>e.unref(t).meta.active=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(T,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(g,{modelValue:e.unref(t).meta.link,"onUpdate:modelValue":r[12]||(r[12]=i=>e.unref(t).meta.link=i)},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(g,{modelValue:e.unref(t).meta.keep_alive,"onUpdate:modelValue":r[13]||(r[13]=i=>e.unref(t).meta.keep_alive=i)},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(g,{modelValue:e.unref(t).meta.hide,"onUpdate:modelValue":r[14]||(r[14]=i=>e.unref(t).meta.hide=i)},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(g,{modelValue:e.unref(t).meta.full,"onUpdate:modelValue":r[15]||(r[15]=i=>e.unref(t).meta.full=i)},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(g,{modelValue:e.unref(t).meta.affix,"onUpdate:modelValue":r[16]||(r[16]=i=>e.unref(t).meta.affix=i)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),Q=e.defineComponent({__name:"menuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(k,{emit:V}){const w=V,y=k,{requesting:x}=l.useLoading(E),{value:C,options:f,change:a,refresh:d,filterOptions:t}=l.useSelect(e.toRef(y,"modelValue"),w,{key:"MENU_LIST",api:E,isArray:!0});return(m,b)=>{const _=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(_,{class:"w-full",modelValue:e.unref(C),"onUpdate:modelValue":b[1]||(b[1]=h=>e.isRef(C)?C.value=h:null),options:e.unref(f),multiple:k.multiple,disabled:e.unref(x),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(x),onRefresh:b[0]||(b[0]=h=>e.unref(d)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),X=e.defineComponent({__name:"rule",emits:["refresh"],setup(k,{expose:V,emit:w}){const y=w,x={key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""},C={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:t,requesting:m,executing:b,open:_,modify:h,submit:B,closed:U}=l.useForm(y,x,F);return V({openOrModify:s=>{s?h({key:s}):_()}}),(s,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input-number"),N=e.resolveComponent("el-input"),T=e.resolveComponent("el-col"),c=e.resolveComponent("el-row"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(f),"onUpdate:modelValue":r[6]||(r[6]=A=>e.isRef(f)?f.value=A:null),title:e.unref(a)("base.rules"),width:"1000px",executing:e.unref(b),onClosed:e.unref(U),onSubmit:e.unref(B)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:d,model:e.unref(t),"label-width":"auto",rules:C,disabled:e.unref(m)||e.unref(b)},{default:e.withCtx(()=>[e.createVNode(c,{gutter:20},{default:e.withCtx(()=>[e.createVNode(T,{span:10},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(Q,{modelValue:e.unref(t).menu_id,"onUpdate:modelValue":r[0]||(r[0]=A=>e.unref(t).menu_id=A)},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]=A=>e.unref(t).sort=A),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(N,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[2]||(r[2]=A=>e.unref(t).name=A),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(N,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[3]||(r[3]=A=>e.unref(t).en_name=A),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(N,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[4]||(r[4]=A=>e.unref(t).remark=A),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(T,{span:14},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(t).urls,"onUpdate:modelValue":r[5]||(r[5]=A=>e.unref(t).urls=A),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(k){return typeof k=="function"||Object.prototype.toString.call(k)==="[object Object]"&&!e.isVNode(k)}const $=e.defineComponent({__name:"index",setup(k){const V={keyword:"",status:0},w=e.ref(""),y=[{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:w.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:()=>U(o.key),onClose:()=>w.value=o.key},{default:()=>[o.translate]}),default:()=>{let n,N;return e.createVNode("div",null,[e.createVNode("p",null,null),e.createVNode("p",null,[`${l.Translate("base.confirm base.delete base.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:()=>w.value=""},K(n=l.Translate("base.cancel"))?n:{default:()=>[n]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>p(o.key)},K(N=l.Translate("base.confirm"))?N:{default:()=>[N]})])])}}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:E.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:()=>_(s.id)},null)}],{requesting:x}=l.useLoading(E),{tableRef:C,infoRef:f,keyword:a,search:d,refresh:t,reset:m,openInfo:b,modifyInfo:_}=l.useTablePage(V),{infoRef:h,openInfo:B,modifyInfo:U}=l.useTablePage(),p=s=>{F[l.DEFAULT_REMOVE_KEY]({key:s}).then(()=>{w.value="",t()})};return(s,r)=>{const o=e.resolveComponent("el-button"),n=e.resolveComponent("el-input"),N=e.resolveComponent("el-radio-button"),T=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-space"),g=e.resolveComponent("el-page-header"),A=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(A,{class:"basic-card flex-full","body-class":"flex-1",onClick:r[2]||(r[2]=()=>w.value="")},{header:e.withCtx(()=>[e.createVNode(g,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(x),onRefresh:e.unref(t)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(b)},null,8,["onOpen"]),e.createVNode(o,{circle:"",onClick:e.unref(B),icon:e.unref(W)},null,8,["onClick","icon"])]),content:e.withCtx(()=>[e.createVNode(c,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(n,{class:"basic-search-input",modelValue:e.unref(a).keyword,"onUpdate:modelValue":r[0]||(r[0]=i=>e.unref(a).keyword=i),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(d),["enter"]),onClear:e.unref(d)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(T,{modelValue:e.unref(a).status,"onUpdate:modelValue":r[1]||(r[1]=i=>e.unref(a).status=i),onChange:e.unref(d)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],i=>e.createVNode(N,{key:i,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${i}`),value:i},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(x),onSearch:e.unref(d)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:C,size:"small",columns:y,url:e.unref(E).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),autoSearch:""},null,8,["url","search-param"]),e.createVNode(J,{ref_key:"infoRef",ref:f,onRefresh:e.unref(m)},null,8,["onRefresh"]),e.createVNode(X,{ref_key:"ruleRef",ref:h,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),Z=Object.freeze(Object.defineProperty({__proto__:null,default:$},Symbol.toStringTag,{value:"Module"})),M={class:"rule-check"},v={style:{width:"80px","line-height":"36px"}},ee=e.defineComponent({__name:"rulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(k,{expose:V,emit:w}){const{requesting:y}=l.useLoading(E),x=k,C=w,f=e.ref(!1),a=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:d,refresh:t}=l.useSelect(e.toRef(x,"modelValue"),C,{key:"RULE_CHECK",api:E,url:E.urls.rules,isArray:!0},!1);function m(){d.value.forEach(p=>{var s;(s=p.rules)!=null&&s.length&&(a.MenuAll[p.id]=!1,a.MenuIndeterminate[p.id]=!1,a.MenuList[p.id]=[])})}function b(p){d.value.forEach(s=>{var r;(r=s.rules)!=null&&r.length&&(a.MenuList[s.id]=p?s.rules.map(o=>o.key):[])}),h()}function _(p,s){const r=d.value.find(o=>o.id===s);a.MenuList[s]=p&&r?r.rules.map(o=>o.key):[],h()}function h(){d.value.forEach(p=>{var o,n;const s=((o=p.rules)==null?void 0:o.length)||0,r=((n=a.MenuList[p.id])==null?void 0:n.length)||0;a.MenuAll[p.id]=r===s&&s>0,a.MenuIndeterminate[p.id]=r>0&&r<s}),a.checkAll=Object.values(a.MenuAll).every(Boolean),a.indeterminate=!a.checkAll&&Object.values(a.MenuList).some(p=>p.length>0),C("update:modelValue",Object.values(a.MenuList).flat())}function B(){a.checkAll=!1,a.indeterminate=!1,a.MenuAll={},a.MenuList={},a.MenuIndeterminate={},m(),C("update:modelValue",[]),f.value=!1}function U(p){var s;if(Array.isArray(d.value)&&d.value.length>0){for(let r of d.value)if(Array.isArray(r.rules)&&r.rules.length>0)for(let o of r.rules)p.some(n=>n===o.key)&&(a.MenuList[r.id]=(((s=a.MenuList)==null?void 0:s[r.id])||[]).concat([o.key]));h(),f.value=!0}}return e.onMounted(async()=>{var p;(p=d.value)!=null&&p.length||await t(),!f.value&&x.modelValue&&U(x.modelValue)}),e.watch(()=>x.modelValue,p=>{e.nextTick(()=>{var s;f.value||!((s=d.value)!=null&&s.length)||p&&p.length>0&&U(p)})},{deep:!0,immediate:!0}),V({generateOption:U,cleanChecked:B}),(p,s)=>{const r=e.resolveComponent("el-checkbox"),o=e.resolveComponent("el-space"),n=e.resolveComponent("el-text"),N=e.resolveComponent("el-divider"),T=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",M,[e.createVNode(o,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(r,{"model-value":a.checkAll,indeterminate:a.indeterminate,id:"all",disabled:k.disabled,onChange:b},{default:e.withCtx(()=>s[1]||(s[1]=[e.createElementVNode("span",null,"全选",-1)])),_:1,__:[1]},8,["model-value","indeterminate","disabled"]),e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(y),text:"",size:"small",onRefresh:s[0]||(s[0]=c=>e.unref(t)(!0))},null,8,["loading"])]),_:1}),e.createVNode(o,{direction:"vertical",alignment:"start"},{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(o,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(r,{style:{"min-width":"150px"},"model-value":a.MenuAll[c.id],disabled:k.disabled||!c.rules||c.rules.length<=0,indeterminate:a.MenuIndeterminate[c.id],onChange:g=>_(g,c.id)},{default:e.withCtx(()=>[e.createVNode(n,{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(N,{direction:"vertical"}),c.rules?(e.openBlock(),e.createBlock(T,{key:0,modelValue:a.MenuList[c.id],"onUpdate:modelValue":g=>a.MenuList[c.id]=g,disabled:k.disabled,style:{margin:"auto"},onChange:h},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.rules,g=>(e.openBlock(),e.createBlock(r,{key:g.key,value:g.key},{default:e.withCtx(()=>[e.createElementVNode("div",v,e.toDisplayString(g.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),le=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:V,emit:w}){const y=w,x=e.ref(),C={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:t,formData:m,requesting:b,executing:_,open:h,modify:B,submit:U,closed:p}=l.useForm(y,C,L),s=o=>{o?B({key:o}):h()},r=()=>{var o;(o=x.value)==null||o.cleanChecked(),p()};return V({openOrModify:s}),(o,n)=>{const N=e.resolveComponent("el-input"),T=e.resolveComponent("el-form-item"),c=e.resolveComponent("el-col"),g=e.resolveComponent("el-input-number"),A=e.resolveComponent("el-row"),i=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(a),"onUpdate:modelValue":n[6]||(n[6]=S=>e.isRef(a)?a.value=S:null),title:e.unref(d)(),width:"1000px",executing:e.unref(_),onClosed:r,onSubmit:e.unref(U)},{default:e.withCtx(()=>[e.createVNode(i,{ref_key:"form",ref:t,model:e.unref(m),"label-width":"auto",rules:f,disabled:e.unref(b)||e.unref(_)},{default:e.withCtx(()=>[e.createVNode(A,{gutter:20},{default:e.withCtx(()=>[e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(T,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(m).module,"onUpdate:modelValue":n[0]||(n[0]=S=>e.unref(m).module=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(T,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(g,{class:"w-full",modelValue:e.unref(m).sort,"onUpdate:modelValue":n[1]||(n[1]=S=>e.unref(m).sort=S),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(T,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(m).name,"onUpdate:modelValue":n[2]||(n[2]=S=>e.unref(m).name=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(T,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(m).en_name,"onUpdate:modelValue":n[3]||(n[3]=S=>e.unref(m).en_name=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(T,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:e.unref(m).remark,"onUpdate:modelValue":n[4]||(n[4]=S=>e.unref(m).remark=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(T,{label:e.unref(l.Translate)("base.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(ee,{ref_key:"rulesCheck",ref:x,modelValue:e.unref(m).rules,"onUpdate:modelValue":n[5]||(n[5]=S=>e.unref(m).rules=S),disabled:e.unref(b)||e.unref(_)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onSubmit"])}}}),I=e.defineComponent({__name:"index",setup(k){const V={keyword:""},w=[{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:_})=>e.createVNode(l.ModifyButton,{onModify:()=>b(_.key)},null)}],{requesting:y}=l.useLoading(L),{tableRef:x,infoRef:C,keyword:f,search:a,refresh:d,reset:t,openInfo:m,modifyInfo:b}=l.useTablePage(V);return(_,h)=>{const B=e.resolveComponent("el-input"),U=e.resolveComponent("el-space"),p=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(p,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(y),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(m)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(U,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(B,{class:"basic-search-input",modelValue:e.unref(f).keyword,"onUpdate:modelValue":h[0]||(h[0]=r=>e.unref(f).keyword=r),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(a),["enter"]),onClear:e.unref(a)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(y),onSearch:e.unref(a)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:x,size:"small",columns:w,url:e.unref(L).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(f),autoSearch:""},null,8,["url","search-param"]),e.createVNode(le,{ref_key:"infoRef",ref:C,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),re=Object.freeze(Object.defineProperty({__proto__:null,default:I},Symbol.toStringTag,{value:"Module"})),te={install:(k,V)=>{Reflect.ownKeys(k._context.provides).some(w=>String(w)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.log(Reflect.ownKeys(k._context.provides))},version:"__VERSION__"},ne=Object.assign({"./views/admin/index.vue":z,"./views/language/index.vue":Y,"./views/menu/index.vue":Z,"./views/role/index.vue":re});u.MenusPage=$,u.RolesPage=I,u.basicModules=ne,u.default=te,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/version.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const __VERSION__ = "0.0.
|
1
|
+
export const __VERSION__ = "0.0.37'
|