小王 1 سال پیش
والد
کامیت
a857f9a8cf
4فایلهای تغییر یافته به همراه30 افزوده شده و 7 حذف شده
  1. 17 1
      src/views/ssdd/LeftNav.vue
  2. 9 2
      src/views/ssdd/ssdd.vue
  3. 3 3
      src/views/ssddjk/ssdd.vue
  4. 1 1
      src/views/xtpzyrz/LeftNav.vue

+ 17 - 1
src/views/ssdd/LeftNav.vue

@@ -5,7 +5,7 @@
         </div>
         <div style="height: 40px"></div>
         <el-menu
-                :default-openeds="['/1','/1/1','/1/2','/1/3']"
+                :default-openeds=this.testaa
                 active-text-color="#ffd04b"
                 background-color="transparent"
                 class="sidebar-el-menu"
@@ -54,6 +54,7 @@
 export default {
     data() {
         return {
+            testaa: ['/1'],
             list: [
                 {
                     path: "/1",
@@ -122,6 +123,21 @@ export default {
             ]
         }
     },
+    mounted: function () {
+        var urlStr = window.location.href
+        var values = urlStr.split("?")[1];
+        var valstr = values.split("=")[1];
+
+        if (valstr == 'fd') {
+            this.testaa.push('/1/1')
+        }
+        if (valstr == 'ys') {
+            this.testaa.push('/1/2')
+        }
+        if (valstr == 'sj') {
+            this.testaa.push('/1/3')
+        }
+    },
     methods: {
         selectMenu(key, keyPath, node) {
             // 右侧区域显示页面

+ 9 - 2
src/views/ssdd/ssdd.vue

@@ -4,7 +4,7 @@
             <img alt="" onclick="window.open('/path#/ssddjk','_self')" src="../ssddjk/img/返回首页.png">
         </div>
         <div id="iframe0" class="pos_2" style="">
-            <iframe src="/#/ssddnav" style="width: 100%;height: 100%">
+            <iframe id="leftnavframe" style="width: 100%;height: 100%">
             </iframe>
         </div>
         <div id="iframe1" class="pos_3" style="">
@@ -16,7 +16,14 @@
 
 <script>
 export default {
-    name: 'fdjh-name'
+    name: 'fdjh-name',
+    mounted: function () {
+        var urlStr = window.location.href
+        var values = urlStr.split("?")[1];
+        var varstr = values.split("=")[1];
+        let url = "/#/ssddnav?id=" + varstr; //拼接上需要传递的参数
+        document.getElementById("leftnavframe").src = url;
+    },
 }
 </script>
 

+ 3 - 3
src/views/ssddjk/ssdd.vue

@@ -13,18 +13,18 @@
             </div>
             <div class="partition" style="left: 43.2%"/>
             <div class="crumb left33">
-                <div class="textCrumb1" onclick="window.open('/path#/ssdd','_self')">
+                <div class="textCrumb1" onclick="window.open('/path#/ssdd?id=fd','_self')">
                     发电端计划监控
                 </div>
             </div>
             <div class="partition" style="left: 54.2%"/>
             <div class="crumb left55">
-                <div class="textCrumb" onclick="window.open('/path#/ssdd','_self')">
+                <div class="textCrumb" onclick="window.open('/path#/ssdd?id=ys','_self')">
                     约束条件监控
                 </div>
             </div>
             <div class="crumb left66">
-                <div class="textCrumb" onclick="window.open('/path#/ssdd','_self')">
+                <div class="textCrumb" onclick="window.open('/path#/ssdd?id=sj','_self')">
                     数据采集监控
                 </div>
             </div>

+ 1 - 1
src/views/xtpzyrz/LeftNav.vue

@@ -5,7 +5,7 @@
         </div>
         <div style="height: 40px"></div>
         <el-menu
-                :default-openeds="['/1','/1/1','/1/2']"
+                :default-openeds="['/1']"
                 active-text-color="#ffd04b"
                 background-color="transparent"
                 class="sidebar-el-menu"