2019-08-08 10:31:46 +08:00
|
|
|
/**
|
|
|
|
* 实训状态数据
|
|
|
|
*/
|
|
|
|
const scriptRecord = {
|
|
|
|
namespaced: true,
|
|
|
|
state: {
|
|
|
|
deviceConditionList: [], //任务目标列表
|
|
|
|
memberList:[], //角色列表,
|
|
|
|
script:[], //剧本列表,
|
|
|
|
memberName:"", //角色名称,
|
|
|
|
behaviorName:"", //动作名称
|
2019-08-08 17:32:38 +08:00
|
|
|
mapLocation: {}, //地图定位
|
2019-08-08 10:31:46 +08:00
|
|
|
},
|
|
|
|
getters: {
|
|
|
|
deviceConditionList: (state) => {
|
|
|
|
return state.deviceConditionList;
|
|
|
|
},
|
|
|
|
memberList:(state)=>{
|
|
|
|
return state.memberList;
|
|
|
|
},
|
|
|
|
script:(state)=>{
|
|
|
|
return state.script;
|
|
|
|
},
|
|
|
|
memberName:(state)=>{
|
|
|
|
return state.memberName;
|
|
|
|
},
|
|
|
|
behaviorName:(state)=>{
|
|
|
|
return state.behaviorName;
|
|
|
|
},
|
2019-08-08 17:32:38 +08:00
|
|
|
mapLocation:(state)=>{
|
|
|
|
return state.mapLocation;
|
|
|
|
}
|
2019-08-08 10:31:46 +08:00
|
|
|
},
|
|
|
|
mutations: {
|
|
|
|
setDeviceCondition: (state, deviceConditionList) => {
|
|
|
|
state.deviceConditionList = deviceConditionList;
|
|
|
|
},
|
|
|
|
setMemberList: (state, memberList) => {
|
|
|
|
state.memberList = memberList;
|
|
|
|
},
|
|
|
|
setScript:(state, script) => {
|
|
|
|
state.script = script;
|
|
|
|
},
|
|
|
|
setMemberName:(state, memberName) => {
|
|
|
|
state.memberName = memberName;
|
|
|
|
},
|
|
|
|
setBehaviorName:(state, behaviorName) => {
|
|
|
|
state.behaviorName = behaviorName;
|
|
|
|
},
|
2019-08-08 17:32:38 +08:00
|
|
|
setMapLocation:(state, mapLocation) => {
|
|
|
|
state.mapLocation = mapLocation;
|
|
|
|
},
|
2019-08-08 10:31:46 +08:00
|
|
|
},
|
|
|
|
actions: {
|
|
|
|
/**
|
|
|
|
* 设置任务目标列表
|
|
|
|
*/
|
|
|
|
updateDeviceCondition: ({ commit }, deviceConditionList) => {
|
|
|
|
commit('setDeviceCondition', deviceConditionList);
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 设置角色列表
|
|
|
|
*/
|
|
|
|
updateMemberList: ({ commit }, memberList) => {
|
|
|
|
commit('setMemberList', memberList);
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 设置剧本列表
|
|
|
|
*/
|
|
|
|
updateScript: ({ commit }, script) => {
|
|
|
|
commit('setScript', script);
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 设置角色名称
|
|
|
|
*/
|
|
|
|
updateMemberName:({ commit }, memberName) => {
|
|
|
|
commit('setMemberName', memberName);
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 设置动作名称
|
|
|
|
*/
|
|
|
|
updateBehaviorName:({ commit }, behaviorName) => {
|
|
|
|
commit('setBehaviorName', behaviorName);
|
|
|
|
},
|
2019-08-08 17:32:38 +08:00
|
|
|
/**
|
|
|
|
* 设置地图定位
|
|
|
|
*/
|
|
|
|
updateMapLocation:({ commit }, mapLocation) => {
|
|
|
|
commit('setMapLocation', mapLocation);
|
|
|
|
},
|
2019-08-08 10:31:46 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
export default scriptRecord;
|