From a7a1a10bcda202b3e2aef9dd0ab176cc7ff70359 Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期二, 05 三月 2024 13:39:33 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/notCoalMine/nTrainManage/index.vue | 330 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 330 insertions(+), 0 deletions(-) diff --git a/src/views/notCoalMine/nTrainManage/index.vue b/src/views/notCoalMine/nTrainManage/index.vue new file mode 100644 index 0000000..476f215 --- /dev/null +++ b/src/views/notCoalMine/nTrainManage/index.vue @@ -0,0 +1,330 @@ +<template> + <div class="app-container"> +<!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">--> +<!-- <el-form-item label="用户姓名" prop="userName">--> +<!-- <el-input--> +<!-- v-model="queryParams.name"--> +<!-- placeholder="请输入用户姓名"--> +<!-- clearable--> +<!-- @keyup.enter.native="handleQuery"--> +<!-- />--> +<!-- </el-form-item>--> +<!-- <el-form-item label="身份证号" prop="idCard">--> +<!-- <el-input--> +<!-- v-model="queryParams.idCard"--> +<!-- placeholder="请输入身份证号"--> +<!-- clearable--> +<!-- @keyup.enter.native="handleQuery"--> +<!-- />--> +<!-- </el-form-item>--> +<!-- <el-form-item label="单位名称" prop="dept">--> +<!-- <el-input--> +<!-- v-model="queryParams.dept"--> +<!-- placeholder="请输入单位名称"--> +<!-- clearable--> +<!-- @keyup.enter.native="handleQuery"--> +<!-- />--> +<!-- </el-form-item>--> +<!-- <el-form-item label="操作类型">--> +<!-- <el-cascader--> +<!-- v-model="queryParams.operateTypeId"--> +<!-- :options="typeList"--> +<!-- :show-all-levels="false"--> +<!-- :props="{ expandTrigger: 'hover', value: 'id',label: 'name',emitPath:false}"--> +<!-- @change="handleChange"></el-cascader>--> +<!-- </el-form-item>--> +<!-- <el-form-item>--> +<!-- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>--> +<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>--> +<!-- </el-form-item>--> +<!-- </el-form>--> + + <el-row :gutter="10" class="mb8"> + <el-col :span="1.5"> + <el-button + type="primary" + plain + size="mini" + @click="openViolation({},'add')" + v-hasPermi="['system:experts:add']" + >新增培训计划</el-button> + </el-col> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> + </el-row> + <el-table v-loading="loading" :data="dataList"> + <el-table-column label="计划名称" align="center" prop="name" /> + <el-table-column label="课程信息" align="center" prop="info" /> + <el-table-column label="培训时间从" align="center" prop="startTime"/> + <el-table-column label="培训时间至" align="center" prop="endTime"/> + <el-table-column label="报名学员清单" align="center" prop="sheet"/> + <el-table-column label="培训人数" align="center" prop="num"/> + <el-table-column label="合格人数" align="center" prop="passNum"/> + <el-table-column label="过程追溯" align="center"> + <template #default="scope"> + <el-button + size="mini" + type="text" + @click="openRecord(scope.row,'view')" + >培训记录</el-button> + </template> + </el-table-column> + <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> + <template #default="scope"> + <el-button + size="mini" + type="text" + icon="el-icon-view" + @click="openViolation(scope.row,'view')" + >查看详情</el-button> + <el-button + size="mini" + type="text" + icon="el-icon-edit" + @click="openViolation(scope.row,'edit')" + v-hasPermi="['system:experts:remove']" + >编辑</el-button> + <el-button + size="mini" + type="text" + style="color: red" + icon="el-icon-delete" + @click="handleDelete(scope.$index)" + v-hasPermi="['system:experts:remove']" + >删除</el-button> + </template> + </el-table-column> + </el-table> + <pagination + v-show="total>0" + :total="total" + :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" + @pagination="getList" + /> + <trainPlan-dialog ref="trainPlanDialog" @getList="getList" :typeList="typeList"></trainPlan-dialog> + <el-dialog + title="培训记录" + :visible.sync="recordDialog" + append-to-body + width="50%" + > + <el-table :data="record" border> + <el-table-column label="时间" align="center" prop="time" /> + <el-table-column label="课程" align="center" prop="class" /> + <el-table-column label="教师" align="center" prop="teacher" /> + <el-table-column label="缺课学员" align="center" prop="missStudent" /> + </el-table> + <span slot="footer" class="dialog-footer"> + <el-button type="primary" @click="recordDialog = false">确定</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> + +import trainPlanDialog from "@/views/notCoalMine/nTrainManage/components/trainPlanDialog.vue"; +import {delViolation, getViolationPage} from "@/api/coalMine/violation"; +import {getOperatePage} from "@/api/coalMine/operateType"; +import {delPeople} from "@/api/coalMine/people"; +export default { + name: "cTrainManage", + dicts: [], + components: { + trainPlanDialog + }, + data() { + return { + violationDialog: '', + loading: false, + showSearch: true, + recordDialog: false, + dataList: [ + { + name: '计划1', + info: '--', + startTime: '2024-02-24', + endTime: '2024-03-05', + sheet: '19', + num: '19', + passNum: '19', + dep: '--', + trainWay: 0, + cardDep: '--', + classes: [ + { + id: 1, + name: '--', + time: 5, + teacher: '--' + }, + { + id: 5, + name: '--', + time: 4, + teacher: '--' + } + ], + students: [ + { + id: 1, + name: '--', + idCard: 666, + sex: '男', + time: 9 + }, + { + id: 5, + name: '--', + idCard: 888, + sex: '女', + time: 9 + } + ], + history: [] + }, + { + name: '计划2', + info: '--', + startTime: '2024-02-24', + endTime: '2024-03-04', + sheet: '19', + num: '19', + passNum: '19', + dep: '--', + trainWay: 0, + cardDep: '--', + classes: [ + { + id: 1, + name: '--', + time: 5, + teacher: '--' + }, + { + id: 5, + name: '--', + time: 4, + teacher: '--' + } + ], + students: [ + { + id: 1, + name: '--', + idCard: 666, + sex: '男', + time: 9 + }, + { + id: 5, + name: '--', + idCard: 888, + sex: '女', + time: 9 + } + ], + history: [] + } + ], + total: 0, + typeList: [], + queryParams: { + name: '', + idCard:'', + dept: '', + operateTypeId: null, + isCm: 0, + pageNum: 1, + pageSize: 10 + }, + record: [] + }; + }, + created() { + // this.getList() + // this.getTypeList() + }, + methods: { + async getList(){ + const t = this + t.loading = true + const res = await getViolationPage(t.queryParams) + if(res.code == 200){ + t.dataList = res.rows + t.total = res.total + }else{ + t.$message({ + message: res.msg, + type: 'warning' + }) + } + t.loading = false + }, + async getTypeList() { + this.loading = true; + const res = await getOperatePage({name: ''}) + if(res.code == 200){ + this.typeList = this.handleTree(res.data, "id"); + }else{ + this.$message({ + type: 'warning', + message: res.msg + }); + } + this.loading = false; + }, + handleChange(){ + + }, + openRecord(){ + this.recordDialog = true + }, + handleDelete(index){ + this.$confirm('此操作将永久删除该条数据, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.dataList.splice(index,1); + this.$message.success('删除成功') + // const res = await delViolation(row.violationId) + // if(res.code == 200){ + // this.$message({ + // type: 'success', + // message: '删除成功!' + // }); + // await this.getList() + // }else{ + // this.$message({ + // type: 'warning', + // message: res.msg + // }); + // } + + }).catch(() => { + + }); + }, + handleQuery(){ + this.queryParams.pageNum = 1 + this.getList() + }, + resetQuery(){ + this.queryParams = { + name: '', + idCard:'', + dept: '', + operateTypeId: null, + isCm: 0, + pageNum: 1, + pageSize: 10 + } + this.getList() + }, + openViolation(data,type){ + this.$refs.trainPlanDialog.openDialog(data,type); + } + } +}; +</script> -- Gitblit v1.9.2