| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215 |
- <template>
- <div id="studentMenu">
- <div>
- <el-button
- :size="size"
- :type="active === 1 ? 'primary' : ''"
- @click="changeActive(1)"
- >班级学员</el-button
- >
- <el-button
- :size="size"
- :type="active === 2 ? 'primary' : ''"
- @click="changeActive(2)"
- >学时管理</el-button
- >
- </div>
- <table-list
- :tableSets="tableSet"
- :tableData="tableData"
- :navText="navText"
- @addClick="addClick"
- :loading="loading"
- @editInfo="editInfo"
- >
- <template slot="btn" slot-scope="props">
- <el-button type="text" @click="addClick(props.scope.row, 2)"
- >详情</el-button
- >
- <el-button type="text" @click="addClick(props.scope.row, 3)"
- >学员管理</el-button
- >
- <el-button type="text" @click="del(props.scope.row)">删除</el-button>
- </template>
- </table-list>
- <pagination
- :total="total"
- :pageSize="formData.pageSize"
- :currentPage="formData.pageNum"
- @handleSizeChange="handleSizeChange"
- @handleCurrentChange="handleCurrentChange"
- />
- </div>
- </template>
- <script>
- import tableList from "@/components/tableList";
- import pagination from "@/components/pagination";
- export default {
- components: { tableList, pagination },
- data() {
- return {
- size: "small",
- active: 1,
- loading: false, //当前表单加载是否加载动画
- navText: {
- title: "班级管理",
- index: 0,
- ch: "条",
- num: false,
- choice: true,
- addHide: false,
- backFatherBtn: {
- status: false,
- title: "未定义",
- },
- },
- formData: {
- status: "0,1",
- pageSize: 10,
- pageNum: 1,
- },
- // 表单
- tableSet: [
- {
- label: "学员编码",
- prop: "code",
- hidden: true,
- },
- {
- label: "学员姓名",
- prop: "code",
- hidden: true,
- },
- {
- label: "学员身份证",
- prop: "code",
- hidden: true,
- },
- {
- label: "绑定手机号码",
- prop: "code",
- hidden: true,
- },
- {
- label: "资料变更状态",
- prop: "code",
- hidden: true,
- },
- {
- label: "学时",
- prop: "code",
- hidden: true,
- },
- {
- label: "视频学习进度(节)",
- prop: "code",
- hidden: true,
- },
- {
- label: "做题进度(章卷)",
- prop: "code",
- hidden: true,
- },
- {
- label: "学时审批状态",
- prop: "code",
- hidden: true,
- },
- {
- label: "学习有效期",
- prop: "learningStatus",
- prop1: "learningTimeStart",
- hidden: true,
- scope: "classTimeTypes",
- width: "120px",
- },
- {
- label: "班级有效期",
- prop1: "classStartTime",
- prop2: "classEndTime",
- hidden: true,
- Diszing: false,
- scope: "TimeLists",
- width: "120px",
- },
- {
- label: "结业状态",
- prop: "code",
- hidden: true,
- },
- ],
- tableData: [], //表单数据
- total: 0, //一共多少条
- };
- },
- methods: {
- editInfo(v) {
- this.addClick(v, 2);
- },
- addClick(v, int) {
- // int = 2详情 3学员管理
- if (v === undefined) {
- // 添加班级
- this.$router.push({
- path: "addClass",
- });
- } else {
- if (int === 2) {
- //班级详情
- this.$router.push({
- path:'manageClass',
- query:{
- id:v.classId
- }
- })
- }
- if (int === 3) {
- // 学员管理
- this.$router.push({
- path: "studentMenu",
- query: {
- id: v.classId,
- },
- });
- }
- }
- },
- changeActive(int) {
- this.active = int;
- },
- search(int) {
- this.loading = true;
- if (int === 1) {
- this.formData.pageNum = 1;
- }
- if (int === 2) {
- this.formData = {
- status: "0,1",
- pageSize: 10,
- pageNum: 1,
- };
- }
- this.$api.inquireGradegradeList(this.formData).then((res) => {
- this.tableData = res.rows;
- this.total = res.total;
- // this.navText.index = res.total;
- }).finally(()=>{
- this.loading = false;
- })
- },
- handleSizeChange(v) {
- this.formData.pageSize = v;
- this.formData.pageNum = 1;
- this.search();
- },
- handleCurrentChange(v) {
- this.formData.pageNum = v;
- this.search();
- },
- },
- };
- </script>
- <style lang="less" scoped>
- </style>
|