Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
84ccf357f3
@ -91,7 +91,8 @@ export default {
|
||||
},
|
||||
subscribeMessage(res) {
|
||||
if (this.$refs.deomonTopic && !window.location.href.includes('trainroom')) {
|
||||
if (getSessionStorage('project') != 'refereeJsxt' && getSessionStorage('project') != 'jsxt' && !(getSessionStorage('project').includes('design'))) {
|
||||
// getSessionStorage('project') != 'refereeJsxt' && getSessionStorage('project') != 'jsxt' &&
|
||||
if (!(getSessionStorage('project').includes('design'))) {
|
||||
this.$refs.deomonTopic.doShow(res);
|
||||
}
|
||||
this.$store.dispatch('socket/setSimulationInvite');
|
||||
|
@ -1,118 +1,5 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
/** 裁判退出仿真*/
|
||||
export function refereeExitSimulation(group) {
|
||||
return request({
|
||||
url: `/api/v1/competition/room/${group}/refree`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
/** 参赛者创建演练房间 */
|
||||
export function participantCreatTrainingRoom(id, data) {
|
||||
return request({
|
||||
url: `/api/v1/competition/${id}/room`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询用户是否已经报名该竞赛 */
|
||||
export function getIsSignUp(raceId, params = {}) {
|
||||
return request({
|
||||
url: `/api/race/${raceId}/isSignUp`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交试卷 */
|
||||
export function postCompetitionTheory(data) {
|
||||
return request({
|
||||
url: `/api/v1/competitionTheory/submit`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询竞赛报名人员详情 */
|
||||
export function getRaceUserById(raceId) {
|
||||
return request({
|
||||
url: `/api/race/${raceId}/raceUser`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询加载的实操题 */
|
||||
export function getPracticalQuestion(competitionId) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/competition/${competitionId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询加载的理论题 */
|
||||
export function getTheoryQuestion(competitionId) {
|
||||
return request({
|
||||
url: `/api/v1/competitionTheory/competition/${competitionId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询理论题作答详情 */
|
||||
export function getCompetitionDetail(competitionId) {
|
||||
return request({
|
||||
url: `/api/v1/competitionTheory/detail/competition/${competitionId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 根据id查询竞赛信息 */
|
||||
export function getRaceById(id) {
|
||||
return request({
|
||||
url: `/api/race/${id}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 退出当前赛场 */
|
||||
export function quitCurrentRace(id, params) {
|
||||
return request({
|
||||
url: `/api/v1/competition/${id}/room`,
|
||||
method: 'delete',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
/** 查看加载的竞赛试题 */
|
||||
export function getTestPaperDatail(competitionId) {
|
||||
return request({
|
||||
url: `/api/v1/competition/${competitionId}/testPaper`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 提交实操结果 */
|
||||
export function submitPracticalCompetition(group, competitionId) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/${group}/${competitionId}/finish`,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
/** 开始实操竞赛 */
|
||||
export function startPracticalCompetition(group, competitionId) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/${group}/${competitionId}/start`,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
/** 查询实操考试结果 */
|
||||
export function getPracticalCompetitionResult(competitionId) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/${competitionId}/result`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 以下drts项目使用
|
||||
|
||||
/** 项目获取试题列表 */
|
||||
|
@ -68,7 +68,7 @@ export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,
|
||||
let signaldata = JSON.parse(netdata.signals);
|
||||
let standsdata = JSON.parse(netdata.stands);
|
||||
let psddata = data.psdList;
|
||||
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList,-13);
|
||||
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList,0);
|
||||
|
||||
assetloader.assetPromiseOver(sceneload)
|
||||
.then(function(data){
|
||||
|
@ -61,28 +61,33 @@ export default {
|
||||
handle: this.goEmpty,
|
||||
isHelp:true,
|
||||
style:'padding-right:0px;',
|
||||
hidden:getSessionStorage('project').endsWith('heb') || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt')
|
||||
hidden:getSessionStorage('project').endsWith('heb')
|
||||
// || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt')
|
||||
},
|
||||
{
|
||||
name: 'global.scan', // 扫码
|
||||
handle: this.qcodeEntry,
|
||||
hidden: process.env.NODE_ENV != 'development' || getSessionStorage('project').startsWith('design') || process.env.VUE_APP_PRO === 'local' || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt')
|
||||
hidden: process.env.NODE_ENV != 'development' || getSessionStorage('project').startsWith('design') || process.env.VUE_APP_PRO === 'local'
|
||||
// || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt')
|
||||
},
|
||||
{
|
||||
name: 'global.quickEntry', // 快速入口
|
||||
handle: this.quickEntry,
|
||||
hidden: getSessionStorage('project').startsWith('design') || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt')
|
||||
hidden: getSessionStorage('project').startsWith('design')
|
||||
// || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt')
|
||||
},
|
||||
{
|
||||
name: LangStorage.getLang('zh') === 'zh' ? 'English' : '中文',
|
||||
handle: this.switchLanguage,
|
||||
hidden: getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt'),
|
||||
hidden: false,
|
||||
// getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt'),
|
||||
tip: true
|
||||
},
|
||||
{
|
||||
name: 'global.help',
|
||||
handle: this.goToHelp,
|
||||
hidden: getSessionStorage('project').endsWith('heb') || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt')
|
||||
hidden: getSessionStorage('project').endsWith('heb')
|
||||
// || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt')
|
||||
}
|
||||
|
||||
],
|
||||
|
@ -33,10 +33,10 @@ function getRouteInfo(to) {
|
||||
if (to.query.projectDevice && to.query.type) {
|
||||
loginPath = `${loginPath}&projectDevice=${to.query.projectDevice}&type=${to.query.type}`;
|
||||
}
|
||||
if (current_session && current_session == 'jsxt' || current_session && current_session == 'refereeJsxt') {
|
||||
const raceId = getSessionStorage('raceId'); // 登陆时候保存 竞赛id
|
||||
loginPath = `${loginPath}?raceId=${raceId}`;
|
||||
}
|
||||
// if (current_session && current_session == 'jsxt' || current_session && current_session == 'refereeJsxt') {
|
||||
// const raceId = getSessionStorage('raceId'); // 登陆时候保存 竞赛id
|
||||
// loginPath = `${loginPath}?raceId=${raceId}`;
|
||||
// }
|
||||
|
||||
return loginPath;
|
||||
}
|
||||
@ -91,9 +91,11 @@ router.beforeEach((to, from, next) => {
|
||||
next();
|
||||
} else if (to.path.substr(0, 13) == whiteList[2]) {
|
||||
next();
|
||||
} else if (to.path == '/jsxtApply') {
|
||||
next();
|
||||
} else {
|
||||
}
|
||||
// else if (to.path == '/jsxtApply') {
|
||||
// next();
|
||||
// }
|
||||
else {
|
||||
// 否则全部重定向到登录页
|
||||
next(loginPath);
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ const QuestionsRuleManage = () => import('@/views/system/questionsRuleManage/ind
|
||||
const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImport');
|
||||
const PlanScheduleWicket = () => import('@/views/newMap/displayNew/demon/planSchedule');
|
||||
|
||||
import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
|
||||
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
|
||||
// import { getSessionStorage } from '@/utils/auth';
|
||||
|
||||
/**
|
||||
@ -282,18 +282,18 @@ export const constantRoutes = [
|
||||
{ path: '*', redirect: '/404', hidden: true }
|
||||
];
|
||||
// 项目登录路径
|
||||
GenerateRouteProjectList.forEach(item => {
|
||||
constantRoutes.push({
|
||||
path: `/${item}/login`,
|
||||
component: Login,
|
||||
hidden: true
|
||||
});
|
||||
constantRoutes.push({
|
||||
path: `/${item}`,
|
||||
redirect: `/${item}/login`,
|
||||
hidden: true
|
||||
});
|
||||
});
|
||||
// GenerateRouteProjectList.forEach(item => {
|
||||
// constantRoutes.push({
|
||||
// path: `/${item}/login`,
|
||||
// component: Login,
|
||||
// hidden: true
|
||||
// });
|
||||
// constantRoutes.push({
|
||||
// path: `/${item}`,
|
||||
// redirect: `/${item}/login`,
|
||||
// hidden: true
|
||||
// });
|
||||
// });
|
||||
// 公共路由不需要过滤 直接可以访问
|
||||
export const publicAsyncRoute = [
|
||||
{
|
||||
|
@ -205,24 +205,24 @@ export const loginInfo = {
|
||||
navigationMarginLeft: '60px',
|
||||
systemType: '012'
|
||||
},
|
||||
jsxt:{
|
||||
title: '城市轨道交通竞赛平台',
|
||||
loginPath: '/jsxt/login',
|
||||
loginParam: 'DEFAULT',
|
||||
titleDistance: '-150px',
|
||||
navigationLogoWidth: '40px',
|
||||
navigationMarginLeft: '60px',
|
||||
systemType: '015'
|
||||
},
|
||||
refereeJsxt:{
|
||||
title: '城市轨道交通裁判平台',
|
||||
loginPath: '/refereeJsxt/login',
|
||||
loginParam: 'DEFAULT',
|
||||
titleDistance: '-150px',
|
||||
navigationLogoWidth: '40px',
|
||||
navigationMarginLeft: '60px',
|
||||
systemType: '015'
|
||||
},
|
||||
// jsxt:{
|
||||
// title: '城市轨道交通竞赛平台',
|
||||
// loginPath: '/jsxt/login',
|
||||
// loginParam: 'DEFAULT',
|
||||
// titleDistance: '-150px',
|
||||
// navigationLogoWidth: '40px',
|
||||
// navigationMarginLeft: '60px',
|
||||
// systemType: '015'
|
||||
// },
|
||||
// refereeJsxt:{
|
||||
// title: '城市轨道交通裁判平台',
|
||||
// loginPath: '/refereeJsxt/login',
|
||||
// loginParam: 'DEFAULT',
|
||||
// titleDistance: '-150px',
|
||||
// navigationLogoWidth: '40px',
|
||||
// navigationMarginLeft: '60px',
|
||||
// systemType: '015'
|
||||
// },
|
||||
jyd: {
|
||||
title: '城市轨道交通实训平台',
|
||||
loginPath:'/login?project=jyd',
|
||||
@ -364,8 +364,8 @@ export const ProjectIcon = {
|
||||
designhyd: FaviconHeb,
|
||||
xadt: FaviconXadt,
|
||||
designxadt: FaviconXadt,
|
||||
jsxt: Favicon,
|
||||
refereeJsxt: Favicon,
|
||||
// jsxt: Favicon,
|
||||
// refereeJsxt: Favicon,
|
||||
jyd: FaviconJyd,
|
||||
designjyd: FaviconJyd,
|
||||
tky: FaviconTky,
|
||||
@ -405,8 +405,9 @@ export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb',
|
||||
export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目
|
||||
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd']; // 登录页右下角版本开发基于不展示
|
||||
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 登录页右下角主体不展示
|
||||
export const GenerateRouteProjectList = ['jsxt', 'refereeJsxt'];// 需要在公共路由中生成登录页面的项目
|
||||
export const ProjectLoginStyleList = ['jsxt', 'refereeJsxt', 'gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd']; // 登录页样式
|
||||
// export const GenerateRouteProjectList = ['jsxt', 'refereeJsxt'];// 需要在公共路由中生成登录页面的项目
|
||||
// 'jsxt', 'refereeJsxt',
|
||||
export const ProjectLoginStyleList = ['gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd']; // 登录页样式
|
||||
export const NoQrcodeList = ['heb', 'designheb'];
|
||||
export const NoSimulationQrCodeList = ['heb', 'bjd'];
|
||||
export const goOtherPlatformMenu = { // 导航栏快速切换平台
|
||||
|
@ -9,7 +9,7 @@
|
||||
<el-button size="mini" type="primary" @click="lessonCreate">{{ $t('lesson.newConstruction') }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<QueryListPage ref="queryListPage" :cardPadding="50" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
|
||||
<QueryListPage ref="queryListPage" :card-padding="50" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
|
||||
<publish-create ref="publishCreate" @refresh="refresh" />
|
||||
<publish-lesson ref="publishLesson" @refresh="refresh" />
|
||||
<lesson-detail ref="lessonDetail" />
|
||||
|
@ -336,15 +336,16 @@ export default {
|
||||
this.modelType = 'design';
|
||||
this.loginClient = 'Design';
|
||||
this.path = UrlConfig.design.prefix;
|
||||
} else if (this.project.startsWith('jsxt')) {
|
||||
this.path = '/jsxt/home';
|
||||
} else if (this.project.startsWith('refereeJsxt')) {
|
||||
this.cookiesName = 'UserDesignName';
|
||||
this.cookiesToken = 'UserDesignToken';
|
||||
this.modelType = 'design';
|
||||
this.loginClient = 'Design';
|
||||
this.path = '/refereeJsxt/home';
|
||||
}
|
||||
// else if (this.project.startsWith('jsxt')) {
|
||||
// this.path = '/jsxt/home';
|
||||
// } else if (this.project.startsWith('refereeJsxt')) {
|
||||
// this.cookiesName = 'UserDesignName';
|
||||
// this.cookiesToken = 'UserDesignToken';
|
||||
// this.modelType = 'design';
|
||||
// this.loginClient = 'Design';
|
||||
// this.path = '/refereeJsxt/home';
|
||||
// }
|
||||
|
||||
const nowLang = LangStorage.getLang('zh');
|
||||
if (nowLang === 'zh') {
|
||||
|
@ -17,13 +17,13 @@
|
||||
:user-role="userRole"
|
||||
:is-admin="isAdmin"
|
||||
:device-code="deviceCode"
|
||||
:countdown-time="countdownTime"
|
||||
|
||||
@passflow="passflow"
|
||||
@faultdevice="faultdevice"
|
||||
@getUserRole="getUserRole"
|
||||
@hidepanel="hidepanel"
|
||||
@devicemodel="devicemodel"
|
||||
@startCounting="startCounting"
|
||||
|
||||
@hidejl3dcctv="hidejl3dcctv"
|
||||
@runPlanLoadShow="runPlanLoadShow"
|
||||
@handlerMemberManage="handlerMemberManage"
|
||||
@ -47,7 +47,6 @@
|
||||
<join-run-plan-Load ref="runPlanLoad" :group="group" />
|
||||
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
|
||||
<menu-train-list v-if="prdType=='02'" @setCenter="setCenter" />
|
||||
<js-question v-if="project == 'jsxt'" :offset="offset" :question-list="questionList" />
|
||||
<members-manage ref="membersManage" :is-admin="isAdmin" @addSimulationMember="addSimulationMember" /> <!-- 成员管理 -->
|
||||
<add-member ref="addMember" />
|
||||
<Jl3d-Device
|
||||
@ -65,7 +64,6 @@
|
||||
import MapSystemDraft from '@/views/newMap/mapsystemNew/index';
|
||||
import MenuDemonJoint from './menuDemon';
|
||||
import MenuDemonSchema from './menuSchema';
|
||||
import JsQuestion from './jsQuestion';
|
||||
import JoinFaultChoose from '@/views/newMap/displayNew/demon/faultChoose';
|
||||
import JoinRunPlanLoad from '@/views/newMap/displayNew/demon/runPlanLoad';
|
||||
import menuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
|
||||
@ -75,7 +73,6 @@ import { mapGetters } from 'vuex';
|
||||
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||
import { loadNewMapDataByGroup } from '@/utils/loaddata';
|
||||
import { clearSimulation, getSimulationInfoNew, getSimulationUserInfo } from '@/api/simulation';
|
||||
import {getRaceUserById, getTestPaperDatail} from '@/api/competition';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
||||
import Jl3dDevice from '@/views/jlmap3d/device/jl3ddevice';
|
||||
@ -83,11 +80,9 @@ import Jl3dMaintainerSelect from '@/views/jlmap3d/maintainer/jl3dmaintainerselec
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { Message } from 'element-ui';
|
||||
import localStore from 'storejs';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import MembersManage from './memberManage/membersManage';
|
||||
import AddMember from './memberManage/addMember';
|
||||
import { computationTime } from '@/utils/date';
|
||||
|
||||
export default {
|
||||
name: 'JointTrainingDraft',
|
||||
@ -102,15 +97,14 @@ export default {
|
||||
Jl3dDrive,
|
||||
Jl3dMaintainerSelect,
|
||||
IbpPlate,
|
||||
JsQuestion,
|
||||
MembersManage,
|
||||
AddMember,
|
||||
Jl3dDevice
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainingObj: {},
|
||||
timeDemonNum: 0,
|
||||
// trainingObj: {},
|
||||
// timeDemonNum: 0,
|
||||
offset: 10,
|
||||
offsetBottom: 15,
|
||||
userRole: '',
|
||||
@ -129,11 +123,6 @@ export default {
|
||||
showSelectStation: false, // 宁波线集中站 显示
|
||||
mapViewLoadedOver: false,
|
||||
dataError: false,
|
||||
countdownTime: '00:00:00',
|
||||
practicalTime: 0,
|
||||
countdown: null,
|
||||
questionList: [],
|
||||
practicalExamTime: 0,
|
||||
isAdmin: false,
|
||||
deviceShow: false,
|
||||
centralizedStationMap: {}
|
||||
@ -240,9 +229,6 @@ export default {
|
||||
await this.$store.dispatch('training/end', null);
|
||||
await this.$store.dispatch('training/reset');
|
||||
await this.$store.dispatch('map/mapClear');
|
||||
if (this.countdown) {
|
||||
clearInterval(this.countdown);
|
||||
}
|
||||
Message.closeAll();
|
||||
},
|
||||
methods: {
|
||||
@ -355,32 +341,7 @@ export default {
|
||||
if (this.lineCode) {
|
||||
// 01 现地 02 行调 '' 观众
|
||||
let resp = {data: {}};
|
||||
if (this.project == 'jsxt' ) {
|
||||
resp = await getRaceUserById(this.$route.query.raceId);
|
||||
resp.data.userRole = resp.data.type;
|
||||
const paperResp = await getTestPaperDatail(this.$route.query.raceId);
|
||||
if (paperResp.data && paperResp.data.practicalQuestions) {
|
||||
this.questionList = [];
|
||||
this.practicalExamTime = paperResp.data.practicalExamTime;
|
||||
const storeKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'practical';
|
||||
const startTime = localStore.get(storeKey);
|
||||
if (startTime) {
|
||||
const dt = new Date().getTime() - startTime;
|
||||
this.practicalTime = paperResp.data.practicalExamTime * 60 - Math.floor(dt / 1000);
|
||||
} else {
|
||||
this.practicalTime = this.practicalExamTime * 60;
|
||||
}
|
||||
this.countdownTime = computationTime(this.practicalTime);
|
||||
paperResp.data.practicalQuestions.forEach(elem => {
|
||||
this.questionList.push({name: elem.question.name, description:elem.question.description});
|
||||
});
|
||||
}
|
||||
} else if (this.project == 'refereeJsxt') {
|
||||
resp['code'] = 200;
|
||||
resp.data['userRole'] = 'ADMIN';
|
||||
} else {
|
||||
resp = await this.getUserRole();
|
||||
}
|
||||
resp = await this.getUserRole();
|
||||
if (resp && resp.code == 200) {
|
||||
this.setSimulationPrdType();
|
||||
}
|
||||
@ -441,25 +402,6 @@ export default {
|
||||
this.hideIbp();
|
||||
}
|
||||
},
|
||||
/* 竞赛系统倒计时 */
|
||||
startCounting() {
|
||||
const storeKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'practical';
|
||||
const startTime = localStore.get(storeKey);
|
||||
if (!startTime) {
|
||||
const storeValue = new Date().getTime();
|
||||
localStore.set(storeKey, storeValue);
|
||||
}
|
||||
this.countdown = setInterval(() => {
|
||||
if (this.practicalTime <= 0) {
|
||||
if (this.countdown) {
|
||||
clearInterval(this.countdown);
|
||||
}
|
||||
this.$refs.demonMenu.submit();
|
||||
}
|
||||
this.practicalTime--;
|
||||
this.countdownTime = computationTime(this.practicalTime);
|
||||
}, 1000);
|
||||
},
|
||||
async getTrainDetail() {
|
||||
try {
|
||||
await loadNewMapDataByGroup(this.group);
|
||||
|
@ -1,94 +0,0 @@
|
||||
<template>
|
||||
<div class="menuTrainListOut" :style="{top: offset-5 +'px'}">
|
||||
<div v-if="drawer" class="menuTrainListContent">
|
||||
<div>
|
||||
<div v-for="(item, index) in questionList" :key="index">
|
||||
<div style="text-align: center;font-size: 16px;">{{ item.name }}</div>
|
||||
<div style="text-align: left;font-size: 14px;margin-top: 5px;">{{ '描述:'+item.description }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="menuTrainListBtn1In" style=";position: absolute; top: 98%;left:150px;z-index: 2;" @click="clickBtn">
|
||||
<i class="el-icon-more" style="font-size: 20px;transform-origin: 50% 50%;" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="menuTrainListBtn1" @click="clickBtn">
|
||||
<div class="menuTrainListBtn1In">
|
||||
<i class="el-icon-more" style="font-size: 20px;transform-origin: 50% 50%;" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'JsQuestion',
|
||||
props: {
|
||||
offset: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
questionList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
drawer: true
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
clickBtn() {
|
||||
this.drawer = !this.drawer;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.menuTrainListBtn1In{
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
background: #fff;
|
||||
text-align: center;
|
||||
border-radius: 0 0 6px 6px;
|
||||
cursor:pointer;
|
||||
/*border: 1px #adadad solid;*/
|
||||
}
|
||||
.menuTrainListBtn1{
|
||||
position: absolute;
|
||||
}
|
||||
.menuTrainListContent{
|
||||
background: #fff;
|
||||
text-align: center;
|
||||
border-radius:0 0 6px 6px;
|
||||
padding: 10px;
|
||||
position: absolute;
|
||||
width: 350px;
|
||||
left: -150px;
|
||||
z-index: 3;
|
||||
cursor:pointer;
|
||||
}
|
||||
.menuTrainListOut{
|
||||
position: absolute;
|
||||
right: 30%;
|
||||
height: 70%;
|
||||
}
|
||||
.menuTrainList{
|
||||
width: 400px;
|
||||
height:100%;
|
||||
border-radius: 10px 0px 0px 10px;
|
||||
// padding: 5px;
|
||||
background: #fff;
|
||||
}
|
||||
.topTrainListInfo,.bottomTrainListInfo{
|
||||
padding: 10px 10px;
|
||||
background: #cde2ef;
|
||||
font-size: 13px;
|
||||
border-radius: 5px 0px 0px 0px;
|
||||
}
|
||||
</style>
|
||||
|
@ -27,19 +27,14 @@
|
||||
</div>
|
||||
<div class="display-draft" :class="{'display-type-hb': lineCode == '07' && $store.state.training.prdType=='01', 'haerbin_btn_box': lineCode == '07'}" :style="{bottom: offsetBottom + 'px'}">
|
||||
<el-button-group class="button-group-box">
|
||||
<el-button v-if="project==='refereeJsxt'" type="success" size="small" @click="refeeEndCompetition">退出</el-button> <!-- 竞赛退出 -->
|
||||
<el-button v-if="project!=='jsxt' && project!=='refereeJsxt'" type="primary" :loading="backLoading" size="small" @click="back">退出</el-button>
|
||||
<!-- v-if="project!=='jsxt' && project!=='refereeJsxt'" -->
|
||||
<el-button type="primary" :loading="backLoading" size="small" @click="back">退出</el-button>
|
||||
<template v-if="!dataError"> <!-- 地图错误判断 -->
|
||||
<template v-if="isAdmin && project != 'refereeJsxt' && $route.query.type !== 'ILW'">
|
||||
<el-button type="danger" size="small" @click="end">{{ $t('joinTraining.initialize') }}</el-button>
|
||||
<!-- 按计划行车 -->
|
||||
<el-button type="success" :disabled="isDisable" size="small" @click="selectBeginTime">{{ $t('joinTraining.drivingByPlan') }}</el-button>
|
||||
</template>
|
||||
<template v-if="project == 'jsxt'">
|
||||
<div style="background: #FFF;display: inline-block;height: 40px;line-height: 40px;padding: 0 5px;border: 2px solid #F00;border-radius: 6px;margin-right: 8px;">{{ '剩余时间:' + countdownTime }}</div>
|
||||
<el-button :disabled="!jsStart" type="success" size="small" @click="startCompetition">开始</el-button>
|
||||
<el-button :disabled="jsStart" type="danger" size="small" @click="endCompetition">提交</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</el-button-group>
|
||||
</div>
|
||||
@ -58,10 +53,8 @@ import { ranAsPlan, exitRunPlan, clearSimulation } from '@/api/simulation';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { getSimulationQrcode } from '@/api/jointSimulation';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { refereeExitSimulation, quitCurrentRace, startPracticalCompetition, submitPracticalCompetition } from '@/api/competition';
|
||||
import { NoSimulationQrCodeList } from '@/scripts/ProjectConfig';
|
||||
import { getPublishLessonListByMapId } from '@/api/jmap/lesson';
|
||||
import localStore from 'storejs';
|
||||
|
||||
export default {
|
||||
name: 'MenuDemonJoint',
|
||||
@ -80,10 +73,6 @@ export default {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
countdownTime: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
deviceCode: {
|
||||
type: String,
|
||||
default() {
|
||||
@ -115,7 +104,6 @@ export default {
|
||||
return {
|
||||
backLoading: false,
|
||||
chatShow: true,
|
||||
jsStart: true,
|
||||
isGoback: false,
|
||||
noSimulationQrCodeList: NoSimulationQrCodeList,
|
||||
isShow3dmodel :false,
|
||||
@ -218,10 +206,6 @@ export default {
|
||||
});
|
||||
},
|
||||
async beforeDestroy() {
|
||||
if (this.project === 'jsxt') {
|
||||
quitCurrentRace(this.$route.query.raceId, {group:this.group}).then(res=>{
|
||||
});
|
||||
}
|
||||
// 返回 销毁仿真 重置状态
|
||||
this.isGoback = true;
|
||||
if (this.isAdmin) {
|
||||
@ -303,9 +287,6 @@ export default {
|
||||
time: model.initTime
|
||||
};
|
||||
ranAsPlan(data, this.group).then(res => {
|
||||
if (this.project == 'jsxt') {
|
||||
this.jsStart = false;
|
||||
}
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
|
||||
}).catch((error) => {
|
||||
if (error.code == '5001') {
|
||||
@ -375,30 +356,30 @@ export default {
|
||||
this.$emit('passflow');
|
||||
},
|
||||
jumpjl3dtrafficplan() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/trafficplan',
|
||||
query:{
|
||||
mapid:this.mapId,
|
||||
group:this.group,
|
||||
project: this.project,
|
||||
noPreLogout: true,
|
||||
lineCode:this.lineCode
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/trafficplan',
|
||||
query:{
|
||||
mapid:this.mapId,
|
||||
group:this.group,
|
||||
project: this.project,
|
||||
noPreLogout: true,
|
||||
lineCode:this.lineCode
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
},
|
||||
jumpjl3dtraffictrain() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/traffictrain',
|
||||
query:{
|
||||
mapid:this.mapId,
|
||||
group:this.group,
|
||||
project: this.project,
|
||||
noPreLogout: true,
|
||||
lineCode:this.lineCode
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/traffictrain',
|
||||
query:{
|
||||
mapid:this.mapId,
|
||||
group:this.group,
|
||||
project: this.project,
|
||||
noPreLogout: true,
|
||||
lineCode:this.lineCode
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
},
|
||||
jumpjl3dfaultdevice() {
|
||||
this.$emit('faultdevice');
|
||||
@ -406,41 +387,6 @@ export default {
|
||||
jumpjlmap3dmodel() {
|
||||
this.$emit('devicemodel');
|
||||
},
|
||||
startCompetition() {
|
||||
startPracticalCompetition(this.group, this.$route.query.raceId).then(resp => {
|
||||
this.$emit('startCounting');
|
||||
this.jsStart = false;
|
||||
}).catch(()=> {
|
||||
this.$message.error('开始竞赛失败');
|
||||
});
|
||||
},
|
||||
endCompetition() {
|
||||
this.$confirm('此操作将结束并提交本次竞赛,是否继续', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.submit();
|
||||
});
|
||||
},
|
||||
// 竞赛退出
|
||||
refeeEndCompetition() {
|
||||
refereeExitSimulation(this.group).then(resp => {
|
||||
this.$router.replace({ path: `/refereeJsxt/home`, query: { raceId: this.$route.query.raceId } });
|
||||
}).catch(()=> {
|
||||
this.$message.success('退出系统失败');
|
||||
});
|
||||
},
|
||||
// 竞赛提交
|
||||
submit() {
|
||||
submitPracticalCompetition(this.group, this.$route.query.raceId).then(resp => {
|
||||
const storeKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'practical';
|
||||
localStore.remove(storeKey);
|
||||
this.$router.replace({ path: `/jsxt/result`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId, type: 'operate', raceId:this.$route.query.raceId } });
|
||||
}).catch(()=> {
|
||||
this.$message.error('提交试卷失败!');
|
||||
});
|
||||
},
|
||||
otherVrView() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/othervr',
|
||||
@ -545,86 +491,6 @@ export default {
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
.tabs-roles {
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid #e4e7ed;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
|
||||
.roles {
|
||||
padding: 0 20px;
|
||||
height: 41px;
|
||||
list-style: none;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #303133;
|
||||
cursor: pointer;
|
||||
border-left: 1px solid #e4e7ed;
|
||||
border-right: 1px solid #e4e7ed;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.roles-first {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.roles-active {
|
||||
border-bottom-color: #fff;
|
||||
color: #409EFF;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.tabs-content {
|
||||
height: 300px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.display-score {
|
||||
background-color: black;
|
||||
display: -moz-inline-box;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
height: 32px;
|
||||
line-height: 24px;
|
||||
border-radius: 4px;
|
||||
padding-left: 2px;
|
||||
margin-left: 10px;
|
||||
font-family: "Microsoft" !important;
|
||||
font-size: 18px !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.reminder-drag {
|
||||
position: absolute;
|
||||
float: left;
|
||||
left: 10px;
|
||||
bottom: 10px;
|
||||
width: 500px;
|
||||
height: 340px;
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
z-index: 2;
|
||||
font-size: 18px;
|
||||
|
||||
/deep/ {
|
||||
.el-tabs__header {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.title-bar {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 300px;
|
||||
}
|
||||
}
|
||||
|
||||
.display-draft {
|
||||
position: absolute;
|
||||
|
Loading…
Reference in New Issue
Block a user