From 3b0d842b97877d79495fec864d5d295a9f34f80c Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Mon, 25 May 2020 13:40:25 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E4=BB=A3=E7=A0=81?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/competition.js | 8 ++++++++
src/views/jsxt/competition/examDetail.vue | 6 ++++--
src/views/newMap/jointTrainingNew/index.vue | 15 ++++++++++++++-
3 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/src/api/competition.js b/src/api/competition.js
index 1e81796d6..2fc9d0a6c 100644
--- a/src/api/competition.js
+++ b/src/api/competition.js
@@ -106,3 +106,11 @@ export function getCompetitionPractical(competitionId) {
});
}
+/** 查询竞赛报名人员详情 */
+export function getRaceUserById(raceId, userId) {
+ return request({
+ url: `/api/race/${raceId}/raceUser/${userId}`,
+ method: 'get'
+ });
+}
+
diff --git a/src/views/jsxt/competition/examDetail.vue b/src/views/jsxt/competition/examDetail.vue
index defe56288..2891470a6 100644
--- a/src/views/jsxt/competition/examDetail.vue
+++ b/src/views/jsxt/competition/examDetail.vue
@@ -158,8 +158,10 @@ export default {
// this.disabled = true;
getCompetitionPractical(this.$route.query.raceId).then(()=>{
participantCreatTrainingRoom(this.$route.query.raceId, {mapId: 41, prdType: '02'}).then(resp => {
- const query = { lineCode: '11', mapId: '41', group: resp.data, prdType: '03', raceId: this.$route.query.raceId};
- this.$router.replace({ path: `/displayNew/demon`, query: query});
+ // const query = { lineCode: '11', mapId: '41', group: resp.data, prdType: '03', raceId: this.$route.query.raceId};
+ // this.$router.replace({ path: `/displayNew/demon`, query: query});
+ const query = { lineCode: '11', mapId: '41', group: resp.data, raceId: this.$route.query.raceId};
+ this.$router.replace({ path: `/jointTrainingNew`, query: query});
});
});
}
diff --git a/src/views/newMap/jointTrainingNew/index.vue b/src/views/newMap/jointTrainingNew/index.vue
index f0d3674c4..074f7db00 100644
--- a/src/views/newMap/jointTrainingNew/index.vue
+++ b/src/views/newMap/jointTrainingNew/index.vue
@@ -48,6 +48,8 @@ import { checkLoginLine } from '@/api/login';
import { loadNewMapDataByGroup } from '@/utils/loaddata';
import { getUserRolesNew, deljointTrainRoomNew} from '@/api/jointTraining';
import { clearSimulation, getSimulationInfoNew } from '@/api/simulation';
+import {getRaceUserById} from '@/api/competition';
+import { getSessionStorage } from '@/utils/auth';
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
import Jl3dMaintainer from '@/views/jlmap3d/maintainer/jl3dmaintainer';
import { EventBus } from '@/scripts/event-bus';
@@ -127,6 +129,9 @@ export default {
},
prdType() {
return this.$store.state.training.prdType;
+ },
+ project() {
+ return getSessionStorage('project');
}
},
watch: {
@@ -358,7 +363,15 @@ export default {
if (this.lineCode) {
// 01 现地 02 行调 '' 观众
- const resp = await this.getUserRole();
+ let resp;
+ if (this.project == 'jsxt' ) {
+ resp = await getRaceUserById(this.$route.query.raceId, this.userId);
+ resp.data.userRole = resp.data.role;
+ } else if (this.project == 'refereeJsxt') {
+ resp.data.userRole = 'ADMIN';
+ } else {
+ resp = await this.getUserRole();
+ }
console.log('/////////////' + resp.data.userRole);
if (resp && resp.code == 200) {
// Admin 管理员 Instructor 教员 Dispatcher 行调 STATION_SUPERVISOR 车站 Audience 观众 Driver 司机 MAINTAINER 通号 IBP:IBP盘
From 9d7e4f928f5858a3bfcefe3bf6ec10a85ee58094 Mon Sep 17 00:00:00 2001
From: zyy <1787816799@qq.com>
Date: Mon, 25 May 2020 13:48:43 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=AB=9E=E8=B5=9B?=
=?UTF-8?q?=E7=B3=BB=E7=BB=9F=E8=BF=9B=E5=85=A5=E4=BB=BF=E7=9C=9F=E7=95=8C?=
=?UTF-8?q?=E9=9D=A2=E6=B5=81=E7=A8=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/newMap/displayNew/menuDemon.vue | 70 ++++---------------
.../newMap/jointTrainingNew/menuDemon.vue | 52 +++++++++++++-
2 files changed, 63 insertions(+), 59 deletions(-)
diff --git a/src/views/newMap/displayNew/menuDemon.vue b/src/views/newMap/displayNew/menuDemon.vue
index efea09794..cba5b9e87 100644
--- a/src/views/newMap/displayNew/menuDemon.vue
+++ b/src/views/newMap/displayNew/menuDemon.vue
@@ -8,27 +8,20 @@
-
- 开始考试
- 提交
- 返回
+ {{ $t('display.demon.dispatchingPlan') }}
+ {{ jl3dpassflow }}
+
+ {{ jl3dname }}
+ {{ jl3dmodel }}
+
+
+ {{ $t('display.demon.exitScript') }}
- {{ $t('display.demon.dispatchingPlan') }}
- {{ jl3dpassflow }}
-
- {{ jl3dname }}
- {{ jl3dmodel }}
-
-
- {{ $t('display.demon.exitScript') }}
-
-
- {{ $t('display.demon.drivingByPlan') }}
- {{ $t('display.demon.exitPlan') }}
-
+ {{ $t('display.demon.drivingByPlan') }}
+ {{ $t('display.demon.exitPlan') }}
- {{ $t('display.demon.back') }}
+ {{ $t('display.demon.back') }}
@@ -47,8 +40,6 @@ import { ranAsPlan, exitRunPlan, clearSimulation, getSimulationInfoNew } from '@
import { PermissionType } from '@/scripts/ConstDic';
import { getCountTime } from '@/utils/index';
import { quitScriptNew, scriptRePreview } from '@/api/simulation';
-import { getSessionStorage } from '@/utils/auth';
-import { participantCompleteCompetition, refereeExitSimulation } from '@/api/competition';
export default {
name: 'MenuDemon',
@@ -107,8 +98,7 @@ export default {
jl3dname: this.$t('display.demon.threeDimensionalView'),
jl3dstation: this.$t('display.demon.threeDimensionalStation'),
jl3dmodel: this.$t('display.demon.deviceView'),
- isShow3dmodel :false,
- jsStart: true
+ isShow3dmodel :false
};
},
computed: {
@@ -123,9 +113,6 @@ export default {
},
isHebLine() {
return this.$route.query.lineCode === '07';
- },
- project() {
- return getSessionStorage('project');
}
},
watch: {
@@ -308,39 +295,6 @@ export default {
this.jl3dname = this.$t('display.demon.threeDimensionalView');
this.isShow3dmodel = true;
}
- },
- startCompetition() {
- const date = new Date(this.$store.state.training.initTime || null);
- const model = {
- initTime: this.formatTime(date)
- };
- this.start(model);
- },
- refeeEndCompetition() { // 裁判返回
- refereeExitSimulation(this.group).then(resp => {
- this.$router.go(-1);
- }).catch(()=> {
- this.$message.success('退出系统失败');
- });
- },
- endCompetition() { // 参赛人员提交实操
- this.$confirm('此操作将结束并提交本次竞赛,是否继续', this.$t('global.tips'), {
- confirmButtonText: this.$t('global.confirm'),
- cancelButtonText: this.$t('global.cancel'),
- type: 'warning'
- }).then(() => {
- participantCompleteCompetition(1, this.group).then(resp => {
- this.submit();
- }).catch(()=> {
- this.$message.success('提交试卷失败!');
- });
- });
- },
- submit() {
- // this.$store.dispatch('exam/over').then(() => {
- // this.$store.dispatch('trainingList/clearTrainingList');
- this.$router.replace({ path: `/jsxt/result`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId, type: 'operate' } });
- // });
}
}
};
diff --git a/src/views/newMap/jointTrainingNew/menuDemon.vue b/src/views/newMap/jointTrainingNew/menuDemon.vue
index 1c2dab58e..fd078936f 100644
--- a/src/views/newMap/jointTrainingNew/menuDemon.vue
+++ b/src/views/newMap/jointTrainingNew/menuDemon.vue
@@ -11,6 +11,12 @@
{{ $t('global.back') }}
+
+ 开始
+ 提交
+
+ 返回
+ {{ $t('global.back') }}
@@ -28,6 +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 { prefixIntrger } from '@/utils/date';
export default {
@@ -70,7 +77,8 @@ export default {
offset: 10,
userId: '',
stationList: [],
- stationLists: []
+ stationLists: [],
+ jsStart: true
};
},
computed: {
@@ -88,6 +96,9 @@ export default {
},
isProject() {
return getSessionStorage('project').endsWith('gzb') && this.userRole === 'CI';
+ },
+ project() {
+ return getSessionStorage('project');
}
},
watch: {
@@ -116,6 +127,11 @@ export default {
'$store.state.map.runPlanStatus': function (val) {
this.isDisable = val;
},
+ '$store.state.socket.competitionStart':function(val) {
+ if (val) {
+ this.startCompetition();
+ }
+ },
'$store.state.socket.simulationOver':function(val) {
if (val && this.project === 'refereeJsxt') {
this.$router.go(-1);
@@ -289,6 +305,40 @@ export default {
const mm = prefixIntrger(initTime.getMinutes(), 2);
const ss = prefixIntrger(initTime.getSeconds(), 2);
return `${hh}:${mm}:${ss}`;
+ },
+ startCompetition() {
+ const date = new Date(this.$store.state.training.initTime || null);
+ const model = {
+ initTime: this.formatTime(date)
+ };
+ this.start(model);
+ },
+ endCompetition() {
+ this.$confirm('此操作将结束并提交本次竞赛,是否继续', this.$t('global.tips'), {
+ confirmButtonText: this.$t('global.confirm'),
+ cancelButtonText: this.$t('global.cancel'),
+ type: 'warning'
+ }).then(() => {
+ participantCompleteCompetition(1, this.group).then(resp => {
+ // this.$router.go(-1);
+ this.submit();
+ }).catch(()=> {
+ this.$message.success('提交试卷失败!');
+ });
+ });
+ },
+ refeeEndCompetition() {
+ refereeExitSimulation(this.group).then(resp => {
+ this.$router.go(-1);
+ }).catch(()=> {
+ this.$message.success('退出系统失败');
+ });
+ },
+ submit() {
+ // this.$store.dispatch('exam/over').then(() => {
+ // this.$store.dispatch('trainingList/clearTrainingList');
+ this.$router.replace({ path: `/jsxt/result`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId, type: 'operate' } });
+ // });
}
}
};
From 0f863cffe153e4ec81004aae5da9304b69e7ae57 Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Mon, 25 May 2020 13:49:44 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E7=B3=BB=E7=BB=9F?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/jsxt/refereeList/index.vue | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/views/jsxt/refereeList/index.vue b/src/views/jsxt/refereeList/index.vue
index 2c84b0559..b64700a4b 100644
--- a/src/views/jsxt/refereeList/index.vue
+++ b/src/views/jsxt/refereeList/index.vue
@@ -7,7 +7,6 @@