shi'sen'yuan 3 년 전
부모
커밋
1a226d1501
21개의 변경된 파일275개의 추가작업 그리고 81개의 파일을 삭제
  1. 3 0
      master/src/main/java/com/ruoyi/project/common/CommonController.java
  2. 180 8
      master/src/main/java/com/ruoyi/project/ehs/controller/TIncidentRecordsController.java
  3. 0 1
      master/src/main/java/com/ruoyi/project/ehs/controller/TMsdsController.java
  4. 13 18
      master/src/main/java/com/ruoyi/project/ehs/domain/TIncidentRecords.java
  5. 18 18
      master/src/main/java/com/ruoyi/project/training/domain/TTraining.java
  6. 3 3
      master/src/main/java/com/ruoyi/project/training/domain/TTrainingMatrix.java
  7. 5 5
      master/src/main/java/com/ruoyi/project/training/domain/TTrainingRegular.java
  8. 1 0
      master/src/main/resources/mybatis/training/TTrainingMatrixMapper.xml
  9. 1 0
      master/src/main/resources/mybatis/training/TTrainingRegularMapper.xml
  10. BIN
      master/src/main/resources/static/template/document/plantproglistbook.xlsx
  11. BIN
      master/src/main/resources/static/template/document/plantproglistform.xlsx
  12. BIN
      master/src/main/resources/static/template/document/plantproglistguide.xlsx
  13. BIN
      master/src/main/resources/static/template/document/plantproglistmaterials.xlsx
  14. BIN
      master/src/main/resources/static/template/document/plantproglistprocedure.xlsx
  15. BIN
      master/src/main/resources/static/template/ehs/incidentRecords.xlsx
  16. BIN
      master/src/main/resources/static/template/ehs/msds.xlsx
  17. BIN
      master/src/main/resources/static/template/plant/targetlist.xls
  18. 29 22
      ui/src/views/ehs/records/index.vue
  19. 9 0
      ui/src/views/training/matrix/index.vue
  20. 11 2
      ui/src/views/training/regular/index.vue
  21. 2 4
      ui/src/views/training/training/index.vue

+ 3 - 0
master/src/main/java/com/ruoyi/project/common/CommonController.java

@@ -205,6 +205,9 @@ public class CommonController extends BaseController
         } else if( type.equals("msds") ) {
             downloadname = "MSDS管理导入模板.xlsx";
             url = "static/template/ehs/msds.xlsx";
+        } else if( type.equals("incidentRecords") ) {
+            downloadname = "事故报告清单导入模板.xlsx";
+            url = "static/template/ehs/incidentRecords.xlsx";
         } else if( type.equals("water") ) {
             downloadname = "废水风险评估导入模板.xlsx";
             url = "static/template/ehs/water.xlsx";

+ 180 - 8
master/src/main/java/com/ruoyi/project/ehs/controller/TIncidentRecordsController.java

@@ -1,20 +1,24 @@
 package com.ruoyi.project.ehs.controller;
 
+import java.io.IOException;
 import java.text.SimpleDateFormat;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import java.util.logging.SimpleFormatter;
 
+import com.alibaba.fastjson.JSON;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.file.ExcelUtils;
+import com.ruoyi.project.plant.domain.TStaffmgr;
+import com.ruoyi.project.system.domain.SysDept;
+import com.ruoyi.project.system.domain.SysDictData;
+import com.ruoyi.project.system.service.ISysDeptService;
+import com.ruoyi.project.system.service.ISysDictTypeService;
+import org.apache.poi.ss.usermodel.*;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
 import com.ruoyi.project.ehs.domain.TIncidentRecords;
@@ -23,6 +27,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.web.page.TableDataInfo;
+import org.springframework.web.multipart.MultipartFile;
 
 /**
  * 事件报告清单Controller
@@ -37,6 +42,12 @@ public class TIncidentRecordsController extends BaseController
     @Autowired
     private ITIncidentRecordsService tIncidentRecordsService;
 
+    @Autowired
+    private ISysDictTypeService iSysDictTypeService;
+
+    @Autowired
+    private ISysDeptService iSysDeptService;
+
     /**
      * 查询事件报告清单列表
      */
@@ -104,4 +115,165 @@ public class TIncidentRecordsController extends BaseController
     {
         return toAjax(tIncidentRecordsService.deleteTIncidentRecordsByIds(ids));
     }
+
+    /**
+     * 批量导入事件报告清单
+     */
+    @PreAuthorize("@ss.hasPermi('ehs:records:add')")
+    @Log(title = "事件报告清单", businessType = BusinessType.INSERT)
+    @PostMapping("/importData")
+    public AjaxResult importData(@RequestParam("file") MultipartFile file) throws IOException
+    {
+        //获取操作人员ID
+        Long userId = getUserId();
+        //报错行数统计
+        List<Integer> failRow =new ArrayList<Integer>();
+        Workbook workbook = ExcelUtils.getWorkBook(file);
+        Sheet sheet = workbook.getSheetAt(0);
+        List<TIncidentRecords> list = new ArrayList<TIncidentRecords>();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        //字典查询
+        List<SysDictData> yesNoEn = iSysDictTypeService.selectDictDataByType("YES_NO_EN");
+        List<SysDictData> incidentClassification = iSysDictTypeService.selectDictDataByType("INCIDENT_CLASSIFICATION");
+        List<SysDictData> riskkindNm = iSysDictTypeService.selectDictDataByType("RISKKIND_NM");
+        List<SysDictData> oad = iSysDictTypeService.selectDictDataByType("OAD");
+        List<SysDictData> actualClassification = iSysDictTypeService.selectDictDataByType("ACTUAL_CLASSIFICATION");
+        List<SysDictData> probability = iSysDictTypeService.selectDictDataByType("PROBABILITY");
+        List<SysDictData> severity = iSysDictTypeService.selectDictDataByType("SEVERITY");
+        List<SysDictData> riskClass = iSysDictTypeService.selectDictDataByType("RISK_CLASS");
+        List<SysDictData> potentialLevel = iSysDictTypeService.selectDictDataByType("POTENTIAL_LEVEL");
+        //部门查询
+        List<SysDept> dept = iSysDeptService.selectDeptList(new SysDept());
+        int rowNum = sheet.getPhysicalNumberOfRows();
+        int failNumber = 0;
+        for (int i = 1; i < rowNum; i++) {
+            try {
+                logger.info("读取行数:" + i);
+                Row row = sheet.getRow(i);
+                int cellNum = row.getPhysicalNumberOfCells();
+                TIncidentRecords entity = new TIncidentRecords();
+                for (int j = 0; j < cellNum; j++) {
+                    Cell cell = row.getCell(j);
+                    cell.setCellType(CellType.STRING);
+                    String cellValue = ExcelUtils.getCellValue(cell);
+                    logger.info("cellValue:" + cellValue);
+                    if (j == 0) {
+                        if (cellValue.length() > 3) {
+                            entity.setIncidentDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));//日期
+                        }
+                    } else if (j == 1) {
+                        entity.setReportNo(cellValue);//事故报告编号
+                    } else if (j == 2) {
+                        entity.setInvestigationNo(cellValue);//调查报告编号
+                    } else if (j == 3) {
+                        entity.setCompany(cellValue);//单位
+                    } else if (j == 4) {
+                        for (SysDictData y : yesNoEn) {
+                            if (y.getDictLabel().equals(cellValue.trim())) {
+                                entity.setContractor(y.getDictValue());//承包商
+                            }
+                        }
+                    } else if (j == 5) {
+                        for (SysDictData c : incidentClassification) {
+                            if (c.getDictLabel().equals(cellValue.trim())) {
+                                entity.setClassification(c.getDictValue());//事件分类
+                            }
+                        }
+                    } else if (j == 6) {
+                        for (SysDictData r : riskkindNm) {
+                            if (r.getDictLabel().equals(cellValue.trim())) {
+                                entity.setRiskKind(r.getDictValue());//未遂事件风险类别
+                            }
+                        }
+                    } else if (j == 7) {
+                        entity.setMaterials(cellValue);//物料/作业
+                    } else if (j == 8) {
+                        entity.setLeakedAmount(cellValue);//漏量
+                    } else if (j == 9) {
+                        entity.setProcessSafety(cellValue);//工艺安全相关事件
+                    } else if (j == 10) {
+                        for (SysDictData y : yesNoEn) {
+                            if (y.getDictLabel().equals(cellValue.trim())) {
+                                entity.setProcessSystem(y.getDictValue());//是否工艺系统
+                            }
+                        }
+                    } else if (j == 11) {
+                        for (SysDictData o : oad) {
+                            if (o.getDictLabel().equals(cellValue.trim())) {
+                                entity.setOad(o.getDictValue());//OAD
+                            }
+                        }
+                    } else if (j == 12) {
+                        entity.setBridfing(cellValue);//事件简述/机械/电仪问题
+                    } else if (j == 13) {
+                        for (SysDictData a : actualClassification) {
+                            if (a.getDictLabel().equals(cellValue.trim())) {
+                                entity.setActualClassification(a.getDictValue());//实际后果事件分级
+                            }
+                        }
+                    } else if (j == 14) {
+                        for (SysDictData a : probability) {
+                            if (a.getDictLabel().equals(cellValue.trim())) {
+                                entity.setProbability(a.getDictValue());//可能性
+                            }
+                        }
+                    } else if (j == 15) {
+                        for (SysDictData s : severity) {
+                            if (s.getDictLabel().equals(cellValue.trim())) {
+                                entity.setSeverity(s.getDictValue());//严重性
+                            }
+                        }
+                    } else if (j == 16) {
+                        for (SysDictData r : riskClass) {
+                            if (r.getDictLabel().equals(cellValue.trim())) {
+                                entity.setRiskClass(r.getDictValue());//风险等级
+                            }
+                        }
+                    } else if (j == 17) {
+                        for (SysDictData p : potentialLevel) {
+                            if (p.getDictLabel().equals(cellValue.trim())) {
+                                entity.setPotentialLevel(p.getDictValue());//潜在后果事件等级
+                            }
+                        }
+                    } else if (j == 18) {
+                        entity.setMeasures(cellValue);//对策
+                    } else if (j == 19) {
+                        entity.setAims(cellValue);//输入AIMS
+                    } else if (j == 20) {
+                        entity.setRemarks(cellValue);//备注
+                    } else if (j == 21) {
+                        for (SysDept d : dept) {
+                            if (d.getDeptName().equals(cellValue.trim())) {
+                                entity.setDeptId(d.getDeptId());//部门编号
+                            }
+                        }
+                    }
+                }
+                entity.setCreaterCode(userId.toString());
+                logger.info("entity:" + entity);
+                list.add(entity);
+            }catch (Exception e){
+                failNumber++;
+                failRow.add(i+1);
+            }
+        }
+        int successNumber = 0;
+        int failNum = 0;
+        for (TIncidentRecords t : list
+        ) {
+            failNum++;
+            try {
+                tIncidentRecordsService.insertTIncidentRecords(t);
+                successNumber++;
+            }catch (Exception e){
+                failNumber++;
+                failRow.add(failNum+1);
+            }
+        }
+        logger.info("list:" + JSON.toJSONString(list));
+        logger.info("successNumber:" +String.valueOf(successNumber));
+        logger.info("failNumber:" +String.valueOf(failNumber));
+        logger.info("failRow:" +String.valueOf(failRow));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
+    }
 }

+ 0 - 1
master/src/main/java/com/ruoyi/project/ehs/controller/TMsdsController.java

@@ -139,7 +139,6 @@ public class TMsdsController extends BaseController
         List<TMsds> list = new ArrayList<TMsds>();
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
         //字典查询
-        List<SysDictData> plant = iSysDictTypeService.selectDictDataByType("PLANT_DIVIDE");
         List<SysDictData> productCategory = iSysDictTypeService.selectDictDataByType("PRODUCT_CATEGORY");
         List<SysDictData> hazardPhrases = iSysDictTypeService.selectDictDataByType("HAZARD_PHRASES");
         List<SysDictData> cmr = iSysDictTypeService.selectDictDataByType("CMR");

+ 13 - 18
master/src/main/java/com/ruoyi/project/ehs/domain/TIncidentRecords.java

@@ -22,18 +22,18 @@ public class TIncidentRecords extends BaseEntity
 
     /** 日期 */
     @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
-    @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @Excel(name = "日期", width = 20, dateFormat = "yyyy-MM-dd")
     private Date incidentDate;
 
     @JsonFormat(pattern = "yyyy" , timezone = "GMT+8")
     private String incidentYear;
 
     /** 事故报告编号 */
-    @Excel(name = "事故报告编号")
+    @Excel(name = "事故报告编号", width = 40)
     private String reportNo;
 
     /** 调查报告编号 */
-    @Excel(name = "调查报告编号")
+    @Excel(name = "调查报告编号", width = 50)
     private String investigationNo;
 
     /** 单位 */
@@ -41,15 +41,15 @@ public class TIncidentRecords extends BaseEntity
     private String company;
 
     /** 承包商 */
-    @Excel(name = "承包商")
+    @Excel(name = "承包商", dictType = "YES_NO_EN")
     private String contractor;
 
     /** 事件分类 */
-    @Excel(name = "事件分类")
+    @Excel(name = "事件分类", dictType = "INCIDENT_CLASSIFICATION")
     private String classification;
 
     /** 未遂事件风险类别 */
-    @Excel(name = "未遂事件风险类别")
+    @Excel(name = "未遂事件风险类别", dictType = "RISKKIND_NM")
     private String riskKind;
 
     /** 物料/作业 */
@@ -65,11 +65,11 @@ public class TIncidentRecords extends BaseEntity
     private String processSafety;
 
     /** 是否工艺系统 */
-    @Excel(name = "是否工艺系统")
+    @Excel(name = "是否工艺系统", dictType = "YES_NO_EN")
     private String processSystem;
 
     /** OAD */
-    @Excel(name = "OAD")
+    @Excel(name = "OAD", dictType = "OAD")
     private String oad;
 
     /** 事件简述/机械/电仪问题 */
@@ -77,26 +77,26 @@ public class TIncidentRecords extends BaseEntity
     private String bridfing;
 
     /** 实际后果事件分级 */
-    @Excel(name = "实际后果事件分级")
+    @Excel(name = "实际后果事件分级", dictType = "ACTUAL_CLASSIFICATION")
     private String actualClassification;
 
     /** 潜在的可能性和严重性 */
     private String potential;
 
     /** 可能性 */
-    @Excel(name = "可能性")
+    @Excel(name = "可能性", dictType = "PROBABILITY")
     private String probability;
 
     /** 严重性 */
-    @Excel(name = "严重性")
+    @Excel(name = "严重性", dictType = "SEVERITY")
     private String severity;
 
     /** 风险等级 */
-    @Excel(name = "风险等级")
+    @Excel(name = "风险等级", dictType = "RISK_CLASS")
     private String riskClass;
 
     /** 潜在后果事件等级 */
-    @Excel(name = "潜在后果事件等级")
+    @Excel(name = "潜在后果事件等级", dictType = "POTENTIAL_LEVEL")
     private String potentialLevel;
 
     /** 对策 */
@@ -111,21 +111,17 @@ public class TIncidentRecords extends BaseEntity
     private Long delFlag;
 
     /** 创建人 */
-    @Excel(name = "创建人")
     private String createrCode;
 
     /** 创建时间 */
     @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
-    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date createdate;
 
     /** 修改人 */
-    @Excel(name = "修改人")
     private String updaterCode;
 
     /** 修改时间 */
     @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
-    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date updatedate;
 
     /** 备注 */
@@ -133,7 +129,6 @@ public class TIncidentRecords extends BaseEntity
     private String remarks;
 
     /** 部门编号 */
-    @Excel(name = "部门编号")
     private Long deptId;
 
     /** 部门名称 */

+ 18 - 18
master/src/main/java/com/ruoyi/project/training/domain/TTraining.java

@@ -25,22 +25,34 @@ public class TTraining extends BaseEntity
     /** 装置名称 */
     private String plantCode;
 
+    /** 培训年月 */
+    @Excel(name = "年份")
+    private String year;
+
     /** 培训课程 */
-    @Excel(name = "培训课程")
+    @Excel(name = "培训课程", width = 40)
     private String course;
 
+    /** 培训分类 */
+    @Excel(name = "培训类型", dictType = "TRAINING_TYPE")
+    private String trainingType;
+
+    /** 培训内容 */
+    @Excel(name = "培训内容")
+    private String content;
+
     /** 课程代码 */
     @Excel(name = "课程代码")
     private String courseid;
 
+    /** 是否完成 */
+    @Excel(name = "是否完成", dictType = "YES_NO_EN")
+    private Long isfinish;
+
     /** 培训周期 */
     @Excel(name = "培训周期")
     private String period;
 
-    /** 培训内容 */
-    @Excel(name = "培训内容")
-    private String content;
-
     /** 课时 */
     @Excel(name = "课时")
     private String duration;
@@ -52,6 +64,7 @@ public class TTraining extends BaseEntity
     /** 部门 */
     @Excel(name = "部门")
     private String unit;
+
     /** 培训岗位 */
     @Excel(name = "培训岗位", dictType = "TRAINING_POSITION")
     private String position;
@@ -65,10 +78,6 @@ public class TTraining extends BaseEntity
     @Excel(name = "指定人员")
     private String designatedStaff;
 
-    /** 培训年月 */
-    @Excel(name = "年份")
-    private String year;
-
     /** 培训开始日期 */
     @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
     @Excel(name = "培训开始日期", width = 30, dateFormat = "yyyy-MM-dd")
@@ -79,12 +88,7 @@ public class TTraining extends BaseEntity
     @Excel(name = "培训结束日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date courseEnddate;
 
-    /** 是否完成 */
-    @Excel(name = "是否完成", dictType = "YES_NO_EN")
-    private Long isfinish;
-
     /** 确认人 */
-    @Excel(name = "确认人")
     private String confirmor;
 
     /** 删除状态 */
@@ -121,10 +125,6 @@ public class TTraining extends BaseEntity
     @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
     private Date endDate;
 
-    /** 培训分类 */
-    @Excel(name = "培训分类", dictType = "TRAINING_TYPE")
-    private String trainingType;
-
     /** 未参会人员名单 */
     private String nonParticipants;
 

+ 3 - 3
master/src/main/java/com/ruoyi/project/training/domain/TTrainingMatrix.java

@@ -23,11 +23,11 @@ public class TTrainingMatrix extends BaseEntity
     private Long id;
 
     /** 培训级别 */
-    @Excel(name = "培训级别", dictType = "TRAINING_LEVEL")
+    @Excel(name = "培训级别", dictType = "TRAINING_LEVEL", width = 30)
     private String trainingLevel;
 
     /** 课程名称 */
-    @Excel(name = "课程名称")
+    @Excel(name = "课程名称", width = 40)
     private String item;
 
     /** 课程代码 */
@@ -65,7 +65,7 @@ public class TTrainingMatrix extends BaseEntity
     private String involvedMoc;
 
     /** 指定其他部门 */
-    @Excel(name = "指定其他部门")
+    @Excel(name = "指定其他部门", dictType = "ACTUALPOST")
     private String designatedOther;
 
     /** 备注 */

+ 5 - 5
master/src/main/java/com/ruoyi/project/training/domain/TTrainingRegular.java

@@ -27,7 +27,7 @@ public class TTrainingRegular extends BaseEntity
     private String courseCode;
 
     /** 课程名称 */
-    @Excel(name = "课程名称")
+    @Excel(name = "课程名称", width = 40)
     private String item;
 
     /** 需参培岗位 */
@@ -37,10 +37,6 @@ public class TTrainingRegular extends BaseEntity
     /** 岗位 */
     private List<String> actualpost;
 
-    /** 备注 */
-    @Excel(name = "备注")
-    private String remarks;
-
     /** 删除状态 */
     private Long delFlag;
 
@@ -102,6 +98,10 @@ public class TTrainingRegular extends BaseEntity
     @Excel(name = "部门名称")
     private String deptName;
 
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
     /** 不存在计划日期 */
     private String notPlan;
 

+ 1 - 0
master/src/main/resources/mybatis/training/TTrainingMatrixMapper.xml

@@ -36,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTTrainingMatrixVo"/>
         <where>
             <if test="trainingLevel != null  and trainingLevel != ''"> and training_level = #{trainingLevel}</if>
+            <if test="item != null  and item != ''"> and item like concat(concat('%', #{item}), '%')</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->

+ 1 - 0
master/src/main/resources/mybatis/training/TTrainingRegularMapper.xml

@@ -40,6 +40,7 @@
     <select id="selectTTrainingRegularList" parameterType="TTrainingRegular" resultMap="TTrainingRegularResult">
         <include refid="selectTTrainingRegularVo"/>
         <where>
+            <if test="item != null  and item != ''"> and item like concat(concat('%', #{item}), '%')</if>
             <if test="year != null  and year != ''"> and year = #{year}</if>
             and d.del_flag = 0
         </where>

BIN
master/src/main/resources/static/template/document/plantproglistbook.xlsx


BIN
master/src/main/resources/static/template/document/plantproglistform.xlsx


BIN
master/src/main/resources/static/template/document/plantproglistguide.xlsx


BIN
master/src/main/resources/static/template/document/plantproglistmaterials.xlsx


BIN
master/src/main/resources/static/template/document/plantproglistprocedure.xlsx


BIN
master/src/main/resources/static/template/ehs/incidentRecords.xlsx


BIN
master/src/main/resources/static/template/ehs/msds.xlsx


BIN
master/src/main/resources/static/template/plant/targetlist.xls


+ 29 - 22
ui/src/views/ehs/records/index.vue

@@ -394,9 +394,12 @@
                 <em>{{ $t('点击上传') }}</em>
               </div>
               <div class="el-upload__tip" slot="tip">
-                  <el-checkbox v-model="upload.updateSupport" />{{ $t('是否更新已经存在的用户数据') }}
+                  <!--<el-checkbox v-model="upload.updateSupport" />{{ $t('是否更新已经存在的用户数据') }}-->
                   <el-link type="info" style="font-size:12px" @click="importTemplate">{{ $t('下载模板') }}</el-link>
               </div>
+              <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
+                <input name="type" :value="upload.type" hidden />
+              </form>
               <div class="el-upload__tip" style="color:red" slot="tip">{{ $t('提示:仅允许导入“xls”或“xlsx”格式文件!') }}</div>
           </el-upload>
           <div slot="footer" class="dialog-footer">
@@ -531,18 +534,21 @@ export default {
       riskClassOptions: [],
       // 用户导入参数
       upload: {
-          // 是否显示弹出层(用户导入)
-          open: false,
-          // 弹出层标题(用户导入)
-          title: "",
-          // 是否禁用上传
-          isUploading: false,
-          // 是否更新已经存在的用户数据
-          updateSupport: 0,
-          // 设置上传的请求头部
-          headers: { Authorization: "Bearer " + getToken() },
-          // 上传的地址
-          url: process.env.VUE_APP_BASE_API + "/ehs/records/importData"
+        downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+        //下载模板类型
+        type: "incidentRecords",
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/ehs/records/importData"
       },
       // 报告附件参数
       doc: {
@@ -976,22 +982,23 @@ export default {
       },
       /** 下载模板操作 */
       importTemplate() {
-          importTemplate().then(response => {
-              this.download(response.msg);
-          });
+        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();
-          this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
-          this.getList();
+        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() {

+ 9 - 0
ui/src/views/training/matrix/index.vue

@@ -11,6 +11,15 @@
           />
         </el-select>
       </el-form-item>
+      <el-form-item :label="$t('课程名称')" prop="item">
+        <el-input
+          v-model="queryParams.item"
+          :placeholder="$t('请输入') + $t('课程名称')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('搜索') }}</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('重置') }}</el-button>

+ 11 - 2
ui/src/views/training/regular/index.vue

@@ -10,6 +10,15 @@
                         @keyup.enter.native="handleQuery">
         </el-date-picker>
       </el-form-item>
+      <el-form-item :label="$t('课程名称')" prop="item">
+        <el-input
+          v-model="queryParams.item"
+          :placeholder="$t('请输入') + $t('课程名称')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('搜索') }}</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('重置') }}</el-button>
@@ -54,7 +63,7 @@
           @click="handleImport"
           v-hasPermi="['training:regular:edit']"
         >导入</el-button>
-      </el-col>-->
+      </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -63,7 +72,7 @@
           @click="handleExport"
           v-hasPermi="['training:regular:export']"
         >{{ $t('导出') }}</el-button>
-      </el-col>
+      </el-col>-->
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 

+ 2 - 4
ui/src/views/training/training/index.vue

@@ -88,7 +88,7 @@
           v-hasPermi="['training:training:remove']"
         >{{ $t('删除') }}</el-button>
       </el-col>
-        <el-col :span="1.5">
+        <!--<el-col :span="1.5">
             <el-button
                     type="info"
                     icon="el-icon-upload2"
@@ -96,7 +96,7 @@
                     @click="handleImport"
                     v-hasPermi="['training:training:edit']"
             >{{ $t('导入') }}</el-button>
-        </el-col>
+        </el-col>-->
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -151,7 +151,6 @@
         </template>
       </el-table-column>
       <el-table-column :label="$t('未参培人员名单')" align="center" prop="nonParticipants" width="200" :show-overflow-tooltip="true" />
-      <!--<el-table-column :label="$t('确认人')" align="center" prop="confirmor" :show-overflow-tooltip="true"/>-->
       <el-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('操作')" align="center" fixed="right" width="210" class-name="small-padding fixed-width">
         <template slot-scope="scope">
@@ -887,7 +886,6 @@ export default {
         courseStartdate: null,
         courseEnddate: null,
         isfinish: null,
-        confirmor: null,
         delFlag: null,
         createrCode: null,
         createdate: null,