Merge remote-tracking branch 'origin/test'

This commit is contained in:
fan 2023-05-26 15:56:44 +08:00
commit 4424137da9

View File

@ -264,9 +264,9 @@ export default {
this.$message.error('请先结束当前实训后再加载新的实训!'); this.$message.error('请先结束当前实训后再加载新的实训!');
return; return;
} }
const qObj = {...this.$route.query}; // const qObj = {...this.$route.query};
delete qObj.record; // delete qObj.record;
this.$router.replace({ query:{...qObj}}); // this.$router.replace({ query:{...qObj}});
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); //
try { try {
const detailResp = await getTrainingAll(data.id); const detailResp = await getTrainingAll(data.id);
@ -275,14 +275,6 @@ export default {
const mapLocation = JSON.parse(detailResp.data.mapLocationJson); const mapLocation = JSON.parse(detailResp.data.mapLocationJson);
this.$jlmap && this.$jlmap.updateTransform(mapLocation.scale, {x:mapLocation.x, y:mapLocation.y}); this.$jlmap && this.$jlmap.updateTransform(mapLocation.scale, {x:mapLocation.x, y:mapLocation.y});
} }
if (detailResp.data.playerIdJson) {
const playerId = JSON.parse(detailResp.data.playerIdJson)[0];
if (playerId) {
const member = this.$store.state.training.memberData[playerId];
this.$store.dispatch('training/setPrdType', this.prdTypeMap[member.type]);
this.$store.dispatch('training/setRoles', member.type);
}
}
this.$emit('closeAllDialog'); this.$emit('closeAllDialog');
this.$store.dispatch('trainingNew/setTrainingDetail', detailResp.data); this.$store.dispatch('trainingNew/setTrainingDetail', detailResp.data);
await loadDraftTraining(this.group, data.id, {mode: this.teachMode}); await loadDraftTraining(this.group, data.id, {mode: this.teachMode});