瀏覽代碼

解决弹窗问题

zhbyyy 1 年之前
父節點
當前提交
37cedb936d
共有 2 個文件被更改,包括 9 次插入3 次删除
  1. 3 3
      manpower/index.html
  2. 6 0
      manpower/js/index.js

+ 3 - 3
manpower/index.html

@@ -26,7 +26,7 @@
 </head>
 
 <body>
-  <div id="app" v-cloak @click="showTip = false">
+  <div id="app" v-cloak @click="showTipClose">
     <header class="my-header">
       <span>国有资本数智化平台人力资源系统</span>
       <span class="right">{{time}}</span>
@@ -61,7 +61,7 @@
               <div ref="echartL3" style="flex: 1;height: 100%;"></div>
               <div style="flex: 1;height: 100%; position: relative;">
                 <div ref="echartL4" style="height: 100%; width: 100%;"></div>
-                <div class="icon" @click="handleShowTip2(0)">?</div>
+                <div class="icon" @click.stop="handleShowTip2(0)">?</div>
               </div>
             </div>
           </div>
@@ -180,7 +180,7 @@
             <div class="content flex">
               <div style="flex: 1;height: 100%; position: relative;">
                 <div ref="echartC1" style="flex: 1;height: 100%;"></div>
-                <div class="icon" @click="handleShowTip2(1)">?</div>
+                <div class="icon" @click.stop="handleShowTip2(1)">?</div>
               </div>
               <div ref="echartC2" style="flex: 1;height: 100%;"></div>
             </div>

+ 6 - 0
manpower/js/index.js

@@ -241,16 +241,22 @@ let app = new Vue({
     }
   },
   methods: {
+    showTipClose () {
+      this.showTip = false
+      this.showTip2 = false
+    },
     handleShowTip (index, type) {
       if (type == 'analysis') {
         this.tipData = tipData.analysis
       } else {
         this.tipData = tipData.focus
       }
+      this.showTip2 = false
       this.showTip = true
       this.tipNum = index
     },
     handleShowTip2 (index) {
+      this.showTip = false
       this.showTip2 = true
       this.tipNum = index
     },