93.9f045043.js 2.5 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[93],{c8d8:function(t,e,a){"use strict";a.r(e);var s=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"}},[t.hasPermission("operationlog")?e("q-route-tab",{attrs:{name:"operationlog",label:"操作日志",icon:"event_note",to:{name:"operationlog"},exact:""}}):t._e()],1),e("transition",{attrs:{appear:"","enter-active-class":"animated zoomIn"}},[t.hasPermission("roles")?e("q-route-tab",{attrs:{name:"permission",label:"人员管理",icon:"perm_identity",to:{name:"permission"},exact:""}}):t._e()],1)],1)],1)])],e("div",{staticClass:"fit scroll",style:{width:"100%",margin:"-10px 10px 0 10px"}},[e("router-view")],1)],2)},i=[],n=a("18d6"),o=a("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,c=a("42e1"),f=a("9989"),m=a("429b"),p=a("7867"),d=a("eebe"),u=a.n(d),h=Object(c["a"])(l,s,i,!1,null,null,null);e["default"]=h.exports;u()(h,"components",{QPage:f["a"],QTabs:m["a"],QRouteTab:p["a"]})}}]);