撤销未完仿真状态管理

This commit is contained in:
fan 2020-08-05 13:23:45 +08:00
parent afe83ed12b
commit 968d588914
3 changed files with 2 additions and 137 deletions

View File

@ -16,7 +16,6 @@ import scriptRecord from './modules/scriptRecord';
import ibp from './modules/ibp';
import order from './modules/order';
import iscs from './modules/iscs';
import simulation from './modules/simulation';
import getters from './getters';
@ -39,8 +38,7 @@ const store = new Vuex.Store({
scriptRecord,
ibp,
order,
iscs,
simulation
iscs
},
getters
});

View File

@ -16,7 +16,6 @@ import scriptRecord from './modules/scriptRecord';
import ibp from './modules/ibp';
import order from './modules/order';
import iscs from './modules/iscs';
import simulation from './modules/simulation';
import getters from './getters';
@ -39,8 +38,7 @@ const store = new Vuex.Store({
scriptRecord,
ibp,
order,
iscs,
simulation
iscs
},
getters
});

View File

@ -1,131 +0,0 @@
const simulation = {
namespaced: true,
state: {
operateMode: null, // 综合演练操作模式(普通模式、故障模式、指令模式)
start: false, // 仿真开始标志
startCount: 0, // 仿真开始计数器
overCount: 0, // 仿真结束计数器
initTime: 0, // 仿真开始时间
timeInterval: null, // 时间计算定时器
prdType: '', // 产品类型
roles: '', // 仿真角色类型
group: '', // 仿真group
centerStationCode: '', // 显示居中集中站
memberList: [], // 综合仿真成员列表
memberData: {}, // 综合仿真成员列表
simulationUserList: [] // 综合仿真用户列表
},
getters: {
operateMode: (state) => {
return state.operateMode;
},
start: (state) => {
return state.start;
},
startCount: (state) => {
return state.startCount;
},
overCount: (state) => {
return state.overCount;
},
initTime: (state) => {
return state.initTime;
},
prdType: (state) => {
return state.prdType;
},
roles: (state) => {
return state.roles;
},
group: (state) => {
return state.group;
},
centerStationCode: (state) => {
return state.centerStationCode;
},
memberList: (state) => {
return state.memberList;
},
memberData: (state) => {
return state.memberData;
},
simulationUserList: (state) => {
return state.simulationUserList;
}
},
mutations: {
setOperateMode: (state, operateMode) => {
state.operateMode = operateMode;
},
simulationStart: (state) => {
state.start = true;
state.startCount++;
},
simulationOver: (state) => {
state.start = false;
state.overCount++;
},
countTime: (state, type) => {
if (state.timeInterval) {
clearInterval(state.timeInterval);
state.timeInterval = null;
}
if (type == 'Lesson') {
state.timeInterval = setInterval(() => {
state.usedTime++;
}, 1000);
} else {
state.timeInterval = setInterval(() => {
state.initTime += 1000;
}, 1000);
}
},
stopCountTime: (state) => {
if (state.timeInterval) {
clearInterval(state.timeInterval);
state.timeInterval = null;
}
},
setPrdType: (state, prdType) => {
state.prdType = prdType;
},
setGroup: (state, group) => {
state.group = group;
},
setCenterStationCode: (state, centerStationCode) => {
state.centerStationCode = centerStationCode;
}
},
actions: {
// 修改操作模式
setOperateMode: ({ commit }, operateMode) => {
commit('setOperateMode', operateMode);
},
// 仿真开始
simulationStart: ({ commit }) => {
commit('simulationStart');
},
// 仿真结束
simulationOver: ({ commit }) => {
commit('simulationOver');
},
// 停止计时
setStopCountTime: ({ commit }) => {
commit('stopCountTime');
},
// 修改产品
setPrdType: ({ commit }, prdType) => {
commit('setPrdType', prdType);
},
// 修改放真group
setGroup: ( { commit }, group ) =>{
commit('setGroup', group);
},
// 设置显示集中站
setCenterStationCode: ( { commit }, group ) => {
commit('setCenterStationCode', group);
}
}
};
export default simulation;