竞赛裁判系统代码调整
This commit is contained in:
parent
4132eba1ca
commit
cf021736b2
@ -47,9 +47,9 @@ export function getQuestionListByMapId(params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 加载实操及内容
|
// 加载实操及内容
|
||||||
export function loadQuestionList(data) {
|
export function loadQuestionList(competitionId, data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/v1/competitionPractical/distribute`,
|
url: `/api/v1/competitionPractical/${competitionId}/distribute`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
|
@ -29,6 +29,9 @@ function handle(state, data) {
|
|||||||
case 'Simulation_Script_Tip': // 仿真-聊天界面用户进出仿真消息
|
case 'Simulation_Script_Tip': // 仿真-聊天界面用户进出仿真消息
|
||||||
handleSimulationScriptTipInfo(state, msg); // 用户进出仿真消息
|
handleSimulationScriptTipInfo(state, msg); // 用户进出仿真消息
|
||||||
break;
|
break;
|
||||||
|
case 'Competition_Practical': // 竞赛裁判系统裁判员开始考试推送消息
|
||||||
|
state.competitionStart++; // 竞赛裁判系统裁判员开始考试推送消息
|
||||||
|
break;
|
||||||
case 'Simulation_Script_Finish': // 剧本执行完成推送消息
|
case 'Simulation_Script_Finish': // 剧本执行完成推送消息
|
||||||
state.scriptFinish++; // 剧本执行完成推送消息
|
state.scriptFinish++; // 剧本执行完成推送消息
|
||||||
break;
|
break;
|
||||||
@ -199,6 +202,7 @@ const socket = {
|
|||||||
simulationRoleList:[], // 设置仿真的聊天角色信息
|
simulationRoleList:[], // 设置仿真的聊天角色信息
|
||||||
simulationScriptTip:{}, // 剧本推送提示信息
|
simulationScriptTip:{}, // 剧本推送提示信息
|
||||||
scriptFinish:0, // 剧本执行完成提示信息
|
scriptFinish:0, // 剧本执行完成提示信息
|
||||||
|
competitionStart:0, // 竞赛裁判系统裁判开始考试推送消息
|
||||||
jointRoomPrepare: false, // 演练房间准备状态
|
jointRoomPrepare: false, // 演练房间准备状态
|
||||||
equipmentStatus: [], // 仿真-设备状态消息
|
equipmentStatus: [], // 仿真-设备状态消息
|
||||||
trainStationList: [], // 仿真-列车实际到发车站消息
|
trainStationList: [], // 仿真-列车实际到发车站消息
|
||||||
|
@ -62,7 +62,7 @@ export default {
|
|||||||
this.multipleSelection.forEach(question=>{
|
this.multipleSelection.forEach(question=>{
|
||||||
ids.push(question.id);
|
ids.push(question.id);
|
||||||
});
|
});
|
||||||
loadQuestionList(ids).then((response)=>{
|
loadQuestionList(1, ids).then((response)=>{
|
||||||
this.$message('开始考试成功!');
|
this.$message('开始考试成功!');
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
|
@ -33,6 +33,7 @@ import { EventBus } from '@/scripts/event-bus';
|
|||||||
import { getSessionStorage } from '@/utils/auth';
|
import { getSessionStorage } from '@/utils/auth';
|
||||||
import RealDevice from './menuDraft/realDevice';
|
import RealDevice from './menuDraft/realDevice';
|
||||||
import { participantCompleteCompetition } from '@/api/competition';
|
import { participantCompleteCompetition } from '@/api/competition';
|
||||||
|
import { prefixIntrger } from '@/utils/date';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MenuDemonJoint',
|
name: 'MenuDemonJoint',
|
||||||
@ -123,6 +124,11 @@ export default {
|
|||||||
},
|
},
|
||||||
'$store.state.map.runPlanStatus': function (val) {
|
'$store.state.map.runPlanStatus': function (val) {
|
||||||
this.isDisable = val;
|
this.isDisable = val;
|
||||||
|
},
|
||||||
|
'$store.state.socket.competitionStart':function(val) {
|
||||||
|
if (val) {
|
||||||
|
this.startCompetition();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
@ -287,8 +293,18 @@ export default {
|
|||||||
setRelDevice() {
|
setRelDevice() {
|
||||||
this.$refs.realDevice.doShow();
|
this.$refs.realDevice.doShow();
|
||||||
},
|
},
|
||||||
|
formatTime(initTime) {
|
||||||
|
const hh = prefixIntrger(initTime.getHours(), 2);
|
||||||
|
const mm = prefixIntrger(initTime.getMinutes(), 2);
|
||||||
|
const ss = prefixIntrger(initTime.getSeconds(), 2);
|
||||||
|
return `${hh}:${mm}:${ss}`;
|
||||||
|
},
|
||||||
startCompetition() {
|
startCompetition() {
|
||||||
this.selectBeginTime();
|
const date = new Date(this.$store.state.training.initTime || null);
|
||||||
|
const model = {
|
||||||
|
initTime: this.formatTime(date)
|
||||||
|
};
|
||||||
|
this.start(model);
|
||||||
},
|
},
|
||||||
endCompetition() {
|
endCompetition() {
|
||||||
this.$confirm('此操作将结束并提交本次竞赛,是否继续', this.$t('global.tips'), {
|
this.$confirm('此操作将结束并提交本次竞赛,是否继续', this.$t('global.tips'), {
|
||||||
|
Loading…
Reference in New Issue
Block a user