/** * 实训状态数据 */ const scriptRecord = { namespaced: true, state: { deviceConditionList: [], //任务目标列表 memberList:[], //角色列表, script:[], //剧本列表, memberName:"", //角色名称, behaviorName:"", //动作名称 }, 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; }, }, 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; }, }, 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); }, } }; export default scriptRecord;