<template>
  <a-card :bordered="false">

    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline">
        <a-row :gutter="24">
        <a-col :md="6" :sm="8">
            <a-form-item label="初次产生消耗时间">
              <a-input placeholder="请输入初次产生消耗时间" v-model="queryParam.initialCostDate"></a-input>
            </a-form-item>
          </a-col>
          <a-col :md="6" :sm="8">
            <a-form-item label="最后一次消耗时间">
              <a-input placeholder="请输入最后一次消耗时间" v-model="queryParam.finalCostDate"></a-input>
            </a-form-item>
          </a-col>
          <a-col :md="6" :sm="8">
            <a-form-item label="所属平面">
              <a-input placeholder="请输入所属平面" v-model="queryParam.plane"></a-input>
            </a-form-item>
          </a-col>
          <a-col :md="6" :sm="8" >
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>

        </a-row>
      </a-form>
    </div>

    <!-- 操作按钮区域 -->
    <div class="table-operator">
    </div>

    <!-- table区域-begin -->
    <div>
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        @change="handleTableChange">

        <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">编辑</a>

          <a-divider type="vertical" />
          <a-dropdown>
            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>

      </a-table>
    </div>
    <!-- table区域-end -->

    <!-- 表单区域 -->
    <bytedanceEffectVideoInfo-modal ref="modalForm" @ok="modalFormOk"></bytedanceEffectVideoInfo-modal>
  </a-card>
</template>

<script>
  import BytedanceEffectVideoInfoModal from './modules/BytedanceEffectVideoInfoModal'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'

  export default {
    name: "BytedanceEffectVideoInfoList",
    mixins:[JeecgListMixin],
    components: {
      BytedanceEffectVideoInfoModal
    },
    data () {
      return {
        description: '有效视频信息管理页面',
        // 表头
        columns: [
		   {
            title: '视频唯一标识',
            align:"center",
            dataIndex: 'code'
           },
		   {
            title: '视频链接',
            align:"center",
            dataIndex: 'url'
           },
		   {
            title: '初次产生消耗时间',
            align:"center",
            dataIndex: 'initialCostDate'
           },
		   {
            title: '最后一次消耗时间',
            align:"center",
            dataIndex: 'finalCostDate'
           },
		   {
            title: '编导',
            align:"center",
            dataIndex: 'plan_dictText'
           },
		   {
            title: '拍摄',
            align:"center",
            dataIndex: 'shot_dictText'
           },
		   {
            title: '剪辑',
            align:"center",
            dataIndex: 'clip_dictText'
           },
		   {
            title: '负责人',
            align:"center",
            dataIndex: 'manager_dictText'
           },
		   {
            title: '两周消耗',
            align:"center",
            dataIndex: 'twoWeekCost'
           },
		   {
            title: '总消耗',
            align:"center",
            dataIndex: 'totalCost'
           },
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            scopedSlots: { customRender: 'action' },
          }
        ],
		url: {
          list: "/ctop/bytedanceEffectVideoInfo/list",
          delete: "/ctop/bytedanceEffectVideoInfo/delete",
          deleteBatch: "/ctop/bytedanceEffectVideoInfo/deleteBatch",
          exportXlsUrl: "ctop/bytedanceEffectVideoInfo/exportXls",
          importExcelUrl: "ctop/bytedanceEffectVideoInfo/importExcel",
       },
    }
  },
  computed: {
    importExcelUrl: function(){
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    }
  },
    methods: {

    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less'
</style>