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

79 lines
1.5 KiB

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