import Vue from 'vue'
import Vuex from 'vuex'
import { store as firstPage } from '../modules/firstPage'
import { store as sacilitiedAndStaff } from '../modules/facilitiesAndStaff'
import { store as environment } from '../modules/environment'
import { store as safety } from '../modules/safety'
import { store as energyConsumption } from '../modules/energyConsumption'
import { store as performance } from '../modules/performance'
Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    name: '这里是全局的',
    projectId: 'Pj1101020002'
  },
  mutations: {
    getProId (state, projectId) {
      state.projectId = projectId
    }
  },
  actions: {
  },
  modules: {
    firstPage,
    sacilitiedAndStaff,
    environment,
    safety,
    energyConsumption,
    performance
  }
})

export default store
