实训问题调整

This commit is contained in:
fan 2020-11-02 16:32:08 +08:00
parent 9ace3fc66f
commit 96ecadce56
8 changed files with 87 additions and 51 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

@ -290,7 +290,7 @@ export default class Section extends Group {
getShapeTipPoint() { getShapeTipPoint() {
let rect = this.getBoundingRect(); let rect = this.getBoundingRect();
const distance = this.style.Section.line.width / 2; const distance = this.style.Section.line.width / 2;
if (this.line) { if (this.line && this.line.getBoundingRect()) {
rect = this.line.getBoundingRect(); rect = this.line.getBoundingRect();
} }
return { return {

View File

@ -12,6 +12,7 @@ import FaviconTky from '@/assets/icon/favicon_tky.png';
import FaviconBxkc from '@/assets/icon/favicon_bxkc.png'; import FaviconBxkc from '@/assets/icon/favicon_bxkc.png';
import FaviconCrsc from '@/assets/icon/favicon_crsc.png'; import FaviconCrsc from '@/assets/icon/favicon_crsc.png';
import FaviconNty from '@/assets/icon/favicon_nty.png'; import FaviconNty from '@/assets/icon/favicon_nty.png';
import FaviconBjd from '@/assets/icon/favicon_bjd.png';
import Link_Bxkc from '@/assets/icon/link_bxkc.png'; import Link_Bxkc from '@/assets/icon/link_bxkc.png';
import Link_Crsc from '@/assets/icon/link_crsc.png'; import Link_Crsc from '@/assets/icon/link_crsc.png';
import Link_Hls from '@/assets/icon/link_hls.png'; import Link_Hls from '@/assets/icon/link_hls.png';
@ -29,6 +30,19 @@ export const loginInfo = {
navigationMarginLeft: '60px', navigationMarginLeft: '60px',
systemType: '013' systemType: '013'
}, },
bjd: {
title: '城市轨道交通列车运行智慧辅助系统',
loginPath: '/login?project=bjd',
logoWidth: '400px',
bottomIcon: FaviconBjd,
bottomColumn: '',
loginTitle: '空串',
linkIcon: FaviconBjd,
loginParam: 'BJD',
navigationLogoWidth: '160px',
navigationMarginLeft: '175px',
systemType: '011'
},
nty: { nty: {
title: '南京铁道职业技术学院城市轨道交通实训平台', title: '南京铁道职业技术学院城市轨道交通实训平台',
loginPath:'/login?project=nty', loginPath:'/login?project=nty',
@ -72,6 +86,18 @@ export const loginInfo = {
navigationMarginLeft: '60px', navigationMarginLeft: '60px',
systemType: '020' systemType: '020'
}, },
designbjd: {
title: '城市轨道交通列车运行智慧辅助系统',
loginPath: '/design/login?project=bjd',
logoWidth: '400px',
bottomIcon: FaviconBjd,
bottomColumn: '',
linkIcon: '',
loginParam: 'BJD',
navigationLogoWidth: '160px',
navigationMarginLeft: '175px',
systemType: '011'
},
designxty: { designxty: {
title: '西安铁路职业技术学院城市轨道交通设计平台', title: '西安铁路职业技术学院城市轨道交通设计平台',
loginPath:'/design/login?project=xty', loginPath:'/design/login?project=xty',
@ -352,7 +378,9 @@ export const ProjectIcon = {
drts: Favicon, drts: Favicon,
designdrts: Favicon, designdrts: Favicon,
nty: FaviconNty, nty: FaviconNty,
designnty: FaviconNty designnty: FaviconNty,
bjd: FaviconBjd,
designbjd: FaviconBjd
}; };
export const ProjectCode = { export const ProjectCode = {
@ -375,7 +403,7 @@ export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd']; // 登录页右下角版本开发基于不展示 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 MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 登录页右下角主体不展示
export const GenerateRouteProjectList = ['jsxt', 'refereeJsxt'];// 需要在公共路由中生成登录页面的项目 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']; // 登录页样式 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 NoQrcodeList = ['heb', 'designheb']; export const NoQrcodeList = ['heb', 'designheb'];
export const goOtherPlatformMenu = { // 导航栏快速切换平台 export const goOtherPlatformMenu = { // 导航栏快速切换平台
login: '/design/login', login: '/design/login',

View File

@ -43,7 +43,8 @@ const training = {
scriptQuitCount: 0, // 主动退出剧本 scriptQuitCount: 0, // 主动退出剧本
scriptOperationType: '', // 剧本操作类型 scriptOperationType: '', // 剧本操作类型
triggerFaultCount: 0, // 触发故障计数器 triggerFaultCount: 0, // 触发故障计数器
triggerFaultDevice: '' // 触发故障目标设备 triggerFaultDevice: '', // 触发故障目标设备
trainingStart: false // 实训开始状态
}, },
getters: { getters: {
@ -279,6 +280,9 @@ const training = {
setTriggerFaultCount: (state, device) => { setTriggerFaultCount: (state, device) => {
state.triggerFaultCount++; state.triggerFaultCount++;
state.triggerFaultDevice = device; state.triggerFaultDevice = device;
},
setTrainingStart: (state, flag) => {
state.trainingStart = flag;
} }
}, },
@ -314,7 +318,6 @@ const training = {
*/ */
reset: ({ commit }) => { reset: ({ commit }) => {
commit('over'); commit('over');
commit('resetOrder');
// commit('stopCountTime'); // commit('stopCountTime');
// 清空计时器以及得分 // 清空计时器以及得分
@ -338,13 +341,20 @@ const training = {
commit('resetScore'); commit('resetScore');
commit('start'); commit('start');
}, },
// setTrainingStart:({ commit }) ={
// commit('setTrainingStart');
// },
setTrainingStart: ({ commit }, flag) => {
commit('setTrainingStart', flag);
if (!flag) {
commit('resetOrder');
}
},
/** /**
* 结束 * 结束
*/ */
over: ({ commit }) => { over: ({ commit }) => {
commit('over'); commit('over');
commit('resetOrder');
// commit('stopCountTime'); // commit('stopCountTime');
}, },
@ -368,7 +378,7 @@ const training = {
* 主动判断是否结束 * 主动判断是否结束
*/ */
judgeFinish: ({ dispatch, commit, state }, rtn) => { judgeFinish: ({ dispatch, commit, state }, rtn) => {
if (state.started) { if (state.trainingStart) {
if (state.order >= state.steps.length) { if (state.order >= state.steps.length) {
if (rtn && rtn.valid) { if (rtn && rtn.valid) {
commit('next'); commit('next');
@ -470,7 +480,7 @@ const training = {
try { try {
// 处理operation // 处理operation
Handler.handle(operate).then(rtn => { Handler.handle(operate).then(rtn => {
if (state.started) { if (state.trainingStart) {
// 教学和联系模式需要给出过程步骤提示 // 教学和联系模式需要给出过程步骤提示
if (TrainingMode.TEACH === state.mode || TrainingMode.PRACTICE === state.mode) { if (TrainingMode.TEACH === state.mode || TrainingMode.PRACTICE === state.mode) {
if (rtn && rtn.valid) { if (rtn && rtn.valid) {

View File

@ -1,8 +1,8 @@
export function getBaseUrl() { 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.8.107:9000'; // 袁琪 // BASE_API = 'http://192.168.8.107:9000'; // 袁琪
// BASE_API = 'http://192.168.8.144:9000'; // 旭强 // BASE_API = 'http://192.168.8.144:9000'; // 旭强
// BASE_API = 'http://192.168.3.175:9000'; // 张赛 // BASE_API = 'http://192.168.3.175:9000'; // 张赛

View File

@ -97,6 +97,7 @@ export default {
if (this.$route.query.trainingId) { if (this.$route.query.trainingId) {
this.isDisable = true; this.isDisable = true;
startTrainingNew({ id: this.$route.query.trainingId }, this.group).then(response => { startTrainingNew({ id: this.$route.query.trainingId }, this.group).then(response => {
this.$store.dispatch('training/setTrainingStart', true);
this.$store.dispatch('training/examModeStart'); this.$store.dispatch('training/examModeStart');
this.$store.dispatch('exam/start'); this.$store.dispatch('exam/start');
this.$store.dispatch('map/clearJlmapTrainView').then(() => { this.$store.dispatch('map/clearJlmapTrainView').then(() => {

View File

@ -81,7 +81,6 @@ export default {
computed: { computed: {
...mapGetters('training', [ ...mapGetters('training', [
'score', 'score',
'started',
'usedTime', 'usedTime',
'basicInfo' 'basicInfo'
]), ]),
@ -156,10 +155,10 @@ export default {
// //
this.$store.dispatch('menuOperation/setButtonOperation', null); this.$store.dispatch('menuOperation/setButtonOperation', null);
this.startLoading = true; this.startLoading = true;
// console.log(2222222222222, this.startLoading, this.started, this.trainingObj);
if (this.trainingObj && this.trainingObj.id) { if (this.trainingObj && this.trainingObj.id) {
startTrainingNew(this.trainingObj, this.group).then(response => { startTrainingNew(this.trainingObj, this.group).then(response => {
this.isDisable = true; this.isDisable = true;
this.$store.dispatch('training/setTrainingStart', true);
this.$store.dispatch('map/clearJlmapTrainView').then(() => { this.$store.dispatch('map/clearJlmapTrainView').then(() => {
this.$store.dispatch('training/teachModeStart', this.demoMode).then(()=>{ this.$store.dispatch('training/teachModeStart', this.demoMode).then(()=>{
this.$store.dispatch('training/countTime', 'Lesson'); // this.$store.dispatch('training/countTime', 'Lesson'); //
@ -192,6 +191,7 @@ export default {
this.$store.dispatch('training/judgeFinish', data).then(rsp => { this.$store.dispatch('training/judgeFinish', data).then(rsp => {
this.$store.dispatch('training/setStopCountTime'); this.$store.dispatch('training/setStopCountTime');
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('training/setTrainingStart', false);
}); });
}).catch(() => { }).catch(() => {
this.$messageBox(this.$t('display.lesson.endTrainingError')); this.$messageBox(this.$t('display.lesson.endTrainingError'));
@ -200,45 +200,42 @@ export default {
end() { end() {
// //
if (this.trainingObj && this.trainingObj.id) { if (this.trainingObj && this.trainingObj.id) {
if (this.started) { this.isDisable = false;
this.isDisable = false; this.$store.dispatch('training/isStepOver').then((rnt) => {
this.$store.dispatch('training/isStepOver').then((rnt) => { if (rnt) {
if (rnt) { this.endCommit();
this.endCommit(); } else {
} else { this.backDisable = true;
this.backDisable = true; this.$confirm(this.$t('display.lesson.endTrainingTip'), this.$t('global.tips'), {
this.$confirm(this.$t('display.lesson.endTrainingTip'), this.$t('global.tips'), { cancelButtonText: this.$t('global.cancel'),
cancelButtonText: this.$t('global.cancel'), confirmButtonText: this.$t('global.confirm'),
confirmButtonText: this.$t('global.confirm'), type: 'warning',
type: 'warning', center: true,
center: true, zIndex: 9999
zIndex: 9999 }).then(() => {
}).then(() => { this.backDisable = false;
this.backDisable = false; const mode = {
const mode = { mode: this.demoMode,
mode: this.demoMode, id: this.trainingObj.id,
id: this.trainingObj.id, lessonId: this.$route.query.lessonId,
lessonId: this.$route.query.lessonId, usedTime: this.usedTime
usedTime: this.usedTime };
}; endTrainingNew(mode, this.group).then(response => {
endTrainingNew(mode, this.group).then(response => { // const data = response.data;
// const data = response.data; this.$store.dispatch('training/end', null);
this.$store.dispatch('training/end', null); this.$store.dispatch('training/setStopCountTime');
this.$store.dispatch('training/setStopCountTime'); this.$store.dispatch('training/setScore', 0);
this.$store.dispatch('training/setScore', 0); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/setTrainingStart', false);
}).catch(() => {
this.$messageBox(this.$t('display.lesson.endTrainingError'));
});
}).catch(() => { }).catch(() => {
this.isDisable = true; this.$messageBox(this.$t('display.lesson.endTrainingError'));
this.backDisable = false;
}); });
} }).catch(() => {
}); this.isDisable = true;
} else { this.backDisable = false;
this.$messageBox(this.$t('display.lesson.startTrainingTip')); });
} }
});
} }
}, },
back() { back() {

View File

@ -41,7 +41,7 @@ export default {
this.$store.dispatch('training/isTeachMode').then(() => { this.$store.dispatch('training/isTeachMode').then(() => {
this.tipShow = true; this.tipShow = true;
const offset = this.$store.state.config.canvasOffset; const offset = this.$store.state.config.canvasOffset;
if (this.$store.state.training.started) { if (this.$store.state.training.trainingStart) {
const order = this.$store.state.training.order; const order = this.$store.state.training.order;
const steps = this.$store.state.training.steps; const steps = this.$store.state.training.steps;
if (order > -1 && order < steps.length) { if (order > -1 && order < steps.length) {