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

        <el-table id="out-table"
                  ref="table"
                  :header-cell-style="{color:'#000'}"
                  :data="tableData"
                  :style="{width: '100%'}"
                  border
                  v-loading="loading"
                  element-loading-text="正在加载中"
                  element-loading-spinner="el-icon-loading"
                  element-loading-background="rgba(255, 255， 255, 0.8)">
          <!-- <el-table-column type="selection"
                         header-align="center"
                         align="center"
                         width="50"></el-table-column> -->
          <el-table-column prop="time"
                           label="时间"
                           min-width="100"
                           header-align="center"
                           align="center"></el-table-column>
          <el-table-column prop="version"
                           label="版本"
                           min-width="50"
                           header-align="center"
                           align="center"></el-table-column>
          <el-table-column prop="oper"
                           label="操作类型"
                           min-width="100"
                           header-align="center"
                           align="center"></el-table-column>
          <el-table-column prop="desc"
                           label="描述"
                           min-width="100"
                           header-align="center"
                           align="center"></el-table-column>

          <!-- <el-table-column label="操作"
                           fixed="right"
                           header-align="center"
                           align="center"
                           width="150">
            <template slot-scope="scope">
              <el-button v-if="scope.row.state=='01'"
                         type="text"
                         size="small"
                         @click="submitCode(scope.row.id)">提交审核</el-button>
            </template>
          </el-table-column> -->
        </el-table>

      </div>
    </el-card>

  </div>
</template>

<script>
import mixinViewModule from '@/mixins/view-module'
import CDialog from '../../components/CDialog'
import SubmitForm from './SubmitForm'
import CommitForm from './CommitForm'
export default {
  mixins: [mixinViewModule],
  data () {
    return {
      mixinViewModuleOptions: {
        getDataListURL: '/demo/demo/page',
        getDataListIsPage: true,
        deleteURL: '/demo/demo',
        deleteIsBatch: true,
        exportURL: '/demo/demo/export'
      },
      loading: false,
      dataForm: {
        client: '', // 客户
        type: '', // 类型
        state: '', // 代码状态
        commitDate: '', // 发布日期
        submitDate: '' // 审核日期
      },
      // 列表数据
      tableData: [
        {
          time: '2019-10-10 10:00:00',
          version: '1.0.0',
          oper: '上传',
          desc: ''
        },
        {
          time: '2019-10-10 11:00:00',
          version: '1.0.0',
          oper: '提交审核',
          desc: ''
        },
        {
          time: '2019-10-10 12:00:00',
          version: '1.0.0',
          oper: '审核失败',
          desc: '类目不满足'
        },
        {
          time: '2019-10-11 8:00:00',
          version: '1.0.1',
          oper: '上传',
          desc: ''
        },
        {
          time: '2019-10-11 9:00:00',
          version: '1.0.1',
          oper: '审核',
          desc: ''
        },
        {
          time: '2019-10-11 10:00:00',
          version: '1.0.1',
          oper: '审核撤回',
          desc: ''
        },
        {
          time: '2019-10-11 11:00:00',
          version: '1.0.1',
          oper: '审核',
          desc: ''
        },
        {
          time: '2019-10-11 12:00:00',
          version: '1.0.1',
          oper: '发布',
          desc: ''
        }
      ]
    }
  },
  components: {
    CDialog, SubmitForm, CommitForm
  },
  mounted () {

  },
  methods: {

    // 提交审核
    submitCode (id) {
      this.submitDia.title = '提交审核'
      this.submitDia.visible = true
    }
  }
}
</script>
