From 27e3dbfb20113e93be060f262e9cf9896ea7bd84 Mon Sep 17 00:00:00 2001 From: renpy Date: Thu, 24 Aug 2023 11:39:15 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=A4=84=E7=90=86web=E5=B7=A6=E4=BE=A7?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=EF=BC=8C=E5=88=B7=E6=96=B0=E5=90=8E=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E7=8A=B6=E6=80=81=E4=B8=8D=E5=8C=B9=E9=85=8D=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/RouteView.vue | 44 ++++++++++++++++++------------ 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/src/views/statistics/RouteView.vue b/src/views/statistics/RouteView.vue index 92abfa9..9bbb728 100644 --- a/src/views/statistics/RouteView.vue +++ b/src/views/statistics/RouteView.vue @@ -3,10 +3,12 @@
+ + { + if (item.name!=="istatistics-data") { + // this.defaultOpenKeys.push(item.path) + this.openKeys.push(item.path) + } + }) + window.sessionStorage.setItem('openKeys', JSON.stringify(this.openKeys)) } - console.log(this.menus); - this.menus.forEach(item => { - if (item.name!=="istatistics-data") { - this.defaultOpenKeys.push(item.path) - } - }) // if (openKeys) { // // 存在即赋值 // this.defaultOpenKeys = JSON.parse(openKeys) // } - // if (openKeys) { - // // 存在即赋值 - // this.openKeys = JSON.parse(openKeys) - // } + if (openKeys) { + // 存在即赋值 + this.openKeys = JSON.parse(openKeys) + } }, methods: { // 点击菜单,路由跳转,注意的是当点击MenuItem才会触发此函数 menuClick({ item, key, keyPath }) { + this.currSlecteKey = [] + this.currSlecteKey.push(key) window.sessionStorage.setItem('currMenu', key) // var parentPath = item._props.parentMenu._props.eventKey; // var parentTitle = parentPath.substring(parentPath.lastIndexOf("/") + 1, parentPath.length) @@ -139,18 +146,21 @@ export default { }) }, initDefaultKeys(data) { - this.defaultOpenKeys.push(data.path) + // this.defaultOpenKeys.push(data.path) + this.openKeys.push(data.path) // if (data.children) { if (data.name!=="istatistics-StateOfHealth-alerts") { data.children.some((f) => { if (f.children) { // 第一个节点展开 - this.defaultOpenKeys.push(f.path) + // this.defaultOpenKeys.push(f.path) + this.openKeys.push(f.path) this.initDefaultKeys(f.children[0]) } else { // 选中 - this.defaultSelectedKeys.push(f.path) + // this.defaultSelectedKeys.push(f.path) + this.currSlecteKey.push(f.path) return true } }) From 714e965ebd654f714e242e75ec521dfd960ac1dd Mon Sep 17 00:00:00 2001 From: renpy Date: Thu, 24 Aug 2023 13:48:37 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=A4=84=E7=90=86web=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E8=8F=9C=E5=8D=95=E9=80=92=E5=BD=92=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E4=B8=AD=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/RouteView.vue | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/views/statistics/RouteView.vue b/src/views/statistics/RouteView.vue index 9bbb728..f99598a 100644 --- a/src/views/statistics/RouteView.vue +++ b/src/views/statistics/RouteView.vue @@ -110,9 +110,11 @@ export default { const openKeys = window.sessionStorage.getItem('openKeys') const selectedKeys = window.sessionStorage.getItem('currMenu') if (selectedKeys) { + this.currSlecteKey=[] // this.defaultSelectedKeys.push(selectedKeys) this.currSlecteKey.push(selectedKeys) } else { + this.currSlecteKey=[] this.initDefaultKeys(this.menus[0]) this.menus.forEach(item => { if (item.name!=="istatistics-data") { @@ -150,18 +152,19 @@ export default { this.openKeys.push(data.path) // if (data.children) { if (data.name!=="istatistics-StateOfHealth-alerts") { - data.children.some((f) => { - if (f.children) { - // 第一个节点展开 - // this.defaultOpenKeys.push(f.path) - this.openKeys.push(f.path) - this.initDefaultKeys(f.children[0]) - } else { - // 选中 - // this.defaultSelectedKeys.push(f.path) - this.currSlecteKey.push(f.path) - return true + if (f.name!=="istatistics-met") { + if (f.children) { + // 第一个节点展开 + // this.defaultOpenKeys.push(f.path) + this.openKeys.push(f.path) + this.initDefaultKeys(f.children[0]) + } else { + // 选中 + // this.defaultSelectedKeys.push(f.path) + this.currSlecteKey.push(f.path) + return true + } } }) } From f5cf593f9d7702a389dc0901e76dd9276d57eb42 Mon Sep 17 00:00:00 2001 From: renpy Date: Tue, 29 Aug 2023 11:39:57 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=A4=84=E7=90=86=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=9C=A8=20web=20=E5=92=8C=20alarm=E9=97=B4=E5=88=87=E6=8D=A2(?= =?UTF-8?q?=E5=9C=A8=20Alarm=20=E4=B8=8B=E9=9D=A2=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E4=B8=80=E4=BC=9A=E5=86=8D=E7=82=B9=E5=87=BB=20WEB=20=E4=B9=8B?= =?UTF-8?q?=E5=90=8E=E6=97=A0=E6=B3=95=E8=B7=B3=E8=BD=AC)=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/RouteView.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/statistics/RouteView.vue b/src/views/statistics/RouteView.vue index f99598a..f999aa6 100644 --- a/src/views/statistics/RouteView.vue +++ b/src/views/statistics/RouteView.vue @@ -108,7 +108,7 @@ export default { // this.initDefaultKeys(this.menus[0]) // 将从缓存中取出openKeys const openKeys = window.sessionStorage.getItem('openKeys') - const selectedKeys = window.sessionStorage.getItem('currMenu') + const selectedKeys = window.sessionStorage.getItem('currMenu_web') if (selectedKeys) { this.currSlecteKey=[] // this.defaultSelectedKeys.push(selectedKeys) @@ -138,7 +138,7 @@ export default { menuClick({ item, key, keyPath }) { this.currSlecteKey = [] this.currSlecteKey.push(key) - window.sessionStorage.setItem('currMenu', key) + window.sessionStorage.setItem('currMenu_web', key) // var parentPath = item._props.parentMenu._props.eventKey; // var parentTitle = parentPath.substring(parentPath.lastIndexOf("/") + 1, parentPath.length) // var par = {"type": "q"} From 388911e20c682ccc65cd2e91a52fcfbdfd5260fe Mon Sep 17 00:00:00 2001 From: renpy Date: Tue, 29 Aug 2023 17:10:18 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E7=9A=84=E9=80=BB=E8=BE=91=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E5=88=A0=E9=99=A4=E6=8C=89=E4=B8=8Benter=20=E6=90=9C?= =?UTF-8?q?=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SearchForm/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SearchForm/index.vue b/src/components/SearchForm/index.vue index e059480..5520d73 100644 --- a/src/components/SearchForm/index.vue +++ b/src/components/SearchForm/index.vue @@ -1,6 +1,6 @@