ly 3 år sedan
förälder
incheckning
44b6d5bbf0

+ 11 - 0
master/src/main/java/com/ruoyi/project/training/spec/controller/TStSuccessorController.java

@@ -1,6 +1,9 @@
 package com.ruoyi.project.training.spec.controller;
 
 import java.util.List;
+
+import com.ruoyi.project.plant.domain.TStaffmgr;
+import com.ruoyi.project.plant.service.ITStaffmgrService;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -33,6 +36,9 @@ public class TStSuccessorController extends BaseController
     @Autowired
     private ITStSuccessorService tStSuccessorService;
 
+    @Autowired
+    private ITStaffmgrService tStaffmgrService;
+
     /**
      * 查询继任者清单列表
      */
@@ -42,6 +48,11 @@ public class TStSuccessorController extends BaseController
     {
         startPage();
         List<TStSuccessor> list = tStSuccessorService.selectTStSuccessorList(tStSuccessor);
+        for (TStSuccessor t: list
+             ) {
+            TStaffmgr staffmgr = tStaffmgrService.selectTStaffmgrByStaffId(t.getStaffId());
+            t.setStaff(staffmgr);
+        }
         return getDataTable(list);
     }
 

+ 11 - 0
master/src/main/java/com/ruoyi/project/training/spec/domain/TStSuccessor.java

@@ -4,6 +4,7 @@ import java.util.Date;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.framework.aspectj.lang.annotation.Excel;
 import com.ruoyi.framework.web.domain.BaseEntity;
+import com.ruoyi.project.plant.domain.TStaffmgr;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
@@ -24,6 +25,8 @@ public class TStSuccessor extends BaseEntity
     @Excel(name = "培训员工编号")
     private String staffId;
 
+    private TStaffmgr staff;
+
     /** 培训员工编号 */
     @Excel(name = "培训员工姓名")
     private String staffName;
@@ -204,6 +207,14 @@ public class TStSuccessor extends BaseEntity
         this.mentorStaffName = mentorStaffName;
     }
 
+    public TStaffmgr getStaff() {
+        return staff;
+    }
+
+    public void setStaff(TStaffmgr staff) {
+        this.staff = staff;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 4 - 2
master/src/main/resources/mybatis/training/spec/TStSuccessorMapper.xml

@@ -20,9 +20,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="deptName" column="dept_name" />
     </resultMap>
 
+
     <sql id="selectTStSuccessorVo">
-          select d.id, d.staff_id,t.name as staffName,m.name as mentorStaffName, d.remarks, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.actualpost, d.mentor_staff_id, d.state ,s.dept_name from t_st_successor d
-          left join sys_dept s on s.dept_id = d.dept_id
+          select d.id, d.staff_id,t.name as staffName,m.name as mentorStaffName, d.remarks, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.actualpost, d.mentor_staff_id, d.state ,s.dept_name
+         from t_st_successor d
+         left join sys_dept s on s.dept_id = d.dept_id
           left join t_staffmgr t on t.staffid = d.staff_id
           left join t_staffmgr m on m.staffid = d.mentor_staff_id
     </sql>

+ 35 - 12
ui/src/views/training/spec/successor/index.vue

@@ -87,13 +87,21 @@
 
     <el-table v-loading="loading" :data="successorList" @selection-change="handleSelectionChange" :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="员工编号" align="center" prop="staffId" :show-overflow-tooltip="true"/>
+      <el-table-column label="培训员工" align="center" prop="staff.name" :show-overflow-tooltip="true"/>
+      <el-table-column label="当前岗位" align="center" prop="staff.actualpost" :formatter="postFormat" />
+      <el-table-column label="班值" align="center" prop="staff.team" :formatter="teamFormat" />
       <el-table-column label="目标岗位" align="center" prop="actualpost" :formatter="actualpostFormat" />
-      <el-table-column label="培训员工编号" align="center" prop="staffName" :show-overflow-tooltip="true"/>
-      <el-table-column label="导师员工编号" align="center" prop="mentorStaffName" :show-overflow-tooltip="true"/>
+      <el-table-column label="导师" align="center" prop="mentorStaffName" :show-overflow-tooltip="true"/>
       <el-table-column label="培训状态" align="center" prop="state" :show-overflow-tooltip="true"/>
-      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
+      <el-table-column label="一季度" align="center" prop="" :show-overflow-tooltip="true"/>
+      <el-table-column label="二季度" align="center" prop="" :show-overflow-tooltip="true"/>
+      <el-table-column label="三季度" align="center" prop="" :show-overflow-tooltip="true"/>
+      <el-table-column label="四季度" align="center" prop="" :show-overflow-tooltip="true"/>
+      <el-table-column label="年度" align="center" prop="" :show-overflow-tooltip="true"/>
       <el-table-column label="部门" align="center" prop="deptName" :show-overflow-tooltip="true"/>
-      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
+      <el-table-column label="操作" align="center" fixed="right" width="200" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -103,7 +111,7 @@
           <el-button
             size="mini"
             type="text"
-            @click="planList(scope.row)"
+            @click="openStaffResume(scope.row)"
           >一人一档</el-button>
           <el-button
             size="mini"
@@ -140,9 +148,6 @@
         <el-form-item label="备注" prop="remarks">
           <el-input v-model="form.remarks" placeholder="请输入备注" />
         </el-form-item>
-        <el-form-item label="部门编号" prop="deptId">
-          <el-input v-model="form.deptId" placeholder="请输入部门编号" />
-        </el-form-item>
         <el-form-item label="目标岗位" prop="actualpost">
           <el-select v-model="form.actualpost" placeholder="请选择目标岗位">
             <el-option
@@ -198,6 +203,7 @@
               <el-button @click="upload.open = false">取 消</el-button>
           </div>
       </el-dialog>
+    <staff-resume v-if="staffResumeVisible" ref="staffResume"></staff-resume>
   </div>
 </template>
 
@@ -207,14 +213,16 @@ import { treeselect } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import StaffResume from "./staffResume"
 
 export default {
   name: "Successor",
-  components: { Treeselect },
+  components: { Treeselect,StaffResume },
   data() {
     return {
       // 遮罩层
       loading: true,
+      staffResumeVisible: false,
       // 选中数组
       ids: [],
       // 非单个禁用
@@ -236,6 +244,7 @@ export default {
       open: false,
       // 目标岗位字典
       actualpostOptions: [],
+      teamOptions: [],
         // 用户导入参数
         upload: {
             // 是否显示弹出层(用户导入)
@@ -263,9 +272,6 @@ export default {
       form: {},
       // 表单校验
       rules: {
-        deptId: [
-          { required: true, message: "部门编号不能为空", trigger: "blur" }
-        ],
       }
     };
   },
@@ -285,6 +291,9 @@ export default {
     this.getDicts("ACTUALPOST").then(response => {
       this.actualpostOptions = response.data;
     });
+    this.getDicts("TEAM_DIVIDE").then(response => {
+      this.teamOptions = response.data;
+    });
   },
   methods: {
     /** 查询继任者清单列表 */
@@ -302,10 +311,18 @@ export default {
               this.deptOptions = response.data;
           });
      },
+    // 当前岗位字典翻译
+    postFormat(row, column) {
+      return this.selectDictLabel(this.actualpostOptions, row.staff.actualpost);
+    },
     // 目标岗位字典翻译
     actualpostFormat(row, column) {
       return this.selectDictLabel(this.actualpostOptions, row.actualpost);
     },
+    // 班值字典翻译
+    teamFormat(row, column) {
+      return this.selectDictLabel(this.teamOptions, row.staff.team);
+    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -438,6 +455,12 @@ export default {
       planList(row){
         const staffId = row.staffId
         this.$router.push("/training/spec/successorPlan/" + staffId);
+      },
+      openStaffResume(row){
+        this.staffResumeVisible = true
+        this.$nextTick(() => {
+          this.$refs.staffResume.init(row)
+        })
       }
   }
 };

+ 231 - 0
ui/src/views/training/spec/successor/staffResume.vue

@@ -0,0 +1,231 @@
+<template>
+  <el-dialog :title="$t('一人一档')" :visible.sync="visible" width="1200px" append-to-body>
+    <el-card>
+      <div slot="header" class="clearfix">
+        <span>基本资料</span>
+      </div>
+      <div class="el-descriptions">
+        <div class="el-descriptions__body">
+          <table class="el-descriptions__table is-bordered el-descriptions--big" style="border: 1px solid #e6ebf5;">
+            <tbody>
+            <tr class="el-descriptions-row" rowspan="3">
+              <th colspan="1" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label "> 姓名</th>
+              <td colspan="1" class="el-descriptions-item__cell el-descriptions-item__content"> {{staff.name}}</td>
+              <th colspan="1" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label "> 性别</th>
+              <td colspan="1" class="el-descriptions-item__cell el-descriptions-item__content" > {{sexFormat(staff)}}</td>
+              <th colspan="1" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label "> 年龄</th>
+              <td colspan="1" class="el-descriptions-item__cell el-descriptions-item__content">{{staff.birthday}}</td>
+              <td colspan="1" rowspan="3" class="el-descriptions-item__cell el-descriptions-item__content">
+                <img :src="staff.photo"  />
+              </td>
+            </tr>
+            </tbody>
+            <tbody>
+            <tr class="el-descriptions-row">
+              <th colspan="1" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label "> 学历</th>
+              <td colspan="1" class="el-descriptions-item__cell el-descriptions-item__content">{{educationFormat(staff)}}</td>
+              <th colspan="1" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label "> 专业</th>
+              <td colspan="1" class="el-descriptions-item__cell el-descriptions-item__content">{{staff.birthday}}</td>
+              <th colspan="1" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label "> 工号</th>
+              <td colspan="1" class="el-descriptions-item__cell el-descriptions-item__content">{{staff.staffid}}</td>
+            </tr>
+            </tbody>
+            <tbody>
+            <tr class="el-descriptions-row">
+              <th colspan="1" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label "> 入职时间
+              </th>
+              <td colspan="1" class="el-descriptions-item__cell el-descriptions-item__content"></td>
+              <th colspan="1" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label "> 当前岗位
+              </th>
+              <td colspan="3" class="el-descriptions-item__cell el-descriptions-item__content">{{actualpostFormat(staff)}}</td>
+            </tr>
+            </tbody>
+          </table>
+        </div>
+      </div>
+    </el-card>
+    <el-card>
+      <div slot="header" class="clearfix">
+        <span>公司级培训</span>
+      </div>
+    </el-card>
+    <el-card>
+      <div slot="header" class="clearfix">
+        <span>装置级培训</span>
+      </div>
+    </el-card>
+    <el-card>
+      <div slot="header" class="clearfix">
+        <span>专项培训</span>
+      </div>
+      <el-table :data="planList"  border>
+        <el-table-column label="培训内容" align="center" prop="plantName" :show-overflow-tooltip="true"/>
+        <el-table-column label="开始日期" align="center" prop="startDate" width="100">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="结束日期" align="center" prop="endDate" width="100">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="学时" align="center" prop="classHour" :show-overflow-tooltip="true"/>
+        <el-table-column label="具体内容" align="center" prop="classContent" :show-overflow-tooltip="true"/>
+        <el-table-column label="评分" align="center" prop="classContent" :show-overflow-tooltip="true"/>
+      </el-table>
+    </el-card>
+  </el-dialog>
+</template>
+
+<script>
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import {listPlan} from "@/api/training/spec/plan";
+
+export default {
+  name: "Resume",
+  components: {Treeselect},
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      visible: false,
+      // 选中数组
+      ids: [],
+      staff: null,
+      dataListSelections: [],
+      // 装置名称字典
+      plantCodeOptions: [],
+      // 性别字典
+      sexOptions: [],
+      // 部门字典
+      unitOptions: [],
+      // 班值字典
+      teamOptions: [],
+      // 实际岗位字典
+      actualpostOptions: [],
+      // 学历字典
+      educationOptions: [],
+      // 英语能力字典
+      enAbilityOptions: [],
+      // 特殊职能字典
+      specialDutyOptions: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 培训计划表格数据
+      planList: [],
+      // 弹出层标题
+      title: "",
+      // 操作
+      operation: "",
+      // 部门树选项
+      deptOptions: undefined,
+      clientHeight: 300,
+      // 是否显示弹出层
+      open: false,
+      // 学习状态字典
+      studyStateOptions: [],
+      // 学员列表
+      successorOptions: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        staffId: null,
+        plantName: null,
+        startDate: null,
+        endDate: null,
+        classHour: null,
+        studyState: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {}
+    };
+  },
+  watch: {},
+  created() {
+    this.getDicts("PLANT_DIVIDE").then(response => {
+      this.plantCodeOptions = response.data;
+    });
+    this.getDicts("sys_user_sex").then(response => {
+      this.sexOptions = response.data;
+    });
+    this.getDicts("STAFF_UNIT").then(response => {
+      this.unitOptions = response.data;
+    });
+    this.getDicts("TEAM_DIVIDE").then(response => {
+      this.teamOptions = response.data;
+    });
+    this.getDicts("ACTUALPOST").then(response => {
+      this.actualpostOptions = response.data;
+    });
+    this.getDicts("EDUCATION").then(response => {
+      this.educationOptions = response.data;
+    });
+    this.getDicts("ENGLISHABILITY").then(response => {
+      this.enAbilityOptions = response.data;
+    });
+    this.getDicts("SPECIAL_DUTY").then(response => {
+      this.specialDutyOptions = response.data;
+    });
+    this.getPlanList()
+  },
+  methods: {
+    init(row) {
+      this.visible = true
+      this.staff = row.staff
+      this.queryParams.staffId = row.staff.staffid
+    },
+    /** 查询培训计划列表 */
+    getPlanList() {
+      this.loading = true;
+      listPlan(this.queryParams).then(response => {
+        this.planList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 装置名称字典翻译
+    plantCodeFormat(row, column) {
+      return this.selectDictLabel(this.plantCodeOptions, row.plantCode);
+    },
+    // 性别字典翻译
+    sexFormat(row, column) {
+      return this.selectDictLabel(this.sexOptions, row.sex);
+    },
+    // 部门字典翻译
+    unitFormat(row, column) {
+      return this.selectDictLabel(this.unitOptions, row.unit);
+    },
+    // 班值字典翻译
+    teamFormat(row, column) {
+      return this.selectDictLabel(this.teamOptions, row.team);
+    },
+    // 实际岗位字典翻译
+    actualpostFormat(row, column) {
+      return this.selectDictLabel(this.actualpostOptions, row.actualpost);
+    },
+    // 学历字典翻译
+    educationFormat(row, column) {
+      return this.selectDictLabel(this.educationOptions, row.education);
+    },
+    // 英语能力字典翻译
+    enAbilityFormat(row, column) {
+      return this.selectDictLabel(this.enAbilityOptions, row.enAbility);
+    },
+    // 特殊职能字典翻译
+    specialDutyFormat(row, column) {
+      return this.selectDictLabel(this.specialDutyOptions, row.specialDuty);
+    },
+  }
+};
+</script>