devicesmgt/sgzb-screen/src/store/modules/addProject.js

29 lines
489 B
JavaScript

// 状态
const state = {
// 所有项目进度信息
list: [],
// 用户操作状态
status: 'add'
}
// 修改
const mutations = {
editFormAlign(state, val) {
const index = state.list.findIndex(item => item.wxId === val.wxId)
if (index > -1) state.list.splice(index, 1, val)
else state.list.push(val)
},
clear(state) {
state.list = []
},
editStatus(state, val) {
state.status = val
}
}
export default {
namespaced: true,
state,
mutations
}