| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div style="margin-bottom: 10px;display: flex;align-items: center;justify-content: space-between"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="Plus" |
| | | @click="openDialog()" |
| | | >选择学员</el-button> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="Delete" |
| | | @click="handleDeleteBatch" |
| | | >批量删除</el-button> |
| | | <div style="display: flex;justify-content: space-between"> |
| | | <el-form :inline="true" style="display: flex;align-items: center;flex-wrap: wrap;" > |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="Plus" |
| | | @click="openDialog()" |
| | | >选择学员</el-button> |
| | | </el-form-item> |
| | | <el-form-item label="学生姓名:" > |
| | | <el-input v-model="data.queryParams.studentName" placeholder="请输入学生姓名"></el-input> |
| | | </el-form-item> |
| | | <el-form-item > |
| | | <el-button |
| | | type="primary" |
| | | @click="getList" |
| | | >查询</el-button> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | @click="reset" |
| | | >重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="Delete" |
| | | @click="handleDeleteBatch" |
| | | >批量删除</el-button> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | @click="back" |
| | | >返回</el-button> |
| | | </div> |
| | | |
| | | </div> |
| | | <!-- 表格数据 --> |
| | | <el-table ref="tableRef" v-loading="loading" :data="dataList" :border="true" :row-key="getRowKey" @selection-change="handleSelectionChange"> |
| | |
| | | <el-table-column label="批次名称" prop="phaseName" align="center" /> |
| | | <el-table-column label="学员名称" prop="studentName" align="center" /> |
| | | <el-table-column label="手机号" prop="studentPhone" align="center" /> |
| | | <el-table-column label="总进度" prop="totalProgress" align="center" /> |
| | | <el-table-column label="总进度" prop="totalProgress" align="center" > |
| | | <template #default="scope"> |
| | | <el-progress |
| | | v-if="scope.row.totalProgress>=0" |
| | | :text-inside="true" |
| | | :stroke-width="24" |
| | | :percentage="scope.row.totalProgress" |
| | | :status="scope.row.totalProgress <= 50 ? 'exception' : scope.row.totalProgress > 50 && scope.row.totalProgress <= 80 ? 'warning':'success'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="开始学习时间" prop="startTime" align="center" /> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180"> |
| | | <template #default="scope"> |
| | |
| | | import Cookies from "js-cookie"; |
| | | import {delQuestionBank, getQuestionBank} from "@/api/onlineEducation/questionBank"; |
| | | import {batchDelStudent, delBatchStu, getBatchStudent} from "@/api/onlineEducation/batch"; |
| | | import {useRoute} from 'vue-router' |
| | | import {useRoute, useRouter} from 'vue-router' |
| | | const route = useRoute() |
| | | |
| | | |
| | |
| | | const loading = ref(false); |
| | | const dialogRef = ref(); |
| | | const tableRef = ref(); |
| | | const router = useRouter(); |
| | | const data = reactive({ |
| | | queryParams: { |
| | | pageId: null, |
| | | phaseId: null, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | studentName: '' |
| | | }, |
| | | total: 0, |
| | | dataList: [], |
| | |
| | | |
| | | const { queryParams, total, dataList } = toRefs(data); |
| | | |
| | | const backValue = ref() |
| | | onMounted(async ()=>{ |
| | | const userInfo = JSON.parse(Cookies.get('userInfo')) |
| | | console.log("userInfo",userInfo) |
| | |
| | | data.isAdmin = false; |
| | | } |
| | | const val = JSON.parse(route.query.val) |
| | | backValue.value = val |
| | | // data.queryParams.pageId = val.id |
| | | data.queryParams.phaseId = val.id |
| | | await getList() |
| | |
| | | |
| | | /** 重置新增的表单以及其他数据 */ |
| | | function reset() { |
| | | proxy.resetForm("roleRef"); |
| | | data.queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | studentName: '', |
| | | phaseId: data.queryParams.phaseId, |
| | | pageId: data.queryParams.pageId |
| | | } |
| | | |
| | | getList() |
| | | } |
| | | const handleSelectionChange = (val) => { |
| | | |
| | |
| | | } |
| | | }) |
| | | } |
| | | const back = () => { |
| | | |
| | | const obj = { |
| | | pageNum: backValue.value.pageNum, |
| | | pageSize: backValue.value.pageSize, |
| | | } |
| | | const v = JSON.stringify(obj) |
| | | router.push({ path: "/class", query: { val: v } }); |
| | | } |
| | | |
| | | |
| | | </script> |