竞赛流程调整

This commit is contained in:
fan 2024-03-04 15:59:58 +08:00
parent 6181fda6c6
commit f08d9e0e8e
4 changed files with 19 additions and 8 deletions

View File

@ -84,8 +84,9 @@ class ValidateHandler {
valid = ((operate.val).toString() === stepOperation.val.toString()) && valid; valid = ((operate.val).toString() === stepOperation.val.toString()) && valid;
} }
const opParam = operate.param === undefined ? {} : operate.param; const opParam = operate.param === undefined ? {} : operate.param;
const stepParam = stepOperation.params === undefined ? {} : stepOperation.params;
if ((opParam || stepOperation.params) && !opParam.hasOwnProperty('fileBase64Str')) { if ((opParam || stepOperation.params) && !opParam.hasOwnProperty('fileBase64Str')) {
valid = this.checkParamConsistent(opParam, stepOperation.params, operate.operation) && valid; valid = this.checkParamConsistent(opParam, stepParam, operate.operation) && valid;
} }
if (valid && store.state.trainingNew.voiceStepIndex > -1) { if (valid && store.state.trainingNew.voiceStepIndex > -1) {

View File

@ -42,9 +42,9 @@
</el-row> </el-row>
</div> </div>
<div style="text-align: center;margin-top: 15px;"> <div style="text-align: center;margin-top: 15px;">
<el-button v-show="nowData.ruleId" type="primary" @click="showScoreRule">评分表</el-button> <el-button v-show="nowData.ruleId" v-loading="loading" type="primary" @click="showScoreRule">评分表</el-button>
<el-button v-show="nowData.sceneId" v-loading="loading" type="primary" @click="startTask">开始任务</el-button> <el-button v-show="nowData.sceneId" v-loading="loading" type="primary" @click="startTask">开始任务</el-button>
<el-button type="primary" :disabled="nowKey === taskList.length-1" @click="nextTask">下一任务</el-button> <el-button v-loading="loading" type="primary" :disabled="nowKey === taskList.length-1" @click="nextTask">下一任务</el-button>
</div> </div>
</el-card> </el-card>
</el-col> </el-col>

View File

@ -65,7 +65,13 @@ export default {
this.dialogVisible = false; this.dialogVisible = false;
}, },
doShow() { doShow() {
const playerList = JSON.parse(this.trainingDetail.playerIdJson); let playerList = [];
if (this.$route.query.paperId) {
playerList = this.trainingDetail.playerIds;
} else {
playerList = JSON.parse(this.trainingDetail.playerIdJson);
}
const memberData = this.$store.state.training.memberData; const memberData = this.$store.state.training.memberData;
const newMemberData = {}; const newMemberData = {};
playerList.forEach(playerId => { playerList.forEach(playerId => {

View File

@ -4,7 +4,7 @@
<div ref="drapBox" class="reminder-box"> <div ref="drapBox" class="reminder-box">
<div class="tip-title"> <div class="tip-title">
<div style="display: flex;justify-content: center;align-items: center;"> <div style="display: flex;justify-content: center;align-items: center;">
<i v-if="!trainingDesign && !examSwitch && simulationCreator" class="icon el-icon-document" @click="trainingListShow" /> <i v-if="!trainingDesign && !examSwitch && simulationCreator && !isRace" class="icon el-icon-document" @click="trainingListShow" />
<i v-show="!isShrink && !trainingSwitch && trainingDetail && simulationCreator" class="icon el-icon-video-play" @click="handlerStart" /> <i v-show="!isShrink && !trainingSwitch && trainingDetail && simulationCreator" class="icon el-icon-video-play" @click="handlerStart" />
<i v-show="!isShrink && trainingSwitch && simulationCreator" class="icon el-icon-switch-button" @click="handlerEnd" /> <i v-show="!isShrink && trainingSwitch && simulationCreator" class="icon el-icon-switch-button" @click="handlerEnd" />
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" /> <i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
@ -33,7 +33,7 @@
</el-radio-group> </el-radio-group>
</span> </span>
</p> </p>
<p class="list-item"> <p v-if="!isRace" class="list-item">
<span class="list-label" style="vertical-align: top;"> {{ $t('display.training.trainingInstructions') }}</span> <span class="list-label" style="vertical-align: top;"> {{ $t('display.training.trainingInstructions') }}</span>
<span class="list-elem elem-span">{{ trainingDetail ?trainingDetail.description:'' }}</span> <span class="list-elem elem-span">{{ trainingDetail ?trainingDetail.description:'' }}</span>
</p> </p>
@ -128,7 +128,9 @@ export default {
}, },
watch: { watch: {
'$store.state.map.mapViewLoadedCount': function (val) { '$store.state.map.mapViewLoadedCount': function (val) {
this.loadRaceScene(this.$route.query.sceneId); if (this.isRace) {
this.loadRaceScene(this.$route.query.sceneId);
}
}, },
'$store.state.trainingNew.trainingDetail': function(val) { '$store.state.trainingNew.trainingDetail': function(val) {
this.initAdjacentTraining(); this.initAdjacentTraining();
@ -189,7 +191,7 @@ export default {
handlePrepareScene() { handlePrepareScene() {
prepareScene(this.group, {mode: this.demoMode}).then(() => { prepareScene(this.group, {mode: this.demoMode}).then(() => {
this.$refs.scenePlayRole.doShow(); this.$refs.scenePlayRole.doShow();
}).catch(() => { }).catch((e) => {
this.$message.error('预开始场景实训失败!'); this.$message.error('预开始场景实训失败!');
}); });
}, },
@ -241,6 +243,8 @@ export default {
try { try {
const detailResp = await getContextSenceDetail(sceneId); const detailResp = await getContextSenceDetail(sceneId);
this.training = detailResp.data.scene.storageSimulation; this.training = detailResp.data.scene.storageSimulation;
this.training.type = 'SCENE';
this.training.name = detailResp.data.name;
if (this.training.mapLocationJson) { if (this.training.mapLocationJson) {
const mapLocation = JSON.parse(this.training.mapLocationJson); const mapLocation = JSON.parse(this.training.mapLocationJson);
this.$jlmap.updateTransform(mapLocation.scale, {x:mapLocation.x, y:mapLocation.y}); this.$jlmap.updateTransform(mapLocation.scale, {x:mapLocation.x, y:mapLocation.y});