commonData

This commit is contained in:
shijing 2022-02-24 08:36:28 +08:00
parent ae75669c9e
commit 425ea54e73
1 changed files with 16 additions and 9 deletions

View File

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