华西海圻ELN前端工程
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

113 lines
2.9 KiB

<template>
<div class="study-enter">
<div class="content-list">
<div class="search-box" v-show="!showDetail">
<div class="search-item" :class="active === item.key ? 'active' : ''" v-for="(item, index) in tabList"
:key="index" @click="changeTab(item)">
{{ item.name }}
</div>
</div>
<div class="content-box">
<ytbd v-if="active === 'ytbd'" :study="study" @showDetail="showDetailCallback" />
<tbbd v-if="active === 'tbbd'" :study="study" @showDetail="showDetailCallback"/>
<syxx v-if="active === 'syxx'" :study="study" @showDetail="showDetailCallback"/>
<syff v-if="active === 'syff'" :study="study" @showDetail="showDetailCallback"/>
<wzlb v-if="active === 'wzlb'" :study="study" @showDetail="showDetailCallback"/>
<syj v-if="active === 'syj'" :study="study" @showDetail="showDetailCallback"/>
</div>
</div>
</div>
</template>
<script>
import ytbd from './ytbd.vue'
import tbbd from './tbbd.vue'
import syxx from './syxx.vue'
import syff from './syff.vue'
import wzlb from './wzlb.vue'
import syj from './syj.vue'
export default {
name: 'StudyEnter',
props: {},
components: { ytbd, tbbd ,syxx,syff,wzlb, syj},
computed: {},
filters: {},
data() {
return {
showDetail: false,
tabList: [
{ key: 'ytbd', name: this.$t('page.business.study.studyEnter.ytbdlb') },
{ key: 'tbbd', name: this.$t('page.business.study.studyEnter.tbbdlb') },
{ key: 'syxx', name: this.$t('page.business.study.studyEnter.syxx') },
{ key: 'wzlb', name: this.$t('page.business.study.studyEnter.wzlb') },
{ key: 'syff', name: this.$t('page.business.study.studyEnter.syfflb') },
{ key: 'syj', name: this.$t('page.business.study.studyEnter.syjsygl') }
],
active: 'ytbd',
study: {},
}
},
created() {
// let x = this.$route.params
// let y = this.$route.query
// debugger
},
methods: {
show(row) {
this.study = row
},
showDetailCallback(val) {
this.showDetail = val
},
changeTab(item) {
if (this.active !== item.key) {
this.active = item.key
}
}
}
}
</script>
<style lang="scss" scoped>
.study-enter {
.search-box {
background: #fff;
padding: 0;
border-radius: 3px;
margin-bottom: 10px;
display: flex;
flex-direction: row;
align-items: center;
.search-item {
padding: 10px 20px;
font-size: 14px;
cursor: pointer;
&.active {
background: #1890ff;
color: #fff;
}
&:hover {
background: #46a6ff;
color: #fff;
}
&:first-child {
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
&:last-child {
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
}
}
.content-box {}
}
</style>