<template>
  <!-- 定投流水查询 -->
  <div class="platinum_fixed_investment_flow_query">
    <Filter @search="updateColumn" />
    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
      <template #triggerstatus="{ record }">
        <a>{{ record.triggerstatus === 1 ? "成功" : "失败" }}</a>
      </template>
    </a-table>
  </div>
</template>

<script lang="ts">
import { EnumRouterName } from '@/common/constants/enumRouterName';
import { ComposeTableParam, defineComponent, handleComposeTable, queryTableList } from '@/common/export/commonTable';
import { queryRSTriggerLog } from '@/services/go/ermcp/qhj';
import { QhjRSTriggerLog } from '@/services/go/ermcp/qhj/interface';
import Filter from './compoments/filter/index.vue';

export default defineComponent({
  name: 'platinum_fixed_investment_flow_query',
  components: { Filter },
  setup() {
    // 表格列表数据
    const { loading, tableList, queryTable } = queryTableList<QhjRSTriggerLog>();
    const queryTableAction = () => {
      // 获取列表数据
      queryTable(queryRSTriggerLog);
    };

    // 表格通用逻辑
    const param: ComposeTableParam = {
      queryFn: queryTableAction,
      tableName: 'table_pcweb_qhj_fixed_investment_flow_query',
    };

    return {
      ...handleComposeTable<QhjRSTriggerLog>(param),
      loading,
      tableList,
    };
  },
});
</script>