From 96ecadce56cdef6cd6a5858df596d0d50f7919ae Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 2 Nov 2020 16:32:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E9=97=AE=E9=A2=98=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/icon/favicon_bjd.png | Bin 0 -> 8690 bytes src/jmapNew/shape/Section/index.js | 2 +- src/scripts/ProjectConfig.js | 32 +++++++- src/store/modules/training.js | 22 +++-- src/utils/baseUrl.js | 4 +- src/views/newMap/displayNew/exam/index.vue | 1 + src/views/newMap/displayNew/lesson/index.vue | 75 +++++++++--------- .../mapsystemNew/plugin/trainingtip.vue | 2 +- 8 files changed, 87 insertions(+), 51 deletions(-) create mode 100644 src/assets/icon/favicon_bjd.png diff --git a/src/assets/icon/favicon_bjd.png b/src/assets/icon/favicon_bjd.png new file mode 100644 index 0000000000000000000000000000000000000000..b2d5e932d54a48005f7290da46872702e37ef914 GIT binary patch literal 8690 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>DA%{ssK~#8N?cD{q zZB?}g@Ymhl-OtzE9lq|eySux)ySo(>1yM>26jTHQ1Oow4R6sxwQ3Ti9zjedvoOtGN z+-aW~e(fHIcK0ttw{e^ByZ3p+@S1m>zQKw+=<^p{G8}XAIU_^fd!OTnTRrdC;pWdd zcDUtpj~(vu^5cf*zWJ2l9VeYVGH#_KKlJJ0?;deP_d0tbuKkpE4i9+M37h{gYg{Su zkB@rmIG#WAxr>HhyvxDeK6BA++ycJxTKf)BV& zt#Q@DonP|ajZrZSANu6^!`IBlc(30ix{aFzP5GrS?YNnDe&p=oUmpFoo%-DEW$znJ z98|9x(jI%#_adA3xxY!=cB0YR3g;bf0~XAHMBId#2y}PaBdn^6~_&~bk{?={dNa_^7gMAZupFMjh0+*|7PL5H+#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bk01>o0hRww>F#@@@mi*S4HD`=;Jko*C+Mx*pP3pWJ(ew)&h9W^*n3a^L#82ftCh zSJ$rZ&o%YUH*~(rz&oMaxCGoJvP4X~?klsFNz51ZAWT-iq#%*i89b;`M&_&%NV96B zha4wmZv zf$1EsR|lMZ_4s+m zEHu8x8dq9$8@Cz$&4fDNssB_yMb<}_PpwOouCc~d8r{ZS2=iy9foM}TzBFy1$e-5b z$4>pXv^CbaN~7Dj#u{tvndmmIvBnyECc2Gltg*(PiEiT>Ypk&cVxQsv0nVM;e_sHR QtN;K207*qoM6N<$f|oWOx&QzG literal 0 HcmV?d00001 diff --git a/src/jmapNew/shape/Section/index.js b/src/jmapNew/shape/Section/index.js index 90b6d4411..9772e0ba8 100644 --- a/src/jmapNew/shape/Section/index.js +++ b/src/jmapNew/shape/Section/index.js @@ -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 { diff --git a/src/scripts/ProjectConfig.js b/src/scripts/ProjectConfig.js index 3ffaf9b17..b2ee27436 100644 --- a/src/scripts/ProjectConfig.js +++ b/src/scripts/ProjectConfig.js @@ -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', diff --git a/src/store/modules/training.js b/src/store/modules/training.js index acda3e1bd..6695eb570 100644 --- a/src/store/modules/training.js +++ b/src/store/modules/training.js @@ -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) { diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 408bf264a..a3670f04d 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -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'; // 张赛 diff --git a/src/views/newMap/displayNew/exam/index.vue b/src/views/newMap/displayNew/exam/index.vue index 76903fba3..b2999a94f 100644 --- a/src/views/newMap/displayNew/exam/index.vue +++ b/src/views/newMap/displayNew/exam/index.vue @@ -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(() => { diff --git a/src/views/newMap/displayNew/lesson/index.vue b/src/views/newMap/displayNew/lesson/index.vue index ceee81b63..1729d75c9 100644 --- a/src/views/newMap/displayNew/lesson/index.vue +++ b/src/views/newMap/displayNew/lesson/index.vue @@ -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() { diff --git a/src/views/newMap/mapsystemNew/plugin/trainingtip.vue b/src/views/newMap/mapsystemNew/plugin/trainingtip.vue index 51c09baf0..1d967ca0e 100644 --- a/src/views/newMap/mapsystemNew/plugin/trainingtip.vue +++ b/src/views/newMap/mapsystemNew/plugin/trainingtip.vue @@ -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) {