<template>
  <div>
    <el-dialog
      append-to-body
      top="2vh"
      width="60%"
      :visible.sync="dialogVisible"
      center
      @close="handleCancel"
    >
      <div class="el-dialog-div" style="height:80vh">
        <server-list ref="serverListRef" @ok="getCheckedsell"/>
      </div>
    </el-dialog>
  </div>
</template>

<script>
    import serverList from "@/views/business/cashier/serverList";
    export default {
      name: "chooseServer",
      components: {serverList},
      props: {
        sellList: Array,
      },
      data() {
        return {
          dialogVisible: false,
          temp:{},
          scope:{}
        }
      },
      methods: {
        open() {
          this.dialogVisible = true
          //并获取最新值
          this.$nextTick(() => {
            this.$refs.serverListRef.fetchData()
          })
        },
        getCheckedsell(serverList){
          this.$emit('ok', serverList)
          this.handleCancel()
        },
        handleCancel(){
          this.dialogVisible = false
        },
        submit(){

        }
      },
    }
</script>
<style scoped>

</style>
