瀏覽代碼

LY 装置培训修改

ly 1 年之前
父節點
當前提交
17fdca58eb
共有 25 個文件被更改,包括 1447 次插入29 次删除
  1. 1 1
      master/pom.xml
  2. 1 1
      master/src/main/java/com/ruoyi/project/plant/controller/TMtdDailyController.java
  3. 5 0
      master/src/main/java/com/ruoyi/project/training/controller/TTrainingbccController.java
  4. 153 7
      master/src/main/java/com/ruoyi/project/training/controller/TTrainingbccDeviceController.java
  5. 2 0
      master/src/main/java/com/ruoyi/project/training/controller/TTrainingbccRegularController.java
  6. 24 0
      master/src/main/java/com/ruoyi/project/training/domain/TTrainingbcc.java
  7. 32 1
      master/src/main/java/com/ruoyi/project/training/domain/TTrainingbccDevice.java
  8. 2 2
      master/src/main/java/com/ruoyi/project/training/domain/TTrainingbccRegular.java
  9. 8 0
      master/src/main/java/com/ruoyi/project/training/elearn/domain/TElExam.java
  10. 22 0
      master/src/main/java/com/ruoyi/project/training/elearn/domain/TElRepo.java
  11. 37 1
      master/src/main/java/com/ruoyi/project/training/elearn/service/impl/TElPaperServiceImpl.java
  12. 2 1
      master/src/main/java/com/ruoyi/project/training/mapper/TTrainingbccDeviceMapper.java
  13. 0 1
      master/src/main/java/com/ruoyi/project/training/mapper/TTrainingbccMapper.java
  14. 1 0
      master/src/main/resources/mybatis/plant/TStaffmgrMapper.xml
  15. 11 2
      master/src/main/resources/mybatis/training/TTrainingbccDeviceMapper.xml
  16. 3 0
      master/src/main/resources/mybatis/training/TTrainingbccMapper.xml
  17. 1 2
      master/src/main/resources/mybatis/training/elearn/TElExamMapper.xml
  18. 11 3
      master/src/main/resources/mybatis/training/elearn/TElRepoMapper.xml
  19. 9 0
      ui/src/api/training/bccdevice.js
  20. 6 0
      ui/src/router/index.js
  21. 2 0
      ui/src/views/plant/confInfo/index.vue
  22. 4 5
      ui/src/views/training/bccdevice/index.vue
  23. 24 2
      ui/src/views/training/elearn/exam/index.vue
  24. 17 0
      ui/src/views/training/trainingbcc/index.vue
  25. 1069 0
      ui/src/views/training/trainingbcc/record.vue

+ 1 - 1
master/pom.xml

@@ -6,7 +6,7 @@
     <groupId>com.cpms</groupId>
     <artifactId>cpms</artifactId>
     <version>3.2.0</version>
-    <packaging>war</packaging>
+    <packaging>jar</packaging>
 
     <name>cpms</name>
     <description>cpms管理系统</description>

+ 1 - 1
master/src/main/java/com/ruoyi/project/plant/controller/TMtdDailyController.java

@@ -306,7 +306,7 @@ public class TMtdDailyController extends BaseController {
             logger.error("e" , e);
             return AjaxResult.error("邮件发送失败");
         }finally {
-            tMtdDailyService.updateTMtdDaily(daily);
+            tMtdDailyMapper.updateTMtdDaily(daily);
         }
     }
 

+ 5 - 0
master/src/main/java/com/ruoyi/project/training/controller/TTrainingbccController.java

@@ -156,6 +156,11 @@ public class TTrainingbccController extends BaseController
 	@DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids)
     {
+        for (Long id: ids
+             ) {
+            tTrainingbccDeviceMapper.deleteTTrainingbccDeviceByTrainingbcc(ids);
+        }
+
         return toAjax(tTrainingbccService.deleteTTrainingbccByIds(ids));
     }
 

+ 153 - 7
master/src/main/java/com/ruoyi/project/training/controller/TTrainingbccDeviceController.java

@@ -1,9 +1,17 @@
 package com.ruoyi.project.training.controller;
 
-import java.util.List;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
+import com.ruoyi.project.plant.domain.TStaffmgr;
+import com.ruoyi.project.plant.mapper.TStaffmgrMapper;
+import com.ruoyi.project.plant.service.ITStaffmgrService;
+import com.ruoyi.project.system.domain.SysUser;
+import com.ruoyi.project.system.mapper.SysUserMapper;
+import com.ruoyi.project.training.domain.TTraining;
 import com.ruoyi.project.training.domain.TTrainingbcc;
 import com.ruoyi.project.training.service.ITTrainingbccService;
+import org.apache.commons.lang.StringUtils;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -23,6 +31,8 @@ import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.web.page.TableDataInfo;
 
+import javax.annotation.Resource;
+
 /**
  * 人员-装置级培训关系Controller
  *
@@ -37,13 +47,19 @@ public class TTrainingbccDeviceController extends BaseController
     private ITTrainingbccDeviceService tTrainingbccDeviceService;
     @Autowired
     private ITTrainingbccService tTrainingbccService;
+    @Resource
+    private SysUserMapper sysUserMapper;
+    @Autowired
+    private ITStaffmgrService tStaffmgrService;
+
     /**
      * 查询人员-装置级培训关系列表
      */
-    @PreAuthorize("@ss.hasPermi('training:device:list')")
     @GetMapping("/list")
     public TableDataInfo list(TTrainingbccDevice tTrainingbccDevice)
     {
+      SysUser user = sysUserMapper.selectUserById(getUserId());
+        tTrainingbccDevice.setStaffId(user.getStaffId());
         startPage();
         List<TTrainingbccDevice> list = tTrainingbccDeviceService.selectTTrainingbccDeviceList(tTrainingbccDevice);
         for (TTrainingbccDevice t: list
@@ -54,10 +70,144 @@ public class TTrainingbccDeviceController extends BaseController
         return getDataTable(list);
     }
 
+    /**
+     * 查询人员-装置级培训关系列表
+     */
+    @GetMapping("/deviceList")
+    public Map<String, Object> deviceList(TTrainingbccDevice tTrainingDevice)
+    {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM");
+        SimpleDateFormat sdf2 = new SimpleDateFormat("MM");
+        List<TTrainingbccDevice> list = tTrainingbccDeviceService.selectTTrainingbccDeviceList(tTrainingDevice);
+
+        TTrainingbcc tTraining = new TTrainingbcc();
+//        tTraining.setYears(tTrainingDevice.getYear());
+        tTraining.setTrainingType(tTrainingDevice.getTrainingType());
+        List<TTrainingbcc> tTrainings = tTrainingbccService.selectTTrainingbccList(tTraining);
+        List<List> deviceLevelList = new ArrayList<>();
+        //查询人员 ,客户的需求:units值
+        TStaffmgr paramStaff = new TStaffmgr();
+        paramStaff.setUnits(tTrainingDevice.getUnits());
+        paramStaff.setDeptId(103l);
+        List<TStaffmgr> staffmgrs = tStaffmgrService.selectRecordList(paramStaff);
+        try {
+            //判断离职
+            if (!StringUtils.isEmpty(tTrainingDevice.getYear())) {
+                Iterator<TStaffmgr> iterator = staffmgrs.iterator();
+                while (iterator.hasNext()) {
+                    TStaffmgr t = iterator.next();
+                    if (t.getLeftDate() != null && t.getDelFlag() == 9){
+                        Calendar cal = Calendar.getInstance();
+                        cal.setTime(t.getLeftDate());
+                        Integer year = cal.get(Calendar.YEAR);//获取年
+                        if (year < Integer.parseInt(tTrainingDevice.getYear())) {
+                            logger.debug(t.getName() + "离职年份小于数据");
+                            iterator.remove();
+                        }
+                    }
+                }
+            }
+        }catch (Exception e) {
+            logger.error(e.toString());
+        }
+        logger.info("deviceList:" + staffmgrs.size());
+        for (int i = 0; i < tTrainings.size(); i++) {
+            //每一类装置级培训数据
+            List<String> device = new ArrayList<>();
+            List<String> deviceDate = new ArrayList<>();
+            if (tTrainings.get(i).getCourseid() != null) {
+                device.add(tTrainings.get(i).getCourseid());
+                deviceDate.add(tTrainings.get(i).getCourseid());
+            }else {
+                device.add("");
+                deviceDate.add("");
+            }
+            device.add(tTrainings.get(i).getCourse());
+            deviceDate.add(tTrainings.get(i).getCourse());
+            for (TStaffmgr s : staffmgrs) {
+                //按人员筛
+                int m = 0;
+                TTrainingbccDevice d = new TTrainingbccDevice();
+                for (TTrainingbccDevice t : list) {
+                    if (t.getStaffId().equals(s.getStaffid()) && t.getRegularId().equals(tTrainings.get(i).getId())) {
+                        if (tTrainings.get(i).getTrainingType().equals("10")) {
+                            if (tTrainings.get(i).getStartDate() == null) {
+                                m = 2;
+                            }else {
+                                m = 1;
+                                d = t;
+                            }
+                        }else {
+                            m = 1;
+                            d = t;
+                        }
+                    }
+                }
+                if (m == 0) {
+                    device.add("⚪");
+                    deviceDate.add("N.A");
+                }else if (m == 2) {
+                    device.add("╳");
+                    deviceDate.add("尚未开始培训");
+                }else {
+                    if (d.getSupplementary().equals("1")) {
+                        device.add("╳");
+                        if (d.getStartDate() != null) {
+                            deviceDate.add(sdf.format(d.getStartDate()));
+                        }else {
+                            deviceDate.add("-");
+                        }
+                    }else if (d.getSupplementary().equals("0")){
+                        device.add("╳");
+                        if (tTrainings.get(i).getRegularId() != null&&d.getStartDate() != null) {
+                            //判断结束日期和开始日期是否同一个月
+                            if (tTrainings.get(i).getCourseEnddate()!= null) {
+                                Calendar calendar1 = Calendar.getInstance();
+                                calendar1.setTime(d.getStartDate());
+                                int month1 = calendar1.get(Calendar.MONTH);
+
+                                Calendar calendar2 = Calendar.getInstance();
+                                calendar2.setTime(tTrainings.get(i).getCourseEnddate());
+                                int month2 = calendar2.get(Calendar.MONTH);
+                                if (month2 == month1) {
+                                    deviceDate.add(sdf1.format(d.getStartDate()));
+                                }else {
+                                    deviceDate.add(sdf1.format(d.getStartDate()) + "/" + sdf2.format(tTrainings.get(i).getCourseEnddate()));
+                                }
+                            }else {
+                                deviceDate.add(sdf1.format(d.getStartDate()));
+                            }
+                        }else {
+                            if(d.getStartDate() != null){
+                                deviceDate.add(sdf.format(d.getStartDate()));
+                            }
+                        }
+                    }else if (d.getSupplementary().equals("2")){
+                        device.add("新员工");
+                        if (d.getStartDate() != null) {
+                            deviceDate.add(sdf.format(d.getStartDate()));
+                        }else {
+                            deviceDate.add("-");
+                        }
+                    }else {
+                        device.add("/");
+                        deviceDate.add("/");
+                    }
+                }
+            }
+            deviceLevelList.add(device);
+            deviceLevelList.add(deviceDate);
+        }
+        AjaxResult ajaxResult = new AjaxResult();
+        ajaxResult.put("deviceLevelList", deviceLevelList);
+        ajaxResult.put("staffmgrs" , staffmgrs);
+        return ajaxResult;
+    }
+
     /**
      * 导出人员-装置级培训关系列表
      */
-    @PreAuthorize("@ss.hasPermi('training:device:export')")
     @Log(title = "人员-装置级培训关系", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public AjaxResult export(TTrainingbccDevice tTrainingbccDevice)
@@ -70,7 +220,6 @@ public class TTrainingbccDeviceController extends BaseController
     /**
      * 获取人员-装置级培训关系详细信息
      */
-    @PreAuthorize("@ss.hasPermi('training:device:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id)
     {
@@ -80,7 +229,6 @@ public class TTrainingbccDeviceController extends BaseController
     /**
      * 新增人员-装置级培训关系
      */
-    @PreAuthorize("@ss.hasPermi('training:device:add')")
     @Log(title = "人员-装置级培训关系", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TTrainingbccDevice tTrainingbccDevice)
@@ -91,7 +239,6 @@ public class TTrainingbccDeviceController extends BaseController
     /**
      * 修改人员-装置级培训关系
      */
-    @PreAuthorize("@ss.hasPermi('training:device:edit')")
     @Log(title = "人员-装置级培训关系", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TTrainingbccDevice tTrainingbccDevice)
@@ -117,7 +264,6 @@ public class TTrainingbccDeviceController extends BaseController
     /**
      * 删除人员-装置级培训关系
      */
-    @PreAuthorize("@ss.hasPermi('training:device:remove')")
     @Log(title = "人员-装置级培训关系", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids)

+ 2 - 0
master/src/main/java/com/ruoyi/project/training/controller/TTrainingbccRegularController.java

@@ -146,6 +146,7 @@ public class TTrainingbccRegularController extends BaseController
     {
         int doInsert = tTrainingbccRegularService.insertTTrainingbccRegular(tTrainingRegular);
         logger.info("regular:" + tTrainingRegular);
+        tTrainingRegular.setDeptId(103l); //bcc专用
         //如果确定计划日期新增关联内容
         if (tTrainingRegular.getNotPlan().equals("true")) {
             //新增培训计划定期类
@@ -168,6 +169,7 @@ public class TTrainingbccRegularController extends BaseController
                 logger.info("参培岗位人员");
                 TStaffmgr staffmgr = new TStaffmgr();
                 staffmgr.setActualposts(tTrainingRegular.getActualpostId());
+                staffmgr.setDeptId(tTrainingRegular.getDeptId());
                 List<TStaffmgr> staffmgrs = tStaffmgrService.selectAllTStaffmgrList(staffmgr);
                 try {
                     //判断离职

+ 24 - 0
master/src/main/java/com/ruoyi/project/training/domain/TTrainingbcc.java

@@ -155,6 +155,14 @@ public class TTrainingbcc extends BaseEntity
 
     private String staffIds;
 
+    /** 查询开始日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    private Date startDate;
+
+    /** 查询结束日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    private Date endDate;
+
     public int getHaveTraining() {
         return haveTraining;
     }
@@ -484,6 +492,22 @@ public class TTrainingbcc extends BaseEntity
         this.staffIds = staffIds;
     }
 
+    public Date getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(Date startDate) {
+        this.startDate = startDate;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 32 - 1
master/src/main/java/com/ruoyi/project/training/domain/TTrainingbccDevice.java

@@ -85,6 +85,14 @@ public class TTrainingbccDevice extends BaseEntity
     @Excel(name = "学习时长min")
     private Long learnTime;
 
+    /** 年份 */
+    private String year;
+
+    private String units;
+
+    private TTrainingbcc trainingbcc;
+    private String trainingType;
+
     public String getName() {
         return name;
     }
@@ -93,7 +101,14 @@ public class TTrainingbccDevice extends BaseEntity
         this.name = name;
     }
 
-    private TTrainingbcc trainingbcc;
+
+    public String getTrainingType() {
+        return trainingType;
+    }
+
+    public void setTrainingType(String trainingType) {
+        this.trainingType = trainingType;
+    }
 
     public void setId(Long id)
     {
@@ -255,6 +270,22 @@ public class TTrainingbccDevice extends BaseEntity
         this.examDate = examDate;
     }
 
+    public String getYear() {
+        return year;
+    }
+
+    public void setYear(String year) {
+        this.year = year;
+    }
+
+    public String getUnits() {
+        return units;
+    }
+
+    public void setUnits(String units) {
+        this.units = units;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 2 - 2
master/src/main/java/com/ruoyi/project/training/domain/TTrainingbccRegular.java

@@ -67,8 +67,8 @@ public class TTrainingbccRegular extends BaseEntity
     private Long deptId;
 
     /** 计划培训时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
-    @Excel(name = "计划培训时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM" , timezone = "GMT+8")
+    @Excel(name = "计划培训时间", width = 30, dateFormat = "yyyy-MM")
     private Date planTrainingdate;
 
     /** 实际完成培训日期 */

+ 8 - 0
master/src/main/java/com/ruoyi/project/training/elearn/domain/TElExam.java

@@ -265,6 +265,14 @@ public class TElExam extends BaseEntity
         return repoList;
     }
 
+    public Integer getExamType() {
+        return examType;
+    }
+
+    public void setExamType(Integer examType) {
+        this.examType = examType;
+    }
+
     public void setRepoList(List<TElExamRepo> repoList) {
         this.repoList = repoList;
     }

+ 22 - 0
master/src/main/java/com/ruoyi/project/training/elearn/domain/TElRepo.java

@@ -61,6 +61,12 @@ public class TElRepo extends BaseEntity
     private Long multiCount;
     private Long judgeCount;
 
+    /** 类型 */
+    private Integer examType;
+
+    /** 类型 */
+    private Integer isStudy;
+
     public void setRepoId(Long repoId)
     {
         this.repoId = repoId;
@@ -176,6 +182,22 @@ public class TElRepo extends BaseEntity
         this.judgeCount = judgeCount;
     }
 
+    public Integer getExamType() {
+        return examType;
+    }
+
+    public void setExamType(Integer examType) {
+        this.examType = examType;
+    }
+
+    public Integer getIsStudy() {
+        return isStudy;
+    }
+
+    public void setIsStudy(Integer isStudy) {
+        this.isStudy = isStudy;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 37 - 1
master/src/main/java/com/ruoyi/project/training/elearn/service/impl/TElPaperServiceImpl.java

@@ -8,9 +8,14 @@ import com.ruoyi.project.training.bccnew.domain.TTsNew;
 import com.ruoyi.project.training.bccnew.mapper.TTsFirstplanMapper;
 import com.ruoyi.project.training.bccnew.service.ITTsFirstplanService;
 import com.ruoyi.project.training.bccnew.service.ITTsNewService;
+import com.ruoyi.project.training.domain.TTrainingbcc;
+import com.ruoyi.project.training.domain.TTrainingbccDevice;
 import com.ruoyi.project.training.elearn.domain.*;
 import com.ruoyi.project.training.elearn.mapper.*;
 import com.ruoyi.project.training.elearn.service.ITElPaperService;
+import com.ruoyi.project.training.mapper.TTrainingbccDeviceMapper;
+import com.ruoyi.project.training.mapper.TTrainingbccMapper;
+import com.ruoyi.project.training.service.ITTrainingbccDeviceService;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -65,6 +70,10 @@ public class TElPaperServiceImpl implements ITElPaperService {
     private ITTsNewService tsNewService;
     @Autowired
     private ITTsFirstplanService tTsFirstplanService;
+    @Resource
+    private TTrainingbccMapper tTrainingbccMapper;
+    @Resource
+    private TTrainingbccDeviceMapper tTrainingbccDeviceMapper;
 
     /**
      * 查询在线考试
@@ -376,7 +385,34 @@ public class TElPaperServiceImpl implements ITElPaperService {
                     tTsFirstplanService.updateTTsFirstplan(tsFirstplan);
                 }
             }
-        }, "装置级培训考试成绩").start();
+        }, "导师带徒-装置级培训考试成绩").start();
+
+        new Thread(() -> {
+
+            TTrainingbcc param = new TTrainingbcc();
+            param.setExamId(paper.getExamId());
+            List<TTrainingbcc> tTrainingbccList = tTrainingbccMapper.selectTTrainingbccList(param);
+            if (!CollectionUtils.isEmpty(tTrainingbccList)) {
+                for (TTrainingbcc t: tTrainingbccList
+                     ) {
+                    TTrainingbccDevice device = new TTrainingbccDevice();
+                    device.setRegularId(t.getId());
+                    device.setStaffId(user.getStaffId());
+                    List<TTrainingbccDevice> deviceList =  tTrainingbccDeviceMapper.selectTTrainingbccDeviceList(device);
+                    if (!CollectionUtils.isEmpty(deviceList)) {
+                        for (TTrainingbccDevice d: deviceList
+                             ) {
+                            long pass = objScore >= paper.getQualifyScore() ? 1 : 0;
+                            d.setExamState(pass);
+                            d.setExamNum(d.getExamNum()+ 1);
+                            d.setExamDate(new Date());
+                            tTrainingbccDeviceMapper.updateTTrainingbccDevice(d);
+                        }
+                    }
+                }
+            }
+
+        },"装置培训考试成绩").start();
     }
 
     @Override

+ 2 - 1
master/src/main/java/com/ruoyi/project/training/mapper/TTrainingbccDeviceMapper.java

@@ -26,7 +26,6 @@ public interface TTrainingbccDeviceMapper
      * @param tTrainingbccDevice 人员-装置级培训关系
      * @return 人员-装置级培训关系集合
      */
-    @DataScope(deptAlias = "d")
     public List<TTrainingbccDevice> selectTTrainingbccDeviceList(TTrainingbccDevice tTrainingbccDevice);
 
     /**
@@ -64,4 +63,6 @@ public interface TTrainingbccDeviceMapper
     void deleteTTrainingbccDeviceByStaff(TTrainingbccDevice device);
 
     int countTraining(TTrainingbccDevice device);
+
+    void deleteTTrainingbccDeviceByTrainingbcc(Long[] ids);
 }

+ 0 - 1
master/src/main/java/com/ruoyi/project/training/mapper/TTrainingbccMapper.java

@@ -26,7 +26,6 @@ public interface TTrainingbccMapper
      * @param tTrainingbcc 装置培训跟踪b
      * @return 装置培训跟踪b集合
      */
-    @DataScope(deptAlias = "d")
     public List<TTrainingbcc> selectTTrainingbccList(TTrainingbcc tTrainingbcc);
 
     /**

+ 1 - 0
master/src/main/resources/mybatis/plant/TStaffmgrMapper.xml

@@ -283,6 +283,7 @@
         <include refid="selectTStaffmgrVo"/>
         LEFT JOIN SYS_DICT_DATA s on d.ACTUALPOST = s.DICT_VALUE and s.DICT_TYPE = 'ACTUALPOST'
         <where>
+            <if test="deptId != null and deptId != ''"> and d.dept_id = #{deptId} </if>
             <if test="units != null  and units != ''">
                 and
                 unit in

+ 11 - 2
master/src/main/resources/mybatis/training/TTrainingbccDeviceMapper.xml

@@ -19,12 +19,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="learnState"    column="learn_state"    />
         <result property="examState"    column="exam_state"    />
         <result property="examId"    column="exam_id"    />
+        <result property="examNum"    column="exam_num"    />
         <result property="learnTime"    column="learn_time"    />
         <result property="deptName" column="dept_name" />
     </resultMap>
 
     <sql id="selectTTrainingbccDeviceVo">
-        select d.id,s.name , d.staff_id, d.regular_id, d.start_date, d.remarks, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.supplementary, d.learn_state, d.exam_state, d.exam_id, d.learn_time from t_trainingbcc_device d
+        select d.id,s.name , d.staff_id, d.regular_id, d.start_date, d.remarks, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.supplementary, d.learn_state, d.exam_state, d.exam_id,d.exam_num, d.learn_time from t_trainingbcc_device d
        left join t_staffmgr s on s.staffid = d.staff_id
 </sql>
 
@@ -47,7 +48,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
-        ${params.dataScope}
     </select>
 
     <select id="selectTTrainingbccDeviceById" parameterType="Long" resultMap="TTrainingbccDeviceResult">
@@ -112,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="learnState != null">learn_state = #{learnState},</if>
             <if test="examState != null">exam_state = #{examState},</if>
             <if test="examId != null">exam_id = #{examId},</if>
+            <if test="examNum != null">exam_num = #{examNum},</if>
             <if test="learnTime != null">learn_time = #{learnTime},</if>
         </trim>
         where id = #{id}
@@ -134,6 +135,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
 
+    <update id="deleteTTrainingbccDeviceByTrainingbcc" parameterType="String">
+        update t_trainingbcc_device set del_flag = 2 where regular_id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+
+
     <select id="countTraining" parameterType="TTrainingbccDevice" resultType="int">
         select count(1) from t_trainingbcc_device
         <where>

+ 3 - 0
master/src/main/resources/mybatis/training/TTrainingbccMapper.xml

@@ -69,6 +69,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <insert id="insertTTrainingbcc" parameterType="TTrainingbcc">
+        <selectKey keyProperty="id" resultType="long" order="BEFORE">
+            SELECT seq_t_training.NEXTVAL as id FROM DUAL
+        </selectKey>
         insert into t_trainingbcc
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="id != null">id,</if>

+ 1 - 2
master/src/main/resources/mybatis/training/elearn/TElExamMapper.xml

@@ -28,8 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTElExamVo">
-        select d.exam_id,d.exam_type, d.title, d.content, d.open_type, d.state, d.time_limit, d.exam_start_time, d.exam_end_time, d.total_score, d.total_time, d.qualify_score, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks ,s.dept_name from t_el_exam d
-      left join sys_dept s on s.dept_id = d.dept_id
+        select d.exam_id,d.exam_type, d.title, d.content, d.open_type, d.state, d.time_limit, d.exam_start_time, d.exam_end_time, d.total_score, d.total_time, d.qualify_score, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks from t_el_exam d
     </sql>
 
     <select id="selectTElExamList" parameterType="TElExam" resultMap="TElExamResult">

+ 11 - 3
master/src/main/resources/mybatis/training/elearn/TElRepoMapper.xml

@@ -19,21 +19,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="radioCount" column="radio_count" />
         <result property="multiCount" column="multi_count" />
         <result property="judgeCount"  column="judge_count"/>
+        <result property="examType"    column="exam_type"    />
+        <result property="isStudy"    column="is_study"    />
     </resultMap>
 
     <sql id="selectTElRepoVo">
-        select d.repo_id, d.code, d.title, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks ,s.dept_name,
+        select d.repo_id,d.exam_type,d.is_study, d.code, d.title, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks ,
             (SELECT COUNT(0) FROM t_el_qu_repo WHERE repo_id=d.repo_id AND qu_type=1) AS radio_count,
                (SELECT COUNT(0) FROM t_el_qu_repo WHERE repo_id=d.repo_id AND qu_type=2) AS multi_count,
                (SELECT COUNT(0) FROM t_el_qu_repo WHERE repo_id=d.repo_id AND qu_type=3) AS judge_count
         from t_el_repo d
-
-            left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
     <select id="selectTElRepoList" parameterType="TElRepo" resultMap="TElRepoResult">
         <include refid="selectTElRepoVo"/>
         <where>
+            <if test="examType != null "> and exam_type = #{examType}</if>
+            <if test="isStudy != null "> and is_study = #{isStudy}</if>
             <if test="code != null  and code != ''"> and code = #{code}</if>
             <if test="title != null  and title != ''"> and title like concat(concat('%', #{title}), '%')</if>
             <if test="createrCode != null  and createrCode != ''"> and creater_code = #{createrCode}</if>
@@ -69,6 +71,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updatedate != null">updatedate,</if>
             <if test="deptId != null">dept_id,</if>
             <if test="remarks != null">remarks,</if>
+            <if test="examType != null">exam_type,</if>
+            <if test="isStudy != null">is_study,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="repoId != null">#{repoId},</if>
@@ -81,6 +85,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updatedate != null">#{updatedate},</if>
             <if test="deptId != null">#{deptId},</if>
             <if test="remarks != null">#{remarks},</if>
+            <if test="examType != null">#{examType},</if>
+            <if test="isStudy != null">#{isStudy},</if>
          </trim>
     </insert>
 
@@ -96,6 +102,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updatedate != null">updatedate = #{updatedate},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="examType != null">exam_type = #{examType},</if>
+            <if test="isStudy != null">is_study = #{isStudy},</if>
         </trim>
         where repo_id = #{repoId}
     </update>

+ 9 - 0
ui/src/api/training/bccdevice.js

@@ -9,6 +9,15 @@ export function listDevice(query) {
   })
 }
 
+// 查询人员-装置级培训关系矩阵
+export function devicebccListParticipants(query) {
+  return request({
+    url: '/training/bccdevice/deviceList',
+    method: 'get',
+    params: query
+  })
+}
+
 // 查询人员-装置级培训关系详细
 export function getDevice(id) {
   return request({

+ 6 - 0
ui/src/router/index.js

@@ -274,6 +274,12 @@ export const constantRoutes = [
         name: 'records',
         meta: { title: '装置级培训记录' }
       },
+      {
+        path: '/trainingbcc/records',
+        component: (resolve) => require(['@/views/training/trainingbcc/record'], resolve),
+        name: 'bccRecords',
+        meta: { title: '装置培训记录' }
+      },
       {
         path: '/trainingrecords/companyRecords',
         component: (resolve) => require(['@/views/training/trainingrecords/companyRecrods.vue'], resolve),

+ 2 - 0
ui/src/views/plant/confInfo/index.vue

@@ -415,6 +415,8 @@ export default {
     }
   },
   created() {
+    // 在组件内部
+
     //设置表格高度对应屏幕高度
     this.$nextTick(() => {
       this.clientHeight = document.body.clientHeight - 250

+ 4 - 5
ui/src/views/training/bccdevice/index.vue

@@ -193,7 +193,7 @@
             <i class="el-icon-mobile-phone"></i>
             已学习时长(分)
           </template>
-          {{ file.data.timer }}
+          {{ file.data.learnTime }}
         </el-descriptions-item>
       </el-descriptions>
       <el-button
@@ -210,7 +210,7 @@
                @close="handleClose">
       <div style="margin-top: -30px">
         <iframe id="iFrame" class="iframe-html" :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"
-                v-if="ppt"></iframe>
+                ></iframe>
       </div>
     </el-dialog>
   </div>
@@ -379,7 +379,7 @@ export default {
       this.multiple = !selection.length
     },
     hanldeExam(row){
-      this.$router.push({ name: 'paper', params: { examId: row.examId }})
+      this.$router.push({ name: 'paper', params: { examId: row.trainingbcc.examId }})
     },
     /** 新增按钮操作 */
     handleAdd() {
@@ -435,7 +435,6 @@ export default {
       this.pdf.open = true
       this.pdf.title = row.trainingbcc.fileName
       this.pdf.pdfUrl = ""
-      this.ppt = true
       //如果是PDF等直接可以打开的就不调接口,否则调用接口
       if (row.trainingbcc.fileName!=null && row.trainingbcc.fileName.endsWith('pdf')) {
         this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.trainingbcc.fileUrl
@@ -454,7 +453,7 @@ export default {
     getCountTime() {
       if (this.file.data.trainingbcc.timerNeed === 0)
         return 0;
-      return parseInt((this.file.data.timer / this.file.data.timerNeed * 100).toFixed(2))
+      return parseInt((this.file.data.learnTime / this.file.data.trainingbcc.timerNeed * 100).toFixed(2))
     },
     /** 删除按钮操作 */
     handleDelete(row) {

+ 24 - 2
ui/src/views/training/elearn/exam/index.vue

@@ -60,7 +60,13 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="考试名称" align="center" prop="title" :show-overflow-tooltip="true"/>
       <el-table-column label="考试描述" align="center" prop="content" :show-overflow-tooltip="true"/>
-<!--      <el-table-column label="考试类型" align="center" prop="openType" :show-overflow-tooltip="true"/>-->
+      <el-table-column label="考试类型" align="center" prop="examType" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span v-if="scope.row.examType == 1" size="small" type="success">岗位培训</span>
+          <span v-else-if="scope.row.examType == 2" size="small" type="success">装置培训</span>
+          <span v-else-if="scope.row.examType == 3" size="small" type="success">导师带徒</span>
+        </template>
+      </el-table-column>
 <!--      <el-table-column label="考试状态" align="center" prop="state" :show-overflow-tooltip="true"/>-->
       <el-table-column label="总分" align="center" prop="totalScore" :show-overflow-tooltip="true"/>
       <el-table-column label="及格分" align="center" prop="qualifyScore" :show-overflow-tooltip="true"/>
@@ -219,7 +225,23 @@
           <el-form-item label="考试名称" prop="title">
             <el-input v-model="form.title" />
           </el-form-item>
-
+          <el-form-item label="考试类型" prop="examType">
+            <el-radio-group v-model="form.examType">
+              <el-radio
+                key="1"
+                :label="1"
+              >岗位培训</el-radio>
+              <el-radio
+                key="2"
+                :label="2"
+              >装置培训</el-radio>
+              <el-radio
+                key="3"
+                :label="3"
+              >导师带徒</el-radio>
+
+            </el-radio-group>
+          </el-form-item>
           <el-form-item label="考试描述" prop="content">
             <el-input v-model="form.content" type="textarea" />
           </el-form-item>

+ 17 - 0
ui/src/views/training/trainingbcc/index.vue

@@ -122,6 +122,15 @@
           v-hasPermi="['training:training:export']"
         >{{ $t('导出') }}</el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-document"
+          size="mini"
+          @click="handleDevice"
+        >{{ $t('装置级培训记录') }}
+        </el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -152,6 +161,7 @@
         </template>
       </el-table-column>
       <el-table-column :label="$t('培训周期')" align="center" prop="period" :show-overflow-tooltip="true"/>
+      <el-table-column label="学习时长(min)" align="center" prop="timerNeed" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('课时')" align="center" prop="duration" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('培训人')" align="center" prop="trainer" :show-overflow-tooltip="true"/>
       <el-table-column label="课件" align="center">
@@ -307,6 +317,9 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
+            <el-form-item label="应学习时长(分)" prop="timerNeed" >
+              <el-input-number v-model="form.timerNeed" placeholder="请输入应学习时长" style="width: 200px"/>
+            </el-form-item>
           </el-col>
         </el-row>
         <el-row>
@@ -1361,6 +1374,10 @@ export default {
       a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
       a.click()
     },
+    /** 装置级培训矩阵按钮操作 */
+    handleDevice() {
+      this.$router.push({ path: '/trainingbcc/records'});
+    },
   }
 };
 </script>

+ 1069 - 0
ui/src/views/training/trainingbcc/record.vue

@@ -0,0 +1,1069 @@
+<template>
+  <div class="app-container" >
+    <el-form :inline="true" :model="deviceParams" label-width="68px">
+      <el-form-item :label="$t('年份')" prop="year">
+        <el-date-picker v-model="deviceParams.year" :placeholder="$t('请选择')+$t('年份')" clearable
+                        size="small"
+                        style="width: 200px"
+                        type="year"
+                        value-format="yyyy">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item :label="$t('培训类型')" prop="trainingType">
+        <el-select v-model="deviceParams.trainingType" :placeholder="$t('请选择') + $t('培训类型')" clearable
+                   size="small">
+          <el-option
+              v-for="dict in trainingTypeOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-button icon="el-icon-search" size="mini" style="margin-left: 20px;" type="cyan" @click="handleDeviceQuery">
+        {{ $t('搜索') }}
+      </el-button>
+      <el-row style="text-align: right">
+        <svg-icon class="rectangleGreen" icon-class="rectangleGreen"></svg-icon>
+        <span>{{ $t('需参加培训,已经完成培训人员') }}</span>
+        <svg-icon class="rectangleRed" icon-class="rectanglered"></svg-icon>
+        <span style="line-height: 40px">{{ $t('需参加培训,尚未进行培训人员') }}</span>
+        <span style="line-height: 40px;margin-left: 22px;">╳ 需要参加培训</span>
+        <span style="line-height: 40px;margin-left: 22px;">⚪ 不需要参加培训</span>
+      </el-row>
+    </el-form>
+    <vue-draggable-resizable :draggable="dragMove" h="auto" style="background-color:white" w="auto" >
+      <div ref="branch" class="zoom" @wheel.prevent="handleTableWheel($event)">
+        <el-table v-if="tableShow" ref="deviceTable" v-loading="deviceTrainingLoad"
+                  :cell-class-name="tableCellClassName"
+                  :data="devicelevelList"  :span-method="colspanDeviceMethod"
+                  border
+                  :height="height-100"
+                  class="companyLevelTable">
+          <el-table-column :label="$t('课程代码')" align="center" fixed width="100">
+            <template slot-scope="scope">
+              {{ scope.row[0] }}
+            </template>
+          </el-table-column>
+          <el-table-column :label="$t('装置级') +$t('空格') + $t('培训课程')+$t('空格') + $t('名称')" align="center"
+                           fixed width="250">
+            <template slot-scope="scope">
+              {{ scope.row[1] }}
+            </template>
+          </el-table-column>
+          <el-table-column v-for="(item, index) in deviceStaffmgrs" :key="index" :label="item.actualpost" align="center"
+                           width="150">
+            <el-table-column :key="index" :label="item.name" align="center" width="150">
+              <template slot-scope="scope">
+                {{ scope.row[index + 2] }}
+              </template>
+            </el-table-column>
+          </el-table-column>
+        </el-table>
+      </div>
+    </vue-draggable-resizable>
+  </div>
+</template>
+
+<script>
+import {
+  addTrainingrecords,
+  delTrainingrecords,
+  exportTrainingrecords,
+  exportTrainingTime,
+  getTrainingrecords,
+  listTrainingrecords,
+  updateTrainingrecords
+} from "@/api/training/trainingrecords";
+import {listTraining} from "@/api/training/worklicense";
+import {companyListParticipants, delParticipants, listParticipants} from "@/api/training/participants";
+import {deviceListParticipants, listDevice} from "@/api/training/device";
+import {devicebccListParticipants} from "@/api/training/bccdevice";
+import {treeselect} from "@/api/system/dept";
+import {selectTimeStaffmgr} from "@/api/plant/staffmgr";
+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 VueDraggableResizable from 'vue-draggable-resizable';
+
+export default {
+  name: "records",
+  components: {Treeselect, VueDraggableResizable},
+  mounted() {
+    window.onresize = () => {    //写在mounted中,onresize事件会在页面大小被调整时触发
+      return (() => {
+        window.screenHeight = document.body.clientHeight - 155;
+        this.height = window.screenHeight;
+      })();
+    };
+  },
+  data() {
+    return {
+      height: document.body.clientHeight - 155,
+      dragMove: true,
+      transTitle: [], // transTitle 该标题为转化后的标题, 注意多一列,  因为原来的标题变成了竖着显示了, 所以多一列标题, 第一个为空即可
+      companyStaffmgrs: [],
+      deviceStaffmgrs: [],
+      companylevelList: [],
+      devicelevelList: [],
+      devicelevelListTemp: [],
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 培训成绩表格数据
+      trainingrecordsList: [],
+      // 人员-公司级培训关系表格数据
+      participantsList: [],
+      // 人员-装置级培训关系表格数据
+      devicceList: [],
+      //上岗证培训列表
+      worklicenseList: [],
+      // 弹出层标题
+      title: "",
+      companyTitle: "",
+      deviceTitle: "",
+      companyTrainingTitle: "",
+      trainingTimeTitle: "",
+      deviceTrainingTitle: "",
+      worklicenseTitle: "",
+      // 部门树选项
+      deptOptions: undefined,
+      clientHeight: 300,
+      // 是否显示弹出层
+      open: false,
+      companyOpen: false,
+      deviceOpen: false,
+      companyTrainingOpen: false,
+      deviceTrainingOpen: false,
+      worklicenseOpen: false,
+      companyTrainingLoad: false,
+      deviceTrainingLoad: false,
+      tableShow: true,
+      trainingTimeOpen: false,
+      // 装置名称字典
+      plantCodeOptions: [],
+      // 班值字典
+      classesOptions: [],
+      // SUB字典
+      subOptions: [],
+      // 裂解字典
+      crackingOptions: [],
+      // 热区字典
+      hotareaOptions: [],
+      // 冷区字典
+      coldareaOptions: [],
+      // AEU/PGU字典
+      aeupguOptions: [],
+      // 入职字典
+      onboardOptions: [],
+      // TDS字典
+      tdsOptions: [],
+      // 上岗证复证字典
+      postCardOptions: [],
+      // 工艺培训字典
+      craftOptions: [],
+      //公司级培训字典
+      companyOptions: [],
+      //装置级培训字典
+      deviceOptions: [],
+      // 培训岗位字典
+      positionOptions: [],
+      //培训类型字典
+      trainingTypeOptions: [],
+      //点击查看的员工号
+      employeeid: '',
+      // 用户导入参数
+      upload: {
+        downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+        //下载模板类型
+        type: "trainingrecords",
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/training/trainingrecords/importData"
+      },
+      // 报告附件参数
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: this.$t('附件'),
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'traning'
+        },
+        pType: 'traning',
+        pId: null,
+        form: {}
+      },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        name: null,
+        employeeid: null,
+        classes: null,
+        sortDate: null,
+        sortOrder: null,
+        onboard: null,
+        tds: null,
+        postCard: null,
+        craft: null,
+        company: null
+      },
+      //人员表查询参数
+      staffmgrQueryParams: {
+        units: "10,18,20,30",
+        leftYear: this.getNowTime(),
+      },
+      queryCompanyParams: {
+        staffId: null,
+        companyId: null,
+      },
+      queryDeviceParams: {
+        staffId: null,
+        regularId: null,
+        year: this.getNowTime(),
+        trainingType: null
+      },
+      deviceParams: {
+        units: "10,18,20,30",
+        staffId: null,
+        regularId: null,
+        year: null,
+        trainingType: null
+      },
+      worklicenseParams: {
+        employeeid: null,
+      },
+      companyQueryParams: {},
+      // 表单参数
+      form: {},
+      pdf: {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+      },
+      // 表单校验
+      rules: {
+        plantCode: [
+          {required: true, message: this.$t('装置名称') + this.$t('不能为空'), trigger: "change"}
+        ],
+        year: [
+          {required: true, message: this.$t('年份') + this.$t('不能为空'), trigger: "blur"}
+        ],
+        deptId: [
+          {required: true, message: this.$t('部门编号') + this.$t('不能为空'), trigger: "blur"}
+        ]
+      },
+    };
+
+  },
+  watch: {
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    },
+    height(val) {        //在watch中监听height,浏览器窗口大小变动时自适应高度。
+      this.height = val;
+      console.log(this.height, "新的高度");
+    },
+  },
+  created() {
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = (document.body.clientHeight - 80) * 0.8
+    })
+    this.getList();
+    this.handleDevice();
+    this.getStaffmar();
+    this.getTreeselect();
+    this.getDicts("PLANT_DIVIDE").then(response => {
+      this.plantCodeOptions = response.data;
+    });
+    this.getDicts("TEAM_DIVIDE").then(response => {
+      this.classesOptions = response.data;
+    });
+    this.getDicts("TICK_CROSS").then(response => {
+      this.subOptions = response.data;
+    });
+    this.getDicts("TICK_CROSS").then(response => {
+      this.crackingOptions = response.data;
+    });
+    this.getDicts("TICK_CROSS").then(response => {
+      this.hotareaOptions = response.data;
+    });
+    this.getDicts("TICK_CROSS").then(response => {
+      this.coldareaOptions = response.data;
+    });
+    this.getDicts("TICK_CROSS").then(response => {
+      this.aeupguOptions = response.data;
+    });
+    this.getDicts("TRAINING_QUALIFY").then(response => {
+      this.onboardOptions = response.data;
+    });
+    this.getDicts("TRAINING_QUALIFY").then(response => {
+      this.tdsOptions = response.data;
+    });
+    this.getDicts("TRAINING_QUALIFY").then(response => {
+      this.postCardOptions = response.data;
+    });
+    this.getDicts("TRAINING_QUALIFY").then(response => {
+      this.craftOptions = response.data;
+    });
+    this.getDicts("TRAINING_QUALIFY").then(response => {
+      this.companyOptions = response.data;
+    });
+    this.getDicts("TRAINING_QUALIFY").then(response => {
+      this.deviceOptions = response.data;
+    });
+    this.getDicts("ACTUALPOST").then(response => {
+      this.positionOptions = response.data;
+    });
+    this.getDicts("TRAINING_TYPE").then(response => {
+      this.trainingTypeOptions = response.data;
+    });
+  },
+  methods: {
+    handleTableWheel(event) {
+      let obj = this.$refs['branch']
+      return this.tableZoom(obj, event)
+    },
+    tableZoom(obj, event) {
+      // 一开始默认是100%
+      let zoom = parseInt(obj.style.zoom, 10) || 100
+      // 滚轮滚一下wheelDelta的值增加或减少120
+      zoom += event.wheelDelta / 12
+      if (zoom > 25) {
+        obj.style.zoom = zoom + '%'
+      }
+      return false
+    },
+    colspanMethod({row, column, rowIndex, columnIndex}) {
+      if (columnIndex === 0) {
+        const _row = this.setTable(this.companylevelList).merge[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+      if (columnIndex === 1) {
+        const _row = this.setTable(this.companylevelList).merge[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+      if (columnIndex === 2) {
+        const _row = this.setTable(this.companylevelList).merge[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    },
+    colspanDeviceMethod({row, column, rowIndex, columnIndex}) {
+      if (columnIndex === 0) {
+        const _row = this.setTable(this.devicelevelList).merge[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+      if (columnIndex === 1) {
+        const _row = this.setTable(this.devicelevelList).merge[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    },
+    setTable(tableData) {
+      let spanArr = [],
+          concat = 0;
+      tableData.forEach((item, index) => {
+        if (index === 0) {
+          spanArr.push(1);
+        } else {
+          if (item[1] === tableData[index - 1][1] && item[0] === tableData[index - 1][0]) {
+            //第一列需合并相同内容的判断条件
+            spanArr[concat] += 1;
+            spanArr.push(0);
+          } else {
+            spanArr.push(1);
+            concat = index;
+          }
+        }
+      });
+      return {
+        merge: spanArr
+      };
+    },
+    //根据是否存在最后培训时间显示颜色提示
+    tableCellClassName({row, column, rowIndex, columnIndex}) {
+      // for (let i = 2; i < this.transTitle.length + 2; i++) {
+      //   if (columnIndex == i){
+      //     return this.changeColor(row[i])
+      //   }
+      // }
+      return this.changeColor(row[columnIndex])
+    },
+    changeColor(value) {
+      if (value == null) {
+        return 'companyNot'
+      }
+      if (value.trim().startsWith('20')) {
+        return 'companyFinish'
+      }
+      if (value === "-") {
+        return 'companyUrgent'
+      }
+      if (value === "尚未开始培训") {
+        return 'companyNot'
+      }
+    },
+    /** 查询培训成绩列表 */
+    getList() {
+      this.loading = true;
+      listTrainingrecords(this.queryParams).then(response => {
+        this.trainingrecordsList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    //获取人员表
+    getStaffmar() {
+      selectTimeStaffmgr(this.staffmgrQueryParams).then(response => {
+        const allData = response.rows
+        const data = [];
+        for (let i = 0; i < allData.length; i++) {
+          data.push({
+            name: allData[i].name,
+            actualpost: this.selectDictLabel(this.positionOptions, allData[i].actualpost),
+            trainingTime: allData[i].trainingTime
+          });
+        }
+        this.transTitle = data;
+      })
+    },
+    //获取公司级培训列表
+    getCompanyTraining() {
+      companyListParticipants(this.companyQueryParams).then(response => {
+        this.companylevelList = response.companyLevelList
+        const allData = response.staffmgrs
+        const data = [];
+        for (let i = 0; i < allData.length; i++) {
+          data.push({
+            name: allData[i].name,
+            actualpost: this.selectDictLabel(this.positionOptions, allData[i].actualpost),
+          });
+        }
+        this.companyStaffmgrs = data
+        this.companyTrainingLoad = false
+        this.$nextTick(() => {
+          this.$refs.companyTable.doLayout(); // 解决表格错位
+        });
+      })
+    },
+    //获取装置级培训列表
+    getDeviceTraining() {
+      devicebccListParticipants(this.deviceParams).then(response => {
+        this.devicelevelList = response.deviceLevelList
+        const allData = response.staffmgrs
+        const data = [];
+        for (let i = 0; i < allData.length; i++) {
+          data.push({
+            name: allData[i].name,
+            actualpost: this.selectDictLabel(this.positionOptions, allData[i].actualpost),
+          });
+        }
+        this.deviceStaffmgrs = data
+        this.deviceTrainingLoad = false
+        this.$nextTick(() => {
+          this.$refs.deviceTable.doLayout(); // 解决表格错位
+        });
+      })
+    },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
+    // 装置名称字典翻译
+    plantCodeFormat(row, column) {
+      return this.selectDictLabel(this.plantCodeOptions, row.plantCode);
+    },
+    // 班值字典翻译
+    classesFormat(row, column) {
+      return this.selectDictLabel(this.classesOptions, row.classes);
+    },
+    // SUB字典翻译
+    subFormat(row, column) {
+      return this.selectDictLabel(this.subOptions, row.sub);
+    },
+    // 裂解字典翻译
+    crackingFormat(row, column) {
+      return this.selectDictLabel(this.crackingOptions, row.cracking);
+    },
+    // 热区字典翻译
+    hotareaFormat(row, column) {
+      return this.selectDictLabel(this.hotareaOptions, row.hotarea);
+    },
+    // 冷区字典翻译
+    coldareaFormat(row, column) {
+      return this.selectDictLabel(this.coldareaOptions, row.coldarea);
+    },
+    // AEU/PGU字典翻译
+    aeupguFormat(row, column) {
+      return this.selectDictLabel(this.aeupguOptions, row.aeupgu);
+    },
+    // 入职字典翻译
+    onboardFormat(row, column) {
+      return this.selectDictLabel(this.onboardOptions, row.onboard);
+    },
+    // TDS字典翻译
+    tdsFormat(row, column) {
+      return this.selectDictLabel(this.tdsOptions, row.tds);
+    },
+    // 上岗证复证字典翻译
+    postCardFormat(row, column) {
+      return this.selectDictLabel(this.postCardOptions, row.postCard);
+    },
+    // 工艺培训字典翻译
+    craftFormat(row, column) {
+      return this.selectDictLabel(this.craftOptions, row.craft);
+    },
+    //公司级培训字典翻译
+    companyFormat(row, column) {
+      return this.selectDictLabel(this.companyOptions, row.company);
+    },
+    //装置级培训字典翻译
+    deviceFormat(row, column) {
+      return this.selectDictLabel(this.deviceOptions, row.device);
+    },
+    // 培训类型翻译
+    trainingTypeFormat(row, column) {
+      return this.selectDictLabel(this.trainingTypeOptions, row.trainingType);
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        plantCode: null,
+        name: null,
+        employeeid: null,
+        classes: null,
+        companysafe: null,
+        plantsafe: null,
+        teamsafe: null,
+        sub: null,
+        cracking: null,
+        hotarea: null,
+        coldarea: null,
+        aeupgu: null,
+        upscore: null,
+        downscore: null,
+        delFlag: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        remarks: null,
+        deptId: null,
+        onboard: null,
+        tds: null,
+        postCard: null,
+        craft: null,
+        company: null,
+        device: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    //搜索按钮
+    handleDeviceQuery() {
+      this.deviceTrainingLoad = true;
+      this.$nextTick(() => {
+        this.getDeviceTraining();
+      });
+    },
+    staffDeviceQuery() {
+      this.getDevice(this.employeeid)
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    //根据分数显示颜色提示
+    tableCellStyle({row, column, rowIndex, columnIndex}) {
+      if (columnIndex === 4 && row.onboard === "2") {
+        return "color: rgba(255, 26, 26, 0.98) "
+      } else if (columnIndex === 5 && row.tds === "2") {
+        return "color: rgba(255, 26, 26, 0.98) "
+      } else if (columnIndex === 6 && row.postCard === "2") {
+        return "color: rgba(255, 26, 26, 0.98) "
+      } else if (columnIndex === 7 && row.craft === "2") {
+        return "color: rgba(255, 26, 26, 0.98) "
+      } else if (columnIndex === 8 && row.company === "2") {
+        return "color: rgba(255, 26, 26, 0.98) "
+      }
+    },
+    //排序
+    sortChange(val) {
+      if (val.prop == 'companysafe') {
+        this.queryParams.sortDate = 'companysafe';
+      } else if (val.prop == 'plantsafe') {
+        this.queryParams.sortDate = 'plantsafe';
+      } else if (val.prop == 'teamsafe') {
+        this.queryParams.sortDate = 'teamsafe';
+      }
+      if (val.order === 'descending') {
+        this.queryParams.sortOrder = 'desc'
+      } else {
+        this.queryParams.sortOrder = 'asc'
+      }
+      this.getList()
+    },
+    /** 获取当前年份 */
+    getNowTime() {
+      var now = new Date();
+      var year = now.getFullYear(); //得到年份
+      var defaultDate = `${year}`;
+      defaultDate = `${year}`
+      return defaultDate;
+    },
+    /** 公司级培训矩阵按钮操作 */
+    handleCompany() {
+      this.companyTrainingLoad = true
+      this.companyTrainingTitle = this.$t('参加') + this.$t('空格') + this.$t('公司级') + this.$t('空格') + this.$t('培训人员') + this.$t('空格') + this.$t('名单')
+      this.companyTrainingOpen = true
+      // loading.close();
+      this.tableShow = true
+      setTimeout(() => {
+        this.getCompanyTraining();
+      }, 10);
+    },
+    /** 装置级培训矩阵按钮操作 */
+    handleDevice() {
+      this.deviceTrainingLoad = true
+      this.resetForm("queryRegularForm");
+      this.deviceTrainingTitle = this.$t('参加') + this.$t('空格') + this.$t('装置级') + this.$t('空格') + this.$t('培训人员') + this.$t('空格') + this.$t('名单')
+      this.deviceTrainingOpen = true
+      this.tableShow = true
+      this.deviceParams.year = this.getNowTime();
+      // this.$nextTick(() => {
+      //   deviceListParticipants(this.deviceParams).then(response => {
+      //     this.devicelevelListTemp = response;
+      //     this.devicelevelList = response
+      //     this.deviceTrainingLoad = false
+      //     this.$nextTick(() => {
+      //       this.$refs.deviceTable.doLayout(); // 解决表格错位
+      //     });
+      //   })
+      // });
+      setTimeout(() => {
+        this.getDeviceTraining();
+      }, 10);
+    },
+    /** 人员培训时长按钮操作 */
+    handleTime() {
+      this.trainingTimeOpen = true;
+      this.trainingTimeTitle = this.$t('人员培训时长');
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = this.$t('新增') + this.$t('空格') + this.$t('培训成绩');
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getTrainingrecords(id).then(response => {
+        this.form = response.data;
+        if (response.data.sub == 10) {
+          this.form.sub = true
+        }
+        if (response.data.cracking == 10) {
+          this.form.cracking = true
+        }
+        if (response.data.hotarea == 10) {
+          this.form.hotarea = true
+        }
+        if (response.data.coldarea == 10) {
+          this.form.coldarea = true
+        }
+        if (response.data.aeupgu == 10) {
+          this.form.aeupgu = true
+        }
+        this.open = true;
+        this.title = this.$t('修改') + this.$t('培训成绩');
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateTrainingrecords(this.form).then(response => {
+              this.msgSuccess(this.$t('修改成功'));
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addTrainingrecords(this.form).then(response => {
+              this.msgSuccess(this.$t('新增成功'));
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function () {
+        return delTrainingrecords(ids);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess(this.$t('删除成功'));
+      })
+    },
+    /** 公司级培训删除按钮操作 */
+    participantsHandleDelete(row) {
+      const ids = row.id
+      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function () {
+        return delParticipants(ids);
+      }).then(() => {
+        this.getParticipants(row.staffId)
+        this.msgSuccess(this.$t('删除成功'));
+      })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm(this.$t('是否确认导出所有培训成绩数据项?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function () {
+        return exportTrainingrecords(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      })
+    },
+    /** 导出人员培训时长按钮操作 */
+    exportTrainingTime() {
+      const queryParams = this.transTitle;
+      this.$confirm(this.$t('是否确认导出人员培训时长?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function () {
+        return exportTrainingTime();
+      }).then(response => {
+        this.download(response.msg);
+      })
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = this.$t('用户导入');
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      this.$refs['downloadFileForm'].submit()
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      if (response.data[0] != null) {
+        this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据') + "," + this.$t('第') + response.data + this.$t('行数据出现错误导入失败') + "。", this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      } else {
+        this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据'), this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      }
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    /** 报告附件按钮操作 */
+    handleDoc(row, fileType) {
+      this.doc.pType = fileType
+      this.doc.queryParams.pType = fileType
+      this.doc.id = row.id;
+      var titleType = '';
+      if (fileType === 'trainingrecords-onbord') {
+        titleType = row.name + this.$t('空格') + this.$t('的') + this.$t('入职') + this.$t('空格') + this.$t('培训')
+      } else if (fileType === 'trainingrecords-tds') {
+        titleType = row.name + this.$t('空格') + this.$t('的') + this.$t('TDS培训')
+      } else if (fileType === 'trainingrecords-craft') {
+        titleType = row.name + this.$t('空格') + this.$t('的') + this.$t('工艺培训')
+      } else {
+        titleType = this.$t('上岗证') + this.$t('空格') + this.$t('培训')
+      }
+      this.doc.title = titleType;
+      this.doc.open = true;
+      this.doc.queryParams.pId = row.id
+      this.doc.pId = row.id
+      this.getFileList()
+      this.$nextTick(() => {
+        this.$refs.doc.clearFiles()
+      })
+    },
+    getFileList() {
+      allFileList(this.doc.queryParams).then(response => {
+        response.forEach(element => {
+          element["isEdit"] = false
+        });
+        response.forEach(element => {
+          element["isAdd"] = false
+        });
+        this.doc.commonfileList = response;
+      });
+    },
+    //附件上传中处理
+    handleFileDocProgress(event, file, fileList) {
+      this.doc.file = file;
+      this.doc.isUploading = true;
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      this.doc.isUploading = false;
+      this.$alert(response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      this.getFileList()
+    },
+    // 文件下载处理
+    handleDownload(row) {
+      var name = row.fileName;
+      var url = row.fileUrl;
+      var suffix = url.substring(url.lastIndexOf("."), url.length);
+      const a = document.createElement('a')
+      a.setAttribute('download', name)
+      a.setAttribute('target', '_blank')
+      a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+      a.click()
+    },
+    //pdf预览
+    openPdf() {
+      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+    },
+    handleSee(row) {
+      this.pdf.open = true
+      this.pdf.title = row.fileName
+      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+    },
+    /** 打开上岗证复证列表 */
+    openWorklicense(row) {
+      this.worklicenseOpen = true;
+      this.worklicenseTitle = row.name + this.$t('的') + this.$t('上岗证复证') + this.$t('列表');
+      this.worklicenseParams.employeeid = row.employeeid
+      listTraining(this.worklicenseParams).then(response => {
+        this.worklicenseList = response;
+      });
+    },
+    /** 打开公司级培训列表 */
+    openCompany(row) {
+      this.companyOpen = true;
+      this.companyTitle = row.name + this.$t('空格') + this.$t('的') + this.$t('公司级') + this.$t('空格') + this.$t('培训信息');
+      this.$nextTick(() => {
+        this.getParticipants(row.employeeid)
+      })
+    },
+    /** 打开装置级培训列表 */
+    openDevice(row) {
+      this.deviceOpen = true;
+      this.resetForm("queryRegularForm");
+      this.deviceTitle = row.name + this.$t('空格') + this.$t('的') + this.$t('装置级') + this.$t('空格') + this.$t('培训信息');
+      this.employeeid = row.employeeid;
+      this.queryDeviceParams.year = this.getNowTime();
+      this.$nextTick(() => {
+        this.getDevice(row.employeeid)
+      })
+    },
+    getParticipants(employeeid) {
+      this.queryCompanyParams.staffId = employeeid
+      listParticipants(this.queryCompanyParams).then(response => {
+        this.participantsList = response.rows;
+      });
+    },
+    getDevice(employeeid) {
+      this.queryDeviceParams.staffId = employeeid
+      listDevice(this.queryDeviceParams).then(response => {
+        this.devicceList = response.rows;
+      });
+    },
+    // 取消
+    cancelFile(row, index) {
+      // 如果是新增的数据
+      if (row.isAdd) {
+        this.doc.commonfileList.splice(index, 1)
+      } else {
+        // 不是新增的数据  还原数据
+        for (const i in row.oldRow) {
+          row[i] = row.oldRow[i]
+        }
+        row.isEdit = false
+      }
+    },
+    edit(row) {
+      // 备份原始数据
+      row['oldRow'] = JSON.parse(JSON.stringify(row));
+      this.$nextTick(() => {
+        row.isEdit = true;
+      })
+    },
+    save(row) {
+      row.isEdit = false;
+      var that = this;
+      that.loading = true;
+      this.form = row;
+      if (row.isAdd == true) {
+        addCommonfile(this.form).then(response => {
+          this.msgSuccess(this.$t('新增成功'));
+          this.open = false;
+          this.getList();
+        });
+      } else {
+        updateCommonfile(this.form).then(response => {
+          this.msgSuccess(this.$t('修改成功'));
+          this.open = false;
+          this.getList();
+        });
+      }
+    },
+    /** 删除按钮操作 */
+    handleDeleteDoc(row) {
+      const ids = row.id || this.ids;
+      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function () {
+        return delCommonfile(ids);
+      }).then(() => {
+        this.getFileList()
+        this.msgSuccess(this.$t('删除成功'));
+      })
+    },
+
+    /** 公司级培训修改按钮操作 */
+    handleCompanyUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+    },
+    closeDialog() {
+      this.companylevelList = []
+      this.devicelevelList = []
+      this.tableShow = false
+    },
+  }
+};
+</script>
+
+<style>
+.companyLevelTable {
+  color: black;
+}
+
+::v-deep.el-table tbody tr:hover > td {
+  background-color: transparent !important;
+}
+
+.el-dialog__body {
+  padding-top: 0px
+}
+
+.el-table--scrollable-x .el-table__body-wrapper {
+  z-index: 1;
+}
+
+.rectangleRed {
+  width: 60px !important;
+  height: 30px !important;
+  margin-bottom: -8px;
+}
+
+.rectangleGreen {
+  width: 60px !important;
+  height: 30px !important;
+  margin-bottom: -8px;
+}
+
+
+</style>
+
+