华西海圻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.
 
 
 
 

78 lines
1.5 KiB

<template>
<div class="study-ytbd">
<div class="ytbd-left" v-show="!showDetail">
<sbject :study="study" :operate="true" @change="changeSubject" />
</div>
<div class="ytbd-right" v-if="studyInfo.studySubjectId!=''">
<ytbdList :study="studyInfo" @showDetail="showDetailCallback"/>
</div>
</div>
</template>
<script>
import sbject from './suject.vue'
import ytbdList from './ytbdList.vue'
export default {
name: 'StudyYtbd',
props: {
study:{
type:Object,
default:()=>{
return {}
}
}
},
watch:{
study: {
immediate: true,
handler(v) {
this.studyInfo = {
studyId:v.id,
studyLeader:v.leader,
studySubjectId:''
}
}
},
},
components: {sbject,ytbdList},
computed: {},
filters: {},
data() {
return {
showDetail:false,
studyInfo:{
studyId:this.study.id,
studyLeader:this.study.leader,
studySubjectId:''
}
}
},
created() {},
methods: {
changeSubject(val){
this.studyInfo.studySubjectId = val
},
showDetailCallback(val){
this.showDetail=val
this.$emit('showDetail',val)
}
}
}
</script>
<style lang="scss" scoped>
.study-ytbd {
display: flex;
flex-direction: row;
.ytbd-left {
background: #fff;
padding: 20px;
margin-right: 10px;
flex-shrink: 0;
width: 350px;
}
.ytbd-right{
flex-grow: 1;
overflow: hidden;
}
}
</style>