wangggziwen 1 өдөр өмнө
parent
commit
a4809ac127
54 өөрчлөгдсөн 12940 нэмэгдсэн , 18 устгасан
  1. 11 0
      master/src/main/java/com/ruoyi/project/approve/damain/DevTask.java
  2. 6 0
      master/src/main/java/com/ruoyi/project/common/CommonController.java
  3. 694 0
      master/src/main/java/com/ruoyi/project/production/controller/TEoegSaiApplyController.java
  4. 93 0
      master/src/main/java/com/ruoyi/project/production/controller/TEoegSaiApproveFileController.java
  5. 128 0
      master/src/main/java/com/ruoyi/project/production/controller/TEoegSaiCategoryController.java
  6. 394 0
      master/src/main/java/com/ruoyi/project/production/controller/TEoegSaiController.java
  7. 108 0
      master/src/main/java/com/ruoyi/project/production/controller/TEoegSaiFileController.java
  8. 289 0
      master/src/main/java/com/ruoyi/project/production/controller/vo/EoegSaiApplyExportVO.java
  9. 629 0
      master/src/main/java/com/ruoyi/project/production/controller/vo/EoegSaiApplyQueryVO.java
  10. 99 0
      master/src/main/java/com/ruoyi/project/production/controller/vo/EoegSaiExportVO.java
  11. 189 0
      master/src/main/java/com/ruoyi/project/production/controller/vo/EoegSaiQueryVO.java
  12. 0 2
      master/src/main/java/com/ruoyi/project/production/controller/vo/SaiApplyQueryVO.java
  13. 0 2
      master/src/main/java/com/ruoyi/project/production/controller/vo/SaiExportVO.java
  14. 1 2
      master/src/main/java/com/ruoyi/project/production/controller/vo/SaiQueryVO.java
  15. 246 0
      master/src/main/java/com/ruoyi/project/production/domain/TEoegSai.java
  16. 520 0
      master/src/main/java/com/ruoyi/project/production/domain/TEoegSaiApply.java
  17. 94 0
      master/src/main/java/com/ruoyi/project/production/domain/TEoegSaiApproveFile.java
  18. 95 0
      master/src/main/java/com/ruoyi/project/production/domain/TEoegSaiCategory.java
  19. 151 0
      master/src/main/java/com/ruoyi/project/production/domain/TEoegSaiFile.java
  20. 69 0
      master/src/main/java/com/ruoyi/project/production/mapper/TEoegSaiApplyMapper.java
  21. 67 0
      master/src/main/java/com/ruoyi/project/production/mapper/TEoegSaiApproveFileMapper.java
  22. 64 0
      master/src/main/java/com/ruoyi/project/production/mapper/TEoegSaiCategoryMapper.java
  23. 64 0
      master/src/main/java/com/ruoyi/project/production/mapper/TEoegSaiFileMapper.java
  24. 75 0
      master/src/main/java/com/ruoyi/project/production/mapper/TEoegSaiMapper.java
  25. 65 0
      master/src/main/java/com/ruoyi/project/production/service/ITEoegSaiApplyService.java
  26. 65 0
      master/src/main/java/com/ruoyi/project/production/service/ITEoegSaiApproveFileService.java
  27. 63 0
      master/src/main/java/com/ruoyi/project/production/service/ITEoegSaiCategoryService.java
  28. 63 0
      master/src/main/java/com/ruoyi/project/production/service/ITEoegSaiFileService.java
  29. 73 0
      master/src/main/java/com/ruoyi/project/production/service/ITEoegSaiService.java
  30. 285 0
      master/src/main/java/com/ruoyi/project/production/service/impl/TEoegSaiApplyServiceImpl.java
  31. 102 0
      master/src/main/java/com/ruoyi/project/production/service/impl/TEoegSaiApproveFileServiceImpl.java
  32. 99 0
      master/src/main/java/com/ruoyi/project/production/service/impl/TEoegSaiCategoryServiceImpl.java
  33. 97 0
      master/src/main/java/com/ruoyi/project/production/service/impl/TEoegSaiFileServiceImpl.java
  34. 140 0
      master/src/main/java/com/ruoyi/project/production/service/impl/TEoegSaiServiceImpl.java
  35. 284 0
      master/src/main/resources/mybatis/production/TEoegSaiApplyMapper.xml
  36. 82 0
      master/src/main/resources/mybatis/production/TEoegSaiApproveFileMapper.xml
  37. 96 0
      master/src/main/resources/mybatis/production/TEoegSaiCategoryMapper.xml
  38. 105 0
      master/src/main/resources/mybatis/production/TEoegSaiFileMapper.xml
  39. 147 0
      master/src/main/resources/mybatis/production/TEoegSaiMapper.xml
  40. BIN
      master/src/main/resources/static/template/production/eoegSai.xlsx
  41. BIN
      master/src/main/resources/static/template/production/eoegSaiApply.xlsx
  42. 93 0
      ui/src/api/production/eoegApply.js
  43. 61 0
      ui/src/api/production/eoegCategory.js
  44. 78 0
      ui/src/api/production/eoegSai.js
  45. 53 0
      ui/src/api/production/eoegSaiApproveFile.js
  46. 53 0
      ui/src/api/production/eoegSaiFile.js
  47. 0 12
      ui/src/views/production/apply/index.vue
  48. 2059 0
      ui/src/views/production/eoegapply/all/index.vue
  49. 51 0
      ui/src/views/production/eoegapply/index.vue
  50. 1804 0
      ui/src/views/production/eoegapply/mine/index.vue
  51. 1800 0
      ui/src/views/production/eoegapply/pending/index.vue
  52. 344 0
      ui/src/views/production/eoegcategory/index.vue
  53. 689 0
      ui/src/views/production/eoegcheck/index.vue
  54. 3 0
      ui/src/views/production/eoegsai/index.vue

+ 11 - 0
master/src/main/java/com/ruoyi/project/approve/damain/DevTask.java

@@ -5,6 +5,7 @@ import com.ruoyi.project.apply.domain.TApplyOfflinevalve;
 import com.ruoyi.project.apply.domain.TApplySafetychange;
 import com.ruoyi.project.ehs.domain.TApproveAccident;
 import com.ruoyi.project.ehs.domain.TApproveDanger;
+import com.ruoyi.project.production.domain.TEoegSaiApply;
 import com.ruoyi.project.production.domain.TSaiApply;
 import com.ruoyi.project.pssr.domain.TPssrApprove;
 import com.ruoyi.project.sems.domain.TApprove;
@@ -97,10 +98,20 @@ public class DevTask {
     /** SAI开项申请对象 */
     private TSaiApply SaiApply;
 
+    private TEoegSaiApply eoegSaiApply;
+
     private TTsApprove tTsApprove;
 
     private TPssrApprove tPssrApprove;
 
+    public TEoegSaiApply getEoegSaiApply() {
+        return eoegSaiApply;
+    }
+
+    public void setEoegSaiApply(TEoegSaiApply eoegSaiApply) {
+        this.eoegSaiApply = eoegSaiApply;
+    }
+
     public TPssrApprove gettPssrApprove() {
         return tPssrApprove;
     }

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

@@ -115,6 +115,12 @@ public class CommonController extends BaseController
         } else if( type.equals("saiApply") ) {
             downloadname = "SAI开项管理导入模板.xlsx";
             url = "static/template/production/saiApply.xlsx";
+        } else if( type.equals("eoegsai") ) {
+            downloadname = "EOEG SAI检查管理导入模板.xlsx";
+            url = "static/template/production/eoegSai.xlsx";
+        } else if( type.equals("eoegSaiApply") ) {
+            downloadname = "EOEG SAI开项管理导入模板.xlsx";
+            url = "static/template/production/eoegSaiApply.xlsx";
         } else if( type.equals("rcaudit") ) {
             downloadname = "RC审计助手导入模板.xlsx";
             url = "static/template/ehs/rcaudit.xlsx";

+ 694 - 0
master/src/main/java/com/ruoyi/project/production/controller/TEoegSaiApplyController.java

@@ -0,0 +1,694 @@
+package com.ruoyi.project.production.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.github.pagehelper.PageHelper;
+import com.github.stuxuhai.jpinyin.PinyinException;
+import com.ruoyi.common.constant.HttpStatus;
+import com.ruoyi.common.sendEmail.IMailService;
+import com.ruoyi.common.thread.Trainning.MeetingInvitationMailThread;
+import com.ruoyi.common.thread.sai.SaiApplyMailThread;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.file.ExcelUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.utils.spring.SpringUtils;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
+import com.ruoyi.framework.interceptor.annotation.RepeatSubmit;
+import com.ruoyi.framework.security.LoginUser;
+import com.ruoyi.framework.security.service.TokenService;
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.framework.web.page.PageDomain;
+import com.ruoyi.framework.web.page.TableDataInfo;
+import com.ruoyi.framework.web.page.TableSupport;
+import com.ruoyi.project.approve.damain.DevTask;
+import com.ruoyi.project.plant.domain.TStaffmgr;
+import com.ruoyi.project.plant.service.ITStaffmgrService;
+import com.ruoyi.project.process.domain.TMoc;
+import com.ruoyi.project.production.controller.vo.EoegSaiApplyQueryVO;
+import com.ruoyi.project.production.controller.vo.SaiApplyExportVO;
+import com.ruoyi.project.production.controller.vo.SaiApplyQueryVO;
+import com.ruoyi.project.production.domain.TEoegSaiApply;
+import com.ruoyi.project.production.domain.TEoegSaiApply;
+import com.ruoyi.project.production.domain.TEoegSaiApproveFile;
+import com.ruoyi.project.production.domain.TEoegSaiCategory;
+import com.ruoyi.project.production.mapper.TEoegSaiApplyMapper;
+import com.ruoyi.project.production.mapper.TEoegSaiApplyMapper;
+import com.ruoyi.project.production.service.*;
+import com.ruoyi.project.sems.domain.TApproverFile;
+import com.ruoyi.project.system.domain.*;
+import com.ruoyi.project.system.mapper.SysDeptMapper;
+import com.ruoyi.project.system.mapper.SysUserMapper;
+import com.ruoyi.project.system.service.ISysDeptService;
+import com.ruoyi.project.system.service.ISysDictTypeService;
+import com.ruoyi.project.system.service.ISysMessageService;
+import com.ruoyi.project.system.service.ISysUserService;
+import org.activiti.engine.ProcessEngine;
+import org.activiti.engine.ProcessEngines;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.TaskService;
+import org.activiti.engine.impl.identity.Authentication;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.constraints.Email;
+import javax.validation.constraints.Size;
+import java.io.IOException;
+import java.sql.Array;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * EOEG SAI开项管理Controller
+ *
+ */
+@RestController
+@RequestMapping("/production/eoegapply")
+public class TEoegSaiApplyController extends BaseController
+{
+    @Autowired
+    private ITEoegSaiApplyService tSaiApplyService;
+
+    @Autowired
+    private TEoegSaiApplyMapper tSaiApplyMapper;
+
+    @Autowired
+    private RuntimeService runtimeService;
+
+    @Autowired
+    private ISysUserService userService;
+
+    @Autowired
+    private ISysDeptService deptService;
+
+    @Autowired
+    private TaskService taskService;
+
+    @Autowired
+    private ISysDictTypeService iSysDictTypeService;
+
+    @Autowired
+    private ITEoegSaiApproveFileService saiApproveFileService;
+
+    @Autowired
+    private ITStaffmgrService staffmgrService;
+
+    @Autowired
+    private ISysMessageService sysMessageService;
+
+    @Autowired
+    private IMailService mailService;
+
+    @Autowired
+    private ITEoegSaiCategoryService tSaiCategoryService;
+
+    //四个班组当年提交的SAI数量(图)
+    @PreAuthorize("@ss.hasPermi('production:eoegapply:list')")
+    @GetMapping("/teamAnalysis")
+    public AjaxResult teamAnalysis()
+    {
+        List<TEoegSaiApply> list = tSaiApplyMapper.selectTeamAnalysis();
+        return AjaxResult.success(list);
+    }
+
+    //个人提交数量数据分析图(图)
+    @PreAuthorize("@ss.hasPermi('production:eoegapply:list')")
+    @GetMapping("/personalAnalysis")
+    public AjaxResult personalAnalysis()
+    {
+        List<TEoegSaiApply> list = tSaiApplyMapper.selectPersonalAnalysis();
+        return AjaxResult.success(list);
+    }
+
+    /**
+     * 查询SAI开项管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegapply:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(EoegSaiApplyQueryVO tSaiApply)
+    {
+        tSaiApply.setCurrentUser(getUserId());
+        tSaiApply.setSpecialRole(this.isSpecialRole());
+        startPage();
+        List<TEoegSaiApply> list = tSaiApplyService.selectTSaiApplyList(tSaiApply);
+        return getDataTable(list);
+    }
+
+    /**
+     * 当前登录用户是否为特殊角色(供SAI功能展示使用)
+     *
+     * @return 是否为特殊角色
+     */
+    private boolean isSpecialRole() {
+        boolean isSpecialRole = false;
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        SysUser user = loginUser.getUser();
+        List<SysRole> roles = user.getRoles();
+        for (SysRole role : roles) {
+            Long roleId = role.getRoleId();
+            if (roleId.toString().equals("23140")) {
+                isSpecialRole = true;
+            }
+        }
+        return isSpecialRole;
+    }
+
+    /**
+     * 批量导入SAI开项管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegapply:add')")
+    @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<TEoegSaiApply> list = new ArrayList<TEoegSaiApply>();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        // 字典查询
+        List<SysDictData> saiApplyStatusDict = iSysDictTypeService.selectDictDataByType("SAI_APPLY_STATUS");
+        List<SysDictData> teamDivideDict = iSysDictTypeService.selectDictDataByType("TEAM_DIVIDE");
+        // 部门列表
+        List<SysDept> deptList = deptService.selectDeptList(new SysDept());
+        // 用户列表
+        List<SysUser> userList = userService.selectUserList(new SysUser());
+        int rowNum = sheet.getPhysicalNumberOfRows();
+        int failNumber = 0;
+        for (int i = 2; i <= rowNum; i++) {
+            try {
+                logger.info("读取行数:" + i);
+                Row row = sheet.getRow(i);
+                int cellNum = row.getLastCellNum();
+                TEoegSaiApply entity = new TEoegSaiApply();
+                entity.setCreateTime(new Date());
+                entity.setCreateBy(userId.toString());
+                entity.setDeptId(103L);
+                for (int j = 0; j < cellNum; j++) {
+                    Cell cell = row.getCell(j);
+                    //  cell.setCellType(CellType.STRING);
+                    String cellValue = ExcelUtils.getCellValue(cell);
+                    String applicantName = "";
+                    String handlerName = "";
+                    String executorName = "";
+                    logger.info("cellValue:" + cellValue);
+                    if (j == 0) {
+                        entity.setDescription(cellValue);
+                    } else if (j == 1) {
+                        for (SysDictData sysDictData : saiApplyStatusDict) {
+                            if (sysDictData.getDictLabel().equals(cellValue.trim())) {
+                                entity.setApplyStatus(Long.valueOf(sysDictData.getDictValue()));
+                            }
+                        }
+                    } else if (j == 2) {
+                        if (cellValue != "" && cellValue != null) {
+                            for (SysDept sysDept : deptList) {
+                                if (cellValue.equals(sysDept.getDeptName())) {
+                                    entity.setApplicantDept(sysDept.getDeptId().toString());
+                                }
+                            }
+                        }
+                    } else if (j == 3) {
+                        for (SysDictData sysDictData : teamDivideDict) {
+                            if (sysDictData.getDictLabel().equals(cellValue.trim())) {
+                                entity.setApplicantTeam(sysDictData.getDictValue());
+                            }
+                        }
+                    } else if (j == 4) {
+                        applicantName = cellValue;
+                    } else if (j == 5) {
+                        handlerName = cellValue;
+                    } else if (j == 6) {
+                        executorName = cellValue;
+                    } else if (j == 7) {
+                        if (cellValue.length() > 3) {
+                            entity.setApplyDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                        }
+                    } else if (j == 8) {
+                        if (cellValue.length() > 3) {
+                            entity.setEstimateFinishDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                        }
+                    } else if (j == 9) {
+                        if (cellValue.length() > 3) {
+                            entity.setActualFinishDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                        }
+                    }
+                    for (SysUser sysUser : userList) {
+                        if (applicantName != "" && applicantName != null) {
+                            if (applicantName.equals(sysUser.getNickName())) {
+                                entity.setApplicant(sysUser.getUserId().toString());
+                            }
+                        }
+                        if (handlerName != "" && handlerName != null) {
+                            if (handlerName.equals(sysUser.getNickName())) {
+                                entity.setHandler(sysUser.getUserId().toString());
+                            }
+                        }
+                        if (executorName != "" && executorName != null) {
+                            if (executorName.equals(sysUser.getNickName())) {
+                                entity.setExecutor(sysUser.getUserId().toString());
+                            }
+                        }
+                    }
+                }
+                logger.info("entity:" + entity);
+                list.add(entity);
+            }catch (Exception e){
+                failNumber++;
+                failRow.add(i+1);
+            }
+        }
+        int successNumber = 0;
+        int failNum = 0;
+        for (TEoegSaiApply t : list
+        ) {
+            failNum++;
+            try {
+                tSaiApplyService.insertTSaiApply(t);
+                successNumber++;
+            }catch (Exception e){
+                failNumber++;
+                logger.info("e:" + e);
+                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);
+    }
+
+    /**
+     * 导出SAI开项管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegapply:export')")
+    @Log(title = "SAI开项管理", businessType = BusinessType.EXPORT)
+    @PutMapping("/export")
+    public AjaxResult export(@RequestBody EoegSaiApplyQueryVO tSaiApply)
+    {
+        List<SysUser> userList = userService.selectUserList(new SysUser());
+        Map<Long, String> nameMap = new HashMap<Long, String>();
+        Map<Long, String> staffIdMap = new HashMap<Long, String>();
+        for (SysUser sysUser : userList) {
+            nameMap.put(sysUser.getUserId(), sysUser.getNickName());
+            staffIdMap.put(sysUser.getUserId(), sysUser.getStaffId());
+        }
+        // 实体类集合
+        List<TEoegSaiApply> list = tSaiApplyService.selectTSaiApplyList(tSaiApply);
+        // 导出VO集合
+        List<SaiApplyExportVO> exportVOList = new ArrayList<>();
+        // 字典查询
+        List<SysDictData> saiApplyStatusDict = iSysDictTypeService.selectDictDataByType("SAI_APPLY_STATUS");
+        List<SysDictData> teamDivideDict = iSysDictTypeService.selectDictDataByType("TEAM_DIVIDE");
+        List<SysDictData> saiUnsafeStatusDict = iSysDictTypeService.selectDictDataByType("SAI_UNSAFE_STATUS");
+        List<SysDictData> saiUnsafeActionDict = iSysDictTypeService.selectDictDataByType("SAI_UNSAFE_ACTION");
+        List<TEoegSaiCategory> tSaiCategories = tSaiCategoryService.selectTSaiCategoryList(null);
+        Map<Long, String> categoryMap = tSaiCategories.stream().collect(Collectors.toMap(TEoegSaiCategory::getSaiCategoryId, TEoegSaiCategory::getSaiCategoryName));
+        int no = 0;  // 序号
+        for (TEoegSaiApply entity : list) {
+            no++;
+            // 复制属性
+            SaiApplyExportVO vo = new SaiApplyExportVO();
+            vo.setNo(no + "");
+            vo.setPlantName(entity.getApplicantDeptName());
+            vo.setStaffName(entity.getApplicantName());
+            vo.setStaffId(staffIdMap.get(Long.parseLong(entity.getApplicant())));
+            vo.setApplyDate(entity.getApplyDate());
+//            vo.setMonth((entity.getApplyDate().getMonth() + 1) + "");
+//            vo.setDate(entity.getApplyDate().getDate()+ "");
+            for (SysDictData sysDictData : teamDivideDict) {
+                if (sysDictData.getDictValue().equals(entity.getApplicantTeam() + "")) {
+                    vo.setStaffTeam(sysDictData.getDictLabel());
+                }
+            }
+            for (SysDictData sysDictData : saiUnsafeStatusDict) {
+                if (sysDictData.getDictValue().equals(entity.getUnsafeStatus() + "")) {
+                    vo.setUnsafeStatus(sysDictData.getDictLabel());
+                }
+            }
+            for (SysDictData sysDictData : saiUnsafeActionDict) {
+                if (sysDictData.getDictValue().equals(entity.getUnsafeAction() + "")) {
+                    vo.setUnsafeAction(sysDictData.getDictLabel());
+                }
+            }
+            vo.setDescription(entity.getDescription());
+            vo.setReaction(entity.getReaction());
+            vo.setExecutor(entity.getExecutorName());
+            vo.setEstimateFinishDate(entity.getEstimateFinishDate());
+            vo.setActualFinishDate(entity.getActualFinishDate());
+            String inspectors = entity.getInspectors();
+            if (inspectors != null && !"".equals(inspectors) && !"null".equals(inspectors)) {
+                if (inspectors.indexOf(",") != -1) {
+                    String[] split = inspectors.split(",");
+                    String inspectorName = "";
+                    for (int i = 0; i < split.length; i++) {
+                        if (split[i] != null && !"null".equals(split[i])) {
+                            inspectorName += nameMap.get(Long.parseLong(split[i]));
+                            if (i < split.length - 1) {
+                                inspectorName += ",";
+                            }
+                        }
+                    }
+                    vo.setInspectors(inspectorName);
+                } else {
+                    vo.setInspectors(nameMap.get(Long.parseLong(inspectors)));
+                }
+            }
+            vo.setValidateDate(entity.getActualFinishDate());
+            for (SysDictData sysDictData : saiApplyStatusDict) {
+                if (sysDictData.getDictValue().equals(entity.getApplyStatus() + "")) {
+                    vo.setApplyStatus(sysDictData.getDictLabel());
+                }
+            }
+            vo.setRemarks(entity.getRemarks());
+            vo.setRemark(null);
+            vo.setSaiLevel(entity.getSaiLevel());
+            for (Long key : categoryMap.keySet()) {
+                if (key.toString().equals(entity.getCategory())) {
+                    vo.setCategory(categoryMap.get(key));
+                }
+            }
+            exportVOList.add(vo);
+        }
+        ExcelUtil<SaiApplyExportVO> util = new ExcelUtil<SaiApplyExportVO>(SaiApplyExportVO.class);
+        return util.exportExcel(exportVOList, "EOEG SAI开项管理数据");
+    }
+
+    /**
+     * 获取SAI开项管理详细信息
+     */
+//    @PreAuthorize("@ss.hasPermi('production:apply:query')")
+    @GetMapping(value = "/{saiApplyId}")
+    public AjaxResult getInfo(@PathVariable("saiApplyId") Long saiApplyId)
+    {
+        TEoegSaiApply tSaiApply = tSaiApplyService.selectTSaiApplyById(saiApplyId);
+        TEoegSaiApproveFile tSaiApproveFile = new TEoegSaiApproveFile();
+        tSaiApproveFile.setApproveId(saiApplyId);
+        tSaiApply.setFiles(saiApproveFileService.selectTSaiApproveFileList(tSaiApproveFile));
+        return AjaxResult.success(tSaiApply);
+    }
+
+    /**
+     * 新增SAI开项管理
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegapply:add')")
+    @Log(title = "SAI开项管理申请", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TEoegSaiApply tSaiApply)
+    {
+        String userId = getUserId().toString();
+        tSaiApply.setCreateTime(new Date());
+        tSaiApply.setCreateBy(userId);
+        tSaiApply.setDeptId(103L);
+        tSaiApply.setApplyStatus(0);
+        tSaiApply.setHandler(tSaiApply.getApplicant());
+        tSaiApplyService.insertTSaiApply(tSaiApply);
+        if (tSaiApply.getFiles().size() > 0) {
+            for (TEoegSaiApproveFile t : tSaiApply.getFiles()
+            ) {
+                t.setApproveId(tSaiApply.getSaiApplyId());
+                saiApproveFileService.save(t);
+            }
+        }
+        return AjaxResult.success();
+    }
+
+    /**
+     * 保存并提交申请
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegapply:add')")
+    @Log(title = "SAI开项管理申请", businessType = BusinessType.INSERT)
+    @PostMapping("/saveAndSubmitApply")
+    public AjaxResult saveAndSubmitApply(@RequestBody TEoegSaiApply tSaiApply)
+    {
+        if (tSaiApply.getSaiApplyId() != null) {
+            this.edit(tSaiApply);
+        } else {
+            this.add(tSaiApply);
+        }
+        return AjaxResult.success(this.submit(tSaiApply.getSaiApplyId()));
+    }
+
+    /**
+     * SAI开项管理提交申请
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegapply:edit')")
+    @Log(title = "SAI开项管理申请", businessType = BusinessType.INSERT)
+    @PutMapping(value = "/submit/{saiApplyId}")
+    public AjaxResult submit(@PathVariable("saiApplyId") Long saiApplyId)
+    {
+        // 当前登录用户userId
+        String userId = getUserId().toString();
+        // SAI开项管理对象
+        TEoegSaiApply tSaiApply = tSaiApplyService.selectTSaiApplyById(saiApplyId);
+        tSaiApply.setApplyStatus(1);
+        Date date = new Date();
+        date.setDate(date.getDate() + 7);
+        tSaiApply.setEstimateFinishDate(date);
+        tSaiApply.setAssessor("20276");
+        tSaiApply.setHandler("20276");
+        // 开始申请流程
+        tSaiApply.setApNo(DateUtils.dateTimeNow() + userId);
+        Authentication.setAuthenticatedUserId(userId);//设置当前申请人
+        // 声明流程变量集合
+        Map<String, Object> variables = new HashMap<>();
+        variables.put("assessor", "20276");
+        // 流程businessKey = SAI开项管理对象saiApplyId
+        long businessKey = saiApplyId;
+        // 采用key来启动流程定义并设置流程变量,返回流程实例
+        ProcessInstance pi = runtimeService.startProcessInstanceByKey("saiApplyProcess", String.valueOf(businessKey), variables);
+        logger.info("流程定义id:" + pi.getProcessDefinitionId());
+        logger.info("流程实例id:" + pi.getProcessInstanceId());
+        // SAI开项管理对象processId = 流程实例id
+        tSaiApply.setProcessId(pi.getProcessInstanceId());
+        // 标记taskId、TaskName
+        ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
+        List<Task> list = processEngine.getTaskService()//获取任务service
+                .createTaskQuery()//创建查询对象
+                .taskCandidateOrAssigned("20276").list();
+        for (Task task : list) {
+            if (tSaiApply.getProcessId().equals(task.getProcessInstanceId())) {
+                tSaiApply.setTaskId(task.getId());
+                tSaiApply.setTaskName(task.getName());
+            }
+        }
+        // 更新操作
+        tSaiApplyService.updateTSaiApply(tSaiApply);
+        return AjaxResult.success();
+    }
+
+    /**
+     * SAI开项管理申请处理
+     *
+     * @param devTask
+     * @return
+     */
+    @Log(title = "SAI开项管理申请处理", businessType = BusinessType.UPDATE)
+    @RepeatSubmit
+    @PutMapping("/handle")
+    public AjaxResult handle(@RequestBody DevTask devTask) throws PinyinException {
+        //更新数据
+        TEoegSaiApply form = devTask.getEoegSaiApply();
+        //使用任务服务完成任务(提交任务)
+        String taskId = devTask.getSaiApply().getTaskId();
+        // 使用任务id,获取任务对象,获取流程实例id
+        Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
+        //利用任务对象,获取流程实例id
+        String processInstancesId = task.getProcessInstanceId();
+        // 声明流程变量集合
+        Map<String, Object> param = new HashMap<>();
+        String condition = devTask.getCondition();
+        param.put("condition", condition);
+        // 下一任务执行人userId
+        String nextHandler = null;
+        // 审批意见
+        String comment = "";
+        switch (condition) {
+            case "0":
+                comment = "取消";
+                break;
+            case "1":
+                comment = "通过";
+                break;
+            case "2":
+                comment = "驳回";
+                break;
+        }
+        // 根据实例名判断当前流程节点
+        switch (task.getName()) {
+            case "评估":
+                if ("1".equals(condition)) {
+                    form.setApplyStatus(2);
+                    String executor = form.getExecutor();
+                    if (!"20276".equals(form.getExecutor())) {
+                        executor = form.getExecutor() + ",20276";
+                    }
+                    param.put("executor", executor);
+                    nextHandler = form.getExecutor();
+                    form.setHandler(form.getExecutor());
+                } else {
+                    form.setApplyStatus(5);
+                    form.setDelFlag("9");
+                    form.setTaskId(null);
+                    form.setTaskName(null);
+                    nextHandler = null;
+                    form.setHandler(null);
+                }
+                break;
+            case "执行":
+                form.setApplyStatus(3);
+                param.put("inspectors", form.getInspectors());
+                nextHandler = form.getInspectors();
+                form.setHandler(form.getInspectors());
+                break;
+            case "验收":
+                if ("1".equals(condition)) {
+                    form.setApplyStatus(4);
+                    form.setActualFinishDate(new Date());
+                    form.setTaskId(null);
+                    form.setTaskName(null);
+                    nextHandler = null;
+                    form.setHandler(null);
+                } else {
+                    form.setApplyStatus(2);
+                    nextHandler = form.getExecutor();
+                    form.setHandler(form.getExecutor());
+                }
+                // 拼接审批意见字符串
+                comment += "," + form.getRemarks();
+                break;
+        }
+        devTask.setComment(comment);
+        ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
+        TaskService taskService = processEngine.getTaskService();
+        //认领任务
+        processEngine.getTaskService()
+                .claim(taskId, getUserId().toString());
+        taskService.addComment(taskId, processInstancesId, devTask.getComment());
+        taskService.complete(taskId, param);
+        Task nextHandlerTask = null;
+        // 标记taskId、TaskName
+        if (nextHandler != null) {
+            List<Task> list = processEngine.getTaskService()//获取任务service
+                    .createTaskQuery()//创建查询对象
+                    .taskCandidateOrAssigned(nextHandler.indexOf(",") == -1 ? nextHandler: nextHandler.substring(0, nextHandler.indexOf(","))).list();
+            for (Task t : list) {
+                if (form.getProcessId().equals(t.getProcessInstanceId())) {
+                    form.setTaskId(t.getId());
+                    form.setTaskName(t.getName());
+                    nextHandlerTask = t;
+                }
+            }
+        }
+        if (nextHandler != null) {
+            String[] split = null;
+            if (nextHandler.indexOf(",") != -1) {
+                split = nextHandler.split(",");
+            } else {
+                split = new String[1];
+                split[0] = nextHandler;
+            }
+            for (int i = 0; i < split.length; i++) {
+                if (!split[i].equals("20276")) {    // 张力飞不发邮件
+                    SysUser sysUser = userService.selectUserById(Long.parseLong(split[i]));
+                    String staffId = sysUser.getStaffId();
+                    String loginName = sysUser.getUserName();
+                    TStaffmgr staffmgr = staffmgrService.selectTStaffmgrByStaffId(staffId);
+                    String staffName = staffmgr.getName();
+                    String email = sysUser.getEmail();
+                    if (email != null) {
+                        // 系统通知
+                        SysMessage message = new SysMessage();
+                        message.setUserId(Long.parseLong(split[i]));
+                        message.setMsgTitle("您有一条系统消息");
+                        message.setMsgContent("您有一条SAI开项申请消息待查看");
+                        // 发送邮件
+//                        email = "lihui@seashoreept.com";
+//                        SaiApplyMailThread saiApplyMailThread = new SaiApplyMailThread(
+//                                mailService, sysMessageService, message, email, nextHandlerTask, form, staffName, loginName);
+//                        Thread thread = new Thread(saiApplyMailThread);
+//                        thread.start();
+                    }
+                }
+            }
+        }
+        //任务完成更新数据
+        tSaiApplyService.updateTSaiApply(form);
+        return AjaxResult.success();
+    }
+
+    /**
+     * 修改SAI开项管理
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegapply:edit')")
+    @Log(title = "SAI开项管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TEoegSaiApply tSaiApply)
+    {
+        String userId = getUserId().toString();
+        tSaiApply.setUpdateBy(userId);
+        tSaiApply.setUpdateTime(new Date());
+
+        long applyStatus = tSaiApply.getApplyStatus();
+        switch (applyStatus + "") {
+            case "0":
+                tSaiApply.setHandler(tSaiApply.getApplicant());
+                break;
+            case "1":
+                tSaiApply.setHandler("20276");
+                break;
+            case "2":
+                tSaiApply.setHandler(tSaiApply.getExecutor());
+                break;
+            case "3":
+                tSaiApply.setHandler(tSaiApply.getInspectors());
+                break;
+            case "4":
+                tSaiApply.setHandler(null);
+                break;
+            case "5":
+                tSaiApply.setHandler(null);
+                break;
+        }
+
+        TEoegSaiApproveFile tSaiApproveFile = new TEoegSaiApproveFile();
+        tSaiApproveFile.setApproveId(tSaiApply.getSaiApplyId());
+        List<TEoegSaiApproveFile> tSaiApproveFiles = saiApproveFileService.selectTSaiApproveFileList(tSaiApproveFile);
+        for (TEoegSaiApproveFile saiApproveFile : tSaiApproveFiles) {
+            saiApproveFileService.selectTSaiApproveFileById(saiApproveFile.getId());
+        }
+
+        if (tSaiApply.getFiles().size() > 0) {
+            for (TEoegSaiApproveFile t : tSaiApply.getFiles()
+            ) {
+                t.setApproveId(tSaiApply.getSaiApplyId());
+                saiApproveFileService.save(t);
+            }
+        }
+        return toAjax(tSaiApplyService.updateTSaiApply(tSaiApply));
+    }
+
+    /**
+     * 删除SAI开项管理
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegapply:remove')")
+    @Log(title = "SAI开项管理", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{saiApplyIds}")
+    public AjaxResult remove(@PathVariable Long[] saiApplyIds)
+    {
+        return toAjax(tSaiApplyService.deleteTSaiApplyByIds(saiApplyIds));
+    }
+}

+ 93 - 0
master/src/main/java/com/ruoyi/project/production/controller/TEoegSaiApproveFileController.java

@@ -0,0 +1,93 @@
+package com.ruoyi.project.production.controller;
+
+import java.util.List;
+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 com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
+import com.ruoyi.project.production.domain.TSaiApproveFile;
+import com.ruoyi.project.production.service.ITSaiApproveFileService;
+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;
+
+/**
+ * EOEG SAI审批附件Controller
+ *
+ */
+@RestController
+@RequestMapping("/production/eoegSaiApproveFile")
+public class TEoegSaiApproveFileController extends BaseController
+{
+    @Autowired
+    private ITSaiApproveFileService tSaiApproveFileService;
+
+    /**
+     * 查询SAI审批附件列表
+     */
+    @GetMapping("/list")
+    public List<TSaiApproveFile> list(TSaiApproveFile tSaiApproveFile)
+    {
+        return tSaiApproveFileService.selectTSaiApproveFileList(tSaiApproveFile);
+    }
+
+    /**
+     * 导出SAI审批附件列表
+     */
+    @Log(title = "SAI审批附件", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TSaiApproveFile tSaiApproveFile)
+    {
+        List<TSaiApproveFile> list = tSaiApproveFileService.selectTSaiApproveFileList(tSaiApproveFile);
+        ExcelUtil<TSaiApproveFile> util = new ExcelUtil<TSaiApproveFile>(TSaiApproveFile.class);
+        return util.exportExcel(list, "saiApproveFile");
+    }
+
+    /**
+     * 获取SAI审批附件详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(tSaiApproveFileService.selectTSaiApproveFileById(id));
+    }
+
+    /**
+     * 新增SAI审批附件
+     */
+    @Log(title = "SAI审批附件", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TSaiApproveFile tSaiApproveFile)
+    {
+        return toAjax(tSaiApproveFileService.insertTSaiApproveFile(tSaiApproveFile));
+    }
+
+    /**
+     * 修改SAI审批附件
+     */
+    @Log(title = "SAI审批附件", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TSaiApproveFile tSaiApproveFile)
+    {
+        return toAjax(tSaiApproveFileService.updateTSaiApproveFile(tSaiApproveFile));
+    }
+
+    /**
+     * 删除SAI审批附件
+     */
+    @Log(title = "SAI审批附件", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(tSaiApproveFileService.deleteTSaiApproveFileByIds(ids));
+    }
+}

+ 128 - 0
master/src/main/java/com/ruoyi/project/production/controller/TEoegSaiCategoryController.java

@@ -0,0 +1,128 @@
+package com.ruoyi.project.production.controller;
+
+import java.util.Date;
+import java.util.List;
+
+import com.ruoyi.project.production.domain.TEoegSaiCategory;
+import com.ruoyi.project.production.service.ITEoegSaiCategoryService;
+import com.ruoyi.project.system.domain.SysUser;
+import com.ruoyi.project.system.service.ISysUserService;
+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 com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
+import com.ruoyi.project.production.domain.TSaiCategory;
+import com.ruoyi.project.production.service.ITSaiCategoryService;
+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;
+
+/**
+ * EOEG SAI类别Controller
+ *
+ */
+@RestController
+@RequestMapping("/production/eoegcategory")
+public class TEoegSaiCategoryController extends BaseController
+{
+    @Autowired
+    private ITEoegSaiCategoryService tSaiCategoryService;
+
+    @Autowired
+    private ISysUserService userService;
+
+    /**
+     * 查询SAI类别列表
+     */
+    @GetMapping("/categoryList")
+    public AjaxResult categoryList()
+    {
+        return AjaxResult.success(tSaiCategoryService.selectTSaiCategoryList(null));
+    }
+
+    /**
+     * 查询SAI类别列表
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegcategory:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TEoegSaiCategory tSaiCategory)
+    {
+        startPage();
+        List<TEoegSaiCategory> list = tSaiCategoryService.selectTSaiCategoryList(tSaiCategory);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出SAI类别列表
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegcategory:export')")
+    @Log(title = "SAI类别", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TEoegSaiCategory tSaiCategory)
+    {
+        List<TEoegSaiCategory> list = tSaiCategoryService.selectTSaiCategoryList(tSaiCategory);
+        ExcelUtil<TEoegSaiCategory> util = new ExcelUtil<TEoegSaiCategory>(TEoegSaiCategory.class);
+        return util.exportExcel(list, "EOEG SAI检查管理数据");
+    }
+
+    /**
+     * 获取SAI类别详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegcategory:query')")
+    @GetMapping(value = "/{saiCategoryId}")
+    public AjaxResult getInfo(@PathVariable("saiCategoryId") Long saiCategoryId)
+    {
+        return AjaxResult.success(tSaiCategoryService.selectTSaiCategoryById(saiCategoryId));
+    }
+
+    /**
+     * 新增SAI类别
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegcategory:add')")
+    @Log(title = "SAI类别", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TEoegSaiCategory tSaiCategory)
+    {
+        Long userId = getUserId();
+        SysUser sysUser = userService.selectUserById(userId);
+        tSaiCategory.setDeptId(sysUser.getDeptId());
+        tSaiCategory.setCreateBy(sysUser.getUserId().toString());
+        tSaiCategory.setCreateTime(new Date());
+        return toAjax(tSaiCategoryService.insertTSaiCategory(tSaiCategory));
+    }
+
+    /**
+     * 修改SAI类别
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegcategory:edit')")
+    @Log(title = "SAI类别", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TEoegSaiCategory tSaiCategory)
+    {
+        Long userId = getUserId();
+        SysUser sysUser = userService.selectUserById(userId);
+        tSaiCategory.setUpdateBy(sysUser.getUserId().toString());
+        tSaiCategory.setUpdateTime(new Date());
+        return toAjax(tSaiCategoryService.updateTSaiCategory(tSaiCategory));
+    }
+
+    /**
+     * 删除SAI类别
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegcategory:remove')")
+    @Log(title = "SAI类别", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{saiCategoryIds}")
+    public AjaxResult remove(@PathVariable Long[] saiCategoryIds)
+    {
+        return toAjax(tSaiCategoryService.deleteTSaiCategoryByIds(saiCategoryIds));
+    }
+}

+ 394 - 0
master/src/main/java/com/ruoyi/project/production/controller/TEoegSaiController.java

@@ -0,0 +1,394 @@
+package com.ruoyi.project.production.controller;
+
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.math.RoundingMode;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+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.production.controller.vo.EoegSaiExportVO;
+import com.ruoyi.project.production.controller.vo.EoegSaiQueryVO;
+import com.ruoyi.project.production.controller.vo.SaiExportVO;
+import com.ruoyi.project.production.controller.vo.SaiQueryVO;
+import com.ruoyi.project.production.domain.TEoegSai;
+import com.ruoyi.project.production.domain.TEoegSaiCategory;
+import com.ruoyi.project.production.domain.TSaiCategory;
+import com.ruoyi.project.production.service.ITEoegSaiCategoryService;
+import com.ruoyi.project.production.service.ITEoegSaiService;
+import com.ruoyi.project.production.service.ITSaiCategoryService;
+import com.ruoyi.project.system.domain.SysDept;
+import com.ruoyi.project.system.domain.SysDictData;
+import com.ruoyi.project.system.mapper.SysDeptMapper;
+import com.ruoyi.project.system.service.ISysDeptService;
+import com.ruoyi.project.system.service.ISysDictTypeService;
+import com.ruoyi.project.system.service.ISysUserService;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+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.production.domain.TSai;
+import com.ruoyi.project.production.service.ITSaiService;
+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;
+
+/**
+ * EOEG SAI信息Controller
+ *
+ */
+@RestController
+@RequestMapping("/production/eoegsai")
+public class TEoegSaiController extends BaseController
+{
+    @Autowired
+    private ITEoegSaiService tSaiService;
+
+    @Autowired
+    private ISysUserService userService;
+
+    @Autowired
+    private ISysDictTypeService iSysDictTypeService;
+
+    @Autowired
+    private ISysDeptService iSysDeptService;
+
+    @Autowired
+    private SysDeptMapper sysDeptMapper;
+
+    @Autowired
+    private ITEoegSaiCategoryService saiCategoryService;
+
+    @Autowired
+    private ITStaffmgrService staffmgrService;
+
+    /**
+     * 计算CTS扣分 / 装置人均扣分
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegsai:query')")
+    @GetMapping(value = "/calcScore2ByYear/{saiYear}")
+    public AjaxResult calcScore2ByYear(@PathVariable("saiYear") int saiYear)
+    {
+        String score = "未知";
+        String score2 = "未知";
+        EoegSaiQueryVO tSai = new EoegSaiQueryVO();
+        tSai.setSaiYear(saiYear);
+        List<TEoegSai> tSais = tSaiService.selectTSaiListByYear(tSai);
+        BigDecimal sum = BigDecimal.ZERO;
+        BigDecimal sum2 = BigDecimal.ZERO;
+        BigDecimal avg = BigDecimal.ZERO;
+        BigDecimal avg2 = BigDecimal.ZERO;
+        for (TEoegSai sai : tSais) {
+            if (sai.getSource().equals("装置") || sai.getSource().equals("督导")) {
+                Long saiLevel = sai.getSaiLevel();
+                if (saiLevel != null) {
+                    if (saiLevel == 1L) {
+                        sum = sum.add(new BigDecimal("1"));
+                    }
+                    if (saiLevel == 2L) {
+                        sum = sum.add(new BigDecimal("2"));
+                    }
+                    if (saiLevel == 3L) {
+                        sum = sum.add(new BigDecimal("3"));
+                    }
+                }
+            }
+            if (sai.getSource().equals("CTS")) {
+                Long saiLevel = sai.getSaiLevel();
+                if (saiLevel != null) {
+                    if (saiLevel == 1L) {
+                        sum = sum.add(new BigDecimal("1"));
+                    }
+                    if (saiLevel == 2L) {
+                        sum = sum.add(new BigDecimal("2"));
+                    }
+                    if (saiLevel == 3L) {
+                        sum = sum.add(new BigDecimal("3"));
+                    }
+                }
+            }
+        }
+        TStaffmgr staffmgr = new TStaffmgr();
+        staffmgr.setDeptId(103L);
+        List<TStaffmgr> tStaffmgrs = staffmgrService.selectTStaffmgrList(staffmgr);
+        int num = tStaffmgrs.size();
+        if (sum.compareTo(BigDecimal.ZERO) != 0 && num != 0 && sum2.compareTo(BigDecimal.ZERO) != 0) {
+            avg = sum.divide(new BigDecimal(num), 3, RoundingMode.HALF_UP);
+            avg2 = sum2.divide(avg, 2, RoundingMode.HALF_UP);
+            score2 = avg2.toString();
+        }
+        return AjaxResult.success(score2);
+    }
+
+    /**
+     * 计算当年装置自查人均扣分
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegsai:query')")
+    @GetMapping(value = "/calcScoreByYear/{saiYear}")
+    public AjaxResult calcScoreByYear(@PathVariable("saiYear") int saiYear)
+    {
+        String score = "未知";
+        EoegSaiQueryVO tSai = new EoegSaiQueryVO();
+        tSai.setSaiYear(saiYear);
+        List<TEoegSai> tSais = tSaiService.selectTSaiListByYear(tSai);
+        BigDecimal sum = BigDecimal.ZERO;
+        BigDecimal avg = BigDecimal.ZERO;
+        for (TEoegSai sai : tSais) {
+            if (sai.getSource().equals("装置") || sai.getSource().equals("督导")) {
+                Long saiLevel = sai.getSaiLevel();
+                if (saiLevel != null) {
+                    if (saiLevel == 1L) {
+                        sum = sum.add(new BigDecimal("1"));
+                    }
+                    if (saiLevel == 2L) {
+                        sum = sum.add(new BigDecimal("2"));
+                    }
+                    if (saiLevel == 3L) {
+                        sum = sum.add(new BigDecimal("3"));
+                    }
+                }
+            }
+        }
+        TStaffmgr staffmgr = new TStaffmgr();
+        staffmgr.setDeptId(103L);
+        List<TStaffmgr> tStaffmgrs = staffmgrService.selectTStaffmgrList(staffmgr);
+        int num = tStaffmgrs.size();
+        if (sum.compareTo(BigDecimal.ZERO) != 0 && num != 0) {
+            avg = sum.divide(new BigDecimal(num), 2, RoundingMode.HALF_UP);
+            score = avg.toString();
+        }
+        return AjaxResult.success(score);
+    }
+
+    /**
+     * 查询SAI信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegsai:list')")
+    @GetMapping("/listByYear")
+    public TableDataInfo listYear(EoegSaiQueryVO tSai)
+    {
+        startPage();
+        List<TEoegSai> list = tSaiService.selectTSaiListByYear(tSai);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询SAI信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegsai:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TEoegSai tSai)
+    {
+        startPage();
+        List<TEoegSai> list = tSaiService.selectTSaiList(tSai);
+        return getDataTable(list);
+    }
+
+    /**
+     * 批量导入SAI信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegsai:add')")
+    @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<TEoegSai> list = new ArrayList<TEoegSai>();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        //字典查询
+//        List<SysDictData> tempStateDict = iSysDictTypeService.selectDictDataByType("TEMP_STATE");
+        //部门查询
+        List<SysDept> sysDeptList = iSysDeptService.selectDeptList(new SysDept());
+        int rowNum = sheet.getPhysicalNumberOfRows();
+        int failNumber = 0;
+        for (int i = 2; i <= rowNum; i++) {
+            try {
+                logger.info("读取行数:" + i);
+                Row row = sheet.getRow(i);
+                int cellNum = row.getLastCellNum();
+                TEoegSai entity = new TEoegSai();
+                entity.setDelFlag("0");
+                entity.setDeptId(userService.selectUserById(userId).getDeptId());
+                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) {
+                        for (SysDept sysDept : sysDeptList) {
+                            if (sysDept.getDeptName().equals(cellValue)) {
+                                entity.setPlantId(sysDept.getDeptId().toString());
+                            }
+                        }
+                    } else if (j == 1) {
+                        if (cellValue.length() > 3) {
+                            entity.setInspectionDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                        }
+                    } else if (j == 2) {
+                        entity.setDificiency(cellValue);
+                    } else if (j == 3) {
+                        entity.setSaiLevel(Long.parseLong(cellValue));
+                    } else if (j == 4) {
+                        entity.setCategory(cellValue);
+                    } else if (j == 5) {
+                        entity.setActions(cellValue);
+                    } else if (j == 6) {
+                        for (SysDept sysDept : sysDeptList) {
+                            if (sysDept.getDeptName().equals(cellValue)) {
+                                entity.setUserDept(sysDept.getDeptId().toString());
+                            }
+                        }
+                    } else if (j == 7) {
+                        entity.setSource(cellValue);
+                    }
+                }
+                entity.setCreateBy(userId.toString());
+                logger.info("entity:" + entity);
+                list.add(entity);
+            }catch (Exception e){
+                failNumber++;
+                failRow.add(i+1);
+            }
+        }
+        int successNumber = 0;
+        int failNum = 0;
+        for (TEoegSai t : list
+        ) {
+            failNum++;
+            try {
+                tSaiService.insertTSai(t);
+                successNumber++;
+            }catch (Exception e){
+                failNumber++;
+                logger.info("e:" + e);
+                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);
+    }
+
+    /**
+     * 导出SAI信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegsai:export')")
+    @Log(title = "SAI信息", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TEoegSai tSai)
+    {
+        List<TEoegSai> list = tSaiService.selectTSaiList(tSai);
+        List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
+        List<TEoegSaiCategory> saiCategories = saiCategoryService.selectTSaiCategoryList(null);
+        for (TEoegSai sai : list) {
+            for (SysDept sysDept : sysDepts) {
+                if (sysDept.getDeptId().toString().equals(sai.getPlantId())) {
+                    sai.setPlantName(sysDept.getDeptName());
+                }
+                if (sysDept.getDeptId().toString().equals(sai.getUserDept())) {
+                    sai.setUserDeptName(sysDept.getDeptName());
+                }
+                String applicant = sai.getApplicant();
+                if (applicant != null) {
+                    sai.setApplicantName(userService.selectUserById(Long.parseLong(applicant)).getNickName());
+                }
+            }
+        }
+        List<EoegSaiExportVO> saiExportVOList = new ArrayList<EoegSaiExportVO>();
+        for (int i = 0; i < list.size(); i++) {
+            TEoegSai entity = list.get(i);
+            EoegSaiExportVO saiExportVO = new EoegSaiExportVO();
+            saiExportVO.setNo((i + 1) + "");
+            saiExportVO.setInspectionDate(entity.getInspectionDate());
+            saiExportVO.setDificiency(entity.getDificiency());
+            saiExportVO.setActions(entity.getActions());
+            saiExportVO.setSaiLevel(entity.getSaiLevel());
+            if (entity.getCategory() != null) {
+                for (TEoegSaiCategory saiCategory : saiCategories) {
+                    if ((saiCategory.getSaiCategoryId() + "").equals(entity.getCategory())) {
+                        saiExportVO.setCategory(saiCategory.getSaiCategoryName());
+                    }
+                }
+            }
+            saiExportVO.setApplicant(entity.getApplicantName());
+            saiExportVOList.add(saiExportVO);
+        }
+        ExcelUtil<EoegSaiExportVO> util = new ExcelUtil<EoegSaiExportVO>(EoegSaiExportVO.class);
+        return util.exportExcel(saiExportVOList, "SAI检查数据");
+    }
+
+    /**
+     * 获取SAI信息详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegsai:query')")
+    @GetMapping(value = "/{saiId}")
+    public AjaxResult getInfo(@PathVariable("saiId") Long saiId)
+    {
+        return AjaxResult.success(tSaiService.selectTSaiById(saiId));
+    }
+
+    /**
+     * 新增SAI信息
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegsai:add')")
+    @Log(title = "SAI信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TEoegSai tSai)
+    {
+        Long saiApplyId = tSai.getSaiApplyId();
+        if (saiApplyId != null) {
+            TEoegSai sai = new TEoegSai();
+            sai.setSaiApplyId(saiApplyId);
+            List<TEoegSai> tSais = tSaiService.selectTSaiList(sai);
+            if (tSais.size() != 0) {
+                tSai.setSaiId(tSais.get(0).getSaiId());
+                return toAjax(tSaiService.updateTSai(tSai));
+            } else {
+                return toAjax(tSaiService.insertTSai(tSai));
+            }
+        } else {
+            return toAjax(tSaiService.insertTSai(tSai));
+        }
+    }
+
+    /**
+     * 修改SAI信息
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegsai:edit')")
+    @Log(title = "SAI信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TEoegSai tSai)
+    {
+        return toAjax(tSaiService.updateTSai(tSai));
+    }
+
+    /**
+     * 删除SAI信息
+     */
+    @PreAuthorize("@ss.hasPermi('production:eoegsai:remove')")
+    @Log(title = "SAI信息", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{saiIds}")
+    public AjaxResult remove(@PathVariable Long[] saiIds)
+    {
+        return toAjax(tSaiService.deleteTSaiByIds(saiIds));
+    }
+}

+ 108 - 0
master/src/main/java/com/ruoyi/project/production/controller/TEoegSaiFileController.java

@@ -0,0 +1,108 @@
+package com.ruoyi.project.production.controller;
+
+import java.io.IOException;
+import java.util.List;
+
+import com.ruoyi.common.utils.file.FileUploadUtils;
+import com.ruoyi.framework.config.RuoYiConfig;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+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.production.domain.TSaiFile;
+import com.ruoyi.project.production.service.ITSaiFileService;
+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;
+
+/**
+ * EOEG SAI文件Controller
+ *
+ */
+@RestController
+@RequestMapping("/production/eoegSaiFile")
+public class TEoegSaiFileController extends BaseController
+{
+    @Autowired
+    private ITSaiFileService tSaiFileService;
+
+    /**
+     * 上传
+     */
+    @Log(title = "文件上传", businessType = BusinessType.UPDATE)
+    @PostMapping("/uploadFile")
+    public AjaxResult uploadFile(@RequestParam("file") MultipartFile file) throws IOException
+    {
+        if (!file.isEmpty())
+        {
+            String avatar = FileUploadUtils.upload(RuoYiConfig.getFilePath("/saiFile"), file);
+            return AjaxResult.success(avatar);
+        }
+        return AjaxResult.error("上传异常,请联系管理员");
+    }
+
+    /**
+     * 查询SAI文件列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(TSaiFile tSaiFile)
+    {
+        startPage();
+        List<TSaiFile> list = tSaiFileService.selectTSaiFileList(tSaiFile);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出SAI文件列表
+     */
+    @Log(title = "SAI文件", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TSaiFile tSaiFile)
+    {
+        List<TSaiFile> list = tSaiFileService.selectTSaiFileList(tSaiFile);
+        ExcelUtil<TSaiFile> util = new ExcelUtil<TSaiFile>(TSaiFile.class);
+        return util.exportExcel(list, "saiFile");
+    }
+
+    /**
+     * 获取SAI文件详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(tSaiFileService.selectTSaiFileById(id));
+    }
+
+    /**
+     * 新增SAI文件
+     */
+    @Log(title = "SAI文件", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TSaiFile tSaiFile)
+    {
+        return toAjax(tSaiFileService.insertTSaiFile(tSaiFile));
+    }
+
+    /**
+     * 修改SAI文件
+     */
+    @Log(title = "SAI文件", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TSaiFile tSaiFile)
+    {
+        return toAjax(tSaiFileService.updateTSaiFile(tSaiFile));
+    }
+
+    /**
+     * 删除SAI文件
+     */
+    @Log(title = "SAI文件", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(tSaiFileService.deleteTSaiFileByIds(ids));
+    }
+}

+ 289 - 0
master/src/main/java/com/ruoyi/project/production/controller/vo/EoegSaiApplyExportVO.java

@@ -0,0 +1,289 @@
+package com.ruoyi.project.production.controller.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import com.ruoyi.framework.web.domain.BaseEntity;
+
+import java.util.Date;
+
+/**
+ * EOEG SAI开项管理导出VO
+ */
+public class EoegSaiApplyExportVO extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    @Excel(name = "序号", width = 8)
+    private String no;
+
+    @Excel(name = "装置")
+    private String plantName;
+
+    @Excel(name = "姓名")
+    private String staffName;
+
+    @Excel(name = "班组")
+    private String staffTeam;
+
+    @Excel(name = "员工号")
+    private String staffId;
+
+//    @Excel(name = "月份", width = 8)
+    private String month;
+
+//    @Excel(name = "日期", width = 8)
+    private String date;
+
+    /** 登记时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "登记时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date applyDate;
+
+    /** 不安全行为 */
+    @Excel(name = "不安全行为", width = 50)
+    private String unsafeAction;
+
+    /** 不安全状态 */
+    @Excel(name = "不安全状态", width = 50)
+    private String unsafeStatus;
+
+    /** 问题描述 */
+    @Excel(name = "问题描述", width = 50)
+    private String description;
+
+    /** 采取的措施 */
+    @Excel(name = "采取的措施", width = 50)
+    private String reaction;
+
+    /** 整改负责人 */
+    @Excel(name = "责任人")
+    private String executor;
+
+    /** 预计完成时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "预计完成日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date estimateFinishDate;
+
+    /** 实际完成时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "实际完成日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date actualFinishDate;
+
+    /** 是否录入开项系统 */
+    @Excel(name = "是否录入开项系统")
+    private String isRecorded;
+
+    /** 验收人 */
+    @Excel(name = "验证人")
+    private String inspectors;
+
+    /** 实际完成时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "验证日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date validateDate;
+
+    /** 申请状态 */
+    @Excel(name = "状态")
+    private String applyStatus;
+
+    /** 备注 */
+    @Excel(name = "验证描述", width = 50)
+    private String remarks;
+
+    @Excel(name = "备注")
+    private String remark;
+
+    /** SAI级别 */
+    @Excel(name = "SAI级别")
+    private Long saiLevel;
+
+    /** SAI类别 */
+    @Excel(name = "SAI类别")
+    private String category;
+
+    public Date getApplyDate() {
+        return applyDate;
+    }
+
+    public void setApplyDate(Date applyDate) {
+        this.applyDate = applyDate;
+    }
+
+    public String getStaffTeam() {
+        return staffTeam;
+    }
+
+    public void setStaffTeam(String staffTeam) {
+        this.staffTeam = staffTeam;
+    }
+
+    public Long getSaiLevel() {
+        return saiLevel;
+    }
+
+    public void setSaiLevel(Long saiLevel) {
+        this.saiLevel = saiLevel;
+    }
+
+    public String getCategory() {
+        return category;
+    }
+
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
+    public String getNo() {
+        return no;
+    }
+
+    public void setNo(String no) {
+        this.no = no;
+    }
+
+    public String getPlantName() {
+        return plantName;
+    }
+
+    public void setPlantName(String plantName) {
+        this.plantName = plantName;
+    }
+
+    public String getStaffName() {
+        return staffName;
+    }
+
+    public void setStaffName(String staffName) {
+        this.staffName = staffName;
+    }
+
+    public String getStaffId() {
+        return staffId;
+    }
+
+    public void setStaffId(String staffId) {
+        this.staffId = staffId;
+    }
+
+    public String getMonth() {
+        return month;
+    }
+
+    public void setMonth(String month) {
+        this.month = month;
+    }
+
+    public String getDate() {
+        return date;
+    }
+
+    public void setDate(String date) {
+        this.date = date;
+    }
+
+    public String getUnsafeAction() {
+        return unsafeAction;
+    }
+
+    public void setUnsafeAction(String unsafeAction) {
+        this.unsafeAction = unsafeAction;
+    }
+
+    public String getUnsafeStatus() {
+        return unsafeStatus;
+    }
+
+    public void setUnsafeStatus(String unsafeStatus) {
+        this.unsafeStatus = unsafeStatus;
+    }
+
+    public Date getValidateDate() {
+        return validateDate;
+    }
+
+    public void setValidateDate(Date validateDate) {
+        this.validateDate = validateDate;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getReaction() {
+        return reaction;
+    }
+
+    public void setReaction(String reaction) {
+        this.reaction = reaction;
+    }
+
+    public String getExecutor() {
+        return executor;
+    }
+
+    public void setExecutor(String executor) {
+        this.executor = executor;
+    }
+
+    public Date getEstimateFinishDate() {
+        return estimateFinishDate;
+    }
+
+    public void setEstimateFinishDate(Date estimateFinishDate) {
+        this.estimateFinishDate = estimateFinishDate;
+    }
+
+    public Date getActualFinishDate() {
+        return actualFinishDate;
+    }
+
+    public void setActualFinishDate(Date actualFinishDate) {
+        this.actualFinishDate = actualFinishDate;
+    }
+
+    public String getIsRecorded() {
+        return isRecorded;
+    }
+
+    public void setIsRecorded(String isRecorded) {
+        this.isRecorded = isRecorded;
+    }
+
+    public String getInspectors() {
+        return inspectors;
+    }
+
+    public void setInspectors(String inspectors) {
+        this.inspectors = inspectors;
+    }
+
+    public String getApplyStatus() {
+        return applyStatus;
+    }
+
+    public void setApplyStatus(String applyStatus) {
+        this.applyStatus = applyStatus;
+    }
+
+    public String getRemarks() {
+        return remarks;
+    }
+
+    public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+
+    @Override
+    public String getRemark() {
+        return remark;
+    }
+
+    @Override
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+}

+ 629 - 0
master/src/main/java/com/ruoyi/project/production/controller/vo/EoegSaiApplyQueryVO.java

@@ -0,0 +1,629 @@
+package com.ruoyi.project.production.controller.vo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import com.ruoyi.framework.web.domain.BaseEntity;
+import com.ruoyi.project.production.domain.TSaiApproveFile;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * EOEG SAI开项申请查询VO
+ */
+public class EoegSaiApplyQueryVO extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long saiApplyId;
+
+    private Long[] ids;
+
+    /** tab,1待处理,2我的,3总数据 */
+    private int tab;
+
+    /** 当前登录用户id */
+    private long currentUser;
+
+    /** 当前登录用户是否为特殊角色(供SAI功能展示使用) */
+    private boolean isSpecialRole;
+
+    /** 删除状态 */
+    private String delFlag;
+
+    /** 部门编号 */
+    private Long deptId;
+
+    /** 问题描述 */
+    @Excel(name = "问题描述")
+    private String description;
+
+    /** 申请状态 */
+    @Excel(name = "申请状态")
+    private long applyStatus;
+
+    private String applyStatusString;
+
+    /** 登记人部门 */
+    @Excel(name = "登记人部门")
+    private String applicantDept;
+
+    private String applicantDeptName;
+
+    /** 登记人班组 */
+    @Excel(name = "登记人班组")
+    private String applicantTeam;
+
+    /** 登记人 */
+    @Excel(name = "登记人")
+    private String applicant;
+
+    private String applicantName;
+
+    /** 当前处理人 */
+    @Excel(name = "当前处理人")
+    private String handler;
+
+    private String handlerName;
+
+    /** 整改负责人 */
+    @Excel(name = "整改负责人")
+    private String executor;
+
+    private String executorName;
+
+    /** SAI级别 */
+    private Long saiLevel;
+
+    /** SAI类别 */
+    private String category;
+
+    /** 片区 */
+    private String workArea;
+
+    /** 登记时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "登记时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date applyDate;
+
+    /** 预计完成时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "预计完成时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date estimateFinishDate;
+
+    /** 登记时间开始*/
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    private Date applyDateStart;
+
+    /** 登记时间结束 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    private Date applyDateEnd;
+
+    /** 预计完成时间开始*/
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    private Date estimateFinishDateStart;
+
+    /** 预计完成时间结束 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    private Date estimateFinishDateEnd;
+
+    /** 实际完成时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "实际完成时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date actualFinishDate;
+
+    /** 是否录入开项系统 */
+    @Excel(name = "是否录入开项系统")
+    private Long isRecorded;
+
+    /** 开项编号 */
+    @Excel(name = "开项编号")
+    private String recordNo;
+
+    /** 申请编号 */
+    private String apNo;
+
+    /** 流程id */
+    private String processId;
+
+    /** 评估人 */
+    private String assessor;
+
+    /** 验收人 */
+    private String inspectors;
+
+    /** 不安全状态 */
+    private Long unsafeStatus;
+
+    /** 不安全行为 */
+    private Long unsafeAction;
+
+    /** 任务编号 */
+    private String taskId;
+
+    /** 任务名称 */
+    private String taskName;
+
+    /** 采取的措施 */
+    private String reaction;
+
+    /** 是否需要VE验证 */
+    private Long needVe;
+
+    /** VE验证条款 */
+    private String veItems;
+
+    /** VC/VE验证成果 */
+    private String veResult;
+
+    /** 备注 */
+    private String remarks;
+
+    /** VC/VE验证条款(其它) */
+    private String veItemOther;
+
+    @TableField(exist = false)
+    private List<TSaiApproveFile> files;
+
+    /** 备注(评估阶段) */
+    private String remarksAssess;
+
+    /** 备注(执行阶段) */
+    private String remarksExecute;
+
+    public String getApplyStatusString() {
+        return applyStatusString;
+    }
+
+    public void setApplyStatusString(String applyStatusString) {
+        this.applyStatusString = applyStatusString;
+    }
+
+    public Long[] getIds() {
+        return ids;
+    }
+
+    public void setIds(Long[] ids) {
+        this.ids = ids;
+    }
+
+    public String getWorkArea() {
+        return workArea;
+    }
+
+    public void setWorkArea(String workArea) {
+        this.workArea = workArea;
+    }
+
+    public boolean isSpecialRole() {
+        return isSpecialRole;
+    }
+
+    public void setSpecialRole(boolean specialRole) {
+        isSpecialRole = specialRole;
+    }
+
+    public long getCurrentUser() {
+        return currentUser;
+    }
+
+    public void setCurrentUser(long currentUser) {
+        this.currentUser = currentUser;
+    }
+
+    public int getTab() {
+        return tab;
+    }
+
+    public void setTab(int tab) {
+        this.tab = tab;
+    }
+
+    public String getRemarksAssess() {
+        return remarksAssess;
+    }
+
+    public void setRemarksAssess(String remarksAssess) {
+        this.remarksAssess = remarksAssess;
+    }
+
+    public String getRemarksExecute() {
+        return remarksExecute;
+    }
+
+    public void setRemarksExecute(String remarksExecute) {
+        this.remarksExecute = remarksExecute;
+    }
+
+    public Long getSaiLevel() {
+        return saiLevel;
+    }
+
+    public void setSaiLevel(Long saiLevel) {
+        this.saiLevel = saiLevel;
+    }
+
+    public String getCategory() {
+        return category;
+    }
+
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
+    public List<TSaiApproveFile> getFiles() {
+        return files;
+    }
+
+    public void setFiles(List<TSaiApproveFile> files) {
+        this.files = files;
+    }
+
+    public String getApplicantName() {
+        return applicantName;
+    }
+
+    public void setApplicantName(String applicantName) {
+        this.applicantName = applicantName;
+    }
+
+    public String getExecutorName() {
+        return executorName;
+    }
+
+    public void setExecutorName(String executorName) {
+        this.executorName = executorName;
+    }
+
+    public String getApplicantDeptName() {
+        return applicantDeptName;
+    }
+
+    public void setApplicantDeptName(String applicantDeptName) {
+        this.applicantDeptName = applicantDeptName;
+    }
+
+    public String getHandlerName() {
+        return handlerName;
+    }
+
+    public void setHandlerName(String handlerName) {
+        this.handlerName = handlerName;
+    }
+
+    public void setSaiApplyId(Long saiApplyId)
+    {
+        this.saiApplyId = saiApplyId;
+    }
+
+    public Long getSaiApplyId()
+    {
+        return saiApplyId;
+    }
+    public void setDelFlag(String delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag()
+    {
+        return delFlag;
+    }
+    public void setDeptId(Long deptId)
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId()
+    {
+        return deptId;
+    }
+    public void setApplyStatus(long applyStatus)
+    {
+        this.applyStatus = applyStatus;
+    }
+
+    public long getApplyStatus()
+    {
+        return applyStatus;
+    }
+    public void setApNo(String apNo)
+    {
+        this.apNo = apNo;
+    }
+
+    public String getApNo()
+    {
+        return apNo;
+    }
+    public void setProcessId(String processId)
+    {
+        this.processId = processId;
+    }
+
+    public String getProcessId()
+    {
+        return processId;
+    }
+    public void setApplicant(String applicant)
+    {
+        this.applicant = applicant;
+    }
+
+    public String getApplicant()
+    {
+        return applicant;
+    }
+    public void setAssessor(String assessor)
+    {
+        this.assessor = assessor;
+    }
+
+    public String getAssessor()
+    {
+        return assessor;
+    }
+    public void setExecutor(String executor)
+    {
+        this.executor = executor;
+    }
+
+    public String getExecutor()
+    {
+        return executor;
+    }
+    public void setInspectors(String inspectors)
+    {
+        this.inspectors = inspectors;
+    }
+
+    public String getInspectors()
+    {
+        return inspectors;
+    }
+    public void setApplicantDept(String applicantDept)
+    {
+        this.applicantDept = applicantDept;
+    }
+
+    public String getApplicantDept()
+    {
+        return applicantDept;
+    }
+    public void setApplicantTeam(String applicantTeam)
+    {
+        this.applicantTeam = applicantTeam;
+    }
+
+    public String getApplicantTeam()
+    {
+        return applicantTeam;
+    }
+    public void setDescription(String description)
+    {
+        this.description = description;
+    }
+
+    public String getDescription()
+    {
+        return description;
+    }
+    public void setUnsafeStatus(Long unsafeStatus)
+    {
+        this.unsafeStatus = unsafeStatus;
+    }
+
+    public Long getUnsafeStatus()
+    {
+        return unsafeStatus;
+    }
+    public void setUnsafeAction(Long unsafeAction)
+    {
+        this.unsafeAction = unsafeAction;
+    }
+
+    public Long getUnsafeAction()
+    {
+        return unsafeAction;
+    }
+    public void setApplyDate(Date applyDate)
+    {
+        this.applyDate = applyDate;
+    }
+
+    public Date getApplyDate()
+    {
+        return applyDate;
+    }
+    public void setHandler(String handler)
+    {
+        this.handler = handler;
+    }
+
+    public String getHandler()
+    {
+        return handler;
+    }
+    public void setTaskId(String taskId)
+    {
+        this.taskId = taskId;
+    }
+
+    public String getTaskId()
+    {
+        return taskId;
+    }
+    public void setTaskName(String taskName)
+    {
+        this.taskName = taskName;
+    }
+
+    public String getTaskName()
+    {
+        return taskName;
+    }
+    public void setEstimateFinishDate(Date estimateFinishDate)
+    {
+        this.estimateFinishDate = estimateFinishDate;
+    }
+
+    public Date getEstimateFinishDate()
+    {
+        return estimateFinishDate;
+    }
+    public void setActualFinishDate(Date actualFinishDate)
+    {
+        this.actualFinishDate = actualFinishDate;
+    }
+
+    public Date getActualFinishDate()
+    {
+        return actualFinishDate;
+    }
+    public void setIsRecorded(Long isRecorded)
+    {
+        this.isRecorded = isRecorded;
+    }
+
+    public Long getIsRecorded()
+    {
+        return isRecorded;
+    }
+    public void setRecordNo(String recordNo)
+    {
+        this.recordNo = recordNo;
+    }
+
+    public String getRecordNo()
+    {
+        return recordNo;
+    }
+    public void setReaction(String reaction)
+    {
+        this.reaction = reaction;
+    }
+
+    public String getReaction()
+    {
+        return reaction;
+    }
+    public void setNeedVe(Long needVe)
+    {
+        this.needVe = needVe;
+    }
+
+    public Long getNeedVe()
+    {
+        return needVe;
+    }
+    public void setVeItems(String veItems)
+    {
+        this.veItems = veItems;
+    }
+
+    public String getVeItems()
+    {
+        return veItems;
+    }
+    public void setVeResult(String veResult)
+    {
+        this.veResult = veResult;
+    }
+
+    public String getVeResult()
+    {
+        return veResult;
+    }
+    public void setRemarks(String remarks)
+    {
+        this.remarks = remarks;
+    }
+
+    public String getRemarks()
+    {
+        return remarks;
+    }
+    public void setVeItemOther(String veItemOther)
+    {
+        this.veItemOther = veItemOther;
+    }
+
+    public String getVeItemOther()
+    {
+        return veItemOther;
+    }
+
+    public Date getApplyDateStart() {
+        return applyDateStart;
+    }
+
+    public void setApplyDateStart(Date applyDateStart) {
+        this.applyDateStart = applyDateStart;
+    }
+
+    public Date getApplyDateEnd() {
+        return applyDateEnd;
+    }
+
+    public void setApplyDateEnd(Date applyDateEnd) {
+        this.applyDateEnd = applyDateEnd;
+    }
+
+    public Date getEstimateFinishDateStart() {
+        return estimateFinishDateStart;
+    }
+
+    public void setEstimateFinishDateStart(Date estimateFinishDateStart) {
+        this.estimateFinishDateStart = estimateFinishDateStart;
+    }
+
+    public Date getEstimateFinishDateEnd() {
+        return estimateFinishDateEnd;
+    }
+
+    public void setEstimateFinishDateEnd(Date estimateFinishDateEnd) {
+        this.estimateFinishDateEnd = estimateFinishDateEnd;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("saiApplyId", getSaiApplyId())
+                .append("delFlag", getDelFlag())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .append("deptId", getDeptId())
+                .append("applyStatus", getApplyStatus())
+                .append("apNo", getApNo())
+                .append("processId", getProcessId())
+                .append("applicant", getApplicant())
+                .append("assessor", getAssessor())
+                .append("executor", getExecutor())
+                .append("inspectors", getInspectors())
+                .append("applicantDept", getApplicantDept())
+                .append("applicantTeam", getApplicantTeam())
+                .append("description", getDescription())
+                .append("unsafeStatus", getUnsafeStatus())
+                .append("unsafeAction", getUnsafeAction())
+                .append("applyDate", getApplyDate())
+                .append("handler", getHandler())
+                .append("taskId", getTaskId())
+                .append("taskName", getTaskName())
+                .append("estimateFinishDate", getEstimateFinishDate())
+                .append("actualFinishDate", getActualFinishDate())
+                .append("isRecorded", getIsRecorded())
+                .append("recordNo", getRecordNo())
+                .append("reaction", getReaction())
+                .append("needVe", getNeedVe())
+                .append("veItems", getVeItems())
+                .append("veResult", getVeResult())
+                .append("remarks", getRemarks())
+                .append("veItemOther", getVeItemOther())
+                .toString();
+    }
+}

+ 99 - 0
master/src/main/java/com/ruoyi/project/production/controller/vo/EoegSaiExportVO.java

@@ -0,0 +1,99 @@
+package com.ruoyi.project.production.controller.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import com.ruoyi.framework.web.domain.BaseEntity;
+
+import java.util.Date;
+
+/**
+ *  EOEG SAI检查管理导出VO
+ */
+public class EoegSaiExportVO extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    @Excel(name = "序号", width = 8)
+    private String no;
+
+    /** 检查日期/时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "检查日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date inspectionDate;
+
+    /** 识别出的安全问题 */
+    @Excel(name = "识别出的问题")
+    private String dificiency;
+
+    /** 采取或要采取的措施 */
+    @Excel(name = "采取或要采取的措施")
+    private String actions;
+
+    /** 级别 */
+    @Excel(name = "SAI级别")
+    private Long saiLevel;
+
+    /** 类别 */
+    @Excel(name = "SAI类别")
+    private String category;
+
+    /** 检查人 */
+    @Excel(name = "检查人")
+    private String applicant;
+
+    public String getNo() {
+        return no;
+    }
+
+    public void setNo(String no) {
+        this.no = no;
+    }
+
+    public Date getInspectionDate() {
+        return inspectionDate;
+    }
+
+    public void setInspectionDate(Date inspectionDate) {
+        this.inspectionDate = inspectionDate;
+    }
+
+    public String getDificiency() {
+        return dificiency;
+    }
+
+    public void setDificiency(String dificiency) {
+        this.dificiency = dificiency;
+    }
+
+    public String getActions() {
+        return actions;
+    }
+
+    public void setActions(String actions) {
+        this.actions = actions;
+    }
+
+    public Long getSaiLevel() {
+        return saiLevel;
+    }
+
+    public void setSaiLevel(Long saiLevel) {
+        this.saiLevel = saiLevel;
+    }
+
+    public String getCategory() {
+        return category;
+    }
+
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
+    public String getApplicant() {
+        return applicant;
+    }
+
+    public void setApplicant(String applicant) {
+        this.applicant = applicant;
+    }
+}

+ 189 - 0
master/src/main/java/com/ruoyi/project/production/controller/vo/EoegSaiQueryVO.java

@@ -0,0 +1,189 @@
+package com.ruoyi.project.production.controller.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import com.ruoyi.framework.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+
+public class EoegSaiQueryVO extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    @Excel(name = "主键")
+    private Long saiId;
+
+    /** 检查的装置/设施 */
+    @Excel(name = "检查的装置/设施")
+    private String plantId;
+
+    /** 检查日期/时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "检查日期/时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date inspectionDate;
+
+    /** 识别出的安全问题 */
+    @Excel(name = "识别出的安全问题")
+    private String dificiency;
+
+    /** 级别 */
+    @Excel(name = "级别")
+    private Long saiLevel;
+
+    /** 类别 */
+    @Excel(name = "类别")
+    private String category;
+
+    /** 采取或要采取的措施 */
+    @Excel(name = "采取或要采取的措施")
+    private String actions;
+
+    /** 用户 */
+    @Excel(name = "用户")
+    private String userDept;
+
+    /** 数据来源 */
+    @Excel(name = "数据来源")
+    private String source;
+
+    /** 删除状态 */
+    private String delFlag;
+
+    /** 部门编号 */
+    private Long deptId;
+
+    /* 年份 */
+    private int saiYear;
+
+    public void setSaiId(Long saiId)
+    {
+        this.saiId = saiId;
+    }
+
+    public Long getSaiId()
+    {
+        return saiId;
+    }
+    public void setPlantId(String plantId)
+    {
+        this.plantId = plantId;
+    }
+
+    public String getPlantId()
+    {
+        return plantId;
+    }
+    public void setInspectionDate(Date inspectionDate)
+    {
+        this.inspectionDate = inspectionDate;
+    }
+
+    public Date getInspectionDate()
+    {
+        return inspectionDate;
+    }
+
+    public String getDificiency()
+    {
+        return dificiency;
+    }
+    public void setSaiLevel(Long saiLevel)
+    {
+        this.saiLevel = saiLevel;
+    }
+
+    public Long getSaiLevel()
+    {
+        return saiLevel;
+    }
+    public void setCategory(String category)
+    {
+        this.category = category;
+    }
+
+    public String getCategory()
+    {
+        return category;
+    }
+    public void setActions(String actions)
+    {
+        this.actions = actions;
+    }
+
+    public String getActions()
+    {
+        return actions;
+    }
+    public void setUserDept(String userDept)
+    {
+        this.userDept = userDept;
+    }
+
+    public String getUserDept()
+    {
+        return userDept;
+    }
+    public void setSource(String source)
+    {
+        this.source = source;
+    }
+
+    public String getSource()
+    {
+        return source;
+    }
+    public void setDelFlag(String delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag()
+    {
+        return delFlag;
+    }
+
+    public Long getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+
+    public void setDificiency(String dificiency) {
+        this.dificiency = dificiency;
+    }
+
+    public int getSaiYear() {
+        return saiYear;
+    }
+
+    public void setSaiYear(int saiYear) {
+        this.saiYear = saiYear;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("saiId", getSaiId())
+                .append("plantId", getPlantId())
+                .append("inspectionDate", getInspectionDate())
+                .append("dificiency", getDificiency())
+                .append("saiLevel", getSaiLevel())
+                .append("category", getCategory())
+                .append("actions", getActions())
+                .append("userDept", getUserDept())
+                .append("source", getSource())
+                .append("delFlag", getDelFlag())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .append("deptId", getDeptId())
+                .append("saiYear", getSaiYear())
+                .toString();
+    }
+}

+ 0 - 2
master/src/main/java/com/ruoyi/project/production/controller/vo/SaiApplyQueryVO.java

@@ -14,8 +14,6 @@ import java.util.List;
 /**
  * SAI开项申请查询VO
  *
- * @author Wang Zi Wen
- * @email wangggziwen@163.com
  * @date 2023/04/20 10:30:37
  */
 public class SaiApplyQueryVO extends BaseEntity {

+ 0 - 2
master/src/main/java/com/ruoyi/project/production/controller/vo/SaiExportVO.java

@@ -9,8 +9,6 @@ import java.util.Date;
 /**
  *  SAI检查管理导出VO
  *
- * @author Wang Zi Wen
- * @email wangggziwen@163.com
  * @date 2023/04/11 10:48:57
  */
 public class SaiExportVO extends BaseEntity

+ 1 - 2
master/src/main/java/com/ruoyi/project/production/controller/vo/SaiQueryVO.java

@@ -9,8 +9,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
 import java.util.Date;
 
 /**
- * @author Wang Zi Wen
- * @email wangggziwen@163.com
+ *
  * @date 2023/03/08 13:50:50
  */
 public class SaiQueryVO extends BaseEntity

+ 246 - 0
master/src/main/java/com/ruoyi/project/production/domain/TEoegSai.java

@@ -0,0 +1,246 @@
+package com.ruoyi.project.production.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import com.ruoyi.framework.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * EOEG SAI信息对象 t_sai
+ *
+ * @author ruoyi
+ * @date 2023-03-08
+ */
+public class TEoegSai extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long saiId;
+
+    /** 检查的装置/设施 */
+    private String plantId;
+    @Excel(name = "检查的装置/设施")
+    private String plantName;
+
+    /** 检查日期/时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "检查日期/时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date inspectionDate;
+
+    /** 识别出的安全问题 */
+    @Excel(name = "识别出的安全问题")
+    private String dificiency;
+
+    /** 级别 */
+    @Excel(name = "级别")
+    private Long saiLevel;
+
+    /** 类别 */
+    @Excel(name = "类别")
+    private String category;
+
+    /** 采取或要采取的措施 */
+    @Excel(name = "采取或要采取的措施")
+    private String actions;
+
+    /** 用户 */
+    private String userDept;
+    @Excel(name = "用户")
+    private String userDeptName;
+
+    /** 数据来源 */
+    @Excel(name = "数据来源")
+    private String source;
+
+    /** SAI开项申请编号 */
+    @Excel(name = "SAI开项申请编号")
+    private Long saiApplyId;
+
+    /** 登记人 */
+    private String applicant;
+
+    private String applicantName;
+
+    public String getApplicant() {
+        return applicant;
+    }
+
+    public void setApplicant(String applicant) {
+        this.applicant = applicant;
+    }
+
+    public String getApplicantName() {
+        return applicantName;
+    }
+
+    public void setApplicantName(String applicantName) {
+        this.applicantName = applicantName;
+    }
+
+    public Long getSaiApplyId() {
+        return saiApplyId;
+    }
+
+    public void setSaiApplyId(Long saiApplyId) {
+        this.saiApplyId = saiApplyId;
+    }
+
+    /** 删除状态 */
+    private String delFlag;
+
+    /** 部门编号 */
+    private Long deptId;
+
+    /** 部门名称 */
+    private String deptName;
+
+    public void setSaiId(Long saiId)
+    {
+        this.saiId = saiId;
+    }
+
+    public Long getSaiId()
+    {
+        return saiId;
+    }
+    public void setPlantId(String plantId)
+    {
+        this.plantId = plantId;
+    }
+
+    public String getPlantId()
+    {
+        return plantId;
+    }
+    public void setInspectionDate(Date inspectionDate)
+    {
+        this.inspectionDate = inspectionDate;
+    }
+
+    public Date getInspectionDate()
+    {
+        return inspectionDate;
+    }
+
+    public String getDificiency()
+    {
+        return dificiency;
+    }
+    public void setSaiLevel(Long saiLevel)
+    {
+        this.saiLevel = saiLevel;
+    }
+
+    public Long getSaiLevel()
+    {
+        return saiLevel;
+    }
+    public void setCategory(String category)
+    {
+        this.category = category;
+    }
+
+    public String getCategory()
+    {
+        return category;
+    }
+    public void setActions(String actions)
+    {
+        this.actions = actions;
+    }
+
+    public String getActions()
+    {
+        return actions;
+    }
+    public void setUserDept(String userDept)
+    {
+        this.userDept = userDept;
+    }
+
+    public String getUserDept()
+    {
+        return userDept;
+    }
+    public void setSource(String source)
+    {
+        this.source = source;
+    }
+
+    public String getSource()
+    {
+        return source;
+    }
+    public void setDelFlag(String delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag()
+    {
+        return delFlag;
+    }
+
+    public Long getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+
+    public void setDificiency(String dificiency) {
+        this.dificiency = dificiency;
+    }
+
+    public String getPlantName() {
+        return plantName;
+    }
+
+    public void setPlantName(String plantName) {
+        this.plantName = plantName;
+    }
+
+    public String getUserDeptName() {
+        return userDeptName;
+    }
+
+    public void setUserDeptName(String userDeptName) {
+        this.userDeptName = userDeptName;
+    }
+
+    public String getDeptName() {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("saiId", getSaiId())
+            .append("plantId", getPlantId())
+            .append("inspectionDate", getInspectionDate())
+            .append("dificiency", getDificiency())
+            .append("saiLevel", getSaiLevel())
+            .append("category", getCategory())
+            .append("actions", getActions())
+            .append("userDept", getUserDept())
+            .append("source", getSource())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("deptId", getDeptId())
+            .append("deptName", getDeptName())
+            .append("userDeptName", getUserDeptName())
+            .append("plantName", getPlantName())
+            .toString();
+    }
+}

+ 520 - 0
master/src/main/java/com/ruoyi/project/production/domain/TEoegSaiApply.java

@@ -0,0 +1,520 @@
+package com.ruoyi.project.production.domain;
+
+import java.util.Date;
+import java.util.List;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import com.ruoyi.framework.web.domain.BaseEntity;
+import com.ruoyi.project.sems.domain.TApproverFile;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * EOEG SAI开项管理对象 t_sai_apply
+ *
+ * @author ruoyi
+ * @date 2023-03-21
+ */
+public class TEoegSaiApply extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long saiApplyId;
+
+    /** 删除状态 */
+    private String delFlag;
+
+    /** 部门编号 */
+    private Long deptId;
+
+    /** SAI类型 */
+    @Excel(name = "SAI类型")
+    private String saiType;
+
+    /** 问题描述 */
+    @Excel(name = "问题描述")
+    private String description;
+
+    /** 申请状态 */
+    @Excel(name = "申请状态")
+    private long applyStatus;
+    private String applyStatusString;
+
+    /** 登记人部门 */
+    @Excel(name = "登记人部门")
+    private String applicantDept;
+
+    private String applicantDeptName;
+
+    /** 登记人班组 */
+    @Excel(name = "登记人班组")
+    private String applicantTeam;
+
+    private String teamCount;
+
+    private String applicantCount;
+
+    /** 登记人 */
+    @Excel(name = "登记人")
+    private String applicant;
+
+    private String applicantName;
+
+    /** 当前处理人 */
+    @Excel(name = "当前处理人")
+    private String handler;
+
+    private String handlerName;
+
+    /** 整改负责人 */
+    @Excel(name = "整改负责人")
+    private String executor;
+
+    private String executorName;
+
+    /** SAI级别 */
+    private Long saiLevel;
+
+    /** SAI类别 */
+    private String category;
+
+    /** 片区 */
+    private String workArea;
+
+    /** 登记时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "登记时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date applyDate;
+
+    /** 预计完成时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "预计完成时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date estimateFinishDate;
+
+    /** 实际完成时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "实际完成时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date actualFinishDate;
+
+    /** 申请编号 */
+    private String apNo;
+
+    /** 流程id */
+    private String processId;
+
+    /** 评估人 */
+    private String assessor;
+
+    /** 验收人 */
+    private String inspectors;
+
+    /** 不安全状态 */
+    private Long unsafeStatus;
+
+    /** 不安全行为 */
+    private Long unsafeAction;
+
+    /** 任务编号 */
+    private String taskId;
+
+    /** 任务名称 */
+    private String taskName;
+
+    /** 采取的措施 */
+    private String reaction;
+
+    /** VC/VE验证成果 */
+    private String veResult;
+
+    /** 备注 */
+    private String remarks;
+
+    /** VC/VE验证条款(其它) */
+    private String veItemOther;
+
+    @TableField(exist = false)
+    private List<TEoegSaiApproveFile> files;
+
+    /** 备注(评估阶段) */
+    private String remarksAssess;
+
+    /** 备注(执行阶段) */
+    private String remarksExecute;
+
+    public String getSaiType() {
+        return saiType;
+    }
+
+    public void setSaiType(String saiType) {
+        this.saiType = saiType;
+    }
+
+    public String getApplicantCount() {
+        return applicantCount;
+    }
+
+    public void setApplicantCount(String applicantCount) {
+        this.applicantCount = applicantCount;
+    }
+
+    public String getTeamCount() {
+        return teamCount;
+    }
+
+    public void setTeamCount(String teamCount) {
+        this.teamCount = teamCount;
+    }
+
+    public String getApplyStatusString() {
+        return applyStatusString;
+    }
+
+    public void setApplyStatusString(String applyStatusString) {
+        this.applyStatusString = applyStatusString;
+    }
+
+    public String getWorkArea() {
+        return workArea;
+    }
+
+    public void setWorkArea(String workArea) {
+        this.workArea = workArea;
+    }
+
+    public String getRemarksAssess() {
+        return remarksAssess;
+    }
+
+    public void setRemarksAssess(String remarksAssess) {
+        this.remarksAssess = remarksAssess;
+    }
+
+    public String getRemarksExecute() {
+        return remarksExecute;
+    }
+
+    public void setRemarksExecute(String remarksExecute) {
+        this.remarksExecute = remarksExecute;
+    }
+
+    public Long getSaiLevel() {
+        return saiLevel;
+    }
+
+    public void setSaiLevel(Long saiLevel) {
+        this.saiLevel = saiLevel;
+    }
+
+    public String getCategory() {
+        return category;
+    }
+
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
+    public List<TEoegSaiApproveFile> getFiles() {
+        return files;
+    }
+
+    public void setFiles(List<TEoegSaiApproveFile> files) {
+        this.files = files;
+    }
+
+    public String getApplicantName() {
+        return applicantName;
+    }
+
+    public void setApplicantName(String applicantName) {
+        this.applicantName = applicantName;
+    }
+
+    public String getExecutorName() {
+        return executorName;
+    }
+
+    public void setExecutorName(String executorName) {
+        this.executorName = executorName;
+    }
+
+    public String getApplicantDeptName() {
+        return applicantDeptName;
+    }
+
+    public void setApplicantDeptName(String applicantDeptName) {
+        this.applicantDeptName = applicantDeptName;
+    }
+
+    public String getHandlerName() {
+        return handlerName;
+    }
+
+    public void setHandlerName(String handlerName) {
+        this.handlerName = handlerName;
+    }
+
+    public void setSaiApplyId(Long saiApplyId)
+    {
+        this.saiApplyId = saiApplyId;
+    }
+
+    public Long getSaiApplyId()
+    {
+        return saiApplyId;
+    }
+    public void setDelFlag(String delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag()
+    {
+        return delFlag;
+    }
+    public void setDeptId(Long deptId)
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId()
+    {
+        return deptId;
+    }
+    public void setApplyStatus(long applyStatus)
+    {
+        this.applyStatus = applyStatus;
+    }
+
+    public long getApplyStatus()
+    {
+        return applyStatus;
+    }
+    public void setApNo(String apNo)
+    {
+        this.apNo = apNo;
+    }
+
+    public String getApNo()
+    {
+        return apNo;
+    }
+    public void setProcessId(String processId)
+    {
+        this.processId = processId;
+    }
+
+    public String getProcessId()
+    {
+        return processId;
+    }
+    public void setApplicant(String applicant)
+    {
+        this.applicant = applicant;
+    }
+
+    public String getApplicant()
+    {
+        return applicant;
+    }
+    public void setAssessor(String assessor)
+    {
+        this.assessor = assessor;
+    }
+
+    public String getAssessor()
+    {
+        return assessor;
+    }
+    public void setExecutor(String executor)
+    {
+        this.executor = executor;
+    }
+
+    public String getExecutor()
+    {
+        return executor;
+    }
+    public void setInspectors(String inspectors)
+    {
+        this.inspectors = inspectors;
+    }
+
+    public String getInspectors()
+    {
+        return inspectors;
+    }
+    public void setApplicantDept(String applicantDept)
+    {
+        this.applicantDept = applicantDept;
+    }
+
+    public String getApplicantDept()
+    {
+        return applicantDept;
+    }
+    public void setApplicantTeam(String applicantTeam)
+    {
+        this.applicantTeam = applicantTeam;
+    }
+
+    public String getApplicantTeam()
+    {
+        return applicantTeam;
+    }
+    public void setDescription(String description)
+    {
+        this.description = description;
+    }
+
+    public String getDescription()
+    {
+        return description;
+    }
+    public void setUnsafeStatus(Long unsafeStatus)
+    {
+        this.unsafeStatus = unsafeStatus;
+    }
+
+    public Long getUnsafeStatus()
+    {
+        return unsafeStatus;
+    }
+    public void setUnsafeAction(Long unsafeAction)
+    {
+        this.unsafeAction = unsafeAction;
+    }
+
+    public Long getUnsafeAction()
+    {
+        return unsafeAction;
+    }
+    public void setApplyDate(Date applyDate)
+    {
+        this.applyDate = applyDate;
+    }
+
+    public Date getApplyDate()
+    {
+        return applyDate;
+    }
+    public void setHandler(String handler)
+    {
+        this.handler = handler;
+    }
+
+    public String getHandler()
+    {
+        return handler;
+    }
+    public void setTaskId(String taskId)
+    {
+        this.taskId = taskId;
+    }
+
+    public String getTaskId()
+    {
+        return taskId;
+    }
+    public void setTaskName(String taskName)
+    {
+        this.taskName = taskName;
+    }
+
+    public String getTaskName()
+    {
+        return taskName;
+    }
+    public void setEstimateFinishDate(Date estimateFinishDate)
+    {
+        this.estimateFinishDate = estimateFinishDate;
+    }
+
+    public Date getEstimateFinishDate()
+    {
+        return estimateFinishDate;
+    }
+    public void setActualFinishDate(Date actualFinishDate)
+    {
+        this.actualFinishDate = actualFinishDate;
+    }
+
+    public Date getActualFinishDate()
+    {
+        return actualFinishDate;
+    }
+    public void setReaction(String reaction)
+    {
+        this.reaction = reaction;
+    }
+
+    public String getReaction()
+    {
+        return reaction;
+    }
+
+    public void setVeResult(String veResult)
+    {
+        this.veResult = veResult;
+    }
+
+    public String getVeResult()
+    {
+        return veResult;
+    }
+    public void setRemarks(String remarks)
+    {
+        this.remarks = remarks;
+    }
+
+    public String getRemarks()
+    {
+        return remarks;
+    }
+    public void setVeItemOther(String veItemOther)
+    {
+        this.veItemOther = veItemOther;
+    }
+
+    public String getVeItemOther()
+    {
+        return veItemOther;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("saiApplyId", getSaiApplyId())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("deptId", getDeptId())
+            .append("applyStatus", getApplyStatus())
+            .append("apNo", getApNo())
+            .append("processId", getProcessId())
+            .append("applicant", getApplicant())
+            .append("assessor", getAssessor())
+            .append("executor", getExecutor())
+            .append("inspectors", getInspectors())
+            .append("applicantDept", getApplicantDept())
+            .append("applicantTeam", getApplicantTeam())
+            .append("description", getDescription())
+            .append("unsafeStatus", getUnsafeStatus())
+            .append("unsafeAction", getUnsafeAction())
+            .append("applyDate", getApplyDate())
+            .append("handler", getHandler())
+            .append("taskId", getTaskId())
+            .append("taskName", getTaskName())
+            .append("estimateFinishDate", getEstimateFinishDate())
+            .append("actualFinishDate", getActualFinishDate())
+            .append("reaction", getReaction())
+            .append("veResult", getVeResult())
+            .append("remarks", getRemarks())
+            .append("veItemOther", getVeItemOther())
+            .toString();
+    }
+}

+ 94 - 0
master/src/main/java/com/ruoyi/project/production/domain/TEoegSaiApproveFile.java

@@ -0,0 +1,94 @@
+package com.ruoyi.project.production.domain;
+
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import com.ruoyi.framework.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * EOEG SAI审批附件对象 t_sai_approve_file
+ *
+ * @author ruoyi
+ * @date 2023-04-06
+ */
+public class TEoegSaiApproveFile extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long approveId;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String fileName;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String fileUrl;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long fileType;
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setApproveId(Long approveId)
+    {
+        this.approveId = approveId;
+    }
+
+    public Long getApproveId()
+    {
+        return approveId;
+    }
+    public void setFileName(String fileName)
+    {
+        this.fileName = fileName;
+    }
+
+    public String getFileName()
+    {
+        return fileName;
+    }
+    public void setFileUrl(String fileUrl)
+    {
+        this.fileUrl = fileUrl;
+    }
+
+    public String getFileUrl()
+    {
+        return fileUrl;
+    }
+    public void setFileType(Long fileType)
+    {
+        this.fileType = fileType;
+    }
+
+    public Long getFileType()
+    {
+        return fileType;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("approveId", getApproveId())
+            .append("fileName", getFileName())
+            .append("fileUrl", getFileUrl())
+            .append("createTime", getCreateTime())
+            .append("fileType", getFileType())
+            .toString();
+    }
+}

+ 95 - 0
master/src/main/java/com/ruoyi/project/production/domain/TEoegSaiCategory.java

@@ -0,0 +1,95 @@
+package com.ruoyi.project.production.domain;
+
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import com.ruoyi.framework.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * EOEG SAI类别对象 t_sai_category
+ *
+ * @author ruoyi
+ * @date 2023-04-18
+ */
+public class TEoegSaiCategory extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** SAI类别编号 */
+    @Excel(name = "SAI类别编号")
+    private Long saiCategoryId;
+
+    /** SAI类别名称 */
+    @Excel(name = "SAI类别名称")
+    private String saiCategoryName;
+
+    /** SAI类别描述 */
+    @Excel(name = "SAI类别描述")
+    private String saiCategoryDescription;
+
+    /** 删除状态 */
+    private String delFlag;
+
+    /** 部门编号 */
+    @Excel(name = "部门编号")
+    private Long deptId;
+
+    public void setSaiCategoryId(Long saiCategoryId)
+    {
+        this.saiCategoryId = saiCategoryId;
+    }
+
+    public Long getSaiCategoryId()
+    {
+        return saiCategoryId;
+    }
+    public void setSaiCategoryName(String saiCategoryName)
+    {
+        this.saiCategoryName = saiCategoryName;
+    }
+
+    public String getSaiCategoryName()
+    {
+        return saiCategoryName;
+    }
+    public void setDelFlag(String delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag()
+    {
+        return delFlag;
+    }
+    public void setDeptId(Long deptId)
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId()
+    {
+        return deptId;
+    }
+
+    public String getSaiCategoryDescription() {
+        return saiCategoryDescription;
+    }
+
+    public void setSaiCategoryDescription(String saiCategoryDescription) {
+        this.saiCategoryDescription = saiCategoryDescription;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("saiCategoryId", getSaiCategoryId())
+            .append("saiCategoryName", getSaiCategoryName())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("deptId", getDeptId())
+            .toString();
+    }
+}

+ 151 - 0
master/src/main/java/com/ruoyi/project/production/domain/TEoegSaiFile.java

@@ -0,0 +1,151 @@
+package com.ruoyi.project.production.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import com.ruoyi.framework.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * EOEG SAI文件对象 t_sai_file
+ *
+ * @author ruoyi
+ * @date 2023-04-06
+ */
+public class TEoegSaiFile extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String fileName;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String fileUrl;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long fileType;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long devType;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Date createrDate;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long createrCode;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long deptId;
+
+    /** $column.columnComment */
+    private Long delFlag;
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setFileName(String fileName)
+    {
+        this.fileName = fileName;
+    }
+
+    public String getFileName()
+    {
+        return fileName;
+    }
+    public void setFileUrl(String fileUrl)
+    {
+        this.fileUrl = fileUrl;
+    }
+
+    public String getFileUrl()
+    {
+        return fileUrl;
+    }
+    public void setFileType(Long fileType)
+    {
+        this.fileType = fileType;
+    }
+
+    public Long getFileType()
+    {
+        return fileType;
+    }
+    public void setDevType(Long devType)
+    {
+        this.devType = devType;
+    }
+
+    public Long getDevType()
+    {
+        return devType;
+    }
+    public void setCreaterDate(Date createrDate)
+    {
+        this.createrDate = createrDate;
+    }
+
+    public Date getCreaterDate()
+    {
+        return createrDate;
+    }
+    public void setCreaterCode(Long createrCode)
+    {
+        this.createrCode = createrCode;
+    }
+
+    public Long getCreaterCode()
+    {
+        return createrCode;
+    }
+    public void setDeptId(Long deptId)
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId()
+    {
+        return deptId;
+    }
+    public void setDelFlag(Long delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public Long getDelFlag()
+    {
+        return delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("fileName", getFileName())
+            .append("fileUrl", getFileUrl())
+            .append("fileType", getFileType())
+            .append("devType", getDevType())
+            .append("createrDate", getCreaterDate())
+            .append("createrCode", getCreaterCode())
+            .append("remark", getRemark())
+            .append("deptId", getDeptId())
+            .append("delFlag", getDelFlag())
+            .toString();
+    }
+}

+ 69 - 0
master/src/main/java/com/ruoyi/project/production/mapper/TEoegSaiApplyMapper.java

@@ -0,0 +1,69 @@
+package com.ruoyi.project.production.mapper;
+
+import java.util.List;
+import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
+import com.ruoyi.project.production.controller.vo.EoegSaiApplyQueryVO;
+import com.ruoyi.project.production.controller.vo.SaiApplyQueryVO;
+import com.ruoyi.project.production.domain.TEoegSaiApply;
+import com.ruoyi.project.production.domain.TSaiApply;
+
+/**
+ * EOEG SAI开项管理Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-03-15
+ */
+public interface TEoegSaiApplyMapper 
+{
+    public List<TEoegSaiApply> selectTeamAnalysis();
+
+    public List<TEoegSaiApply> selectPersonalAnalysis();
+
+    /**
+     * 查询SAI开项管理
+     * 
+     * @param saiApplyId SAI开项管理ID
+     * @return SAI开项管理
+     */
+    public TEoegSaiApply selectTSaiApplyById(Long saiApplyId);
+
+    /**
+     * 查询SAI开项管理列表
+     * 
+     * @param tSaiApply SAI开项管理
+     * @return SAI开项管理集合
+     */
+    public List<TEoegSaiApply> selectTSaiApplyList(EoegSaiApplyQueryVO tSaiApply);
+
+    /**
+     * 新增SAI开项管理
+     * 
+     * @param tSaiApply SAI开项管理
+     * @return 结果
+     */
+    public int insertTSaiApply(TEoegSaiApply tSaiApply);
+
+    /**
+     * 修改SAI开项管理
+     * 
+     * @param tSaiApply SAI开项管理
+     * @return 结果
+     */
+    public int updateTSaiApply(TEoegSaiApply tSaiApply);
+
+    /**
+     * 删除SAI开项管理
+     * 
+     * @param saiApplyId SAI开项管理ID
+     * @return 结果
+     */
+    public int deleteTSaiApplyById(Long saiApplyId);
+
+    /**
+     * 批量删除SAI开项管理
+     * 
+     * @param saiApplyIds 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTSaiApplyByIds(Long[] saiApplyIds);
+}

+ 67 - 0
master/src/main/java/com/ruoyi/project/production/mapper/TEoegSaiApproveFileMapper.java

@@ -0,0 +1,67 @@
+package com.ruoyi.project.production.mapper;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
+import com.ruoyi.project.production.domain.TEoegSaiApproveFile;
+import com.ruoyi.project.production.domain.TSaiApproveFile;
+import com.ruoyi.project.sems.domain.TApproverFile;
+
+/**
+ * EOEG SAI审批附件Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-04-06
+ */
+public interface TEoegSaiApproveFileMapper extends BaseMapper<TEoegSaiApproveFile>
+{
+    /**
+     * 查询SAI审批附件
+     * 
+     * @param id SAI审批附件ID
+     * @return SAI审批附件
+     */
+    public TEoegSaiApproveFile selectTSaiApproveFileById(Long id);
+
+    /**
+     * 查询SAI审批附件列表
+     * 
+     * @param tSaiApproveFile SAI审批附件
+     * @return SAI审批附件集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TEoegSaiApproveFile> selectTSaiApproveFileList(TEoegSaiApproveFile tSaiApproveFile);
+
+    /**
+     * 新增SAI审批附件
+     * 
+     * @param tSaiApproveFile SAI审批附件
+     * @return 结果
+     */
+    public int insertTSaiApproveFile(TEoegSaiApproveFile tSaiApproveFile);
+
+    /**
+     * 修改SAI审批附件
+     * 
+     * @param tSaiApproveFile SAI审批附件
+     * @return 结果
+     */
+    public int updateTSaiApproveFile(TEoegSaiApproveFile tSaiApproveFile);
+
+    /**
+     * 删除SAI审批附件
+     * 
+     * @param id SAI审批附件ID
+     * @return 结果
+     */
+    public int deleteTSaiApproveFileById(Long id);
+
+    /**
+     * 批量删除SAI审批附件
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTSaiApproveFileByIds(Long[] ids);
+}

+ 64 - 0
master/src/main/java/com/ruoyi/project/production/mapper/TEoegSaiCategoryMapper.java

@@ -0,0 +1,64 @@
+package com.ruoyi.project.production.mapper;
+
+import java.util.List;
+import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
+import com.ruoyi.project.production.domain.TEoegSaiCategory;
+import com.ruoyi.project.production.domain.TSaiCategory;
+
+/**
+ * EOEG SAI类别Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-04-18
+ */
+public interface TEoegSaiCategoryMapper 
+{
+    /**
+     * 查询SAI类别
+     * 
+     * @param saiCategoryId SAI类别ID
+     * @return SAI类别
+     */
+    public TEoegSaiCategory selectTSaiCategoryById(Long saiCategoryId);
+
+    /**
+     * 查询SAI类别列表
+     * 
+     * @param tSaiCategory SAI类别
+     * @return SAI类别集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TEoegSaiCategory> selectTSaiCategoryList(TEoegSaiCategory tSaiCategory);
+
+    /**
+     * 新增SAI类别
+     * 
+     * @param tSaiCategory SAI类别
+     * @return 结果
+     */
+    public int insertTSaiCategory(TEoegSaiCategory tSaiCategory);
+
+    /**
+     * 修改SAI类别
+     * 
+     * @param tSaiCategory SAI类别
+     * @return 结果
+     */
+    public int updateTSaiCategory(TEoegSaiCategory tSaiCategory);
+
+    /**
+     * 删除SAI类别
+     * 
+     * @param saiCategoryId SAI类别ID
+     * @return 结果
+     */
+    public int deleteTSaiCategoryById(Long saiCategoryId);
+
+    /**
+     * 批量删除SAI类别
+     * 
+     * @param saiCategoryIds 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTSaiCategoryByIds(Long[] saiCategoryIds);
+}

+ 64 - 0
master/src/main/java/com/ruoyi/project/production/mapper/TEoegSaiFileMapper.java

@@ -0,0 +1,64 @@
+package com.ruoyi.project.production.mapper;
+
+import java.util.List;
+import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
+import com.ruoyi.project.production.domain.TEoegSaiFile;
+import com.ruoyi.project.production.domain.TSaiFile;
+
+/**
+ * EOEG SAI文件Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-04-06
+ */
+public interface TEoegSaiFileMapper 
+{
+    /**
+     * 查询SAI文件
+     * 
+     * @param id SAI文件ID
+     * @return SAI文件
+     */
+    public TEoegSaiFile selectTSaiFileById(Long id);
+
+    /**
+     * 查询SAI文件列表
+     * 
+     * @param tSaiFile SAI文件
+     * @return SAI文件集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TEoegSaiFile> selectTSaiFileList(TEoegSaiFile tSaiFile);
+
+    /**
+     * 新增SAI文件
+     * 
+     * @param tSaiFile SAI文件
+     * @return 结果
+     */
+    public int insertTSaiFile(TEoegSaiFile tSaiFile);
+
+    /**
+     * 修改SAI文件
+     * 
+     * @param tSaiFile SAI文件
+     * @return 结果
+     */
+    public int updateTSaiFile(TEoegSaiFile tSaiFile);
+
+    /**
+     * 删除SAI文件
+     * 
+     * @param id SAI文件ID
+     * @return 结果
+     */
+    public int deleteTSaiFileById(Long id);
+
+    /**
+     * 批量删除SAI文件
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTSaiFileByIds(Long[] ids);
+}

+ 75 - 0
master/src/main/java/com/ruoyi/project/production/mapper/TEoegSaiMapper.java

@@ -0,0 +1,75 @@
+package com.ruoyi.project.production.mapper;
+
+import java.util.List;
+import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
+import com.ruoyi.project.production.controller.vo.EoegSaiQueryVO;
+import com.ruoyi.project.production.controller.vo.SaiQueryVO;
+import com.ruoyi.project.production.domain.TEoegSai;
+import com.ruoyi.project.production.domain.TSai;
+
+/**
+ * EOEG SAI信息Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-03-08
+ */
+public interface TEoegSaiMapper 
+{
+    /**
+     * 查询SAI信息
+     * 
+     * @param saiId SAI信息ID
+     * @return SAI信息
+     */
+    public TEoegSai selectTSaiById(Long saiId);
+
+    /**
+     * 查询SAI信息列表
+     *
+     * @param tSai SAI信息
+     * @return SAI信息集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TEoegSai> selectTSaiListByYear(EoegSaiQueryVO tSai);
+
+    /**
+     * 查询SAI信息列表
+     * 
+     * @param tSai SAI信息
+     * @return SAI信息集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TEoegSai> selectTSaiList(TEoegSai tSai);
+
+    /**
+     * 新增SAI信息
+     * 
+     * @param tSai SAI信息
+     * @return 结果
+     */
+    public int insertTSai(TEoegSai tSai);
+
+    /**
+     * 修改SAI信息
+     * 
+     * @param tSai SAI信息
+     * @return 结果
+     */
+    public int updateTSai(TEoegSai tSai);
+
+    /**
+     * 删除SAI信息
+     * 
+     * @param saiId SAI信息ID
+     * @return 结果
+     */
+    public int deleteTSaiById(Long saiId);
+
+    /**
+     * 批量删除SAI信息
+     * 
+     * @param saiIds 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTSaiByIds(Long[] saiIds);
+}

+ 65 - 0
master/src/main/java/com/ruoyi/project/production/service/ITEoegSaiApplyService.java

@@ -0,0 +1,65 @@
+package com.ruoyi.project.production.service;
+
+import java.util.List;
+
+import com.ruoyi.project.production.controller.vo.EoegSaiApplyQueryVO;
+import com.ruoyi.project.production.controller.vo.SaiApplyQueryVO;
+import com.ruoyi.project.production.domain.TEoegSaiApply;
+import com.ruoyi.project.production.domain.TSaiApply;
+
+/**
+ * EOEG SAI开项管理Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-03-15
+ */
+public interface ITEoegSaiApplyService 
+{
+    /**
+     * 查询SAI开项管理
+     * 
+     * @param saiApplyId SAI开项管理ID
+     * @return SAI开项管理
+     */
+    public TEoegSaiApply selectTSaiApplyById(Long saiApplyId);
+
+    /**
+     * 查询SAI开项管理列表
+     * 
+     * @param tSaiApply SAI开项管理
+     * @return SAI开项管理集合
+     */
+    public List<TEoegSaiApply> selectTSaiApplyList(EoegSaiApplyQueryVO tSaiApply);
+
+    /**
+     * 新增SAI开项管理
+     * 
+     * @param tSaiApply SAI开项管理
+     * @return 结果
+     */
+    public int insertTSaiApply(TEoegSaiApply tSaiApply);
+
+    /**
+     * 修改SAI开项管理
+     * 
+     * @param tSaiApply SAI开项管理
+     * @return 结果
+     */
+    public int updateTSaiApply(TEoegSaiApply tSaiApply);
+
+    /**
+     * 批量删除SAI开项管理
+     * 
+     * @param saiApplyIds 需要删除的SAI开项管理ID
+     * @return 结果
+     */
+    public int deleteTSaiApplyByIds(Long[] saiApplyIds);
+
+    /**
+     * 删除SAI开项管理信息
+     * 
+     * @param saiApplyId SAI开项管理ID
+     * @return 结果
+     */
+    public int deleteTSaiApplyById(Long saiApplyId);
+}

+ 65 - 0
master/src/main/java/com/ruoyi/project/production/service/ITEoegSaiApproveFileService.java

@@ -0,0 +1,65 @@
+package com.ruoyi.project.production.service;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.project.production.domain.TEoegSaiApproveFile;
+import com.ruoyi.project.production.domain.TSaiApproveFile;
+import com.ruoyi.project.sems.domain.TApproverFile;
+
+/**
+ * EOEG SAI审批附件Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-04-06
+ */
+public interface ITEoegSaiApproveFileService extends IService<TEoegSaiApproveFile>
+{
+    /**
+     * 查询SAI审批附件
+     * 
+     * @param id SAI审批附件ID
+     * @return SAI审批附件
+     */
+    public TEoegSaiApproveFile selectTSaiApproveFileById(Long id);
+
+    /**
+     * 查询SAI审批附件列表
+     * 
+     * @param tSaiApproveFile SAI审批附件
+     * @return SAI审批附件集合
+     */
+    public List<TEoegSaiApproveFile> selectTSaiApproveFileList(TEoegSaiApproveFile tSaiApproveFile);
+
+    /**
+     * 新增SAI审批附件
+     * 
+     * @param tSaiApproveFile SAI审批附件
+     * @return 结果
+     */
+    public int insertTSaiApproveFile(TEoegSaiApproveFile tSaiApproveFile);
+
+    /**
+     * 修改SAI审批附件
+     * 
+     * @param tSaiApproveFile SAI审批附件
+     * @return 结果
+     */
+    public int updateTSaiApproveFile(TEoegSaiApproveFile tSaiApproveFile);
+
+    /**
+     * 批量删除SAI审批附件
+     * 
+     * @param ids 需要删除的SAI审批附件ID
+     * @return 结果
+     */
+    public int deleteTSaiApproveFileByIds(Long[] ids);
+
+    /**
+     * 删除SAI审批附件信息
+     * 
+     * @param id SAI审批附件ID
+     * @return 结果
+     */
+    public int deleteTSaiApproveFileById(Long id);
+}

+ 63 - 0
master/src/main/java/com/ruoyi/project/production/service/ITEoegSaiCategoryService.java

@@ -0,0 +1,63 @@
+package com.ruoyi.project.production.service;
+
+import java.util.List;
+
+import com.ruoyi.project.production.domain.TEoegSaiCategory;
+import com.ruoyi.project.production.domain.TSaiCategory;
+
+/**
+ * EOEG SAI类别Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-04-18
+ */
+public interface ITEoegSaiCategoryService 
+{
+    /**
+     * 查询SAI类别
+     * 
+     * @param saiCategoryId SAI类别ID
+     * @return SAI类别
+     */
+    public TEoegSaiCategory selectTSaiCategoryById(Long saiCategoryId);
+
+    /**
+     * 查询SAI类别列表
+     * 
+     * @param tSaiCategory SAI类别
+     * @return SAI类别集合
+     */
+    public List<TEoegSaiCategory> selectTSaiCategoryList(TEoegSaiCategory tSaiCategory);
+
+    /**
+     * 新增SAI类别
+     * 
+     * @param tSaiCategory SAI类别
+     * @return 结果
+     */
+    public int insertTSaiCategory(TEoegSaiCategory tSaiCategory);
+
+    /**
+     * 修改SAI类别
+     * 
+     * @param tSaiCategory SAI类别
+     * @return 结果
+     */
+    public int updateTSaiCategory(TEoegSaiCategory tSaiCategory);
+
+    /**
+     * 批量删除SAI类别
+     * 
+     * @param saiCategoryIds 需要删除的SAI类别ID
+     * @return 结果
+     */
+    public int deleteTSaiCategoryByIds(Long[] saiCategoryIds);
+
+    /**
+     * 删除SAI类别信息
+     * 
+     * @param saiCategoryId SAI类别ID
+     * @return 结果
+     */
+    public int deleteTSaiCategoryById(Long saiCategoryId);
+}

+ 63 - 0
master/src/main/java/com/ruoyi/project/production/service/ITEoegSaiFileService.java

@@ -0,0 +1,63 @@
+package com.ruoyi.project.production.service;
+
+import java.util.List;
+
+import com.ruoyi.project.production.domain.TEoegSaiFile;
+import com.ruoyi.project.production.domain.TSaiFile;
+
+/**
+ * EOEG SAI文件Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-04-06
+ */
+public interface ITEoegSaiFileService 
+{
+    /**
+     * 查询SAI文件
+     * 
+     * @param id SAI文件ID
+     * @return SAI文件
+     */
+    public TEoegSaiFile selectTSaiFileById(Long id);
+
+    /**
+     * 查询SAI文件列表
+     * 
+     * @param tSaiFile SAI文件
+     * @return SAI文件集合
+     */
+    public List<TEoegSaiFile> selectTSaiFileList(TEoegSaiFile tSaiFile);
+
+    /**
+     * 新增SAI文件
+     * 
+     * @param tSaiFile SAI文件
+     * @return 结果
+     */
+    public int insertTSaiFile(TEoegSaiFile tSaiFile);
+
+    /**
+     * 修改SAI文件
+     * 
+     * @param tSaiFile SAI文件
+     * @return 结果
+     */
+    public int updateTSaiFile(TEoegSaiFile tSaiFile);
+
+    /**
+     * 批量删除SAI文件
+     * 
+     * @param ids 需要删除的SAI文件ID
+     * @return 结果
+     */
+    public int deleteTSaiFileByIds(Long[] ids);
+
+    /**
+     * 删除SAI文件信息
+     * 
+     * @param id SAI文件ID
+     * @return 结果
+     */
+    public int deleteTSaiFileById(Long id);
+}

+ 73 - 0
master/src/main/java/com/ruoyi/project/production/service/ITEoegSaiService.java

@@ -0,0 +1,73 @@
+package com.ruoyi.project.production.service;
+
+import java.util.List;
+
+import com.ruoyi.project.production.controller.vo.EoegSaiQueryVO;
+import com.ruoyi.project.production.controller.vo.SaiQueryVO;
+import com.ruoyi.project.production.domain.TEoegSai;
+import com.ruoyi.project.production.domain.TSai;
+
+/**
+ * EOEG SAI信息Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-03-08
+ */
+public interface ITEoegSaiService 
+{
+    /**
+     * 查询SAI信息
+     * 
+     * @param saiId SAI信息ID
+     * @return SAI信息
+     */
+    public TEoegSai selectTSaiById(Long saiId);
+
+    /**
+     * 查询SAI信息列表
+     *
+     * @param tSai SAI信息
+     * @return SAI信息集合
+     */
+    public List<TEoegSai> selectTSaiListByYear(EoegSaiQueryVO tSai);
+
+    /**
+     * 查询SAI信息列表
+     * 
+     * @param tSai SAI信息
+     * @return SAI信息集合
+     */
+    public List<TEoegSai> selectTSaiList(TEoegSai tSai);
+
+    /**
+     * 新增SAI信息
+     * 
+     * @param tSai SAI信息
+     * @return 结果
+     */
+    public int insertTSai(TEoegSai tSai);
+
+    /**
+     * 修改SAI信息
+     * 
+     * @param tSai SAI信息
+     * @return 结果
+     */
+    public int updateTSai(TEoegSai tSai);
+
+    /**
+     * 批量删除SAI信息
+     * 
+     * @param saiIds 需要删除的SAI信息ID
+     * @return 结果
+     */
+    public int deleteTSaiByIds(Long[] saiIds);
+
+    /**
+     * 删除SAI信息信息
+     * 
+     * @param saiId SAI信息ID
+     * @return 结果
+     */
+    public int deleteTSaiById(Long saiId);
+}

+ 285 - 0
master/src/main/java/com/ruoyi/project/production/service/impl/TEoegSaiApplyServiceImpl.java

@@ -0,0 +1,285 @@
+package com.ruoyi.project.production.service.impl;
+
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageHelper;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.spring.SpringUtils;
+import com.ruoyi.framework.security.LoginUser;
+import com.ruoyi.framework.security.service.TokenService;
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.page.PageDomain;
+import com.ruoyi.framework.web.page.TableSupport;
+import com.ruoyi.project.production.controller.vo.EoegSaiApplyQueryVO;
+import com.ruoyi.project.production.controller.vo.SaiApplyQueryVO;
+import com.ruoyi.project.production.domain.TEoegSaiApply;
+import com.ruoyi.project.production.domain.TSaiApply;
+import com.ruoyi.project.production.mapper.TEoegSaiApplyMapper;
+import com.ruoyi.project.production.mapper.TSaiApplyMapper;
+import com.ruoyi.project.production.service.ITEoegSaiApplyService;
+import com.ruoyi.project.production.service.ITSaiApplyService;
+import com.ruoyi.project.system.domain.SysDictData;
+import com.ruoyi.project.system.domain.SysRole;
+import com.ruoyi.project.system.domain.SysUser;
+import com.ruoyi.project.system.mapper.SysDeptMapper;
+import com.ruoyi.project.system.mapper.SysUserMapper;
+import com.ruoyi.project.system.mapper.SysUserRoleMapper;
+import com.ruoyi.project.system.service.ISysDictTypeService;
+import com.ruoyi.project.system.service.ISysUserService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+/**
+ * EOEG SAI开项管理Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-03-15
+ */
+@Service
+public class TEoegSaiApplyServiceImpl implements ITEoegSaiApplyService
+{
+    @Resource
+    private TEoegSaiApplyMapper tSaiApplyMapper;
+
+    @Resource
+    private SysDeptMapper sysDeptMapper;
+
+    @Resource
+    private SysUserMapper sysUserMapper;
+
+    @Resource
+    private ISysDictTypeService iSysDictTypeService;
+
+    @Resource
+    private SysUserRoleMapper userRoleMapper;
+
+    @Resource
+    private ISysUserService userService;
+
+    protected final Logger logger = LoggerFactory.getLogger(BaseController.class);
+
+    /**
+     * 查询SAI开项管理
+     *
+     * @param saiApplyId SAI开项管理ID
+     * @return SAI开项管理
+     */
+    @Override
+    public TEoegSaiApply selectTSaiApplyById(Long saiApplyId)
+    {
+        TEoegSaiApply tSaiApply = tSaiApplyMapper.selectTSaiApplyById(saiApplyId);
+        if (tSaiApply.getApplicant() != null) {
+            tSaiApply.setApplicantName(sysUserMapper.selectUserById(Long.parseLong(tSaiApply.getApplicant())).getNickName());
+        }
+        return tSaiApply;
+    }
+
+    /**
+     * 查询SAI开项管理列表
+     *
+     * @param tSaiApply SAI开项管理
+     * @return SAI开项管理
+     */
+    @Override
+    public List<TEoegSaiApply> selectTSaiApplyList(EoegSaiApplyQueryVO tSaiApply)
+    {
+//        // 当前登录用户userId
+//        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+//        Long userId = loginUser.getUser().getUserId();
+//
+//        List<TSaiApply> result = tSaiApplyMapper.selectTSaiApplyList(tSaiApply);
+//
+//        List<TSaiApply> tSaiApplies = new ArrayList<>();
+//
+//        for (TSaiApply saiApply : result) {
+//            // 待处理:当前用户为流程当前处理人(之一),申请流程未结束
+//            if (tSaiApply.getTab() == 1) {
+//                if (saiApply.getHandler().indexOf(userId.toString()) != -1 && saiApply.getApplyStatus() != 4 && saiApply.getApplyStatus() != 5) {
+//                    tSaiApplies.add(saiApply);
+//                }
+//            }
+//            // 我的:当前用户为登记人、评估人、整改负责人或验证人(之一)
+//            else if (tSaiApply.getTab() == 2) {
+//                if ((saiApply.getApplicant() != null && saiApply.getApplicant().indexOf(userId.toString()) != -1)
+//                     || (saiApply.getAssessor() != null && saiApply.getAssessor().indexOf(userId.toString()) != -1)
+//                     || (saiApply.getExecutor() != null && saiApply.getExecutor().indexOf(userId.toString()) != -1)
+//                     || (saiApply.getInspectors() != null && saiApply.getInspectors().indexOf(userId.toString()) != -1)) {
+//                    tSaiApplies.add(saiApply);
+//                }
+//            }
+//            // 总数据
+//            else if (tSaiApply.getTab() == 3) {
+//                tSaiApplies.add(saiApply);
+//            }
+//        }
+
+        List<TEoegSaiApply> tSaiApplies = tSaiApplyMapper.selectTSaiApplyList(tSaiApply);
+
+        List<SysDictData> staffUnitDict = iSysDictTypeService.selectDictDataByType("STAFF_UNIT");
+
+        ExecutorService executorService = Executors.newFixedThreadPool(20);
+        final CountDownLatch latch = new CountDownLatch(tSaiApplies.size()); //相同线程数量的计数
+
+        for (TEoegSaiApply saiApply : tSaiApplies) {
+            executorService.execute(() -> {
+                try {
+                    String applicantDept = saiApply.getApplicantDept();
+                    String applicant = saiApply.getApplicant();
+                    String handler = saiApply.getHandler();
+                    String executor = saiApply.getExecutor();
+                    if (applicantDept != null) {
+                        for (SysDictData sysDictData : staffUnitDict) {
+                            if (sysDictData.getDictValue().equals(applicantDept)) {
+                                saiApply.setApplicantDeptName(sysDictData.getDictLabel());
+                            }
+                        }
+                    }
+                    if (applicant != null) {
+                        SysUser sysUser = sysUserMapper.selectNickNameById(Long.parseLong(applicant));
+                        if (sysUser!=null) {
+                            String applicantName = sysUser.getNickName();
+                            if (applicantName != null && !"null".equals(applicantName)) {
+                                saiApply.setApplicantName(applicantName);
+                            }
+                        }
+                    }
+                    if (handler != null) {
+                        if (handler.contains(",")) {
+                            String[] split = handler.split(",");
+                            StringBuilder handlerName = new StringBuilder();
+                            for (int i = 0; i < split.length; i++) {
+                                SysUser sysUser = sysUserMapper.selectNickNameById(Long.parseLong(split[i]));
+                                if (sysUser!=null) {
+                                    String name = sysUser.getNickName();
+                                    if (name != null && !"null".equals(name)) {
+                                        handlerName.append(name);
+                                        if (i < split.length - 1) {
+                                            handlerName.append(",");
+                                        }
+                                    }
+                                }
+                            }
+                            saiApply.setHandlerName(handlerName.toString());
+                        } else {
+                            SysUser sysUser = sysUserMapper.selectNickNameById(Long.parseLong(handler));
+                            if (sysUser!=null) {
+                                String handlerName = sysUser.getNickName();
+                                if (handlerName != null && !"null".equals(handlerName)) {
+                                    saiApply.setHandlerName(handlerName);
+                                }
+                            }
+                        }
+                    }
+                    if (executor != null) {
+                        SysUser sysUser = sysUserMapper.selectNickNameById(Long.parseLong(executor));
+                        if (sysUser!=null) {
+                            String executorName = sysUser.getNickName();
+                            if (executorName != null && !"null".equals(executorName)) {
+                                saiApply.setExecutorName(executorName);
+                            }
+                        }
+                    }
+                }catch (Exception e) {
+                    logger.error("e:", e);
+                }finally {
+                    latch.countDown(); //线程计数
+                }
+            });
+        }
+        try {
+            latch.await(); //线程计数完毕后继续执行
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+        executorService.shutdown();
+
+//        boolean specialRole = this.isSpecialRole();
+//        if (specialRole) {  // 当前登录用户是特殊角色
+//            for (TSaiApply saiApply : tSaiApplies) {
+//                long applyStatus = saiApply.getApplyStatus();
+//                if (Long.toString(applyStatus).equals("5")) {   // 申请状态为“已取消”的数据
+//                    tSaiApplies.remove(saiApply);   // 从列表中移除
+//                }
+//            }
+//        }
+
+        return tSaiApplies;
+    }
+
+    /**
+     * 当前登录用户是否为特殊角色(供SAI功能展示使用)
+     *
+     * @return 是否为特殊角色
+     */
+    private boolean isSpecialRole() {
+        boolean isSpecialRole = false;
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        SysUser user = loginUser.getUser();
+        List<SysRole> roles = user.getRoles();
+        for (SysRole role : roles) {
+            Long roleId = role.getRoleId();
+            if (roleId.toString().equals("23140")) {
+                isSpecialRole = true;
+            }
+        }
+        return isSpecialRole;
+    }
+
+    /**
+     * 新增SAI开项管理
+     *
+     * @param tSaiApply SAI开项管理
+     * @return 结果
+     */
+    @Override
+    public int insertTSaiApply(TEoegSaiApply tSaiApply)
+    {
+        tSaiApply.setCreateTime(DateUtils.getNowDate());
+        return tSaiApplyMapper.insertTSaiApply(tSaiApply);
+    }
+
+    /**
+     * 修改SAI开项管理
+     *
+     * @param tSaiApply SAI开项管理
+     * @return 结果
+     */
+    @Override
+    public int updateTSaiApply(TEoegSaiApply tSaiApply)
+    {
+        tSaiApply.setUpdateTime(DateUtils.getNowDate());
+        return tSaiApplyMapper.updateTSaiApply(tSaiApply);
+    }
+
+    /**
+     * 批量删除SAI开项管理
+     *
+     * @param saiApplyIds 需要删除的SAI开项管理ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTSaiApplyByIds(Long[] saiApplyIds)
+    {
+        return tSaiApplyMapper.deleteTSaiApplyByIds(saiApplyIds);
+    }
+
+    /**
+     * 删除SAI开项管理信息
+     *
+     * @param saiApplyId SAI开项管理ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTSaiApplyById(Long saiApplyId)
+    {
+        return tSaiApplyMapper.deleteTSaiApplyById(saiApplyId);
+    }
+}

+ 102 - 0
master/src/main/java/com/ruoyi/project/production/service/impl/TEoegSaiApproveFileServiceImpl.java

@@ -0,0 +1,102 @@
+package com.ruoyi.project.production.service.impl;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.project.production.domain.TEoegSaiApproveFile;
+import com.ruoyi.project.production.mapper.TEoegSaiApproveFileMapper;
+import com.ruoyi.project.production.service.ITEoegSaiApproveFileService;
+import com.ruoyi.project.sems.domain.TApproverFile;
+import com.ruoyi.project.sems.mapper.TApproverFileMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.project.production.mapper.TSaiApproveFileMapper;
+import com.ruoyi.project.production.domain.TSaiApproveFile;
+import com.ruoyi.project.production.service.ITSaiApproveFileService;
+
+/**
+ * SAI审批附件Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-04-06
+ */
+@Service
+public class TEoegSaiApproveFileServiceImpl extends ServiceImpl<TEoegSaiApproveFileMapper, TEoegSaiApproveFile> implements ITEoegSaiApproveFileService
+{
+    @Autowired
+    private TEoegSaiApproveFileMapper tSaiApproveFileMapper;
+
+    /**
+     * 查询SAI审批附件
+     *
+     * @param id SAI审批附件ID
+     * @return SAI审批附件
+     */
+    @Override
+    public TEoegSaiApproveFile selectTSaiApproveFileById(Long id)
+    {
+        return tSaiApproveFileMapper.selectTSaiApproveFileById(id);
+    }
+
+    /**
+     * 查询SAI审批附件列表
+     *
+     * @param tSaiApproveFile SAI审批附件
+     * @return SAI审批附件
+     */
+    @Override
+    public List<TEoegSaiApproveFile> selectTSaiApproveFileList(TEoegSaiApproveFile tSaiApproveFile)
+    {
+        return tSaiApproveFileMapper.selectTSaiApproveFileList(tSaiApproveFile);
+    }
+
+    /**
+     * 新增SAI审批附件
+     *
+     * @param tSaiApproveFile SAI审批附件
+     * @return 结果
+     */
+    @Override
+    public int insertTSaiApproveFile(TEoegSaiApproveFile tSaiApproveFile)
+    {
+        tSaiApproveFile.setCreateTime(DateUtils.getNowDate());
+        return tSaiApproveFileMapper.insertTSaiApproveFile(tSaiApproveFile);
+    }
+
+    /**
+     * 修改SAI审批附件
+     *
+     * @param tSaiApproveFile SAI审批附件
+     * @return 结果
+     */
+    @Override
+    public int updateTSaiApproveFile(TEoegSaiApproveFile tSaiApproveFile)
+    {
+        return tSaiApproveFileMapper.updateTSaiApproveFile(tSaiApproveFile);
+    }
+
+    /**
+     * 批量删除SAI审批附件
+     *
+     * @param ids 需要删除的SAI审批附件ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTSaiApproveFileByIds(Long[] ids)
+    {
+        return tSaiApproveFileMapper.deleteTSaiApproveFileByIds(ids);
+    }
+
+    /**
+     * 删除SAI审批附件信息
+     *
+     * @param id SAI审批附件ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTSaiApproveFileById(Long id)
+    {
+        return tSaiApproveFileMapper.deleteTSaiApproveFileById(id);
+    }
+}

+ 99 - 0
master/src/main/java/com/ruoyi/project/production/service/impl/TEoegSaiCategoryServiceImpl.java

@@ -0,0 +1,99 @@
+package com.ruoyi.project.production.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.project.production.domain.TEoegSaiCategory;
+import com.ruoyi.project.production.mapper.TEoegSaiCategoryMapper;
+import com.ruoyi.project.production.service.ITEoegSaiCategoryService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.project.production.mapper.TSaiCategoryMapper;
+import com.ruoyi.project.production.domain.TSaiCategory;
+import com.ruoyi.project.production.service.ITSaiCategoryService;
+
+/**
+ * SAI类别Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-04-18
+ */
+@Service
+public class TEoegSaiCategoryServiceImpl implements ITEoegSaiCategoryService
+{
+    @Autowired
+    private TEoegSaiCategoryMapper tSaiCategoryMapper;
+
+    /**
+     * 查询SAI类别
+     *
+     * @param saiCategoryId SAI类别ID
+     * @return SAI类别
+     */
+    @Override
+    public TEoegSaiCategory selectTSaiCategoryById(Long saiCategoryId)
+    {
+        return tSaiCategoryMapper.selectTSaiCategoryById(saiCategoryId);
+    }
+
+    /**
+     * 查询SAI类别列表
+     *
+     * @param tSaiCategory SAI类别
+     * @return SAI类别
+     */
+    @Override
+    public List<TEoegSaiCategory> selectTSaiCategoryList(TEoegSaiCategory tSaiCategory)
+    {
+        return tSaiCategoryMapper.selectTSaiCategoryList(tSaiCategory);
+    }
+
+    /**
+     * 新增SAI类别
+     *
+     * @param tSaiCategory SAI类别
+     * @return 结果
+     */
+    @Override
+    public int insertTSaiCategory(TEoegSaiCategory tSaiCategory)
+    {
+        tSaiCategory.setCreateTime(DateUtils.getNowDate());
+        return tSaiCategoryMapper.insertTSaiCategory(tSaiCategory);
+    }
+
+    /**
+     * 修改SAI类别
+     *
+     * @param tSaiCategory SAI类别
+     * @return 结果
+     */
+    @Override
+    public int updateTSaiCategory(TEoegSaiCategory tSaiCategory)
+    {
+        tSaiCategory.setUpdateTime(DateUtils.getNowDate());
+        return tSaiCategoryMapper.updateTSaiCategory(tSaiCategory);
+    }
+
+    /**
+     * 批量删除SAI类别
+     *
+     * @param saiCategoryIds 需要删除的SAI类别ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTSaiCategoryByIds(Long[] saiCategoryIds)
+    {
+        return tSaiCategoryMapper.deleteTSaiCategoryByIds(saiCategoryIds);
+    }
+
+    /**
+     * 删除SAI类别信息
+     *
+     * @param saiCategoryId SAI类别ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTSaiCategoryById(Long saiCategoryId)
+    {
+        return tSaiCategoryMapper.deleteTSaiCategoryById(saiCategoryId);
+    }
+}

+ 97 - 0
master/src/main/java/com/ruoyi/project/production/service/impl/TEoegSaiFileServiceImpl.java

@@ -0,0 +1,97 @@
+package com.ruoyi.project.production.service.impl;
+
+import java.util.List;
+
+import com.ruoyi.project.production.domain.TEoegSaiFile;
+import com.ruoyi.project.production.mapper.TEoegSaiFileMapper;
+import com.ruoyi.project.production.service.ITEoegSaiFileService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.project.production.mapper.TSaiFileMapper;
+import com.ruoyi.project.production.domain.TSaiFile;
+import com.ruoyi.project.production.service.ITSaiFileService;
+
+/**
+ * SAI文件Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-04-06
+ */
+@Service
+public class TEoegSaiFileServiceImpl implements ITEoegSaiFileService
+{
+    @Autowired
+    private TEoegSaiFileMapper tSaiFileMapper;
+
+    /**
+     * 查询SAI文件
+     *
+     * @param id SAI文件ID
+     * @return SAI文件
+     */
+    @Override
+    public TEoegSaiFile selectTSaiFileById(Long id)
+    {
+        return tSaiFileMapper.selectTSaiFileById(id);
+    }
+
+    /**
+     * 查询SAI文件列表
+     *
+     * @param tSaiFile SAI文件
+     * @return SAI文件
+     */
+    @Override
+    public List<TEoegSaiFile> selectTSaiFileList(TEoegSaiFile tSaiFile)
+    {
+        return tSaiFileMapper.selectTSaiFileList(tSaiFile);
+    }
+
+    /**
+     * 新增SAI文件
+     *
+     * @param tSaiFile SAI文件
+     * @return 结果
+     */
+    @Override
+    public int insertTSaiFile(TEoegSaiFile tSaiFile)
+    {
+        return tSaiFileMapper.insertTSaiFile(tSaiFile);
+    }
+
+    /**
+     * 修改SAI文件
+     *
+     * @param tSaiFile SAI文件
+     * @return 结果
+     */
+    @Override
+    public int updateTSaiFile(TEoegSaiFile tSaiFile)
+    {
+        return tSaiFileMapper.updateTSaiFile(tSaiFile);
+    }
+
+    /**
+     * 批量删除SAI文件
+     *
+     * @param ids 需要删除的SAI文件ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTSaiFileByIds(Long[] ids)
+    {
+        return tSaiFileMapper.deleteTSaiFileByIds(ids);
+    }
+
+    /**
+     * 删除SAI文件信息
+     *
+     * @param id SAI文件ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTSaiFileById(Long id)
+    {
+        return tSaiFileMapper.deleteTSaiFileById(id);
+    }
+}

+ 140 - 0
master/src/main/java/com/ruoyi/project/production/service/impl/TEoegSaiServiceImpl.java

@@ -0,0 +1,140 @@
+package com.ruoyi.project.production.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.project.production.controller.vo.EoegSaiQueryVO;
+import com.ruoyi.project.production.controller.vo.SaiQueryVO;
+import com.ruoyi.project.production.domain.TEoegSai;
+import com.ruoyi.project.production.mapper.TEoegSaiMapper;
+import com.ruoyi.project.production.service.ITEoegSaiService;
+import com.ruoyi.project.system.domain.SysDept;
+import com.ruoyi.project.system.mapper.SysDeptMapper;
+import com.ruoyi.project.system.mapper.SysUserMapper;
+import com.ruoyi.project.system.service.ISysDictTypeService;
+import com.ruoyi.project.system.service.impl.SysUserServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.project.production.mapper.TSaiMapper;
+import com.ruoyi.project.production.domain.TSai;
+import com.ruoyi.project.production.service.ITSaiService;
+
+/**
+ * SAI信息Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-03-08
+ */
+@Service
+public class TEoegSaiServiceImpl implements ITEoegSaiService
+{
+    @Autowired
+    private TEoegSaiMapper tSaiMapper;
+
+    @Autowired
+    private SysDeptMapper sysDeptMapper;
+
+    @Autowired
+    private SysUserServiceImpl sysUserService;
+
+    /**
+     * 查询SAI信息
+     *
+     * @param saiId SAI信息ID
+     * @return SAI信息
+     */
+    @Override
+    public TEoegSai selectTSaiById(Long saiId)
+    {
+        return tSaiMapper.selectTSaiById(saiId);
+    }
+
+    /**
+     * 查询SAI信息列表
+     *
+     * @param tSai SAI信息
+     * @return SAI信息
+     */
+    @Override
+    public List<TEoegSai> selectTSaiListByYear(EoegSaiQueryVO tSai)
+    {
+        List<TEoegSai> tSais = tSaiMapper.selectTSaiListByYear(tSai);
+        List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
+        for (TEoegSai sai : tSais) {
+            for (SysDept sysDept : sysDepts) {
+                if (sysDept.getDeptId().toString().equals(sai.getPlantId())) {
+                    sai.setPlantName(sysDept.getDeptName());
+                }
+                if (sysDept.getDeptId().toString().equals(sai.getUserDept())) {
+                    sai.setUserDeptName(sysDept.getDeptName());
+                }
+            }
+            String applicant = sai.getApplicant();
+            if (applicant != null) {
+                sai.setApplicantName(sysUserService.selectUserById(Long.parseLong(applicant)).getNickName());
+            }
+        }
+        return tSais;
+    }
+
+    /**
+     * 查询SAI信息列表
+     *
+     * @param tSai SAI信息
+     * @return SAI信息
+     */
+    @Override
+    public List<TEoegSai> selectTSaiList(TEoegSai tSai)
+    {
+        return tSaiMapper.selectTSaiList(tSai);
+    }
+
+    /**
+     * 新增SAI信息
+     *
+     * @param tSai SAI信息
+     * @return 结果
+     */
+    @Override
+    public int insertTSai(TEoegSai tSai)
+    {
+        tSai.setCreateTime(DateUtils.getNowDate());
+        return tSaiMapper.insertTSai(tSai);
+    }
+
+    /**
+     * 修改SAI信息
+     *
+     * @param tSai SAI信息
+     * @return 结果
+     */
+    @Override
+    public int updateTSai(TEoegSai tSai)
+    {
+        tSai.setUpdateTime(DateUtils.getNowDate());
+        return tSaiMapper.updateTSai(tSai);
+    }
+
+    /**
+     * 批量删除SAI信息
+     *
+     * @param saiIds 需要删除的SAI信息ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTSaiByIds(Long[] saiIds)
+    {
+        return tSaiMapper.deleteTSaiByIds(saiIds);
+    }
+
+    /**
+     * 删除SAI信息信息
+     *
+     * @param saiId SAI信息ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTSaiById(Long saiId)
+    {
+        return tSaiMapper.deleteTSaiById(saiId);
+    }
+}

+ 284 - 0
master/src/main/resources/mybatis/production/TEoegSaiApplyMapper.xml

@@ -0,0 +1,284 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.project.production.mapper.TEoegSaiApplyMapper">
+    
+    <resultMap type="TEoegSaiApply" id="TEoegSaiApplyResult">
+        <result property="saiApplyId"    column="sai_apply_id"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="applyStatus"    column="apply_status"    />
+        <result property="applyStatusString"    column="apply_status_string"    />
+        <result property="apNo"    column="ap_no"    />
+        <result property="processId"    column="process_id"    />
+        <result property="applicant"    column="applicant"    />
+        <result property="assessor"    column="assessor"    />
+        <result property="executor"    column="executor"    />
+        <result property="inspectors"    column="inspectors"    />
+        <result property="applicantDept"    column="applicant_dept"    />
+        <result property="applicantTeam"    column="applicant_team"    />
+        <result property="description"    column="description"    />
+        <result property="unsafeStatus"    column="unsafe_status"    />
+        <result property="unsafeAction"    column="unsafe_action"    />
+        <result property="applyDate"    column="apply_date"    />
+        <result property="taskId"    column="task_id"    />
+        <result property="taskName"    column="task_name"    />
+        <result property="handler"    column="handler"    />
+        <result property="estimateFinishDate"    column="estimate_finish_date"    />
+        <result property="actualFinishDate"    column="actual_finish_date"    />
+        <result property="reaction"    column="reaction"    />
+        <result property="veResult"    column="ve_result"    />
+        <result property="remarks"    column="remarks"    />
+        <result property="veItemOther"    column="ve_item_other"    />
+        <result property="saiLevel"    column="sai_level"    />
+        <result property="category"    column="category"    />
+        <result property="remarksAssess"    column="remarks_assess"    />
+        <result property="remarksExecute"    column="remarks_execute"    />
+        <result property="workArea"    column="work_area"    />
+        <result property="teamCount"    column="team_count"    />
+        <result property="applicantName"    column="applicant_name"    />
+        <result property="applicantCount"    column="applicant_count"    />
+    </resultMap>
+
+    <select id="selectTeamAnalysis" resultMap="TEoegSaiApplyResult">
+        select d.DICT_LABEL as applicant_team, b.act as team_count, b.del_flag
+        from (select a.APPLICANT_TEAM at, count(a.APPLICANT_TEAM) act, del_flag from t_eoeg_sai_apply a
+        where extract(year from a.apply_date) = extract(year from sysdate)
+        group by a.APPLICANT_TEAM, a.del_flag order by a.APPLICANT_TEAM) b
+        left join SYS_DICT_DATA d on d.DICT_VALUE=b.at where d.DICT_TYPE='TEAM_DIVIDE' and d.DICT_LABEL &lt;&gt; 'W' and b.del_flag=0
+    </select>
+
+    <select id="selectPersonalAnalysis" resultMap="TEoegSaiApplyResult">
+        select NICK_NAME as applicant_name, b.act as applicant_count
+        from (select a.APPLICANT at, count(a.APPLICANT) act from t_eoeg_sai_apply a group by a.APPLICANT order by a.APPLICANT) b
+        left join SYS_USER d on d.USER_ID=b.at order by b.act desc
+    </select>
+
+    <sql id="selectTEoegSaiApplyVo">
+        select d.sai_apply_id, d.del_flag, d.create_by, d.create_time, d.update_by, d.update_time, d.dept_id, d.apply_status, d.ap_no, d.process_id,
+        d.applicant, d.assessor, d.executor, d.inspectors, d.applicant_dept, d.applicant_team, d.description,
+        d.unsafe_status, d.unsafe_action, d.apply_date, d.task_id, d.task_name,d.remarks, d.ve_item_other,
+        d.handler, d.estimate_finish_date, d.actual_finish_date, d.reaction, d.ve_result,
+        d.sai_level, d.category, d.remarks_assess, d.remarks_execute, d.work_area
+        from t_eoeg_sai_apply d
+        left join sys_dept s on s.dept_id = d.dept_id
+    </sql>
+
+    <select id="selectTSaiApplyList"
+            parameterType="com.ruoyi.project.production.controller.vo.EoegSaiApplyQueryVO"
+            resultMap="TEoegSaiApplyResult">
+        <include refid="selectTEoegSaiApplyVo"/>
+        <where>
+            <if test="tab == 1">
+                and handler like concat(concat('%', #{currentUser}), '%')
+                and apply_status != 4
+                and apply_status != 5
+            </if>
+            <if test="tab == 2">
+                and (handler like concat(concat('%', #{currentUser}), '%')
+                or assessor like concat(concat('%', #{currentUser}), '%')
+                or executor like concat(concat('%', #{currentUser}), '%')
+                or inspectors like concat(concat('%', #{currentUser}), '%'))
+            </if>
+            <if test="isSpecialRole == true">
+                and apply_status != 5
+            </if>
+            <if test="applyDateStart != null ">and apply_date <![CDATA[>=]]> #{applyDateStart}</if>
+            <if test="applyDateEnd != null">and apply_date <![CDATA[<=]]>#{applyDateEnd}</if>
+            <if test="estimateFinishDateStart != null ">and estimate_finish_date <![CDATA[>=]]> #{estimateFinishDateStart}</if>
+            <if test="estimateFinishDateEnd != null">and estimate_finish_date <![CDATA[<=]]>#{estimateFinishDateEnd}</if>
+            <if test="saiApplyId != null "> and sai_apply_id = #{saiApplyId}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            <if test="applyStatus != null  and applyStatus != ''"> and apply_status = #{applyStatus}</if>
+            <if test="applyStatusString != null  and applyStatusString != ''">
+                and
+                apply_status in
+                <foreach collection="applyStatusString.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="apNo != null  and apNo != ''"> and ap_no = #{apNo}</if>
+            <if test="processId != null  and processId != ''"> and process_id = #{processId}</if>
+            <if test="applicant != null  and applicant != ''"> and applicant = #{applicant}</if>
+            <if test="assessor != null  and assessor != ''"> and assessor = #{assessor}</if>
+            <if test="executor != null  and executor != ''"> and executor = #{executor}</if>
+            <if test="inspectors != null  and inspectors != ''"> and inspectors = #{inspectors}</if>
+            <if test="applicantDept != null  and applicantDept != ''"> and applicant_dept = #{applicantDept}</if>
+            <if test="applicantTeam != null  and applicantTeam != ''"> and applicant_team = #{applicantTeam}</if>
+            <if test="description != null  and description != ''"> and description like concat(concat('%', #{description}), '%') </if>
+            <if test="unsafeStatus != null "> and unsafe_status = #{unsafeStatus}</if>
+            <if test="unsafeAction != null "> and unsafe_action = #{unsafeAction}</if>
+            <if test="applyDate != null "> and apply_date = #{applyDate}</if>
+            <if test="taskId != null  and taskId != ''"> and task_id = #{taskId}</if>
+            <if test="taskName != null  and taskName != ''"> and task_name like concat(concat('%', #{taskName}), '%')</if>
+            <if test="handler != null  and handler != ''"> and handler = #{handler}</if>
+            <if test="estimateFinishDate != null "> and estimate_finish_date = #{estimateFinishDate}</if>
+            <if test="actualFinishDate != null "> and actual_finish_date = #{actualFinishDate}</if>
+            <if test="reaction != null  and reaction != ''"> and reaction = #{reaction}</if>
+            <if test="veResult != null  and veResult != ''"> and ve_result = #{veResult}</if>
+            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
+            <if test="veItemOther != null  and veItemOther != ''"> and ve_item_other = #{veItemOther}</if>
+            <if test="saiLevel != null "> and sai_level = #{saiLevel}</if>
+            <if test="category != null  and category != ''"> and category = #{category}</if>
+            <if test="remarksAssess != null  and remarksAssess != ''"> and remarks_assess = #{remarksAssess}</if>
+            <if test="remarksExecute != null  and remarksExecute != ''"> and remarks_execute = #{remarksExecute}</if>
+            <if test="workArea != null  and workArea != ''"> and instr(#{workArea}, work_area ) > 0 </if>
+            <if test="ids != null and ids.length > 0"> and sai_apply_id in
+                <foreach item="id" collection="ids" open="(" separator="," close=")">
+                    #{id}
+                </foreach>
+            </if>
+            and d.del_flag = 0
+        </where>
+        order by APPLY_DATE asc
+    </select>
+    
+    <select id="selectTSaiApplyById" parameterType="Long" resultMap="TEoegSaiApplyResult">
+        <include refid="selectTEoegSaiApplyVo"/>
+        where sai_apply_id = #{saiApplyId}
+    </select>
+        
+    <insert id="insertTSaiApply" parameterType="TEoegSaiApply">
+        <selectKey keyProperty="saiApplyId" resultType="long" order="BEFORE">
+            SELECT seq_t_sai_apply.NEXTVAL as saiApplyId FROM DUAL
+        </selectKey>
+        insert into t_eoeg_sai_apply
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="saiApplyId != null">sai_apply_id,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="applyStatus != null">apply_status,</if>
+            <if test="apNo != null">ap_no,</if>
+            <if test="processId != null">process_id,</if>
+            <if test="applicant != null">applicant,</if>
+            <if test="assessor != null">assessor,</if>
+            <if test="executor != null">executor,</if>
+            <if test="inspectors != null">inspectors,</if>
+            <if test="applicantDept != null">applicant_dept,</if>
+            <if test="applicantTeam != null">applicant_team,</if>
+            <if test="description != null">description,</if>
+            <if test="unsafeStatus != null">unsafe_status,</if>
+            <if test="unsafeAction != null">unsafe_action,</if>
+            <if test="applyDate != null">apply_date,</if>
+            <if test="taskId != null">task_id,</if>
+            <if test="taskName != null">task_name,</if>
+            <if test="handler != null">handler,</if>
+            <if test="estimateFinishDate != null">estimate_finish_date,</if>
+            <if test="actualFinishDate != null">actual_finish_date,</if>
+            <if test="reaction != null">reaction,</if>
+            <if test="veResult != null">ve_result,</if>
+            <if test="remarks != null">remarks,</if>
+            <if test="veItemOther != null">ve_item_other,</if>
+            <if test="saiLevel != null">sai_level,</if>
+            <if test="category != null">category,</if>
+            <if test="remarksAssess != null">remarks_assess,</if>
+            <if test="remarksExecute != null">remarks_execute,</if>
+            <if test="workArea != null">work_area,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="saiApplyId != null">#{saiApplyId},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="applyStatus != null">#{applyStatus},</if>
+            <if test="apNo != null">#{apNo},</if>
+            <if test="processId != null">#{processId},</if>
+            <if test="applicant != null">#{applicant},</if>
+            <if test="assessor != null">#{assessor},</if>
+            <if test="executor != null">#{executor},</if>
+            <if test="inspectors != null">#{inspectors},</if>
+            <if test="applicantDept != null">#{applicantDept},</if>
+            <if test="applicantTeam != null">#{applicantTeam},</if>
+            <if test="description != null">#{description},</if>
+            <if test="unsafeStatus != null">#{unsafeStatus},</if>
+            <if test="unsafeAction != null">#{unsafeAction},</if>
+            <if test="applyDate != null">#{applyDate},</if>
+            <if test="taskId != null">#{taskId},</if>
+            <if test="taskName != null">#{taskName},</if>
+            <if test="handler != null">#{handler},</if>
+            <if test="estimateFinishDate != null">#{estimateFinishDate},</if>
+            <if test="actualFinishDate != null">#{actualFinishDate},</if>
+            <if test="reaction != null">#{reaction},</if>
+            <if test="veResult != null">#{veResult},</if>
+            <if test="remarks != null">#{remarks},</if>
+            <if test="veItemOther != null">#{veItemOther},</if>
+            <if test="saiLevel != null">#{saiLevel},</if>
+            <if test="category != null">#{category},</if>
+            <if test="remarksAssess != null">#{remarksAssess},</if>
+            <if test="remarksExecute != null">#{remarksExecute},</if>
+            <if test="workArea != null">#{workArea},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTSaiApply" parameterType="TEoegSaiApply">
+        update t_eoeg_sai_apply
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="applyStatus != null">apply_status = #{applyStatus},</if>
+            <if test="apNo != null">ap_no = #{apNo},</if>
+            <if test="processId != null">process_id = #{processId},</if>
+            <if test="applicant != null">applicant = #{applicant},</if>
+            <if test="assessor != null">assessor = #{assessor},</if>
+            <if test="executor != null">executor = #{executor},</if>
+            <if test="inspectors != null">inspectors = #{inspectors},</if>
+            <if test="applicantDept != null">applicant_dept = #{applicantDept},</if>
+            <if test="applicantTeam != null">applicant_team = #{applicantTeam},</if>
+            <if test="description != null">description = #{description},</if>
+            <if test="unsafeStatus != null">unsafe_status = #{unsafeStatus},</if>
+            <if test="unsafeStatus == null">unsafe_status = null,</if>
+            <if test="unsafeAction != null">unsafe_action = #{unsafeAction},</if>
+            <if test="unsafeAction == null">unsafe_action = null,</if>
+            <if test="applyDate != null">apply_date = #{applyDate},</if>
+            <if test="taskId != null">task_id = #{taskId},</if>
+            <if test="taskId == null">task_id = null,</if>
+            <if test="taskName != null">task_name = #{taskName},</if>
+            <if test="taskName == null">task_name = null,</if>
+            <if test="handler != null">handler = #{handler},</if>
+            <if test="estimateFinishDate != null">estimate_finish_date = #{estimateFinishDate},</if>
+            <if test="actualFinishDate != null">actual_finish_date = #{actualFinishDate},</if>
+            <if test="recordNo == null">record_no = null,</if>
+            <if test="reaction != null">reaction = #{reaction},</if>
+            <if test="veItems == null">ve_items = null,</if>
+            <if test="veResult != null">ve_result = #{veResult},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="veItemOther != null">ve_item_other = #{veItemOther},</if>
+            <if test="veItemOther == null">ve_item_other = null,</if>
+            <if test="saiLevel != null">sai_level = #{saiLevel},</if>
+            <if test="category != null">category = #{category},</if>
+            <if test="remarksAssess != null">remarks_assess = #{remarksAssess},</if>
+            <if test="remarksExecute != null">remarks_execute = #{remarksExecute},</if>
+            <if test="workArea != null">work_area = #{workArea},</if>
+        </trim>
+        where sai_apply_id = #{saiApplyId}
+    </update>
+
+    <update id="deleteTSaiApplyById" parameterType="Long">
+        update t_eoeg_sai_apply set del_flag = 2 where sai_apply_id = #{saiApplyId}
+    </update>
+
+    <update id="deleteTSaiApplyByIds" parameterType="String">
+        update t_eoeg_sai_apply set del_flag = 2 where sai_apply_id in
+        <foreach item="saiApplyId" collection="array" open="(" separator="," close=")">
+            #{saiApplyId}
+        </foreach>
+    </update>
+    
+</mapper>

+ 82 - 0
master/src/main/resources/mybatis/production/TEoegSaiApproveFileMapper.xml

@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.project.production.mapper.TEoegSaiApproveFileMapper">
+    
+    <resultMap type="TEoegSaiApproveFile" id="TEoegSaiApproveFileResult">
+        <result property="id"    column="id"    />
+        <result property="approveId"    column="approve_id"    />
+        <result property="fileName"    column="file_name"    />
+        <result property="fileUrl"    column="file_url"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="fileType"    column="file_type"    />
+        <result property="deptName" column="dept_name" />
+    </resultMap>
+
+    <sql id="selectTEoegSaiApproveFileVo">
+        select d.id, d.approve_id, d.file_name, d.file_url, d.create_time, d.file_type from t_eoeg_sai_approve_file d
+    </sql>
+
+    <select id="selectTEoegSaiApproveFileList" parameterType="TEoegSaiApproveFile" resultMap="TEoegSaiApproveFileResult">
+        <include refid="selectTEoegSaiApproveFileVo"/>
+        <where>  
+            <if test="approveId != null "> and approve_id = #{approveId}</if>
+            <if test="fileName != null  and fileName != ''"> and file_name like concat(concat('%', #{fileName}), '%')</if>
+            <if test="fileUrl != null  and fileUrl != ''"> and file_url = #{fileUrl}</if>
+            <if test="fileType != null "> and file_type = #{fileType}</if>
+        </where>
+    </select>
+    
+    <select id="selectTEoegSaiApproveFileById" parameterType="Long" resultMap="TEoegSaiApproveFileResult">
+        <include refid="selectTEoegSaiApproveFileVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertTEoegSaiApproveFile" parameterType="TEoegSaiApproveFile">
+        <selectKey keyProperty="id" resultType="long" order="BEFORE">
+            SELECT seq_t_eoeg_sai_approve_file.NEXTVAL as id FROM DUAL
+        </selectKey>
+        insert into t_eoeg_sai_approve_file
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="approveId != null">approve_id,</if>
+            <if test="fileName != null">file_name,</if>
+            <if test="fileUrl != null">file_url,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="fileType != null">file_type,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="approveId != null">#{approveId},</if>
+            <if test="fileName != null">#{fileName},</if>
+            <if test="fileUrl != null">#{fileUrl},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="fileType != null">#{fileType},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTEoegSaiApproveFile" parameterType="TEoegSaiApproveFile">
+        update t_eoeg_sai_approve_file
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="approveId != null">approve_id = #{approveId},</if>
+            <if test="fileName != null">file_name = #{fileName},</if>
+            <if test="fileUrl != null">file_url = #{fileUrl},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="fileType != null">file_type = #{fileType},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <update id="deleteTEoegSaiApproveFileById" parameterType="Long">
+        delete from  t_eoeg_sai_approve_file where id = #{id}
+    </update>
+
+    <update id="deleteTEoegSaiApproveFileByIds" parameterType="String">
+        delete from t_eoeg_sai_approve_file where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+    
+</mapper>

+ 96 - 0
master/src/main/resources/mybatis/production/TEoegSaiCategoryMapper.xml

@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.project.production.mapper.TEoegSaiCategoryMapper">
+    
+    <resultMap type="TEoegSaiCategory" id="TEoegSaiCategoryResult">
+        <result property="saiCategoryId"    column="sai_category_id"    />
+        <result property="saiCategoryName"    column="sai_category_name"    />
+        <result property="saiCategoryDescription"    column="sai_category_description"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="deptId"    column="dept_id"    />
+    </resultMap>
+
+    <sql id="selectTEoegSaiCategoryVo">
+        select d.sai_category_id, d.sai_category_description, d.sai_category_name, d.del_flag, d.create_by, d.create_time, d.update_by, d.update_time, d.dept_id from t_eoeg_sai_category d
+      left join sys_dept s on s.dept_id = d.dept_id
+    </sql>
+
+    <select id="selectTSaiCategoryList" parameterType="TEoegSaiCategory" resultMap="TEoegSaiCategoryResult">
+        <include refid="selectTEoegSaiCategoryVo"/>
+        <where>  
+            <if test="saiCategoryId != null "> and sai_category_id = #{saiCategoryId}</if>
+            <if test="saiCategoryName != null  and saiCategoryName != ''"> and sai_category_name like concat(concat('%', #{saiCategoryName}), '%')</if>
+            <if test="saiCategoryDescription != null  and saiCategoryDescription != ''"> and sai_category_description like concat(concat('%', #{saiCategoryDescription}), '%')</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            and d.del_flag = 0
+        </where>
+        order by d.sai_category_name asc
+    </select>
+    
+    <select id="selectTSaiCategoryById" parameterType="Long" resultMap="TEoegSaiCategoryResult">
+        <include refid="selectTEoegSaiCategoryVo"/>
+        where sai_category_id = #{saiCategoryId}
+    </select>
+        
+    <insert id="insertTSaiCategory" parameterType="TEoegSaiCategory">
+        <selectKey keyProperty="saiCategoryId" resultType="long" order="BEFORE">
+            SELECT seq_t_eoeg_sai_category.NEXTVAL as saiCategoryId FROM DUAL
+        </selectKey>
+        insert into t_eoeg_sai_category
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="saiCategoryId != null">sai_category_id,</if>
+            <if test="saiCategoryDescription != null">sai_category_description,</if>
+            <if test="saiCategoryName != null">sai_category_name,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="deptId != null">dept_id,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="saiCategoryId != null">#{saiCategoryId},</if>
+            <if test="saiCategoryDescription != null">#{saiCategoryDescription},</if>
+            <if test="saiCategoryName != null">#{saiCategoryName},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="deptId != null">#{deptId},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTSaiCategory" parameterType="TEoegSaiCategory">
+        update t_eoeg_sai_category
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="saiCategoryDescription != null">sai_category_description = #{saiCategoryDescription},</if>
+            <if test="saiCategoryName != null">sai_category_name = #{saiCategoryName},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+        </trim>
+        where sai_category_id = #{saiCategoryId}
+    </update>
+
+    <update id="deleteTSaiCategoryById" parameterType="Long">
+        update t_eoeg_sai_category set del_flag = 2 where sai_category_id = #{saiCategoryId}
+    </update>
+
+    <update id="deleteTSaiCategoryByIds" parameterType="String">
+        update t_eoeg_sai_category set del_flag = 2 where sai_category_id in
+        <foreach item="saiCategoryId" collection="array" open="(" separator="," close=")">
+            #{saiCategoryId}
+        </foreach>
+    </update>
+    
+</mapper>

+ 105 - 0
master/src/main/resources/mybatis/production/TEoegSaiFileMapper.xml

@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.project.production.mapper.TEoegSaiFileMapper">
+    
+    <resultMap type="TEoegSaiFile" id="TEoegSaiFileResult">
+        <result property="id"    column="id"    />
+        <result property="fileName"    column="file_name"    />
+        <result property="fileUrl"    column="file_url"    />
+        <result property="fileType"    column="file_type"    />
+        <result property="devType"    column="dev_type"    />
+        <result property="createrDate"    column="creater_date"    />
+        <result property="createrCode"    column="creater_code"    />
+        <result property="remark"    column="remark"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="deptName" column="dept_name" />
+    </resultMap>
+
+    <sql id="selectTEoegSaiFileVo">
+        select d.id, d.file_name, d.file_url, d.file_type, d.dev_type, d.creater_date, d.creater_code, d.remark, d.dept_id, d.del_flag ,s.dept_name from t_eoeg_sai_file d
+      left join sys_dept s on s.dept_id = d.dept_id
+    </sql>
+
+    <select id="selectTEoegSaiFileList" parameterType="TEoegSaiFile" resultMap="TEoegSaiFileResult">
+        <include refid="selectTEoegSaiFileVo"/>
+        <where>  
+            <if test="fileName != null  and fileName != ''"> and file_name like concat(concat('%', #{fileName}), '%')</if>
+            <if test="fileUrl != null  and fileUrl != ''"> and file_url = #{fileUrl}</if>
+            <if test="fileType != null "> and file_type = #{fileType}</if>
+            <if test="devType != null "> and dev_type = #{devType}</if>
+            <if test="createrDate != null "> and creater_date = #{createrDate}</if>
+            <if test="createrCode != null "> and creater_code = #{createrCode}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+    
+    <select id="selectTEoegSaiFileById" parameterType="Long" resultMap="TEoegSaiFileResult">
+        <include refid="selectTEoegSaiFileVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertTEoegSaiFile" parameterType="TEoegSaiFile">
+        <selectKey keyProperty="id" resultType="long" order="BEFORE">
+            SELECT seq_t_sai_file.NEXTVAL as id FROM DUAL
+        </selectKey>
+        insert into t_eoeg_sai_file
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="fileName != null">file_name,</if>
+            <if test="fileUrl != null">file_url,</if>
+            <if test="fileType != null">file_type,</if>
+            <if test="devType != null">dev_type,</if>
+            <if test="createrDate != null">creater_date,</if>
+            <if test="createrCode != null">creater_code,</if>
+            <if test="remark != null">remark,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="delFlag != null">del_flag,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="fileName != null">#{fileName},</if>
+            <if test="fileUrl != null">#{fileUrl},</if>
+            <if test="fileType != null">#{fileType},</if>
+            <if test="devType != null">#{devType},</if>
+            <if test="createrDate != null">#{createrDate},</if>
+            <if test="createrCode != null">#{createrCode},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTEoegSaiFile" parameterType="TEoegSaiFile">
+        update t_eoeg_sai_file
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="fileName != null">file_name = #{fileName},</if>
+            <if test="fileUrl != null">file_url = #{fileUrl},</if>
+            <if test="fileType != null">file_type = #{fileType},</if>
+            <if test="devType != null">dev_type = #{devType},</if>
+            <if test="createrDate != null">creater_date = #{createrDate},</if>
+            <if test="createrCode != null">creater_code = #{createrCode},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <update id="deleteTEoegSaiFileById" parameterType="Long">
+        update t_eoeg_sai_file set del_flag = 2 where id = #{id}
+    </update>
+
+    <update id="deleteTEoegSaiFileByIds" parameterType="String">
+        update t_eoeg_sai_file set del_flag = 2 where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+    
+</mapper>

+ 147 - 0
master/src/main/resources/mybatis/production/TEoegSaiMapper.xml

@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.project.production.mapper.TEoegSaiMapper">
+    
+    <resultMap type="TEoegSai" id="TEoegSaiResult">
+        <result property="saiId"    column="sai_id"    />
+        <result property="plantId"    column="plant_id"    />
+        <result property="inspectionDate"    column="inspection_date"    />
+        <result property="dificiency"    column="dificiency"    />
+        <result property="saiLevel"    column="sai_level"    />
+        <result property="category"    column="category"    />
+        <result property="actions"    column="actions"    />
+        <result property="userDept"    column="user_dept"    />
+        <result property="source"    column="source"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="deptName" column="dept_name" />
+        <result property="saiApplyId"    column="sai_apply_id"    />
+        <result property="applicant"    column="applicant"    />
+    </resultMap>
+
+    <sql id="selectTEoegSaiVo">
+        select d.sai_id, d.plant_id, d.inspection_date, d.dificiency, d.sai_level, d.category, d.actions, d.user_dept, d.source, d.del_flag, d.create_by, d.create_time, d.update_by, d.update_time ,d.dept_id, d.sai_apply_id, d.applicant, s.dept_name from t_eoeg_sai d
+      left join sys_dept s on s.dept_id = d.dept_id
+    </sql>
+
+    <select id="selectTSaiListByYear" parameterType="com.ruoyi.project.production.controller.vo.SaiQueryVO" resultMap="TEoegSaiResult">
+        <include refid="selectTEoegSaiVo"/>
+        <where>
+            <if test="saiYear != null "> and extract(year from inspection_date) = #{saiYear} </if>
+            <if test="source != null  and source != ''"> and source like concat(concat('%', #{source}), '%') </if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+        order by d.inspection_date asc
+    </select>
+
+    <select id="selectTSaiList" parameterType="TEoegSai" resultMap="TEoegSaiResult">
+        <include refid="selectTEoegSaiVo"/>
+        <where>  
+            <if test="saiId != null "> and sai_id = #{saiId}</if>
+            <if test="plantId != null  and plantId != ''"> and plant_id = #{plantId}</if>
+            <if test="inspectionDate != null "> and inspection_date = #{inspectionDate}</if>
+            <if test="dificiency != null  and dificiency != ''"> and dificiency = #{dificiency}</if>
+            <if test="saiLevel != null "> and sai_level = #{saiLevel}</if>
+            <if test="category != null  and category != ''"> and category = #{category}</if>
+            <if test="actions != null  and actions != ''"> and actions = #{actions}</if>
+            <if test="userDept != null  and userDept != ''"> and user_dept = #{userDept}</if>
+            <if test="source != null  and source != ''"> and source = #{source}</if>
+            <if test="saiApplyId != null "> and sai_apply_id = #{saiApplyId}</if>
+            <if test="applicant != null "> and applicant = #{applicant}</if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+    
+    <select id="selectTSaiById" parameterType="Long" resultMap="TEoegSaiResult">
+        <include refid="selectTEoegSaiVo"/>
+        where sai_id = #{saiId}
+    </select>
+        
+    <insert id="insertTSai" parameterType="TEoegSai">
+        <selectKey keyProperty="saiId" resultType="long" order="BEFORE">
+            SELECT seq_t_eoeg_sai.NEXTVAL as saiId FROM DUAL
+        </selectKey>
+        insert into t_eoeg_sai
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="saiId != null">sai_id,</if>
+            <if test="plantId != null">plant_id,</if>
+            <if test="inspectionDate != null">inspection_date,</if>
+            <if test="dificiency != null">dificiency,</if>
+            <if test="saiLevel != null">sai_level,</if>
+            <if test="category != null">category,</if>
+            <if test="actions != null">actions,</if>
+            <if test="userDept != null">user_dept,</if>
+            <if test="source != null">source,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="saiApplyId != null">sai_apply_id,</if>
+            <if test="applicant != null">applicant,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="saiId != null">#{saiId},</if>
+            <if test="plantId != null">#{plantId},</if>
+            <if test="inspectionDate != null">#{inspectionDate},</if>
+            <if test="dificiency != null">#{dificiency},</if>
+            <if test="saiLevel != null">#{saiLevel},</if>
+            <if test="category != null">#{category},</if>
+            <if test="actions != null">#{actions},</if>
+            <if test="userDept != null">#{userDept},</if>
+            <if test="source != null">#{source},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="saiApplyId != null">#{saiApplyId},</if>
+            <if test="applicant != null">#{applicant},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTSai" parameterType="TEoegSai">
+        update t_eoeg_sai
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="plantId != null">plant_id = #{plantId},</if>
+            <if test="inspectionDate != null">inspection_date = #{inspectionDate},</if>
+            <if test="dificiency != null">dificiency = #{dificiency},</if>
+            <if test="saiLevel != null">sai_level = #{saiLevel},</if>
+            <if test="category != null">category = #{category},</if>
+            <if test="actions != null">actions = #{actions},</if>
+            <if test="userDept != null">user_dept = #{userDept},</if>
+            <if test="source != null">source = #{source},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="saiApplyId != null">sai_apply_id = #{saiApplyId},</if>
+            <if test="applicant != null">applicant = #{applicant},</if>
+        </trim>
+        where sai_id = #{saiId}
+    </update>
+
+    <update id="deleteTSaiById" parameterType="Long">
+        update t_eoeg_sai set del_flag = 2 where sai_id = #{saiId}
+    </update>
+
+    <update id="deleteTSaiByIds" parameterType="String">
+        update t_eoeg_sai set del_flag = 2 where sai_id in
+        <foreach item="saiId" collection="array" open="(" separator="," close=")">
+            #{saiId}
+        </foreach>
+    </update>
+    
+</mapper>

BIN
master/src/main/resources/static/template/production/eoegSai.xlsx


BIN
master/src/main/resources/static/template/production/eoegSaiApply.xlsx


+ 93 - 0
ui/src/api/production/eoegApply.js

@@ -0,0 +1,93 @@
+import request from '@/utils/request'
+
+// 保存并提交申请
+export function saveAndSubmitApply(data) {
+  return request({
+    url: '/production/eoegapply/saveAndSubmitApply',
+    method: 'post',
+    data: data
+  })
+}
+
+// 提交申请
+export function submitApply(saiApplyId) {
+  return request({
+    url: '/production/eoegapply/submit/' + saiApplyId,
+    method: 'put',
+  })
+}
+
+// 申请处理
+export function handleApply(data) {
+  return request({
+    url: '/production/eoegapply/handle',
+    method: 'put',
+    data: data
+  })
+}
+
+// 查询SAI开项管理列表
+export function listApply(query) {
+  return request({
+    url: '/production/eoegapply/list',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getPersonalAnalysis() {
+  return request({
+    url: '/production/eoegapply/personalAnalysis',
+    method: 'get'
+  })
+}
+
+export function getTeamAnalysis() {
+  return request({
+    url: '/production/eoegapply/teamAnalysis',
+    method: 'get'
+  })
+}
+
+// 查询SAI开项管理详细
+export function getApply(saiApplyId) {
+  return request({
+    url: '/production/eoegapply/' + saiApplyId,
+    method: 'get'
+  })
+}
+
+// 新增SAI开项管理
+export function addApply(data) {
+  return request({
+    url: '/production/eoegapply',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改SAI开项管理
+export function updateApply(data) {
+  return request({
+    url: '/production/eoegapply',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除SAI开项管理
+export function delApply(saiApplyId) {
+  return request({
+    url: '/production/eoegapply/' + saiApplyId,
+    method: 'delete'
+  })
+}
+
+// 导出SAI开项管理
+export function exportApply(query) {
+  return request({
+    url: '/production/eoegapply/export',
+    method: 'put',
+    data: query
+  })
+}

+ 61 - 0
ui/src/api/production/eoegCategory.js

@@ -0,0 +1,61 @@
+import request from '@/utils/request'
+
+// 查询SAI类别列表
+export function categoryList() {
+  return request({
+    url: '/production/eoegcategory/categoryList',
+    method: 'get'
+  })
+}
+
+// 查询SAI类别列表
+export function listCategory(query) {
+  return request({
+    url: '/production/eoegcategory/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询SAI类别详细
+export function getCategory(saiCategoryId) {
+  return request({
+    url: '/production/eoegcategory/' + saiCategoryId,
+    method: 'get'
+  })
+}
+
+// 新增SAI类别
+export function addCategory(data) {
+  return request({
+    url: '/production/eoegcategory',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改SAI类别
+export function updateCategory(data) {
+  return request({
+    url: '/production/eoegcategory',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除SAI类别
+export function delCategory(saiCategoryId) {
+  return request({
+    url: '/production/eoegcategory/' + saiCategoryId,
+    method: 'delete'
+  })
+}
+
+// 导出SAI类别
+export function exportCategory(query) {
+  return request({
+    url: '/production/eoegcategory/export',
+    method: 'get',
+    params: query
+  })
+}

+ 78 - 0
ui/src/api/production/eoegSai.js

@@ -0,0 +1,78 @@
+import request from '@/utils/request'
+
+// 计算CTS扣分 / 装置人均扣分
+export function calcScore2ByYear(saiYear) {
+  return request({
+    url: '/production/eoegsai/calcScore2ByYear/' + saiYear,
+    method: 'get'
+  })
+}
+
+// 计算当年装置自查人均扣分
+export function calcScoreByYear(saiYear) {
+  return request({
+    url: '/production/eoegsai/calcScoreByYear/' + saiYear,
+    method: 'get'
+  })
+}
+
+// 查询SAI信息列表
+export function listSaiByYear(query) {
+  return request({
+    url: '/production/eoegsai/listByYear',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询SAI信息列表
+export function listSai(query) {
+  return request({
+    url: '/production/eoegsai/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询SAI信息详细
+export function getSai(saiId) {
+  return request({
+    url: '/production/eoegsai/' + saiId,
+    method: 'get'
+  })
+}
+
+// 新增SAI信息
+export function addSai(data) {
+  return request({
+    url: '/production/eoegsai',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改SAI信息
+export function updateSai(data) {
+  return request({
+    url: '/production/eoegsai',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除SAI信息
+export function delSai(saiId) {
+  return request({
+    url: '/production/eoegsai/' + saiId,
+    method: 'delete'
+  })
+}
+
+// 导出SAI信息
+export function exportSai(query) {
+  return request({
+    url: '/production/eoegsai/export',
+    method: 'get',
+    params: query
+  })
+}

+ 53 - 0
ui/src/api/production/eoegSaiApproveFile.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询SAI审批附件列表
+export function listFile(query) {
+  return request({
+    url: '/production/eoegSaiApproveFile/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询SAI审批附件详细
+export function getFile(id) {
+  return request({
+    url: '/production/eoegSaiApproveFile/' + id,
+    method: 'get'
+  })
+}
+
+// 新增SAI审批附件
+export function addFile(data) {
+  return request({
+    url: '/production/eoegSaiApproveFile',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改SAI审批附件
+export function updateFile(data) {
+  return request({
+    url: '/production/eoegSaiApproveFile',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除SAI审批附件
+export function delFile(id) {
+  return request({
+    url: '/production/eoegSaiApproveFile/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出SAI审批附件
+export function exportFile(query) {
+  return request({
+    url: '/production/eoegSaiApproveFile/export',
+    method: 'get',
+    params: query
+  })
+}

+ 53 - 0
ui/src/api/production/eoegSaiFile.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询SAI审批附件列表
+export function listFile(query) {
+  return request({
+    url: '/production/eoegSaiFile/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询SAI审批附件详细
+export function getFile(id) {
+  return request({
+    url: '/production/eoegSaiFile/' + id,
+    method: 'get'
+  })
+}
+
+// 新增SAI审批附件
+export function addFile(data) {
+  return request({
+    url: '/production/eoegSaiFile',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改SAI审批附件
+export function updateFile(data) {
+  return request({
+    url: '/production/eoegSaiFile',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除SAI审批附件
+export function delFile(id) {
+  return request({
+    url: '/production/eoegSaiFile/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出SAI审批附件
+export function exportFile(query) {
+  return request({
+    url: '/production/eoegSaiFile/export',
+    method: 'get',
+    params: query
+  })
+}

+ 0 - 12
ui/src/views/production/apply/index.vue

@@ -44,18 +44,6 @@ export default {
         this.isFirst = false
         this.isSecond = false
         this.isThird = true
-      }else if (tab.name === 'fourth') {
-        this.isFirst = false
-        this.isSecond = false
-        this.isThird = false
-      }else if (tab.name === 'fifth') {
-        this.isFirst = false
-        this.isSecond = false
-        this.isThird = false
-      }else if (tab.name === 'sixth') {
-        this.isFirst = false
-        this.isSecond = false
-        this.isThird = false
       }
     },
   }

+ 2059 - 0
ui/src/views/production/eoegapply/all/index.vue

@@ -0,0 +1,2059 @@
+<template>
+  <div class="app-container">
+    <!-- 搜索条件 -->
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="登记人部门" prop="applicantDept">
+        <el-form-item prop="applicantDept">
+          <el-select
+            clearable
+            v-model="queryParams.applicantDept"
+            placeholder="请选择部门">
+            <el-option
+              v-for="dict in applicantDeptOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form-item>
+      <el-form-item label="登记人班组" prop="applicantTeam">
+        <el-form-item prop="applicantTeam">
+          <el-select
+            clearable
+            v-model="queryParams.applicantTeam"
+            placeholder="请选择班组">
+            <el-option
+              v-for="dict in applicantTeamOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form-item>
+      <el-form-item label="不安全状态" prop="unsafeStatus">
+        <el-select v-model="queryParams.unsafeStatus" placeholder="请选择不安全状态" clearable>
+          <el-option
+            v-for="dict in unsafeStatusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="不安全行为" prop="unsafeAction">
+        <el-select v-model="queryParams.unsafeAction" placeholder="请选择不安全行为" clearable>
+          <el-option
+            v-for="dict in unsafeActionOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="申请状态" prop="applyStatus">
+        <el-select v-model="applyStatusString" placeholder="请选择申请状态" multiple>
+          <el-option
+            v-for="dict in applyStatusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="问题描述" prop="description">
+        <el-input
+          v-model="queryParams.description"
+          placeholder="请输入问题描述"
+          clearable
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="登记时间" prop="applyDate">
+        <el-date-picker
+          v-model="applyDateRange"
+          type="daterange"
+          align="right"
+          unlink-panels
+          :range-separator="$t('至')"
+          :start-placeholder="$t('开始日期')"
+          :end-placeholder="$t('结束日期')"
+          value-format="yyyy-MM-dd">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="预计完成时间" prop="estimateFinishDate">
+        <el-date-picker
+          v-model="estimateFinishDateRange"
+          type="daterange"
+          align="right"
+          unlink-panels
+          :range-separator="$t('至')"
+          :start-placeholder="$t('开始日期')"
+          :end-placeholder="$t('结束日期')"
+          value-format="yyyy-MM-dd">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item prop="workArea" label="片区">
+        <el-select
+          clearable
+          multiple
+          v-model="queryParams.workArea"
+          placeholder="请选择片区">
+          <el-option
+            v-for="dict in workAreaList"
+            :key="dict"
+            :label="dict"
+            :value="dict"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <!-- 操作按钮 -->
+    <el-row :gutter="10" class="mb8" style="margin-bottom: 0px;">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['production:apply:add']"
+        >新增申请单</el-button>
+      </el-col>
+      <!--<el-col :span="1.5">-->
+          <!--<el-button-->
+                  <!--type="info"-->
+                  <!--icon="el-icon-upload2"-->
+                  <!--size="mini"-->
+                  <!--@click="handleImport"-->
+                  <!--v-hasPermi="['production:apply:edit']"-->
+          <!--&gt;导入</el-button>-->
+      <!--</el-col>-->
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['production:apply:export']"
+        >导出全部</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExportSelected"
+          v-hasPermi="['production:apply:export']"
+        >导出选中数据</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          size="mini"
+          @click="handleAddSai"
+          v-hasPermi="['production:sai:add']"
+        >统计至SAI检查台账</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          size="mini"
+          @click="handleAnalysis"
+          v-hasPermi="['production:sai:list']"
+        >趋势分析</el-button>
+      </el-col>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+    <!-- 各班组当年至今的提交数量 -->
+    <el-descriptions title="" direction="vertical" :column="4" border style="margin-bottom: 20px;">
+      <el-descriptions-item label="A班">
+        <el-tag size="small">{{countA}}</el-tag>
+      </el-descriptions-item>
+      <el-descriptions-item label="B班">
+        <el-tag size="small">{{countB}}</el-tag>
+      </el-descriptions-item>
+      <el-descriptions-item label="C班">
+        <el-tag size="small">{{countC}}</el-tag>
+      </el-descriptions-item>
+      <el-descriptions-item label="D班">
+        <el-tag size="small">{{countD}}</el-tag>
+      </el-descriptions-item>
+    </el-descriptions>
+    <!-- 总表 -->
+    <el-table v-loading="loading" :data="applyList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="问题描述" align="center" prop="description" :show-overflow-tooltip="true" width="200"/>
+      <el-table-column label="片区" align="center" prop="workArea" :show-overflow-tooltip="true"/>
+      <el-table-column label="申请状态" align="center" prop="applyStatus" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span v-if="scope.row.applyStatus == 0"><el-tag type="info">未提交</el-tag></span>
+          <span v-if="scope.row.applyStatus == 1"><el-tag type="warning">待评估</el-tag></span>
+          <span v-if="scope.row.applyStatus == 2"><el-tag type="warning">进行中</el-tag></span>
+          <span v-if="scope.row.applyStatus == 3"><el-tag type="warning">待验收</el-tag></span>
+          <span v-if="scope.row.applyStatus == 4"><el-tag type="success">已完成</el-tag></span>
+          <span v-if="scope.row.applyStatus == 5"><el-tag type="info">已取消</el-tag></span>
+        </template>
+      </el-table-column>
+      <el-table-column label="登记人部门" align="center" prop="applicantDeptName" :show-overflow-tooltip="true"/>
+      <el-table-column label="登记人班组" align="center" prop="applicantTeam" :show-overflow-tooltip="true" :formatter="teamFormat"/>
+      <el-table-column label="登记人" align="center" prop="applicantName" :show-overflow-tooltip="true"/>
+      <el-table-column label="当前处理人" align="center" prop="handlerName" :show-overflow-tooltip="true"/>
+      <el-table-column label="整改负责人" align="center" prop="executorName" :show-overflow-tooltip="true"/>
+      <el-table-column label="登记时间" align="center" prop="applyDate" width="100" sortable>
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.applyDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="预计完成时间" align="center" prop="estimateFinishDate" width="100" sortable>
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.estimateFinishDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="实际完成时间" align="center" prop="actualFinishDate" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.actualFinishDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="是否录入开项系统" align="center" prop="isRecorded" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span>{{ scope.row.isRecorded == 1 ? "是" : "否" }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="开项编号" align="center" prop="recordNo" :show-overflow-tooltip="true"/>
+      <el-table-column label="SAI级别" align="center" prop="saiLevel" :show-overflow-tooltip="true"/>
+      <el-table-column label="SAI类别" align="center" prop="category" :show-overflow-tooltip="true" :formatter="saiCategoryFormat"/>
+      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <!-- 申请已提交操作 -->
+          <!-- 申请状态为进行中/待验收 -->
+          <!-- 当前登录用户为张力飞 -->
+          <el-button
+            size="mini"
+            type="text"
+            @click="handleDelay(scope.row)"
+            v-if="(scope.row.applyStatus == 2 || scope.row.applyStatus == 3)
+            && loginStaffInfo.userId == '20276'"
+          >延期</el-button>
+          <!-- 申请状态为待评估/进行中/待验收 -->
+          <!-- 当前登录用户为处理人(之一)或张力飞 -->
+          <el-button
+            size="mini"
+            type="text"
+            @click="handleDetail(scope.row)"
+            icon="el-icon-edit-outline"
+            v-if="(scope.row.applyStatus == 1 || scope.row.applyStatus == 2 || scope.row.applyStatus == 3)
+            && ((scope.row.handler.indexOf(loginStaffInfo.userId) != -1) || loginStaffInfo.userId == '20276')"
+          >处理</el-button>
+          <!-- 申请状态为已完成/已中止-->
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="handleDetail(scope.row)"
+            v-if="scope.row.applyStatus == 4 || scope.row.applyStatus == 5"
+          >详情</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            @click="processImg(scope.row.processId)"
+            v-if="scope.row.applyStatus != 0"
+          >{{ $t('流程图') }}</el-button>
+          <!-- 申请未提交操作 -->
+          <!-- 申请状态为未提交 -->
+          <!-- 当前登录用户为处理人(之一) -->
+          <span v-if="scope.row.applyStatus == 0 && scope.row.handler.indexOf(loginStaffInfo.userId) != -1">
+            <el-button
+              size="mini"
+              type="text"
+              @click="handleSubmit(scope.row)"
+              v-hasPermi="['production:apply:edit']"
+              icon="el-icon-s-claim"
+            >提交申请</el-button>
+            <!--<el-button-->
+              <!--size="mini"-->
+              <!--type="text"-->
+              <!--icon="el-icon-document"-->
+              <!--@click="handleDoc(scope.row)"-->
+            <!--&gt;上传附件</el-button>-->
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-edit"
+              @click="handleUpdate(scope.row)"
+              v-hasPermi="['production:apply:edit']"
+            >修改</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDelete(scope.row)"
+              v-hasPermi="['production:apply:remove']"
+            >删除</el-button>
+          </span>
+          <span v-if="(scope.row.applyStatus == 1
+                      || scope.row.applyStatus == 2
+                      || scope.row.applyStatus == 3
+                      || scope.row.applyStatus == 4)
+                      && (loginStaffInfo.isMonitor || loginStaffInfo.userId == '20276')">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-edit"
+              @click="handleUpdate2(scope.row)"
+              v-hasPermi="['production:apply:edit']"
+            >修改</el-button>
+          </span>
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 分页 -->
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+    <!-- 添加或修改SAI开项管理对话框 -->
+    <el-dialog  :close-on-click-modal="false" :title="title" :visible.sync="open" width="60%" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="0px">
+        <el-descriptions title="" :column="3" border>
+          <el-descriptions-item label="登记人部门">
+            <el-form-item prop="applicantDept">
+              <el-select
+                filterable
+                clearable
+                v-model="form.applicantDept"
+                @change="handleDeptOrTeamChange"
+                placeholder="请选择部门">
+                <el-option
+                  v-for="dict in applicantDeptOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="登记人班组">
+            <el-form-item prop="applicantTeam">
+              <el-select
+                filterable
+                clearable
+                v-model="form.applicantTeam"
+                @change="handleDeptOrTeamChange"
+                :disabled="applicantTeamDisabled"
+                placeholder="请选择班组">
+                <el-option
+                  v-for="dict in applicantTeamOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="登记人">
+            <el-form-item prop="applicant">
+              <el-select
+                filterable
+                clearable
+                v-model="form.applicant"
+                placeholder="请选择登记人">
+                <el-option
+                  v-for="dict in applicantOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="问题描述" :span="3">
+            <el-form-item prop="description">
+              <el-input v-model="form.description" placeholder="请输入问题描述" type="textarea" :rows="3" />
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="SAI级别" :span="1">
+            <el-form-item prop="saiLevel">
+              <el-select v-model="form.saiLevel" placeholder="请选择SAI级别" @change="handleSaiLevelChange">
+                <el-option key="1" label="1" value="1"></el-option>
+                <el-option key="2" label="2" value="2"></el-option>
+                <el-option key="3" label="3" value="3"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="SAI类别" :span="1">
+            <el-form-item prop="category">
+              <el-select
+                @change="handleSaiCategoryChange"
+                filterable
+                clearable
+                v-model="form.category"
+                placeholder="请选择SAI类别">
+                <el-option
+                  v-for="dict in saiCategoryOptions2"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="片区" :span="1">
+            <el-form-item prop="workArea">
+              <el-select
+                @change="handleSaiCategoryChange"
+                filterable
+                clearable
+                v-model="form.workArea"
+                placeholder="请选择片区">
+                <el-option
+                  v-for="dict in workAreaList"
+                  :key="dict"
+                  :label="dict"
+                  :value="dict"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="隐患" :span="3">
+            <el-radio v-model="unsafeChoice" label="1" @change="handleUnsafeChoiceChange" style="margin-right: 10px;">不安全状态</el-radio>
+            <el-form-item prop="unsafeStatus" style="display: inline-block;">
+              <el-select v-model="form.unsafeStatus" filterable placeholder="请选择不安全状态" :disabled="unsafeStatusDisabled" style="margin-right: 20px;" clearable>
+                <el-option
+                  v-for="dict in unsafeStatusOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-radio v-model="unsafeChoice" label="2" @change="handleUnsafeChoiceChange" style="margin-right: 10px;">不安全行为</el-radio>
+            <el-form-item prop="unsafeAction" style="display: inline-block;">
+              <el-select v-model="form.unsafeAction" filterable placeholder="请选择不安全行为" :disabled="unsafeActionDisabled" clearable>
+                <el-option
+                  v-for="dict in unsafeActionOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="附件" :span="3">
+            <el-form-item label="" prop="fileUrl">
+              <el-upload
+                ref="doc"
+                :limit="5"
+                :headers="doc.headers"
+                :action="doc.url"
+                :disabled="doc.isUploading"
+                :on-progress="handleFileDocProgress"
+                :on-success="handleFileDocSuccess"
+                :on-remove="handleRemove"
+                :auto-upload="true"
+                :file-list="fileList"
+                drag
+              >
+                <i class="el-icon-upload"></i>
+                <div class="el-upload__text">
+                  {{ $t('将文件拖到此处,或') }}
+                  <em>{{ $t('点击上传') }}</em>
+                </div>
+              </el-upload>
+            </el-form-item>
+            <el-table :data="doc.commonfileListApply" border v-if="form.saiApplyId">
+              <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+                <template slot-scope="scope">
+                  <a  class="link-type"  @click="handleDownload(scope.row)">
+                    <span>{{ scope.row.fileName }}</span>
+                  </a>
+                </template>
+              </el-table-column>
+              <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
+                <template slot-scope="scope">
+                  <el-button
+                    v-if="scope.row.fileName.endsWith('pdf')||scope.row.fileName.endsWith('xlsx')||scope.row.fileName.endsWith('md')
+                 ||scope.row.fileName.endsWith('docx')||scope.row.fileName.endsWith('doc')||scope.row.fileName.endsWith('txt')
+                 ||scope.row.fileName.endsWith('jpg')||scope.row.fileName.endsWith('png')||scope.row.fileName.endsWith('csv')
+                 ||scope.row.fileName.endsWith('mp4')||scope.row.fileName.endsWith('svg')||scope.row.fileName.endsWith('dwg')
+                 ||scope.row.fileName.endsWith('flv')||scope.row.fileName.endsWith('swf')||scope.row.fileName.endsWith('gif')
+                 ||scope.row.fileName.endsWith('3gp')||scope.row.fileName.endsWith('mkv')||scope.row.fileName.endsWith('tif')"
+                    size="mini"
+                    type="text"
+                    icon="el-icon-view"
+                    @click="handleSee(scope.row)"
+                  > {{ $t('预览') }}</el-button>
+                  <el-button
+                    v-if="scope.row.fileName.endsWith('ppt')||scope.row.fileName.endsWith('pptx') "
+                    size="mini"
+                    type="text"
+                    icon="el-icon-view"
+                    @click="handleSeePPT(scope.row)"
+                  > {{ $t('ppt预览') }}</el-button>
+                  <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-download"
+                    @click="handleDownload(scope.row)"
+                  >{{ $t('下载') }}</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </el-descriptions-item>
+          <el-descriptions-item label="登记时间">
+            <el-form-item prop="applyDate">
+              <el-date-picker
+                size="small"
+                style="width: 200px"
+                v-model="form.applyDate"
+                type="date"
+                value-format="yyyy-MM-dd"
+                placeholder="选择登记时间">
+              </el-date-picker>
+            </el-form-item>
+          </el-descriptions-item>
+        </el-descriptions>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="handleSaveAndSubmit" :disabled="submitDisabled">提 交</el-button>
+        <el-button @click="submitForm" :disabled="submitDisabled">保 存</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog  :close-on-click-modal="false" :title="title" :visible.sync="open2" width="60%" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="0px">
+        <el-descriptions title="" :column="3" border>
+          <el-descriptions-item label="SAI级别" :span="1">
+            <el-form-item prop="saiLevel">
+              <el-select v-model="form.saiLevel" placeholder="请选择SAI级别" @change="handleSaiLevelChange">
+                <el-option key="1" label="1" value="1"></el-option>
+                <el-option key="2" label="2" value="2"></el-option>
+                <el-option key="3" label="3" value="3"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="SAI类别" :span="1">
+            <el-form-item prop="category">
+              <el-select
+                @change="handleSaiCategoryChange"
+                filterable
+                clearable
+                v-model="form.category"
+                placeholder="请选择SAI类别">
+                <el-option
+                  v-for="dict in saiCategoryOptions2"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+        </el-descriptions>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="submitForm">保 存</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 延期对话框 -->
+    <el-dialog  :close-on-click-modal="false" :title="title" :visible.sync="delayOpen" width="25%" append-to-body>
+      <el-form ref="delayForm" :model="delayForm" :rules="delayRules" label-width="136px">
+          <el-form-item prop="estimateFinishDate" label="预计完成时间">
+            <el-date-picker
+              clearable
+              size="small"
+              style="width: 200px"
+              v-model="delayForm.estimateFinishDate"
+              type="date"
+              value-format="yyyy-MM-dd"
+              placeholder="选择预计完成时间">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item prop="isRecorded" label="是否录入开项系统">
+            <el-radio v-model="delayForm.isRecorded" label="1" @change="handleIsRecordedChange">是</el-radio>
+            <el-radio v-model="delayForm.isRecorded" label="0" @change="handleIsRecordedChange">否</el-radio>
+          </el-form-item>
+          <el-form-item prop="recordNo" label="开项编号">
+            <el-input v-model="delayForm.recordNo" placeholder="请输入开项编号" :disabled="recordNoDisabled"/>
+          </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitDelayForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 用户导入对话框 -->
+    <el-dialog  :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+          <el-upload
+                  ref="upload"
+                  :limit="1"
+                  accept=".xlsx, .xls"
+                  :headers="upload.headers"
+                  :action="upload.url"
+                  :disabled="upload.isUploading"
+                  :on-progress="handleFileUploadProgress"
+                  :on-success="handleFileSuccess"
+                  :auto-upload="false"
+                  drag
+          >
+              <i class="el-icon-upload"></i>
+              <div class="el-upload__text">
+                  将文件拖到此处,或
+                  <em>点击上传</em>
+              </div>
+              <div class="el-upload__tip" slot="tip">
+                  <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</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">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+          </el-upload>
+          <div slot="footer" class="dialog-footer">
+              <el-button type="primary" @click="submitFileForm">确 定</el-button>
+              <el-button @click="upload.open = false">取 消</el-button>
+          </div>
+      </el-dialog>
+    <!-- SAI开项管理流转详情对话框 -->
+    <sai-apply-detail v-if="saiApplyVisible" ref="saiApplyDetail" @refreshDataList="getList"></sai-apply-detail>
+    <!-- 流程图对话框 -->
+    <process-img v-if="processImgVisible" ref="processImg" @refreshDataList="getList"></process-img>
+    <!-- 附件对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="700px" append-to-body>
+      <el-upload
+        ref="doc"
+        :limit="50"
+        :headers="doc.headers"
+        :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
+        :disabled="doc.isUploading"
+        :on-progress="handleFileDocProgress"
+        :on-success="handleFileDocSuccess"
+        :auto-upload="true"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+      </el-upload>
+      <el-table :data="doc.commonfileList" border>
+        <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <a  class="link-type"  @click="handleDownload(scope.row)">
+              <span>{{ scope.row.fileName }}</span>
+            </a>
+          </template>
+        </el-table-column>
+        <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
+        <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
+        <el-table-column :label="$t('上传时间')" align="center" prop="createdate" :show-overflow-tooltip="true" width="120"/>
+        <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              v-if="scope.row.fileName.endsWith('pdf')||scope.row.fileName.endsWith('xlsx')||scope.row.fileName.endsWith('md')
+                 ||scope.row.fileName.endsWith('docx')||scope.row.fileName.endsWith('doc')||scope.row.fileName.endsWith('txt')
+                 ||scope.row.fileName.endsWith('jpg')||scope.row.fileName.endsWith('png')||scope.row.fileName.endsWith('csv')
+                 ||scope.row.fileName.endsWith('mp4')||scope.row.fileName.endsWith('svg')||scope.row.fileName.endsWith('dwg')
+                 ||scope.row.fileName.endsWith('flv')||scope.row.fileName.endsWith('swf')||scope.row.fileName.endsWith('gif')
+                 ||scope.row.fileName.endsWith('3gp')||scope.row.fileName.endsWith('mkv')||scope.row.fileName.endsWith('tif')"
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSee(scope.row)"
+            > {{ $t('预览') }}</el-button>
+            <el-button
+              v-if="scope.row.fileName.endsWith('ppt')||scope.row.fileName.endsWith('pptx') "
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSeePPT(scope.row)"
+            > {{ $t('ppt预览') }}</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-download"
+              @click="handleDownload(scope.row)"
+            >{{ $t('下载') }}</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteDoc(scope.row)"
+            >{{ $t('删除') }}</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
+    <!-- 统计至SAI检查台账对话框 -->
+    <el-dialog  :close-on-click-modal="false" title="统计至SAI检查台账" :visible.sync="saiOpen" width="80%" append-to-body>
+      <el-table v-loading="loading" :data="saiList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column label="检查的装置/设施" align="center" prop="plantId" :show-overflow-tooltip="true"/>
+        <el-table-column label="检查日期/时间" align="center" prop="inspectionDate">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.inspectionDate, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="识别出的安全问题" align="center" prop="dificiency" :show-overflow-tooltip="true"/>
+        <el-table-column label="SAI级别" align="center" prop="saiLevel" :show-overflow-tooltip="true" width="100">
+          <template slot-scope="scope">
+            <el-select v-model="scope.row.saiLevel" placeholder="请选择">
+              <el-option key="1" label="1" value="1"></el-option>
+              <el-option key="2" label="2" value="2"></el-option>
+              <el-option key="3" label="3" value="3"></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column label="SAI类别" align="center" prop="category" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <el-select
+              filterable
+              clearable
+              v-model="scope.row.category"
+              placeholder="请选择SAI类别">
+              <el-option
+                v-for="dict in saiCategoryOptions2"
+                :key="dict.dictValue"
+                :label="dict.dictLabel"
+                :value="dict.dictValue"
+              ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column label="采取或要采取的措施" align="center" prop="actions" :show-overflow-tooltip="true"/>
+        <el-table-column label="用户" align="center" prop="userDeptId" :show-overflow-tooltip="true"/>
+        <el-table-column label="数据来源" align="center" prop="source" :show-overflow-tooltip="true"/>
+        <el-table-column label="检查人" align="center" prop="applicantName" :show-overflow-tooltip="true"/>
+      </el-table>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitSaiForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 预览对话框 -->
+    <el-dialog  :close-on-click-modal="false"  v-loading="loadingFlash"     element-loading-background="rgba(0,0,0,0.2)"                 v-dialogDrag :title="pdf.title" :visible.sync="pdf.open"  width="1300px" :center="true" 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" >
+        <iframe id="iFrame" class="iframe-html" :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px" v-if="ppt"></iframe>
+      </div>
+      <div style="padding: 30px; width: 100%; height: 100%;" >
+        <el-carousel class="" ref="carousel"  arrow="always"  v-if="pptView"
+                     height="700px"  trigger="click" :autoplay="false" indicator-position="outside">
+          <el-carousel-item class="lun_img" v-for="item in imgs" v-bind:key="item" >
+            <img :src="item" width="100%" height="100%" object-fit="cover" />
+          </el-carousel-item>
+        </el-carousel>
+      </div>
+    </el-dialog>
+    <!-- 趋势分析对话框 -->
+    <el-dialog  :close-on-click-modal="false" @close="disposeChart" title="趋势分析" :visible.sync="analysisOpen" width="80%" append-to-body>
+      <el-row>
+        <el-col :span="12">
+          <h3 style="text-align: center; margin-bottom: 15px;">四个班组当年提交的SAI数量</h3>
+          <div id="chart1" style="width:100%; height: 400px; display: inline-block;"></div>
+        </el-col>
+        <el-col :span="12">
+          <h3 style="text-align: center; margin-bottom: 15px;">个人提交数量数据分析图</h3>
+          <div id="chart2" style="width:100%; height: 400px; display: inline-block;"></div>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="12" style="padding-left: 20px; padding-right: 20px;">
+          <h3 style="text-align: center; margin-bottom: 15px;">各班组当年至今的提交数量</h3>
+          <el-table
+            :data="tableList1"
+            style="width: 100%"
+            border>
+            <el-table-column
+              prop="name"
+              label="班组">
+            </el-table-column>
+            <el-table-column
+              prop="value"
+              label="提交数量">
+            </el-table-column>
+          </el-table>
+        </el-col>
+        <el-col :span="12" style="padding-left: 20px; padding-right: 20px;">
+          <h3 style="text-align: center; margin-bottom: 15px;">个人提交排名前六的人名和提交数</h3>
+          <el-table
+            :data="tableList2"
+            style="width: 100%"
+            border>
+            <el-table-column
+              prop="index"
+              label="排名">
+            </el-table-column>
+            <el-table-column
+              prop="name"
+              label="人名">
+            </el-table-column>
+            <el-table-column
+              prop="value"
+              label="提交数">
+            </el-table-column>
+          </el-table>
+        </el-col>
+      </el-row>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import { saveAndSubmitApply, submitApply, listApply, getApply, delApply, addApply, updateApply, exportApply, importTemplate, getTeamAnalysis} from "@/api/production/eoegApply";
+  import { addSai } from "@/api/production/eoegSai";
+  import { treeselect, listDept } from "@/api/system/dept";
+  import { getToken } from "@/utils/auth";
+  import Treeselect from "@riophae/vue-treeselect";
+  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+  import SaiApplyDetail from "@/views/approve/approveDetail/sai-apply-detail";
+  import ProcessImg from '@/views/approve/processImg/index';
+  import { listStaffmgrByDeptAndTeam, getLoginStaffInfo } from "@/api/plant/staffmgr";
+  import { allFileList, delCommonfile } from "@/api/common/commonfile";
+  import { categoryList } from "@/api/production/eoegCategory";
+  import { listFile } from "@/api/production/eoegSaiApproveFile";
+  import { selectDevice } from "@/api/invoice/device";
+
+export default {
+  name: "Apply",
+  components: { Treeselect, SaiApplyDetail, ProcessImg },
+  data() {
+    var validateRecordNo = (rule, value, callback) => {
+      if (this.delayForm.isRecorded == '1') {
+        if (this.delayForm.recordNo == null) {
+          return callback(new Error('开项编号不能为空'));
+        } else {
+          return callback();
+        }
+      } else {
+        return callback();
+      }
+    };
+    var validateApplicantTeam = (rule, value, callback) => {
+      if (!this.applicantTeamDisabled) {
+        if (this.form.applicantTeam == null) {
+          return callback(new Error('登记人班组不能为空'));
+        } else {
+          return callback();
+        }
+      } else {
+        return callback();
+      }
+    };
+    var validateUnsafeStatus = (rule, value, callback) => {
+      if (this.unsafeChoice == '1') {
+        if (this.form.unsafeStatus == null) {
+          return callback(new Error('不安全状态不能为空'));
+        } else {
+          return callback();
+        }
+      } else {
+        return callback();
+      }
+    };
+    var validateUnsafeAction = (rule, value, callback) => {
+      if (this.unsafeChoice == '2') {
+        if (this.form.unsafeAction == null) {
+          return callback(new Error('不安全行为不能为空'));
+        } else {
+          return callback();
+        }
+      } else {
+        return callback();
+      }
+    };
+    return {
+      // 趋势图y轴数值
+      valueList1: [],
+      valueList2: [],
+      // 趋势图x轴日期
+      dateList1: [],
+      dateList2: [],
+      // 趋势图
+      chart1: null,
+      chart2: null,
+      submitDisabled: false,
+      applyDateRange: [],
+      estimateFinishDateRange: [],
+      // SAI类别列表
+      saiCategoryOptions: [],
+      saiCategoryOptions2: [],
+      fileList: [],
+      // 统计至SAI检查台账的数据
+      saiList: [],
+      // 是否显示用统计至SAI检查台账对话框
+      saiOpen: false,
+      // 是否显示趋势分析对话框
+      analysisOpen: false,
+      // 是否禁用开项编号输入框
+      recordNoDisabled: true,
+      // 当前登录员工
+      loginStaffInfo: {
+        userId: null,
+        isMonitor: false
+      },
+      //图片集合   打开关闭按钮 等等
+      imgs:[],
+      jpgList:[],
+      ppt:false,
+      pptView:false,
+      loadingFlash:false,
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/production/saiFile/uploadFile",
+        commonfileList: null,
+        commonfileListApply: null,
+        queryParams: {
+          pId: null,
+          pType: 'saiApply'
+        },
+        pType: 'saiApply',
+        pId: null
+      },
+      // pdf文件参数
+      pdf : {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+      },
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // SAI开项管理表格数据
+      applyList: [],
+      // 弹出层标题
+      title: "",
+      // 部门树选项
+      deptOptions: undefined,
+      clientHeight:300,
+      // 是否显示弹出层
+      open: false,
+      open2: false,
+      // 是否显示延期弹出层
+      delayOpen: false,
+        // 用户导入参数
+        upload: {
+            //下载模板请求地址
+            downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+            //下载模板类型
+            type: 'saiApply',
+            // 是否显示弹出层(用户导入)
+            open: false,
+            // 弹出层标题(用户导入)
+            title: "",
+            // 是否禁用上传
+            isUploading: false,
+            // 是否更新已经存在的用户数据
+            updateSupport: 0,
+            // 设置上传的请求头部
+            headers: { Authorization: "Bearer " + getToken() },
+            // 上传的地址
+            url: process.env.VUE_APP_BASE_API + "/production/apply/importData"
+        },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        saiApplyId: null,
+        deptId: null,
+        applyStatus: null,
+        apNo: null,
+        processId: null,
+        applicant: null,
+        assessor: null,
+        executor: null,
+        inspectors: null,
+        applicantDept: null,
+        applicantTeam: null,
+        description: null,
+        unsafeStatus: null,
+        unsafeAction: null,
+        applyDate: null,
+        taskId: null,
+        handler: null,
+        taskName: null,
+        estimateFinishDate: null,
+        actualFinishDate: null,
+        isRecorded: null,
+        recordNo: null,
+        reaction: null,
+        needVe: null,
+        veItems: null,
+        veResult: null,
+        veItemOther: null,
+        applyDateStart: null,
+        applyDateEnd: null,
+        estimateFinishDateStart: null,
+        estimateFinishDateEnd: null,
+        applyStatusString: [],
+        workArea: "",
+      },
+      // 表单参数
+      form: {},
+      // 延期表单参数
+      delayForm: {},
+      // 延期表单校验
+      delayRules: {
+        estimateFinishDate: [
+          { required: true, message: this.$t('预计完成时间') + this.$t('不能为空'), trigger: "change" }
+        ],
+        isRecorded: [
+          { required: true, message: this.$t('是否录入开项系统') + this.$t('不能为空'), trigger: "change" }
+        ],
+        recordNo: [
+          { validator: validateRecordNo, trigger: 'change' }
+        ],
+      },
+      // 新增/修改表单校验
+      rules: {
+        description: [
+          { required: true, message: this.$t('问题描述') + this.$t('不能为空'), trigger: "change" }
+        ],
+        applicantDept: [
+          { required: true, message: this.$t('登记人部门') + this.$t('不能为空'), trigger: "change" }
+        ],
+        applicantTeam: [
+          { validator: validateApplicantTeam, trigger: 'change' }
+        ],
+        applicant: [
+          { required: true, message: this.$t('登记人') + this.$t('不能为空'), trigger: "change" }
+        ],
+        applyDate: [
+          { required: true, message: this.$t('记录日期') + this.$t('不能为空'), trigger: "change" }
+        ],
+        workArea: [
+          { required: true, message: this.$t('片区') + this.$t('不能为空'), trigger: "change" }
+        ],
+        unsafeStatus: [
+          { validator: validateUnsafeStatus, trigger: 'change' }
+        ],
+        unsafeAction: [
+          { validator: validateUnsafeAction, trigger: 'change' }
+        ],
+        saiLevel: [
+          { required: true, message: this.$t('SAI级别') + this.$t('不能为空'), trigger: "change" }
+        ],
+        category: [
+          { required: true, message: this.$t('SAI类别') + this.$t('不能为空'), trigger: "change" }
+        ],
+      },
+      // 申请状态字典
+      applyStatusOptions: [],
+      // 登记人班组字典
+      applicantTeamOptions: [],
+      // 登记人部门列表
+      applicantDeptOptions: [],
+      // 登记人列表
+      applicantOptions: [],
+      // 不安全状态字典
+      unsafeStatusOptions: [],
+      // 不安全行为字典
+      unsafeActionOptions: [],
+      // 是否显示SAI开项申请详情对话框
+      saiApplyVisible: false,
+      // 是否显示流程图对话框
+      processImgVisible: null,
+      // 不安全状态/行为选项
+      unsafeChoice: '1',
+      // 是否禁用不安全状态下拉框
+      unsafeStatusDisabled: false,
+      // 是否禁用不安全行为下拉框
+      unsafeActionDisabled: true,
+      // 是否禁用班组下拉框
+      applicantTeamDisabled: false,
+      workAreaList: [],
+      applyStatusString: [],
+      tableList1: [],
+      tableList2: [],
+      countA: 0,
+      countB: 0,
+      countC: 0,
+      countD: 0,
+    };
+  },
+  watch: {
+    // 根据名称筛选部门树
+    deptName(val) {
+        this.$refs.tree.filter(val);
+    }
+   },
+  created() {
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+        this.clientHeight = document.body.clientHeight -250
+    })
+    this.getList();
+    this.getTreeselect();
+    // 加载申请状态字典
+    this.getDicts("SAI_APPLY_STATUS").then(response => {
+      this.applyStatusOptions = response.data;
+    });
+    // 加载登记人班组字典
+    this.getDicts("TEAM_DIVIDE").then(response => {
+      this.applicantTeamOptions = response.data;
+    });
+    // 加载登记人部门列表
+    this.getApplicantDeptOptions();
+    // 加载登记人列表
+    this.listStaffmgrByDeptAndTeam(null, null);
+    // 加载不安全状态字典
+    this.getDicts("SAI_UNSAFE_STATUS").then(response => {
+      this.unsafeStatusOptions = response.data;
+    });
+    // 加载不安全行为字典
+    this.getDicts("SAI_UNSAFE_ACTION").then(response => {
+      this.unsafeActionOptions = response.data;
+    });
+    // 加载当前登录员工信息
+    this.getLoginStaffInfo();
+    this.getCategoryList();
+    this.getWorkAreaList();
+    this.getTeamTable();
+  },
+  methods: {
+    getTeamTable() {
+      getTeamAnalysis().then(response => {
+        let data = response.data;
+        for (let i = 0; i < data.length; i++) {
+          let applicantTeam = data[i].applicantTeam;
+          let teamCount = data[i].teamCount;
+          if (applicantTeam == 'A') {
+            if (teamCount != '') {
+              this.countA = teamCount;
+            }
+          } else if (applicantTeam == 'B') {
+            if (teamCount != '') {
+              this.countB = teamCount;
+            }
+          } else if (applicantTeam == 'C') {
+            if (teamCount != '') {
+              this.countC = teamCount;
+            }
+          } else if (applicantTeam == 'D') {
+            if (teamCount != '') {
+              this.countD = teamCount;
+            }
+          }
+        }
+      });
+    },
+    /** 销毁趋势图 */
+    disposeChart() {
+      this.echarts.dispose(this.chart1);
+      this.echarts.dispose(this.chart2);
+    },
+    handleAnalysis() {
+      this.analysisOpen = true;
+      let teamPieList = [];
+      let personalPieList = [];
+      this.tableList1 = [];
+      this.tableList2 = [];
+      getTeamAnalysis().then(response => {
+        let data = response.data;
+        for (let i = 0; i < data.length; i++) {
+          let applicantTeam = data[i].applicantTeam;
+          let teamCount = data[i].teamCount;
+          teamPieList.push({ value: teamCount, name: applicantTeam + '班'});
+          this.tableList1.push({ value: teamCount, name: applicantTeam + '班'});
+        }
+        this.chart1 = this.echarts.init(document.getElementById("chart1"));
+        let option1 = {
+          // title: {
+          //   text: '四个班组当年提交的SAI数量',
+          //   left: 'center',
+          //   top: '10%'
+          // },
+          tooltip: {
+            trigger: 'item'
+          },
+          legend: {
+            show: false
+          },
+          series: [
+            {
+              type: 'pie',
+              radius: ['80%'],
+              data: teamPieList,
+              emphasis: {
+                itemStyle: {
+                  shadowBlur: 10,
+                  shadowOffsetX: 0,
+                  shadowColor: 'rgba(0, 0, 0, 0.5)'
+                }
+              },
+              label: {
+                show: false
+              }
+            }
+          ]
+        };
+        this.chart1.setOption(option1);
+      });
+      getPersonalAnalysis().then(response => {
+        let data = response.data;
+        for (let i = 0; i < data.length; i++) {
+          let applicantName = data[i].applicantName;
+          let applicantCount = data[i].applicantCount;
+          personalPieList.push({ value: applicantCount, name: applicantName });
+          if (i < 6) {
+            this.tableList2.push({ index: i + 1, value: applicantCount, name: applicantName });
+          }
+        }
+        this.chart2 = this.echarts.init(document.getElementById("chart2"));
+        let option2 = {
+          // title: {
+          //   text: '个人提交数量数据分析图',
+          //   left: 'center',
+          //   top: '10%'
+          // },
+          tooltip: {
+            trigger: 'item'
+          },
+          legend: {
+            show: false
+          },
+          series: [
+            {
+              type: 'pie',
+              radius: '80%',
+              data: personalPieList,
+              emphasis: {
+                itemStyle: {
+                  shadowBlur: 10,
+                  shadowOffsetX: 0,
+                  shadowColor: 'rgba(0, 0, 0, 0.5)'
+                }
+              },
+              label: {
+                show: false
+              }
+            }
+          ]
+        };
+        this.chart2.setOption(option2);
+      });
+    },
+    getWorkAreaList() {
+      selectDevice().then(response => {
+        let data = response.data;
+        for (let i = 0; i < data.length; i++) {
+          this.workAreaList.push(data[i]);
+        }
+      });
+    },
+    // 处理SAI级别下拉框选中事件
+    handleSaiLevelChange() {
+      this.saiCategoryOptions2 = [];
+      let saiLevel = this.form.saiLevel;
+      let saiCategoryOptionsTemp = [];
+      for (let i = 0; i < this.saiCategoryOptions.length; i++) {
+        if (saiLevel == 1 && this.saiCategoryOptions[i].dictLabel.indexOf("-1-") != -1) {
+          let saiCategoryOption = {
+            dictValue: this.saiCategoryOptions[i].dictValue,
+            dictLabel: this.saiCategoryOptions[i].dictLabel,
+          };
+          saiCategoryOptionsTemp.push(saiCategoryOption);
+        }
+        if (saiLevel == 2 && this.saiCategoryOptions[i].dictLabel.indexOf("-2-") != -1) {
+          let saiCategoryOption = {
+            dictValue: this.saiCategoryOptions[i].dictValue,
+            dictLabel: this.saiCategoryOptions[i].dictLabel,
+          };
+          saiCategoryOptionsTemp.push(saiCategoryOption);
+        }
+        if (saiLevel == 3 && this.saiCategoryOptions[i].dictLabel.indexOf("-3-") != -1) {
+          let saiCategoryOption = {
+            dictValue: this.saiCategoryOptions[i].dictValue,
+            dictLabel: this.saiCategoryOptions[i].dictLabel,
+          };
+          saiCategoryOptionsTemp.push(saiCategoryOption);
+        }
+      }
+      this.saiCategoryOptions2 = saiCategoryOptionsTemp;
+    },
+    // 处理SAI类别下拉框选中事件
+    handleSaiCategoryChange() {
+      for (let i = 0; i < this.saiCategoryOptions.length; i++) {
+        if (this.form.category == this.saiCategoryOptions[i].dictValue) {
+          if (this.saiCategoryOptions[i].dictLabel.indexOf("-1-") != -1) {
+            this.form.saiLevel = 1;
+          }
+          if (this.saiCategoryOptions[i].dictLabel.indexOf("-2-") != -1) {
+            this.form.saiLevel = 2;
+          }
+          if (this.saiCategoryOptions[i].dictLabel.indexOf("-3-") != -1) {
+            this.form.saiLevel = 3;
+          }
+        }
+      }
+    },
+    // SAI类别字典翻译
+    saiCategoryFormat(row, column) {
+      return this.selectDictLabel(this.saiCategoryOptions, row.category);
+    },
+    /** 获取SAI类别列表数据 */
+    getCategoryList() {
+      categoryList().then(response => {
+        let data = response.data;
+        for (let i = 0; i < data.length; i++) {
+          if (data[i].saiCategoryName != null && data[i].saiCategoryName != "") {
+            this.saiCategoryOptions.push({
+              dictLabel: data[i].saiCategoryName,
+              dictValue: data[i].saiCategoryId
+            });
+            this.saiCategoryOptions2.push({
+              dictLabel: data[i].saiCategoryName,
+              dictValue: data[i].saiCategoryId
+            });
+          }
+        }
+      });
+    },
+    /** 是否录入开项系统单选按钮值改变事件 */
+    handleIsRecordedChange() {
+      if (this.delayForm.isRecorded == '1') {
+        this.recordNoDisabled = false;
+      } else if (this.delayForm.isRecorded == '0') {
+        this.recordNoDisabled = true;
+        this.delayForm.recordNo = null;
+      }
+    },
+    /** 文件下载处理 */
+    handleDownload(row) {
+      var name = row.fileName;
+      var url = row.fileUrl;
+      var suffix = url.substring(url.lastIndexOf("."), url.length);
+      const a = document.createElement('a')
+      a.setAttribute('download', name)
+      a.setAttribute('target', '_blank')
+      a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+      a.click()
+    },
+    /** 报告附件按钮操作 */
+    handleDoc(row) {
+      this.doc.id = row.saiApplyId;
+      this.doc.title = "附件";
+      this.doc.open = true;
+      this.doc.queryParams.pId = row.saiApplyId
+      this.doc.pId = row.saiApplyId
+      this.getFileList()
+      this.$nextTick(() => {
+        this.$refs.doc.clearFiles()
+      })
+    },
+    getFileList() {
+      allFileList(this.doc.queryParams).then(response => {
+        this.doc.commonfileList = response;
+      });
+    },
+    /** 附件上传中处理 */
+    handleFileDocProgress(event, file, fileList) {
+      this.doc.file = file;
+      this.doc.isUploading = true;
+    },
+    // /** 附件上传成功处理 */
+    // handleFileDocSuccess(response, file, fileList) {
+    //   this.doc.isUploading = false;
+    //   this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+    //   this.getFileList()
+    // },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      this.doc.isUploading = false;
+      this.fileList = fileList
+      if (response.code == 200){
+        this.$alert(this.$t('导入成功'), this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      }else {
+        this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      }
+    },
+    handleRemove (file, fileList) {
+      this.fileList = fileList
+    },
+    /** 删除按钮操作 */
+    handleDeleteDoc(row) {
+      const ids = row.id || this.ids;
+      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function() {
+        return delCommonfile(ids);
+      }).then(() => {
+        this.getFileList();
+        this.msgSuccess(this.$t('删除成功'));
+      })
+    },
+    //文件预览
+    openPdf(){
+      //ppt就跳路由预览,office就直接打开文件新页面
+      const didi={ imgs:this.imgs}
+      if( this.pptView==true&&this.ppt==false){
+        let routeUrl = this.$router.resolve({
+          path: "/cpms/index.html#/pptyulan",
+          query:didi
+        });
+        window.open("/cpms/index.html#/pptyulan?id=" + this.pdf.pdfUrl, '_blank')
+        console.log(this.imgs)
+      }else {
+        window.open(this.pdf.pdfUrl)
+      }
+    },
+    handleSeePPT (row){
+      //ppt预览
+      this.loadingFlash=true
+      this.pdf.open =true
+      this.pdf.title = row.fileName
+      this.pdf.pdfUrl = row.fileUrl
+      this.pptView=true
+      this.ppt=false
+      const formatDate =new FormData();
+      formatDate.append("filepath",row.fileUrl)
+
+      //调用文件预览api
+      let res= this.officeConvert.pptConvertCommon(formatDate)
+
+      //查看接受的全局方法的返回结果 console.log(res)
+      //利用.then方法接受Promise对象
+
+      res.then((result)=>{
+        //关闭加载中
+        this.loadingFlash=false
+
+        //成功时直接给地址
+        this.videoList = result.data.imagePathList
+        //将返回的地址集合遍历添加到绑定的数组中
+        this.imgs=[]
+        for (var key=0;key<this.videoList.length;key++) {
+          this.imgs.push( process.env.VUE_APP_BASE_API+  this.videoList[key]  );
+        }
+      }).catch(result => {
+
+        //请求失败,关闭loading,pdf地址直接为为空,不显示
+        this.pdf.pdfUrl =""
+        this.loadingFlash = false;
+      })
+    },
+    handleSee (row){
+      //office预览
+      this.loadingFlash=true
+      this.pdf.open =true
+      this.pdf.title = row.fileName
+      this.pdf.pdfUrl =""
+
+      this.pptView=false
+      this.ppt=true
+      //如果是PDF等直接可以打开的就不调接口,否则调用接口
+      if(row.fileName.endsWith('pdf')){
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+        this.loadingFlash=false
+      }
+      else{
+        const formatDate =new FormData();
+        formatDate.append("filepath",row.fileUrl)
+
+        //调用文件预览api
+        let res= this.officeConvert.officeConvertCommon(formatDate)
+
+
+        //查看接受的全局方法的返回结果 console.log(res)
+        //利用.then方法接受Promise对象
+        res.then((result)=>{
+          //关闭加载中
+          this.loadingFlash=false
+
+          if(result.msg.includes("csv")){
+            this.pdf.pdfUrl =process.env.VUE_APP_BASE_API+ result.data
+            this.$alert(result.msg, this.$t('检查乱码'), { dangerouslyUseHTMLString: true });
+            //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+
+          }else if(result.msg.includes("不存在")){
+            //文件不存在时提示
+            this.pdf.pdfUrl =""
+            this.$alert(result.msg, this.$t('预览失败'), { dangerouslyUseHTMLString: true });
+            //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+            this.pdf.open =false
+          }else if(result.msg.includes("不支持此格式")){
+
+            this.pdf.pdfUrl =""
+            this.$alert(result.msg, this.$t('预览失败'), { dangerouslyUseHTMLString: true });
+            //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+            this.pdf.open =false
+          } else{
+            //成功时直接给地址
+            this.pdf.pdfUrl =process.env.VUE_APP_BASE_API+ result.data
+          }
+          // this.$nextTick(() => {
+          //   const iframe = window.frames['iFrame']
+          //   const handleLoad = () => {
+          //     setTimeout(() => {
+          //       const Do = (iframe.contentWindow || iframe.contentDocument)
+          //       console.log(Do.document.getElementsByTagName('table')[0])
+          //       Do.document.getElementsByTagName('table')[0].style.width = "100%"
+          //       Do.document.getElementsByTagName('table')[0].setAttribute("class","table")
+          //     }, 500)
+          //   }
+          //   iframe.addEventListener('load', handleLoad, true)
+          // })
+        }).catch(result => {
+
+          //请求失败,关闭loading,pdf地址直接为为空,不显示
+          this.pdf.pdfUrl =""
+          this.loadingFlash = false;
+
+        })
+      }
+
+
+    },
+    /** 加载当前登录员工信息 */
+    getLoginStaffInfo() {
+      getLoginStaffInfo().then(response => {
+        let staff = response.data;
+        if (staff != null) {
+          this.loginStaffInfo = response.data;
+          if (this.loginStaffInfo.actualpost == '12' || this.loginStaffInfo.actualpost == '34') {
+            this.loginStaffInfo.isMonitor = true;
+          }
+          this.form.applicantDept = staff.unit;
+          if (staff.unit == '10') {
+            this.form.applicantTeam = staff.team;
+          }
+          this.form.applicant = staff.userId;
+        }
+      });
+    },
+    /** 加载登记人部门列表 */
+    getApplicantDeptOptions() {
+      // listDept(null).then(response => {
+      //   let deptList = response.data;
+      //   this.applicantDeptOptions = [];
+      //   for (let i = 0; i < deptList.length; i++) {
+      //     if (deptList[i].deptId == 103 || deptList[i].deptId == 10058 || deptList[i].deptId == 10042) {
+      //       this.applicantDeptOptions.push({
+      //         dictLabel: deptList[i].deptName,
+      //         dictValue: deptList[i].deptId
+      //       });
+      //     }
+      //   }
+      // });
+      this.applicantDeptOptions.push({ dictLabel: "CBP/C", dictValue: '10' });
+      this.applicantDeptOptions.push({ dictLabel: "CTA/B", dictValue: '12' });
+      this.applicantDeptOptions.push({ dictLabel: "CTM/B", dictValue: '14' });
+    },
+    /** 部门/班组值改变事件 */
+    handleDeptOrTeamChange() {
+      this.applicantOptions = [];
+      this.form.applicant = null;
+      let applicantDept = this.form.applicantDept;
+      if (applicantDept != '10') {
+        this.applicantTeamDisabled = true;
+        this.form.applicantTeam = null;
+      } else {
+        this.applicantTeamDisabled = false;
+      }
+      let applicantTeam = this.form.applicantTeam;
+      // 加载登记人列表
+      this.listStaffmgrByDeptAndTeam(applicantDept, null);
+    },
+    /** 加载登记人列表 */
+    listStaffmgrByDeptAndTeam(applicantDept, applicantTeam) {
+      listStaffmgrByDeptAndTeam({
+        deptId: applicantDept,
+        team: applicantTeam
+      }).then(response => {
+        let staffList = response.rows;
+        this.applicantOptions = [];
+        for (let i = 0; i < staffList.length; i++) {
+          let staffOption = {
+            dictLabel: staffList[i].name,
+            dictValue: staffList[i].userId
+          }
+          this.applicantOptions.push(staffOption);
+        }
+      });
+    },
+    /** 不安全行为/状态单选按钮值改变事件 */
+    handleUnsafeChoiceChange() {
+      if (this.unsafeChoice == '1') {
+        this.form.unsafeAction = null;
+        this.unsafeStatusDisabled = false;
+        this.unsafeActionDisabled = true;
+      } else if (this.unsafeChoice == '2') {
+        this.form.unsafeStatus = null;
+        this.unsafeStatusDisabled = true;
+        this.unsafeActionDisabled = false;
+      }
+    },
+    /** 流程图 */
+    processImg (processId) {
+      this.processImgVisible = true;
+      this.$nextTick(() => {
+        this.$refs.processImg.init(processId);
+      })
+    },
+    /** 处理延期操作 */
+    handleDelay(row) {
+      this.reset();
+      const saiApplyId = row.saiApplyId || this.ids
+      getApply(saiApplyId).then(response => {
+        this.delayForm = response.data;
+        if (this.delayForm.isRecorded != null) {
+          this.delayForm.isRecorded = this.delayForm.isRecorded.toString();
+        }
+        this.delayOpen = true;
+        this.title = "SAI开项申请延期";
+      });
+    },
+    /** 处理/详情操作 */
+    handleDetail(row) {
+      this.saiApplyVisible = true;
+      this.$nextTick(() => {
+        this.$refs.saiApplyDetail.init(row.saiApplyId, row.taskId, row.processId, row.taskName);
+      });
+    },
+    /** 提交申请操作 */
+    handleSubmit(row) {
+      this.$confirm('是否确认提交申请?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        return submitApply(row.saiApplyId);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("提交申请成功");
+      })
+    },
+    // 申请状态字典翻译
+    applyStatusFormat(row, column) {
+      return this.selectDictLabel(this.applyStatusOptions, row.applyStatus);
+    },
+    // 班组字典翻译
+    teamFormat(row, column) {
+      return this.selectDictLabel(this.applicantTeamOptions, row.applicantTeam);
+    },
+    /** 查询SAI开项管理列表 */
+    getList() {
+      this.loading = true;
+      this.queryParams.tab = 3;
+      this.queryParams.applyStatusString = this.applyStatusString.join()
+      if (this.queryParams.workArea != null && this.queryParams.workArea != "") {
+        this.queryParams.workArea = this.queryParams.workArea.join();
+      } else {
+        this.queryParams.workArea = "";
+      }
+      listApply(this.queryParams).then(response => {
+        if (this.queryParams.workArea != null && this.queryParams.workArea != "") {
+          this.queryParams.workArea = this.queryParams.workArea.split(",");
+        }
+        this.applyList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+     /** 查询部门下拉树结构 */
+     getTreeselect() {
+          treeselect().then(response => {
+              this.deptOptions = response.data;
+          });
+     },
+    // 取消按钮
+    cancel() {
+      this.delayOpen = false;
+      this.saiOpen = false;
+      this.open = false;
+      this.open2 = false;
+      this.analysisOpen = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        saiApplyId: null,
+        delFlag: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        deptId: null,
+        applyStatus: null,
+        apNo: null,
+        processId: null,
+        applicant: null,
+        assessor: null,
+        executor: null,
+        inspectors: null,
+        applicantDept: null,
+        applicantTeam: null,
+        description: null,
+        unsafeStatus: null,
+        unsafeAction: null,
+        applyDate: new Date(),
+        taskId: null,
+        handler: null,
+        taskName: null,
+        estimateFinishDate: null,
+        actualFinishDate: null,
+        isRecorded: null,
+        recordNo: null,
+        reaction: null,
+        needVe: null,
+        veItems: null,
+        veResult: null,
+        veItemOther: null,
+        applyDateStart: null,
+        applyDateEnd: null,
+        estimateFinishDateStart: null,
+        estimateFinishDateEnd: null,
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      if (this.applyDateRange != null) {
+        this.queryParams.applyDateStart = this.applyDateRange[0];
+        this.queryParams.applyDateEnd = this.applyDateRange[1];
+      } else {
+        this.queryParams.applyDateStart = null;
+        this.queryParams.applyDateEnd = null;
+      }
+      if (this.estimateFinishDateRange != null) {
+        this.queryParams.estimateFinishDateStart = this.estimateFinishDateRange[0];
+        this.queryParams.estimateFinishDateEnd = this.estimateFinishDateRange[1];
+      } else {
+        this.queryParams.estimateFinishDateStart = null;
+        this.queryParams.estimateFinishDateEnd = null;
+      }
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.applyStatusString = [];
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.saiApplyId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.fileList = [];
+      this.open = true;
+      this.title = "添加SAI开项申请";
+      // 加载当前登录员工信息
+      this.getLoginStaffInfo();
+      this.applicantTeamDisabled = false;
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const saiApplyId = row.saiApplyId || this.ids
+      listFile({
+        approveId: saiApplyId
+      }).then(response => {
+        this.doc.commonfileListApply = response;
+      });
+      getApply(saiApplyId).then(response => {
+        this.form = response.data;
+        if (this.form.unsafeStatus != null && this.form.unsafeStatus != "") {
+          this.form.unsafeStatus = this.form.unsafeStatus.toString();
+        }
+        if (this.form.unsafeAction != null && this.form.unsafeAction != "") {
+          this.form.unsafeAction = this.form.unsafeAction.toString();
+        }
+        if (this.form.category != null && this.form.category != "") {
+          this.form.category = Number(this.form.category);
+        }
+        this.fileList = [];
+        if (this.form.files.length > 0) {
+          console.log(this.form.files);
+          for (let i = 0; i < this.form.files.length; i++) {
+            let obj = {}
+            obj.name = this.form.files[i].fileName
+            obj.response = {};
+            obj.response.msg = this.form.files[i].fileUrl
+            this.fileList.push(obj)
+          }
+        }
+        this.open = true;
+        this.title = "修改SAI开项申请";
+      });
+    },
+    handleUpdate2(row) {
+      this.reset();
+      const saiApplyId = row.saiApplyId || this.ids
+      listFile({
+        approveId: saiApplyId
+      }).then(response => {
+        this.doc.commonfileListApply = response;
+      });
+      getApply(saiApplyId).then(response => {
+        this.form = response.data;
+        if (this.form.unsafeStatus != null && this.form.unsafeStatus != "") {
+          this.form.unsafeStatus = this.form.unsafeStatus.toString();
+        }
+        if (this.form.unsafeAction != null && this.form.unsafeAction != "") {
+          this.form.unsafeAction = this.form.unsafeAction.toString();
+        }
+        if (this.form.category != null && this.form.category != "") {
+          this.form.category = Number(this.form.category);
+        }
+        this.fileList = [];
+        if (this.form.files.length > 0) {
+          console.log(this.form.files);
+          for (let i = 0; i < this.form.files.length; i++) {
+            let obj = {}
+            obj.name = this.form.files[i].fileName
+            obj.response = {};
+            obj.response.msg = this.form.files[i].fileUrl
+            this.fileList.push(obj)
+          }
+        }
+        this.open2 = true;
+        this.title = "修改SAI开项申请";
+      });
+    },
+    /** 新增/修改保存按钮 */
+    submitForm() {
+      this.submitDisabled = true;
+      this.form.files = []
+      if (this.fileList.length > 0) {
+        for (let i = 0; i < this.fileList.length; i++) {
+          let obj = {}
+          obj.fileName = this.fileList[i].name
+          obj.fileUrl = this.fileList[i].response.msg
+          this.form.files.push(obj)
+        }
+      }
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.saiApplyId != null) {
+            updateApply(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.open2 = false;
+              this.submitDisabled = false;
+              this.getList();
+            });
+          } else {
+            addApply(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.open2 = false;
+              this.submitDisabled = false;
+              this.getList();
+            });
+          }
+        } else {
+          this.submitDisabled = false;
+        }
+      });
+    },
+    /** 新增/修改提交按钮 */
+    handleSaveAndSubmit() {
+      this.submitDisabled = true;
+      this.form.files = []
+      if (this.fileList.length > 0) {
+        for (let i = 0; i < this.fileList.length; i++) {
+          let obj = {}
+          obj.fileName = this.fileList[i].name
+          obj.fileUrl = this.fileList[i].response.msg
+          this.form.files.push(obj)
+        }
+      }
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          saveAndSubmitApply(this.form).then(response => {
+            this.msgSuccess("提交成功");
+            this.submitDisabled = false;
+            this.open = false;
+            this.getList();
+          });
+        } else {
+          this.submitDisabled = false;
+        }
+      });
+    },
+    /** 统计至SAI检查台账提交按钮 */
+    submitSaiForm() {
+      for (let i = 0; i < this.saiList.length; i++) {
+        this.saiList[i].plantId = 103;
+        this.saiList[i].userDept = 103;
+        addSai(this.saiList[i]);
+      }
+      this.msgSuccess("提交成功");
+      this.saiOpen = false;
+    },
+    /** 延期提交按钮 */
+    submitDelayForm() {
+      this.$refs["delayForm"].validate(valid => {
+        if (valid) {
+          updateApply(this.delayForm).then(response => {
+            this.msgSuccess("延期成功");
+            this.delayOpen = false;
+            this.getList();
+          });
+        }
+      });
+    },
+    /** 统计至SAI检查台账按钮操作 */
+    handleAddSai(row) {
+      const saiApplyIds = row.saiApplyId || this.ids;
+      if(saiApplyIds.length != 0) {
+        this.saiList = [];
+        for (let i = 0; i < saiApplyIds.length; i ++) {
+          getApply(saiApplyIds[i]).then(response => {
+            let apply = response.data;
+            let sai = {};
+            sai.saiApplyId = apply.saiApplyId;
+            sai.plantId = "CBP/C";
+            sai.userDeptId = "CBP/C";
+            sai.inspectionDate = apply.applyDate;
+            sai.dificiency = apply.description;
+            sai.actions = apply.reaction;
+            sai.source = "装置";
+            sai.deptId = 103;
+            sai.saiLevel = apply.saiLevel;
+            sai.category = Number(apply.category);
+            sai.applicant = apply.applicant;
+            sai.applicantName = apply.applicantName;
+            this.saiList.push(sai);
+          });
+        }
+        this.saiOpen = true;
+      }
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const saiApplyIds = row.saiApplyId || this.ids;
+      this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delApply(saiApplyIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+    },
+    /** 导出全部按钮操作 */
+    handleExport() {
+      this.queryParams.ids = null;
+      if (this.queryParams.workArea != null && this.queryParams.workArea != "") {
+        this.queryParams.workArea = this.queryParams.workArea.join();
+      } else {
+        this.queryParams.workArea = "";
+      }
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有SAI开项管理数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        return exportApply(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      })
+    },
+    /** 导出选中数据按钮操作 */
+    handleExportSelected() {
+      if (this.ids.length==0){
+        return this.$alert('请选择要导出的数据项!', "警告", {
+          confirmButtonText: "确定",
+          type: "warning"
+        })
+      }
+      if (this.queryParams.workArea != null && this.queryParams.workArea != "") {
+        this.queryParams.workArea = this.queryParams.workArea.join();
+      } else {
+        this.queryParams.workArea = "";
+      }
+      const queryParams = this.queryParams;
+      queryParams.ids=this.ids;
+      console.log(queryParams)
+      this.$confirm('是否确认导出选中的SAI开项管理数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return exportApply(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      })
+    },
+      /** 导入按钮操作 */
+      handleImport() {
+          this.upload.title = "用户导入";
+          this.upload.open = true;
+      },
+      /** 下载模板操作 */
+      importTemplate() {
+        this.$refs['downloadFileForm'].submit()
+      },
+      // 文件上传中处理
+      handleFileUploadProgress(event, file, fileList) {
+          this.upload.isUploading = true;
+      },
+      // 文件上传成功处理
+      handleFileSuccess(response, file, fileList) {
+        this.upload.open = false;
+        this.upload.isUploading = false;
+        this.$refs.upload.clearFiles();
+        if (response.data[0] != null) {
+          this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据') + "," + this.$t('第') + response.data + this.$t('行数据出现错误导入失败')+"。", this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        }else {
+          this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据'), this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        }
+        this.getList();
+      },
+      // 提交上传文件
+      submitFileForm() {
+          this.$refs.upload.submit();
+      }
+  }
+};
+</script>

+ 51 - 0
ui/src/views/production/eoegapply/index.vue

@@ -0,0 +1,51 @@
+<template>
+  <div class="app-container">
+    <el-tabs type="border-card"v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane label="待处理" name="first">
+        <pending item="1" typename="" v-if="isFirst"></pending>
+      </el-tab-pane>
+      <el-tab-pane label="与我相关" name="second">
+        <mine item="2" typename="" v-if="isSecond"></mine>
+      </el-tab-pane>
+      <el-tab-pane label="总数据" name="third">
+        <all item="3" typename="" v-if="isThird"></all>
+      </el-tab-pane>
+    </el-tabs>
+  </div>
+</template>
+
+<script>
+  import All from '@/views/production/eoegapply/all/index.vue'
+  import Mine from '@/views/production/eoegapply/mine/index.vue'
+  import Pending from '@/views/production/eoegapply/pending/index.vue'
+
+export default {
+  name: "EoegApply",
+  components: { All, Mine, Pending },
+  data() {
+    return {
+      activeName: 'first',
+      isFirst: true,
+      isSecond: false,
+      isThird: false,
+    }
+  },
+  methods: {
+    handleClick(tab) {
+      if (tab.name === 'first') {
+        this.isFirst = true
+        this.isSecond = false
+        this.isThird = false
+      } else if (tab.name === 'second') {
+        this.isFirst = false
+        this.isSecond = true
+        this.isThird = false
+      }else if (tab.name === 'third') {
+        this.isFirst = false
+        this.isSecond = false
+        this.isThird = true
+      }
+    },
+  }
+};
+</script>

+ 1804 - 0
ui/src/views/production/eoegapply/mine/index.vue

@@ -0,0 +1,1804 @@
+<template>
+  <div class="app-container">
+    <!-- 搜索条件 -->
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="登记人部门" prop="applicantDept">
+        <el-form-item prop="applicantDept">
+          <el-select
+            clearable
+            v-model="queryParams.applicantDept"
+            placeholder="请选择部门">
+            <el-option
+              v-for="dict in applicantDeptOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form-item>
+      <el-form-item label="登记人班组" prop="applicantTeam">
+        <el-form-item prop="applicantTeam">
+          <el-select
+            clearable
+            v-model="queryParams.applicantTeam"
+            placeholder="请选择班组">
+            <el-option
+              v-for="dict in applicantTeamOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form-item>
+      <el-form-item label="不安全状态" prop="unsafeStatus">
+        <el-select v-model="queryParams.unsafeStatus" placeholder="请选择不安全状态" clearable>
+          <el-option
+            v-for="dict in unsafeStatusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="不安全行为" prop="unsafeAction">
+        <el-select v-model="queryParams.unsafeAction" placeholder="请选择不安全行为" clearable>
+          <el-option
+            v-for="dict in unsafeActionOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="申请状态" prop="applyStatus">
+        <el-select v-model="queryParams.applyStatus" placeholder="请选择申请状态">
+          <el-option
+            v-for="dict in applyStatusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="问题描述" prop="description">
+        <el-input
+          v-model="queryParams.description"
+          placeholder="请输入问题描述"
+          clearable
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="登记时间" prop="applyDate">
+        <el-date-picker
+          v-model="applyDateRange"
+          type="daterange"
+          align="right"
+          unlink-panels
+          :range-separator="$t('至')"
+          :start-placeholder="$t('开始日期')"
+          :end-placeholder="$t('结束日期')"
+          value-format="yyyy-MM-dd">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="预计完成时间" prop="estimateFinishDate">
+        <el-date-picker
+          v-model="estimateFinishDateRange"
+          type="daterange"
+          align="right"
+          unlink-panels
+          :range-separator="$t('至')"
+          :start-placeholder="$t('开始日期')"
+          :end-placeholder="$t('结束日期')"
+          value-format="yyyy-MM-dd">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="片区" prop="workArea">
+        <el-select
+          clearable
+          multiple
+          v-model="queryParams.workArea"
+          placeholder="请选择片区">
+          <el-option
+            v-for="dict in workAreaList"
+            :key="dict"
+            :label="dict"
+            :value="dict"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <!-- 操作按钮 -->
+    <el-row :gutter="10" class="mb8" style="margin-bottom: 0px;">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['production:apply:add']"
+        >新增申请单</el-button>
+      </el-col>
+      <!--<el-col :span="1.5">-->
+        <!--<el-button-->
+          <!--type="info"-->
+          <!--icon="el-icon-upload2"-->
+          <!--size="mini"-->
+          <!--@click="handleImport"-->
+          <!--v-hasPermi="['production:apply:edit']"-->
+        <!--&gt;导入</el-button>-->
+      <!--</el-col>-->
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['production:apply:export']"
+        >导出全部</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExportSelected"
+          v-hasPermi="['production:apply:export']"
+        >导出选中数据</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          size="mini"
+          @click="handleAddSai"
+          v-hasPermi="['production:sai:add']"
+        >统计至SAI检查台账</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+    <!-- 各班组当年至今的提交数量 -->
+    <el-descriptions title="" direction="vertical" :column="4" border style="margin-bottom: 20px;">
+      <el-descriptions-item label="A班">
+        <el-tag size="small">{{countA}}</el-tag>
+      </el-descriptions-item>
+      <el-descriptions-item label="B班">
+        <el-tag size="small">{{countB}}</el-tag>
+      </el-descriptions-item>
+      <el-descriptions-item label="C班">
+        <el-tag size="small">{{countC}}</el-tag>
+      </el-descriptions-item>
+      <el-descriptions-item label="D班">
+        <el-tag size="small">{{countD}}</el-tag>
+      </el-descriptions-item>
+    </el-descriptions>
+    <!-- 总表 -->
+    <el-table v-loading="loading" :data="applyList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="问题描述" align="center" prop="description" :show-overflow-tooltip="true" width="200"/>
+      <el-table-column label="片区" align="center" prop="workArea" :show-overflow-tooltip="true"/>
+      <el-table-column label="申请状态" align="center" prop="applyStatus" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span v-if="scope.row.applyStatus == 0"><el-tag type="info">未提交</el-tag></span>
+          <span v-if="scope.row.applyStatus == 1"><el-tag type="warning">待评估</el-tag></span>
+          <span v-if="scope.row.applyStatus == 2"><el-tag type="warning">进行中</el-tag></span>
+          <span v-if="scope.row.applyStatus == 3"><el-tag type="warning">待验收</el-tag></span>
+          <span v-if="scope.row.applyStatus == 4"><el-tag type="success">已完成</el-tag></span>
+          <span v-if="scope.row.applyStatus == 5"><el-tag type="info">已取消</el-tag></span>
+        </template>
+      </el-table-column>
+      <el-table-column label="登记人部门" align="center" prop="applicantDeptName" :show-overflow-tooltip="true"/>
+      <el-table-column label="登记人班组" align="center" prop="applicantTeam" :show-overflow-tooltip="true" :formatter="teamFormat"/>
+      <el-table-column label="登记人" align="center" prop="applicantName" :show-overflow-tooltip="true"/>
+      <el-table-column label="当前处理人" align="center" prop="handlerName" :show-overflow-tooltip="true"/>
+      <el-table-column label="整改负责人" align="center" prop="executorName" :show-overflow-tooltip="true"/>
+      <el-table-column label="登记时间" align="center" prop="applyDate" width="100" sortable>
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.applyDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="预计完成时间" align="center" prop="estimateFinishDate" width="100" sortable>
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.estimateFinishDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="实际完成时间" align="center" prop="actualFinishDate" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.actualFinishDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="是否录入开项系统" align="center" prop="isRecorded" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span>{{ scope.row.isRecorded == 1 ? "是" : "否" }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="开项编号" align="center" prop="recordNo" :show-overflow-tooltip="true"/>
+      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <!-- 申请已提交操作 -->
+          <!-- 申请状态为进行中/待验收 -->
+          <!-- 当前登录用户为张力飞 -->
+          <el-button
+            size="mini"
+            type="text"
+            @click="handleDelay(scope.row)"
+            v-if="(scope.row.applyStatus == 2 || scope.row.applyStatus == 3)
+            && loginStaffInfo.userId == '20276'"
+          >延期</el-button>
+          <!-- 申请状态为待评估/进行中/待验收 -->
+          <!-- 当前登录用户为处理人(之一)或张力飞 -->
+          <el-button
+            size="mini"
+            type="text"
+            @click="handleDetail(scope.row)"
+            icon="el-icon-edit-outline"
+            v-if="(scope.row.applyStatus == 1 || scope.row.applyStatus == 2 || scope.row.applyStatus == 3)
+            && ((scope.row.handler.indexOf(loginStaffInfo.userId) != -1) || loginStaffInfo.userId == '20276')"
+          >处理</el-button>
+          <!-- 申请状态为已完成/已中止-->
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="handleDetail(scope.row)"
+            v-if="scope.row.applyStatus == 4 || scope.row.applyStatus == 5"
+          >详情</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            @click="processImg(scope.row.processId)"
+            v-if="scope.row.applyStatus != 0"
+          >{{ $t('流程图') }}</el-button>
+          <!-- 申请未提交操作 -->
+          <!-- 申请状态为未提交 -->
+          <!-- 当前登录用户为处理人(之一) -->
+          <span v-if="scope.row.applyStatus == 0 && scope.row.handler.indexOf(loginStaffInfo.userId) != -1">
+            <el-button
+              size="mini"
+              type="text"
+              @click="handleSubmit(scope.row)"
+              v-hasPermi="['production:apply:edit']"
+              icon="el-icon-s-claim"
+            >提交申请</el-button>
+            <!--<el-button-->
+            <!--size="mini"-->
+            <!--type="text"-->
+            <!--icon="el-icon-document"-->
+            <!--@click="handleDoc(scope.row)"-->
+            <!--&gt;上传附件</el-button>-->
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-edit"
+              @click="handleUpdate(scope.row)"
+              v-hasPermi="['production:apply:edit']"
+            >修改</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDelete(scope.row)"
+              v-hasPermi="['production:apply:remove']"
+            >删除</el-button>
+          </span>
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 分页 -->
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+    <!-- 添加或修改SAI开项管理对话框 -->
+    <el-dialog  :close-on-click-modal="false" :title="title" :visible.sync="open" width="60%" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="0px">
+        <el-descriptions title="" :column="3" border>
+          <el-descriptions-item label="登记人部门">
+            <el-form-item prop="applicantDept">
+              <el-select
+                filterable
+                clearable
+                v-model="form.applicantDept"
+                @change="handleDeptOrTeamChange"
+                placeholder="请选择部门">
+                <el-option
+                  v-for="dict in applicantDeptOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="登记人班组">
+            <el-form-item prop="applicantTeam">
+              <el-select
+                filterable
+                clearable
+                v-model="form.applicantTeam"
+                @change="handleDeptOrTeamChange"
+                :disabled="applicantTeamDisabled"
+                placeholder="请选择班组">
+                <el-option
+                  v-for="dict in applicantTeamOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="登记人">
+            <el-form-item prop="applicant">
+              <el-select
+                filterable
+                clearable
+                v-model="form.applicant"
+                placeholder="请选择登记人">
+                <el-option
+                  v-for="dict in applicantOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="问题描述" :span="3">
+            <el-form-item prop="description">
+              <el-input v-model="form.description" placeholder="请输入问题描述" type="textarea" :rows="3" />
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="SAI级别" :span="1">
+            <el-form-item prop="saiLevel">
+              <el-select v-model="form.saiLevel" placeholder="请选择SAI级别" @change="handleSaiLevelChange">
+                <el-option key="1" label="1" value="1"></el-option>
+                <el-option key="2" label="2" value="2"></el-option>
+                <el-option key="3" label="3" value="3"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="SAI类别" :span="1">
+            <el-form-item prop="category">
+              <el-select
+                @change="handleSaiCategoryChange"
+                filterable
+                clearable
+                v-model="form.category"
+                placeholder="请选择SAI类别">
+                <el-option
+                  v-for="dict in saiCategoryOptions2"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+
+          <el-descriptions-item label="片区" :span="1">
+            <el-form-item prop="workArea">
+              <el-select
+                @change="handleSaiCategoryChange"
+                filterable
+                clearable
+                v-model="form.workArea"
+                placeholder="请选择片区">
+                <el-option
+                  v-for="dict in workAreaList"
+                  :key="dict"
+                  :label="dict"
+                  :value="dict"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="隐患" :span="3">
+            <el-radio v-model="unsafeChoice" label="1" @change="handleUnsafeChoiceChange" style="margin-right: 10px;">不安全状态</el-radio>
+            <el-form-item prop="unsafeStatus" style="display: inline-block;">
+              <el-select v-model="form.unsafeStatus" filterable placeholder="请选择不安全状态" :disabled="unsafeStatusDisabled" style="margin-right: 20px;" clearable>
+                <el-option
+                  v-for="dict in unsafeStatusOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-radio v-model="unsafeChoice" label="2" @change="handleUnsafeChoiceChange" style="margin-right: 10px;">不安全行为</el-radio>
+            <el-form-item prop="unsafeAction" style="display: inline-block;">
+              <el-select v-model="form.unsafeAction" filterable placeholder="请选择不安全行为" :disabled="unsafeActionDisabled" clearable>
+                <el-option
+                  v-for="dict in unsafeActionOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="附件" :span="3">
+            <el-form-item label="" prop="fileUrl">
+              <el-upload
+                ref="doc"
+                :limit="5"
+                :headers="doc.headers"
+                :action="doc.url"
+                :disabled="doc.isUploading"
+                :on-progress="handleFileDocProgress"
+                :on-success="handleFileDocSuccess"
+                :on-remove="handleRemove"
+                :auto-upload="true"
+                :file-list="fileList"
+                drag
+              >
+                <i class="el-icon-upload"></i>
+                <div class="el-upload__text">
+                  {{ $t('将文件拖到此处,或') }}
+                  <em>{{ $t('点击上传') }}</em>
+                </div>
+              </el-upload>
+            </el-form-item>
+            <el-table :data="doc.commonfileListApply" border v-if="form.saiApplyId">
+              <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+                <template slot-scope="scope">
+                  <a  class="link-type"  @click="handleDownload(scope.row)">
+                    <span>{{ scope.row.fileName }}</span>
+                  </a>
+                </template>
+              </el-table-column>
+              <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
+                <template slot-scope="scope">
+                  <el-button
+                    v-if="scope.row.fileName.endsWith('pdf')||scope.row.fileName.endsWith('xlsx')||scope.row.fileName.endsWith('md')
+                 ||scope.row.fileName.endsWith('docx')||scope.row.fileName.endsWith('doc')||scope.row.fileName.endsWith('txt')
+                 ||scope.row.fileName.endsWith('jpg')||scope.row.fileName.endsWith('png')||scope.row.fileName.endsWith('csv')
+                 ||scope.row.fileName.endsWith('mp4')||scope.row.fileName.endsWith('svg')||scope.row.fileName.endsWith('dwg')
+                 ||scope.row.fileName.endsWith('flv')||scope.row.fileName.endsWith('swf')||scope.row.fileName.endsWith('gif')
+                 ||scope.row.fileName.endsWith('3gp')||scope.row.fileName.endsWith('mkv')||scope.row.fileName.endsWith('tif')"
+                    size="mini"
+                    type="text"
+                    icon="el-icon-view"
+                    @click="handleSee(scope.row)"
+                  > {{ $t('预览') }}</el-button>
+                  <el-button
+                    v-if="scope.row.fileName.endsWith('ppt')||scope.row.fileName.endsWith('pptx') "
+                    size="mini"
+                    type="text"
+                    icon="el-icon-view"
+                    @click="handleSeePPT(scope.row)"
+                  > {{ $t('ppt预览') }}</el-button>
+                  <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-download"
+                    @click="handleDownload(scope.row)"
+                  >{{ $t('下载') }}</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </el-descriptions-item>
+          <el-descriptions-item label="登记时间">
+            <el-form-item prop="applyDate">
+              <el-date-picker
+                size="small"
+                style="width: 200px"
+                v-model="form.applyDate"
+                type="date"
+                value-format="yyyy-MM-dd"
+                placeholder="选择登记时间">
+              </el-date-picker>
+            </el-form-item>
+          </el-descriptions-item>
+        </el-descriptions>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="handleSaveAndSubmit" :disabled="submitDisabled">提 交</el-button>
+        <el-button @click="submitForm" :disabled="submitDisabled">保 存</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 延期对话框 -->
+    <el-dialog  :close-on-click-modal="false" :title="title" :visible.sync="delayOpen" width="25%" append-to-body>
+      <el-form ref="delayForm" :model="delayForm" :rules="delayRules" label-width="136px">
+        <el-form-item prop="estimateFinishDate" label="预计完成时间">
+          <el-date-picker
+            clearable
+            size="small"
+            style="width: 200px"
+            v-model="delayForm.estimateFinishDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择预计完成时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item prop="isRecorded" label="是否录入开项系统">
+          <el-radio v-model="delayForm.isRecorded" label="1" @change="handleIsRecordedChange">是</el-radio>
+          <el-radio v-model="delayForm.isRecorded" label="0" @change="handleIsRecordedChange">否</el-radio>
+        </el-form-item>
+        <el-form-item prop="recordNo" label="开项编号">
+          <el-input v-model="delayForm.recordNo" placeholder="请输入开项编号" :disabled="recordNoDisabled"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitDelayForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 用户导入对话框 -->
+    <el-dialog  :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</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">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- SAI开项管理流转详情对话框 -->
+    <sai-apply-detail v-if="saiApplyVisible" ref="saiApplyDetail" @refreshDataList="getList"></sai-apply-detail>
+    <!-- 流程图对话框 -->
+    <process-img v-if="processImgVisible" ref="processImg" @refreshDataList="getList"></process-img>
+    <!-- 附件对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="700px" append-to-body>
+      <el-upload
+        ref="doc"
+        :limit="50"
+        :headers="doc.headers"
+        :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
+        :disabled="doc.isUploading"
+        :on-progress="handleFileDocProgress"
+        :on-success="handleFileDocSuccess"
+        :auto-upload="true"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+      </el-upload>
+      <el-table :data="doc.commonfileList" border>
+        <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <a  class="link-type"  @click="handleDownload(scope.row)">
+              <span>{{ scope.row.fileName }}</span>
+            </a>
+          </template>
+        </el-table-column>
+        <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
+        <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
+        <el-table-column :label="$t('上传时间')" align="center" prop="createdate" :show-overflow-tooltip="true" width="120"/>
+        <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              v-if="scope.row.fileName.endsWith('pdf')||scope.row.fileName.endsWith('xlsx')||scope.row.fileName.endsWith('md')
+                 ||scope.row.fileName.endsWith('docx')||scope.row.fileName.endsWith('doc')||scope.row.fileName.endsWith('txt')
+                 ||scope.row.fileName.endsWith('jpg')||scope.row.fileName.endsWith('png')||scope.row.fileName.endsWith('csv')
+                 ||scope.row.fileName.endsWith('mp4')||scope.row.fileName.endsWith('svg')||scope.row.fileName.endsWith('dwg')
+                 ||scope.row.fileName.endsWith('flv')||scope.row.fileName.endsWith('swf')||scope.row.fileName.endsWith('gif')
+                 ||scope.row.fileName.endsWith('3gp')||scope.row.fileName.endsWith('mkv')||scope.row.fileName.endsWith('tif')"
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSee(scope.row)"
+            > {{ $t('预览') }}</el-button>
+            <el-button
+              v-if="scope.row.fileName.endsWith('ppt')||scope.row.fileName.endsWith('pptx') "
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSeePPT(scope.row)"
+            > {{ $t('ppt预览') }}</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-download"
+              @click="handleDownload(scope.row)"
+            >{{ $t('下载') }}</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteDoc(scope.row)"
+            >{{ $t('删除') }}</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
+    <!-- 统计至SAI检查台账对话框 -->
+    <el-dialog  :close-on-click-modal="false" title="统计至SAI检查台账" :visible.sync="saiOpen" width="80%" append-to-body>
+      <el-table v-loading="loading" :data="saiList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column label="检查的装置/设施" align="center" prop="plantId" :show-overflow-tooltip="true"/>
+        <el-table-column label="检查日期/时间" align="center" prop="inspectionDate">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.inspectionDate, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="识别出的安全问题" align="center" prop="dificiency" :show-overflow-tooltip="true"/>
+        <el-table-column label="SAI级别" align="center" prop="saiLevel" :show-overflow-tooltip="true" width="100">
+          <template slot-scope="scope">
+            <el-select v-model="scope.row.saiLevel" placeholder="请选择">
+              <el-option key="1" label="1" value="1"></el-option>
+              <el-option key="2" label="2" value="2"></el-option>
+              <el-option key="3" label="3" value="3"></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column label="SAI类别" align="center" prop="category" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <el-select
+              filterable
+              clearable
+              v-model="scope.row.category"
+              placeholder="请选择SAI类别">
+              <el-option
+                v-for="dict in saiCategoryOptions2"
+                :key="dict.dictValue"
+                :label="dict.dictLabel"
+                :value="dict.dictValue"
+              ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column label="采取或要采取的措施" align="center" prop="actions" :show-overflow-tooltip="true"/>
+        <el-table-column label="用户" align="center" prop="userDeptId" :show-overflow-tooltip="true"/>
+        <el-table-column label="数据来源" align="center" prop="source" :show-overflow-tooltip="true"/>
+        <el-table-column label="检查人" align="center" prop="applicantName" :show-overflow-tooltip="true"/>
+      </el-table>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitSaiForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 预览对话框 -->
+    <el-dialog  :close-on-click-modal="false"  v-loading="loadingFlash"     element-loading-background="rgba(0,0,0,0.2)"                 v-dialogDrag :title="pdf.title" :visible.sync="pdf.open"  width="1300px" :center="true" 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" >
+        <iframe id="iFrame" class="iframe-html" :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px" v-if="ppt"></iframe>
+      </div>
+      <div style="padding: 30px; width: 100%; height: 100%;" >
+        <el-carousel class="" ref="carousel"  arrow="always"  v-if="pptView"
+                     height="700px"  trigger="click" :autoplay="false" indicator-position="outside">
+          <el-carousel-item class="lun_img" v-for="item in imgs" v-bind:key="item" >
+            <img :src="item" width="100%" height="100%" object-fit="cover" />
+          </el-carousel-item>
+        </el-carousel>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import { saveAndSubmitApply, submitApply, listApply, getApply, delApply, addApply, updateApply, exportApply, importTemplate, getTeamAnalysis} from "@/api/production/eoegApply";
+  import { addSai } from "@/api/production/eoegSai";
+  import { treeselect, listDept } from "@/api/system/dept";
+  import { getToken } from "@/utils/auth";
+  import Treeselect from "@riophae/vue-treeselect";
+  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+  import SaiApplyDetail from "@/views/approve/approveDetail/sai-apply-detail";
+  import ProcessImg from '@/views/approve/processImg/index';
+  import { listStaffmgrByDeptAndTeam, getLoginStaffInfo } from "@/api/plant/staffmgr";
+  import { allFileList, delCommonfile } from "@/api/common/commonfile";
+  import { categoryList } from "@/api/production/eoegCategory";
+  import { listFile } from "@/api/production/eoegSaiApproveFile";
+  import { selectDevice } from "@/api/invoice/device";
+
+  export default {
+    name: "Apply",
+    components: { Treeselect, SaiApplyDetail, ProcessImg },
+    data() {
+      var validateRecordNo = (rule, value, callback) => {
+        if (this.delayForm.isRecorded == '1') {
+          if (this.delayForm.recordNo == null) {
+            return callback(new Error('开项编号不能为空'));
+          } else {
+            return callback();
+          }
+        } else {
+          return callback();
+        }
+      };
+      var validateApplicantTeam = (rule, value, callback) => {
+        if (!this.applicantTeamDisabled) {
+          if (this.form.applicantTeam == null) {
+            return callback(new Error('登记人班组不能为空'));
+          } else {
+            return callback();
+          }
+        } else {
+          return callback();
+        }
+      };
+      var validateUnsafeStatus = (rule, value, callback) => {
+        if (this.unsafeChoice == '1') {
+          if (this.form.unsafeStatus == null) {
+            return callback(new Error('不安全状态不能为空'));
+          } else {
+            return callback();
+          }
+        } else {
+          return callback();
+        }
+      };
+      var validateUnsafeAction = (rule, value, callback) => {
+        if (this.unsafeChoice == '2') {
+          if (this.form.unsafeAction == null) {
+            return callback(new Error('不安全行为不能为空'));
+          } else {
+            return callback();
+          }
+        } else {
+          return callback();
+        }
+      };
+      return {
+        submitDisabled: false,
+        applyDateRange: [],
+        estimateFinishDateRange: [],
+        // SAI类别列表
+        saiCategoryOptions: [],
+        saiCategoryOptions2: [],
+        fileList: [],
+        // 统计至SAI检查台账的数据
+        saiList: [],
+        // 是显示用统计至SAI检查台账对话框
+        saiOpen: false,
+        // 是否禁用开项编号输入框
+        recordNoDisabled: true,
+        // 当前登录员工
+        loginStaffInfo: {},
+        //图片集合   打开关闭按钮 等等
+        imgs:[],
+        jpgList:[],
+        ppt:false,
+        pptView:false,
+        loadingFlash:false,
+        doc: {
+          file: "",
+          // 是否显示弹出层(报告附件)
+          open: false,
+          // 弹出层标题(报告附件)
+          title: "",
+          // 是否禁用上传
+          isUploading: false,
+          // 是否更新已经存在的用户数据
+          updateSupport: 0,
+          // 报告附件上传位置编号
+          ids: 0,
+          // 设置上传的请求头部
+          headers: { Authorization: "Bearer " + getToken() },
+          // 上传的地址
+          url: process.env.VUE_APP_BASE_API + "/production/saiFile/uploadFile",
+          commonfileList: null,
+          commonfileListApply: null,
+          queryParams: {
+            pId: null,
+            pType: 'saiApply'
+          },
+          pType: 'saiApply',
+          pId: null
+        },
+        // pdf文件参数
+        pdf : {
+          title: '',
+          pdfUrl: '',
+          numPages: null,
+          open: false,
+          pageNum: 1,
+          pageTotalNum: 1,
+          loadedRatio: 0,
+        },
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: false,
+        // 总条数
+        total: 0,
+        // SAI开项管理表格数据
+        applyList: [],
+        // 弹出层标题
+        title: "",
+        // 部门树选项
+        deptOptions: undefined,
+        clientHeight:300,
+        // 是否显示弹出层
+        open: false,
+        // 是否显示延期弹出层
+        delayOpen: false,
+        // 用户导入参数
+        upload: {
+          //下载模板请求地址
+          downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+          //下载模板类型
+          type: 'saiApply',
+          // 是否显示弹出层(用户导入)
+          open: false,
+          // 弹出层标题(用户导入)
+          title: "",
+          // 是否禁用上传
+          isUploading: false,
+          // 是否更新已经存在的用户数据
+          updateSupport: 0,
+          // 设置上传的请求头部
+          headers: { Authorization: "Bearer " + getToken() },
+          // 上传的地址
+          url: process.env.VUE_APP_BASE_API + "/production/apply/importData"
+        },
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 20,
+          saiApplyId: null,
+          deptId: null,
+          applyStatus: null,
+          apNo: null,
+          processId: null,
+          applicant: null,
+          assessor: null,
+          executor: null,
+          inspectors: null,
+          applicantDept: null,
+          applicantTeam: null,
+          description: null,
+          unsafeStatus: null,
+          unsafeAction: null,
+          applyDate: null,
+          taskId: null,
+          handler: null,
+          taskName: null,
+          estimateFinishDate: null,
+          actualFinishDate: null,
+          isRecorded: null,
+          recordNo: null,
+          reaction: null,
+          needVe: null,
+          veItems: null,
+          veResult: null,
+          veItemOther: null,
+          applyDateStart: null,
+          applyDateEnd: null,
+          estimateFinishDateStart: null,
+          estimateFinishDateEnd: null,
+        },
+        // 表单参数
+        form: {},
+        // 延期表单参数
+        delayForm: {},
+        // 延期表单校验
+        delayRules: {
+          estimateFinishDate: [
+            { required: true, message: this.$t('预计完成时间') + this.$t('不能为空'), trigger: "change" }
+          ],
+          isRecorded: [
+            { required: true, message: this.$t('是否录入开项系统') + this.$t('不能为空'), trigger: "change" }
+          ],
+          recordNo: [
+            { validator: validateRecordNo, trigger: 'change' }
+          ],
+        },
+        // 新增/修改表单校验
+        rules: {
+          description: [
+            { required: true, message: this.$t('问题描述') + this.$t('不能为空'), trigger: "change" }
+          ],
+          applicantDept: [
+            { required: true, message: this.$t('登记人部门') + this.$t('不能为空'), trigger: "change" }
+          ],
+          applicantTeam: [
+            { validator: validateApplicantTeam, trigger: 'change' }
+          ],
+          applicant: [
+            { required: true, message: this.$t('登记人') + this.$t('不能为空'), trigger: "change" }
+          ],
+          applyDate: [
+            { required: true, message: this.$t('记录日期') + this.$t('不能为空'), trigger: "change" }
+          ],
+          workArea: [
+            { required: true, message: this.$t('片区') + this.$t('不能为空'), trigger: "change" }
+          ],
+          unsafeStatus: [
+            { validator: validateUnsafeStatus, trigger: 'change' }
+          ],
+          unsafeAction: [
+            { validator: validateUnsafeAction, trigger: 'change' }
+          ],
+          saiLevel: [
+            { required: true, message: this.$t('SAI级别') + this.$t('不能为空'), trigger: "change" }
+          ],
+          category: [
+            { required: true, message: this.$t('SAI类别') + this.$t('不能为空'), trigger: "change" }
+          ],
+        },
+        // 申请状态字典
+        applyStatusOptions: [],
+        // 登记人班组字典
+        applicantTeamOptions: [],
+        // 登记人部门列表
+        applicantDeptOptions: [],
+        // 登记人列表
+        applicantOptions: [],
+        // 不安全状态字典
+        unsafeStatusOptions: [],
+        // 不安全行为字典
+        unsafeActionOptions: [],
+        // 是否显示SAI开项申请详情对话框
+        saiApplyVisible: false,
+        // 是否显示流程图对话框
+        processImgVisible: null,
+        // 不安全状态/行为选项
+        unsafeChoice: '1',
+        // 是否禁用不安全状态下拉框
+        unsafeStatusDisabled: false,
+        // 是否禁用不安全行为下拉框
+        unsafeActionDisabled: true,
+        // 是否禁用班组下拉框
+        applicantTeamDisabled: false,
+        workAreaList: [],
+        countA: 0,
+        countB: 0,
+        countC: 0,
+        countD: 0,
+      };
+    },
+    watch: {
+      // 根据名称筛选部门树
+      deptName(val) {
+        this.$refs.tree.filter(val);
+      }
+    },
+    created() {
+      //设置表格高度对应屏幕高度
+      this.$nextTick(() => {
+        this.clientHeight = document.body.clientHeight -250
+      })
+      this.getList();
+      this.getTreeselect();
+      // 加载申请状态字典
+      this.getDicts("SAI_APPLY_STATUS").then(response => {
+        this.applyStatusOptions = response.data;
+      });
+      // 加载登记人班组字典
+      this.getDicts("TEAM_DIVIDE").then(response => {
+        this.applicantTeamOptions = response.data;
+      });
+      // 加载登记人部门列表
+      this.getApplicantDeptOptions();
+      // 加载登记人列表
+      this.listStaffmgrByDeptAndTeam(null, null);
+      // 加载不安全状态字典
+      this.getDicts("SAI_UNSAFE_STATUS").then(response => {
+        this.unsafeStatusOptions = response.data;
+      });
+      // 加载不安全行为字典
+      this.getDicts("SAI_UNSAFE_ACTION").then(response => {
+        this.unsafeActionOptions = response.data;
+      });
+      // 加载当前登录员工信息
+      this.getLoginStaffInfo();
+      this.getCategoryList();
+      this.getWorkAreaList();
+      this.getTeamTable();
+    },
+    methods: {
+      getTeamTable() {
+        getTeamAnalysis().then(response => {
+          let data = response.data;
+          for (let i = 0; i < data.length; i++) {
+            let applicantTeam = data[i].applicantTeam;
+            let teamCount = data[i].teamCount;
+            if (applicantTeam == 'A') {
+              if (teamCount != '') {
+                this.countA = teamCount;
+              }
+            } else if (applicantTeam == 'B') {
+              if (teamCount != '') {
+                this.countB = teamCount;
+              }
+            } else if (applicantTeam == 'C') {
+              if (teamCount != '') {
+                this.countC = teamCount;
+              }
+            } else if (applicantTeam == 'D') {
+              if (teamCount != '') {
+                this.countD = teamCount;
+              }
+            }
+          }
+        });
+      },
+      getWorkAreaList() {
+        selectDevice().then(response => {
+          let data = response.data;
+          for (let i = 0; i < data.length; i++) {
+            this.workAreaList.push(data[i]);
+          }
+        });
+      },
+      // 处理SAI级别下拉框选中事件
+      handleSaiLevelChange() {
+        this.saiCategoryOptions2 = [];
+        let saiLevel = this.form.saiLevel;
+        let saiCategoryOptionsTemp = [];
+        for (let i = 0; i < this.saiCategoryOptions.length; i++) {
+          if (saiLevel == 1 && this.saiCategoryOptions[i].dictLabel.indexOf("-1-") != -1) {
+            let saiCategoryOption = {
+              dictValue: this.saiCategoryOptions[i].dictValue,
+              dictLabel: this.saiCategoryOptions[i].dictLabel,
+            };
+            saiCategoryOptionsTemp.push(saiCategoryOption);
+          }
+          if (saiLevel == 2 && this.saiCategoryOptions[i].dictLabel.indexOf("-2-") != -1) {
+            let saiCategoryOption = {
+              dictValue: this.saiCategoryOptions[i].dictValue,
+              dictLabel: this.saiCategoryOptions[i].dictLabel,
+            };
+            saiCategoryOptionsTemp.push(saiCategoryOption);
+          }
+          if (saiLevel == 3 && this.saiCategoryOptions[i].dictLabel.indexOf("-3-") != -1) {
+            let saiCategoryOption = {
+              dictValue: this.saiCategoryOptions[i].dictValue,
+              dictLabel: this.saiCategoryOptions[i].dictLabel,
+            };
+            saiCategoryOptionsTemp.push(saiCategoryOption);
+          }
+        }
+        this.saiCategoryOptions2 = saiCategoryOptionsTemp;
+      },
+      // 处理SAI类别下拉框选中事件
+      handleSaiCategoryChange() {
+        for (let i = 0; i < this.saiCategoryOptions.length; i++) {
+          if (this.form.category == this.saiCategoryOptions[i].dictValue) {
+            if (this.saiCategoryOptions[i].dictLabel.indexOf("-1-") != -1) {
+              this.form.saiLevel = 1;
+            }
+            if (this.saiCategoryOptions[i].dictLabel.indexOf("-2-") != -1) {
+              this.form.saiLevel = 2;
+            }
+            if (this.saiCategoryOptions[i].dictLabel.indexOf("-3-") != -1) {
+              this.form.saiLevel = 3;
+            }
+          }
+        }
+      },
+      // SAI类别字典翻译
+      saiCategoryFormat(row, column) {
+        return this.selectDictLabel(this.saiCategoryOptions, row.category);
+      },
+      /** 获取SAI类别列表数据 */
+      getCategoryList() {
+        categoryList().then(response => {
+          let data = response.data;
+          for (let i = 0; i < data.length; i++) {
+            if (data[i].saiCategoryName != null && data[i].saiCategoryName != "") {
+              this.saiCategoryOptions.push({
+                dictLabel: data[i].saiCategoryName,
+                dictValue: data[i].saiCategoryId
+              });
+              this.saiCategoryOptions2.push({
+                dictLabel: data[i].saiCategoryName,
+                dictValue: data[i].saiCategoryId
+              });
+            }
+          }
+        });
+      },
+      /** 是否录入开项系统单选按钮值改变事件 */
+      handleIsRecordedChange() {
+        if (this.delayForm.isRecorded == '1') {
+          this.recordNoDisabled = false;
+        } else if (this.delayForm.isRecorded == '0') {
+          this.recordNoDisabled = true;
+          this.delayForm.recordNo = null;
+        }
+      },
+      /** 文件下载处理 */
+      handleDownload(row) {
+        var name = row.fileName;
+        var url = row.fileUrl;
+        var suffix = url.substring(url.lastIndexOf("."), url.length);
+        const a = document.createElement('a')
+        a.setAttribute('download', name)
+        a.setAttribute('target', '_blank')
+        a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+        a.click()
+      },
+      /** 报告附件按钮操作 */
+      handleDoc(row) {
+        this.doc.id = row.saiApplyId;
+        this.doc.title = "附件";
+        this.doc.open = true;
+        this.doc.queryParams.pId = row.saiApplyId
+        this.doc.pId = row.saiApplyId
+        this.getFileList()
+        this.$nextTick(() => {
+          this.$refs.doc.clearFiles()
+        })
+      },
+      getFileList() {
+        allFileList(this.doc.queryParams).then(response => {
+          this.doc.commonfileList = response;
+        });
+      },
+      /** 附件上传中处理 */
+      handleFileDocProgress(event, file, fileList) {
+        this.doc.file = file;
+        this.doc.isUploading = true;
+      },
+      // /** 附件上传成功处理 */
+      // handleFileDocSuccess(response, file, fileList) {
+      //   this.doc.isUploading = false;
+      //   this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      //   this.getFileList()
+      // },
+      //附件上传成功处理
+      handleFileDocSuccess(response, file, fileList) {
+        this.doc.isUploading = false;
+        this.fileList = fileList
+        if (response.code == 200){
+          this.$alert(this.$t('导入成功'), this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        }else {
+          this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        }
+      },
+      handleRemove (file, fileList) {
+        this.fileList = fileList
+      },
+      /** 删除按钮操作 */
+      handleDeleteDoc(row) {
+        const ids = row.id || this.ids;
+        this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+          confirmButtonText: this.$t('确定'),
+          cancelButtonText: this.$t('取消'),
+          type: "warning"
+        }).then(function() {
+          return delCommonfile(ids);
+        }).then(() => {
+          this.getFileList();
+          this.msgSuccess(this.$t('删除成功'));
+        })
+      },
+      //文件预览
+      openPdf(){
+        //ppt就跳路由预览,office就直接打开文件新页面
+        const didi={ imgs:this.imgs}
+        if( this.pptView==true&&this.ppt==false){
+          let routeUrl = this.$router.resolve({
+            path: "/cpms/index.html#/pptyulan",
+            query:didi
+          });
+          window.open("/cpms/index.html#/pptyulan?id=" + this.pdf.pdfUrl, '_blank')
+          console.log(this.imgs)
+        }else {
+          window.open(this.pdf.pdfUrl)
+        }
+      },
+      handleSeePPT (row){
+        //ppt预览
+        this.loadingFlash=true
+        this.pdf.open =true
+        this.pdf.title = row.fileName
+        this.pdf.pdfUrl = row.fileUrl
+        this.pptView=true
+        this.ppt=false
+        const formatDate =new FormData();
+        formatDate.append("filepath",row.fileUrl)
+
+        //调用文件预览api
+        let res= this.officeConvert.pptConvertCommon(formatDate)
+
+        //查看接受的全局方法的返回结果 console.log(res)
+        //利用.then方法接受Promise对象
+
+        res.then((result)=>{
+          //关闭加载中
+          this.loadingFlash=false
+
+          //成功时直接给地址
+          this.videoList = result.data.imagePathList
+          //将返回的地址集合遍历添加到绑定的数组中
+          this.imgs=[]
+          for (var key=0;key<this.videoList.length;key++) {
+            this.imgs.push( process.env.VUE_APP_BASE_API+  this.videoList[key]  );
+          }
+        }).catch(result => {
+
+          //请求失败,关闭loading,pdf地址直接为为空,不显示
+          this.pdf.pdfUrl =""
+          this.loadingFlash = false;
+        })
+      },
+      handleSee (row){
+        //office预览
+        this.loadingFlash=true
+        this.pdf.open =true
+        this.pdf.title = row.fileName
+        this.pdf.pdfUrl =""
+
+        this.pptView=false
+        this.ppt=true
+        //如果是PDF等直接可以打开的就不调接口,否则调用接口
+        if(row.fileName.endsWith('pdf')){
+          this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+          this.loadingFlash=false
+        }
+        else{
+          const formatDate =new FormData();
+          formatDate.append("filepath",row.fileUrl)
+
+          //调用文件预览api
+          let res= this.officeConvert.officeConvertCommon(formatDate)
+
+
+          //查看接受的全局方法的返回结果 console.log(res)
+          //利用.then方法接受Promise对象
+          res.then((result)=>{
+            //关闭加载中
+            this.loadingFlash=false
+
+            if(result.msg.includes("csv")){
+              this.pdf.pdfUrl =process.env.VUE_APP_BASE_API+ result.data
+              this.$alert(result.msg, this.$t('检查乱码'), { dangerouslyUseHTMLString: true });
+              //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+
+            }else if(result.msg.includes("不存在")){
+              //文件不存在时提示
+              this.pdf.pdfUrl =""
+              this.$alert(result.msg, this.$t('预览失败'), { dangerouslyUseHTMLString: true });
+              //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+              this.pdf.open =false
+            }else if(result.msg.includes("不支持此格式")){
+
+              this.pdf.pdfUrl =""
+              this.$alert(result.msg, this.$t('预览失败'), { dangerouslyUseHTMLString: true });
+              //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+              this.pdf.open =false
+            } else{
+              //成功时直接给地址
+              this.pdf.pdfUrl =process.env.VUE_APP_BASE_API+ result.data
+            }
+            // this.$nextTick(() => {
+            //   const iframe = window.frames['iFrame']
+            //   const handleLoad = () => {
+            //     setTimeout(() => {
+            //       const Do = (iframe.contentWindow || iframe.contentDocument)
+            //       console.log(Do.document.getElementsByTagName('table')[0])
+            //       Do.document.getElementsByTagName('table')[0].style.width = "100%"
+            //       Do.document.getElementsByTagName('table')[0].setAttribute("class","table")
+            //     }, 500)
+            //   }
+            //   iframe.addEventListener('load', handleLoad, true)
+            // })
+          }).catch(result => {
+
+            //请求失败,关闭loading,pdf地址直接为为空,不显示
+            this.pdf.pdfUrl =""
+            this.loadingFlash = false;
+
+          })
+        }
+
+
+      },
+      /** 加载当前登录员工信息 */
+      getLoginStaffInfo() {
+        getLoginStaffInfo().then(response => {
+          let staff = response.data;
+          if (staff != null) {
+            this.loginStaffInfo = response.data;
+            this.form.applicantDept = staff.unit;
+            if (staff.unit == '10') {
+              this.form.applicantTeam = staff.team;
+            }
+            this.form.applicant = staff.userId;
+          }
+        });
+      },
+      /** 加载登记人部门列表 */
+      getApplicantDeptOptions() {
+        // listDept(null).then(response => {
+        //   let deptList = response.data;
+        //   this.applicantDeptOptions = [];
+        //   for (let i = 0; i < deptList.length; i++) {
+        //     if (deptList[i].deptId == 103 || deptList[i].deptId == 10058 || deptList[i].deptId == 10042) {
+        //       this.applicantDeptOptions.push({
+        //         dictLabel: deptList[i].deptName,
+        //         dictValue: deptList[i].deptId
+        //       });
+        //     }
+        //   }
+        // });
+        this.applicantDeptOptions.push({ dictLabel: "CBP/C", dictValue: '10' });
+        this.applicantDeptOptions.push({ dictLabel: "CTA/B", dictValue: '12' });
+        this.applicantDeptOptions.push({ dictLabel: "CTM/B", dictValue: '14' });
+      },
+      /** 部门/班组值改变事件 */
+      handleDeptOrTeamChange() {
+        this.applicantOptions = [];
+        this.form.applicant = null;
+        let applicantDept = this.form.applicantDept;
+        if (applicantDept != '10') {
+          this.applicantTeamDisabled = true;
+          this.form.applicantTeam = null;
+        } else {
+          this.applicantTeamDisabled = false;
+        }
+        let applicantTeam = this.form.applicantTeam;
+        // 加载登记人列表
+        this.listStaffmgrByDeptAndTeam(applicantDept, null);
+      },
+      /** 加载登记人列表 */
+      listStaffmgrByDeptAndTeam(applicantDept, applicantTeam) {
+        listStaffmgrByDeptAndTeam({
+          deptId: applicantDept,
+          team: applicantTeam
+        }).then(response => {
+          let staffList = response.rows;
+          this.applicantOptions = [];
+          for (let i = 0; i < staffList.length; i++) {
+            let staffOption = {
+              dictLabel: staffList[i].name,
+              dictValue: staffList[i].userId
+            }
+            this.applicantOptions.push(staffOption);
+          }
+        });
+      },
+      /** 不安全行为/状态单选按钮值改变事件 */
+      handleUnsafeChoiceChange() {
+        if (this.unsafeChoice == '1') {
+          this.form.unsafeAction = null;
+          this.unsafeStatusDisabled = false;
+          this.unsafeActionDisabled = true;
+        } else if (this.unsafeChoice == '2') {
+          this.form.unsafeStatus = null;
+          this.unsafeStatusDisabled = true;
+          this.unsafeActionDisabled = false;
+        }
+      },
+      /** 流程图 */
+      processImg (processId) {
+        this.processImgVisible = true;
+        this.$nextTick(() => {
+          this.$refs.processImg.init(processId);
+        })
+      },
+      /** 处理延期操作 */
+      handleDelay(row) {
+        this.reset();
+        const saiApplyId = row.saiApplyId || this.ids
+        getApply(saiApplyId).then(response => {
+          this.delayForm = response.data;
+          if (this.delayForm.isRecorded != null) {
+            this.delayForm.isRecorded = this.delayForm.isRecorded.toString();
+          }
+          this.delayOpen = true;
+          this.title = "SAI开项申请延期";
+        });
+      },
+      /** 处理/详情操作 */
+      handleDetail(row) {
+        this.saiApplyVisible = true;
+        this.$nextTick(() => {
+          this.$refs.saiApplyDetail.init(row.saiApplyId, row.taskId, row.processId, row.taskName);
+        });
+      },
+      /** 提交申请操作 */
+      handleSubmit(row) {
+        this.$confirm('是否确认提交申请?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return submitApply(row.saiApplyId);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("提交申请成功");
+        })
+      },
+      // 申请状态字典翻译
+      applyStatusFormat(row, column) {
+        return this.selectDictLabel(this.applyStatusOptions, row.applyStatus);
+      },
+      // 班组字典翻译
+      teamFormat(row, column) {
+        return this.selectDictLabel(this.applicantTeamOptions, row.applicantTeam);
+      },
+      /** 查询SAI开项管理列表 */
+      getList() {
+        this.loading = true;
+        getLoginStaffInfo().then(response => {
+          let staff = response.data;
+          if (staff != null) {
+            this.loginStaffInfo = response.data;
+          }
+          this.queryParams.tab = 2;
+          if (this.queryParams.workArea != null && this.queryParams.workArea != "") {
+            this.queryParams.workArea = this.queryParams.workArea.join();
+          } else {
+            this.queryParams.workArea = "";
+          }
+          listApply(this.queryParams).then(response => {
+            if (this.queryParams.workArea != null && this.queryParams.workArea != "") {
+              this.queryParams.workArea = this.queryParams.workArea.split(",");
+            }
+            // let rows = response.rows;
+            // this.applyList = [];
+            // for (let i = 0; i < rows.length; i++) {
+            //   // 当前用户为登记人、评估人、整改负责人或验证人(之一)
+            //   if ((rows[i].applicant != null && rows[i].applicant.indexOf(this.loginStaffInfo.userId) != -1)
+            //     || (rows[i].assessor != null && rows[i].assessor.indexOf(this.loginStaffInfo.userId) != -1)
+            //     || (rows[i].executor != null && rows[i].executor.indexOf(this.loginStaffInfo.userId) != -1)
+            //     || (rows[i].inspectors != null && rows[i].inspectors.indexOf(this.loginStaffInfo.userId) != -1)) {
+            //     this.applyList.push(rows[i]);
+            //   }
+            // }
+            this.applyList = response.rows;
+            this.total = response.total;
+            this.loading = false;
+          });
+        });
+      },
+      /** 查询部门下拉树结构 */
+      getTreeselect() {
+        treeselect().then(response => {
+          this.deptOptions = response.data;
+        });
+      },
+      // 取消按钮
+      cancel() {
+        this.delayOpen = false;
+        this.saiOpen = false;
+        this.open = false;
+        this.reset();
+      },
+      // 表单重置
+      reset() {
+        this.form = {
+          saiApplyId: null,
+          delFlag: null,
+          createBy: null,
+          createTime: null,
+          updateBy: null,
+          updateTime: null,
+          deptId: null,
+          applyStatus: null,
+          apNo: null,
+          processId: null,
+          applicant: null,
+          assessor: null,
+          executor: null,
+          inspectors: null,
+          applicantDept: null,
+          applicantTeam: null,
+          description: null,
+          unsafeStatus: null,
+          unsafeAction: null,
+          applyDate: new Date(),
+          taskId: null,
+          handler: null,
+          taskName: null,
+          estimateFinishDate: null,
+          actualFinishDate: null,
+          isRecorded: null,
+          recordNo: null,
+          reaction: null,
+          needVe: null,
+          veItems: null,
+          veResult: null,
+          veItemOther: null,
+          applyDateStart: null,
+          applyDateEnd: null,
+          estimateFinishDateStart: null,
+          estimateFinishDateEnd: null,
+        };
+        this.resetForm("form");
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        if (this.applyDateRange != null) {
+          this.queryParams.applyDateStart = this.applyDateRange[0];
+          this.queryParams.applyDateEnd = this.applyDateRange[1];
+        } else {
+          this.queryParams.applyDateStart = null;
+          this.queryParams.applyDateEnd = null;
+        }
+        if (this.estimateFinishDateRange != null) {
+          this.queryParams.estimateFinishDateStart = this.estimateFinishDateRange[0];
+          this.queryParams.estimateFinishDateEnd = this.estimateFinishDateRange[1];
+        } else {
+          this.queryParams.estimateFinishDateStart = null;
+          this.queryParams.estimateFinishDateEnd = null;
+        }
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.resetForm("queryForm");
+        this.handleQuery();
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.ids = selection.map(item => item.saiApplyId)
+        this.single = selection.length!==1
+        this.multiple = !selection.length
+      },
+      /** 新增按钮操作 */
+      handleAdd() {
+        this.reset();
+        this.fileList = [];
+        this.open = true;
+        this.title = "添加SAI开项申请";
+        // 加载当前登录员工信息
+        this.getLoginStaffInfo();
+        this.applicantTeamDisabled = false;
+      },
+      /** 修改按钮操作 */
+      handleUpdate(row) {
+        this.reset();
+        const saiApplyId = row.saiApplyId || this.ids
+        listFile({
+          approveId: saiApplyId
+        }).then(response => {
+          this.doc.commonfileListApply = response;
+        });
+        getApply(saiApplyId).then(response => {
+          this.form = response.data;
+          if (this.form.unsafeStatus != null && this.form.unsafeStatus != "") {
+            this.form.unsafeStatus = this.form.unsafeStatus.toString();
+          }
+          if (this.form.unsafeAction != null && this.form.unsafeAction != "") {
+            this.form.unsafeAction = this.form.unsafeAction.toString();
+          }
+          if (this.form.category != null && this.form.category != "") {
+            this.form.category = Number(this.form.category);
+          }
+          this.fileList = [];
+          if (this.form.files.length > 0) {
+            console.log(this.form.files);
+            for (let i = 0; i < this.form.files.length; i++) {
+              let obj = {}
+              obj.name = this.form.files[i].fileName
+              obj.response = {};
+              obj.response.msg = this.form.files[i].fileUrl
+              this.fileList.push(obj)
+            }
+          }
+          this.open = true;
+          this.title = "修改SAI开项申请";
+        });
+      },
+      /** 新增/修改保存按钮 */
+      submitForm() {
+        this.submitDisabled = true;
+        this.form.files = []
+        if (this.fileList.length > 0) {
+          for (let i = 0; i < this.fileList.length; i++) {
+            let obj = {}
+            obj.fileName = this.fileList[i].name
+            obj.fileUrl = this.fileList[i].response.msg
+            this.form.files.push(obj)
+          }
+        }
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if (this.form.saiApplyId != null) {
+              updateApply(this.form).then(response => {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.submitDisabled = false;
+                this.getList();
+              });
+            } else {
+              addApply(this.form).then(response => {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.submitDisabled = false;
+                this.getList();
+              });
+            }
+          } else {
+            this.submitDisabled = false;
+          }
+        });
+      },
+      /** 新增/修改提交按钮 */
+      handleSaveAndSubmit() {
+        this.submitDisabled = true;
+        this.form.files = []
+        if (this.fileList.length > 0) {
+          for (let i = 0; i < this.fileList.length; i++) {
+            let obj = {}
+            obj.fileName = this.fileList[i].name
+            obj.fileUrl = this.fileList[i].response.msg
+            this.form.files.push(obj)
+          }
+        }
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            saveAndSubmitApply(this.form).then(response => {
+              this.msgSuccess("提交成功");
+              this.submitDisabled = false;
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            this.submitDisabled = false;
+          }
+        });
+      },
+      /** 统计至SAI检查台账提交按钮 */
+      submitSaiForm() {
+        for (let i = 0; i < this.saiList.length; i++) {
+          this.saiList[i].plantId = 103;
+          this.saiList[i].userDept = 103;
+          addSai(this.saiList[i]);
+        }
+        this.msgSuccess("提交成功");
+        this.saiOpen = false;
+      },
+      /** 延期提交按钮 */
+      submitDelayForm() {
+        this.$refs["delayForm"].validate(valid => {
+          if (valid) {
+            updateApply(this.delayForm).then(response => {
+              this.msgSuccess("延期成功");
+              this.delayOpen = false;
+              this.getList();
+            });
+          }
+        });
+      },
+      /** 统计至SAI检查台账按钮操作 */
+      handleAddSai(row) {
+        const saiApplyIds = row.saiApplyId || this.ids;
+        if(saiApplyIds.length != 0) {
+          this.saiList = [];
+          for (let i = 0; i < saiApplyIds.length; i ++) {
+            getApply(saiApplyIds[i]).then(response => {
+              let apply = response.data;
+              let sai = {};
+              sai.saiApplyId = apply.saiApplyId;
+              sai.plantId = "CBP/C";
+              sai.userDeptId = "CBP/C";
+              sai.inspectionDate = apply.applyDate;
+              sai.dificiency = apply.description;
+              sai.actions = apply.reaction;
+              sai.source = "装置";
+              sai.deptId = 103;
+              sai.saiLevel = apply.saiLevel;
+              sai.category = Number(apply.category);
+              sai.applicant = apply.applicant;
+              sai.applicantName = apply.applicantName;
+              this.saiList.push(sai);
+            });
+          }
+          this.saiOpen = true;
+        }
+      },
+      /** 删除按钮操作 */
+      handleDelete(row) {
+        const saiApplyIds = row.saiApplyId || this.ids;
+        this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delApply(saiApplyIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+      },
+      /** 导出全部按钮操作 */
+      handleExport() {
+        this.queryParams.ids = null;
+        const queryParams = this.queryParams;
+        this.$confirm('是否确认导出所有SAI开项管理数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportApply(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+      },
+      /** 导出选中数据按钮操作 */
+      handleExportSelected() {
+        if (this.ids.length==0){
+          return this.$alert('请选择要导出的数据项!', "警告", {
+            confirmButtonText: "确定",
+            type: "warning"
+          })
+        }
+        if (this.queryParams.workArea != null && this.queryParams.workArea != "") {
+          this.queryParams.workArea = this.queryParams.workArea.join();
+        } else {
+          this.queryParams.workArea = "";
+        }
+        const queryParams = this.queryParams;
+        queryParams.ids=this.ids;
+        console.log(queryParams)
+        this.$confirm('是否确认导出选中的SAI开项管理数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function () {
+          return exportApply(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+      },
+      /** 导入按钮操作 */
+      handleImport() {
+        this.upload.title = "用户导入";
+        this.upload.open = true;
+      },
+      /** 下载模板操作 */
+      importTemplate() {
+        this.$refs['downloadFileForm'].submit()
+      },
+      // 文件上传中处理
+      handleFileUploadProgress(event, file, fileList) {
+        this.upload.isUploading = true;
+      },
+      // 文件上传成功处理
+      handleFileSuccess(response, file, fileList) {
+        this.upload.open = false;
+        this.upload.isUploading = false;
+        this.$refs.upload.clearFiles();
+        if (response.data[0] != null) {
+          this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据') + "," + this.$t('第') + response.data + this.$t('行数据出现错误导入失败')+"。", this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        }else {
+          this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据'), this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        }
+        this.getList();
+      },
+      // 提交上传文件
+      submitFileForm() {
+        this.$refs.upload.submit();
+      }
+    }
+  };
+</script>

+ 1800 - 0
ui/src/views/production/eoegapply/pending/index.vue

@@ -0,0 +1,1800 @@
+<template>
+  <div class="app-container">
+    <!-- 搜索条件 -->
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="登记人部门" prop="applicantDept">
+        <el-form-item prop="applicantDept">
+          <el-select
+            clearable
+            v-model="queryParams.applicantDept"
+            placeholder="请选择部门">
+            <el-option
+              v-for="dict in applicantDeptOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form-item>
+      <el-form-item label="登记人班组" prop="applicantTeam">
+        <el-form-item prop="applicantTeam">
+          <el-select
+            clearable
+            v-model="queryParams.applicantTeam"
+            placeholder="请选择班组">
+            <el-option
+              v-for="dict in applicantTeamOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form-item>
+      <el-form-item label="不安全状态" prop="unsafeStatus">
+        <el-select v-model="queryParams.unsafeStatus" placeholder="请选择不安全状态" clearable>
+          <el-option
+            v-for="dict in unsafeStatusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="不安全行为" prop="unsafeAction">
+        <el-select v-model="queryParams.unsafeAction" placeholder="请选择不安全行为" clearable>
+          <el-option
+            v-for="dict in unsafeActionOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="申请状态" prop="applyStatus">
+        <el-select v-model="queryParams.applyStatus" placeholder="请选择申请状态">
+          <el-option
+            v-for="dict in applyStatusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="问题描述" prop="description">
+        <el-input
+          v-model="queryParams.description"
+          placeholder="请输入问题描述"
+          clearable
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="登记时间" prop="applyDate">
+        <el-date-picker
+          v-model="applyDateRange"
+          type="daterange"
+          align="right"
+          unlink-panels
+          :range-separator="$t('至')"
+          :start-placeholder="$t('开始日期')"
+          :end-placeholder="$t('结束日期')"
+          value-format="yyyy-MM-dd">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="预计完成时间" prop="estimateFinishDate">
+        <el-date-picker
+          v-model="estimateFinishDateRange"
+          type="daterange"
+          align="right"
+          unlink-panels
+          :range-separator="$t('至')"
+          :start-placeholder="$t('开始日期')"
+          :end-placeholder="$t('结束日期')"
+          value-format="yyyy-MM-dd">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="片区" prop="workArea">
+        <el-select
+          clearable
+          multiple
+          v-model="queryParams.workArea"
+          placeholder="请选择片区">
+          <el-option
+            v-for="dict in workAreaList"
+            :key="dict"
+            :label="dict"
+            :value="dict"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <!-- 操作按钮 -->
+    <el-row :gutter="10" class="mb8" style="margin-bottom: 0px;">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['production:apply:add']"
+        >新增申请单</el-button>
+      </el-col>
+      <!--<el-col :span="1.5">-->
+        <!--<el-button-->
+          <!--type="info"-->
+          <!--icon="el-icon-upload2"-->
+          <!--size="mini"-->
+          <!--@click="handleImport"-->
+          <!--v-hasPermi="['production:apply:edit']"-->
+        <!--&gt;导入</el-button>-->
+      <!--</el-col>-->
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['production:apply:export']"
+        >导出全部</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExportSelected"
+          v-hasPermi="['production:apply:export']"
+        >导出选中数据</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          size="mini"
+          @click="handleAddSai"
+          v-hasPermi="['production:sai:add']"
+        >统计至SAI检查台账</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+    <!-- 各班组当年至今的提交数量 -->
+    <el-descriptions title="" direction="vertical" :column="4" border style="margin-bottom: 20px;">
+      <el-descriptions-item label="A班">
+        <el-tag size="small">{{countA}}</el-tag>
+      </el-descriptions-item>
+      <el-descriptions-item label="B班">
+        <el-tag size="small">{{countB}}</el-tag>
+      </el-descriptions-item>
+      <el-descriptions-item label="C班">
+        <el-tag size="small">{{countC}}</el-tag>
+      </el-descriptions-item>
+      <el-descriptions-item label="D班">
+        <el-tag size="small">{{countD}}</el-tag>
+      </el-descriptions-item>
+    </el-descriptions>
+    <!-- 总表 -->
+    <el-table v-loading="loading" :data="applyList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="问题描述" align="center" prop="description" :show-overflow-tooltip="true" width="200"/>
+      <el-table-column label="片区" align="center" prop="workArea" :show-overflow-tooltip="true"/>
+      <el-table-column label="申请状态" align="center" prop="applyStatus" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span v-if="scope.row.applyStatus == 0"><el-tag type="info">未提交</el-tag></span>
+          <span v-if="scope.row.applyStatus == 1"><el-tag type="warning">待评估</el-tag></span>
+          <span v-if="scope.row.applyStatus == 2"><el-tag type="warning">进行中</el-tag></span>
+          <span v-if="scope.row.applyStatus == 3"><el-tag type="warning">待验收</el-tag></span>
+          <span v-if="scope.row.applyStatus == 4"><el-tag type="success">已完成</el-tag></span>
+          <span v-if="scope.row.applyStatus == 5"><el-tag type="info">已取消</el-tag></span>
+        </template>
+      </el-table-column>
+      <el-table-column label="登记人部门" align="center" prop="applicantDeptName" :show-overflow-tooltip="true"/>
+      <el-table-column label="登记人班组" align="center" prop="applicantTeam" :show-overflow-tooltip="true" :formatter="teamFormat"/>
+      <el-table-column label="登记人" align="center" prop="applicantName" :show-overflow-tooltip="true"/>
+      <el-table-column label="当前处理人" align="center" prop="handlerName" :show-overflow-tooltip="true"/>
+      <el-table-column label="整改负责人" align="center" prop="executorName" :show-overflow-tooltip="true"/>
+      <el-table-column label="登记时间" align="center" prop="applyDate" width="100" sortable>
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.applyDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="预计完成时间" align="center" prop="estimateFinishDate" width="100" sortable>
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.estimateFinishDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="实际完成时间" align="center" prop="actualFinishDate" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.actualFinishDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="是否录入开项系统" align="center" prop="isRecorded" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span>{{ scope.row.isRecorded == 1 ? "是" : "否" }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="开项编号" align="center" prop="recordNo" :show-overflow-tooltip="true"/>
+      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <!-- 申请已提交操作 -->
+          <!-- 申请状态为进行中/待验收 -->
+          <!-- 当前登录用户为张力飞 -->
+          <el-button
+            size="mini"
+            type="text"
+            @click="handleDelay(scope.row)"
+            v-if="(scope.row.applyStatus == 2 || scope.row.applyStatus == 3)
+            && loginStaffInfo.userId == '20276'"
+          >延期</el-button>
+          <!-- 申请状态为待评估/进行中/待验收 -->
+          <!-- 当前登录用户为处理人(之一)或张力飞 -->
+          <el-button
+            size="mini"
+            type="text"
+            @click="handleDetail(scope.row)"
+            icon="el-icon-edit-outline"
+            v-if="(scope.row.applyStatus == 1 || scope.row.applyStatus == 2 || scope.row.applyStatus == 3)
+            && ((scope.row.handler.indexOf(loginStaffInfo.userId) != -1) || loginStaffInfo.userId == '20276')"
+          >处理</el-button>
+          <!-- 申请状态为已完成/已中止-->
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="handleDetail(scope.row)"
+            v-if="scope.row.applyStatus == 4 || scope.row.applyStatus == 5"
+          >详情</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            @click="processImg(scope.row.processId)"
+            v-if="scope.row.applyStatus != 0"
+          >{{ $t('流程图') }}</el-button>
+          <!-- 申请未提交操作 -->
+          <!-- 申请状态为未提交 -->
+          <!-- 当前登录用户为处理人(之一) -->
+          <span v-if="scope.row.applyStatus == 0 && scope.row.handler.indexOf(loginStaffInfo.userId) != -1">
+            <el-button
+              size="mini"
+              type="text"
+              @click="handleSubmit(scope.row)"
+              v-hasPermi="['production:apply:edit']"
+              icon="el-icon-s-claim"
+            >提交申请</el-button>
+            <!--<el-button-->
+            <!--size="mini"-->
+            <!--type="text"-->
+            <!--icon="el-icon-document"-->
+            <!--@click="handleDoc(scope.row)"-->
+            <!--&gt;上传附件</el-button>-->
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-edit"
+              @click="handleUpdate(scope.row)"
+              v-hasPermi="['production:apply:edit']"
+            >修改</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDelete(scope.row)"
+              v-hasPermi="['production:apply:remove']"
+            >删除</el-button>
+          </span>
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 分页 -->
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+    <!-- 添加或修改SAI开项管理对话框 -->
+    <el-dialog  :close-on-click-modal="false" :title="title" :visible.sync="open" width="60%" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="0px">
+        <el-descriptions title="" :column="3" border>
+          <el-descriptions-item label="登记人部门">
+            <el-form-item prop="applicantDept">
+              <el-select
+                filterable
+                clearable
+                v-model="form.applicantDept"
+                @change="handleDeptOrTeamChange"
+                placeholder="请选择部门">
+                <el-option
+                  v-for="dict in applicantDeptOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="登记人班组">
+            <el-form-item prop="applicantTeam">
+              <el-select
+                filterable
+                clearable
+                v-model="form.applicantTeam"
+                @change="handleDeptOrTeamChange"
+                :disabled="applicantTeamDisabled"
+                placeholder="请选择班组">
+                <el-option
+                  v-for="dict in applicantTeamOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="登记人">
+            <el-form-item prop="applicant">
+              <el-select
+                filterable
+                clearable
+                v-model="form.applicant"
+                placeholder="请选择登记人">
+                <el-option
+                  v-for="dict in applicantOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="问题描述" :span="3">
+            <el-form-item prop="description">
+              <el-input v-model="form.description" placeholder="请输入问题描述" type="textarea" :rows="3" />
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="SAI级别" :span="1">
+            <el-form-item prop="saiLevel">
+              <el-select v-model="form.saiLevel" placeholder="请选择SAI级别" @change="handleSaiLevelChange">
+                <el-option key="1" label="1" value="1"></el-option>
+                <el-option key="2" label="2" value="2"></el-option>
+                <el-option key="3" label="3" value="3"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="SAI类别" :span="1">
+            <el-form-item prop="category">
+              <el-select
+                @change="handleSaiCategoryChange"
+                filterable
+                clearable
+                v-model="form.category"
+                placeholder="请选择SAI类别">
+                <el-option
+                  v-for="dict in saiCategoryOptions2"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="片区" :span="1">
+            <el-form-item prop="workArea">
+              <el-select
+                @change="handleSaiCategoryChange"
+                filterable
+                clearable
+                v-model="form.workArea"
+                placeholder="请选择片区">
+                <el-option
+                  v-for="dict in workAreaList"
+                  :key="dict"
+                  :label="dict"
+                  :value="dict"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="隐患" :span="3">
+            <el-radio v-model="unsafeChoice" label="1" @change="handleUnsafeChoiceChange" style="margin-right: 10px;">不安全状态</el-radio>
+            <el-form-item prop="unsafeStatus" style="display: inline-block;">
+              <el-select v-model="form.unsafeStatus" filterable placeholder="请选择不安全状态" :disabled="unsafeStatusDisabled" style="margin-right: 20px;" clearable>
+                <el-option
+                  v-for="dict in unsafeStatusOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-radio v-model="unsafeChoice" label="2" @change="handleUnsafeChoiceChange" style="margin-right: 10px;">不安全行为</el-radio>
+            <el-form-item prop="unsafeAction" style="display: inline-block;">
+              <el-select v-model="form.unsafeAction" filterable placeholder="请选择不安全行为" :disabled="unsafeActionDisabled" clearable>
+                <el-option
+                  v-for="dict in unsafeActionOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="附件" :span="3">
+            <el-form-item label="" prop="fileUrl">
+              <el-upload
+                ref="doc"
+                :limit="5"
+                :headers="doc.headers"
+                :action="doc.url"
+                :disabled="doc.isUploading"
+                :on-progress="handleFileDocProgress"
+                :on-success="handleFileDocSuccess"
+                :on-remove="handleRemove"
+                :auto-upload="true"
+                :file-list="fileList"
+                drag
+              >
+                <i class="el-icon-upload"></i>
+                <div class="el-upload__text">
+                  {{ $t('将文件拖到此处,或') }}
+                  <em>{{ $t('点击上传') }}</em>
+                </div>
+              </el-upload>
+            </el-form-item>
+            <el-table :data="doc.commonfileListApply" border v-if="form.saiApplyId">
+              <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+                <template slot-scope="scope">
+                  <a  class="link-type"  @click="handleDownload(scope.row)">
+                    <span>{{ scope.row.fileName }}</span>
+                  </a>
+                </template>
+              </el-table-column>
+              <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
+                <template slot-scope="scope">
+                  <el-button
+                    v-if="scope.row.fileName.endsWith('pdf')||scope.row.fileName.endsWith('xlsx')||scope.row.fileName.endsWith('md')
+                 ||scope.row.fileName.endsWith('docx')||scope.row.fileName.endsWith('doc')||scope.row.fileName.endsWith('txt')
+                 ||scope.row.fileName.endsWith('jpg')||scope.row.fileName.endsWith('png')||scope.row.fileName.endsWith('csv')
+                 ||scope.row.fileName.endsWith('mp4')||scope.row.fileName.endsWith('svg')||scope.row.fileName.endsWith('dwg')
+                 ||scope.row.fileName.endsWith('flv')||scope.row.fileName.endsWith('swf')||scope.row.fileName.endsWith('gif')
+                 ||scope.row.fileName.endsWith('3gp')||scope.row.fileName.endsWith('mkv')||scope.row.fileName.endsWith('tif')"
+                    size="mini"
+                    type="text"
+                    icon="el-icon-view"
+                    @click="handleSee(scope.row)"
+                  > {{ $t('预览') }}</el-button>
+                  <el-button
+                    v-if="scope.row.fileName.endsWith('ppt')||scope.row.fileName.endsWith('pptx') "
+                    size="mini"
+                    type="text"
+                    icon="el-icon-view"
+                    @click="handleSeePPT(scope.row)"
+                  > {{ $t('ppt预览') }}</el-button>
+                  <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-download"
+                    @click="handleDownload(scope.row)"
+                  >{{ $t('下载') }}</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </el-descriptions-item>
+          <el-descriptions-item label="登记时间">
+            <el-form-item prop="applyDate">
+              <el-date-picker
+                size="small"
+                style="width: 200px"
+                v-model="form.applyDate"
+                type="date"
+                value-format="yyyy-MM-dd"
+                placeholder="选择登记时间">
+              </el-date-picker>
+            </el-form-item>
+          </el-descriptions-item>
+        </el-descriptions>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="handleSaveAndSubmit" :disabled="submitDisabled">提 交</el-button>
+        <el-button @click="submitForm" :disabled="submitDisabled">保 存</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 延期对话框 -->
+    <el-dialog  :close-on-click-modal="false" :title="title" :visible.sync="delayOpen" width="25%" append-to-body>
+      <el-form ref="delayForm" :model="delayForm" :rules="delayRules" label-width="136px">
+        <el-form-item prop="estimateFinishDate" label="预计完成时间">
+          <el-date-picker
+            clearable
+            size="small"
+            style="width: 200px"
+            v-model="delayForm.estimateFinishDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择预计完成时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item prop="isRecorded" label="是否录入开项系统">
+          <el-radio v-model="delayForm.isRecorded" label="1" @change="handleIsRecordedChange">是</el-radio>
+          <el-radio v-model="delayForm.isRecorded" label="0" @change="handleIsRecordedChange">否</el-radio>
+        </el-form-item>
+        <el-form-item prop="recordNo" label="开项编号">
+          <el-input v-model="delayForm.recordNo" placeholder="请输入开项编号" :disabled="recordNoDisabled"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitDelayForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 用户导入对话框 -->
+    <el-dialog  :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</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">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- SAI开项管理流转详情对话框 -->
+    <sai-apply-detail v-if="saiApplyVisible" ref="saiApplyDetail" @refreshDataList="getList"></sai-apply-detail>
+    <!-- 流程图对话框 -->
+    <process-img v-if="processImgVisible" ref="processImg" @refreshDataList="getList"></process-img>
+    <!-- 附件对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="700px" append-to-body>
+      <el-upload
+        ref="doc"
+        :limit="50"
+        :headers="doc.headers"
+        :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
+        :disabled="doc.isUploading"
+        :on-progress="handleFileDocProgress"
+        :on-success="handleFileDocSuccess"
+        :auto-upload="true"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+      </el-upload>
+      <el-table :data="doc.commonfileList" border>
+        <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <a  class="link-type"  @click="handleDownload(scope.row)">
+              <span>{{ scope.row.fileName }}</span>
+            </a>
+          </template>
+        </el-table-column>
+        <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
+        <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
+        <el-table-column :label="$t('上传时间')" align="center" prop="createdate" :show-overflow-tooltip="true" width="120"/>
+        <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              v-if="scope.row.fileName.endsWith('pdf')||scope.row.fileName.endsWith('xlsx')||scope.row.fileName.endsWith('md')
+                 ||scope.row.fileName.endsWith('docx')||scope.row.fileName.endsWith('doc')||scope.row.fileName.endsWith('txt')
+                 ||scope.row.fileName.endsWith('jpg')||scope.row.fileName.endsWith('png')||scope.row.fileName.endsWith('csv')
+                 ||scope.row.fileName.endsWith('mp4')||scope.row.fileName.endsWith('svg')||scope.row.fileName.endsWith('dwg')
+                 ||scope.row.fileName.endsWith('flv')||scope.row.fileName.endsWith('swf')||scope.row.fileName.endsWith('gif')
+                 ||scope.row.fileName.endsWith('3gp')||scope.row.fileName.endsWith('mkv')||scope.row.fileName.endsWith('tif')"
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSee(scope.row)"
+            > {{ $t('预览') }}</el-button>
+            <el-button
+              v-if="scope.row.fileName.endsWith('ppt')||scope.row.fileName.endsWith('pptx') "
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSeePPT(scope.row)"
+            > {{ $t('ppt预览') }}</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-download"
+              @click="handleDownload(scope.row)"
+            >{{ $t('下载') }}</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteDoc(scope.row)"
+            >{{ $t('删除') }}</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
+    <!-- 统计至SAI检查台账对话框 -->
+    <el-dialog  :close-on-click-modal="false" title="统计至SAI检查台账" :visible.sync="saiOpen" width="80%" append-to-body>
+      <el-table v-loading="loading" :data="saiList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column label="检查的装置/设施" align="center" prop="plantId" :show-overflow-tooltip="true"/>
+        <el-table-column label="检查日期/时间" align="center" prop="inspectionDate">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.inspectionDate, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="识别出的安全问题" align="center" prop="dificiency" :show-overflow-tooltip="true"/>
+        <el-table-column label="SAI级别" align="center" prop="saiLevel" :show-overflow-tooltip="true" width="100">
+          <template slot-scope="scope">
+            <el-select v-model="scope.row.saiLevel" placeholder="请选择">
+              <el-option key="1" label="1" value="1"></el-option>
+              <el-option key="2" label="2" value="2"></el-option>
+              <el-option key="3" label="3" value="3"></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column label="SAI类别" align="center" prop="category" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <el-select
+              filterable
+              clearable
+              v-model="scope.row.category"
+              placeholder="请选择SAI类别">
+              <el-option
+                v-for="dict in saiCategoryOptions2"
+                :key="dict.dictValue"
+                :label="dict.dictLabel"
+                :value="dict.dictValue"
+              ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column label="采取或要采取的措施" align="center" prop="actions" :show-overflow-tooltip="true"/>
+        <el-table-column label="用户" align="center" prop="userDeptId" :show-overflow-tooltip="true"/>
+        <el-table-column label="数据来源" align="center" prop="source" :show-overflow-tooltip="true"/>
+        <el-table-column label="检查人" align="center" prop="applicantName" :show-overflow-tooltip="true"/>
+      </el-table>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitSaiForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 预览对话框 -->
+    <el-dialog  :close-on-click-modal="false"  v-loading="loadingFlash"     element-loading-background="rgba(0,0,0,0.2)"                 v-dialogDrag :title="pdf.title" :visible.sync="pdf.open"  width="1300px" :center="true" 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" >
+        <iframe id="iFrame" class="iframe-html" :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px" v-if="ppt"></iframe>
+      </div>
+      <div style="padding: 30px; width: 100%; height: 100%;" >
+        <el-carousel class="" ref="carousel"  arrow="always"  v-if="pptView"
+                     height="700px"  trigger="click" :autoplay="false" indicator-position="outside">
+          <el-carousel-item class="lun_img" v-for="item in imgs" v-bind:key="item" >
+            <img :src="item" width="100%" height="100%" object-fit="cover" />
+          </el-carousel-item>
+        </el-carousel>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import { saveAndSubmitApply, submitApply, listApply, getApply, delApply, addApply, updateApply, exportApply, importTemplate, getTeamAnalysis} from "@/api/production/eoegApply";
+  import { addSai } from "@/api/production/eoegSai";
+  import { treeselect, listDept } from "@/api/system/dept";
+  import { getToken } from "@/utils/auth";
+  import Treeselect from "@riophae/vue-treeselect";
+  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+  import SaiApplyDetail from "@/views/approve/approveDetail/sai-apply-detail";
+  import ProcessImg from '@/views/approve/processImg/index';
+  import { listStaffmgrByDeptAndTeam, getLoginStaffInfo } from "@/api/plant/staffmgr";
+  import { allFileList, delCommonfile } from "@/api/common/commonfile";
+  import { categoryList } from "@/api/production/eoegCategory";
+  import { listFile } from "@/api/production/eoegSaiApproveFile";
+  import { selectDevice } from "@/api/invoice/device";
+
+  export default {
+    name: "Apply",
+    components: { Treeselect, SaiApplyDetail, ProcessImg },
+    data() {
+      var validateRecordNo = (rule, value, callback) => {
+        if (this.delayForm.isRecorded == '1') {
+          if (this.delayForm.recordNo == null) {
+            return callback(new Error('开项编号不能为空'));
+          } else {
+            return callback();
+          }
+        } else {
+          return callback();
+        }
+      };
+      var validateApplicantTeam = (rule, value, callback) => {
+        if (!this.applicantTeamDisabled) {
+          if (this.form.applicantTeam == null) {
+            return callback(new Error('登记人班组不能为空'));
+          } else {
+            return callback();
+          }
+        } else {
+          return callback();
+        }
+      };
+      var validateUnsafeStatus = (rule, value, callback) => {
+        if (this.unsafeChoice == '1') {
+          if (this.form.unsafeStatus == null) {
+            return callback(new Error('不安全状态不能为空'));
+          } else {
+            return callback();
+          }
+        } else {
+          return callback();
+        }
+      };
+      var validateUnsafeAction = (rule, value, callback) => {
+        if (this.unsafeChoice == '2') {
+          if (this.form.unsafeAction == null) {
+            return callback(new Error('不安全行为不能为空'));
+          } else {
+            return callback();
+          }
+        } else {
+          return callback();
+        }
+      };
+      return {
+        submitDisabled: false,
+        applyDateRange: [],
+        estimateFinishDateRange: [],
+        // SAI类别列表
+        saiCategoryOptions: [],
+        saiCategoryOptions2: [],
+        fileList: [],
+        // 统计至SAI检查台账的数据
+        saiList: [],
+        // 是显示用统计至SAI检查台账对话框
+        saiOpen: false,
+        // 是否禁用开项编号输入框
+        recordNoDisabled: true,
+        // 当前登录员工
+        loginStaffInfo: {},
+        //图片集合   打开关闭按钮 等等
+        imgs:[],
+        jpgList:[],
+        ppt:false,
+        pptView:false,
+        loadingFlash:false,
+        doc: {
+          file: "",
+          // 是否显示弹出层(报告附件)
+          open: false,
+          // 弹出层标题(报告附件)
+          title: "",
+          // 是否禁用上传
+          isUploading: false,
+          // 是否更新已经存在的用户数据
+          updateSupport: 0,
+          // 报告附件上传位置编号
+          ids: 0,
+          // 设置上传的请求头部
+          headers: { Authorization: "Bearer " + getToken() },
+          // 上传的地址
+          url: process.env.VUE_APP_BASE_API + "/production/saiFile/uploadFile",
+          commonfileList: null,
+          commonfileListApply: null,
+          queryParams: {
+            pId: null,
+            pType: 'saiApply'
+          },
+          pType: 'saiApply',
+          pId: null
+        },
+        // pdf文件参数
+        pdf : {
+          title: '',
+          pdfUrl: '',
+          numPages: null,
+          open: false,
+          pageNum: 1,
+          pageTotalNum: 1,
+          loadedRatio: 0,
+        },
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: false,
+        // 总条数
+        total: 0,
+        // SAI开项管理表格数据
+        applyList: [],
+        // 弹出层标题
+        title: "",
+        // 部门树选项
+        deptOptions: undefined,
+        clientHeight:300,
+        // 是否显示弹出层
+        open: false,
+        // 是否显示延期弹出层
+        delayOpen: false,
+        // 用户导入参数
+        upload: {
+          //下载模板请求地址
+          downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+          //下载模板类型
+          type: 'saiApply',
+          // 是否显示弹出层(用户导入)
+          open: false,
+          // 弹出层标题(用户导入)
+          title: "",
+          // 是否禁用上传
+          isUploading: false,
+          // 是否更新已经存在的用户数据
+          updateSupport: 0,
+          // 设置上传的请求头部
+          headers: { Authorization: "Bearer " + getToken() },
+          // 上传的地址
+          url: process.env.VUE_APP_BASE_API + "/production/apply/importData"
+        },
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 20,
+          saiApplyId: null,
+          deptId: null,
+          applyStatus: null,
+          apNo: null,
+          processId: null,
+          applicant: null,
+          assessor: null,
+          executor: null,
+          inspectors: null,
+          applicantDept: null,
+          applicantTeam: null,
+          description: null,
+          unsafeStatus: null,
+          unsafeAction: null,
+          applyDate: null,
+          taskId: null,
+          handler: null,
+          taskName: null,
+          estimateFinishDate: null,
+          actualFinishDate: null,
+          isRecorded: null,
+          recordNo: null,
+          reaction: null,
+          needVe: null,
+          veItems: null,
+          veResult: null,
+          veItemOther: null,
+          applyDateStart: null,
+          applyDateEnd: null,
+          estimateFinishDateStart: null,
+          estimateFinishDateEnd: null,
+        },
+        // 表单参数
+        form: {},
+        // 延期表单参数
+        delayForm: {},
+        // 延期表单校验
+        delayRules: {
+          estimateFinishDate: [
+            { required: true, message: this.$t('预计完成时间') + this.$t('不能为空'), trigger: "change" }
+          ],
+          isRecorded: [
+            { required: true, message: this.$t('是否录入开项系统') + this.$t('不能为空'), trigger: "change" }
+          ],
+          recordNo: [
+            { validator: validateRecordNo, trigger: 'change' }
+          ],
+        },
+        // 新增/修改表单校验
+        rules: {
+          description: [
+            { required: true, message: this.$t('问题描述') + this.$t('不能为空'), trigger: "change" }
+          ],
+          applicantDept: [
+            { required: true, message: this.$t('登记人部门') + this.$t('不能为空'), trigger: "change" }
+          ],
+          applicantTeam: [
+            { validator: validateApplicantTeam, trigger: 'change' }
+          ],
+          applicant: [
+            { required: true, message: this.$t('登记人') + this.$t('不能为空'), trigger: "change" }
+          ],
+          applyDate: [
+            { required: true, message: this.$t('记录日期') + this.$t('不能为空'), trigger: "change" }
+          ],
+          workArea: [
+            { required: true, message: this.$t('片区') + this.$t('不能为空'), trigger: "change" }
+          ],
+          unsafeStatus: [
+            { validator: validateUnsafeStatus, trigger: 'change' }
+          ],
+          unsafeAction: [
+            { validator: validateUnsafeAction, trigger: 'change' }
+          ],
+          saiLevel: [
+            { required: true, message: this.$t('SAI级别') + this.$t('不能为空'), trigger: "change" }
+          ],
+          category: [
+            { required: true, message: this.$t('SAI类别') + this.$t('不能为空'), trigger: "change" }
+          ],
+        },
+        // 申请状态字典
+        applyStatusOptions: [],
+        // 登记人班组字典
+        applicantTeamOptions: [],
+        // 登记人部门列表
+        applicantDeptOptions: [],
+        // 登记人列表
+        applicantOptions: [],
+        // 不安全状态字典
+        unsafeStatusOptions: [],
+        // 不安全行为字典
+        unsafeActionOptions: [],
+        // 是否显示SAI开项申请详情对话框
+        saiApplyVisible: false,
+        // 是否显示流程图对话框
+        processImgVisible: null,
+        // 不安全状态/行为选项
+        unsafeChoice: '1',
+        // 是否禁用不安全状态下拉框
+        unsafeStatusDisabled: false,
+        // 是否禁用不安全行为下拉框
+        unsafeActionDisabled: true,
+        // 是否禁用班组下拉框
+        applicantTeamDisabled: false,
+        workAreaList: [],
+        countA: 0,
+        countB: 0,
+        countC: 0,
+        countD: 0,
+      };
+    },
+    watch: {
+      // 根据名称筛选部门树
+      deptName(val) {
+        this.$refs.tree.filter(val);
+      }
+    },
+    created() {
+      //设置表格高度对应屏幕高度
+      this.$nextTick(() => {
+        this.clientHeight = document.body.clientHeight -250
+      })
+      this.getList();
+      this.getTreeselect();
+      // 加载申请状态字典
+      this.getDicts("SAI_APPLY_STATUS").then(response => {
+        this.applyStatusOptions = response.data;
+      });
+      // 加载登记人班组字典
+      this.getDicts("TEAM_DIVIDE").then(response => {
+        this.applicantTeamOptions = response.data;
+      });
+      // 加载登记人部门列表
+      this.getApplicantDeptOptions();
+      // 加载登记人列表
+      this.listStaffmgrByDeptAndTeam(null, null);
+      // 加载不安全状态字典
+      this.getDicts("SAI_UNSAFE_STATUS").then(response => {
+        this.unsafeStatusOptions = response.data;
+      });
+      // 加载不安全行为字典
+      this.getDicts("SAI_UNSAFE_ACTION").then(response => {
+        this.unsafeActionOptions = response.data;
+      });
+      // 加载当前登录员工信息
+      this.getLoginStaffInfo();
+      this.getCategoryList();
+      this.getWorkAreaList();
+      this.getTeamTable();
+    },
+    methods: {
+      getTeamTable() {
+        getTeamAnalysis().then(response => {
+          let data = response.data;
+          for (let i = 0; i < data.length; i++) {
+            let applicantTeam = data[i].applicantTeam;
+            let teamCount = data[i].teamCount;
+            if (applicantTeam == 'A') {
+              if (teamCount != '') {
+                this.countA = teamCount;
+              }
+            } else if (applicantTeam == 'B') {
+              if (teamCount != '') {
+                this.countB = teamCount;
+              }
+            } else if (applicantTeam == 'C') {
+              if (teamCount != '') {
+                this.countC = teamCount;
+              }
+            } else if (applicantTeam == 'D') {
+              if (teamCount != '') {
+                this.countD = teamCount;
+              }
+            }
+          }
+        });
+      },
+      getWorkAreaList() {
+        selectDevice().then(response => {
+          let data = response.data;
+          for (let i = 0; i < data.length; i++) {
+            this.workAreaList.push(data[i]);
+          }
+        });
+      },
+      // 处理SAI级别下拉框选中事件
+      handleSaiLevelChange() {
+        this.saiCategoryOptions2 = [];
+        let saiLevel = this.form.saiLevel;
+        let saiCategoryOptionsTemp = [];
+        for (let i = 0; i < this.saiCategoryOptions.length; i++) {
+          if (saiLevel == 1 && this.saiCategoryOptions[i].dictLabel.indexOf("-1-") != -1) {
+            let saiCategoryOption = {
+              dictValue: this.saiCategoryOptions[i].dictValue,
+              dictLabel: this.saiCategoryOptions[i].dictLabel,
+            };
+            saiCategoryOptionsTemp.push(saiCategoryOption);
+          }
+          if (saiLevel == 2 && this.saiCategoryOptions[i].dictLabel.indexOf("-2-") != -1) {
+            let saiCategoryOption = {
+              dictValue: this.saiCategoryOptions[i].dictValue,
+              dictLabel: this.saiCategoryOptions[i].dictLabel,
+            };
+            saiCategoryOptionsTemp.push(saiCategoryOption);
+          }
+          if (saiLevel == 3 && this.saiCategoryOptions[i].dictLabel.indexOf("-3-") != -1) {
+            let saiCategoryOption = {
+              dictValue: this.saiCategoryOptions[i].dictValue,
+              dictLabel: this.saiCategoryOptions[i].dictLabel,
+            };
+            saiCategoryOptionsTemp.push(saiCategoryOption);
+          }
+        }
+        this.saiCategoryOptions2 = saiCategoryOptionsTemp;
+      },
+      // 处理SAI类别下拉框选中事件
+      handleSaiCategoryChange() {
+        for (let i = 0; i < this.saiCategoryOptions.length; i++) {
+          if (this.form.category == this.saiCategoryOptions[i].dictValue) {
+            if (this.saiCategoryOptions[i].dictLabel.indexOf("-1-") != -1) {
+              this.form.saiLevel = 1;
+            }
+            if (this.saiCategoryOptions[i].dictLabel.indexOf("-2-") != -1) {
+              this.form.saiLevel = 2;
+            }
+            if (this.saiCategoryOptions[i].dictLabel.indexOf("-3-") != -1) {
+              this.form.saiLevel = 3;
+            }
+          }
+        }
+      },
+      // SAI类别字典翻译
+      saiCategoryFormat(row, column) {
+        return this.selectDictLabel(this.saiCategoryOptions, row.category);
+      },
+      /** 获取SAI类别列表数据 */
+      getCategoryList() {
+        categoryList().then(response => {
+          let data = response.data;
+          for (let i = 0; i < data.length; i++) {
+            if (data[i].saiCategoryName != null && data[i].saiCategoryName != "") {
+              this.saiCategoryOptions.push({
+                dictLabel: data[i].saiCategoryName,
+                dictValue: data[i].saiCategoryId
+              });
+              this.saiCategoryOptions2.push({
+                dictLabel: data[i].saiCategoryName,
+                dictValue: data[i].saiCategoryId
+              });
+            }
+          }
+        });
+      },
+      /** 是否录入开项系统单选按钮值改变事件 */
+      handleIsRecordedChange() {
+        if (this.delayForm.isRecorded == '1') {
+          this.recordNoDisabled = false;
+        } else if (this.delayForm.isRecorded == '0') {
+          this.recordNoDisabled = true;
+          this.delayForm.recordNo = null;
+        }
+      },
+      /** 文件下载处理 */
+      handleDownload(row) {
+        var name = row.fileName;
+        var url = row.fileUrl;
+        var suffix = url.substring(url.lastIndexOf("."), url.length);
+        const a = document.createElement('a')
+        a.setAttribute('download', name)
+        a.setAttribute('target', '_blank')
+        a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+        a.click()
+      },
+      /** 报告附件按钮操作 */
+      handleDoc(row) {
+        this.doc.id = row.saiApplyId;
+        this.doc.title = "附件";
+        this.doc.open = true;
+        this.doc.queryParams.pId = row.saiApplyId
+        this.doc.pId = row.saiApplyId
+        this.getFileList()
+        this.$nextTick(() => {
+          this.$refs.doc.clearFiles()
+        })
+      },
+      getFileList() {
+        allFileList(this.doc.queryParams).then(response => {
+          this.doc.commonfileList = response;
+        });
+      },
+      /** 附件上传中处理 */
+      handleFileDocProgress(event, file, fileList) {
+        this.doc.file = file;
+        this.doc.isUploading = true;
+      },
+      // /** 附件上传成功处理 */
+      // handleFileDocSuccess(response, file, fileList) {
+      //   this.doc.isUploading = false;
+      //   this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      //   this.getFileList()
+      // },
+      //附件上传成功处理
+      handleFileDocSuccess(response, file, fileList) {
+        this.doc.isUploading = false;
+        this.fileList = fileList
+        if (response.code == 200){
+          this.$alert(this.$t('导入成功'), this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        }else {
+          this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        }
+      },
+      handleRemove (file, fileList) {
+        this.fileList = fileList
+      },
+      /** 删除按钮操作 */
+      handleDeleteDoc(row) {
+        const ids = row.id || this.ids;
+        this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+          confirmButtonText: this.$t('确定'),
+          cancelButtonText: this.$t('取消'),
+          type: "warning"
+        }).then(function() {
+          return delCommonfile(ids);
+        }).then(() => {
+          this.getFileList();
+          this.msgSuccess(this.$t('删除成功'));
+        })
+      },
+      //文件预览
+      openPdf(){
+        //ppt就跳路由预览,office就直接打开文件新页面
+        const didi={ imgs:this.imgs}
+        if( this.pptView==true&&this.ppt==false){
+          let routeUrl = this.$router.resolve({
+            path: "/cpms/index.html#/pptyulan",
+            query:didi
+          });
+          window.open("/cpms/index.html#/pptyulan?id=" + this.pdf.pdfUrl, '_blank')
+          console.log(this.imgs)
+        }else {
+          window.open(this.pdf.pdfUrl)
+        }
+      },
+      handleSeePPT (row){
+        //ppt预览
+        this.loadingFlash=true
+        this.pdf.open =true
+        this.pdf.title = row.fileName
+        this.pdf.pdfUrl = row.fileUrl
+        this.pptView=true
+        this.ppt=false
+        const formatDate =new FormData();
+        formatDate.append("filepath",row.fileUrl)
+
+        //调用文件预览api
+        let res= this.officeConvert.pptConvertCommon(formatDate)
+
+        //查看接受的全局方法的返回结果 console.log(res)
+        //利用.then方法接受Promise对象
+
+        res.then((result)=>{
+          //关闭加载中
+          this.loadingFlash=false
+
+          //成功时直接给地址
+          this.videoList = result.data.imagePathList
+          //将返回的地址集合遍历添加到绑定的数组中
+          this.imgs=[]
+          for (var key=0;key<this.videoList.length;key++) {
+            this.imgs.push( process.env.VUE_APP_BASE_API+  this.videoList[key]  );
+          }
+        }).catch(result => {
+
+          //请求失败,关闭loading,pdf地址直接为为空,不显示
+          this.pdf.pdfUrl =""
+          this.loadingFlash = false;
+        })
+      },
+      handleSee (row){
+        //office预览
+        this.loadingFlash=true
+        this.pdf.open =true
+        this.pdf.title = row.fileName
+        this.pdf.pdfUrl =""
+
+        this.pptView=false
+        this.ppt=true
+        //如果是PDF等直接可以打开的就不调接口,否则调用接口
+        if(row.fileName.endsWith('pdf')){
+          this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+          this.loadingFlash=false
+        }
+        else{
+          const formatDate =new FormData();
+          formatDate.append("filepath",row.fileUrl)
+
+          //调用文件预览api
+          let res= this.officeConvert.officeConvertCommon(formatDate)
+
+
+          //查看接受的全局方法的返回结果 console.log(res)
+          //利用.then方法接受Promise对象
+          res.then((result)=>{
+            //关闭加载中
+            this.loadingFlash=false
+
+            if(result.msg.includes("csv")){
+              this.pdf.pdfUrl =process.env.VUE_APP_BASE_API+ result.data
+              this.$alert(result.msg, this.$t('检查乱码'), { dangerouslyUseHTMLString: true });
+              //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+
+            }else if(result.msg.includes("不存在")){
+              //文件不存在时提示
+              this.pdf.pdfUrl =""
+              this.$alert(result.msg, this.$t('预览失败'), { dangerouslyUseHTMLString: true });
+              //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+              this.pdf.open =false
+            }else if(result.msg.includes("不支持此格式")){
+
+              this.pdf.pdfUrl =""
+              this.$alert(result.msg, this.$t('预览失败'), { dangerouslyUseHTMLString: true });
+              //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+              this.pdf.open =false
+            } else{
+              //成功时直接给地址
+              this.pdf.pdfUrl =process.env.VUE_APP_BASE_API+ result.data
+            }
+            // this.$nextTick(() => {
+            //   const iframe = window.frames['iFrame']
+            //   const handleLoad = () => {
+            //     setTimeout(() => {
+            //       const Do = (iframe.contentWindow || iframe.contentDocument)
+            //       console.log(Do.document.getElementsByTagName('table')[0])
+            //       Do.document.getElementsByTagName('table')[0].style.width = "100%"
+            //       Do.document.getElementsByTagName('table')[0].setAttribute("class","table")
+            //     }, 500)
+            //   }
+            //   iframe.addEventListener('load', handleLoad, true)
+            // })
+          }).catch(result => {
+
+            //请求失败,关闭loading,pdf地址直接为为空,不显示
+            this.pdf.pdfUrl =""
+            this.loadingFlash = false;
+
+          })
+        }
+
+
+      },
+      /** 加载当前登录员工信息 */
+      getLoginStaffInfo() {
+        getLoginStaffInfo().then(response => {
+          let staff = response.data;
+          if (staff != null) {
+            this.loginStaffInfo = response.data;
+            this.form.applicantDept = staff.unit;
+            if (staff.unit == '10') {
+              this.form.applicantTeam = staff.team;
+            }
+            this.form.applicant = staff.userId;
+          }
+        });
+      },
+      /** 加载登记人部门列表 */
+      getApplicantDeptOptions() {
+        // listDept(null).then(response => {
+        //   let deptList = response.data;
+        //   this.applicantDeptOptions = [];
+        //   for (let i = 0; i < deptList.length; i++) {
+        //     if (deptList[i].deptId == 103 || deptList[i].deptId == 10058 || deptList[i].deptId == 10042) {
+        //       this.applicantDeptOptions.push({
+        //         dictLabel: deptList[i].deptName,
+        //         dictValue: deptList[i].deptId
+        //       });
+        //     }
+        //   }
+        // });
+        this.applicantDeptOptions.push({ dictLabel: "CBP/C", dictValue: '10' });
+        this.applicantDeptOptions.push({ dictLabel: "CTA/B", dictValue: '12' });
+        this.applicantDeptOptions.push({ dictLabel: "CTM/B", dictValue: '14' });
+      },
+      /** 部门/班组值改变事件 */
+      handleDeptOrTeamChange() {
+        this.applicantOptions = [];
+        this.form.applicant = null;
+        let applicantDept = this.form.applicantDept;
+        if (applicantDept != '10') {
+          this.applicantTeamDisabled = true;
+          this.form.applicantTeam = null;
+        } else {
+          this.applicantTeamDisabled = false;
+        }
+        let applicantTeam = this.form.applicantTeam;
+        // 加载登记人列表
+        this.listStaffmgrByDeptAndTeam(applicantDept, null);
+      },
+      /** 加载登记人列表 */
+      listStaffmgrByDeptAndTeam(applicantDept, applicantTeam) {
+        listStaffmgrByDeptAndTeam({
+          deptId: applicantDept,
+          team: applicantTeam
+        }).then(response => {
+          let staffList = response.rows;
+          this.applicantOptions = [];
+          for (let i = 0; i < staffList.length; i++) {
+            let staffOption = {
+              dictLabel: staffList[i].name,
+              dictValue: staffList[i].userId
+            }
+            this.applicantOptions.push(staffOption);
+          }
+        });
+      },
+      /** 不安全行为/状态单选按钮值改变事件 */
+      handleUnsafeChoiceChange() {
+        if (this.unsafeChoice == '1') {
+          this.form.unsafeAction = null;
+          this.unsafeStatusDisabled = false;
+          this.unsafeActionDisabled = true;
+        } else if (this.unsafeChoice == '2') {
+          this.form.unsafeStatus = null;
+          this.unsafeStatusDisabled = true;
+          this.unsafeActionDisabled = false;
+        }
+      },
+      /** 流程图 */
+      processImg (processId) {
+        this.processImgVisible = true;
+        this.$nextTick(() => {
+          this.$refs.processImg.init(processId);
+        })
+      },
+      /** 处理延期操作 */
+      handleDelay(row) {
+        this.reset();
+        const saiApplyId = row.saiApplyId || this.ids
+        getApply(saiApplyId).then(response => {
+          this.delayForm = response.data;
+          if (this.delayForm.isRecorded != null) {
+            this.delayForm.isRecorded = this.delayForm.isRecorded.toString();
+          }
+          this.delayOpen = true;
+          this.title = "SAI开项申请延期";
+        });
+      },
+      /** 处理/详情操作 */
+      handleDetail(row) {
+        this.saiApplyVisible = true;
+        this.$nextTick(() => {
+          this.$refs.saiApplyDetail.init(row.saiApplyId, row.taskId, row.processId, row.taskName);
+        });
+      },
+      /** 提交申请操作 */
+      handleSubmit(row) {
+        this.$confirm('是否确认提交申请?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return submitApply(row.saiApplyId);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("提交申请成功");
+        })
+      },
+      // 申请状态字典翻译
+      applyStatusFormat(row, column) {
+        return this.selectDictLabel(this.applyStatusOptions, row.applyStatus);
+      },
+      // 班组字典翻译
+      teamFormat(row, column) {
+        return this.selectDictLabel(this.applicantTeamOptions, row.applicantTeam);
+      },
+      /** 查询SAI开项管理列表 */
+      getList() {
+        this.loading = true;
+        getLoginStaffInfo().then(response => {
+          let staff = response.data;
+          if (staff != null) {
+            this.loginStaffInfo = response.data;
+          }
+          this.queryParams.tab = 1;
+          if (this.queryParams.workArea != null && this.queryParams.workArea != "") {
+            this.queryParams.workArea = this.queryParams.workArea.join();
+          } else {
+            this.queryParams.workArea = "";
+          }
+          listApply(this.queryParams).then(response => {
+            if (this.queryParams.workArea != null && this.queryParams.workArea != "") {
+              this.queryParams.workArea = this.queryParams.workArea.split(",");
+            }
+            // let rows = response.rows;
+            // this.applyList = [];
+            // for (let i = 0; i < rows.length; i++) {
+            //   // 当前用户为流程当前处理人(之一),申请流程未结束
+            //   if (rows[i].handler.indexOf(this.loginStaffInfo.userId) != -1 && rows[i].applyStatus != 4 && rows[i].applyStatus != 5) {
+            //     this.applyList.push(rows[i]);
+            //   }
+            // }
+            this.applyList = response.rows;
+            this.total = response.total;
+            this.loading = false;
+          });
+        });
+      },
+      /** 查询部门下拉树结构 */
+      getTreeselect() {
+        treeselect().then(response => {
+          this.deptOptions = response.data;
+        });
+      },
+      // 取消按钮
+      cancel() {
+        this.delayOpen = false;
+        this.saiOpen = false;
+        this.open = false;
+        this.reset();
+      },
+      // 表单重置
+      reset() {
+        this.form = {
+          saiApplyId: null,
+          delFlag: null,
+          createBy: null,
+          createTime: null,
+          updateBy: null,
+          updateTime: null,
+          deptId: null,
+          applyStatus: null,
+          apNo: null,
+          processId: null,
+          applicant: null,
+          assessor: null,
+          executor: null,
+          inspectors: null,
+          applicantDept: null,
+          applicantTeam: null,
+          description: null,
+          unsafeStatus: null,
+          unsafeAction: null,
+          applyDate: new Date(),
+          taskId: null,
+          handler: null,
+          taskName: null,
+          estimateFinishDate: null,
+          actualFinishDate: null,
+          isRecorded: null,
+          recordNo: null,
+          reaction: null,
+          needVe: null,
+          veItems: null,
+          veResult: null,
+          veItemOther: null,
+          applyDateStart: null,
+          applyDateEnd: null,
+          estimateFinishDateStart: null,
+          estimateFinishDateEnd: null,
+        };
+        this.resetForm("form");
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        if (this.applyDateRange != null) {
+          this.queryParams.applyDateStart = this.applyDateRange[0];
+          this.queryParams.applyDateEnd = this.applyDateRange[1];
+        } else {
+          this.queryParams.applyDateStart = null;
+          this.queryParams.applyDateEnd = null;
+        }
+        if (this.estimateFinishDateRange != null) {
+          this.queryParams.estimateFinishDateStart = this.estimateFinishDateRange[0];
+          this.queryParams.estimateFinishDateEnd = this.estimateFinishDateRange[1];
+        } else {
+          this.queryParams.estimateFinishDateStart = null;
+          this.queryParams.estimateFinishDateEnd = null;
+        }
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.resetForm("queryForm");
+        this.handleQuery();
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.ids = selection.map(item => item.saiApplyId)
+        this.single = selection.length!==1
+        this.multiple = !selection.length
+      },
+      /** 新增按钮操作 */
+      handleAdd() {
+        this.reset();
+        this.fileList = [];
+        this.open = true;
+        this.title = "添加SAI开项申请";
+        // 加载当前登录员工信息
+        this.getLoginStaffInfo();
+        this.applicantTeamDisabled = false;
+      },
+      /** 修改按钮操作 */
+      handleUpdate(row) {
+        this.reset();
+        const saiApplyId = row.saiApplyId || this.ids
+        listFile({
+          approveId: saiApplyId
+        }).then(response => {
+          this.doc.commonfileListApply = response;
+        });
+        getApply(saiApplyId).then(response => {
+          this.form = response.data;
+          if (this.form.unsafeStatus != null && this.form.unsafeStatus != "") {
+            this.form.unsafeStatus = this.form.unsafeStatus.toString();
+          }
+          if (this.form.unsafeAction != null && this.form.unsafeAction != "") {
+            this.form.unsafeAction = this.form.unsafeAction.toString();
+          }
+          if (this.form.category != null && this.form.category != "") {
+            this.form.category = Number(this.form.category);
+          }
+          this.fileList = [];
+          if (this.form.files.length > 0) {
+            console.log(this.form.files);
+            for (let i = 0; i < this.form.files.length; i++) {
+              let obj = {}
+              obj.name = this.form.files[i].fileName
+              obj.response = {};
+              obj.response.msg = this.form.files[i].fileUrl
+              this.fileList.push(obj)
+            }
+          }
+          this.open = true;
+          this.title = "修改SAI开项申请";
+        });
+      },
+      /** 新增/修改保存按钮 */
+      submitForm() {
+        this.submitDisabled = true;
+        this.form.files = []
+        if (this.fileList.length > 0) {
+          for (let i = 0; i < this.fileList.length; i++) {
+            let obj = {}
+            obj.fileName = this.fileList[i].name
+            obj.fileUrl = this.fileList[i].response.msg
+            this.form.files.push(obj)
+          }
+        }
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if (this.form.saiApplyId != null) {
+              updateApply(this.form).then(response => {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.submitDisabled = false;
+                this.getList();
+              });
+            } else {
+              addApply(this.form).then(response => {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.submitDisabled = false;
+                this.getList();
+              });
+            }
+          } else {
+            this.submitDisabled = false;
+          }
+        });
+      },
+      /** 新增/修改提交按钮 */
+      handleSaveAndSubmit() {
+        this.submitDisabled = true;
+        this.form.files = []
+        if (this.fileList.length > 0) {
+          for (let i = 0; i < this.fileList.length; i++) {
+            let obj = {}
+            obj.fileName = this.fileList[i].name
+            obj.fileUrl = this.fileList[i].response.msg
+            this.form.files.push(obj)
+          }
+        }
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            saveAndSubmitApply(this.form).then(response => {
+              this.msgSuccess("提交成功");
+              this.submitDisabled = false;
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            this.submitDisabled = false;
+          }
+        });
+      },
+      /** 统计至SAI检查台账提交按钮 */
+      submitSaiForm() {
+        for (let i = 0; i < this.saiList.length; i++) {
+          this.saiList[i].plantId = 103;
+          this.saiList[i].userDept = 103;
+          addSai(this.saiList[i]);
+        }
+        this.msgSuccess("提交成功");
+        this.saiOpen = false;
+      },
+      /** 延期提交按钮 */
+      submitDelayForm() {
+        this.$refs["delayForm"].validate(valid => {
+          if (valid) {
+            updateApply(this.delayForm).then(response => {
+              this.msgSuccess("延期成功");
+              this.delayOpen = false;
+              this.getList();
+            });
+          }
+        });
+      },
+      /** 统计至SAI检查台账按钮操作 */
+      handleAddSai(row) {
+        const saiApplyIds = row.saiApplyId || this.ids;
+        if(saiApplyIds.length != 0) {
+          this.saiList = [];
+          for (let i = 0; i < saiApplyIds.length; i ++) {
+            getApply(saiApplyIds[i]).then(response => {
+              let apply = response.data;
+              let sai = {};
+              sai.saiApplyId = apply.saiApplyId;
+              sai.plantId = "CBP/C";
+              sai.userDeptId = "CBP/C";
+              sai.inspectionDate = apply.applyDate;
+              sai.dificiency = apply.description;
+              sai.actions = apply.reaction;
+              sai.source = "装置";
+              sai.deptId = 103;
+              sai.saiLevel = apply.saiLevel;
+              sai.category = Number(apply.category);
+              sai.applicant = apply.applicant;
+              sai.applicantName = apply.applicantName;
+              this.saiList.push(sai);
+            });
+          }
+          this.saiOpen = true;
+        }
+      },
+      /** 删除按钮操作 */
+      handleDelete(row) {
+        const saiApplyIds = row.saiApplyId || this.ids;
+        this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delApply(saiApplyIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+      },
+      /** 导出全部按钮操作 */
+      handleExport() {
+        this.queryParams.ids = null;
+        const queryParams = this.queryParams;
+        this.$confirm('是否确认导出所有SAI开项管理数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportApply(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+      },
+      /** 导出选中数据按钮操作 */
+      handleExportSelected() {
+        if (this.ids.length==0){
+          return this.$alert('请选择要导出的数据项!', "警告", {
+            confirmButtonText: "确定",
+            type: "warning"
+          })
+        }
+        if (this.queryParams.workArea != null && this.queryParams.workArea != "") {
+          this.queryParams.workArea = this.queryParams.workArea.join();
+        } else {
+          this.queryParams.workArea = "";
+        }
+        const queryParams = this.queryParams;
+        queryParams.ids=this.ids;
+        console.log(queryParams)
+        this.$confirm('是否确认导出选中的SAI开项管理数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function () {
+          return exportApply(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+      },
+      /** 导入按钮操作 */
+      handleImport() {
+        this.upload.title = "用户导入";
+        this.upload.open = true;
+      },
+      /** 下载模板操作 */
+      importTemplate() {
+        this.$refs['downloadFileForm'].submit()
+      },
+      // 文件上传中处理
+      handleFileUploadProgress(event, file, fileList) {
+        this.upload.isUploading = true;
+      },
+      // 文件上传成功处理
+      handleFileSuccess(response, file, fileList) {
+        this.upload.open = false;
+        this.upload.isUploading = false;
+        this.$refs.upload.clearFiles();
+        if (response.data[0] != null) {
+          this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据') + "," + this.$t('第') + response.data + this.$t('行数据出现错误导入失败')+"。", this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        }else {
+          this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据'), this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        }
+        this.getList();
+      },
+      // 提交上传文件
+      submitFileForm() {
+        this.$refs.upload.submit();
+      }
+    }
+  };
+</script>

+ 344 - 0
ui/src/views/production/eoegcategory/index.vue

@@ -0,0 +1,344 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
+      <el-form-item label="SAI类别编号" prop="saiCategoryId">
+        <el-input
+          v-model="queryParams.saiCategoryId"
+          placeholder="请输入SAI类别编号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="SAI类别名称" prop="saiCategoryName">
+        <el-input
+          v-model="queryParams.saiCategoryName"
+          placeholder="请输入SAI类别名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="SAI类别描述" prop="saiCategoryDescription">
+        <el-input
+          v-model="queryParams.saiCategoryDescription"
+          placeholder="请输入SAI类别描述"
+          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">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['production:category:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['production:category:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['production:category:remove']"
+        >删除</el-button>
+      </el-col>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="categoryList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="SAI类别编号" align="center" prop="saiCategoryId" :show-overflow-tooltip="true"/>
+      <el-table-column label="SAI类别名称" align="center" prop="saiCategoryName" :show-overflow-tooltip="true"/>
+      <el-table-column label="SAI类别描述" align="center" prop="saiCategoryDescription" :show-overflow-tooltip="true"/>
+      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['production:category:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['production:category:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改SAI类别对话框 -->
+    <el-dialog  :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="110px">
+        <el-form-item label="SAI类别名称" prop="saiCategoryName">
+          <el-input v-model="form.saiCategoryName" placeholder="请输入SAI类别名称" />
+        </el-form-item>
+        <el-form-item label="SAI类别描述" prop="saiCategoryDescription">
+          <el-input v-model="form.saiCategoryDescription" placeholder="请输入SAI类别描述" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listCategory, getCategory, delCategory, addCategory, updateCategory, exportCategory, importTemplate} from "@/api/production/eoegCategory";
+import { treeselect } from "@/api/system/dept";
+import { getToken } from "@/utils/auth";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+
+export default {
+  name: "EoegCategory",
+  components: { Treeselect },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // SAI类别表格数据
+      categoryList: [],
+      // 弹出层标题
+      title: "",
+      // 部门树选项
+      deptOptions: undefined,
+      clientHeight:300,
+      // 是否显示弹出层
+      open: false,
+        // 用户导入参数
+        upload: {
+            // 是否显示弹出层(用户导入)
+            open: false,
+            // 弹出层标题(用户导入)
+            title: "",
+            // 是否禁用上传
+            isUploading: false,
+            // 是否更新已经存在的用户数据
+            updateSupport: 0,
+            // 设置上传的请求头部
+            headers: { Authorization: "Bearer " + getToken() },
+            // 上传的地址
+            url: process.env.VUE_APP_BASE_API + "/production/category/importData"
+        },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        saiCategoryId: null,
+        saiCategoryName: null,
+        deptId: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        saiCategoryName: [
+          { required: true, message: this.$t('SAI类别名称') + this.$t('不能为空'), trigger: "change" }
+        ],
+      }
+    };
+  },
+  watch: {
+        // 根据名称筛选部门树
+        deptName(val) {
+            this.$refs.tree.filter(val);
+        }
+   },
+  created() {
+      //设置表格高度对应屏幕高度
+      this.$nextTick(() => {
+          this.clientHeight = document.body.clientHeight -250
+      })
+    this.getList();
+    this.getTreeselect();
+  },
+  methods: {
+    /** 查询SAI类别列表 */
+    getList() {
+      this.loading = true;
+      listCategory(this.queryParams).then(response => {
+        this.categoryList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+     /** 查询部门下拉树结构 */
+     getTreeselect() {
+          treeselect().then(response => {
+              this.deptOptions = response.data;
+          });
+     },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        saiCategoryId: null,
+        saiCategoryName: null,
+        delFlag: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        deptId: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.saiCategoryId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加SAI类别";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const saiCategoryId = row.saiCategoryId || this.ids
+      getCategory(saiCategoryId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改SAI类别";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.saiCategoryId != null) {
+            updateCategory(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addCategory(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const saiCategoryIds = row.saiCategoryId || this.ids;
+      this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delCategory(saiCategoryIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有SAI类别数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportCategory(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+    },
+      /** 导入按钮操作 */
+      handleImport() {
+          this.upload.title = "用户导入";
+          this.upload.open = true;
+      },
+      /** 下载模板操作 */
+      importTemplate() {
+          importTemplate().then(response => {
+              this.download(response.msg);
+          });
+      },
+      // 文件上传中处理
+      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, "导入结果", { dangerouslyUseHTMLString: true });
+          this.getList();
+      },
+      // 提交上传文件
+      submitFileForm() {
+          this.$refs.upload.submit();
+      }
+  }
+};
+</script>

+ 689 - 0
ui/src/views/production/eoegcheck/index.vue

@@ -0,0 +1,689 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="评估年度" prop="saiYear">
+        <el-date-picker size="small" style="width: 200px"
+          v-model="queryParams.saiYear"
+          type="year"
+          value-format="yyyy"
+          placeholder="选择评估年度"
+          @change="handleQuery">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item :label="$t('数据来源')" prop="source">
+        <el-select v-model="queryParams.source" :placeholder="$t('请选择') + $t('数据来源')">
+          <el-option key="CTS" label="CTS" value="CTS"></el-option>
+          <el-option key="装置" label="装置" value="装置"></el-option>
+          <el-option key="督导" label="督导" value="督导"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['production:sai:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['production:sai:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['production:sai:remove']"
+        >删除</el-button>
+      </el-col>
+        <el-col :span="1.5">
+            <el-button
+                    type="info"
+                    icon="el-icon-upload2"
+                    size="mini"
+                    @click="handleImport"
+                    v-hasPermi="['production:sai:edit']"
+            >导入</el-button>
+        </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['production:sai:export']"
+        >导出</el-button>
+      </el-col>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getListByYear()"></right-toolbar>
+    </el-row>
+
+    <el-row class="colorMark">
+      <span style="float: left; text-align: left; margin-right: 25px;">
+        装置自查人均扣分:<u>{{score}}</u>
+      </span>
+      <span style="float: left; text-align: left;">
+        CTS扣分 / 装置人均扣分:<u>{{score2}}</u>
+      </span>
+    </el-row>
+
+    <el-table v-loading="loading" :data="saiList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="检查的装置/设施" align="center" prop="plantName" :show-overflow-tooltip="true"/>
+      <el-table-column label="检查日期/时间" align="center" prop="inspectionDate" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.inspectionDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="识别出的安全问题" align="center" prop="dificiency" :show-overflow-tooltip="true"/>
+      <el-table-column label="SAI级别" align="center" prop="saiLevel" :show-overflow-tooltip="true"/>
+      <el-table-column label="SAI类别" align="center" prop="category" :show-overflow-tooltip="true" :formatter="saiCategoryFormat"/>
+      <el-table-column label="采取或要采取的措施" align="center" prop="actions" :show-overflow-tooltip="true"/>
+      <el-table-column label="用户" align="center" prop="userDeptName" :show-overflow-tooltip="true"/>
+      <el-table-column label="数据来源" align="center" prop="source" :show-overflow-tooltip="true"/>
+      <el-table-column label="检查人" align="center" prop="applicantName" :show-overflow-tooltip="true"/>
+      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['production:sai:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['production:sai:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getListByYear"
+    />
+
+    <!-- 添加或修改SAI信息对话框 -->
+    <el-dialog  :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="检查的装置/设施" prop="plantId">
+          <treeselect v-model="form.plantId" :options="deptOptions" :show-count="true" placeholder="请选择检查的装置/设施" />
+        </el-form-item>
+        <el-form-item label="检查日期/时间" prop="inspectionDate">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.inspectionDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择检查日期/时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="识别出的安全问题" prop="dificiency">
+          <el-input v-model="form.dificiency" placeholder="请输入识别出的安全问题" />
+        </el-form-item>
+        <el-form-item label="SAI级别" prop="saiLevel">
+          <el-select v-model="form.saiLevel" placeholder="请选择SAI级别" @change="handleSaiLevelChange">
+            <el-option key="1" label="1" value="1"></el-option>
+            <el-option key="2" label="2" value="2"></el-option>
+            <el-option key="3" label="3" value="3"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item :label="$t('SAI类别')" prop="category">
+          <el-select
+            @change="handleSaiCategoryChange"
+            filterable
+            clearable
+            v-model="form.category"
+            placeholder="请选择SAI类别">
+            <el-option
+              v-for="dict in saiCategoryOptions2"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="采取或要采取的措施" prop="actions">
+          <el-input v-model="form.actions" placeholder="请输入采取或要采取的措施" />
+        </el-form-item>
+        <el-form-item label="用户" prop="userDept">
+          <treeselect v-model="form.userDept" :options="deptOptions" :show-count="true" placeholder="请选择用户" />
+        </el-form-item>
+        <el-form-item :label="$t('数据来源')" prop="source">
+          <el-select v-model="form.source" :placeholder="$t('请选择') + $t('数据来源')">
+            <el-option key="CTS" label="CTS" value="CTS"></el-option>
+            <el-option key="装置" label="装置" value="装置"></el-option>
+            <el-option key="督导" label="督导" value="督导"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item :label="$t('检查人')" prop="applicant">
+          <el-select
+            filterable
+            clearable
+            v-model="form.applicant"
+            placeholder="请选择检查人">
+            <el-option
+              v-for="dict in applicantOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="归属部门" prop="deptId">
+            <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 用户导入对话框 -->
+    <el-dialog  :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+          <el-upload
+                  ref="upload"
+                  :limit="1"
+                  accept=".xlsx, .xls"
+                  :headers="upload.headers"
+                  :action="upload.url + '?updateSupport=' + upload.updateSupport"
+                  :disabled="upload.isUploading"
+                  :on-progress="handleFileUploadProgress"
+                  :on-success="handleFileSuccess"
+                  :auto-upload="false"
+                  drag
+          >
+              <i class="el-icon-upload"></i>
+              <div class="el-upload__text">
+                  将文件拖到此处,或
+                  <em>点击上传</em>
+              </div>
+              <div class="el-upload__tip" slot="tip">
+                  <!--<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据-->
+                  <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</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">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+          </el-upload>
+          <div slot="footer" class="dialog-footer">
+              <el-button type="primary" @click="submitFileForm">确 定</el-button>
+              <el-button @click="upload.open = false">取 消</el-button>
+          </div>
+      </el-dialog>
+  </div>
+</template>
+
+<script>
+import { calcScoreByYear, calcScore2ByYear, listSai, listSaiByYear, getSai, delSai, addSai, updateSai, exportSai, importTemplate} from "@/api/production/eoegSai";
+import { treeselect, alltreeselect } from "@/api/system/dept";
+import { getToken } from "@/utils/auth";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import { listStaffmgrByDeptAndTeam, getLoginStaffInfo } from "@/api/plant/staffmgr";
+import { categoryList } from "@/api/production/eoegCategory";
+
+export default {
+  name: "EoegSai",
+  components: { Treeselect },
+  data() {
+    return {
+      // SAI类别列表
+      saiCategoryOptions: [],
+      saiCategoryOptions2: [],
+      // 登记人列表
+      applicantOptions: [],
+      score: null,
+      score2: null,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // SAI信息表格数据
+      saiList: [],
+      // 弹出层标题
+      title: "",
+      // 部门树选项
+      deptOptions: undefined,
+      clientHeight:300,
+      // 是否显示弹出层
+      open: false,
+        // 用户导入参数
+        upload: {
+            //下载模板请求地址
+            downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+            //下载模板类型
+            type: 'eoegsai',
+            // 是否显示弹出层(用户导入)
+            open: false,
+            // 弹出层标题(用户导入)
+            title: "",
+            // 是否禁用上传
+            isUploading: false,
+            // 是否更新已经存在的用户数据
+            updateSupport: 0,
+            // 设置上传的请求头部
+            headers: { Authorization: "Bearer " + getToken() },
+            // 上传的地址
+            url: process.env.VUE_APP_BASE_API + "/production/sai/importData"
+        },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        saiId: null,
+        plantId: null,
+        inspectionDate: null,
+        dificiency: null,
+        saiLevel: null,
+        category: null,
+        actions: null,
+        userDept: null,
+        source: null,
+        saiYear: null,
+        deptId:null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        plantId: [
+          { required: true, message: this.$t('检查的装置/设施') + this.$t('不能为空'), trigger: "change" }
+        ],
+        inspectionDate: [
+          { required: true, message: this.$t('检查日期/时间') + this.$t('不能为空'), trigger: "change" }
+        ],
+        dificiency: [
+          { required: true, message: this.$t('识别出的安全问题') + this.$t('不能为空'), trigger: "change" }
+        ],
+        saiLevel: [
+          { required: true, message: this.$t('SAI级别') + this.$t('不能为空'), trigger: "change" }
+        ],
+        category: [
+          { required: true, message: this.$t('SAI类别') + this.$t('不能为空'), trigger: "change" }
+        ],
+        actions: [
+          { required: true, message: this.$t('采取或要采取的措施') + this.$t('不能为空'), trigger: "change" }
+        ],
+        userDept: [
+          { required: true, message: this.$t('用户') + this.$t('不能为空'), trigger: "change" }
+        ],
+        source: [
+          { required: true, message: this.$t('数据来源') + this.$t('不能为空'), trigger: "change" }
+        ],
+        deptId: [
+          { required: true, message: this.$t('归属部门') + this.$t('不能为空'), trigger: "change" }
+        ],
+      }
+    };
+  },
+  watch: {
+        // 根据名称筛选部门树
+        deptName(val) {
+            this.$refs.tree.filter(val);
+        }
+   },
+  created() {
+    this.setYear();
+      //设置表格高度对应屏幕高度
+      this.$nextTick(() => {
+          this.clientHeight = document.body.clientHeight -250
+      })
+    // this.getList();
+    this.getListByYear();
+    this.calcScoreByYear();
+    this.calcScore2ByYear();
+    this.getTreeselect();
+    this.listStaffmgrByDeptAndTeam(null, null);
+    this.getCategoryList();
+  },
+  methods: {
+
+    // 处理SAI级别下拉框选中事件
+    handleSaiLevelChange() {
+      this.saiCategoryOptions2 = [];
+      let saiLevel = this.form.saiLevel;
+      let saiCategoryOptionsTemp = [];
+      for (let i = 0; i < this.saiCategoryOptions.length; i++) {
+        if (saiLevel == 1 && this.saiCategoryOptions[i].dictLabel.indexOf("-1-") != -1) {
+          let saiCategoryOption = {
+            dictValue: this.saiCategoryOptions[i].dictValue,
+            dictLabel: this.saiCategoryOptions[i].dictLabel,
+          };
+          saiCategoryOptionsTemp.push(saiCategoryOption);
+        }
+        if (saiLevel == 2 && this.saiCategoryOptions[i].dictLabel.indexOf("-2-") != -1) {
+          let saiCategoryOption = {
+            dictValue: this.saiCategoryOptions[i].dictValue,
+            dictLabel: this.saiCategoryOptions[i].dictLabel,
+          };
+          saiCategoryOptionsTemp.push(saiCategoryOption);
+        }
+        if (saiLevel == 3 && this.saiCategoryOptions[i].dictLabel.indexOf("-3-") != -1) {
+          let saiCategoryOption = {
+            dictValue: this.saiCategoryOptions[i].dictValue,
+            dictLabel: this.saiCategoryOptions[i].dictLabel,
+          };
+          saiCategoryOptionsTemp.push(saiCategoryOption);
+        }
+      }
+      this.saiCategoryOptions2 = saiCategoryOptionsTemp;
+    },
+    // 处理SAI类别下拉框选中事件
+    handleSaiCategoryChange() {
+      for (let i = 0; i < this.saiCategoryOptions.length; i++) {
+        if (this.form.category == this.saiCategoryOptions[i].dictValue) {
+          if (this.saiCategoryOptions[i].dictLabel.indexOf("-1-") != -1) {
+            this.form.saiLevel = 1;
+          }
+          if (this.saiCategoryOptions[i].dictLabel.indexOf("-2-") != -1) {
+            this.form.saiLevel = 2;
+          }
+          if (this.saiCategoryOptions[i].dictLabel.indexOf("-3-") != -1) {
+            this.form.saiLevel = 3;
+          }
+        }
+      }
+    },
+    // SAI类别字典翻译
+    saiCategoryFormat(row, column) {
+      return this.selectDictLabel(this.saiCategoryOptions, row.category);
+    },
+    /** 获取SAI类别列表数据 */
+    getCategoryList() {
+      categoryList().then(response => {
+        let data = response.data;
+        for (let i = 0; i < data.length; i++) {
+          if (data[i].saiCategoryName != null && data[i].saiCategoryName != "") {
+            this.saiCategoryOptions.push({
+              dictLabel: data[i].saiCategoryName,
+              dictValue: data[i].saiCategoryId
+            });
+          }
+        }
+      });
+    },
+    /** 加载当前登录员工信息 */
+    getLoginStaffInfo() {
+      getLoginStaffInfo().then(response => {
+        let staff = response.data;
+        if (staff != null) {
+          this.form.applicant = staff.userId;
+        }
+      });
+    },
+    /** 加载登记人列表 */
+    listStaffmgrByDeptAndTeam(applicantDept, applicantTeam) {
+      listStaffmgrByDeptAndTeam({
+        deptId: applicantDept,
+        team: applicantTeam
+      }).then(response => {
+        let staffList = response.rows;
+        this.applicantOptions = [];
+        for (let i = 0; i < staffList.length; i++) {
+          let staffOption = {
+            dictLabel: staffList[i].staffid + " - " + staffList[i].name,
+            dictValue: staffList[i].userId
+          }
+          this.applicantOptions.push(staffOption);
+        }
+      });
+    },
+    /** 计算当年装置自查人均扣分 */
+    calcScoreByYear() {
+      calcScoreByYear(this.queryParams.saiYear).then(response => {
+        this.score = response.msg;
+      });
+    },
+    /** 计算CTS扣分 / 装置人均扣分 */
+    calcScore2ByYear() {
+      calcScore2ByYear(this.queryParams.saiYear).then(response => {
+        this.score2 = response.msg;
+      });
+    },
+    /** 评估年度默认为当年 */
+    setYear() {
+      this.queryParams.saiYear = new Date().getFullYear().toString();
+    },
+    /** 查询SAI信息列表 */
+    getListByYear() {
+      this.loading = true;
+      listSaiByYear(this.queryParams).then(response => {
+        this.saiList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+        this.calcScoreByYear();
+        this.calcScore2ByYear();
+      });
+    },
+    getList() {
+      this.loading = true;
+      listSai(this.queryParams).then(response => {
+        this.saiList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+     /** 查询部门下拉树结构 */
+     getTreeselect() {
+          alltreeselect().then(response => {
+              this.deptOptions = response.data;
+          });
+     },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        saiId: null,
+        plantId: null,
+        inspectionDate: null,
+        dificiency: null,
+        saiLevel: null,
+        category: null,
+        actions: null,
+        userDept: null,
+        source: null,
+        delFlag: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        applicant: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getListByYear();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.saiId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.getLoginStaffInfo();
+      this.open = true;
+      this.title = "添加SAI信息";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const saiId = row.saiId || this.ids
+      getSai(saiId).then(response => {
+        this.saiCategoryOptions2 = this.saiCategoryOptions;
+        this.form = response.data;
+        this.form.category = Number(this.form.category);
+        this.open = true;
+        this.title = "修改SAI信息";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.saiId != null) {
+            updateSai(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getListByYear();
+              this.calcScoreByYear();
+              this.calcScore2ByYear();
+            });
+          } else {
+            addSai(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getListByYear();
+              this.calcScoreByYear();
+              this.calcScore2ByYear();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const saiIds = row.saiId || this.ids;
+      this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delSai(saiIds);
+        }).then(() => {
+          this.getListByYear();
+          this.msgSuccess("删除成功");
+        })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有SAI信息数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportSai(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+    },
+      /** 导入按钮操作 */
+      handleImport() {
+          this.upload.title = "用户导入";
+          this.upload.open = true;
+      },
+      /** 下载模板操作 */
+      importTemplate() {
+        this.$refs['downloadFileForm'].submit()
+      },
+      // 文件下载处理
+      handleDownload(row) {
+        var name = row.fileName;
+        var url = row.fileUrl;
+        var suffix = url.substring(url.lastIndexOf("."), url.length);
+        const a = document.createElement('a')
+        a.setAttribute('download', name)
+        a.setAttribute('target', '_blank')
+        a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+        a.click()
+      },
+      // 文件上传中处理
+      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.getListByYear();
+      },
+      // 提交上传文件
+      submitFileForm() {
+          this.$refs.upload.submit();
+      }
+  }
+};
+</script>
+
+<style>
+  .colorMark {
+    color: #6f6f6f;
+    text-align: right;
+    font-weight:bold;
+    font-size: 13px;
+    padding-bottom: 10px;
+  }
+  .rectangleLightgreen {
+    width: 40px !important;
+    height: 20px !important;
+  }
+  .rectangleFlesh {
+    width: 40px !important;
+    height: 20px !important;
+  }
+  .rectangleYellow {
+    width: 40px !important;
+    height: 20px !important;
+  }
+  .rectangleRed {
+    width: 40px !important;
+    height: 20px !important;
+  }
+  .rectangleGreen {
+    width: 40px !important;
+    height: 20px !important;
+  }
+</style>

+ 3 - 0
ui/src/views/production/eoegsai/index.vue

@@ -0,0 +1,3 @@
+<template >
+  <router-view />
+</template>