Procházet zdrojové kódy

LY 作业证书导入 rc文件

ly před 1 rokem
rodič
revize
ae9d8dd5c5
29 změnil soubory, kde provedl 1544 přidání a 104 odebrání
  1. 4 0
      master/src/main/java/com/ruoyi/project/common/CommonController.java
  2. 120 0
      master/src/main/java/com/ruoyi/project/ehs/controller/TRcfileController.java
  3. 251 0
      master/src/main/java/com/ruoyi/project/ehs/domain/TRcfile.java
  4. 63 0
      master/src/main/java/com/ruoyi/project/ehs/mapper/TRcfileMapper.java
  5. 61 0
      master/src/main/java/com/ruoyi/project/ehs/service/ITRcfileService.java
  6. 63 0
      master/src/main/java/com/ruoyi/project/ehs/service/TRcfileMapper.java
  7. 93 0
      master/src/main/java/com/ruoyi/project/ehs/service/impl/TRcfileServiceImpl.java
  8. 136 9
      master/src/main/java/com/ruoyi/project/training/controller/TWorkcertificateCbpsController.java
  9. 7 0
      master/src/main/java/com/ruoyi/project/training/mapper/TWorkcertificateCbpsMapper.java
  10. 4 4
      master/src/main/resources/application.yml
  11. 2 2
      master/src/main/resources/mybatis/ehs/TRcauditMapper.xml
  12. 129 0
      master/src/main/resources/mybatis/ehs/TRcfileMapper.xml
  13. 58 0
      master/src/main/resources/mybatis/training/TWorkcertificateCbpsMapper.xml
  14. 1 1
      master/src/main/resources/mybatis/training/newstaff/TTnFirstplanMapper.xml
  15. 1 1
      master/src/main/resources/mybatis/training/newstaff/TTnSchoolplanMapper.xml
  16. 1 1
      master/src/main/resources/mybatis/training/newstaff/TTnTransferplanMapper.xml
  17. binární
      master/src/main/resources/static/template/training/workcertificateCbps.xlsx
  18. 53 0
      ui/src/api/ehs/rcfile.js
  19. 2 1
      ui/src/permission.js
  20. 13 0
      ui/src/router/index.js
  21. 26 16
      ui/src/views/ehs/rcaudit/index.vue
  22. 419 0
      ui/src/views/ehs/rcfile/index.vue
  23. 1 1
      ui/src/views/hcqhome.vue
  24. 7 7
      ui/src/views/plant/staffmgr/index.vue
  25. 0 21
      ui/src/views/training/newstaff/firstplan/index.vue
  26. 2 21
      ui/src/views/training/newstaff/schoolplan/index.vue
  27. 1 1
      ui/src/views/training/newstaff/tnNew/index.vue
  28. 0 13
      ui/src/views/training/newstaff/transferplan/index.vue
  29. 26 5
      ui/src/views/training/workcertificateCbps/index.vue

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

@@ -306,7 +306,11 @@ public class CommonController extends BaseController
         }else if( type.equals("applyLock") ) {
             downloadname = "锁开锁关导入模板.xlsx";
             url = "static/template/apply/applyLock.xlsx";
+        }else if( type.equals("workcertificateCbps") ) {
+            downloadname = "作业证书模板.xlsx";
+            url = "static/template/training/workcertificateCbps.xlsx";
         }
+
         InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(url);
 
         downloadFile(downloadname, is, request, response);

+ 120 - 0
master/src/main/java/com/ruoyi/project/ehs/controller/TRcfileController.java

@@ -0,0 +1,120 @@
+package com.ruoyi.project.ehs.controller;
+
+import java.io.IOException;
+import java.util.List;
+
+import com.ruoyi.common.utils.file.FileUploadUtils;
+import com.ruoyi.framework.config.RuoYiConfig;
+import com.ruoyi.project.common.domain.TCommonfile;
+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.ehs.domain.TRcfile;
+import com.ruoyi.project.ehs.service.ITRcfileService;
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * RC附件Controller
+ *
+ * @author ssy
+ * @date 2023-10-24
+ */
+@RestController
+@RequestMapping("/ehs/rcfile")
+public class TRcfileController extends BaseController
+{
+    @Autowired
+    private ITRcfileService tRcfileService;
+
+    /**
+     * 查询RC附件列表
+     */
+    @GetMapping("/list")
+    public AjaxResult list(TRcfile tRcfile)
+    {
+        List<TRcfile> list = tRcfileService.selectTRcfileList(tRcfile);
+        return AjaxResult.success(list);
+    }
+
+    /**
+     * 导出RC附件列表
+     */
+    @Log(title = "RC附件", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TRcfile tRcfile)
+    {
+        List<TRcfile> list = tRcfileService.selectTRcfileList(tRcfile);
+        ExcelUtil<TRcfile> util = new ExcelUtil<TRcfile>(TRcfile.class);
+        return util.exportExcel(list, "rcfile");
+    }
+
+    /**
+     * 获取RC附件详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(tRcfileService.selectTRcfileById(id));
+    }
+
+    /**
+     * 新增RC附件
+     */
+    @Log(title = "RC附件", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TRcfile tRcfile)
+    {
+        return toAjax(tRcfileService.insertTRcfile(tRcfile));
+    }
+
+    /**
+     * 通用附件上传
+     */
+    @Log(title = "通用附件上传", businessType = BusinessType.UPDATE)
+    @PostMapping("/uploadFile")
+    public AjaxResult uploadFile(@RequestParam("file") MultipartFile file, String pType, String pId,Long parentId) throws IOException
+    {
+        if (!file.isEmpty())
+        {
+            String url = FileUploadUtils.upload(RuoYiConfig.getFilePath("/"+ pType), file);
+            long size = file.getSize()/1024;
+            TRcfile tRcfile = new TRcfile();
+            tRcfile.setFileUrl(url);
+            tRcfile.setFileName(file.getOriginalFilename());
+            tRcfile.setCreaterCode(String.valueOf(getUserId()));
+            tRcfile.setpId(Long.parseLong(pId));
+            tRcfile.setpType(pType);
+            tRcfile.setFileSize(String.valueOf(size));
+            tRcfile.setParentId(parentId);
+            tRcfile.setFileType(1l);
+            tRcfileService.insertTRcfile(tRcfile);
+
+            return AjaxResult.success();
+        }
+        return AjaxResult.error("上传失败,请联系管理员");
+    }
+    /**
+     * 修改RC附件
+     */
+    @Log(title = "RC附件", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TRcfile tRcfile)
+    {
+        return toAjax(tRcfileService.updateTRcfile(tRcfile));
+    }
+
+    /**
+     * 删除RC附件
+     */
+    @Log(title = "RC附件", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(tRcfileService.deleteTRcfileByIds(ids));
+    }
+}

+ 251 - 0
master/src/main/java/com/ruoyi/project/ehs/domain/TRcfile.java

@@ -0,0 +1,251 @@
+package com.ruoyi.project.ehs.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 com.ruoyi.framework.web.domain.TreeEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * RC附件对象 t_rcfile
+ *
+ * @author ssy
+ * @date 2023-10-24
+ */
+public class TRcfile extends TreeEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** id */
+    private Long id;
+
+    /** 业务id */
+    @Excel(name = "业务id")
+    private Long pId;
+
+    /** 文件名 */
+    @Excel(name = "文件名")
+    private String fileName;
+
+    /** 路径 */
+    @Excel(name = "路径")
+    private String fileUrl;
+
+    /** 删除标识 */
+    private Long delFlag;
+
+    /** 创建人 */
+    @Excel(name = "创建人")
+    private String createrCode;
+
+    /** 创建人 */
+    @Excel(name = "创建人")
+    private String creator;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date createdate;
+
+    /** 更新人 */
+    @Excel(name = "更新人")
+    private String updaterCode;
+
+    /** 更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date updatedate;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 业务类型 */
+    @Excel(name = "业务类型")
+    private String pType;
+
+    /** 文件大小 */
+    @Excel(name = "文件大小")
+    private String fileSize;
+
+    /** 业务字段 */
+    @Excel(name = "业务字段")
+    private String pValue;
+
+    /** 业务时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "业务时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date pDate;
+
+    /** 类型 */
+    @Excel(name = "类型")
+    private Long fileType;
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setpId(Long pId)
+    {
+        this.pId = pId;
+    }
+
+    public Long getpId()
+    {
+        return pId;
+    }
+    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 setDelFlag(Long delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public Long getDelFlag()
+    {
+        return delFlag;
+    }
+    public void setCreaterCode(String createrCode)
+    {
+        this.createrCode = createrCode;
+    }
+
+    public String getCreaterCode()
+    {
+        return createrCode;
+    }
+    public void setCreatedate(Date createdate)
+    {
+        this.createdate = createdate;
+    }
+
+    public Date getCreatedate()
+    {
+        return createdate;
+    }
+    public void setUpdaterCode(String updaterCode)
+    {
+        this.updaterCode = updaterCode;
+    }
+
+    public String getUpdaterCode()
+    {
+        return updaterCode;
+    }
+    public void setUpdatedate(Date updatedate)
+    {
+        this.updatedate = updatedate;
+    }
+
+    public Date getUpdatedate()
+    {
+        return updatedate;
+    }
+    public void setRemarks(String remarks)
+    {
+        this.remarks = remarks;
+    }
+
+    public String getRemarks()
+    {
+        return remarks;
+    }
+    public void setpType(String pType)
+    {
+        this.pType = pType;
+    }
+
+    public String getpType()
+    {
+        return pType;
+    }
+    public void setFileSize(String fileSize)
+    {
+        this.fileSize = fileSize;
+    }
+
+    public String getFileSize()
+    {
+        return fileSize;
+    }
+    public void setpValue(String pValue)
+    {
+        this.pValue = pValue;
+    }
+
+    public String getpValue()
+    {
+        return pValue;
+    }
+    public void setpDate(Date pDate)
+    {
+        this.pDate = pDate;
+    }
+
+    public Date getpDate()
+    {
+        return pDate;
+    }
+    public void setFileType(Long fileType)
+    {
+        this.fileType = fileType;
+    }
+
+    public Long getFileType()
+    {
+        return fileType;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("pId", getpId())
+            .append("fileName", getFileName())
+            .append("fileUrl", getFileUrl())
+            .append("delFlag", getDelFlag())
+            .append("createrCode", getCreaterCode())
+            .append("createdate", getCreatedate())
+            .append("updaterCode", getUpdaterCode())
+            .append("updatedate", getUpdatedate())
+            .append("remarks", getRemarks())
+            .append("pType", getpType())
+            .append("fileSize", getFileSize())
+            .append("pValue", getpValue())
+            .append("pDate", getpDate())
+            .append("fileType", getFileType())
+            .append("parentId", getParentId())
+            .toString();
+    }
+}

+ 63 - 0
master/src/main/java/com/ruoyi/project/ehs/mapper/TRcfileMapper.java

@@ -0,0 +1,63 @@
+package com.ruoyi.project.ehs.mapper;
+
+import java.util.List;
+import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
+import com.ruoyi.project.ehs.domain.TRcfile;
+
+/**
+ * RC附件Mapper接口
+ *
+ * @author ssy
+ * @date 2023-10-24
+ */
+public interface TRcfileMapper
+{
+    /**
+     * 查询RC附件
+     *
+     * @param id RC附件ID
+     * @return RC附件
+     */
+    public TRcfile selectTRcfileById(Long id);
+
+    /**
+     * 查询RC附件列表
+     *
+     * @param tRcfile RC附件
+     * @return RC附件集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TRcfile> selectTRcfileList(TRcfile tRcfile);
+
+    /**
+     * 新增RC附件
+     *
+     * @param tRcfile RC附件
+     * @return 结果
+     */
+    public int insertTRcfile(TRcfile tRcfile);
+
+    /**
+     * 修改RC附件
+     *
+     * @param tRcfile RC附件
+     * @return 结果
+     */
+    public int updateTRcfile(TRcfile tRcfile);
+
+    /**
+     * 删除RC附件
+     *
+     * @param id RC附件ID
+     * @return 结果
+     */
+    public int deleteTRcfileById(Long id);
+
+    /**
+     * 批量删除RC附件
+     *
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTRcfileByIds(Long[] ids);
+}

+ 61 - 0
master/src/main/java/com/ruoyi/project/ehs/service/ITRcfileService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.project.ehs.service;
+
+import java.util.List;
+import com.ruoyi.project.ehs.domain.TRcfile;
+
+/**
+ * RC附件Service接口
+ *
+ * @author ssy
+ * @date 2023-10-24
+ */
+public interface ITRcfileService
+{
+    /**
+     * 查询RC附件
+     *
+     * @param id RC附件ID
+     * @return RC附件
+     */
+    public TRcfile selectTRcfileById(Long id);
+
+    /**
+     * 查询RC附件列表
+     *
+     * @param tRcfile RC附件
+     * @return RC附件集合
+     */
+    public List<TRcfile> selectTRcfileList(TRcfile tRcfile);
+
+    /**
+     * 新增RC附件
+     *
+     * @param tRcfile RC附件
+     * @return 结果
+     */
+    public int insertTRcfile(TRcfile tRcfile);
+
+    /**
+     * 修改RC附件
+     *
+     * @param tRcfile RC附件
+     * @return 结果
+     */
+    public int updateTRcfile(TRcfile tRcfile);
+
+    /**
+     * 批量删除RC附件
+     *
+     * @param ids 需要删除的RC附件ID
+     * @return 结果
+     */
+    public int deleteTRcfileByIds(Long[] ids);
+
+    /**
+     * 删除RC附件信息
+     *
+     * @param id RC附件ID
+     * @return 结果
+     */
+    public int deleteTRcfileById(Long id);
+}

+ 63 - 0
master/src/main/java/com/ruoyi/project/ehs/service/TRcfileMapper.java

@@ -0,0 +1,63 @@
+package com.ruoyi.project.ehs.service;
+
+import java.util.List;
+import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
+import com.ruoyi.project.ehs.domain.TRcfile;
+
+/**
+ * RC附件Mapper接口
+ *
+ * @author ssy
+ * @date 2023-10-24
+ */
+public interface TRcfileMapper
+{
+    /**
+     * 查询RC附件
+     *
+     * @param id RC附件ID
+     * @return RC附件
+     */
+    public TRcfile selectTRcfileById(Long id);
+
+    /**
+     * 查询RC附件列表
+     *
+     * @param tRcfile RC附件
+     * @return RC附件集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TRcfile> selectTRcfileList(TRcfile tRcfile);
+
+    /**
+     * 新增RC附件
+     *
+     * @param tRcfile RC附件
+     * @return 结果
+     */
+    public int insertTRcfile(TRcfile tRcfile);
+
+    /**
+     * 修改RC附件
+     *
+     * @param tRcfile RC附件
+     * @return 结果
+     */
+    public int updateTRcfile(TRcfile tRcfile);
+
+    /**
+     * 删除RC附件
+     *
+     * @param id RC附件ID
+     * @return 结果
+     */
+    public int deleteTRcfileById(Long id);
+
+    /**
+     * 批量删除RC附件
+     *
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTRcfileByIds(Long[] ids);
+}

+ 93 - 0
master/src/main/java/com/ruoyi/project/ehs/service/impl/TRcfileServiceImpl.java

@@ -0,0 +1,93 @@
+package com.ruoyi.project.ehs.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.project.ehs.mapper.TRcfileMapper;
+import com.ruoyi.project.ehs.domain.TRcfile;
+import com.ruoyi.project.ehs.service.ITRcfileService;
+
+/**
+ * RC附件Service业务层处理
+ *
+ * @author ssy
+ * @date 2023-10-24
+ */
+@Service
+public class TRcfileServiceImpl implements ITRcfileService
+{
+    @Autowired
+    private TRcfileMapper tRcfileMapper;
+
+    /**
+     * 查询RC附件
+     *
+     * @param id RC附件ID
+     * @return RC附件
+     */
+    @Override
+    public TRcfile selectTRcfileById(Long id)
+    {
+        return tRcfileMapper.selectTRcfileById(id);
+    }
+
+    /**
+     * 查询RC附件列表
+     *
+     * @param tRcfile RC附件
+     * @return RC附件
+     */
+    @Override
+    public List<TRcfile> selectTRcfileList(TRcfile tRcfile)
+    {
+        return tRcfileMapper.selectTRcfileList(tRcfile);
+    }
+
+    /**
+     * 新增RC附件
+     *
+     * @param tRcfile RC附件
+     * @return 结果
+     */
+    @Override
+    public int insertTRcfile(TRcfile tRcfile)
+    {
+        return tRcfileMapper.insertTRcfile(tRcfile);
+    }
+
+    /**
+     * 修改RC附件
+     *
+     * @param tRcfile RC附件
+     * @return 结果
+     */
+    @Override
+    public int updateTRcfile(TRcfile tRcfile)
+    {
+        return tRcfileMapper.updateTRcfile(tRcfile);
+    }
+
+    /**
+     * 批量删除RC附件
+     *
+     * @param ids 需要删除的RC附件ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTRcfileByIds(Long[] ids)
+    {
+        return tRcfileMapper.deleteTRcfileByIds(ids);
+    }
+
+    /**
+     * 删除RC附件信息
+     *
+     * @param id RC附件ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTRcfileById(Long id)
+    {
+        return tRcfileMapper.deleteTRcfileById(id);
+    }
+}

+ 136 - 9
master/src/main/java/com/ruoyi/project/training/controller/TWorkcertificateCbpsController.java

@@ -1,21 +1,35 @@
 package com.ruoyi.project.training.controller;
 
-import java.util.List;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.concurrent.CopyOnWriteArrayList;
 
 import com.alibaba.fastjson.JSON;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.file.ExcelUtils;
+import com.ruoyi.common.utils.spring.SpringUtils;
+import com.ruoyi.framework.security.LoginUser;
+import com.ruoyi.framework.security.service.TokenService;
 import com.ruoyi.project.plant.domain.TStaffmgr;
 import com.ruoyi.project.plant.mapper.TStaffmgrMapper;
+import com.ruoyi.project.sems.domain.TSpecdevDt;
+import com.ruoyi.project.sems.domain.TSpecdevGl;
+import com.ruoyi.project.sems.his.domain.TApproveSpecModify;
+import com.ruoyi.project.system.domain.SysDept;
+import com.ruoyi.project.system.domain.SysDictData;
 import com.ruoyi.project.training.mapper.TWorkcertificateCbpsMapper;
+import org.activiti.engine.impl.identity.Authentication;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.apache.commons.lang.StringUtils;
+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.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
 import com.ruoyi.project.training.domain.TWorkcertificateCbps;
@@ -24,6 +38,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.web.page.TableDataInfo;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
 
@@ -143,4 +158,116 @@ public class TWorkcertificateCbpsController extends BaseController
     {
         return toAjax(tWorkcertificateCbpsService.deleteTWorkcertificateCbpsByIds(ids));
     }
+
+    /**
+     * 批量导入
+     */
+    @PreAuthorize("@ss.hasPermi('training:workcertificate:add')")
+    @Log(title = "cbps作业证书一览批量导入", businessType = BusinessType.INSERT)
+    @PostMapping("/importData")
+    public AjaxResult importData(@RequestParam("file") MultipartFile file) throws IOException {
+        //获取操作人员ID
+        Long userId = getUserId();
+        //报错行数统计
+        List<Integer> failRow = new ArrayList<Integer>();
+        Workbook workbook = ExcelUtils.getWorkBook(file);
+        Sheet sheet = workbook.getSheetAt(0);
+        List<TWorkcertificateCbps> list = new ArrayList<TWorkcertificateCbps>();
+
+        int rowNum = sheet.getPhysicalNumberOfRows();
+        int failNumber = 0;
+        for (int i = 3; i < rowNum; i++) {
+            try {
+                logger.info("读取行数:" + i);
+                Row row = sheet.getRow(i);
+                int cellNum = row.getLastCellNum();
+                TWorkcertificateCbps entity = new TWorkcertificateCbps();
+                for (int j = 0; j < cellNum; j++) {
+                    Cell cell = row.getCell(j);
+                    if (cell == null) {
+                        continue;
+                    }
+                    String cellValue = ExcelUtils.getCellValue(cell);
+                    logger.info("cellValue:" + cellValue);
+                    if (cellValue.equals("NA")) {
+                        continue;
+                    }
+                    if (j == 0) {
+                        //序号
+                    } else if (j == 4) {
+                        entity.setEmployeeid(cellValue);//员工号
+                    }else if (j == 7) {
+                        //压力容器
+                        entity.setContainerDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                    }else if (j == 8) {
+                        entity.setContainerLifespan(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                    }else if (j == 9) {
+                        //压力管道
+                        entity.setPipeDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                    }else if (j == 10) {
+                        entity.setPipeLifespan(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                    }else if (j == 11) {
+                        //技术工人上岗证
+                        entity.setWorkerDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                    }else if (j == 12) {
+                        entity.setWorkerLifespan(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                    }else if (j == 13) {
+                        //班组长安全培训
+                        entity.setForemanDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                    }else if (j == 14) {
+                        entity.setForemanLifespan(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                    }else if (j == 15) {
+                        //制冷与空调
+                        entity.setAcDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                    }else if (j == 16) {
+                        entity.setAcLifespan(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                    }else if (j == 17) {
+                        //建筑物消防员职业资格证
+                        entity.setFirefighterDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                    }else if (j == 18) {
+                        entity.setFirefighterLifespan(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                    }else if (j == 19) {
+                        //专职安全管理人员
+                        entity.setSafetyDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                    }else if (j == 20) {
+                        entity.setSafetyLifespan(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                    }else if (j == 21) {
+                        //tds
+                        entity.setTdsDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                    }else if (j == 22) {
+                        entity.setTdsLifespan(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
+                    }
+                }
+                logger.info("entity:" + entity);
+                list.add(entity);
+            } catch (Exception e) {
+                failNumber++;
+                logger.info("e:" + JSON.toJSONString(e));
+                failRow.add(i + 1);
+            }
+        }
+
+
+        int successNumber = 0;
+        int failNum = 0;
+        for (TWorkcertificateCbps t : list
+        ) {
+            failNum++;
+            try {
+                int n = tWorkcertificateCbpsMapper.updateTWorkcertificateCbpsByStaffId(t);
+                if (n == 0) {
+                    throw new Exception("未找到人员");
+                }
+                successNumber++;
+            }catch (Exception e){
+                failNumber++;
+                logger.info("e:" + e);
+                failRow.add(failNum + 1);
+            }
+        }
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
+    }
+
+
+
 }

+ 7 - 0
master/src/main/java/com/ruoyi/project/training/mapper/TWorkcertificateCbpsMapper.java

@@ -47,6 +47,13 @@ public interface TWorkcertificateCbpsMapper
      */
     public int updateTWorkcertificateCbps(TWorkcertificateCbps tWorkcertificateCbps);
 
+    /**
+     * 修改作业证书一览
+     *
+     * @param tWorkcertificateCbps 作业证书一览
+     * @return 结果
+     */
+    public int updateTWorkcertificateCbpsByStaffId(TWorkcertificateCbps tWorkcertificateCbps);
     /**
      * 删除作业证书一览
      *

+ 4 - 4
master/src/main/resources/application.yml

@@ -9,7 +9,7 @@ ruoyi:
   # 实例演示开关
   demoEnabled: true
   # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /u03/cpmsfile/uploadPath)
-  profile: D:/ruoyi/uploadPath
+  profile: /u03/cpmsfile/uploadPath
   # 邮件中链接跳转路径 示例(本地:http://localhost/#,服务器:http://47.114.101.16:8080/cpms/index.html#)
   requestJumpPath: https://cpms.basf-ypc.net.cn/cpms/index.html#
   # 获取ip地址开关
@@ -182,7 +182,7 @@ jodconverter:
     enabled: true
     # 设置LibreOffice主目录
     #    office-home: /opt/libreoffice7.2  C:/Program Files/LibreOffice
-    office-home: C:/Program Files/LibreOffice
+    office-home: /opt/libreoffice7.2
     max-tasks-per-process: 100
     port-numbers: 8100
     # 开启多个LibreOffice进程,每个端口对应一个进程
@@ -191,9 +191,9 @@ jodconverter:
 # 代码生成
 gen:
   # 作者
-  author: ruoyi
+  author: ssy
   # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
-  packageName: com.ruoyi.project.plant # 自动去除表前缀,默认是true
+  packageName: com.ruoyi.project.ehs # 自动去除表前缀,默认是true
   autoRemovePre: false
   # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
   tablePrefix: sys_

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

@@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <sql id="selectTRcauditVo">
         select p.name_cn as menuName, d.id, d.plant_code, d.rc_code, d.menuid, d.name_cn, d.name_en, d.yes, d.no, d.na, d.link, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.remarks, d.dept_id ,s.dept_name, d.file_num from t_rcaudit d
       left join sys_dept s on s.dept_id = d.dept_id
-      left join t_rcauditmenu p on p.serial_num = d.menuid and d.dept_id = p.dept_id
+      left join t_rcauditmenu p on p.serial_num = d.menuid and d.dept_id = p.dept_id and p.del_flag=0
     </sql>
 
     <select id="selectTRcauditList" parameterType="TRcaudit" resultMap="TRcauditResult">
@@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         <!-- 数据范围过滤 -->
         ${params.dataScope}
-        ORDER BY d.menuid asc, d.rc_code asc
+        ORDER BY p.item_first asc, p.item_second asc, p.item_third asc, p.item_fourth asc, d.menuid asc, d.rc_code asc
     </select>
 
     <select id="selectTRcauditById" parameterType="Long" resultMap="TRcauditResult">

+ 129 - 0
master/src/main/resources/mybatis/ehs/TRcfileMapper.xml

@@ -0,0 +1,129 @@
+<?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.ehs.mapper.TRcfileMapper">
+
+    <resultMap type="TRcfile" id="TRcfileResult">
+        <result property="id"    column="id"    />
+        <result property="pId"    column="p_id"    />
+        <result property="fileName"    column="file_name"    />
+        <result property="fileUrl"    column="file_url"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createrCode"    column="creater_code"    />
+        <result property="createdate"    column="createdate"    />
+        <result property="updaterCode"    column="updater_code"    />
+        <result property="updatedate"    column="updatedate"    />
+        <result property="remarks"    column="remarks"    />
+        <result property="pType"    column="p_type"    />
+        <result property="fileSize"    column="file_size"    />
+        <result property="pValue"    column="p_value"    />
+        <result property="pDate"    column="p_date"    />
+        <result property="fileType"    column="file_type"    />
+        <result property="parentId"    column="parent_id"    />
+        <result property="parentName" column="parent_name" />
+        <result property="deptName" column="dept_name" />
+        <result property="creator"    column="nick_name"    />
+
+    </resultMap>
+
+    <sql id="selectTRcfileVo">
+        select d.id, d.p_id, d.file_name, d.file_url, d.del_flag, d.creater_code,u.nick_name, d.createdate, d.updater_code, d.updatedate, d.remarks, d.p_type, d.file_size, d.p_value, d.p_date, d.file_type, d.parent_id from t_rcfile d
+        LEFT JOIN SYS_USER u on d.CREATER_CODE = u.USER_ID
+    </sql>
+
+    <select id="selectTRcfileList" parameterType="TRcfile" resultMap="TRcfileResult">
+        <include refid="selectTRcfileVo"/>
+        <where>
+            <if test="fileName != null  and fileName != ''"> and file_name like concat(concat('%', #{fileName}), '%')</if>
+            <if test="pId != null "> and p_id = #{pId}</if>
+            <if test="fileType != null "> and file_type = #{fileType}</if>
+            and d.del_flag = 0
+        </where>
+        order by parent_id , file_type desc
+    </select>
+
+    <select id="selectTRcfileById" parameterType="Long" resultMap="TRcfileResult">
+        select t.id, t.p_id, t.file_name, t.file_url, t.del_flag, t.creater_code, t.createdate, t.updater_code, t.updatedate, t.remarks, t.p_type, t.file_size, t.p_value, t.p_date, t.file_type, t.parent_id, p.file_name as parent_name
+        from t_rcfile t
+        left join t_rcfile p on p.id = t.parent_id
+        where t.id = #{id}
+    </select>
+
+    <insert id="insertTRcfile" parameterType="TRcfile">
+        <selectKey keyProperty="id" resultType="long" order="BEFORE">
+            SELECT seq_t_rcfile.NEXTVAL as id FROM DUAL
+        </selectKey>
+        insert into t_rcfile
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="pId != null">p_id,</if>
+            <if test="fileName != null">file_name,</if>
+            <if test="fileUrl != null">file_url,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createrCode != null">creater_code,</if>
+            <if test="createdate != null">createdate,</if>
+            <if test="updaterCode != null">updater_code,</if>
+            <if test="updatedate != null">updatedate,</if>
+            <if test="remarks != null">remarks,</if>
+            <if test="pType != null">p_type,</if>
+            <if test="fileSize != null">file_size,</if>
+            <if test="pValue != null">p_value,</if>
+            <if test="pDate != null">p_date,</if>
+            <if test="fileType != null">file_type,</if>
+            <if test="parentId != null">parent_id,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="pId != null">#{pId},</if>
+            <if test="fileName != null">#{fileName},</if>
+            <if test="fileUrl != null">#{fileUrl},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createrCode != null">#{createrCode},</if>
+            <if test="createdate != null">#{createdate},</if>
+            <if test="updaterCode != null">#{updaterCode},</if>
+            <if test="updatedate != null">#{updatedate},</if>
+            <if test="remarks != null">#{remarks},</if>
+            <if test="pType != null">#{pType},</if>
+            <if test="fileSize != null">#{fileSize},</if>
+            <if test="pValue != null">#{pValue},</if>
+            <if test="pDate != null">#{pDate},</if>
+            <if test="fileType != null">#{fileType},</if>
+            <if test="parentId != null">#{parentId},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTRcfile" parameterType="TRcfile">
+        update t_rcfile
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="pId != null">p_id = #{pId},</if>
+            <if test="fileName != null">file_name = #{fileName},</if>
+            <if test="fileUrl != null">file_url = #{fileUrl},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createrCode != null">creater_code = #{createrCode},</if>
+            <if test="createdate != null">createdate = #{createdate},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="pType != null">p_type = #{pType},</if>
+            <if test="fileSize != null">file_size = #{fileSize},</if>
+            <if test="pValue != null">p_value = #{pValue},</if>
+            <if test="pDate != null">p_date = #{pDate},</if>
+            <if test="fileType != null">file_type = #{fileType},</if>
+            <if test="parentId != null">parent_id = #{parentId},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <update id="deleteTRcfileById" parameterType="Long">
+        update t_rcfile set del_flag = 2 where id = #{id}
+    </update>
+
+    <update id="deleteTRcfileByIds" parameterType="String">
+        update t_rcfile set del_flag = 2 where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+
+</mapper>

+ 58 - 0
master/src/main/resources/mybatis/training/TWorkcertificateCbpsMapper.xml

@@ -236,6 +236,64 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </update>
 
+    <update id="updateTWorkcertificateCbpsByStaffId" parameterType="TWorkcertificateCbps">
+        update t_workcertificate_cbps
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="plantCode != null and plantCode != ''">plant_code = #{plantCode},</if>
+            <if test="name != null">name = #{name},</if>
+            <if test="classes != null">classes = #{classes},</if>
+            <if test="container != null">container = #{container},</if>
+            <if test="containerDate != null">container_date = #{containerDate},</if>
+            <if test="containerDate == null">container_date = NULL,</if>
+            <if test="containerLifespan != null">container_lifespan = #{containerLifespan},</if>
+            <if test="containerLifespan == null">container_lifespan = NULL,</if>
+            <if test="pipe != null">pipe = #{pipe},</if>
+            <if test="pipeDate != null">pipe_date = #{pipeDate},</if>
+            <if test="pipeDate == null">pipe_date = NULL,</if>
+            <if test="pipeLifespan != null">pipe_lifespan = #{pipeLifespan},</if>
+            <if test="pipeLifespan == null">pipe_lifespan = NULL,</if>
+            <if test="worker != null">worker = #{worker},</if>
+            <if test="workerDate != null">worker_date = #{workerDate},</if>
+            <if test="workerDate == null">worker_date = NULL,</if>
+            <if test="workerLifespan != null">worker_lifespan = #{workerLifespan},</if>
+            <if test="workerLifespan == null">worker_lifespan = NULL,</if>
+            <if test="foreman != null">foreman = #{foreman},</if>
+            <if test="foremanDate != null">foreman_date = #{foremanDate},</if>
+            <if test="foremanDate == null">foreman_date = NULL,</if>
+            <if test="foremanLifespan != null">foreman_lifespan = #{foremanLifespan},</if>
+            <if test="foremanLifespan == null">foreman_lifespan = NULL,</if>
+            <if test="ac != null">ac = #{ac},</if>
+            <if test="acDate != null">ac_date = #{acDate},</if>
+            <if test="acDate == null">ac_date = NULL,</if>
+            <if test="acLifespan != null">ac_lifespan = #{acLifespan},</if>
+            <if test="acLifespan == null">ac_lifespan = NULL,</if>
+            <if test="firefighter != null">firefighter = #{firefighter},</if>
+            <if test="firefighterDate != null">firefighter_date = #{firefighterDate},</if>
+            <if test="firefighterDate == null">firefighter_date = NULL,</if>
+            <if test="firefighterLifespan != null">firefighter_lifespan = #{firefighterLifespan},</if>
+            <if test="firefighterLifespan == null">firefighter_lifespan = NULL,</if>
+            <if test="safety != null">safety = #{safety},</if>
+            <if test="safetyDate != null">safety_date = #{safetyDate},</if>
+            <if test="safetyDate == null">safety_date = NULL,</if>
+            <if test="safetyLifespan != null">safety_lifespan = #{safetyLifespan},</if>
+            <if test="safetyLifespan == null">safety_lifespan = NULL,</if>
+            <if test="tds != null">tds = #{tds},</if>
+            <if test="tdsDate != null">tds_date = #{tdsDate},</if>
+            <if test="tdsDate == null">tds_date = NULL,</if>
+            <if test="tdsLifespan != null">tds_lifespan = #{tdsLifespan},</if>
+            <if test="tdsLifespan == null">tds_lifespan = NULL,</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createrCode != null">creater_code = #{createrCode},</if>
+            <if test="createdate != null">createdate = #{createdate},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+        </trim>
+        where employeeid = #{employeeid}
+    </update>
+
+
     <update id="deleteTWorkcertificateCbpsById" parameterType="Long">
         update t_workcertificate_cbps set del_flag = 2 where id = #{id}
     </update>

+ 1 - 1
master/src/main/resources/mybatis/training/newstaff/TTnFirstplanMapper.xml

@@ -207,7 +207,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 
     <update id="batchStatusTTnFirstplanByids" parameterType="String">
-        update t_tn_firstplan set plan_status = 1 where id in
+        update t_tn_firstplan set plan_status = 1 , assess = '合格' where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>

+ 1 - 1
master/src/main/resources/mybatis/training/newstaff/TTnSchoolplanMapper.xml

@@ -203,7 +203,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </update>
 
     <update id="batchStatusByIds" parameterType="String">
-        update t_tn_schoolplan set plan_status = 1 where id in
+        update t_tn_schoolplan set plan_status = 1 , assess = '合格' where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>

+ 1 - 1
master/src/main/resources/mybatis/training/newstaff/TTnTransferplanMapper.xml

@@ -196,7 +196,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </update>
 
     <update id="batchStatusByIds" parameterType="String">
-        update t_tn_transferplan set plan_status = 1 where id in
+        update t_tn_transferplan set plan_status = 1 , assess = '合格' where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>

binární
master/src/main/resources/static/template/training/workcertificateCbps.xlsx


+ 53 - 0
ui/src/api/ehs/rcfile.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询RC附件列表
+export function listRcfile(query) {
+  return request({
+    url: '/ehs/rcfile/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询RC附件详细
+export function getRcfile(id) {
+  return request({
+    url: '/ehs/rcfile/' + id,
+    method: 'get'
+  })
+}
+
+// 新增RC附件
+export function addRcfile(data) {
+  return request({
+    url: '/ehs/rcfile',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改RC附件
+export function updateRcfile(data) {
+  return request({
+    url: '/ehs/rcfile',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除RC附件
+export function delRcfile(id) {
+  return request({
+    url: '/ehs/rcfile/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出RC附件
+export function exportRcfile(query) {
+  return request({
+    url: '/ehs/rcfile/export',
+    method: 'get',
+    params: query
+  })
+}

+ 2 - 1
ui/src/permission.js

@@ -12,7 +12,8 @@ const whiteList = ['/login','/socialLogin', '/azureLogin', '/auth-redirect', '/b
 router.beforeEach((to, from, next) => {
   NProgress.start()
   if (from.meta.keepAlive) {
-    const $content = document.querySelector('.el-table__body-wrapper');
+    const $content = document.querySelector('.menuTable > .el-table__body-wrapper');
+    console.log($content)
     const scrollTop = $content ? $content.scrollTop : 0;
     console.log(scrollTop)
     from.meta.scrollTop = scrollTop;

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

@@ -194,6 +194,19 @@ export const constantRoutes = [
       }
     ]
   },
+  {
+    path: '/ehs',
+    component: Layout,
+    hidden: true,
+    children: [
+      {
+        path: 'rcfile/:id(\\d+)',
+        component: (resolve) => require(['@/views/ehs/rcfile'], resolve),
+        name: 'rcfile',
+        meta: { title: '附件' }
+      }
+    ]
+  },
   {
     path: '/training/spec',
     component: Layout,

+ 26 - 16
ui/src/views/ehs/rcaudit/index.vue

@@ -157,7 +157,7 @@
             <el-form-item :label="$t('序号')" prop="rcCode">
               <el-input v-model="form.rcCode" :placeholder="$t('请输入') + $t('序号')" />
             </el-form-item>
-            <el-form-item :label="$t('目录')" prop="menuName">
+            <el-form-item :label="$t('目录')" prop="menuid">
               <el-select v-model="form.menuid" filterable :placeholder="$t('请选择') + $t('目录')">
                 <el-option
                   v-for="dict in menuOptions"
@@ -176,7 +176,7 @@
               <el-input v-model="form.nameEn" :placeholder="$t('请输入') + $t('英文名称')" />
             </el-form-item>
             <el-form-item label="YES/NO/NA" prop="yesnona">
-              <el-select v-model="yesnonaChoose" :placeholder="$t('请选择') + 'YES/NO/NA'" @change="yesnona($event)">
+              <el-select v-model="yesnonaChoose" :placeholder="$t('请选择') + 'YES/NO/NA'" @change="yesnona($event)" clearable>
                 <el-option
                   v-for="item in yesnonaOptions"
                   :key="item.value"
@@ -234,7 +234,7 @@
           </div>
         </el-dialog>
         <!-- 报告附件对话框 -->
-        <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="700px" append-to-body>
+        <el-dialog  :close-on-click-modal="false" v-dialogDrag  width="700px" append-to-body>
           <el-upload
             ref="doc"
             :limit="50"
@@ -297,6 +297,9 @@
             <!--        <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
             <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
           </div>
+        </el-dialog>
+        <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="700px" append-to-body>
+
 
         </el-dialog>
 
@@ -463,7 +466,7 @@
           rcCode: [
             { required: true, message: this.$t('序号') + this.$t('不能为空'), trigger: "blur" }
           ],
-          menuName: [
+          menuid: [
             { required: true, message: this.$t('目录') + "ID" + this.$t('不能为空'), trigger: "blur" }
           ],
           nameCn: [
@@ -609,6 +612,7 @@
       },
       //YES/NO/NA
       yesnona(val) {
+        console.log(val)
         if (val == 1) {
           this.form.yes = 10,
           this.form.no = null,
@@ -621,6 +625,10 @@
           this.form.yes = null,
           this.form.no = null,
           this.form.na = 10
+        }else {
+          this.form.yes = null,
+            this.form.no = null,
+            this.form.na = null
         }
       },
       /** 新增按钮操作 */
@@ -730,20 +738,22 @@
       },
       /** 报告附件按钮操作 */
       handleDoc(row) {
-        this.doc.id = row.id;
-        this.doc.title = row.filename;
-        this.doc.open = true;
-        this.doc.queryParams.pId = row.id
-        this.doc.pId = row.id
-        this.getFileList()
-        this.$nextTick(() => {
-          this.$refs.doc.clearFiles()
-        })
+        this.$router.push("/ehs/rcfile/" + row.id);
+
+        // this.doc.id = row.id;
+        // this.doc.title = row.filename;
+        // this.doc.open = true;
+        // this.doc.queryParams.pId = row.id
+        // this.doc.pId = row.id
+        // this.getFileList()
+        // this.$nextTick(() => {
+        //   this.$refs.doc.clearFiles()
+        // })
       },
       getFileList (){
-        allFileList(this.doc.queryParams).then(response => {
-          this.doc.commonfileList = response;
-        });
+        // allFileList(this.doc.queryParams).then(response => {
+        //   this.doc.commonfileList = response;
+        // });
       },
       //附件上传中处理
       handleFileDocProgress(event, file, fileList) {

+ 419 - 0
ui/src/views/ehs/rcfile/index.vue

@@ -0,0 +1,419 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="文件名" prop="fileName">
+        <el-input
+          v-model="queryParams.fileName"
+          placeholder="请输入文件名"
+          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">
+        {{rcName}}
+    </el-row>
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-folder-add"
+          size="mini"
+          @click="handleAdd"
+        >新建文件夹</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleAddFile"
+        >上传文件</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table
+      v-loading="loading"
+      :data="rcfileList"
+      row-key="id"
+      default-expand-all
+      :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
+    >
+      <el-table-column :label="$t('文件名')" width="500" align="left" prop="fileName" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <a v-if="scope.row.fileType == 1"  class="link-type"  @click="handleDownload(scope.row)">
+            <span>{{ scope.row.fileName }}</span>
+          </a>
+          <span v-else-if="scope.row.fileType == 0" >{{ scope.row.fileName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="类型" width="80" align="center" prop="fileType" >
+        <template slot-scope="scope">
+          <i v-if="scope.row.fileType == 1" class="el-icon-document"></i>
+          <i v-else-if="scope.row.fileType == 0" class="el-icon-folder"></i>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="创建人" align="center" prop="creator" />
+      <el-table-column label="创建时间" align="center" prop="createdate" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+<!--      <el-table-column label="更新人" align="center" prop="updaterCode" />-->
+<!--      <el-table-column label="更新时间" align="center" prop="updatedate" width="180">-->
+<!--        <template slot-scope="scope">-->
+<!--          <span>{{ parseTime(scope.row.updatedate, '{y}-{m}-{d}') }}</span>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
+<!--      <el-table-column label="备注" align="center" prop="remarks" />-->
+<!--      <el-table-column label="业务类型" align="center" prop="pType" />-->
+      <el-table-column label="文件大小(Kb)" width="100" align="center" prop="fileSize" />
+<!--      <el-table-column label="父类ID" align="center" prop="parentId" />-->
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            v-if="scope.row.fileName.endsWith('pdf') && scope.row.fileType == 1"
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="handleSee(scope.row)"
+          >{{ $t('预览') }}</el-button>
+          <el-button
+            v-if="scope.row.fileType == 1"
+            size="mini"
+            type="text"
+            icon="el-icon-download"
+            @click="handleDownload(scope.row)"
+          >{{ $t('下载') }}</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
+      <div style="margin-top: -60px;float: right;margin-right: 40px;">
+        <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
+      <div style="margin-top: -30px">
+        <iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
+      </div>
+    </el-dialog>
+    <!-- 添加或修改RC附件对话框 -->
+    <el-dialog :title="doc.title" :visible.sync="doc.open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-upload
+          ref="doc"
+          :limit="50"
+          :headers="doc.headers"
+          :action="doc.url + '?parentId=' + form.parentId + '&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-form-item label="上级" prop="parentId">
+          <treeselect v-model="form.parentId" :options="rcfileOptions" :normalizer="normalizer" 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>
+    <!-- 添加或修改RC附件对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item v-if="form.fileType != 1" label="文件夹" prop="fileName">
+          <el-input v-model="form.fileName" placeholder="请输入文件名" />
+        </el-form-item>
+
+        <el-form-item label="上级" prop="parentId">
+          <treeselect v-model="form.parentId" :options="rcfileOptions" :normalizer="normalizer" 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>
+  </div>
+</template>
+
+<script>
+import { listRcfile, getRcfile, delRcfile, addRcfile, updateRcfile, exportRcfile } from "@/api/ehs/rcfile";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import {getToken} from "@/utils/auth";
+import {addFile, getRcaudit} from "@/api/ehs/rcaudit";
+
+export default {
+  name: "Rcfile",
+  components: {
+    Treeselect
+  },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 显示搜索条件
+      showSearch: false,
+      // RC附件表格数据
+      rcfileList: [],
+      // RC附件树选项
+      rcfileOptions: [],
+      // 弹出层标题
+      title: "",
+      rcName: "",
+      // 是否显示弹出层
+      open: false,
+      pId: null,
+      // 查询参数
+      queryParams: {
+        fileName: null,
+        pId: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        id: [
+          { required: true, message: "id不能为空", trigger: "blur" }
+        ],
+      },
+      pdf : {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+      },
+      // 报告附件参数
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/ehs/rcfile/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'rcaudit'
+        },
+        pType: 'rcaudit',
+        pId: null
+      },
+    };
+  },
+  created() {
+    const pId = this.$route.params && this.$route.params.id;
+    this.pId = pId
+    this.doc.pId = pId;
+    this.getList();
+    getRcaudit(pId).then(response => {
+      this.rcName =response.data.rcCode + "    " + response.data.nameCn;
+      ;
+    });
+  },
+  methods: {
+    /** 查询RC附件列表 */
+    getList() {
+      this.loading = true;
+      this.queryParams.pId = this.pId
+      listRcfile(this.queryParams).then(response => {
+        this.rcfileList = this.handleTree(response.data, "id", "parentId");
+        this.loading = false;
+      });
+    },
+    /** 转换RC附件数据结构 */
+    normalizer(node) {
+      if (node.children && !node.children.length) {
+        delete node.children;
+      }
+      return {
+        id: node.id,
+        label: node.fileName,
+        children: node.children
+      };
+    },
+	/** 查询部门下拉树结构 */
+    getTreeselect() {
+      let param = {}
+      param.pId= this.pId
+      param.fileType = 0
+      listRcfile(param).then(response => {
+        this.rcfileOptions = [];
+        const data = { id: 0, fileName: '顶级节点', children: [] };
+        data.children = this.handleTree(response.data, "id", "parentId");
+        this.rcfileOptions.push(data);
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        pId: null,
+        fileName: null,
+        fileUrl: null,
+        delFlag: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        remarks: null,
+        pType: null,
+        fileSize: null,
+        pValue: null,
+        pDate: null,
+        fileType: null,
+        parentId: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+	  this.getTreeselect();
+      this.open = true;
+      this.title = "添加RC附件";
+    },
+    handleAddFile() {
+      this.reset();
+      this.getTreeselect();
+      this.form.parentId = 0
+      this.doc.open = true;
+      this.doc.title = "添加RC附件";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+	  this.getTreeselect();
+      if (row != null) {
+        this.form.parentId = row.id;
+      }
+      getRcfile(row.id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改RC附件";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateRcfile(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            this.form.pId = this.pId
+            addRcfile(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    // 文件下载处理
+    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()
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      this.$confirm('是否确认删除RC附件编号为"' + row.id + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delRcfile(row.id);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+    },
+    //附件上传中处理
+    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.form.id = this.doc.pId;
+      addFile(this.form)
+      this.getFileList()
+      this.getList()
+    },
+    handleSee (row){
+      this.pdf.open =true
+      this.pdf.title = row.fileName
+      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+    },
+    //pdf预览
+    openPdf(){
+      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+    },
+  }
+};
+</script>

+ 1 - 1
ui/src/views/hcqhome.vue

@@ -17,7 +17,7 @@
       <el-col :xs="24" :sm="24" :lg="8">
         <div>
           <div class="card-head">
-            <span class="card-name">装置培训完成情况</span>
+            <span class="card-name">装置年度培训完成情况</span>
           </div>
         </div>
         <div class="chart-wrapper">

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

@@ -205,7 +205,7 @@
             icon="el-icon-s-release"
             @click="handleLeftDelete(scope.row)"
             v-hasPermi="['plant:staffmgr:remove']"
-          >{{ $t('离') }}</el-button>
+          >{{ $t('离') }}</el-button>
           <el-button
             size="mini"
             type="text"
@@ -427,12 +427,12 @@
             </el-form-item>
           </el-col>
           <el-col :span="12" v-if="form.delFlag == 9">
-            <el-form-item :label="$t('离日期')" prop="birthday">
+            <el-form-item :label="$t('离日期')" prop="birthday">
               <el-date-picker clearable size="small" style="width: 200px"
                               v-model="form.leftDate"
                               type="date"
                               value-format="yyyy-MM-dd"
-                              :placeholder="$t('请选择') + $t('离日期')">
+                              :placeholder="$t('请选择') + $t('离日期')">
               </el-date-picker>
             </el-form-item>
           </el-col>
@@ -559,7 +559,7 @@
         <el-table-column :label="$t('装置名称')" align="center" prop="plantCode" :formatter="plantCodeFormat" />
         <el-table-column :label="$t('员工编号')" align="center" prop="staffid" :show-overflow-tooltip="true"/>
         <el-table-column :label="$t('员工姓名')" align="center" prop="name" :show-overflow-tooltip="true"/>
-        <el-table-column :label="$t('离日期')" align="center" prop="leftDate" :show-overflow-tooltip="true">
+        <el-table-column :label="$t('离日期')" align="center" prop="leftDate" :show-overflow-tooltip="true">
           <template slot-scope="scope">
             <span>{{ parseTime(scope.row.leftDate, '{y}-{m}-{d}') }}</span>
           </template>
@@ -1091,7 +1091,7 @@
       /** 删除按钮操作 */
       handleLeftDelete(row) {
         const ids = row.id;
-        this.$confirm(this.$t('是否确认离?'), this.$t('警告'), {
+        this.$confirm(this.$t('是否确认离?'), this.$t('警告'), {
           confirmButtonText: this.$t('确定'),
           cancelButtonText: this.$t('取消'),
           type: "warning"
@@ -1099,7 +1099,7 @@
           return delLeftStaffmgr(ids);
         }).then(() => {
           this.getList();
-          this.msgSuccess(this.$t('离成功'));
+          this.msgSuccess(this.$t('离成功'));
         })
       },
 
@@ -1223,7 +1223,7 @@
       handleLeft(isRetire){
         this.retireQueryParams.pageNum = 1
         this.left.open = true;
-        isRetire == 0?this.left.title = this.$t('离人员信息'):this.left.title =this.$t('退休人员信息');
+        isRetire == 0?this.left.title = this.$t('离人员信息'):this.left.title =this.$t('退休人员信息');
         this.getLeftData(isRetire);
       },
       getLeftData(isRetire){

+ 0 - 21
ui/src/views/training/newstaff/firstplan/index.vue

@@ -37,14 +37,6 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="培训日期" prop="courseDate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.courseDate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择培训日期">
-        </el-date-picker>
-      </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>
@@ -103,11 +95,6 @@
       <el-table-column label="培训小时" align="center" prop="courseHour" :show-overflow-tooltip="true"/>
       <el-table-column label="培训类型" align="center" prop="courseType" :show-overflow-tooltip="true"/>
       <el-table-column label="讲师" align="center" prop="trainer" :show-overflow-tooltip="true"/>
-      <el-table-column label="培训日期" align="center" prop="courseDate" width="100">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.courseDate, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
       <el-table-column label="考核情况" align="center" prop="assess" :show-overflow-tooltip="true"/>
       <el-table-column label="培训状态" align="center" prop="planStatus" >
         <template slot-scope="scope">
@@ -168,14 +155,6 @@
         <el-form-item label="讲师" prop="trainer">
           <el-input v-model="form.trainer" placeholder="请输入讲师" />
         </el-form-item>
-        <el-form-item label="培训日期" prop="courseDate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.courseDate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择培训日期">
-          </el-date-picker>
-        </el-form-item>
         <el-form-item label="考核情况" prop="assess">
           <el-input v-model="form.assess" placeholder="请输入考核情况" />
         </el-form-item>

+ 2 - 21
ui/src/views/training/newstaff/schoolplan/index.vue

@@ -28,14 +28,6 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="培训日期" prop="courseDate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.courseDate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择培训日期">
-        </el-date-picker>
-      </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>
@@ -94,11 +86,7 @@
       <el-table-column label="培训天" align="center" prop="courseDay" :show-overflow-tooltip="true"/>
       <el-table-column label="培训小时" align="center" prop="courseHour" :show-overflow-tooltip="true"/>
       <el-table-column label="详细计划" align="center" prop="detailPlan" :show-overflow-tooltip="true"/>
-      <el-table-column label="培训日期" align="center" prop="courseDate" width="100">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.courseDate, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
+
       <el-table-column label="考核情况" align="center" prop="assess" :show-overflow-tooltip="true"/>
       <el-table-column label="培训状态" align="center" prop="planStatus" :formatter="planStatusFormat" >
         <template slot-scope="scope">
@@ -156,14 +144,7 @@
         <el-form-item label="详细计划" prop="detailPlan">
           <el-input v-model="form.detailPlan" placeholder="请输入详细计划" />
         </el-form-item>
-        <el-form-item label="培训日期" prop="courseDate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.courseDate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择培训日期">
-          </el-date-picker>
-        </el-form-item>
+
         <el-form-item label="考核情况" prop="assess">
           <el-input v-model="form.assess" placeholder="请输入考核情况" />
         </el-form-item>

+ 1 - 1
ui/src/views/training/newstaff/tnNew/index.vue

@@ -680,7 +680,7 @@ export default {
       this.doc.title = this.$t('附件') ;
       this.doc.open = true;
       this.doc.queryParams.pId = row.id
-      this.doc.pId = row.id
+      this.doc.pId = row.newId
       this.getFileList()
       this.$nextTick(() => {
         this.$refs.doc.clearFiles()

+ 0 - 13
ui/src/views/training/newstaff/transferplan/index.vue

@@ -76,11 +76,6 @@
       <el-table-column label="培训天" align="center" prop="courseDay" :show-overflow-tooltip="true"/>
       <el-table-column label="培训小时" align="center" prop="courseHour" :show-overflow-tooltip="true"/>
       <el-table-column label="详细计划" align="center" prop="detailPlan" :show-overflow-tooltip="true"/>
-      <el-table-column label="培训日期" align="center" prop="courseDate" width="100">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.courseDate, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
       <el-table-column label="考核情况" align="center" prop="assess" :show-overflow-tooltip="true"/>
       <el-table-column label="培训状态" align="center" prop="planStatus" :formatter="planStatusFormat" >
         <template slot-scope="scope">
@@ -138,14 +133,6 @@
         <el-form-item label="详细计划" prop="detailPlan">
           <el-input v-model="form.detailPlan" placeholder="请输入详细计划" />
         </el-form-item>
-        <el-form-item label="培训日期" prop="courseDate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.courseDate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择培训日期">
-          </el-date-picker>
-        </el-form-item>
         <el-form-item label="考核情况" prop="assess">
           <el-input v-model="form.assess" placeholder="请输入考核情况" />
         </el-form-item>

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

@@ -64,6 +64,16 @@
           @click="handleExport"
           v-hasPermi="['training:workcertificate:export']"
         >导出</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['training:workcertificate:edit']"
+        >{{ $t('导入') }}
+        </el-button>
       </el-col>
 	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -430,9 +440,11 @@
                   <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">
@@ -565,6 +577,9 @@ export default {
       classesOptions: [],
         // 用户导入参数
         upload: {
+          downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+          // 是否显示弹出层(用户w导入)
+          type: "workcertificateCbps",
             // 是否显示弹出层(用户导入)
             open: false,
             // 弹出层标题(用户导入)
@@ -869,9 +884,7 @@ export default {
       },
       /** 下载模板操作 */
       importTemplate() {
-          importTemplate().then(response => {
-              this.download(response.msg);
-          });
+        this.$refs['downloadFileForm'].submit()
       },
       // 文件上传中处理
       handleFileUploadProgress(event, file, fileList) {
@@ -882,7 +895,15 @@ export default {
           this.upload.open = false;
           this.upload.isUploading = false;
           this.$refs.upload.clearFiles();
-          this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
+        if (response.data.length > 0) {
+          let failrow = ''
+          for (let i = 0; i < response.data.length; i++) {
+            failrow += response.data[i] + ','
+          }
+          this.$alert(this.$t('导入成功条数:') + response.msg + '<br>' + this.$t('失败行数:') + failrow, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+        } else {
+          this.$alert(this.$t('导入成功条数:') + response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+        }
           this.getList();
       },
       // 提交上传文件