xusl 1 vuosi sitten
vanhempi
commit
ac013a129c
3 muutettua tiedostoa jossa 39 lisäystä ja 7 poistoa
  1. 20 1
      src/views/fdjh/LeftNav.vue
  2. 15 2
      src/views/fdjh/fdjh.vue
  3. 4 4
      src/views/rqdd/rqdd.vue

+ 20 - 1
src/views/fdjh/LeftNav.vue

@@ -9,7 +9,7 @@
         background-color="transparent"
         class="sidebar-el-menu"
         text-color="#fff"
-        :default-openeds="['/1','/1/1','/1/2','/1/3','/1/4']"
+        :default-openeds=this.testaa
         @select="selectMenu">
       <!-- 一级菜单 -->
       <template v-for="item in list">
@@ -45,8 +45,27 @@
 
 <script>
 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=='sd'){
+      this.testaa.push('/1/2')
+    }
+    if (valstr=='ys'){
+      this.testaa.push('/1/3')
+    }
+    if (valstr=='sj'){
+      this.testaa.push('/1/4')
+    }
+  },
   data() {
     return {
+      testaa:['/1'],
       list: [
         {
           path: "/1",

+ 15 - 2
src/views/fdjh/fdjh.vue

@@ -4,7 +4,7 @@
             <img alt="" onclick="window.open('/path#/rqdd','_self')" src="../ssddjk/img/返回首页.png">
         </div>
         <div id="iframe0" class="pos_2" style="">
-            <iframe src="/#/fdjhnav" style="width: 100%;height: 100%">
+            <iframe id="leftnavframe" src="" style="width: 100%;height: 100%">
             </iframe>
         </div>
         <div id="iframe1" class="pos_3" style="">
@@ -16,7 +16,20 @@
 
 <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];
+
+      const iframeDom = document.getElementById("leftnavframe");
+      let url = "/#/fdjhnav?id="+varstr; //拼接上需要传递的参数
+      document.getElementById("leftnavframe").src = url;
+    },
+  data() {
+    return {
+    }
+  },
 }
 </script>
 

+ 4 - 4
src/views/rqdd/rqdd.vue

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