Explorar el Código

缺少文件及提交

zhangding hace 3 años
padre
commit
5baa198555

+ 5 - 1
master/src/main/java/com/ruoyi/config/ActivitiConfig.java

@@ -127,7 +127,11 @@ public class ActivitiConfig {
 
         DeploymentBuilder deploymentBuilder9 = repositoryService().createDeployment();
         Resource spec9 = resourceLoader.getResource("classpath:/processes/intact/intactChangeApplicationProcess.bpmn"); //加载流程图资源文件
-        deploymentBuilder9.enableDuplicateFiltering().addInputStream(spec8.getFilename(), spec9.getInputStream()).name("设备变更申请流程").deploy();//按流程id部署
+        deploymentBuilder9.enableDuplicateFiltering().addInputStream(spec9.getFilename(), spec9.getInputStream()).name("设备变更申请流程").deploy();//按流程id部署
+
+        DeploymentBuilder deploymentBuilder10 = repositoryService().createDeployment();
+        Resource spec10 = resourceLoader.getResource("classpath:/processes/kekao/reliability.bpmn"); //加载流程图资源文件
+        deploymentBuilder10.enableDuplicateFiltering().addInputStream(spec10.getFilename(), spec10.getInputStream()).name("可靠性管理申请流程").deploy();//按流程id部署
     }
 }
 

+ 14 - 0
master/src/main/java/com/ruoyi/project/ehs/controller/TApproveDangerController.java

@@ -22,6 +22,8 @@ import com.ruoyi.project.intact.domain.TIntactApprove;
 import com.ruoyi.project.intact.service.ITApproveMaintenanceService;
 import com.ruoyi.project.intact.service.ITIntactApproveService;
 import com.ruoyi.project.listener.*;
+import com.ruoyi.project.reliability.domain.TKekaoApprove;
+import com.ruoyi.project.reliability.service.ITKekaoApproveService;
 import com.ruoyi.project.sems.domain.TApprove;
 import com.ruoyi.project.sems.his.domain.TApproveSpecModify;
 import com.ruoyi.project.sems.his.service.ITApproveSpecModifyService;
@@ -105,6 +107,8 @@ public class TApproveDangerController extends BaseController
     private ITApproveMaintenanceService tApproveMaintenanceService;
     @Autowired
     private ITIntactApproveService tIntactApproveService;
+    @Autowired
+    private ITKekaoApproveService tKekaoApproveService;
     /**
      * 任务申请
      */
@@ -259,6 +263,10 @@ public class TApproveDangerController extends BaseController
                     TIntactApprove approve = tIntactApproveService.selectTIntactApproveById(Long.parseLong(pi.getBusinessKey()));
                     devProcess.setApproveObject(approve);
                     devProcess.setApNo(approve.getApNo());
+                }else if(pi.getProcessDefinitionName().equals("可靠性管理申请")){
+                    TKekaoApprove approve = tKekaoApproveService.selectTKekaoApproveById(Long.parseLong(pi.getBusinessKey()));
+                    devProcess.setApproveObject(approve);
+                    devProcess.setApNo(approve.getApNo());
                 }
                 devProcess.setBusinessKey(pi.getBusinessKey());
                 devProcess.setProcessCreateTime(pi.getStartTime());
@@ -353,6 +361,12 @@ public class TApproveDangerController extends BaseController
                     devTask.setApproveObj(approve);
                     devTask.setApNo(approve.getApNo());
                 }
+                else if (pi.getProcessDefinitionName().equals("可靠性管理申请")) {
+                    TKekaoApprove approve = tKekaoApproveService.selectTKekaoApproveById(Long.parseLong(pi.getBusinessKey()));
+                    logger.info("设备变更申请" +JSON.toJSONString(approve));
+                    devTask.setApproveObj(approve);
+                    devTask.setApNo(approve.getApNo());
+                }
                 list.add(devTask);
             }
         }

+ 298 - 0
master/src/main/java/com/ruoyi/project/reliability/controller/TKekaoApproveController.java

@@ -0,0 +1,298 @@
+package com.ruoyi.project.reliability.controller;
+
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.ruoyi.project.approve.damain.DevTask;
+import com.ruoyi.project.intact.domain.*;
+import com.ruoyi.project.intact.mapper.TIntactApproveMapper;
+import com.ruoyi.project.intact.service.ITIntactGjService;
+import com.ruoyi.project.intact.service.ITIntactGylService;
+import com.ruoyi.project.intact.service.ITIntactPumpService;
+import com.ruoyi.project.intact.service.ITIntactYsjService;
+import com.ruoyi.project.reliability.domain.TKekaoMgList;
+import com.ruoyi.project.reliability.mapper.TKekaoApproveMapper;
+import com.ruoyi.project.reliability.service.ITKekaoMgListService;
+import com.ruoyi.project.system.domain.SysUser;
+import com.ruoyi.project.system.service.ISysUserService;
+import org.activiti.engine.*;
+import org.activiti.engine.history.HistoricProcessInstance;
+import org.activiti.engine.history.HistoricTaskInstance;
+import org.activiti.engine.history.HistoricTaskInstanceQuery;
+import org.activiti.engine.impl.identity.Authentication;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Comment;
+import org.activiti.engine.task.Task;
+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.reliability.domain.TKekaoApprove;
+import com.ruoyi.project.reliability.service.ITKekaoApproveService;
+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 javax.annotation.Resource;
+
+/**
+ * 可靠性管理申请Controller
+ *
+ * @author ruoyi
+ * @date 2022-07-08
+ */
+@RestController
+@RequestMapping("/reliability/approve")
+public class TKekaoApproveController extends BaseController
+{
+    @Autowired
+    private ITKekaoApproveService tKekaoApproveService;
+
+    @Autowired
+    private RuntimeService runtimeService;
+    @Autowired
+    private HistoryService historyService;
+    @Autowired
+    private TaskService taskService;
+    @Autowired
+    private ITKekaoMgListService itKekaoMgListService;
+    @Resource
+    private TKekaoApproveMapper tKekaoApproveMapper;
+    @Autowired
+    private ISysUserService sysUserService;
+    /**
+     * 查询可靠性管理申请列表
+     */
+    @PreAuthorize("@ss.hasPermi('reliability:approve:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TKekaoApprove tKekaoApprove)
+    {
+        startPage();
+        List<TKekaoApprove> list = tKekaoApproveService.selectTKekaoApproveList(tKekaoApprove);
+        return getDataTable(list);
+    }
+
+    /**
+     * 历史申请列表
+     */
+    @RequestMapping("/hisApprovelist")
+    public AjaxResult hisTKekaoApprovelist(@RequestParam Map<String, Object> params) {
+        String sql = params.get("devId") + " in (SELECT REGEXP_SUBSTR (DEV_ID, '[^,]+', 1,rownum) from dual connect by rownum<=LENGTH (DEV_ID) - LENGTH (regexp_replace(DEV_ID, ',', ''))+1 )";
+        List<TKekaoApprove> list = tKekaoApproveMapper.selectList(new QueryWrapper<TKekaoApprove>().apply(sql).orderByDesc("CREATTIME")
+        );
+        for (TKekaoApprove t : list
+        ) {
+            SysUser userEntity = sysUserService.selectUserById(t.getUserId());
+            t.setUserName(userEntity.getNickName());
+        }
+        return AjaxResult.success(list);
+    }
+
+
+    /**
+     * 导出可靠性管理申请列表
+     */
+    @PreAuthorize("@ss.hasPermi('reliability:approve:export')")
+    @Log(title = "可靠性管理申请", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TKekaoApprove tKekaoApprove)
+    {
+        List<TKekaoApprove> list = tKekaoApproveService.selectTKekaoApproveList(tKekaoApprove);
+        ExcelUtil<TKekaoApprove> util = new ExcelUtil<TKekaoApprove>(TKekaoApprove.class);
+        return util.exportExcel(list, "approve");
+    }
+
+    /**
+     * 获取可靠性管理申请详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('reliability:approve:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(tKekaoApproveService.selectTKekaoApproveById(id));
+    }
+
+    /**
+     * 新增可靠性管理申请
+     */
+    @PreAuthorize("@ss.hasPermi('reliability:approve:add')")
+    @Log(title = "可靠性管理申请", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TKekaoApprove tKekaoApprove)
+    {
+        logger.info(JSON.toJSONString(tKekaoApprove));
+        Long userid = getUserId();
+        tKekaoApprove.setUserId(userid);
+        //审批编号
+        Date dt = new Date();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddhhmmss");
+        String data = sdf.format(dt) + userid;
+        tKekaoApprove.setApNo(data);
+        tKekaoApproveService.insertTKekaoApprove(tKekaoApprove);
+
+        //申请的设备id  直接作为 可靠性清单实体的id主键来查询
+        String[] ids = tKekaoApprove.getDevId().split(",");
+        for (String i : ids
+        ) {
+            TKekaoMgList tKekaoMgList = itKekaoMgListService.getById(i);
+            tKekaoMgList.setApproveStatus(tKekaoApprove.getApproveType());
+            tKekaoMgList.setImplementDate(new Date());
+            itKekaoMgListService.updateById(tKekaoMgList);
+        }
+
+        long bussniseeKey = tKekaoApprove.getId();
+        Authentication.setAuthenticatedUserId(userid.toString());
+        //开始工作流、监听
+        Map<String, Object> variables = new HashMap<>();
+        variables.put("applyUser", userid.toString());
+        variables.put("kkxjl", tKekaoApprove.getKkxjl().toString());
+
+        //采用key来启动流程定义并设置流程变量,返回流程实例
+        ProcessInstance pi = runtimeService.startProcessInstanceByKey("intactChangeApplicationProcess", String.valueOf(bussniseeKey), variables);
+        logger.info("流程部署id:" + pi.getDeploymentId());
+        logger.info("流程定义id:" + pi.getProcessDefinitionId());
+        logger.info("流程实例id:" + pi.getProcessInstanceId());
+        tKekaoApprove.setProcessId(pi.getProcessInstanceId());
+        tKekaoApproveService.updateTKekaoApprove(tKekaoApprove);
+        return AjaxResult.success();
+    }
+
+    /**
+     * 任务详情
+     */
+    @RequestMapping("/info/{id}")
+//    @RequiresPermissions("approve:tapprove:info")
+    public AjaxResult info(@PathVariable("id") Long id) {
+        TKekaoApprove tKekaoApprove = tKekaoApproveService.selectTKekaoApproveById(id);
+      /*  List<TApproverFile> files = tApproverFileService.list(new QueryWrapper<TApproverFile>().eq("APPROVE_ID", id).eq("FILE_TYPE", 1));
+        tApprove.setFiles(files);
+        List<TApproverFile> govfiles = tApproverFileService.list(new QueryWrapper<TApproverFile>().eq("APPROVE_ID", id).eq("FILE_TYPE", 2));
+        tApprove.setGovFiles(govfiles);*/
+        String[] ids = null;
+        if (tKekaoApprove.getApproveType() == 7) {
+            ids = tKekaoApprove.getReportId().split(",");
+        }else if (tKekaoApprove.getApproveType() == 8) {
+            ids = tKekaoApprove.getMonthId().split(",");
+        }else {
+            ids = tKekaoApprove.getDevId().split(",");
+        }
+        List<Object> devList = new ArrayList<>();
+        if (tKekaoApprove.getDevType() != null && tKekaoApprove.getApproveType() != 7) {
+            for (String i : ids
+            ) {
+                TKekaoMgList tKekaoMgList = itKekaoMgListService.getById(i);
+                devList.add(tKekaoMgList);
+            }
+
+        }
+
+        tKekaoApprove.setDevList(devList);
+        return AjaxResult.success(tKekaoApprove);
+    }
+
+    /**
+     * 审核处理
+     */
+    @Log(title = "设备完整性变更提交审核处理", businessType = BusinessType.UPDATE)
+    @PutMapping("/handle")
+    public AjaxResult handle(@RequestBody DevTask devTask) {
+        Map<String, Object> param = new HashMap<>();
+        //流程审批意见
+        String symbol= "";
+        if (devTask.getComment() != "") {
+            symbol = ",";
+        }
+        if (devTask.getCondition().equals("1")) {
+            /* devTask.setComment("通过" + symbol + devTask.getComment());*/
+            devTask.setComment("批准" + symbol + devTask.getComment());
+        }else if (devTask.getCondition().equals("0")) {
+            devTask.setComment("未通过" + symbol + devTask.getComment());
+        }
+        //使用任务服务完成任务(提交任务)
+        String taskId = devTask.getTaskId();
+        // 使用任务id,获取任务对象,获取流程实例id
+        Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
+        //利用任务对象,获取流程实例id
+        String processInstancesId = task.getProcessInstanceId();
+        System.out.println(processInstancesId);
+        //年度报告申请检查人员会签判断
+        if (task.getName().equals("维修经理")) {
+            //获取当前任务流转列表
+            HistoricTaskInstanceQuery htiq = historyService.createHistoricTaskInstanceQuery();
+            List<HistoricTaskInstance> htiLists = htiq.processInstanceId(processInstancesId).finished().orderByHistoricTaskInstanceEndTime().asc().list();
+            List<DevTask> devTaskList = new ArrayList<>();
+            if (htiLists.size() > 0) {
+                for (HistoricTaskInstance hi : htiLists
+                ) {
+                    List<Comment> commentList = taskService.getTaskComments(hi.getId());
+                    DevTask dev = new DevTask();
+                    if (commentList.size() > 0) {
+                        dev.setComment(commentList.get(0).getFullMessage());
+                    }
+                    devTaskList.add(dev);
+                }
+            }
+            if (devTaskList.size() == 2) {
+                for (DevTask d : devTaskList) {
+                    if (d.getComment().substring(0, 1).equals("未")) {
+                        devTask.setCondition("0");
+                    }
+                }
+            }
+        }
+        param.put("condition", devTask.getCondition());
+        ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
+        TaskService taskService = processEngine.getTaskService();
+        //认领任务
+        processEngine.getTaskService()//
+                .claim(taskId, getUserId().toString());
+//        Authentication.setAuthenticatedUserId("cmc"); // 添加批注时候的审核人
+        taskService.addComment(taskId, processInstancesId, devTask.getComment());
+        //业务监听处理
+//        tApproveService.handleApprove(task ,devTask);
+        taskService.complete(taskId, param);
+
+        //添加回执信息
+        if (devTask.getGovFiles().size() > 0) {
+            HistoricProcessInstance pi = processEngine.getHistoryService()
+                    .createHistoricProcessInstanceQuery().processInstanceId(processInstancesId).singleResult();
+            String approveId = pi.getBusinessKey();
+            TKekaoApprove approveEntity = tKekaoApproveService.selectTKekaoApproveById(Long.parseLong(approveId));
+            approveEntity.setGovDate(devTask.getGovDate());
+            tKekaoApproveService.updateTKekaoApprove(approveEntity);
+           /* for (TApproverFile t : devTask.getGovFiles()
+            ) {
+                t.setApproveId(Long.parseLong(approveId));
+                t.setFileType(2l);
+                tApproverFileService.save(t);
+            }*/
+        }
+        return AjaxResult.success();
+    }
+
+    /**
+     * 修改可靠性管理申请
+     */
+    @PreAuthorize("@ss.hasPermi('reliability:approve:edit')")
+    @Log(title = "可靠性管理申请", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TKekaoApprove tKekaoApprove)
+    {
+        return toAjax(tKekaoApproveService.updateTKekaoApprove(tKekaoApprove));
+    }
+
+    /**
+     * 删除可靠性管理申请
+     */
+    @PreAuthorize("@ss.hasPermi('reliability:approve:remove')")
+    @Log(title = "可靠性管理申请", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(tKekaoApproveService.deleteTKekaoApproveByIds(ids));
+    }
+}

+ 436 - 0
master/src/main/java/com/ruoyi/project/reliability/domain/TKekaoApprove.java

@@ -0,0 +1,436 @@
+package com.ruoyi.project.reliability.domain;
+
+import java.util.Date;
+import java.util.List;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import com.ruoyi.framework.web.domain.BaseEntity;
+import com.ruoyi.project.intact.domain.TIntactApprove;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.apache.poi.ss.formula.functions.T;
+
+/**
+ * 可靠性管理申请对象 t_kekao_approve
+ *
+ * @author ruoyi
+ * @date 2022-07-08
+ */
+public class TKekaoApprove extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 申请人id */
+    @Excel(name = "申请人id")
+    private Long userId;
+
+    /** 可靠性清单的id */
+    @Excel(name = "设备ids")
+    private String devId;
+
+    /** 设备类型: */
+    @Excel(name = "设备类型:")
+    private Long devType;
+
+    /** 审批类型 */
+    @Excel(name = "审批类型")
+    private Long approveType;
+
+    /** 内容 */
+    @Excel(name = "内容")
+    private String content;
+
+    /** 附件url */
+    @Excel(name = "附件url")
+    private String fileUrls;
+
+    /** 回执url */
+    @Excel(name = "回执url")
+    private String reUrls;
+
+    /** 申请状态 0:审批中 1-通过 2-拒绝 */
+    @Excel(name = "申请状态 0:审批中 1-通过 2-拒绝")
+    private Long status;
+
+    /** 开始时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date creattime;
+
+    /** 结束时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date endtime;
+
+    /** 流程id */
+    @Excel(name = "流程id")
+    private String processId;
+
+    /** 政府回执时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "政府回执时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date govDate;
+
+    /** 延期日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "延期日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date delayDate;
+
+    /** 延期原因 */
+    @Excel(name = "延期原因")
+    private String delayReason;
+
+    /** 延期措施 */
+    @Excel(name = "延期措施")
+    private String delayMeasure;
+
+    /** 延期安全声明 */
+    @Excel(name = "延期安全声明")
+    private String delayNotice;
+
+    /** 申请编号(唯一) */
+    @Excel(name = "申请编号", readConverterExp = "唯=一")
+    private String apNo;
+
+    /** 检查日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "检查日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date checkDate;
+
+    /** 报告ids */
+    @Excel(name = "报告ids")
+    private String reportId;
+
+    /** 月报告ids */
+    @Excel(name = "月报告ids")
+    private String monthId;
+
+    /** 删除标识 */
+    private Long delFlag;
+
+    /** 部门id */
+    @Excel(name = "部门id")
+    private Long deptId;
+
+    @TableField(exist = false)
+    private List<Object> devList;
+
+    @TableField(exist = false)
+    private List<TKekaoApprove> files;
+
+    @TableField(exist = false)
+    private String userName;
+
+    /**
+     * 审核人员
+     */
+    @TableField(exist = false)
+    private Long auditor;
+
+    /**
+     * 审批人员
+     */
+    @TableField(exist = false)
+    private Long approver;
+    /**
+     * 可靠性经理
+     */
+    @TableField(exist = false)
+    private Long kkxjl;
+
+    public TKekaoApprove() {
+    }
+
+
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setUserId(Long userId)
+    {
+        this.userId = userId;
+    }
+
+    public Long getUserId()
+    {
+        return userId;
+    }
+    public void setDevId(String devId)
+    {
+        this.devId = devId;
+    }
+
+    public String getDevId()
+    {
+        return devId;
+    }
+    public void setDevType(Long devType)
+    {
+        this.devType = devType;
+    }
+
+    public Long getDevType()
+    {
+        return devType;
+    }
+    public void setApproveType(Long approveType)
+    {
+        this.approveType = approveType;
+    }
+
+    public Long getApproveType()
+    {
+        return approveType;
+    }
+    public void setContent(String content)
+    {
+        this.content = content;
+    }
+
+    public String getContent()
+    {
+        return content;
+    }
+    public void setFileUrls(String fileUrls)
+    {
+        this.fileUrls = fileUrls;
+    }
+
+    public String getFileUrls()
+    {
+        return fileUrls;
+    }
+    public void setReUrls(String reUrls)
+    {
+        this.reUrls = reUrls;
+    }
+
+    public String getReUrls()
+    {
+        return reUrls;
+    }
+    public void setStatus(Long status)
+    {
+        this.status = status;
+    }
+
+    public Long getStatus()
+    {
+        return status;
+    }
+    public void setCreattime(Date creattime)
+    {
+        this.creattime = creattime;
+    }
+
+    public Date getCreattime()
+    {
+        return creattime;
+    }
+    public void setEndtime(Date endtime)
+    {
+        this.endtime = endtime;
+    }
+
+    public Date getEndtime()
+    {
+        return endtime;
+    }
+    public void setProcessId(String processId)
+    {
+        this.processId = processId;
+    }
+
+    public String getProcessId()
+    {
+        return processId;
+    }
+    public void setGovDate(Date govDate)
+    {
+        this.govDate = govDate;
+    }
+
+    public Date getGovDate()
+    {
+        return govDate;
+    }
+    public void setDelayDate(Date delayDate)
+    {
+        this.delayDate = delayDate;
+    }
+
+    public Date getDelayDate()
+    {
+        return delayDate;
+    }
+    public void setDelayReason(String delayReason)
+    {
+        this.delayReason = delayReason;
+    }
+
+    public String getDelayReason()
+    {
+        return delayReason;
+    }
+    public void setDelayMeasure(String delayMeasure)
+    {
+        this.delayMeasure = delayMeasure;
+    }
+
+    public String getDelayMeasure()
+    {
+        return delayMeasure;
+    }
+    public void setDelayNotice(String delayNotice)
+    {
+        this.delayNotice = delayNotice;
+    }
+
+    public String getDelayNotice()
+    {
+        return delayNotice;
+    }
+    public void setApNo(String apNo)
+    {
+        this.apNo = apNo;
+    }
+
+    public String getApNo()
+    {
+        return apNo;
+    }
+    public void setCheckDate(Date checkDate)
+    {
+        this.checkDate = checkDate;
+    }
+
+    public Date getCheckDate()
+    {
+        return checkDate;
+    }
+    public void setReportId(String reportId)
+    {
+        this.reportId = reportId;
+    }
+
+    public String getReportId()
+    {
+        return reportId;
+    }
+    public void setMonthId(String monthId)
+    {
+        this.monthId = monthId;
+    }
+
+    public String getMonthId()
+    {
+        return monthId;
+    }
+    public void setDelFlag(Long delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public Long getDelFlag()
+    {
+        return delFlag;
+    }
+    public void setDeptId(Long deptId)
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId()
+    {
+        return deptId;
+    }
+
+
+    public List<Object> getDevList() {
+        return devList;
+    }
+
+    public void setDevList(List<Object> devList) {
+        this.devList = devList;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public List<TKekaoApprove> getFiles() {
+        return files;
+    }
+
+    public void setFiles(List<TKekaoApprove> files) {
+        this.files = files;
+    }
+
+    public Long getAuditor() {
+        return auditor;
+    }
+
+    public void setAuditor(Long auditor) {
+        this.auditor = auditor;
+    }
+
+    public Long getApprover() {
+        return approver;
+    }
+
+    public void setApprover(Long approver) {
+        this.approver = approver;
+    }
+
+    public Long getKkxjl() {
+        return kkxjl;
+    }
+
+    public void setKkxjl(Long kkxjl) {
+        this.kkxjl = kkxjl;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("userId", getUserId())
+            .append("devId", getDevId())
+            .append("devType", getDevType())
+            .append("approveType", getApproveType())
+            .append("content", getContent())
+            .append("fileUrls", getFileUrls())
+            .append("reUrls", getReUrls())
+            .append("status", getStatus())
+            .append("creattime", getCreattime())
+            .append("endtime", getEndtime())
+            .append("processId", getProcessId())
+            .append("govDate", getGovDate())
+            .append("delayDate", getDelayDate())
+            .append("delayReason", getDelayReason())
+            .append("delayMeasure", getDelayMeasure())
+            .append("delayNotice", getDelayNotice())
+            .append("apNo", getApNo())
+            .append("checkDate", getCheckDate())
+            .append("reportId", getReportId())
+            .append("monthId", getMonthId())
+            .append("delFlag", getDelFlag())
+            .append("deptId", getDeptId())
+            .toString();
+    }
+}

+ 66 - 0
master/src/main/java/com/ruoyi/project/reliability/mapper/TKekaoApproveMapper.java

@@ -0,0 +1,66 @@
+package com.ruoyi.project.reliability.mapper;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
+import com.ruoyi.project.intact.domain.TIntactApprove;
+import com.ruoyi.project.reliability.domain.TKekaoApprove;
+
+/**
+ * 可靠性管理申请Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2022-07-08
+ */
+public interface TKekaoApproveMapper  extends BaseMapper<TKekaoApprove>
+{
+    /**
+     * 查询可靠性管理申请
+     * 
+     * @param id 可靠性管理申请ID
+     * @return 可靠性管理申请
+     */
+    public TKekaoApprove selectTKekaoApproveById(Long id);
+
+    /**
+     * 查询可靠性管理申请列表
+     * 
+     * @param tKekaoApprove 可靠性管理申请
+     * @return 可靠性管理申请集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TKekaoApprove> selectTKekaoApproveList(TKekaoApprove tKekaoApprove);
+
+    /**
+     * 新增可靠性管理申请
+     * 
+     * @param tKekaoApprove 可靠性管理申请
+     * @return 结果
+     */
+    public int insertTKekaoApprove(TKekaoApprove tKekaoApprove);
+
+    /**
+     * 修改可靠性管理申请
+     * 
+     * @param tKekaoApprove 可靠性管理申请
+     * @return 结果
+     */
+    public int updateTKekaoApprove(TKekaoApprove tKekaoApprove);
+
+    /**
+     * 删除可靠性管理申请
+     * 
+     * @param id 可靠性管理申请ID
+     * @return 结果
+     */
+    public int deleteTKekaoApproveById(Long id);
+
+    /**
+     * 批量删除可靠性管理申请
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTKekaoApproveByIds(Long[] ids);
+}

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

@@ -0,0 +1,61 @@
+package com.ruoyi.project.reliability.service;
+
+import java.util.List;
+import com.ruoyi.project.reliability.domain.TKekaoApprove;
+
+/**
+ * 可靠性管理申请Service接口
+ * 
+ * @author ruoyi
+ * @date 2022-07-08
+ */
+public interface ITKekaoApproveService 
+{
+    /**
+     * 查询可靠性管理申请
+     * 
+     * @param id 可靠性管理申请ID
+     * @return 可靠性管理申请
+     */
+    public TKekaoApprove selectTKekaoApproveById(Long id);
+
+    /**
+     * 查询可靠性管理申请列表
+     * 
+     * @param tKekaoApprove 可靠性管理申请
+     * @return 可靠性管理申请集合
+     */
+    public List<TKekaoApprove> selectTKekaoApproveList(TKekaoApprove tKekaoApprove);
+
+    /**
+     * 新增可靠性管理申请
+     * 
+     * @param tKekaoApprove 可靠性管理申请
+     * @return 结果
+     */
+    public int insertTKekaoApprove(TKekaoApprove tKekaoApprove);
+
+    /**
+     * 修改可靠性管理申请
+     * 
+     * @param tKekaoApprove 可靠性管理申请
+     * @return 结果
+     */
+    public int updateTKekaoApprove(TKekaoApprove tKekaoApprove);
+
+    /**
+     * 批量删除可靠性管理申请
+     * 
+     * @param ids 需要删除的可靠性管理申请ID
+     * @return 结果
+     */
+    public int deleteTKekaoApproveByIds(Long[] ids);
+
+    /**
+     * 删除可靠性管理申请信息
+     * 
+     * @param id 可靠性管理申请ID
+     * @return 结果
+     */
+    public int deleteTKekaoApproveById(Long id);
+}

+ 93 - 0
master/src/main/java/com/ruoyi/project/reliability/service/impl/TKekaoApproveServiceImpl.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.TKekaoApproveMapper;
+import com.ruoyi.project.reliability.domain.TKekaoApprove;
+import com.ruoyi.project.reliability.service.ITKekaoApproveService;
+
+/**
+ * 可靠性管理申请Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2022-07-08
+ */
+@Service
+public class TKekaoApproveServiceImpl implements ITKekaoApproveService
+{
+    @Autowired
+    private TKekaoApproveMapper tKekaoApproveMapper;
+
+    /**
+     * 查询可靠性管理申请
+     *
+     * @param id 可靠性管理申请ID
+     * @return 可靠性管理申请
+     */
+    @Override
+    public TKekaoApprove selectTKekaoApproveById(Long id)
+    {
+        return tKekaoApproveMapper.selectTKekaoApproveById(id);
+    }
+
+    /**
+     * 查询可靠性管理申请列表
+     *
+     * @param tKekaoApprove 可靠性管理申请
+     * @return 可靠性管理申请
+     */
+    @Override
+    public List<TKekaoApprove> selectTKekaoApproveList(TKekaoApprove tKekaoApprove)
+    {
+        return tKekaoApproveMapper.selectTKekaoApproveList(tKekaoApprove);
+    }
+
+    /**
+     * 新增可靠性管理申请
+     *
+     * @param tKekaoApprove 可靠性管理申请
+     * @return 结果
+     */
+    @Override
+    public int insertTKekaoApprove(TKekaoApprove tKekaoApprove)
+    {
+        return tKekaoApproveMapper.insertTKekaoApprove(tKekaoApprove);
+    }
+
+    /**
+     * 修改可靠性管理申请
+     *
+     * @param tKekaoApprove 可靠性管理申请
+     * @return 结果
+     */
+    @Override
+    public int updateTKekaoApprove(TKekaoApprove tKekaoApprove)
+    {
+        return tKekaoApproveMapper.updateTKekaoApprove(tKekaoApprove);
+    }
+
+    /**
+     * 批量删除可靠性管理申请
+     *
+     * @param ids 需要删除的可靠性管理申请ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTKekaoApproveByIds(Long[] ids)
+    {
+        return tKekaoApproveMapper.deleteTKekaoApproveByIds(ids);
+    }
+
+    /**
+     * 删除可靠性管理申请信息
+     *
+     * @param id 可靠性管理申请ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTKekaoApproveById(Long id)
+    {
+        return tKekaoApproveMapper.deleteTKekaoApproveById(id);
+    }
+}

+ 171 - 0
master/src/main/resources/mybatis/reliability/TKekaoApproveMapper.xml

@@ -0,0 +1,171 @@
+<?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.TKekaoApproveMapper">
+    
+    <resultMap type="TKekaoApprove" id="TKekaoApproveResult">
+        <result property="id"    column="id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="devId"    column="dev_id"    />
+        <result property="devType"    column="dev_type"    />
+        <result property="approveType"    column="approve_type"    />
+        <result property="content"    column="content"    />
+        <result property="fileUrls"    column="file_urls"    />
+        <result property="reUrls"    column="re_urls"    />
+        <result property="status"    column="status"    />
+        <result property="creattime"    column="creattime"    />
+        <result property="endtime"    column="endtime"    />
+        <result property="processId"    column="process_id"    />
+        <result property="govDate"    column="gov_date"    />
+        <result property="delayDate"    column="delay_date"    />
+        <result property="delayReason"    column="delay_reason"    />
+        <result property="delayMeasure"    column="delay_measure"    />
+        <result property="delayNotice"    column="delay_notice"    />
+        <result property="apNo"    column="ap_no"    />
+        <result property="checkDate"    column="check_date"    />
+        <result property="reportId"    column="report_id"    />
+        <result property="monthId"    column="month_id"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="deptName" column="dept_name" />
+    </resultMap>
+
+    <sql id="selectTKekaoApproveVo">
+        select d.id, d.user_id, d.dev_id, d.dev_type, d.approve_type, d.content, d.file_urls, d.re_urls, d.status, d.creattime, d.endtime, d.process_id, d.gov_date, d.delay_date, d.delay_reason, d.delay_measure, d.delay_notice, d.ap_no, d.check_date, d.report_id, d.month_id, d.del_flag, d.dept_id ,s.dept_name from t_kekao_approve d
+      left join sys_dept s on s.dept_id = d.dept_id
+    </sql>
+
+    <select id="selectTKekaoApproveList" parameterType="TKekaoApprove" resultMap="TKekaoApproveResult">
+        <include refid="selectTKekaoApproveVo"/>
+        <where>  
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="devId != null  and devId != ''"> and dev_id = #{devId}</if>
+            <if test="devType != null "> and dev_type = #{devType}</if>
+            <if test="approveType != null "> and approve_type = #{approveType}</if>
+            <if test="content != null  and content != ''"> and content = #{content}</if>
+            <if test="fileUrls != null  and fileUrls != ''"> and file_urls = #{fileUrls}</if>
+            <if test="reUrls != null  and reUrls != ''"> and re_urls = #{reUrls}</if>
+            <if test="status != null "> and status = #{status}</if>
+            <if test="creattime != null "> and creattime = #{creattime}</if>
+            <if test="endtime != null "> and endtime = #{endtime}</if>
+            <if test="processId != null  and processId != ''"> and process_id = #{processId}</if>
+            <if test="govDate != null "> and gov_date = #{govDate}</if>
+            <if test="delayDate != null "> and delay_date = #{delayDate}</if>
+            <if test="delayReason != null  and delayReason != ''"> and delay_reason = #{delayReason}</if>
+            <if test="delayMeasure != null  and delayMeasure != ''"> and delay_measure = #{delayMeasure}</if>
+            <if test="delayNotice != null  and delayNotice != ''"> and delay_notice = #{delayNotice}</if>
+            <if test="apNo != null  and apNo != ''"> and ap_no = #{apNo}</if>
+            <if test="checkDate != null "> and check_date = #{checkDate}</if>
+            <if test="reportId != null  and reportId != ''"> and report_id = #{reportId}</if>
+            <if test="monthId != null  and monthId != ''"> and month_id = #{monthId}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+    
+    <select id="selectTKekaoApproveById" parameterType="Long" resultMap="TKekaoApproveResult">
+        <include refid="selectTKekaoApproveVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertTKekaoApprove" parameterType="TKekaoApprove">
+        <selectKey keyProperty="id" resultType="long" order="BEFORE">
+            SELECT seq_t_kekao_approve.NEXTVAL as id FROM DUAL
+        </selectKey>
+        insert into t_kekao_approve
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="devId != null">dev_id,</if>
+            <if test="devType != null">dev_type,</if>
+            <if test="approveType != null">approve_type,</if>
+            <if test="content != null">content,</if>
+            <if test="fileUrls != null">file_urls,</if>
+            <if test="reUrls != null">re_urls,</if>
+            <if test="status != null">status,</if>
+            <if test="creattime != null">creattime,</if>
+            <if test="endtime != null">endtime,</if>
+            <if test="processId != null">process_id,</if>
+            <if test="govDate != null">gov_date,</if>
+            <if test="delayDate != null">delay_date,</if>
+            <if test="delayReason != null">delay_reason,</if>
+            <if test="delayMeasure != null">delay_measure,</if>
+            <if test="delayNotice != null">delay_notice,</if>
+            <if test="apNo != null">ap_no,</if>
+            <if test="checkDate != null">check_date,</if>
+            <if test="reportId != null">report_id,</if>
+            <if test="monthId != null">month_id,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="deptId != null">dept_id,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="devId != null">#{devId},</if>
+            <if test="devType != null">#{devType},</if>
+            <if test="approveType != null">#{approveType},</if>
+            <if test="content != null">#{content},</if>
+            <if test="fileUrls != null">#{fileUrls},</if>
+            <if test="reUrls != null">#{reUrls},</if>
+            <if test="status != null">#{status},</if>
+            <if test="creattime != null">#{creattime},</if>
+            <if test="endtime != null">#{endtime},</if>
+            <if test="processId != null">#{processId},</if>
+            <if test="govDate != null">#{govDate},</if>
+            <if test="delayDate != null">#{delayDate},</if>
+            <if test="delayReason != null">#{delayReason},</if>
+            <if test="delayMeasure != null">#{delayMeasure},</if>
+            <if test="delayNotice != null">#{delayNotice},</if>
+            <if test="apNo != null">#{apNo},</if>
+            <if test="checkDate != null">#{checkDate},</if>
+            <if test="reportId != null">#{reportId},</if>
+            <if test="monthId != null">#{monthId},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="deptId != null">#{deptId},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTKekaoApprove" parameterType="TKekaoApprove">
+        update t_kekao_approve
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="devId != null">dev_id = #{devId},</if>
+            <if test="devType != null">dev_type = #{devType},</if>
+            <if test="approveType != null">approve_type = #{approveType},</if>
+            <if test="content != null">content = #{content},</if>
+            <if test="fileUrls != null">file_urls = #{fileUrls},</if>
+            <if test="reUrls != null">re_urls = #{reUrls},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="creattime != null">creattime = #{creattime},</if>
+            <if test="endtime != null">endtime = #{endtime},</if>
+            <if test="processId != null">process_id = #{processId},</if>
+            <if test="govDate != null">gov_date = #{govDate},</if>
+            <if test="delayDate != null">delay_date = #{delayDate},</if>
+            <if test="delayReason != null">delay_reason = #{delayReason},</if>
+            <if test="delayMeasure != null">delay_measure = #{delayMeasure},</if>
+            <if test="delayNotice != null">delay_notice = #{delayNotice},</if>
+            <if test="apNo != null">ap_no = #{apNo},</if>
+            <if test="checkDate != null">check_date = #{checkDate},</if>
+            <if test="reportId != null">report_id = #{reportId},</if>
+            <if test="monthId != null">month_id = #{monthId},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <update id="deleteTKekaoApproveById" parameterType="Long">
+        update t_kekao_approve set del_flag = 2 where id = #{id}
+    </update>
+
+    <update id="deleteTKekaoApproveByIds" parameterType="String">
+        update t_kekao_approve set del_flag = 2 where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+    
+</mapper>

+ 71 - 0
master/src/main/resources/processes/kekao/reliability.bpmn

@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:tns="http://www.activiti.org/test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.w3.org/1999/XPath" id="m1657240914866" name="" targetNamespace="http://www.activiti.org/test" typeLanguage="http://www.w3.org/2001/XMLSchema">
+  <process id="maintenance" isClosed="false" isExecutable="true" name="设备维修审批流程" processType="None">
+    <startEvent activiti:initiator="${applyUserId}" id="start" name="开始"/>
+    <userTask activiti:assignee="${kkxjl}" activiti:exclusive="true" id="kkxjlTask" name="可靠性经理"/>
+    <endEvent id="endmaintenance" name="审核通过"/>
+    <sequenceFlow id="flow1" sourceRef="start" targetRef="kkxjlTask"/>
+    <sequenceFlow id="flow2" name="通过" sourceRef="kkxjlTask" targetRef="endmaintenance">
+      <conditionExpression xsi:type="tFormalExpression">
+        <![CDATA[
+        ]]>
+      </conditionExpression>
+    </sequenceFlow>
+    <endEvent id="end2" name="审核不通过"/>
+    <sequenceFlow id="flow3" name="不通过" sourceRef="kkxjlTask" targetRef="end2">
+      <conditionExpression xsi:type="tFormalExpression">
+        <![CDATA[
+        ]]>
+      </conditionExpression>
+    </sequenceFlow>
+  </process>
+  <bpmndi:BPMNDiagram documentation="background=#FFFFFF;count=1;horizontalcount=1;orientation=0;width=842.4;height=1195.2;imageableWidth=832.4;imageableHeight=1185.2;imageableX=5.0;imageableY=5.0" id="Diagram-_1" name="New Diagram">
+    <bpmndi:BPMNPlane bpmnElement="maintenance">
+      <bpmndi:BPMNShape bpmnElement="start" id="Shape-start">
+        <omgdc:Bounds height="32.0" width="32.0" x="70.0" y="60.0"/>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="kkxjlTask" id="Shape-kkxjlTask">
+        <omgdc:Bounds height="55.0" width="105.0" x="160.0" y="50.0"/>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="55.0" width="105.0" x="0.0" y="0.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="endmaintenance" id="Shape-endmaintenance">
+        <omgdc:Bounds height="32.0" width="32.0" x="345.0" y="65.0"/>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="end2" id="Shape-end2">
+        <omgdc:Bounds height="32.0" width="32.0" x="210.0" y="155.0"/>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1" sourceElement="start" targetElement="kkxjlTask">
+        <omgdi:waypoint x="102.0" y="76.0"/>
+        <omgdi:waypoint x="160.0" y="77.5"/>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="-1.0" width="-1.0" x="-1.0" y="-1.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2" sourceElement="kkxjlTask" targetElement="end1">
+        <omgdi:waypoint x="265.0" y="77.5"/>
+        <omgdi:waypoint x="345.0" y="81.0"/>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="16.0" width="100.0" x="289.0" y="79.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3" sourceElement="kkxjlTask" targetElement="end2">
+        <omgdi:waypoint x="226.0" y="105.0"/>
+        <omgdi:waypoint x="226.0" y="155.0"/>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="16.0" width="48.0" x="227.0" y="109.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+</definitions>

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

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询可靠性管理申请列表
+export function listApprove(query) {
+  return request({
+    url: '/reliability/approve/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询可靠性管理申请详细
+export function getApprove(id) {
+  return request({
+    url: '/reliability/approve/' + id,
+    method: 'get'
+  })
+}
+
+// 新增可靠性管理申请
+export function addApprove(data) {
+  return request({
+    url: '/reliability/approve',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改可靠性管理申请
+export function updateApprove(data) {
+  return request({
+    url: '/reliability/approve',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除可靠性管理申请
+export function delApprove(id) {
+  return request({
+    url: '/reliability/approve/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出可靠性管理申请
+export function exportApprove(query) {
+  return request({
+    url: '/reliability/approve/export',
+    method: 'get',
+    params: query
+  })
+}

+ 696 - 0
ui/src/views/reliability/approve/index.vue

@@ -0,0 +1,696 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="申请人id" prop="userId">
+        <el-input
+          v-model="queryParams.userId"
+          placeholder="请输入申请人id"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="设备ids" prop="devId">
+        <el-input
+          v-model="queryParams.devId"
+          placeholder="请输入设备ids"
+          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="approveType">
+        <el-select v-model="queryParams.approveType" placeholder="请选择审批类型" clearable size="small">
+          <el-option label="请选择字典生成" value="" />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="附件url" prop="fileUrls">
+        <el-input
+          v-model="queryParams.fileUrls"
+          placeholder="请输入附件url"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="回执url" prop="reUrls">
+        <el-input
+          v-model="queryParams.reUrls"
+          placeholder="请输入回执url"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="申请状态 0:审批中 1-通过 2-拒绝" prop="status">
+        <el-select v-model="queryParams.status" placeholder="请选择申请状态 0:审批中 1-通过 2-拒绝" clearable size="small">
+          <el-option label="请选择字典生成" value="" />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="开始时间" prop="creattime">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.creattime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择开始时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="结束时间" prop="endtime">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.endtime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择结束时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="流程id" prop="processId">
+        <el-input
+          v-model="queryParams.processId"
+          placeholder="请输入流程id"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="政府回执时间" prop="govDate">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.govDate"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择政府回执时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="延期日期" prop="delayDate">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.delayDate"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择延期日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="延期原因" prop="delayReason">
+        <el-input
+          v-model="queryParams.delayReason"
+          placeholder="请输入延期原因"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="延期措施" prop="delayMeasure">
+        <el-input
+          v-model="queryParams.delayMeasure"
+          placeholder="请输入延期措施"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="延期安全声明" prop="delayNotice">
+        <el-input
+          v-model="queryParams.delayNotice"
+          placeholder="请输入延期安全声明"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="申请编号" prop="apNo">
+        <el-input
+          v-model="queryParams.apNo"
+          placeholder="请输入申请编号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="检查日期" prop="checkDate">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.checkDate"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择检查日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="报告ids" prop="reportId">
+        <el-input
+          v-model="queryParams.reportId"
+          placeholder="请输入报告ids"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="月报告ids" prop="monthId">
+        <el-input
+          v-model="queryParams.monthId"
+          placeholder="请输入月报告ids"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="部门id" prop="deptId">
+        <el-input
+          v-model="queryParams.deptId"
+          placeholder="请输入部门id"
+          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:approve: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:approve: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:approve: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:approve: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:approve:export']"
+        >导出</el-button>
+      </el-col>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="approveList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="部门id" align="center" prop="id" :show-overflow-tooltip="true"/>
+      <el-table-column label="申请人id" align="center" prop="userId" :show-overflow-tooltip="true"/>
+      <el-table-column label="设备ids" align="center" prop="devId" :show-overflow-tooltip="true"/>
+      <el-table-column label="设备类型:" align="center" prop="devType" :show-overflow-tooltip="true"/>
+      <el-table-column label="审批类型" align="center" prop="approveType" :show-overflow-tooltip="true"/>
+      <el-table-column label="内容" align="center" prop="content" :show-overflow-tooltip="true"/>
+      <el-table-column label="附件url" align="center" prop="fileUrls" :show-overflow-tooltip="true"/>
+      <el-table-column label="回执url" align="center" prop="reUrls" :show-overflow-tooltip="true"/>
+      <el-table-column label="申请状态 0:审批中 1-通过 2-拒绝" align="center" prop="status" :show-overflow-tooltip="true"/>
+      <el-table-column label="开始时间" align="center" prop="creattime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.creattime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="结束时间" align="center" prop="endtime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.endtime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="流程id" align="center" prop="processId" :show-overflow-tooltip="true"/>
+      <el-table-column label="政府回执时间" align="center" prop="govDate" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.govDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="延期日期" align="center" prop="delayDate" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.delayDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="延期原因" align="center" prop="delayReason" :show-overflow-tooltip="true"/>
+      <el-table-column label="延期措施" align="center" prop="delayMeasure" :show-overflow-tooltip="true"/>
+      <el-table-column label="延期安全声明" align="center" prop="delayNotice" :show-overflow-tooltip="true"/>
+      <el-table-column label="申请编号" align="center" prop="apNo" :show-overflow-tooltip="true"/>
+      <el-table-column label="检查日期" align="center" prop="checkDate" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.checkDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="报告ids" align="center" prop="reportId" :show-overflow-tooltip="true"/>
+      <el-table-column label="月报告ids" align="center" prop="monthId" :show-overflow-tooltip="true"/>
+      <el-table-column label="部门id" align="center" prop="deptId" :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:approve:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['reliability:approve: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="申请人id" prop="userId">
+          <el-input v-model="form.userId" placeholder="请输入申请人id" />
+        </el-form-item>
+        <el-form-item label="设备ids" prop="devId">
+          <el-input v-model="form.devId" placeholder="请输入设备ids" />
+        </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="approveType">
+          <el-select v-model="form.approveType" placeholder="请选择审批类型">
+            <el-option label="请选择字典生成" value="" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="内容">
+          <editor v-model="form.content" :min-height="192"/>
+        </el-form-item>
+        <el-form-item label="附件url" prop="fileUrls">
+          <el-input v-model="form.fileUrls" placeholder="请输入附件url" />
+        </el-form-item>
+        <el-form-item label="回执url" prop="reUrls">
+          <el-input v-model="form.reUrls" placeholder="请输入回执url" />
+        </el-form-item>
+        <el-form-item label="申请状态 0:审批中 1-通过 2-拒绝">
+          <el-radio-group v-model="form.status">
+            <el-radio label="1">请选择字典生成</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="开始时间" prop="creattime">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.creattime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择开始时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="结束时间" prop="endtime">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.endtime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择结束时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="流程id" prop="processId">
+          <el-input v-model="form.processId" placeholder="请输入流程id" />
+        </el-form-item>
+        <el-form-item label="政府回执时间" prop="govDate">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.govDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择政府回执时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="延期日期" prop="delayDate">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.delayDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择延期日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="延期原因" prop="delayReason">
+          <el-input v-model="form.delayReason" placeholder="请输入延期原因" />
+        </el-form-item>
+        <el-form-item label="延期措施" prop="delayMeasure">
+          <el-input v-model="form.delayMeasure" placeholder="请输入延期措施" />
+        </el-form-item>
+        <el-form-item label="延期安全声明" prop="delayNotice">
+          <el-input v-model="form.delayNotice" placeholder="请输入延期安全声明" />
+        </el-form-item>
+        <el-form-item label="申请编号" prop="apNo">
+          <el-input v-model="form.apNo" placeholder="请输入申请编号" />
+        </el-form-item>
+        <el-form-item label="检查日期" prop="checkDate">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.checkDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择检查日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="报告ids" prop="reportId">
+          <el-input v-model="form.reportId" placeholder="请输入报告ids" />
+        </el-form-item>
+        <el-form-item label="月报告ids" prop="monthId">
+          <el-input v-model="form.monthId" placeholder="请输入月报告ids" />
+        </el-form-item>
+        <el-form-item label="删除标识" prop="delFlag">
+          <el-input v-model="form.delFlag" placeholder="请输入删除标识" />
+        </el-form-item>
+        <el-form-item label="部门id" prop="deptId">
+          <el-input v-model="form.deptId" placeholder="请输入部门id" />
+        </el-form-item>
+          <el-form-item label="归属部门" prop="deptId">
+              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
+          </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+      <!-- 用户导入对话框 -->
+      <el-dialog :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 { listApprove, getApprove, delApprove, addApprove, updateApprove, exportApprove, importTemplate} from "@/api/reliability/approve";
+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";
+import Editor from '@/components/Editor';
+
+export default {
+  name: "Approve",
+  components: { Treeselect },
+  // components: { Editor },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 可靠性管理申请表格数据
+      approveList: [],
+      // 弹出层标题
+      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/approve/importData"
+        },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        userId: null,
+        devId: null,
+        devType: null,
+        approveType: null,
+        content: null,
+        fileUrls: null,
+        reUrls: null,
+        status: null,
+        creattime: null,
+        endtime: null,
+        processId: null,
+        govDate: null,
+        delayDate: null,
+        delayReason: null,
+        delayMeasure: null,
+        delayNotice: null,
+        apNo: null,
+        checkDate: null,
+        reportId: null,
+        monthId: null,
+        deptId: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        userId: [
+          { required: true, message: "申请人id不能为空", 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;
+      listApprove(this.queryParams).then(response => {
+        this.approveList = 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 = {
+        id: null,
+        userId: null,
+        devId: null,
+        devType: null,
+        approveType: null,
+        content: null,
+        fileUrls: null,
+        reUrls: null,
+        status: 0,
+        creattime: null,
+        endtime: null,
+        processId: null,
+        govDate: null,
+        delayDate: null,
+        delayReason: null,
+        delayMeasure: null,
+        delayNotice: null,
+        apNo: null,
+        checkDate: null,
+        reportId: null,
+        monthId: null,
+        delFlag: null,
+        deptId: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加可靠性管理申请";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getApprove(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改可靠性管理申请";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateApprove(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addApprove(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delApprove(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有可靠性管理申请数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportApprove(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>

+ 582 - 0
ui/src/views/reliability/approve/tapprove-add.vue

@@ -0,0 +1,582 @@
+<template>
+  <!-- 添加或修改可靠性申请对话框 -->
+  <el-dialog :title="$t('提交申请')" :visible.sync="visible" width="1200px" append-to-body>
+    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="" label-width="80px">
+    <el-form-item :label="$t('申请设备')">
+      <el-table
+        v-show="dataForm.approveType != 7 && dataForm.devType == 1"
+        :data="devList"
+        border
+        style="width: 100%;">
+        <el-table-column
+          prop="plantCode"
+          header-align="center"
+          align="center"
+          :label="$t('装置名称')">
+        </el-table-column>
+        <el-table-column
+          prop="devno"
+          header-align="center"
+          align="center"
+          :label="$t('位号')">
+        </el-table-column>
+        <el-table-column
+          prop="devname"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          width="150"
+          :label="$t('设备名称')">
+        </el-table-column>
+        <el-table-column
+          prop="useno"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('使用证号码')">
+        </el-table-column>
+        <el-table-column
+          prop="medium"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('介质')">
+        </el-table-column>
+        <el-table-column
+          prop="desPressure"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('设计压力')+'(MPa)'">
+        </el-table-column>
+        <el-table-column
+          prop="desTemp"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('设计温度')+'(℃)'">
+        </el-table-column>
+      </el-table>
+      <el-table
+        v-show="dataForm.approveType != 7 && dataForm.devType == 2"
+        :data="devList"
+        border
+        style="width: 100%;">
+        <el-table-column
+          prop="plantCode"
+          header-align="center"
+          align="center"
+          width="100"
+          :label="$t('装置名称')">
+        </el-table-column>
+        <el-table-column
+          prop="devno"
+          header-align="center"
+          align="center"
+          width="120"
+          :label="$t('位号')">
+        </el-table-column>
+        <el-table-column
+          prop="starting"
+          header-align="center"
+          align="center"
+          width="100"
+          :show-overflow-tooltip="true"
+          :label="$t('起点')">
+        </el-table-column>
+        <el-table-column
+          prop="ending"
+          header-align="center"
+          align="center"
+          width="100"
+          :show-overflow-tooltip="true"
+          :label="$t('终点')">
+        </el-table-column>
+        <el-table-column
+          prop="medium"
+          header-align="center"
+          align="center"
+          width="100"
+          :show-overflow-tooltip="true"
+          :label="$t('介质')">
+        </el-table-column>
+        <el-table-column
+          prop="desPressure"
+          header-align="center"
+          align="center"
+          :label="$t('设计压力')">
+        </el-table-column>
+        <el-table-column
+          prop="desTemp"
+          header-align="center"
+          align="center"
+          :label="$t('设计温度')">
+        </el-table-column>
+        <el-table-column
+          prop="optPressure"
+          header-align="center"
+          align="center"
+          :label="$t('工作压力')">
+        </el-table-column>
+        <el-table-column
+          prop="optTemp"
+          header-align="center"
+          align="center"
+          width="100"
+          :show-overflow-tooltip="true"
+          :label="$t('工作温度')">
+        </el-table-column>
+      </el-table>
+      <el-table
+        v-show="dataForm.devType == 3"
+        :data="devList"
+        border
+        style="width: 100%;">
+        <el-table-column
+          prop="plantCode"
+          header-align="center"
+          align="center"
+          :label="$t('装置名称')">
+        </el-table-column>
+        <el-table-column
+          prop="docno"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('档案号')">
+        </el-table-column>
+        <el-table-column
+          prop="devname"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          width="150"
+          :label="$t('设备名称')">
+        </el-table-column>
+        <el-table-column
+          prop="capacity"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('起吊重量')+'(ton)'">
+        </el-table-column>
+        <el-table-column
+          prop="location"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('使用地点')">
+        </el-table-column>
+      </el-table>
+      <el-table
+        v-show="dataForm.devType == 4"
+        :data="devList"
+        border
+        style="width: 100%;">
+        <el-table-column
+          prop="plantCode"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('装置名称')">
+        </el-table-column>
+        <el-table-column
+          prop="devno"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('位号')">
+        </el-table-column>
+        <el-table-column
+          prop="devname"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          width="120"
+          :label="$t('设备名称')">
+        </el-table-column>
+        <el-table-column
+          prop="useno"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('使用证号码')">
+        </el-table-column>
+        <el-table-column
+          prop="desTemp"
+          header-align="center"
+          align="center"
+          :label="$t('设计温度')+'(℃)'">
+        </el-table-column>
+        <el-table-column
+          prop="desPressure"
+          header-align="center"
+          align="center"
+          :label="$t('设计压力')+'(MPa)'">
+        </el-table-column>
+      </el-table>
+
+    </el-form-item>
+      <el-form-item :label="$t('审批类型')" prop="approveType">
+        <el-select v-model="dataForm.approveType" :placeholder="$t('审批类型')" @change="handleChange">
+          <el-option
+            v-for="dict in approveOption"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="parseInt(dict.dictValue)">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item v-if="!this.showDelay" :label="$t('原因')+$t('空格')+$t('描述')" prop="content">
+        <el-input type="textarea" :placeholder="$t('原因')+$t('空格')+$t('描述')"
+                  v-model="dataForm.content"
+                  maxlength="200" show-word-limit
+                  :autosize="{ minRows: 2, maxRows: 10}"></el-input>
+      </el-form-item>
+
+
+      <el-form-item :label="$t('工艺总监')" prop="gyzj">
+        <el-select v-model="dataForm.gyzj" filterable :placeholder="$t('请选择') + $t('工艺总监')">
+          <el-option
+            v-for="item in gyzjOption"
+            :key="item.userId"
+            :label="item.nickName"
+            :value="item.userId"
+            :disabled="item.disabled">
+          </el-option>
+        </el-select>
+      </el-form-item>
+
+      <template v-if="dataForm.approveType == 5">
+        <el-form-item :label="$t('延期日期')" prop="delayDate">
+          <el-form-item prop="endTime">
+            <el-date-picker
+              v-model="dataForm.delayDate"
+              type="date"
+              value-format="yyyy-MM-dd"
+              :placeholder="$t('selectDate')" >
+            </el-date-picker>
+          </el-form-item>
+        </el-form-item>
+        <el-form-item :label="$t('延期原因')" prop="delayReason">
+          <el-input type="textarea" :placeholder="$t('延期原因')"
+                    v-model="dataForm.delayReason"
+                    :autosize="{ minRows: 2, maxRows: 50}" ></el-input>
+        </el-form-item>
+        <el-form-item :label="$t('延期措施')" prop="delayMeasure">
+          <el-input type="textarea" :placeholder="$t('延期措施')"
+                    v-model="dataForm.delayMeasure"
+                    :autosize="{ minRows: 2, maxRows: 50}" ></el-input>
+        </el-form-item>
+        <el-form-item :label="$t('延期责任安全声明')" prop="delayNotice">
+          <el-input type="textarea" :placeholder="$t('延期责任安全声明')"
+                    v-model="dataForm.delayNotice"
+                    :autosize="{ minRows: 2, maxRows: 50}" ></el-input>
+        </el-form-item>
+      </template>
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+      <el-button type="primary" @click="submitForm">{{ $t('提交') }}</el-button>
+      <el-button @click="cancel">{{ $t('取消') }}</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  import {getToken} from "@/utils/auth";
+  import {addApprove, getApprove} from "@/api/reliability/approve";
+  import {listPostUser} from "@/api/system/user";
+
+  export default {
+  name: "tapprove-add",
+  data() {
+    return {
+      visible: false,
+      devList: [],
+      wxjlOption:[],
+      gyjlOption:[],
+      gyzjOption:[],
+      wxzjOption:[],
+      zfOption:[],
+      fileTips: '',
+      showDelay: false,
+      dataForm: {
+        id: 0,
+        userId: '',
+        devId: '',
+        devType: '',
+        approveType: '',
+        content: '',
+        fileUrls: '',
+        reUrls: '',
+        status: '',
+        createTime: '',
+        plantCode: '',
+        unit: '',
+        devname: '',
+        devno: '',
+        files: [],
+        delayDate: '',
+        delayReason: '',
+        delayMeasure: '',
+        delayNotice: '',
+        wxjl: '',
+        gyzj: '',
+        gyjl: '',
+        wxzj: '',
+        zf: ''
+      },
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/sems/specfile/uploadFile",
+        commonfileList: null,
+        pType: 'traning',
+        pId: null
+      },
+      dataRule: {
+        approveType: [
+          { required: true, message: this.$t('approveType') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        content: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        wxjl: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        wxzj: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        gyjl: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        gyzj: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        zf: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ]
+      },
+      approveOption: [],
+      belong: '',
+      fileList: [],
+    };
+  },
+  watch: {
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
+  created() {
+
+  },
+  methods: {
+    init (rows) {
+      this.fileList = []
+      this.devList = rows
+
+      listPostUser({
+        // postCode: 'gyzj'
+      }).then(response => {
+        this.gyzjOption = response;
+      });
+
+
+  
+      this.getDicts("INTACT_APPROVE_TYPE").then(response => {
+        this.approveOption = response.data;
+        for (let i = 0; i < this.approveOption.length ; i++) {
+          if(this.approveOption[i].dictValue == this.devList[0].status){
+            this.approveOption.splice(i ,1)
+          }
+        }
+      });
+
+      this.visible = true
+  
+      for (let i = 0; i < rows.length; i++) {
+        if (i == 0){
+          this.dataForm.devId = rows[i].id
+        }else {
+          this.dataForm.devId += ',' + rows[i].id
+        }
+      }
+      this.belong = type + '_'  + '/' + new Date().getTime()
+    },
+    // 设备类型:字典翻译
+    devTypeFormat(row, column) {
+      return this.selectDictLabel(this.devTypeOptions, row.devType);
+    },
+    // 审批类型字典翻译
+    approveTypeFormat(row, column) {
+      return this.selectDictLabel(this.approveTypeOptions, row.approveType);
+    },
+    // 取消按钮
+    cancel() {
+      this.$emit('refreshDataList')
+      this.visible = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        userId: null,
+        devId: null,
+        devType: null,
+        approveType: null,
+        content: null,
+        fileUrls: null,
+        reUrls: null,
+        status: 0,
+        creattime: null,
+        endtime: null,
+        processId: null,
+        govDate: null,
+        delayDate: null,
+        delayReason: null,
+        delayMeasure: null,
+        delayNotice: null,
+        apNo: null,
+        checkDate: null,
+        reportId: null,
+        monthId: null,
+        delFlag: null,
+        deptId: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = this.$t('添加特种设备申请');
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getApprove(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = this.$t('修改特种设备申请');
+      });
+    },
+    //附件上传中处理
+    handleFileDocProgress(event, file, fileList) {
+    },
+    handleRemove (file, fileList) {
+      this.fileList = fileList
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      this.fileList = fileList
+      if (response.code == 200){
+        this.$alert(this.$t('导入成功'), this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      }else {
+        this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      }
+
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.dataForm.files = []
+      console.log(this.fileList)
+      if (this.fileList.length > 0) {
+        for (let i = 0; i < this.fileList.length; i++) {
+          let obj = {}
+          obj.fileName = this.fileList[i].name
+          obj.fileUrl = this.fileList[i].response.msg
+          this.dataForm.files.push(obj)
+        }
+      }
+      this.$refs["dataForm"].validate(valid => {
+        if (valid) {
+            addApprove(this.dataForm).then(response => {
+              this.msgSuccess(this.$t('新增成功'));
+              this.visible = false;
+            });
+        }
+      });
+      this.$emit('refreshDataList')
+    },
+    handleChange(value) {
+      this.showDelay = false
+      if (value == -1) {
+        this.fileTips = '提示:请提供相关支持文件'
+      }else if (value == 1) {
+        this.fileTips = '提示:请提供启用前检查报告'
+      }else if (value == 2) {
+        this.fileTips = ''
+      }else if (value == 3) {
+        this.fileTips = '提示:请提供设备主体破坏后的照片,防止被其他单位买走重新使用'
+      }else if (value == 4) {
+        this.fileTips = '提示:请提供相关支持文件'
+      }else if (value == 5) {
+        this.showDelay = true
+        this.fileTips = '提示:延期发起的会议纪要等背景情况'
+        this.dataForm.delayReason=
+          '根据2015年压力管道检验报告,清单中的相关管道材质中度球化,安全等级定为3级,下次检验日期定为2018年5月。\n' +
+          '由于这些管道连接电厂蒸汽母管,无法单独隔绝,只有在2020年扬巴大修期间才有机会停车检验,因此提出延期申请。\n'
+        this.dataForm.delayMeasure=
+          '(生产部门,应该根据实际情况,组织机械,电仪各专业,制定具体的运行监控措施描述)\n' +
+          '\n' +
+          '工艺部门:\n' +
+          '维持相关管道操作稳定\n' +
+          '持续监控相关管道操作压力和温度\n' +
+          '按照法规要求,定期开展应急演练\n' +
+          '\n' +
+          '\n' +
+          '机修部门:\n' +
+          '每月对相关管道进行走线巡检,对管道支吊架,保温目视检查。如有问题,记录在巡检记录中\n' +
+          '及时报告管道使用情况及需要解决的问题\n' +
+          '发生事故及时组织调查处理,并配合写出事故报告书\n' +
+          '\n' +
+          '电仪部门:\n' +
+          'XXXXXXXXXXX描述电仪方面的维护或监控措施\n'
+        this.dataForm.delayNotice=
+          '我单位/装置,已制定相应预防措施和应急预案,并保证落实安全管理责任、操作人员持证上岗、安全附件和安全保护装置在有效期内。在检验延期期间,将对以上设备加强巡查和实施有效安全监控,做好监控记录,对延期期间的设备安全负完全责任;在延期期满前,我单位将申报并安排以上设备实施定期检验。'
+      }else if (value == 6) {
+        this.fileTips = '提示:请提供安全评估报告'
+      }else {
+        this.fileTips = ''
+      }
+    },
+}
+}
+
+
+</script>
+
+<style scoped>
+
+</style>

+ 346 - 0
ui/src/views/reliability/approve/tapprove-his.vue

@@ -0,0 +1,346 @@
+<template>
+  <el-dialog :title="$t('申请记录')" :visible.sync="visible" width="1200px" append-to-body>
+    <el-table v-loading="loading" :data="approveList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+      <el-table-column :label="$t('申请人')" align="center" prop="userName" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('设备类型')+':'" align="center" prop="devType" :formatter="devTypeFormat" />
+      <el-table-column :label="$t('审批类型')" align="center" prop="approveType" :formatter="approveTypeFormat" />
+      <el-table-column :label="$t('内容')" align="center" prop="content" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('申请状态')" align="center" prop="status"  :formatter="statusFormat"/>
+      <el-table-column :label="$t('开始时间')" align="center" prop="creattime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.creattime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column :label="$t('结束时间')" align="center" prop="endtime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.endtime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column :label="$t('操作')" align="center"  width="120" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            @click="detailHandle(scope.row)"
+          >{{ $t('查看') }}</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"-->
+<!--    />-->
+    <add-or-update v-if="specDealVisible" ref="specDeal" @refreshDataList="getList"></add-or-update>
+  </el-dialog>
+</template>
+
+<script>
+import { listApprove, getApprove,listHisApprove, delApprove, addApprove, updateApprove, exportApprove, importTemplate} from "@/api/reliability/approve";
+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";
+import AddOrUpdate from '../../approve/approveDetail/intact-detail';
+import Editor from '@/components/Editor';
+
+export default {
+  name: "Approve",
+  components: { Treeselect,AddOrUpdate },
+  // components: { Editor },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      visible: false,
+      specDealVisible: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 特种设备申请表格数据
+      approveList: [],
+      // 弹出层标题
+      title: "",
+      // 部门树选项
+      deptOptions: undefined,
+      clientHeight:300,
+      // 是否显示弹出层
+      open: false,
+      // 设备类型:字典
+      devTypeOptions: [],
+      // 审批类型字典
+      approveTypeOptions: [],
+      statusOptions: [],
+        // 用户导入参数
+        upload: {
+            // 是否显示弹出层(用户导入)
+            open: false,
+            // 弹出层标题(用户导入)
+            title: "",
+            // 是否禁用上传
+            isUploading: false,
+            // 是否更新已经存在的用户数据
+            updateSupport: 0,
+            // 设置上传的请求头部
+            headers: { Authorization: "Bearer " + getToken() },
+            // 上传的地址
+            url: process.env.VUE_APP_BASE_API + "/sems/approve/importData"
+        },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        userId: null,
+        devId: null,
+        devType: null,
+        approveType: null,
+        content: null,
+        fileUrls: null,
+        reUrls: null,
+        status: null,
+        creattime: null,
+        endtime: null,
+        processId: null,
+        govDate: null,
+        delayDate: null,
+        delayReason: null,
+        delayMeasure: null,
+        delayNotice: null,
+        apNo: null,
+        checkDate: null,
+        reportId: null,
+        monthId: null,
+        deptId: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        userId: [
+          { required: true, message: this.$t('申请人')+this.$t('空格') +'id' + this.$t('不能为空'), trigger: "blur" }
+        ],
+      }
+    };
+  },
+  watch: {
+        // 根据名称筛选部门树
+        deptName(val) {
+            this.$refs.tree.filter(val);
+        }
+   },
+  created() {
+      //设置表格高度对应屏幕高度
+      this.$nextTick(() => {
+          this.clientHeight = document.body.clientHeight -250
+      })
+    this.getList();
+    this.getTreeselect();
+    this.getDicts("INTACT_DEVTYPE").then(response => {
+      this.devTypeOptions = response.data;
+    });
+    this.getDicts("INTACT_APPROVE_TYPE").then(response => {
+      this.approveTypeOptions = response.data;
+    });
+    this.getDicts("spec_approve_res").then(response => {
+      this.statusOptions = response.data;
+    });
+  },
+  methods: {
+    init (row) {
+      this.visible = true
+      this.loading = true;
+    //  console.log(row.devType)
+      this.queryParams.devId = row.id
+ 
+      listHisApprove(this.queryParams).then(response => {
+        this.approveList = response.data;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    /** 查询特种设备申请列表 */
+    getList() {
+
+    },
+     /** 查询部门下拉树结构 */
+     getTreeselect() {
+          treeselect().then(response => {
+              this.deptOptions = response.data;
+          });
+     },
+    // 设备类型:字典翻译
+    devTypeFormat(row, column) {
+      return this.selectDictLabel(this.devTypeOptions, row.devType);
+    },
+    // 审批类型字典翻译
+    approveTypeFormat(row, column) {
+      return this.selectDictLabel(this.approveTypeOptions, row.approveType);
+    },
+    // 审批类型字典翻译
+    statusFormat(row, column) {
+      return this.selectDictLabel(this.statusOptions, row.status);
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        userId: null,
+        devId: null,
+        devType: null,
+        approveType: null,
+        content: null,
+        fileUrls: null,
+        reUrls: null,
+        status: 0,
+        creattime: null,
+        endtime: null,
+        processId: null,
+        govDate: null,
+        delayDate: null,
+        delayReason: null,
+        delayMeasure: null,
+        delayNotice: null,
+        apNo: null,
+        checkDate: null,
+        reportId: null,
+        monthId: null,
+        delFlag: null,
+        deptId: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = this.$t('添加特种设备申请');
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getApprove(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title =this.$t('修改特种设备申请');
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateApprove(this.form).then(response => {
+              this.msgSuccess(this.$t('修改成功'));
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addApprove(this.form).then(response => {
+              this.msgSuccess(this.$t('新增成功'));
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+          type: "warning"
+        }).then(function() {
+          return delApprove(ids);
+        }).then(() => {
+          this.getList();
+        this.msgSuccess(this.$t('删除成功'));
+        })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm(this.$t('是否确认导出所有特种设备申请数据项?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+          type: "warning"
+        }).then(function() {
+          return exportApprove(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+    },
+      /** 导入按钮操作 */
+      handleImport() {
+          this.upload.title = this.$t('用户导入');
+          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, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+          this.getList();
+      },
+      // 提交上传文件
+      submitFileForm() {
+          this.$refs.upload.submit();
+      },
+    //操作审批流程
+    detailHandle (row) {
+        this.specDealVisible = true
+
+        this.$nextTick(() => {
+          console.log(row.taskName)
+
+          this.$refs.specDeal.init(row.id, row.taskId, row.processId,row.taskName)
+
+        })
+
+    },
+  }
+};
+</script>