|
@@ -4,6 +4,7 @@ import { getNoviceGuideData, findVesselSysVersion, getStaffHomeShowList } from '
|
|
import { setToken, getCompanyId, clearStorage } from '../../utils/auth'
|
|
import { setToken, getCompanyId, clearStorage } from '../../utils/auth'
|
|
import { resetRouter, asyncRoutes } from '../../router'
|
|
import { resetRouter, asyncRoutes } from '../../router'
|
|
import notification from '../../notification'
|
|
import notification from '../../notification'
|
|
|
|
+import Cookies from 'js-cookie'
|
|
import {
|
|
import {
|
|
setStore,
|
|
setStore,
|
|
} from '@/utils/store'
|
|
} from '@/utils/store'
|
|
@@ -22,7 +23,8 @@ const state = {
|
|
guideInfo: {},
|
|
guideInfo: {},
|
|
isTrainDialog: '',
|
|
isTrainDialog: '',
|
|
userInfo: '',
|
|
userInfo: '',
|
|
- userSetting: ''
|
|
|
|
|
|
+ userSetting: '',
|
|
|
|
+ adminId: Cookies.get('adminId') || ''
|
|
}
|
|
}
|
|
|
|
|
|
const getters = {
|
|
const getters = {
|
|
@@ -74,6 +76,10 @@ const mutations = {
|
|
SET_USERSETTING: (state, params) => {
|
|
SET_USERSETTING: (state, params) => {
|
|
state.userSetting = params
|
|
state.userSetting = params
|
|
},
|
|
},
|
|
|
|
+ SET_ADMINID: (state, adminId) => {
|
|
|
|
+ state.adminId = adminId
|
|
|
|
+ Cookies.set('adminId', adminId)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
const actions = {
|
|
const actions = {
|
|
@@ -281,7 +287,10 @@ const actions = {
|
|
async changeVesslBank({ commit, dispatch, state }, showVal) {
|
|
async changeVesslBank({ commit, dispatch, state }, showVal) {
|
|
await updateShowInfo(showVal).toPromise()
|
|
await updateShowInfo(showVal).toPromise()
|
|
dispatch('toSetShow', { userId: localStorage.getItem('ws-pf_userId') })
|
|
dispatch('toSetShow', { userId: localStorage.getItem('ws-pf_userId') })
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ setAdminId({ commit }, adminId) {
|
|
|
|
+ commit('SET_ADMINID', adminId)
|
|
|
|
+ },
|
|
}
|
|
}
|
|
|
|
|
|
export default {
|
|
export default {
|