| | |
| | | </div> |
| | | </div> |
| | | <div style="height: calc(100vh - 168px)"> |
| | | <el-table v-loading="listLoading" :data="list" element-loading-text="Loading" @expand-change="expandChange" |
| | | <el-table v-loading="listLoading" :data="list" element-loading-text="Loading" |
| | | fit height="100%"> |
| | | <el-table-column label="班级" prop="className" width="180"> |
| | | </el-table-column> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getData } from "@/api/attendance"; |
| | | import { findClassAttendance } from "@/api/class"; |
| | | |
| | | export default { |
| | | filters: { |
| | |
| | | index: 0, //必选 |
| | | size: 10, //每页的大小。默认20 |
| | | sorts: { |
| | | name: "p.name,CONVERT(s.begin_time,date)", //排序字段名称 |
| | | name: "id, a.staff_name", //排序字段名称 |
| | | direction: "ASC", //排序方向 |
| | | }, |
| | | }, |
| | |
| | | this.listLoading = true; |
| | | this.data.beginDate = this.dateRange[0].replaceAll("-", "/"); |
| | | this.data.endDate = this.dateRange[1].replaceAll("-", "/"); |
| | | this.list = [{ "className": "一班", "A1": "90%", "A2": 1, "A3": 0, "A4": 0 }, |
| | | { "className": "二班", "A1": "90%", "A2": 1, "A3": 0, "A4": 0 }, |
| | | { "className": "三班", "A1": "90%", "A2": 1, "A3": 0, "A4": 0 }, |
| | | { "className": "四班", "A1": "90%", "A2": 1, "A3": 0, "A4": 0 } |
| | | ] |
| | | this.data.staffId = JSON.parse(localStorage.getItem("selectStaff")).id; |
| | | findClassAttendance(this.data).then((response) => { |
| | | this.list = response.data.findClassAttendance.ls; |
| | | this.total = response.data.findClassAttendance.pageOut.total; |
| | | this.listLoading = false; |
| | | // getData(this.data).then((response) => { |
| | | // this.list = response.data.findPlayerAttendanceSummary.ls; |
| | | // this.total = response.data.findPlayerAttendanceSummary.pageOut.total; |
| | | // this.listLoading = false; |
| | | // }); |
| | | }); |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.data.pageIn.size = val; |
| | | this.handleClick(); |
| | | this.fetchData(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.data.pageIn.index = val - 1; |
| | | this.handleClick(); |
| | | }, |
| | | handleClick(tab, event) { |
| | | this.data.staffId = JSON.parse(localStorage.getItem("selectStaff")).id; |
| | | if (this.activeName == "pendingFees") { |
| | | this.listLoading = true; |
| | | getRenew(this.data).then((response) => { |
| | | this.list = response.data.findRenewPlayerAcc.ls; |
| | | this.total = response.data.findRenewPlayerAcc.pageOut.total; |
| | | this.listLoading = false; |
| | | }); |
| | | } else if (this.activeName == "expired") { |
| | | this.listLoading = true; |
| | | getExpire(this.data).then((response) => { |
| | | this.list = response.data.findPlayerExpire.ls; |
| | | this.total = response.data.findPlayerExpire.pageOut.total; |
| | | this.listLoading = false; |
| | | }); |
| | | } else if (this.activeName == "all") { |
| | | this.fetchData(); |
| | | } else if (this.activeName == "deactivated") { |
| | | this.listLoading = true; |
| | | let data = { |
| | | itemType: "PLAYER", |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: this.data.keyword, |
| | | pageIn: { ...this.data.pageIn }, |
| | | }; |
| | | getDeleted(data).then((response) => { |
| | | this.list = response.data.findDeletedItem.ls; |
| | | this.total = response.data.findDeletedItem.pageOut.total; |
| | | this.listLoading = false; |
| | | }); |
| | | } |
| | | }, |
| | | goDetails(row) { |
| | | this.$router.push({ |
| | | name: "StudentDetails", |
| | | query: { |
| | | id: row.id, |
| | | }, |
| | | }); |
| | | }, |
| | | showCreate() { |
| | | this.$refs.studentCreate.showDialog(); |
| | | }, |
| | | changeType(type) { |
| | | switch (type) { |
| | | case 0: |
| | | return "班课"; |
| | | case 1: |
| | | return "约课"; |
| | | case 2: |
| | | return "场地"; |
| | | default: |
| | | return "-"; |
| | | } |
| | | }, |
| | | expandChange(row, expandedRows, expanded) { |
| | | this.studentList = [{ "studentName": "学员", "a1": "90%", "a2": 1, "a3": 0, "a4": 0 }, |
| | | { "studentName": "学员", "a1": "90%", "a2": 1, "a3": 0, "a4": 0 }, |
| | | { "studentName": "学员", "a1": "90%", "a2": 1, "a3": 0, "a4": 0 } |
| | | ] |
| | | this.studentLoading = false |
| | | } |
| | | }, |
| | | }; |
| | | </script> |