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

74 lines
1.4 KiB

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