cc1-admin-front 1.0.6 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +5 -1
  2. package/dist/apis/auth/ApiAuthPermission.d.ts +4 -0
  3. package/dist/apis/auth/ApiAuthRole.d.ts +4 -6
  4. package/dist/apis/auth/ApiAuthSession.d.ts +4 -0
  5. package/dist/apis/auth/ApiAuthUser.d.ts +2 -0
  6. package/dist/cc1-admin-front.css +1 -1
  7. package/dist/cc1-admin-front.js +25 -959
  8. package/dist/cc1-admin-front.umd.cjs +1 -1
  9. package/dist/{index-CatA5C4N.js → index-BHBDmhpM.js} +19 -15
  10. package/dist/{index-Aa_qAwSq.js → index-BKc52gsM.js} +69 -68
  11. package/dist/{index-DWmZQOPc.js → index-BNytnHfT.js} +62 -56
  12. package/dist/index-BbdDqL4R.js +106 -0
  13. package/dist/{index-D8U8yEvx.js → index-Bh99swBg.js} +9 -9
  14. package/dist/index-BsUQc1tS.js +72 -0
  15. package/dist/index-C0dTAIw4.js +182 -0
  16. package/dist/{index-pxgBPi_e.js → index-CEaedSLk.js} +21 -19
  17. package/dist/{index-DU5RPuKk.js → index-Cb9bja8p.js} +11 -11
  18. package/dist/index-CsUs4AR_.js +42 -0
  19. package/dist/{index-C8fkVOS0.js → index-CvtY70Y6.js} +16 -12
  20. package/dist/{index-rOyW50AB.js → index-CwyxJHDj.js} +34 -29
  21. package/dist/index-D3OkO10X.js +933 -0
  22. package/dist/{index-D6cX_pp2.js → index-DIRWVvKY.js} +27 -22
  23. package/dist/index-DPSZh1Ve.js +123 -0
  24. package/dist/{index-DzI5GwAU.js → index-E8d5Pz2_.js} +29 -25
  25. package/dist/{index-D47lvu37.js → index-SLpgD5v0.js} +81 -89
  26. package/dist/{index-DvZhYqrw.js → index-t7D_zBIH.js} +13 -12
  27. package/dist/index.d.ts +3 -3
  28. package/dist/plugins/directive.d.ts +1 -1
  29. package/dist/sstore/ssys.d.ts +0 -3
  30. package/dist/sstore/suser.d.ts +52 -9
  31. package/package.json +1 -1
  32. package/dist/apis/auth/ApiAuthApi.d.ts +0 -7
  33. package/dist/apis/system/ApiSystemTenant.d.ts +0 -6
  34. package/dist/index-BTuR22Wh.js +0 -41
  35. package/dist/index-CRagZR_l.js +0 -160
  36. package/dist/index-D7Xyt6lh.js +0 -180
  37. package/dist/index-DFNCjb_F.js +0 -69
  38. package/dist/index-Dejkixap.js +0 -181
  39. package/dist/index-uPQ6O40Q.js +0 -180
  40. package/dist/views/pages/system/tenant/index.vue.d.ts +0 -2
  41. /package/dist/views/pages/auth/{api → permission}/index.vue.d.ts +0 -0
@@ -1 +1 @@
1
- (function(y,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("cc1-vue3"),require("cc1-ui"),require("cc1-form"),require("vue-router"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","cc1-vue3","cc1-ui","cc1-form","vue-router","element-plus"],e):(y=typeof globalThis<"u"?globalThis:y||self,e(y.nestAuthAdmin={},y.Vue,y.cc1Vue3,y.toolsVueUI,y.cc1Form,y.VueRouter,y.ElementPlus))})(this,(function(y,e,R,re,f,F,W){"use strict";class B{static all(t){return http.post("/auth/api/all",t)}static list(t){return http.post("/auth/api/list",t)}static create(t){return http.post("/auth/api/create",t)}static update(t){return http.post("/auth/api/update",t)}static delete(t){return http.post("/auth/api/delete",t)}}class D{static list(t){return http.post("/auth/menu/list",t)}static create(t){return http.post("/auth/menu/create",t)}static update(t){return http.post("/auth/menu/update",t)}static delete(t){return http.post("/auth/menu/delete",t)}}class ie{static sendCode(t){return http.post("/auth/phone/sendCode",{phone:t})}}class A{static list(t){return http.post("/auth/role/list",t)}static roleList(t){return http.post("/auth/role/roleList",t)}static create(t){return http.post("/auth/role/create",t)}static update(t){return http.post("/auth/role/update",t)}static delete(t){return http.post("/auth/role/delete",t)}}class ${static list(t){return http.post("/auth/user/list",t)}static create(t){return http.post("/auth/user/create",t)}static update(t){return http.post("/auth/user/update",t)}static delete(t){return http.post("/auth/user/delete",t)}static resetPassword(t){return http.post("/auth/user/resetPassword",t)}static profile(t){return http.post("/auth/user/profile",t)}static updateProfile(t){return http.post("/auth/user/updateProfile",t)}static changePassword(t){return http.post("/auth/user/changePassword",t)}static login(t){return http.post("/auth/user/login",t)}}class q{static send(t){return http.post("/captcha/send",t)}static verify(t){return http.post("/captcha/verify",t)}}class H{static list(t){return http.post("/auth/loginLog/list",t)}static delete(t){return http.post("/auth/loginLog/delete",t)}}class ce{static list(t){return http.post({url:"cron/list",method:"post"},{...t})}static save(t){return http.post({url:"cron/save",method:"post"},t)}static remove(t){return http.post({url:"cron/remove",method:"post"},{id:t})}}class K{static list(t){return http.post("/email/config/list",t)}static create(t){return http.post("/email/config/create",t)}static update(t){return http.post("/email/config/update",t)}static delete(t){return http.post("/email/config/delete",t)}}class J{static list(t){return http.post("/log/error/list",t)}static delete(t){return http.post("/log/error/delete",t)}}class Y{static list(t){return http.post("/schedule/job/list",t)}static create(t){return http.post("/schedule/job/create",t)}static update(t){return http.post("/schedule/job/update",t)}static delete(t){return http.post("/schedule/job/delete",t)}static execute(t){return http.post("/schedule/job/execute",t)}static changeStatus(t){return http.post("/schedule/job/changeStatus",t)}}class j{static list(t){return http.post("/sms/config/list",t)}static create(t){return http.post("/sms/config/create",t)}static update(t){return http.post("/sms/config/update",t)}static delete(t){return http.post("/sms/config/delete",t)}static send(t){return http.post("/sms/config/send",t)}}class U{static time(t){return http.post("/app/time",t)}static upload(t){return http.post({url:"/app/upload",headers:{"Content-Type":"multipart/form-data"}},t)}}class G{static list(t){return http.post("/system/config/list",t)}static create(t){return http.post("/system/config/create",t)}static update(t){return http.post("/system/config/update",t)}static delete(t){return http.post("/system/config/delete",t)}}class Z{static list(t){return http.post("/tenant/list",t)}static create(t){return http.post("/tenant/create",t)}static update(t){return http.post("/tenant/update",t)}static delete(t){return http.post("/tenant/delete",t)}}const P={ERouter:{change:"",reload:""}};Object.keys(P).forEach(a=>{const t=P[a];Object.keys(t).forEach(l=>{P[a][l]=`${a}_${l}`})});const M=P.ERouter,x=e.reactive({load:()=>{x.loginInfo=Cookie.get("loginInfo")||{},x.userInfo=x.loginInfo.userInfo||{},x.token=Cookie.get("token")},loginInfo:{},userInfo:{},token:null,setUserInfo:a=>{x.loginInfo=a,x.userInfo=a.userInfo,x.token=a.token,Cookie.set("loginInfo",a),Cookie.set("token",a.token)},updateUserInfo:a=>{x.userInfo={...x.userInfo,...a},x.loginInfo.userInfo=x.userInfo,Cookie.set("loginInfo",x.loginInfo)},clearInfo:()=>{x.token=null,x.userInfo={},x.loginInfo={},_.setMenuList([],[]),_.setApiList([]),Cookie.remove("loginInfo"),Cookie.remove("token"),Cookie.remove("menuList"),Cookie.remove("apiList")},hasApi:a=>x.loginInfo.roleInfo.apiList.includes(a)});class E{static baseUrl="";static init(){const t=(o,n,...s)=>{n.forEach(r=>{o[r]&&o[r](...s)})},l=(o,n,s)=>{let r=s?.data?.code||o,c=s?.data.message;n.data.toast?n.data.toast(r,s,n):f.TSys.fail(g.i18n.t(`code.${r}`,{msg:c||"请求异常"})||g.i18n.t("code.OtherException")),t(n.data,["final","fail","complete"],o==200,n,s),r==401&&(x.clearInfo(),n.data.toLogin?.()!==!1&&f.TSys.router.replace("/login"))};http.setConfig({base:E.baseUrl,before(o){o.param.headers=o.param.headers||{},Object.keys(o.data).forEach(s=>{(o.data[s]===void 0||o.data[s]===null)&&delete o.data[s]});const n=x.token||"";n&&(o.param.headers.Token=n)},after(o,n){const{code:s}=o.data;if(s!=200){n.res=o.data,o.status=s;return}t(n.data,["final","success","complete"],o.data,n,o)},error:l})}}class g{static env;static i18n;static elementLocale;static staticDir;static config;static setConfig(t){const l={website:{recordNumber:"ICP备000000000号-1",author:"Copyright © 2022-2025 Design By Veigar"},staticDir:"/static_admin"};this.config=ObjectUtil.deepMerge(l,t),this.env=this.config.env,this.i18n=this.config.i18n,this.staticDir=this.config.staticDir,this.elementLocale=this.config.elementLocale,E.baseUrl=this.env.API}static getBaseUrl(t){return t=E.baseUrl.replace("/api","/")+t,t=t.replace(/(?<!:)\/{2,}/g,"/"),t}}const X=a=>{const t=JSONUtil.cp(a),l=o=>t.filter(s=>{let r=s.parentId;return s.parentId.includes(",")&&(r=s.parentId.split(",").pop()),r===o}).map(s=>({...s,children:l(s._id)})).sort((s,r)=>s.sort-r.sort);return l("0")},_=e.reactive({getTableTree:X,auth:{list:["/api/system/list","/api/system/detail"],isPass:a=>_.auth.list.includes(a)},load:()=>{_.menuListSource=JSONUtil.cp(Cookie.get("menuList"))},layout:{collapse:!1},menuListSource:[],menuList:[],setMenuList:(a,t)=>{_.menuList=a,_.menuListSource=JSONUtil.cp(t),Cookie.set("menuList",t)},getMenuList:async()=>{let a=Cookie.get("menuList");_.menuListSource=JSONUtil.cp(a);try{if(StrUtil.isNull(a)||(a=a),StrUtil.isNull(a))return f.TSys.router.push("/login"),[];let t=X(a);return _.setMenuList(t,a),JSONUtil.cp(_.menuList)}catch{f.TSys.router.push("/login")}return JSONUtil.cp(_.menuList)},apiList:[],setApiList:a=>{_.apiList=a,Cookie.set("apiList",_.apiList)},getApiList:async()=>{let a=Cookie.get("apiList");try{return StrUtil.isNull(a)||(a=a),StrUtil.isNull(a)?(f.TSys.router.push("/login"),[]):(_.setApiList(a),_.apiList)}catch{f.TSys.router.push("/login")}return _.apiList},upload:{handler:a=>{const t=document.createElement("input");t.type="file",t.accept=a.accept||"image/*",t.multiple=a.multiple||!1,t.onchange=async l=>{const o=l.target.files[0];if(o){const n=await U.upload({file:o});a.callback(n.data),a.toast,f.TSys.success("上传成功")}else a.callback("")},t.click()}},preview:{show:!1,srcList:[],index:0,open:(a,t=0)=>{_.preview.index=t,_.preview.srcList=a.map(l=>g.getBaseUrl(l)),_.preview.show=!0}}}),de=e.defineComponent({name:"App",__name:"App",setup(a){const t=e.reactive({locale:g.elementLocale,show:!0,reload:()=>{t.show=!1,e.nextTick(()=>{t.show=!0})}});return CEvent.on(M.reload,t.reload),(l,o)=>{const n=e.resolveComponent("x-route-event"),s=e.resolveComponent("router-view"),r=e.resolveComponent("el-image-viewer"),c=e.resolveComponent("el-config-provider");return e.openBlock(),e.createBlock(c,{locale:t.locale},{default:e.withCtx(()=>[e.createVNode(n),e.createVNode(s),e.unref(_).preview.show?(e.openBlock(),e.createBlock(r,{key:0,"url-list":e.unref(_).preview.srcList,"initial-index":e.unref(_).preview.index,onClose:o[0]||(o[0]=i=>e.unref(_).preview.show=!1)},null,8,["url-list","initial-index"])):e.createCommentVNode("",!0)]),_:1},8,["locale"])}}}),V=e.reactive({findOptions:(a,t)=>{const l=a.column.find(n=>n.key===t),o=n=>n.replace(/-([a-z])/g,(s,r)=>r.toUpperCase());if(l)return l.options[o(l.type)]},setOptionsData:(a,t,l)=>{const o=V.findOptions(a,t);o&&(o.data=l)},form:{openBefore:{parentId:(a,t,l,o)=>{a?t.type===f.TSys.EDialog.Add?(t.form.parentId=a._id,t.form.sort=a.children.length+1,t.form._id=void 0):t.form.parentId=a.parentId.substring(a.parentId.lastIndexOf(",")+1):(t.form.parentId="0",t.form.sort=l.length+1),V.setOptionsData(o,"parentId",[{_id:"0",title:"根",children:l}])}}}}),T=e.reactive({baseUrl:"",reset:()=>{},store:{},getStore(a){return T.store[a]},getDateOptions:(a=!0)=>{const t=[];a&&t.push({label:g.i18n.t("dateOptions.AllDates"),value:null,key:"all"}),t.push({label:g.i18n.t("dateOptions.Today"),value:TimeUtil.somedayse(),key:"today"}),t.push({label:g.i18n.t("dateOptions.Yesterday"),value:TimeUtil.somedayse(-1),key:"yesterday"});const l=new Date,o=TimeUtil.somedayse,n=l.getDay(),s=o(1-n)[0],r=o(7-n)[1],c={label:g.i18n.t("dateOptions.ThisWeek"),value:[s,r],key:"thisWeek"};t.push(c);const i=o(1-n-7)[0],p=o(7-n-7)[1],u={label:g.i18n.t("dateOptions.LastWeek"),value:[i,p],key:"lastWeek"};t.push(u);const d=new Date;d.setDate(1);const h=o(0,d);d.setMonth(d.getMonth()+1),d.setDate(1),d.setDate(d.getDate()-1);const m=o(0,d),b={label:g.i18n.t("dateOptions.ThisMonth"),value:[h[0],m[1]],key:"thisMonth"};return t.push(b),t}}),z=e.reactive({getVf:(a,t,l)=>{const o={};l===void 0&&(l=z.inputVal);for(const n in t)o[n]=s=>{a[n]=null,l({val:s.target.value,after:r=>{a[n]=r},...t[n]})};return o},inputVal:a=>{let{val:t,length:l,trim:o=!0,fixed:n=2,min:s=0,max:r=1e9}=a;o&&(t=t.replace(/\s+|\s+$/g,""));const c={int:i=>(i=i.replace(/[^\d]/g,""),i=Number(i)||0,i=s&&i<s?s:i,i=r&&i>r?r:i,i),float:i=>(i=i.replace(/^0(\d)/,"$1").replace(/^\./,"0").replace(/[^\d.]/g,"").replace(/^(\d*\.?\d*).*$/,"$1").replace(new RegExp(`^(\\d+)\\.(\\d{${n}}).*`),"$1.$2"),i),hanzi:i=>(i=i.replace(/[^\u4e00-\u9fa5]/g,""),i),Num:"0-9",En:"a-zA-Z",Hanzi:"一-龥"};if(t.length){l&&t.length>l&&(t=t.substring(0,l));const i=[],p=[],u=(d,h,m)=>{d===h?Array.isArray(a[d])?m.push(...a[d]):m.push(a[d]):m.push(c[d.substring(3)])};Object.keys(a).forEach(d=>{d.startsWith("get")?u(d,"getCustom",i):d.startsWith("del")?u(d,"delCustom",p):c[d]&&(t=c[d](t))}),i.length&&(t=t.replace(new RegExp(`[^${i.join("")}]`,"g"),"")),p.length&&(t=t.replace(new RegExp(`[${p.join("")}]`,"g"),""))}return a.after(t),t}}),pe={install:a=>{const t=Cookie.clear.bind(Cookie);Cookie.clear=async(l,o)=>{l=l||{},l.excludeList=l.excludeList||[],l.excludeList.push("apiurl"),await t(l,o)}}},me={install:a=>{}};let I={},O={};const ue={install:a=>{a.use(re),I=Cookie.get("iconObj")||{},O=Cookie.get("siconObj")||{},VConf.vicon.fun.getRes=async t=>I[t],VConf.vicon.fun.setRes=(t,l)=>{I[t]=l,Cookie.set("iconObj",I)},VConf.vsicon.url=g.staticDir+"/vicon/svg",VConf.vsicon.lib="",VConf.vsicon.fun.getRes=async t=>O[t],VConf.vsicon.fun.setRes=(t,l)=>{O[t]=l,Cookie.set("siconObj",O)}}},fe={style:{border:"1px solid #ccc"}},he=e.defineComponent({__name:"index",props:{modelValue:{type:String,default:""}},emits:["update:modelValue"],setup(a,{emit:t}){const l=e.defineAsyncComponent(()=>f.TSys.loadModule("editor").then(d=>d.Editor)),o=e.defineAsyncComponent(()=>f.TSys.loadModule("editor").then(d=>d.Toolbar)),n=a,s=t,r=e.shallowRef(),c=e.ref(n.modelValue);e.watch(c,d=>{s("update:modelValue",d)});const i={excludeKeys:["group-video"]},p={placeholder:"请输入内容...",MENU_CONF:{uploadImage:{async customUpload(d,h){const m=await U.upload({file:d});m.data=g.getBaseUrl(m.data),h(m.data,"",m.data),s("update:modelValue",c.value)}}}};e.onBeforeUnmount(()=>{const d=r.value;d?.destroy()});const u=d=>{r.value=d};return(d,h)=>(e.openBlock(),e.createElementBlock("div",fe,[e.createVNode(e.unref(o),{style:{"border-bottom":"1px solid #ccc"},editor:r.value,defaultConfig:i,mode:"default"},null,8,["editor"]),e.createVNode(e.unref(l),{style:{height:"500px","overflow-y":"hidden"},modelValue:c.value,"onUpdate:modelValue":h[0]||(h[0]=m=>c.value=m),defaultConfig:p,mode:"default",onOnCreated:u},null,8,["modelValue"])]))}}),_e={install:a=>{const t={activeValue:1,inactiveValue:0,activeText:"启用",inactiveText:"禁用",inlinePrompt:!0,tableConfig:{loadList:!1}};f.TForm.error.callback=(l,o)=>"必填",f.TFormConfig.setConfig({dialog:{delete:{content:'确定要执行删除操作吗,删除后<span style="color: red;">无法进行恢复</span>'}},size:{table:"default",form:"default",search:"default"},pagination:{size:20,pageSizes:[20,50,100,500],layout:"total, sizes, prev, pager, next, jumper"},table:{index:!0},tools:{export:{dropdown:!1}},columnConfig:{options:{switch:t,datetime:{startPlaceholder:"开始时间",endPlaceholder:"结束时间"},baseupload:{table:{showOverflowTooltip:!1}},basegroup:{dataApiConfig:{once:!0,init:!1,update:!0}},formAdd:{switch:t},formUpdate:{switch:t},search:{datetime:{startPlaceholder:"开始时间",endPlaceholder:"结束时间"}}}}}),a.use(f,{customComponent:{xEditor:he}})}},ye=a=>{if(typeof a!="string"||a.length===0)return!1;const t=x.loginInfo?.roleInfo,l=t?.roleList;if(Array.isArray(l)&&l.some(n=>n?.type==="superadmin"))return!0;const o=t?.apiList;return Array.isArray(o)&&o.includes(a)},Q=(a,t)=>{ye(t.value)||a.remove()},ge=a=>{a.directive("auth",{mounted:Q,updated(t,l){l.value!==l.oldValue&&Q(t,l)}})},be={install:a=>{a.use(pe),a.use(me),a.use(ue),a.use(_e),a.use(ge)}},we=()=>{const a=i=>i.replace(/\/index$/,"");let t=Object.assign({"/src/views/error/index.vue":()=>Promise.resolve().then(()=>Be),"/src/views/layout/index.vue":()=>Promise.resolve().then(()=>Ke),"/src/views/login/index.vue":()=>Promise.resolve().then(()=>tt),"/src/views/pages/auth/api/index.vue":()=>Promise.resolve().then(()=>ot),"/src/views/pages/auth/menu/index.vue":()=>Promise.resolve().then(()=>kt),"/src/views/pages/auth/role/index.vue":()=>Promise.resolve().then(()=>Ct),"/src/views/pages/auth/user/index.vue":()=>Promise.resolve().then(()=>Vt),"/src/views/pages/db/index.vue":()=>Promise.resolve().then(()=>Tt),"/src/views/pages/email/config/index.vue":()=>Promise.resolve().then(()=>St),"/src/views/pages/home/index.vue":()=>Promise.resolve().then(()=>Pt),"/src/views/pages/log/error/index.vue":()=>Promise.resolve().then(()=>It),"/src/views/pages/log/loginlog/index.vue":()=>Promise.resolve().then(()=>Ot),"/src/views/pages/profile/index.vue":()=>Promise.resolve().then(()=>Dt),"/src/views/pages/schedule/job/index.vue":()=>Promise.resolve().then(()=>At),"/src/views/pages/sms/config/index.vue":()=>Promise.resolve().then(()=>jt),"/src/views/pages/system/config/index.vue":()=>Promise.resolve().then(()=>Ut),"/src/views/pages/system/tenant/index.vue":()=>Promise.resolve().then(()=>Mt)});if(!g.config.routes){f.TSys.fail("router.routes is required");return}Object.keys(g.config.routes).forEach(i=>{t[i]=g.config.routes[i]});const l={},o=["light","dark"],n="light",s="dark";Object.keys(t).forEach(i=>{o.forEach(p=>{n!=p&&(new RegExp(`^/src/views/${p}`).test(i)||(l[i]=t[i]),new RegExp(`^/src/views/${s}`).test(i)&&t[i])})});const r=R.CRouter.init({modules:l,children:[{path:"/layout",component:"/layout",childrenReg:["^/pages"]}],setInfoHook(i){i.meta={title:i.path}},mapKeyPathHook(i){return a(i)},pathHook(i){return a(i).replace(/^\/pages/,"")}}),c=F.createRouter({history:F.createWebHashHistory(),routes:[...r.array,{path:"/",redirect:"/home"},{path:"/:matchOthers(.*)*",redirect:"/error"}]});return f.TSys.router=c,f.TSys.routes=r.array,g.config.routeHook?.(c),c};T.store={ssys:_,suser:x,sutil:T,svf:z,scurd:V};const xe=()=>{Object.keys(T.store).forEach(a=>{a!=="sutil"&&T.store[a].reset?.()})},ke=()=>{Object.keys(T.store).forEach(a=>{a!=="sutil"&&T.store[a].load?.()})},Ce=async()=>{ke()};T.reset=xe;class Ve{static async init(t){t.use(be),t.use(g.i18n),await g.i18n.setLang(),Ce(),E.init();const l=we();t.use(l),l.isReady().then(async()=>{t.mount("#app")})}}const L=e.createApp(de),Ne=async a=>{g.setConfig(a),await g.config.install?.(L),L.use(window.ElementPlus,g.config.elementPlus||{});const t=await Promise.resolve().then(()=>Ft);L.use(t),await Ve.init(L),g.config.installed?.(L)},Te={style:{background:"#7395ff",width:"100vw",height:"100vh"}},Se={class:"nfsystem"},$e=["src"],Ee={class:"nftitle"},Le=e.defineComponent({__name:"index",setup(a){const t=()=>{f.TSys.router.push("/")};return(l,o)=>{const n=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Te,[e.createElementVNode("div",Se,[e.createElementVNode("img",{src:e.unref(g).staticDir+"/images/404.png"},null,8,$e),e.createElementVNode("div",Ee,[o[2]||(o[2]=e.createElementVNode("h2",null,"页面走丢了...",-1)),o[3]||(o[3]=e.createElementVNode("h4",null,"远方的朋友你好!非常抱歉,您所请求的页面不存在!",-1)),o[4]||(o[4]=e.createElementVNode("h4",null,"请仔细检查您输入的网址是否正确。",-1)),e.createVNode(n,{type:"warning",onClick:o[0]||(o[0]=s=>t()),style:{width:"220px"}},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("返回主页",-1)])),_:1,__:[1]})])])])}}}),S=(a,t)=>{const l=a.__vccOpts||a;for(const[o,n]of t)l[o]=n;return l},Be=Object.freeze(Object.defineProperty({__proto__:null,default:S(Le,[["__scopeId","data-v-29641492"]])},Symbol.toStringTag,{value:"Module"})),Pe={class:"header row no-wrap"},Ie={class:"header-right"},Oe={class:"header-user-con"},De={class:"el-dropdown-link row items-center"},Ae={class:"user-avator"},je=["src"],Ue=S(e.defineComponent({__name:"Header",setup(a){const t=e.reactive({layout:_.layout,message:2}),l=()=>{t.layout.collapse=!t.layout.collapse};e.onMounted(()=>{document.body.clientWidth<1500&&l()});const o=n=>{n=="loginout"?(x.clearInfo(),f.TSys.router.push("/login")):n=="user"&&f.TSys.router.push("/profile")};return(n,s)=>{const r=e.resolveComponent("v-icon"),c=e.resolveComponent("el-dropdown-item"),i=e.resolveComponent("el-dropdown-menu"),p=e.resolveComponent("el-dropdown");return e.openBlock(),e.createElementBlock("div",Pe,[e.createElementVNode("div",{class:"collapse-btn",onClick:l},[e.createVNode(r,{name:"menu",size:"32",color:["#34B0E5"],style:e.normalizeStyle([{transition:"all 0.3s"},{transform:`rotateZ(${t.layout.collapse?90:0}deg)`}])},null,8,["style"])]),s[2]||(s[2]=e.createElementVNode("i",{class:"el-icon-lx-redpacket_fill",style:{"font-size":"30px",color:"#ff5900"}},null,-1)),s[3]||(s[3]=e.createElementVNode("div",{class:"logo col"},"后台管理",-1)),e.createElementVNode("div",Ie,[e.createElementVNode("div",Oe,[e.createVNode(p,{class:"user-name",trigger:"click",onCommand:o},{dropdown:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(c,{command:"user"},{default:e.withCtx(()=>s[0]||(s[0]=[e.createTextVNode("个人中心",-1)])),_:1,__:[0]}),e.createVNode(c,{divided:"",command:"loginout"},{default:e.withCtx(()=>s[1]||(s[1]=[e.createTextVNode("退出登录",-1)])),_:1,__:[1]})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",De,[e.createTextVNode(e.toDisplayString(e.unref(x).userInfo.nickname)+" ",1),e.createElementVNode("div",Ae,[e.createElementVNode("img",{src:e.unref(g).staticDir+"/images/head.jpg"},null,8,je)])])]),_:1})])])])}}}),[["__scopeId","data-v-d5ae6f3f"]]),Me={class:"flex items-center vicon"},ze={class:"flex items-center vicon"},Re=S(e.defineComponent({__name:"Sidebar",setup(a){const t=e.reactive({layout:_.layout,menu:[]}),l=async()=>{let s=await _.getMenuList();const r=c=>c.filter(i=>(i.type===0&&(i.url="/"+StrUtil.getId()),StrUtil.isNull(i.children)||(i.children=r(i.children)),i.show));s=r(s),t.menu=s};e.onMounted(()=>{l()});const o=e.computed(()=>f.TSys.router.currentRoute.value.path),n=s=>{o.value!==s&&window.innerWidth<900&&Timer.once(()=>{t.layout.collapse=!t.layout.collapse},300)};return(s,r)=>{const c=e.resolveComponent("v-icon"),i=e.resolveComponent("el-menu-item"),p=e.resolveComponent("el-sub-menu"),u=e.resolveComponent("el-menu"),d=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sidebar",[t.layout.collapse?"sidebar-hideen":"sidebar-show"]])},[e.createVNode(d,{height:"100%",style:{"background-color":"#324157"}},{default:e.withCtx(()=>[e.createVNode(u,{class:"sidebar-el-menu","default-active":o.value,collapse:t.layout.collapse,"text-color":"#bfcbd9","active-text-color":"#20a0ff","unique-opened":"",router:"",onSelect:n},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menu,h=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[h.children&&h.children?.length>0?(e.openBlock(),e.createBlock(p,{index:h.url,key:h.url},{title:e.withCtx(()=>[e.createElementVNode("div",Me,[e.createVNode(c,{lib:h.iconLib,name:h.iconName,size:"24",color:["#1890ff"]},null,8,["lib","name"])]),e.createElementVNode("span",null,e.toDisplayString(h.title),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.children,m=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[m.children&&m.children?.length>0?(e.openBlock(),e.createBlock(p,{key:0,index:m.url},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.title),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.children,(b,k)=>(e.openBlock(),e.createBlock(i,{key:k,index:b.url},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.title),1)]),_:2},1032,["index"]))),128))]),_:2},1032,["index"])):(e.openBlock(),e.createBlock(i,{key:1,index:m.url},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.title),1)]),_:2},1032,["index"]))],64))),256))]),_:2},1032,["index"])):(e.openBlock(),e.createBlock(i,{index:h.url,key:h.url},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(h.title),1)]),default:e.withCtx(()=>[e.createElementVNode("div",ze,[e.createVNode(c,{lib:h.iconLib,name:h.iconName,size:"24",color:["#1890ff"]},null,8,["lib","name"])])]),_:2},1032,["index"]))],64))),256))]),_:1},8,["default-active","collapse"])]),_:1})],2)}}}),[["__scopeId","data-v-ac094262"]]),Fe={style:{display:"flex",height:"calc(100% - 70px)"}},We={class:"content"},qe={class:"view"},He={class:"row flex-center",style:{gap:"10px","font-size":"12px"}},Ke=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(a){const t=e.reactive({keepAlive:["/auth/role","/auth/api"]});return(l,o)=>{const n=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Ue),e.createElementVNode("div",Fe,[e.createVNode(Re),e.createElementVNode("div",We,[e.createElementVNode("div",null,[e.createElementVNode("div",qe,[e.createVNode(n,null,{default:e.withCtx(({Component:s})=>[e.createVNode(e.Transition,{name:"slide-fade",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,{include:t.keepAlive},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s),{key:l.$route.fullPath}))],1032,["include"]))]),_:2},1024)]),_:1}),e.createElementVNode("div",He,[e.createElementVNode("div",null,e.toDisplayString(e.unref(g).config.website.author),1),e.createElementVNode("div",null,e.toDisplayString(e.unref(g).config.website.recordNumber),1)])])])])])],64)}}}),[["__scopeId","data-v-7d2c2356"]])},Symbol.toStringTag,{value:"Module"})),Je=["id"],Ye=e.defineComponent({__name:"index",setup(a){const t=StrUtil.getId(),l=e.reactive({boxid:"canvas_snow-"+t,itemid:"canvas_sakura-"+t});let o;const n=()=>{const s=document.getElementById(l.boxid);if(s){const r=s.getBoundingClientRect();innerHeight=r.height,innerWidth=r.width;let c=document.getElementById(l.itemid);c.width=innerWidth,c.height=innerHeight}};return e.onMounted(()=>{const s=document.getElementById(l.boxid).getBoundingClientRect();let r=s.height,c=s.width,i=new Image;i.src=g.staticDir+"/bg/yh.png";let p=function(m,b,k,w,N){this.x=m,this.y=b,this.s=k,this.r=w,this.fn=N};p.prototype.draw=function(m){m.save(),m.translate(this.x,this.y),m.rotate(this.r),m.drawImage(i,0,0,40*this.s,40*this.s),m.restore()},p.prototype.update=function(){this.x=this.fn.x(this.x,this.y),this.y=this.fn.y(this.y,this.y),this.r=this.fn.r(this.r),(this.x>c||this.x<0||this.y>r||this.y<0)&&(this.r=d("fnr"),Math.random()>.4?(this.x=d("x"),this.y=0,this.s=d("s"),this.r=d("r")):(this.x=c,this.y=d("y"),this.s=d("s"),this.r=d("r")))};let u=function(){this.list=[]};u.prototype.push=function(m){this.list.push(m)},u.prototype.update=function(){for(let m=0,b=this.list.length;m<b;m++)this.list[m].update()},u.prototype.draw=function(m){for(let b=0,k=this.list.length;b<k;b++)this.list[b].draw(m)},u.prototype.get=function(m){return this.list[m]},u.prototype.size=function(){return this.list.length};function d(m){let b,k;switch(m){case"x":b=Math.random()*c;break;case"y":b=Math.random()*r;break;case"s":b=Math.random();break;case"r":b=Math.random()*6;break;case"fnx":k=-.5+Math.random()*1,b=function(w,N){return w+.5*k-1.7};break;case"fny":k=1.5+Math.random()*.7,b=function(w,N){return N+k};break;case"fnr":k=Math.random()*.03,b=function(w){return w+k};break}return b}function h(){let m=document.createElement("canvas"),b;m.height=r,m.width=c,m.setAttribute("style","position: absolute;left: 0;top: 0;pointer-events: none;object-fit:cover;"),m.setAttribute("id",l.itemid),document.getElementById(l.boxid).appendChild(m),b=m.getContext("2d");let k=new u;for(let w=0;w<50;w++){let N,C,te,oe,ne,le,ae,se;C=d("x"),te=d("y"),ne=d("r"),oe=d("s"),le=d("fnx"),ae=d("fny"),se=d("fnr"),N=new p(C,te,oe,ne,{x:le,y:ae,r:se}),N.draw(b),k.push(N)}o=function(){b.clearRect(0,0,m.width,m.height),k.update(),k.draw(b),requestAnimationFrame(o)},requestAnimationFrame(o)}i.onload=function(){h()},window.addEventListener("resize",n)}),e.onUnmounted(()=>{window.removeEventListener("resize",n),window.cancelAnimationFrame(o);let s=document.getElementById(l.itemid);s?.parentNode?.removeChild(s)}),(s,r)=>(e.openBlock(),e.createElementBlock("div",{id:l.boxid},null,8,Je))}}),Ge={class:"absolute fit"},Ze={class:"login-icp"},Xe={class:"ms-login"},Qe={class:"row no-wrap",style:{width:"100%"}},ve={class:"row no-wrap",style:{width:"100%"}},et={class:"login-btn"},tt=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(a){const t=e.reactive({param:{isPhone:!1,login_name:"",login_password:"",phone:"",code:""},textCode:{loading:!1,text:"发送验证码",status:!1},rules:{login_name:[{required:!0,message:"请输入用户名",trigger:"blur"}],login_password:[{required:!0,message:"请输入密码",trigger:"blur"}],phone:[{required:!0,message:"请输入手机号",trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}]},loading:!1,text:"登录"});x.clearInfo();const l=e.ref(),o=()=>{l.value.validate(async c=>{if(c){let i=t.param.isPhone?{phone:t.param.phone,code:t.param.code}:{account:t.param.login_name,password:t.param.login_password};t.loading=!0,t.text="加载中";const p=await $.login({...i,final(d,h,m){t.loading=!1,t.text="登录"}});x.setUserInfo(p.data);let u=_.getTableTree(p.data.roleInfo.menuList);_.setMenuList(u,p.data.roleInfo.menuList),_.setApiList(p.data.roleInfo.apiList),f.TSys.router.push("/")}})};let n=null;const s=c=>{Timer.un(n),StrUtil.isNull(c)&&(c=parseInt(Cookie.get("codeTime"))),!StrUtil.isNull(c)&&(t.textCode.status=!1,n=Timer.on(()=>{let i=new Date().getTime();if(i-c>0)t.textCode.status=!1,Timer.un(n),t.textCode.text="发送验证码";else{t.textCode.status=!0;const p=(c-i)/1e3;t.textCode.text=p.toFixed(0)+"秒后再试"}},1e3,!0))},r=async()=>{const c=await q.send({type:1,content:"1518079148@qq.com"});console.log("res",c)};return e.onMounted(()=>{s()}),(c,i)=>{const p=e.resolveComponent("el-button"),u=e.resolveComponent("el-input"),d=e.resolveComponent("el-form-item"),h=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",{class:"login-wrap",style:e.normalizeStyle({backgroundImage:`url(${e.unref(g).staticDir+"/bg/g-1.jpg"})`})},[e.createElementVNode("div",Ge,[e.createVNode(Ye,{class:"fit"})]),e.createElementVNode("div",Ze,[e.createElementVNode("div",null,e.toDisplayString(e.unref(g).config.website.author),1),e.createElementVNode("div",null,e.toDisplayString(e.unref(g).config.website.recordNumber),1)]),e.createElementVNode("div",Xe,[i[9]||(i[9]=e.createElementVNode("div",{class:"ms-title"},"系统登陆",-1)),e.createVNode(h,{model:t.param,rules:t.rules,ref_key:"login",ref:l,"label-width":"0px",class:"ms-content"},{default:e.withCtx(()=>[t.param.isPhone?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(d,{prop:"phone"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:t.param.phone,"onUpdate:modelValue":i[3]||(i[3]=m=>t.param.phone=m),placeholder:"手机号"},{default:e.withCtx(()=>[e.createVNode(p,{slot:"prepend",icon:"el-icon-lx-people"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(d,{prop:"code"},{default:e.withCtx(()=>[e.createElementVNode("div",ve,[e.createVNode(u,{placeholder:"验证码",modelValue:t.param.code,"onUpdate:modelValue":i[4]||(i[4]=m=>t.param.code=m),onKeyup:i[5]||(i[5]=e.withKeys(m=>o(),["enter","native"])),class:"input-phone"},{default:e.withCtx(()=>[e.createVNode(p,{slot:"prepend",icon:"el-icon-lx-lock"})]),_:1},8,["modelValue"]),e.createVNode(p,{loading:t.textCode.loading,disabled:t.textCode.status,type:"primary",onClick:i[6]||(i[6]=m=>r()),style:{"border-radius":"0px 4px 4px 0px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.textCode.text),1)]),_:1},8,["loading","disabled"])])]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(d,{prop:"login_name"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:t.param.login_name,"onUpdate:modelValue":i[0]||(i[0]=m=>t.param.login_name=m),placeholder:"账号"},{default:e.withCtx(()=>[e.createVNode(p,{slot:"prepend",icon:"el-icon-lx-people"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(d,{prop:"login_password"},{default:e.withCtx(()=>[e.createElementVNode("div",Qe,[e.createVNode(u,{type:"password",placeholder:"密码",modelValue:t.param.login_password,"onUpdate:modelValue":i[1]||(i[1]=m=>t.param.login_password=m),onKeyup:i[2]||(i[2]=e.withKeys(m=>o(),["enter","native"])),class:e.normalizeClass([t.param.isPhone?"input-phone":void 0])},{default:e.withCtx(()=>[e.createVNode(p,{slot:"prepend",icon:"el-icon-lx-lock"})]),_:1},8,["modelValue","class"])])]),_:1})],64)),e.createElementVNode("div",et,[e.createVNode(p,{type:"primary",onClick:i[7]||(i[7]=m=>o()),loading:t.loading},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text),1)]),_:1},8,["loading"]),e.createElementVNode("div",{style:{color:"#ffffff","font-size":"14px","margin-top":"10px",cursor:"pointer"},onClick:i[8]||(i[8]=m=>t.param.isPhone=!t.param.isPhone)}," 切换"+e.toDisplayString(t.param.isPhone?"账号":"验证码")+"登录 ",1)])]),_:1},8,["model","rules"])])],4)}}}),[["__scopeId","data-v-9b624341"]])},Symbol.toStringTag,{value:"Module"})),ot=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({data:[],option:{api:B,search:{show:!1},data(l){return t.data=_.getTableTree(l),t.data},table:{border:!0,index:!1,add:l=>l?.type===0,operate:{width:160}},page:{show:!1},column:[{key:"parentId",label:"父级",type:"treeSelect",value:"0",form:{span:12},options:{treeSelect:{data:[],multiple:!1}},show:{table:!1}},{key:"title",label:"名称",type:"input",value:"",table:{width:"250px",align:"left"},rules:!0},{key:"type",label:"类型",type:"select",value:0,options:{select:{clearable:!1,data:[{label:"目录",value:0},{label:"接口",value:1}]}}},{key:"sort",label:"排序",type:"input",value:0,table:{width:"80px",align:"center"},form:{span:12}},{key:"url",label:"地址",type:"select",value:"",rules:!0,show:{form:l=>l.type===1},options:{select:{filterable:!0,data:[]}},table:{minWidth:"250px",align:"left"},form:{span:12}}],form:{openBefore:async(l,o)=>{V.form.openBefore.parentId(l.title?l:null,o,t.data,t.option),o.type===f.TSys.EDialog.Add&&(l.title="");const n=await t.api.getList();V.setOptionsData(t.option,"url",n.map(s=>({label:s.path,value:s.path})))}},tools:{add:l=>l===void 0?!0:l.type===0,update:!0,delete:!0,export:{show:!1},expand:!0}},api:{list:[],getList:async()=>{if(t.api.list.length)return t.api.list;f.TSys.loading(!0);const l=await B.all({final(o,n,s){f.TSys.loading(!1)}});return t.api.list=l.data,t.api.list}}});return(l,o)=>{const n=e.resolveComponent("el-tag"),s=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(s,{option:t.option},{"table-type":e.withCtx(({row:r})=>[r.type===0?(e.openBlock(),e.createBlock(n,{key:0,type:"success"},{default:e.withCtx(()=>o[0]||(o[0]=[e.createTextVNode("目录",-1)])),_:1,__:[0]})):(e.openBlock(),e.createBlock(n,{key:1,type:"warning"},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("接口",-1)])),_:1,__:[1]}))]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),nt=e.defineComponent({__name:"addIconItem",props:{isbig:{default:!1},el:{default:{}},lib:{default:""},color:{default:""},nofill:{default:!1}},setup(a){const t=e.ref({}),l=e.reactive({show:!1,observer:{}});return e.onMounted(()=>{l.observer=new IntersectionObserver((o,n)=>{o.forEach(s=>{l.show=s.isIntersecting})},{threshold:0}),l.observer.observe(t.value)}),e.onUnmounted(()=>{l.observer.disconnect()}),(o,n)=>{const s=e.resolveComponent("VIcon");return e.openBlock(),e.createElementBlock("span",{style:e.normalizeStyle({minHeight:a.isbig?"40px":"20px"}),ref_key:"_dom",ref:t},[l.show?(e.openBlock(),e.createBlock(s,{key:0,lib:a.lib,name:a.el.name,size:a.isbig?40:20,color:a.color,nofill:a.nofill},null,8,["lib","name","size","color","nofill"])):e.createCommentVNode("",!0)],4)}}}),lt={class:"row items-center",style:{gap:"10px"}},at=["onUpdate:modelValue"],st=e.defineComponent({__name:"colorChoose",props:{colors:{default:[]},length:{default:6}},emits:["update:colors"],setup(a,{emit:t}){const l=a,o=t,n=e.reactive({color:[]});for(let i=0;i<l.length;i++)n.color.push({value:l.colors[i]||"#000000"});const s=()=>o("update:colors",n.color.map(i=>i.value));s();const r=R.Scope.Timer();let c=null;return e.watch(()=>n.color,()=>{r.un(c),c=r.once(()=>{s()},100)},{deep:!0}),(i,p)=>(e.openBlock(),e.createElementBlock("div",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.color,(u,d)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:"color","onUpdate:modelValue":h=>n.color[d].value=h},null,8,at)),[[e.vModelText,n.color[d].value]])),256))]))}}),rt={class:"row items-center",style:{height:"60px",overflow:"auto"}},it={class:"row items-center",style:{gap:"10px",margin:"15px 0"}},ct={class:"row items-center",style:{gap:"10px","margin-bottom":"15px"}},dt={class:"row items-center"},pt={class:"flex items-center",style:{"margin-bottom":"10px"}},mt={style:{"margin-left":"10px"}},ut={key:0,class:"row"},ft=["onClick"],ht={style:{width:"0px"},class:"flex flex-center"},_t={style:{"text-wrap":"nowrap"}},yt={class:"dialog-footer"},gt=S(e.defineComponent({__name:"addDialog",props:{show:{default:!1},iconName:{default:"home"},iconLib:{default:"ant"},iconFill:{default:[]}},emits:["close","update:show"],setup(a,{emit:t}){const l=a;e.watch(()=>l.show,()=>{n.show=l.show,n.show&&n.open()});const o=t,n=e.reactive({libs:[],lib:"",size:0,nofill:!1,isbig:!1,getlibs:async()=>{if(n.libs.length)return;const s=VConf.vicon,r=`${s.url}/_keys.json`;let c=await s.fun.getRes(r);c||(c=await s.fun.getResorce(r,!0));const i=`${s.url}/_size.json`;let p=await s.fun.getRes(i);p||(p=await s.fun.getResorce(i,!0)),n.size=p.num,n.libs=c},init:()=>{n.lib=l.iconLib||"ant",n.item.lib=l.iconLib||"ant",n.item.name=l.iconName||"home",n.color.length=0,n.color.push(...l.iconFill)},changeLib:()=>{n.open(!1)},list:{},title:"选择图标",findName:"",color:[],item:{lib:"",name:""},show:!1,showIcon:!1,open:async(s=!0)=>{f.TSys.loading(!0);const r=VConf.vicon;await n.getlibs(),s&&n.init(),n.showIcon=!1;const c=n.lib,i=`${r.url}/${c}/_all.json`;if(n.list[c]||(n.list[c]=[]),n.list[c].length){e.nextTick(()=>{n.showIcon=!0}),f.TSys.loading(!1);return}let p=await r.fun.getRes(i);p||(p=await r.fun.getResorce(i,!0));const u=Object.keys(p);n.list[c]=[];for(let d=0;d<u.length;d++)n.list[c].push({name:u[d]});e.nextTick(()=>{n.showIcon=!0}),f.TSys.loading(!1)},choose:async s=>{n.item.lib=n.lib,n.item.name=s.name,await StrUtil.copyText(`${n.lib}-${s.name}`)},close:()=>{n.show=!1},closeItem:()=>{o("close",{lib:n.item.lib,name:n.item.name,color:n.color}),n.close()}});return e.watch(()=>n.show,()=>{o("update:show",n.show)}),(s,r)=>{const c=e.resolveComponent("el-radio"),i=e.resolveComponent("el-radio-group"),p=e.resolveComponent("el-input"),u=e.resolveComponent("el-switch"),d=e.resolveComponent("el-tooltip"),h=e.resolveComponent("VIcon"),m=e.resolveComponent("el-scrollbar"),b=e.resolveComponent("el-button"),k=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(k,{modelValue:n.show,"onUpdate:modelValue":r[5]||(r[5]=w=>n.show=w),title:n.title,"close-on-click-modal":!1,style:{width:"950px"},"z-index":1e4},{footer:e.withCtx(()=>[e.createElementVNode("span",yt,[e.createVNode(b,{onClick:n.close},{default:e.withCtx(()=>r[15]||(r[15]=[e.createTextVNode("关闭",-1)])),_:1,__:[15]},8,["onClick"]),e.createVNode(b,{type:"primary",onClick:n.closeItem},{default:e.withCtx(()=>r[16]||(r[16]=[e.createTextVNode("确定",-1)])),_:1,__:[16]},8,["onClick"])])]),default:e.withCtx(()=>[e.createElementVNode("div",rt,[e.createVNode(i,{modelValue:n.lib,"onUpdate:modelValue":r[0]||(r[0]=w=>n.lib=w),onChange:n.changeLib},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.libs,w=>(e.openBlock(),e.createBlock(c,{value:w,size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w),1)]),_:2},1032,["value"]))),256))]),_:1},8,["modelValue","onChange"])]),e.createElementVNode("div",it,[r[6]||(r[6]=e.createElementVNode("div",null,"条件:",-1)),e.createVNode(p,{modelValue:n.findName,"onUpdate:modelValue":r[1]||(r[1]=w=>n.findName=w),style:{width:"160px"},placeholder:"查找"},null,8,["modelValue"]),r[7]||(r[7]=e.createElementVNode("div",null,"当前可选图标库数量:",-1)),e.createTextVNode(" "+e.toDisplayString(n.libs.length)+"个 ",1),r[8]||(r[8]=e.createElementVNode("div",null,"当前可选图标数量:",-1)),e.createTextVNode(" "+e.toDisplayString(n.size)+"个 ",1),r[9]||(r[9]=e.createElementVNode("div",null,"总大小:",-1)),r[10]||(r[10]=e.createTextVNode(" 43.49M ",-1))]),e.createElementVNode("div",ct,[r[13]||(r[13]=e.createElementVNode("div",null,"放大:",-1)),e.createVNode(u,{modelValue:n.isbig,"onUpdate:modelValue":r[2]||(r[2]=w=>n.isbig=w)},null,8,["modelValue"]),e.createVNode(d,{effect:"dark",content:"开启时使用图标库上传时的颜色示例:chroma、chromab、bank等多色图标库",placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("div",dt,[r[11]||(r[11]=e.createElementVNode("div",null,"颜色控制:",-1)),e.createVNode(u,{modelValue:n.nofill,"onUpdate:modelValue":r[3]||(r[3]=w=>n.nofill=w)},null,8,["modelValue"])])]),_:1}),!n.nofill&&n.showIcon?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[r[12]||(r[12]=e.createElementVNode("div",null,"颜色:",-1)),e.createVNode(st,{colors:n.color,"onUpdate:colors":r[4]||(r[4]=w=>n.color=w)},null,8,["colors"])],64)):e.createCommentVNode("",!0)]),e.createElementVNode("div",pt,[r[14]||(r[14]=e.createElementVNode("div",null,"当前选中:",-1)),e.createVNode(h,{lib:n.item.lib,name:n.item.name,color:n.color},null,8,["lib","name","color"]),e.createElementVNode("div",mt,e.toDisplayString(n.item.lib)+"-"+e.toDisplayString(n.item.name),1)]),e.createVNode(m,{"max-height":"400px"},{default:e.withCtx(()=>[n.showIcon?(e.openBlock(),e.createElementBlock("div",ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list[n.lib],w=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!n.findName||w.name.indexOf(n.findName)!=-1?(e.openBlock(),e.createElementBlock("div",{key:0,class:"iconlist column flex-center",onClick:N=>n.choose(w),style:e.normalizeStyle({background:w.name===n.item.name&&n.lib===n.item.lib?"#c8ebff":void 0,height:n.isbig?"80px":"60px",width:n.isbig?"180px":"90px"})},[e.createVNode(nt,{isbig:n.isbig,el:w,color:n.color,nofill:n.nofill,lib:n.lib},null,8,["isbig","el","color","nofill","lib"]),e.createElementVNode("div",ht,[e.createElementVNode("div",_t,e.toDisplayString(w.name),1)])],12,ft)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["modelValue","title"])}}}),[["__scopeId","data-v-b9c727d4"]]),bt={class:"flex flex-center"},wt={class:"row"},xt=["onClick"],kt=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(a){const t=e.reactive({routers:[],initRouters:()=>{t.routers=[];const l=(o,n)=>{o.forEach(s=>{if(s.path){let r=s.path.split("/:")[0];r.length&&n.push({path:r,label:r,value:r})}s.children&&l(s.children,n)})};l(f.TSys.routes,t.routers)},icon:{visible:!1,current:null,form:{iconName:"",iconLib:"",iconFill:["#1890ff"]},show(l){t.icon.current=l,t.icon.visible=!0},select(l){t.icon.current.iconLib=l.lib,t.icon.current.iconName=l.name,t.icon.current.iconFill=l.color}},data:[],option:{api:D,data(l){return t.data=_.getTableTree(l),t.data},form:{openBefore:async(l,o)=>{V.form.openBefore.parentId(l.title?l:null,o,t.data,t.option),V.setOptionsData(t.option,"url",t.routers),o.type===f.TSys.EDialog.Add&&(l.title="")},submitBefore(l,o){l.iconName?.length||(l.iconLib="",l.iconName="",l.iconFill=[])}},search:{show:!1},table:{border:!0,index:!1,add:l=>l?.type===0,operate:{width:160}},page:{show:!1},column:[{key:"parentId",label:"父级",type:"treeSelect",value:"0",form:{span:12},options:{treeSelect:{data:[],multiple:!1}},show:{table:!1}},{key:"title",label:"名称",type:"input",value:"",rules:!0,sort:{table:1}},{key:"type",label:"类型",type:"select",value:0,options:{select:{clearable:!1,data:[{label:"目录",value:0},{label:"路由",value:1}]}},sort:{table:2}},{key:"icon",label:"图标",type:"input",value:"",sort:{table:3}},{key:"show",label:"显示",type:"switch",value:1,show:{table:!1}},{key:"url",label:"地址",type:"select",rules:!0,value:"",show:{form:l=>l.type===1},options:{select:{filterable:!0,data:[]}},table:{minWidth:"250px",align:"left"},form:{span:12},sort:{table:4}},{key:"sort",label:"排序",type:"input",value:0,table:{width:"80px",align:"center"},sort:{table:5}},{key:"desc",label:"备注",type:"input",value:"",show:{table:!1}}],tools:{add:l=>l===void 0?!0:l.type===0,update:!0,delete:!0,export:{show:!1},expand:!0}}});return t.initRouters(),(l,o)=>{const n=e.resolveComponent("VIcon"),s=e.resolveComponent("el-tag"),r=e.resolveComponent("el-switch"),c=e.resolveComponent("el-button"),i=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(i,{option:t.option},{"table-icon":e.withCtx(({row:p})=>[e.createElementVNode("div",bt,[p.iconName?(e.openBlock(),e.createBlock(n,{key:0,lib:p.iconLib,name:p.iconName,color:p.iconFill,size:"18"},null,8,["lib","name","color"])):e.createCommentVNode("",!0)])]),"table-type":e.withCtx(({row:p})=>[e.createVNode(s,{type:p.type===0?"warning":void 0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.type===0?"目录":"路由"),1)]),_:2},1032,["type"])]),"form-show":e.withCtx(({row:p,item:u})=>[p.type===1?(e.openBlock(),e.createBlock(r,{key:0,modelValue:p[u.key],"onUpdate:modelValue":d=>p[u.key]=d,"active-value":1,"inactive-value":0},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)]),"form-icon":e.withCtx(({row:p,item:u})=>[e.createElementVNode("div",wt,[e.createVNode(c,{style:{"margin-right":"16px"},onClick:d=>t.icon.show(p)},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("选择图标",-1)])),_:2,__:[1]},1032,["onClick"]),p.iconName?(e.openBlock(),e.createElementBlock("div",{key:0,class:"iconlist",onClick:d=>p.iconName=""},[e.createVNode(n,{lib:p.iconLib,name:p.iconName,color:p.iconFill,size:"26"},null,8,["lib","name","color"])],8,xt)):e.createCommentVNode("",!0)])]),"tools-right":e.withCtx(()=>[e.createVNode(gt,{iconName:t.icon.form.iconName,iconLib:t.icon.form.iconLib,iconFill:t.icon.form.iconFill,show:t.icon.visible,"onUpdate:show":o[0]||(o[0]=p=>t.icon.visible=p),onClose:t.icon.select},null,8,["iconName","iconLib","iconFill","show","onClose"])]),_:1},8,["option"])}}}),[["__scopeId","data-v-72a09943"]])},Symbol.toStringTag,{value:"Module"})),Ct=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({menuList:[],apiList:[],roleList:[],option:{api:A,data(l){return t.roleList=l,l},search:{show:!1},table:{border:!0},page:{show:!1},tools:{export:{show:!1}},column:[{key:"title",label:"名称",type:"input",value:"",rules:!0},{key:"type",label:"角色标识",type:"input",value:"",rules:!0},{key:"status",label:"状态",type:"switch",value:1,options:{switch:{activeValue:1,activeLabel:"启用",inactiveValue:0,inactiveLabel:"禁用"}}},{key:"sort",label:"排序",type:"input",value:0,form:{span:12}},{key:"roleList",label:"角色列表",type:"treeSelect",value:[],options:{treeSelect:{data:[],multiple:!0,collapseTags:!0,maxCollapseTags:4}},show:{table:!1},form:{span:12}},{key:"menuList",label:"菜单列表",type:"treeSelect",value:[],options:{treeSelect:{data:[],multiple:!0,collapseTags:!0,maxCollapseTags:4}},show:{table:!1},form:{span:12}},{key:"apiList",label:"接口列表",type:"treeSelect",value:[],options:{treeSelect:{data:[],multiple:!0,collapseTags:!0,maxCollapseTags:4,checkStrictly:!1}},show:{table:!1},form:{span:12}}],form:{openBefore:async(l,o)=>{if(l||(o.form.sort=t.roleList.length+1),t.menuList.length===0){f.TSys.loading();let n=await D.list({final(s,r,c){f.TSys.loading(!1)}});t.menuList=_.getTableTree(n.data),n=await B.list({final(s,r,c){f.TSys.loading(!1)}}),t.apiList=_.getTableTree(n.data)}V.setOptionsData(t.option,"menuList",t.menuList),V.setOptionsData(t.option,"apiList",t.apiList),V.setOptionsData(t.option,"roleList",t.roleList)}}}});return(l,o)=>{const n=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(n,{option:t.option},null,8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Vt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({data:[],roleList:[],resetLoading:{},option:{api:$,data(o){return o},form:{openBefore:async(o,n)=>{if(t.roleList.length===0){f.TSys.loading();let s=await A.list({final(r,c,i){f.TSys.loading(!1)}});console.log("res.data",s.data),t.roleList=s.data}V.setOptionsData(t.option,"roleList",t.roleList)}},search:{show:!1},table:{selectable:!0,border:!0,operate:{width:210}},tools:{export:{fileName:()=>`用户列表_${new Date().getTime()}`}},column:[{key:"account",label:"账号",type:"input",value:"",sort:{table:1},form:{span:12}},{key:"status",label:"状态",type:"switch",value:1,options:{switch:{activeValue:1,activeLabel:"启用",inactiveValue:0,inactiveLabel:"禁用"}},sort:{table:2},form:{span:12}},{key:"nickname",label:"昵称",type:"input",value:"",sort:{table:1},form:{span:12}},{key:"phone",label:"手机号",type:"input",value:"",sort:{table:3},form:{span:12}},{key:"desc",label:"简介",type:"input",value:"",show:{table:!1},form:{span:12}},{key:"roleList",label:"角色列表",type:"treeSelect",value:[],options:{treeSelect:{data:[],multiple:!0,collapseTags:!0,maxCollapseTags:4}},show:{table:!1},form:{span:12}}]}}),l=async o=>{try{await W.ElMessageBox.confirm(`确定将账号“${o.account}”的密码重置为 123456 吗?`,"重置密码",{type:"warning",confirmButtonText:"确定重置",cancelButtonText:"取消"})}catch{return}t.resetLoading[o._id]=!0;try{await $.resetPassword({_id:o._id}),f.TSys.success("密码已重置为 123456")}finally{t.resetLoading[o._id]=!1}};return(o,n)=>{const s=e.resolveComponent("el-button"),r=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(r,{option:t.option},{"table-op-left":e.withCtx(({row:c})=>[e.createVNode(s,{link:"",type:"primary",loading:t.resetLoading[c._id],onClick:i=>l(c)},{default:e.withCtx(()=>n[0]||(n[0]=[e.createTextVNode(" 重置密码 ",-1)])),_:2,__:[0]},1032,["loading","onClick"])]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"}));class v{static export(t){return http.post("/db/export",t)}static import(t){return http.post({url:"/db/import",headers:{"Content-Type":"multipart/form-data"}},t)}}const Nt={class:"row"},Tt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({import:()=>{const l=document.createElement("input");l.type="file",l.accept=".json,application/json",l.onchange=async o=>{const n=o.target.files[0];if(!n)return;const s=new FileReader;s.onload=async r=>{try{await v.import({file:n}),f.TSys.success("导入覆盖成功")}catch(c){console.error("上传的文件不是合法JSON",c)}},s.readAsText(n)},l.click()},export:async()=>{const{data:l}=await v.export();f.TSys.success("备份成功"+l,{duration:3e3})}});return(l,o)=>{const n=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Nt,[e.createVNode(n,{onClick:t.export},{default:e.withCtx(()=>o[0]||(o[0]=[e.createTextVNode("备份数据",-1)])),_:1,__:[0]},8,["onClick"]),e.createVNode(n,{onClick:t.import},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("导入覆盖",-1)])),_:1,__:[1]},8,["onClick"])])}}})},Symbol.toStringTag,{value:"Module"})),St=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({param:{host:"1518079148@qq.com"},option:{api:K,data(l){return l.forEach(o=>{o.createTime=new Date(o.createTime).Format()}),l},table:{selectable:!0,column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}}]},tools:{export:{fileName:()=>`邮件配置_${new Date().getTime()}`,before(l){const o={1:"是",0:"否"};l.data.forEach(n=>{n.secure=o[n.secure],n.enabled=o[n.enabled]})}}},column:[{key:"host",label:"SMTP地址",type:"input",value:"",show:{search:!0}},{key:"port",label:"SMTP端口",type:"input",value:""},{key:"user",label:"SMTP邮箱",type:"input",value:"",show:{search:!0}},{key:"pass",label:"SMTP密码",type:"input",value:"",disabled:{update:!0},show:{table:!1}},{key:"secure",label:"SSL加密",type:"switch",value:1},{key:"enabled",label:"启用状态",type:"switch",value:0,show:{search:!0}},{key:"desc",label:"备注",type:"input",value:"",update:{span:12},rules:!0}]},email:{async send(){await http.post("/email/send",{to:t.param.host,title:"测试邮件标题",content:"测试邮件内容666"}),f.TSys.success("发送成功")}}});return(l,o)=>{const n=e.resolveComponent("el-input"),s=e.resolveComponent("el-button"),r=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(r,{option:t.option},{"tools-right":e.withCtx(()=>[e.createVNode(n,{modelValue:t.param.host,"onUpdate:modelValue":o[0]||(o[0]=c=>t.param.host=c),placeholder:"邮件地址",style:{width:"150px"}},null,8,["modelValue"]),e.createVNode(s,{type:"danger",onClick:t.email.send},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("发送邮件测试",-1)])),_:1,__:[1]},8,["onClick"])]),"table-host":e.withCtx(({row:c})=>[e.createTextVNode(e.toDisplayString(c.host),1)]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),$t={class:"user-info"},Et=["src"],Lt={class:"user-info-cont"},Bt={class:"user-info-name"},Pt=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(a){return(t,l)=>{const o=e.resolveComponent("el-card"),n=e.resolveComponent("el-col"),s=e.resolveComponent("el-row");return e.openBlock(),e.createBlock(s,{gutter:20},{default:e.withCtx(()=>[e.createVNode(n,null,{default:e.withCtx(()=>[e.createVNode(o,{shadow:"hover",class:"mgb20"},{default:e.withCtx(()=>[e.createElementVNode("div",$t,[e.createElementVNode("img",{src:e.unref(g).staticDir+"/images/head.jpg",class:"user-avator",alt:""},null,8,Et),e.createElementVNode("div",Lt,[e.createElementVNode("div",Bt,e.toDisplayString(e.unref(x).userInfo.nickname),1),e.createElementVNode("div",null,"欢迎"+e.toDisplayString(e.unref(x).userInfo.nickname)+"进入后台管理",1)])]),l[0]||(l[0]=e.createElementVNode("div",{class:"user-info-list"},[e.createElementVNode("div",{class:"user-info-list-item"},[e.createElementVNode("div",{class:"user-info-list-item-label"},"欢迎使用后台管理系统,左侧导航栏可快速访问各模块")])],-1))]),_:1,__:[0]})]),_:1})]),_:1})}}}),[["__scopeId","data-v-28a63a57"]])},Symbol.toStringTag,{value:"Module"})),It=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=(o,n="内容")=>{W.ElMessageBox.alert(`<div style="white-space: pre-wrap; width: 1000px; word-break: break-all;">${o}</div>`,n,{confirmButtonText:"确定",dangerouslyUseHTMLString:!0})},l=e.reactive({option:{api:J,data(o){return o.forEach(n=>{n.createTime=new Date(n.createTime).Format()}),o},table:{selectable:!0,column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}},{key:"status",label:"状态码",type:"input",value:"",table:{width:"100px"}}]},tools:{add:!1,update:!1,export:{fileName:()=>`错误日志_${new Date().getTime()}`}},column:[{key:"ip",label:"IP地址",type:"input",value:"",show:{search:!0},table:{width:"120px",align:"left"}},{key:"path",label:"请求路径",type:"input",value:"",show:{search:!0},table:{minWidth:"180px",align:"left"}},{key:"method",label:"请求方法",type:"select",value:"",show:{search:!0},table:{minWidth:"100px"},options:{select:{data:[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"PUT",value:"PUT"},{label:"DELETE",value:"DELETE"}]}}},{key:"params",label:"请求参数",type:"input",value:"",table:{slot:!0}},{key:"userAgent",label:"用户代理",type:"input",value:""},{key:"error",label:"错误信息",type:"input",value:"",show:{search:!0},table:{minWidth:"140px"}},{key:"stack",label:"错误堆栈",type:"input",value:"",table:{show:!1}}]}});return(o,n)=>{const s=e.resolveComponent("el-button"),r=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(r,{option:l.option},{"table-params":e.withCtx(({row:c})=>[e.createVNode(s,{type:"primary",link:"",onClick:i=>t(c.params,"请求参数")},{default:e.withCtx(()=>n[0]||(n[0]=[e.createTextVNode("查看",-1)])),_:2,__:[0]},1032,["onClick"])]),"table-userAgent":e.withCtx(({row:c})=>[e.createVNode(s,{type:"primary",link:"",onClick:i=>t(c.userAgent,"用户代理")},{default:e.withCtx(()=>n[1]||(n[1]=[e.createTextVNode("查看",-1)])),_:2,__:[1]},1032,["onClick"])]),"table-stack":e.withCtx(({row:c})=>[e.createVNode(s,{type:"primary",link:"",onClick:i=>t(c.stack,"错误堆栈")},{default:e.withCtx(()=>n[2]||(n[2]=[e.createTextVNode("查看",-1)])),_:2,__:[2]},1032,["onClick"])]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Ot=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({option:{api:H,data(l){return l.forEach(o=>{o.createTime=new Date(o.createTime).Format(),o.status=o.status?"成功":"失败"}),l},table:{selectable:!0,column:[{key:"createTime",label:"登录时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}}]},tools:{add:!1,update:!1,delete(l){return x.hasApi("/auth/loginLog/delete")},export:{fileName:()=>`登录日志_${new Date().getTime()}`}},column:[{key:"account",label:"登录账号",type:"input",value:"",show:{search:!0}},{key:"ip",label:"IP地址",type:"input",value:"",show:{search:!0}},{key:"os",label:"操作系统",type:"input",value:""},{key:"status",label:"登录状态",type:"switch",value:0,show:{search:!0},options:{switch:{activeLabel:"成功",inactiveLabel:"失败"}}},{key:"msg",label:"失败原因",type:"input",value:""}]}});return(l,o)=>{const n=e.resolveComponent("el-tag"),s=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(s,{option:t.option},{"table-status":e.withCtx(({row:r})=>[e.createVNode(n,{type:r.status==="成功"?"success":"danger"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.status),1)]),_:2},1032,["type"])]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Dt=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(a){const t=e.ref(),l=e.ref(),o=e.reactive({activeTab:"profile",profileLoading:!1,passwordLoading:!1,profile:{account:"",nickname:"",phone:"",desc:""},password:{oldPassword:"",newPassword:"",confirmPassword:""}}),n={nickname:[{required:!0,message:"请输入昵称",trigger:"blur"},{max:100,message:"昵称不能超过 100 个字符",trigger:"blur"}],phone:[{validator:(p,u,d)=>{!u||/^1\d{10}$/.test(u)?d():d(new Error("请输入正确的手机号"))},trigger:"blur"}]},s={oldPassword:[{required:!0,message:"请输入原密码",trigger:"blur"}],newPassword:[{required:!0,message:"请输入新密码",trigger:"blur"},{min:6,message:"新密码至少 6 位",trigger:"blur"}],confirmPassword:[{required:!0,message:"请再次输入新密码",trigger:"blur"},{validator:(p,u,d)=>{u===o.password.newPassword?d():d(new Error("两次输入的密码不一致"))},trigger:"blur"}]},r=async()=>{o.profileLoading=!0;try{const p=await $.profile();Object.assign(o.profile,{account:p.data.account||"",nickname:p.data.nickname||"",phone:p.data.phone||"",desc:p.data.desc||""})}finally{o.profileLoading=!1}},c=async()=>{if(await t.value?.validate().catch(()=>!1)){o.profileLoading=!0;try{const p=await $.updateProfile({nickname:o.profile.nickname,phone:o.profile.phone,desc:o.profile.desc});Object.assign(o.profile,p.data),x.updateUserInfo(p.data),f.TSys.success("个人信息修改成功")}finally{o.profileLoading=!1}}},i=async()=>{if(await l.value?.validate().catch(()=>!1)){o.passwordLoading=!0;try{await $.changePassword({oldPassword:o.password.oldPassword,newPassword:o.password.newPassword}),f.TSys.success("密码修改成功,请重新登录"),x.clearInfo(),await f.TSys.router.replace("/login")}finally{o.passwordLoading=!1}}};return e.onMounted(r),(p,u)=>{const d=e.resolveComponent("el-input"),h=e.resolveComponent("el-form-item"),m=e.resolveComponent("el-button"),b=e.resolveComponent("el-form"),k=e.resolveComponent("el-tab-pane"),w=e.resolveComponent("el-tabs"),N=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(N,{class:"profile-card",shadow:"never"},{header:e.withCtx(()=>u[8]||(u[8]=[e.createElementVNode("div",{class:"card-title"},"个人中心",-1)])),default:e.withCtx(()=>[e.createVNode(w,{modelValue:o.activeTab,"onUpdate:modelValue":u[7]||(u[7]=C=>o.activeTab=C)},{default:e.withCtx(()=>[e.createVNode(k,{label:"个人信息",name:"profile"},{default:e.withCtx(()=>[e.createVNode(b,{ref_key:"profileFormRef",ref:t,model:o.profile,rules:n,"label-width":"90px",class:"profile-form"},{default:e.withCtx(()=>[e.createVNode(h,{label:"账号"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.profile.account,"onUpdate:modelValue":u[0]||(u[0]=C=>o.profile.account=C),disabled:""},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"昵称",prop:"nickname"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.profile.nickname,"onUpdate:modelValue":u[1]||(u[1]=C=>o.profile.nickname=C),maxlength:"100","show-word-limit":""},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"手机号",prop:"phone"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.profile.phone,"onUpdate:modelValue":u[2]||(u[2]=C=>o.profile.phone=C),maxlength:"11",placeholder:"请输入手机号"},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"个人简介",prop:"desc"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.profile.desc,"onUpdate:modelValue":u[3]||(u[3]=C=>o.profile.desc=C),type:"textarea",rows:4,maxlength:"1000","show-word-limit":"",placeholder:"请输入个人简介"},null,8,["modelValue"])]),_:1}),e.createVNode(h,null,{default:e.withCtx(()=>[e.createVNode(m,{type:"primary",loading:o.profileLoading,onClick:c},{default:e.withCtx(()=>u[9]||(u[9]=[e.createTextVNode("保存修改",-1)])),_:1,__:[9]},8,["loading"])]),_:1})]),_:1},8,["model"])]),_:1}),e.createVNode(k,{label:"修改密码",name:"password"},{default:e.withCtx(()=>[e.createVNode(b,{ref_key:"passwordFormRef",ref:l,model:o.password,rules:s,"label-width":"90px",class:"profile-form"},{default:e.withCtx(()=>[e.createVNode(h,{label:"原密码",prop:"oldPassword"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.password.oldPassword,"onUpdate:modelValue":u[4]||(u[4]=C=>o.password.oldPassword=C),type:"password","show-password":"",autocomplete:"current-password"},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"新密码",prop:"newPassword"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.password.newPassword,"onUpdate:modelValue":u[5]||(u[5]=C=>o.password.newPassword=C),type:"password","show-password":"",autocomplete:"new-password"},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"确认密码",prop:"confirmPassword"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.password.confirmPassword,"onUpdate:modelValue":u[6]||(u[6]=C=>o.password.confirmPassword=C),type:"password","show-password":"",autocomplete:"new-password"},null,8,["modelValue"])]),_:1}),e.createVNode(h,null,{default:e.withCtx(()=>[e.createVNode(m,{type:"primary",loading:o.passwordLoading,onClick:i},{default:e.withCtx(()=>u[10]||(u[10]=[e.createTextVNode("修改密码",-1)])),_:1,__:[10]},8,["loading"])]),_:1})]),_:1},8,["model"])]),_:1})]),_:1},8,["modelValue"])]),_:1})}}}),[["__scopeId","data-v-b691a248"]])},Symbol.toStringTag,{value:"Module"})),At=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({option:{api:Y,data(l){return l.forEach(o=>{o.createTime=new Date(o.createTime).Format(),o.lastTime=o.lastTime?new Date(Number(o.lastTime)).Format():"-"}),l},table:{selectable:!0,column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}},{key:"lastTime",label:"最后执行时间",type:"input",value:"",table:{width:"180px"}}]},tools:{export:{fileName:()=>`定时任务_${new Date().getTime()}`,before(l){const o={0:"正常",1:"暂停"},n={0:"允许",1:"禁止"};l.data.forEach(s=>{s.status=o[s.status],s.concurrent=n[s.concurrent]})}}},column:[{key:"name",label:"任务名称",type:"input",value:"",show:{search:!0},rules:!0},{key:"group",label:"任务组",type:"input",value:"",show:{search:!0},rules:!0},{key:"cron",label:"Cron表达式",type:"input",value:"",rules:!0},{key:"target",label:"调用目标",type:"input",value:"",rules:!0},{key:"params",label:"参数",type:"input",value:""},{key:"status",label:"启用状态",type:"switch",value:0,show:{search:!0},options:{switch:{activeValue:1,inactiveValue:0}}}]}});return(l,o)=>{const n=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(n,{option:t.option},null,8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),jt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({param:{phone:"",code:"123456"},option:{api:j,data(l){return l.forEach(o=>{o.createTime=new Date(o.createTime).Format()}),l},table:{selectable:!0,column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}}]},tools:{export:{fileName:()=>`短信配置_${new Date().getTime()}`,before(l){const o={1:"是",0:"否"};l.data.forEach(n=>{n.enabled=o[n.enabled]})}}},column:[{key:"provider",label:"短信服务商",type:"select",value:"",show:{search:!0},options:{select:{data:[{label:"阿里云",value:"ALIYUN"},{label:"腾讯云",value:"TENCENT"}]}}},{key:"accessKeyId",label:"AccessKey",type:"input",value:""},{key:"accessKeySecret",label:"Secret",type:"input",value:"",disabled:{update:!0},show:{table:!1}},{key:"signName",label:"短信签名",type:"input",value:""},{key:"templateId",label:"短信模板ID",type:"input",value:""},{key:"sdkAppId",label:"应用ID",type:"input",value:""},{key:"signId",label:"签名ID",type:"input",value:""},{key:"enabled",label:"启用状态",type:"switch",value:0,show:{search:!0}},{key:"desc",label:"备注",type:"input",value:"",update:{span:12}}]},sms:{async send(){if(!t.param.phone){f.TSys.success("请输入手机号码");return}await j.send({phone:t.param.phone,templateParam:{code:t.param.code}}),f.TSys.success("发送成功")}}});return(l,o)=>{const n=e.resolveComponent("el-input"),s=e.resolveComponent("el-button"),r=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(r,{option:t.option},{"tools-right":e.withCtx(()=>[e.createVNode(n,{modelValue:t.param.phone,"onUpdate:modelValue":o[0]||(o[0]=c=>t.param.phone=c),placeholder:"手机号码",style:{width:"150px"}},null,8,["modelValue"]),e.createVNode(n,{modelValue:t.param.code,"onUpdate:modelValue":o[1]||(o[1]=c=>t.param.code=c),placeholder:"验证码",style:{width:"100px"}},null,8,["modelValue"]),e.createVNode(s,{type:"danger",onClick:t.sms.send},{default:e.withCtx(()=>o[2]||(o[2]=[e.createTextVNode("发送短信测试",-1)])),_:1,__:[2]},8,["onClick"])]),"table-provider":e.withCtx(({row:c})=>[e.createTextVNode(e.toDisplayString(c.provider==="ALIYUN"?"阿里云":"腾讯云"),1)]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Ut=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({option:{api:G,data(l){return l.forEach(o=>{o.createTime=new Date(o.createTime).Format(),o.updateTime=new Date(o.updateTime).Format()}),l},table:{selectable:!0,column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{minWidth:"180px"}},{key:"updateTime",label:"更新时间",type:"input",value:"",table:{minWidth:"180px"}}]},tools:{export:{fileName:()=>`系统配置_${new Date().getTime()}`}},column:[{key:"key",label:"配置键",type:"input",value:"",show:{search:!0},rules:!0},{key:"groupKey",label:"分组键",type:"input",value:"",show:{search:!0},rules:!0},{key:"groupValue",label:"分组名称",type:"input",value:"",rules:!0},{key:"system",label:"系统内置",type:"switch",value:0,show:{search:!0},options:{switch:{activeValue:1,inactiveValue:0,activeLabel:"是",inactiveLabel:"否"}}},{key:"desc",label:"配置说明",type:"input",value:"",form:{span:12}},{key:"value",label:"配置值",type:"input",value:"",rules:!0,table:{showOverflowTooltip:!0},form:{span:12},options:{input:{type:"textarea"}}}]}});return(l,o)=>{const n=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(n,{option:t.option},{"table-value":e.withCtx(({row:s})=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Mt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({option:{api:Z,data(l){return l.forEach(o=>{o.createTime=new Date(o.createTime).Format(),o.updateTime=new Date(o.updateTime).Format(),o.expireTime&&(o.expireTime=new Date(o.expireTime))}),l},table:{border:!0,column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{minWidth:"180px"},sort:{table:99}}]},tools:{export:{fileName:()=>`租户管理_${new Date().getTime()}`,before:l=>{l.data.forEach(o=>{o.expireTime&&(o.expireTime=new Date(o.expireTime).Format())})}}},column:[{key:"name",label:"租户名称",type:"input",value:"",rules:!0,show:{search:!0},sort:{table:1}},{key:"code",label:"租户编码",type:"input",value:"",rules:!0,show:{search:!0},sort:{table:2}},{key:"type",label:"租户类型",type:"select",value:1,options:{select:{data:[{label:"单库多租户",value:1},{label:"多库多租户",value:2}]}},rules:!0,show:{search:!0},sort:{table:3}},{key:"domain",label:"域名",type:"input",value:"",rules:!0,show:{table:!1,search:!0},sort:{table:4}},{key:"expireTime",label:"过期时间",type:"datetime",value:new Date,table:{minWidth:"180px"},sort:{table:100}},{key:"contactName",label:"联系人",type:"input",value:"",sort:{table:7}},{key:"contactPhone",label:"联系电话",type:"input",value:"",sort:{table:8}},{key:"dbUrl",label:"数据库连接",type:"input",value:"",rules:!0,show:{form:l=>l.type===2,table:!1}}]}});return(l,o)=>{const n=e.resolveComponent("el-tag"),s=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(s,{option:t.option},{"table-type":e.withCtx(({row:r})=>[e.createVNode(n,{type:r.type===1?"success":"warning"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.type===1?"单库多租户":"多库多租户"),1)]),_:2},1032,["type"])]),"table-expireTime":e.withCtx(({row:r})=>[e.createVNode(n,{type:r.expireTime<new Date().getTime()?"danger":"success"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(new Date(r.expireTime).Format()),1)]),_:2},1032,["type"])]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),zt=e.defineComponent({__name:"index",props:{row:{default:{}},field:{default:"value"},itemFields:{default:[]},imgField:{default:""}},emits:["change"],setup(a,{emit:t}){const l=a,o=t,n=e.reactive({upload:{handler:s=>{_.upload.handler({callback:r=>{s[l.imgField]=r,o("change")}})}}});return(s,r)=>{const c=e.resolveComponent("el-button"),i=e.resolveComponent("TFormList");return e.openBlock(),e.createBlock(i,{row:a.row,field:a.field,itemFields:a.itemFields,onChange:r[0]||(r[0]=p=>o("change",p))},{"item-end":e.withCtx(({item:p})=>[a.imgField?(e.openBlock(),e.createBlock(c,{key:0,link:"",type:"primary",onClick:u=>n.upload.handler(p)},{default:e.withCtx(()=>r[1]||(r[1]=[e.createTextVNode("上传图片",-1)])),_:2,__:[1]},1032,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(s.$slots,"item-end",{item:p},()=>[a.imgField?(e.openBlock(),e.createBlock(c,{key:0,link:"",type:"primary",onClick:u=>e.unref(_).preview.open(a.row[a.field].map(d=>d[a.imgField]),a.row[a.field].findIndex(d=>d[a.imgField]===p[a.imgField]))},{default:e.withCtx(()=>r[2]||(r[2]=[e.createTextVNode(" 查看图片 ",-1)])),_:2,__:[2]},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:3},8,["row","field","itemFields"])}}}),Rt=e.defineComponent({__name:"index",setup(a){return e.watch(()=>f.TSys.router.currentRoute.value.path,(t,l)=>{CEvent.emit(M.change,t)},{immediate:!0}),(t,l)=>null}}),ee=a=>{a.component("xRouteEvent",Rt),a.component("xFormList",zt)},Ft=Object.freeze(Object.defineProperty({__proto__:null,default:{install:ee},install:ee},Symbol.toStringTag,{value:"Module"}));y.ApiApp=U,y.ApiAuthApi=B,y.ApiAuthMenu=D,y.ApiAuthPhone=ie,y.ApiAuthRole=A,y.ApiAuthUser=$,y.ApiCaptcha=q,y.ApiCron=ce,y.ApiEmailConfig=K,y.ApiErrorLog=J,y.ApiJob=Y,y.ApiLoginLog=H,y.ApiSmsConfig=j,y.ApiSystemConfig=G,y.ApiSystemTenant=Z,y.ERouter=M,y.System=g,y.initApp=Ne,y.scurd=V,y.ssys=_,y.suser=x,y.sutil=T,y.svf=z,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(g,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("cc1-vue3"),require("cc1-ui"),require("cc1-form"),require("vue-router"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","cc1-vue3","cc1-ui","cc1-form","vue-router","element-plus"],e):(g=typeof globalThis<"u"?globalThis:g||self,e(g.nestAuthAdmin={},g.Vue,g.cc1Vue3,g.toolsVueUI,g.cc1Form,g.VueRouter,g.ElementPlus))})(this,(function(g,e,K,ie,y,L,U){"use strict";class O{static list(t){return http.post("/auth/permission/list",t)}static updateStatus(t){return http.post("/auth/permission/updateStatus",t)}}class M{static list(t){return http.post("/auth/menu/list",t)}static create(t){return http.post("/auth/menu/create",t)}static update(t){return http.post("/auth/menu/update",t)}static delete(t){return http.post("/auth/menu/delete",t)}}class ce{static sendCode(t){return http.post("/auth/phone/sendCode",{phone:t})}}class B{static managerRoleId="";static setManagerRoleId(t){this.managerRoleId=t}static withManager(t){return{...t||{},managerRoleId:t?.managerRoleId||this.managerRoleId}}static list(t){return http.post("/auth/role/list",t)}static assignable(t){return http.post("/auth/role/assignable",t)}static create(t){return http.post("/auth/role/create",this.withManager(t))}static update(t){return http.post("/auth/role/update",this.withManager(t))}static delete(t){const n=t,l=n?.ids||(Array.isArray(n?._id)?n._id:[n?._id].filter(Boolean));return http.post("/auth/role/delete",this.withManager({...n||{},ids:l}))}}class ${static temporaryPasswordHandler;static list(t){return http.post("/auth/user/list",t)}static create(t){return http.post("/auth/user/create",t).then(n=>(this.temporaryPasswordHandler?.(t?.account||"",n.data.temporaryPassword),n))}static update(t){return http.post("/auth/user/update",t)}static delete(t){const n=t,l=Array.isArray(n?._id)?n._id[0]:n?._id||n?.ids?.[0];return http.post("/auth/user/delete",{...n||{},_id:l})}static resetPassword(t){return http.post("/auth/user/resetPassword",t).then(n=>(this.temporaryPasswordHandler?.(t?.account||"",n.data.temporaryPassword),n))}static transfer(t){return http.post("/auth/user/transfer",t)}static profile(t){return http.post("/auth/user/profile",t)}static updateProfile(t){return http.post("/auth/user/updateProfile",t)}static changePassword(t){return http.post("/auth/user/changePassword",t)}static login(t){return http.post("/auth/user/login",t)}}class z{static current(t){return http.post("/auth/session/current",t)}static logout(t){return http.post("/auth/session/logout",t)}}class J{static send(t){return http.post("/captcha/send",t)}static verify(t){return http.post("/captcha/verify",t)}}class Y{static list(t){return http.post("/auth/loginLog/list",t)}static delete(t){return http.post("/auth/loginLog/delete",t)}}class de{static list(t){return http.post({url:"cron/list",method:"post"},{...t})}static save(t){return http.post({url:"cron/save",method:"post"},t)}static remove(t){return http.post({url:"cron/remove",method:"post"},{id:t})}}class G{static list(t){return http.post("/email/config/list",t)}static create(t){return http.post("/email/config/create",t)}static update(t){return http.post("/email/config/update",t)}static delete(t){return http.post("/email/config/delete",t)}}class Z{static list(t){return http.post("/log/error/list",t)}static delete(t){return http.post("/log/error/delete",t)}}class X{static list(t){return http.post("/schedule/job/list",t)}static create(t){return http.post("/schedule/job/create",t)}static update(t){return http.post("/schedule/job/update",t)}static delete(t){return http.post("/schedule/job/delete",t)}static execute(t){return http.post("/schedule/job/execute",t)}static changeStatus(t){return http.post("/schedule/job/changeStatus",t)}}class F{static list(t){return http.post("/sms/config/list",t)}static create(t){return http.post("/sms/config/create",t)}static update(t){return http.post("/sms/config/update",t)}static delete(t){return http.post("/sms/config/delete",t)}static send(t){return http.post("/sms/config/send",t)}}class q{static time(t){return http.post("/app/time",t)}static upload(t){return http.post({url:"/app/upload",headers:{"Content-Type":"multipart/form-data"}},t)}}class Q{static list(t){return http.post("/system/config/list",t)}static create(t){return http.post("/system/config/create",t)}static update(t){return http.post("/system/config/update",t)}static delete(t){return http.post("/system/config/delete",t)}}const R={ERouter:{change:"",reload:""}};Object.keys(R).forEach(s=>{const t=R[s];Object.keys(t).forEach(n=>{R[s][n]=`${s}_${n}`})});const W=R.ERouter,v=()=>({token:"",mustChangePassword:!1,userInfo:{},roleInfo:{roles:[],permissionUrls:[],menus:[]}}),h=e.reactive({session:v(),userInfo:{},token:"",loaded:!1,loading:null,load:()=>{h.token=Cookie.get("token")||""},setSession:s=>{h.session=s,h.userInfo=s.userInfo,h.token=s.token,h.loaded=!0,Cookie.set("token",s.token),k.setMenuList(k.getTableTree(s.roleInfo.menus),s.roleInfo.menus)},refresh:async()=>h.token?h.loading?await h.loading:(h.loading=z.current().then(s=>(h.setSession(s.data),!0)).catch(()=>!1).finally(()=>{h.loading=null}),await h.loading):!1,updateUserInfo:s=>{h.userInfo={...h.userInfo,...s},h.session.userInfo=h.userInfo},clearInfo:()=>{h.session=v(),h.token="",h.userInfo={},h.loaded=!1,k.setMenuList([],[]),Cookie.remove("token")},hasPermission:s=>h.session.roleInfo.permissionUrls.includes(s)});class I{static baseUrl="";static init(){const t=(l,o,...a)=>{o.forEach(r=>{l[r]&&l[r](...a)})},n=(l,o,a)=>{let r=a?.data?.code||l,d=a?.data.message;o.data.toast?o.data.toast(r,a,o):y.TSys.fail(w.i18n.t(`code.${r}`,{msg:d||"请求异常"})||w.i18n.t("code.OtherException")),t(o.data,["final","fail","complete"],l==200,o,a),r==401&&(h.clearInfo(),o.data.toLogin?.()!==!1&&y.TSys.router.replace("/login"))};http.setConfig({base:I.baseUrl,before(l){l.param.headers=l.param.headers||{},Object.keys(l.data).forEach(a=>{(l.data[a]===void 0||l.data[a]===null)&&delete l.data[a]});const o=h.token||"";o&&(l.param.headers.Token=o)},after(l,o){const{code:a}=l.data;if(a!=200){o.res=l.data,l.status=a;return}t(o.data,["final","success","complete"],l.data,o,l)},error:n})}}class w{static env;static i18n;static elementLocale;static staticDir;static config;static setConfig(t){const n={website:{recordNumber:"ICP备000000000号-1",author:"Copyright © 2022-2025 Design By Veigar"},staticDir:"/static_admin"};this.config=ObjectUtil.deepMerge(n,t),this.env=this.config.env,this.i18n=this.config.i18n,this.staticDir=this.config.staticDir,this.elementLocale=this.config.elementLocale,I.baseUrl=this.env.API}static getBaseUrl(t){return t=I.baseUrl.replace("/api","/")+t,t=t.replace(/(?<!:)\/{2,}/g,"/"),t}}const pe=s=>{const t=JSONUtil.cp(s||[]),n=l=>t.filter(a=>{let r=a.parentId||"0";return typeof a.parentId=="string"&&a.parentId.includes(",")&&(r=a.parentId.split(",").pop()),r===l}).map(a=>({...a,children:n(a._id)})).sort((a,r)=>a.sort-r.sort);return n("0")},k=e.reactive({getTableTree:pe,auth:{list:["/api/system/list","/api/system/detail"],isPass:s=>k.auth.list.includes(s)},load:()=>{k.menuListSource=[],k.menuList=[]},layout:{collapse:!1},menuListSource:[],menuList:[],setMenuList:(s,t)=>{k.menuList=s,k.menuListSource=JSONUtil.cp(t)},getMenuList:async()=>JSONUtil.cp(k.menuList),upload:{handler:s=>{const t=document.createElement("input");t.type="file",t.accept=s.accept||"image/*",t.multiple=s.multiple||!1,t.onchange=async n=>{const l=n.target.files[0];if(l){const o=await q.upload({file:l});s.callback(o.data),s.toast,y.TSys.success("上传成功")}else s.callback("")},t.click()}},preview:{show:!1,srcList:[],index:0,open:(s,t=0)=>{k.preview.index=t,k.preview.srcList=s.map(n=>w.getBaseUrl(n)),k.preview.show=!0}}}),me=e.defineComponent({name:"App",__name:"App",setup(s){const t=e.reactive({locale:w.elementLocale,show:!0,reload:()=>{t.show=!1,e.nextTick(()=>{t.show=!0})}});return CEvent.on(W.reload,t.reload),(n,l)=>{const o=e.resolveComponent("x-route-event"),a=e.resolveComponent("router-view"),r=e.resolveComponent("el-image-viewer"),d=e.resolveComponent("el-config-provider");return e.openBlock(),e.createBlock(d,{locale:t.locale},{default:e.withCtx(()=>[e.createVNode(o),e.createVNode(a),e.unref(k).preview.show?(e.openBlock(),e.createBlock(r,{key:0,"url-list":e.unref(k).preview.srcList,"initial-index":e.unref(k).preview.index,onClose:l[0]||(l[0]=i=>e.unref(k).preview.show=!1)},null,8,["url-list","initial-index"])):e.createCommentVNode("",!0)]),_:1},8,["locale"])}}}),N=e.reactive({findOptions:(s,t)=>{const n=s.column.find(o=>o.key===t),l=o=>o.replace(/-([a-z])/g,(a,r)=>r.toUpperCase());if(n)return n.options[l(n.type)]},setOptionsData:(s,t,n)=>{const l=N.findOptions(s,t);l&&(l.data=n)},form:{openBefore:{parentId:(s,t,n,l)=>{s?t.type===y.TSys.EDialog.Add?(t.form.parentId=s._id,t.form.sort=s.children.length+1,t.form._id=void 0):t.form.parentId=s.parentId.substring(s.parentId.lastIndexOf(",")+1):(t.form.parentId="0",t.form.sort=n.length+1),N.setOptionsData(l,"parentId",[{_id:"0",title:"根",children:n}])}}}}),E=e.reactive({baseUrl:"",reset:()=>{},store:{},getStore(s){return E.store[s]},getDateOptions:(s=!0)=>{const t=[];s&&t.push({label:w.i18n.t("dateOptions.AllDates"),value:null,key:"all"}),t.push({label:w.i18n.t("dateOptions.Today"),value:TimeUtil.somedayse(),key:"today"}),t.push({label:w.i18n.t("dateOptions.Yesterday"),value:TimeUtil.somedayse(-1),key:"yesterday"});const n=new Date,l=TimeUtil.somedayse,o=n.getDay(),a=l(1-o)[0],r=l(7-o)[1],d={label:w.i18n.t("dateOptions.ThisWeek"),value:[a,r],key:"thisWeek"};t.push(d);const i=l(1-o-7)[0],u=l(7-o-7)[1],m={label:w.i18n.t("dateOptions.LastWeek"),value:[i,u],key:"lastWeek"};t.push(m);const c=new Date;c.setDate(1);const f=l(0,c);c.setMonth(c.getMonth()+1),c.setDate(1),c.setDate(c.getDate()-1);const p=l(0,c),x={label:w.i18n.t("dateOptions.ThisMonth"),value:[f[0],p[1]],key:"thisMonth"};return t.push(x),t}}),H=e.reactive({getVf:(s,t,n)=>{const l={};n===void 0&&(n=H.inputVal);for(const o in t)l[o]=a=>{s[o]=null,n({val:a.target.value,after:r=>{s[o]=r},...t[o]})};return l},inputVal:s=>{let{val:t,length:n,trim:l=!0,fixed:o=2,min:a=0,max:r=1e9}=s;l&&(t=t.replace(/\s+|\s+$/g,""));const d={int:i=>(i=i.replace(/[^\d]/g,""),i=Number(i)||0,i=a&&i<a?a:i,i=r&&i>r?r:i,i),float:i=>(i=i.replace(/^0(\d)/,"$1").replace(/^\./,"0").replace(/[^\d.]/g,"").replace(/^(\d*\.?\d*).*$/,"$1").replace(new RegExp(`^(\\d+)\\.(\\d{${o}}).*`),"$1.$2"),i),hanzi:i=>(i=i.replace(/[^\u4e00-\u9fa5]/g,""),i),Num:"0-9",En:"a-zA-Z",Hanzi:"一-龥"};if(t.length){n&&t.length>n&&(t=t.substring(0,n));const i=[],u=[],m=(c,f,p)=>{c===f?Array.isArray(s[c])?p.push(...s[c]):p.push(s[c]):p.push(d[c.substring(3)])};Object.keys(s).forEach(c=>{c.startsWith("get")?m(c,"getCustom",i):c.startsWith("del")?m(c,"delCustom",u):d[c]&&(t=d[c](t))}),i.length&&(t=t.replace(new RegExp(`[^${i.join("")}]`,"g"),"")),u.length&&(t=t.replace(new RegExp(`[${u.join("")}]`,"g"),""))}return s.after(t),t}}),ue={install:s=>{const t=Cookie.clear.bind(Cookie);Cookie.clear=async(n,l)=>{n=n||{},n.excludeList=n.excludeList||[],n.excludeList.push("apiurl"),await t(n,l)}}},fe={install:s=>{}};let D={},A={};const he={install:s=>{s.use(ie),D=Cookie.get("iconObj")||{},A=Cookie.get("siconObj")||{},VConf.vicon.fun.getRes=async t=>D[t],VConf.vicon.fun.setRes=(t,n)=>{D[t]=n,Cookie.set("iconObj",D)},VConf.vsicon.url=w.staticDir+"/vicon/svg",VConf.vsicon.lib="",VConf.vsicon.fun.getRes=async t=>A[t],VConf.vsicon.fun.setRes=(t,n)=>{A[t]=n,Cookie.set("siconObj",A)}}},_e={style:{border:"1px solid #ccc"}},ge=e.defineComponent({__name:"index",props:{modelValue:{type:String,default:""}},emits:["update:modelValue"],setup(s,{emit:t}){const n=e.defineAsyncComponent(()=>y.TSys.loadModule("editor").then(c=>c.Editor)),l=e.defineAsyncComponent(()=>y.TSys.loadModule("editor").then(c=>c.Toolbar)),o=s,a=t,r=e.shallowRef(),d=e.ref(o.modelValue);e.watch(d,c=>{a("update:modelValue",c)});const i={excludeKeys:["group-video"]},u={placeholder:"请输入内容...",MENU_CONF:{uploadImage:{async customUpload(c,f){const p=await q.upload({file:c});p.data=w.getBaseUrl(p.data),f(p.data,"",p.data),a("update:modelValue",d.value)}}}};e.onBeforeUnmount(()=>{const c=r.value;c?.destroy()});const m=c=>{r.value=c};return(c,f)=>(e.openBlock(),e.createElementBlock("div",_e,[e.createVNode(e.unref(l),{style:{"border-bottom":"1px solid #ccc"},editor:r.value,defaultConfig:i,mode:"default"},null,8,["editor"]),e.createVNode(e.unref(n),{style:{height:"500px","overflow-y":"hidden"},modelValue:d.value,"onUpdate:modelValue":f[0]||(f[0]=p=>d.value=p),defaultConfig:u,mode:"default",onOnCreated:m},null,8,["modelValue"])]))}}),ye={install:s=>{const t={activeValue:1,inactiveValue:0,activeText:"启用",inactiveText:"禁用",inlinePrompt:!0,tableConfig:{loadList:!1}};y.TForm.error.callback=(n,l)=>"必填",y.TFormConfig.setConfig({dialog:{delete:{content:'确定要执行删除操作吗,删除后<span style="color: red;">无法进行恢复</span>'}},size:{table:"default",form:"default",search:"default"},pagination:{size:20,pageSizes:[20,50,100,500],layout:"total, sizes, prev, pager, next, jumper"},table:{index:!0},tools:{export:{dropdown:!1}},columnConfig:{options:{switch:t,datetime:{startPlaceholder:"开始时间",endPlaceholder:"结束时间"},baseupload:{table:{showOverflowTooltip:!1}},basegroup:{dataApiConfig:{once:!0,init:!1,update:!0}},formAdd:{switch:t},formUpdate:{switch:t},search:{datetime:{startPlaceholder:"开始时间",endPlaceholder:"结束时间"}}}}}),s.use(y,{customComponent:{xEditor:ge}})}},_=s=>typeof s=="string"&&s.length>0&&h.hasPermission(s),ee=(s,t)=>{_(t.value)||s.remove()},be=s=>{s.directive("auth",{mounted:ee,updated(t,n){n.value!==n.oldValue&&ee(t,n)}})},we={install:s=>{s.use(ue),s.use(fe),s.use(he),s.use(ye),s.use(be)}},xe=()=>{const s=m=>m.replace(/\/index$/,"");let t=Object.assign({"/src/views/error/index.vue":()=>Promise.resolve().then(()=>Le),"/src/views/layout/index.vue":()=>Promise.resolve().then(()=>Ye),"/src/views/login/index.vue":()=>Promise.resolve().then(()=>nt),"/src/views/pages/auth/menu/index.vue":()=>Promise.resolve().then(()=>Ct),"/src/views/pages/auth/permission/index.vue":()=>Promise.resolve().then(()=>Vt),"/src/views/pages/auth/role/index.vue":()=>Promise.resolve().then(()=>Nt),"/src/views/pages/auth/user/index.vue":()=>Promise.resolve().then(()=>Tt),"/src/views/pages/db/index.vue":()=>Promise.resolve().then(()=>Et),"/src/views/pages/email/config/index.vue":()=>Promise.resolve().then(()=>St),"/src/views/pages/home/index.vue":()=>Promise.resolve().then(()=>Ot),"/src/views/pages/log/error/index.vue":()=>Promise.resolve().then(()=>Rt),"/src/views/pages/log/loginlog/index.vue":()=>Promise.resolve().then(()=>Dt),"/src/views/pages/profile/index.vue":()=>Promise.resolve().then(()=>At),"/src/views/pages/schedule/job/index.vue":()=>Promise.resolve().then(()=>jt),"/src/views/pages/sms/config/index.vue":()=>Promise.resolve().then(()=>Ut),"/src/views/pages/system/config/index.vue":()=>Promise.resolve().then(()=>Mt)});if(!w.config.routes){y.TSys.fail("router.routes is required");return}Object.keys(w.config.routes).forEach(m=>{t[m]=w.config.routes[m]});const n={},l=["light","dark"],o="light",a="dark";Object.keys(t).forEach(m=>{l.forEach(c=>{o!=c&&(new RegExp(`^/src/views/${c}`).test(m)||(n[m]=t[m]),new RegExp(`^/src/views/${a}`).test(m)&&t[m])})});const r=K.CRouter.init({modules:n,children:[{path:"/layout",component:"/layout",childrenReg:["^/pages"]}],setInfoHook(m){m.meta={title:m.path}},mapKeyPathHook(m){return s(m)},pathHook(m){return s(m).replace(/^\/pages/,"")}}),d=L.createRouter({history:L.createWebHashHistory(),routes:[...r.array,{path:"/",redirect:"/home"},{path:"/:matchOthers(.*)*",redirect:"/error"}]}),i=new Set(["/login","/error"]),u=new Set(["/profile"]);return d.beforeEach(async m=>m.path==="/login"&&h.token?!h.loaded&&!await h.refresh()?!0:h.session.mustChangePassword?"/profile?firstPasswordChange=1":"/":i.has(m.path)?!0:h.token?!h.loaded&&!await h.refresh()?{path:"/login"}:h.session.mustChangePassword&&m.path!=="/profile"?{path:"/profile",query:{firstPasswordChange:"1"}}:u.has(m.path)||h.session.roleInfo.menus.some(f=>f.status===1&&f.url===m.path)?!0:{path:"/error",query:{code:"403"}}:{path:"/login",query:{redirect:m.fullPath}}),y.TSys.router=d,y.TSys.routes=r.array,w.config.routeHook?.(d),d};E.store={ssys:k,suser:h,sutil:E,svf:H,scurd:N};const ke=()=>{Object.keys(E.store).forEach(s=>{s!=="sutil"&&E.store[s].reset?.()})},Ce=()=>{Object.keys(E.store).forEach(s=>{s!=="sutil"&&E.store[s].load?.()})},Ve=async()=>{Ce()};E.reset=ke;class Ne{static async init(t){t.use(we),t.use(w.i18n),await w.i18n.setLang(),Ve(),I.init();const n=xe();t.use(n),n.isReady().then(async()=>{t.mount("#app")})}}const P=e.createApp(me),Te=async s=>{w.setConfig(s),await w.config.install?.(P),P.use(window.ElementPlus,w.config.elementPlus||{});const t=await Promise.resolve().then(()=>qt);P.use(t),await Ne.init(P),w.config.installed?.(P)},$e={style:{background:"#7395ff",width:"100vw",height:"100vh"}},Ee={class:"nfsystem"},Se=["src"],Be={class:"nftitle"},Ie={key:0},Pe=e.defineComponent({__name:"index",setup(s){const t=L.useRoute(),n=e.computed(()=>t.query.code==="403"),l=()=>{y.TSys.router.push("/")};return(o,a)=>{const r=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",$e,[e.createElementVNode("div",Ee,[e.createElementVNode("img",{src:e.unref(w).staticDir+"/images/404.png"},null,8,Se),e.createElementVNode("div",Be,[e.createElementVNode("h2",null,e.toDisplayString(n.value?"无权访问":"页面走丢了..."),1),e.createElementVNode("h4",null,e.toDisplayString(n.value?"当前账号没有访问此页面的菜单权限。":"非常抱歉,您所请求的页面不存在!"),1),n.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("h4",Ie,"请仔细检查您输入的网址是否正确。")),e.createVNode(r,{type:"warning",onClick:a[0]||(a[0]=d=>l()),style:{width:"220px"}},{default:e.withCtx(()=>a[1]||(a[1]=[e.createTextVNode("返回主页",-1)])),_:1,__:[1]})])])])}}}),S=(s,t)=>{const n=s.__vccOpts||s;for(const[l,o]of t)n[l]=o;return n},Le=Object.freeze(Object.defineProperty({__proto__:null,default:S(Pe,[["__scopeId","data-v-53361563"]])},Symbol.toStringTag,{value:"Module"})),Oe={class:"header row no-wrap"},Re={class:"header-right"},De={class:"header-user-con"},Ae={class:"el-dropdown-link row items-center"},je={class:"user-avator"},Ue=["src"],Me=S(e.defineComponent({__name:"Header",setup(s){const t=e.reactive({layout:k.layout,message:2}),n=()=>{t.layout.collapse=!t.layout.collapse};e.onMounted(()=>{document.body.clientWidth<1500&&n()});const l=async o=>{if(o=="loginout")try{await z.logout()}finally{h.clearInfo(),y.TSys.router.push("/login")}else o=="user"&&y.TSys.router.push("/profile")};return(o,a)=>{const r=e.resolveComponent("v-icon"),d=e.resolveComponent("el-dropdown-item"),i=e.resolveComponent("el-dropdown-menu"),u=e.resolveComponent("el-dropdown");return e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("div",{class:"collapse-btn",onClick:n},[e.createVNode(r,{name:"menu",size:"32",color:["#34B0E5"],style:e.normalizeStyle([{transition:"all 0.3s"},{transform:`rotateZ(${t.layout.collapse?90:0}deg)`}])},null,8,["style"])]),a[2]||(a[2]=e.createElementVNode("i",{class:"el-icon-lx-redpacket_fill",style:{"font-size":"30px",color:"#ff5900"}},null,-1)),a[3]||(a[3]=e.createElementVNode("div",{class:"logo col"},"后台管理",-1)),e.createElementVNode("div",Re,[e.createElementVNode("div",De,[e.createVNode(u,{class:"user-name",trigger:"click",onCommand:l},{dropdown:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(d,{command:"user"},{default:e.withCtx(()=>a[0]||(a[0]=[e.createTextVNode("个人中心",-1)])),_:1,__:[0]}),e.createVNode(d,{divided:"",command:"loginout"},{default:e.withCtx(()=>a[1]||(a[1]=[e.createTextVNode("退出登录",-1)])),_:1,__:[1]})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",Ae,[e.createTextVNode(e.toDisplayString(e.unref(h).userInfo.nickname)+" ",1),e.createElementVNode("div",je,[e.createElementVNode("img",{src:e.unref(w).staticDir+"/images/head.jpg"},null,8,Ue)])])]),_:1})])])])}}}),[["__scopeId","data-v-3d11c24f"]]),ze={class:"flex items-center vicon"},Fe={class:"flex items-center vicon"},qe=S(e.defineComponent({__name:"Sidebar",setup(s){const t=e.reactive({layout:k.layout,menu:[]}),n=async()=>{let a=await k.getMenuList();const r=d=>d.filter(i=>(i.type===0&&(i.url="/"+StrUtil.getId()),StrUtil.isNull(i.children)||(i.children=r(i.children)),i.show));a=r(a),t.menu=a};e.onMounted(()=>{n()});const l=e.computed(()=>y.TSys.router.currentRoute.value.path),o=a=>{l.value!==a&&window.innerWidth<900&&Timer.once(()=>{t.layout.collapse=!t.layout.collapse},300)};return(a,r)=>{const d=e.resolveComponent("v-icon"),i=e.resolveComponent("el-menu-item"),u=e.resolveComponent("el-sub-menu"),m=e.resolveComponent("el-menu"),c=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sidebar",[t.layout.collapse?"sidebar-hideen":"sidebar-show"]])},[e.createVNode(c,{height:"100%",style:{"background-color":"#324157"}},{default:e.withCtx(()=>[e.createVNode(m,{class:"sidebar-el-menu","default-active":l.value,collapse:t.layout.collapse,"text-color":"#bfcbd9","active-text-color":"#20a0ff","unique-opened":"",router:"",onSelect:o},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menu,f=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f.children&&f.children?.length>0?(e.openBlock(),e.createBlock(u,{index:f.url,key:f.url},{title:e.withCtx(()=>[e.createElementVNode("div",ze,[e.createVNode(d,{lib:f.iconLib,name:f.iconName,size:"24",color:["#1890ff"]},null,8,["lib","name"])]),e.createElementVNode("span",null,e.toDisplayString(f.title),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.children,p=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.children&&p.children?.length>0?(e.openBlock(),e.createBlock(u,{key:0,index:p.url},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.title),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.children,(x,C)=>(e.openBlock(),e.createBlock(i,{key:C,index:x.url},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.title),1)]),_:2},1032,["index"]))),128))]),_:2},1032,["index"])):(e.openBlock(),e.createBlock(i,{key:1,index:p.url},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.title),1)]),_:2},1032,["index"]))],64))),256))]),_:2},1032,["index"])):(e.openBlock(),e.createBlock(i,{index:f.url,key:f.url},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(f.title),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Fe,[e.createVNode(d,{lib:f.iconLib,name:f.iconName,size:"24",color:["#1890ff"]},null,8,["lib","name"])])]),_:2},1032,["index"]))],64))),256))]),_:1},8,["default-active","collapse"])]),_:1})],2)}}}),[["__scopeId","data-v-ac094262"]]),We={style:{display:"flex",height:"calc(100% - 70px)"}},He={class:"content"},Ke={class:"view"},Je={class:"row flex-center",style:{gap:"10px","font-size":"12px"}},Ye=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(s){const t=e.reactive({keepAlive:["/auth/role","/auth/permission"]});return(n,l)=>{const o=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Me),e.createElementVNode("div",We,[e.createVNode(qe),e.createElementVNode("div",He,[e.createElementVNode("div",null,[e.createElementVNode("div",Ke,[e.createVNode(o,null,{default:e.withCtx(({Component:a})=>[e.createVNode(e.Transition,{name:"slide-fade",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,{include:t.keepAlive},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a),{key:n.$route.fullPath}))],1032,["include"]))]),_:2},1024)]),_:1}),e.createElementVNode("div",Je,[e.createElementVNode("div",null,e.toDisplayString(e.unref(w).config.website.author),1),e.createElementVNode("div",null,e.toDisplayString(e.unref(w).config.website.recordNumber),1)])])])])])],64)}}}),[["__scopeId","data-v-fd10422c"]])},Symbol.toStringTag,{value:"Module"})),Ge=["id"],Ze=e.defineComponent({__name:"index",setup(s){const t=StrUtil.getId(),n=e.reactive({boxid:"canvas_snow-"+t,itemid:"canvas_sakura-"+t});let l;const o=()=>{const a=document.getElementById(n.boxid);if(a){const r=a.getBoundingClientRect();innerHeight=r.height,innerWidth=r.width;let d=document.getElementById(n.itemid);d.width=innerWidth,d.height=innerHeight}};return e.onMounted(()=>{const a=document.getElementById(n.boxid).getBoundingClientRect();let r=a.height,d=a.width,i=new Image;i.src=w.staticDir+"/bg/yh.png";let u=function(p,x,C,b,T){this.x=p,this.y=x,this.s=C,this.r=b,this.fn=T};u.prototype.draw=function(p){p.save(),p.translate(this.x,this.y),p.rotate(this.r),p.drawImage(i,0,0,40*this.s,40*this.s),p.restore()},u.prototype.update=function(){this.x=this.fn.x(this.x,this.y),this.y=this.fn.y(this.y,this.y),this.r=this.fn.r(this.r),(this.x>d||this.x<0||this.y>r||this.y<0)&&(this.r=c("fnr"),Math.random()>.4?(this.x=c("x"),this.y=0,this.s=c("s"),this.r=c("r")):(this.x=d,this.y=c("y"),this.s=c("s"),this.r=c("r")))};let m=function(){this.list=[]};m.prototype.push=function(p){this.list.push(p)},m.prototype.update=function(){for(let p=0,x=this.list.length;p<x;p++)this.list[p].update()},m.prototype.draw=function(p){for(let x=0,C=this.list.length;x<C;x++)this.list[x].draw(p)},m.prototype.get=function(p){return this.list[p]},m.prototype.size=function(){return this.list.length};function c(p){let x,C;switch(p){case"x":x=Math.random()*d;break;case"y":x=Math.random()*r;break;case"s":x=Math.random();break;case"r":x=Math.random()*6;break;case"fnx":C=-.5+Math.random()*1,x=function(b,T){return b+.5*C-1.7};break;case"fny":C=1.5+Math.random()*.7,x=function(b,T){return T+C};break;case"fnr":C=Math.random()*.03,x=function(b){return b+C};break}return x}function f(){let p=document.createElement("canvas"),x;p.height=r,p.width=d,p.setAttribute("style","position: absolute;left: 0;top: 0;pointer-events: none;object-fit:cover;"),p.setAttribute("id",n.itemid),document.getElementById(n.boxid).appendChild(p),x=p.getContext("2d");let C=new m;for(let b=0;b<50;b++){let T,j,V,ne,le,ae,se,re;j=c("x"),V=c("y"),le=c("r"),ne=c("s"),ae=c("fnx"),se=c("fny"),re=c("fnr"),T=new u(j,V,ne,le,{x:ae,y:se,r:re}),T.draw(x),C.push(T)}l=function(){x.clearRect(0,0,p.width,p.height),C.update(),C.draw(x),requestAnimationFrame(l)},requestAnimationFrame(l)}i.onload=function(){f()},window.addEventListener("resize",o)}),e.onUnmounted(()=>{window.removeEventListener("resize",o),window.cancelAnimationFrame(l);let a=document.getElementById(n.itemid);a?.parentNode?.removeChild(a)}),(a,r)=>(e.openBlock(),e.createElementBlock("div",{id:n.boxid},null,8,Ge))}}),Xe={class:"absolute fit"},Qe={class:"login-icp"},ve={class:"ms-login"},et={class:"row no-wrap",style:{width:"100%"}},tt={class:"row no-wrap",style:{width:"100%"}},ot={class:"login-btn"},nt=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(s){const t=e.reactive({param:{isPhone:!1,login_name:"",login_password:"",phone:"",code:""},textCode:{loading:!1,text:"发送验证码",status:!1},rules:{login_name:[{required:!0,message:"请输入用户名",trigger:"blur"}],login_password:[{required:!0,message:"请输入密码",trigger:"blur"}],phone:[{required:!0,message:"请输入手机号",trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}]},loading:!1,text:"登录"}),n=e.ref(),l=()=>{n.value.validate(async d=>{if(d){let i=t.param.isPhone?{phone:t.param.phone,code:t.param.code}:{account:t.param.login_name,password:t.param.login_password};t.loading=!0,t.text="加载中";const u=await $.login({...i,final(m,c,f){t.loading=!1,t.text="登录"}});h.setSession(u.data),y.TSys.router.push(u.data.mustChangePassword?"/profile?firstPasswordChange=1":"/")}})};let o=null;const a=d=>{Timer.un(o),StrUtil.isNull(d)&&(d=parseInt(Cookie.get("codeTime"))),!StrUtil.isNull(d)&&(t.textCode.status=!1,o=Timer.on(()=>{let i=new Date().getTime();if(i-d>0)t.textCode.status=!1,Timer.un(o),t.textCode.text="发送验证码";else{t.textCode.status=!0;const u=(d-i)/1e3;t.textCode.text=u.toFixed(0)+"秒后再试"}},1e3,!0))},r=async()=>{const d=await J.send({type:1,content:"1518079148@qq.com"});console.log("res",d)};return e.onMounted(()=>{a()}),(d,i)=>{const u=e.resolveComponent("el-button"),m=e.resolveComponent("el-input"),c=e.resolveComponent("el-form-item"),f=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",{class:"login-wrap",style:e.normalizeStyle({backgroundImage:`url(${e.unref(w).staticDir+"/bg/g-1.jpg"})`})},[e.createElementVNode("div",Xe,[e.createVNode(Ze,{class:"fit"})]),e.createElementVNode("div",Qe,[e.createElementVNode("div",null,e.toDisplayString(e.unref(w).config.website.author),1),e.createElementVNode("div",null,e.toDisplayString(e.unref(w).config.website.recordNumber),1)]),e.createElementVNode("div",ve,[i[8]||(i[8]=e.createElementVNode("div",{class:"ms-title"},"系统登陆",-1)),e.createVNode(f,{model:t.param,rules:t.rules,ref_key:"login",ref:n,"label-width":"0px",class:"ms-content"},{default:e.withCtx(()=>[t.param.isPhone?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(c,{prop:"phone"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:t.param.phone,"onUpdate:modelValue":i[3]||(i[3]=p=>t.param.phone=p),placeholder:"手机号"},{default:e.withCtx(()=>[e.createVNode(u,{slot:"prepend",icon:"el-icon-lx-people"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(c,{prop:"code"},{default:e.withCtx(()=>[e.createElementVNode("div",tt,[e.createVNode(m,{placeholder:"验证码",modelValue:t.param.code,"onUpdate:modelValue":i[4]||(i[4]=p=>t.param.code=p),onKeyup:i[5]||(i[5]=e.withKeys(p=>l(),["enter","native"])),class:"input-phone"},{default:e.withCtx(()=>[e.createVNode(u,{slot:"prepend",icon:"el-icon-lx-lock"})]),_:1},8,["modelValue"]),e.createVNode(u,{loading:t.textCode.loading,disabled:t.textCode.status,type:"primary",onClick:i[6]||(i[6]=p=>r()),style:{"border-radius":"0px 4px 4px 0px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.textCode.text),1)]),_:1},8,["loading","disabled"])])]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(c,{prop:"login_name"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:t.param.login_name,"onUpdate:modelValue":i[0]||(i[0]=p=>t.param.login_name=p),placeholder:"账号"},{default:e.withCtx(()=>[e.createVNode(u,{slot:"prepend",icon:"el-icon-lx-people"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(c,{prop:"login_password"},{default:e.withCtx(()=>[e.createElementVNode("div",et,[e.createVNode(m,{type:"password",placeholder:"密码",modelValue:t.param.login_password,"onUpdate:modelValue":i[1]||(i[1]=p=>t.param.login_password=p),onKeyup:i[2]||(i[2]=e.withKeys(p=>l(),["enter","native"])),class:e.normalizeClass([t.param.isPhone?"input-phone":void 0])},{default:e.withCtx(()=>[e.createVNode(u,{slot:"prepend",icon:"el-icon-lx-lock"})]),_:1},8,["modelValue","class"])])]),_:1})],64)),e.createElementVNode("div",ot,[e.createVNode(u,{type:"primary",onClick:i[7]||(i[7]=p=>l()),loading:t.loading},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text),1)]),_:1},8,["loading"])])]),_:1},8,["model","rules"])])],4)}}}),[["__scopeId","data-v-68eb361d"]])},Symbol.toStringTag,{value:"Module"})),lt=e.defineComponent({__name:"addIconItem",props:{isbig:{default:!1},el:{default:{}},lib:{default:""},color:{default:""},nofill:{default:!1}},setup(s){const t=e.ref({}),n=e.reactive({show:!1,observer:{}});return e.onMounted(()=>{n.observer=new IntersectionObserver((l,o)=>{l.forEach(a=>{n.show=a.isIntersecting})},{threshold:0}),n.observer.observe(t.value)}),e.onUnmounted(()=>{n.observer.disconnect()}),(l,o)=>{const a=e.resolveComponent("VIcon");return e.openBlock(),e.createElementBlock("span",{style:e.normalizeStyle({minHeight:s.isbig?"40px":"20px"}),ref_key:"_dom",ref:t},[n.show?(e.openBlock(),e.createBlock(a,{key:0,lib:s.lib,name:s.el.name,size:s.isbig?40:20,color:s.color,nofill:s.nofill},null,8,["lib","name","size","color","nofill"])):e.createCommentVNode("",!0)],4)}}}),at={class:"row items-center",style:{gap:"10px"}},st=["onUpdate:modelValue"],rt=e.defineComponent({__name:"colorChoose",props:{colors:{default:[]},length:{default:6}},emits:["update:colors"],setup(s,{emit:t}){const n=s,l=t,o=e.reactive({color:[]});for(let i=0;i<n.length;i++)o.color.push({value:n.colors[i]||"#000000"});const a=()=>l("update:colors",o.color.map(i=>i.value));a();const r=K.Scope.Timer();let d=null;return e.watch(()=>o.color,()=>{r.un(d),d=r.once(()=>{a()},100)},{deep:!0}),(i,u)=>(e.openBlock(),e.createElementBlock("div",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.color,(m,c)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:"color","onUpdate:modelValue":f=>o.color[c].value=f},null,8,st)),[[e.vModelText,o.color[c].value]])),256))]))}}),it={class:"row items-center",style:{height:"60px",overflow:"auto"}},ct={class:"row items-center",style:{gap:"10px",margin:"15px 0"}},dt={class:"row items-center",style:{gap:"10px","margin-bottom":"15px"}},pt={class:"row items-center"},mt={class:"flex items-center",style:{"margin-bottom":"10px"}},ut={style:{"margin-left":"10px"}},ft={key:0,class:"row"},ht=["onClick"],_t={style:{width:"0px"},class:"flex flex-center"},gt={style:{"text-wrap":"nowrap"}},yt={class:"dialog-footer"},bt=S(e.defineComponent({__name:"addDialog",props:{show:{default:!1},iconName:{default:"home"},iconLib:{default:"ant"},iconFill:{default:[]}},emits:["close","update:show"],setup(s,{emit:t}){const n=s;e.watch(()=>n.show,()=>{o.show=n.show,o.show&&o.open()});const l=t,o=e.reactive({libs:[],lib:"",size:0,nofill:!1,isbig:!1,getlibs:async()=>{if(o.libs.length)return;const a=VConf.vicon,r=`${a.url}/_keys.json`;let d=await a.fun.getRes(r);d||(d=await a.fun.getResorce(r,!0));const i=`${a.url}/_size.json`;let u=await a.fun.getRes(i);u||(u=await a.fun.getResorce(i,!0)),o.size=u.num,o.libs=d},init:()=>{o.lib=n.iconLib||"ant",o.item.lib=n.iconLib||"ant",o.item.name=n.iconName||"home",o.color.length=0,o.color.push(...n.iconFill)},changeLib:()=>{o.open(!1)},list:{},title:"选择图标",findName:"",color:[],item:{lib:"",name:""},show:!1,showIcon:!1,open:async(a=!0)=>{y.TSys.loading(!0);const r=VConf.vicon;await o.getlibs(),a&&o.init(),o.showIcon=!1;const d=o.lib,i=`${r.url}/${d}/_all.json`;if(o.list[d]||(o.list[d]=[]),o.list[d].length){e.nextTick(()=>{o.showIcon=!0}),y.TSys.loading(!1);return}let u=await r.fun.getRes(i);u||(u=await r.fun.getResorce(i,!0));const m=Object.keys(u);o.list[d]=[];for(let c=0;c<m.length;c++)o.list[d].push({name:m[c]});e.nextTick(()=>{o.showIcon=!0}),y.TSys.loading(!1)},choose:async a=>{o.item.lib=o.lib,o.item.name=a.name,await StrUtil.copyText(`${o.lib}-${a.name}`)},close:()=>{o.show=!1},closeItem:()=>{l("close",{lib:o.item.lib,name:o.item.name,color:o.color}),o.close()}});return e.watch(()=>o.show,()=>{l("update:show",o.show)}),(a,r)=>{const d=e.resolveComponent("el-radio"),i=e.resolveComponent("el-radio-group"),u=e.resolveComponent("el-input"),m=e.resolveComponent("el-switch"),c=e.resolveComponent("el-tooltip"),f=e.resolveComponent("VIcon"),p=e.resolveComponent("el-scrollbar"),x=e.resolveComponent("el-button"),C=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(C,{modelValue:o.show,"onUpdate:modelValue":r[5]||(r[5]=b=>o.show=b),title:o.title,"close-on-click-modal":!1,style:{width:"950px"},"z-index":1e4},{footer:e.withCtx(()=>[e.createElementVNode("span",yt,[e.createVNode(x,{onClick:o.close},{default:e.withCtx(()=>r[15]||(r[15]=[e.createTextVNode("关闭",-1)])),_:1,__:[15]},8,["onClick"]),e.createVNode(x,{type:"primary",onClick:o.closeItem},{default:e.withCtx(()=>r[16]||(r[16]=[e.createTextVNode("确定",-1)])),_:1,__:[16]},8,["onClick"])])]),default:e.withCtx(()=>[e.createElementVNode("div",it,[e.createVNode(i,{modelValue:o.lib,"onUpdate:modelValue":r[0]||(r[0]=b=>o.lib=b),onChange:o.changeLib},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.libs,b=>(e.openBlock(),e.createBlock(d,{value:b,size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b),1)]),_:2},1032,["value"]))),256))]),_:1},8,["modelValue","onChange"])]),e.createElementVNode("div",ct,[r[6]||(r[6]=e.createElementVNode("div",null,"条件:",-1)),e.createVNode(u,{modelValue:o.findName,"onUpdate:modelValue":r[1]||(r[1]=b=>o.findName=b),style:{width:"160px"},placeholder:"查找"},null,8,["modelValue"]),r[7]||(r[7]=e.createElementVNode("div",null,"当前可选图标库数量:",-1)),e.createTextVNode(" "+e.toDisplayString(o.libs.length)+"个 ",1),r[8]||(r[8]=e.createElementVNode("div",null,"当前可选图标数量:",-1)),e.createTextVNode(" "+e.toDisplayString(o.size)+"个 ",1),r[9]||(r[9]=e.createElementVNode("div",null,"总大小:",-1)),r[10]||(r[10]=e.createTextVNode(" 43.49M ",-1))]),e.createElementVNode("div",dt,[r[13]||(r[13]=e.createElementVNode("div",null,"放大:",-1)),e.createVNode(m,{modelValue:o.isbig,"onUpdate:modelValue":r[2]||(r[2]=b=>o.isbig=b)},null,8,["modelValue"]),e.createVNode(c,{effect:"dark",content:"开启时使用图标库上传时的颜色示例:chroma、chromab、bank等多色图标库",placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("div",pt,[r[11]||(r[11]=e.createElementVNode("div",null,"颜色控制:",-1)),e.createVNode(m,{modelValue:o.nofill,"onUpdate:modelValue":r[3]||(r[3]=b=>o.nofill=b)},null,8,["modelValue"])])]),_:1}),!o.nofill&&o.showIcon?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[r[12]||(r[12]=e.createElementVNode("div",null,"颜色:",-1)),e.createVNode(rt,{colors:o.color,"onUpdate:colors":r[4]||(r[4]=b=>o.color=b)},null,8,["colors"])],64)):e.createCommentVNode("",!0)]),e.createElementVNode("div",mt,[r[14]||(r[14]=e.createElementVNode("div",null,"当前选中:",-1)),e.createVNode(f,{lib:o.item.lib,name:o.item.name,color:o.color},null,8,["lib","name","color"]),e.createElementVNode("div",ut,e.toDisplayString(o.item.lib)+"-"+e.toDisplayString(o.item.name),1)]),e.createVNode(p,{"max-height":"400px"},{default:e.withCtx(()=>[o.showIcon?(e.openBlock(),e.createElementBlock("div",ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.list[o.lib],b=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!o.findName||b.name.indexOf(o.findName)!=-1?(e.openBlock(),e.createElementBlock("div",{key:0,class:"iconlist column flex-center",onClick:T=>o.choose(b),style:e.normalizeStyle({background:b.name===o.item.name&&o.lib===o.item.lib?"#c8ebff":void 0,height:o.isbig?"80px":"60px",width:o.isbig?"180px":"90px"})},[e.createVNode(lt,{isbig:o.isbig,el:b,color:o.color,nofill:o.nofill,lib:o.lib},null,8,["isbig","el","color","nofill","lib"]),e.createElementVNode("div",_t,[e.createElementVNode("div",gt,e.toDisplayString(b.name),1)])],12,ht)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["modelValue","title"])}}}),[["__scopeId","data-v-b9c727d4"]]),wt={class:"flex flex-center"},xt={class:"row"},kt=["onClick"],Ct=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(s){const t=e.reactive({routers:[],initRouters:()=>{t.routers=[];const n=(l,o)=>{l.forEach(a=>{if(a.path){let r=a.path.split("/:")[0];r.length&&o.push({path:r,label:r,value:r})}a.children&&n(a.children,o)})};n(y.TSys.routes,t.routers)},icon:{visible:!1,current:null,form:{iconName:"",iconLib:"",iconFill:["#1890ff"]},show(n){t.icon.current=n,t.icon.visible=!0},select(n){t.icon.current.iconLib=n.lib,t.icon.current.iconName=n.name,t.icon.current.iconFill=n.color}},data:[],option:{api:M,data(n){return t.data=k.getTableTree(n),t.data},form:{openBefore:async(n,l)=>{N.form.openBefore.parentId(n.title?n:null,l,t.data,t.option),N.setOptionsData(t.option,"url",t.routers),l.type===y.TSys.EDialog.Add&&(n.title="")},submitBefore(n,l){n.iconName?.length||(n.iconLib="",n.iconName="",n.iconFill=[])}},search:{show:!1},table:{border:!0,index:!1,add:n=>n?.type===0&&_("/auth/menu/create"),update:()=>_("/auth/menu/update"),delete:()=>_("/auth/menu/delete"),operate:{width:160}},page:{show:!1},column:[{key:"parentId",label:"父级",type:"treeSelect",value:"0",form:{span:12},options:{treeSelect:{data:[],multiple:!1}},show:{table:!1}},{key:"title",label:"名称",type:"input",value:"",rules:!0,sort:{table:1}},{key:"type",label:"类型",type:"select",value:0,options:{select:{clearable:!1,data:[{label:"目录",value:0},{label:"路由",value:1}]}},sort:{table:2}},{key:"icon",label:"图标",type:"input",value:"",sort:{table:3}},{key:"show",label:"显示",type:"switch",value:1,show:{table:!1}},{key:"url",label:"地址",type:"select",rules:!0,value:"",show:{form:n=>n.type===1},options:{select:{filterable:!0,data:[]}},table:{minWidth:"250px",align:"left"},form:{span:12},sort:{table:4}},{key:"sort",label:"排序",type:"input",value:0,table:{width:"80px",align:"center"},sort:{table:5}},{key:"desc",label:"备注",type:"input",value:"",show:{table:!1}}],tools:{add:n=>_("/auth/menu/create")?n===void 0?!0:n.type===0:!1,delete:()=>_("/auth/menu/delete"),export:{show:!1},expand:!0}}});return t.initRouters(),(n,l)=>{const o=e.resolveComponent("VIcon"),a=e.resolveComponent("el-tag"),r=e.resolveComponent("el-switch"),d=e.resolveComponent("el-button"),i=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(i,{option:t.option},{"table-icon":e.withCtx(({row:u})=>[e.createElementVNode("div",wt,[u.iconName?(e.openBlock(),e.createBlock(o,{key:0,lib:u.iconLib,name:u.iconName,color:u.iconFill,size:"18"},null,8,["lib","name","color"])):e.createCommentVNode("",!0)])]),"table-type":e.withCtx(({row:u})=>[e.createVNode(a,{type:u.type===0?"warning":void 0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.type===0?"目录":"路由"),1)]),_:2},1032,["type"])]),"form-show":e.withCtx(({row:u,item:m})=>[u.type===1?(e.openBlock(),e.createBlock(r,{key:0,modelValue:u[m.key],"onUpdate:modelValue":c=>u[m.key]=c,"active-value":1,"inactive-value":0},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)]),"form-icon":e.withCtx(({row:u,item:m})=>[e.createElementVNode("div",xt,[e.createVNode(d,{style:{"margin-right":"16px"},onClick:c=>t.icon.show(u)},{default:e.withCtx(()=>l[1]||(l[1]=[e.createTextVNode("选择图标",-1)])),_:2,__:[1]},1032,["onClick"]),u.iconName?(e.openBlock(),e.createElementBlock("div",{key:0,class:"iconlist",onClick:c=>u.iconName=""},[e.createVNode(o,{lib:u.iconLib,name:u.iconName,color:u.iconFill,size:"26"},null,8,["lib","name","color"])],8,kt)):e.createCommentVNode("",!0)])]),"tools-right":e.withCtx(()=>[e.createVNode(bt,{iconName:t.icon.form.iconName,iconLib:t.icon.form.iconLib,iconFill:t.icon.form.iconFill,show:t.icon.visible,"onUpdate:show":l[0]||(l[0]=u=>t.icon.visible=u),onClose:t.icon.select},null,8,["iconName","iconLib","iconFill","show","onClose"])]),_:1},8,["option"])}}}),[["__scopeId","data-v-1f7cf949"]])},Symbol.toStringTag,{value:"Module"})),Vt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(s){const t=e.reactive({loading:!1,list:[]}),n=async()=>{t.loading=!0;try{const o=await O.list();t.list=o.data}finally{t.loading=!1}},l=async(o,a)=>{await O.updateStatus({_id:o._id,status:a}),o.status=a,y.TSys.success("权限状态已更新,受影响会话已失效")};return e.onMounted(n),(o,a)=>{const r=e.resolveComponent("el-table-column"),d=e.resolveComponent("el-tag"),i=e.resolveComponent("el-switch"),u=e.resolveComponent("el-table"),m=e.resolveComponent("el-card"),c=e.resolveDirective("loading");return e.openBlock(),e.createBlock(m,{shadow:"never"},{header:e.withCtx(()=>a[0]||(a[0]=[e.createTextVNode("代码权限",-1)])),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(u,{data:t.list,border:""},{default:e.withCtx(()=>[e.createVNode(r,{prop:"group",label:"分组",width:"160"}),e.createVNode(r,{prop:"title",label:"名称",width:"180"}),e.createVNode(r,{prop:"url",label:"URL","min-width":"280"}),e.createVNode(r,{prop:"method",label:"Method",width:"100"}),e.createVNode(r,{label:"属性",width:"150"},{default:e.withCtx(({row:f})=>[f.system?(e.openBlock(),e.createBlock(d,{key:0,type:"danger"},{default:e.withCtx(()=>a[1]||(a[1]=[e.createTextVNode("系统",-1)])),_:1,__:[1]})):e.createCommentVNode("",!0),f.retired?(e.openBlock(),e.createBlock(d,{key:1,type:"info"},{default:e.withCtx(()=>a[2]||(a[2]=[e.createTextVNode("已退役",-1)])),_:1,__:[2]})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(r,{label:"状态",width:"120"},{default:e.withCtx(({row:f})=>[e.createVNode(i,{"model-value":f.status,"active-value":1,"inactive-value":2,disabled:f.system||f.retired||!e.unref(_)("/auth/permission/updateStatus"),onChange:p=>l(f,Number(p))},null,8,["model-value","disabled","onChange"])]),_:1})]),_:1},8,["data"])),[[c,t.loading]])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),Nt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(s){const t=e.reactive({menus:[],permissions:[],assignableRoles:[],managerRoles:[],managerRoleId:"",optionsLoaded:!1,option:{api:B,search:{show:!1},table:{border:!0,selectable:{show:_("/auth/role/delete"),selectable:l=>l.canEdit===!0},update:l=>l.canEdit===!0&&_("/auth/role/update"),delete:l=>l.canEdit===!0&&_("/auth/role/delete")},page:{show:!1},tools:{add:()=>_("/auth/role/create"),delete:()=>_("/auth/role/delete"),export:{show:!1}},column:[{key:"title",label:"名称",type:"input",value:"",rules:!0},{key:"type",label:"角色标识",type:"input",value:"",rules:!0},{key:"status",label:"状态",type:"switch",value:1,options:{switch:{activeValue:1,activeLabel:"启用",inactiveValue:2,inactiveLabel:"禁用"}}},{key:"managerRoleId",label:"管理角色",type:"select",value:"",rules:!0,show:{table:!1},options:{select:{data:[]}}},{key:"assignableRoleIds",label:"可分配角色",type:"treeSelect",value:[],show:{table:!1},options:{treeSelect:{data:[],multiple:!0,collapseTags:!0,checkStrictly:!0}}},{key:"menuIds",label:"菜单范围",type:"treeSelect",value:[],show:{table:!1},options:{treeSelect:{data:[],multiple:!0,collapseTags:!0}}},{key:"permissionIds",label:"URL 权限",type:"treeSelect",value:[],show:{table:!1},options:{treeSelect:{data:[],multiple:!0,collapseTags:!0,checkStrictly:!0}}}],form:{openBefore:async(l,o)=>{if(n(),!t.optionsLoaded){const[a,r,d]=await Promise.all([M.list(),O.list(),B.assignable()]);t.menus=k.getTableTree(a.data),t.permissions=r.data.filter(i=>!i.system&&!i.retired&&i.status===1).map(i=>({...i,label:`${i.title} (${i.url})`})),t.assignableRoles=d.data.filter(i=>!i.system),t.optionsLoaded=!0}o.form.managerRoleId||=t.managerRoleId,B.setManagerRoleId(o.form.managerRoleId),N.setOptionsData(t.option,"managerRoleId",t.managerRoles),N.setOptionsData(t.option,"menuIds",t.menus),N.setOptionsData(t.option,"permissionIds",t.permissions),N.setOptionsData(t.option,"assignableRoleIds",t.assignableRoles)}}}}),n=()=>{t.managerRoles.length||(t.managerRoles=h.session.roleInfo.roles.map(l=>({label:l.title,value:l._id})),t.managerRoleId=t.managerRoles[0]?.value||"",B.setManagerRoleId(t.managerRoleId))};return e.onMounted(n),(l,o)=>{const a=e.resolveComponent("el-option"),r=e.resolveComponent("el-select"),d=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(d,{option:t.option},{"tools-right":e.withCtx(()=>[e.createVNode(r,{modelValue:t.managerRoleId,"onUpdate:modelValue":o[0]||(o[0]=i=>t.managerRoleId=i),placeholder:"选择当前管理角色",style:{width:"220px"},onChange:e.unref(B).setManagerRoleId},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.managerRoles,i=>(e.openBlock(),e.createBlock(a,{key:i.value,label:i.label,value:i.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Tt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(s){const t=e.reactive({users:[],roles:[],resetLoading:{},transfer:{show:!1,loading:!1,userId:"",managerId:""},managerOptions:[],option:{api:$,data(a){return t.users=a,a},form:{openBefore:async()=>{t.roles.length||(t.roles=(await B.assignable()).data),N.setOptionsData(t.option,"roleIds",t.roles)}},search:{show:!1},table:{selectable:!0,border:!0,operate:{width:270},update:()=>_("/auth/user/update"),delete:()=>_("/auth/user/delete")},tools:{add:()=>_("/auth/user/create"),delete:!1,export:{fileName:()=>`用户列表_${Date.now()}`}},column:[{key:"account",label:"账号",type:"input",value:"",rules:!0,form:{span:12}},{key:"status",label:"状态",type:"switch",value:1,form:{span:12},options:{switch:{activeValue:1,activeLabel:"启用",inactiveValue:2,inactiveLabel:"禁用"}}},{key:"nickname",label:"昵称",type:"input",value:"",rules:!0,form:{span:12}},{key:"phone",label:"手机号",type:"input",value:"",form:{span:12}},{key:"desc",label:"简介",type:"input",value:"",show:{table:!1},form:{span:12}},{key:"roleIds",label:"角色列表",type:"treeSelect",value:[],show:{table:!1},options:{treeSelect:{data:[],multiple:!0,collapseTags:!0,checkStrictly:!0}}}]}});$.temporaryPasswordHandler=(a,r)=>{U.ElMessageBox.alert(r,`账号 ${a||""} 的一次性临时密码`,{confirmButtonText:"我已安全保存",closeOnClickModal:!1,closeOnPressEscape:!1})};const n=async a=>{try{await U.ElMessageBox.confirm(`确定重置账号“${a.account}”的密码并注销其会话吗?`,"重置密码",{type:"warning"})}catch{return}t.resetLoading[a._id]=!0;try{await $.resetPassword({_id:a._id,account:a.account})}finally{t.resetLoading[a._id]=!1}},l=a=>{t.transfer={show:!0,loading:!1,userId:a._id,managerId:""};const r=h.userInfo._id?[h.userInfo]:[];t.managerOptions=[...r,...t.users].filter(d=>d._id!==a._id&&!(d.ancestorIds||[]).includes(a._id))},o=async()=>{if(!t.transfer.managerId)return y.TSys.fail("请选择新管理员");t.transfer.loading=!0;try{await $.transfer({_id:t.transfer.userId,managerId:t.transfer.managerId}),t.transfer.show=!1,y.TSys.success("用户及其下级已完成转移")}finally{t.transfer.loading=!1}};return(a,r)=>{const d=e.resolveComponent("el-button"),i=e.resolveComponent("t-curd"),u=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),c=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(i,{option:t.option},{"table-op-left":e.withCtx(({row:f})=>[e.unref(_)("/auth/user/update")?(e.openBlock(),e.createBlock(d,{key:0,link:"",type:"primary",loading:t.resetLoading[f._id],onClick:p=>n(f)},{default:e.withCtx(()=>r[3]||(r[3]=[e.createTextVNode("重置密码",-1)])),_:2,__:[3]},1032,["loading","onClick"])):e.createCommentVNode("",!0),e.unref(_)("/auth/user/transfer")?(e.openBlock(),e.createBlock(d,{key:1,link:"",type:"primary",onClick:p=>l(f)},{default:e.withCtx(()=>r[4]||(r[4]=[e.createTextVNode(" 转移 ",-1)])),_:2,__:[4]},1032,["onClick"])):e.createCommentVNode("",!0)]),_:1},8,["option"]),e.createVNode(c,{modelValue:t.transfer.show,"onUpdate:modelValue":r[2]||(r[2]=f=>t.transfer.show=f),title:"转移用户",width:"460px"},{footer:e.withCtx(()=>[e.createVNode(d,{onClick:r[1]||(r[1]=f=>t.transfer.show=!1)},{default:e.withCtx(()=>r[5]||(r[5]=[e.createTextVNode("取消",-1)])),_:1,__:[5]}),e.createVNode(d,{type:"primary",loading:t.transfer.loading,onClick:o},{default:e.withCtx(()=>r[6]||(r[6]=[e.createTextVNode("确认转移",-1)])),_:1,__:[6]},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(m,{modelValue:t.transfer.managerId,"onUpdate:modelValue":r[0]||(r[0]=f=>t.transfer.managerId=f),filterable:"",style:{width:"100%"},placeholder:"选择新管理员"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.managerOptions,f=>(e.openBlock(),e.createBlock(u,{key:f._id,label:`${f.nickname} (${f.account})`,value:f._id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])],64)}}})},Symbol.toStringTag,{value:"Module"}));class te{static export(t){return http.post("/db/export",t)}static import(t){return http.post({url:"/db/import",headers:{"Content-Type":"multipart/form-data"}},t)}}const $t={class:"row"},Et=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(s){const t=e.reactive({import:()=>{const n=document.createElement("input");n.type="file",n.accept=".json,application/json",n.onchange=async l=>{const o=l.target.files[0];if(!o)return;const a=new FileReader;a.onload=async r=>{try{await te.import({file:o}),y.TSys.success("导入覆盖成功")}catch(d){console.error("上传的文件不是合法JSON",d)}},a.readAsText(o)},n.click()},export:async()=>{const{data:n}=await te.export();y.TSys.success("备份成功"+n,{duration:3e3})}});return(n,l)=>{const o=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",$t,[e.unref(_)("/db/export")?(e.openBlock(),e.createBlock(o,{key:0,onClick:t.export},{default:e.withCtx(()=>l[0]||(l[0]=[e.createTextVNode("备份数据",-1)])),_:1,__:[0]},8,["onClick"])):e.createCommentVNode("",!0),e.unref(_)("/db/import")?(e.openBlock(),e.createBlock(o,{key:1,onClick:t.import},{default:e.withCtx(()=>l[1]||(l[1]=[e.createTextVNode("导入覆盖",-1)])),_:1,__:[1]},8,["onClick"])):e.createCommentVNode("",!0)])}}})},Symbol.toStringTag,{value:"Module"})),St=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(s){const t=e.reactive({param:{host:"1518079148@qq.com"},option:{api:G,data(n){return n.forEach(l=>{l.createTime=new Date(l.createTime).Format()}),n},table:{selectable:!0,update:()=>_("/email/config/update"),delete:()=>_("/email/config/delete"),column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}}]},tools:{add:()=>_("/email/config/create"),delete:()=>_("/email/config/delete"),export:{fileName:()=>`邮件配置_${new Date().getTime()}`,before(n){const l={1:"是",0:"否"};n.data.forEach(o=>{o.secure=l[o.secure],o.enabled=l[o.enabled]})}}},column:[{key:"host",label:"SMTP地址",type:"input",value:"",show:{search:!0}},{key:"port",label:"SMTP端口",type:"input",value:""},{key:"user",label:"SMTP邮箱",type:"input",value:"",show:{search:!0}},{key:"pass",label:"SMTP密码",type:"input",value:"",disabled:{update:!0},show:{table:!1}},{key:"secure",label:"SSL加密",type:"switch",value:1},{key:"enabled",label:"启用状态",type:"switch",value:0,show:{search:!0}},{key:"desc",label:"备注",type:"input",value:"",update:{span:12},rules:!0}]},email:{async send(){await http.post("/email/send",{to:t.param.host,title:"测试邮件标题",content:"测试邮件内容666"}),y.TSys.success("发送成功")}}});return(n,l)=>{const o=e.resolveComponent("el-input"),a=e.resolveComponent("el-button"),r=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(r,{option:t.option},{"tools-right":e.withCtx(()=>[e.createVNode(o,{modelValue:t.param.host,"onUpdate:modelValue":l[0]||(l[0]=d=>t.param.host=d),placeholder:"邮件地址",style:{width:"150px"}},null,8,["modelValue"]),e.unref(_)("/email/send")?(e.openBlock(),e.createBlock(a,{key:0,type:"danger",onClick:t.email.send},{default:e.withCtx(()=>l[1]||(l[1]=[e.createTextVNode("发送邮件测试",-1)])),_:1,__:[1]},8,["onClick"])):e.createCommentVNode("",!0)]),"table-host":e.withCtx(({row:d})=>[e.createTextVNode(e.toDisplayString(d.host),1)]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Bt={class:"user-info"},It=["src"],Pt={class:"user-info-cont"},Lt={class:"user-info-name"},Ot=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(s){return(t,n)=>{const l=e.resolveComponent("el-card"),o=e.resolveComponent("el-col"),a=e.resolveComponent("el-row");return e.openBlock(),e.createBlock(a,{gutter:20},{default:e.withCtx(()=>[e.createVNode(o,null,{default:e.withCtx(()=>[e.createVNode(l,{shadow:"hover",class:"mgb20"},{default:e.withCtx(()=>[e.createElementVNode("div",Bt,[e.createElementVNode("img",{src:e.unref(w).staticDir+"/images/head.jpg",class:"user-avator",alt:""},null,8,It),e.createElementVNode("div",Pt,[e.createElementVNode("div",Lt,e.toDisplayString(e.unref(h).userInfo.nickname),1),e.createElementVNode("div",null,"欢迎"+e.toDisplayString(e.unref(h).userInfo.nickname)+"进入后台管理",1)])]),n[0]||(n[0]=e.createElementVNode("div",{class:"user-info-list"},[e.createElementVNode("div",{class:"user-info-list-item"},[e.createElementVNode("div",{class:"user-info-list-item-label"},"欢迎使用后台管理系统,左侧导航栏可快速访问各模块")])],-1))]),_:1,__:[0]})]),_:1})]),_:1})}}}),[["__scopeId","data-v-28a63a57"]])},Symbol.toStringTag,{value:"Module"})),Rt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(s){const t=(l,o="内容")=>{U.ElMessageBox.alert(`<div style="white-space: pre-wrap; width: 1000px; word-break: break-all;">${l}</div>`,o,{confirmButtonText:"确定",dangerouslyUseHTMLString:!0})},n=e.reactive({option:{api:Z,data(l){return l.forEach(o=>{o.createTime=new Date(o.createTime).Format()}),l},table:{selectable:!0,update:!1,delete:()=>_("/log/error/delete"),column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}},{key:"status",label:"状态码",type:"input",value:"",table:{width:"100px"}}]},tools:{add:!1,delete:()=>_("/log/error/delete"),export:{fileName:()=>`错误日志_${new Date().getTime()}`}},column:[{key:"ip",label:"IP地址",type:"input",value:"",show:{search:!0},table:{width:"120px",align:"left"}},{key:"path",label:"请求路径",type:"input",value:"",show:{search:!0},table:{minWidth:"180px",align:"left"}},{key:"method",label:"请求方法",type:"select",value:"",show:{search:!0},table:{minWidth:"100px"},options:{select:{data:[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"PUT",value:"PUT"},{label:"DELETE",value:"DELETE"}]}}},{key:"params",label:"请求参数",type:"input",value:"",table:{slot:!0}},{key:"userAgent",label:"用户代理",type:"input",value:""},{key:"error",label:"错误信息",type:"input",value:"",show:{search:!0},table:{minWidth:"140px"}},{key:"stack",label:"错误堆栈",type:"input",value:"",table:{show:!1}}]}});return(l,o)=>{const a=e.resolveComponent("el-button"),r=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(r,{option:n.option},{"table-params":e.withCtx(({row:d})=>[e.createVNode(a,{type:"primary",link:"",onClick:i=>t(d.params,"请求参数")},{default:e.withCtx(()=>o[0]||(o[0]=[e.createTextVNode("查看",-1)])),_:2,__:[0]},1032,["onClick"])]),"table-userAgent":e.withCtx(({row:d})=>[e.createVNode(a,{type:"primary",link:"",onClick:i=>t(d.userAgent,"用户代理")},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("查看",-1)])),_:2,__:[1]},1032,["onClick"])]),"table-stack":e.withCtx(({row:d})=>[e.createVNode(a,{type:"primary",link:"",onClick:i=>t(d.stack,"错误堆栈")},{default:e.withCtx(()=>o[2]||(o[2]=[e.createTextVNode("查看",-1)])),_:2,__:[2]},1032,["onClick"])]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Dt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(s){const t=e.reactive({option:{api:Y,data(n){return n.forEach(l=>{l.createTime=new Date(l.createTime).Format(),l.status=l.status?"成功":"失败"}),n},table:{selectable:!0,update:!1,delete:()=>h.hasPermission("/auth/loginLog/delete"),column:[{key:"createTime",label:"登录时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}}]},tools:{add:!1,delete(){return h.hasPermission("/auth/loginLog/delete")},export:{fileName:()=>`登录日志_${new Date().getTime()}`}},column:[{key:"account",label:"登录账号",type:"input",value:"",show:{search:!0}},{key:"ip",label:"IP地址",type:"input",value:"",show:{search:!0}},{key:"os",label:"操作系统",type:"input",value:""},{key:"status",label:"登录状态",type:"switch",value:0,show:{search:!0},options:{switch:{activeLabel:"成功",inactiveLabel:"失败"}}},{key:"msg",label:"失败原因",type:"input",value:""}]}});return(n,l)=>{const o=e.resolveComponent("el-tag"),a=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(a,{option:t.option},{"table-status":e.withCtx(({row:r})=>[e.createVNode(o,{type:r.status==="成功"?"success":"danger"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.status),1)]),_:2},1032,["type"])]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),At=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(s){const t=e.ref(),n=e.ref(),l=L.useRoute(),o=e.reactive({activeTab:"profile",profileLoading:!1,passwordLoading:!1,profile:{account:"",nickname:"",phone:"",desc:""},password:{oldPassword:"",newPassword:"",confirmPassword:""}}),a={nickname:[{required:!0,message:"请输入昵称",trigger:"blur"},{max:100,message:"昵称不能超过 100 个字符",trigger:"blur"}],phone:[{validator:(m,c,f)=>{!c||/^1\d{10}$/.test(c)?f():f(new Error("请输入正确的手机号"))},trigger:"blur"}]},r={oldPassword:[{required:!0,message:"请输入原密码",trigger:"blur"}],newPassword:[{required:!0,message:"请输入新密码",trigger:"blur"},{min:12,max:128,message:"新密码长度必须为 12–128 位",trigger:"blur"}],confirmPassword:[{required:!0,message:"请再次输入新密码",trigger:"blur"},{validator:(m,c,f)=>{c===o.password.newPassword?f():f(new Error("两次输入的密码不一致"))},trigger:"blur"}]},d=async()=>{o.profileLoading=!0;try{const m=await $.profile();Object.assign(o.profile,{account:m.data.account||"",nickname:m.data.nickname||"",phone:m.data.phone||"",desc:m.data.desc||""})}finally{o.profileLoading=!1}},i=async()=>{if(await t.value?.validate().catch(()=>!1)){o.profileLoading=!0;try{const m=await $.updateProfile({nickname:o.profile.nickname,phone:o.profile.phone,desc:o.profile.desc});Object.assign(o.profile,m.data),h.updateUserInfo(m.data),y.TSys.success("个人信息修改成功")}finally{o.profileLoading=!1}}},u=async()=>{if(await n.value?.validate().catch(()=>!1)){o.passwordLoading=!0;try{const m=await $.changePassword({oldPassword:o.password.oldPassword,newPassword:o.password.newPassword});h.setSession(m.data),y.TSys.success("密码修改成功"),await y.TSys.router.replace("/")}finally{o.passwordLoading=!1}}};return e.onMounted(()=>{l.query.firstPasswordChange==="1"&&(o.activeTab="password"),d()}),(m,c)=>{const f=e.resolveComponent("el-input"),p=e.resolveComponent("el-form-item"),x=e.resolveComponent("el-button"),C=e.resolveComponent("el-form"),b=e.resolveComponent("el-tab-pane"),T=e.resolveComponent("el-tabs"),j=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(j,{class:"profile-card",shadow:"never"},{header:e.withCtx(()=>c[8]||(c[8]=[e.createElementVNode("div",{class:"card-title"},"个人中心",-1)])),default:e.withCtx(()=>[e.createVNode(T,{modelValue:o.activeTab,"onUpdate:modelValue":c[7]||(c[7]=V=>o.activeTab=V)},{default:e.withCtx(()=>[e.createVNode(b,{label:"个人信息",name:"profile"},{default:e.withCtx(()=>[e.createVNode(C,{ref_key:"profileFormRef",ref:t,model:o.profile,rules:a,"label-width":"90px",class:"profile-form"},{default:e.withCtx(()=>[e.createVNode(p,{label:"账号"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:o.profile.account,"onUpdate:modelValue":c[0]||(c[0]=V=>o.profile.account=V),disabled:""},null,8,["modelValue"])]),_:1}),e.createVNode(p,{label:"昵称",prop:"nickname"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:o.profile.nickname,"onUpdate:modelValue":c[1]||(c[1]=V=>o.profile.nickname=V),maxlength:"100","show-word-limit":""},null,8,["modelValue"])]),_:1}),e.createVNode(p,{label:"手机号",prop:"phone"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:o.profile.phone,"onUpdate:modelValue":c[2]||(c[2]=V=>o.profile.phone=V),maxlength:"11",placeholder:"请输入手机号"},null,8,["modelValue"])]),_:1}),e.createVNode(p,{label:"个人简介",prop:"desc"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:o.profile.desc,"onUpdate:modelValue":c[3]||(c[3]=V=>o.profile.desc=V),type:"textarea",rows:4,maxlength:"1000","show-word-limit":"",placeholder:"请输入个人简介"},null,8,["modelValue"])]),_:1}),e.createVNode(p,null,{default:e.withCtx(()=>[e.createVNode(x,{type:"primary",loading:o.profileLoading,onClick:i},{default:e.withCtx(()=>c[9]||(c[9]=[e.createTextVNode("保存修改",-1)])),_:1,__:[9]},8,["loading"])]),_:1})]),_:1},8,["model"])]),_:1}),e.createVNode(b,{label:"修改密码",name:"password"},{default:e.withCtx(()=>[e.createVNode(C,{ref_key:"passwordFormRef",ref:n,model:o.password,rules:r,"label-width":"90px",class:"profile-form"},{default:e.withCtx(()=>[e.createVNode(p,{label:"原密码",prop:"oldPassword"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:o.password.oldPassword,"onUpdate:modelValue":c[4]||(c[4]=V=>o.password.oldPassword=V),type:"password","show-password":"",autocomplete:"current-password"},null,8,["modelValue"])]),_:1}),e.createVNode(p,{label:"新密码",prop:"newPassword"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:o.password.newPassword,"onUpdate:modelValue":c[5]||(c[5]=V=>o.password.newPassword=V),type:"password","show-password":"",autocomplete:"new-password"},null,8,["modelValue"])]),_:1}),e.createVNode(p,{label:"确认密码",prop:"confirmPassword"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:o.password.confirmPassword,"onUpdate:modelValue":c[6]||(c[6]=V=>o.password.confirmPassword=V),type:"password","show-password":"",autocomplete:"new-password"},null,8,["modelValue"])]),_:1}),e.createVNode(p,null,{default:e.withCtx(()=>[e.createVNode(x,{type:"primary",loading:o.passwordLoading,onClick:u},{default:e.withCtx(()=>c[10]||(c[10]=[e.createTextVNode("修改密码",-1)])),_:1,__:[10]},8,["loading"])]),_:1})]),_:1},8,["model"])]),_:1})]),_:1},8,["modelValue"])]),_:1})}}}),[["__scopeId","data-v-de5241e6"]])},Symbol.toStringTag,{value:"Module"})),jt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(s){const t=e.reactive({option:{api:X,data(n){return n.forEach(l=>{l.createTime=new Date(l.createTime).Format(),l.lastTime=l.lastTime?new Date(Number(l.lastTime)).Format():"-"}),n},table:{selectable:!0,update:()=>_("/schedule/job/update"),delete:()=>_("/schedule/job/delete"),column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}},{key:"lastTime",label:"最后执行时间",type:"input",value:"",table:{width:"180px"}}]},tools:{add:()=>_("/schedule/job/create"),delete:()=>_("/schedule/job/delete"),export:{fileName:()=>`定时任务_${new Date().getTime()}`,before(n){const l={0:"正常",1:"暂停"},o={0:"允许",1:"禁止"};n.data.forEach(a=>{a.status=l[a.status],a.concurrent=o[a.concurrent]})}}},column:[{key:"name",label:"任务名称",type:"input",value:"",show:{search:!0},rules:!0},{key:"group",label:"任务组",type:"input",value:"",show:{search:!0},rules:!0},{key:"cron",label:"Cron表达式",type:"input",value:"",rules:!0},{key:"target",label:"调用目标",type:"input",value:"",rules:!0},{key:"params",label:"参数",type:"input",value:""},{key:"status",label:"启用状态",type:"switch",value:0,show:{search:!0},options:{switch:{activeValue:1,inactiveValue:0}}}]}});return(n,l)=>{const o=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(o,{option:t.option},null,8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Ut=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(s){const t=e.reactive({param:{phone:"",code:"123456"},option:{api:F,data(n){return n.forEach(l=>{l.createTime=new Date(l.createTime).Format()}),n},table:{selectable:!0,update:()=>_("/sms/config/update"),delete:()=>_("/sms/config/delete"),column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}}]},tools:{add:()=>_("/sms/config/create"),delete:()=>_("/sms/config/delete"),export:{fileName:()=>`短信配置_${new Date().getTime()}`,before(n){const l={1:"是",0:"否"};n.data.forEach(o=>{o.enabled=l[o.enabled]})}}},column:[{key:"provider",label:"短信服务商",type:"select",value:"",show:{search:!0},options:{select:{data:[{label:"阿里云",value:"ALIYUN"},{label:"腾讯云",value:"TENCENT"}]}}},{key:"accessKeyId",label:"AccessKey",type:"input",value:""},{key:"accessKeySecret",label:"Secret",type:"input",value:"",disabled:{update:!0},show:{table:!1}},{key:"signName",label:"短信签名",type:"input",value:""},{key:"templateId",label:"短信模板ID",type:"input",value:""},{key:"sdkAppId",label:"应用ID",type:"input",value:""},{key:"signId",label:"签名ID",type:"input",value:""},{key:"enabled",label:"启用状态",type:"switch",value:0,show:{search:!0}},{key:"desc",label:"备注",type:"input",value:"",update:{span:12}}]},sms:{async send(){if(!t.param.phone){y.TSys.success("请输入手机号码");return}await F.send({phone:t.param.phone,templateParam:{code:t.param.code}}),y.TSys.success("发送成功")}}});return(n,l)=>{const o=e.resolveComponent("el-input"),a=e.resolveComponent("el-button"),r=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(r,{option:t.option},{"tools-right":e.withCtx(()=>[e.createVNode(o,{modelValue:t.param.phone,"onUpdate:modelValue":l[0]||(l[0]=d=>t.param.phone=d),placeholder:"手机号码",style:{width:"150px"}},null,8,["modelValue"]),e.createVNode(o,{modelValue:t.param.code,"onUpdate:modelValue":l[1]||(l[1]=d=>t.param.code=d),placeholder:"验证码",style:{width:"100px"}},null,8,["modelValue"]),e.unref(_)("/sms/config/send")?(e.openBlock(),e.createBlock(a,{key:0,type:"danger",onClick:t.sms.send},{default:e.withCtx(()=>l[2]||(l[2]=[e.createTextVNode("发送短信测试",-1)])),_:1,__:[2]},8,["onClick"])):e.createCommentVNode("",!0)]),"table-provider":e.withCtx(({row:d})=>[e.createTextVNode(e.toDisplayString(d.provider==="ALIYUN"?"阿里云":"腾讯云"),1)]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Mt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(s){const t=e.reactive({option:{api:Q,data(n){return n.forEach(l=>{l.createTime=new Date(l.createTime).Format(),l.updateTime=new Date(l.updateTime).Format()}),n},table:{selectable:!0,update:()=>_("/system/config/update"),delete:()=>_("/system/config/delete"),column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{minWidth:"180px"}},{key:"updateTime",label:"更新时间",type:"input",value:"",table:{minWidth:"180px"}}]},tools:{add:()=>_("/system/config/create"),delete:()=>_("/system/config/delete"),export:{fileName:()=>`系统配置_${new Date().getTime()}`}},column:[{key:"key",label:"配置键",type:"input",value:"",show:{search:!0},rules:!0},{key:"groupKey",label:"分组键",type:"input",value:"",show:{search:!0},rules:!0},{key:"groupValue",label:"分组名称",type:"input",value:"",rules:!0},{key:"system",label:"系统内置",type:"switch",value:0,show:{search:!0},options:{switch:{activeValue:1,inactiveValue:0,activeLabel:"是",inactiveLabel:"否"}}},{key:"desc",label:"配置说明",type:"input",value:"",form:{span:12}},{key:"value",label:"配置值",type:"input",value:"",rules:!0,table:{showOverflowTooltip:!0},form:{span:12},options:{input:{type:"textarea"}}}]}});return(n,l)=>{const o=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(o,{option:t.option},{"table-value":e.withCtx(({row:a})=>[e.createTextVNode(e.toDisplayString(a.value),1)]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),zt=e.defineComponent({__name:"index",props:{row:{default:{}},field:{default:"value"},itemFields:{default:[]},imgField:{default:""}},emits:["change"],setup(s,{emit:t}){const n=s,l=t,o=e.reactive({upload:{handler:a=>{k.upload.handler({callback:r=>{a[n.imgField]=r,l("change")}})}}});return(a,r)=>{const d=e.resolveComponent("el-button"),i=e.resolveComponent("TFormList");return e.openBlock(),e.createBlock(i,{row:s.row,field:s.field,itemFields:s.itemFields,onChange:r[0]||(r[0]=u=>l("change",u))},{"item-end":e.withCtx(({item:u})=>[s.imgField?(e.openBlock(),e.createBlock(d,{key:0,link:"",type:"primary",onClick:m=>o.upload.handler(u)},{default:e.withCtx(()=>r[1]||(r[1]=[e.createTextVNode("上传图片",-1)])),_:2,__:[1]},1032,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"item-end",{item:u},()=>[s.imgField?(e.openBlock(),e.createBlock(d,{key:0,link:"",type:"primary",onClick:m=>e.unref(k).preview.open(s.row[s.field].map(c=>c[s.imgField]),s.row[s.field].findIndex(c=>c[s.imgField]===u[s.imgField]))},{default:e.withCtx(()=>r[2]||(r[2]=[e.createTextVNode(" 查看图片 ",-1)])),_:2,__:[2]},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:3},8,["row","field","itemFields"])}}}),Ft=e.defineComponent({__name:"index",setup(s){return e.watch(()=>y.TSys.router.currentRoute.value.path,(t,n)=>{CEvent.emit(W.change,t)},{immediate:!0}),(t,n)=>null}}),oe=s=>{s.component("xRouteEvent",Ft),s.component("xFormList",zt)},qt=Object.freeze(Object.defineProperty({__proto__:null,default:{install:oe},install:oe},Symbol.toStringTag,{value:"Module"}));g.ApiApp=q,g.ApiAuthMenu=M,g.ApiAuthPermission=O,g.ApiAuthPhone=ce,g.ApiAuthRole=B,g.ApiAuthSession=z,g.ApiAuthUser=$,g.ApiCaptcha=J,g.ApiCron=de,g.ApiEmailConfig=G,g.ApiErrorLog=Z,g.ApiJob=X,g.ApiLoginLog=Y,g.ApiSmsConfig=F,g.ApiSystemConfig=Q,g.ERouter=W,g.System=w,g.initApp=Te,g.scurd=N,g.ssys=k,g.suser=h,g.sutil=E,g.svf=H,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})}));
@@ -1,18 +1,20 @@
1
- import { defineComponent as u, reactive as r, resolveComponent as p, openBlock as n, createBlock as i, withCtx as c, createTextVNode as s, toDisplayString as m } from "vue";
2
- import { ApiSystemConfig as y } from "./cc1-admin-front.js";
3
- const _ = /* @__PURE__ */ u({
1
+ import { defineComponent as u, reactive as i, resolveComponent as r, openBlock as p, createBlock as s, withCtx as c, createTextVNode as m, toDisplayString as y } from "vue";
2
+ import { n as d, h as t } from "./index-D3OkO10X.js";
3
+ const h = /* @__PURE__ */ u({
4
4
  __name: "index",
5
5
  setup(v) {
6
- const a = r({
6
+ const o = i({
7
7
  option: {
8
- api: y,
9
- data(t) {
10
- return t.forEach((e) => {
8
+ api: d,
9
+ data(a) {
10
+ return a.forEach((e) => {
11
11
  e.createTime = new Date(e.createTime).Format(), e.updateTime = new Date(e.updateTime).Format();
12
- }), t;
12
+ }), a;
13
13
  },
14
14
  table: {
15
15
  selectable: !0,
16
+ update: () => t("/system/config/update"),
17
+ delete: () => t("/system/config/delete"),
16
18
  column: [
17
19
  {
18
20
  key: "createTime",
@@ -35,6 +37,8 @@ const _ = /* @__PURE__ */ u({
35
37
  ]
36
38
  },
37
39
  tools: {
40
+ add: () => t("/system/config/create"),
41
+ delete: () => t("/system/config/delete"),
38
42
  export: {
39
43
  fileName: () => `系统配置_${(/* @__PURE__ */ new Date()).getTime()}`
40
44
  }
@@ -114,13 +118,13 @@ const _ = /* @__PURE__ */ u({
114
118
  ]
115
119
  }
116
120
  });
117
- return (t, e) => {
118
- const l = p("t-curd");
119
- return n(), i(l, {
120
- option: a.option
121
+ return (a, e) => {
122
+ const l = r("t-curd");
123
+ return p(), s(l, {
124
+ option: o.option
121
125
  }, {
122
- "table-value": c(({ row: o }) => [
123
- s(m(o.value), 1)
126
+ "table-value": c(({ row: n }) => [
127
+ m(y(n.value), 1)
124
128
  ]),
125
129
  _: 1
126
130
  }, 8, ["option"]);
@@ -128,5 +132,5 @@ const _ = /* @__PURE__ */ u({
128
132
  }
129
133
  });
130
134
  export {
131
- _ as default
135
+ h as default
132
136
  };