<template>
  <div>
    <el-card shadow="never"
             class="aui-card--fill">
      <div class="mod-demo__demo}">

        <c-table column-type="index"
                 :pageVisible="true"
                 ref="table"
                 :url="tableUrl"
                 :params="tableParams"
                 keyword="OperHistory"
                 :operations="operations"
                 :tableHeight="tableHeight">
        </c-table>
      </div>
    </el-card>

  </div>
</template>

<script>
import CTable from '@c/CTableNoPage'
import { mapGetters } from 'vuex'

export default {
  data () {
    return {
      loading: false,
      // 模板列表
      // tableUrl: '/third/code/history',
      tableUrl: 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/code/history',
      tableParams: {
        type: Object, // table的查询参数
        default () {
          return {}
        }
      },
      // 列表操作栏的操作项数组
      operations: []

    }
  },
  components: {
    CTable
  },
  mounted () {
    this.$refs.table.loadData() // 获取表格数据
  },
  methods: {
    // 提交审核
    submitCode (id) {
      this.submitDia.title = '提交审核'
      this.submitDia.visible = true
    }
  },
  computed: {
    tableHeight () {
      return this.clientHeight - 60 - 80 - 80 - 50 - 400
    },
    ...mapGetters(['clientHeight'])
  }
}
</script>
