1 line
17 KiB
JavaScript
1 line
17 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["a"],{"13ae":function(e,t,s){},"23f7":function(e,t,s){"use strict";var i=function(){var e=this,t=e._self._c;return t("el-popover",{ref:"nodTree",staticClass:"nodTree"},[t("el-input",{attrs:{slot:"reference",placeholder:e.placeholder,readonly:""},nativeOn:{keydown:function(t){return e.inputEvent.apply(null,arguments)}},slot:"reference",model:{value:e.label,callback:function(t){e.label=t},expression:"label"}},[t("template",{slot:"suffix"},[t("i",{class:["el-input__icon",""!=e.label?"el-icon-circle-close":"el-icon-arrow-down"],on:{click:function(t){return t.stopPropagation(),e.delModel.apply(null,arguments)}}})])],2),t("el-tree",{ref:"tree",attrs:{data:e.treeData,props:e.treeProps,"node-key":e.treeKey,"current-node-key":e.checked,"show-checkbox":e.checkbox,"check-strictly":e.checkStrictly,"default-checked-keys":e.checkeds,"default-expanded-keys":e.expanded,"highlight-current":!0},on:{check:e.setTree,"node-click":e.setTree}})],1)},n=[],a=s("b85c"),o=(s("7db0"),s("a15b"),s("14d9"),s("b0c0"),s("d3b7"),{name:"NodTree",props:{value:{required:!0},treeData:{required:!0,type:Array},treeKey:{default:"id"},treeProps:{default:function(){return{label:"name",children:"sub"}}},placeholder:{default:"请点击选择数据"},checkStrictly:{default:!1}},data:function(){return{label:"",checked:null,checkeds:[],expanded:[],checkbox:!1}},created:function(){this.init()},computed:{flatTree:function(){var e=this.$lib.flatten(this.treeData);return e}},watch:{value:{handler:function(e){this.checkbox?this.$lib.comparison(e,this.checkeds)&&(this.checkeds=e,this.$refs.tree.setCheckedKeys(e,!0)):e!=this.checked&&(this.checked=e,this.$refs.tree.setCurrentKey(e))},deep:!0},checked:function(){this.setInput()},checkeds:{handler:function(){this.setInput()},deep:!0}},methods:{init:function(){var e=this;if(null!=this.value){Array.isArray(this.value)?(this.checkbox=!0,this.checkeds=this.value):(this.checkbox=!1,this.checked=this.value);var t,s=Object(a["a"])(this.checkbox?this.checkeds:[this.checked]);try{var i=function(){var s=t.value,i=e.flatTree.find((function(e){return e.id==s}));void 0!=i&&i.hasOwnProperty("pid")&&e.expanded.push(i.pid)};for(s.s();!(t=s.n()).done;)i()}catch(n){s.e(n)}finally{s.f()}}},setInput:function(){var e,t=this,s=[],i=Object(a["a"])(this.checkbox?this.checkeds:[this.checked]);try{var n=function(){var i=e.value,n=t.flatTree.find((function(e){return e.id==i}));void 0==n||s.push(n.name)};for(i.s();!(e=i.n()).done;)n()}catch(o){i.e(o)}finally{i.f()}this.label=s.join(",")},setTree:function(e){this.checkbox?(this.checkeds=this.$refs.tree.getCheckedKeys(),this.$emit("input",this.checkeds)):(this.checked=e.id,this.$emit("input",this.checked),this.$refs["nodTree"].showPopper=!1)},delModel:function(){this.label="",this.checkbox?(this.checkeds=[],this.$refs.tree.setCheckedKeys([])):(this.checked=null,this.$refs.tree.setCurrentKey(null)),this.$emit("input",this.checkbox?[]:null),this.$refs["nodTree"].showPopper=!1},inputEvent:function(e){this.$refs["nodTree"].showPopper&&27==e.keyCode&&e.stopPropagation()}}}),l=o,r=(s("d683"),s("2877")),c=Object(r["a"])(l,i,n,!1,null,"9f20837e",null);t["a"]=c.exports},"2bc1":function(e,t,s){},"2fa7":function(e,t,s){},"306f":function(e,t,s){},3269:function(e,t,s){},"34e4":function(e,t,s){},4899:function(e,t,s){},"49c8":function(e,t,s){},"4c53":function(e,t,s){"use strict";var i=s("23e7"),n=s("857a"),a=s("af03");i({target:"String",proto:!0,forced:a("sub")},{sub:function(){return n(this,"sub","","")}})},5243:function(e,t,s){},6349:function(e,t,s){},"6df6":function(e,t,s){},"857a":function(e,t,s){"use strict";var i=s("e330"),n=s("1d80"),a=s("577e"),o=/"/g,l=i("".replace);e.exports=function(e,t,s,i){var r=a(n(e)),c="<"+t;return""!==s&&(c+=" "+s+'="'+l(a(i),o,""")+'"'),c+">"+r+"</"+t+">"}},a434:function(e,t,s){"use strict";var i=s("23e7"),n=s("7b0b"),a=s("23cb"),o=s("5926"),l=s("07fa"),r=s("3a34"),c=s("3511"),u=s("65f0"),h=s("8418"),d=s("083a"),f=s("1dde"),m=f("splice"),p=Math.max,v=Math.min;i({target:"Array",proto:!0,forced:!m},{splice:function(e,t){var s,i,f,m,b,k,g=n(this),y=l(g),w=a(e,y),x=arguments.length;for(0===x?s=i=0:1===x?(s=0,i=y-w):(s=x-2,i=v(p(o(t),0),y-w)),c(y+s-i),f=u(g,i),m=0;m<i;m++)b=w+m,b in g&&h(f,m,g[b]);if(f.length=i,s<i){for(m=w;m<y-i;m++)b=m+i,k=m+s,b in g?g[k]=g[b]:d(g,k);for(m=y;m>y-i+s;m--)d(g,m-1)}else if(s>i)for(m=y-i;m>w;m--)b=m+i-1,k=m+s-1,b in g?g[k]=g[b]:d(g,k);for(m=0;m<s;m++)g[m+w]=arguments[m+2];return r(g,y-i+s),f}})},abef:function(e,t,s){},af03:function(e,t,s){"use strict";var i=s("d039");e.exports=function(e){return i((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},bb51:function(e,t,s){"use strict";s.r(t);s("b0c0");var i=function(){var e=this,t=e._self._c;return t("div",{class:["home",e.theme.name,{zoom:e.menu.state}]},[t("el-container",{staticClass:"container"},[t("el-aside",{attrs:{width:"auto"}},[t("div",{staticClass:"logo"},[e.menu.collapse?t("i",{staticClass:"el-icon-cloudy"}):t("span",[e._v(e._s(e.store.sys.name))])]),t("el-scrollbar",[t("el-menu",{attrs:{collapse:e.menu.collapse,"default-active":e.menu.active,"unique-opened":""},on:{select:e.menuSelect}},[t("MenuList",{attrs:{menuList:e.store.menu}})],1)],1),t("small",[e._v("©"+e._s(e.store.base.edition))])],1),t("el-container",{staticClass:"content"},[t("el-header",{attrs:{height:"50px"}},[t("ul",[t("li",{on:{click:e.switchMenu}},[t("el-tooltip",{attrs:{content:"切换菜单",effect:"light"}},[t("i",{staticClass:"el-icon-c-scale-to-original"})])],1),t("li",{on:{click:e.reload}},[t("el-tooltip",{attrs:{content:"重新载入",effect:"light"}},[t("i",{staticClass:"el-icon-refresh-right"})])],1)]),t("ul",[t("li",[t("el-popover",{attrs:{trigger:"hover"}},[t("i",{staticClass:"el-icon-collection-tag",attrs:{slot:"reference"},slot:"reference"}),t("el-input",{attrs:{rows:3,type:"textarea",placeholder:"这是个非常小巧实用的本地备忘录"},model:{value:e.memoData,callback:function(t){e.memoData=t},expression:"memoData"}})],1)],1),t("li",[t("el-tooltip",{attrs:{content:"配色方案",effect:"light"}},[t("i",{staticClass:"el-icon-brush",on:{click:e.showTheme}})])],1),t("li",[t("el-tooltip",{attrs:{content:"切换组织",effect:"light"}},[t("i",{staticClass:"el-icon-files",on:{click:e.setFrame}})])],1),t("li",[t("el-popover",{attrs:{trigger:"hover","popper-class":"userPopover"}},[t("span",{attrs:{slot:"reference"},slot:"reference"},[e._v(" "+e._s(e.store.user.name)+" "),t("i",{staticClass:"el-icon-caret-bottom"})]),t("div",{staticClass:"user",on:{click:function(t){return e.switchPage("user")}}},[t("el-image",{attrs:{src:e.store.user.img}},[t("div",{attrs:{slot:"error"},slot:"error"},[t("i",{staticClass:"el-icon-user-solid"})])]),t("div",{staticClass:"info"},[t("span",[e._v(e._s(e.store.user.user))]),t("span",[e._v(e._s(e.store.user.tel))])])],1),t("el-divider"),t("p",{on:{click:function(t){return e.switchPage("log")}}},[t("i",{staticClass:"el-icon-tickets"}),e._v(" 操作日志 ")]),t("p",{on:{click:function(t){return e.switchPage("backup")}}},[t("i",{staticClass:"el-icon-receiving"}),e._v(" 数据备份 ")]),t("el-divider"),t("p",{on:{click:e.signOut}},[t("i",{staticClass:"el-icon-unlock"}),e._v(" 退出登录 ")])],1)],1),t("li",[t("el-tooltip",{attrs:{content:"关于程序",effect:"light"}},[e.cloud.data.ver==e.cloud.data.new?[t("i",{staticClass:"el-icon-cloudy",on:{click:e.showCloud}})]:[t("el-badge",{attrs:{"is-dot":""}},[t("i",{staticClass:"el-icon-cloudy",on:{click:e.showCloud}})])]],2)],1)])]),t("el-main",[t("el-tabs",{staticClass:"homeLabel",attrs:{"before-leave":e.switchLabel,type:"card"},on:{"tab-remove":e.delLabel},model:{value:e.label.active,callback:function(t){e.$set(e.label,"active",t)},expression:"label.active"}},e._l(e.label.items,(function(e,s){return t("el-tab-pane",{key:e.name,attrs:{label:e.label,name:e.name,closable:""}})})),1),t("div",{staticClass:"routerPage"},[t("keep-alive",{attrs:{exclude:e.exclude}},[e.exist?t("router-view"):e._e()],1)],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:e.menu.state,expression:"menu.state"}],staticClass:"mask",on:{click:e.switchMenu}})],1)],1),t("el-dialog",{directives:[{name:"madeDialog",rawName:"v-madeDialog"}],attrs:{visible:e.frame.dialog,title:"组织数据",width:"390px"},on:{"update:visible":function(t){return e.$set(e.frame,"dialog",t)}}},[t("transition",{attrs:{name:"el-fade-in"}},[e.frame.dialog?t("div",[t("el-form",{attrs:{"label-width":"80px"}},[t("el-form-item",{attrs:{label:"组织数据"}},[t("nodTree",{attrs:{treeData:e.store.frame,placeholder:"请选择组织数据",checkStrictly:!0},model:{value:e.frame.frame,callback:function(t){e.$set(e.frame,"frame",t)},expression:"frame.frame"}})],1)],1),t("el-alert",{attrs:{title:"功能介绍",type:"success",closable:!1}},[[t("ul",{staticClass:"frameTip"},[t("li",[e._v("组织列表数据受数据授权影响。")]),t("li",[e._v("该功能作用于系统全部功能模块。")]),t("li",[e._v("未选择组织数据则默认为全部组织。")])])]],2)],1):e._e()]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.frame.dialog=!1}}},[e._v("取消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.saveFrame}},[e._v("保存")])],1)],1),t("el-drawer",{attrs:{title:"配色方案",visible:e.theme.dialog,direction:"rtl",size:"320px"},on:{"update:visible":function(t){return e.$set(e.theme,"dialog",t)}}},[e.theme.dialog?[t("ul",{staticClass:"themeGroup"},[e._l(e.theme.nums,(function(s,i){return[e._l(3,(function(s,n){return[t("li",{class:["T_"+i+"_"+n,{selected:e.theme.name=="theme_"+i+"_"+n}],on:{click:function(t){return e.setTheme(i+"_"+n)}}},[t("div",{staticClass:"lt"}),t("div",{staticClass:"tr"}),t("div",{staticClass:"lb"})])]}))]}))],2)]:e._e()],2),t("el-drawer",{attrs:{title:"关于程序",visible:e.cloud.dialog,direction:"rtl",size:"320px"},on:{"update:visible":function(t){return e.$set(e.cloud,"dialog",t)}}},[e.cloud.dialog?[t("div",{staticClass:"cloud"},[t("p",{staticClass:"ver"},[e._v("当前版本: 社区版")]),t("div",{staticClass:"group"},[e.cloud.data.ver==e.cloud.data.new?[t("el-button",{attrs:{type:"primary"},on:{click:e.openHome}},[e._v("官网首页")])]:[t("el-button",{attrs:{type:"success"},on:{click:e.openUpgrade}},[e._v("在线升级")])],t("el-button",{on:{click:e.openContact}},[e._v("联系客服")])],2),t("p",{staticClass:"about"},[e._v("版权信息")]),t("p",{staticClass:"text"},[e._v(" 点可云进销存系统受国家计算机软件著作权( 2019SR0135099 )保护,未经官网正规渠道授权擅自公开产品源文件、以及对产品二次出售或以任何形式二次发布的,我们将保留追究法律责任的权利。 ")]),t("p",{staticClass:"copyright"},[e._v(" © 2023 "),t("a",{attrs:{href:e.store.base.webSite,target:"_blank"}},[e._v("NODCLOUD.COM")]),e._v(" 版权所有 ")])])]:e._e()],2)],1)},n=[],a=(s("7db0"),s("c740"),s("14d9"),s("a434"),s("d3b7"),s("6df6"),s("fee0"),s("d1fb"),s("ee5a"),s("2fa7"),s("4899"),s("abef"),s("2bc1"),s("6349"),s("3269"),s("306f"),s("e54f"),s("13ae"),s("eaed"),s("49c8"),s("34e4"),s("23f7")),o=(s("4c53"),function(){var e=this,t=e._self._c;return t("div",{staticClass:"menuList",attrs:{level:e.level}},[e._l(this.menuList,(function(s,i){return["routine"==e.getMenuType(s)?t("el-menu-item",{key:s.id,attrs:{index:s.key}},[""!=s.ico?t("i",{class:s.ico}):e._e(),t("span",{attrs:{slot:"title"},slot:"title"},[e._v(e._s(s.name))])]):"subsidiary"==e.getMenuType(s)?t("el-menu-item-group",{staticClass:"subsidiaryMenu"},[t("el-menu-item",{key:s.id,attrs:{index:s.key}},[""!=s.ico?t("i",{class:s.ico}):e._e(),t("span",{attrs:{slot:"title"},slot:"title"},[e._v(e._s(s.name)+" ")])]),t("el-menu-item",{key:s.sub[0].id,attrs:{index:s.sub[0].key}},[t("span",{attrs:{slot:"title"},slot:"title"},[e._v(e._s(s.sub[0].name.split("|")[0]))])])],1):t("el-submenu",{key:s.id,attrs:{index:s.key}},[t("template",{slot:"title"},[""!=s.ico?t("i",{class:s.ico}):e._e(),t("span",{attrs:{slot:"title"},slot:"title"},[e._v(e._s(s.name))])]),t("Menulist",{attrs:{menuList:s.sub,level:e.level+1}})],2)]}))],2)}),l=[],r={name:"Menulist",props:{menuList:{required:!0,type:Array},level:{default:1}},methods:{getMenuType:function(e){return 0==e.sub.length?"routine":1==e.sub.length&&1==e.sub[0].type?"subsidiary":"relation"}}},c=r,u=s("2877"),h=Object(u["a"])(c,o,l,!1,null,null,null),d=h.exports,f={name:"Home",components:{NodTree:a["a"],MenuList:d},data:function(){return{exist:!0,exclude:null,menu:{active:"home",collapse:!1,state:!1},label:{active:"home",items:[{name:"home",label:"首页",resource:"/home"}]},frame:{dialog:!1,frame:[]},cloud:{dialog:!1,data:{ver:"",new:"",url:""}},theme:{dialog:!1,nums:5,name:""},memoData:""}},created:function(){this.$lib.updateStore(this),this.$bus.on("homeReload",this.homeReload),this.$bus.on("switchPage",this.switchPage)},computed:{store:function(){return this.$store.state},screen:{cache:!1,get:function(){var e=document.body.offsetWidth;return e>1200?3:e>992?2:e>768?1:0}},flatMenu:function(){var e=this.$lib.flatten(this.store.menu);return e.push({name:"新手向导",key:"guide",model:0,resource:"/home/guide"}),e}},watch:{$route:{handler:function(e){var t="main"==e.name?"home":e.name;t!=this.menu.active&&(this.menu.active=t,-1==this.label.items.findIndex((function(e){return e.name==t}))&&this.label.items.push({name:e.name,label:e.meta.title,resource:e.path}),this.label.active=t)},deep:!0},memoData:function(e){this.$store.commit("upState",{key:"memoData",val:e})}},methods:{menuSelect:function(e){var t=this.flatMenu.find((function(t){return t.key==e}));if(-1==t.check)return!1;if(0==t.model){var s=this.label.items.findIndex((function(e){return e.name==t.key}));-1==s&&this.label.items.push({name:t.key,label:-1==t.name.indexOf("|")?t.name:t.name.split("|")[1],resource:t.resource}),this.label.active=t.key,this.menu.state&&this.switchMenu()}else window.open(t.resource)},switchLabel:function(e){var t=this.flatMenu.find((function(t){return t.key==e}));this.menu.active=t.key,this.$router.history.current.fullPath!=t.resource&&this.$router.push(t.resource)},delLabel:function(e){var t=this,s=this.label.items.findIndex((function(t){return t.name==e}));if(this.label.active==e){var i=this.label.items[s+1]||this.label.items[s-1];this.menu.active=i.name,this.label.active=i.name}this.label.items.splice(s,1),this.exclude=this.$lib.firstToUpperCase(e),this.$nextTick((function(){t.exclude=null}))},switchMenu:function(){this.screen>=2?this.menu.collapse=!this.menu.collapse:this.menu.state=!this.menu.state},setFrame:function(){var e=this;this.$axios.post("service/getFrame",{by:"nodcloud"}).then((function(t){"success"==t.state?(e.frame.frame=t.info,e.frame.dialog=!0):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},saveFrame:function(){var e=this;this.$axios.post("service/saveFrame",{parm:this.frame.frame}).then((function(t){"success"==t.state?(e.frame.dialog=!1,e.$message({type:"success",message:"设置组织数据成功!"})):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},showTheme:function(){this.theme.dialog=!0},setTheme:function(e){var t="theme_"+e;this.theme.name=t,this.$store.commit("upState",{key:"theme",val:t})},showCloud:function(){this.cloud.dialog=!0},openHome:function(){window.open(this.store.base.webSite)},openContact:function(){window.open(this.store.base.contact)},signOut:function(){var e=this;this.$axios.post("service/out").then((function(t){"success"==t.state?(e.$store.commit("upState",{key:"token",val:""}),e.$router.push({name:"Login"})):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},homeReload:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.exist=!1,this.exclude=t,this.$nextTick((function(){e.exist=!0,e.exclude=null}))},switchPage:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=this.flatMenu.find((function(t){return t.key==e}));if(void 0==s)console.log("[:( no access]");else if(0==s.model){var i=this.label.items.findIndex((function(e){return e.name==s.key}));t&&-1!=i&&this.delLabel(s.key),(t||-1==i)&&this.label.items.push({name:s.key,label:-1==s.name.indexOf("|")?s.name:s.name.split("|")[1],resource:s.resource}),this.label.active=s.key}else window.open(s.resource)},reload:function(){this.$bus.emit("rootReload"),this.$message({type:"success",message:"页面刷新成功!"})}},mounted:function(){var e=this;"main"!=this.$route.name&&(this.menu.active=this.$route.name,this.label.items.push({name:this.$route.name,label:this.$route.meta.title,resource:this.$route.path}),this.label.active=this.$route.name),this.memoData=this.store.memoData,this.theme.name=this.store.theme,window.addEventListener("resize",(function(){e.menu.collapse=!1,e.menu.state=!1}))},beforeDestroy:function(){this.$bus.off("homeReload",this.homeReload),this.$bus.off("switchPage",this.switchPage)}},m=f,p=(s("e098"),s("c8fa"),Object(u["a"])(m,i,n,!1,null,"704d8410",null));t["default"]=p.exports},c1c5:function(e,t,s){},c740:function(e,t,s){"use strict";var i=s("23e7"),n=s("b727").findIndex,a=s("44d2"),o="findIndex",l=!0;o in[]&&Array(1)[o]((function(){l=!1})),i({target:"Array",proto:!0,forced:l},{findIndex:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}}),a(o)},c8fa:function(e,t,s){"use strict";s("5243")},d1fb:function(e,t,s){},d297:function(e,t,s){},d683:function(e,t,s){"use strict";s("d297")},e098:function(e,t,s){"use strict";s("c1c5")},e54f:function(e,t,s){},eaed:function(e,t,s){},ee5a:function(e,t,s){},fee0:function(e,t,s){}}]); |