// fmea表格，头部的按钮
const pFmeaTableTopBtns = [
  {
    label: 'FMEA表格',
    icon: 'iconbiaogeshu',
    active: false,
    action: 'toPFmeaTable'
  },
  {
    label: '流程图',
    icon: 'iconyewuliuchengguanli',
    active: false,
    action: 'toFlowProcess'
  },
  {
    label: '结构树',
    icon: 'iconjiegoushu',
    active: false,
    action: 'toPFmeaTree'
  }
]

const state = {
  pFmeaTableTopBtns: pFmeaTableTopBtns // fmeaTable，头部的按钮
}

const mutations = {
  SET: (state, { key, value }) => {
    if (state.hasOwnProperty(key)) {
      state[key] = value
    }
  }
}

const actions = {
  set({ commit }, data) {
    commit('SET', data)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
