databasir/api/src/main/resources/static/js/app.98502fba.js

2 lines
25 KiB
JavaScript

(function(){"use strict";var e={40152:function(e,t,n){n.d(t,{x4:function(){return o},rd:function(){return a},jb:function(){return s}});var r=n(63872);const o=e=>{const t=new FormData;return t.append("username",e.username),t.append("password",e.password),r.Z.post("/login",t)},a=(e,t)=>r.Z.get("/oauth2/login/"+e,{params:t}),s=e=>r.Z.post("/access_tokens",{refreshToken:e})},21381:function(e,t,n){var r=n(49963),o=n(90605),a=n(30137),s=(n(54689),n(30837)),i=n(99622),u=n(66246),l=(n(54415),n(46416)),c=n(24239),d=n(66252);function p(e,t){const n=(0,d.up)("router-view");return(0,d.wg)(),(0,d.j4)(n)}var m=n(83744);const h={},g=(0,m.Z)(h,[["render",p]]);var f=g,w=n(51836),y=n(3577);const b=["src"],v=["src"],k=["src"],S=["src"],_=["src"],j=["src"];function x(e,t,r,o,a,s){const i=(0,d.up)("el-tooltip");return"mysql"==r.databaseType.toLowerCase()?((0,d.wg)(),(0,d.j4)(i,{key:0,content:r.databaseType,placement:"left"},{default:(0,d.w5)((()=>[(0,d._)("img",{src:n(92357),style:{"max-width":"33px","max-height":"33px"}},null,8,b)])),_:1},8,["content"])):"postgresql"==r.databaseType.toLowerCase()?((0,d.wg)(),(0,d.j4)(i,{key:1,content:r.databaseType,placement:"left"},{default:(0,d.w5)((()=>[(0,d._)("img",{src:n(43609),style:{"max-width":"33px","max-height":"33px"}},null,8,v)])),_:1},8,["content"])):"oracle"==r.databaseType.toLowerCase()?((0,d.wg)(),(0,d.j4)(i,{key:2,content:r.databaseType,placement:"left"},{default:(0,d.w5)((()=>[(0,d._)("img",{src:n(22260),style:{"max-width":"33px","max-height":"33px"}},null,8,k)])),_:1},8,["content"])):"mariadb"==r.databaseType.toLowerCase()?((0,d.wg)(),(0,d.j4)(i,{key:3,content:r.databaseType,placement:"left"},{default:(0,d.w5)((()=>[(0,d._)("img",{src:n(36658),style:{"max-width":"33px","max-height":"33px"}},null,8,S)])),_:1},8,["content"])):"sqlserver"==r.databaseType.toLowerCase()?((0,d.wg)(),(0,d.j4)(i,{key:4,content:r.databaseType,placement:"left"},{default:(0,d.w5)((()=>[(0,d._)("img",{src:n(35641),style:{"max-width":"33px","max-height":"33px"}},null,8,_)])),_:1},8,["content"])):r.icon?((0,d.wg)(),(0,d.j4)(i,{key:5,content:r.databaseType,placement:"left"},{default:(0,d.w5)((()=>[(0,d._)("img",{src:r.icon,style:{"max-width":"33px","max-height":"33px"}},null,8,j)])),_:1},8,["content"])):((0,d.wg)(),(0,d.iD)(d.HY,{key:6},[(0,d.Uk)((0,y.zw)(r.databaseType),1)],64))}var T={props:{databaseType:String,icon:String}};const A=(0,m.Z)(T,[["render",x]]);var D=A,L=n(94890),q=(n(38478),n(95707));const C=(0,r.ri)(f);Object.keys(a).forEach((e=>{C.component(e,a[e])})),C.component("database-icon",D),C.directive("require-roles",{mounted(e,t){const n=t.value;w.E.hasAnyRoles(n)||e.parentNode&&e.parentNode.removeChild(e)}}),C.directive("select-more",{updated(e,t){const n=e.querySelector(".select-trigger"),r=n.getAttribute("aria-describedby"),o=document.getElementById(r);if(null==o)return;const a=o.parentElement.querySelector(".el-select-dropdown .el-scrollbar .el-select-dropdown__wrap");null!=a?a.addEventListener("scroll",(function(){const e=this.scrollHeight-this.scrollTop-1<=this.clientHeight;e&&t.value()})):console.log("load select component failed")}}),s.Z.registerLanguage("javascript",i.Z),C.use(u.Z),C.use(c.Z),C.use(o.Z),C.use(l.Z),C.use(L._),C.use(q.ZP),C.mount("#app")},46416:function(e,t,n){n.d(t,{Z:function(){return oe}});var r=n(42119),o=n(66252),a=n(3577);const s={style:{"margin-top":"16px"}},i={class:"search-container"},u=["onClick"],l=(0,o.Uk)("project"),c=(0,o.Uk)(),d={class:"jump"},p=["onClick"],m=(0,o.Uk)("group"),h=(0,o.Uk)(),g={class:"jump"};function f(e,t,n,r,f,w){const y=(0,o.up)("AppNav"),b=(0,o.up)("el-aside"),v=(0,o.up)("Breadcrumb"),k=(0,o.up)("Avatar"),S=(0,o.up)("el-header"),_=(0,o.up)("router-view"),j=(0,o.up)("el-main"),x=(0,o.up)("el-container"),T=(0,o.up)("el-button"),A=(0,o.up)("el-input"),D=(0,o.up)("el-tag"),L=(0,o.up)("el-link"),q=(0,o.up)("el-divider"),C=(0,o.up)("Right"),N=(0,o.up)("el-icon"),E=(0,o.up)("el-dialog");return(0,o.wg)(),(0,o.j4)(x,{class:"databasir"},{default:(0,o.w5)((()=>[(0,o.Wm)(b,null,{default:(0,o.w5)((()=>[(0,o.Wm)(y,{class:"databasir-nav",onOnSearch:t[0]||(t[0]=e=>w.search())})])),_:1}),(0,o.Wm)(S,{class:"databasir-main-header"},{default:(0,o.w5)((()=>[(0,o.Wm)(v),(0,o.Wm)(k)])),_:1}),(0,o.Wm)(j,{class:"databasir-main"},{default:(0,o.w5)((()=>[(0,o.Wm)(x,null,{default:(0,o.w5)((()=>[(0,o.Wm)(j,{class:"databasir-main-content"},{default:(0,o.w5)((()=>[(0,o.Wm)(_)])),_:1})])),_:1})])),_:1}),(0,o.Wm)(E,{modelValue:f.showSearchDialog,"onUpdate:modelValue":t[2]||(t[2]=e=>f.showSearchDialog=e),title:"搜索",width:w.dialogWidth()},{default:(0,o.w5)((()=>[(0,o.Wm)(A,{modelValue:f.queryKeyword,"onUpdate:modelValue":t[1]||(t[1]=e=>f.queryKeyword=e),placeholder:"分组、项目、database、schema 搜索",style:{width:"100%",border:"none"},onChange:w.onQuery},{prepend:(0,o.w5)((()=>[(0,o.Wm)(T,{loading:f.queryLoading,icon:"Search"},null,8,["loading"])])),_:1},8,["modelValue","onChange"]),(0,o._)("div",s,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(f.searchSelectHistory,((e,t)=>((0,o.wg)(),(0,o.j4)(L,{underline:!1,key:t,onClick:t=>w.jumpToPath(e.path),style:{"margin-right":"12px","margin-bottom":"12px"}},{default:(0,o.w5)((()=>[(0,o.Wm)(D,{closable:"",type:"group"==e.type?"primary":"success",onClose:t=>w.onRemoveSelectHistoryItem(e.label)},{default:(0,o.w5)((()=>[(0,o.Uk)((0,a.zw)(e.label),1)])),_:2},1032,["type","onClose"])])),_:2},1032,["onClick"])))),128))]),f.queryData.projects.length>0||f.queryData.groups.length>0?((0,o.wg)(),(0,o.j4)(q,{key:0})):(0,o.kq)("",!0),(0,o._)("div",i,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(f.queryData.projects,((e,t)=>((0,o.wg)(),(0,o.iD)("div",{class:"search-item",key:t,onClick:t=>w.jumpToProject(e)},[(0,o._)("span",null,[(0,o.Wm)(D,{type:"success"},{default:(0,o.w5)((()=>[l])),_:1}),c,(0,o.Wm)(L,{underline:!1},{default:(0,o.w5)((()=>[(0,o.Uk)((0,a.zw)(e.groupName)+" / "+(0,a.zw)(e.projectName),1)])),_:2},1024)]),(0,o._)("span",d,[(0,o.Wm)(N,null,{default:(0,o.w5)((()=>[(0,o.Wm)(C)])),_:1})])],8,u)))),128)),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(f.queryData.groups,((e,t)=>((0,o.wg)(),(0,o.iD)("div",{class:"search-item",key:t,onClick:t=>w.jumpToGroup(e)},[(0,o._)("span",null,[(0,o.Wm)(D,null,{default:(0,o.w5)((()=>[m])),_:1}),h,(0,o.Wm)(L,{underline:!1},{default:(0,o.w5)((()=>[(0,o.Uk)((0,a.zw)(e.name),1)])),_:2},1024)]),(0,o._)("span",g,[(0,o.Wm)(N,null,{default:(0,o.w5)((()=>[(0,o.Wm)(C)])),_:1})])],8,p)))),128))])])),_:1},8,["modelValue","width"])])),_:1})}const w=(0,o._)("span",null,"Databasir",-1),y=["src"];function b(e,t,n,r,s,i){const u=(0,o.up)("home-filled"),l=(0,o.up)("el-icon"),c=(0,o.up)("el-menu-item"),d=(0,o.up)("el-sub-menu"),p=(0,o.up)("Search"),m=(0,o.up)("el-menu");return(0,o.wg)(),(0,o.j4)(m,{router:"",collapse:e.isCollapse,mode:"vertical",class:"left-menu"},{default:(0,o.w5)((()=>[(0,o.Wm)(c,{index:"/"},{title:(0,o.w5)((()=>[w])),default:(0,o.w5)((()=>[(0,o.Wm)(l,null,{default:(0,o.w5)((()=>[(0,o.Wm)(u)])),_:1})])),_:1}),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.routes,((t,n)=>((0,o.wg)(),(0,o.iD)(o.HY,{key:n},[e.isShowMenu(t)&&t.children.length>0&&t.children.some((e=>!e.hidden))?((0,o.wg)(),(0,o.j4)(d,{key:0,index:t.path},{title:(0,o.w5)((()=>[(0,o.Wm)(l,null,{default:(0,o.w5)((()=>[((0,o.wg)(),(0,o.j4)((0,o.LL)(t.icon)))])),_:2},1024),(0,o._)("span",null,(0,a.zw)(t.meta.nav),1)])),default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(t.children,((e,r)=>((0,o.wg)(),(0,o.iD)(o.HY,{key:n+"-"+r},[e.hidden?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(c,{key:0,index:t.path+"/"+e.path},{title:(0,o.w5)((()=>[(0,o._)("span",null,(0,a.zw)(e.meta.nav),1)])),default:(0,o.w5)((()=>[e.icon?((0,o.wg)(),(0,o.j4)(l,{key:0},{default:(0,o.w5)((()=>[((0,o.wg)(),(0,o.j4)((0,o.LL)(e.icon)))])),_:2},1024)):(0,o.kq)("",!0)])),_:2},1032,["index"]))],64)))),128))])),_:2},1032,["index"])):e.isShowMenu(t)?((0,o.wg)(),(0,o.j4)(c,{key:1,index:t.path},{title:(0,o.w5)((()=>[(0,o._)("span",null,(0,a.zw)(t.meta.nav),1)])),default:(0,o.w5)((()=>[t.icon?((0,o.wg)(),(0,o.j4)(l,{key:0},{default:(0,o.w5)((()=>[((0,o.wg)(),(0,o.j4)((0,o.LL)(t.icon)))])),_:2},1024)):(0,o.kq)("",!0),t.iconImage?((0,o.wg)(),(0,o.iD)("img",{key:1,src:t.iconImage,class:"icon-image"},null,8,y)):(0,o.kq)("",!0)])),_:2},1032,["index"])):(0,o.kq)("",!0)],64)))),128)),(0,o.Wm)(c,{index:"",onClick:t[0]||(t[0]=t=>e.showSearchDialog()),style:{color:"#303133"}},{default:(0,o.w5)((()=>[(0,o.Wm)(l,{style:{"vertical-align":"middle"}},{default:(0,o.w5)((()=>[(0,o.Wm)(p)])),_:1})])),_:1})])),_:1},8,["collapse"])}var v=n(51836),k=n(24239),S=(0,o.aZ)({emits:["on-search"],setup(e,t){const n=(0,o.Fl)((()=>k.Z.state.menu.isCollapse)),a=(0,r.tv)(),s=a.options.routes,i=e=>{if(e.hidden)return!1;if(e.meta.requireAnyRoles&&e.meta.requireAnyRoles.length>0){const t=v.E.hasAnyRoles(e.meta.requireAnyRoles);if(!t)return!1}return!0},u=()=>{k.Z.commit("expandMenu")},l=()=>{t.emit("on-search")};return{isCollapse:n,isShowMenu:i,expandMenu:u,routes:s,showSearchDialog:l}}}),_=n(83744);const j=(0,_.Z)(S,[["render",b]]);var x=j;function T(e,t,n,r,s,i){const u=(0,o.up)("fold"),l=(0,o.up)("el-icon"),c=(0,o.up)("el-link"),d=(0,o.up)("el-breadcrumb-item"),p=(0,o.up)("el-breadcrumb");return(0,o.wg)(),(0,o.j4)(p,{separator:"/"},{default:(0,o.w5)((()=>[i.menuIsCollapse?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(d,{key:0},{default:(0,o.w5)((()=>[(0,o.Wm)(c,{onClick:t[0]||(t[0]=e=>i.onFoldMenu()),underline:!1},{default:(0,o.w5)((()=>[(0,o.Wm)(l,null,{default:(0,o.w5)((()=>[(0,o.Wm)(u)])),_:1})])),_:1})])),_:1})),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(i.breadcrumbs,((e,t)=>((0,o.wg)(),(0,o.j4)(d,{key:t,to:e.to},{default:(0,o.w5)((()=>[(0,o.Uk)((0,a.zw)(e.name),1)])),_:2},1032,["to"])))),128))])),_:1})}var A={computed:{breadcrumbs:function(){return"function"===typeof this.$route.meta.breadcrumb?this.$route.meta.breadcrumb(this.$route,this.$store.state):[]},menuIsCollapse(){return this.$store.state.menu.isCollapse}},methods:{onFoldMenu(){this.$store.commit("foldMenu")}}};const D=(0,_.Z)(A,[["render",T]]);var L=D;const q=(0,o.Uk)("个人中心"),C=(0,o.Uk)("注销登陆");function N(e,t,n,r,s,i){const u=(0,o.up)("el-avatar"),l=(0,o.up)("el-dropdown-item"),c=(0,o.up)("el-dropdown-menu"),d=(0,o.up)("el-dropdown");return(0,o.wg)(),(0,o.j4)(d,null,{dropdown:(0,o.w5)((()=>[(0,o.Wm)(c,null,{default:(0,o.w5)((()=>[(0,o.Wm)(l,null,{default:(0,o.w5)((()=>[(0,o.Uk)((0,a.zw)(i.userNickname),1)])),_:1}),(0,o.Wm)(l,{icon:"user",divided:"",onClick:t[0]||(t[0]=e=>i.toProfilePage())},{default:(0,o.w5)((()=>[q])),_:1}),(0,o.Wm)(l,{icon:"back",onClick:t[1]||(t[1]=e=>i.onLogout())},{default:(0,o.w5)((()=>[C])),_:1})])),_:1})])),default:(0,o.w5)((()=>[(0,o.Wm)(u,{size:36,src:i.avatarUrl,icon:"avatar"},null,8,["src"])])),_:1})}var E={computed:{userNickname(){return this.$store.state.user.nickname},avatarUrl(){return this.$store.state.user.avatar}},methods:{onLogout(){v.E.removeUserLoginData(),this.$router.push({path:"/login"})},toProfilePage(){this.$router.push({path:"/profile"})}}};const W=(0,_.Z)(E,[["render",N]]);var I=W,O=n(63872);const H="/api/v1.0/search",P=e=>O.Z.get(H,{params:e});var U=n(98968),Z={components:{AppNav:x,Breadcrumb:L,Avatar:I},data(){return{showSearchDialog:!1,queryKeyword:"",queryData:{projects:[],groups:[]},queryLoading:!1,searchSelectHistory:[],searchSelectHistoryKey:"globalSearchSelectHistory"}},mounted(){this.loadSearchSelectHistory()},methods:{search(){this.showSearchDialog=!0},onQuery(e){this.queryLoading=!0,P({query:e}).then((e=>{e.errCode||(this.queryData=e.data)})).finally((()=>this.queryLoading=!1))},jumpToGroup(e){this.showSearchDialog=!1;const t="/groups/"+e.id+"?groupName="+e.name,n={label:e.name,path:t,type:"group"},r=this.searchSelectHistory.filter((e=>e.label!=n.label));r.unshift(n),r.splice(15),this.searchSelectHistory=r,window.localStorage.setItem(this.searchSelectHistoryKey,JSON.stringify(this.searchSelectHistory)),window.location=t},jumpToProject(e){this.showSearchDialog=!1;const t="/groups/"+e.groupId+"/projects/"+e.projectId+"/documents?groupName="+e.groupName+"&projectName="+e.projectName,n={label:e.groupName+" / "+e.projectName,path:t,type:"project"},r=this.searchSelectHistory.filter((e=>e.label!=n.label));r.unshift(n),r.splice(15),this.searchSelectHistory=r,window.localStorage.setItem(this.searchSelectHistoryKey,JSON.stringify(this.searchSelectHistory)),window.location=t},jumpToPath(e){window.location=e},loadSearchSelectHistory(){const e=this.searchSelectHistoryKey;if(null!=window.localStorage.getItem(e)){const t=JSON.parse(window.localStorage.getItem(e));this.searchSelectHistory=t}},onRemoveSelectHistoryItem(e){const t=this.searchSelectHistory.filter((t=>t.label!=e));this.searchSelectHistory=t,window.localStorage.setItem(this.searchSelectHistoryKey,JSON.stringify(this.searchSelectHistory))},dialogWidth(){return(0,U.c)()}}};const R=(0,_.Z)(Z,[["render",f]]);var K=R;function M(){return{name:"首页",to:{path:"/"}}}function z(){return{name:"项目中心",to:{name:"groupListPage"}}}function B(e){var t="项目组";return e.query.groupName&&(t=e.query.groupName),{name:t,to:{path:"/groups/"+e.params.groupId}}}function Y(e){var t="项目文档";e.query.projectName&&(t=e.query.projectName);var n=e.params.projectId,r=e.params.groupId;return{name:t,to:{path:"/groups/"+r+"/projects/"+n+"/documents",query:{projectName:t}}}}function V(){return{name:"用户列表",to:{path:"/users"}}}function $(){return{name:"个人中心",to:{path:"/profile"}}}function F(){return{name:"邮箱设置",to:{path:"/settings/sysEmail"}}}function J(){return{name:"操作日志",to:{path:"/settings/sysLog"}}}function Q(){return{name:"登录设置",to:{path:"/settings/sysOauth2"}}}function G(){return{name:"数据库扩展",to:{path:"/settings/sysDatabaseType"}}}function X(){return{name:"文档模板",to:{path:"/settings/sysDocumentTemplate"}}}const ee={index:()=>[M()],groupList:()=>[M(),z()],groupDashboard:(e,t)=>[M(),z(),B(e,t)],groupProjectDocument:(e,t)=>[M(),z(),B(e,t),Y(e)],userProfile:()=>[M(),$()],userList:()=>[M(),V()],sysEmailEdit:()=>[M(),F()],sysLog:()=>[M(),J()],sysOauth2:()=>[M(),Q()],sysDatabaseType:()=>[M(),G()],sysDocumentTemplate:()=>[M(),X()]};var te=ee;const ne=[{path:"/login",component:()=>n.e(770).then(n.bind(n,57770)),hidden:!0,meta:{requireAuth:!1}},{path:"/login/oauth2/:id",component:()=>n.e(865).then(n.bind(n,68865)),hidden:!0,props:!0,meta:{requireAuth:!1}},{path:"/",hidden:!0,component:K,children:[{path:"",hidden:!0,component:()=>n.e(314).then(n.bind(n,36314)),meta:{breadcrumb:te.groupList}}]},{path:"/groups",icon:"Collection",hidden:!0,component:K,meta:{nav:"项目中心"},children:[{path:"",name:"groupListPage",hidden:!0,component:()=>n.e(314).then(n.bind(n,36314)),meta:{breadcrumb:te.groupList}},{path:":groupId",hidden:!0,component:()=>n.e(443).then(n.bind(n,41443)),meta:{breadcrumb:te.groupDashboard}},{path:":groupId/projects/:projectId/documents",hidden:!0,component:()=>Promise.all([n.e(109),n.e(198)]).then(n.bind(n,10198)),meta:{breadcrumb:te.groupProjectDocument}}]},{path:"/users",icon:"List",component:K,meta:{nav:"用户中心",requireAnyRoles:["SYS_OWNER"]},children:[{path:"",hidden:!0,component:()=>n.e(538).then(n.bind(n,40538)),meta:{breadcrumb:te.userList}}]},{path:"/profile",icon:"User",component:K,meta:{nav:"个人中心",breadcrumb:te.userProfile},children:[{path:"",hidden:!0,component:()=>Promise.all([n.e(109),n.e(469)]).then(n.bind(n,26469))}]},{path:"/settings",icon:"Setting",component:K,meta:{nav:"系统中心",requireAnyRoles:["SYS_OWNER"]},children:[{path:"sysEmail",icon:"Notification",component:()=>n.e(243).then(n.bind(n,51243)),meta:{nav:"邮箱设置",breadcrumb:te.sysEmailEdit}},{path:"sysLog",icon:"Document",component:()=>n.e(17).then(n.bind(n,16017)),meta:{nav:"操作日志",breadcrumb:te.sysLog}},{path:"sysOauth2",icon:"Connection",component:()=>n.e(834).then(n.bind(n,86834)),meta:{nav:"登陆设置",breadcrumb:te.sysOauth2}},{path:"sysDatabaseType",icon:"office-building",component:()=>n.e(718).then(n.bind(n,21718)),meta:{nav:"数据库扩展",breadcrumb:te.sysDatabaseType}},{path:"sysDocumentTemplate",icon:"document-add",component:()=>n.e(227).then(n.bind(n,93227)),meta:{nav:"文档模板",breadcrumb:te.sysDocumentTemplate}},{path:"sysKey",icon:"Key",hidden:"true",component:K,meta:{nav:"系统秘钥",breadcrumb:te.sysKeyEdit}}]}],re=(0,r.p7)({history:(0,r.PO)(),routes:ne});re.beforeEach(((e,t,n)=>{0==e.meta.requireAuth?"/login"==e.path&&v.r.hasAccessToken()?n(t):n():v.r.hasAccessToken()?n():n({path:"/login"})})),re.beforeEach(((e,t,n)=>{!e.query.groupName&&t.query.groupName&&(e.query.groupName=t.query.groupName),!e.query.projectName&&t.query.projectName&&(e.query.projectName=t.query.projectName),n()}));var oe=re},24239:function(e,t,n){var r=n(88637),o=n(51836);const a=(0,r.MT)({state(){const e={user:{nickname:null,usernmae:null,email:null,avatar:null},groupListActiveTab:null,menu:{isCollapse:!0}},t=o.E.loadUserLoginData();return t&&(e.user.nickname=t.nickname,e.user.usernmae=t.usernmae,e.user.email=t.email,e.user.avatar=t.avatar),e},mutations:{userUpdate(e,t){t.nickname&&(e.user.nickname=t.nickname),t.usernmae&&(e.user.usernmae=t.usernmae),t.email&&(e.user.email=t.email),t.avatar&&(e.user.avatar=t.avatar)},foldMenu(e){e.menu.isCollapse=!0},expandMenu(e){e.menu.isCollapse=!1},switchGroupListActiveTab(e,t){t&&(e.groupListActiveTab=t)}}});t["Z"]=a},98968:function(e,t,n){n.d(t,{c:function(){return o}});const r=e=>{const t=window.innerWidth;return t>=1920?e.xl?e.xl:null:t>=1200?e.lg?e.lg:e.xl?e.xl:null:t>=992?e.md?e.md:e.lg?e.lg:e.xl?e.xl:null:t>=768?e.sm?e.sm:e.md?e.md:e.lg?e.lg:e.xl?e.xl:null:e.xs?e.xs:e.sm?e.sm:e.md?e.md:e.lg?e.lg:e.xl?e.xl:null},o=()=>r({xl:"36%",lg:"42%",md:"60%",sm:"80%",xs:"90%"})},51836:function(e,t,n){n.d(t,{r:function(){return s},E:function(){return i}});const r="accessToken",o="accessTokenExpireAt",a="userLoginData",s={hasAccessToken(){const e=this.loadAccessToken();return e},hasValidAccessToken(){const e=this.loadAccessToken(),t=window.localStorage.getItem(o);return e&&t?t>(new Date).getTime()-1e4:(console.log("warn: not found accessToken and expireAt key"),!1)},saveAccessToken(e,t){window.localStorage.setItem(r,e),window.localStorage.setItem(o,t)},loadAccessToken(){let e=window.localStorage.getItem(r);return e||null}},i={saveUserLoginData(e){window.localStorage.setItem(r,e.accessToken),window.localStorage.setItem(o,e.accessTokenExpireAt),window.localStorage.setItem(a,JSON.stringify(e))},removeUserLoginData(){window.localStorage.removeItem(a),window.localStorage.removeItem(r),window.localStorage.removeItem(o)},loadUserLoginData(){if(!window.localStorage.getItem(a))return null;const e=window.localStorage.getItem(a);return JSON.parse(e)},hasAnyRoles(e){const t=window.localStorage.getItem(a);if(null==t)return!1;const n=JSON.parse(t);return n.roles.map((e=>e.groupId?e.role+"?groupId="+e.groupId:e.role)).some((t=>e.some((e=>e==t))))},getRefreshToken(){const e=window.localStorage.getItem(a);if(null==e)return null;const t=JSON.parse(e);return t.refreshToken}}},63872:function(e,t,n){var r=n(9669),o=n.n(r),a=n(45244),s=n(46416),i=n(51836),u=n(40152);const l={NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_API_URL;o().defaults.baseURL=l,o().defaults.timeout=15e3,o().defaults.withCredentials=!1,o().defaults.headers.post["Content-Type"]="application/json",o().defaults.headers.post["Access-Control-Allow-Origin-Type"]="*";let c=!1;function d(){c=!0}function p(){c=!1}let m=[];function h(e){m.push(e)}function g(e){m.forEach((t=>{t(e)})),m=[]}async function f(e){const t=i.E.getRefreshToken();return t||y(),c?new Promise((t=>{h((()=>{e&&(e.headers.Authorization="Bearer "+i.r.loadAccessToken()),t(e)}))})):(d(),await(0,u.jb)(t).then((e=>{e.errCode?y():(i.r.saveAccessToken(e.data.accessToken,e.data.accessTokenExpireAt),p())})).finally((()=>p())))}async function w(e){try{const t=await o()({method:e.method,data:e.data,url:e.url,baseURL:e.baseURL,headers:{Authorization:"Bearer "+i.r.loadAccessToken()}});return g(e),t}catch(t){console.log(t),b("网络异常,请稍后再试")}}function y(){i.E.removeUserLoginData(),s.Z.replace("/login")}function b(e){(0,a.z8)({message:e,type:"error",duration:5e3,grouping:!0})}o().interceptors.request.use((async function(e){if("/access_tokens"==e.url||e.url.startsWith("/oauth2")||"/login"==e.url)return e;if(i.r.hasValidAccessToken())return e.headers.Authorization="Bearer "+i.r.loadAccessToken(),e;if(c){const t=new Promise((t=>{h((()=>{e&&(e.headers.Authorization="Bearer "+i.r.loadAccessToken()),t(e)}))}));return t}return e}),(function(e){return p(),Promise.reject(e)})),o().interceptors.response.use((e=>{const t=e.data;return t.errCode&&b(t.errMessage),t}),(e=>{if(e.response)if(401==e.response.status){if("X_0002"==e.response.data.errCode)i.E.removeUserLoginData(),b("登陆状态失效,请重新登陆"),y();else if("X_0004"==e.response.data.errCode)return f(e.config).then((()=>w(e.config)))}else 403==e.response.status?b("无执行该操作的权限"):b(e.message);else console.log(e),b("网络异常,请稍后再试");return Promise.reject(e)})),t["Z"]=o()},36658:function(e,t,n){e.exports=n.p+"img/MariaDB.9e6854cc.svg"},92357:function(e,t,n){e.exports=n.p+"img/MySQL.c8f47618.svg"},22260:function(e,t,n){e.exports=n.p+"img/Oracle.c9ed26e0.svg"},43609:function(e,t,n){e.exports=n.p+"img/PostgreSQL.6e3d3a5e.svg"},35641:function(e,t,n){e.exports=n.p+"img/Sqlserver.deff7c4c.svg"}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.m=e,function(){var e=[];n.O=function(t,r,o,a){if(!r){var s=1/0;for(c=0;c<e.length;c++){r=e[c][0],o=e[c][1],a=e[c][2];for(var i=!0,u=0;u<r.length;u++)(!1&a||s>=a)&&Object.keys(n.O).every((function(e){return n.O[e](r[u])}))?r.splice(u--,1):(i=!1,a<s&&(s=a));if(i){e.splice(c--,1);var l=o();void 0!==l&&(t=l)}}return t}a=a||0;for(var c=e.length;c>0&&e[c-1][2]>a;c--)e[c]=e[c-1];e[c]=[r,o,a]}}(),function(){n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,{a:t}),t}}(),function(){n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}}(),function(){n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))}}(),function(){n.u=function(e){return"js/"+e+"."+{17:"a55e2565",109:"e4093265",198:"cf1b8be8",227:"dd870f87",243:"b68151eb",314:"e93feee2",443:"2dc14e12",469:"e640f94e",538:"3283120f",718:"633339ea",770:"820d817f",834:"352313e6",865:"97682ffa"}[e]+".js"}}(),function(){n.miniCssF=function(e){return"css/"+e+"."+{198:"e14b4ae3",227:"90d5c1b0",314:"6b48a93a",443:"b8c2d37b",718:"67c86358",770:"80f6e2e0",834:"f2905e33",865:"7df1e56e"}[e]+".css"}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={},t="databasir:";n.l=function(r,o,a,s){if(e[r])e[r].push(o);else{var i,u;if(void 0!==a)for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++){var d=l[c];if(d.getAttribute("src")==r||d.getAttribute("data-webpack")==t+a){i=d;break}}i||(u=!0,i=document.createElement("script"),i.charset="utf-8",i.timeout=120,n.nc&&i.setAttribute("nonce",n.nc),i.setAttribute("data-webpack",t+a),i.src=r),e[r]=[o];var p=function(t,n){i.onerror=i.onload=null,clearTimeout(m);var o=e[r];if(delete e[r],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((function(e){return e(n)})),t)return t(n)},m=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.bind(null,i.onload),u&&document.head.appendChild(i)}}}(),function(){n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){n.p="/"}(),function(){var e=function(e,t,n,r){var o=document.createElement("link");o.rel="stylesheet",o.type="text/css";var a=function(a){if(o.onerror=o.onload=null,"load"===a.type)n();else{var s=a&&("load"===a.type?"missing":a.type),i=a&&a.target&&a.target.href||t,u=new Error("Loading CSS chunk "+e+" failed.\n("+i+")");u.code="CSS_CHUNK_LOAD_FAILED",u.type=s,u.request=i,o.parentNode.removeChild(o),r(u)}};return o.onerror=o.onload=a,o.href=t,document.head.appendChild(o),o},t=function(e,t){for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var o=n[r],a=o.getAttribute("data-href")||o.getAttribute("href");if("stylesheet"===o.rel&&(a===e||a===t))return o}var s=document.getElementsByTagName("style");for(r=0;r<s.length;r++){o=s[r],a=o.getAttribute("data-href");if(a===e||a===t)return o}},r=function(r){return new Promise((function(o,a){var s=n.miniCssF(r),i=n.p+s;if(t(s,i))return o();e(r,i,o,a)}))},o={143:0};n.f.miniCss=function(e,t){var n={198:1,227:1,314:1,443:1,718:1,770:1,834:1,865:1};o[e]?t.push(o[e]):0!==o[e]&&n[e]&&t.push(o[e]=r(e).then((function(){o[e]=0}),(function(t){throw delete o[e],t})))}}(),function(){var e={143:0};n.f.j=function(t,r){var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var a=new Promise((function(n,r){o=e[t]=[n,r]}));r.push(o[2]=a);var s=n.p+n.u(t),i=new Error,u=function(r){if(n.o(e,t)&&(o=e[t],0!==o&&(e[t]=void 0),o)){var a=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.src;i.message="Loading chunk "+t+" failed.\n("+a+": "+s+")",i.name="ChunkLoadError",i.type=a,i.request=s,o[1](i)}};n.l(s,u,"chunk-"+t,t)}},n.O.j=function(t){return 0===e[t]};var t=function(t,r){var o,a,s=r[0],i=r[1],u=r[2],l=0;if(s.some((function(t){return 0!==e[t]}))){for(o in i)n.o(i,o)&&(n.m[o]=i[o]);if(u)var c=u(n)}for(t&&t(r);l<s.length;l++)a=s[l],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(c)},r=self["webpackChunkdatabasir"]=self["webpackChunkdatabasir"]||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var r=n.O(void 0,[998],(function(){return n(21381)}));r=n.O(r)})();
//# sourceMappingURL=app.98502fba.js.map