Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
601aed6f5b
@ -146,3 +146,12 @@ export function getRaceById(id) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 退出当前赛场 */
|
||||
export function quitCurrentRace(id, params) {
|
||||
return request({
|
||||
url: `/api/v1/competition/${id}/room`,
|
||||
method: 'delete',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
@ -318,8 +318,7 @@ export default class Station extends Group {
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
this.recover();
|
||||
// model.controlMode && this['handle' + model.controlMode]();
|
||||
this.handleLocal();
|
||||
model.controlMode && this['handle' + model.controlMode]();
|
||||
}
|
||||
|
||||
getShapeTipPoint(opts) {
|
||||
|
@ -147,7 +147,7 @@ export function parser(data, skinCode, showConfig) {
|
||||
zrUtil.each(data.arrowList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.Arrow, elem, propConvert, showConfig);
|
||||
}, this);
|
||||
zrUtil.each(data.powerList || [], elem => {
|
||||
zrUtil.each(data.powerLineList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.Power, elem, propConvert, showConfig);
|
||||
}, this);
|
||||
zrUtil.each(data.indicatorLightList || [], elem => {
|
||||
@ -329,7 +329,7 @@ export function updateMapData(state, model) {
|
||||
case deviceType.SplitStation: updateForList(model, state, 'splitStationList'); break;
|
||||
case deviceType.SwitchFault: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.Arrow: updateForList(model, state, 'arrowList'); break;
|
||||
case deviceType.Power: updateForList(model, state, 'powerList'); break;
|
||||
case deviceType.Power: updateForList(model, state, 'powerLineList'); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -342,9 +342,9 @@ const map = {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
powerList: (state) => {
|
||||
powerLineList: (state) => {
|
||||
if (state.map) {
|
||||
return state.map.powerList || [];
|
||||
return state.map.powerLineList || [];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
// import { commitExam, getExamInfo, getUserExam, saveExamAnswer } from '@/api/exam.js';
|
||||
// import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
import Question from './question';
|
||||
import { postCompetitionTheory, getTheoryQuestion } from '@/api/competition';
|
||||
import { postCompetitionTheory, getTheoryQuestion, quitCurrentRace } from '@/api/competition';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -92,6 +92,8 @@ export default {
|
||||
this.loadInitData();
|
||||
},
|
||||
beforeDestroy() {
|
||||
quitCurrentRace(this.$route.query.raceId, {}).then(res=>{
|
||||
});
|
||||
if (this.countdown) {
|
||||
clearInterval(this.countdown);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ import { putJointTrainingSimulationUserNew} from '@/api/jointTraining';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import RealDevice from './menuDraft/realDevice';
|
||||
import { participantCompleteCompetition, refereeExitSimulation } from '@/api/competition';
|
||||
import { participantCompleteCompetition, refereeExitSimulation, quitCurrentRace } from '@/api/competition';
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
|
||||
export default {
|
||||
@ -146,6 +146,10 @@ export default {
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$store.dispatch('training/setGroup', '');
|
||||
if (this.project === 'jsxt') {
|
||||
quitCurrentRace(this.$route.query.raceId, {group:this.group}).then(res=>{
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async initLoadPage() {
|
||||
|
@ -110,7 +110,7 @@ export default {
|
||||
editModel: {
|
||||
code: '',
|
||||
width: 1,
|
||||
leftTerminal: true,
|
||||
leftTerminal: true, // 左端点显示
|
||||
rightTerminal: true,
|
||||
showConditions: '01', // 显示条件
|
||||
points: []
|
||||
@ -143,7 +143,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'powerList'
|
||||
'powerLineList'
|
||||
]),
|
||||
form() {
|
||||
const form = {
|
||||
@ -156,7 +156,7 @@ export default {
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
item: [
|
||||
{ prop: 'code', label: '供电线路', type: 'select', optionLabel: 'code', optionValue: 'code', options: this.powerList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'code', label: '供电线路', type: 'select', optionLabel: 'code', optionValue: 'code', options: this.powerLineList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'width', label: '供电线路宽度', type: 'number', min: 1, placeholder: 'px' },
|
||||
{ prop: 'showConditions', label: this.$t('map.showConditions'), type: 'radio', optionLabel: 'label', optionValue:'value', radioList: this.showConditionsList},
|
||||
{ prop: 'leftTerminal', label: '左侧端点:', type: 'select', optionLabel: 'label', optionValue:'value', options: this.terminalList},
|
||||
@ -213,7 +213,7 @@ export default {
|
||||
const pointArr = JSON.stringify(this.addModel.points);
|
||||
const model = {
|
||||
_type: 'Power',
|
||||
code: getUID('Power', this.powerList),
|
||||
code: getUID('Power', this.powerLineList),
|
||||
width: this.addModel.width,
|
||||
leftTerminal: true,
|
||||
rightTerminal: true,
|
||||
|
Loading…
Reference in New Issue
Block a user