wei 1 сар өмнө
parent
commit
58a9092b58

+ 11 - 1
src/view/antibody/index.vue

@@ -7,7 +7,8 @@
                 <el-table
                     :data="overView"
                     stripe
-                    style="width: 100%">
+                    style="width: 100%"
+                    @row-click="gotoArticle">
                     <el-table-column prop="catalog" label="产品货号" width="100"/>
                     <el-table-column prop="name" label="抗体名称" width="400"/>
                     <el-table-column prop="targetList" label="靶点" >
@@ -43,6 +44,15 @@ export default {
         console.log(res)
         this.overView = res.data
       })
+    },
+    gotoArticle(row, column, event) {
+      console.log(row, column, event)
+      this.$router.push({
+        path: "/antibodyDetail",
+        query: {
+          id: row.id
+        }
+      });
     }
   },
   mounted() {},

+ 10 - 6
src/view/antibodyDetail/index.vue

@@ -262,18 +262,22 @@ export default {
   },
   data() {
     return {
-      list: [
-        {
-          name: "12",
-          fileUrl: "/static/img/mRNA1.af470f1.jpg"
-        }
-      ]
+      overView: {}
     };
   },
   methods: {
+    changeSearchById() {
+      this.$api.post("/basb/searchById", {
+        id: this.$route.query.id
+      }).then(res => {
+        console.log(res)
+        this.overView = res.data
+      })
+    }
   },
   mounted() {},
   created() {
+    this.changeSearchById()
   }
 };
 </script>