竞赛流程调整

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;
}
const opParam = operate.param === undefined ? {} : operate.param;
const stepParam = stepOperation.params === undefined ? {} : stepOperation.params;
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) {

View File

@ -42,9 +42,9 @@
</el-row>
</div>
<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 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>
</el-card>
</el-col>

View File

@ -65,7 +65,13 @@ export default {
this.dialogVisible = false;
},
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 newMemberData = {};
playerList.forEach(playerId => {

View File

@ -4,7 +4,7 @@
<div ref="drapBox" class="reminder-box">
<div class="tip-title">
<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 && simulationCreator" class="icon el-icon-switch-button" @click="handlerEnd" />
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
@ -33,7 +33,7 @@
</el-radio-group>
</span>
</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-elem elem-span">{{ trainingDetail ?trainingDetail.description:'' }}</span>
</p>
@ -128,7 +128,9 @@ export default {
},
watch: {
'$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) {
this.initAdjacentTraining();
@ -189,7 +191,7 @@ export default {
handlePrepareScene() {
prepareScene(this.group, {mode: this.demoMode}).then(() => {
this.$refs.scenePlayRole.doShow();
}).catch(() => {
}).catch((e) => {
this.$message.error('预开始场景实训失败!');
});
},
@ -241,6 +243,8 @@ export default {
try {
const detailResp = await getContextSenceDetail(sceneId);
this.training = detailResp.data.scene.storageSimulation;
this.training.type = 'SCENE';
this.training.name = detailResp.data.name;
if (this.training.mapLocationJson) {
const mapLocation = JSON.parse(this.training.mapLocationJson);
this.$jlmap.updateTransform(mapLocation.scale, {x:mapLocation.x, y:mapLocation.y});