 const state = {
	sparepartId: '',
	sparepart: null,
	executorInfo: null,
	idx:"", //下标 
 };

 const mutations = {
	SET_SPAREPART:(state, data) => {
		//存放备品备件
		state.sparepart = data;
	},
	SET_EXECUTOR:(state, data) => {
		//转派人员信息
		state.executorInfo = data;
	},
	SET_SPAREPARTINDEX:(state, data) => {
		state.idx = data;
	},
 };

 const actions = {
	setSparepart({
	 	commit,state
	 },data){
		commit('SET_SPAREPART', data);
	 },
	 setExecutor({
	 	commit
	 },data){
	 	commit('SET_EXECUTOR', data);
	 },
	 setSparepartIndex({
	 	commit
	 },data){
	 	commit('SET_SPAREPARTINDEX', data);
	 }
 };

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