liying5537 3 năm trước cách đây
mục cha
commit
8c7ac60c71
49 tập tin đã thay đổi với 617 bổ sung605 xóa
  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. 134 20
      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. 58 56
      master/src/main/java/com/ruoyi/project/ehs/domain/TMsds.java
  6. 18 18
      master/src/main/java/com/ruoyi/project/training/domain/TTraining.java
  7. 3 3
      master/src/main/java/com/ruoyi/project/training/domain/TTrainingMatrix.java
  8. 5 5
      master/src/main/java/com/ruoyi/project/training/domain/TTrainingRegular.java
  9. 1 1
      master/src/main/resources/application.yml
  10. 4 2
      master/src/main/resources/mybatis/ehs/TMsdsMapper.xml
  11. 1 0
      master/src/main/resources/mybatis/training/TTrainingMatrixMapper.xml
  12. 1 0
      master/src/main/resources/mybatis/training/TTrainingRegularMapper.xml
  13. BIN
      master/src/main/resources/static/template/document/plantproglistbook.xlsx
  14. BIN
      master/src/main/resources/static/template/document/plantproglistform.xlsx
  15. BIN
      master/src/main/resources/static/template/document/plantproglistguide.xlsx
  16. BIN
      master/src/main/resources/static/template/document/plantproglistmaterials.xlsx
  17. BIN
      master/src/main/resources/static/template/document/plantproglistprocedure.xlsx
  18. BIN
      master/src/main/resources/static/template/ehs/incidentRecords.xlsx
  19. BIN
      master/src/main/resources/static/template/ehs/msds.xlsx
  20. BIN
      master/src/main/resources/static/template/plant/targetlist.xls
  21. 1 1
      ui/.env.development
  22. 1 1
      ui/src/components/Pagination/index.vue
  23. 5 26
      ui/src/views/components/PlantProgList/index.vue
  24. 1 1
      ui/src/views/components/Reliability/safetyvalve.vue
  25. 65 86
      ui/src/views/document/publicdoc/index.vue
  26. 1 1
      ui/src/views/ehs/danger/index.vue
  27. 6 26
      ui/src/views/ehs/environapproval/index.vue
  28. 6 26
      ui/src/views/ehs/fireapproval/index.vue
  29. 6 26
      ui/src/views/ehs/healthapproval/index.vue
  30. 10 42
      ui/src/views/ehs/msds/index.vue
  31. 2 23
      ui/src/views/ehs/rcaudit/index.vue
  32. 34 48
      ui/src/views/ehs/records/index.vue
  33. 6 26
      ui/src/views/ehs/safetyapproval/index.vue
  34. 1 1
      ui/src/views/plant/manageactivity/index.vue
  35. 1 1
      ui/src/views/plant/staffmgr/index.vue
  36. 5 26
      ui/src/views/plant/targetagreement/index.vue
  37. 1 1
      ui/src/views/plant/targetlist/index.vue
  38. 2 23
      ui/src/views/plant/targetmeasures/index.vue
  39. 1 1
      ui/src/views/process/alarmmodify/index.vue
  40. 5 26
      ui/src/views/process/moc/index.vue
  41. 1 1
      ui/src/views/production/blind/index.vue
  42. 1 1
      ui/src/views/reliability/abnormalreport/index.vue
  43. 1 1
      ui/src/views/sems/specfile/index.vue
  44. 9 0
      ui/src/views/training/matrix/index.vue
  45. 1 1
      ui/src/views/training/newemployee/index.vue
  46. 11 2
      ui/src/views/training/regular/index.vue
  47. 6 29
      ui/src/views/training/training/index.vue
  48. 5 26
      ui/src/views/training/trainingrecords/index.vue
  49. 1 1
      ui/src/views/training/worklicense/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);
+    }
 }

+ 134 - 20
master/src/main/java/com/ruoyi/project/ehs/controller/TMsdsController.java

@@ -9,6 +9,8 @@ import java.util.List;
 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.plant.service.ITStaffmgrService;
 import com.ruoyi.project.system.domain.SysDept;
 import com.ruoyi.project.system.domain.SysDictData;
 import com.ruoyi.project.system.service.ISysDeptService;
@@ -46,6 +48,9 @@ public class TMsdsController extends BaseController
     @Autowired
     private ISysDeptService iSysDeptService;
 
+    @Autowired
+    private ITStaffmgrService tStaffmgrService;
+
     /**
      * 查询MSDS管理列表
      */
@@ -134,9 +139,16 @@ 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");
+        List<SysDictData> ghsPictogram = iSysDictTypeService.selectDictDataByType("GHS_PICTOGRAM");
+        List<SysDictData> workArea = iSysDictTypeService.selectDictDataByType("WORK_AREA");
+        List<SysDictData> reviewState = iSysDictTypeService.selectDictDataByType("REVIEW_STATE");
         //部门查询
         List<SysDept> dept = iSysDeptService.selectDeptList(new SysDept());
+        //人员查询
+        List<TStaffmgr> staffmgrs = tStaffmgrService.selectTStaffmgrList(new TStaffmgr());
         int rowNum = sheet.getPhysicalNumberOfRows();
         int failNumber = 0;
         for (int i = 1; i < rowNum; i++) {
@@ -150,45 +162,147 @@ public class TMsdsController extends BaseController
                     cell.setCellType(CellType.STRING);
                     String cellValue = ExcelUtils.getCellValue(cell);
                     logger.info("cellValue:" + cellValue);
-                    /*if (j == 0) {
-                        for (SysDictData p : plant) {
+                    if (j == 0) {
+                        entity.setItem(Long.parseLong(cellValue));//ITEM
+                    } else if (j == 1) {
+                        for (SysDictData p : productCategory) {
                             if (p.getDictLabel().equals(cellValue.trim())) {
-                                entity.setPlantCode(p.getDictValue());//装置名称
+                                entity.setProductcategory(p.getDictValue());//产品类别
                             }
                         }
-                    } else if (j == 1) {
-                        entity.setItem(cellValue);//ITEM
                     } else if (j == 2) {
-                        entity.setProductcategory(cellValue);//产品类别
-                    } else if (j == 3) {
                         entity.setEnName(cellValue);//英文名称
-                    } else if (j == 4) {
+                    } else if (j == 3) {
                         entity.setCnName(cellValue);//中文名称
-                    } else if (j == 5) {
+                    } else if (j == 4) {
                         entity.setCasNo(cellValue);//CAS号
+                    } else if (j == 5) {
+                        if (!cellValue.equals("")) {
+                            String[] hazard = cellValue.split(",");
+                            String hazardNo = "";
+                            int m = 0;
+                            for (String h : hazard) {
+                                for (SysDictData p : hazardPhrases) {
+                                    if (p.getDictLabel().equals(h)) {
+                                        if (m == 0) {
+                                            hazardNo = p.getDictValue();
+                                        }else {
+                                            hazardNo = hazardNo + "," + p.getDictValue();
+                                        }
+                                    }
+                                }
+                                m++;
+                            }
+                            entity.setHazardPhrases(hazardNo);//危险警句
+                        }
                     } else if (j == 6) {
-                        entity.setCnVersion(cellValue);//中文版次
+                        if (!cellValue.equals("")) {
+                            String[] cmrSplit = cellValue.split(",");
+                            String cmrdNo = "";
+                            int m = 0;
+                            for (String choose : cmrSplit) {
+                                for (SysDictData c : cmr) {
+                                    if (c.getDictLabel().equals(choose)) {
+                                        if (m == 0) {
+                                            cmrdNo = c.getDictValue();
+                                        }else {
+                                            cmrdNo = cmrdNo + "," + c.getDictValue();
+                                        }
+                                    }
+                                }
+                                m++;
+                            }
+                            entity.setCmr(cmrdNo);//是否三致物
+                        }
                     } else if (j == 7) {
-                        entity.setEnVersion(cellValue);//英文版次
+                        if (!cellValue.equals("")) {
+                            String[] ghs = cellValue.split(",");
+                            String ghsNo = "";
+                            int m = 0;
+                            for (String choose : ghs) {
+                                for (SysDictData p : ghsPictogram) {
+                                    if (p.getDictLabel().equals(choose)) {
+                                        if (m == 0) {
+                                            ghsNo = p.getDictValue();
+                                        }else {
+                                            ghsNo = ghsNo + "," + p.getDictValue();
+                                        }
+                                    }
+                                }
+                                m++;
+                            }
+                            entity.setGhsPictogram(ghsNo);//GHS符号
+                        }
                     } else if (j == 8) {
-                        entity.setSupplier(cellValue);//供应商
+                        entity.setHoldup(cellValue);//保存量
                     } else if (j == 9) {
-                        if (cellValue.length() > 3) {
-                            entity.setThisupdatetime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));//本次更新时间
+                        if (!cellValue.equals("")) {
+                            String[] area = cellValue.split(",");
+                            String areaNo = "";
+                            int m = 0;
+                            for (String choose : area) {
+                                for (SysDictData w : workArea) {
+                                    if (w.getDictLabel().equals(choose)) {
+                                        if (m == 0) {
+                                            areaNo = w.getDictValue();
+                                        }else {
+                                            areaNo = areaNo + "," + w.getDictValue();
+                                        }
+                                    }
+                                }
+                                m++;
+                            }
+                            entity.setWorkArea(areaNo);//工作区域
                         }
                     } else if (j == 10) {
+                        entity.setForm(cellValue);//形态
+                    } else if (j == 11) {
+                        entity.setExplosionLimit(cellValue);//爆炸极限
+                    } else if (j == 12) {
+                        entity.setMeltingPoint(cellValue);//熔点
+                    } else if (j == 13) {
+                        entity.setBoilingPoint(cellValue);//沸点
+                    } else if (j == 14) {
+                        entity.setDensity(cellValue);//密度/分子量
+                    } else if (j == 15) {
+                        entity.setPurity(cellValue);//组成及纯度
+                    } else if (j == 16) {
+                        entity.setResponsibleCompany(cellValue);//归属单位
+                    } else if (j == 17) {
                         if (cellValue.length() > 3) {
-                            entity.setNextupdatetime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));//下次更新时间
+                            entity.setIssueTime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));//出版日期
                         }
-                    } else if (j == 11) {
+                    } else if (j == 18) {
+                        entity.setVersion(cellValue);//版次
+                    } else if (j == 20) {
+                        for (TStaffmgr s : staffmgrs) {
+                            if (s.getStaffid().equals(cellValue.trim())) {
+                                entity.setReviewer(s.getStaffid());//回顾人
+                            }
+                        }
+                    } else if (j == 21) {
+                        if (cellValue.length() > 3) {
+                            entity.setReviewdate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));//回顾日期
+                        }
+                    } else if (j == 22) {
+                        for (SysDictData r : reviewState) {
+                            if (r.getDictLabel().equals(cellValue.trim())) {
+                                entity.setReviewState(r.getDictValue());//回顾状态
+                            }
+                        }
+                    } else if (j == 23) {
+                        if (cellValue.length() > 3) {
+                            entity.setNextReviewdate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));//下次回顾日期
+                        }
+                    } else if (j == 24) {
+                        entity.setRemarks(cellValue);//备注
+                    } else if (j == 25) {
                         for (SysDept d : dept) {
                             if (d.getDeptName().equals(cellValue.trim())) {
                                 entity.setDeptId(d.getDeptId());//部门编号
                             }
                         }
-                    } else if (j == 12) {
-                        entity.setRemarks(cellValue);//备注
-                    }*/
+                    }
                 }
                 entity.setCreaterCode(userId.toString());
                 logger.info("entity:" + entity);

+ 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;
 
     /** 部门名称 */

+ 58 - 56
master/src/main/java/com/ruoyi/project/ehs/domain/TMsds.java

@@ -30,7 +30,7 @@ public class TMsds extends BaseEntity {
     /**
      * 产品类别
      */
-    @Excel(name = "产品类别")
+    @Excel(name = "产品类别", dictType = "PRODUCT_CATEGORY")
     private String productcategory;
 
     /**
@@ -51,71 +51,36 @@ public class TMsds extends BaseEntity {
     @Excel(name = "CAS号")
     private String casNo;
 
-    /**
-     * 部门编号
-     */
-    private Long deptId;
-
-    /**
-     * 删除标识
-     */
-    private Long delFlag;
-
     /**
      * 危险警句(详细内容)
      */
-    @Excel(name = "危险警句", readConverterExp = "详=细内容")
+    @Excel(name = "危险警句", dictType = "HAZARD_PHRASES")
     private String hazardPhrases;
 
-    /**
-     * 备注
-     */
-    private String remarks;
-
     /**
      * 是否三致物
      */
-    @Excel(name = "是否三致物")
+    @Excel(name = "是否三致物", dictType = "CMR")
     private String cmr;
 
     /**
      * GHS符号
      */
-    @Excel(name = "GHS符号")
+    @Excel(name = "GHS符号", dictType = "GHS_PICTOGRAM")
     private String ghsPictogram;
 
-    /**
-     * 创建人
-     */
-    private String createrCode;
-
     /**
      * 保存量
      */
     @Excel(name = "保存量")
     private String holdup;
 
-    /**
-     * 创建日期
-     */
-    private Date createdate;
-
-    /**
-     * 更新人
-     */
-    private String updaterCode;
-
     /**
      * 工作区域
      */
-    @Excel(name = "工作区域")
+    @Excel(name = "工作区域", dictType = "WORK_AREA")
     private String workArea;
 
-    /**
-     * 更新日期
-     */
-    private Date updatedate;
-
     /**
      * 形态
      */
@@ -125,19 +90,19 @@ public class TMsds extends BaseEntity {
     /**
      * 爆炸极限(v%)
      */
-    @Excel(name = "爆炸极限", readConverterExp = "v=%")
+    @Excel(name = "爆炸极限(v%)")
     private String explosionLimit;
 
     /**
      * 熔点(℃)
      */
-    @Excel(name = "熔点", readConverterExp = "℃=")
+    @Excel(name = "熔点(℃)")
     private String meltingPoint;
 
     /**
      * 沸点(℃)
      */
-    @Excel(name = "沸点", readConverterExp = "℃=")
+    @Excel(name = "沸点(℃)")
     private String boilingPoint;
 
     /**
@@ -149,7 +114,7 @@ public class TMsds extends BaseEntity {
     /**
      * 组成及纯度(w/w)
      */
-    @Excel(name = "组成及纯度", readConverterExp = "w=/w")
+    @Excel(name = "组成及纯度(w/w)")
     private String purity;
 
     /**
@@ -166,16 +131,6 @@ public class TMsds extends BaseEntity {
     private Date issueTime;
     private String issueTimeYear;
 
-    /** 出版日期2 */
-    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
-    @Excel(name = "出版日期", width = 30, dateFormat = "yyyy-MM-dd")
-    private Date issuetimeTwo;
-
-    /** 出版日期3 */
-    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
-    @Excel(name = "出版日期", width = 30, dateFormat = "yyyy-MM-dd")
-    private Date issuetimeThree;
-
     /**
      * 版次
      */
@@ -185,8 +140,9 @@ public class TMsds extends BaseEntity {
     /**
      * 回顾人
      */
-    @Excel(name = "回顾人")
     private String reviewer;
+    @Excel(name = "回顾人")
+    private String reviewerName;
 
     /**
      * 回顾日期
@@ -198,7 +154,7 @@ public class TMsds extends BaseEntity {
     /**
      * 回顾状态
      */
-    @Excel(name = "回顾状态")
+    @Excel(name = "回顾状态", dictType = "REVIEW_STATE")
     private String reviewState;
 
     /**
@@ -208,6 +164,50 @@ public class TMsds extends BaseEntity {
     @Excel(name = "下次回顾日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date nextReviewdate;
 
+    /**
+     * 部门编号
+     */
+    private Long deptId;
+
+    /**
+     * 删除标识
+     */
+    private Long delFlag;
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /**
+     * 创建人
+     */
+    private String createrCode;
+
+    /**
+     * 创建日期
+     */
+    private Date createdate;
+
+    /**
+     * 更新人
+     */
+    private String updaterCode;
+
+    /**
+     * 更新日期
+     */
+    private Date updatedate;
+
+    /** 出版日期2 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    private Date issuetimeTwo;
+
+    /** 出版日期3 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    private Date issuetimeThree;
+
     /** 部门名称 */
     @Excel(name = "部门名称")
     private String deptName;
@@ -452,7 +452,9 @@ public class TMsds extends BaseEntity {
     public String getReviewer() {
         return reviewer;
     }
+    public String getReviewerName() { return reviewerName; }
 
+    public void setReviewerName(String reviewerName) { this.reviewerName = reviewerName; }
     public void setReviewdate(Date reviewdate) {
         this.reviewdate = reviewdate;
     }

+ 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 - 1
master/src/main/resources/application.yml

@@ -9,7 +9,7 @@ ruoyi:
   # 实例演示开关
   demoEnabled: true
   # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /data/cpmsfile/uploadPath)
-  profile: /data/cpmsfile/uploadPath
+  profile: D:/ruoyi/uploadPath
   # 邮件中链接跳转路径 示例(本地:http://localhost/#,服务器:http://47.114.101.16:8080/cpms/index.html#)
   requestJumpPath: http://47.114.101.16:8080/cpms/index.html#
   # 获取ip地址开关

+ 4 - 2
master/src/main/resources/mybatis/ehs/TMsdsMapper.xml

@@ -35,6 +35,7 @@
         <result property="issuetimeThree"    column="issuetime_three"    />
         <result property="version"    column="version"    />
         <result property="reviewer"    column="reviewer"    />
+        <result property="reviewerName"    column="name"    />
         <result property="reviewdate"    column="reviewdate"    />
         <result property="reviewState"    column="review_state"    />
         <result property="nextReviewdate"    column="next_reviewdate"    />
@@ -42,8 +43,9 @@
     </resultMap>
 
     <sql id="selectTMsdsVo">
-        select d.id, d.item, d.productcategory, d.en_name, d.cn_name, d.cas_no, d.dept_id, d.del_flag, d.hazard_phrases, d.cmr, d.remarks, d.creater_code, d.ghs_pictogram, d.createdate, d.holdup, d.updater_code, d.work_area, d.form, d.updatedate, d.explosion_limit, d.melting_point, d.boiling_point, d.density, d.purity, d.responsible_company, d.issue_time, d.version, d.reviewer, d.reviewdate, d.review_state, d.next_reviewdate, d.issuetime_two, d.issuetime_three ,s.dept_name from t_msds d
+        select d.id, d.item, d.productcategory, d.en_name, d.cn_name, d.cas_no, d.dept_id, d.del_flag, d.hazard_phrases, d.cmr, d.remarks, d.creater_code, d.ghs_pictogram, d.createdate, d.holdup, d.updater_code, d.work_area, d.form, d.updatedate, d.explosion_limit, d.melting_point, d.boiling_point, d.density, d.purity, d.responsible_company, d.issue_time, d.version, d.reviewer, t.name, d.reviewdate, d.review_state, d.next_reviewdate, d.issuetime_two, d.issuetime_three ,s.dept_name from t_msds d
       left join sys_dept s on s.dept_id = d.dept_id
+      left join t_staffmgr t on t.staffid = d.reviewer
     </sql>
 
     <select id="selectTMsdsList" parameterType="TMsds" resultMap="TMsdsResult">
@@ -63,7 +65,7 @@
 
     <select id="selectTMsdsById" parameterType="Long" resultMap="TMsdsResult">
         <include refid="selectTMsdsVo"/>
-        where id = #{id}
+        where d.id = #{id}
     </select>
 
     <insert id="insertTMsds" parameterType="TMsds">

+ 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


+ 1 - 1
ui/.env.development

@@ -3,7 +3,7 @@ ENV = 'development'
 
 # CPMS管理系统/开发环境
 VUE_APP_BASE_API = '/dev-api'
-#VUE_APP_BASE_API = 'http://47.114.101.16:8090'
+VUE_APP_BASE_API = 'http://47.114.101.16:8090'
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 1 - 1
ui/src/components/Pagination/index.vue

@@ -96,6 +96,6 @@ export default {
   padding: 32px 16px;
 }
 .pagination-container.hidden {
-  display: none;
+display: none;
 }
 </style>

+ 5 - 26
ui/src/views/components/PlantProgList/index.vue

@@ -413,7 +413,7 @@
         <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
       </div>
     </el-dialog>
-    <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+    <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
       <div style="margin-top: -30px">
@@ -920,33 +920,12 @@
     },
     //pdf预览
     openPdf(){
-        window.open(this.pdf.pdfUrl);//path是文件的全路径地址
-      },
-      handleSee (row){
+      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+    },
+    handleSee (row){
       this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
       this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
+      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
     },
   }
 }

+ 1 - 1
ui/src/views/components/Reliability/safetyvalve.vue

@@ -382,7 +382,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">

+ 65 - 86
ui/src/views/document/publicdoc/index.vue

@@ -253,7 +253,7 @@
               </template>
             </el-table-column>
           </el-table>
-          <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+          <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
             <div style="margin-top: -30px">
@@ -426,12 +426,12 @@
         this.loading = false;
       });
     },
-     /** 查询部门下拉树结构 */
-     getTreeselect() {
-        treeselect().then(response => {
-            this.deptOptions = response.data;
-        });
-     },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
     /** 查询目录菜单 */
     getMenuList() {
       listMenu(this.queryMenu).then(response => {
@@ -483,7 +483,7 @@
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
+      this.single = selection.length !== 1
       this.multiple = !selection.length
     },
     /** 新增按钮操作 */
@@ -530,60 +530,60 @@
     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 delPublicdoc(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess(this.$t('删除成功'));
-        })
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function () {
+        return delPublicdoc(ids);
+      }).then(() => {
+        this.getList();
+        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 exportPublicdoc(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-        })
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function () {
+        return exportPublicdoc(queryParams);
+      }).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(val) {
+      if (val == 1) {
+        this.$refs.upload.submit();
+      }
     },
-      /** 导入按钮操作 */
-      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(val) {
-        if(val == 1) {
-          this.$refs.upload.submit();
-        }
-      },
     /** 报告附件按钮操作 */
     handleDoc(row) {
       this.doc.id = row.id;
@@ -596,7 +596,7 @@
         this.$refs.doc.clearFiles()
       })
     },
-    getFileList (){
+    getFileList() {
       allFileList(this.doc.queryParams).then(response => {
         this.doc.commonfileList = response;
       });
@@ -609,38 +609,17 @@
     //附件上传成功处理
     handleFileDocSuccess(response, file, fileList) {
       this.doc.isUploading = false;
-      this.$alert(response.msg, this.$t('导入结果') , { dangerouslyUseHTMLString: true });
+      this.$alert(response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
       this.getFileList()
     },
     //pdf预览
-    openPdf(){
-        window.open(this.pdf.pdfUrl);//path是文件的全路径地址
-      },
-      handleSee (row){
-      this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
-      this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
+    openPdf() {
+      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
     },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
+    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
     },
     /** 删除按钮操作 */
     handleDeleteDoc(row) {
@@ -649,7 +628,7 @@
         confirmButtonText: this.$t('确定'),
         cancelButtonText: this.$t('取消'),
         type: "warning"
-      }).then(function() {
+      }).then(function () {
         return delCommonfile(ids);
       }).then(() => {
         this.getFileList()

+ 1 - 1
ui/src/views/ehs/danger/index.vue

@@ -273,7 +273,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">

+ 6 - 26
ui/src/views/ehs/environapproval/index.vue

@@ -521,7 +521,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -1107,19 +1107,10 @@ export default {
         window.open(this.pdf.pdfUrl);//path是文件的全路径地址
       },
       handleSee (row){
-      this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
-      this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
+        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
+      },
     handleWaterAvatarSuccess (res, file, fileList) {
       this.picWaterUrl =  URL.createObjectURL(file.raw);
       this.$alert(res.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
@@ -1136,18 +1127,7 @@ export default {
       this.conExhaustUrl =  URL.createObjectURL(file.raw);
       this.$alert(res.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
     },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
-    }
+
   }
 };
 </script>

+ 6 - 26
ui/src/views/ehs/fireapproval/index.vue

@@ -412,7 +412,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -914,31 +914,11 @@ export default {
         window.open(this.pdf.pdfUrl);//path是文件的全路径地址
       },
       handleSee (row){
-      this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
-      this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
-    }
+        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
+      },
+
   }
 };
 </script>

+ 6 - 26
ui/src/views/ehs/healthapproval/index.vue

@@ -407,7 +407,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -837,31 +837,11 @@ export default {
         window.open(this.pdf.pdfUrl);//path是文件的全路径地址
       },
       handleSee (row){
-      this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
-      this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
-    }
+        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
+      },
+
   }
 };
 </script>

+ 10 - 42
ui/src/views/ehs/msds/index.vue

@@ -177,7 +177,7 @@
         </template>
       </el-table-column>
       <el-table-column :label="$t('版次')" align="center" prop="version" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('回顾人')" align="center" prop="reviewer" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('回顾人')" align="center" prop="reviewerName" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('回顾日期')" align="center" prop="reviewdate" width="100">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.reviewdate, '{y}-{m}-{d}') }}</span>
@@ -486,7 +486,7 @@
           <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">
@@ -552,7 +552,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -853,22 +853,6 @@
             _this.msdsList[key].workArea = workAreaName;
             _this.msdsList[key].hazardPhrasesid = value.hazardPhrases;
             _this.msdsList[key].hazardPhrases = hazardPhrasesName;
-            /** 查询姓名 **/
-            if (value.reviewer != null) {
-              let staffId = value.reviewer.split(",");
-              staffId.forEach(function (id, index) {
-                _this.stffmgrOptions.forEach(function (item) {
-                  if (item.staffid === id) {
-                    if (index === 0) {
-                      parentName = item.name
-                    }else {
-                      parentName = parentName + "," + item.name
-                    }
-                  }
-                });
-              });
-            }
-            _this.msdsList[key].reviewer=parentName;
 
             /** GHS符号判断 **/
             var ghsPictogram = null;
@@ -1184,7 +1168,11 @@
         this.upload.open = false;
         this.upload.isUploading = false;
         this.$refs.upload.clearFiles();
-        this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        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();
       },
       // 提交上传文件
@@ -1250,30 +1238,10 @@
       },
       handleSee (row){
         this.pdf.open =true
-        this.pdf.pageNum = 1
-        this.pdf.loadedRatio = 0
-        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
         this.pdf.title = row.fileName
-        let loadingTask = null
-        loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-        loadingTask.promise.then(pdf => {
-          this.pdf.numPages = pdf.numPages
-        }).catch(err => {
-          this.msgError(this.$t('pdf加载失败'))
-        })
-      },
-      // pdf上一页
-      prePage() {
-        let page = this.pdf.pageNum
-        page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-        this.pdf.pageNum = page
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
       },
-      // pdf下一页
-      nextPage() {
-        let page = this.pdf.pageNum
-        page = page < this.pdf.pageTotalNum ? page + 1 : 1
-        this.pdf.pageNum = page
-      }
+
     }
   };
 </script>

+ 2 - 23
ui/src/views/ehs/rcaudit/index.vue

@@ -286,7 +286,7 @@
               </template>
             </el-table-column>
           </el-table>
-          <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+          <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
             <div style="margin-top: -30px">
@@ -808,29 +808,8 @@
       },
       handleSee (row){
         this.pdf.open =true
-        this.pdf.pageNum = 1
-        this.pdf.loadedRatio = 0
-        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
         this.pdf.title = row.fileName
-        let loadingTask = null
-        loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-        loadingTask.promise.then(pdf => {
-          this.pdf.numPages = pdf.numPages
-        }).catch(err => {
-          this.msgError(this.$t('pdf加载失败'))
-        })
-      },
-      // pdf上一页
-      prePage() {
-        let page = this.pdf.pageNum
-        page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-        this.pdf.pageNum = page
-      },
-      // pdf下一页
-      nextPage() {
-        let page = this.pdf.pageNum
-        page = page < this.pdf.pageTotalNum ? page + 1 : 1
-        this.pdf.pageNum = page
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
       },
     }
   };

+ 34 - 48
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">
@@ -458,7 +461,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -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() {
@@ -1058,31 +1065,10 @@ export default {
         window.open(this.pdf.pdfUrl);//path是文件的全路径地址
       },
       handleSee (row){
-      this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
-      this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
-    },
+        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
+      },
     /** 删除按钮操作 */
     handleDeleteDoc(row) {
       const ids = row.id || this.ids;

+ 6 - 26
ui/src/views/ehs/safetyapproval/index.vue

@@ -416,7 +416,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -923,31 +923,11 @@ export default {
         window.open(this.pdf.pdfUrl);//path是文件的全路径地址
       },
       handleSee (row){
-      this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
-      this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
-    }
+        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
+      },
+
   }
 };
 </script>

+ 1 - 1
ui/src/views/plant/manageactivity/index.vue

@@ -305,7 +305,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">

+ 1 - 1
ui/src/views/plant/staffmgr/index.vue

@@ -504,7 +504,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">

+ 5 - 26
ui/src/views/plant/targetagreement/index.vue

@@ -371,7 +371,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -937,31 +937,10 @@ export default {
         window.open(this.pdf.pdfUrl);//path是文件的全路径地址
       },
       handleSee (row){
-      this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
-      this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
-    },
+        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
+      },
     /** 删除按钮操作 */
     handleDeleteDoc(row) {
       const ids = row.id || this.ids;

+ 1 - 1
ui/src/views/plant/targetlist/index.vue

@@ -214,7 +214,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">

+ 2 - 23
ui/src/views/plant/targetmeasures/index.vue

@@ -506,7 +506,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -1387,29 +1387,8 @@
       },
       handleSee (row){
         this.pdf.open =true
-        this.pdf.pageNum = 1
-        this.pdf.loadedRatio = 0
-        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
         this.pdf.title = row.fileName
-        let loadingTask = null
-        loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-        loadingTask.promise.then(pdf => {
-          this.pdf.numPages = pdf.numPages
-        }).catch(err => {
-          this.msgError(this.$t('pdf加载失败'))
-        })
-      },
-      // pdf上一页
-      prePage() {
-        let page = this.pdf.pageNum
-        page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-        this.pdf.pageNum = page
-      },
-      // pdf下一页
-      nextPage() {
-        let page = this.pdf.pageNum
-        page = page < this.pdf.pageTotalNum ? page + 1 : 1
-        this.pdf.pageNum = page
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
       },
     }
   };

+ 1 - 1
ui/src/views/process/alarmmodify/index.vue

@@ -283,7 +283,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">

+ 5 - 26
ui/src/views/process/moc/index.vue

@@ -511,7 +511,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -1230,31 +1230,10 @@ export default {
         window.open(this.pdf.pdfUrl);//path是文件的全路径地址
       },
       handleSee (row){
-      this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
-      this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
-    },
+        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
+      },
     // 取消
     cancelFile(row, index) {
       // 如果是新增的数据

+ 1 - 1
ui/src/views/production/blind/index.vue

@@ -336,7 +336,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">

+ 1 - 1
ui/src/views/reliability/abnormalreport/index.vue

@@ -305,7 +305,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">

+ 1 - 1
ui/src/views/sems/specfile/index.vue

@@ -112,7 +112,7 @@
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
-    <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+    <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
       <div style="margin-top: -30px">

+ 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>

+ 1 - 1
ui/src/views/training/newemployee/index.vue

@@ -270,7 +270,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">

+ 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>
 

+ 6 - 29
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">
@@ -493,7 +492,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -887,7 +886,6 @@ export default {
         courseStartdate: null,
         courseEnddate: null,
         isfinish: null,
-        confirmor: null,
         delFlag: null,
         createrCode: null,
         createdate: null,
@@ -1267,32 +1265,11 @@ export default {
     //pdf预览
     openPdf(){
         window.open(this.pdf.pdfUrl);//path是文件的全路径地址
-      },
-      handleSee (row){
+    },
+    handleSee (row){
       this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
       this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
+      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
     },
     /** 删除按钮操作 */
     handleDeleteDoc(row) {

+ 5 - 26
ui/src/views/training/trainingrecords/index.vue

@@ -617,7 +617,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -1400,31 +1400,10 @@ export default {
         window.open(this.pdf.pdfUrl);//path是文件的全路径地址
       },
       handleSee (row){
-      this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
-      this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
-    },
+        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;

+ 1 - 1
ui/src/views/training/worklicense/index.vue

@@ -371,7 +371,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">