From a5ca2501dacc470ddc41159ab1f8ab27142eee9e Mon Sep 17 00:00:00 2001 From: fan Date: Tue, 11 Oct 2022 17:24:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BF=E7=9C=9F=E6=98=BE=E7=A4=BA=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/components/menus/eachChildMenu.vue | 4 +- src/jmapNew/theme/factory.js | 12 +- .../fuzhou_01/menus/dispatchWorkMenu.vue | 687 +++++++++--------- .../fuzhou_01/menus/dispatchWorkMenuBar.vue | 374 ++++++++++ .../theme/fuzhou_01/menus/localWorkMenu.vue | 602 ++++++++------- .../fuzhou_01/menus/localWorkMenuBar.vue | 285 ++++++++ .../newMap/display/terminals/dispatchWork.vue | 2 +- .../newMap/display/terminals/localWork.vue | 2 +- src/views/trainingPlatform/index.vue | 10 - 9 files changed, 1347 insertions(+), 631 deletions(-) create mode 100644 src/jmapNew/theme/fuzhou_01/menus/dispatchWorkMenuBar.vue create mode 100644 src/jmapNew/theme/fuzhou_01/menus/localWorkMenuBar.vue diff --git a/src/jmapNew/theme/components/menus/eachChildMenu.vue b/src/jmapNew/theme/components/menus/eachChildMenu.vue index ba248971c..1e01cbdcc 100644 --- a/src/jmapNew/theme/components/menus/eachChildMenu.vue +++ b/src/jmapNew/theme/components/menus/eachChildMenu.vue @@ -105,10 +105,10 @@ export default { }, hookClick(item, event) { this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null }); - if (item && typeof item.click == 'function') { + if (item ) { if (item.children && item.children.length > 0) { this.selectedClass(item, this.id); - } else { + } else if (typeof item.click == 'function') { item.click(item.operate); this.doClose(-1); this.$store.dispatch('menuOperation/changeMenuBar', ''); diff --git a/src/jmapNew/theme/factory.js b/src/jmapNew/theme/factory.js index 6d2d41951..ce50e90e7 100644 --- a/src/jmapNew/theme/factory.js +++ b/src/jmapNew/theme/factory.js @@ -107,7 +107,17 @@ class Theme { loadMenuComponent(code) { return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/index`).default); } - + // 加载行调菜单组件 + loadDispatchWorkMenuComponent(code) { + if (code == '02') { + return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/dispatchWorkMenu`).default); + } + } + loadLocalWorkMenuComponent(code) { + if (code == '02') { + return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/localWorkMenu`).default); + } + } // 新版本 loadPlanParser(code) { return PlanParser.load(require(`./${this._runplan[code || this._code]}/planConfig`).default); diff --git a/src/jmapNew/theme/fuzhou_01/menus/dispatchWorkMenu.vue b/src/jmapNew/theme/fuzhou_01/menus/dispatchWorkMenu.vue index 95d950eab..ea89033c4 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/dispatchWorkMenu.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/dispatchWorkMenu.vue @@ -1,370 +1,355 @@ + - diff --git a/src/jmapNew/theme/fuzhou_01/menus/dispatchWorkMenuBar.vue b/src/jmapNew/theme/fuzhou_01/menus/dispatchWorkMenuBar.vue new file mode 100644 index 000000000..813f2c0ae --- /dev/null +++ b/src/jmapNew/theme/fuzhou_01/menus/dispatchWorkMenuBar.vue @@ -0,0 +1,374 @@ + + + + diff --git a/src/jmapNew/theme/fuzhou_01/menus/localWorkMenu.vue b/src/jmapNew/theme/fuzhou_01/menus/localWorkMenu.vue index 90bbe0127..47bd0cb2f 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/localWorkMenu.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/localWorkMenu.vue @@ -1,283 +1,355 @@ + - diff --git a/src/jmapNew/theme/fuzhou_01/menus/localWorkMenuBar.vue b/src/jmapNew/theme/fuzhou_01/menus/localWorkMenuBar.vue new file mode 100644 index 000000000..f913d232c --- /dev/null +++ b/src/jmapNew/theme/fuzhou_01/menus/localWorkMenuBar.vue @@ -0,0 +1,285 @@ + + + + diff --git a/src/views/newMap/display/terminals/dispatchWork.vue b/src/views/newMap/display/terminals/dispatchWork.vue index 92f015b73..b151f2e8a 100644 --- a/src/views/newMap/display/terminals/dispatchWork.vue +++ b/src/views/newMap/display/terminals/dispatchWork.vue @@ -37,7 +37,7 @@ export default { '$store.state.map.mapDataLoadedCount': function () { const lineCode = this.$jlmap.lineCode; if (lineCode) { - this.menus = this.$theme.loadMenuComponent(lineCode); + this.menus = this.$theme.loadDispatchWorkMenuComponent(lineCode); } }, '$store.state.map.initJlmapLoadedCount': function (val) { diff --git a/src/views/newMap/display/terminals/localWork.vue b/src/views/newMap/display/terminals/localWork.vue index 3dfa3f221..198f4b1d8 100644 --- a/src/views/newMap/display/terminals/localWork.vue +++ b/src/views/newMap/display/terminals/localWork.vue @@ -49,7 +49,7 @@ export default { '$store.state.map.mapDataLoadedCount': function () { const lineCode = this.$jlmap.lineCode; if (lineCode) { - this.menus = this.$theme.loadMenuComponent(lineCode); + this.menus = this.$theme.loadDispatchWorkMenuComponent(lineCode); } }, '$store.state.map.initJlmapLoadedCount': function (val) { diff --git a/src/views/trainingPlatform/index.vue b/src/views/trainingPlatform/index.vue index 3f0d9717b..07db94e90 100644 --- a/src/views/trainingPlatform/index.vue +++ b/src/views/trainingPlatform/index.vue @@ -42,16 +42,6 @@ export default { goRoutePath(data) { const againEnter = getSessionStorage('againEnter') || null; if (!againEnter && !this.$route.query.thirdJump) { - // const project = getSessionStorage('project'); - // const userId = this.$store.state.user.id; - // const path = localStore.get('trainingPlatformRoute' + userId + project); - // if (path && path.startsWith('/trainingPlatform')) { - // localStore.set('orignalTrainingPlatformRoute' + userId + project, `/trainingPlatform/permission/${data[0].id}?lineCode=${data[0].lineCode}`); - // console.log('****************'); - // this.$router.push(path); - // } else if (data && data[0]) { - // - // } this.$router.push(`/trainingPlatform/permission/${data[0].id}?lineCode=${data[0].lineCode}`); setSessionStorage('againEnter', true); }