Sfoglia il codice sorgente

关系转移流程

Wang Zi Wen 2 anni fa
parent
commit
1c6054c8bb

+ 43 - 25
ruoyi-admin/src/main/java/com/ruoyi/web/controller/branch/TApproveDangerController.java

@@ -1,8 +1,10 @@
 package com.ruoyi.web.controller.branch;
 
 import com.alibaba.fastjson.JSON;
+import com.ruoyi.branch.domain.TBranchMember;
 import com.ruoyi.branch.domain.approve.DevProcess;
 import com.ruoyi.branch.domain.approve.DevTask;
+import com.ruoyi.branch.service.ITBranchMemberService;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.core.page.TableDataInfo;
@@ -25,8 +27,12 @@ import org.activiti.image.impl.DefaultProcessDiagramGenerator;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import com.ruoyi.common.utils.http.HttpContextUtils;
 
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 import java.io.InputStream;
+import java.io.OutputStream;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -39,11 +45,6 @@ import java.util.stream.Collectors;
 @RestController
 @RequestMapping("/ehs/approvedanger")
 public class TApproveDangerController extends BaseController {
-//    @Autowired
-//    private ITApproveDangerService tApproveDangerService;
-
-//    @Autowired
-//    private ITApproveAccidentService tApproveAccidentService;
 
     @Autowired
     private RuntimeService runtimeService;
@@ -57,6 +58,20 @@ public class TApproveDangerController extends BaseController {
     @Autowired
     private ISysUserService sysUserService;
 
+    @Autowired
+    private RepositoryService repositoryService;
+
+    @Autowired
+    private ITBranchMemberService memberService;
+
+//    @Autowired
+//    private ITApproveDangerService tApproveDangerService;
+
+//    @Autowired
+//    private ITApproveAccidentService tApproveAccidentService;
+
+
+
 //    @Autowired
 //    private ITCommonfileService tCommonfileService;
 //    @Autowired
@@ -65,8 +80,6 @@ public class TApproveDangerController extends BaseController {
 //    private ITApproveSpecModifyService tApproveSpecModifyService;
 //    @Autowired
 //    private ITStApproveService tStApproveService;
-    @Autowired
-    private RepositoryService repositoryService;
 //    @Autowired
 //    private ITApproveMaintenanceService tApproveMaintenanceService;
 //    @Autowired
@@ -204,10 +217,10 @@ public class TApproveDangerController extends BaseController {
                 DevProcess devProcess = new DevProcess();
                 logger.info("审批类型" + pi.getProcessDefinitionName());
                 try {
-                    if (pi.getProcessDefinitionName().equals("特种设备审核")) {
-//                        TApprove approve = tApproveService.selectTApproveById(Long.parseLong(h.getBusinessKey()));
-//                        devProcess.setSpecApprove(approve);
-//                        devProcess.setApNo(approve.getApNo());
+                    if (pi.getProcessDefinitionName().equals("通用审批流程")) {
+                        TBranchMember member = memberService.selectTBranchMemberByMemberId(Long.parseLong(h.getBusinessKey()));
+                        devProcess.setMember(member);
+                        devProcess.setApNo(member.getApNo());
                     }
 //                    else if (pi.getProcessDefinitionName().equals("年度检查报告申请")) {
 //                        TApprove approve = tApproveService.selectTApproveById(Long.parseLong(h.getBusinessKey()));
@@ -321,11 +334,16 @@ public class TApproveDangerController extends BaseController {
                 devTask.setProcessName(pi.getProcessDefinitionName());
                 devTask.setProcessCreateTime(pi.getStartTime());
                 devTask.setBusinessKey(pi.getBusinessKey());
-                if (pi.getProcessDefinitionName().equals("重大隐患审批流程") || pi.getProcessDefinitionName().equals("普通隐患审批流程")) {
+                if (pi.getProcessDefinitionName().equals("通用审批流程")) {
+                    TBranchMember member = memberService.selectTBranchMemberByMemberId(Long.parseLong(pi.getBusinessKey()));
+                    devTask.setMember(member);
+                    devTask.setApNo(member.getApNo());
+                }
+//                if (pi.getProcessDefinitionName().equals("重大隐患审批流程") || pi.getProcessDefinitionName().equals("普通隐患审批流程")) {
 //                    TApproveDanger approveDanger = tApproveDangerService.selectTApproveDangerById(Long.parseLong(pi.getBusinessKey()));
 //                    devTask.settApprove(approveDanger);
 //                    devTask.setApNo(approveDanger.getApproveNo());
-                }
+//                }
 //                else if (pi.getProcessDefinitionName().equals("事件审批流程")) {
 //                    TApproveAccident approveAccident = tApproveAccidentService.selectTApproveAccidentById(Long.parseLong(pi.getBusinessKey()));
 //                    devTask.settApproveAccident(approveAccident);
@@ -416,12 +434,12 @@ public class TApproveDangerController extends BaseController {
                     continue;
                 }
                 DevProcess devProcess = new DevProcess();
-                if (pi.getProcessDefinitionName().equals("特种设备审核")) {
-//                    TApprove approve = tApproveService.selectTApproveById(Long.parseLong(pi.getBusinessKey()));
-//                    SysUser user = sysUserService.selectUserById(approve.getUserId());
-//                    devProcess.setApNo(approve.getApNo());
-//                    devProcess.setApName(user.getNickName());
-//                    devProcess.setSpecApprove(approve);
+                if (pi.getProcessDefinitionName().equals("通用审批流程")) {
+                    TBranchMember member = memberService.selectTBranchMemberByMemberId(Long.parseLong(pi.getBusinessKey()));
+                    SysUser user = sysUserService.selectUserById(member.getUserId());
+                    devProcess.setApNo(member.getApNo());
+                    devProcess.setApName(user.getNickName());
+                    devProcess.setMember(member);
                 }
 //                else if (pi.getProcessDefinitionName().equals("年度检查报告申请")) {
 //                    TApprove approve = tApproveService.selectTApproveById(Long.parseLong(pi.getBusinessKey()));
@@ -676,12 +694,12 @@ public class TApproveDangerController extends BaseController {
 //        return toAjax(tApproveDangerService.deleteTApproveDangerByIds(ids));
 //    }
 //
-//    @GetMapping("processImg/{processId}")
-//    public void currentProcessInstanceImage(@PathVariable("processId") String processId, HttpServletResponse response) throws IOException {
-//        InputStream inputStream = currentProcessInstanceImage(processId);
-//        OutputStream outputStream = response.getOutputStream();
-//        HttpContextUtils.copyImageStream(inputStream, outputStream);
-//    }
+    @GetMapping("processImg/{processId}")
+    public void currentProcessInstanceImage(@PathVariable("processId") String processId, HttpServletResponse response) throws IOException {
+        InputStream inputStream = currentProcessInstanceImage(processId);
+        OutputStream outputStream = response.getOutputStream();
+        HttpContextUtils.copyImageStream(inputStream, outputStream);
+    }
 
     /**
      * 获取当前任务流程图

+ 122 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/branch/TBranchMemberController.java

@@ -1,9 +1,21 @@
 package com.ruoyi.web.controller.branch;
 
+import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import javax.servlet.http.HttpServletResponse;
 
+import com.ruoyi.branch.domain.approve.DevTask;
+import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.system.service.ISysUserService;
+import org.activiti.engine.ProcessEngine;
+import org.activiti.engine.ProcessEngines;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.TaskService;
+import org.activiti.engine.impl.identity.Authentication;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -25,7 +37,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
 
 /**
  * 支部成员管理Controller
- * 
+ *
  * @author ruoyi
  * @date 2023-06-15
  */
@@ -39,16 +51,122 @@ public class TBranchMemberController extends BaseController
     @Autowired
     private ISysUserService userService;
 
+    @Autowired
+    private RuntimeService runtimeService;
+
+    /**
+     * 审核处理
+     * @param devTask
+     * @return
+     */
+    @PreAuthorize("@ss.hasPermi('branch:member:edit')")
+    @PutMapping("/handle")
+    public AjaxResult handle(@RequestBody DevTask devTask) {
+        logger.info("devTask:" + devTask);
+        TBranchMember member = tBranchMemberService.selectTBranchMemberByMemberId(devTask.getObjId());
+        String condition = devTask.getCondition();
+        String taskName = devTask.getTaskName();
+        Map<String, Object> param = new HashMap<>();
+        param.put("condition", condition);
+        ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
+        TaskService taskService = processEngine.getTaskService();
+        //使用任务服务完成任务(提交任务)
+        String taskId = devTask.getTaskId();
+        // 使用任务id,获取任务对象,获取流程实例id
+        Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
+//        logger.info("Assignee:" + task.getAssignee());
+        //利用任务对象,获取流程实例id
+        String processInstancesId = task.getProcessInstanceId();
+        System.out.println(processInstancesId);
+        //认领任务
+        processEngine.getTaskService()//
+                .claim(taskId, getUserId().toString());
+//        Authentication.setAuthenticatedUserId("cmc"); // 添加批注时候的审核人
+        if (devTask.getComment() == null) {
+            devTask.setComment("");
+        }
+        taskService.addComment(taskId, processInstancesId, devTask.getComment());
+        //业务监听处理
+//        tApproveService.handleApprove(task ,devTask);
+        taskService.complete(taskId, param);
+
+        if (taskName.equals("党总支审核")) {
+            if (condition.equals("1")) {
+                member.setApStatus("1");
+                member.setNewDeptId(null);
+                member.setOldDeptId(null);
+                tBranchMemberService.updateTBranchMember(member);
+                // TODO: 新增一条关系转移记录
+            }
+        } else if (taskName.equals("支部申请")) {
+
+        }
+
+
+        return AjaxResult.success();
+    }
+
     /**
      * 转移申请
      */
     @PreAuthorize("@ss.hasPermi('branch:member:edit')")
-    @Log(title = "支部成员管理", businessType = BusinessType.UPDATE)
     @PutMapping("/apply")
     public AjaxResult apply(@RequestBody TBranchMember tBranchMember)
     {
-        // TODO: 开启工作流
-        return null;
+        tBranchMember.setApStatus("0");
+        // 当前登录用户userId
+        String userId = getUserId().toString();
+        // 开始申请流程
+        tBranchMember.setApNo(DateUtils.dateTimeNow() + userId);
+        Authentication.setAuthenticatedUserId(userId);//设置当前申请人
+        // 声明流程变量集合
+        Map<String, Object> variables = new HashMap<>();
+        variables.put("applicant", userId);
+        variables.put("assessor", "139");
+        // 流程businessKey = SAI开项管理对象saiApplyId
+        long businessKey = tBranchMember.getMemberId();
+        // 采用key来启动流程定义并设置流程变量,返回流程实例
+        ProcessInstance pi = runtimeService.startProcessInstanceByKey("commonProcess", String.valueOf(businessKey), variables);
+        logger.info("流程部署id:" + pi.getDeploymentId());
+        logger.info("流程定义id:" + pi.getProcessDefinitionId());
+        logger.info("流程实例id:" + pi.getProcessInstanceId());
+        logger.info("流程定义对象:" + pi.getProcessVariables());
+        // SAI开项管理对象processId = 流程实例id
+        tBranchMember.setProcessId(pi.getProcessInstanceId());
+        // 标记taskId、TaskName
+//        ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
+//        List<Task> list = processEngine.getTaskService()//获取任务service
+//                .createTaskQuery()//创建查询对象
+//                .taskCandidateOrAssigned("20276").list();
+//        for (Task task : list) {
+//            if (tSaiApply.getProcessId().equals(task.getProcessInstanceId())) {
+//                tSaiApply.setTaskId(task.getId());
+//                tSaiApply.setTaskName(task.getName());
+//            }
+//        }
+        // 更新操作
+        tBranchMemberService.updateTBranchMember(tBranchMember);
+        Map<String, Object> param = new HashMap<>();
+        param.put("condition", "1");
+        ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
+        TaskService taskService = processEngine.getTaskService();
+        List<Task> list = taskService.createTaskQuery().taskCandidateOrAssigned(userId).list();
+        String taskId = null;
+        for (Task task : list) {
+            String processInstanceId = task.getProcessInstanceId();
+            if (processInstanceId.equals(pi.getProcessInstanceId())) {
+                taskId = task.getId();
+            }
+        }
+        processEngine.getTaskService()//
+                .claim(taskId, getUserId().toString());
+        taskService.complete(taskId, param);
+
+
+
+
+
+        return AjaxResult.success();
     }
 
 

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

@@ -91,7 +91,7 @@ public class ActivitiConfig {
     public void initProcess() throws IOException {
         DeploymentBuilder deploymentBuilder = repositoryService().createDeployment();
         Resource common = resourceLoader.getResource("classpath:/processes/common.bpmn"); //加载流程图资源文件
-        deploymentBuilder.enableDuplicateFiltering().addInputStream(common.getFilename(), common.getInputStream()).name("普通隐患审批流程").deploy(); //按流程id部署
+        deploymentBuilder.enableDuplicateFiltering().addInputStream(common.getFilename(), common.getInputStream()).name("通用审批流程").deploy(); //按流程id部署
 //
 //        DeploymentBuilder deploymentBuilder1 = repositoryService().createDeployment();
 //        Resource major= resourceLoader.getResource("classpath:/processes/major.bpmn");

+ 51 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpContextUtils.java

@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package com.ruoyi.common.utils.http;
+
+import org.apache.commons.io.IOUtils;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+public class HttpContextUtils {
+
+    public static void copyImageStream(InputStream inputStream, OutputStream outputStream) {
+        try {
+            IOUtils.copy(inputStream, outputStream);
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                inputStream.close();
+                outputStream.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    public static HttpServletRequest getHttpServletRequest() {
+        return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
+    }
+
+    public static String getDomain() {
+        HttpServletRequest request = getHttpServletRequest();
+        StringBuffer url = request.getRequestURL();
+        return url.delete(url.length() - request.getRequestURI().length(), url.length()).toString();
+    }
+
+    public static String getOrigin() {
+        HttpServletRequest request = getHttpServletRequest();
+        return request.getHeader("Origin");
+    }
+}

+ 0 - 106
ruoyi-common/src/main/resources/processes/apply.bpmn

@@ -1,106 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
-  <process id="myProcess" name="My process" isExecutable="true">
-    <startEvent id="startevent" name="开始"></startEvent>
-    <endEvent id="endevent" name="结束"></endEvent>
-    <userTask id="dzzpz" name="党总支批准"></userTask>
-    <sequenceFlow id="flow1" name="提交申请" sourceRef="startevent" targetRef="dzzpz"></sequenceFlow>
-    <serviceTask id="bgdzz" name="报告党总支" activiti:type="mail"></serviceTask>
-    <serviceTask id="gs" name="公示" activiti:type="mail"></serviceTask>
-    <parallelGateway id="parallelgateway1" name="Parallel Gateway"></parallelGateway>
-    <exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway"></exclusiveGateway>
-    <sequenceFlow id="flow3" name="是" sourceRef="exclusivegateway2" targetRef="parallelgateway1">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
-    </sequenceFlow>
-    <sequenceFlow id="flow2" sourceRef="dzzpz" targetRef="exclusivegateway2"></sequenceFlow>
-    <sequenceFlow id="flow4" name="否" sourceRef="exclusivegateway2" targetRef="endevent">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 0}]]></conditionExpression>
-    </sequenceFlow>
-    <parallelGateway id="parallelgateway2" name="Parallel Gateway"></parallelGateway>
-    <sequenceFlow id="flow9" sourceRef="parallelgateway2" targetRef="endevent"></sequenceFlow>
-    <sequenceFlow id="flow5" sourceRef="parallelgateway1" targetRef="bgdzz"></sequenceFlow>
-    <sequenceFlow id="flow6" sourceRef="parallelgateway1" targetRef="gs"></sequenceFlow>
-    <sequenceFlow id="flow7" sourceRef="bgdzz" targetRef="parallelgateway2"></sequenceFlow>
-    <sequenceFlow id="flow8" sourceRef="gs" targetRef="parallelgateway2"></sequenceFlow>
-  </process>
-  <bpmndi:BPMNDiagram id="BPMNDiagram_myProcess">
-    <bpmndi:BPMNPlane bpmnElement="myProcess" id="BPMNPlane_myProcess">
-      <bpmndi:BPMNShape bpmnElement="startevent" id="BPMNShape_startevent">
-        <omgdc:Bounds height="35.0" width="35.0" x="120.0" y="250.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="endevent" id="BPMNShape_endevent">
-        <omgdc:Bounds height="35.0" width="35.0" x="810.0" y="253.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="dzzpz" id="BPMNShape_dzzpz">
-        <omgdc:Bounds height="72.0" width="105.0" x="230.0" y="231.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="bgdzz" id="BPMNShape_bgdzz">
-        <omgdc:Bounds height="55.0" width="105.0" x="562.0" y="199.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="gs" id="BPMNShape_gs">
-        <omgdc:Bounds height="55.0" width="105.0" x="562.0" y="284.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="parallelgateway1" id="BPMNShape_parallelgateway1">
-        <omgdc:Bounds height="40.0" width="40.0" x="470.0" y="246.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="exclusivegateway2" id="BPMNShape_exclusivegateway2">
-        <omgdc:Bounds height="40.0" width="40.0" x="380.0" y="247.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="parallelgateway2" id="BPMNShape_parallelgateway2">
-        <omgdc:Bounds height="40.0" width="40.0" x="710.0" y="250.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
-        <omgdi:waypoint x="155.0" y="267.0"></omgdi:waypoint>
-        <omgdi:waypoint x="230.0" y="267.0"></omgdi:waypoint>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="100.0" x="159.0" y="250.0"></omgdc:Bounds>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
-        <omgdi:waypoint x="420.0" y="267.0"></omgdi:waypoint>
-        <omgdi:waypoint x="470.0" y="266.0"></omgdi:waypoint>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="100.0" x="419.0" y="251.0"></omgdc:Bounds>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
-        <omgdi:waypoint x="335.0" y="267.0"></omgdi:waypoint>
-        <omgdi:waypoint x="380.0" y="267.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
-        <omgdi:waypoint x="400.0" y="287.0"></omgdi:waypoint>
-        <omgdi:waypoint x="400.0" y="374.0"></omgdi:waypoint>
-        <omgdi:waypoint x="611.0" y="374.0"></omgdi:waypoint>
-        <omgdi:waypoint x="827.0" y="374.0"></omgdi:waypoint>
-        <omgdi:waypoint x="827.0" y="288.0"></omgdi:waypoint>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="100.0" x="420.0" y="337.0"></omgdc:Bounds>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
-        <omgdi:waypoint x="750.0" y="270.0"></omgdi:waypoint>
-        <omgdi:waypoint x="810.0" y="270.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
-        <omgdi:waypoint x="490.0" y="246.0"></omgdi:waypoint>
-        <omgdi:waypoint x="490.0" y="226.0"></omgdi:waypoint>
-        <omgdi:waypoint x="562.0" y="226.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
-        <omgdi:waypoint x="490.0" y="286.0"></omgdi:waypoint>
-        <omgdi:waypoint x="490.0" y="311.0"></omgdi:waypoint>
-        <omgdi:waypoint x="562.0" y="311.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
-        <omgdi:waypoint x="667.0" y="226.0"></omgdi:waypoint>
-        <omgdi:waypoint x="730.0" y="226.0"></omgdi:waypoint>
-        <omgdi:waypoint x="730.0" y="250.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
-        <omgdi:waypoint x="667.0" y="311.0"></omgdi:waypoint>
-        <omgdi:waypoint x="730.0" y="311.0"></omgdi:waypoint>
-        <omgdi:waypoint x="730.0" y="290.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-    </bpmndi:BPMNPlane>
-  </bpmndi:BPMNDiagram>
-</definitions>

+ 51 - 82
ruoyi-common/src/main/resources/processes/common.bpmn

@@ -1,108 +1,77 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
-  <process id="commonProcess" name="普通隐患审批流程" isExecutable="true">
-    <startEvent id="startevent" name="开始"></startEvent>
-    <userTask id="executor" name="执行人" activiti:assignee="#{executor}">
-      <extensionElements>
-        <activiti:taskListener event="create" delegateExpression="${executorTaskCreateListener}"></activiti:taskListener>
-      </extensionElements>
-    </userTask>
-    <userTask id="verification" name="验证人" activiti:assignee="#{verification}">
-      <extensionElements>
-        <activiti:taskListener event="create" delegateExpression="${verificationTaskCreateListener}"></activiti:taskListener>
-      </extensionElements>
-    </userTask>
-    <endEvent id="endevent" name="结束">
-      <extensionElements>
-        <activiti:executionListener event="end" delegateExpression="${endSucessListener}"></activiti:executionListener>
-      </extensionElements>
-    </endEvent>
-    <sequenceFlow id="flow3" sourceRef="executor" targetRef="verification">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 1}]]></conditionExpression>
+  <process id="commonProcess" name="通用审批流程" isExecutable="true">
+    <startEvent id="startevent" name="start"></startEvent>
+    <endEvent id="endevent" name="end"></endEvent>
+    <userTask id="apply" name="支部申请" activiti:assignee="#{applicant}"></userTask>
+    <userTask id="assess" name="党总支审核" activiti:assignee="#{assessor}"></userTask>
+    <sequenceFlow id="flow1" name="提交" sourceRef="startevent" targetRef="apply"></sequenceFlow>
+    <sequenceFlow id="flow2" name="提交" sourceRef="apply" targetRef="assess">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
     </sequenceFlow>
-    <sequenceFlow id="flow4" sourceRef="verification" targetRef="endevent">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 1}]]></conditionExpression>
+    <sequenceFlow id="flow3" name="批准" sourceRef="assess" targetRef="endevent">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
     </sequenceFlow>
-    <sequenceFlow id="flow5" name="未达标" sourceRef="verification" targetRef="executor">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 2}]]></conditionExpression>
+    <sequenceFlow id="flow4" name="驳回" sourceRef="assess" targetRef="apply">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 0}]]></conditionExpression>
     </sequenceFlow>
-    <sequenceFlow id="flow7" name="无效" sourceRef="verification" targetRef="recorder">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 0}]]></conditionExpression>
+    <sequenceFlow id="flow5" name="取消" sourceRef="apply" targetRef="endevent">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 0}]]></conditionExpression>
     </sequenceFlow>
-    <sequenceFlow id="flow2" sourceRef="recorder" targetRef="executor">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 1}]]></conditionExpression>
-    </sequenceFlow>
-    <sequenceFlow id="flow1" sourceRef="startevent" targetRef="executor"></sequenceFlow>
-    <sequenceFlow id="flow6" name="无法执行/逾期" sourceRef="executor" targetRef="recorder">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 0}]]></conditionExpression>
-    </sequenceFlow>
-    <userTask id="recorder" name="记录人" activiti:assignee="#{recorder}">
-      <extensionElements>
-        <activiti:taskListener event="create" delegateExpression="${recorderTaskCreateListener}"></activiti:taskListener>
-      </extensionElements>
-    </userTask>
   </process>
   <bpmndi:BPMNDiagram id="BPMNDiagram_commonProcess">
     <bpmndi:BPMNPlane bpmnElement="commonProcess" id="BPMNPlane_commonProcess">
       <bpmndi:BPMNShape bpmnElement="startevent" id="BPMNShape_startevent">
-        <omgdc:Bounds height="41.0" width="41.0" x="140.0" y="320.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="executor" id="BPMNShape_executor">
-        <omgdc:Bounds height="61.0" width="141.0" x="680.0" y="310.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="verification" id="BPMNShape_verification">
-        <omgdc:Bounds height="61.0" width="141.0" x="1000.0" y="310.0"></omgdc:Bounds>
+        <omgdc:Bounds height="35.0" width="35.0" x="140.0" y="249.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape bpmnElement="endevent" id="BPMNShape_endevent">
-        <omgdc:Bounds height="41.0" width="41.0" x="1310.0" y="320.0"></omgdc:Bounds>
+        <omgdc:Bounds height="35.0" width="35.0" x="760.0" y="249.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="recorder" id="BPMNShape_recorder">
-        <omgdc:Bounds height="61.0" width="141.0" x="261.0" y="445.0"></omgdc:Bounds>
+      <bpmndi:BPMNShape bpmnElement="apply" id="BPMNShape_apply">
+        <omgdc:Bounds height="55.0" width="105.0" x="310.0" y="239.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
-        <omgdi:waypoint x="821.0" y="340.0"></omgdi:waypoint>
-        <omgdi:waypoint x="1000.0" y="340.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
-        <omgdi:waypoint x="1141.0" y="340.0"></omgdi:waypoint>
-        <omgdi:waypoint x="1310.0" y="340.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
-        <omgdi:waypoint x="1070.0" y="310.0"></omgdi:waypoint>
-        <omgdi:waypoint x="1070.0" y="256.0"></omgdi:waypoint>
-        <omgdi:waypoint x="750.0" y="256.0"></omgdi:waypoint>
-        <omgdi:waypoint x="750.0" y="310.0"></omgdi:waypoint>
+      <bpmndi:BPMNShape bpmnElement="assess" id="BPMNShape_assess">
+        <omgdc:Bounds height="55.0" width="105.0" x="530.0" y="239.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
+        <omgdi:waypoint x="175.0" y="266.0"></omgdi:waypoint>
+        <omgdi:waypoint x="310.0" y="266.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="18.0" width="48.0" x="880.0" y="231.0"></omgdc:Bounds>
+          <omgdc:Bounds height="16.0" width="100.0" x="219.0" y="249.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
-        <omgdi:waypoint x="1070.0" y="371.0"></omgdi:waypoint>
-        <omgdi:waypoint x="1070.0" y="475.0"></omgdi:waypoint>
-        <omgdi:waypoint x="760.0" y="475.0"></omgdi:waypoint>
-        <omgdi:waypoint x="450.0" y="475.0"></omgdi:waypoint>
-        <omgdi:waypoint x="402.0" y="475.0"></omgdi:waypoint>
+      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
+        <omgdi:waypoint x="415.0" y="266.0"></omgdi:waypoint>
+        <omgdi:waypoint x="530.0" y="266.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="18.0" width="32.0" x="750.0" y="479.0"></omgdc:Bounds>
+          <omgdc:Bounds height="16.0" width="100.0" x="449.0" y="249.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
-        <omgdi:waypoint x="331.0" y="445.0"></omgdi:waypoint>
-        <omgdi:waypoint x="331.0" y="340.0"></omgdi:waypoint>
-        <omgdi:waypoint x="680.0" y="340.0"></omgdi:waypoint>
+      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
+        <omgdi:waypoint x="635.0" y="266.0"></omgdi:waypoint>
+        <omgdi:waypoint x="760.0" y="266.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="16.0" width="100.0" x="669.0" y="249.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
-        <omgdi:waypoint x="181.0" y="340.0"></omgdi:waypoint>
-        <omgdi:waypoint x="680.0" y="340.0"></omgdi:waypoint>
+      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
+        <omgdi:waypoint x="582.0" y="294.0"></omgdi:waypoint>
+        <omgdi:waypoint x="582.0" y="358.0"></omgdi:waypoint>
+        <omgdi:waypoint x="472.0" y="358.0"></omgdi:waypoint>
+        <omgdi:waypoint x="362.0" y="358.0"></omgdi:waypoint>
+        <omgdi:waypoint x="362.0" y="294.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="16.0" width="100.0" x="450.0" y="339.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
-        <omgdi:waypoint x="750.0" y="371.0"></omgdi:waypoint>
-        <omgdi:waypoint x="750.0" y="408.0"></omgdi:waypoint>
-        <omgdi:waypoint x="586.0" y="408.0"></omgdi:waypoint>
-        <omgdi:waypoint x="450.0" y="408.0"></omgdi:waypoint>
-        <omgdi:waypoint x="331.0" y="445.0"></omgdi:waypoint>
+      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
+        <omgdi:waypoint x="362.0" y="239.0"></omgdi:waypoint>
+        <omgdi:waypoint x="362.0" y="177.0"></omgdi:waypoint>
+        <omgdi:waypoint x="582.0" y="177.0"></omgdi:waypoint>
+        <omgdi:waypoint x="777.0" y="177.0"></omgdi:waypoint>
+        <omgdi:waypoint x="777.0" y="249.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="18.0" width="100.0" x="550.0" y="409.0"></omgdc:Bounds>
+          <omgdc:Bounds height="16.0" width="100.0" x="533.0" y="161.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
     </bpmndi:BPMNPlane>

+ 33 - 0
ruoyi-system/src/main/java/com/ruoyi/branch/domain/TBranchMember.java

@@ -147,6 +147,39 @@ public class TBranchMember extends BaseEntity
     @Excel(name = "工号")
     private String staffId;
 
+    /** 申请编号 */
+    private String apNo;
+
+    /** 流程编号 */
+    private String processId;
+
+    /** 申请状态(1已审核 0未审核) */
+    private String apStatus;
+
+    public String getApStatus() {
+        return apStatus;
+    }
+
+    public void setApStatus(String apStatus) {
+        this.apStatus = apStatus;
+    }
+
+    public String getApNo() {
+        return apNo;
+    }
+
+    public void setApNo(String apNo) {
+        this.apNo = apNo;
+    }
+
+    public String getProcessId() {
+        return processId;
+    }
+
+    public void setProcessId(String processId) {
+        this.processId = processId;
+    }
+
     public Long getOldDeptId() {
         return oldDeptId;
     }

+ 14 - 2
ruoyi-system/src/main/java/com/ruoyi/branch/domain/approve/DevProcess.java

@@ -1,6 +1,7 @@
 package com.ruoyi.branch.domain.approve;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.branch.domain.TBranchMember;
 
 import java.util.Date;
 
@@ -29,13 +30,24 @@ public class DevProcess {
 
     private String apName;
 
+    /** 是否结束 */
+    private boolean isEnd;
+
+    private TBranchMember member;
+
 //    /** 隐患申请对象 */
 //    private TApproveDanger tApprove;
 //    private TApprove specApprove;
 //    private Object approveObject;
 //    private TApproveSpecModify approveSpecModify;
-    /** 是否结束 */
-    private boolean isEnd;
+
+    public TBranchMember getMember() {
+        return member;
+    }
+
+    public void setMember(TBranchMember member) {
+        this.member = member;
+    }
 
     public String getApName() {
         return apName;

+ 29 - 8
ruoyi-system/src/main/java/com/ruoyi/branch/domain/approve/DevTask.java

@@ -1,6 +1,7 @@
 package com.ruoyi.branch.domain.approve;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.branch.domain.TBranchMember;
 
 import java.util.Date;
 import java.util.List;
@@ -50,7 +51,10 @@ public class DevTask {
 //    /** 申请对象 */
 //    private TApprove specApprove;
 //    private TApproveSpecModify ApproveSpecModify;
-//    private String apNo;
+    private String apNo;
+
+    private long objId;
+    private TBranchMember member;
 //    /** 事件申请对象 */
 //    private TApproveAccident tApproveAccident;
 
@@ -135,6 +139,23 @@ public class DevTask {
 //        this.govFiles = govFiles;
 //    }
 
+
+    public long getObjId() {
+        return objId;
+    }
+
+    public void setObjId(long objId) {
+        this.objId = objId;
+    }
+
+    public TBranchMember getMember() {
+        return member;
+    }
+
+    public void setMember(TBranchMember member) {
+        this.member = member;
+    }
+
     public String getCondition() {
         return condition;
     }
@@ -159,13 +180,13 @@ public class DevTask {
 //        this.approveObject = approveObject;
 //    }
 //
-//    public String getApNo() {
-//        return apNo;
-//    }
-//
-//    public void setApNo(String apNo) {
-//        this.apNo = apNo;
-//    }
+    public String getApNo() {
+        return apNo;
+    }
+
+    public void setApNo(String apNo) {
+        this.apNo = apNo;
+    }
 
     public String getTaskId() {
         return taskId;

+ 15 - 1
ruoyi-system/src/main/resources/mapper/branch/TBranchMemberMapper.xml

@@ -35,6 +35,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="phonenumber"    column="phonenumber"    />
         <result property="ethnic"    column="ethnic"    />
         <result property="staffId"    column="staff_id"    />
+        <result property="newDeptId"    column="new_dept_id"    />
+        <result property="oldDeptId"    column="old_dept_id"    />
+        <result property="apStatus"    column="ap_status"    />
         <collection  property="roles"   javaType="java.util.List" resultMap="RoleResult" />
         <collection  property="posts"   javaType="java.util.List" resultMap="PostResult" />
     </resultMap>
@@ -57,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTBranchMemberVo">
-        select u.member_id, u.user_id, u.staff_id, u.ethnic, u.member_type, u.birthday, u.education_level, u.work_join_time, u.work_entry_time, u.party_entry_time, u.labour_entry_time, u.labour_leave_time, u.entry_time, u.leave_time, u.is_league, u.apply_time, u.form_create_time, u.current_mentor, u.plan_develop_duration, u.is_trained, u.remarks, u.del_flag, u.create_by, u.create_time, u.update_by, u.update_time, u.dept_id,
+        select u.member_id, u.new_dept_id, u.old_dept_id, u.ap_status, u.user_id, u.staff_id, u.ethnic, u.member_type, u.birthday, u.education_level, u.work_join_time, u.work_entry_time, u.party_entry_time, u.labour_entry_time, u.labour_leave_time, u.entry_time, u.leave_time, u.is_league, u.apply_time, u.form_create_time, u.current_mentor, u.plan_develop_duration, u.is_trained, u.remarks, u.del_flag, u.create_by, u.create_time, u.update_by, u.update_time, u.dept_id,
         us.NICK_NAME, us.SEX, us.PHONENUMBER,
         r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,
         p.post_id, p.post_code, p.post_name, p.post_sort, p.status as post_status
@@ -151,6 +154,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="deptId != null">dept_id,</if>
+            <if test="newDeptId != null">new_dept_id,</if>
+            <if test="oldDeptId != null">old_dept_id,</if>
+            <if test="apStatus != null">ap_status,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="memberId != null">#{memberId},</if>
@@ -180,6 +186,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="deptId != null">#{deptId},</if>
+            <if test="newDeptId != null">#{newDeptId},</if>
+            <if test="oldDeptId != null">#{oldDeptId},</if>
+            <if test="apStatus != null">#{apStatus},</if>
          </trim>
     </insert>
 
@@ -221,6 +230,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="apStatus != null">ap_status = #{apStatus},</if>
+            <if test="newDeptId != null">new_dept_id = #{newDeptId},</if>
+            <if test="newDeptId == null">new_dept_id = null,</if>
+            <if test="oldDeptId != null">old_dept_id = #{oldDeptId},</if>
+            <if test="oldDeptId == null">old_dept_id = null,</if>
         </trim>
         where member_id = #{memberId}
     </update>

+ 116 - 0
ruoyi-ui/src/api/branch/approvedanger.js

@@ -0,0 +1,116 @@
+import request from '@/utils/request'
+
+// 查询隐患申请列表
+export function listApprovedanger(query) {
+  return request({
+    url: '/ehs/approvedanger/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询我的申请详细
+export function getMyApprovelist(query) {
+  return request({
+    url: '/ehs/approvedanger/myApprovelist',
+    method: 'get',
+  params: query
+  })
+}
+
+// 查询我的待办详细
+export function getPendinglist(query) {
+  return request({
+    url: '/ehs/approvedanger/backlogList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询已办任务详细
+export function getTaskdonelist(query) {
+  return request({
+    url: '/ehs/approvedanger/doneTaskList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询流转列表详细
+export function getHistorylist(query) {
+  return request({
+    url: '/ehs/approvedanger/hiTaskList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询隐患申请详细
+export function getApprovedanger(id) {
+  return request({
+    url: '/ehs/approvedanger/' + id,
+    method: 'get'
+  })
+}
+
+//开启审批流程
+export function saveApprovedanger(data) {
+  return request({
+    url: '/ehs/approvedanger/save',
+    method: 'post',
+    data: data
+  })
+}
+
+//新增一般隐患开项
+export function saveGeneral(data) {
+  return request({
+    url: '/ehs/approvedanger/savegeneral',
+    method: 'post',
+    data: data
+  })
+}
+
+// 新增隐患申请
+export function addApprovedanger(data) {
+  return request({
+    url: '/ehs/approvedanger',
+    method: 'post',
+    data: data
+  })
+}
+
+// 处理隐患申请
+export function handleApprovedanger(data) {
+  return request({
+    url: '/ehs/approvedanger/handle',
+    method: 'put',
+    data: data
+  })
+}
+
+// 修改隐患申请
+export function updateApprovedanger(data) {
+  return request({
+    url: '/ehs/approvedanger',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除隐患申请
+export function delApprovedanger(id) {
+  return request({
+    url: '/ehs/approvedanger/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出隐患申请
+export function exportApprovedanger(query) {
+  return request({
+    url: '/ehs/approvedanger/export',
+    method: 'get',
+    params: query
+  })
+}

+ 10 - 0
ruoyi-ui/src/api/branch/member.js

@@ -1,5 +1,15 @@
 import request from '@/utils/request'
 
+handle
+// 审批
+export function handle(data) {
+  return request({
+    url: '/branch/member/handle',
+    method: 'put',
+    data: data
+  })
+}
+
 // 转移申请
 export function applyMember(data) {
   return request({

+ 62 - 0
ruoyi-ui/src/api/common/commonfile.js

@@ -0,0 +1,62 @@
+import request from '@/utils/request'
+
+// 查询通用附件列表
+export function listCommonfile(query) {
+  return request({
+    url: '/common/commonfile/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询不分页通用附件列表
+export function allFileList(query) {
+  return request({
+    url: '/common/commonfile/allFileList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询通用附件详细
+export function getCommonfile(id) {
+  return request({
+    url: '/common/commonfile/' + id,
+    method: 'get'
+  })
+}
+
+// 新增通用附件
+export function addCommonfile(data) {
+  return request({
+    url: '/common/commonfile',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改通用附件
+export function updateCommonfile(data) {
+  return request({
+    url: '/common/commonfile',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除通用附件
+export function delCommonfile(id) {
+  return request({
+    url: '/common/commonfile/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出通用附件
+export function exportCommonfile(query) {
+  return request({
+    url: '/common/commonfile/export',
+    method: 'get',
+    params: query
+  })
+}

+ 1408 - 0
ruoyi-ui/src/views/branch/approve/detail/common-detail.vue

@@ -0,0 +1,1408 @@
+<template>
+  <el-dialog  :close-on-click-modal="false"
+              title="标题"
+
+              :visible.sync="visible"
+              :append-to-body="true"
+              width="60%">
+    <!-- SAI开项管理详细 -->
+    <!--<el-form ref="form" :model="dataForm" :rules="rules" label-width="0px">-->
+      <!--<div id="apply-div">-->
+        <!--<h4>申请详情</h4>-->
+        <!--<el-descriptions title="" :column="3" border>-->
+          <!--<el-descriptions-item label="登记人部门">-->
+            <!--<el-form-item prop="applicantDept">-->
+              <!--<el-select-->
+                <!--disabled-->
+                <!--v-model="dataForm.applicantDept"-->
+                <!--placeholder="请选择部门">-->
+                <!--<el-option-->
+                  <!--v-for="dict in applicantDeptOptions"-->
+                  <!--:key="dict.dictValue"-->
+                  <!--:label="dict.dictLabel"-->
+                  <!--:value="dict.dictValue"-->
+                <!--&gt;</el-option>-->
+              <!--</el-select>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="登记人班组">-->
+            <!--<el-form-item prop="applicantTeam">-->
+              <!--<el-select-->
+                <!--disabled-->
+                <!--v-model="dataForm.applicantTeam"-->
+                <!--placeholder="请选择班组">-->
+                <!--<el-option-->
+                  <!--v-for="dict in applicantTeamOptions"-->
+                  <!--:key="dict.dictValue"-->
+                  <!--:label="dict.dictLabel"-->
+                  <!--:value="dict.dictValue"-->
+                <!--&gt;</el-option>-->
+              <!--</el-select>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="登记人">-->
+            <!--<el-form-item prop="applicant">-->
+              <!--<el-select-->
+                <!--disabled-->
+                <!--v-model="dataForm.applicant"-->
+                <!--placeholder="请选择登记人">-->
+                <!--<el-option-->
+                  <!--v-for="dict in applicantOptions"-->
+                  <!--:key="dict.dictValue"-->
+                  <!--:label="dict.dictLabel"-->
+                  <!--:value="dict.dictValue"-->
+                <!--&gt;</el-option>-->
+              <!--</el-select>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="问题描述" :span="3">-->
+            <!--<el-form-item prop="description">-->
+              <!--<el-input :disabled="applyDisabled" v-model="dataForm.description" placeholder="请输入问题描述" type="textarea" :rows="3"/>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="SAI级别" :span="1">-->
+            <!--<el-form-item prop="saiLevel">-->
+              <!--<el-select v-model="dataForm.saiLevel" placeholder="请选择SAI级别" :disabled="applyDisabled">-->
+                <!--<el-option key="1" label="1" value="1"></el-option>-->
+                <!--<el-option key="2" label="2" value="2"></el-option>-->
+                <!--<el-option key="3" label="3" value="3"></el-option>-->
+              <!--</el-select>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="SAI类别" :span="2">-->
+            <!--<el-form-item prop="category">-->
+              <!--<el-select-->
+                <!--filterable-->
+                <!--clearable-->
+                <!--v-model="dataForm.category"-->
+                <!--placeholder="请选择SAI类别"-->
+                <!--:disabled="applyDisabled">-->
+                <!--<el-option-->
+                  <!--v-for="dict in saiCategoryOptions"-->
+                  <!--:key="dict.dictValue"-->
+                  <!--:label="dict.dictLabel"-->
+                  <!--:value="dict.dictValue"-->
+                <!--&gt;</el-option>-->
+              <!--</el-select>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="附件" :span="3">-->
+            <!--<el-table :data="doc.commonfileListApply" border>-->
+              <!--<el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">-->
+                <!--<template slot-scope="scope">-->
+                  <!--<a  class="link-type"  @click="handleDownload(scope.row)">-->
+                    <!--<span>{{ scope.row.fileName }}</span>-->
+                  <!--</a>-->
+                <!--</template>-->
+              <!--</el-table-column>-->
+              <!--&lt;!&ndash;<el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />&ndash;&gt;-->
+              <!--&lt;!&ndash;<el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>&ndash;&gt;-->
+              <!--&lt;!&ndash;<el-table-column :label="$t('上传时间')" align="center" prop="createdate" :show-overflow-tooltip="true" width="120"/>&ndash;&gt;-->
+              <!--<el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">-->
+                <!--<template slot-scope="scope">-->
+                  <!--<el-button-->
+                    <!--v-if="scope.row.fileName.endsWith('pdf')||scope.row.fileName.endsWith('xlsx')||scope.row.fileName.endsWith('md')-->
+                 <!--||scope.row.fileName.endsWith('docx')||scope.row.fileName.endsWith('doc')||scope.row.fileName.endsWith('txt')-->
+                 <!--||scope.row.fileName.endsWith('jpg')||scope.row.fileName.endsWith('png')||scope.row.fileName.endsWith('csv')-->
+                 <!--||scope.row.fileName.endsWith('mp4')||scope.row.fileName.endsWith('svg')||scope.row.fileName.endsWith('dwg')-->
+                 <!--||scope.row.fileName.endsWith('flv')||scope.row.fileName.endsWith('swf')||scope.row.fileName.endsWith('gif')-->
+                 <!--||scope.row.fileName.endsWith('3gp')||scope.row.fileName.endsWith('mkv')||scope.row.fileName.endsWith('tif')"-->
+                    <!--size="mini"-->
+                    <!--type="text"-->
+                    <!--icon="el-icon-view"-->
+                    <!--@click="handleSee(scope.row)"-->
+                  <!--&gt; {{ $t('预览') }}</el-button>-->
+                  <!--<el-button-->
+                    <!--v-if="scope.row.fileName.endsWith('ppt')||scope.row.fileName.endsWith('pptx') "-->
+                    <!--size="mini"-->
+                    <!--type="text"-->
+                    <!--icon="el-icon-view"-->
+                    <!--@click="handleSeePPT(scope.row)"-->
+                  <!--&gt; {{ $t('ppt预览') }}</el-button>-->
+                  <!--<el-button-->
+                    <!--size="mini"-->
+                    <!--type="text"-->
+                    <!--icon="el-icon-download"-->
+                    <!--@click="handleDownload(scope.row)"-->
+                  <!--&gt;{{ $t('下载') }}</el-button>-->
+                <!--</template>-->
+              <!--</el-table-column>-->
+            <!--</el-table>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="隐患" :span="3">-->
+            <!--<el-radio v-model="unsafeChoice" label="1" style="margin-right: 10px;" :disabled="applyDisabled" @change="handleUnsafeChoiceChange">不安全状态</el-radio>-->
+            <!--<el-form-item prop="unsafeStatus" style="display: inline-block;">-->
+              <!--<el-select :disabled="applyDisabled" v-model="dataForm.unsafeStatus" placeholder="请选择不安全状态" style="margin-right: 20px;" clearable>-->
+                <!--<el-option-->
+                  <!--v-for="dict in unsafeStatusOptions"-->
+                  <!--:key="dict.dictValue"-->
+                  <!--:label="dict.dictLabel"-->
+                  <!--:value="dict.dictValue"-->
+                <!--&gt;</el-option>-->
+              <!--</el-select>-->
+            <!--</el-form-item>-->
+            <!--<el-radio v-model="unsafeChoice" label="2" style="margin-right: 10px;" :disabled="applyDisabled" @change="handleUnsafeChoiceChange">不安全行为</el-radio>-->
+            <!--<el-form-item prop="unsafeAction" style="display: inline-block;">-->
+              <!--<el-select :disabled="applyDisabled" v-model="dataForm.unsafeAction" placeholder="请选择不安全行为" clearable>-->
+                <!--<el-option-->
+                  <!--v-for="dict in unsafeActionOptions"-->
+                  <!--:key="dict.dictValue"-->
+                  <!--:label="dict.dictLabel"-->
+                  <!--:value="dict.dictValue"-->
+                <!--&gt;</el-option>-->
+              <!--</el-select>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="登记时间">-->
+            <!--<el-form-item prop="applyDate">-->
+              <!--<el-date-picker-->
+                <!--disabled-->
+                <!--clearable-->
+                <!--size="small"-->
+                <!--style="width: 200px"-->
+                <!--v-model="dataForm.applyDate"-->
+                <!--type="date"-->
+                <!--value-format="yyyy-MM-dd"-->
+                <!--placeholder="选择登记时间">-->
+              <!--</el-date-picker>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+        <!--</el-descriptions>-->
+      <!--</div>-->
+      <!--<div id="assess-div" v-if="showAssess">-->
+        <!--<h4>评估详情</h4>-->
+        <!--<el-descriptions title="" :column="2" border>-->
+          <!--<el-descriptions-item label="预计完成时间" :span="2">-->
+            <!--<el-form-item prop="estimateFinishDate">-->
+              <!--<el-date-picker-->
+                <!--:disabled="assessDisabled"-->
+                <!--clearable-->
+                <!--size="small"-->
+                <!--style="width: 200px"-->
+                <!--v-model="dataForm.estimateFinishDate"-->
+                <!--type="date"-->
+                <!--value-format="yyyy-MM-dd"-->
+                <!--placeholder="选择预计完成时间">-->
+              <!--</el-date-picker>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="是否录入开项系统">-->
+            <!--<el-form-item prop="isRecorded">-->
+              <!--<el-radio :disabled="assessDisabled" v-model="dataForm.isRecorded" label="1" @change="handleIsRecordedChange">是</el-radio>-->
+              <!--<el-radio :disabled="assessDisabled" v-model="dataForm.isRecorded" label="0" @change="handleIsRecordedChange">否</el-radio>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="开项编号">-->
+            <!--<el-form-item prop="recordNo">-->
+              <!--<el-input v-model="dataForm.recordNo" placeholder="请输入开项编号" :disabled="recordNoDisabled" style="width: 200px;"/>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="采取的措施" :span="2">-->
+            <!--<el-form-item prop="reaction">-->
+              <!--<el-input :disabled="assessDisabled" v-model="dataForm.reaction" placeholder="请输入采取的措施" type="textarea" :rows="3"/>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="整改负责人">-->
+            <!--<el-form-item prop="executor">-->
+              <!--<el-select-->
+                <!--filterable-->
+                <!--:disabled="assessDisabled"-->
+                <!--clearable-->
+                <!--v-model="dataForm.executor"-->
+                <!--placeholder="请选择整改负责人">-->
+                <!--<el-option-->
+                  <!--v-for="dict in executorOptions"-->
+                  <!--:key="dict.dictValue"-->
+                  <!--:label="dict.dictLabel"-->
+                  <!--:value="dict.dictValue"-->
+                <!--&gt;</el-option>-->
+              <!--</el-select>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="验证人">-->
+            <!--<el-form-item prop="inspector1" style="display: inline-block;">-->
+              <!--<el-input v-model="inspector1Name" placeholder="" disabled style="width: 180px; margin-right: 10px;"/>-->
+              <!--&lt;!&ndash;<el-select&ndash;&gt;-->
+              <!--&lt;!&ndash;filterable&ndash;&gt;-->
+              <!--&lt;!&ndash;:disabled="assessDisabled"&ndash;&gt;-->
+              <!--&lt;!&ndash;clearable&ndash;&gt;-->
+              <!--&lt;!&ndash;v-model="inspector1"&ndash;&gt;-->
+              <!--&lt;!&ndash;placeholder="请选择验证人"&ndash;&gt;-->
+              <!--&lt;!&ndash;style="margin-right: 10px;">&ndash;&gt;-->
+              <!--&lt;!&ndash;<el-option&ndash;&gt;-->
+              <!--&lt;!&ndash;v-for="dict in applicantOptions"&ndash;&gt;-->
+              <!--&lt;!&ndash;:key="dict.dictValue"&ndash;&gt;-->
+              <!--&lt;!&ndash;:label="dict.dictLabel"&ndash;&gt;-->
+              <!--&lt;!&ndash;:value="dict.dictValue"&ndash;&gt;-->
+              <!--&lt;!&ndash;&gt;</el-option>&ndash;&gt;-->
+              <!--&lt;!&ndash;</el-select>&ndash;&gt;-->
+            <!--</el-form-item>-->
+            <!--<el-form-item prop="inspector2" style="display: inline-block;">-->
+              <!--<el-select-->
+                <!--filterable-->
+                <!--:disabled="assessDisabled"-->
+                <!--clearable-->
+                <!--v-model="inspector2"-->
+                <!--placeholder="请选择验证人">-->
+                <!--<el-option-->
+                  <!--v-for="dict in inspectorOptions"-->
+                  <!--:key="dict.dictValue"-->
+                  <!--:label="dict.dictLabel"-->
+                  <!--:value="dict.dictValue"-->
+                <!--&gt;</el-option>-->
+              <!--</el-select>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="是否需要VE验证" :span="2">-->
+            <!--<el-form-item prop="needVe">-->
+              <!--<el-radio :disabled="assessDisabled" v-model="dataForm.needVe" label="1" @change="handleNeedVeChange">是</el-radio>-->
+              <!--<el-radio :disabled="assessDisabled" v-model="dataForm.needVe" label="0" @change="handleNeedVeChange">否</el-radio>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="VE验证条款" :span="2">-->
+            <!--<el-form-item prop="veItemsList">-->
+              <!--<el-checkbox-group v-model="veItemsList" :disabled="veItemsDisabled">-->
+                <!--<el-checkbox label="Level3、Level4的时间纠正措施"></el-checkbox>-->
+                <!--<el-checkbox label="HIRA的补充措施"></el-checkbox>-->
+                <!--<el-checkbox label="整改措施为程序的制定、更新"></el-checkbox>-->
+                <!--<el-checkbox label="整改措施有关培训"></el-checkbox>-->
+                <!--<el-checkbox label="整改措施为增加新设备、设施、部件,或对设备、设施进行改造"></el-checkbox><br/>-->
+                <!--<el-checkbox label="其它" @change="handleVeItemOtherVeChange"></el-checkbox>-->
+                <!--<el-form-item prop="veItemOther" style="display: inline-block;">-->
+                  <!--<el-input v-model="dataForm.veItemOther" placeholder="请输入" :disabled="veItemOtherDisabled" style="display: inline-block; width: 200px; margin-left: 10px;"/>-->
+                <!--</el-form-item>-->
+              <!--</el-checkbox-group>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="备注" :span="3">-->
+            <!--<el-form-item prop="remarksAssess">-->
+              <!--<el-input :disabled="assessDisabled" v-model="dataForm.remarksAssess" placeholder="请输入备注" type="textarea" :rows="3"/>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+        <!--</el-descriptions>-->
+      <!--</div>-->
+      <!--<div id="execute-div" v-if="showExecute">-->
+        <!--<h4>执行详情</h4>-->
+        <!--<el-descriptions title="" border :column="1">-->
+          <!--<el-descriptions-item label="附件">-->
+            <!--<span v-if="!executeDisabled">-->
+              <!--<el-upload-->
+                <!--ref="doc"-->
+                <!--:limit="50"-->
+                <!--:headers="doc.headers"-->
+                <!--:action="doc.url + '?pType=saiExecute&pId=' + doc.pId"-->
+                <!--:disabled="doc.isUploading"-->
+                <!--:on-progress="handleFileDocProgress"-->
+                <!--:on-success="handleFileDocSuccess"-->
+                <!--:auto-upload="true"-->
+                <!--drag-->
+              <!--&gt;-->
+              <!--<i class="el-icon-upload"></i>-->
+              <!--<div class="el-upload__text">-->
+                <!--{{ $t('将文件拖到此处,或') }}-->
+                <!--<em>{{ $t('点击上传') }}</em>-->
+              <!--</div>-->
+            <!--</el-upload>-->
+            <!--</span>-->
+            <!--<el-table :data="doc.commonfileListExecute" border>-->
+              <!--<el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">-->
+                <!--<template slot-scope="scope">-->
+                  <!--<a  class="link-type"  @click="handleDownload(scope.row)">-->
+                    <!--<span>{{ scope.row.fileName }}</span>-->
+                  <!--</a>-->
+                <!--</template>-->
+              <!--</el-table-column>-->
+              <!--<el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />-->
+              <!--<el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>-->
+              <!--<el-table-column :label="$t('上传时间')" align="center" prop="createdate" :show-overflow-tooltip="true" width="120"/>-->
+              <!--<el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">-->
+                <!--<template slot-scope="scope">-->
+                  <!--<el-button-->
+                    <!--v-if="scope.row.fileName.endsWith('pdf')||scope.row.fileName.endsWith('xlsx')||scope.row.fileName.endsWith('md')-->
+                 <!--||scope.row.fileName.endsWith('docx')||scope.row.fileName.endsWith('doc')||scope.row.fileName.endsWith('txt')-->
+                 <!--||scope.row.fileName.endsWith('jpg')||scope.row.fileName.endsWith('png')||scope.row.fileName.endsWith('csv')-->
+                 <!--||scope.row.fileName.endsWith('mp4')||scope.row.fileName.endsWith('svg')||scope.row.fileName.endsWith('dwg')-->
+                 <!--||scope.row.fileName.endsWith('flv')||scope.row.fileName.endsWith('swf')||scope.row.fileName.endsWith('gif')-->
+                 <!--||scope.row.fileName.endsWith('3gp')||scope.row.fileName.endsWith('mkv')||scope.row.fileName.endsWith('tif')"-->
+                    <!--size="mini"-->
+                    <!--type="text"-->
+                    <!--icon="el-icon-view"-->
+                    <!--@click="handleSee(scope.row)"-->
+                  <!--&gt; {{ $t('预览') }}</el-button>-->
+                  <!--<el-button-->
+                    <!--v-if="scope.row.fileName.endsWith('ppt')||scope.row.fileName.endsWith('pptx') "-->
+                    <!--size="mini"-->
+                    <!--type="text"-->
+                    <!--icon="el-icon-view"-->
+                    <!--@click="handleSeePPT(scope.row)"-->
+                  <!--&gt; {{ $t('ppt预览') }}</el-button>-->
+                  <!--<el-button-->
+                    <!--size="mini"-->
+                    <!--type="text"-->
+                    <!--icon="el-icon-download"-->
+                    <!--@click="handleDownload(scope.row)"-->
+                  <!--&gt;{{ $t('下载') }}</el-button>-->
+                  <!--<el-button-->
+                    <!--size="mini"-->
+                    <!--type="text"-->
+                    <!--icon="el-icon-delete"-->
+                    <!--@click="handleDeleteDoc(scope.row)"-->
+                    <!--v-if="!executeDisabled"-->
+                  <!--&gt;{{ $t('删除') }}</el-button>-->
+                <!--</template>-->
+              <!--</el-table-column>-->
+            <!--</el-table>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="备注" :span="3">-->
+            <!--<el-form-item prop="remarksExecute">-->
+              <!--<el-input :disabled="executeDisabled" v-model="dataForm.remarksExecute" placeholder="请输入备注" type="textarea" :rows="3"/>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="驳回历史">-->
+            <!--<el-table :data="rejectList" border v-loading="historyLoading" style="width: 100%;">-->
+              <!--<el-table-column prop="result" header-align="center" align="center"-->
+                               <!--:label="$t('验证结果')"></el-table-column>-->
+              <!--<el-table-column prop="comment" header-align="center" align="center"-->
+                               <!--:label="$t('备注')"></el-table-column>-->
+              <!--<el-table-column prop="userName" header-align="center" align="center" :label="$t('验证人')"></el-table-column>-->
+              <!--<el-table-column prop="taskEndTime" header-align="center" align="center"-->
+                               <!--:label="$t('提交日期')"></el-table-column>-->
+            <!--</el-table>-->
+          <!--</el-descriptions-item>-->
+        <!--</el-descriptions>-->
+      <!--</div>-->
+      <!--<div id="inspect-div" v-if="showInspect">-->
+        <!--<h4>验收详情</h4>-->
+        <!--<el-descriptions title="" :column="3" border>-->
+          <!--<el-descriptions-item label="VC/VE验证成果" :span="3">-->
+            <!--<el-form-item prop="veResult">-->
+              <!--<el-radio :disabled="inspectDisabled" v-model="dataForm.veResult" label="1">合格</el-radio>-->
+              <!--<el-radio :disabled="inspectDisabled" v-model="dataForm.veResult" label="0">不合格</el-radio>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="备注" :span="3">-->
+            <!--<el-form-item prop="remarks">-->
+              <!--<el-input :disabled="inspectDisabled" v-model="dataForm.remarks" placeholder="请输入备注" type="textarea" :rows="3"/>-->
+            <!--</el-form-item>-->
+          <!--</el-descriptions-item>-->
+          <!--<el-descriptions-item label="附件" :span="3">-->
+            <!--<span v-if="!inspectDisabled">-->
+              <!--<el-upload-->
+                <!--ref="doc"-->
+                <!--:limit="50"-->
+                <!--:headers="doc.headers"-->
+                <!--:action="doc.url + '?pType=saiInspect&pId=' + doc.pId"-->
+                <!--:disabled="doc.isUploading"-->
+                <!--:on-progress="handleFileDocProgress"-->
+                <!--:on-success="handleFileDocSuccess"-->
+                <!--:auto-upload="true"-->
+                <!--drag-->
+              <!--&gt;-->
+              <!--<i class="el-icon-upload"></i>-->
+              <!--<div class="el-upload__text">-->
+                <!--{{ $t('将文件拖到此处,或') }}-->
+                <!--<em>{{ $t('点击上传') }}</em>-->
+              <!--</div>-->
+            <!--</el-upload>-->
+            <!--</span>-->
+            <!--<el-table :data="doc.commonfileListInspect" border>-->
+              <!--<el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">-->
+                <!--<template slot-scope="scope">-->
+                  <!--<a  class="link-type"  @click="handleDownload(scope.row)">-->
+                    <!--<span>{{ scope.row.fileName }}</span>-->
+                  <!--</a>-->
+                <!--</template>-->
+              <!--</el-table-column>-->
+              <!--<el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />-->
+              <!--<el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>-->
+              <!--<el-table-column :label="$t('上传时间')" align="center" prop="createdate" :show-overflow-tooltip="true" width="120"/>-->
+              <!--<el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">-->
+                <!--<template slot-scope="scope">-->
+                  <!--<el-button-->
+                    <!--v-if="scope.row.fileName.endsWith('pdf')||scope.row.fileName.endsWith('xlsx')||scope.row.fileName.endsWith('md')-->
+                 <!--||scope.row.fileName.endsWith('docx')||scope.row.fileName.endsWith('doc')||scope.row.fileName.endsWith('txt')-->
+                 <!--||scope.row.fileName.endsWith('jpg')||scope.row.fileName.endsWith('png')||scope.row.fileName.endsWith('csv')-->
+                 <!--||scope.row.fileName.endsWith('mp4')||scope.row.fileName.endsWith('svg')||scope.row.fileName.endsWith('dwg')-->
+                 <!--||scope.row.fileName.endsWith('flv')||scope.row.fileName.endsWith('swf')||scope.row.fileName.endsWith('gif')-->
+                 <!--||scope.row.fileName.endsWith('3gp')||scope.row.fileName.endsWith('mkv')||scope.row.fileName.endsWith('tif')"-->
+                    <!--size="mini"-->
+                    <!--type="text"-->
+                    <!--icon="el-icon-view"-->
+                    <!--@click="handleSee(scope.row)"-->
+                  <!--&gt; {{ $t('预览') }}</el-button>-->
+                  <!--<el-button-->
+                    <!--v-if="scope.row.fileName.endsWith('ppt')||scope.row.fileName.endsWith('pptx') "-->
+                    <!--size="mini"-->
+                    <!--type="text"-->
+                    <!--icon="el-icon-view"-->
+                    <!--@click="handleSeePPT(scope.row)"-->
+                  <!--&gt; {{ $t('ppt预览') }}</el-button>-->
+                  <!--<el-button-->
+                    <!--size="mini"-->
+                    <!--type="text"-->
+                    <!--icon="el-icon-download"-->
+                    <!--@click="handleDownload(scope.row)"-->
+                  <!--&gt;{{ $t('下载') }}</el-button>-->
+                  <!--<el-button-->
+                    <!--size="mini"-->
+                    <!--type="text"-->
+                    <!--icon="el-icon-delete"-->
+                    <!--@click="handleDeleteDoc(scope.row)"-->
+                    <!--v-if="!inspectDisabled"-->
+                  <!--&gt;{{ $t('删除') }}</el-button>-->
+                <!--</template>-->
+              <!--</el-table-column>-->
+            <!--</el-table>-->
+          <!--</el-descriptions-item>-->
+        <!--</el-descriptions>-->
+      <!--</div>-->
+    <!--</el-form>-->
+    <!-- 流转详情 -->
+    <!--<div>-->
+    <!--<h4>流转详情</h4>-->
+    <!--<el-table :data="historyList" border v-loading="historyLoading" style="width: 100%;">-->
+    <!--<el-table-column prop="taskName" header-align="center" align="center"-->
+    <!--:label="$t('流程进度')"></el-table-column>-->
+    <!--<el-table-column prop="comment" header-align="center" align="center"-->
+    <!--:label="$t('审批意见')"></el-table-column>-->
+    <!--<el-table-column prop="userName" header-align="center" align="center" :label="$t('姓名')"></el-table-column>-->
+    <!--<el-table-column prop="taskCreateTime" header-align="center" align="center"-->
+    <!--:label="$t('开始时间')"></el-table-column>-->
+    <!--<el-table-column prop="taskEndTime" header-align="center" align="center"-->
+    <!--:label="$t('结束时间')"></el-table-column>-->
+    <!--</el-table>-->
+    <!--</div>-->
+    <!-- 流程操作 -->
+    <div slot="footer" class="dialog-footer">
+      <!-- 当前登录用户为处理人(之一)或张力飞 -->
+      <!--<span v-if="dataForm.handler.indexOf(loginStaffInfo.userId) != -1 || loginStaffInfo.userId == '20276'" style="margin-right: 10px;">-->
+        <!--<el-button v-if="taskName != null && dataForm.applyStatus != 4 && dataForm.applyStatus != 5" @click="dataFormSave()">{{ $t('保存') }}</el-button>-->
+        <!--<el-button type="success" v-if="taskName != null && dataForm.veResult != '0'" @click="dataFormSubmit(1)">{{ $t('通过') }}</el-button>-->
+        <!--<el-button type="danger" v-if="taskName == '验收' && dataForm.veResult == '0'" @click="dataFormSubmit(2)">{{ $t('驳回') }}</el-button>-->
+        <!--<el-button type="info" v-if="taskName == '评估'" @click="dataFormSubmit(0)">{{ $t('中止') }}</el-button>-->
+      <!--</span>-->
+      <el-button type="success" @click="dataFormSubmit(1)">通过</el-button>
+      <el-button type="danger" @click="dataFormSubmit(0)">驳回</el-button>
+      <el-button @click="visible = false">返回</el-button>
+    </div>
+    <!-- 预览对话框 -->
+    <!--<el-dialog  :close-on-click-modal="false"  v-loading="loadingFlash"     element-loading-background="rgba(0,0,0,0.2)"                 v-dialogDrag :title="pdf.title" :visible.sync="pdf.open"  width="1300px" :center="true" append-to-body>-->
+      <!--<div style="margin-top: -60px;float: right;margin-right: 40px;">-->
+        <!--<el-button size="mini" type="text" @click="openPdf">新页面打开PDF</el-button></div>-->
+      <!--<div style="margin-top: -30px" >-->
+        <!--<iframe id="iFrame" class="iframe-html" :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px" v-if="ppt"></iframe>-->
+      <!--</div>-->
+      <!--<div style="padding: 30px; width: 100%; height: 100%;" >-->
+        <!--<el-carousel class="" ref="carousel"  arrow="always"  v-if="pptView"-->
+                     <!--height="700px"  trigger="click" :autoplay="false" indicator-position="outside">-->
+          <!--<el-carousel-item class="lun_img" v-for="item in imgs" v-bind:key="item" >-->
+            <!--<img :src="item" width="100%" height="100%" object-fit="cover" />-->
+          <!--</el-carousel-item>-->
+        <!--</el-carousel>-->
+      <!--</div>-->
+    <!--</el-dialog>-->
+  </el-dialog>
+</template>
+
+<script>
+  import { getToken } from "@/utils/auth";
+  import { handle } from "@/api/branch/member";
+  // import { updateApply, getApply, handleApply } from "@/api/production/apply";
+  // import { listFile } from "@/api/production/saiApproveFile";
+  // import { getHistorylist } from "@/api/ehs/approvedanger";
+  // import { listUserPost } from "@/api/system/user";
+  // import { treeselect, listDept } from "@/api/system/dept";
+  // import { listSaiInspectors, listSaiExecutors, listStaffmgrByDeptAndTeam, getLoginStaffInfo } from "@/api/plant/staffmgr";
+  // import { allFileList, delCommonfile } from "@/api/common/commonfile";
+  // import { categoryList } from "@/api/production/category";
+
+  export default {
+    name: "sai-apply-detail",
+    data() {
+      var validateInspector1 = (rule, value, callback) => {
+        if (this.inspector1 == null) {
+          return callback(new Error('验证人不能为空'));
+        } else {
+          return callback();
+        }
+      };
+      var validateInspector2 = (rule, value, callback) => {
+        if (this.inspector2 == null) {
+          return callback(new Error('验证人不能为空'));
+        } else {
+          return callback();
+        }
+      };
+      var validateVeItemsList = (rule, value, callback) => {
+        if (this.dataForm.needVe == '1') {
+          if (this.veItemsList.length == 0) {
+            return callback(new Error('VE验证条款不能为空'));
+          } else {
+            return callback();
+          }
+        } else {
+          return callback();
+        }
+      };
+      var validateRecordNo = (rule, value, callback) => {
+        if (this.dataForm.isRecorded == '1') {
+          if (this.dataForm.recordNo == null) {
+            return callback(new Error('开项编号不能为空'));
+          } else {
+            return callback();
+          }
+        } else {
+          return callback();
+        }
+      };
+      return {
+        // SAI类别列表
+        saiCategoryOptions: [],
+        // 当前登录员工
+        loginStaffInfo: {},
+        //图片集合   打开关闭按钮 等等
+        imgs:[],
+        jpgList:[],
+        ppt:false,
+        pptView:false,
+        loadingFlash:false,
+        doc: {
+          file: "",
+          // 是否显示弹出层(报告附件)
+          open: false,
+          // 弹出层标题(报告附件)
+          title: "",
+          // 是否禁用上传
+          isUploading: false,
+          // 是否更新已经存在的用户数据
+          updateSupport: 0,
+          // 报告附件上传位置编号
+          ids: 0,
+          // 设置上传的请求头部
+          headers: { Authorization: "Bearer " + getToken() },
+          // 上传的地址
+          url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
+          commonfileList: null,
+          commonfileListApply: null,
+          commonfileListExecute: null,
+          commonfileListInspect: null,
+          queryParams: {
+            pId: null,
+            pType: 'saiApply'
+          },
+          pType: 'saiApply',
+          pId: null
+        },
+        // pdf文件参数
+        pdf : {
+          title: '',
+          pdfUrl: '',
+          numPages: null,
+          open: false,
+          pageNum: 1,
+          pageTotalNum: 1,
+          loadedRatio: 0,
+        },
+        visible: false,
+        //流转列表
+        historyList: [],
+        rejectList: [],
+        historyLoading: true,
+        taskName: '',
+        rules: {
+          // estimateFinishDate: [
+          //   { required: true, message: this.$t('预计完成时间') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // isRecorded: [
+          //   { required: true, message: this.$t('是否录入开项系统') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // reaction: [
+          //   { required: true, message: this.$t('采取的措施') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // executor: [
+          //   { required: true, message: this.$t('整改负责人') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // inspector1: [
+          //   { required: true, message: this.$t('验证人1') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // inspector2: [
+          //   { required: true, message: this.$t('验证人2') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // needVe: [
+          //   { required: true, message: this.$t('是否需要VE验证') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // recordNo: [
+          //   { validator: validateRecordNo, trigger: 'change' }
+          // ],
+          // veItemsList: [
+          //   { validator: validateVeItemsList, trigger: 'change' }
+          // ],
+          // inspector1: [
+          //   { validator: validateInspector1, trigger: 'change' }
+          // ],
+          // inspector2: [
+          //   { validator: validateInspector2, trigger: 'change' }
+          // ],
+          // veResult: [
+          //   { required: true, message: this.$t('VC/VE验证成果') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // remarks: [
+          //   { required: true, message: this.$t('备注') + this.$t('不能为空'), trigger: "change" }
+          // ],
+        },
+        // SAI开项管理对象
+        dataForm: {
+          saiApplyId: null,
+          deptId: null,
+          applyStatus: null,
+          apNo: null,
+          processId: null,
+          applicant: null,
+          assessor: null,
+          executor: null,
+          inspectors: null,
+          applicantDept: null,
+          applicantTeam: null,
+          description: null,
+          unsafeStatus: null,
+          unsafeAction: null,
+          applyDate: null,
+          taskId: null,
+          handler: null,
+          taskName: null,
+          estimateFinishDate: null,
+          actualFinishDate: null,
+          isRecorded: null,
+          recordNo: null,
+          reaction: null,
+          needVe: null,
+          veItems: null,
+          veResult: null,
+          veItemOther: null,
+          remarksAssess: null,
+          remarksExecute: null,
+        },
+        taskForm: {
+          comment: '',
+          taskId: '',
+          files: '',
+          businessKey: '',
+          saiApply: null,
+        },
+        showAssess: false,
+        showExecute: false,
+        showInspect: false,
+        // 登记人班组字典
+        applicantTeamOptions: [],
+        // 登记人部门列表
+        applicantDeptOptions: [],
+        // 登记人列表
+        applicantOptions: [],
+        inspectorOptions: [],
+        executorOptions: [],
+        // 不安全状态字典
+        unsafeStatusOptions: [],
+        // 不安全行为字典
+        unsafeActionOptions: [],
+        // 不安全状态/行为选项
+        unsafeChoice: null,
+        // 是否禁用开项编号输入框
+        recordNoDisabled: true,
+        // 是否禁用VE验证条款
+        veItemsDisabled: true,
+        // 是否禁用VE验证条款(其它)
+        veItemOtherDisabled: true,
+        // 是否禁用VE验证条款数组
+        veItemsList: [],
+        // 验证人1
+        inspector1: null,
+        inspector1Name: null,
+        // 验证人2
+        inspector2: null,
+        // 是否禁用不安全状态下拉框
+        unsafeStatusDisabled: false,
+        // 是否禁用不安全行为下拉框
+        unsafeActionDisabled: true,
+        // 是否禁用申请
+        applyDisabled: false,
+        // 是否禁用评估
+        assessDisabled: false,
+        // 是否禁用执行
+        executeDisabled: false,
+        // 是否禁用验收
+        inspectDisabled: false,
+      }
+    },
+    methods: {
+      // 初始化
+      init(id, taskId, processId, taskName) {
+        this.visible = true;
+        this.taskForm.objId = id;
+        this.taskForm.taskId = taskId;
+        this.taskForm.taskName = taskName;
+        // this.doc.id = id;
+        // this.doc.queryParams.pId = id;
+        // this.doc.pId = id;
+        // // 表单重置
+        // this.reset();
+        // this.inspector1 = null;
+        // this.inspector2 = null;
+        // this.veItemsList = [];
+        // this.dataForm = {};
+        // this.historyList = [];
+        // this.dataForm.saiApplyId = id || 0;
+        // this.form.id = id || 0;
+        // this.taskName = taskName;
+        // this.taskForm.taskId = taskId;
+        // this.taskForm.businessKey = id;
+        // this.dataForm.processId = processId;
+        // // 查询SAI开项管理详细
+        // getApply(id).then(response => {
+        //   this.dataForm = response.data;
+        //   this.getFileList()
+        //   this.inspector1 = this.dataForm.applicant;
+        //   if (this.dataForm.inspectors != null) {
+        //     let inspectors = this.dataForm.inspectors.split(",");
+        //     this.inspector1 = inspectors[0];
+        //     this.inspector2 = inspectors[1];
+        //   }
+        //   // 加载登记人列表
+        //   this.listStaffmgrByDeptAndTeam(null, null);
+        //   if (this.dataForm.veItems != null) {
+        //     let veItems = this.dataForm.veItems.split(",");
+        //     for (let i = 0; i < veItems.length; i++) {
+        //       this.veItemsList.push(veItems[i]);
+        //     }
+        //   }
+        //   if (this.dataForm.isRecorded != null) {
+        //     this.dataForm.isRecorded = this.dataForm.isRecorded.toString();
+        //   }
+        //   if (this.dataForm.needVe != null) {
+        //     this.dataForm.needVe = this.dataForm.needVe.toString();
+        //   }
+        //   this.handleIsRecordedChange();
+        //   this.handleNeedVeChange();
+        //   this.handleVeItemOtherVeChange();
+        //   this.handleUnsafeChoiceChange();
+        //   if (this.dataForm.unsafeStatus != null && this.dataForm.unsafeStatus != "") {
+        //     this.unsafeChoice = '1';
+        //     this.dataForm.unsafeStatus = this.dataForm.unsafeStatus.toString();
+        //   }
+        //   if (this.dataForm.unsafeAction != null && this.dataForm.unsafeAction != "") {
+        //     this.unsafeChoice = '2';
+        //     this.dataForm.unsafeAction = this.dataForm.unsafeAction.toString();
+        //   }
+        //   if (this.dataForm.category != null && this.dataForm.category != "") {
+        //     this.dataForm.category = Number(this.dataForm.category);
+        //   }
+        //   if (this.dataForm.veResult == null) {
+        //     this.dataForm.veResult = '1';
+        //   }
+        //   let applyStatus = this.dataForm.applyStatus;
+        //   console.log(applyStatus);
+        //   switch (applyStatus) {
+        //     case 1:
+        //       this.showAssess = true;
+        //       this.assessDisabled = false;
+        //       this.applyDisabled = false;
+        //       break;
+        //     case 2:
+        //       this.showAssess = true;
+        //       this.showExecute = true;
+        //       this.applyDisabled = true;
+        //       this.assessDisabled = true;
+        //       this.executeDisabled = false;
+        //       this.recordNoDisabled = true;
+        //       this.veItemsDisabled = true;
+        //       this.veItemOtherDisabled = true;
+        //       this.dataForm.veResult = '1';
+        //       break;
+        //     case 3:
+        //       this.showAssess = true;
+        //       this.showExecute = true;
+        //       this.showInspect = true;
+        //       this.applyDisabled = true;
+        //       this.assessDisabled = true;
+        //       this.executeDisabled = true;
+        //       this.veItemsDisabled = true;
+        //       this.veItemOtherDisabled = true;
+        //       break;
+        //     case 4:
+        //       this.showAssess = true;
+        //       this.showExecute = true;
+        //       this.showInspect = true;
+        //       this.applyDisabled = true;
+        //       this.assessDisabled = true;
+        //       this.executeDisabled = true;
+        //       this.inspectDisabled = true;
+        //       break;
+        //     case 5:
+        //       this.showAssess = false;
+        //       this.assessDisabled = true;
+        //       break;
+        //   }
+        // });
+        // 查询流转详情
+        // getHistorylist({processId: processId}).then(response => {
+        //   this.historyList = response.rows;
+        //   this.rejectList = [];
+        //   for (let i = 0; i < response.rows.length; i++) {
+        //     if(response.rows[i].comment != null) {
+        //       if (response.rows[i].comment.indexOf("驳回") != -1) {
+        //         let reject = {};
+        //         reject.result = response.rows[i].comment.split(",")[0];
+        //         reject.comment = response.rows[i].comment.split(",")[1];
+        //         reject.userName = response.rows[i].userName;
+        //         reject.taskEndTime = response.rows[i].taskEndTime;
+        //         this.rejectList.push(reject);
+        //       }
+        //     }
+        //
+        //   }
+        //   this.historyLoading = false
+        // });
+        // // 加载登记人班组字典
+        // this.getDicts("TEAM_DIVIDE").then(response => {
+        //   this.applicantTeamOptions = response.data;
+        // });
+        // // 加载登记人部门列表
+        // this.getApplicantDeptOptions();
+        //
+        // // 加载整改负责人列表
+        // this.listSaiInspectors();
+        // // 加载执行人列表
+        // this.listSaiExecutors();
+        // // 加载不安全状态字典
+        // this.getDicts("SAI_UNSAFE_STATUS").then(response => {
+        //   this.unsafeStatusOptions = response.data;
+        // });
+        // // 加载不安全行为字典
+        // this.getDicts("SAI_UNSAFE_ACTION").then(response => {
+        //   this.unsafeActionOptions = response.data;
+        // });
+        // // 加载当前登录员工信息
+        // this.getLoginStaffInfo();
+        // // 加载SAI类别字典
+        // this.getCategoryList();
+      },
+      /** 获取SAI类别列表数据 */
+      getCategoryList() {
+        this.saiCategoryOptions = [];
+        categoryList().then(response => {
+          let data = response.data;
+          for (let i = 0; i < data.length; i++) {
+            if (data[i].saiCategoryName != null && data[i].saiCategoryName != "") {
+              this.saiCategoryOptions.push({
+                dictLabel: data[i].saiCategoryName,
+                dictValue: data[i].saiCategoryId
+              });
+            }
+          }
+        });
+      },
+      /** 加载当前登录员工信息 */
+      getLoginStaffInfo() {
+        getLoginStaffInfo().then(response => {
+          let staff = response.data;
+          if (staff != null) {
+            this.loginStaffInfo = response.data;
+          }
+        });
+      },
+      /** 文件下载处理 */
+      handleDownload(row) {
+        var name = row.fileName;
+        var url = row.fileUrl;
+        var suffix = url.substring(url.lastIndexOf("."), url.length);
+        const a = document.createElement('a')
+        a.setAttribute('download', name)
+        a.setAttribute('target', '_blank')
+        a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+        a.click()
+      },
+      /** 报告附件按钮操作 */
+      handleDoc(row) {
+        this.doc.id = row.saiApplyId;
+        this.doc.title = "附件";
+        this.doc.open = true;
+        this.doc.queryParams.pId = row.saiApplyId
+        this.doc.pId = row.saiApplyId
+        this.getFileList()
+        this.$nextTick(() => {
+          this.$refs.doc.clearFiles()
+        })
+      },
+      getFileList() {
+        listFile({
+          approveId: this.dataForm.saiApplyId
+        }).then(response => {
+          this.doc.commonfileListApply = response;
+        });
+        allFileList({
+          pId: this.doc.queryParams.pId,
+          pType: "saiExecute"
+        }).then(response => {
+          this.doc.commonfileListExecute = response;
+        });
+        allFileList({
+          pId: this.doc.queryParams.pId,
+          pType: "saiInspect"
+        }).then(response => {
+          this.doc.commonfileListInspect = response;
+        });
+      },
+      /** 附件上传中处理 */
+      handleFileDocProgress(event, file, fileList) {
+        this.doc.file = file;
+        this.doc.isUploading = true;
+      },
+      /** 附件上传成功处理 */
+      handleFileDocSuccess(response, file, fileList) {
+        // this.doc.isUploading = false;
+        // this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        // this.getFileList()
+      },
+      /** 删除按钮操作 */
+      handleDeleteDoc(row) {
+        // const ids = row.id || this.ids;
+        // this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+        //   confirmButtonText: this.$t('确定'),
+        //   cancelButtonText: this.$t('取消'),
+        //   type: "warning"
+        // }).then(function() {
+        //   return delCommonfile(ids);
+        // }).then(() => {
+        //   this.getFileList();
+        //   this.msgSuccess(this.$t('删除成功'));
+        // })
+      },
+      //文件预览
+      openPdf(){
+        //ppt就跳路由预览,office就直接打开文件新页面
+        const didi={ imgs:this.imgs}
+        if( this.pptView==true&&this.ppt==false){
+          let routeUrl = this.$router.resolve({
+            path: "/cpms/index.html#/pptyulan",
+            query:didi
+          });
+          window.open("/cpms/index.html#/pptyulan?id=" + this.pdf.pdfUrl, '_blank')
+        }else {
+          window.open(this.pdf.pdfUrl)
+        }
+      },
+      handleSeePPT (row){
+        //ppt预览
+        this.loadingFlash=true
+        this.pdf.open =true
+        this.pdf.title = row.fileName
+        this.pdf.pdfUrl = row.fileUrl
+        this.pptView=true
+        this.ppt=false
+        const formatDate =new FormData();
+        formatDate.append("filepath",row.fileUrl)
+
+        //调用文件预览api
+        let res= this.officeConvert.pptConvertCommon(formatDate)
+
+        //查看接受的全局方法的返回结果 console.log(res)
+        //利用.then方法接受Promise对象
+
+        res.then((result)=>{
+          //关闭加载中
+          this.loadingFlash=false
+
+          //成功时直接给地址
+          this.videoList = result.data.imagePathList
+          //将返回的地址集合遍历添加到绑定的数组中
+          this.imgs=[]
+          for (var key=0;key<this.videoList.length;key++) {
+            this.imgs.push( process.env.VUE_APP_BASE_API+  this.videoList[key]  );
+          }
+        }).catch(result => {
+
+          //请求失败,关闭loading,pdf地址直接为为空,不显示
+          this.pdf.pdfUrl =""
+          this.loadingFlash = false;
+        })
+      },
+      // handleSee (row){
+      //   //office预览
+      //   this.loadingFlash=true
+      //   this.pdf.open =true
+      //   this.pdf.title = row.fileName
+      //   this.pdf.pdfUrl =""
+      //
+      //   this.pptView=false
+      //   this.ppt=true
+      //   //如果是PDF等直接可以打开的就不调接口,否则调用接口
+      //   if(row.fileName.endsWith('pdf')){
+      //     this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+      //     this.loadingFlash=false
+      //   }
+      //   else{
+      //     const formatDate =new FormData();
+      //     formatDate.append("filepath",row.fileUrl)
+      //
+      //     //调用文件预览api
+      //     let res= this.officeConvert.officeConvertCommon(formatDate)
+      //
+      //
+      //     //查看接受的全局方法的返回结果 console.log(res)
+      //     //利用.then方法接受Promise对象
+      //     res.then((result)=>{
+      //       //关闭加载中
+      //       this.loadingFlash=false
+      //
+      //       if(result.msg.includes("csv")){
+      //         this.pdf.pdfUrl =process.env.VUE_APP_BASE_API+ result.data
+      //         this.$alert(result.msg, this.$t('检查乱码'), { dangerouslyUseHTMLString: true });
+      //         //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+      //
+      //       }else if(result.msg.includes("不存在")){
+      //         //文件不存在时提示
+      //         this.pdf.pdfUrl =""
+      //         this.$alert(result.msg, this.$t('预览失败'), { dangerouslyUseHTMLString: true });
+      //         //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+      //         this.pdf.open =false
+      //       }else if(result.msg.includes("不支持此格式")){
+      //
+      //         this.pdf.pdfUrl =""
+      //         this.$alert(result.msg, this.$t('预览失败'), { dangerouslyUseHTMLString: true });
+      //         //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+      //         this.pdf.open =false
+      //       } else{
+      //         //成功时直接给地址
+      //         this.pdf.pdfUrl =process.env.VUE_APP_BASE_API+ result.data
+      //       }
+      //       // this.$nextTick(() => {
+      //       //   const iframe = window.frames['iFrame']
+      //       //   const handleLoad = () => {
+      //       //     setTimeout(() => {
+      //       //       const Do = (iframe.contentWindow || iframe.contentDocument)
+      //       //       console.log(Do.document.getElementsByTagName('table')[0])
+      //       //       Do.document.getElementsByTagName('table')[0].style.width = "100%"
+      //       //       Do.document.getElementsByTagName('table')[0].setAttribute("class","table")
+      //       //     }, 500)
+      //       //   }
+      //       //   iframe.addEventListener('load', handleLoad, true)
+      //       // })
+      //     }).catch(result => {
+      //
+      //       //请求失败,关闭loading,pdf地址直接为为空,不显示
+      //       this.pdf.pdfUrl =""
+      //       this.loadingFlash = false;
+      //
+      //     })
+      //   }
+      //
+      //
+      // },
+      /** 不安全行为/状态单选按钮值改变事件 */
+      handleUnsafeChoiceChange() {
+        if (this.unsafeChoice == '1') {
+          this.dataForm.unsafeAction = null;
+          this.unsafeStatusDisabled = false;
+          this.unsafeActionDisabled = true;
+        } else if (this.unsafeChoice == '2') {
+          this.dataForm.unsafeStatus = null;
+          this.unsafeStatusDisabled = true;
+          this.unsafeActionDisabled = false;
+        }
+      },
+      /** VE验证条款(其它)单选按钮值改变事件 */
+      handleVeItemOtherVeChange() {
+        let veItemsList = this.veItemsList;
+        let flag = false;
+        for (let i = 0; i < veItemsList.length; i++) {
+          if (veItemsList[i] == '其它') {
+            flag = true;
+          }
+        }
+        if (flag) {
+          this.veItemOtherDisabled = false;
+        } else {
+          this.veItemOtherDisabled = true;
+          this.dataForm.veItemOther = null;
+        }
+      },
+      /** 是否需要VE验证单选按钮值改变事件 */
+      handleNeedVeChange() {
+        if (this.dataForm.needVe == '1') {
+          this.veItemsDisabled = false;
+        } else if (this.dataForm.needVe == '0') {
+          this.veItemsDisabled = true;
+          this.veItemsList = [];
+          this.handleVeItemOtherVeChange();
+        }
+      },
+      /** 是否录入开项系统单选按钮值改变事件 */
+      handleIsRecordedChange() {
+        if (this.dataForm.isRecorded == '1') {
+          this.recordNoDisabled = false;
+        } else if (this.dataForm.isRecorded == '0') {
+          this.recordNoDisabled = true;
+          this.dataForm.recordNo = null;
+        }
+      },
+      /** 加载登记人部门列表 */
+      getApplicantDeptOptions() {
+        // listDept(null).then(response => {
+        //   let deptList = response.data;
+        //   this.applicantDeptOptions = [];
+        //   for (let i = 0; i < deptList.length; i++) {
+        //     if (deptList[i].deptId == 103 || deptList[i].deptId == 10058 || deptList[i].deptId == 10042) {
+        //       this.applicantDeptOptions.push({
+        //         dictLabel: deptList[i].deptName,
+        //         dictValue: deptList[i].deptId
+        //       });
+        //     }
+        //   }
+        // });
+        this.applicantDeptOptions = [];
+        this.applicantDeptOptions.push({ dictLabel: "CBP/C", dictValue: '10' });
+        this.applicantDeptOptions.push({ dictLabel: "CTA/B", dictValue: '12' });
+        this.applicantDeptOptions.push({ dictLabel: "CTM/B", dictValue: '14' });
+      },
+      /** 加载登记人列表 */
+      listStaffmgrByDeptAndTeam(applicantDept, applicantTeam) {
+        console.log('123');
+        listStaffmgrByDeptAndTeam({
+          deptId: applicantDept,
+          team: applicantTeam
+        }).then(response => {
+          let staffList = response.rows;
+          this.applicantOptions = [];
+          for (let i = 0; i < staffList.length; i++) {
+            if (this.inspector1 != null) {
+              if (this.inspector1 == staffList[i].userId) {
+                this.inspector1Name = staffList[i].name;
+              }
+            }
+            let staffOption = {
+              dictLabel: staffList[i].name,
+              dictValue: staffList[i].userId
+            }
+            this.applicantOptions.push(staffOption);
+          }
+        });
+      },
+      /** 加载验证人列表 */
+      listSaiInspectors() {
+        listSaiInspectors().then(response => {
+          let staffList = response.data;
+          this.inspectorOptions = [];
+          for (let i = 0; i < staffList.length; i++) {
+            let staffOption = {
+              dictLabel: staffList[i].name,
+              dictValue: staffList[i].userId
+            }
+            this.inspectorOptions.push(staffOption);
+          }
+        });
+      },
+      /** 加载整改负责人列表 */
+      listSaiExecutors(applicantDept, applicantTeam) {
+        listSaiExecutors({
+          deptId: applicantDept,
+          team: applicantTeam
+        }).then(response => {
+          let staffList = response.data;
+          this.executorOptions = [];
+          for (let i = 0; i < staffList.length; i++) {
+            let staffOption = {
+              dictLabel: staffList[i].name,
+              dictValue: staffList[i].userId
+            }
+            let isRepeated = false;
+            for (let j = 0; j < this.executorOptions.length; j++) {
+              if (this.executorOptions[j].dictValue == staffList[i].userId) {
+                isRepeated = true;
+                break;
+              }
+            }
+            if (isRepeated == false) {
+              this.executorOptions.push(staffOption);
+            }
+          }
+        });
+      },
+      // 重置
+      reset() {
+        this.showAssess = false;
+        this.showExecute = false;
+        this.showInspect = false;
+        this.form = {
+          saiApplyId: null,
+          deptId: null,
+          applyStatus: null,
+          apNo: null,
+          processId: null
+        };
+        this.dataForm =  {
+          saiApplyId: null,
+          deptId: null,
+          applyStatus: null,
+          apNo: null,
+          processId: null,
+          applicant: null,
+          assessor: null,
+          executor: null,
+          inspectors: null,
+          applicantDept: null,
+          applicantTeam: null,
+          description: null,
+          unsafeStatus: null,
+          unsafeAction: null,
+          applyDate: null,
+          taskId: null,
+          handler: null,
+          taskName: null,
+          estimateFinishDate: null,
+          actualFinishDate: null,
+          isRecorded: null,
+          recordNo: null,
+          reaction: null,
+          needVe: null,
+          veItems: null,
+          veResult: null,
+          veItemOther: null,
+        };
+        this.taskForm =  {
+          comment: '',
+          taskId: '',
+          files: '',
+          businessKey: '',
+          saiApply: null,
+        };
+      },
+      /**
+       * 处理流程操作按钮点击事件
+       */
+      dataFormSubmit(condition) {
+        this.taskForm.condition = condition;
+        handle(this.taskForm).then(response =>{
+          // this.msgSuccess("提交成功");
+          alert("提交成功")
+          this.visible = false;
+          // refreshDataList事件:调用父组件getList方法刷新页面
+          this.$emit('refreshDataList');
+        });
+        // if (condition == 0) {
+        //   console.log("condition == 0");
+          // // 验证人字符串拼接
+          // this.dataForm.inspectors = this.inspector1 + "," + this.inspector2;
+          // // VE验证条款字符串拼接
+          // if (this.veItemsList.length != 0) {
+          //   this.dataForm.veItems = "";
+          //   for (let i = 0; i < this.veItemsList.length; i++) {
+          //     this.dataForm.veItems += this.veItemsList[i];
+          //     if (i != this.veItemsList.length - 1) {
+          //       this.dataForm.veItems += ",";
+          //     }
+          //   }
+          // }
+          // this.taskForm.saiApply = this.dataForm;
+          // this.taskForm.condition = condition;
+          // handle(this.taskForm).then(response =>{
+          //   this.msgSuccess("提交成功");
+          //   this.visible = false;
+          //   // refreshDataList事件:调用父组件getList方法刷新页面
+          //   this.$emit('refreshDataList');
+          // });
+        // } else {
+        //   console.log("condition == 1");
+        //   this.$refs["form"].validate(valid => {
+        //     if (valid) {
+        //       // 验证人字符串拼接
+        //       this.dataForm.inspectors = this.inspector1 + "," + this.inspector2;
+        //       // VE验证条款字符串拼接
+        //       if (this.veItemsList.length != 0) {
+        //         this.dataForm.veItems = "";
+        //         for (let i = 0; i < this.veItemsList.length; i++) {
+        //           this.dataForm.veItems += this.veItemsList[i];
+        //           if (i != this.veItemsList.length - 1) {
+        //             this.dataForm.veItems += ",";
+        //           }
+        //         }
+        //       }
+        //       this.taskForm.saiApply = this.dataForm;
+        //       this.taskForm.condition = condition;
+        //       handleApply(this.taskForm).then(response =>{
+        //         this.msgSuccess("提交成功");
+        //         this.visible = false;
+        //         // refreshDataList事件:调用父组件getList方法刷新页面
+        //         this.$emit('refreshDataList');
+        //       });
+        //     }
+        //   })
+        // }
+      },
+      /**
+       * 保存按钮点击事件
+       */
+      dataFormSave() {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            // 验证人字符串拼接
+            this.dataForm.inspectors = this.inspector1 + "," + this.inspector2;
+            // VE验证条款字符串拼接
+            if (this.veItemsList.length != 0) {
+              this.dataForm.veItems = "";
+              for (let i = 0; i < this.veItemsList.length; i++) {
+                this.dataForm.veItems += this.veItemsList[i];
+                if (i != this.veItemsList.length - 1) {
+                  this.dataForm.veItems += ",";
+                }
+              }
+            }
+            updateApply(this.dataForm).then(response =>{
+              this.msgSuccess("保存成功");
+              // refreshDataList事件:调用父组件getList方法刷新页面
+              this.$emit('refreshDataList');
+              this.visible = false;
+            });
+          }
+        })
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  h4{
+    margin: 20px 0px 10px 0px;
+  }
+  .el-checkbox {
+    color: #606266;
+    padding: 5px 0px;
+  }
+  ::v-deep .el-input.is-disabled .el-input__inner {
+    color: #606266;
+    background-color: transparent;
+  }
+  ::v-deep .el-textarea.is-disabled .el-textarea__inner {
+    color: #606266;
+    background-color: transparent;
+  }
+  ::v-deep .el-radio__input.is-checked + .el-radio__label {
+    color: #4a7cf9;
+  }
+  ::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
+    background-color: #4a7cf9;
+    border-color: #4a7cf9;
+  }
+  ::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner::after {
+    background-color: #fff;
+  }
+  ::v-deep .el-checkbox__input.is-disabled + span.el-checkbox__label {
+    color: #606266;
+    cursor: not-allowed;
+  }
+  ::v-deep .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
+    background-color: #4a7cf9;
+    border-color: #4a7cf9;
+  }
+  ::v-deep .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
+    border-color: #fff;
+  }
+</style>

+ 22 - 13
ruoyi-ui/src/views/branch/approve/myapprove/index.vue

@@ -61,11 +61,11 @@
 </template>
 
 <script>
-  // import {getMyApprovelist} from "@/api/ehs/approvedanger";
-  // import {treeselect} from "@/api/system/dept";
-  // import Treeselect from "@riophae/vue-treeselect";
-  // import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-  // import ProcessImg from '../processImg'
+  import {getMyApprovelist} from "@/api/branch/approvedanger";
+  import {treeselect} from "@/api/system/dept";
+  import Treeselect from "@riophae/vue-treeselect";
+  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+  import ProcessImg from '../processImg'
   // import AddOrUpdate from '../approveDetail/spec-detail';
   // import SpecModify from '../approveDetail/specModify-detail';
   // import SpecTrainingPlan from '../approveDetail/specTrainingPlan-detaill';
@@ -79,11 +79,20 @@
 
   export default {
     name: "Myapprove",
-    // components: {
-    //   SaiApplyDetail,
+    components: {
+      // SaiApplyDetail,
     //   SafetychangeDetail,
     //   OfflinevalveDetail,
-    //   Treeselect,ProcessImg,AddOrUpdate,SpecModify,SpecTrainingPlan,SpecMaintenance,IntactDetail,KekaoDetail,InvoiceDetail},
+      Treeselect,
+    ProcessImg,
+      // AddOrUpdate,
+    // SpecModify,
+    // SpecTrainingPlan,
+    // SpecMaintenance,
+    // IntactDetail,
+    // KekaoDetail,
+    // InvoiceDetail
+    },
     data() {
       return {
         // 遮罩层
@@ -150,7 +159,7 @@
     created() {
       //设置表格高度对应屏幕高度
       this.$nextTick(() => {
-        this.clientHeight = document.body.clientHeight -250
+        this.clientHeight = document.body.clientHeight -200
       })
       this.getList();
       this.getTreeselect();
@@ -162,11 +171,11 @@
       /** 查询隐患申请列表 */
       getList() {
         this.loading = true;
-        // getMyApprovelist(this.queryParams).then(response => {
-        //   this.approvedangerList = response.rows;
-        //   this.total = response.total;
+        getMyApprovelist(this.queryParams).then(response => {
+          this.approvedangerList = response.rows;
+          this.total = response.total;
           this.loading = false;
-        // });
+        });
       },
       //操作审批流程
       detailHandle (row) {

+ 113 - 107
ruoyi-ui/src/views/branch/approve/pending/index.vue

@@ -17,12 +17,7 @@
       <el-table-column label="流程创建时间" align="center" prop="processCreateTime" :show-overflow-tooltip="true"/>
       <el-table-column label="待办任务名称" align="center" prop="taskName" :show-overflow-tooltip="true"/>
       <el-table-column label="待办任务创建时间" align="center" prop="taskCreateTime" :show-overflow-tooltip="true"/>
-      <el-table-column label="申请编号" align="center" prop="apNo" :show-overflow-tooltip="true">
-<!--        <template slot-scope="scope">-->
-<!--          <span v-if="scope.row.processName === ($t('事件') + $t('审批流程')) ">{{scope.row.tApproveAccident.approveNo}}</span>-->
-<!--          <span v-if="scope.row.processName === ($t('重大隐患') + $t('审批流程') )|| scope.row.processName === ($t('普通隐患') + $t('审批流程') )">{{scope.row.tApprove.approveNo}}</span>-->
-<!--        </template>-->
-      </el-table-column>
+      <el-table-column label="申请编号" align="center" prop="apNo" :show-overflow-tooltip="true"/>
       <el-table-column label="操作" align="center" width="120" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -40,13 +35,13 @@
       </el-table-column>
     </el-table>
 
-    <!--<pagination-->
-      <!--v-show="total>0"-->
-      <!--:total="total"-->
-      <!--:page.sync="queryParams.pageNum"-->
-      <!--:limit.sync="queryParams.pageSize"-->
-      <!--@pagination="getList"-->
-    <!--/>-->
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
 
     <!--&lt;!&ndash; 弹窗, 新增 / 修改 &ndash;&gt;-->
     <!--<div v-if="addOrUpdateVisible">-->
@@ -124,53 +119,55 @@
     <!--<add-or-update v-if="specDealVisible" ref="specDeal" @refreshDataList="getList"></add-or-update>-->
     <!--<spec-modify v-if="specModifyDealVisible" ref="specModifyDeal" @refreshDataList="getList"></spec-modify>-->
     <!--<spec-training-plan v-if="specTrainingPlanDealVisible" ref="specTrainingPlanDeal" @refreshDataList="getList"></spec-training-plan>-->
-    <!--<process-img v-if="processImgVisible" ref="processImg" @refreshDataList="getList"></process-img>-->
+    <process-img v-if="processImgVisible" ref="processImg" @refreshDataList="getList"></process-img>
     <!--<intact-resolve v-if="intactResolveVisible" ref="intactResolveDeal" @refreshDataList="getList"></intact-resolve>-->
     <!--<kekao-resolve v-if="kekaoResolveVisible" ref="kekaoResolveDeal" @refreshDataList="getList"></kekao-resolve>-->
     <!--<spec-maintenance v-if="specMaintenanceVisible" ref="specMaintenance" @refreshDataList="getList"></spec-maintenance>-->
     <!--<invoice-detail v-if="invoiceDetailVisible" ref="invoiceDetail" @refreshDataList="getList"></invoice-detail>-->
     <!--<offlinevalve-detail v-if="offlinevalveDetailVisible" ref="offlinevalveDetail" @refreshDataList="getList"></offlinevalve-detail>-->
     <!--<safetychange-detail v-if="safetychangeDetailVisible" ref="safetychangeDetail" @refreshDataList="getList"></safetychange-detail>-->
-    <!--<sai-apply-detail v-if="saiApplyVisible" ref="saiApplyDetail" @refreshDataList="getList"></sai-apply-detail>-->
+    <common-detail v-if="commonVisible" ref="commonDetail" @refreshDataList="getList"/>
   </div>
 </template>
 
 <script>
-  // import {getPendinglist, handleApprovedanger} from "@/api/ehs/approvedanger";
+  import {getPendinglist, handleApprovedanger} from "@/api/branch/approvedanger";
   // import AddOrUpdate from './spec-detail';
   // import SpecModify from './specModify-deal';
   // import SpecTrainingPlan from './specTrainingPlan-deal';
   // import IntactResolve from '../approveDetail/intact-resolve';
   // import Accident from '../approveaccidentDetail/index';
-  // import ProcessImg from '../processImg/index';
-  // 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 ProcessImg from '../processImg/index';
+  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 SpecMaintenance from "@/views/approve/pending/specMaintenance-deal";
   // import KekaoResolve from '../approveDetail/kekao-resolve';
   // import InvoiceDetail from "@/views/approve/approveDetail/invoice-detail";
   // import OfflinevalveDetail from "@/views/approve/approveDetail/offlinevalve-detail";
   // import SafetychangeDetail from "@/views/approve/approveDetail/safetychange-detail";
   // import SaiApplyDetail from "@/views/approve/approveDetail/sai-apply-detail";
+  import CommonDetail from "@/views/branch/approve/detail/common-detail";
 
   export default {
     name: "Pending",
-    // components: {
+    components: {
+      CommonDetail,
     //   SaiApplyDetail,
     //   SafetychangeDetail,
     //   OfflinevalveDetail,
-    //   Treeselect,
+      Treeselect,
     //   AddOrUpdate,
     //   SpecModify,
     //   Accident,
     //   SpecTrainingPlan,
-    //   ProcessImg,
+      ProcessImg,
     //   IntactResolve,
     //   SpecMaintenance,
     //   KekaoResolve,
     //   InvoiceDetail
-    // },
+    },
     data() {
       return {
         // 遮罩层
@@ -188,6 +185,7 @@
         offlinevalveDetailVisible:false,
         safetychangeDetailVisible:false,
         saiApplyVisible:false,
+        commonVisible: false,
         // 选中数组
         ids: [],
         // 非单个禁用
@@ -283,7 +281,7 @@
     created() {
       //设置表格高度对应屏幕高度
       this.$nextTick(() => {
-        this.clientHeight = document.body.clientHeight -250
+        this.clientHeight = document.body.clientHeight -200
       })
       this.getList();
       this.getTreeselect();
@@ -295,11 +293,12 @@
       /** 查询隐患申请列表 */
       getList() {
         this.loading = true;
-        // getPendinglist(this.queryParams).then(response => {
-        //   this.approvedangerList = response.rows;
-        //   this.total = response.total;
+        getPendinglist(this.queryParams).then(response => {
+          console.log(response)
+          this.approvedangerList = response.rows;
+          this.total = response.total;
           this.loading = false;
-        // });
+        });
       },
       /** 查询部门下拉树结构 */
       getTreeselect() {
@@ -347,86 +346,93 @@
       },
       //操作审批流程
       addOrUpdateHandle (row) {
-        if (row.processName == "特种设备审核"){
-          this.specDealVisible = true
-          this.$nextTick(() => {
-            console.log(row.taskName)
-            this.$refs.specDeal.init(row.specApprove.id, row.taskId, row.processId,row.taskName)
-          })
-        }else if (row.processName == "年度检查报告申请"){
-          this.specDealVisible = true
-          this.$nextTick(() => {
-            console.log(row.taskName)
-            this.$refs.specDeal.init(row.specApprove.id, row.taskId, row.processId,row.taskName)
-          })
-        }else if (row.processName == "月度检查"){
-          this.specDealVisible = true
-          this.$nextTick(() => {
-            console.log(row.taskName)
-            this.$refs.specDeal.init(row.specApprove.id, row.taskId, row.processId,row.taskName)
-          })
-        }else if (row.processName == "设备修改/删除审核" || row.processName == "设备新增/删除审核"){
-          this.specModifyDealVisible = true
-          this.$nextTick(() => {
-            console.log(row.taskName)
-            this.$refs.specModifyDeal.init(row.approveSpecModify.id, row.taskId, row.processId,row.taskName)
-          })
-        }else if (row.processName == "专项培训计划审核"){
-          this.specTrainingPlanDealVisible = true
-          this.$nextTick(() => {
-            console.log(row.taskName)
-            this.$refs.specTrainingPlanDeal.init(row.approveObj.id, row.taskId, row.processId,row.taskName)
-          })
-        }else if (row.processName == "设备维修审批流程"){
-          this.specMaintenanceVisible = true
-          this.$nextTick(() => {
-            console.log(row.taskName)
-            this.$refs.specMaintenance.init(row.approveObj.id, row.taskId, row.processId,row.taskName)
-          })
-        }else if (row.processName == "设备变更申请"){
-          this.intactResolveVisible = true
-          this.$nextTick(() => {
-
-            console.log(row)
-
-            this.$refs.intactResolveDeal.init(row.approveObj.id, row.taskId, row.processId,row.taskName)
-          })
-        }else if (row.processName == "可靠性管理申请"){
-          this.kekaoResolveVisible = true
-          this.$nextTick(() => {
-
-            console.log(row)
-
-            this.$refs.kekaoResolveDeal.init(row.approveObj.id, row.taskId, row.processId,row.taskName)
-          })
-        } else if (row.processName == "预约开票审批流程"){
-          this.invoiceDetailVisible = true
-          this.$nextTick(() => {
-            console.log(row)
-            console.log(row.approveObj)
-            this.$refs.invoiceDetail.init(row.approveObject.id, row.taskId, row.processId,row.taskName)
-          })
-        } else if (row.processName == "安全阀离线/切出申请流程") {
-          this.offlinevalveDetailVisible = true
-          this.$nextTick(() => {
-            this.$refs.offlinevalveDetail.init(row.approveObject.id, row.taskId, row.processId, row.taskName,true)
-          })
-        } else if (row.processName == "组织保护措施状态变更申请流程") {
-          this.safetychangeDetailVisible = true
-          this.$nextTick(() => {
-            this.$refs.safetychangeDetail.init(row.approveObject.id, row.taskId, row.processId, row.taskName,true)
-          })
-        } else if (row.processName == "SAI开项申请流程") {
-          this.saiApplyVisible = true
+        if (row.processName == "通用审批流程") {
+          console.log(row)
+          this.commonVisible = true
           this.$nextTick(() => {
-            this.$refs.saiApplyDetail.init(row.approveObject.saiApplyId, row.taskId, row.processId, row.taskName)
+            this.$refs.commonDetail.init(row.member.memberId, row.taskId, row.processId, row.taskName)
           })
-        } else {
-          this.approveInfo = row;
-          this.infoTaskName = row.taskName;
-          this.infoprocessName = row.processName;
-          this.addOrUpdateVisible = true;
         }
+        // if (row.processName == "特种设备审核"){
+        //   this.specDealVisible = true
+        //   this.$nextTick(() => {
+        //     console.log(row.taskName)
+        //     this.$refs.specDeal.init(row.specApprove.id, row.taskId, row.processId,row.taskName)
+        //   })
+        // }else if (row.processName == "年度检查报告申请"){
+        //   this.specDealVisible = true
+        //   this.$nextTick(() => {
+        //     console.log(row.taskName)
+        //     this.$refs.specDeal.init(row.specApprove.id, row.taskId, row.processId,row.taskName)
+        //   })
+        // }else if (row.processName == "月度检查"){
+        //   this.specDealVisible = true
+        //   this.$nextTick(() => {
+        //     console.log(row.taskName)
+        //     this.$refs.specDeal.init(row.specApprove.id, row.taskId, row.processId,row.taskName)
+        //   })
+        // }else if (row.processName == "设备修改/删除审核" || row.processName == "设备新增/删除审核"){
+        //   this.specModifyDealVisible = true
+        //   this.$nextTick(() => {
+        //     console.log(row.taskName)
+        //     this.$refs.specModifyDeal.init(row.approveSpecModify.id, row.taskId, row.processId,row.taskName)
+        //   })
+        // }else if (row.processName == "专项培训计划审核"){
+        //   this.specTrainingPlanDealVisible = true
+        //   this.$nextTick(() => {
+        //     console.log(row.taskName)
+        //     this.$refs.specTrainingPlanDeal.init(row.approveObj.id, row.taskId, row.processId,row.taskName)
+        //   })
+        // }else if (row.processName == "设备维修审批流程"){
+        //   this.specMaintenanceVisible = true
+        //   this.$nextTick(() => {
+        //     console.log(row.taskName)
+        //     this.$refs.specMaintenance.init(row.approveObj.id, row.taskId, row.processId,row.taskName)
+        //   })
+        // }else if (row.processName == "设备变更申请"){
+        //   this.intactResolveVisible = true
+        //   this.$nextTick(() => {
+        //
+        //     console.log(row)
+        //
+        //     this.$refs.intactResolveDeal.init(row.approveObj.id, row.taskId, row.processId,row.taskName)
+        //   })
+        // }else if (row.processName == "可靠性管理申请"){
+        //   this.kekaoResolveVisible = true
+        //   this.$nextTick(() => {
+        //
+        //     console.log(row)
+        //
+        //     this.$refs.kekaoResolveDeal.init(row.approveObj.id, row.taskId, row.processId,row.taskName)
+        //   })
+        // } else if (row.processName == "预约开票审批流程"){
+        //   this.invoiceDetailVisible = true
+        //   this.$nextTick(() => {
+        //     console.log(row)
+        //     console.log(row.approveObj)
+        //     this.$refs.invoiceDetail.init(row.approveObject.id, row.taskId, row.processId,row.taskName)
+        //   })
+        // } else if (row.processName == "安全阀离线/切出申请流程") {
+        //   this.offlinevalveDetailVisible = true
+        //   this.$nextTick(() => {
+        //     this.$refs.offlinevalveDetail.init(row.approveObject.id, row.taskId, row.processId, row.taskName,true)
+        //   })
+        // } else if (row.processName == "组织保护措施状态变更申请流程") {
+        //   this.safetychangeDetailVisible = true
+        //   this.$nextTick(() => {
+        //     this.$refs.safetychangeDetail.init(row.approveObject.id, row.taskId, row.processId, row.taskName,true)
+        //   })
+        // } else if (row.processName == "SAI开项申请流程") {
+        //   this.saiApplyVisible = true
+        //   this.$nextTick(() => {
+        //     this.$refs.saiApplyDetail.init(row.approveObject.saiApplyId, row.taskId, row.processId, row.taskName)
+        //   })
+        // } else {
+        //   this.approveInfo = row;
+        //   this.infoTaskName = row.taskName;
+        //   this.infoprocessName = row.processName;
+        //   this.addOrUpdateVisible = true;
+        // }
       },
       // 多选框选中数据
       handleSelectionChange(selection) {

+ 3 - 2
ruoyi-ui/src/views/branch/approve/processImg/index.vue

@@ -1,13 +1,13 @@
 <template>
   <el-dialog  :close-on-click-modal="false" v-dialogDrag
-    :title="$t('流程图')"
+    title="流程图"
 
     :visible.sync="visible">
   <div style="padding-top: 0px;">
     <img :src=getUrl() style="width: 100%">
   </div>
     <span slot="footer" class="dialog-footer">
-      <el-button @click="visible = false">{{ $t('返回') }}</el-button>
+      <el-button @click="visible = false">返回</el-button>
     </span>
   </el-dialog>
 </template>
@@ -25,6 +25,7 @@
     },
     methods: {
       init (processId) {
+        console.log(processId)
         this.processId = processId
         this.visible = true
       },

+ 24 - 21
ruoyi-ui/src/views/branch/approve/taskdone/index.vue

@@ -36,13 +36,13 @@
       </el-table-column>
       </el-table>
 
-    <!--<pagination-->
-      <!--v-show="total>0"-->
-      <!--:total="total"-->
-      <!--:page.sync="queryParams.pageNum"-->
-      <!--:limit.sync="queryParams.pageSize"-->
-      <!--@pagination="getList"-->
-    <!--/>-->
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
 
     <!-- 弹窗, 查看 -->
 <!--    <div v-if="addOrUpdateVisible">-->
@@ -50,7 +50,7 @@
 <!--        <add-or-update :info="approveInfo"></add-or-update>-->
 <!--      </el-dialog>-->
 <!--    </div>-->
-    <!--<process-img v-if="processImgVisible" ref="processImg" @refreshDataList="getList"></process-img>-->
+    <process-img v-if="processImgVisible" ref="processImg" @refreshDataList="getList"></process-img>
     <!--<add-or-update v-if="specDealVisible" ref="specDeal" @refreshDataList="getList"></add-or-update>-->
     <!--<spec-modify v-if="specModifyDealVisible" ref="specModifyDeal" @refreshDataList="getList"></spec-modify>-->
     <!--<spec-training-plan v-if="specTrainingPlanVisible" ref="specTrainingPlan" @refreshDataList="getList"></spec-training-plan>-->
@@ -65,13 +65,13 @@
 </template>
 
 <script>
-  // import { getTaskdonelist } from "@/api/ehs/approvedanger";
+  import { getTaskdonelist } from "@/api/branch/approvedanger";
   // import AddOrUpdate from '../approveDetail/spec-detail';
-  // import { treeselect } from "@/api/system/dept";
+  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 ProcessImg from "../processImg/index";
+  import Treeselect from "@riophae/vue-treeselect";
+  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+  import ProcessImg from "../processImg/index";
   // import SpecModify from '../approveDetail/specModify-detail';
   // import SpecTrainingPlan from '../approveDetail/specTrainingPlan-detaill';
   // import SpecMaintenance from "@/views/approve/approveDetail/specMaintenance-detail";
@@ -84,12 +84,15 @@
 
   export default {
     name: "Taskdone",
-    // components: {
+    components: {
     //   SaiApplyDetail,
     //   SafetychangeDetail,
     //   OfflinevalveDetail,
-    //   Treeselect, AddOrUpdate,ProcessImg,SpecModify,SpecTrainingPlan,SpecMaintenance,IntactDetail,KekaoDetail,InvoiceDetail
-    // },
+      Treeselect,
+    // AddOrUpdate,
+      ProcessImg,
+      // SpecModify,SpecTrainingPlan,SpecMaintenance,IntactDetail,KekaoDetail,InvoiceDetail
+    },
     data() {
       return {
         // 遮罩层
@@ -160,7 +163,7 @@
     created() {
       //设置表格高度对应屏幕高度
       this.$nextTick(() => {
-        this.clientHeight = document.body.clientHeight -250
+        this.clientHeight = document.body.clientHeight -200
       })
       this.getList();
       this.getTreeselect();
@@ -172,11 +175,11 @@
       /** 查询隐患申请列表 */
       getList() {
         this.loading = true;
-        // getTaskdonelist(this.queryParams).then(response => {
-        //   this.approvedangerList = response.rows;
-        //   this.total = response.total;
+        getTaskdonelist(this.queryParams).then(response => {
+          this.approvedangerList = response.rows;
+          this.total = response.total;
           this.loading = false;
-        // });
+        });
       },
       /** 查询部门下拉树结构 */
       getTreeselect() {

+ 8 - 1
ruoyi-ui/src/views/branch/zbjs/dymc/index.vue

@@ -132,6 +132,12 @@
     <el-table v-loading="loading" :data="memberList" @selection-change="handleSelectionChange" :height="clientHeight" border>
       <el-table-column type="selection" :width="55" align="center"/>
       <el-table-column label="党支部" align="center" prop="deptId" :formatter="deptListFormat" :width="120"/>
+      <el-table-column label="申请状态" align="center" prop="apStatus" :width="100">
+        <template slot-scope="scope">
+          <span v-if="scope.row.apStatus == 1"><el-tag type="success">已审核</el-tag></span>
+          <span v-if="scope.row.apStatus == 0"><el-tag type="info">审核中</el-tag></span>
+        </template>
+      </el-table-column>
       <el-table-column label="姓名" align="center" prop="nickName" :width="100"/>
       <el-table-column label="性别" align="center" prop="sex" :formatter="sysUserSexFormat" :width="80"/>
       <el-table-column label="出生年月" align="center" prop="birthday" :width="120">
@@ -161,13 +167,14 @@
           <span>{{ parseTime(scope.row.leaveTime, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" fixed="right" :width="240" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" fixed="right" :width="200" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             size="mini"
             type="text"
             @click="handleApply(scope.row)"
             v-hasPermi="['branch:member:edit']"
+            v-if="scope.row.apStatus == 1"
           >转移申请</el-button>
           <el-button
             size="mini"

+ 0 - 1
ruoyi-ui/src/views/index.vue

@@ -101,7 +101,6 @@ export default {
           "title": profiles[i].title
         });
       }
-      console.log(this.publicizeUrls)
     });
     /** 查询支部园地风采图片 */
     listDemeanorProfiles().then(response => {