1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-d0e1b93a"],{"028b":function(e,t,i){"use strict";i("3f4d")},"0869":function(e,t,i){},"0b8e":function(e,t,i){"use strict";i("7b2e")},"10fb":function(e,t,i){e.exports=i.p+"static/img/logo.66bee2dc.gif"},"3f4d":function(e,t,i){},"500f":function(e,t,i){},"548d":function(e,t,i){"use strict";i("af59")},6596:function(e,t,i){"use strict";i("98ac")},"70f7":function(e,t,i){"use strict";i("82c8")},"7b2e":function(e,t,i){},"82c8":function(e,t,i){},"86f1":function(e,t,i){"use strict";i("0869")},"87d9":function(e,t,i){},"98ac":function(e,t,i){},af59:function(e,t,i){},bf44:function(e,t,i){},c1f7:function(e,t,i){"use strict";i.r(t);var n=i("5530"),s={name:"AppMain",computed:{cachedViews:function(){return this.$store.state.tagsView.cachedViews},key:function(){return this.$route.path}}},a=(i("86f1"),i("028b"),i("2877")),o=(s=Object(a.a)(s,(function(){var e=this.$createElement;e=this._self._c||e;return e("section",{staticClass:"app-main"},[e("transition",{attrs:{name:"fade-transform",mode:"out-in"}},[e("keep-alive",{attrs:{include:this.cachedViews}},[e("router-view",{key:this.key})],1)],1)],1)}),[],!1,null,"384a48c0",null).exports,i("1da1")),r=(i("96cf"),i("2f62")),l=i("9f53"),c=(l={computed:Object(n.a)({},Object(r.b)(["name","device"])),mixins:[l.a],data:function(){return{showModel:!1,loading:!1,isShow:!0,statsTime:0,endTime:0,checked:!1,activeMsg:null}},mounted:function(){},methods:{logout:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$store.dispatch("user/logout");case 2:e.$router.push("/login?redirect=".concat(e.$route.fullPath));case 3:case"end":return t.stop()}}),t)})))()}}},l=(i("548d"),Object(a.a)(l,(function(){var e=this,t=e.$createElement;t=e._self._c||t;return t("div",{staticClass:"navbar"},[t("b",{staticClass:"system-title",on:{click:function(t){return e.$router.push({path:"/demand/index"})}}},[e._v("工单管理系统")]),t("div",{staticClass:"right-menu"},[t("el-dropdown",{staticClass:"avatar-container right-menu-item hover-effect",attrs:{trigger:"click"}},[t("div",{staticClass:"avatar-wrapper"},[e._v(" "+e._s(e.name)+" "),t("i",{staticClass:"el-icon-caret-bottom"})]),t("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[t("el-dropdown-item",{nativeOn:{click:function(t){return e.logout(t)}}},[t("span",{staticStyle:{display:"block"}},[e._v("退出登录")])])],1)],1)],1)])}),[],!1,null,"2eb5119c",null).exports),{data:function(){return{}},computed:{fixedHeader:{get:function(){return this.$store.state.settings.fixedHeader},set:function(e){this.$store.dispatch("settings/changeSetting",{key:"fixedHeader",value:e})}},tagsView:{get:function(){return this.$store.state.settings.tagsView},set:function(e){this.$store.dispatch("settings/changeSetting",{key:"tagsView",value:e})}},sidebarLogo:{get:function(){return this.$store.state.settings.sidebarLogo},set:function(e){this.$store.dispatch("settings/changeSetting",{key:"sidebarLogo",value:e})}}},methods:{themeChange:function(e){this.$store.dispatch("settings/changeSetting",{key:"theme",value:e})}}}),u=(c=(i("6596"),Object(a.a)(c,(function(){var e=this,t=e.$createElement;t=e._self._c||t;return t("div",{staticClass:"drawer-container"},[t("div",[t("h3",{staticClass:"drawer-title"},[e._v("Page style setting")]),t("div",{staticClass:"drawer-item"},[t("span",[e._v("Theme Color")]),t("theme-picker",{staticStyle:{float:"right",height:"26px",margin:"-3px 8px 0 0"},on:{change:e.themeChange}})],1),t("div",{staticClass:"drawer-item"},[t("span",[e._v("Open Tags-View")]),t("el-switch",{staticClass:"drawer-switch",model:{value:e.tagsView,callback:function(t){e.tagsView=t},expression:"tagsView"}})],1),t("div",{staticClass:"drawer-item"},[t("span",[e._v("Fixed Header")]),t("el-switch",{staticClass:"drawer-switch",model:{value:e.fixedHeader,callback:function(t){e.fixedHeader=t},expression:"fixedHeader"}})],1),t("div",{staticClass:"drawer-item"},[t("span",[e._v("Sidebar Logo")]),t("el-switch",{staticClass:"drawer-switch",model:{value:e.sidebarLogo,callback:function(t){e.sidebarLogo=t},expression:"sidebarLogo"}})],1)])])}),[],!1,null,"9cf80efa",null).exports),{name:"SidebarLogo",props:{collapse:{type:Boolean,required:!0}},data:function(){return{title:"工单管理系统",logo:i("10fb")}}}),d=(u=(i("d5a3"),Object(a.a)(u,(function(){var e=this,t=e.$createElement;t=e._self._c||t;return t("div",{staticClass:"sidebar-logo-container",class:{collapse:e.collapse}},[t("transition",{attrs:{name:"sidebarLogoFade"}},[e.collapse?t("router-link",{key:"collapse",staticClass:"sidebar-logo-link",attrs:{to:"/"}},[e.logo?t("img",{staticClass:"sidebar-logo",attrs:{src:e.logo}}):t("h1",{staticClass:"sidebar-title"},[e._v(e._s(e.title)+" ")])]):t("router-link",{key:"expand",staticClass:"sidebar-logo-link",attrs:{to:"/"}},[e.logo?t("img",{staticClass:"sidebar-logo",attrs:{src:e.logo}}):e._e(),t("h1",{staticClass:"sidebar-title"},[e._v(e._s(e.title)+" ")])])],1)],1)}),[],!1,null,"15bd9165",null).exports),i("4de4"),i("d3b7"),i("df7c")),h=i.n(d),f=i("61f7"),p=(d={name:"MenuItem",functional:!0,props:{icon:{type:String,default:""},title:{type:String,default:""}},render:function(e,t){t=t.props;var i=t.icon,n=(t=t.title,[]);return n.push(e("i",{class:[i,"sub-el-icon"]})),t&&n.push(e("span",{slot:"title"},[t])),n}},d=(i("f9e3"),Object(a.a)(d,void 0,void 0,!1,null,"1ea7bc04",null).exports),{props:{to:{type:String,required:!0}},computed:{isExternal:function(){return Object(f.c)(this.to)},type:function(){return this.isExternal?"a":"router-link"}},methods:{linkProps:function(e){return this.isExternal?{href:e,target:"_blank",rel:"noopener"}:{to:e}}}}),m=(d={name:"SidebarItem",components:{Item:d,AppLink:Object(a.a)(p,(function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.type,e._b({tag:"component"},"component",e.linkProps(e.to),!1),[e._t("default")],2)}),[],!1,null,null,null).exports},mixins:[{computed:{device:function(){return this.$store.state.app.device}},mounted:function(){this.fixBugIniOS()},methods:{fixBugIniOS:function(){var e,t=this,i=this.$refs.subMenu;i&&(e=i.handleMouseleave,i.handleMouseleave=function(i){"mobile"!==t.device&&e(i)})}}}],props:{item:{type:Object,required:!0},isNest:{type:Boolean,default:!1},basePath:{type:String,default:""}},data:function(){return this.onlyOneChild=null,{}},methods:{hasOneShowingChild:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],i=1<arguments.length?arguments[1]:void 0;t=t.filter((function(t){return!t.hidden&&(e.onlyOneChild=t,!0)}));return 1===t.length||0===t.length&&(this.onlyOneChild=Object(n.a)(Object(n.a)({},i),{},{path:"",noShowingChildren:!0}),!0)},resolvePath:function(e){return Object(f.c)(e)?e:Object(f.c)(this.basePath)?this.basePath:h.a.resolve(this.basePath,e)}}},p=Object(a.a)(d,(function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.item.hidden?e._e():i("div",[!e.hasOneShowingChild(e.item.children,e.item)||e.onlyOneChild.children&&!e.onlyOneChild.noShowingChildren||e.item.alwaysShow?i("el-submenu",{ref:"subMenu",attrs:{index:e.resolvePath(e.item.path),"popper-append-to-body":""}},[i("template",{slot:"title"},[e.item.meta?i("item",{attrs:{icon:e.item.meta&&e.item.meta.icon,title:e.item.meta.title}}):e._e()],1),e._l(e.item.children,(function(t){return i("sidebar-item",{key:t.path,staticClass:"nest-menu",attrs:{"is-nest":!0,item:t,"base-path":e.resolvePath(t.path)}})}))],2):[e.onlyOneChild.meta?i("app-link",{attrs:{to:e.resolvePath(e.onlyOneChild.path)}},[i("el-menu-item",{class:{"submenu-title-noDropdown":!e.isNest},attrs:{index:e.resolvePath(e.onlyOneChild.path)}},[i("item",{attrs:{icon:e.onlyOneChild.meta.icon||e.item.meta&&e.item.meta.icon,title:e.onlyOneChild.meta.title}})],1)],1):e._e()]],2)}),[],!1,null,null,null).exports,d=i("cf1e"),i.n(d)),g=(d={components:{SidebarItem:p,Logo:u},computed:Object(n.a)(Object(n.a)({},Object(r.b)(["navList","sidebar"])),{},{activeMenu:function(){var e=this.$route,t=e.meta;e=e.path;return t.activeMenu||e},showLogo:function(){return this.$store.state.settings.sidebarLogo},variables:function(){return m.a},isCollapse:function(){return!this.sidebar.opened}})},p=Object(a.a)(d,(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{class:{"has-logo":e.showLogo}},[e.showLogo?i("logo",{attrs:{collapse:e.isCollapse}}):e._e(),i("el-scrollbar",{attrs:{"wrap-class":"scrollbar-wrapper"}},[i("el-menu",{attrs:{"default-active":e.activeMenu,collapse:e.isCollapse,"background-color":e.variables.menuBg,"text-color":e.variables.menuText,"unique-opened":!1,"active-text-color":e.variables.menuActiveText,"collapse-transition":!1,mode:"vertical"}},e._l(e.navList,(function(e){return i("sidebar-item",{key:e.path,attrs:{item:e,"base-path":e.path}})})),1)],1)],1)}),[],!1,null,null,null).exports,i("b85c")),v=i("2909"),b=(u=(i("159b"),i("b0c0"),i("99af"),i("ac1f"),i("5319"),i("fb6a"),i("c740"),{name:"ScrollPane",data:function(){return{left:0}},computed:{scrollWrapper:function(){return this.$refs.scrollContainer.$refs.wrap}},mounted:function(){this.scrollWrapper.addEventListener("scroll",this.emitScroll,!0)},beforeDestroy:function(){this.scrollWrapper.removeEventListener("scroll",this.emitScroll)},methods:{handleScroll:function(e){e=e.wheelDelta||40*-e.deltaY;var t=this.scrollWrapper;t.scrollLeft=t.scrollLeft+e/4},emitScroll:function(){this.$emit("scroll")},moveToTarget:function(e){var t=this.$refs.scrollContainer.$el.offsetWidth,i=this.scrollWrapper,n=this.$parent.$refs.tag,s=null,a=null;0<n.length&&(s=n[0],a=n[n.length-1]),s===e?i.scrollLeft=0:a===e?i.scrollLeft=i.scrollWidth-t:(s=n.findIndex((function(t){return t===e})),a=n[s-1],s=(n=n[s+1]).$el.offsetLeft+n.$el.offsetWidth+4,n=a.$el.offsetLeft-4,s>i.scrollLeft+t?i.scrollLeft=s-t:n<i.scrollLeft&&(i.scrollLeft=n))}}}),d=(i("c4d7"),{components:{ScrollPane:Object(a.a)(u,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("el-scrollbar",{ref:"scrollContainer",staticClass:"scroll-container",attrs:{vertical:!1},nativeOn:{wheel:function(t){return t.preventDefault(),e.handleScroll(t)}}},[e._t("default")],2)}),[],!1,null,"41421bb2",null).exports},data:function(){return{visible:!1,top:0,left:0,selectedTag:{},affixTags:[]}},computed:{visitedViews:function(){return this.$store.state.tagsView.visitedViews},routes:function(){return this.$store.state.permission.routes}},watch:{$route:function(){this.addTags(),this.moveToCurrentTag()},visible:function(e){e?document.body.addEventListener("click",this.closeMenu):document.body.removeEventListener("click",this.closeMenu)}},mounted:function(){this.initTags(),this.addTags()},methods:{isActive:function(e){return e.path===this.$route.path},isAffix:function(e){return e.meta&&e.meta.affix},filterAffixTags:function(e){var t=this,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"/",s=[];return e.forEach((function(e){var a;e.meta&&e.meta.affix&&(a=h.a.resolve(i,e.path),s.push({fullPath:a,path:a,name:e.name,meta:Object(n.a)({},e.meta)})),e.children&&1<=(a=t.filterAffixTags(e.children,e.path)).length&&(s=[].concat(Object(v.a)(s),Object(v.a)(a)))})),s},initTags:function(){var e,t=this.affixTags=this.filterAffixTags(this.routes),i=Object(g.a)(t);try{for(i.s();!(e=i.n()).done;){var n=e.value;n.name&&this.$store.dispatch("tagsView/addVisitedView",n)}}catch(e){i.e(e)}finally{i.f()}},addTags:function(){return this.$route.name&&this.$store.dispatch("tagsView/addView",this.$route),!1},moveToCurrentTag:function(){var e=this,t=this.$refs.tag;this.$nextTick((function(){var i,n=Object(g.a)(t);try{for(n.s();!(i=n.n()).done;){var s=i.value;if(s.to.path===e.$route.path){e.$refs.scrollPane.moveToTarget(s),s.to.fullPath!==e.$route.fullPath&&e.$store.dispatch("tagsView/updateVisitedView",e.$route);break}}}catch(i){n.e(i)}finally{n.f()}}))},refreshSelectedTag:function(e){var t=this;this.$store.dispatch("tagsView/delCachedView",e).then((function(){var i=e.fullPath;t.$nextTick((function(){t.$router.replace({path:"/redirect"+i})}))}))},closeSelectedTag:function(e){var t=this;this.$store.dispatch("tagsView/delView",e).then((function(i){i=i.visitedViews,t.isActive(e)&&t.toLastView(i,e)}))},closeOthersTags:function(){var e=this;this.$router.push(this.selectedTag),this.$store.dispatch("tagsView/delOthersViews",this.selectedTag).then((function(){e.moveToCurrentTag()}))},closeAllTags:function(e){var t=this;this.$store.dispatch("tagsView/delAllViews").then((function(i){i=i.visitedViews,t.affixTags.some((function(t){return t.path===e.path}))||t.toLastView(i,e)}))},toLastView:function(e,t){e=e.slice(-1)[0],e?this.$router.push(e.fullPath):"Dashboard"===t.name?this.$router.replace({path:"/redirect"+t.fullPath}):this.$router.push("/")},openMenu:function(e,t){var i=this.$el.getBoundingClientRect().left,n=this.$el.offsetWidth-105;i=t.clientX-i+15;this.left=n<i?n:i,this.top=t.clientY,this.visible=!0,this.selectedTag=e},closeMenu:function(){this.visible=!1},handleScroll:function(){this.closeMenu()}}}),u=(i("0b8e"),i("cfaa"),Object(a.a)(d,(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"tags-view-container",attrs:{id:"tags-view-container"}},[i("scroll-pane",{ref:"scrollPane",staticClass:"tags-view-wrapper",on:{scroll:e.handleScroll}},e._l(e.visitedViews,(function(t){return i("router-link",{key:t.path,ref:"tag",refInFor:!0,staticClass:"tags-view-item",class:e.isActive(t)?"active":"",attrs:{to:{path:t.path,query:t.query,fullPath:t.fullPath},tag:"span"},nativeOn:{mouseup:function(i){if("button"in i&&1!==i.button)return null;e.isAffix(t)||e.closeSelectedTag(t)},contextmenu:function(i){return i.preventDefault(),e.openMenu(t,i)}}},[e._v(" "+e._s(t.title)+" "),e.isAffix(t)?e._e():i("span",{staticClass:"el-icon-close",on:{click:function(i){return i.preventDefault(),i.stopPropagation(),e.closeSelectedTag(t)}}})])})),1),i("ul",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"}],staticClass:"contextmenu",style:{left:e.left+"px",top:e.top+"px"}},[i("li",{on:{click:function(t){return e.refreshSelectedTag(e.selectedTag)}}},[e._v("Refresh")]),e.isAffix(e.selectedTag)?e._e():i("li",{on:{click:function(t){return e.closeSelectedTag(e.selectedTag)}}},[e._v("Close")]),i("li",{on:{click:e.closeOthersTags}},[e._v("Close Others")]),i("li",{on:{click:function(t){return e.closeAllTags(e.selectedTag)}}},[e._v("Close All")])])],1)}),[],!1,null,"942a05c2",null).exports),i("4360")),w=document.body;d={name:"Layout",components:{AppMain:s,Navbar:l,Settings:c,Sidebar:p,TagsView:u},mixins:[{watch:{$route:function(e){"mobile"===this.device&&this.sidebar.opened&&b.a.dispatch("app/closeSideBar",{withoutAnimation:!1})}},beforeMount:function(){window.addEventListener("resize",this.$_resizeHandler)},beforeDestroy:function(){window.removeEventListener("resize",this.$_resizeHandler)},mounted:function(){this.$_isMobile()&&(b.a.dispatch("app/toggleDevice","mobile"),b.a.dispatch("app/closeSideBar",{withoutAnimation:!0}))},methods:{$_isMobile:function(){return w.getBoundingClientRect().width-1<992},$_resizeHandler:function(){var e;document.hidden||(e=this.$_isMobile(),b.a.dispatch("app/toggleDevice",e?"mobile":"desktop"),e&&b.a.dispatch("app/closeSideBar",{withoutAnimation:!0}))}}}],computed:Object(n.a)(Object(n.a)({},Object(r.c)({sidebar:function(e){return e.app.sidebar},device:function(e){return e.app.device},showSettings:function(e){return e.settings.showSettings},needTagsView:function(e){return e.settings.tagsView},fixedHeader:function(e){return e.settings.fixedHeader}})),{},{classObj:function(){return{hideSidebar:!this.sidebar.opened,openSidebar:this.sidebar.opened,withoutAnimation:this.sidebar.withoutAnimation,mobile:"mobile"===this.device}}}),methods:{handleClickOutside:function(){this.$store.dispatch("app/closeSideBar",{withoutAnimation:!1})}}},i("70f7"),s=Object(a.a)(d,(function(){var e=this,t=e.$createElement;t=e._self._c||t;return t("div",{staticClass:"app-wrapper",class:e.classObj},["mobile"===e.device&&e.sidebar.opened?t("div",{staticClass:"drawer-bg",on:{click:e.handleClickOutside}}):e._e(),t("div",{staticClass:"main-container",class:{hasTagsView:e.needTagsView}},[t("div",{class:{"fixed-header":e.fixedHeader}},[t("navbar"),e.needTagsView?t("tags-view"):e._e()],1),t("app-main")],1)])}),[],!1,null,"3dcd654a",null);t.default=s.exports},c4d7:function(e,t,i){"use strict";i("87d9")},cf1e:function(e,t,i){e.exports={menuText:"azure",menuActiveText:"#076c87",subMenuActiveText:"#076c87",menuBg:"#63cbe7",menuHover:"#63cbe7",subMenuBg:"#7ad3eb",subMenuHover:"#7ad3eb",sideBarWidth:"0px"}},cfaa:function(e,t,i){"use strict";i("e1eb")},d5a3:function(e,t,i){"use strict";i("500f")},e1eb:function(e,t,i){},f9e3:function(e,t,i){"use strict";i("bf44")}}]);
|