|
|
@@ -1,31 +1,56 @@
|
|
|
<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="教育培训计划Id" prop="planId">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="4" :xs="24">
|
|
|
+ <org-tree v-model="queryParams.orgId" @defaultKey="getDefaultKey" @checkChange="checkChange"
|
|
|
+ @click="clickTreeNode"></org-tree>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="20" :xs="24">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
+
|
|
|
+ <el-form-item label="培训主题" prop="title">
|
|
|
<el-input
|
|
|
- v-model="queryParams.planId"
|
|
|
- placeholder="请输入教育培训计划Id"
|
|
|
+ v-model="queryParams.title"
|
|
|
+ placeholder="请输入培训岗位"
|
|
|
clearable
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="培训岗位" prop="roleId">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.roleId"
|
|
|
- placeholder="请输入培训岗位"
|
|
|
+ <el-form-item label="培训类型" prop="type">
|
|
|
+ <el-select v-model="queryParams.type" placeholder="请选择执行机构类型" clearable>
|
|
|
+ <el-option
|
|
|
+ v-for="dict in dict.type.edu_type"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="培训状态" prop="status">
|
|
|
+ <!-- <el-input
|
|
|
+ v-model="queryParams.status"
|
|
|
+ placeholder=""
|
|
|
clearable
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
+ /> -->
|
|
|
+ <el-select v-model="queryParams.status" placeholder="请选择培训状态" clearable>
|
|
|
+ <el-option
|
|
|
+ v-for="dict in dict.type.edu_task_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="开始日期" prop="startDate">
|
|
|
- <el-date-picker clearable
|
|
|
- v-model="queryParams.startDate"
|
|
|
- type="date"
|
|
|
+ <el-form-item label="任务时间" prop="rangen">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="queryParams.range"
|
|
|
+ type="daterange"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
placeholder="请选择开始日期">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="截止日期" prop="endDate">
|
|
|
+ <!-- <el-form-item label="截止日期" prop="endDate">
|
|
|
<el-date-picker clearable
|
|
|
v-model="queryParams.endDate"
|
|
|
type="date"
|
|
|
@@ -112,14 +137,13 @@
|
|
|
clearable
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
- </el-form-item>
|
|
|
+ </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-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
@@ -163,65 +187,79 @@
|
|
|
>导出</el-button>
|
|
|
</el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
- </el-row>
|
|
|
+ </el-row> -->
|
|
|
|
|
|
- <el-table v-loading="loading" :data="eduTaskList" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="id" align="center" prop="id" />
|
|
|
- <el-table-column label="教育培训计划Id" align="center" prop="planId" />
|
|
|
- <el-table-column label="培训岗位" align="center" prop="roleId" />
|
|
|
- <el-table-column label="开始日期" align="center" prop="startDate" width="180">
|
|
|
+ <el-table height="550px" v-loading="loading" :data="eduTaskList" @selection-change="handleSelectionChange">
|
|
|
+ <!-- <el-table-column type="selection" width="55" align="center" /> -->
|
|
|
+ <!-- <el-table-column label="id" align="center" prop="id" /> -->
|
|
|
+ <!-- <el-table-column label="教育培训计划Id" align="center" prop="planId" /> -->
|
|
|
+
|
|
|
+ <el-table-column label="培训机构" align="center" prop="orgName" />
|
|
|
+ <el-table-column label="培训角色" align="center" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <template v-if="scope.row.taskRoleNameList ">
|
|
|
+ <el-tag size="mini" type="success" v-for="(item, index) in (scope.row.taskRoleNameList || '').split(',')"
|
|
|
+ :key="index">
|
|
|
+ {{ item }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="培训主题" align="center" prop="title" />
|
|
|
+ <el-table-column label="类型" align="center" >
|
|
|
<template slot-scope="scope">
|
|
|
+ <dict-tag :options="dict.type.edu_type" :value="scope.row.type"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="主持人" align="center" prop="hostName" />
|
|
|
+ <el-table-column label="开始日期" align="center" prop="startDate" width="180">
|
|
|
+ <!-- <template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d}') }}</span>
|
|
|
- </template>
|
|
|
+ </template> -->
|
|
|
</el-table-column>
|
|
|
<el-table-column label="截止日期" align="center" prop="endDate" width="180">
|
|
|
- <template slot-scope="scope">
|
|
|
+ <!-- <template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</span>
|
|
|
- </template>
|
|
|
+ </template> -->
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="实到人数" align="center" prop="actualCount" />
|
|
|
- <el-table-column label="内容" align="center" prop="content" />
|
|
|
- <el-table-column label="培训岗位名称" align="center" prop="roleName" />
|
|
|
- <el-table-column label="岗位id集合" align="center" prop="roleIds" />
|
|
|
- <el-table-column label="岗位名集合" align="center" prop="roleNames" />
|
|
|
- <el-table-column label="学习主题" align="center" prop="title" />
|
|
|
- <el-table-column label="总结" align="center" prop="note" />
|
|
|
- <el-table-column label="时间" align="center" prop="dateTime" width="180">
|
|
|
+ <el-table-column label="培训时间" align="center" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ parseTime(scope.row.dateTime, '{y}-{m}-{d}') }}</span>
|
|
|
+ <span>{{ parseTime(scope.row.trainingStartDateTime, '{y}-{m}-{d}') }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="应到人数" align="center" prop="dueCount" />
|
|
|
- <el-table-column label="主持人" align="center" prop="hostId" />
|
|
|
- <el-table-column label="附件" align="center" prop="fileList" />
|
|
|
- <el-table-column label="图片" align="center" prop="imageList" width="100">
|
|
|
+ <el-table-column label="状态" align="center" prop="status" >
|
|
|
<template slot-scope="scope">
|
|
|
- <image-preview :src="scope.row.imageList" :width="50" :height="50"/>
|
|
|
- </template>
|
|
|
+ <dict-tag :options="dict.type.edu_task_status" :value="scope.row.status"/>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="机构" align="center" prop="orgId" />
|
|
|
- <el-table-column label="记录人" align="center" prop="recorderId" />
|
|
|
- <el-table-column label="类型" align="center" prop="type" />
|
|
|
- <el-table-column label="机构名称" align="center" prop="orgName" />
|
|
|
- <el-table-column label="机构" align="center" prop="orgPath" />
|
|
|
- <el-table-column label="pdf下载地址" align="center" prop="pdfUrl" />
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
+ <el-table-column label="操作" width="120px" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
- @click="handleUpdate(scope.row)"
|
|
|
- v-hasPermi="['system:eduTask:edit']"
|
|
|
- >修改</el-button>
|
|
|
+ @click="handleDetail(scope.row.id)"
|
|
|
+ v-hasPermi="['system:eduTask:detail']"
|
|
|
+ >详情</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-delete"
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
+ @click="handleRecorded(scope.row.id)"
|
|
|
v-hasPermi="['system:eduTask:remove']"
|
|
|
- >删除</el-button>
|
|
|
+ >培训登记</el-button>
|
|
|
+ <!-- <el-button type="text" @click="onEdit(scope.row)">查看</el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="
|
|
|
+ r.row.auditFlag == 'PASS' &&
|
|
|
+ (isExecute || loginOrgId == r.row.orgId) && canPerform(r.row.eduJobIds)&&isOverOrUnStart(r.row)
|
|
|
+ "
|
|
|
+ @click="onPerform(r.row.id, r.row.eduJobIds, r.row.endDate)"
|
|
|
+ >执行
|
|
|
+ </el-button> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -233,7 +271,8 @@
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
@pagination="getList"
|
|
|
/>
|
|
|
-
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
<!-- 添加或修改教育任务对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
@@ -321,14 +360,27 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <dialog-info ref="infoDialog" @success="refresh(true)"></dialog-info>
|
|
|
+ <dialog-perform
|
|
|
+ ref="performDialog"
|
|
|
+ @success="refresh(true)"
|
|
|
+ ></dialog-perform>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { listEduTask, getEduTask, delEduTask, addEduTask, updateEduTask } from "@/api/core/edu/eduTask";
|
|
|
-
|
|
|
+import OrgTree from "@/components/orgTree";
|
|
|
+import DialogInfo from "./dialog.info";
|
|
|
+import DialogPerform from "./dialog.perform";
|
|
|
export default {
|
|
|
name: "EduTask",
|
|
|
+ dicts: ['edu_task_status', 'edu_type'],
|
|
|
+ components: {
|
|
|
+ DialogInfo,
|
|
|
+ DialogInfo,OrgTree
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
// 遮罩层
|
|
|
@@ -353,28 +405,12 @@ export default {
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- planId: null,
|
|
|
- roleId: null,
|
|
|
- startDate: null,
|
|
|
- endDate: null,
|
|
|
- actualCount: null,
|
|
|
- content: null,
|
|
|
- roleName: null,
|
|
|
- roleIds: null,
|
|
|
- roleNames: null,
|
|
|
+ checkSub:false,
|
|
|
title: null,
|
|
|
- note: null,
|
|
|
- dateTime: null,
|
|
|
- dueCount: null,
|
|
|
- hostId: null,
|
|
|
- fileList: null,
|
|
|
- imageList: null,
|
|
|
orgId: null,
|
|
|
- recorderId: null,
|
|
|
type: null,
|
|
|
- orgName: null,
|
|
|
- orgPath: null,
|
|
|
- pdfUrl: null,
|
|
|
+ status: null,
|
|
|
+ range: null,
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
@@ -389,6 +425,7 @@ export default {
|
|
|
created() {
|
|
|
this.getList();
|
|
|
},
|
|
|
+
|
|
|
methods: {
|
|
|
/** 查询教育任务列表 */
|
|
|
getList() {
|
|
|
@@ -407,33 +444,10 @@ export default {
|
|
|
// 表单重置
|
|
|
reset() {
|
|
|
this.form = {
|
|
|
- id: null,
|
|
|
- planId: null,
|
|
|
- roleId: null,
|
|
|
- startDate: null,
|
|
|
- endDate: null,
|
|
|
- actualCount: null,
|
|
|
- content: null,
|
|
|
- roleName: null,
|
|
|
- roleIds: null,
|
|
|
- roleNames: null,
|
|
|
- title: null,
|
|
|
- note: null,
|
|
|
- dateTime: null,
|
|
|
- dueCount: null,
|
|
|
- hostId: null,
|
|
|
- fileList: null,
|
|
|
- imageList: null,
|
|
|
- orgId: null,
|
|
|
- recorderId: null,
|
|
|
+ range:[],
|
|
|
+ title: null,
|
|
|
type: null,
|
|
|
- orgName: null,
|
|
|
- orgPath: null,
|
|
|
- pdfUrl: null,
|
|
|
- createBy: null,
|
|
|
- createTime: null,
|
|
|
- updateBy: null,
|
|
|
- updateTime: null
|
|
|
+ status : null,
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
|
@@ -447,6 +461,20 @@ export default {
|
|
|
this.resetForm("queryForm");
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
+ //单选框状态改变
|
|
|
+ checkChange(state) {
|
|
|
+ this.queryParams.checkSub = state;
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ getDefaultKey(key) {
|
|
|
+ this.queryParams.orgId = key;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ // 节点单击事件
|
|
|
+ clickTreeNode(data) {
|
|
|
+ this.queryParams.orgId = data.id;
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
@@ -460,14 +488,16 @@ export default {
|
|
|
this.title = "添加教育任务";
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
- handleUpdate(row) {
|
|
|
- this.reset();
|
|
|
- const id = row.id || this.ids
|
|
|
- getEduTask(id).then(response => {
|
|
|
- this.form = response.data;
|
|
|
- this.open = true;
|
|
|
- this.title = "修改教育任务";
|
|
|
- });
|
|
|
+ handleDetail(id) {
|
|
|
+ console.log("this.$refs",this.$refs["infoDialog"])
|
|
|
+ this.$refs["infoDialog"].show(id,{});
|
|
|
+ // this.reset();
|
|
|
+ // const id = row.id || this.ids
|
|
|
+ // getEduTask(id).then(response => {
|
|
|
+ // this.form = response.data;
|
|
|
+ // this.open = true;
|
|
|
+ // this.title = "修改教育任务";
|
|
|
+ // });
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|