diff --git a/src/components/PlatformList/PlatformList.vue b/src/components/PlatformList/PlatformList.vue
index 82f7581..d470f9f 100644
--- a/src/components/PlatformList/PlatformList.vue
+++ b/src/components/PlatformList/PlatformList.vue
@@ -5,7 +5,7 @@
@@ -182,24 +182,27 @@ export default {
}
},
// 查看 研究院/仪器 详情
- jump(id) {
+ jump(item) {
if (this.listState === 0) {
this.$router.push({
path: '/NewPlatform/Share/Institute',
name: 'Institute',
- params: { id },
+ params: {
+ id: item.id,
+ direction: item.direction,
+ },
});
} else if (this.listState === 1) {
this.$router.push({
path: '/NewPlatform/Share/InsDet',
name: 'InsDet',
- params: { id },
+ params: { id: item.id },
});
} else if (this.listState === 3) {
this.$router.push({
path: '/NewPlatform/Share/InsDet',
name: 'InsDet',
- params: { id },
+ params: { id: item.id },
});
}
},
diff --git a/src/views/NewPlatform/Children/ShareChild/Institute.vue b/src/views/NewPlatform/Children/ShareChild/Institute.vue
index 4e21f81..238231f 100644
--- a/src/views/NewPlatform/Children/ShareChild/Institute.vue
+++ b/src/views/NewPlatform/Children/ShareChild/Institute.vue
@@ -7,15 +7,10 @@
研究院介绍
-
研究院介绍
+
{{ direction }}
设备列表
-
+
{{ item.name }}
了解更多→
@@ -53,8 +48,8 @@
{{ obj.direction }}
-
+
@@ -102,6 +99,7 @@ export default {
],
obj: null,
list: [],
+ direction: '',
};
},
computed: mapState('home', ['LabId']),
@@ -112,6 +110,9 @@ export default {
} else {
this.id = this.LabId;
}
+ if (this.$route.params.direction) {
+ this.direction = this.$route.params.direction;
+ }
this.getData();
this.getTeam();
},
@@ -131,7 +132,7 @@ export default {
const res = await selInstrumentByRes(params);
const { code, msg, data } = res.data;
if (code === 200) {
- if (data.list !== []) {
+ if (data.list && data.list.length > 0) {
this.list = data.list;
this.total = parseInt(data.total);
}
@@ -147,9 +148,8 @@ export default {
const res = await teamSearch(params);
const { code, msg, data } = res.data;
if (code === 200) {
- if (data !== [] && data.length > 0) {
+ if (data && data.length > 0) {
this.obj = data[0];
- console.log('this.obj: ', this.obj);
}
}
} catch (error) {