| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div style="margin-bottom: 10px"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="Plus" |
| | | @click="openDialog('add',{})" |
| | | >新增</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('add',{})" |
| | | >新增</el-button> |
| | | </el-form-item> |
| | | <el-form-item label="姓名:" > |
| | | <el-input v-model="data.queryParams.name" 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-table v-loading="loading" :data="dataList" :border="true"> |
| | |
| | | </el-table-column> |
| | | <el-table-column label="手机号" prop="phone" align="center" width="130"/> |
| | | <el-table-column label="身份证" prop="idNo" align="center" width="200" :show-overflow-tooltip="true"/> |
| | | <el-table-column label="创建人" prop="createBy" align="center"/> |
| | | <el-table-column label="创建人" prop="createBy" align="center"> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.createUser.name}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="工作岗位" prop="post" align="center"/> |
| | | <el-table-column label="职务" prop="duty" align="center"/> |
| | | <el-table-column label="一人一档" prop="duty" align="center" width="120"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary">培训考试记录</el-button> |
| | | <el-button link type="primary" @click="openRecord(scope.row)">培训考试记录</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180"> |
| | |
| | | /> |
| | | |
| | | <stu-dialog ref="dialogRef" @getList=getList></stu-dialog> |
| | | <record ref="recordRef" @getList=getList></record> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import {delCompany, getCompany} from "@/api/onlineEducation/company"; |
| | | import stuDialog from "./components/stuDialog.vue" |
| | | import record from './components/trainRecord.vue' |
| | | import {delUser, getUser} from "@/api/onlineEducation/user"; |
| | | import Cookies from "js-cookie"; |
| | | import {delStudent, getStudent} from "@/api/onlineEducation/student"; |
| | |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | | const dialogRef = ref(); |
| | | const recordRef =ref(); |
| | | const data = reactive({ |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | name: '' |
| | | }, |
| | | total: 0, |
| | | dataList: [], |
| | |
| | | |
| | | /** 重置新增的表单以及其他数据 */ |
| | | function reset() { |
| | | proxy.resetForm("roleRef"); |
| | | data.queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | name: '' |
| | | } |
| | | getList() |
| | | } |
| | | const handleDelete = (val) => { |
| | | ElMessageBox.confirm( |
| | |
| | | } |
| | | }) |
| | | } |
| | | const openRecord = (val) => { |
| | | recordRef.value.openDialog(val) |
| | | } |
| | | |
| | | </script> |