Przeglądaj źródła

-组织保护措施申请

jiangbiao 2 lat temu
rodzic
commit
7ecb84283c

+ 4 - 0
master/src/main/java/com/ruoyi/config/ActivitiConfig.java

@@ -141,6 +141,10 @@ public class ActivitiConfig {
         Resource spec12 = resourceLoader.getResource("classpath:/processes/apply/offlinevalve.bpmn"); //加载流程图资源文件
         deploymentBuilder12.enableDuplicateFiltering().addInputStream(spec12.getFilename(), spec12.getInputStream()).name("安全阀离线/切出申请流程").deploy();//按流程id部署
 
+        DeploymentBuilder deploymentBuilder13 = repositoryService().createDeployment();
+        Resource spec13 = resourceLoader.getResource("classpath:/processes/apply/safetychange.bpmn"); //加载流程图资源文件
+        deploymentBuilder13.enableDuplicateFiltering().addInputStream(spec13.getFilename(), spec13.getInputStream()).name("组织保护措施状态变更申请流程").deploy();//按流程id部署
+
     }
 }
 

+ 67 - 3
master/src/main/java/com/ruoyi/project/apply/controller/TApplySafetychangeController.java

@@ -1,5 +1,7 @@
 package com.ruoyi.project.apply.controller;
 
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
@@ -8,12 +10,21 @@ import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.apply.domain.TApplySafetychange;
 import com.ruoyi.project.apply.service.ITApplySafetychangeService;
+import com.ruoyi.project.plant.domain.TStaffmgr;
+import com.ruoyi.project.system.domain.SysUser;
+import com.ruoyi.project.system.service.ISysUserService;
+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.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 组织保护措施状态变更申请Controller
@@ -28,6 +39,16 @@ public class TApplySafetychangeController extends BaseController
     @Autowired
     private ITApplySafetychangeService tApplySafetychangeService;
 
+
+    @Autowired
+    private RuntimeService runtimeService;
+
+    @Autowired
+    private ISysUserService userService;
+
+    @Autowired
+    private TaskService taskService;
+
     /**
      * 查询组织保护措施状态变更申请列表
      */
@@ -56,7 +77,7 @@ public class TApplySafetychangeController extends BaseController
     /**
      * 获取组织保护措施状态变更申请详细信息
      */
-    @PreAuthorize("@ss.hasPermi('apply:safetychange:query')")
+//    @PreAuthorize("@ss.hasPermi('apply:safetychange:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id)
     {
@@ -71,12 +92,55 @@ public class TApplySafetychangeController extends BaseController
     @PostMapping
     public AjaxResult add(@RequestBody TApplySafetychange tApplySafetychange)
     {
-        tApplySafetychange.setApplicant(getUserId().toString());
+        String userId = getUserId().toString();
+        tApplySafetychange.setApplicant(userId);
         tApplySafetychange.setApplicantName(getNickName());
         tApplySafetychange.setApplicationTime(new Date());
         tApplySafetychange.setCreatedate(new Date());
         tApplySafetychange.setCreaterCode(getUserId().toString());
-        return toAjax(tApplySafetychangeService.insertTApplySafetychange(tApplySafetychange));
+        tApplySafetychange.setConfirmer(tApplySafetychange.getSafaer());
+        tApplySafetychange.setConfirmerName(tApplySafetychange.getSafaerName());
+        tApplySafetychangeService.insertTApplySafetychange(tApplySafetychange);
+
+        // 开始申请流程
+        tApplySafetychange.setApNo(DateUtils.dateTimeNow() + userId);
+        long businessKey = tApplySafetychange.getId();
+        String applyUser = userId;
+        //开始工作流、监听
+        Authentication.setAuthenticatedUserId(applyUser);//设置当前申请人
+        Map<String, Object> variables = new HashMap<>();
+        variables.put("applyuser", applyUser);
+        variables.put("confirmer", tApplySafetychange.getConfirmer());
+        variables.put("executor", tApplySafetychange.getExecutor());
+        variables.put("safaer", tApplySafetychange.getSafaer());
+        //查询经理
+        TStaffmgr tStaffmgr = new TStaffmgr();
+        tStaffmgr.setActualposts("24,26");
+        StringBuilder approvers = new StringBuilder();
+        for (SysUser user : userService.selectUserPost(tStaffmgr)) {
+            approvers.append(user.getUserId().toString()).append(",");
+        }
+        if (StringUtils.isNotEmpty(approvers.toString())) {
+            approvers = new StringBuilder(approvers.substring(0, approvers.length() - 1));
+        }
+        variables.put("approver", approvers.toString());
+        tStaffmgr = new TStaffmgr();
+        tStaffmgr.setActualposts("12");
+        StringBuilder changeExecutors = new StringBuilder();
+        for (SysUser user : userService.selectUserPost(tStaffmgr)) {
+            changeExecutors.append(user.getUserId().toString()).append(",");
+        }
+        if (StringUtils.isNotEmpty(changeExecutors.toString())) {
+            changeExecutors = new StringBuilder(changeExecutors.substring(0, changeExecutors.length() - 1));
+        }
+        variables.put("changeExecutor", changeExecutors.toString());
+        //采用key来启动流程定义并设置流程变量,返回流程实例
+        ProcessInstance pi = runtimeService.startProcessInstanceByKey("safetychange", String.valueOf(businessKey), variables);
+        logger.info("流程定义id:" + pi.getProcessDefinitionId());
+        logger.info("流程实例id:" + pi.getProcessInstanceId());
+        tApplySafetychange.setProcessId(pi.getProcessInstanceId());
+        tApplySafetychangeService.updateTApplySafetychange(tApplySafetychange);
+        return toAjax(1);
     }
 
     /**

+ 27 - 0
master/src/main/java/com/ruoyi/project/apply/domain/TApplySafetychange.java

@@ -187,6 +187,33 @@ public class TApplySafetychange extends BaseEntity
     @Excel(name = "申请状态")
     private String approveStatus;
 
+
+    /**
+     * 流程id
+     */
+    private String processId;
+
+    /**
+     * 申请编号
+     */
+    private String apNo;
+
+    public String getProcessId() {
+        return processId;
+    }
+
+    public void setProcessId(String processId) {
+        this.processId = processId;
+    }
+
+    public String getApNo() {
+        return apNo;
+    }
+
+    public void setApNo(String apNo) {
+        this.apNo = apNo;
+    }
+
     public void setId(Long id)
     {
         this.id = id;

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

@@ -12,7 +12,9 @@ import com.ruoyi.common.utils.file.FileUploadUtils;
 import com.ruoyi.common.utils.http.HttpContextUtils;
 import com.ruoyi.framework.config.RuoYiConfig;
 import com.ruoyi.project.apply.domain.TApplyOfflinevalve;
+import com.ruoyi.project.apply.domain.TApplySafetychange;
 import com.ruoyi.project.apply.service.ITApplyOfflinevalveService;
+import com.ruoyi.project.apply.service.ITApplySafetychangeService;
 import com.ruoyi.project.approve.damain.DevProcess;
 import com.ruoyi.project.approve.damain.DevTask;
 import com.ruoyi.project.common.domain.TCommonfile;
@@ -118,6 +120,9 @@ public class TApproveDangerController extends BaseController {
     @Autowired
     private ITApplyOfflinevalveService tApplyOfflinevalveService;
 
+    @Autowired
+    private ITApplySafetychangeService tApplySafetychangeService;
+
     /**
      * 任务申请
      */
@@ -285,6 +290,10 @@ public class TApproveDangerController extends BaseController {
                         TApplyOfflinevalve approve = tApplyOfflinevalveService.selectTApplyOfflinevalveById(Long.parseLong(pi.getBusinessKey()));
                         devProcess.setApproveObject(approve);
                         devProcess.setApNo(approve.getApNo());
+                    } else if (pi.getProcessDefinitionName().equals("组织保护措施状态变更申请流程")) {
+                        TApplySafetychange approve = tApplySafetychangeService.selectTApplySafetychangeById(Long.parseLong(pi.getBusinessKey()));
+                        devProcess.setApproveObject(approve);
+                        devProcess.setApNo(approve.getApNo());
                     }
                 } catch (Exception e) {
                     logger.error(e.toString());
@@ -398,6 +407,10 @@ public class TApproveDangerController extends BaseController {
                     TApplyOfflinevalve approve = tApplyOfflinevalveService.selectTApplyOfflinevalveById(Long.parseLong(pi.getBusinessKey()));
                     devTask.setApproveObject(approve);
                     devTask.setApNo(approve.getApNo());
+                } else if (pi.getProcessDefinitionName().equals("组织保护措施状态变更申请流程")) {
+                    TApplySafetychange approve = tApplySafetychangeService.selectTApplySafetychangeById(Long.parseLong(pi.getBusinessKey()));
+                    devTask.setApproveObject(approve);
+                    devTask.setApNo(approve.getApNo());
                 }
                 list.add(devTask);
             }
@@ -491,6 +504,12 @@ public class TApproveDangerController extends BaseController {
                     devProcess.setApNo(approve.getApNo());
                     devProcess.setApName(user.getNickName());
                     devProcess.setApproveObject(approve);
+                }  else if (pi.getProcessDefinitionName().equals("安全阀离线/切出申请流程")) {
+                    TApplySafetychange approve = tApplySafetychangeService.selectTApplySafetychangeById(Long.parseLong(pi.getBusinessKey()));
+                    SysUser user = sysUserService.selectUserById(Long.valueOf(approve.getCreaterCode()));
+                    devProcess.setApNo(approve.getApNo());
+                    devProcess.setApName(user.getNickName());
+                    devProcess.setApproveObject(approve);
                 } else {
                     TApproveDanger approveDanger = tApproveDangerService.selectTApproveDangerById(Long.parseLong(pi.getBusinessKey()));
                     SysUser user = sysUserService.selectUserById(approveDanger.getRecorderId());

+ 5 - 1
master/src/main/resources/mybatis/apply/TApplySafetychangeMapper.xml

@@ -45,11 +45,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updatedate"    column="updatedate"    />
         <result property="deptId"    column="dept_id"    />
         <result property="approveStatus"    column="approve_status"    />
+        <result property="apNo"    column="ap_no"    />
+        <result property="processId"    column="process_id"    />
         <result property="deptName" column="dept_name" />
     </resultMap>
 
     <sql id="selectTApplySafetychangeVo">
-        select d.id, d.change_describe, d.change_reason, d.applicant, d.applicant_name, d.application_time, d.safa, d.safaer, d.safaer_name, d.safa_time, d.approver, d.approver_name, d.approve_time, d.executor, d.executor_name, d.execution_time, d.confirmer, d.confirmer_name, d.confirm_time, d.change_execution, d.change_executor, d.change_executor_name, d.change_executor_time, d.reset_confirm, d.reset_confirmer1, d.reset_confirmer_name1, d.reset_confirm_time1, d.reset_confirmer2, d.reset_confirmer_name2, d.reset_confirm_time2, d.revoke_confirm, d.remarks, d.status, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.approve_status ,s.dept_name from t_apply_safetychange d
+        select d.ap_no,d.process_id,d.id, d.change_describe, d.change_reason, d.applicant, d.applicant_name, d.application_time, d.safa, d.safaer, d.safaer_name, d.safa_time, d.approver, d.approver_name, d.approve_time, d.executor, d.executor_name, d.execution_time, d.confirmer, d.confirmer_name, d.confirm_time, d.change_execution, d.change_executor, d.change_executor_name, d.change_executor_time, d.reset_confirm, d.reset_confirmer1, d.reset_confirmer_name1, d.reset_confirm_time1, d.reset_confirmer2, d.reset_confirmer_name2, d.reset_confirm_time2, d.revoke_confirm, d.remarks, d.status, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.approve_status ,s.dept_name from t_apply_safetychange d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -237,6 +239,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updatedate != null">updatedate = #{updatedate},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+            <if test="apNo != null">ap_no = #{apNo},</if>
+            <if test="processId != null">process_id = #{processId},</if>
         </trim>
         where id = #{id}
     </update>

+ 62 - 97
master/src/main/resources/processes/apply/safetychange.bpmn

@@ -1,97 +1,85 @@
 <?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">
+  <process id="safetychange" name="组织保护措施状态变更申请流程" isExecutable="true">
     <startEvent id="startevent1" name="Start"></startEvent>
-    <userTask id="usertask1" name="安全评估人"></userTask>
-    <sequenceFlow id="flow1" name="通过" sourceRef="usertask8" targetRef="usertask1">
+    <userTask id="safaertask1" name="安全评估人1" activiti:assignee="#{safaer}"></userTask>
+    <sequenceFlow id="flow1" name="通过" sourceRef="applytask" targetRef="safaertask1">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
     </sequenceFlow>
-    <userTask id="usertask2" name="批准人"></userTask>
-    <userTask id="usertask3" name="措施执行人"></userTask>
-    <sequenceFlow id="flow3" name="通过" sourceRef="usertask2" targetRef="usertask3">
+    <userTask id="approvertask" name="批准人" activiti:candidateUsers="#{approver}"></userTask>
+    <userTask id="executortask" name="措施执行人" activiti:assignee="#{executor}"></userTask>
+    <sequenceFlow id="flow3" name="通过" sourceRef="approvertask" targetRef="executortask">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
     </sequenceFlow>
-    <userTask id="usertask4" name="措施确认人"></userTask>
-    <sequenceFlow id="flow4" name="通过" sourceRef="usertask3" targetRef="usertask4">
+    <userTask id="confirmertask" name="措施确认人" activiti:assignee="#{confirmer}"></userTask>
+    <sequenceFlow id="flow4" name="通过" sourceRef="executortask" targetRef="confirmertask">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
     </sequenceFlow>
-    <userTask id="usertask5" name="变更执行人"></userTask>
-    <sequenceFlow id="flow5" name="通过" sourceRef="usertask4" targetRef="usertask5">
+    <userTask id="changetask" name="变更执行人" activiti:candidateUsers="#{changeExecutor}"></userTask>
+    <sequenceFlow id="flow5" name="通过" sourceRef="confirmertask" targetRef="changetask">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
     </sequenceFlow>
-    <userTask id="usertask6" name="确认人1"></userTask>
-    <sequenceFlow id="flow6" name="通过" sourceRef="usertask9" targetRef="usertask6">
+    <userTask id="resetConfirmer1" name="确认人1" activiti:assignee="#{resetConfirmer1}"></userTask>
+    <sequenceFlow id="flow6" name="通过" sourceRef="safaertask2" targetRef="resetConfirmer1">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
     </sequenceFlow>
-    <userTask id="usertask7" name="确认人2(安全评估人)"></userTask>
-    <sequenceFlow id="flow7" name="通过" sourceRef="usertask6" targetRef="usertask7"></sequenceFlow>
-    <userTask id="usertask8" name="申请人提交申请"></userTask>
-    <sequenceFlow id="flow8" sourceRef="startevent1" targetRef="usertask8"></sequenceFlow>
-    <sequenceFlow id="flow11" name="驳回" sourceRef="usertask1" targetRef="usertask8">
+    <userTask id="resetConfirmer2" name="确认人2" activiti:assignee="#{resetConfirmer2}"></userTask>
+    <sequenceFlow id="flow7" name="通过" sourceRef="resetConfirmer1" targetRef="resetConfirmer2"></sequenceFlow>
+    <userTask id="applytask" name="申请人提交申请" activiti:assignee="#{applyuser}"></userTask>
+    <sequenceFlow id="flow8" sourceRef="startevent1" targetRef="safaertask1"></sequenceFlow>
+    <sequenceFlow id="flow11" name="驳回" sourceRef="safaertask1" targetRef="applytask">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 2}]]></conditionExpression>
     </sequenceFlow>
-    <sequenceFlow id="flow12" name="通过" sourceRef="usertask1" targetRef="usertask2">
+    <sequenceFlow id="flow12" name="通过" sourceRef="safaertask1" targetRef="approvertask">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
     </sequenceFlow>
-    <sequenceFlow id="flow13" name="驳回" sourceRef="usertask2" targetRef="usertask1">
+    <sequenceFlow id="flow13" name="驳回" sourceRef="approvertask" targetRef="safaertask1">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 2}]]></conditionExpression>
     </sequenceFlow>
     <endEvent id="endevent1" name="End"></endEvent>
-    <sequenceFlow id="flow14" name="通过" sourceRef="usertask7" targetRef="endevent1">
+    <sequenceFlow id="flow14" name="通过" sourceRef="resetConfirmer2" targetRef="endevent1">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
     </sequenceFlow>
     <endEvent id="endevent2" name="End"></endEvent>
-    <sequenceFlow id="flow15" name="拒绝" sourceRef="usertask1" targetRef="endevent2">
+    <sequenceFlow id="flow15" name="拒绝" sourceRef="safaertask1" targetRef="endevent2">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 0}]]></conditionExpression>
     </sequenceFlow>
-    <sequenceFlow id="flow16" name="拒绝" sourceRef="usertask2" targetRef="endevent2">
+    <sequenceFlow id="flow16" name="拒绝" sourceRef="approvertask" targetRef="endevent2">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 0}]]></conditionExpression>
     </sequenceFlow>
-    <userTask id="usertask9" name="安全评估人"></userTask>
-    <sequenceFlow id="flow17" name="通过" sourceRef="usertask5" targetRef="usertask9">
+    <userTask id="safaertask2" name="安全评估人2" activiti:assignee="#{safaer}"></userTask>
+    <sequenceFlow id="flow17" name="通过" sourceRef="changetask" targetRef="safaertask2">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
     </sequenceFlow>
-    <textAnnotation id="textannotation1">
-      <text>开始</text>
-    </textAnnotation>
-    <association id="association1" sourceRef="textannotation1" targetRef="startevent1"></association>
-    <textAnnotation id="textannotation2">
-      <text>结束</text>
-    </textAnnotation>
-    <association id="association2" sourceRef="textannotation2" targetRef="endevent2"></association>
-    <textAnnotation id="textannotation3">
-      <text>结束</text>
-    </textAnnotation>
-    <association id="association3" sourceRef="textannotation3" targetRef="endevent1"></association>
   </process>
-  <bpmndi:BPMNDiagram id="BPMNDiagram_myProcess">
-    <bpmndi:BPMNPlane bpmnElement="myProcess" id="BPMNPlane_myProcess">
+  <bpmndi:BPMNDiagram id="BPMNDiagram_safetychange">
+    <bpmndi:BPMNPlane bpmnElement="safetychange" id="BPMNPlane_safetychange">
       <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
-        <omgdc:Bounds height="35.0" width="35.0" x="410.0" y="8.0"></omgdc:Bounds>
+        <omgdc:Bounds height="35.0" width="35.0" x="410.0" y="40.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
-        <omgdc:Bounds height="55.0" width="105.0" x="375.0" y="189.0"></omgdc:Bounds>
+      <bpmndi:BPMNShape bpmnElement="safaertask1" id="BPMNShape_safaertask1">
+        <omgdc:Bounds height="55.0" width="105.0" x="375.0" y="118.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">
+      <bpmndi:BPMNShape bpmnElement="approvertask" id="BPMNShape_approvertask">
         <omgdc:Bounds height="55.0" width="105.0" x="375.0" y="269.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">
+      <bpmndi:BPMNShape bpmnElement="executortask" id="BPMNShape_executortask">
         <omgdc:Bounds height="55.0" width="105.0" x="375.0" y="350.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask4" id="BPMNShape_usertask4">
+      <bpmndi:BPMNShape bpmnElement="confirmertask" id="BPMNShape_confirmertask">
         <omgdc:Bounds height="55.0" width="105.0" x="520.0" y="350.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask5" id="BPMNShape_usertask5">
+      <bpmndi:BPMNShape bpmnElement="changetask" id="BPMNShape_changetask">
         <omgdc:Bounds height="55.0" width="105.0" x="670.0" y="350.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask6" id="BPMNShape_usertask6">
+      <bpmndi:BPMNShape bpmnElement="resetConfirmer1" id="BPMNShape_resetConfirmer1">
         <omgdc:Bounds height="55.0" width="105.0" x="520.0" y="469.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask7" id="BPMNShape_usertask7">
+      <bpmndi:BPMNShape bpmnElement="resetConfirmer2" id="BPMNShape_resetConfirmer2">
         <omgdc:Bounds height="71.0" width="105.0" x="377.0" y="461.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask8" id="BPMNShape_usertask8">
-        <omgdc:Bounds height="55.0" width="105.0" x="375.0" y="89.0"></omgdc:Bounds>
+      <bpmndi:BPMNShape bpmnElement="applytask" id="BPMNShape_applytask">
+        <omgdc:Bounds height="55.0" width="105.0" x="670.0" y="118.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
         <omgdc:Bounds height="35.0" width="35.0" x="412.0" y="569.0"></omgdc:Bounds>
@@ -99,130 +87,107 @@
       <bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">
         <omgdc:Bounds height="35.0" width="35.0" x="620.0" y="279.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask9" id="BPMNShape_usertask9">
+      <bpmndi:BPMNShape bpmnElement="safaertask2" id="BPMNShape_safaertask2">
         <omgdc:Bounds height="55.0" width="105.0" x="670.0" y="469.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="textannotation1" id="BPMNShape_textannotation1">
-        <omgdc:Bounds height="50.0" width="100.0" x="479.0" y="1.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="textannotation2" id="BPMNShape_textannotation2">
-        <omgdc:Bounds height="50.0" width="100.0" x="684.0" y="272.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="textannotation3" id="BPMNShape_textannotation3">
-        <omgdc:Bounds height="50.0" width="100.0" x="485.0" y="562.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
-        <omgdi:waypoint x="427.0" y="144.0"></omgdi:waypoint>
-        <omgdi:waypoint x="427.0" y="189.0"></omgdi:waypoint>
+        <omgdi:waypoint x="670.0" y="145.0"></omgdi:waypoint>
+        <omgdi:waypoint x="480.0" y="145.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="100.0" x="427.0" y="144.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="556.0" y="150.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
         <omgdi:waypoint x="427.0" y="324.0"></omgdi:waypoint>
         <omgdi:waypoint x="427.0" y="350.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="100.0" x="427.0" y="324.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="427.0" y="324.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
         <omgdi:waypoint x="480.0" y="377.0"></omgdi:waypoint>
         <omgdi:waypoint x="520.0" y="377.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="100.0" x="480.0" y="377.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="480.0" y="377.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
         <omgdi:waypoint x="625.0" y="377.0"></omgdi:waypoint>
         <omgdi:waypoint x="670.0" y="377.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="100.0" x="625.0" y="377.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="625.0" y="377.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
         <omgdi:waypoint x="670.0" y="496.0"></omgdi:waypoint>
         <omgdi:waypoint x="625.0" y="496.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="100.0" x="631.0" y="496.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="631.0" y="496.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
         <omgdi:waypoint x="520.0" y="496.0"></omgdi:waypoint>
         <omgdi:waypoint x="482.0" y="496.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="100.0" x="491.0" y="496.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="491.0" y="496.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
-        <omgdi:waypoint x="427.0" y="43.0"></omgdi:waypoint>
-        <omgdi:waypoint x="427.0" y="89.0"></omgdi:waypoint>
+        <omgdi:waypoint x="427.0" y="75.0"></omgdi:waypoint>
+        <omgdi:waypoint x="427.0" y="118.0"></omgdi:waypoint>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
-        <omgdi:waypoint x="480.0" y="216.0"></omgdi:waypoint>
-        <omgdi:waypoint x="545.0" y="216.0"></omgdi:waypoint>
-        <omgdi:waypoint x="544.0" y="116.0"></omgdi:waypoint>
-        <omgdi:waypoint x="480.0" y="116.0"></omgdi:waypoint>
+        <omgdi:waypoint x="480.0" y="145.0"></omgdi:waypoint>
+        <omgdi:waypoint x="670.0" y="145.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="100.0" x="554.0" y="158.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="554.0" y="120.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
-        <omgdi:waypoint x="427.0" y="244.0"></omgdi:waypoint>
+        <omgdi:waypoint x="427.0" y="173.0"></omgdi:waypoint>
         <omgdi:waypoint x="427.0" y="269.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="100.0" x="427.0" y="244.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="427.0" y="173.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">
         <omgdi:waypoint x="375.0" y="296.0"></omgdi:waypoint>
         <omgdi:waypoint x="287.0" y="296.0"></omgdi:waypoint>
-        <omgdi:waypoint x="287.0" y="216.0"></omgdi:waypoint>
-        <omgdi:waypoint x="375.0" y="216.0"></omgdi:waypoint>
+        <omgdi:waypoint x="287.0" y="145.0"></omgdi:waypoint>
+        <omgdi:waypoint x="375.0" y="145.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="100.0" x="291.0" y="296.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="321.0" y="296.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14">
         <omgdi:waypoint x="429.0" y="532.0"></omgdi:waypoint>
         <omgdi:waypoint x="429.0" y="569.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="100.0" x="429.0" y="532.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="429.0" y="532.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge bpmnElement="flow15" id="BPMNEdge_flow15">
-        <omgdi:waypoint x="480.0" y="216.0"></omgdi:waypoint>
-        <omgdi:waypoint x="637.0" y="216.0"></omgdi:waypoint>
+        <omgdi:waypoint x="480.0" y="145.0"></omgdi:waypoint>
+        <omgdi:waypoint x="637.0" y="145.0"></omgdi:waypoint>
         <omgdi:waypoint x="637.0" y="279.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="100.0" x="568.0" y="217.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="606.0" y="210.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge bpmnElement="flow16" id="BPMNEdge_flow16">
         <omgdi:waypoint x="480.0" y="296.0"></omgdi:waypoint>
         <omgdi:waypoint x="620.0" y="296.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="100.0" x="522.0" y="296.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="522.0" y="296.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge bpmnElement="flow17" id="BPMNEdge_flow17">
         <omgdi:waypoint x="722.0" y="405.0"></omgdi:waypoint>
         <omgdi:waypoint x="722.0" y="469.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="100.0" x="722.0" y="405.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="722.0" y="405.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="association1" id="BPMNEdge_association1">
-        <omgdi:waypoint x="479.0" y="26.0"></omgdi:waypoint>
-        <omgdi:waypoint x="445.0" y="25.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="association2" id="BPMNEdge_association2">
-        <omgdi:waypoint x="684.0" y="297.0"></omgdi:waypoint>
-        <omgdi:waypoint x="655.0" y="296.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="association3" id="BPMNEdge_association3">
-        <omgdi:waypoint x="485.0" y="587.0"></omgdi:waypoint>
-        <omgdi:waypoint x="447.0" y="586.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
     </bpmndi:BPMNPlane>
   </bpmndi:BPMNDiagram>
 </definitions>

+ 42 - 42
ui/src/views/apply/safetychange/index.vue

@@ -52,17 +52,17 @@
         >修改
         </el-button>
       </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['apply:safetychange:remove']"
-        >删除
-        </el-button>
-      </el-col>
+      <!--      <el-col :span="1.5">
+              <el-button
+                type="danger"
+                icon="el-icon-delete"
+                size="mini"
+                :disabled="multiple"
+                @click="handleDelete"
+                v-hasPermi="['apply:safetychange:remove']"
+              >删除
+              </el-button>
+            </el-col>-->
       <!--        <el-col :span="1.5">
                   <el-button
                           type="info"
@@ -72,16 +72,16 @@
                           v-hasPermi="['apply:safetychange:edit']"
                   >导入</el-button>
               </el-col>-->
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['apply:safetychange:export']"
-        >导出
-        </el-button>
-      </el-col>
+      <!--      <el-col :span="1.5">
+              <el-button
+                type="warning"
+                icon="el-icon-download"
+                size="mini"
+                @click="handleExport"
+                v-hasPermi="['apply:safetychange:export']"
+              >导出
+              </el-button>
+            </el-col>-->
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -100,39 +100,40 @@
       </el-table-column>
       <el-table-column label="安全评估及临时的安全措施" align="center" prop="safa" :show-overflow-tooltip="true"
                        width="190"/>
-      <el-table-column label="安全评估人" align="center" prop="safaerName" :show-overflow-tooltip="true" width="160"/>
-      <el-table-column label="安全评估时间" align="center" prop="safaTime" width="140">
+      <el-table-column label="安全评估人(评估时间)" align="center" prop="safaerName" :show-overflow-tooltip="true"
+                       width="300">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.safaTime, '{y}-{m}-{d} {h}:{i}') }}</span>
+          <span>{{ scope.row.safaerName }} {{ parseTime(scope.row.safaTime, '{y}-{m}-{d} {h}:{i}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="批准人" align="center" prop="approverName" :show-overflow-tooltip="true" width="160"/>
-      <el-table-column label="批准时间" align="center" prop="approveTime" width="140">
+      <el-table-column label="批准人(批准时间)" align="center" prop="approverName" :show-overflow-tooltip="true"
+                       width="300">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.approveTime, '{y}-{m}-{d} {h}:{i}') }}</span>
+          <span>{{ scope.row.approverName }} {{ parseTime(scope.row.approveTime, '{y}-{m}-{d} {h}:{i}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="临时安全措施执行人" align="center" prop="executorName" :show-overflow-tooltip="true"
-                       width="160"/>
-      <el-table-column label="临时安全措施执行时间" align="center" prop="executionTime" width="160">
+      <el-table-column label="临时安全措施执行人(执行时间)" align="center" prop="executorName"
+                       :show-overflow-tooltip="true"
+                       width="300">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.executionTime, '{y}-{m}-{d} {h}:{i}') }}</span>
+          <span>{{ scope.row.executorName }} {{ parseTime(scope.row.executionTime, '{y}-{m}-{d} {h}:{i}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="临时安全措施确认人" align="center" prop="confirmerName" :show-overflow-tooltip="true"
-                       width="160"/>
-      <el-table-column label="临时安全措施确认时间" align="center" prop="confirmTime" width="160">
+      <el-table-column label="临时安全措施确认人(确认时间)" align="center" prop="confirmerName"
+                       :show-overflow-tooltip="true"
+                       width="300">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.confirmTime, '{y}-{m}-{d} {h}:{i}') }}</span>
+          <span>{{ scope.row.confirmerName }} {{ parseTime(scope.row.confirmTime, '{y}-{m}-{d} {h}:{i}') }}</span>
         </template>
       </el-table-column>
       <el-table-column label="组织保护措施状态变更执行" align="center" prop="changeExecution"
                        :show-overflow-tooltip="true" width="200"/>
-      <el-table-column label="执行人" align="center" prop="changeExecutorName" :show-overflow-tooltip="true"
-                       width="160"/>
-      <el-table-column label="执行时间" align="center" prop="changeExecutorTime" width="140">
+      <el-table-column label="执行人(执行时间)" align="center" prop="changeExecutorName" :show-overflow-tooltip="true"
+                       width="300">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.changeExecutorTime, '{y}-{m}-{d} {h}:{i}') }}</span>
+          <span>{{ scope.row.changeExecutorName }} {{
+              parseTime(scope.row.changeExecutorTime, '{y}-{m}-{d} {h}:{i}')
+            }}</span>
         </template>
       </el-table-column>
       <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" width="200"/>
@@ -298,7 +299,7 @@
           </template>
         </el-descriptions-item>
         <el-descriptions-item label="组织保护措施状态变更执行" :span="2" :label-style="labelStyle">
-          {{ this.detail.data.confirmerName }}
+          {{ this.detail.data.changeExecution }}
         </el-descriptions-item>
         <el-descriptions-item label="执行人" :label-style="labelStyle">
           {{ this.detail.data.changeExecutorName }}
@@ -481,7 +482,6 @@ export default {
     })
     this.getList();
     this.getTreeselect();
-    ;
     this.getDicts("apply_status").then(response => {
       this.statusList = response.data;
     });
@@ -550,7 +550,7 @@ export default {
       } else if (row.approveStatus === '3') {
         type = 'danger';
       }
-      return <el-tag type={type}>{s}</el-tag> ;
+      return <el-tag type={type}>{s}</el-tag>;
     },
     todoMethod() {
       this.$confirm('功能开发中......', "", {

+ 4 - 5
ui/src/views/approve/approveDetail/offlinevalve-detail.vue

@@ -292,10 +292,10 @@ export default {
       getOfflinevalve(id).then(res => {
         this.dataForm = res.data;
         this.devList.push(this.dataForm);
-        if (taskName=='申请人提交申请'){
-          this.form.devNo=res.data.devNo;
-          this.form.offlineReason=res.data.offlineReason;
-          this.form.unit=res.data.unit;
+        if (taskName == '申请人提交申请') {
+          this.form.devNo = res.data.devNo;
+          this.form.offlineReason = res.data.offlineReason;
+          this.form.unit = res.data.unit;
         }
       });
       this.getDicts("apply_status").then(response => {
@@ -310,7 +310,6 @@ export default {
       });
       listUserPost({
         actualposts: "12",
-        deptId: 103
       }).then(response => {
         this.infoConfirmerList = response;
       });

+ 261 - 0
ui/src/views/approve/approveDetail/safetychange-detail.vue

@@ -0,0 +1,261 @@
+<template>
+  <el-dialog
+    :title="!this.taskForm.taskId == '' ? $t('处理') : $t('详情')"
+    :close-on-click-modal="false"
+    :visible.sync="visible"
+    :append-to-body="true"
+    width="60%">
+    <el-table :data="devList" border>
+      <el-table-column label="组织保护措施变更描述" align="center" prop="changeDescribe" :show-overflow-tooltip="true"
+                       fixed="left" width="160"/>
+      <el-table-column label="状态变更的原因" align="center" prop="changeReason" :show-overflow-tooltip="true"
+                       width="160"/>
+      <el-table-column label="申请人" align="center" prop="applicantName" :show-overflow-tooltip="true" width="160"/>
+      <el-table-column label="申请时间" align="center" prop="applicationTime" width="140">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.applicationTime, '{y}-{m}-{d} {h}:{i}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="安全评估及临时的安全措施" align="center" prop="safa" :show-overflow-tooltip="true"
+                       width="190"/>
+      <el-table-column label="安全评估人(评估时间)" align="center" prop="safaerName" :show-overflow-tooltip="true"
+                       width="300">
+        <template slot-scope="scope">
+          <span>{{ scope.row.safaerName }} {{ parseTime(scope.row.safaTime, '{y}-{m}-{d} {h}:{i}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="批准人(批准时间)" align="center" prop="approverName" :show-overflow-tooltip="true"
+                       width="300">
+        <template slot-scope="scope">
+          <span>{{ scope.row.approverName }} {{ parseTime(scope.row.approveTime, '{y}-{m}-{d} {h}:{i}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="临时安全措施执行人(执行时间)" align="center" prop="executorName"
+                       :show-overflow-tooltip="true"
+                       width="300">
+        <template slot-scope="scope">
+          <span>{{ scope.row.executorName }} {{ parseTime(scope.row.executionTime, '{y}-{m}-{d} {h}:{i}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="临时安全措施确认人(确认时间)" align="center" prop="confirmerName"
+                       :show-overflow-tooltip="true"
+                       width="300">
+        <template slot-scope="scope">
+          <span>{{ scope.row.confirmerName }} {{ parseTime(scope.row.confirmTime, '{y}-{m}-{d} {h}:{i}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="组织保护措施状态变更执行" align="center" prop="changeExecution"
+                       :show-overflow-tooltip="true" width="200"/>
+      <el-table-column label="执行人(执行时间)" align="center" prop="changeExecutorName" :show-overflow-tooltip="true"
+                       width="300">
+        <template slot-scope="scope">
+          <span>{{ scope.row.changeExecutorName }} {{
+              parseTime(scope.row.changeExecutorTime, '{y}-{m}-{d} {h}:{i}')
+            }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" width="200"/>
+      <el-table-column label="申请状态" align="center" prop="approveStatus" :show-overflow-tooltip="true" fixed="left"
+                       width="85" :formatter="approveStatusFormat"/>
+      <el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true" fixed="left"
+                       width="85" :formatter="statusFormat"/>
+    </el-table>
+    <el-form ref="form" :model="form" label-position="left" :rules="rules" label-width="140px"
+             style="margin-top: 30px">
+      <div v-if="flag">
+        <el-form-item label="审批意见" prop="remarks" v-if="taskName!='申请人提交申请'">
+          <el-input type="textarea" v-model="form.remarks"/>
+        </el-form-item>
+        <div v-if="taskName=='安全评估人2'">
+          <el-form-item label="组织保护措施是否已经恢复至变更前的状态" prop="resetConfirm" label-width="300px">
+            <el-radio-group v-model="form.resetConfirm">
+              <el-radio label="是">是</el-radio>
+              <el-radio label="否">否</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item label="确认人" prop="resetConfirmer1">
+            <el-select v-model="form.resetConfirmer1" placeholder="请选择确认人" clearable size="small" filterable
+                       style="width: 100%">
+              <el-option
+                v-for="item in resetConfirmerList"
+                :key="item.userId"
+                :label="item.nickName"
+                :value="item.userId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </div>
+      </div>
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button v-if="!this.taskForm.taskId == ''&&(this.taskName=='安全评估人1'||this.taskName=='批准人')"
+                 type="warning"
+                 @click="dataFormSubmit(2)" :disabled="submitDisabled">{{ $t('驳回') }}</el-button>
+      <el-button v-if="!this.taskForm.taskId == ''" type="primary"
+                 @click="dataFormSubmit(1)"
+                 :disabled="submitDisabled">{{ $t(taskName != '申请人提交申请' ? '通过' : '提交') }}</el-button>
+      <el-button v-if="!this.taskForm.taskId == ''&&(this.taskName=='安全评估人1'||this.taskName=='批准人')"
+                 type="danger"
+                 @click="dataFormSubmit(0)" :disabled="submitDisabled">{{ $t('拒绝') }}</el-button>
+      <el-button @click="visible = false">{{ $t('返回') }}</el-button>
+    </span>
+    <div>
+      <span>{{ $t('流转详情') }}</span>
+      <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="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-column prop="comment" header-align="center" align="center"
+                         :label="$t('审批意见')"></el-table-column>
+      </el-table>
+
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+
+import {getSafetychange} from "@/api/apply/safetychange";
+import {getHistorylist} from "@/api/ehs/approvedanger";
+import {listUserPost} from "@/api/system/user";
+
+export default {
+  name: "safetychange-detail",
+  data() {
+    return {
+      flag: false,
+      visible: false,
+      resetConfirmerList: [],
+      statusList: [],
+      approveStatusList: [],
+      //流转列表
+      historyList: [],
+      historyLoading: true,
+      submitDisabled: false,
+      taskName: '',
+      devList: [],
+      form: {},
+      rules: {
+        resetConfirmer1: [{required: true, message: "请选择确认人", trigger: "blur"}]
+      },
+      dataForm: {
+        id: null,
+        changeDescribe: null,
+        changeReason: null,
+        applicant: null,
+        applicantName: null,
+        applicationTime: null,
+        safa: null,
+        safaer: null,
+        safaerName: null,
+        safaTime: null,
+        approver: null,
+        approverName: null,
+        approveTime: null,
+        executor: null,
+        executorName: null,
+        executionTime: null,
+        confirmer: null,
+        confirmerName: null,
+        confirmTime: null,
+        changeExecution: null,
+        changeExecutor: null,
+        changeExecutorName: null,
+        changeExecutorTime: null,
+        resetConfirm: null,
+        resetConfirmer1: null,
+        resetConfirmerName1: null,
+        resetConfirmTime1: null,
+        resetConfirmer2: null,
+        resetConfirmerName2: null,
+        resetConfirmTime2: null,
+        revokeConfirm: null,
+        remarks: null,
+        status: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        deptId: null,
+        approveStatus: null,
+        apNo: null,
+        processId: null
+      },
+      taskForm: {
+        comment: '',
+        taskId: '',
+        files: '',
+        govDate: '',
+        govFileList: [],
+        businessKey: '',
+        offlinevalve: {}
+      },
+    }
+  },
+  methods: {
+    init(id, taskId, processId, taskName, flag) {
+      this.submitDisabled = false;
+      this.flag = flag;
+      this.devList = [];
+      this.visible = true;
+      this.taskForm.taskId = taskId;
+      this.taskName = taskName;
+      getSafetychange(id).then(res => {
+        this.dataForm = res.data;
+        this.devList.push(this.dataForm);
+      });
+      this.getDicts("apply_status").then(response => {
+        this.statusList = response.data;
+      });
+      this.getDicts("apply_approve_status").then(response => {
+        this.approveStatusList = response.data;
+      });
+      getHistorylist({processId: processId}).then(response => {
+        this.historyList = response.rows;
+        this.historyLoading = false
+      });
+      listUserPost({
+        actualposts: "12",
+      }).then(response => {
+        this.resetConfirmerList = response;
+      });
+    },
+    statusFormat(row, column) {
+      let s = this.selectDictLabel(this.statusList, row.status);
+      let type = '';
+      if (row.status === 1) {
+        type = 'success';
+      }
+      return <el-tag type={type}>{s}</el-tag>;
+    },
+    // 字典翻译
+    approveStatusFormat(row, column) {
+      let s = this.selectDictLabel(this.approveStatusList, row.approveStatus)
+      let type = '';
+      if (row.approveStatus === '2') {
+        type = 'success';
+      } else if (row.approveStatus === '1') {
+        type = 'warning';
+      } else if (row.approveStatus === '3') {
+        type = 'danger';
+      }
+      return <el-tag type={type}>{s}</el-tag>;
+    },
+    dataFormSubmit(val) {
+      this.$refs["form"].validate(valid => {
+        if (valid || val != 1) {
+          this.submitDisabled = true;
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 11 - 1
ui/src/views/approve/myapprove/index.vue

@@ -55,6 +55,7 @@
     <kekao-detail v-if="kekaoDetailVisible" ref="kekaoDetail" @refreshDataList="getList"></kekao-detail>
     <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>
   </div>
 </template>
 
@@ -72,10 +73,13 @@
   import KekaoDetail from "@/views/approve/approveDetail/kekao-detail";
   import InvoiceDetail from "@/views/approve/approveDetail/invoice-detail";
   import OfflinevalveDetail from "@/views/approve/approveDetail/offlinevalve-detail";
+  import SafetychangeDetail from "@/views/approve/approveDetail/safetychange-detail";
 
   export default {
     name: "Myapprove",
-    components: {OfflinevalveDetail, Treeselect,ProcessImg,AddOrUpdate,SpecModify,SpecTrainingPlan,SpecMaintenance,IntactDetail,KekaoDetail,InvoiceDetail},
+    components: {
+      SafetychangeDetail,
+      OfflinevalveDetail, Treeselect,ProcessImg,AddOrUpdate,SpecModify,SpecTrainingPlan,SpecMaintenance,IntactDetail,KekaoDetail,InvoiceDetail},
     data() {
       return {
         // 遮罩层
@@ -89,6 +93,7 @@
         kekaoDetailVisible:false,
         invoiceDetailVisible:false,
         offlinevalveDetailVisible:false,
+        safetychangeDetailVisible:false,
         // 选中数组
         ids: [],
         // 非单个禁用
@@ -222,6 +227,11 @@
           this.$nextTick(() => {
             this.$refs.offlinevalveDetail.init(row.approveObject.id, row.taskId, row.processId, row.taskName)
           })
+        } else if (row.processName == "组织保护措施状态变更申请流程") {
+          this.safetychangeDetailVisible = true
+          this.$nextTick(() => {
+            this.$refs.safetychangeDetail.init(row.approveObject.id, row.taskId, row.processId, row.taskName)
+          })
         }  else {
           this.approveInfo = row;
           this.infoTaskName = row.taskName;

+ 9 - 0
ui/src/views/approve/pending/index.vue

@@ -130,6 +130,7 @@
     <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>
   </div>
 </template>
 
@@ -149,10 +150,12 @@
   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";
 
   export default {
     name: "Pending",
     components: {
+      SafetychangeDetail,
       OfflinevalveDetail,
       Treeselect,
       AddOrUpdate,
@@ -180,6 +183,7 @@
         specMaintenanceVisible: false,
         invoiceDetailVisible:false,
         offlinevalveDetailVisible:false,
+        safetychangeDetailVisible:false,
         // 选中数组
         ids: [],
         // 非单个禁用
@@ -403,6 +407,11 @@
           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 {
           this.approveInfo = row;
           this.infoTaskName = row.taskName;

+ 8 - 0
ui/src/views/approve/taskdone/index.vue

@@ -59,6 +59,7 @@
     <kekao-detail v-if="kekaoDetailVisible" ref="kekaoDetail" @refreshDataList="getList"></kekao-detail>
     <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>
   </div>
 </template>
 
@@ -77,9 +78,11 @@
   import KekaoDetail from "@/views/approve/approveDetail/kekao-detail";
   import InvoiceDetail from "@/views/approve/approveDetail/invoice-detail";
   import OfflinevalveDetail from "@/views/approve/approveDetail/offlinevalve-detail";
+  import SafetychangeDetail from "@/views/approve/approveDetail/safetychange-detail";
   export default {
     name: "Taskdone",
     components: {
+      SafetychangeDetail,
       OfflinevalveDetail,
       Treeselect, AddOrUpdate,ProcessImg,SpecModify,SpecTrainingPlan,SpecMaintenance,IntactDetail,KekaoDetail,InvoiceDetail
     },
@@ -237,6 +240,11 @@
           this.$nextTick(() => {
             this.$refs.offlinevalveDetail.init(row.approveObject.id, row.taskId, row.processId, row.taskName)
           })
+        } else if (row.processName == "组织保护措施状态变更申请流程") {
+          this.safetychangeDetailVisible = true
+          this.$nextTick(() => {
+            this.$refs.safetychangeDetail.init(row.approveObject.id, row.taskId, row.processId, row.taskName)
+          })
         }else {
           this.approveInfo = row;
           this.infoTaskName = row.taskName;