7 lines
18 KiB
JavaScript
7 lines
18 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-76c3d685"],{"408c":function(e,t,n){var a=n("2b3e"),s=function(){return a.Date.now()};e.exports=s},"57d5":function(e,t,n){},"690a":function(e,t,n){e.exports=n.p+"img/avatar.c58e4651.png"},"7f94":function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:e.loading,expression:"loading",modifiers:{fullscreen:!0,lock:!0}}],class:["aui-wrapper",{"aui-sidebar--fold":e.$store.state.sidebarFold}],attrs:{"element-loading-text":e.$t("loading")}},[e.loading?e._e():[n("main-navbar"),n("main-sidebar"),n("div",{staticClass:"aui-content__wrapper"},[e.$store.state.contentIsNeedRefresh?e._e():n("main-content")],1)]],2)},s=[],r=(n("99af"),n("4de4"),n("b0c0"),n("d3b7"),n("3ca3"),n("ddb0"),n("5530")),i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("nav",{staticClass:"aui-navbar",class:"aui-navbar--"+e.$store.state.navbarLayoutType},[a("div",{staticClass:"aui-navbar__header"},[a("h1",{staticClass:"aui-navbar__brand",on:{click:function(t){return e.$router.push({name:"home"})}}},[a("a",{staticClass:"aui-navbar__brand-lg",attrs:{href:"javascript:;"}},[e._v(e._s(e.$t("brand.lg")))]),a("a",{staticClass:"aui-navbar__brand-mini",attrs:{href:"javascript:;"}},[e._v(e._s(e.$t("brand.mini")))])])]),a("div",{staticClass:"aui-navbar__body"},[a("el-menu",{staticClass:"aui-navbar__menu mr-auto",attrs:{mode:"horizontal"}},[a("el-menu-item",{attrs:{index:"1"},on:{click:function(t){e.$store.state.sidebarFold=!e.$store.state.sidebarFold}}},[a("svg",{staticClass:"icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch",attrs:{"aria-hidden":"true"}},[a("use",{attrs:{"xlink:href":"#icon-outdent"}})])]),a("el-menu-item",{attrs:{index:"2"},on:{click:function(t){return e.refresh()}}},[a("svg",{staticClass:"icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh",attrs:{"aria-hidden":"true"}},[a("use",{attrs:{"xlink:href":"#icon-sync"}})])])],1),a("el-menu",{staticClass:"aui-navbar__menu",attrs:{mode:"horizontal"}},[a("el-menu-item",{attrs:{index:"6"},on:{click:function(t){return e.$router.push({name:"home"})}}},[a("svg",{staticClass:"icon-svg aui-navbar__icon-menu",attrs:{"aria-hidden":"true"}},[a("use",{attrs:{"xlink:href":"#icon-home"}})])]),a("el-menu-item",{attrs:{index:"4"},on:{click:function(t){return e.fullscreenHandle()}}},[a("svg",{staticClass:"icon-svg aui-navbar__icon-menu",attrs:{"aria-hidden":"true"}},[a("use",{attrs:{"xlink:href":"#icon-fullscreen"}})])]),a("el-menu-item",{staticClass:"aui-navbar__avatar",attrs:{index:"5"}},[a("el-dropdown",{attrs:{placement:"bottom","show-timeout":0}},[a("span",{staticClass:"el-dropdown-link"},[a("img",{attrs:{src:n("690a")}}),a("span",[e._v(e._s(e.$store.state.user.name))]),a("i",{staticClass:"el-icon-arrow-down"})]),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{nativeOn:{click:function(t){return e.updatePasswordHandle()}}},[a("svg",{staticClass:"icon-svg aui-content--tabs-icon-nav",attrs:{"aria-hidden":"true"}},[a("use",{attrs:{"xlink:href":"#修改密码"}})]),e._v(" "+e._s(e.$t("updatePassword.title")))]),a("el-dropdown-item",{nativeOn:{click:function(t){return e.logoutHandle()}}},[a("svg",{staticClass:"icon-svg aui-content--tabs-icon-nav",attrs:{"aria-hidden":"true"}},[a("use",{attrs:{"xlink:href":"#tuichu"}})]),e._v(" "+e._s(e.$t("logout")))])],1)],1)],1)],1)],1),e.updatePasswordVisible?a("update-password",{ref:"updatePassword"}):e._e()],1)},o=[],u=n("93bf"),l=n.n(u),c=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dialog",{attrs:{visible:e.visible,title:e.$t("updatePassword.title"),"close-on-click-modal":!1,"close-on-press-escape":!1,"append-to-body":!0},on:{"update:visible":function(t){e.visible=t}}},[n("el-form",{ref:"dataForm",attrs:{model:e.dataForm,rules:e.dataRule,"label-width":"120px"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.dataFormSubmitHandle()}}},[n("el-form-item",{attrs:{label:e.$t("updatePassword.username")}},[n("span",[e._v(e._s(e.$store.state.user.name))])]),n("el-form-item",{attrs:{prop:"password",label:e.$t("updatePassword.password")}},[n("el-input",{attrs:{type:"password",placeholder:e.$t("updatePassword.password")},model:{value:e.dataForm.password,callback:function(t){e.$set(e.dataForm,"password",t)},expression:"dataForm.password"}})],1),n("el-form-item",{attrs:{prop:"newPassword",label:e.$t("updatePassword.newPassword")}},[n("el-input",{attrs:{type:"password",placeholder:e.$t("updatePassword.newPassword")},model:{value:e.dataForm.newPassword,callback:function(t){e.$set(e.dataForm,"newPassword",t)},expression:"dataForm.newPassword"}})],1),n("el-form-item",{attrs:{prop:"confirmPassword",label:e.$t("updatePassword.confirmPassword")}},[n("el-input",{attrs:{type:"password",placeholder:e.$t("updatePassword.confirmPassword")},model:{value:e.dataForm.confirmPassword,callback:function(t){e.$set(e.dataForm,"confirmPassword",t)},expression:"dataForm.confirmPassword"}})],1)],1),n("template",{slot:"footer"},[n("el-button",{on:{click:function(t){e.visible=!1}}},[e._v(e._s(e.$t("cancel")))]),n("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.dataFormSubmitHandle()}}},[e._v(e._s(e.$t("confirm")))])],1)],2)},d=[],m=(n("ac1f"),n("5319"),n("b047c")),f=n.n(m),b=n("ed08"),h={data:function(){return{visible:!1,dataForm:{password:"",newPassword:"",confirmPassword:""}}},computed:{dataRule:function(){var e=this,t=function(t,n,a){if(e.dataForm.newPassword!==n)return a(new Error(e.$t("updatePassword.validate.confirmPassword")));a()};return{password:[{required:!0,message:this.$t("validate.required"),trigger:"blur"}],newPassword:[{required:!0,message:this.$t("validate.required"),trigger:"blur"}],confirmPassword:[{required:!0,message:this.$t("validate.required"),trigger:"blur"},{validator:t,trigger:"blur"}]}}},methods:{init:function(){var e=this;this.visible=!0,this.$nextTick((function(){e.$refs["dataForm"].resetFields()}))},dataFormSubmitHandle:f()((function(){var e=this;this.$refs["dataForm"].validate((function(t){if(!t)return!1;e.$http.put("/sys/user/password",e.dataForm).then((function(t){var n=t.data;if(0!==n.code)return e.$message.error(n.msg);e.$message({message:e.$t("prompt.success"),type:"success",duration:500,onClose:function(){e.visible=!1,Object(b["a"])(),e.$router.replace({name:"login"})}})})).catch((function(){}))}))}),1e3,{leading:!0,trailing:!1})}},p=h,v=n("2877"),w=Object(v["a"])(p,c,d,!1,null,null,null),g=w.exports,$=n("12cb"),_=n("a78e"),k=n.n(_),x={inject:["refresh"],data:function(){return{updatePasswordVisible:!1,messageTip:!1}},components:{UpdatePassword:g},computed:{language:function(){return k.a.get("language")}},methods:{handleSetLanguage:function(e){k.a.set("language",e),document.querySelector("html").setAttribute("lang",e),document.title=$["b"][e].brand.lg,window.location.reload()},fullscreenHandle:function(){if(!l.a.enabled)return this.$message({message:this.$t("fullscreen.prompt"),type:"warning",duration:500});l.a.toggle()},updatePasswordHandle:function(){var e=this;this.updatePasswordVisible=!0,this.$nextTick((function(){e.$refs.updatePassword.init()}))},logoutHandle:function(){var e=this;this.$confirm(this.$t("prompt.info",{handle:this.$t("logout")}),this.$t("prompt.title"),{confirmButtonText:this.$t("confirm"),cancelButtonText:this.$t("cancel"),type:"warning"}).then((function(){e.$http.post("/logout").then((function(t){var n=t.data;if(0!==n.code)return e.$message.error(n.msg);Object(b["a"])(),e.$router.push({name:"login"})})).catch((function(){}))})).catch((function(){}))}}},F=x,T=Object(v["a"])(F,i,o,!1,null,null,null),y=T.exports,P=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("aside",{class:["aui-sidebar","aui-sidebar--"+e.$store.state.sidebarLayoutSkin]},[n("div",{staticClass:"aui-sidebar__inner"},[n("el-menu",{staticClass:"aui-sidebar__menu",attrs:{"default-active":e.$store.state.sidebarMenuActiveName,collapse:e.$store.state.sidebarFold,"unique-opened":!0,collapseTransition:!1}},e._l(e.$store.state.sidebarMenuList,(function(e){return n("sub-menu",{key:e.id,attrs:{menu:e}})})),1)],1)])},C=[],E=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.menu.children&&e.menu.children.length>=1?n("el-submenu",{attrs:{index:e.menu.id,"popper-append-to-body":!1}},[n("template",{slot:"title"},[n("svg",{staticClass:"icon-svg aui-sidebar__menu-icon",attrs:{"aria-hidden":"true"}},[n("use",{attrs:{"xlink:href":"#"+e.menu.icon}})]),n("span",[e._v(e._s(e.menu.name))])]),e._l(e.menu.children,(function(e){return n("sub-menu",{key:e.id,attrs:{menu:e}})}))],2):n("el-menu-item",{attrs:{index:e.menu.id},on:{click:function(t){return e.gotoRouteHandle(e.menu.id)}}},[n("svg",{staticClass:"icon-svg aui-sidebar__menu-icon-son",attrs:{"aria-hidden":"true"}},[n("use",{attrs:{"xlink:href":"#椭圆形"}})]),n("span",[e._v(e._s(e.menu.name))])])},O=[],S={name:"sub-menu",props:{menu:{type:Object,required:!0}},components:{SubMenu:j},methods:{gotoRouteHandle:function(e){var t=window.SITE_CONFIG["dynamicMenuRoutes"].filter((function(t){return t.meta.menuId===e}))[0];t&&this.$router.push({name:t.name})}}},H=S,N=Object(v["a"])(H,E,O,!1,null,null,null),j=N.exports,I={data:function(){return{}},components:{SubMenu:j},created:function(){this.$store.state.sidebarMenuList=window.SITE_CONFIG["menuList"]}},q=I,A=Object(v["a"])(q,P,C,!1,null,null,null),R=A.exports,L=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("main",{class:["aui-content",{"aui-content--tabs":e.$route.meta.isTab}]},[e.$route.meta.isTab?[n("el-dropdown",{staticClass:"aui-content--tabs-tools"},[n("i",{staticClass:"el-icon-arrow-down"}),n("el-dropdown-menu",{attrs:{slot:"dropdown","show-timeout":0},slot:"dropdown"},[n("el-dropdown-item",{nativeOn:{click:function(t){return e.tabRemoveHandle(e.$store.state.contentTabsActiveName)}}},[e._v(e._s(e.$t("contentTabs.closeCurrent")))]),n("el-dropdown-item",{nativeOn:{click:function(t){return e.tabsCloseOtherHandle()}}},[e._v(e._s(e.$t("contentTabs.closeOther")))]),n("el-dropdown-item",{nativeOn:{click:function(t){return e.tabsCloseAllHandle()}}},[e._v(e._s(e.$t("contentTabs.closeAll")))])],1)],1),n("el-tabs",{on:{"tab-click":e.tabSelectedHandle,"tab-remove":e.tabRemoveHandle},model:{value:e.$store.state.contentTabsActiveName,callback:function(t){e.$set(e.$store.state,"contentTabsActiveName",t)},expression:"$store.state.contentTabsActiveName"}},e._l(e.$store.state.contentTabs,(function(t){return n("el-tab-pane",{key:t.name,class:{"is-iframe":e.tabIsIframe(t.iframeURL)},attrs:{name:t.name,label:t.title,closable:"home"!==t.name}},["home"===t.name?[n("svg",{staticClass:"icon-svg aui-content--tabs-icon-nav",attrs:{slot:"label","aria-hidden":"true"},slot:"label"},[n("use",{attrs:{"xlink:href":"#icon-home"}})])]:e._e(),e.tabIsIframe(t.iframeURL)?n("div",{staticStyle:{width:"100%",height:"100%"}},[n("iframe",{staticStyle:{position:"relative"},attrs:{src:t.iframeURL,width:"100%",height:"100%",frameborder:"0",scrolling:"yes"}}),"数据报表"===t.title?n("div",{staticClass:"zhegai"}):e._e()]):n("keep-alive",[t.name===e.$store.state.contentTabsActiveName?n("router-view"):e._e()],1)],2)})),1)]:[n("keep-alive",[n("router-view")],1)]],2)},M=[],z=n("61f7"),U={data:function(){return{}},created:function(){},methods:{tabIsIframe:function(e){return Object(z["c"])(e)},tabSelectedHandle:function(e){e=this.$store.state.contentTabs.filter((function(t){return t.name===e.name}))[0],e&&this.$router.push({name:e.name,params:Object(r["a"])({},e.params),query:Object(r["a"])({},e.query)})},tabRemoveHandle:function(e){if("home"===e)return!1;if(this.$store.state.contentTabs=this.$store.state.contentTabs.filter((function(t){return t.name!==e})),this.$store.state.contentTabs.length<=0)return this.$store.state.sidebarMenuActiveName=this.$store.state.contentTabsActiveName="home",!1;if(e===this.$store.state.contentTabsActiveName){var t=this.$store.state.contentTabs[this.$store.state.contentTabs.length-1];this.$router.push({name:t.name,params:Object(r["a"])({},t.params),query:Object(r["a"])({},t.query)})}},tabsCloseOtherHandle:function(){var e=this;this.$store.state.contentTabs=this.$store.state.contentTabs.filter((function(t){return"home"===t.name||t.name===e.$store.state.contentTabsActiveName}))},tabsCloseAllHandle:function(){this.$store.state.contentTabs=this.$store.state.contentTabs.filter((function(e){return"home"===e.name})),this.$router.push({name:"home"})}}},B=U,W=(n("7fda"),Object(v["a"])(B,L,M,!1,null,null,null)),D=W.exports,G={provide:function(){return{refresh:function(){var e=this;this.$store.state.contentIsNeedRefresh=!0,this.$nextTick((function(){e.$store.state.contentIsNeedRefresh=!1}))}}},data:function(){return{loading:!0}},components:{MainNavbar:y,MainSidebar:R,MainContent:D},watch:{$route:"routeHandle"},created:function(){var e=this;this.windowResizeHandle(),this.routeHandle(this.$route),Promise.all([this.getUserInfo(),this.getPermissions()]).then((function(){e.loading=!1}))},methods:{windowResizeHandle:function(){var e=this;this.$store.state.sidebarFold=document.documentElement["clientWidth"]<=992||!1,window.addEventListener("resize",f()((function(){e.$store.state.sidebarFold=document.documentElement["clientWidth"]<=992||!1}),150))},routeHandle:function(e){if(!e.meta.isTab)return!1;var t=this.$store.state.contentTabs.filter((function(t){return t.name===e.name}))[0];t||(t=Object(r["a"])(Object(r["a"])(Object(r["a"])({},window.SITE_CONFIG["contentTabDefault"]),e.meta),{},{name:e.name,params:Object(r["a"])({},e.params),query:Object(r["a"])({},e.query)}),this.$store.state.contentTabs=this.$store.state.contentTabs.concat(t)),this.$store.state.sidebarMenuActiveName=t.menuId,this.$store.state.contentTabsActiveName=t.name},getUserInfo:function(){var e=this;return this.$http.get("/sys/user/info").then((function(t){var n=t.data;if(0!==n.code)return e.$message.error(n.msg);e.$store.state.user.id=n.data.id,e.$store.state.user.name=n.data.username,e.$store.state.user.superAdmin=n.data.superAdmin})).catch((function(){}))},getPermissions:function(){var e=this;return this.$http.get("/sys/menu/permissions").then((function(t){var n=t.data;if(0!==n.code)return e.$message.error(n.msg);window.SITE_CONFIG["permissions"]=n.data})).catch((function(){}))}}},V=G,J=Object(v["a"])(V,a,s,!1,null,null,null);t["default"]=J.exports},"7fda":function(e,t,n){"use strict";var a=n("57d5"),s=n.n(a);s.a},"93bf":function(e,t,n){
|
|
/*!
|
|
* screenfull
|
|
* v4.2.1 - 2019-07-27
|
|
* (c) Sindre Sorhus; MIT License
|
|
*/
|
|
(function(){"use strict";var t="undefined"!==typeof window&&"undefined"!==typeof window.document?window.document:{},n=e.exports,a="undefined"!==typeof Element&&"ALLOW_KEYBOARD_INPUT"in Element,s=function(){for(var e,n=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],a=0,s=n.length,r={};a<s;a++)if(e=n[a],e&&e[1]in t){for(a=0;a<e.length;a++)r[n[0][a]]=e[a];return r}return!1}(),r={change:s.fullscreenchange,error:s.fullscreenerror},i={request:function(e){return new Promise(function(n,r){var i,o=s.requestFullscreen,u=function(){this.off("change",u),n()}.bind(this);this.on("change",u),e=e||t.documentElement,i=/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)?e[o]():e[o](a?Element.ALLOW_KEYBOARD_INPUT:{}),Promise.resolve(i).catch(r)}.bind(this))},exit:function(){return new Promise(function(e){if(this.isFullscreen){var n=function(){this.off("change",n),e()}.bind(this);t[s.exitFullscreen](),this.on("change",n)}else e()}.bind(this))},toggle:function(e){return this.isFullscreen?this.exit():this.request(e)},onchange:function(e){this.on("change",e)},onerror:function(e){this.on("error",e)},on:function(e,n){var a=r[e];a&&t.addEventListener(a,n,!1)},off:function(e,n){var a=r[e];a&&t.removeEventListener(a,n,!1)},raw:s};s?(Object.defineProperties(i,{isFullscreen:{get:function(){return Boolean(t[s.fullscreenElement])}},element:{enumerable:!0,get:function(){return t[s.fullscreenElement]}},enabled:{enumerable:!0,get:function(){return Boolean(t[s.fullscreenEnabled])}}}),n?(e.exports=i,e.exports.default=i):window.screenfull=i):n?e.exports=!1:window.screenfull=!1})()},b047c:function(e,t,n){var a=n("1a8c"),s=n("408c"),r=n("b4b0"),i="Expected a function",o=Math.max,u=Math.min;function l(e,t,n){var l,c,d,m,f,b,h=0,p=!1,v=!1,w=!0;if("function"!=typeof e)throw new TypeError(i);function g(t){var n=l,a=c;return l=c=void 0,h=t,m=e.apply(a,n),m}function $(e){return h=e,f=setTimeout(x,t),p?g(e):m}function _(e){var n=e-b,a=e-h,s=t-n;return v?u(s,d-a):s}function k(e){var n=e-b,a=e-h;return void 0===b||n>=t||n<0||v&&a>=d}function x(){var e=s();if(k(e))return F(e);f=setTimeout(x,_(e))}function F(e){return f=void 0,w&&l?g(e):(l=c=void 0,m)}function T(){void 0!==f&&clearTimeout(f),h=0,l=b=c=f=void 0}function y(){return void 0===f?m:F(s())}function P(){var e=s(),n=k(e);if(l=arguments,c=this,b=e,n){if(void 0===f)return $(b);if(v)return clearTimeout(f),f=setTimeout(x,t),g(b)}return void 0===f&&(f=setTimeout(x,t)),m}return t=r(t)||0,a(n)&&(p=!!n.leading,v="maxWait"in n,d=v?o(r(n.maxWait)||0,t):d,w="trailing"in n?!!n.trailing:w),P.cancel=T,P.flush=y,P}e.exports=l},b4b0:function(e,t,n){var a=n("1a8c"),s=n("ffd6"),r=NaN,i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;function d(e){if("number"==typeof e)return e;if(s(e))return r;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=u.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):o.test(e)?r:+e}e.exports=d},ffd6:function(e,t,n){var a=n("3729"),s=n("1310"),r="[object Symbol]";function i(e){return"symbol"==typeof e||s(e)&&a(e)==r}e.exports=i}}]); |