This commit is contained in:
joylink_cuiweidong 2020-11-02 16:53:59 +08:00
commit dff3b6b105
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() {
let rect = this.getBoundingRect();
const distance = this.style.Section.line.width / 2;
if (this.line) {
if (this.line && this.line.getBoundingRect()) {
rect = this.line.getBoundingRect();
}
return {

View File

@ -12,6 +12,7 @@ import FaviconTky from '@/assets/icon/favicon_tky.png';
import FaviconBxkc from '@/assets/icon/favicon_bxkc.png';
import FaviconCrsc from '@/assets/icon/favicon_crsc.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_Crsc from '@/assets/icon/link_crsc.png';
import Link_Hls from '@/assets/icon/link_hls.png';
@ -29,6 +30,19 @@ export const loginInfo = {
navigationMarginLeft: '60px',
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: {
title: '南京铁道职业技术学院城市轨道交通实训平台',
loginPath:'/login?project=nty',
@ -72,6 +86,18 @@ export const loginInfo = {
navigationMarginLeft: '60px',
systemType: '020'
},
designbjd: {
title: '城市轨道交通列车运行智慧辅助系统',
loginPath: '/design/login?project=bjd',
logoWidth: '400px',
bottomIcon: FaviconBjd,
bottomColumn: '',
linkIcon: '',
loginParam: 'BJD',
navigationLogoWidth: '160px',
navigationMarginLeft: '175px',
systemType: '011'
},
designxty: {
title: '西安铁路职业技术学院城市轨道交通设计平台',
loginPath:'/design/login?project=xty',
@ -352,7 +378,9 @@ export const ProjectIcon = {
drts: Favicon,
designdrts: Favicon,
nty: FaviconNty,
designnty: FaviconNty
designnty: FaviconNty,
bjd: FaviconBjd,
designbjd: FaviconBjd
};
export const ProjectCode = {
@ -375,7 +403,7 @@ 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']; // 登录页样式
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 goOtherPlatformMenu = { // 导航栏快速切换平台
login: '/design/login',

View File

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

View File

@ -1,8 +1,8 @@
export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
// BASE_API = 'http://192.168.8.144:9000'; // 旭强
// BASE_API = 'http://192.168.3.175:9000'; // 张赛

View File

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

View File

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

View File

@ -41,7 +41,7 @@ export default {
this.$store.dispatch('training/isTeachMode').then(() => {
this.tipShow = true;
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 steps = this.$store.state.training.steps;
if (order > -1 && order < steps.length) {