<template>
  <div>
    <Modal v-model="showSampleModal" v-drag @on-visible-change="_visibleChange" width="1200"
           class="zIndex-900 modal-footer-none">
      <p slot="header">管理样品</p>
      <div>
      <SoilSampleManage ref="prepareManage"></SoilSampleManage>
<!--        <keep-alive>-->
<!--          &lt;!&ndash; eslint-disable-next-line vue/require-component-is &ndash;&gt;-->
<!--          <component ref="refModal" :is="currentComponent"></component>-->
<!--        </keep-alive>-->
      </div>
    </Modal>
  </div>
</template>
<script>
import SoilSampleManage from './SoilSampleManage'
export default {
  components: {
    SoilSampleManage
  },
  data() {
    return {
      type: '',
      contractId: '', // 合同id
      entrustId: '',
      showSampleModal: false,
      modalTitle: '',
      selectIds: [],
      name: ''
    }
  },
  mounted() {},
  methods: {
    _open(entrustId, type, name) {
      this.type = type // 类型（采样或送样）
      this.name = name
      this.showSampleModal = true
      this.entrustId = entrustId // 委托id
      this.selectIds = []
      this._preparePage()
    },
    // 制备管理
    _preparePage() {
      this.$refs.prepareManage._open(this.entrustId)
    },
    _visibleChange(data) {
      this.$emit('on-result-change')
    }
  }
}
</script>
