ly 2 сар өмнө
parent
commit
bc8eefd7df

+ 80 - 0
master/src/main/java/com/ruoyi/project/document/controller/TPlantproglistController.java

@@ -380,6 +380,86 @@ public class TPlantproglistController extends BaseController
         return AjaxResult.success() ;
     }
 
+    /**
+     * 强制添加到培训装置程序清单(不检查培训矩阵)
+     */
+    @PreAuthorize("@ss.hasPermi('document:plantproglist:remove')")
+    @Log(title = "强制添加到装置程序清单", businessType = BusinessType.OTHER)
+    @DeleteMapping("/addTrainingForce/{id}")
+    public AjaxResult addTrainingForce(@PathVariable Long id)
+    {
+        TPlantproglist tPlantproglist = tPlantproglistService.selectTPlantproglistById(id);
+        
+        // 获取附件信息
+        TCommonfile fileParam = new TCommonfile();
+        fileParam.setpId(id);
+        fileParam.setpType("plantproglist");
+        List<TCommonfile> fileList = tCommonfileService.selectAllFileList(fileParam);
+        String fileUrl = "";
+        String fileName = "";
+        if (fileList.size() > 0) {
+            fileUrl = fileList.get(0).getFileUrl();
+            fileName = fileList.get(0).getFileName();
+        }
+
+        Date currentDate = new Date();
+        
+        //新增培训跟踪
+        TTrainingbcc tTraining = new TTrainingbcc();
+        tTraining.setTrainingType("14"); // 装置级培训
+        tTraining.setYears(String.valueOf(LocalDate.now().getYear()));
+        tTraining.setCourse(tPlantproglist.getFilename()); // 使用文件名作为课程名称
+        tTraining.setCourseid(tPlantproglist.getFileno()); // 使用文件编号作为课程代码
+        tTraining.setDuration(null); // 未指定课时
+        tTraining.setPosition(null); // 未指定岗位
+        tTraining.setIsfinish(Long.parseLong("0"));
+        tTraining.setDeptId(103L); // BCC专用
+        tTraining.setRegularId(null);
+        tTraining.setPeriod(null); // 未指定频率
+        tTraining.setFileUrl(fileUrl);
+        tTraining.setFileName(fileName);
+        
+        // 培训内容:去掉文件后缀
+        String content = fileName;
+        if (StringUtils.isNotEmpty(fileName) && fileName.contains(".")) {
+            content = fileName.substring(0, fileName.lastIndexOf("."));
+        }
+        tTraining.setContent(content);
+        
+        // 通过人名查找staffmgr,获取员工编号来赋值trainer
+        String trainerName = tPlantproglist.getResponsibility();
+        if (StringUtils.isNotEmpty(trainerName)) {
+            TStaffmgr staffmgrParam = new TStaffmgr();
+            staffmgrParam.setName(trainerName);
+            staffmgrParam.setDeptId(103L);
+            staffmgrParam.setDelFlag(0L); // 未删除的员工
+            TStaffmgr staffmgr = tStaffmgrMapper.selectStaffmgrSingle(staffmgrParam);
+            if (staffmgr != null && StringUtils.isNotEmpty(staffmgr.getStaffid())) {
+                tTraining.setTrainer(staffmgr.getStaffid());
+            }
+        }
+        
+        // 设置培训开始时间为发布时日期
+        tTraining.setCourseStartdate(currentDate);
+
+        // 设置培训结束时间为发布后一个月
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(currentDate);
+        calendar.add(Calendar.MONTH, 1);
+        Date endDate = calendar.getTime();
+        tTraining.setCourseEnddate(endDate);
+        
+        // 设置默认学习时长为60分钟
+        tTraining.setTimerNeed(60L);
+
+        // 插入培训记录
+        trainingbccService.insertTTrainingbcc(tTraining);
+        
+        logger.info("强制添加培训成功,未找到培训矩阵,培训ID: " + tTraining.getId());
+        
+        return AjaxResult.success("已添加培训跟踪(注意:未找到培训矩阵,未自动关联参培人员,请手动添加)");
+    }
+
     /**
      * 批量导入装置程序清单
      */

+ 11 - 0
master/src/main/java/com/ruoyi/project/plant/controller/TEoegDailyManagementController.java

@@ -100,4 +100,15 @@ public class TEoegDailyManagementController extends BaseController
     {
         return toAjax(tEoegDailyManagementService.deleteTEoegDailyManagementByIds(ids));
     }
+
+    /**
+     * 获取EOEG日常管理首页统计数据
+     */
+    @GetMapping("/dashboard")
+    public TableDataInfo getDashboardData(TEoegDailyManagement tEoegDailyManagement)
+    {
+        startPage();
+        List<TEoegDailyManagement> list = tEoegDailyManagementService.selectTEoegDailyManagementList(tEoegDailyManagement);
+        return getDataTable(list);
+    }
 }

+ 8 - 9
master/src/main/java/com/ruoyi/project/plant/mapper/TEoegDailyManagementMapper.java

@@ -6,15 +6,15 @@ import com.ruoyi.project.plant.domain.TEoegDailyManagement;
 
 /**
  * 日常管理EOEGMapper接口
- * 
+ *
  * @author ssy
  * @date 2025-10-10
  */
-public interface TEoegDailyManagementMapper 
+public interface TEoegDailyManagementMapper
 {
     /**
      * 查询日常管理EOEG
-     * 
+     *
      * @param id 日常管理EOEGID
      * @return 日常管理EOEG
      */
@@ -22,16 +22,15 @@ public interface TEoegDailyManagementMapper
 
     /**
      * 查询日常管理EOEG列表
-     * 
+     *
      * @param tEoegDailyManagement 日常管理EOEG
      * @return 日常管理EOEG集合
      */
-    @DataScope(deptAlias = "d")
     public List<TEoegDailyManagement> selectTEoegDailyManagementList(TEoegDailyManagement tEoegDailyManagement);
 
     /**
      * 新增日常管理EOEG
-     * 
+     *
      * @param tEoegDailyManagement 日常管理EOEG
      * @return 结果
      */
@@ -39,7 +38,7 @@ public interface TEoegDailyManagementMapper
 
     /**
      * 修改日常管理EOEG
-     * 
+     *
      * @param tEoegDailyManagement 日常管理EOEG
      * @return 结果
      */
@@ -47,7 +46,7 @@ public interface TEoegDailyManagementMapper
 
     /**
      * 删除日常管理EOEG
-     * 
+     *
      * @param id 日常管理EOEGID
      * @return 结果
      */
@@ -55,7 +54,7 @@ public interface TEoegDailyManagementMapper
 
     /**
      * 批量删除日常管理EOEG
-     * 
+     *
      * @param ids 需要删除的数据ID
      * @return 结果
      */

+ 103 - 0
master/src/main/java/com/ruoyi/project/reliability/controller/TRelDeviceController.java

@@ -0,0 +1,103 @@
+package com.ruoyi.project.reliability.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.reliability.domain.TRelDevice;
+import com.ruoyi.project.reliability.service.ITRelDeviceService;
+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;
+
+/**
+ * 可靠性设备清单Controller
+ *
+ * @author ssy
+ * @date 2025-10-13
+ */
+@RestController
+@RequestMapping("/reliability/rel_device")
+public class TRelDeviceController extends BaseController
+{
+    @Autowired
+    private ITRelDeviceService tRelDeviceService;
+
+    /**
+     * 查询可靠性设备清单列表
+     */
+    @PreAuthorize("@ss.hasPermi('reliability:rel_device:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TRelDevice tRelDevice)
+    {
+        startPage();
+        List<TRelDevice> list = tRelDeviceService.selectTRelDeviceList(tRelDevice);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出可靠性设备清单列表
+     */
+    @PreAuthorize("@ss.hasPermi('reliability:rel_device:list')")
+    @Log(title = "可靠性设备清单", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TRelDevice tRelDevice)
+    {
+        List<TRelDevice> list = tRelDeviceService.selectTRelDeviceList(tRelDevice);
+        ExcelUtil<TRelDevice> util = new ExcelUtil<TRelDevice>(TRelDevice.class);
+        return util.exportExcel(list, "rel_device");
+    }
+
+    /**
+     * 获取可靠性设备清单详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('reliability:rel_device:query')")
+    @GetMapping(value = "/{devId}")
+    public AjaxResult getInfo(@PathVariable("devId") Long devId)
+    {
+        return AjaxResult.success(tRelDeviceService.selectTRelDeviceById(devId));
+    }
+
+    /**
+     * 新增可靠性设备清单
+     */
+    @PreAuthorize("@ss.hasPermi('reliability:rel_device:add')")
+    @Log(title = "可靠性设备清单", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TRelDevice tRelDevice)
+    {
+        return toAjax(tRelDeviceService.insertTRelDevice(tRelDevice));
+    }
+
+    /**
+     * 修改可靠性设备清单
+     */
+    @PreAuthorize("@ss.hasPermi('reliability:rel_device:edit')")
+    @Log(title = "可靠性设备清单", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TRelDevice tRelDevice)
+    {
+        return toAjax(tRelDeviceService.updateTRelDevice(tRelDevice));
+    }
+
+    /**
+     * 删除可靠性设备清单
+     */
+    @PreAuthorize("@ss.hasPermi('reliability:rel_device:remove')")
+    @Log(title = "可靠性设备清单", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{devIds}")
+    public AjaxResult remove(@PathVariable Long[] devIds)
+    {
+        return toAjax(tRelDeviceService.deleteTRelDeviceByIds(devIds));
+    }
+}

+ 264 - 0
master/src/main/java/com/ruoyi/project/reliability/domain/TRelDevice.java

@@ -0,0 +1,264 @@
+package com.ruoyi.project.reliability.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;
+
+/**
+ * 可靠性设备清单对象 t_rel_device
+ *
+ * @author ssy
+ * @date 2025-10-13
+ */
+public class TRelDevice extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键ID */
+    private Long devId;
+
+    /** 装置 */
+    @Excel(name = "装置")
+    private String plant;
+
+    /** 位置 */
+    @Excel(name = "位置")
+    private String devilocation;
+
+    /** 设备名称 */
+    @Excel(name = "设备名称")
+    private String devName;
+
+    /** 设备位号 */
+    @Excel(name = "设备位号")
+    private String devTag;
+
+    /** 设备类型 */
+    @Excel(name = "设备类型")
+    private String devType;
+
+    /** 设备描述 */
+    @Excel(name = "设备描述")
+    private String devDesc;
+
+    /** 区域 */
+    @Excel(name = "区域")
+    private String devArea;
+
+    /** 区域负责人 */
+    @Excel(name = "区域负责人")
+    private String areaResponsible;
+
+    /** 设备照片 */
+    @Excel(name = "设备照片")
+    private String devPhoto;
+
+    /** 删除状态 */
+    private Long delFlag;
+
+    /** 创建人 */
+    @Excel(name = "创建人")
+    private String createrCode;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date createdate;
+
+    /** 修改人 */
+    @Excel(name = "修改人")
+    private String updaterCode;
+
+    /** 修改时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date updatedate;
+
+    /** 部门编号 */
+    @Excel(name = "部门编号")
+    private Long deptId;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    public void setDevId(Long devId)
+    {
+        this.devId = devId;
+    }
+
+    public Long getDevId()
+    {
+        return devId;
+    }
+    public void setPlant(String plant)
+    {
+        this.plant = plant;
+    }
+
+    public String getPlant()
+    {
+        return plant;
+    }
+    public void setDevilocation(String devilocation)
+    {
+        this.devilocation = devilocation;
+    }
+
+    public String getDevilocation()
+    {
+        return devilocation;
+    }
+    public void setDevName(String devName)
+    {
+        this.devName = devName;
+    }
+
+    public String getDevName()
+    {
+        return devName;
+    }
+    public void setDevTag(String devTag)
+    {
+        this.devTag = devTag;
+    }
+
+    public String getDevTag()
+    {
+        return devTag;
+    }
+    public void setDevType(String devType)
+    {
+        this.devType = devType;
+    }
+
+    public String getDevType()
+    {
+        return devType;
+    }
+    public void setDevDesc(String devDesc)
+    {
+        this.devDesc = devDesc;
+    }
+
+    public String getDevDesc()
+    {
+        return devDesc;
+    }
+    public void setDevArea(String devArea)
+    {
+        this.devArea = devArea;
+    }
+
+    public String getDevArea()
+    {
+        return devArea;
+    }
+    public void setAreaResponsible(String areaResponsible)
+    {
+        this.areaResponsible = areaResponsible;
+    }
+
+    public String getAreaResponsible()
+    {
+        return areaResponsible;
+    }
+    public void setDevPhoto(String devPhoto)
+    {
+        this.devPhoto = devPhoto;
+    }
+
+    public String getDevPhoto()
+    {
+        return devPhoto;
+    }
+    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 setDeptId(Long deptId)
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId()
+    {
+        return deptId;
+    }
+    public void setRemarks(String remarks)
+    {
+        this.remarks = remarks;
+    }
+
+    public String getRemarks()
+    {
+        return remarks;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("devId", getDevId())
+            .append("plant", getPlant())
+            .append("devilocation", getDevilocation())
+            .append("devName", getDevName())
+            .append("devTag", getDevTag())
+            .append("devType", getDevType())
+            .append("devDesc", getDevDesc())
+            .append("devArea", getDevArea())
+            .append("areaResponsible", getAreaResponsible())
+            .append("devPhoto", getDevPhoto())
+            .append("delFlag", getDelFlag())
+            .append("createrCode", getCreaterCode())
+            .append("createdate", getCreatedate())
+            .append("updaterCode", getUpdaterCode())
+            .append("updatedate", getUpdatedate())
+            .append("deptId", getDeptId())
+            .append("remarks", getRemarks())
+            .toString();
+    }
+}

+ 63 - 0
master/src/main/java/com/ruoyi/project/reliability/mapper/TRelDeviceMapper.java

@@ -0,0 +1,63 @@
+package com.ruoyi.project.reliability.mapper;
+
+import java.util.List;
+import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
+import com.ruoyi.project.reliability.domain.TRelDevice;
+
+/**
+ * 可靠性设备清单Mapper接口
+ *
+ * @author ssy
+ * @date 2025-10-13
+ */
+public interface TRelDeviceMapper
+{
+    /**
+     * 查询可靠性设备清单
+     *
+     * @param devId 可靠性设备清单ID
+     * @return 可靠性设备清单
+     */
+    public TRelDevice selectTRelDeviceById(Long devId);
+
+    /**
+     * 查询可靠性设备清单列表
+     *
+     * @param tRelDevice 可靠性设备清单
+     * @return 可靠性设备清单集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TRelDevice> selectTRelDeviceList(TRelDevice tRelDevice);
+
+    /**
+     * 新增可靠性设备清单
+     *
+     * @param tRelDevice 可靠性设备清单
+     * @return 结果
+     */
+    public int insertTRelDevice(TRelDevice tRelDevice);
+
+    /**
+     * 修改可靠性设备清单
+     *
+     * @param tRelDevice 可靠性设备清单
+     * @return 结果
+     */
+    public int updateTRelDevice(TRelDevice tRelDevice);
+
+    /**
+     * 删除可靠性设备清单
+     *
+     * @param devId 可靠性设备清单ID
+     * @return 结果
+     */
+    public int deleteTRelDeviceById(Long devId);
+
+    /**
+     * 批量删除可靠性设备清单
+     *
+     * @param devIds 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTRelDeviceByIds(Long[] devIds);
+}

+ 61 - 0
master/src/main/java/com/ruoyi/project/reliability/service/ITRelDeviceService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.project.reliability.service;
+
+import java.util.List;
+import com.ruoyi.project.reliability.domain.TRelDevice;
+
+/**
+ * 可靠性设备清单Service接口
+ *
+ * @author ssy
+ * @date 2025-10-13
+ */
+public interface ITRelDeviceService
+{
+    /**
+     * 查询可靠性设备清单
+     *
+     * @param devId 可靠性设备清单ID
+     * @return 可靠性设备清单
+     */
+    public TRelDevice selectTRelDeviceById(Long devId);
+
+    /**
+     * 查询可靠性设备清单列表
+     *
+     * @param tRelDevice 可靠性设备清单
+     * @return 可靠性设备清单集合
+     */
+    public List<TRelDevice> selectTRelDeviceList(TRelDevice tRelDevice);
+
+    /**
+     * 新增可靠性设备清单
+     *
+     * @param tRelDevice 可靠性设备清单
+     * @return 结果
+     */
+    public int insertTRelDevice(TRelDevice tRelDevice);
+
+    /**
+     * 修改可靠性设备清单
+     *
+     * @param tRelDevice 可靠性设备清单
+     * @return 结果
+     */
+    public int updateTRelDevice(TRelDevice tRelDevice);
+
+    /**
+     * 批量删除可靠性设备清单
+     *
+     * @param devIds 需要删除的可靠性设备清单ID
+     * @return 结果
+     */
+    public int deleteTRelDeviceByIds(Long[] devIds);
+
+    /**
+     * 删除可靠性设备清单信息
+     *
+     * @param devId 可靠性设备清单ID
+     * @return 结果
+     */
+    public int deleteTRelDeviceById(Long devId);
+}

+ 93 - 0
master/src/main/java/com/ruoyi/project/reliability/service/impl/TRelDeviceServiceImpl.java

@@ -0,0 +1,93 @@
+package com.ruoyi.project.reliability.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.project.reliability.mapper.TRelDeviceMapper;
+import com.ruoyi.project.reliability.domain.TRelDevice;
+import com.ruoyi.project.reliability.service.ITRelDeviceService;
+
+/**
+ * 可靠性设备清单Service业务层处理
+ *
+ * @author ssy
+ * @date 2025-10-13
+ */
+@Service
+public class TRelDeviceServiceImpl implements ITRelDeviceService
+{
+    @Autowired
+    private TRelDeviceMapper tRelDeviceMapper;
+
+    /**
+     * 查询可靠性设备清单
+     *
+     * @param devId 可靠性设备清单ID
+     * @return 可靠性设备清单
+     */
+    @Override
+    public TRelDevice selectTRelDeviceById(Long devId)
+    {
+        return tRelDeviceMapper.selectTRelDeviceById(devId);
+    }
+
+    /**
+     * 查询可靠性设备清单列表
+     *
+     * @param tRelDevice 可靠性设备清单
+     * @return 可靠性设备清单
+     */
+    @Override
+    public List<TRelDevice> selectTRelDeviceList(TRelDevice tRelDevice)
+    {
+        return tRelDeviceMapper.selectTRelDeviceList(tRelDevice);
+    }
+
+    /**
+     * 新增可靠性设备清单
+     *
+     * @param tRelDevice 可靠性设备清单
+     * @return 结果
+     */
+    @Override
+    public int insertTRelDevice(TRelDevice tRelDevice)
+    {
+        return tRelDeviceMapper.insertTRelDevice(tRelDevice);
+    }
+
+    /**
+     * 修改可靠性设备清单
+     *
+     * @param tRelDevice 可靠性设备清单
+     * @return 结果
+     */
+    @Override
+    public int updateTRelDevice(TRelDevice tRelDevice)
+    {
+        return tRelDeviceMapper.updateTRelDevice(tRelDevice);
+    }
+
+    /**
+     * 批量删除可靠性设备清单
+     *
+     * @param devIds 需要删除的可靠性设备清单ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTRelDeviceByIds(Long[] devIds)
+    {
+        return tRelDeviceMapper.deleteTRelDeviceByIds(devIds);
+    }
+
+    /**
+     * 删除可靠性设备清单信息
+     *
+     * @param devId 可靠性设备清单ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTRelDeviceById(Long devId)
+    {
+        return tRelDeviceMapper.deleteTRelDeviceById(devId);
+    }
+}

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

@@ -203,7 +203,7 @@ gen:
   # 作者
   author: ssy
   # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
-  packageName: com.ruoyi.project.plant # 自动去除表前缀,默认是true
+  packageName: com.ruoyi.project.reliability # 自动去除表前缀,默认是true
   autoRemovePre: false
   # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
   tablePrefix: sys_

+ 141 - 0
master/src/main/resources/mybatis/reliability/TRelDeviceMapper.xml

@@ -0,0 +1,141 @@
+<?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.reliability.mapper.TRelDeviceMapper">
+
+    <resultMap type="TRelDevice" id="TRelDeviceResult">
+        <result property="devId"    column="dev_id"    />
+        <result property="plant"    column="plant"    />
+        <result property="devilocation"    column="devilocation"    />
+        <result property="devName"    column="dev_name"    />
+        <result property="devTag"    column="dev_tag"    />
+        <result property="devType"    column="dev_type"    />
+        <result property="devDesc"    column="dev_desc"    />
+        <result property="devArea"    column="dev_area"    />
+        <result property="areaResponsible"    column="area_responsible"    />
+        <result property="devPhoto"    column="dev_photo"    />
+        <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="deptId"    column="dept_id"    />
+        <result property="remarks"    column="remarks"    />
+        <result property="deptName" column="dept_name" />
+    </resultMap>
+
+    <sql id="selectTRelDeviceVo">
+        select d.dev_id, d.plant, d.devilocation, d.dev_name, d.dev_tag, d.dev_type, d.dev_desc, d.dev_area, d.area_responsible, d.dev_photo, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks ,s.dept_name from t_rel_device d
+      left join sys_dept s on s.dept_id = d.dept_id
+    </sql>
+
+    <select id="selectTRelDeviceList" parameterType="TRelDevice" resultMap="TRelDeviceResult">
+        <include refid="selectTRelDeviceVo"/>
+        <where>
+            <if test="plant != null  and plant != ''"> and plant = #{plant}</if>
+            <if test="devilocation != null  and devilocation != ''"> and devilocation like concat(concat('%', #{devilocation}), '%')</if>
+            <if test="devName != null  and devName != ''"> and dev_name like concat(concat('%', #{devName}), '%')</if>
+            <if test="devTag != null  and devTag != ''"> and dev_tag like concat(concat('%', #{devTag}), '%')</if>
+            <if test="devType != null  and devType != ''"> and dev_type = #{devType}</if>
+            <if test="devDesc != null  and devDesc != ''"> and dev_desc = #{devDesc}</if>
+            <if test="devArea != null  and devArea != ''"> and dev_area like concat(concat('%', #{devArea}), '%')</if>
+            <if test="areaResponsible != null  and areaResponsible != ''"> and area_responsible = #{areaResponsible}</if>
+            <if test="devPhoto != null  and devPhoto != ''"> and dev_photo = #{devPhoto}</if>
+            <if test="createrCode != null  and createrCode != ''"> and creater_code = #{createrCode}</if>
+            <if test="createdate != null "> and createdate = #{createdate}</if>
+            <if test="updaterCode != null  and updaterCode != ''"> and updater_code = #{updaterCode}</if>
+            <if test="updatedate != null "> and updatedate = #{updatedate}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+
+    <select id="selectTRelDeviceById" parameterType="Long" resultMap="TRelDeviceResult">
+        <include refid="selectTRelDeviceVo"/>
+        where dev_id = #{devId}
+    </select>
+
+    <insert id="insertTRelDevice" parameterType="TRelDevice">
+        <selectKey keyProperty="devId" resultType="long" order="BEFORE">
+            SELECT seq_t_rel_device.NEXTVAL as devId FROM DUAL
+        </selectKey>
+        insert into t_rel_device
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="devId != null">dev_id,</if>
+            <if test="plant != null">plant,</if>
+            <if test="devilocation != null">devilocation,</if>
+            <if test="devName != null">dev_name,</if>
+            <if test="devTag != null and devTag != ''">dev_tag,</if>
+            <if test="devType != null">dev_type,</if>
+            <if test="devDesc != null">dev_desc,</if>
+            <if test="devArea != null">dev_area,</if>
+            <if test="areaResponsible != null">area_responsible,</if>
+            <if test="devPhoto != null">dev_photo,</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="deptId != null">dept_id,</if>
+            <if test="remarks != null">remarks,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="devId != null">#{devId},</if>
+            <if test="plant != null">#{plant},</if>
+            <if test="devilocation != null">#{devilocation},</if>
+            <if test="devName != null">#{devName},</if>
+            <if test="devTag != null and devTag != ''">#{devTag},</if>
+            <if test="devType != null">#{devType},</if>
+            <if test="devDesc != null">#{devDesc},</if>
+            <if test="devArea != null">#{devArea},</if>
+            <if test="areaResponsible != null">#{areaResponsible},</if>
+            <if test="devPhoto != null">#{devPhoto},</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="deptId != null">#{deptId},</if>
+            <if test="remarks != null">#{remarks},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTRelDevice" parameterType="TRelDevice">
+        update t_rel_device
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="plant != null">plant = #{plant},</if>
+            <if test="devilocation != null">devilocation = #{devilocation},</if>
+            <if test="devName != null">dev_name = #{devName},</if>
+            <if test="devTag != null and devTag != ''">dev_tag = #{devTag},</if>
+            <if test="devType != null">dev_type = #{devType},</if>
+            <if test="devDesc != null">dev_desc = #{devDesc},</if>
+            <if test="devArea != null">dev_area = #{devArea},</if>
+            <if test="areaResponsible != null">area_responsible = #{areaResponsible},</if>
+            <if test="devPhoto != null">dev_photo = #{devPhoto},</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="deptId != null">dept_id = #{deptId},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+        </trim>
+        where dev_id = #{devId}
+    </update>
+
+    <update id="deleteTRelDeviceById" parameterType="Long">
+        update t_rel_device set del_flag = 2 where dev_id = #{devId}
+    </update>
+
+    <update id="deleteTRelDeviceByIds" parameterType="String">
+        update t_rel_device set del_flag = 2 where dev_id in
+        <foreach item="devId" collection="array" open="(" separator="," close=")">
+            #{devId}
+        </foreach>
+    </update>
+
+</mapper>

+ 8 - 0
ui/src/api/document/plantproglist.js

@@ -78,6 +78,14 @@ export function addProglistTraining(id) {
   })
 }
 
+// 强制添加到培训(不检查培训矩阵)
+export function addProglistTrainingForce(id) {
+  return request({
+    url: '/document/plantproglist/addTrainingForce/' + id,
+    method: 'delete'
+  })
+}
+
 // 导出装置程序清单
 export function exportPlantproglist(query) {
   return request({

+ 9 - 0
ui/src/api/plant/eoeg-daily-management.js

@@ -59,3 +59,12 @@ export function importTemplate() {
     method: 'get'
   })
 }
+
+// 获取EOEG日常管理首页统计数据
+export function getDashboardData(query) {
+  return request({
+    url: '/plant/eoeg-daily-management/dashboard',
+    method: 'get',
+    params: query
+  })
+}

+ 53 - 0
ui/src/api/reliability/rel_device.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询可靠性设备清单列表
+export function listRel_device(query) {
+  return request({
+    url: '/reliability/rel_device/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询可靠性设备清单详细
+export function getRel_device(devId) {
+  return request({
+    url: '/reliability/rel_device/' + devId,
+    method: 'get'
+  })
+}
+
+// 新增可靠性设备清单
+export function addRel_device(data) {
+  return request({
+    url: '/reliability/rel_device',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改可靠性设备清单
+export function updateRel_device(data) {
+  return request({
+    url: '/reliability/rel_device',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除可靠性设备清单
+export function delRel_device(devId) {
+  return request({
+    url: '/reliability/rel_device/' + devId,
+    method: 'delete'
+  })
+}
+
+// 导出可靠性设备清单
+export function exportRel_device(query) {
+  return request({
+    url: '/reliability/rel_device/export',
+    method: 'get',
+    params: query
+  })
+}

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

@@ -533,7 +533,8 @@ import {
   getPlantproglist,
   listPlantproglist,
   updatePlantproglist,
-  addProglistTraining
+  addProglistTraining,
+  addProglistTrainingForce
 } from "@/api/document/plantproglist";
 import {allFileList, delCommonfile} from "@/api/common/commonfile";
 import {treeselect} from "@/api/system/dept";
@@ -929,19 +930,43 @@ export default {
         this.msgSuccess(this.$t('删除成功'));
       })
     },
-    /** 删除按钮操作 */
+    /** 培训按钮操作 */
     handleTraining(row) {
       const ids = row.id;
       this.$confirm('是否确认发起装置培训', {
         confirmButtonText: this.$t('确定'),
         cancelButtonText: this.$t('取消'),
         type: "warning"
-      }).then(function () {
-        return addProglistTraining(row.id );
+      }).then(() => {
+        return addProglistTraining(row.id);
       }).then(() => {
         this.getList();
         this.msgSuccess(this.$t('操作成功'));
-      })
+      }).catch((error) => {
+        // 如果是用户取消操作,直接返回
+        if (error === 'cancel') {
+          return;
+        }
+        // 判断是否是"未找到培训矩阵"的错误
+        // axios 拦截器返回的 Error 对象,错误信息在 message 中
+        const errorMsg = error.message || error.msg || '';
+        if (errorMsg.includes('未找到培训矩阵')) {
+          // 弹出二次确认框
+          this.$confirm('未找到培训矩阵,是否仍要添加到培训?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            // 调用强制添加接口
+            return addProglistTrainingForce(row.id);
+          }).then(() => {
+            this.getList();
+            this.msgSuccess('已添加培训跟踪(注意:未找到培训矩阵,未自动关联参培人员,请手动添加)');
+          }).catch(() => {
+            // 用户取消或失败,不做处理
+          });
+        }
+      });
     },
     /** 导出按钮操作 */
     handleExport() {

+ 66 - 7
ui/src/views/eoeg/home/dashboard/TableChart.vue

@@ -1,14 +1,51 @@
 <template>
   <div :style="{height:height,width:width}">
-    <h3>******</h3>
-    <div class="text-container">
-      <el-table border>
-
-      </el-table>
-    </div>
+    <h3>EOEG日常管理
+      <el-button
+        size="mini"
+        type="text"
+        icon="el-icon-top-right"
+        @click="toManagement"
+      >查看更多
+      </el-button>
+    </h3>
+    <el-table
+      :data="tableData"
+      v-loading="loading">
+      <el-table-column
+        prop="rcCode"
+        label="RC Code"
+        align="center"
+        :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column
+        prop="subject"
+        label="主题"
+        align="center"
+        :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column
+        prop="workContent"
+        label="工作内容"
+        align="center"
+        :show-overflow-tooltip="true">
+      </el-table-column>
+      <el-table-column
+        prop="finishStatus"
+        label="完成情况"
+        align="center">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.finishStatus == '1'" type="success" size="small">已完成</el-tag>
+          <el-tag v-else-if="scope.row.finishStatus == '0'" type="danger" size="small">未完成</el-tag>
+          <el-tag v-else type="info" size="small">{{ scope.row.finishStatus }}</el-tag>
+        </template>
+      </el-table-column>
+    </el-table>
   </div>
 </template>
 <script>
+import { getDashboardData } from '@/api/plant/eoeg-daily-management'
+
 export default {
   name: 'tableChart',
   props: {
@@ -23,9 +60,31 @@ export default {
   },
   data() {
     return {
+      // 遮罩层
+      loading: true,
+      tableData: [],
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        year: new Date().getFullYear().toString()
+      }
     }
   },
-  mounted() {
+  created() {
+    this.getList()
+  },
+  methods: {
+    /** 查询EOEG日常管理列表 */
+    getList() {
+      this.loading = true
+      getDashboardData(this.queryParams).then(response => {
+        this.tableData = response.rows
+        this.loading = false
+      })
+    },
+    toManagement() {
+      this.$router.push({path: '/plant/eoeg-daily-management'})
+    }
   }
 }
 </script>

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

@@ -686,7 +686,7 @@ export default {
           console.log('安全专员')
           item.secretary = null
         }
-        if(this.$store.state.user.homeType == 5) { //合成器生产主管和工程师再一个位置
+        if(this.$store.state.user.homeType == 5 || this.$store.state.user.homeType == 6) { //合成器,LDPE生产主管和工程师再一个位置
           if (item.pId !== 0 && map[item.pId]) {
             // map[item.pId].children ? map[item.pId].children.push(item) : map[item.pId].children = [item];
             if (item.post == '装置经理' || item.post == '安全专员' || item.post == '首席专家') {

+ 485 - 0
ui/src/views/reliability/rel_device/index.vue

@@ -0,0 +1,485 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="装置" prop="plant">
+        <el-input
+          v-model="queryParams.plant"
+          placeholder="请输入装置"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="位置" prop="devilocation">
+        <el-input
+          v-model="queryParams.devilocation"
+          placeholder="请输入位置"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="设备名称" prop="devName">
+        <el-input
+          v-model="queryParams.devName"
+          placeholder="请输入设备名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="设备位号" prop="devTag">
+        <el-input
+          v-model="queryParams.devTag"
+          placeholder="请输入设备位号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="设备类型" prop="devType">
+        <el-select v-model="queryParams.devType" placeholder="请选择设备类型" clearable size="small">
+          <el-option label="请选择字典生成" value="" />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="设备描述" prop="devDesc">
+        <el-input
+          v-model="queryParams.devDesc"
+          placeholder="请输入设备描述"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="区域" prop="devArea">
+        <el-input
+          v-model="queryParams.devArea"
+          placeholder="请输入区域"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="备注" prop="remarks">
+        <el-input
+          v-model="queryParams.remarks"
+          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">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['reliability:rel_device: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="['reliability:rel_device: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="['reliability:rel_device:remove']"
+        >删除</el-button>
+      </el-col>
+        <el-col :span="1.5">
+            <el-button
+                    type="info"
+                    icon="el-icon-upload2"
+                    size="mini"
+                    @click="handleImport"
+                    v-hasPermi="['reliability:rel_device:edit']"
+            >导入</el-button>
+        </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['reliability:rel_device:list']"
+        >导出</el-button>
+      </el-col>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="rel_deviceList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="装置" align="center" prop="plant" :show-overflow-tooltip="true"/>
+      <el-table-column label="位置" align="center" prop="devilocation" :show-overflow-tooltip="true"/>
+      <el-table-column label="设备名称" align="center" prop="devName" :show-overflow-tooltip="true"/>
+      <el-table-column label="设备位号" align="center" prop="devTag" :show-overflow-tooltip="true"/>
+      <el-table-column label="设备类型" align="center" prop="devType" :show-overflow-tooltip="true"/>
+      <el-table-column label="设备描述" align="center" prop="devDesc" :show-overflow-tooltip="true"/>
+      <el-table-column label="区域" align="center" prop="devArea" :show-overflow-tooltip="true"/>
+      <el-table-column label="区域负责人" align="center" prop="areaResponsible" :show-overflow-tooltip="true"/>
+      <el-table-column label="设备照片" align="center" prop="devPhoto" :show-overflow-tooltip="true"/>
+      <el-table-column label="备注" align="center" prop="remarks" :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="['reliability:rel_device:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['reliability:rel_device: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"
+    />
+
+    <!-- 添加或修改可靠性设备清单对话框 -->
+    <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 label="装置" prop="plant">
+          <el-input v-model="form.plant" placeholder="请输入装置" />
+        </el-form-item>
+        <el-form-item label="位置" prop="devilocation">
+          <el-input v-model="form.devilocation" placeholder="请输入位置" />
+        </el-form-item>
+        <el-form-item label="设备名称" prop="devName">
+          <el-input v-model="form.devName" placeholder="请输入设备名称" />
+        </el-form-item>
+        <el-form-item label="设备位号" prop="devTag">
+          <el-input v-model="form.devTag" placeholder="请输入设备位号" />
+        </el-form-item>
+        <el-form-item label="设备类型" prop="devType">
+          <el-select v-model="form.devType" placeholder="请选择设备类型">
+            <el-option label="请选择字典生成" value="" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="设备描述" prop="devDesc">
+          <el-input v-model="form.devDesc" placeholder="请输入设备描述" />
+        </el-form-item>
+        <el-form-item label="区域" prop="devArea">
+          <el-input v-model="form.devArea" placeholder="请输入区域" />
+        </el-form-item>
+        <el-form-item label="区域负责人" prop="areaResponsible">
+          <el-input v-model="form.areaResponsible" placeholder="请输入区域负责人" />
+        </el-form-item>
+        <el-form-item label="设备照片" prop="devPhoto">
+          <el-input v-model="form.devPhoto" 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 :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>
+              <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 { listRel_device, getRel_device, delRel_device, addRel_device, updateRel_device, exportRel_device, importTemplate} from "@/api/reliability/rel_device";
+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: "Rel_device",
+  components: { Treeselect },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 可靠性设备清单表格数据
+      rel_deviceList: [],
+      // 弹出层标题
+      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 + "/reliability/rel_device/importData"
+        },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        plant: null,
+        devilocation: null,
+        devName: null,
+        devTag: null,
+        devType: null,
+        devDesc: null,
+        devArea: null,
+        areaResponsible: null,
+        devPhoto: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        deptId: null,
+        remarks: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        devTag: [
+          { required: true, message: "设备位号不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  watch: {
+        // 根据名称筛选部门树
+        deptName(val) {
+            this.$refs.tree.filter(val);
+        }
+   },
+  created() {
+      //设置表格高度对应屏幕高度
+      this.$nextTick(() => {
+          this.clientHeight = document.body.clientHeight -250
+      })
+    this.getList();
+    this.getTreeselect();
+  },
+  methods: {
+    /** 查询可靠性设备清单列表 */
+    getList() {
+      this.loading = true;
+      listRel_device(this.queryParams).then(response => {
+        this.rel_deviceList = 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 = {
+        devId: null,
+        plant: null,
+        devilocation: null,
+        devName: null,
+        devTag: null,
+        devType: null,
+        devDesc: null,
+        devArea: null,
+        areaResponsible: null,
+        devPhoto: null,
+        delFlag: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        deptId: null,
+        remarks: 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.devId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加可靠性设备清单";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const devId = row.devId || this.ids
+      getRel_device(devId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改可靠性设备清单";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.devId != null) {
+            updateRel_device(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addRel_device(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const devIds = row.devId || this.ids;
+      this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delRel_device(devIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有可靠性设备清单数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportRel_device(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>