Quellcode durchsuchen

添加点击钻取数据

mw_666 vor 3 Jahren
Ursprung
Commit
284e3feb0c
1 geänderte Dateien mit 14 neuen und 1 gelöschten Zeilen
  1. 14 1
      src/views/LightMatrix3/LightMatrix3.vue

+ 14 - 1
src/views/LightMatrix3/LightMatrix3.vue

@@ -68,7 +68,7 @@
             </div>
           </div>
           <div class="panel-body">
-            <div class="card" v-for="(cItem, cIndex) in pItem" :key="cIndex" :class="cItem.color">
+            <div class="card" v-for="(cItem, cIndex) in pItem" :key="cIndex" :class="cItem.color" @click="goDetails(cItem)">
               <div class="card-panel">
                 <div class="card-left">
                   <div class="tag">{{ cItem.wtnum }}</div>
@@ -385,6 +385,18 @@ export default {
         },
       });
     },
+	// 查看风机详情
+	goDetails(item) {
+	  if (item.wpId.indexOf("FDC") !== -1) {
+	    this.$router.push({
+	      path: `/monitor/windsite/info/${item.wpId}/${item.wtId}`
+	    });
+	  } else {
+	    // this.$router.push({
+	    //   path: `/info/inverter-info/${item.wpId}/${item.wtId}`
+	    // });
+	  }
+	},
   },
 
   created() {
@@ -788,6 +800,7 @@ export default {
         .card-panel {
           display: flex;
           flex-grow: row;
+		  cursor: pointer;
 
           .card-left {
             width: 40px;