Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
2fd42c22f9
@ -603,7 +603,7 @@ class SkinCode extends defaultStyle {
|
|||||||
defaultDirectionCode: 'D', // 默认车次号1
|
defaultDirectionCode: 'D', // 默认车次号1
|
||||||
defaultTripNumber: 'CCC', // 默认车次号2
|
defaultTripNumber: 'CCC', // 默认车次号2
|
||||||
trainTargetOffset: { x: 42, y: 1}, // 列车车次号偏移
|
trainTargetOffset: { x: 42, y: 1}, // 列车车次号偏移
|
||||||
smallColor: '#70ECEE', // 小交路颜色
|
smallColor: '#00FFFF', // 小交路颜色
|
||||||
bigColor: '#FFFFFF', // 大交路颜色
|
bigColor: '#FFFFFF', // 大交路颜色
|
||||||
inboundColor: '#00FF00', // 回库颜色
|
inboundColor: '#00FF00', // 回库颜色
|
||||||
planTypeColor: '#FFFFFF' // 计划车颜色
|
planTypeColor: '#FFFFFF' // 计划车颜色
|
||||||
|
@ -32,7 +32,7 @@ export const loginInfo = { // 页面title & 退出登录跳转路径
|
|||||||
loginPath: '/designgzb/login'
|
loginPath: '/designgzb/login'
|
||||||
},
|
},
|
||||||
hyd: {
|
hyd: {
|
||||||
title: '城市轨道交通实训平台',
|
title: '城市轨道交通综合行车模拟仿真系统',
|
||||||
loginPath: '/login'
|
loginPath: '/login'
|
||||||
},
|
},
|
||||||
designhyd: {
|
designhyd: {
|
||||||
|
@ -2,11 +2,11 @@ export function getBaseUrl() {
|
|||||||
let BASE_API;
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// BASE_API = 'https://joylink.club/jlcloud';
|
||||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||||
BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||||
|
@ -15,14 +15,16 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="lcd_content_box">
|
<div class="lcd_content_box">
|
||||||
<div style="display: inline-block;">
|
<div>
|
||||||
<div class="lcd_content_box_left_title">车站</div>
|
<div style="display: inline-block;">
|
||||||
<div class="lcd_content_box_left_title">选择</div>
|
<div class="lcd_content_box_left_title">车站</div>
|
||||||
</div>
|
<div class="lcd_content_box_left_title">选择</div>
|
||||||
<div v-for="(station, index) in stationList" :key="index" style="display: inline-block;text-align: center;">
|
</div>
|
||||||
<div class="each_station_info">{{ station }}</div>
|
<div v-for="(station, index) in stationList" :key="index" style="display: inline-block;text-align: center;">
|
||||||
<div class="button_default_content">
|
<div class="each_station_info">{{ station }}</div>
|
||||||
<div class="button_default" :style="{background:selectedAreaList.includes(station.stationName + '-' + index)?'#2EFF74':'#CDCDCD'}" />
|
<div class="button_default_content">
|
||||||
|
<div class="button_default" :style="{background:selectedAreaList.includes(station.stationName + '-' + index)?'#2EFF74':'#CDCDCD'}" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-footer class="quiz__container-footer layer-center" @click="returnTop">
|
<el-footer class="quiz__container-footer layer-center" @click="returnTop">
|
||||||
<div style="display: inline-block;position: relative;bottom: 20px;height: 40px;line-height: 40px;float: left;color:#F00;font-size: 12px;">温馨提示:考试过程中请不要刷新或关闭本页面!</div>
|
<div style="display: inline-block;position: relative;bottom: 20px;height: 40px;line-height: 40px;float: left;color:#F00;font-size: 12px;">温馨提示:考试过程中请退出或关闭本页面不会终止计时!</div>
|
||||||
<div style="display: inline-block;position: relative;bottom: 20px;height: 40px;line-height: 40px;margin-right: 10px;font-weight:bold;">{{ '剩余时间:'+countdownTime }}</div>
|
<div style="display: inline-block;position: relative;bottom: 20px;height: 40px;line-height: 40px;margin-right: 10px;font-weight:bold;">{{ '剩余时间:'+countdownTime }}</div>
|
||||||
<el-button-group class="buttons">
|
<el-button-group class="buttons">
|
||||||
<el-button v-loading="loading" type="primary" @click="commit">提 交</el-button>
|
<el-button v-loading="loading" type="primary" @click="commit">提 交</el-button>
|
||||||
@ -28,6 +28,7 @@
|
|||||||
// import { commitExam, getExamInfo, getUserExam, saveExamAnswer } from '@/api/exam.js';
|
// import { commitExam, getExamInfo, getUserExam, saveExamAnswer } from '@/api/exam.js';
|
||||||
// import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
// import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||||
import Question from './question';
|
import Question from './question';
|
||||||
|
import localStore from 'storejs';
|
||||||
import { postCompetitionTheory, getTheoryQuestion, quitCurrentRace } from '@/api/competition';
|
import { postCompetitionTheory, getTheoryQuestion, quitCurrentRace } from '@/api/competition';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -51,7 +52,7 @@ export default {
|
|||||||
passScore: 10
|
passScore: 10
|
||||||
},
|
},
|
||||||
examQuestions: [],
|
examQuestions: [],
|
||||||
theoryAnswers: [],
|
theoryAnswersMap: {},
|
||||||
countdownTime: '00:00:00',
|
countdownTime: '00:00:00',
|
||||||
theoryExamTime: 0,
|
theoryExamTime: 0,
|
||||||
countdown: null
|
countdown: null
|
||||||
@ -100,15 +101,32 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
this.theoryAnswers = [];
|
// this.theoryAnswers = [];
|
||||||
|
this.theoryAnswersMap = {};
|
||||||
getTheoryQuestion(this.$route.query.raceId).then((resp)=>{
|
getTheoryQuestion(this.$route.query.raceId).then((resp)=>{
|
||||||
|
const storeAnswersKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'theoryAnswers';
|
||||||
|
const storeAnswers = localStore.get(storeAnswersKey);
|
||||||
|
if (storeAnswers) {
|
||||||
|
this.theoryAnswersMap = storeAnswers;
|
||||||
|
}
|
||||||
if (resp.data) {
|
if (resp.data) {
|
||||||
this.examQuestions = resp.data.questions.map((el, i) => {
|
this.examQuestions = resp.data.questions.map((el, i) => {
|
||||||
el.index = i;
|
el.index = i;
|
||||||
|
el.answer = this.theoryAnswersMap[el.id];
|
||||||
return el;
|
return el;
|
||||||
});
|
});
|
||||||
this.theoryExamTime = resp.data.theoryExamTime * 60;
|
this.theoryExamTime = resp.data.theoryExamTime * 60;
|
||||||
this.countdownTime = this.computationTime(this.theoryExamTime);
|
this.countdownTime = this.computationTime(this.theoryExamTime);
|
||||||
|
const storeKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'theory';
|
||||||
|
const startTime = localStore.get(storeKey);
|
||||||
|
|
||||||
|
if (startTime) {
|
||||||
|
const dt = new Date().getTime() - startTime;
|
||||||
|
this.theoryExamTime = resp.data.theoryExamTime * 60 - Math.floor(dt / 1000);
|
||||||
|
} else {
|
||||||
|
const storeValue = new Date().getTime();
|
||||||
|
localStore.set(storeKey, storeValue);
|
||||||
|
}
|
||||||
this.countdown = setInterval(() => {
|
this.countdown = setInterval(() => {
|
||||||
if (this.theoryExamTime <= 0) {
|
if (this.theoryExamTime <= 0) {
|
||||||
if (this.countdown) {
|
if (this.countdown) {
|
||||||
@ -157,20 +175,28 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
doEnd() {
|
doEnd() {
|
||||||
|
const theoryAnswers = [];
|
||||||
|
for (const key in this.theoryAnswersMap) {
|
||||||
|
theoryAnswers.push({questionId: key, answerOptionId: this.theoryAnswersMap[key]});
|
||||||
|
}
|
||||||
const params = {
|
const params = {
|
||||||
competitionId: this.$route.query.raceId,
|
competitionId: this.$route.query.raceId,
|
||||||
theoryAnswers: this.theoryAnswers
|
theoryAnswers: theoryAnswers
|
||||||
};
|
};
|
||||||
postCompetitionTheory(params).then(()=>{
|
postCompetitionTheory(params).then(()=>{
|
||||||
this.$router.push({ path: `/jsxt/result`, query: { type: 'theory', raceId:this.$route.query.raceId } });
|
this.$router.push({ path: `/jsxt/result`, query: { type: 'theory', raceId:this.$route.query.raceId } });
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onSave(data) {
|
onSave(data) {
|
||||||
// console.log(data, '问答题');
|
// this.theoryAnswers.push({
|
||||||
this.theoryAnswers.push({
|
// answerOptionId: data.answer,
|
||||||
answerOptionId: data.answer,
|
// questionId: data.userExamQuestionId
|
||||||
questionId: data.userExamQuestionId
|
// });
|
||||||
});
|
this.theoryAnswersMap[data.userExamQuestionId] = data.answer;
|
||||||
|
// console.log(data, '问答题', this.theoryAnswers, this.theoryAnswersMap);
|
||||||
|
const storeKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'theoryAnswers';
|
||||||
|
localStore.set(storeKey, this.theoryAnswersMap);
|
||||||
|
|
||||||
},
|
},
|
||||||
computationTime(time) {
|
computationTime(time) {
|
||||||
let hours = Math.floor(time / 3600);
|
let hours = Math.floor(time / 3600);
|
||||||
|
@ -69,7 +69,7 @@ import { setSessionStorage, removeSessionStorage } from '@/utils/auth';
|
|||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import md5 from 'js-md5';
|
import md5 from 'js-md5';
|
||||||
import { UrlConfig } from '@/scripts/ConstDic';
|
import { UrlConfig } from '@/scripts/ConstDic';
|
||||||
import { ProjectIcon } from '@/scripts/ProjectConfig';
|
import { loginInfo, ProjectIcon } from '@/scripts/ProjectConfig';
|
||||||
import { removeToken } from '@/utils/auth';
|
import { removeToken } from '@/utils/auth';
|
||||||
import LangStorage from '@/utils/lang';
|
import LangStorage from '@/utils/lang';
|
||||||
import logoImgHyd from '@/assets/project_icon/logo_hyd.png';
|
import logoImgHyd from '@/assets/project_icon/logo_hyd.png';
|
||||||
@ -121,7 +121,7 @@ export default {
|
|||||||
lang: 'zh',
|
lang: 'zh',
|
||||||
language: '中文',
|
language: '中文',
|
||||||
logoImg: logoImgHyd,
|
logoImg: logoImgHyd,
|
||||||
title: '城市轨道交通实训平台'
|
title: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -151,7 +151,9 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.project.startsWith('design')) {
|
if (this.project.startsWith('design')) {
|
||||||
this.title = '城市轨道交通设计平台';
|
this.title = loginInfo['designhyd'].title;
|
||||||
|
} else {
|
||||||
|
this.title = loginInfo['hyd'].title;
|
||||||
}
|
}
|
||||||
document.title = this.title;
|
document.title = this.title;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user