Browse Source

研究院修改

master
aBin 5 years ago
parent
commit
56a2489603
  1. 13
      src/components/PlatformList/PlatformList.vue
  2. 44
      src/views/NewPlatform/Children/ShareChild/Institute.vue

13
src/components/PlatformList/PlatformList.vue

@ -5,7 +5,7 @@
<img :src="item.picUrl" class="con-img" v-if="item.picUrl" :title="item.name" />
<img :src="item.visitLocation" class="con-img" :title="item.name" v-else />
<p class="font-24 my-4 title">{{ item.name }}</p>
<p @click="jump(item.id)" class="font-16 baseColor" style="text-align: right; cursor: pointer">了解更多</p>
<p @click="jump(item)" class="font-16 baseColor" style="text-align: right; cursor: pointer">了解更多</p>
</div>
</div>
<div class="inner">
@ -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 },
});
}
},

44
src/views/NewPlatform/Children/ShareChild/Institute.vue

@ -7,15 +7,10 @@
<banner :show-page="showPage" />
<div class="inner ins-box">
<p class="font-bold-24 item-title">研究院介绍</p>
<div>研究院介绍</div>
<div>{{ direction }}</div>
<p class="font-bold-24 item-title" v-if="list[0]">设备列表</p>
<div class="d-flex flex-wrap" v-if="list[0]">
<div
:class="(index + 1) % 4 === 0 ? 'margin-0' : ''"
:key="index"
class="item-box mb-8"
v-for="(item, index) in list"
>
<div :class="(index + 1) % 4 === 0 ? 'margin-0' : ''" :key="index" class="item-box mb-8" v-for="(item, index) in list">
<img :src="item.visitLocation" style="height: 220px; width: 100%" />
<p class="font-24 my-4">{{ item.name }}</p>
<p @click="jump(item.id)" class="font-16 baseColor item-more">了解更多</p>
@ -53,8 +48,8 @@
<p>{{ obj.direction }}</p>
</div>
</div>
<!-- <p class="font-bold-24 item-title" v-if="obj !== {} || obj.teamMemberList !== []">团队成员信息</p>
<div style="background: #fff" v-if="obj !== {} || obj.teamMemberList !== []">
<p class="font-bold-24 item-title" v-if="obj !== null">团队成员信息</p>
<div style="background: #fff" v-if="obj !== null">
<div class="d-flex">
<div class="h-box" style="flex: 1">姓名</div>
<div class="h-box" style="flex: 1">性别</div>
@ -63,18 +58,20 @@
<div class="h-box" style="flex: 1">职称职务</div>
<div class="h-box" style="flex: 1">研究方向</div>
</div>
<div :key="index" class="d-flex" v-for="(item, index) in obj.teamMemberList">
<div class="con-box" style="flex: 1">{{ item.name }}</div>
<div class="con-box" style="flex: 1">
<span v-if="item.gender - 0 === 1"></span>
<span v-else-if="item.gender - 0 === 2"></span>
<div v-if="obj.teamMemberList && obj.teamMemberList.length > 0">
<div :key="index" class="d-flex" v-for="(item, index) in obj.teamMemberList">
<div class="con-box" style="flex: 1">{{ item.name }}</div>
<div class="con-box" style="flex: 1">
<span v-if="item.gender - 0 === 1"></span>
<span v-else-if="item.gender - 0 === 2"></span>
</div>
<div class="con-box" style="flex: 1">{{ item.birthday }}</div>
<div class="con-box" style="flex: 1">{{ item.education }}</div>
<div class="con-box" style="flex: 1">{{ item.position }}</div>
<div class="con-box" style="flex: 1">{{ item.direction }}</div>
</div>
<div class="con-box" style="flex: 1">{{ item.birthday }}</div>
<div class="con-box" style="flex: 1">{{ item.education }}</div>
<div class="con-box" style="flex: 1">{{ item.position }}</div>
<div class="con-box" style="flex: 1">{{ item.direction }}</div>
</div>
</div>-->
</div>
</div>
</div>
</template>
@ -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) {

Loading…
Cancel
Save