chunk-6527b0a8.dafc0933.js 16 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6527b0a8"],{"028b":function(e,t,s){"use strict";s("0a70")},"097d":function(e,t,s){"use strict";s("ec3f")},"0985":function(e,t,s){},"0a70":function(e,t,s){},"10fb":function(e,t,s){e.exports=s.p+"static/img/logo.66bee2dc.gif"},3027:function(e,t,s){"use strict";s("7270")},"4c1f":function(e,t,s){"use strict";var i=s("1b69");t.a={list:(e,t)=>Object(i.a)("admin/versionlist",e,"post",t)}},5212:function(e,t,s){},7270:function(e,t,s){},"8fd5":function(e,t,s){"use strict";s("5212")},ac6b:function(e,t,s){"use strict";s("e54d")},b45e:function(e,t,s){},c1f7:function(e,t,s){"use strict";s.r(t);var i={name:"AppMain",computed:{cachedViews(){return this.$store.state.tagsView.cachedViews},key(){return this.$route.path}}},a=(s("8fd5"),s("028b"),s("2877")),l=Object(a.a)(i,(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,"252782b8",null).exports,r=s("2f62"),o=s("4c1f"),n=s("9f53"),c=s("5f87"),d={computed:{...Object(r.b)(["sidebar","avatar","device"])},mixins:[n.a],data(){return{showModel:!1,loading:!1,isShow:!0,statsTime:0,endTime:0,checked:!1,lastNotice:null,parmValue:{type:"",page:1,size:15},activeMsg:null}},mounted(){this.openNotice(1)},methods:{async openNotice(e){Object(c.d)()&&0<Object(c.d)().length?this.lastNotice=JSON.parse(Object(c.d)()):this.lastNotice=null,this.loading=!0;var t,s=await o.a.list(this.parmValue);s&&0===s.code&&s.data&&s.data.list&&0<s.data.list.length?(this.activeMsg=s.data.list[0],this.isShow=!0,this.lastNotice+""!="null"?this.activeMsg.addtime===this.lastNotice.addtime&&"1"===this.lastNotice.type?this.checked=!0:this.checked=!1:(t={type:this.checked?"1":"0",addtime:this.activeMsg.addtime},Object(c.m)(JSON.stringify(t)),this.checked=!1),1===e?this.typeShow():this.showModel=!0):s&&100<=s.code&&s.code<=104?await this.logout():(this.activeMsg=null,this.isShow=!1),this.loading=!1},typeShow(){var e=(new Date).valueOf();"VER"===this.activeMsg.sys_type?(this.statsTime=new Date(this.activeMsg.addtime).valueOf(),this.endTime=this.statsTime+6048e5,e>this.statsTime&&e<this.endTime&&!this.checked?this.showModel=!0:this.showModel=!1):(this.statsTime=0,this.endTime=new Date(this.activeMsg.addtime).valueOf(),e<this.endTime&&!this.checked?this.showModel=!0:this.showModel=!1)},toggleSideBar(){this.$route.this.$store.dispatch("app/toggleSideBar")},async logout(){await this.$store.dispatch("user/logout"),this.$router.push("/login?redirect="+this.$route.fullPath)},submit(){var e={type:this.checked?"1":"0",addtime:this.activeMsg.addtime};Object(c.m)(JSON.stringify(e)),this.showModel=!1}}},h=(s("d32f"),Object(a.a)(d,(function(){var e=this,t=e.$createElement;t=e._self._c||t;return t("div",{staticClass:"navbar"},[t("mainMenu"),t("div",{staticClass:"right-menu"},["mobile"!==e.device?[e.isShow?t("i",{staticClass:"el-icon-message-solid right-menu-item hover-effect shake",staticStyle:{height:"50px",width:"40px","line-height":"52px","font-size":"22px"},on:{click:e.openNotice}}):e._e(),t("screenfull",{staticClass:"right-menu-item hover-effect",attrs:{id:"screenfull"}})]:e._e(),t("el-dropdown",{staticClass:"avatar-container right-menu-item hover-effect",attrs:{trigger:"click"}},[t("div",{staticClass:"avatar-wrapper"},[t("img",{staticClass:"user-avatar",attrs:{src:e.avatar+"?imageView2/1/w/80/h/80"}}),t("i",{staticClass:"el-icon-caret-bottom"})]),t("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[t("router-link",{attrs:{to:"/person/my-message"}},[t("el-dropdown-item",[e._v("我的信息")])],1),t("router-link",{attrs:{to:"/person/change-phone"}},[t("el-dropdown-item",[e._v("更换手机号")])],1),t("router-link",{attrs:{to:"/person/change-password"}},[t("el-dropdown-item",[e._v("修改密码")])],1),t("el-dropdown-item",{attrs:{divided:""},nativeOn:{click:function(t){return e.logout(t)}}},[t("span",{staticStyle:{display:"block"}},[e._v("退出登录")])])],1)],1)],2),t("el-dialog",{attrs:{title:"系统公告",center:!0,align:"left",top:"8vh",width:"800px","close-on-click-modal":!1,visible:e.showModel,"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.8)","append-to-body":""},on:{close:e.submit,"update:visible":function(t){e.showModel=t}}},[t("el-card",{staticStyle:{"margin-top":"-20px"}},[null!==e.activeMsg?t("el-row",{attrs:{gutter:10}},[t("el-col",{attrs:{span:24}},[t("div",{staticStyle:{padding:"0 0 22px 0"}},[t("el-alert",{staticClass:"my-el-alert",attrs:{closable:!1,"show-icon":"",center:"",title:e.activeMsg.module,type:"VER"===e.activeMsg.sys_type?"success":"warning"}})],1),t("el-form",{staticClass:"demo-table-expand",staticStyle:{"padding-left":"25px"},attrs:{size:"mini","label-position":"left","label-width":"82px"}},[t("el-row",["VER"===e.activeMsg.sys_type?t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"版本编号:"}},[t("p",{staticStyle:{margin:"0"}},[e._v(e._s(e.activeMsg.version))])])],1):e._e(),t("el-col",{attrs:{span:"VER"===e.activeMsg.sys_type?12:24}},[t("el-form-item",{attrs:{label:"VER"===e.activeMsg.sys_type?"更新时间:":"预计时间:"}},[t("p",{staticStyle:{margin:"0"}},[e._v(" "+e._s(e.activeMsg.addtime)+" ")])])],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"更新内容:"}},[t("p",{staticStyle:{margin:"0"},domProps:{innerHTML:e._s(e.activeMsg.system)}})])],1),t("el-col",{staticStyle:{"text-align":"right"},attrs:{span:24}},[t("el-checkbox",{staticClass:"fl",staticStyle:{"padding-top":"5px"},model:{value:e.checked,callback:function(t){e.checked=t},expression:"checked"}},[e._v("我已知晓,后续不再提示!")]),t("el-button",{attrs:{type:"primary",plain:""},on:{click:e.submit}},[e._v("关闭 ")])],1)],1)],1)],1)],1):e._e()],1)],1)],1)}),[],!1,null,"4d8be840",null).exports),u={data(){return{}},computed:{fixedHeader:{get(){return this.$store.state.settings.fixedHeader},set(e){this.$store.dispatch("settings/changeSetting",{key:"fixedHeader",value:e})}},tagsView:{get(){return this.$store.state.settings.tagsView},set(e){this.$store.dispatch("settings/changeSetting",{key:"tagsView",value:e})}},sidebarLogo:{get(){return this.$store.state.settings.sidebarLogo},set(e){this.$store.dispatch("settings/changeSetting",{key:"sidebarLogo",value:e})}}},methods:{themeChange(e){this.$store.dispatch("settings/changeSetting",{key:"theme",value:e})}}},p=(i=(s("ac6b"),Object(a.a)(u,(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("页面样式设置")]),t("div",{staticClass:"drawer-item"},[t("span",[e._v("主题颜色")]),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("页面标签")]),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("固定头部")]),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("侧边栏图标")]),t("el-switch",{staticClass:"drawer-switch",model:{value:e.sidebarLogo,callback:function(t){e.sidebarLogo=t},expression:"sidebarLogo"}})],1)])])}),[],!1,null,"e8617212",null).exports),n={name:"SidebarLogo",props:{collapse:{type:Boolean,required:!0}},data(){return{title:"采销平台订单系统",logo:s("10fb")}}},d=(s("3027"),Object(a.a)(n,(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:"/welcome/dashboard"}},[t("h1",{staticClass:"sidebar-title"},[e._v(e._s(e.title))])]):t("router-link",{key:"expand",staticClass:"sidebar-logo-link",attrs:{to:"/welcome/dashboard"}},[t("h1",{staticClass:"sidebar-title"},[e._v(e._s(e.title))])])],1)],1)}),[],!1,null,"76ab538b",null).exports),u=s("cf1e"),s.n(u)),f=(n={components:{Logo:d},data(){return{active:-1,menuList:[]}},computed:{...Object(r.b)(["navList","sidebar"]),activeMenu(){const{path:e}=this.$route;let t=e.split("/");return this.menuList.findIndex(e=>e.path===t[t.length-1])+""},showLogo(){return!0},variables(){return p.a},isCollapse(){return!1}},watch:{$route(e){e.path.startsWith("/redirect/")||this.getBreadcrumb()}},created(){this.getBreadcrumb()},methods:{getBreadcrumb(){var e=this.$route.matched.filter(e=>e.meta&&e.meta.title);let t=-1;if(1<e.length&&e[0]&&e[0].path){const{path:s}=e[0];t=this.navList.findIndex(e=>e.path===s)}t!==this.active&&(this.menuList=this.navList[t].children,this.active=t)}}},u=Object(a.a)(n,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{class:{"has-logo":e.showLogo}},[e.showLogo?s("logo",{attrs:{collapse:e.isCollapse}}):e._e(),s("el-scrollbar",{attrs:{"wrap-class":"scrollbar-wrapper"}},[e.menuList&&0<e.menuList.length?s("el-menu",{attrs:{"default-active":e.activeMenu,collapse:e.isCollapse,router:"","background-color":e.variables.menuBg,"text-color":e.variables.menuText,"active-text-color":e.variables.menuActiveText,"unique-opened":!1,"collapse-transition":!1,mode:"vertical"}},[e._l(e.menuList,(function(t,i){return[t.hidden?e._e():s("el-menu-item",{key:t.path+i,attrs:{route:t.path,index:i+""}},[s("i",{class:t.meta.icon}),s("span",{attrs:{slot:"title"},slot:"title"},[e._v(e._s(t.meta.title))])])]}))],2):e._e()],1)],1)}),[],!1,null,null,null).exports,d={name:"ScrollPane",data(){return{left:0}},computed:{scrollWrapper(){return this.$refs.scrollContainer.$refs.wrap}},mounted(){this.scrollWrapper.addEventListener("scroll",this.emitScroll,!0)},beforeDestroy(){this.scrollWrapper.removeEventListener("scroll",this.emitScroll)},methods:{handleScroll(e){e=e.wheelDelta||40*-e.deltaY;const t=this.scrollWrapper;t.scrollLeft=t.scrollLeft+e/4},emitScroll(){this.$emit("scroll")},moveToTarget(e){var t,s,i=this.$refs.scrollContainer.$el.offsetWidth;const a=this.scrollWrapper,l=this.$parent.$refs.tag;let r=null,o=null;0<l.length&&(r=l[0],o=l[l.length-1]),r===e?a.scrollLeft=0:o===e?a.scrollLeft=a.scrollWidth-i:(t=l.findIndex(t=>t===e),s=l[t-1],t=(t=l[t+1]).$el.offsetLeft+t.$el.offsetWidth+4,s=s.$el.offsetLeft-4,t>a.scrollLeft+i?a.scrollLeft=t-i:s<a.scrollLeft&&(a.scrollLeft=s))}}},n=(s("097d"),Object(a.a)(d,(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,"1a78fbad",null).exports),d=s("df7c"),s.n(d)),g=(n={components:{ScrollPane:n},data(){return{visible:!1,top:0,left:0,selectedTag:{},affixTags:[]}},computed:{visitedViews(){return this.$store.state.tagsView.visitedViews},routes(){return this.$store.state.user.btnList}},watch:{$route(){this.addTags(),this.moveToCurrentTag()},visible(e){e?document.body.addEventListener("click",this.closeMenu):document.body.removeEventListener("click",this.closeMenu)}},mounted(){this.initTags(),this.addTags()},methods:{isActive(e){return e.path===this.$route.path},isAffix(e){return e.meta&&e.meta.affix},filterAffixTags(e,t="/"){let s=[];return e.forEach(e=>{var i;e.meta&&e.meta.affix&&(i=f.a.resolve(t,e.path),s.push({fullPath:i,path:i,name:e.name,meta:{...e.meta}})),!e.children||1<=(e=this.filterAffixTags(e.children,e.path)).length&&(s=[...s,...e])}),s},initTags(){for(const e of this.affixTags=this.filterAffixTags(this.routes))e.name&&this.$store.dispatch("tagsView/addVisitedView",e)},addTags(){var{name:e}=this.$route;return e&&this.$store.dispatch("tagsView/addView",this.$route),!1},moveToCurrentTag(){const e=this.$refs.tag;this.$nextTick(()=>{for(const t of e)if(t.to.path===this.$route.path){this.$refs.scrollPane.moveToTarget(t),t.to.fullPath!==this.$route.fullPath&&this.$store.dispatch("tagsView/updateVisitedView",this.$route);break}})},refreshSelectedTag(e){this.$store.dispatch("tagsView/delCachedView",e).then(()=>{const{fullPath:t}=e;this.$nextTick(()=>{this.$router.replace({path:"/redirect"+t})})})},closeSelectedTag(e){this.$store.dispatch("tagsView/delView",e).then(({visitedViews:t})=>{this.isActive(e)&&this.toLastView(t,e)})},closeOthersTags(){window.vm.$router.push(this.selectedTag),this.$store.dispatch("tagsView/delOthersViews",this.selectedTag).then(()=>{this.moveToCurrentTag()})},closeAllTags(e){this.$store.dispatch("tagsView/delAllViews").then(({visitedViews:t})=>{this.affixTags.some(t=>t.path===e.path)||this.toLastView(t,e)})},toLastView(e,t){e=e.slice(-1)[0],e?window.vm.$router.push(e.fullPath):"Dashboard"===t.name?this.$router.replace({path:"/redirect"+t.fullPath}):window.vm.$router.push("/welcome/dashboard")},openMenu(e,t){var s=this.$el.getBoundingClientRect().left,i=this.$el.offsetWidth-105;s=t.clientX-s+15;this.left=i<s?i:s,this.top=t.clientY,this.visible=!0,this.selectedTag=e},closeMenu(){this.visible=!1},handleScroll(){this.closeMenu()}}},n=(s("f0bf"),s("cfaa"),Object(a.a)(n,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"tags-view-container",attrs:{id:"tags-view-container"}},[s("scroll-pane",{ref:"scrollPane",staticClass:"tags-view-wrapper",on:{scroll:e.handleScroll}},e._l(e.visitedViews,(function(t){return s("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(s){if("button"in s&&1!==s.button)return null;e.isAffix(t)||e.closeSelectedTag(t)},contextmenu:function(s){return s.preventDefault(),e.openMenu(t,s)}}},[e._v(" "+e._s(t.title)+" "),e.isAffix(t)?e._e():s("span",{staticClass:"el-icon-close",on:{click:function(s){return s.preventDefault(),s.stopPropagation(),e.closeSelectedTag(t)}}})])})),1),s("ul",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"}],staticClass:"contextmenu",style:{left:e.left+"px",top:e.top+"px"}},[s("li",{on:{click:function(t){return e.refreshSelectedTag(e.selectedTag)}}},[e._v("刷新")]),e.isAffix(e.selectedTag)?e._e():s("li",{on:{click:function(t){return e.closeSelectedTag(e.selectedTag)}}},[e._v(" 关闭 ")]),s("li",{on:{click:e.closeOthersTags}},[e._v("关闭其他")]),s("li",{on:{click:function(t){return e.closeAllTags(e.selectedTag)}}},[e._v("关闭全部")])])],1)}),[],!1,null,"e32ace8c",null).exports),s("4360"));const{body:m}=document;r={name:"Layout",components:{AppMain:l,Navbar:h,Settings:i,Sidebar:u,TagsView:n},mixins:[{watch:{$route(e){"mobile"===this.device&&this.sidebar.opened&&g.a.dispatch("app/closeSideBar",{withoutAnimation:!1})}},beforeMount(){window.addEventListener("resize",this.$_resizeHandler)},beforeDestroy(){window.removeEventListener("resize",this.$_resizeHandler)},mounted(){this.$_isMobile()&&(g.a.dispatch("app/toggleDevice","mobile"),g.a.dispatch("app/closeSideBar",{withoutAnimation:!0}))},methods:{$_isMobile(){return m.getBoundingClientRect().width-1<992},$_resizeHandler(){var e;document.hidden||(e=this.$_isMobile(),g.a.dispatch("app/toggleDevice",e?"mobile":"desktop"),e&&g.a.dispatch("app/closeSideBar",{withoutAnimation:!0}))}}}],computed:{...Object(r.c)({sidebar:e=>e.app.sidebar,device:e=>e.app.device,showSettings:e=>e.settings.showSettings,needTagsView:e=>e.settings.tagsView,fixedHeader:e=>e.settings.fixedHeader}),classObj(){return{hideSidebar:!1,openSidebar:this.sidebar.opened,withoutAnimation:this.sidebar.withoutAnimation,mobile:!1}}},methods:{handleClickOutside(){this.$store.dispatch("app/closeSideBar",{withoutAnimation:!1})}}},s("f183"),r=Object(a.a)(r,(function(){var e=this,t=e.$createElement;t=e._self._c||t;return t("div",{staticClass:"app-wrapper",class:e.classObj},[t("sidebar",{staticClass:"sidebar-container"}),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)}),[],!1,null,"6feec6f6",null),t.default=r.exports},c452:function(e,t,s){},cf1e:function(e,t,s){e.exports={menuText:"azure",menuActiveText:"#076c87",subMenuActiveText:"#076c87",menuBg:"#63cbe7",menuHover:"#63cbe7",subMenuBg:"#7ad3eb",subMenuHover:"#7ad3eb",sideBarWidth:"200px"}},cfaa:function(e,t,s){"use strict";s("0985")},d32f:function(e,t,s){"use strict";s("e346")},e346:function(e,t,s){},e54d:function(e,t,s){},ec3f:function(e,t,s){},f0bf:function(e,t,s){"use strict";s("b45e")},f183:function(e,t,s){"use strict";s("c452")}}]);