commonData
This commit is contained in:
parent
ae75669c9e
commit
425ea54e73
|
@ -6,13 +6,20 @@ const state = {
|
||||||
withoutAnimation: false
|
withoutAnimation: false
|
||||||
},
|
},
|
||||||
device: 'desktop',
|
device: 'desktop',
|
||||||
size: Cookies.get('size') || 'medium'
|
size: Cookies.get('size') || 'medium',
|
||||||
}
|
recordFormType:{
|
||||||
|
10:'生产记录表',
|
||||||
|
20:'工序检查表',
|
||||||
|
30:'入厂检验表',
|
||||||
|
40:'成品检验表',
|
||||||
|
50:'首件检查表',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
TOGGLE_SIDEBAR: state => {
|
TOGGLE_SIDEBAR: state => {
|
||||||
state.sidebar.opened = !state.sidebar.opened
|
state.sidebar.opened = !state.sidebar.opened;
|
||||||
state.sidebar.withoutAnimation = false
|
state.sidebar.withoutAnimation = false;
|
||||||
if (state.sidebar.opened) {
|
if (state.sidebar.opened) {
|
||||||
Cookies.set('sidebarStatus', 1)
|
Cookies.set('sidebarStatus', 1)
|
||||||
} else {
|
} else {
|
||||||
|
@ -20,18 +27,18 @@ const mutations = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
CLOSE_SIDEBAR: (state, withoutAnimation) => {
|
CLOSE_SIDEBAR: (state, withoutAnimation) => {
|
||||||
Cookies.set('sidebarStatus', 0)
|
Cookies.set('sidebarStatus', 0);
|
||||||
state.sidebar.opened = false
|
state.sidebar.opened = false;
|
||||||
state.sidebar.withoutAnimation = withoutAnimation
|
state.sidebar.withoutAnimation = withoutAnimation
|
||||||
},
|
},
|
||||||
TOGGLE_DEVICE: (state, device) => {
|
TOGGLE_DEVICE: (state, device) => {
|
||||||
state.device = device
|
state.device = device
|
||||||
},
|
},
|
||||||
SET_SIZE: (state, size) => {
|
SET_SIZE: (state, size) => {
|
||||||
state.size = size
|
state.size = size;
|
||||||
Cookies.set('size', size)
|
Cookies.set('size', size)
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
toggleSideBar({ commit }) {
|
toggleSideBar({ commit }) {
|
||||||
|
@ -46,7 +53,7 @@ const actions = {
|
||||||
setSize({ commit }, size) {
|
setSize({ commit }, size) {
|
||||||
commit('SET_SIZE', size)
|
commit('SET_SIZE', size)
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
namespaced: true,
|
namespaced: true,
|
||||||
|
|
Loading…
Reference in New Issue