91.764dd5ce.js 2.2 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[91],{c8d8:function(t,e,s){"use strict";s.r(e);var a=function(){var t=this,e=t._self._c;return e("q-page",{staticClass:"flex flex-top"},[[e("div",{staticClass:"q-pa-md"},[e("div",{staticClass:"q-gutter-y-md",staticStyle:{"max-width":"100%"}},[e("q-tabs",{model:{value:t.detaillink,callback:function(e){t.detaillink=e},expression:"detaillink"}},[e("transition",{attrs:{appear:"","enter-active-class":"animated zoomIn"}},[t.hasPermission("stafflist")?e("q-route-tab",{attrs:{name:"stafflist",label:t.$t("staff.staff"),icon:"perm_contact_calendar",to:{name:"stafflist"},exact:""}}):t._e()],1),e("transition",{attrs:{appear:"","enter-active-class":"animated zoomIn"}},[t.hasPermission("stafflist_check_code")?e("q-route-tab",{attrs:{name:"stafflist_check_code",label:t.$t("staff.check_code"),icon:"published_with_changes",to:{name:"stafflist_check_code"},exact:""}}):t._e()],1),e("transition",{attrs:{appear:"","enter-active-class":"animated zoomIn"}},[t.hasPermission("stafftype")?e("q-route-tab",{attrs:{name:"stafftype",label:t.$t("staff.view_staff.staff_type"),icon:"img:statics/staff/stafftype.png",to:{name:"stafftype"},exact:""}}):t._e()],1),e("transition",{attrs:{appear:"","enter-active-class":"animated zoomIn"}},[e("q-route-tab",{attrs:{name:"permission",label:"人员管理",icon:"perm_identity",to:{name:"permission"},exact:""}})],1)],1)],1)])],e("div",{style:{width:"100%",margin:"-10px 10px 0 10px"}},[e("router-view")],1)],2)},i=[],n=s("18d6"),o=s("3004"),r={name:"Pagestaff",data(){return{detaillink:"stafflist",login_mode:n["a"].getItem("login_mode"),userPermissions:[]}},mounted(){this.loadUserPermissions()},methods:{loadUserPermissions(){Object(o["h"])("staff/role-pagePermissions/"+this.login_mode+"/",{primary_page:"staff"}).then((t=>{this.userPermissions=t}),(t=>{this.$q.notify({type:"negative",message:"加载用户权限失败: "+t.message})}))},hasPermission(t){if(!this.userPermissions||0===this.userPermissions.length)return!1;const e=this.userPermissions.find((e=>e.page==="/staff/"+t));return!!e&&e.enabled}}},l=r,f=s("42e1"),c=s("9989"),m=s("429b"),d=s("7867"),p=s("eebe"),u=s.n(p),h=Object(f["a"])(l,a,i,!1,null,null,null);e["default"]=h.exports;u()(h,"components",{QPage:c["a"],QTabs:m["a"],QRouteTab:d["a"]})}}]);