龚焕茏
2024-09-05 e15e35dd8a2940d86b923c5849414690f165262e
src/views/student/index.vue
@@ -8,7 +8,7 @@
    </el-tabs>
    <div style="display: flex; justify-content: space-between">
      <!-- <el-button type="primary" size="small" @click="showCreate">新建学员</el-button> -->
      <el-button type="primary" size="small">导出学员</el-button>
      <el-button type="primary" size="small" @click="handleExport">导出学员</el-button>
      <div style="width: 300px">
        <el-input
          placeholder="按姓名搜索"
@@ -112,7 +112,7 @@
</template>
<script>
import { getData, getRenew, getExpire, getDeleted } from "@/api/student";
import { getData, getRenew, getExpire, getDeleted, handleExport } from "@/api/student";
import StudentCreate from "./components/create.vue";
export default {
@@ -154,6 +154,10 @@
    this.fetchData();
  },
  methods: {
    handleExport() {
      this.download('exportPlayer', {
      }, `导出_${new Date().getTime()}.xlsx`)
    },
    fetchData() {
      this.listLoading = true;
      getData(this.data).then((response) => {