<template>
    <div>
            <ButtonGroup style="margin-bottom: 5px">
                <Button type="info" size="small" class="action-btn" ghost round shape="circle"
                        @click="table='SST_TASK_RUN_TIME_KEY'">SST_TASK_RUN_TIME_KEY
                </Button>
                <Button type="success" size="small" style="margin-left: 15px" ghost shape="circle"
                        @click="table='OAUTHSLAVE_TASK_RUN_TIME_KEY'">OAUTHSLAVE_TASK_RUN_TIME_KEY
                </Button>
                <Button type="warning" size="small" style="margin-left: 15px"  ghost shape="circle"
                        @click="table='OAUTH_TASK_RUN_TIME_KEY'">OAUTH_TASK_RUN_TIME_KEY
                </Button>
                <Button type="error" size="small" style="margin-left: 15px"  ghost shape="circle"
                        @click="table='SSTAPP_TASK_RUN_TIME_KEY'">SSTAPP_TASK_RUN_TIME_KEY
                </Button>
            </ButtonGroup>

            <vxe-table

                    border
                    resizable
                    highlight-hover-row
                    export-config
                    height="500"
                    size="medium"
                    show-overflow="tooltip"
                    align="center"
                    header-align="center"
                    :sort-config="{trigger: 'cell'}"
                    :data="tableData">
                <vxe-table-column type="seq" title="#" width="60"></vxe-table-column>
                <vxe-table-column field="job" title="定时器"  ></vxe-table-column>
                <vxe-table-column field="name" title="应用id"  ></vxe-table-column>
                <vxe-table-column field="start_time" title="开始时间" ></vxe-table-column>s
                <vxe-table-column field="end_time" title="结束时间" sortable ></vxe-table-column>
                <vxe-table-column field="between_time" title="相差时间(单位：豪秒)"  ></vxe-table-column>
<!--                <vxe-table-column field="action" title="操作" fixed="right" width="130">-->
<!--                    <template v-slot="{row}">-->
<!--                        <ButtonGroup>-->
<!--                            <Button type="success" size="small" class="action-btn"-->
<!--                                    @click="del(row.db_num)">删除数据-->
<!--                            </Button>-->
<!--                        </ButtonGroup>-->
<!--                    </template>-->
<!--                </vxe-table-column>-->
            </vxe-table>

    </div>
</template>
<script>
// import { getSysTaskInfo } from '@/api/system'
export default {
  name: 'index'
  // data () {
  //   return {
  //     lodingshow: true,
  //     tableData: [],
  //     table: ''
  //   }
  // },
  // methods: {

  // },
  // mounted () {

  // },
  // watch: {

  //   table () {
  //     let a = []
  //     let b = {}
  //     getSysTaskInfo({ redis_key: this.table }).then(ret => {
  //       let date = ret.data.data
  //       console.log(date)
  //       date.forEach((item, index) => {
  //         if (item.job) {
  //           b = JSON.parse(item.job)
  //           console.log(b)
  //           a.push({ job: '定时函数' + item.task_num, between_time: b.between_time, start_time: b.start_time, end_time: b.end_time, name: b.name })
  //         }
  //       })
  //       this.tableData = a
  //     })
  //   }
  // }
}
</script>

<style scoped>

    .action-btn{
        margin-left: 50px;
    }
</style>
