Browse Source

上岗证/作业证书一览表 - 一人一档

wangggziwen 1 year ago
parent
commit
6ddf4ba4ac

+ 7 - 0
master/src/main/java/com/ruoyi/project/plant/controller/TStaffmgrController.java

@@ -486,6 +486,13 @@ public class TStaffmgrController extends BaseController {
         return AjaxResult.success(staffmgr);
     }
 
+    @PreAuthorize("@ss.hasPermi('plant:staffmgr:query')")
+    @GetMapping(value = "/staffid/{id}")
+    public AjaxResult getInfoByStaffId(@PathVariable("id") String id) {
+        TStaffmgr staffmgr = tStaffmgrService.selectTStaffmgrByStaffId(id);
+        return AjaxResult.success(staffmgr);
+    }
+
     /**
      * 为参培人员名单获取人员管理详细信息
      */

+ 1 - 2
master/src/main/resources/mybatis/common/TCommonfileMapper.xml

@@ -24,8 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTCommonfileVo">
-        select d.id, d.p_value, d.p_date , d.p_id, d.file_name, d.file_url, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.remarks, d.p_type ,s.dept_name from t_commonfile d
-      left join sys_dept s on s.dept_id = d.dept_id
+        select d.id, d.p_value, d.p_date , d.p_id, d.file_name, d.file_url, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.remarks, d.p_type from t_commonfile d
     </sql>
 
     <select id="selectTCommonfileList" parameterType="TCommonfile" resultMap="TCommonfileResult">

+ 7 - 0
ui/src/api/plant/staffmgr.js

@@ -169,6 +169,13 @@ export function getStaffmgr(id) {
   })
 }
 
+export function getStaffmgrByStaffid(id) {
+  return request({
+    url: '/plant/staffmgr/staffid/' + id,
+    method: 'get'
+  })
+}
+
 // 删除人员管理
 export function selectByStaffId(staffIds) {
   return request({

+ 15 - 1
ui/src/views/training/worklicensecertificate/index.vue

@@ -621,6 +621,11 @@
       <!--<el-table-column label="部门编号" align="center" prop="deptId" :show-overflow-tooltip="true"/>-->
       <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
         <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            @click="openStaffResume(scope.row)"
+          >一人一档</el-button>
           <el-button
             size="mini"
             type="text"
@@ -1026,6 +1031,7 @@
         <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
       </div>
     </el-dialog>
+    <staff-resume v-if="staffResumeVisible" ref="staffResume"></staff-resume>
   </div>
 </template>
 
@@ -1036,10 +1042,11 @@ import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {addCommonfile, allFileList, delCommonfile, updateCommonfile} from "@/api/common/commonfile";
+import StaffResume from "./staffResume"
 
 export default {
   name: "Worklicensecertificate",
-  components: { Treeselect },
+  components: { Treeselect, StaffResume },
   data() {
     return {
       // 遮罩层
@@ -1184,6 +1191,7 @@ export default {
         pageTotalNum: 1,
         loadedRatio: 0,
       },
+      staffResumeVisible: false,
     };
   },
   watch: {
@@ -1201,6 +1209,12 @@ export default {
     this.getTreeselect();
   },
   methods: {
+    openStaffResume(row){
+      this.staffResumeVisible = true
+      this.$nextTick(() => {
+        this.$refs.staffResume.init(row)
+      })
+    },
     /** 删除按钮操作 */
     handleDeleteDoc(row) {
       const ids = row.id || this.ids;

+ 315 - 0
ui/src/views/training/worklicensecertificate/staffResume.vue

@@ -0,0 +1,315 @@
+<template>
+  <el-dialog  :close-on-click-modal="false" :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="table-layout: fixed;border: 1px solid #e6ebf5;">
+            <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"> {{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">{{unitFormat(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">{{teamFormat(staff)}}</td>
+              <td colspan="1" rowspan="3" >
+                <img :src="photo"  style="width: 150px"/>
+              </td>
+            </tr>
+            <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">{{staff.staffid}}</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>
+            </tr>
+            <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="3" class="el-descriptions-item__cell el-descriptions-item__content">{{actualpostFormat(staff)}}</td>
+            </tr>
+          </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-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-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-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-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-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";
+  import {listParticipants} from "@/api/training/participants";
+  import {listDevice} from "@/api/training/device";
+  import { getStaffmgrByStaffid } from "@/api/plant/staffmgr";
+  import {getCommonfile} from "@/api/common/commonfile";
+
+  export default {
+    name: "Resume",
+    components: {Treeselect},
+    data() {
+      return {
+        // 遮罩层
+        loading: false,
+        planLoading: false,
+        visible: false,
+        // 选中数组
+        ids: [],
+        staff: {},
+        photo: '',
+        dataListSelections: [],
+        // 装置名称字典
+        plantCodeOptions: [],
+        // 性别字典
+        sexOptions: [],
+        // 部门字典
+        unitOptions: [],
+        // 班值字典
+        teamOptions: [],
+        // 实际岗位字典
+        actualpostOptions: [],
+        // 学历字典
+        educationOptions: [],
+        // 英语能力字典
+        enAbilityOptions: [],
+        // 特殊职能字典
+        specialDutyOptions: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: false,
+        // 总条数
+        total: 0,
+        // 培养计划表格数据
+        planList: [],
+        // 人员-公司级培训关系表格数据
+        participantsList: [],
+        // 人员-装置级培训关系表格数据
+        devicceList: [],
+        // 弹出层标题
+        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
+        },
+        queryCompanyParams: {
+          staffId: null,
+          companyId: null,
+        },
+        queryDeviceParams: {
+          staffId: null,
+          regularId: null,
+          year: this.getNowTime(),
+          trainingType: 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;
+      });
+    },
+    methods: {
+      init(row) {
+        getStaffmgrByStaffid(row.employeeid).then(response => {
+          this.visible = true;
+          this.staff = response.data
+          this.photo = process.env.VUE_APP_BASE_API + response.data.photo
+          this.queryParams.employeeid = row.employeeid
+          this.getNowTime()
+        });
+      },
+      /** 获取当前年份 */
+      getNowTime() {
+        var now = new Date();
+        var year = now.getFullYear(); //得到年份
+        var defaultDate = `${year}`;
+        defaultDate = `${year}`
+        return defaultDate;
+      },
+      /** 查询培养计划列表 */
+      getPlanList() {
+        this.planLoading = true;
+        this.queryParams.year = this.queryDeviceParams.year
+        listPlan(this.queryParams).then(response => {
+          this.planList = response.rows;
+          this.total = response.total;
+          this.planLoading = false;
+        });
+      },
+      getParticipants() {
+        this.queryCompanyParams.staffId = this.staff.staffid
+        // this.queryCompanyParams.year = this.queryDeviceParams.year
+        listParticipants(this.queryCompanyParams).then(response => {
+          this.participantsList = response.rows;
+        });
+      },
+      getDevice() {
+        this.queryDeviceParams.staffId = this.staff.staffid
+        listDevice(this.queryDeviceParams).then(response => {
+          this.devicceList = response.rows;
+        });
+      },
+      staffPlanQuery (){
+        this.getPlanList()
+      },
+      // 装置名称字典翻译
+      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>