| | |
| | | isAdmin = true; |
| | | } |
| | | }) |
| | | |
| | | if (isAdmin) { |
| | | findStaffByUserId(res.id).then(staffs => { |
| | | localStorage.setItem("staffs", JSON.stringify(staffs)); |
| | | localStorage.setItem("selectStaff", JSON.stringify(staffs[0])); |
| | | findStaffByUserId(res.id).then(sres => { |
| | | |
| | | if (sres.data && sres.data.findStaffByUserId) { |
| | | var staffs = sres.data.findStaffByUserId; |
| | | localStorage.setItem("staffs", JSON.stringify(staffs)); |
| | | localStorage.setItem("selectStaff", JSON.stringify(staffs[0])); |
| | | |
| | | this.$EventBus.$emit("updateStaffs", '123'); |
| | | } |
| | | }) |
| | | } |
| | | |