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

73 lines
1.4 KiB

  1. <template>
  2. <div class="study-ytbd">
  3. <div class="ytbd-left" v-show="!showDetail">
  4. <sbject :study="study" :operate="true" @change="changeSubject" />
  5. </div>
  6. <div class="ytbd-right" v-if="studyInfo.studySubjectId!='' && studyInfo.studySubjectId!=undefined">
  7. <ytbdList :study="studyInfo" @showDetail="showDetailCallback"/>
  8. </div>
  9. </div>
  10. </template>
  11. <script>
  12. import sbject from './suject.vue'
  13. import ytbdList from './ytbdList.vue'
  14. export default {
  15. name: 'StudyYtbd',
  16. props: {
  17. study:{
  18. type:Object,
  19. default:()=>{
  20. return {}
  21. }
  22. }
  23. },
  24. watch:{
  25. study: {
  26. immediate: true,
  27. deep:true,
  28. handler(v) {
  29. this.studyInfo = _.merge({studySubjectId:''},v)
  30. }
  31. },
  32. },
  33. components: {sbject,ytbdList},
  34. computed: {},
  35. filters: {},
  36. data() {
  37. return {
  38. showDetail:false,
  39. studyInfo:{
  40. studySubjectId:''
  41. }
  42. }
  43. },
  44. created() {},
  45. methods: {
  46. changeSubject(val){
  47. this.studyInfo.studySubjectId = val
  48. },
  49. showDetailCallback(val){
  50. this.showDetail=val
  51. this.$emit('showDetail',val)
  52. }
  53. }
  54. }
  55. </script>
  56. <style lang="scss" scoped>
  57. .study-ytbd {
  58. display: flex;
  59. flex-direction: row;
  60. .ytbd-left {
  61. background: #fff;
  62. padding: 20px;
  63. margin-right: 10px;
  64. flex-shrink: 0;
  65. width: 350px;
  66. }
  67. .ytbd-right{
  68. flex-grow: 1;
  69. overflow: hidden;
  70. }
  71. }
  72. </style>