From 1aa6aec8be8351a9bfe2d7629c4a30128eccde44 Mon Sep 17 00:00:00 2001 From: zhouwx <1175765986@qq.com> Date: 星期五, 19 七月 2024 17:27:57 +0800 Subject: [PATCH] 提交 --- src/views/onlineEducation/people/index.vue | 54 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 44 insertions(+), 10 deletions(-) diff --git a/src/views/onlineEducation/people/index.vue b/src/views/onlineEducation/people/index.vue index 2141fa2..93459d9 100644 --- a/src/views/onlineEducation/people/index.vue +++ b/src/views/onlineEducation/people/index.vue @@ -1,12 +1,30 @@ <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"> @@ -20,12 +38,16 @@ </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"> @@ -46,6 +68,7 @@ /> <stu-dialog ref="dialogRef" @getList=getList></stu-dialog> + <record ref="recordRef" @getList=getList></record> </div> </template> @@ -54,6 +77,7 @@ 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"; @@ -62,10 +86,12 @@ 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: [], @@ -113,7 +139,12 @@ /** 重置新增的表单以及其他数据 */ function reset() { - proxy.resetForm("roleRef"); + data.queryParams = { + pageNum: 1, + pageSize: 10, + name: '' + } + getList() } const handleDelete = (val) => { ElMessageBox.confirm( @@ -134,5 +165,8 @@ } }) } +const openRecord = (val) => { + recordRef.value.openDialog(val) +} </script> -- Gitblit v1.9.2