<template>
  <div>
    <el-button v-permission="permission.check" :loading="crud.status.cu === 2" :disabled="disabledCkeck" size="mini"
               type="primary" icon="el-icon-chat-line-square" @click="crud.toCheck(data,queryList)">
      查看详情
    </el-button>
  </div>
</template>
<script>
import CRUD, {crud} from '@crud/crud'

export default {

  mixins: [crud()],
  props: {
    data: {
      type: Object,
      required: true
    },
    permission: {
      type: Object,
      required: true
    },
    disabledCkeck: {
      type: Boolean,
      default: false
    },
    queryList: {
      type: Object,
      default: {status: false}
    }
  },
  data() {
    return {
      pop: false
    }
  },
  methods: {
    onPopoverShow() {
      setTimeout(() => {
        document.addEventListener('click', this.handleDocumentClick)
      }, 0)
    },
    onPopoverHide() {
      document.removeEventListener('click', this.handleDocumentClick)
    },
    handleDocumentClick(event) {
      this.pop = false
    }
  }
}
</script>
