<template>
  <div class="app-container">
    <el-card class="box-card">
      <el-table border :data="dataList">
        <el-table-column label="ID" prop="id" width="120" />
        <el-table-column label="模板名称" prop="title" />
        <el-table-column
          label="操作"
          align="center"
          class-name="small-padding fixed-width"
          width="180"
        >
          <template slot-scope="scope">
            <el-button
              size="mini"
              type="text"
              icon="el-icon-download"
              @click="handleView(scope.row)"
              >下载</el-button
            >
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      dataList: [
        {
          id: 1,
          title: "乐团退费模板",
          url: "https://oss.dayaedu.com/daya/202203/乐团退费模板.xlsx",
        },
      ],
    };
  },
  methods: {
    // 下载模板
    handleView(row) {
      window.location.href = row.url;
    },
  },
};
</script>

<style scoped></style>
