jiangbiao 2 anni fa
parent
commit
87bc3d7ad4

+ 50 - 43
master/src/main/java/com/ruoyi/project/apply/controller/TApplyOfflinevalveController.java

@@ -108,8 +108,8 @@ public class TApplyOfflinevalveController extends BaseController {
         tApplyOfflinevalve.setApplicationTime(new Date());
         tApplyOfflinevalve.setCreatedate(new Date());
         tApplyOfflinevalve.setCreaterCode(userId.toString());
-        if(StringUtils.isNotEmpty(tApplyOfflinevalve.getRemarks())&&(!tApplyOfflinevalve.getRemarks().endsWith(";")||!tApplyOfflinevalve.getRemarks().endsWith(";")))
-            tApplyOfflinevalve.setRemarks(tApplyOfflinevalve.getRemarks()+";");
+        if (StringUtils.isNotEmpty(tApplyOfflinevalve.getRemarks()) && (!tApplyOfflinevalve.getRemarks().endsWith(";") || !tApplyOfflinevalve.getRemarks().endsWith(";")))
+            tApplyOfflinevalve.setRemarks(tApplyOfflinevalve.getRemarks() + ";");
         tApplyOfflinevalveService.insertTApplyOfflinevalve(tApplyOfflinevalve);
 
         // 开始申请流程
@@ -165,9 +165,9 @@ public class TApplyOfflinevalveController extends BaseController {
         }
         //流程审批意见
         String symbol = "";
-        String text="";
+        String text = "";
         if (StringUtils.isNotEmpty(form.getRemarks())) {
-             text = form.getRemarks();
+            text = form.getRemarks();
             symbol = ",";
             form.setRemarks(remarks + taskName + "-" + getNickName() + ":" + form.getRemarks() + ";");
         } else
@@ -223,14 +223,14 @@ public class TApplyOfflinevalveController extends BaseController {
                 form.setInfoConfirmerName(getNickName());
                 form.setConfirmTime(new Date());
                 // 如果上锁确认人1不为空上锁确认人2即信息确认人2
-                if (StringUtils.isNotEmpty(tApplyOfflinevalve.getLockConfirmer1())) {
-                    form.setLockConfirmer2(getUserId().toString());
-                    form.setLockConfirmer2Name(getNickName());
-                } else {
-                    form.setLockConfirm("NA");//否则确认是否已上锁为NA
-                }
                 if ("信息确认人2".equals(task.getName())) {
                     form.setStatus(1L);//信息确认人2确认后申请单状态为已完成
+                    if (StringUtils.isNotEmpty(tApplyOfflinevalve.getLockConfirmer1())) {
+                        form.setLockConfirmer2(getUserId().toString());
+                        form.setLockConfirmer2Name(getNickName());
+                    } else {
+                        form.setLockConfirm("NA");//否则确认是否已上锁为NA
+                    }
                 }
                 param.put("lockConfirmer", form.getLockConfirmer1());//设置上锁确认人
                 form.setLockConfirmer1(null);
@@ -306,7 +306,6 @@ public class TApplyOfflinevalveController extends BaseController {
     }
 
 
-
     /**
      * 生成word
      */
@@ -337,8 +336,9 @@ public class TApplyOfflinevalveController extends BaseController {
             SysUser sysUser = userService.selectUserById(Long.parseLong(tApplyOfflinevalve.getExecutor()));
             if (sysUser.getSignUrl() != null && new File(fileName(sysUser.getSignUrl())).exists()) {
                 params.put("execP", Pictures.ofLocal(fileName(sysUser.getSignUrl())).size(50, 20).create());
-            }else {
-            params.put("executor", Texts.of(sysUser.getNickName()).fontSize(10).bold().create());}
+            } else {
+                params.put("executor", Texts.of(sysUser.getNickName()).fontSize(10).bold().create());
+            }
         }
         if (tApplyOfflinevalve.getExecutionTime() != null) {//临时措施执行时间
             params.put("execT", Texts.of(DateUtils.dateTimeMin(tApplyOfflinevalve.getExecutionTime())).fontSize(9).bold().create());
@@ -347,8 +347,9 @@ public class TApplyOfflinevalveController extends BaseController {
             SysUser sysUser = userService.selectUserById(Long.parseLong(tApplyOfflinevalve.getConfirmer()));
             if (sysUser.getSignUrl() != null && new File(fileName(sysUser.getSignUrl())).exists()) {
                 params.put("tpP", Pictures.ofLocal(fileName(sysUser.getSignUrl())).size(50, 20).create());
-            }else {
-            params.put("confirmer", Texts.of(sysUser.getNickName()).fontSize(10).bold().create());}
+            } else {
+                params.put("confirmer", Texts.of(sysUser.getNickName()).fontSize(10).bold().create());
+            }
         }
         if (tApplyOfflinevalve.getTemporaryTime() != null) {//临时措施确认时间
             params.put("tpT", Texts.of(DateUtils.dateTimeMin(tApplyOfflinevalve.getTemporaryTime())).fontSize(9).bold().create());
@@ -357,7 +358,7 @@ public class TApplyOfflinevalveController extends BaseController {
             SysUser sysUser = userService.selectUserById(Long.parseLong(tApplyOfflinevalve.getApplicant()));
             if (sysUser.getSignUrl() != null && new File(fileName(sysUser.getSignUrl())).exists()) {
                 params.put("applicantP", Pictures.ofLocal(fileName(sysUser.getSignUrl())).size(50, 20).create());
-            }else {
+            } else {
                 params.put("applicant", Texts.of(sysUser.getNickName()).fontSize(10).bold().create());
             }
         }
@@ -368,7 +369,7 @@ public class TApplyOfflinevalveController extends BaseController {
             SysUser sysUser = userService.selectUserById(Long.parseLong(tApplyOfflinevalve.getApprover()));
             if (sysUser.getSignUrl() != null && new File(fileName(sysUser.getSignUrl())).exists()) {
                 params.put("approverP", Pictures.ofLocal(fileName(sysUser.getSignUrl())).size(50, 20).create());
-            }else {
+            } else {
                 params.put("approver", Texts.of(sysUser.getNickName()).fontSize(10).bold().create());
             }
         }
@@ -379,34 +380,37 @@ public class TApplyOfflinevalveController extends BaseController {
             SysUser sysUser = userService.selectUserById(Long.parseLong(tApplyOfflinevalve.getLockConfirmer1()));
             if (sysUser.getSignUrl() != null && new File(fileName(sysUser.getSignUrl())).exists()) {
                 params.put("lockConfirmer1P", Pictures.ofLocal(fileName(sysUser.getSignUrl())).size(50, 20).create());
-            }else {
-            params.put("lockConfirmer1", Texts.of(sysUser.getNickName()).fontSize(10).bold().create());}
+            } else {
+                params.put("lockConfirmer1", Texts.of(sysUser.getNickName()).fontSize(10).bold().create());
+            }
         }
         if (StringUtils.isNotEmpty(tApplyOfflinevalve.getLockConfirmer2())) {
             SysUser sysUser = userService.selectUserById(Long.parseLong(tApplyOfflinevalve.getLockConfirmer2()));
             if (sysUser.getSignUrl() != null && new File(fileName(sysUser.getSignUrl())).exists()) {
                 params.put("lockConfirmer2P", Pictures.ofLocal(fileName(sysUser.getSignUrl())).size(50, 20).create());
-            }else {
-            params.put("lockConfirmer2", Texts.of(sysUser.getNickName()).fontSize(10).bold().create());}
+            } else {
+                params.put("lockConfirmer2", Texts.of(sysUser.getNickName()).fontSize(10).bold().create());
+            }
         }
         if (StringUtils.isNotEmpty(tApplyOfflinevalve.getInfoConfirmer())) {
             SysUser sysUser = userService.selectUserById(Long.parseLong(tApplyOfflinevalve.getInfoConfirmer()));
             if (sysUser.getSignUrl() != null && new File(fileName(sysUser.getSignUrl())).exists()) {
                 params.put("infoConfirmerP", Pictures.ofLocal(fileName(sysUser.getSignUrl())).size(50, 20).create());
-            }else {
-            params.put("infoConfirmer", Texts.of(sysUser.getNickName()).fontSize(10).bold().create());}
+            } else {
+                params.put("infoConfirmer", Texts.of(sysUser.getNickName()).fontSize(10).bold().create());
+            }
         }
         if (tApplyOfflinevalve.getConfirmTime() != null) {//确认时间
             params.put("confirmTime", Texts.of(DateUtils.dateTimeMin(tApplyOfflinevalve.getConfirmTime())).fontSize(9).bold().create());
         }
         params.put("remarks", Texts.of(tApplyOfflinevalve.getRemarks()).fontSize(10).bold().create());
-        getCheck(params,tApplyOfflinevalve.getDisassembly(),"d1" ,"d2");
-        getCheck(params,tApplyOfflinevalve.getDisassembly(),"d3");
-        getCheck(params,tApplyOfflinevalve.getResetConfirm(),"reset1" ,"reset2");
-        getCheck(params,tApplyOfflinevalve.getLeakConfirm(),"leak1" ,"leak2");
-        getCheck(params,tApplyOfflinevalve.getRevokeConfirm(),"revoke1" ,"revoke2");
-        getCheck(params,tApplyOfflinevalve.getLockConfirm(),"lock1" ,"lock2");
-        getCheck(params,tApplyOfflinevalve.getLockConfirm(),"lock3");
+        getCheck(params, tApplyOfflinevalve.getDisassembly(), "d1", "d2");
+        getCheck(params, tApplyOfflinevalve.getDisassembly(), "d3");
+        getCheck(params, tApplyOfflinevalve.getResetConfirm(), "reset1", "reset2");
+        getCheck(params, tApplyOfflinevalve.getLeakConfirm(), "leak1", "leak2");
+        getCheck(params, tApplyOfflinevalve.getRevokeConfirm(), "revoke1", "revoke2");
+        getCheck(params, tApplyOfflinevalve.getLockConfirm(), "lock1", "lock2");
+        getCheck(params, tApplyOfflinevalve.getLockConfirm(), "lock3");
         // 渲染文本
         return params;
     }
@@ -427,7 +431,7 @@ public class TApplyOfflinevalveController extends BaseController {
             logger.info("目录不存在,创建文件夹{}!", fileDir);
             dir.mkdirs();
         }
-        fileName = fileName.replaceAll("/" , "_"); //替换文件中敏感字段
+        fileName = fileName.replaceAll("/", "_"); //替换文件中敏感字段
         logger.info("目录文件{}!", fileName);
         String filePath = fileDir + "/" + fileName;
         logger.info("目录{}!", filePath);
@@ -445,27 +449,30 @@ public class TApplyOfflinevalveController extends BaseController {
         String pathFileName = FileUploadUtils.getPathFileName(RuoYiConfig.getFilePath("/" + "apply/applyOfflinevalve"), fileName);
         return pathFileName;
     }
+
     // 勾选框判断渲染
-    public void getCheck (Map<String, Object> params, String value , String check1 , String check2){
+    public void getCheck(Map<String, Object> params, String value, String check1, String check2) {
         if ("是".equals(value)) {
-            params.put(check1,new TextRenderData("\u00FE",new Style("Wingdings",9)));
-            params.put(check2,new TextRenderData("\u006F",new Style("Wingdings",9)));
-        }else if ("否".equals(value)) {
-            params.put(check1,new TextRenderData("\u006F",new Style("Wingdings",9)));
-            params.put(check2,new TextRenderData("\u00FE",new Style("Wingdings",9)));
-        }else {
-            params.put(check1,new TextRenderData("\u006F",new Style("Wingdings",9)));
-            params.put(check2,new TextRenderData("\u006F",new Style("Wingdings",9)));
+            params.put(check1, new TextRenderData("\u00FE", new Style("Wingdings", 9)));
+            params.put(check2, new TextRenderData("\u006F", new Style("Wingdings", 9)));
+        } else if ("否".equals(value)) {
+            params.put(check1, new TextRenderData("\u006F", new Style("Wingdings", 9)));
+            params.put(check2, new TextRenderData("\u00FE", new Style("Wingdings", 9)));
+        } else {
+            params.put(check1, new TextRenderData("\u006F", new Style("Wingdings", 9)));
+            params.put(check2, new TextRenderData("\u006F", new Style("Wingdings", 9)));
         }
     }
+
     // 勾选框判断渲染
-    public void getCheck (Map<String, Object> params, String value , String check1){
+    public void getCheck(Map<String, Object> params, String value, String check1) {
         if ("NA".equals(value)) {
-            params.put(check1,new TextRenderData("\u00FE",new Style("Wingdings",9)));
+            params.put(check1, new TextRenderData("\u00FE", new Style("Wingdings", 9)));
         } else {
-            params.put(check1,new TextRenderData("\u006F",new Style("Wingdings",9)));
+            params.put(check1, new TextRenderData("\u006F", new Style("Wingdings", 9)));
         }
     }
+
     /**
      * @param
      * @return 映射签名的文件名

+ 12 - 1
master/src/main/java/com/ruoyi/project/apply/controller/TApplySafetychangeController.java

@@ -76,7 +76,7 @@ public class TApplySafetychangeController extends BaseController {
 
     @GetMapping("/listChangeDescribe")
     public AjaxResult listChangeDescribe(TApplySafetychange tApplySafetychange) {
-        List<TApplySafetychange> list = tApplySafetychangeService.selectTApplySafetychangeList(tApplySafetychange);
+        List<TApplySafetychange> list = tApplySafetychangeService.selectChangeDescribe(tApplySafetychange);
         return AjaxResult.success(list);
     }
 
@@ -159,6 +159,17 @@ public class TApplySafetychangeController extends BaseController {
         logger.info("流程实例id:" + pi.getProcessInstanceId());
         tApplySafetychange.setProcessId(pi.getProcessInstanceId());
         tApplySafetychangeService.updateTApplySafetychange(tApplySafetychange);
+
+        // 申请人申请直接通过
+        ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
+        TaskService taskService = processEngine.getTaskService();
+        Task task = taskService.createTaskQuery().processInstanceId(pi.getProcessInstanceId()).active().singleResult();
+        String taskId = task.getId();
+        processEngine.getTaskService().claim(taskId, getUserId().toString());
+        taskService.addComment(taskId, pi.getProcessInstanceId(), "");
+        Map<String, Object> param = new HashMap<>();
+        param.put("condition", "1");
+        taskService.complete(taskId, param);
         return toAjax(1);
     }
 

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

@@ -213,7 +213,7 @@
             <if test="lockConfirmer2 != null">lock_confirmer2 = #{lockConfirmer2},</if>
             <if test="infoConfirmer != null">info_confirmer = #{infoConfirmer},</if>
             <if test="confirmTime != null">confirm_time = #{confirmTime},</if>
-            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="remarks != null and remarks != ''" >remarks = #{remarks},</if>
             <if test="temporaryTime != null">temporary_time = #{temporaryTime},</if>
             <if test="executionTime != null">execution_time = #{executionTime},</if>
             <if test="status != null">status = #{status},</if>

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

@@ -104,13 +104,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="selectChangeDescribe" parameterType="TApplySafetychange" resultMap="TApplySafetychangeResult">
-        <include refid="selectTApplySafetychangeVo"/>
+        select distinct(change_describe) from  t_apply_safetychange d
+        left join sys_dept s on s.dept_id = d.dept_id
         <where>
-
+            and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
         ${params.dataScope}
-        order by createdate desc
     </select>
 
     <select id="selectTApplySafetychangeById" parameterType="Long" resultMap="TApplySafetychangeResult">
@@ -242,7 +242,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="resetConfirmerName2 != null">reset_confirmer_name2 = #{resetConfirmerName2},</if>
             <if test="resetConfirmTime2 != null">reset_confirm_time2 = #{resetConfirmTime2},</if>
             <if test="revokeConfirm != null">revoke_confirm = #{revokeConfirm},</if>
-            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="remarks != null and remarks != ''">remarks = #{remarks},</if>
             <if test="status != null">status = #{status},</if>
             <if test="delFlag != null">del_flag = #{delFlag},</if>
             <if test="updaterCode != null">updater_code = #{updaterCode},</if>

+ 74 - 75
master/src/main/resources/processes/apply/safetychange.bpmn

@@ -3,10 +3,7 @@
   <process id="safetychange" name="组织保护措施状态变更申请流程" isExecutable="true">
     <startEvent id="startevent1" name="Start"></startEvent>
     <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="approvertask" name="批准人" activiti:candidateUsers="#{approver}"></userTask>
+    <userTask id="approvertask" name="批准人" activiti:assignee="#{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>
@@ -15,7 +12,7 @@
     <sequenceFlow id="flow4" name="通过" sourceRef="executortask" targetRef="confirmertask">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
     </sequenceFlow>
-    <userTask id="changetask" name="变更执行人" activiti:candidateUsers="#{changeExecutor}"></userTask>
+    <userTask id="changetask" name="变更执行人" activiti:assignee="#{changeExecutor}"></userTask>
     <sequenceFlow id="flow5" name="通过" sourceRef="confirmertask" targetRef="changetask">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
     </sequenceFlow>
@@ -26,10 +23,6 @@
     <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="safaertask1" targetRef="approvertask">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
     </sequenceFlow>
@@ -51,141 +44,147 @@
     <sequenceFlow id="flow17" name="通过" sourceRef="changetask" targetRef="safaertask2">
       <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
     </sequenceFlow>
+    <sequenceFlow id="flow18" sourceRef="startevent1" targetRef="applytask"></sequenceFlow>
+    <sequenceFlow id="flow19" sourceRef="applytask" targetRef="safaertask1">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="flow20" name="驳回" sourceRef="safaertask1" targetRef="applytask">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 2}]]></conditionExpression>
+    </sequenceFlow>
   </process>
   <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="40.0"></omgdc:Bounds>
+        <omgdc:Bounds height="35.0" width="35.0" x="410.0" y="1.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape bpmnElement="safaertask1" id="BPMNShape_safaertask1">
-        <omgdc:Bounds height="55.0" width="105.0" x="375.0" y="118.0"></omgdc:Bounds>
+        <omgdc:Bounds height="55.0" width="105.0" x="375.0" y="219.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape bpmnElement="approvertask" id="BPMNShape_approvertask">
-        <omgdc:Bounds height="55.0" width="105.0" x="375.0" y="269.0"></omgdc:Bounds>
+        <omgdc:Bounds height="55.0" width="105.0" x="375.0" y="343.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape bpmnElement="executortask" id="BPMNShape_executortask">
-        <omgdc:Bounds height="55.0" width="105.0" x="375.0" y="350.0"></omgdc:Bounds>
+        <omgdc:Bounds height="55.0" width="105.0" x="375.0" y="451.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape bpmnElement="confirmertask" id="BPMNShape_confirmertask">
-        <omgdc:Bounds height="55.0" width="105.0" x="520.0" y="350.0"></omgdc:Bounds>
+        <omgdc:Bounds height="55.0" width="105.0" x="520.0" y="451.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape bpmnElement="changetask" id="BPMNShape_changetask">
-        <omgdc:Bounds height="55.0" width="105.0" x="670.0" y="350.0"></omgdc:Bounds>
+        <omgdc:Bounds height="55.0" width="105.0" x="670.0" y="451.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape bpmnElement="resetConfirmer1" id="BPMNShape_resetConfirmer1">
-        <omgdc:Bounds height="55.0" width="105.0" x="520.0" y="469.0"></omgdc:Bounds>
+        <omgdc:Bounds height="55.0" width="105.0" x="520.0" y="570.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape bpmnElement="resetConfirmer2" id="BPMNShape_resetConfirmer2">
-        <omgdc:Bounds height="71.0" width="105.0" x="377.0" y="461.0"></omgdc:Bounds>
+        <omgdc:Bounds height="71.0" width="105.0" x="377.0" y="562.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape bpmnElement="applytask" id="BPMNShape_applytask">
-        <omgdc:Bounds height="55.0" width="105.0" x="670.0" y="118.0"></omgdc:Bounds>
+        <omgdc:Bounds height="55.0" width="105.0" x="375.0" y="91.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>
+        <omgdc:Bounds height="35.0" width="35.0" x="412.0" y="670.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">
-        <omgdc:Bounds height="35.0" width="35.0" x="620.0" y="279.0"></omgdc:Bounds>
+        <omgdc:Bounds height="35.0" width="35.0" x="620.0" y="353.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape bpmnElement="safaertask2" id="BPMNShape_safaertask2">
-        <omgdc:Bounds height="55.0" width="105.0" x="670.0" y="469.0"></omgdc:Bounds>
+        <omgdc:Bounds height="55.0" width="105.0" x="670.0" y="570.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
-        <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="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>
+        <omgdi:waypoint x="427.0" y="398.0"></omgdi:waypoint>
+        <omgdi:waypoint x="427.0" y="451.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="24.0" x="427.0" y="324.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="427.0" y="398.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>
+        <omgdi:waypoint x="480.0" y="478.0"></omgdi:waypoint>
+        <omgdi:waypoint x="520.0" y="478.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="24.0" x="480.0" y="377.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="480.0" y="478.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>
+        <omgdi:waypoint x="625.0" y="478.0"></omgdi:waypoint>
+        <omgdi:waypoint x="670.0" y="478.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="24.0" x="625.0" y="377.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="625.0" y="478.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>
+        <omgdi:waypoint x="670.0" y="597.0"></omgdi:waypoint>
+        <omgdi:waypoint x="625.0" y="597.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="24.0" x="631.0" y="496.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="631.0" y="597.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="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="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="145.0"></omgdi:waypoint>
-        <omgdi:waypoint x="670.0" y="145.0"></omgdi:waypoint>
+        <omgdi:waypoint x="520.0" y="597.0"></omgdi:waypoint>
+        <omgdi:waypoint x="482.0" y="597.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="24.0" x="554.0" y="120.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="491.0" y="597.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
-        <omgdi:waypoint x="427.0" y="173.0"></omgdi:waypoint>
-        <omgdi:waypoint x="427.0" y="269.0"></omgdi:waypoint>
+        <omgdi:waypoint x="427.0" y="274.0"></omgdi:waypoint>
+        <omgdi:waypoint x="427.0" y="343.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="24.0" x="427.0" y="173.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="427.0" y="274.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="145.0"></omgdi:waypoint>
-        <omgdi:waypoint x="375.0" y="145.0"></omgdi:waypoint>
+        <omgdi:waypoint x="375.0" y="370.0"></omgdi:waypoint>
+        <omgdi:waypoint x="287.0" y="370.0"></omgdi:waypoint>
+        <omgdi:waypoint x="287.0" y="246.0"></omgdi:waypoint>
+        <omgdi:waypoint x="375.0" y="246.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="24.0" x="321.0" y="296.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="321.0" y="370.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>
+        <omgdi:waypoint x="429.0" y="633.0"></omgdi:waypoint>
+        <omgdi:waypoint x="429.0" y="670.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="24.0" x="429.0" y="532.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="429.0" y="633.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge bpmnElement="flow15" id="BPMNEdge_flow15">
-        <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>
+        <omgdi:waypoint x="480.0" y="246.0"></omgdi:waypoint>
+        <omgdi:waypoint x="637.0" y="246.0"></omgdi:waypoint>
+        <omgdi:waypoint x="637.0" y="353.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="24.0" x="606.0" y="210.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="606.0" y="311.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>
+        <omgdi:waypoint x="480.0" y="370.0"></omgdi:waypoint>
+        <omgdi:waypoint x="620.0" y="370.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="24.0" x="522.0" y="296.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="24.0" x="522.0" y="370.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>
+        <omgdi:waypoint x="722.0" y="506.0"></omgdi:waypoint>
+        <omgdi:waypoint x="722.0" y="570.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="14.0" width="24.0" x="722.0" y="506.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow18" id="BPMNEdge_flow18">
+        <omgdi:waypoint x="427.0" y="36.0"></omgdi:waypoint>
+        <omgdi:waypoint x="427.0" y="91.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow19" id="BPMNEdge_flow19">
+        <omgdi:waypoint x="427.0" y="146.0"></omgdi:waypoint>
+        <omgdi:waypoint x="427.0" y="219.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow20" id="BPMNEdge_flow20">
+        <omgdi:waypoint x="375.0" y="246.0"></omgdi:waypoint>
+        <omgdi:waypoint x="284.0" y="246.0"></omgdi:waypoint>
+        <omgdi:waypoint x="284.0" y="118.0"></omgdi:waypoint>
+        <omgdi:waypoint x="375.0" y="118.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="24.0" x="722.0" y="405.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="100.0" x="291.0" y="171.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
     </bpmndi:BPMNPlane>

+ 1 - 1
ui/src/api/apply/safetychange.js

@@ -10,7 +10,7 @@ export function listSafetychange(query) {
 }
 export function listChangeDescribe(query) {
   return request({
-    url: '/apply/safetychange//listChangeDescribe',
+    url: '/apply/safetychange/listChangeDescribe',
     method: 'get',
     params: query
   })

+ 9 - 2
ui/src/views/apply/offlinevalve/index.vue

@@ -200,7 +200,7 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-form-item label="安全阀位号" prop="devNo">
           <el-select v-model="form.devNo" placeholder="请选择或输入安全阀位号" clearable size="small" filterable
-                     allow-create style="width: 100%">
+                     allow-create style="width: 100%" @change="getUnit">
             <el-option
               v-for="item in safetyvavleList"
               :key="item.tagno"
@@ -576,10 +576,17 @@ export default {
     });
   },
   methods: {
+    getUnit(){
+      for (const valve of this.safetyvavleList) {
+        if (this.form.devNo==valve.tagno){
+          this.form.unit=valve.unit;
+        }
+      }
+    },
     openApproveDetail(row) {
       this.offlinevalveDetailVisible = true
       this.$nextTick(() => {
-        this.$refs.offlinevalveDetail.init(row.id, '',row.processId,'')
+        this.$refs.offlinevalveDetail.init(row.id, '',row.processId,'','',true)
       })
     },
     // 字典翻译

+ 61 - 40
ui/src/views/apply/safetychange/index.vue

@@ -30,7 +30,8 @@
         </el-select>
       </el-form-item>
       <el-form-item label="申请状态" prop="approveStatus">
-        <el-select v-model="queryParams.approveStatus" placeholder="请选择申请状态" clearable size="small" @change="handleQuery">
+        <el-select v-model="queryParams.approveStatus" placeholder="请选择申请状态" clearable size="small"
+                   @change="handleQuery">
           <el-option
             v-for="item in approveStatusList"
             :key="item.dictValue"
@@ -195,7 +196,15 @@
     <el-dialog :title="title" :visible.sync="open" width="40%" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="170px">
         <el-form-item label="组织保护措施变更描述" prop="changeDescribe">
-          <el-input type="textarea" v-model="form.changeDescribe" placeholder="请输入组织保护措施变更描述"/>
+          <!--          <el-input type="textarea" v-model="form.changeDescribe" placeholder="请输入组织保护措施变更描述"/>-->
+          <el-autocomplete
+            type="textarea"
+            class="inline-input"
+            style="width: 100%"
+            v-model="form.changeDescribe"
+            placeholder="请输入组织保护措施变更描述"
+            :trigger-on-focus="false"
+            :fetch-suggestions="getchangeDescribe"></el-autocomplete>
         </el-form-item>
         <el-form-item label="状态变更的原因" prop="changeReason">
           <el-input type="textarea" v-model="form.changeReason" placeholder="请输入状态变更的原因"/>
@@ -374,7 +383,8 @@
       </div>
     </el-dialog>
 
-    <safetychange-detail v-if="safetychangeDetailVisible" ref="safetychangeDetail" @refreshDataList="getList"></safetychange-detail>
+    <safetychange-detail v-if="safetychangeDetailVisible" ref="safetychangeDetail"
+                         @refreshDataList="getList"></safetychange-detail>
   </div>
 </template>
 
@@ -387,7 +397,7 @@ import {
   updateSafetychange,
   exportSafetychange,
   importTemplate,
-  wordView
+  wordView, listChangeDescribe
 } from "@/api/apply/safetychange";
 import {treeselect} from "@/api/system/dept";
 import {getToken} from "@/utils/auth";
@@ -548,19 +558,27 @@ export default {
       this.approveStatusList = response.data;
     });
     listUserPost({
-      actualposts:"20,36,10,11,28,30,32,38,15,12,34",
-      deptId:103
+      actualposts: "20,36,10,11,28,30,32,38,15,12,34",
+      deptId: 103
     }).then(response => {
       this.executorList = response;
     });
     listUserPost({
-      actualposts:"24,26,18,14,16",
-      deptId:103
+      actualposts: "24,26,18,14,16",
+      deptId: 103
     }).then(response => {
       this.safaerList = response;
     });
   },
   methods: {
+    getchangeDescribe(val, cb) {
+      let list = [];
+      for (const item of this.changeDescribeList) {
+        if (item.changeDescribe.indexOf(val) > -1)
+          list.push({"value": item.changeDescribe})
+      }
+      return cb(list);
+    },
     openDetail(row) {
       this.statusFlag = '';
       this.approveStatusFlag = '';
@@ -620,7 +638,7 @@ export default {
     openApproveDetail(row) {
       this.safetychangeDetailVisible = true
       this.$nextTick(() => {
-        this.$refs.safetychangeDetail.init(row.id, '', row.processId, '')
+        this.$refs.safetychangeDetail.init(row.id, '', row.processId, '','',true)
       })
     },
     /** 查询组织保护措施状态变更申请列表 */
@@ -631,6 +649,10 @@ export default {
         this.total = response.total;
         this.loading = false;
       });
+      this.changeDescribeList = [];
+      listChangeDescribe({}).then(res => {
+        this.changeDescribeList = res.data
+      })
     },
     /** 查询部门下拉树结构 */
     getTreeselect() {
@@ -797,57 +819,56 @@ export default {
     submitFileForm() {
       this.$refs.upload.submit();
     },
-    wordView(row){
+    wordView(row) {
       wordView(row.id).then(response => {
         console.log(response.msg)
-        this.handleSee("申请单",response.msg )
+        this.handleSee("申请单", response.msg)
       });
     },
-    handleSee (fileName , url){
+    handleSee(fileName, url) {
       //office预览
-      this.loadingFlash=true
-      this.pdf.open =true
+      this.loadingFlash = true
+      this.pdf.open = true
       this.pdf.title = fileName
-      this.pdf.pdfUrl =""
-      this.pptView=false
-      this.ppt=true
+      this.pdf.pdfUrl = ""
+      this.pptView = false
+      this.ppt = true
       //如果是PDF等直接可以打开的就不调接口,否则调用接口
-      if(fileName.endsWith('pdf')){
+      if (fileName.endsWith('pdf')) {
         this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + url
-        this.loadingFlash=false
-      }
-      else{
-        const formatDate =new FormData();
-        formatDate.append("filepath",url)
+        this.loadingFlash = false
+      } else {
+        const formatDate = new FormData();
+        formatDate.append("filepath", url)
         //调用文件预览api
-        let res= this.officeConvert.bookConvertCommon(formatDate)
+        let res = this.officeConvert.bookConvertCommon(formatDate)
         //查看接受全局方法的返回结果 console.log(res)
         //利用.then方法接受Promise对象
-        res.then((result)=>{
+        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.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("不存在")){
+          } else if (result.msg.includes("不存在")) {
             //文件不存在时提示
-            this.pdf.pdfUrl =""
-            this.$alert(result.msg, this.$t('预览失败'), { dangerouslyUseHTMLString: true });
+            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.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.open = false
+          } else {
             //成功时直接给地址
-            this.pdf.pdfUrl =process.env.VUE_APP_BASE_API+ result.data
+            this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + result.data
           }
         }).catch(result => {
           //请求失败,关闭loading,pdf地址直接为为空,不显示
-          this.pdf.pdfUrl =""
+          this.pdf.pdfUrl = ""
           this.loadingFlash = false;
         })
       }

+ 95 - 42
ui/src/views/approve/approveDetail/offlinevalve-detail.vue

@@ -5,48 +5,80 @@
     :visible.sync="visible"
     :append-to-body="true"
     width="60%">
-    <el-table :data="devList" border>
-      <el-table-column label="安全阀位号" align="center" prop="devNo" :show-overflow-tooltip="true" width="125"
-                       fixed="left"/>
-      <el-table-column label="单元" align="center" prop="unit" :show-overflow-tooltip="true" width="85"
-                       fixed="left"/>
-      <el-table-column label="申请状态" align="center" prop="approveStatus" :show-overflow-tooltip="true" width="85"
-                       fixed="left" :formatter="approveStatusFormat"/>
-      <el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true" width="90"
-                       fixed="left" :formatter="statusFormat"/>
-      <el-table-column label="离线原因" align="center" prop="offlineReason" :show-overflow-tooltip="true"
-                       width="185"/>
-      <el-table-column label="安全阀锁开是否拆解" align="center" prop="disassembly" :show-overflow-tooltip="true"
-                       width="185"/>
-      <el-table-column label="临时措施执行人" align="center" prop="executorName" :show-overflow-tooltip="true"
-                       width="130"/>
-      <el-table-column label="临时措施执行时间" align="center" prop="executionTime" width="140">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.executionTime, '{y}-{m}-{d} {h}:{i}') }}</span>
+    <el-descriptions :column="2" border size="small" v-if="!desFlag">
+      <el-descriptions-item label="安全阀位号" :label-style="labelStyle">{{ this.dataForm.devNo }}
+      </el-descriptions-item>
+      <el-descriptions-item label="单元" :label-style="labelStyle">{{ this.dataForm.unit }}</el-descriptions-item>
+      <el-descriptions-item label="离线原因" :span="2">{{ this.dataForm.offlineReason }}</el-descriptions-item>
+      <el-descriptions-item label="状态" :label-style="labelStyle">
+        <el-tag size="small" :type="statusFlag">{{ status[this.dataForm.status] }}</el-tag>
+      </el-descriptions-item>
+      <el-descriptions-item label="申请状态">
+        <el-tag size="small" :type="approveStatusFlag">{{ approveStatus[this.dataForm.approveStatus] }}</el-tag>
+      </el-descriptions-item>
+      <el-descriptions-item label="安全评估以及临时措施执行" :span="2" :label-style="labelStyle">
+        {{ this.dataForm.safa }}
+      </el-descriptions-item>
+      <el-descriptions-item label="安全阀锁开是否拆解" :span="2" :label-style="labelStyle">
+        {{ this.dataForm.disassembly }}
+      </el-descriptions-item>
+      <el-descriptions-item label="临时措施执行人" :label-style="labelStyle">
+        {{ this.dataForm.executorName }}
+      </el-descriptions-item>
+      <el-descriptions-item label="临时措施执行时间" :label-style="labelStyle">
+        <template>
+          <span>{{ parseTime(this.dataForm.executionTime, '{y}-{m}-{d} {h}:{i}') }}</span>
         </template>
-      </el-table-column>
-      <el-table-column label="临时措施确认人" align="center" prop="confirmerName" :show-overflow-tooltip="true"
-                       width="130"/>
-      <el-table-column label="临时措施确认时间" align="center" prop="temporaryTime" width="140">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.temporaryTime, '{y}-{m}-{d} {h}:{i}') }}</span>
+      </el-descriptions-item>
+      <el-descriptions-item label="临时措施确认人" :label-style="labelStyle">
+        {{ this.dataForm.confirmerName }}
+      </el-descriptions-item>
+      <el-descriptions-item label="临时措施确认时间" :label-style="labelStyle">
+        <template>
+          <span>{{ parseTime(this.dataForm.temporaryTime, '{y}-{m}-{d} {h}:{i}') }}</span>
         </template>
-      </el-table-column>
-      <el-table-column label="申请人" align="center" prop="applicantName" :show-overflow-tooltip="true" width="90"/>
-      <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>
+      </el-descriptions-item>
+      <el-descriptions-item label="申请人" :label-style="labelStyle">
+        {{ this.dataForm.applicantName }}
+      </el-descriptions-item>
+      <el-descriptions-item label="申请时间" :label-style="labelStyle">
+        <template>
+          <span>{{ parseTime(this.dataForm.applicationTime, '{y}-{m}-{d} {h}:{i}') }}</span>
         </template>
-      </el-table-column>
-      <el-table-column label="批准人" align="center" prop="approverName" :show-overflow-tooltip="true" width="90"/>
-      <el-table-column label="批准时间" align="center" prop="approveTime" width="100">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.approveTime, '{y}-{m}-{d} {h}:{i}') }}</span>
+      </el-descriptions-item>
+      <el-descriptions-item label="批准人" :label-style="labelStyle">
+        {{ this.dataForm.approverName }}
+      </el-descriptions-item>
+      <el-descriptions-item label="批准时间" :label-style="labelStyle">
+        <template>
+          <span>{{ parseTime(this.dataForm.approveTime, '{y}-{m}-{d} {h}:{i}') }}</span>
         </template>
-      </el-table-column>
-      />
-      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" width="140"/>
-    </el-table>
+      </el-descriptions-item>
+      <el-descriptions-item label="离线安全阀是否已经复位" :label-style="labelStyle">
+        {{ this.dataForm.resetConfirm }}
+      </el-descriptions-item>
+      <el-descriptions-item label="离线安全阀复位后现场是否存在泄漏" :label-style="labelStyle">
+        {{ this.dataForm.leakConfirm }}
+      </el-descriptions-item>
+      <el-descriptions-item label="离线安全复位后,之前采取的安全措施是否已撤销" :label-style="labelStyle">
+        {{ this.dataForm.revokeConfirm }}
+      </el-descriptions-item>
+      <el-descriptions-item label="离线安全复位后,是否已经重新上锁" :label-style="labelStyle">
+        {{ this.dataForm.lockConfirm }}
+      </el-descriptions-item>
+      <el-descriptions-item label="确认上锁人员" :label-style="labelStyle" :span="2">
+        {{ this.dataForm.lockConfirmer1Name }} {{ this.dataForm.lockConfirmer2Name }}
+      </el-descriptions-item>
+      <el-descriptions-item label="上述信息确认人" :label-style="labelStyle">
+        {{ this.dataForm.infoConfirmerName }}
+      </el-descriptions-item>
+      <el-descriptions-item label="确认时间" :label-style="labelStyle">
+        {{ this.dataForm.confirmTime }}
+      </el-descriptions-item>
+      <el-descriptions-item label="备注" :span="2" :label-style="labelStyle">
+        {{ this.dataForm.remarks }}
+      </el-descriptions-item>
+    </el-descriptions>
     <el-form ref="form" :model="form" label-position="left" :rules="rules" label-width="340px"
              style="margin-top: 30px">
       <div v-if="flag">
@@ -62,7 +94,7 @@
             </el-radio-group>
           </el-form-item>
         </div>
-        <div v-if="taskName=='信息确认人'||taskName=='信息确认人2'">
+        <div v-if="taskName=='信息确认人'||(taskName=='信息确认人2'&&dataForm.disassembly=='NA')">
           <el-row>
             <el-col span="12">
               <el-form-item label="离线安全阀是否已经复位" prop="resetConfirm">
@@ -116,8 +148,8 @@
             </el-form-item>
           </div>
         </div>
-        <el-form-item label="审批意见" prop="remarks" v-if="taskName!='申请人提交申请'">
-          <el-input type="textarea" v-model="form.remarks"/>
+        <el-form-item label="备注" prop="remarks" v-if="taskName!='申请人提交申请'">
+          <el-input type="textarea" v-model="form.remarks" placeholder="选填"/>
         </el-form-item>
 
         <div v-if="taskName=='申请人提交申请'">
@@ -188,6 +220,11 @@ export default {
   name: "offlinevalve-detail",
   data() {
     return {
+      desFlag:false,
+      status: {0: "未完成", 1: "已完成"},
+      approveStatus: {1: "申请中", 2: "已通过", 3: "已拒绝"},
+      //label样式
+      labelStyle: {'width': '200px'},
       infoConfirmerList: [],
       // 安全阀清单
       safetyvavleList: [],
@@ -253,6 +290,8 @@ export default {
         processId: null
       },
       form: {},
+      statusFlag : '',
+      approveStatusFlag : '',
       rules: {
         safa: [{required: true, message: "请输入安全评估以及临时措施执行", trigger: "blur"}],
         lockConfirm: [{required: true, message: "请选择是/否/NA", trigger: "blur"}],
@@ -275,11 +314,15 @@ export default {
     }
   },
   methods: {
-    init(id, taskId, processId, taskName, flag) {
+    init(id, taskId, processId, taskName, flag,desFlag) {
       this.flag = flag;
+      this.desFlag = desFlag;
       this.submitDisabled = false;
+      this.statusFlag = '';
+      this.approveStatusFlag = '';
       this.reset();
       this.devList = [];
+      this.dataForm = {};
       this.visible = true;
       this.taskName = taskName;
       this.taskForm.taskId = taskId;
@@ -297,6 +340,16 @@ export default {
           this.form.offlineReason = res.data.offlineReason;
           this.form.unit = res.data.unit;
         }
+        if (this.dataForm.status === 1) {
+          this.statusFlag = 'success';
+        }
+        if (this.dataForm.approveStatus === '2') {
+          this.approveStatusFlag = 'success';
+        } else if (this.dataForm.approveStatus === '1') {
+          this.approveStatusFlag = 'warning';
+        } else if (this.dataForm.approveStatus === '3') {
+          this.approveStatusFlag = 'danger';
+        }
       });
       this.getDicts("apply_status").then(response => {
         this.statusList = response.data;

+ 107 - 52
ui/src/views/approve/approveDetail/safetychange-detail.vue

@@ -5,61 +5,95 @@
     :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>
+    <el-descriptions :column="2" border size="small" v-if="!desFlag">
+      <el-descriptions-item label="组织保护措施变更播述" :span="2" :label-style="labelStyle">
+        {{ this.dataForm.changeDescribe }}
+      </el-descriptions-item>
+      <el-descriptions-item label="状态变更的原因" span="2" :label-style="labelStyle">
+        {{ this.dataForm.changeReason }}
+      </el-descriptions-item>
+      <el-descriptions-item label="申请人" :label-style="labelStyle">
+        {{ this.dataForm.applicantName }}
+      </el-descriptions-item>
+      <el-descriptions-item label="申请时间" :label-style="labelStyle">
+        <template>
+          <span>{{ parseTime(this.dataForm.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>
+      </el-descriptions-item>
+      <el-descriptions-item label="状态" :label-style="labelStyle">
+        <el-tag size="small" :type="statusFlag">{{ status[this.dataForm.status] }}</el-tag>
+      </el-descriptions-item>
+      <el-descriptions-item label="申请状态">
+        <el-tag size="small" :type="approveStatusFlag">{{ approveStatus[this.dataForm.approveStatus] }}</el-tag>
+      </el-descriptions-item>
+      <el-descriptions-item label="安全评估及临时的安全措施" :span="2" :label-style="labelStyle">
+        {{ this.dataForm.safa }}
+      </el-descriptions-item>
+      <el-descriptions-item label="安全评估人" :label-style="labelStyle">
+        {{ this.dataForm.safaerName }}
+      </el-descriptions-item>
+      <el-descriptions-item label="安全评估时间" :label-style="labelStyle">
+        <template>
+          <span>{{ parseTime(this.dataForm.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>
+      </el-descriptions-item>
+      <el-descriptions-item label="批准人" :label-style="labelStyle">
+        {{ this.dataForm.approverName }}
+      </el-descriptions-item>
+      <el-descriptions-item label="批准时间" :label-style="labelStyle">
+        <template>
+          <span>{{ parseTime(this.dataForm.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>
+      </el-descriptions-item>
+      <el-descriptions-item label="临时措施执行人" :label-style="labelStyle">
+        {{ this.dataForm.executorName }}
+      </el-descriptions-item>
+      <el-descriptions-item label="临时措施执行时间" :label-style="labelStyle">
+        <template>
+          <span>{{ parseTime(this.dataForm.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>
+      </el-descriptions-item>
+      <el-descriptions-item label="临时措施确认人" :label-style="labelStyle">
+        {{ this.dataForm.confirmerName }}
+      </el-descriptions-item>
+      <el-descriptions-item label="临时措施确认时间" :label-style="labelStyle">
+        <template>
+          <span>{{ parseTime(this.dataForm.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>
+      </el-descriptions-item>
+      <el-descriptions-item label="组织保护措施状态变更执行" :span="2" :label-style="labelStyle">
+        {{ this.dataForm.changeExecution }}
+      </el-descriptions-item>
+      <el-descriptions-item label="执行人" :label-style="labelStyle">
+        {{ this.dataForm.changeExecutorName }}
+      </el-descriptions-item>
+      <el-descriptions-item label="执行时间" :label-style="labelStyle">
+        <template>
+          <span>{{ parseTime(this.dataForm.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-descriptions-item>
+      <el-descriptions-item label="组织保护措施是否已经恢复至变更前的状态" :span="2" :label-style="labelStyle">
+        {{ this.dataForm.resetConfirm }}
+      </el-descriptions-item>
+      <el-descriptions-item label="状态恢复,确认人1" :label-style="labelStyle">
+        {{ this.dataForm.resetConfirmerName1 }}
+      </el-descriptions-item>
+      <el-descriptions-item label="确认时间" :label-style="labelStyle">
+        {{ this.dataForm.resetConfirmTime1 }}
+      </el-descriptions-item>
+      <el-descriptions-item label="状态恢复,确认人2" :label-style="labelStyle">
+        {{ this.dataForm.resetConfirmerName2 }}
+      </el-descriptions-item>
+      <el-descriptions-item label="确认时间" :label-style="labelStyle">
+        {{ this.dataForm.resetConfirmTime2 }}
+      </el-descriptions-item>
+      <el-descriptions-item label="状态恢复后,之前采取的安全措施是否已撤销" :span="2" :label-style="labelStyle">
+        {{ this.dataForm.revokeConfirm }}
+      </el-descriptions-item>
+      <el-descriptions-item label="备注" :span="2" :label-style="labelStyle">
+        {{ this.dataForm.remarks }}
+      </el-descriptions-item>
+    </el-descriptions>
     <el-form ref="form" :model="form" label-position="left" :rules="rules" label-width="170px"
              style="margin-top: 30px">
       <div v-if="flag">
@@ -107,8 +141,8 @@
             </el-select>
           </el-form-item>
         </div>
-        <el-form-item label="审批意见" prop="remarks" v-if="taskName!='申请人提交申请'">
-          <el-input type="textarea" v-model="form.remarks"/>
+        <el-form-item label="备注" prop="remarks" v-if="taskName!='申请人提交申请'">
+          <el-input type="textarea" v-model="form.remarks" placeholder="选填"/>
         </el-form-item>
       </div>
     </el-form>
@@ -152,6 +186,11 @@ export default {
   name: "safetychange-detail",
   data() {
     return {
+      labelStyle: {'width': '200px'},
+      statusFlag: '',
+      approveStatusFlag: '',
+      status: {0: "未完成", 1: "已完成"},
+      approveStatus: {1: "申请中", 2: "已通过", 3: "已拒绝"},
       flag: false,
       visible: false,
       resetConfirmerList: [],
@@ -229,12 +268,15 @@ export default {
         businessKey: '',
         offlinevalve: {}
       },
+      desFlag:false,
     }
   },
   methods: {
-    init(id, taskId, processId, taskName, flag) {
+    init(id, taskId, processId, taskName, flag,desFlag) {
       this.reset();
       this.devList = [];
+      this.desFlag=desFlag;
+      this.dataForm={}  ;
       this.historyList = [];
       this.dataForm.id = id || 0;
       this.form.id = id || 0;
@@ -245,6 +287,8 @@ export default {
       this.taskForm.taskId = taskId;
       this.taskForm.businessKey = id;
       this.dataForm.processId = processId;
+      this.statusFlag='';
+      this.approveStatusFlag='';
       getSafetychange(id).then(res => {
         this.dataForm = res.data;
         this.devList.push(this.dataForm);
@@ -252,6 +296,17 @@ export default {
             this.form.changeReason=this.dataForm.changeReason;
             this.form.changeDescribe=this.dataForm.changeDescribe;
           }
+
+        if (this.dataForm.status === 1) {
+          this.statusFlag = 'success';
+        }
+        if (this.dataForm.approveStatus === '2') {
+          this.approveStatusFlag = 'success';
+        } else if (this.dataForm.approveStatus === '1') {
+          this.approveStatusFlag = 'warning';
+        } else if (this.dataForm.approveStatus === '3') {
+          this.approveStatusFlag = 'danger';
+        }
       });
       this.getDicts("apply_status").then(response => {
         this.statusList = response.data;

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

@@ -99,6 +99,7 @@
         kekaoDetailVisible:false,
         invoiceDetailVisible:false,
         offlinevalveDetailVisible:false,
+        safetychangeDetailVisible:false,
         // 选中数组
         ids: [],
         // 非单个禁用