<template>
  <a-card size="small" :bordered="false" class="checkDingTaskList-wrap" :style="{height:windowHeight +'px'}">
    <a-spin :spinning="spinning" tip="Loading...">
      <!-- 搜索条件 -->
      <div ref="tableSearch" class="table-page-search-wrapper">
        <a-button type="primary" id="checkDingTaskList-refresh" @click="updateFun">钉钉审批查询</a-button>
      </div>
    </a-spin>
  </a-card>
</template>

<script>
import { commonMixin } from '@/utils/mixin'
// 接口
import { checkOptionTask } from '@/api/mqmsg'
export default {
  name: 'CheckDingTaskList',
  mixins: [commonMixin],
  data () {
    return {
      spinning: false,
      windowHeight: 0// 页面高度
    }
  },
  methods: {
    // 重新同步
    updateFun (row) {
      const _this = this
      _this.spinning = true
      checkOptionTask().then(res => {
        _this.$message.success(res)
        _this.spinning = false
      })
    },
    // 计算页面显示高度
    setTableH () {
      this.windowHeight = window.innerHeight - 90
    }
  },
  created () {
    this.setTableH()
  }
}
</script>
<style lang="less" scope>
   .ant-table-tbody .ant-table-row{
       height:42px !important;
    }
</style>
