| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div style="margin-bottom: 10px;display: flex;align-items: center;justify-content: space-between"> |
| | | <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 label="考试是否完成:" > |
| | | <el-select |
| | | v-model="data.queryParams.completed" |
| | | class="w100" |
| | | style="max-width: 180px" |
| | | clearable |
| | | size="default" |
| | | > |
| | | <el-option v-for="item in data.completeList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </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="primary" |
| | | type="danger" |
| | | plain |
| | | icon="Plus" |
| | | @click="openDialog()" |
| | | >选择学员</el-button> |
| | | icon="Delete" |
| | | @click="handleDeleteBatch" |
| | | >批量删除</el-button> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | @click="back" |
| | | >返回</el-button> |
| | | </div> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="Delete" |
| | | @click="handleDeleteBatch" |
| | | >批量删除</el-button> |
| | | |
| | | </div> |
| | | <!-- 表格数据 --> |
| | | <el-table ref="tableRef" v-loading="loading" :data="dataList" :border="true" :row-key="getRowKey" @selection-change="handleSelectionChange"> |
| | |
| | | const data = reactive({ |
| | | queryParams: { |
| | | paperId: null, |
| | | studentName: '', |
| | | completed: null, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | }, |
| | | total: 0, |
| | | dataList: [], |
| | | isAdmin: false, |
| | | chooseStu: [] |
| | | chooseStu: [], |
| | | completeList: [ |
| | | { |
| | | id: 1, |
| | | name: '是' |
| | | }, |
| | | { |
| | | id: 0, |
| | | name: '否' |
| | | } |
| | | ] |
| | | |
| | | }); |
| | | |
| | |
| | | |
| | | /** 重置新增的表单以及其他数据 */ |
| | | function reset() { |
| | | proxy.resetForm("roleRef"); |
| | | data.queryParams = { |
| | | paperId: data.queryParams.paperId, |
| | | studentName: '', |
| | | completed: null, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | } |
| | | getList() |
| | | } |
| | | const handleSelectionChange = (val) => { |
| | | |