<template>
  <div>
    <el-table v-loading="tableDataLoading" :data="duanxinData.list">
      <el-table-column fixed prop="complaintId" label="编号" width="100">
        <template slot-scope="scope">
          <span>{{ scope.$index + 1 }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="fileName" label="消息标题" align="center">
      </el-table-column>
      <el-table-column prop="fileName" label="消息内容" align="center">
      </el-table-column>
      <el-table-column prop="updateTime" label="创建时间" align="center">
      </el-table-column>
    </el-table>
    <div style="text-align: center;margin-top: 10px;">
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :page-sizes="[10, 20, 30, 40]"
        :page-size="limit"
        :current-page="page"
        layout="total,sizes, prev, pager, next,jumper"
        :total="duanxinData.totalCount"
      >
      </el-pagination>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      limit: 10,
      page: 1,
      tableDataLoading: false,

      startTime: "",
      endTime: "",
      filename: "",

      duanxinData: []
    };
  },
  methods: {
    handleSizeChange(val) {
      this.limit = val;
      this.dataSelect();
    },
    handleCurrentChange(val) {
      this.page = val;
      this.dataSelect();
    },
    refresh() {
      this.dataSelect();
    },
    // 获取派单数据列表
    dataSelect() {
      // if (this.endTime == '') {
      // 	  this.endTime = this.info2.stockDate2
      //   }
      //   if (this.startTime == '') {
      // 	  this.startTime = this.info.stockDate
      //   }
      this.tableDataLoading = true;
      var userId = this.$cookie.get('userId')
      this.$http({
        url: this.$http.adornUrl("admin/export/listByUser"),
        method: "get",
        params: this.$http.adornParams({
          curretPage: this.page,
          pageSize: this.limit,
          filename:'',// 文件名称
          userId:userId,
          state: this.state, //订单id
          startTime: this.startTime, //开始时间
          endTime: this.endTime, //结束时间
        })
      }).then(({ data }) => {
        if (data && data.code === 0) {
          this.tableDataLoading = false;
          let returnData = data.data;
          this.duanxinData = returnData;
          console.log(data.data,'导出文件列表');
        }
      });
    },
  },
  mounted() {
    // this.dataSelect();
  },
};
</script>

<style></style>
