瀏覽代碼

pssr安全设施
pssr审批页面表格不刷新fix

jiangbiao 7 月之前
父節點
當前提交
e502447fc1
共有 47 個文件被更改,包括 2962 次插入1941 次删除
  1. 3 0
      master/src/main/java/com/ruoyi/project/ehs/controller/TApproveDangerController.java
  2. 110 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrApproveController.java
  3. 17 29
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyBleedController.java
  4. 17 29
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyBreathController.java
  5. 17 29
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyBrustController.java
  6. 785 0
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyController.java
  7. 17 29
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyFlamearresterController.java
  8. 17 29
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyValveController.java
  9. 10 0
      master/src/main/java/com/ruoyi/project/pssr/domain/TPssrApprove.java
  10. 34 4
      master/src/main/java/com/ruoyi/project/pssr/domain/TPssrSafetyBleed.java
  11. 33 3
      master/src/main/java/com/ruoyi/project/pssr/domain/TPssrSafetyBreath.java
  12. 33 3
      master/src/main/java/com/ruoyi/project/pssr/domain/TPssrSafetyBrust.java
  13. 33 3
      master/src/main/java/com/ruoyi/project/pssr/domain/TPssrSafetyFlamearrester.java
  14. 33 3
      master/src/main/java/com/ruoyi/project/pssr/domain/TPssrSafetyValve.java
  15. 2 0
      master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrSafetyBleedMapper.java
  16. 1 0
      master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrSafetyBreathMapper.java
  17. 1 0
      master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrSafetyBrustMapper.java
  18. 1 0
      master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrSafetyFlamearresterMapper.java
  19. 1 0
      master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrSafetyValveMapper.java
  20. 2 0
      master/src/main/java/com/ruoyi/project/pssr/service/ITPssrSafetyBleedService.java
  21. 1 0
      master/src/main/java/com/ruoyi/project/pssr/service/ITPssrSafetyBreathService.java
  22. 1 0
      master/src/main/java/com/ruoyi/project/pssr/service/ITPssrSafetyBrustService.java
  23. 1 0
      master/src/main/java/com/ruoyi/project/pssr/service/ITPssrSafetyFlamearresterService.java
  24. 1 0
      master/src/main/java/com/ruoyi/project/pssr/service/ITPssrSafetyValveService.java
  25. 11 0
      master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrSafetyBleedServiceImpl.java
  26. 5 0
      master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrSafetyBreathServiceImpl.java
  27. 5 0
      master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrSafetyBrustServiceImpl.java
  28. 5 0
      master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrSafetyFlamearresterServiceImpl.java
  29. 6 0
      master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrSafetyValveServiceImpl.java
  30. 44 1
      master/src/main/resources/mybatis/pssr/TPssrSafetyBleedMapper.xml
  31. 17 1
      master/src/main/resources/mybatis/pssr/TPssrSafetyBreathMapper.xml
  32. 17 1
      master/src/main/resources/mybatis/pssr/TPssrSafetyBrustMapper.xml
  33. 18 2
      master/src/main/resources/mybatis/pssr/TPssrSafetyFlamearresterMapper.xml
  34. 17 1
      master/src/main/resources/mybatis/pssr/TPssrSafetyValveMapper.xml
  35. 91 0
      ui/src/api/pssr/safety.js
  36. 13 6
      ui/src/views/approve/approveDetail/pssrApprove-detail.vue
  37. 1 1
      ui/src/views/approve/myapprove/index.vue
  38. 1 1
      ui/src/views/approve/pending/index.vue
  39. 1 1
      ui/src/views/approve/taskdone/index.vue
  40. 1 1
      ui/src/views/pssr/laboratory/index.vue
  41. 2 2
      ui/src/views/pssr/moc/index.vue
  42. 305 354
      ui/src/views/pssr/safetyBleed/index.vue
  43. 300 356
      ui/src/views/pssr/safetyBreath/index.vue
  44. 323 365
      ui/src/views/pssr/safetyBrust/index.vue
  45. 305 319
      ui/src/views/pssr/safetyFlamearrester/index.vue
  46. 300 367
      ui/src/views/pssr/safetyValve/index.vue
  47. 3 0
      ui/src/views/pssr/subitem/index.vue

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

@@ -360,6 +360,7 @@ public class TApproveDangerController extends BaseController {
                     } else if (pi.getProcessDefinitionName().contains("PSSR")&&!pi.getProcessDefinitionName().equals("PSSR装置经理审批")) {
                         TPssrApprove t = tPssrApproveService.selectTPssrApproveById(Long.parseLong(pi.getBusinessKey()));
                         TPssrSubcontent tPssrSubcontent = tPssrSubcontentService.selectTPssrSubcontentById(t.getSubId());
+                        t.setSn(tPssrSubcontent.getForShort());
                         devProcess.setProcessName(pi.getProcessDefinitionName()+"_"+tPssrSubcontent.getUnitDes()+"_"+tPssrSubcontent.getItem());
                         devProcess.setApNo(t.getApNo());
                         devProcess.setApproveObject(t);
@@ -515,6 +516,7 @@ public class TApproveDangerController extends BaseController {
                 }  else if (pi.getProcessDefinitionName().contains("PSSR")&&!pi.getProcessDefinitionName().equals("PSSR装置经理审批")) {
                     TPssrApprove t = tPssrApproveService.selectTPssrApproveById(Long.parseLong(pi.getBusinessKey()));
                     TPssrSubcontent tPssrSubcontent = tPssrSubcontentService.selectTPssrSubcontentById(t.getSubId());
+                    t.setSn(tPssrSubcontent.getForShort());
                     devTask.setProcessName(pi.getProcessDefinitionName()+"_"+tPssrSubcontent.getUnitDes()+"_"+tPssrSubcontent.getItem());
                     devTask.setApNo(t.getApNo());
                     devTask.setApproveObject(t);
@@ -669,6 +671,7 @@ public class TApproveDangerController extends BaseController {
                 }  else if (pi.getProcessDefinitionName().contains("PSSR")&&!pi.getProcessDefinitionName().equals("PSSR装置经理审批")) {
                     TPssrApprove t = tPssrApproveService.selectTPssrApproveById(Long.parseLong(pi.getBusinessKey()));
                     TPssrSubcontent tPssrSubcontent = tPssrSubcontentService.selectTPssrSubcontentById(t.getSubId());
+                    t.setSn(tPssrSubcontent.getForShort());
                     devProcess.setProcessName(pi.getProcessDefinitionName()+"_"+tPssrSubcontent.getUnitDes()+"_"+tPssrSubcontent.getItem());
                     SysUser user = sysUserService.selectUserById(Long.valueOf(t.getCreaterCode()));
                     devProcess.setApName(user.getNickName());

+ 110 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrApproveController.java

@@ -109,6 +109,21 @@ public class TPssrApproveController extends BaseController {
     @Autowired
     private ITPssrPublicService tPssrPublicService;
 
+    @Autowired
+    private ITPssrSafetyBleedService tPssrSafetyBleedServeice;
+
+    @Autowired
+    private ITPssrSafetyBreathService tPssrSafetyBreathServeice;
+
+    @Autowired
+    private ITPssrSafetyBrustService tPssrSafetyBrustServeice;
+
+    @Autowired
+    private ITPssrSafetyFlamearresterService tPssrSafetyFlamearresterServeice;
+
+    @Autowired
+    private ITPssrSafetyValveService tPssrSafetyValveServeice;
+
     @Autowired
     private ITPssrFrameService tPssrFrameService;
 
@@ -224,6 +239,7 @@ public class TPssrApproveController extends BaseController {
                 doPatrolApprove(tPssrSubcontent);
                 break;
             case "aqss"://安全设施
+                doAqssApprove(tPssrSubcontent);
                 break;
             case "txjk"://通讯监控
                 doPatrolApprove(tPssrSubcontent);
@@ -515,7 +531,7 @@ public class TPssrApproveController extends BaseController {
 
         List<String> confirmersList = new ArrayList<>();
         if (StringUtils.isNotEmpty(confirmers)) {
-            confirmersList = Arrays.asList(confirmers.split(","));
+            confirmersList.addAll(Arrays.asList(confirmers.split(",")));
         }
 
         TPssrApprove exist = new TPssrApprove();
@@ -753,6 +769,99 @@ public class TPssrApproveController extends BaseController {
         }
     }
 
+    /**
+     * 安全设施审批流程发起申请
+     */
+    private void doAqssApprove(TPssrSubcontent sub) {
+        String userId = getUserId().toString();
+
+        //修改各表状态
+        TPssrSafetyBleed bleed = new TPssrSafetyBleed();
+        bleed.setSubId(sub.getId());
+        bleed.setApproveStatus(1L);
+        bleed.setUpdatedate(new Date());
+        bleed.setUpdaterCode(userId);
+        tPssrSafetyBleedServeice.updateAllBySubId(bleed);
+        TPssrSafetyBreath breath = new TPssrSafetyBreath();
+        breath.setSubId(sub.getId());
+        breath.setApproveStatus(1L);
+        breath.setUpdatedate(new Date());
+        breath.setUpdaterCode(userId);
+        tPssrSafetyBreathServeice.updateAllBySubId(breath);
+        TPssrSafetyBrust brust = new TPssrSafetyBrust();
+        brust.setSubId(sub.getId());
+        brust.setApproveStatus(1L);
+        brust.setUpdatedate(new Date());
+        brust.setUpdaterCode(userId);
+        tPssrSafetyBrustServeice.updateAllBySubId(brust);
+        TPssrSafetyFlamearrester flamearrester = new TPssrSafetyFlamearrester();
+        flamearrester.setSubId(sub.getId());
+        flamearrester.setApproveStatus(1L);
+        flamearrester.setUpdatedate(new Date());
+        flamearrester.setUpdaterCode(userId);
+        tPssrSafetyFlamearresterServeice.updateAllBySubId(flamearrester);
+        TPssrSafetyValve valve = new TPssrSafetyValve();
+        valve.setSubId(sub.getId());
+        valve.setApproveStatus(1L);
+        valve.setUpdatedate(new Date());
+        valve.setUpdaterCode(userId);
+        tPssrSafetyValveServeice.updateAllBySubId(valve);
+
+        // 查询确认人
+        TPssrSafetyBleed entity = new TPssrSafetyBleed();
+        entity.setSubId(sub.getId());
+        entity.setApproveStatus(1L);
+        TPssrSafetyBleed tPssrSafetyBleed = tPssrSafetyBleedServeice.selectAllConfirmedPersonBySubId(entity);
+        String confirmer1s = null;
+        String confirmer2s = null;
+        if (tPssrSafetyBleed != null) {
+            confirmer1s = tPssrSafetyBleed.getConfirmer1();
+            confirmer2s = tPssrSafetyBleed.getConfirmer2();
+        }
+        logger.info("=======================confirmer1s:{}", confirmer1s);
+        logger.info("=======================confirmer2s:{}", confirmer2s);
+
+        Set<String> confirmerUsers1 = new HashSet<>();
+        Set<String> confirmerUsers2 = new HashSet<>();
+        if (StringUtils.isNotEmpty(confirmer1s)) {
+            confirmerUsers1.addAll(Arrays.asList(confirmer1s.split(",")));
+        }
+        if (StringUtils.isNotEmpty(confirmer2s)) {
+            confirmerUsers2.addAll(Arrays.asList(confirmer2s.split(",")));
+        }
+        //查询是否已存在审批流程
+        TPssrApprove tPssrApprove = tPssrApproveService.selectTPssrApproveBySubId(sub.getId());
+        if (tPssrApprove == null) {
+            TPssrApprove approve = new TPssrApprove();
+            approve.setSubId(sub.getId());
+            approve.setApNo(DateUtils.dateTimeNow() + userId);
+            approve.setApproveStatus(1L);
+            approve.setSubCharge(sub.getConfirm());
+            approve.setCreaterCode(userId);
+            approve.setCreatedate(new Date());
+            tPssrApproveService.insertTPssrApprove(approve);
+
+            pssr2confirm(approve, new ArrayList<>(confirmerUsers1), new ArrayList<>(confirmerUsers2), sub.getConfirm());
+        } else {
+            delProcess(tPssrApprove.getProcessId(), "pssr2confirm");
+            entity.setSubId(sub.getId());
+            entity.setApproveStatus(3L);
+            tPssrSafetyBleed = tPssrSafetyBleedServeice.selectAllConfirmedPersonBySubId(entity);
+            if (tPssrSafetyBleed != null) {
+                confirmer1s = tPssrSafetyBleed.getConfirmer1();
+                confirmer2s = tPssrSafetyBleed.getConfirmer2();
+            }
+
+            if (StringUtils.isNotEmpty(confirmer1s)) {
+                confirmerUsers1.addAll(Arrays.asList(confirmer1s.split(",")));
+            }
+            if (StringUtils.isNotEmpty(confirmer2s)) {
+                confirmerUsers2.addAll(Arrays.asList(confirmer2s.split(",")));
+            }
+            pssr2confirm(tPssrApprove, new ArrayList<>(confirmerUsers1), new ArrayList<>(confirmerUsers2), sub.getConfirm());
+        }
+    }
+
     // 现场卫生流程发起申请
     public void doXcwsApprove(TPssrSubcontent sub) {
         String userId = getUserId().toString();

+ 17 - 29
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyBleedController.java

@@ -1,24 +1,18 @@
 package com.ruoyi.project.pssr.controller;
 
-import java.util.List;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
-import com.ruoyi.project.pssr.domain.TPssrSafetyBleed;
-import com.ruoyi.project.pssr.service.ITPssrSafetyBleedService;
 import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
-import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.web.page.TableDataInfo;
+import com.ruoyi.project.pssr.domain.TPssrSafetyBleed;
+import com.ruoyi.project.pssr.service.ITPssrSafetyBleedService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
 
 /**
  * 安全设施-紧急泄放阀Controller
@@ -28,8 +22,7 @@ import com.ruoyi.framework.web.page.TableDataInfo;
  */
 @RestController
 @RequestMapping("/pssr/safetyBleed")
-public class TPssrSafetyBleedController extends BaseController
-{
+public class TPssrSafetyBleedController extends BaseController {
     @Autowired
     private ITPssrSafetyBleedService tPssrSafetyBleedService;
 
@@ -38,8 +31,7 @@ public class TPssrSafetyBleedController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:safetyBleed:list')")
     @GetMapping("/list")
-    public TableDataInfo list(TPssrSafetyBleed tPssrSafetyBleed)
-    {
+    public TableDataInfo list(TPssrSafetyBleed tPssrSafetyBleed) {
         startPage();
         List<TPssrSafetyBleed> list = tPssrSafetyBleedService.selectTPssrSafetyBleedList(tPssrSafetyBleed);
         return getDataTable(list);
@@ -51,8 +43,7 @@ public class TPssrSafetyBleedController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:safetyBleed:export')")
     @Log(title = "安全设施-紧急泄放阀", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
-    public AjaxResult export(TPssrSafetyBleed tPssrSafetyBleed)
-    {
+    public AjaxResult export(TPssrSafetyBleed tPssrSafetyBleed) {
         List<TPssrSafetyBleed> list = tPssrSafetyBleedService.selectTPssrSafetyBleedList(tPssrSafetyBleed);
         ExcelUtil<TPssrSafetyBleed> util = new ExcelUtil<TPssrSafetyBleed>(TPssrSafetyBleed.class);
         return util.exportExcel(list, "safetyBleed");
@@ -63,8 +54,7 @@ public class TPssrSafetyBleedController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:safetyBleed:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return AjaxResult.success(tPssrSafetyBleedService.selectTPssrSafetyBleedById(id));
     }
 
@@ -74,8 +64,8 @@ public class TPssrSafetyBleedController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:safetyBleed:add')")
     @Log(title = "安全设施-紧急泄放阀", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody TPssrSafetyBleed tPssrSafetyBleed)
-    {
+    public AjaxResult add(@RequestBody TPssrSafetyBleed tPssrSafetyBleed) {
+        tPssrSafetyBleed.setApproveStatus(0L);
         return toAjax(tPssrSafetyBleedService.insertTPssrSafetyBleed(tPssrSafetyBleed));
     }
 
@@ -85,8 +75,7 @@ public class TPssrSafetyBleedController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:safetyBleed:edit')")
     @Log(title = "安全设施-紧急泄放阀", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody TPssrSafetyBleed tPssrSafetyBleed)
-    {
+    public AjaxResult edit(@RequestBody TPssrSafetyBleed tPssrSafetyBleed) {
         return toAjax(tPssrSafetyBleedService.updateTPssrSafetyBleed(tPssrSafetyBleed));
     }
 
@@ -95,9 +84,8 @@ public class TPssrSafetyBleedController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:safetyBleed:remove')")
     @Log(title = "安全设施-紧急泄放阀", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(tPssrSafetyBleedService.deleteTPssrSafetyBleedByIds(ids));
     }
 }

+ 17 - 29
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyBreathController.java

@@ -1,24 +1,18 @@
 package com.ruoyi.project.pssr.controller;
 
-import java.util.List;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
-import com.ruoyi.project.pssr.domain.TPssrSafetyBreath;
-import com.ruoyi.project.pssr.service.ITPssrSafetyBreathService;
 import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
-import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.web.page.TableDataInfo;
+import com.ruoyi.project.pssr.domain.TPssrSafetyBreath;
+import com.ruoyi.project.pssr.service.ITPssrSafetyBreathService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
 
 /**
  * 安全设施-呼吸阀Controller
@@ -28,8 +22,7 @@ import com.ruoyi.framework.web.page.TableDataInfo;
  */
 @RestController
 @RequestMapping("/pssr/safetyBreath")
-public class TPssrSafetyBreathController extends BaseController
-{
+public class TPssrSafetyBreathController extends BaseController {
     @Autowired
     private ITPssrSafetyBreathService tPssrSafetyBreathService;
 
@@ -38,8 +31,7 @@ public class TPssrSafetyBreathController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:safetyBreath:list')")
     @GetMapping("/list")
-    public TableDataInfo list(TPssrSafetyBreath tPssrSafetyBreath)
-    {
+    public TableDataInfo list(TPssrSafetyBreath tPssrSafetyBreath) {
         startPage();
         List<TPssrSafetyBreath> list = tPssrSafetyBreathService.selectTPssrSafetyBreathList(tPssrSafetyBreath);
         return getDataTable(list);
@@ -51,8 +43,7 @@ public class TPssrSafetyBreathController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:safetyBreath:export')")
     @Log(title = "安全设施-呼吸阀", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
-    public AjaxResult export(TPssrSafetyBreath tPssrSafetyBreath)
-    {
+    public AjaxResult export(TPssrSafetyBreath tPssrSafetyBreath) {
         List<TPssrSafetyBreath> list = tPssrSafetyBreathService.selectTPssrSafetyBreathList(tPssrSafetyBreath);
         ExcelUtil<TPssrSafetyBreath> util = new ExcelUtil<TPssrSafetyBreath>(TPssrSafetyBreath.class);
         return util.exportExcel(list, "safetyBreath");
@@ -63,8 +54,7 @@ public class TPssrSafetyBreathController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:safetyBreath:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return AjaxResult.success(tPssrSafetyBreathService.selectTPssrSafetyBreathById(id));
     }
 
@@ -74,8 +64,8 @@ public class TPssrSafetyBreathController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:safetyBreath:add')")
     @Log(title = "安全设施-呼吸阀", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody TPssrSafetyBreath tPssrSafetyBreath)
-    {
+    public AjaxResult add(@RequestBody TPssrSafetyBreath tPssrSafetyBreath) {
+        tPssrSafetyBreath.setApproveStatus(0L);
         return toAjax(tPssrSafetyBreathService.insertTPssrSafetyBreath(tPssrSafetyBreath));
     }
 
@@ -85,8 +75,7 @@ public class TPssrSafetyBreathController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:safetyBreath:edit')")
     @Log(title = "安全设施-呼吸阀", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody TPssrSafetyBreath tPssrSafetyBreath)
-    {
+    public AjaxResult edit(@RequestBody TPssrSafetyBreath tPssrSafetyBreath) {
         return toAjax(tPssrSafetyBreathService.updateTPssrSafetyBreath(tPssrSafetyBreath));
     }
 
@@ -95,9 +84,8 @@ public class TPssrSafetyBreathController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:safetyBreath:remove')")
     @Log(title = "安全设施-呼吸阀", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(tPssrSafetyBreathService.deleteTPssrSafetyBreathByIds(ids));
     }
 }

+ 17 - 29
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyBrustController.java

@@ -1,24 +1,18 @@
 package com.ruoyi.project.pssr.controller;
 
-import java.util.List;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
-import com.ruoyi.project.pssr.domain.TPssrSafetyBrust;
-import com.ruoyi.project.pssr.service.ITPssrSafetyBrustService;
 import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
-import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.web.page.TableDataInfo;
+import com.ruoyi.project.pssr.domain.TPssrSafetyBrust;
+import com.ruoyi.project.pssr.service.ITPssrSafetyBrustService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
 
 /**
  * 安全设施-爆破片Controller
@@ -28,8 +22,7 @@ import com.ruoyi.framework.web.page.TableDataInfo;
  */
 @RestController
 @RequestMapping("/pssr/safetyBrust")
-public class TPssrSafetyBrustController extends BaseController
-{
+public class TPssrSafetyBrustController extends BaseController {
     @Autowired
     private ITPssrSafetyBrustService tPssrSafetyBrustService;
 
@@ -38,8 +31,7 @@ public class TPssrSafetyBrustController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:safetyBrust:list')")
     @GetMapping("/list")
-    public TableDataInfo list(TPssrSafetyBrust tPssrSafetyBrust)
-    {
+    public TableDataInfo list(TPssrSafetyBrust tPssrSafetyBrust) {
         startPage();
         List<TPssrSafetyBrust> list = tPssrSafetyBrustService.selectTPssrSafetyBrustList(tPssrSafetyBrust);
         return getDataTable(list);
@@ -51,8 +43,7 @@ public class TPssrSafetyBrustController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:safetyBrust:export')")
     @Log(title = "安全设施-爆破片", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
-    public AjaxResult export(TPssrSafetyBrust tPssrSafetyBrust)
-    {
+    public AjaxResult export(TPssrSafetyBrust tPssrSafetyBrust) {
         List<TPssrSafetyBrust> list = tPssrSafetyBrustService.selectTPssrSafetyBrustList(tPssrSafetyBrust);
         ExcelUtil<TPssrSafetyBrust> util = new ExcelUtil<TPssrSafetyBrust>(TPssrSafetyBrust.class);
         return util.exportExcel(list, "safetyBrust");
@@ -63,8 +54,7 @@ public class TPssrSafetyBrustController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:safetyBrust:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return AjaxResult.success(tPssrSafetyBrustService.selectTPssrSafetyBrustById(id));
     }
 
@@ -74,8 +64,8 @@ public class TPssrSafetyBrustController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:safetyBrust:add')")
     @Log(title = "安全设施-爆破片", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody TPssrSafetyBrust tPssrSafetyBrust)
-    {
+    public AjaxResult add(@RequestBody TPssrSafetyBrust tPssrSafetyBrust) {
+        tPssrSafetyBrust.setApproveStatus(0L);
         return toAjax(tPssrSafetyBrustService.insertTPssrSafetyBrust(tPssrSafetyBrust));
     }
 
@@ -85,8 +75,7 @@ public class TPssrSafetyBrustController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:safetyBrust:edit')")
     @Log(title = "安全设施-爆破片", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody TPssrSafetyBrust tPssrSafetyBrust)
-    {
+    public AjaxResult edit(@RequestBody TPssrSafetyBrust tPssrSafetyBrust) {
         return toAjax(tPssrSafetyBrustService.updateTPssrSafetyBrust(tPssrSafetyBrust));
     }
 
@@ -95,9 +84,8 @@ public class TPssrSafetyBrustController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:safetyBrust:remove')")
     @Log(title = "安全设施-爆破片", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(tPssrSafetyBrustService.deleteTPssrSafetyBrustByIds(ids));
     }
 }

+ 785 - 0
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyController.java

@@ -0,0 +1,785 @@
+package com.ruoyi.project.pssr.controller;
+
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.project.pssr.domain.*;
+import com.ruoyi.project.pssr.service.*;
+import org.activiti.engine.*;
+import org.activiti.engine.impl.identity.Authentication;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/pssr/safety")
+public class TPssrSafetyController extends BaseController {
+
+    @Autowired
+    private RuntimeService runtimeService;
+
+    @Autowired
+    private HistoryService historyService;
+
+    @Autowired
+    private ITPssrSafetyBleedService tPssrSafetyBleedService;
+
+    @Autowired
+    private ITPssrSafetyBreathService tPssrSafetyBreathService;
+
+    @Autowired
+    private ITPssrSafetyBrustService tPssrSafetyBrustService;
+
+    @Autowired
+    private ITPssrSafetyFlamearresterService tPssrSafetyFlamearresterService;
+
+    @Autowired
+    private ITPssrSafetyValveService tPssrSafetyValveService;
+
+    @Autowired
+    private ITPssrApproveService tPssrApproveService;
+
+    @Autowired
+    private ITPssrSubcontentService tPssrSubcontentService;
+
+
+    /**
+     * 确认安全设施-泄放阀
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:safetyBleed:edit')")
+    @Log(title = "安全设施-泄放阀", businessType = BusinessType.UPDATE)
+    @PutMapping("/confirmBleed")
+    public AjaxResult confirmBleed(@RequestBody TPssrSafetyBleed tPssrSafetyBleed) {
+        long queryStatus = 0;
+        long approveStatus = 0;
+        Date date = null;
+        TPssrSafetyBleed bleed = new TPssrSafetyBleed();
+        if (tPssrSafetyBleed.getTaskType() == 4) {
+            //确认人1确认
+            queryStatus = 1;
+            approveStatus = 3;
+            bleed.setConfirmer1(getUserId().toString());
+            date = new Date();
+        } else if (tPssrSafetyBleed.getTaskType() == 5) {
+            //确认人2确认
+            queryStatus = 3;
+            approveStatus = 2;
+            bleed.setConfirmer2(getUserId().toString());
+            date = new Date();
+        }
+        if (tPssrSafetyBleed.getIds() != null && tPssrSafetyBleed.getIds().length > 0) {
+            for (Long id : tPssrSafetyBleed.getIds()) {
+                bleed = tPssrSafetyBleedService.selectTPssrSafetyBleedById(id);
+                if (bleed.getConfirmationTime() == null) {
+                    bleed.setConfirmationTime(new Date());
+                }
+                bleed.setApproveStatus(approveStatus);
+                bleed.setUpdatedate(new Date());
+                bleed.setUpdaterCode(String.valueOf(getUserId()));
+                tPssrSafetyBleedService.updateTPssrSafetyBleed(bleed);
+            }
+        } else {
+            bleed.setSubId(tPssrSafetyBleed.getSubId());
+            bleed.setApproveStatus(queryStatus);
+            for (TPssrSafetyBleed safetyBleed : tPssrSafetyBleedService.selectTPssrSafetyBleedList(bleed)) {
+                if (safetyBleed.getConfirmationTime() == null) {
+                    safetyBleed.setConfirmationTime(new Date());
+                }
+                safetyBleed.setApproveStatus(2L);
+                safetyBleed.setUpdatedate(new Date());
+                safetyBleed.setUpdaterCode(String.valueOf(getUserId()));
+                tPssrSafetyBleedService.updateTPssrSafetyBleed(safetyBleed);
+            }
+        }
+        //查询当前待审批的确认人
+        TPssrSafetyBleed entity = new TPssrSafetyBleed();
+        entity.setSubId(tPssrSafetyBleed.getSubId());
+        entity.setApproveStatus(queryStatus);
+        TPssrSafetyBleed safetyBleed = tPssrSafetyBleedService.selectAllConfirmedPersonBySubId(entity);
+        if (safetyBleed != null) {
+            //如果当前用户还有待审批任务
+            if (tPssrSafetyBleed.getTaskType() == 4 && StringUtils.isNotEmpty(safetyBleed.getConfirmer1())) {
+                if (safetyBleed.getConfirmer1().contains(getUserId().toString())) {
+                    return AjaxResult.success();
+                }
+            }
+
+            if (tPssrSafetyBleed.getTaskType() == 5 && StringUtils.isNotEmpty(safetyBleed.getConfirmer2())) {
+                if (safetyBleed.getConfirmer2().contains(getUserId().toString())) {
+                    return AjaxResult.success();
+                }
+            }
+        }
+        //无待审批任务结束当前用户流程
+        TPssrApprove approve = new TPssrApprove();
+        approve.setSubId(tPssrSafetyBleed.getSubId());
+        // 因为流程关系所以approve一定会有且只有一条数据
+        TPssrApprove tPssrApprove = tPssrApproveService.selectTPssrApproveList(approve).get(0);
+        TPssrApproveController.handleConfirmApprove(tPssrApprove, getUserId().toString());
+        return AjaxResult.success();
+    }
+    /**
+     * 确认安全设施-呼吸阀
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:safetyBleed:edit')")
+    @Log(title = "安全设施-呼吸阀", businessType = BusinessType.UPDATE)
+    @PutMapping("/confirmBreath")
+    public AjaxResult confirmBreath(@RequestBody TPssrSafetyBreath tPssrSafetyBreath) {
+        long queryStatus = 0;
+        long approveStatus = 0;
+        Date date = null;
+        TPssrSafetyBreath breath = new TPssrSafetyBreath();
+        if (tPssrSafetyBreath.getTaskType() == 4) {
+            //确认人1确认
+            queryStatus = 1;
+            approveStatus = 3;
+            breath.setConfirmer1(getUserId().toString());
+            date = new Date();
+        } else if (tPssrSafetyBreath.getTaskType() == 5) {
+            //确认人2确认
+            queryStatus = 3;
+            approveStatus = 2;
+            breath.setConfirmer2(getUserId().toString());
+            date = new Date();
+        }
+        if (tPssrSafetyBreath.getIds() != null && tPssrSafetyBreath.getIds().length > 0) {
+            for (Long id : tPssrSafetyBreath.getIds()) {
+                breath = tPssrSafetyBreathService.selectTPssrSafetyBreathById(id);
+                if (breath.getConfirmationTime() == null) {
+                    breath.setConfirmationTime(new Date());
+                }
+                breath.setApproveStatus(approveStatus);
+                breath.setUpdatedate(new Date());
+                breath.setUpdaterCode(String.valueOf(getUserId()));
+                tPssrSafetyBreathService.updateTPssrSafetyBreath(breath);
+            }
+        } else {
+            breath.setSubId(tPssrSafetyBreath.getSubId());
+            breath.setApproveStatus(queryStatus);
+            for (TPssrSafetyBreath safetyBreath : tPssrSafetyBreathService.selectTPssrSafetyBreathList(breath)) {
+                if (safetyBreath.getConfirmationTime() == null) {
+                    safetyBreath.setConfirmationTime(new Date());
+                }
+                safetyBreath.setApproveStatus(2L);
+                safetyBreath.setUpdatedate(new Date());
+                safetyBreath.setUpdaterCode(String.valueOf(getUserId()));
+                tPssrSafetyBreathService.updateTPssrSafetyBreath(safetyBreath);
+            }
+        }
+        //查询当前待审批的确认人
+        TPssrSafetyBleed entity = new TPssrSafetyBleed();
+        entity.setSubId(tPssrSafetyBreath.getSubId());
+        entity.setApproveStatus(queryStatus);
+        TPssrSafetyBleed safetyBreath = tPssrSafetyBleedService.selectAllConfirmedPersonBySubId(entity);
+        if (safetyBreath != null) {
+            //如果当前用户还有待审批任务
+            if (tPssrSafetyBreath.getTaskType() == 4 && StringUtils.isNotEmpty(safetyBreath.getConfirmer1())) {
+                if (safetyBreath.getConfirmer1().contains(getUserId().toString())) {
+                    return AjaxResult.success();
+                }
+            }
+
+            if (tPssrSafetyBreath.getTaskType() == 5 && StringUtils.isNotEmpty(safetyBreath.getConfirmer2())) {
+                if (safetyBreath.getConfirmer2().contains(getUserId().toString())) {
+                    return AjaxResult.success();
+                }
+            }
+        }
+        //无待审批任务结束当前用户流程
+        TPssrApprove approve = new TPssrApprove();
+        approve.setSubId(tPssrSafetyBreath.getSubId());
+        // 因为流程关系所以approve一定会有且只有一条数据
+        TPssrApprove tPssrApprove = tPssrApproveService.selectTPssrApproveList(approve).get(0);
+        TPssrApproveController.handleConfirmApprove(tPssrApprove, getUserId().toString());
+        return AjaxResult.success();
+    }
+    /**
+     * 确认安全设施-爆破片
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:safetyBleed:edit')")
+    @Log(title = "安全设施-爆破片", businessType = BusinessType.UPDATE)
+    @PutMapping("/confirmBrust")
+    public AjaxResult confirmBrust(@RequestBody TPssrSafetyBrust tPssrSafetyBrust) {
+        long queryStatus = 0;
+        long approveStatus = 0;
+        Date date = null;
+        TPssrSafetyBrust brust = new TPssrSafetyBrust();
+        if (tPssrSafetyBrust.getTaskType() == 4) {
+            //确认人1确认
+            queryStatus = 1;
+            approveStatus = 3;
+            brust.setConfirmer1(getUserId().toString());
+            date = new Date();
+        } else if (tPssrSafetyBrust.getTaskType() == 5) {
+            //确认人2确认
+            queryStatus = 3;
+            approveStatus = 2;
+            brust.setConfirmer2(getUserId().toString());
+            date = new Date();
+        }
+        if (tPssrSafetyBrust.getIds() != null && tPssrSafetyBrust.getIds().length > 0) {
+            for (Long id : tPssrSafetyBrust.getIds()) {
+                brust = tPssrSafetyBrustService.selectTPssrSafetyBrustById(id);
+                if (brust.getConfirmationTime() == null) {
+                    brust.setConfirmationTime(new Date());
+                }
+                brust.setApproveStatus(approveStatus);
+                brust.setUpdatedate(new Date());
+                brust.setUpdaterCode(String.valueOf(getUserId()));
+                tPssrSafetyBrustService.updateTPssrSafetyBrust(brust);
+            }
+        } else {
+            brust.setSubId(tPssrSafetyBrust.getSubId());
+            brust.setApproveStatus(queryStatus);
+            for (TPssrSafetyBrust safetyBrust : tPssrSafetyBrustService.selectTPssrSafetyBrustList(brust)) {
+                if (safetyBrust.getConfirmationTime() == null) {
+                    safetyBrust.setConfirmationTime(new Date());
+                }
+                safetyBrust.setApproveStatus(2L);
+                safetyBrust.setUpdatedate(new Date());
+                safetyBrust.setUpdaterCode(String.valueOf(getUserId()));
+                tPssrSafetyBrustService.updateTPssrSafetyBrust(safetyBrust);
+            }
+        }
+        //查询当前待审批的确认人
+        TPssrSafetyBleed entity = new TPssrSafetyBleed();
+        entity.setSubId(tPssrSafetyBrust.getSubId());
+        entity.setApproveStatus(queryStatus);
+        TPssrSafetyBleed safetyBrust = tPssrSafetyBleedService.selectAllConfirmedPersonBySubId(entity);
+        if (safetyBrust != null) {
+            //如果当前用户还有待审批任务
+            if (tPssrSafetyBrust.getTaskType() == 4 && StringUtils.isNotEmpty(safetyBrust.getConfirmer1())) {
+                if (safetyBrust.getConfirmer1().contains(getUserId().toString())) {
+                    return AjaxResult.success();
+                }
+            }
+
+            if (tPssrSafetyBrust.getTaskType() == 5 && StringUtils.isNotEmpty(safetyBrust.getConfirmer2())) {
+                if (safetyBrust.getConfirmer2().contains(getUserId().toString())) {
+                    return AjaxResult.success();
+                }
+            }
+        }
+        //无待审批任务结束当前用户流程
+        TPssrApprove approve = new TPssrApprove();
+        approve.setSubId(tPssrSafetyBrust.getSubId());
+        // 因为流程关系所以approve一定会有且只有一条数据
+        TPssrApprove tPssrApprove = tPssrApproveService.selectTPssrApproveList(approve).get(0);
+        TPssrApproveController.handleConfirmApprove(tPssrApprove, getUserId().toString());
+        return AjaxResult.success();
+    }
+    /**
+     * 确认安全设施-阻火器
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:safetyBleed:edit')")
+    @Log(title = "安全设施-阻火器", businessType = BusinessType.UPDATE)
+    @PutMapping("/confirmFlamearrester")
+    public AjaxResult confirmFlamearrester(@RequestBody TPssrSafetyFlamearrester tPssrSafetyFlamearrester) {
+        long queryStatus = 0;
+        long approveStatus = 0;
+        Date date = null;
+        TPssrSafetyFlamearrester flamearrester = new TPssrSafetyFlamearrester();
+        if (tPssrSafetyFlamearrester.getTaskType() == 4) {
+            //确认人1确认
+            queryStatus = 1;
+            approveStatus = 3;
+            flamearrester.setConfirmer1(getUserId().toString());
+            date = new Date();
+        } else if (tPssrSafetyFlamearrester.getTaskType() == 5) {
+            //确认人2确认
+            queryStatus = 3;
+            approveStatus = 2;
+            flamearrester.setConfirmer2(getUserId().toString());
+            date = new Date();
+        }
+        if (tPssrSafetyFlamearrester.getIds() != null && tPssrSafetyFlamearrester.getIds().length > 0) {
+            for (Long id : tPssrSafetyFlamearrester.getIds()) {
+                flamearrester = tPssrSafetyFlamearresterService.selectTPssrSafetyFlamearresterById(id);
+                if (flamearrester.getConfirmationTime() == null) {
+                    flamearrester.setConfirmationTime(new Date());
+                }
+                flamearrester.setApproveStatus(approveStatus);
+                flamearrester.setUpdatedate(new Date());
+                flamearrester.setUpdaterCode(String.valueOf(getUserId()));
+                tPssrSafetyFlamearresterService.updateTPssrSafetyFlamearrester(flamearrester);
+            }
+        } else {
+            flamearrester.setSubId(tPssrSafetyFlamearrester.getSubId());
+            flamearrester.setApproveStatus(queryStatus);
+            for (TPssrSafetyFlamearrester safetyFlamearrester : tPssrSafetyFlamearresterService.selectTPssrSafetyFlamearresterList(flamearrester)) {
+                if (safetyFlamearrester.getConfirmationTime() == null) {
+                    safetyFlamearrester.setConfirmationTime(new Date());
+                }
+                safetyFlamearrester.setApproveStatus(2L);
+                safetyFlamearrester.setUpdatedate(new Date());
+                safetyFlamearrester.setUpdaterCode(String.valueOf(getUserId()));
+                tPssrSafetyFlamearresterService.updateTPssrSafetyFlamearrester(safetyFlamearrester);
+            }
+        }
+        //查询当前待审批的确认人
+        TPssrSafetyBleed entity = new TPssrSafetyBleed();
+        entity.setSubId(tPssrSafetyFlamearrester.getSubId());
+        entity.setApproveStatus(queryStatus);
+        TPssrSafetyBleed safetyFlamearrester = tPssrSafetyBleedService.selectAllConfirmedPersonBySubId(entity);
+        if (safetyFlamearrester != null) {
+            //如果当前用户还有待审批任务
+            if (tPssrSafetyFlamearrester.getTaskType() == 4 && StringUtils.isNotEmpty(safetyFlamearrester.getConfirmer1())) {
+                if (safetyFlamearrester.getConfirmer1().contains(getUserId().toString())) {
+                    return AjaxResult.success();
+                }
+            }
+
+            if (tPssrSafetyFlamearrester.getTaskType() == 5 && StringUtils.isNotEmpty(safetyFlamearrester.getConfirmer2())) {
+                if (safetyFlamearrester.getConfirmer2().contains(getUserId().toString())) {
+                    return AjaxResult.success();
+                }
+            }
+        }
+        //无待审批任务结束当前用户流程
+        TPssrApprove approve = new TPssrApprove();
+        approve.setSubId(tPssrSafetyFlamearrester.getSubId());
+        // 因为流程关系所以approve一定会有且只有一条数据
+        TPssrApprove tPssrApprove = tPssrApproveService.selectTPssrApproveList(approve).get(0);
+        TPssrApproveController.handleConfirmApprove(tPssrApprove, getUserId().toString());
+        return AjaxResult.success();
+    }
+    /**
+     * 确认安全设施-安全阀
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:safetyBleed:edit')")
+    @Log(title = "安全设施-安全阀", businessType = BusinessType.UPDATE)
+    @PutMapping("/confirmValve")
+    public AjaxResult confirmValve(@RequestBody TPssrSafetyValve tPssrSafetyValve) {
+        long queryStatus = 0;
+        long approveStatus = 0;
+        Date date = null;
+        TPssrSafetyValve valve = new TPssrSafetyValve();
+        if (tPssrSafetyValve.getTaskType() == 4) {
+            //确认人1确认
+            queryStatus = 1;
+            approveStatus = 3;
+            valve.setConfirmer1(getUserId().toString());
+            date = new Date();
+        } else if (tPssrSafetyValve.getTaskType() == 5) {
+            //确认人2确认
+            queryStatus = 3;
+            approveStatus = 2;
+            valve.setConfirmer2(getUserId().toString());
+            date = new Date();
+        }
+        if (tPssrSafetyValve.getIds() != null && tPssrSafetyValve.getIds().length > 0) {
+            for (Long id : tPssrSafetyValve.getIds()) {
+                valve = tPssrSafetyValveService.selectTPssrSafetyValveById(id);
+                if (valve.getConfirmationTime() == null) {
+                    valve.setConfirmationTime(new Date());
+                }
+                valve.setApproveStatus(approveStatus);
+                valve.setUpdatedate(new Date());
+                valve.setUpdaterCode(String.valueOf(getUserId()));
+                tPssrSafetyValveService.updateTPssrSafetyValve(valve);
+            }
+        } else {
+            valve.setSubId(tPssrSafetyValve.getSubId());
+            valve.setApproveStatus(queryStatus);
+            for (TPssrSafetyValve safetyValve : tPssrSafetyValveService.selectTPssrSafetyValveList(valve)) {
+                if (safetyValve.getConfirmationTime() == null) {
+                    safetyValve.setConfirmationTime(new Date());
+                }
+                safetyValve.setApproveStatus(2L);
+                safetyValve.setUpdatedate(new Date());
+                safetyValve.setUpdaterCode(String.valueOf(getUserId()));
+                tPssrSafetyValveService.updateTPssrSafetyValve(safetyValve);
+            }
+        }
+        //查询当前待审批的确认人
+        TPssrSafetyBleed entity = new TPssrSafetyBleed();
+        entity.setSubId(tPssrSafetyValve.getSubId());
+        entity.setApproveStatus(queryStatus);
+        TPssrSafetyBleed safetyBleed = tPssrSafetyBleedService.selectAllConfirmedPersonBySubId(entity);
+        if (safetyBleed != null) {
+            //如果当前用户还有待审批任务
+            if (tPssrSafetyValve.getTaskType() == 4 && StringUtils.isNotEmpty(safetyBleed.getConfirmer1())) {
+                if (safetyBleed.getConfirmer1().contains(getUserId().toString())) {
+                    return AjaxResult.success();
+                }
+            }
+
+            if (tPssrSafetyValve.getTaskType() == 5 && StringUtils.isNotEmpty(safetyBleed.getConfirmer2())) {
+                if (safetyBleed.getConfirmer2().contains(getUserId().toString())) {
+                    return AjaxResult.success();
+                }
+            }
+        }
+        //无待审批任务结束当前用户流程
+        TPssrApprove approve = new TPssrApprove();
+        approve.setSubId(tPssrSafetyValve.getSubId());
+        // 因为流程关系所以approve一定会有且只有一条数据
+        TPssrApprove tPssrApprove = tPssrApproveService.selectTPssrApproveList(approve).get(0);
+        TPssrApproveController.handleConfirmApprove(tPssrApprove, getUserId().toString());
+        return AjaxResult.success();
+    }
+
+    /**
+     * 驳回泄放阀
+     */
+    @PutMapping("/turnDownBleed")
+    public AjaxResult turnDownBleed(@RequestBody TPssrSafetyBleed tPssrSafetyBleed) {
+        if (tPssrSafetyBleed.getIds() != null) {
+            String userId = getUserId().toString();
+            // 修改已选择数据的状态
+            for (Long id : tPssrSafetyBleed.getIds()) {
+                TPssrSafetyBleed blind = new TPssrSafetyBleed();
+                blind.setId(id);
+                blind.setApproveStatus(1L);
+                blind.setUpdatedate(new Date());
+                blind.setUpdaterCode(getUserId().toString());
+                tPssrSafetyBleedService.updateTPssrSafetyBleed(blind);
+            }
+            // 查询当前流程
+            TPssrApprove approve = tPssrApproveService.selectTPssrApproveBySubId(tPssrSafetyBleed.getSubId());
+
+            try {
+                runtimeService.deleteProcessInstance(approve.getProcessId(), "pssr2confirm");
+                historyService.deleteHistoricProcessInstance(approve.getProcessId());
+            } catch (Exception e) {
+                logger.info("无运行时流程");
+            }
+
+            // 驳回 查询所有待审批的人员
+            TPssrSafetyBleed blind = new TPssrSafetyBleed();
+            blind.setSubId(tPssrSafetyBleed.getSubId());
+            blind.setApproveStatus(1L);
+            Set<String> confirmUsers1 = new HashSet<>();
+            Set<String> confirmUsers2 = new HashSet<>();
+            for (TPssrSafetyBleed item : tPssrSafetyBleedService.selectTPssrSafetyBleedList(blind)) {
+
+                // 确认人1
+                confirmUsers1.add(item.getConfirmer1());
+
+                //确认人2
+                confirmUsers2.add(item.getConfirmer2());
+            }
+
+            // 开始申请流程
+            long businessKey = approve.getApproveId();
+            //开始工作流、监听
+            Authentication.setAuthenticatedUserId(userId);//设置当前申请人
+            Map<String, Object> variables = new HashMap<>();
+            variables.put("applyUser", userId);
+            variables.put("confirmUsers1", confirmUsers1);
+            variables.put("confirmUsers2", confirmUsers2);
+            variables.put("chargePerson", approve.getSubCharge());
+            //采用key来启动流程定义并设置流程变量,返回流程实例
+            ProcessInstance pi = runtimeService.startProcessInstanceByKey("pssr2confirm", String.valueOf(businessKey), variables);
+
+            // 修改审批表和sub表
+            approve.setProcessId(pi.getProcessInstanceId());
+            approve.setApproveStatus(1L);
+            approve.setUpdatedate(new Date());
+            approve.setUpdaterCode(getUserId().toString());
+            tPssrApproveService.updateTPssrApprove(approve);
+
+            TPssrSubcontent subcontent = new TPssrSubcontent();
+            subcontent.setId(approve.getSubId());
+            subcontent.setApproveStatus(1L);
+            subcontent.setUpdatedate(new Date());
+            subcontent.setUpdaterCode(getUserId().toString());
+            tPssrSubcontentService.updateTPssrSubcontent(subcontent);
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
+
+    /**
+     * 驳回呼吸阀
+     */
+    @PutMapping("/turnDownBreath")
+    public AjaxResult turnDownBreath(@RequestBody TPssrSafetyBreath tPssrSafetyBreath) {
+        if (tPssrSafetyBreath.getIds() != null) {
+            String userId = getUserId().toString();
+            // 修改已选择数据的状态
+            for (Long id : tPssrSafetyBreath.getIds()) {
+                TPssrSafetyBreath blind = new TPssrSafetyBreath();
+                blind.setId(id);
+                blind.setApproveStatus(1L);
+                blind.setUpdatedate(new Date());
+                blind.setUpdaterCode(getUserId().toString());
+                tPssrSafetyBreathService.updateTPssrSafetyBreath(blind);
+            }
+            // 查询当前流程
+            TPssrApprove approve = tPssrApproveService.selectTPssrApproveBySubId(tPssrSafetyBreath.getSubId());
+
+            try {
+                runtimeService.deleteProcessInstance(approve.getProcessId(), "pssr2confirm");
+                historyService.deleteHistoricProcessInstance(approve.getProcessId());
+            } catch (Exception e) {
+                logger.info("无运行时流程");
+            }
+
+            // 驳回 查询所有待审批的人员
+            TPssrSafetyBreath blind = new TPssrSafetyBreath();
+            blind.setSubId(tPssrSafetyBreath.getSubId());
+            blind.setApproveStatus(1L);
+            Set<String> confirmUsers1 = new HashSet<>();
+            Set<String> confirmUsers2 = new HashSet<>();
+            for (TPssrSafetyBreath item : tPssrSafetyBreathService.selectTPssrSafetyBreathList(blind)) {
+
+                // 确认人1
+                confirmUsers1.add(item.getConfirmer1());
+
+                //确认人2
+                confirmUsers2.add(item.getConfirmer2());
+            }
+
+            // 开始申请流程
+            long businessKey = approve.getApproveId();
+            //开始工作流、监听
+            Authentication.setAuthenticatedUserId(userId);//设置当前申请人
+            Map<String, Object> variables = new HashMap<>();
+            variables.put("applyUser", userId);
+            variables.put("confirmUsers1", confirmUsers1);
+            variables.put("confirmUsers2", confirmUsers2);
+            variables.put("chargePerson", approve.getSubCharge());
+            //采用key来启动流程定义并设置流程变量,返回流程实例
+            ProcessInstance pi = runtimeService.startProcessInstanceByKey("pssr2confirm", String.valueOf(businessKey), variables);
+
+            // 修改审批表和sub表
+            approve.setProcessId(pi.getProcessInstanceId());
+            approve.setApproveStatus(1L);
+            approve.setUpdatedate(new Date());
+            approve.setUpdaterCode(getUserId().toString());
+            tPssrApproveService.updateTPssrApprove(approve);
+
+            TPssrSubcontent subcontent = new TPssrSubcontent();
+            subcontent.setId(approve.getSubId());
+            subcontent.setApproveStatus(1L);
+            subcontent.setUpdatedate(new Date());
+            subcontent.setUpdaterCode(getUserId().toString());
+            tPssrSubcontentService.updateTPssrSubcontent(subcontent);
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
+
+    /**
+     * 驳回爆破片
+     */
+    @PutMapping("/turnDownBrust")
+    public AjaxResult turnDownBrust(@RequestBody TPssrSafetyBrust tPssrSafetyBrust) {
+        if (tPssrSafetyBrust.getIds() != null) {
+            String userId = getUserId().toString();
+            // 修改已选择数据的状态
+            for (Long id : tPssrSafetyBrust.getIds()) {
+                TPssrSafetyBrust blind = new TPssrSafetyBrust();
+                blind.setId(id);
+                blind.setApproveStatus(1L);
+                blind.setUpdatedate(new Date());
+                blind.setUpdaterCode(getUserId().toString());
+                tPssrSafetyBrustService.updateTPssrSafetyBrust(blind);
+            }
+            // 查询当前流程
+            TPssrApprove approve = tPssrApproveService.selectTPssrApproveBySubId(tPssrSafetyBrust.getSubId());
+
+            try {
+                runtimeService.deleteProcessInstance(approve.getProcessId(), "pssr2confirm");
+                historyService.deleteHistoricProcessInstance(approve.getProcessId());
+            } catch (Exception e) {
+                logger.info("无运行时流程");
+            }
+
+            // 驳回 查询所有待审批的人员
+            TPssrSafetyBrust blind = new TPssrSafetyBrust();
+            blind.setSubId(tPssrSafetyBrust.getSubId());
+            blind.setApproveStatus(1L);
+            Set<String> confirmUsers1 = new HashSet<>();
+            Set<String> confirmUsers2 = new HashSet<>();
+            for (TPssrSafetyBrust item : tPssrSafetyBrustService.selectTPssrSafetyBrustList(blind)) {
+
+                // 确认人1
+                confirmUsers1.add(item.getConfirmer1());
+
+                //确认人2
+                confirmUsers2.add(item.getConfirmer2());
+            }
+
+            // 开始申请流程
+            long businessKey = approve.getApproveId();
+            //开始工作流、监听
+            Authentication.setAuthenticatedUserId(userId);//设置当前申请人
+            Map<String, Object> variables = new HashMap<>();
+            variables.put("applyUser", userId);
+            variables.put("confirmUsers1", confirmUsers1);
+            variables.put("confirmUsers2", confirmUsers2);
+            variables.put("chargePerson", approve.getSubCharge());
+            //采用key来启动流程定义并设置流程变量,返回流程实例
+            ProcessInstance pi = runtimeService.startProcessInstanceByKey("pssr2confirm", String.valueOf(businessKey), variables);
+
+            // 修改审批表和sub表
+            approve.setProcessId(pi.getProcessInstanceId());
+            approve.setApproveStatus(1L);
+            approve.setUpdatedate(new Date());
+            approve.setUpdaterCode(getUserId().toString());
+            tPssrApproveService.updateTPssrApprove(approve);
+
+            TPssrSubcontent subcontent = new TPssrSubcontent();
+            subcontent.setId(approve.getSubId());
+            subcontent.setApproveStatus(1L);
+            subcontent.setUpdatedate(new Date());
+            subcontent.setUpdaterCode(getUserId().toString());
+            tPssrSubcontentService.updateTPssrSubcontent(subcontent);
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
+
+    /**
+     * 驳回阻火器
+     */
+    @PutMapping("/turnDownFlamearrester")
+    public AjaxResult turnDownFlamearrester(@RequestBody TPssrSafetyFlamearrester tPssrSafetyFlamearrester) {
+        if (tPssrSafetyFlamearrester.getIds() != null) {
+            String userId = getUserId().toString();
+            // 修改已选择数据的状态
+            for (Long id : tPssrSafetyFlamearrester.getIds()) {
+                TPssrSafetyFlamearrester blind = new TPssrSafetyFlamearrester();
+                blind.setId(id);
+                blind.setApproveStatus(1L);
+                blind.setUpdatedate(new Date());
+                blind.setUpdaterCode(getUserId().toString());
+                tPssrSafetyFlamearresterService.updateTPssrSafetyFlamearrester(blind);
+            }
+            // 查询当前流程
+            TPssrApprove approve = tPssrApproveService.selectTPssrApproveBySubId(tPssrSafetyFlamearrester.getSubId());
+
+            try {
+                runtimeService.deleteProcessInstance(approve.getProcessId(), "pssr2confirm");
+                historyService.deleteHistoricProcessInstance(approve.getProcessId());
+            } catch (Exception e) {
+                logger.info("无运行时流程");
+            }
+
+            // 驳回 查询所有待审批的人员
+            TPssrSafetyFlamearrester blind = new TPssrSafetyFlamearrester();
+            blind.setSubId(tPssrSafetyFlamearrester.getSubId());
+            blind.setApproveStatus(1L);
+            Set<String> confirmUsers1 = new HashSet<>();
+            Set<String> confirmUsers2 = new HashSet<>();
+            for (TPssrSafetyFlamearrester item : tPssrSafetyFlamearresterService.selectTPssrSafetyFlamearresterList(blind)) {
+
+                // 确认人1
+                confirmUsers1.add(item.getConfirmer1());
+
+                //确认人2
+                confirmUsers2.add(item.getConfirmer2());
+            }
+
+            // 开始申请流程
+            long businessKey = approve.getApproveId();
+            //开始工作流、监听
+            Authentication.setAuthenticatedUserId(userId);//设置当前申请人
+            Map<String, Object> variables = new HashMap<>();
+            variables.put("applyUser", userId);
+            variables.put("confirmUsers1", confirmUsers1);
+            variables.put("confirmUsers2", confirmUsers2);
+            variables.put("chargePerson", approve.getSubCharge());
+            //采用key来启动流程定义并设置流程变量,返回流程实例
+            ProcessInstance pi = runtimeService.startProcessInstanceByKey("pssr2confirm", String.valueOf(businessKey), variables);
+
+            // 修改审批表和sub表
+            approve.setProcessId(pi.getProcessInstanceId());
+            approve.setApproveStatus(1L);
+            approve.setUpdatedate(new Date());
+            approve.setUpdaterCode(getUserId().toString());
+            tPssrApproveService.updateTPssrApprove(approve);
+
+            TPssrSubcontent subcontent = new TPssrSubcontent();
+            subcontent.setId(approve.getSubId());
+            subcontent.setApproveStatus(1L);
+            subcontent.setUpdatedate(new Date());
+            subcontent.setUpdaterCode(getUserId().toString());
+            tPssrSubcontentService.updateTPssrSubcontent(subcontent);
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
+
+    /**
+     * 驳回安全阀
+     */
+    @PutMapping("/turnDownValve")
+    public AjaxResult turnDownValve(@RequestBody TPssrSafetyValve tPssrSafetyValve) {
+        if (tPssrSafetyValve.getIds() != null) {
+            String userId = getUserId().toString();
+            // 修改已选择数据的状态
+            for (Long id : tPssrSafetyValve.getIds()) {
+                TPssrSafetyValve blind = new TPssrSafetyValve();
+                blind.setId(id);
+                blind.setApproveStatus(1L);
+                blind.setUpdatedate(new Date());
+                blind.setUpdaterCode(getUserId().toString());
+                tPssrSafetyValveService.updateTPssrSafetyValve(blind);
+            }
+            // 查询当前流程
+            TPssrApprove approve = tPssrApproveService.selectTPssrApproveBySubId(tPssrSafetyValve.getSubId());
+
+            try {
+                runtimeService.deleteProcessInstance(approve.getProcessId(), "pssr2confirm");
+                historyService.deleteHistoricProcessInstance(approve.getProcessId());
+            } catch (Exception e) {
+                logger.info("无运行时流程");
+            }
+
+            // 驳回 查询所有待审批的人员
+            TPssrSafetyValve blind = new TPssrSafetyValve();
+            blind.setSubId(tPssrSafetyValve.getSubId());
+            blind.setApproveStatus(1L);
+            Set<String> confirmUsers1 = new HashSet<>();
+            Set<String> confirmUsers2 = new HashSet<>();
+            for (TPssrSafetyValve item : tPssrSafetyValveService.selectTPssrSafetyValveList(blind)) {
+
+                // 确认人1
+                confirmUsers1.add(item.getConfirmer1());
+
+                //确认人2
+                confirmUsers2.add(item.getConfirmer2());
+            }
+
+            // 开始申请流程
+            long businessKey = approve.getApproveId();
+            //开始工作流、监听
+            Authentication.setAuthenticatedUserId(userId);//设置当前申请人
+            Map<String, Object> variables = new HashMap<>();
+            variables.put("applyUser", userId);
+            variables.put("confirmUsers1", confirmUsers1);
+            variables.put("confirmUsers2", confirmUsers2);
+            variables.put("chargePerson", approve.getSubCharge());
+            //采用key来启动流程定义并设置流程变量,返回流程实例
+            ProcessInstance pi = runtimeService.startProcessInstanceByKey("pssr2confirm", String.valueOf(businessKey), variables);
+
+            // 修改审批表和sub表
+            approve.setProcessId(pi.getProcessInstanceId());
+            approve.setApproveStatus(1L);
+            approve.setUpdatedate(new Date());
+            approve.setUpdaterCode(getUserId().toString());
+            tPssrApproveService.updateTPssrApprove(approve);
+
+            TPssrSubcontent subcontent = new TPssrSubcontent();
+            subcontent.setId(approve.getSubId());
+            subcontent.setApproveStatus(1L);
+            subcontent.setUpdatedate(new Date());
+            subcontent.setUpdaterCode(getUserId().toString());
+            tPssrSubcontentService.updateTPssrSubcontent(subcontent);
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
+}

+ 17 - 29
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyFlamearresterController.java

@@ -1,24 +1,18 @@
 package com.ruoyi.project.pssr.controller;
 
-import java.util.List;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
-import com.ruoyi.project.pssr.domain.TPssrSafetyFlamearrester;
-import com.ruoyi.project.pssr.service.ITPssrSafetyFlamearresterService;
 import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
-import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.web.page.TableDataInfo;
+import com.ruoyi.project.pssr.domain.TPssrSafetyFlamearrester;
+import com.ruoyi.project.pssr.service.ITPssrSafetyFlamearresterService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
 
 /**
  * 安全设施-阻火器Controller
@@ -28,8 +22,7 @@ import com.ruoyi.framework.web.page.TableDataInfo;
  */
 @RestController
 @RequestMapping("/pssr/safetyFlamearrester")
-public class TPssrSafetyFlamearresterController extends BaseController
-{
+public class TPssrSafetyFlamearresterController extends BaseController {
     @Autowired
     private ITPssrSafetyFlamearresterService tPssrSafetyFlamearresterService;
 
@@ -38,8 +31,7 @@ public class TPssrSafetyFlamearresterController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:safetyFlamearrester:list')")
     @GetMapping("/list")
-    public TableDataInfo list(TPssrSafetyFlamearrester tPssrSafetyFlamearrester)
-    {
+    public TableDataInfo list(TPssrSafetyFlamearrester tPssrSafetyFlamearrester) {
         startPage();
         List<TPssrSafetyFlamearrester> list = tPssrSafetyFlamearresterService.selectTPssrSafetyFlamearresterList(tPssrSafetyFlamearrester);
         return getDataTable(list);
@@ -51,8 +43,7 @@ public class TPssrSafetyFlamearresterController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:safetyFlamearrester:export')")
     @Log(title = "安全设施-阻火器", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
-    public AjaxResult export(TPssrSafetyFlamearrester tPssrSafetyFlamearrester)
-    {
+    public AjaxResult export(TPssrSafetyFlamearrester tPssrSafetyFlamearrester) {
         List<TPssrSafetyFlamearrester> list = tPssrSafetyFlamearresterService.selectTPssrSafetyFlamearresterList(tPssrSafetyFlamearrester);
         ExcelUtil<TPssrSafetyFlamearrester> util = new ExcelUtil<TPssrSafetyFlamearrester>(TPssrSafetyFlamearrester.class);
         return util.exportExcel(list, "safetyFlamearrester");
@@ -63,8 +54,7 @@ public class TPssrSafetyFlamearresterController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:safetyFlamearrester:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return AjaxResult.success(tPssrSafetyFlamearresterService.selectTPssrSafetyFlamearresterById(id));
     }
 
@@ -74,8 +64,8 @@ public class TPssrSafetyFlamearresterController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:safetyFlamearrester:add')")
     @Log(title = "安全设施-阻火器", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody TPssrSafetyFlamearrester tPssrSafetyFlamearrester)
-    {
+    public AjaxResult add(@RequestBody TPssrSafetyFlamearrester tPssrSafetyFlamearrester) {
+        tPssrSafetyFlamearrester.setApproveStatus(0L);
         return toAjax(tPssrSafetyFlamearresterService.insertTPssrSafetyFlamearrester(tPssrSafetyFlamearrester));
     }
 
@@ -85,8 +75,7 @@ public class TPssrSafetyFlamearresterController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:safetyFlamearrester:edit')")
     @Log(title = "安全设施-阻火器", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody TPssrSafetyFlamearrester tPssrSafetyFlamearrester)
-    {
+    public AjaxResult edit(@RequestBody TPssrSafetyFlamearrester tPssrSafetyFlamearrester) {
         return toAjax(tPssrSafetyFlamearresterService.updateTPssrSafetyFlamearrester(tPssrSafetyFlamearrester));
     }
 
@@ -95,9 +84,8 @@ public class TPssrSafetyFlamearresterController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:safetyFlamearrester:remove')")
     @Log(title = "安全设施-阻火器", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(tPssrSafetyFlamearresterService.deleteTPssrSafetyFlamearresterByIds(ids));
     }
 }

+ 17 - 29
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyValveController.java

@@ -1,24 +1,18 @@
 package com.ruoyi.project.pssr.controller;
 
-import java.util.List;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
-import com.ruoyi.project.pssr.domain.TPssrSafetyValve;
-import com.ruoyi.project.pssr.service.ITPssrSafetyValveService;
 import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
-import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.web.page.TableDataInfo;
+import com.ruoyi.project.pssr.domain.TPssrSafetyValve;
+import com.ruoyi.project.pssr.service.ITPssrSafetyValveService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
 
 /**
  * 安全设施-安全阀Controller
@@ -28,8 +22,7 @@ import com.ruoyi.framework.web.page.TableDataInfo;
  */
 @RestController
 @RequestMapping("/pssr/safetyValve")
-public class TPssrSafetyValveController extends BaseController
-{
+public class TPssrSafetyValveController extends BaseController {
     @Autowired
     private ITPssrSafetyValveService tPssrSafetyValveService;
 
@@ -38,8 +31,7 @@ public class TPssrSafetyValveController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:safetyValve:list')")
     @GetMapping("/list")
-    public TableDataInfo list(TPssrSafetyValve tPssrSafetyValve)
-    {
+    public TableDataInfo list(TPssrSafetyValve tPssrSafetyValve) {
         startPage();
         List<TPssrSafetyValve> list = tPssrSafetyValveService.selectTPssrSafetyValveList(tPssrSafetyValve);
         return getDataTable(list);
@@ -51,8 +43,7 @@ public class TPssrSafetyValveController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:safetyValve:export')")
     @Log(title = "安全设施-安全阀", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
-    public AjaxResult export(TPssrSafetyValve tPssrSafetyValve)
-    {
+    public AjaxResult export(TPssrSafetyValve tPssrSafetyValve) {
         List<TPssrSafetyValve> list = tPssrSafetyValveService.selectTPssrSafetyValveList(tPssrSafetyValve);
         ExcelUtil<TPssrSafetyValve> util = new ExcelUtil<TPssrSafetyValve>(TPssrSafetyValve.class);
         return util.exportExcel(list, "safetyValve");
@@ -63,8 +54,7 @@ public class TPssrSafetyValveController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:safetyValve:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return AjaxResult.success(tPssrSafetyValveService.selectTPssrSafetyValveById(id));
     }
 
@@ -74,8 +64,8 @@ public class TPssrSafetyValveController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:safetyValve:add')")
     @Log(title = "安全设施-安全阀", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody TPssrSafetyValve tPssrSafetyValve)
-    {
+    public AjaxResult add(@RequestBody TPssrSafetyValve tPssrSafetyValve) {
+        tPssrSafetyValve.setApproveStatus(0L);
         return toAjax(tPssrSafetyValveService.insertTPssrSafetyValve(tPssrSafetyValve));
     }
 
@@ -85,8 +75,7 @@ public class TPssrSafetyValveController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:safetyValve:edit')")
     @Log(title = "安全设施-安全阀", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody TPssrSafetyValve tPssrSafetyValve)
-    {
+    public AjaxResult edit(@RequestBody TPssrSafetyValve tPssrSafetyValve) {
         return toAjax(tPssrSafetyValveService.updateTPssrSafetyValve(tPssrSafetyValve));
     }
 
@@ -95,9 +84,8 @@ public class TPssrSafetyValveController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:safetyValve:remove')")
     @Log(title = "安全设施-安全阀", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(tPssrSafetyValveService.deleteTPssrSafetyValveByIds(ids));
     }
 }

+ 10 - 0
master/src/main/java/com/ruoyi/project/pssr/domain/TPssrApprove.java

@@ -75,11 +75,21 @@ public class TPssrApprove extends BaseEntity
     
     private String deptName;
 
+    private String sn;
+
     private Long cbpMgr;
     private Long ctmMgr;
     private Long ctaMgr;
     private Long plantMgr;
 
+    public String getSn() {
+        return sn;
+    }
+
+    public void setSn(String sn) {
+        this.sn = sn;
+    }
+
     public Long getCbpMgr() {
         return cbpMgr;
     }

+ 34 - 4
master/src/main/java/com/ruoyi/project/pssr/domain/TPssrSafetyBleed.java

@@ -74,7 +74,7 @@ public class TPssrSafetyBleed extends BaseEntity
 
     /** 时间 */
     @Excel(name = "时间")
-    private String confirmationTime;
+    private Date confirmationTime;
 
     /** 删除状态 */
     private Long delFlag;
@@ -100,9 +100,39 @@ public class TPssrSafetyBleed extends BaseEntity
     /** 部门编号 */
     @Excel(name = "部门编号")
     private Long deptId;
-    
+
     private String deptName;
 
+    private Long[] ids;
+
+    private Long taskType;
+
+    private String putUse;
+
+    public String getPutUse() {
+        return putUse;
+    }
+
+    public void setPutUse(String putUse) {
+        this.putUse = putUse;
+    }
+
+    public Long[] getIds() {
+        return ids;
+    }
+
+    public void setIds(Long[] ids) {
+        this.ids = ids;
+    }
+
+    public Long getTaskType() {
+        return taskType;
+    }
+
+    public void setTaskType(Long taskType) {
+        this.taskType = taskType;
+    }
+
     public String getDeptName() {
         return deptName;
     }
@@ -245,12 +275,12 @@ public class TPssrSafetyBleed extends BaseEntity
     {
         return confirmer2;
     }
-    public void setConfirmationTime(String confirmationTime)
+    public void setConfirmationTime(Date confirmationTime)
     {
         this.confirmationTime = confirmationTime;
     }
 
-    public String getConfirmationTime()
+    public Date getConfirmationTime()
     {
         return confirmationTime;
     }

+ 33 - 3
master/src/main/java/com/ruoyi/project/pssr/domain/TPssrSafetyBreath.java

@@ -74,7 +74,7 @@ public class TPssrSafetyBreath extends BaseEntity
 
     /** 时间 */
     @Excel(name = "时间")
-    private String confirmationTime;
+    private Date confirmationTime;
 
     /** 删除状态 */
     private Long delFlag;
@@ -103,6 +103,36 @@ public class TPssrSafetyBreath extends BaseEntity
     
     private String deptName;
 
+    private Long[] ids;
+
+    private Long taskType;
+
+    private String putUse;
+
+    public String getPutUse() {
+        return putUse;
+    }
+
+    public void setPutUse(String putUse) {
+        this.putUse = putUse;
+    }
+
+    public Long[] getIds() {
+        return ids;
+    }
+
+    public void setIds(Long[] ids) {
+        this.ids = ids;
+    }
+
+    public Long getTaskType() {
+        return taskType;
+    }
+
+    public void setTaskType(Long taskType) {
+        this.taskType = taskType;
+    }
+
     public String getDeptName() {
         return deptName;
     }
@@ -245,12 +275,12 @@ public class TPssrSafetyBreath extends BaseEntity
     {
         return confirmer2;
     }
-    public void setConfirmationTime(String confirmationTime)
+    public void setConfirmationTime(Date confirmationTime)
     {
         this.confirmationTime = confirmationTime;
     }
 
-    public String getConfirmationTime()
+    public Date getConfirmationTime()
     {
         return confirmationTime;
     }

+ 33 - 3
master/src/main/java/com/ruoyi/project/pssr/domain/TPssrSafetyBrust.java

@@ -74,7 +74,7 @@ public class TPssrSafetyBrust extends BaseEntity
 
     /** 检查日期 */
     @Excel(name = "检查日期")
-    private String confirmationTime;
+    private Date confirmationTime;
 
     /** 删除状态 */
     private Long delFlag;
@@ -119,6 +119,36 @@ public class TPssrSafetyBrust extends BaseEntity
     @Excel(name = "审批状态")
     private Long approveStatus;
 
+
+    private Long[] ids;
+
+    private Long taskType;
+
+    private String putUse;
+
+    public String getPutUse() {
+        return putUse;
+    }
+
+    public void setPutUse(String putUse) {
+        this.putUse = putUse;
+    }
+
+    public Long[] getIds() {
+        return ids;
+    }
+
+    public void setIds(Long[] ids) {
+        this.ids = ids;
+    }
+
+    public Long getTaskType() {
+        return taskType;
+    }
+
+    public void setTaskType(Long taskType) {
+        this.taskType = taskType;
+    }
     public void setId(Long id)
     {
         this.id = id;
@@ -245,12 +275,12 @@ public class TPssrSafetyBrust extends BaseEntity
     {
         return confirmer2;
     }
-    public void setConfirmationTime(String confirmationTime)
+    public void setConfirmationTime(Date confirmationTime)
     {
         this.confirmationTime = confirmationTime;
     }
 
-    public String getConfirmationTime()
+    public Date getConfirmationTime()
     {
         return confirmationTime;
     }

+ 33 - 3
master/src/main/java/com/ruoyi/project/pssr/domain/TPssrSafetyFlamearrester.java

@@ -58,7 +58,7 @@ public class TPssrSafetyFlamearrester extends BaseEntity
 
     /** 检查时间 */
     @Excel(name = "检查时间")
-    private String confirmationTime;
+    private Date confirmationTime;
 
     /** 删除状态 */
     private Long delFlag;
@@ -103,6 +103,36 @@ public class TPssrSafetyFlamearrester extends BaseEntity
     @Excel(name = "审批状态")
     private Long approveStatus;
 
+    private Long[] ids;
+
+    private Long taskType;
+
+    private String putUse;
+
+    public String getPutUse() {
+        return putUse;
+    }
+
+    public void setPutUse(String putUse) {
+        this.putUse = putUse;
+    }
+
+    public Long[] getIds() {
+        return ids;
+    }
+
+    public void setIds(Long[] ids) {
+        this.ids = ids;
+    }
+
+    public Long getTaskType() {
+        return taskType;
+    }
+
+    public void setTaskType(Long taskType) {
+        this.taskType = taskType;
+    }
+
     public void setId(Long id)
     {
         this.id = id;
@@ -193,12 +223,12 @@ public class TPssrSafetyFlamearrester extends BaseEntity
     {
         return confirmer2;
     }
-    public void setConfirmationTime(String confirmationTime)
+    public void setConfirmationTime(Date confirmationTime)
     {
         this.confirmationTime = confirmationTime;
     }
 
-    public String getConfirmationTime()
+    public Date getConfirmationTime()
     {
         return confirmationTime;
     }

+ 33 - 3
master/src/main/java/com/ruoyi/project/pssr/domain/TPssrSafetyValve.java

@@ -78,7 +78,7 @@ public class TPssrSafetyValve extends BaseEntity
 
     /** 时间 */
     @Excel(name = "时间")
-    private String confirmationTime;
+    private Date confirmationTime;
 
     /** 删除状态 */
     private Long delFlag;
@@ -123,6 +123,36 @@ public class TPssrSafetyValve extends BaseEntity
     @Excel(name = "审批状态")
     private Long approveStatus;
 
+    private Long[] ids;
+
+    private Long taskType;
+
+    private String putUse;
+
+    public String getPutUse() {
+        return putUse;
+    }
+
+    public void setPutUse(String putUse) {
+        this.putUse = putUse;
+    }
+
+    public Long[] getIds() {
+        return ids;
+    }
+
+    public void setIds(Long[] ids) {
+        this.ids = ids;
+    }
+
+    public Long getTaskType() {
+        return taskType;
+    }
+
+    public void setTaskType(Long taskType) {
+        this.taskType = taskType;
+    }
+
     public void setId(Long id)
     {
         this.id = id;
@@ -258,12 +288,12 @@ public class TPssrSafetyValve extends BaseEntity
     {
         return confirmer2;
     }
-    public void setConfirmationTime(String confirmationTime)
+    public void setConfirmationTime(Date confirmationTime)
     {
         this.confirmationTime = confirmationTime;
     }
 
-    public String getConfirmationTime()
+    public Date getConfirmationTime()
     {
         return confirmationTime;
     }

+ 2 - 0
master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrSafetyBleedMapper.java

@@ -19,6 +19,7 @@ public interface TPssrSafetyBleedMapper
      * @return 安全设施-紧急泄放阀
      */
     public TPssrSafetyBleed selectTPssrSafetyBleedById(Long id);
+    public TPssrSafetyBleed selectAllConfirmedPersonBySubId(TPssrSafetyBleed tPssrSafetyBleed);
 
     /**
      * 查询安全设施-紧急泄放阀列表
@@ -44,6 +45,7 @@ public interface TPssrSafetyBleedMapper
      * @return 结果
      */
     public int updateTPssrSafetyBleed(TPssrSafetyBleed tPssrSafetyBleed);
+    public int updateAllBySubId(TPssrSafetyBleed tPssrSafetyBleed);
 
     /**
      * 删除安全设施-紧急泄放阀

+ 1 - 0
master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrSafetyBreathMapper.java

@@ -44,6 +44,7 @@ public interface TPssrSafetyBreathMapper
      * @return 结果
      */
     public int updateTPssrSafetyBreath(TPssrSafetyBreath tPssrSafetyBreath);
+    public int updateAllBySubId(TPssrSafetyBreath tPssrSafetyBreath);
 
     /**
      * 删除安全设施-呼吸阀

+ 1 - 0
master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrSafetyBrustMapper.java

@@ -44,6 +44,7 @@ public interface TPssrSafetyBrustMapper
      * @return 结果
      */
     public int updateTPssrSafetyBrust(TPssrSafetyBrust tPssrSafetyBrust);
+    public int updateAllBySubId(TPssrSafetyBrust tPssrSafetyBrust);
 
     /**
      * 删除安全设施-爆破片

+ 1 - 0
master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrSafetyFlamearresterMapper.java

@@ -44,6 +44,7 @@ public interface TPssrSafetyFlamearresterMapper
      * @return 结果
      */
     public int updateTPssrSafetyFlamearrester(TPssrSafetyFlamearrester tPssrSafetyFlamearrester);
+    public int updateAllBySubId(TPssrSafetyFlamearrester tPssrSafetyFlamearrester);
 
     /**
      * 删除安全设施-阻火器

+ 1 - 0
master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrSafetyValveMapper.java

@@ -44,6 +44,7 @@ public interface TPssrSafetyValveMapper
      * @return 结果
      */
     public int updateTPssrSafetyValve(TPssrSafetyValve tPssrSafetyValve);
+    public int updateAllBySubId(TPssrSafetyValve tPssrSafetyValve);
 
     /**
      * 删除安全设施-安全阀

+ 2 - 0
master/src/main/java/com/ruoyi/project/pssr/service/ITPssrSafetyBleedService.java

@@ -18,6 +18,7 @@ public interface ITPssrSafetyBleedService
      * @return 安全设施-紧急泄放阀
      */
     public TPssrSafetyBleed selectTPssrSafetyBleedById(Long id);
+    public TPssrSafetyBleed selectAllConfirmedPersonBySubId(TPssrSafetyBleed tPssrSafetyBleed);
 
     /**
      * 查询安全设施-紧急泄放阀列表
@@ -42,6 +43,7 @@ public interface ITPssrSafetyBleedService
      * @return 结果
      */
     public int updateTPssrSafetyBleed(TPssrSafetyBleed tPssrSafetyBleed);
+    public int updateAllBySubId(TPssrSafetyBleed tPssrSafetyBleed);
 
     /**
      * 批量删除安全设施-紧急泄放阀

+ 1 - 0
master/src/main/java/com/ruoyi/project/pssr/service/ITPssrSafetyBreathService.java

@@ -42,6 +42,7 @@ public interface ITPssrSafetyBreathService
      * @return 结果
      */
     public int updateTPssrSafetyBreath(TPssrSafetyBreath tPssrSafetyBreath);
+    public int updateAllBySubId(TPssrSafetyBreath tPssrSafetyBreath);
 
     /**
      * 批量删除安全设施-呼吸阀

+ 1 - 0
master/src/main/java/com/ruoyi/project/pssr/service/ITPssrSafetyBrustService.java

@@ -42,6 +42,7 @@ public interface ITPssrSafetyBrustService
      * @return 结果
      */
     public int updateTPssrSafetyBrust(TPssrSafetyBrust tPssrSafetyBrust);
+    public int updateAllBySubId(TPssrSafetyBrust tPssrSafetyBrust);
 
     /**
      * 批量删除安全设施-爆破片

+ 1 - 0
master/src/main/java/com/ruoyi/project/pssr/service/ITPssrSafetyFlamearresterService.java

@@ -42,6 +42,7 @@ public interface ITPssrSafetyFlamearresterService
      * @return 结果
      */
     public int updateTPssrSafetyFlamearrester(TPssrSafetyFlamearrester tPssrSafetyFlamearrester);
+    public int updateAllBySubId(TPssrSafetyFlamearrester tPssrSafetyFlamearrester);
 
     /**
      * 批量删除安全设施-阻火器

+ 1 - 0
master/src/main/java/com/ruoyi/project/pssr/service/ITPssrSafetyValveService.java

@@ -42,6 +42,7 @@ public interface ITPssrSafetyValveService
      * @return 结果
      */
     public int updateTPssrSafetyValve(TPssrSafetyValve tPssrSafetyValve);
+    public int updateAllBySubId(TPssrSafetyValve tPssrSafetyValve);
 
     /**
      * 批量删除安全设施-安全阀

+ 11 - 0
master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrSafetyBleedServiceImpl.java

@@ -31,6 +31,12 @@ public class TPssrSafetyBleedServiceImpl implements ITPssrSafetyBleedService
         return tPssrSafetyBleedMapper.selectTPssrSafetyBleedById(id);
     }
 
+    @Override
+    public TPssrSafetyBleed selectAllConfirmedPersonBySubId(TPssrSafetyBleed tPssrSafetyBleed)
+    {
+        return tPssrSafetyBleedMapper.selectAllConfirmedPersonBySubId(tPssrSafetyBleed);
+    }
+
     /**
      * 查询安全设施-紧急泄放阀列表
      *
@@ -66,6 +72,11 @@ public class TPssrSafetyBleedServiceImpl implements ITPssrSafetyBleedService
     {
         return tPssrSafetyBleedMapper.updateTPssrSafetyBleed(tPssrSafetyBleed);
     }
+    @Override
+    public int updateAllBySubId(TPssrSafetyBleed tPssrSafetyBleed)
+    {
+        return tPssrSafetyBleedMapper.updateAllBySubId(tPssrSafetyBleed);
+    }
 
     /**
      * 批量删除安全设施-紧急泄放阀

+ 5 - 0
master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrSafetyBreathServiceImpl.java

@@ -66,6 +66,11 @@ public class TPssrSafetyBreathServiceImpl implements ITPssrSafetyBreathService
     {
         return tPssrSafetyBreathMapper.updateTPssrSafetyBreath(tPssrSafetyBreath);
     }
+    @Override
+    public int updateAllBySubId(TPssrSafetyBreath tPssrSafetyBreath)
+    {
+        return tPssrSafetyBreathMapper.updateAllBySubId(tPssrSafetyBreath);
+    }
 
     /**
      * 批量删除安全设施-呼吸阀

+ 5 - 0
master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrSafetyBrustServiceImpl.java

@@ -66,6 +66,11 @@ public class TPssrSafetyBrustServiceImpl implements ITPssrSafetyBrustService
     {
         return tPssrSafetyBrustMapper.updateTPssrSafetyBrust(tPssrSafetyBrust);
     }
+    @Override
+    public int updateAllBySubId(TPssrSafetyBrust tPssrSafetyBrust)
+    {
+        return tPssrSafetyBrustMapper.updateAllBySubId(tPssrSafetyBrust);
+    }
 
     /**
      * 批量删除安全设施-爆破片

+ 5 - 0
master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrSafetyFlamearresterServiceImpl.java

@@ -66,6 +66,11 @@ public class TPssrSafetyFlamearresterServiceImpl implements ITPssrSafetyFlamearr
     {
         return tPssrSafetyFlamearresterMapper.updateTPssrSafetyFlamearrester(tPssrSafetyFlamearrester);
     }
+    @Override
+    public int updateAllBySubId(TPssrSafetyFlamearrester tPssrSafetyFlamearrester)
+    {
+        return tPssrSafetyFlamearresterMapper.updateAllBySubId(tPssrSafetyFlamearrester);
+    }
 
     /**
      * 批量删除安全设施-阻火器

+ 6 - 0
master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrSafetyValveServiceImpl.java

@@ -67,6 +67,12 @@ public class TPssrSafetyValveServiceImpl implements ITPssrSafetyValveService
         return tPssrSafetyValveMapper.updateTPssrSafetyValve(tPssrSafetyValve);
     }
 
+    @Override
+    public int updateAllBySubId(TPssrSafetyValve tPssrSafetyValve)
+    {
+        return tPssrSafetyValveMapper.updateAllBySubId(tPssrSafetyValve);
+    }
+
     /**
      * 批量删除安全设施-安全阀
      *

+ 44 - 1
master/src/main/resources/mybatis/pssr/TPssrSafetyBleedMapper.xml

@@ -29,10 +29,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="remarks"    column="remarks"    />
         <result property="approveStatus"    column="approve_status"    />
         <result property="deptName" column="dept_name" />
+        <result property="putUse" column="put_use" />
     </resultMap>
 
     <sql id="selectTPssrSafetyBleedVo">
-        select d.id, d.sub_id, d.approve_id, d.unit, d.pid_no, d.dev_no, d.verify, d.in_validity, d.install_location, d.install_accuracy, d.set_pressure, d.uniform_pressure, d.confirmer1, d.confirmer2, d.confirmation_time, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status ,s.dept_name from t_pssr_safety_bleed d
+        select d.put_use,d.id, d.sub_id, d.approve_id, d.unit, d.pid_no, d.dev_no, d.verify, d.in_validity, d.install_location, d.install_accuracy, d.set_pressure, d.uniform_pressure, d.confirmer1, d.confirmer2, d.confirmation_time, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status ,s.dept_name from t_pssr_safety_bleed d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -60,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null "> and dept_id = #{deptId}</if>
             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
             <if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
+            <if test="putUse != null "> and put_use = #{putUse}</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
@@ -70,6 +72,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTPssrSafetyBleedVo"/>
         where id = #{id}
     </select>
+
+    <select id="selectAllConfirmedPersonBySubId" parameterType="TPssrSafetyBleed" resultMap="TPssrSafetyBleedResult">
+        SELECT
+        LISTAGG(CONFIRMER1, ',') WITHIN GROUP (ORDER BY CONFIRMER1) AS CONFIRMER1,
+        LISTAGG(CONFIRMER2, ',') WITHIN GROUP (ORDER BY CONFIRMER2) AS CONFIRMER2
+        FROM (
+        SELECT DISTINCT CONFIRMER1, CONFIRMER2 FROM T_PSSR_SAFETY_BLEED WHERE sub_id = #{subId}
+        <if test="approveStatus != null "> AND approve_status = #{approveStatus}</if>
+
+        UNION
+        SELECT DISTINCT CONFIRMER1, CONFIRMER2 FROM T_PSSR_SAFETY_BRUST WHERE sub_id = #{subId}
+        <if test="approveStatus != null "> AND approve_status = #{approveStatus}</if>
+
+        UNION
+        SELECT DISTINCT CONFIRMER1, CONFIRMER2 FROM T_PSSR_SAFETY_BREATH WHERE sub_id = #{subId}
+        <if test="approveStatus != null "> AND approve_status = #{approveStatus}</if>
+
+        UNION
+        SELECT DISTINCT CONFIRMER1, CONFIRMER2 FROM T_PSSR_SAFETY_FLAMEARRESTER WHERE sub_id = #{subId}
+        <if test="approveStatus != null "> AND approve_status = #{approveStatus}</if>
+
+        UNION
+        SELECT DISTINCT CONFIRMER1, CONFIRMER2 FROM T_PSSR_SAFETY_VALVE WHERE sub_id = #{subId}
+        <if test="approveStatus != null "> AND approve_status = #{approveStatus}</if>
+        )
+
+    </select>
+
+
+    <update id="updateAllBySubId" parameterType="TPssrSafetyBleed">
+        update t_pssr_safety_bleed
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+        </trim>
+        where sub_id= #{subId} and APPROVE_STATUS=0
+    </update>
         
     <insert id="insertTPssrSafetyBleed" parameterType="TPssrSafetyBleed">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
@@ -100,6 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">dept_id,</if>
             <if test="remarks != null">remarks,</if>
             <if test="approveStatus != null">approve_status,</if>
+            <if test="putUse != null">put_use,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -125,6 +166,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">#{deptId},</if>
             <if test="remarks != null">#{remarks},</if>
             <if test="approveStatus != null">#{approveStatus},</if>
+            <if test="putUse != null">#{putUse},</if>
          </trim>
     </insert>
 
@@ -153,6 +195,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="remarks != null">remarks = #{remarks},</if>
             <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+            <if test="putUse != null">put_use = #{putUse},</if>
         </trim>
         where id = #{id}
     </update>

+ 17 - 1
master/src/main/resources/mybatis/pssr/TPssrSafetyBreathMapper.xml

@@ -29,10 +29,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="remarks"    column="remarks"    />
         <result property="approveStatus"    column="approve_status"    />
         <result property="deptName" column="dept_name" />
+        <result property="putUse" column="put_use" />
     </resultMap>
 
     <sql id="selectTPssrSafetyBreathVo">
-        select d.id, d.sub_id, d.approve_id, d.unit, d.pid_no, d.dev_no, d.verify, d.in_validity, d.install_location, d.install_accuracy, d.set_pressure, d.uniform_pressure, d.confirmer1, d.confirmer2, d.confirmation_time, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status ,s.dept_name from t_pssr_safety_breath d
+        select d.put_use,d.id, d.sub_id, d.approve_id, d.unit, d.pid_no, d.dev_no, d.verify, d.in_validity, d.install_location, d.install_accuracy, d.set_pressure, d.uniform_pressure, d.confirmer1, d.confirmer2, d.confirmation_time, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status ,s.dept_name from t_pssr_safety_breath d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -60,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null "> and dept_id = #{deptId}</if>
             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
             <if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
+            <if test="putUse != null "> and put_use = #{putUse}</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
@@ -70,6 +72,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTPssrSafetyBreathVo"/>
         where id = #{id}
     </select>
+
+
+    <update id="updateAllBySubId" parameterType="TPssrSafetyBreath">
+        update t_pssr_safety_breath
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+        </trim>
+        where sub_id= #{subId} and APPROVE_STATUS=0
+    </update>
         
     <insert id="insertTPssrSafetyBreath" parameterType="TPssrSafetyBreath">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
@@ -100,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">dept_id,</if>
             <if test="remarks != null">remarks,</if>
             <if test="approveStatus != null">approve_status,</if>
+            <if test="putUse != null">put_use,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -125,6 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">#{deptId},</if>
             <if test="remarks != null">#{remarks},</if>
             <if test="approveStatus != null">#{approveStatus},</if>
+            <if test="putUse != null">#{putUse},</if>
          </trim>
     </insert>
 
@@ -153,6 +168,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="remarks != null">remarks = #{remarks},</if>
             <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+            <if test="putUse != null">put_use = #{putUse},</if>
         </trim>
         where id = #{id}
     </update>

+ 17 - 1
master/src/main/resources/mybatis/pssr/TPssrSafetyBrustMapper.xml

@@ -29,10 +29,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="remarks"    column="remarks"    />
         <result property="approveStatus"    column="approve_status"    />
         <result property="deptName" column="dept_name" />
+        <result property="putUse" column="put_use" />
     </resultMap>
 
     <sql id="selectTPssrSafetyBrustVo">
-        select d.id, d.sub_id, d.approve_id, d.unit, d.dev_no, d.safety_dev, d.install_location, d.install_accuracy, d.right_direction, d.set_pressure, d.uniform_pressure, d.is_0kpa, d.confirmer1, d.confirmer2, d.confirmation_time, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status ,s.dept_name from t_pssr_safety_brust d
+        select d.put_use,d.id, d.sub_id, d.approve_id, d.unit, d.dev_no, d.safety_dev, d.install_location, d.install_accuracy, d.right_direction, d.set_pressure, d.uniform_pressure, d.is_0kpa, d.confirmer1, d.confirmer2, d.confirmation_time, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status ,s.dept_name from t_pssr_safety_brust d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -60,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null "> and dept_id = #{deptId}</if>
             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
             <if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
+            <if test="putUse != null "> and put_use = #{putUse}</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
@@ -70,6 +72,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTPssrSafetyBrustVo"/>
         where id = #{id}
     </select>
+
+
+    <update id="updateAllBySubId" parameterType="TPssrSafetyBrust">
+        update t_pssr_safety_brust
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+        </trim>
+        where sub_id= #{subId} and APPROVE_STATUS=0
+    </update>
         
     <insert id="insertTPssrSafetyBrust" parameterType="TPssrSafetyBrust">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
@@ -100,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">dept_id,</if>
             <if test="remarks != null">remarks,</if>
             <if test="approveStatus != null">approve_status,</if>
+            <if test="putUse != null">put_use,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -125,6 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">#{deptId},</if>
             <if test="remarks != null">#{remarks},</if>
             <if test="approveStatus != null">#{approveStatus},</if>
+            <if test="putUse != null">#{putUse},</if>
          </trim>
     </insert>
 
@@ -153,6 +168,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="remarks != null">remarks = #{remarks},</if>
             <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+            <if test="putUse != null">put_use = #{putUse},</if>
         </trim>
         where id = #{id}
     </update>

+ 18 - 2
master/src/main/resources/mybatis/pssr/TPssrSafetyFlamearresterMapper.xml

@@ -25,10 +25,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="remarks"    column="remarks"    />
         <result property="approveStatus"    column="approve_status"    />
         <result property="deptName" column="dept_name" />
+        <result property="putUse" column="put_use" />
     </resultMap>
 
     <sql id="selectTPssrSafetyFlamearresterVo">
-        select d.id, d.sub_id, d.approve_id, d.unit, d.dev_no, d.install_location, d.uniform_flow, d.corrosion, d.confirmer1, d.confirmer2, d.confirmation_time, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status ,s.dept_name from t_pssr_safety_flamearrester d
+        select d.put_use,d.id, d.sub_id, d.approve_id, d.unit, d.dev_no, d.install_location, d.uniform_flow, d.corrosion, d.confirmer1, d.confirmer2, d.confirmation_time, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status ,s.dept_name from t_pssr_safety_flamearrester d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -52,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null "> and dept_id = #{deptId}</if>
             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
             <if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
+            <if test="putUse != null "> and put_use = #{putUse}</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
@@ -62,10 +64,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTPssrSafetyFlamearresterVo"/>
         where id = #{id}
     </select>
+
+
+    <update id="updateAllBySubId" parameterType="TPssrSafetyFlamearrester">
+        update t_pssr_safety_flamearrester
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+        </trim>
+        where sub_id= #{subId} and APPROVE_STATUS=0
+    </update>
         
     <insert id="insertTPssrSafetyFlamearrester" parameterType="TPssrSafetyFlamearrester">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
-            SELECT seq_t_pssr_safety_flamearrester.NEXTVAL as id FROM DUAL
+            SELECT seq_t_pssr_safety_flame.NEXTVAL as id FROM DUAL
         </selectKey>
         insert into t_pssr_safety_flamearrester
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -88,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">dept_id,</if>
             <if test="remarks != null">remarks,</if>
             <if test="approveStatus != null">approve_status,</if>
+            <if test="putUse != null">put_use,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -109,6 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">#{deptId},</if>
             <if test="remarks != null">#{remarks},</if>
             <if test="approveStatus != null">#{approveStatus},</if>
+            <if test="putUse != null">#{putUse},</if>
          </trim>
     </insert>
 
@@ -133,6 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="remarks != null">remarks = #{remarks},</if>
             <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+            <if test="putUse != null">put_use = #{putUse},</if>
         </trim>
         where id = #{id}
     </update>

+ 17 - 1
master/src/main/resources/mybatis/pssr/TPssrSafetyValveMapper.xml

@@ -30,10 +30,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="remarks"    column="remarks"    />
         <result property="approveStatus"    column="approve_status"    />
         <result property="deptName" column="dept_name" />
+        <result property="putUse" column="put_use" />
     </resultMap>
 
     <sql id="selectTPssrSafetyValveVo">
-        select d.id, d.sub_id, d.approve_id, d.unit, d.pid_no, d.dev_no, d.safety_dev, d.verify, d.in_validity, d.install_location, d.install_accuracy, d.set_pressure, d.uniform_pressure, d.confirmer1, d.confirmer2, d.confirmation_time, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status ,s.dept_name from t_pssr_safety_valve d
+        select d.put_use,d.id, d.sub_id, d.approve_id, d.unit, d.pid_no, d.dev_no, d.safety_dev, d.verify, d.in_validity, d.install_location, d.install_accuracy, d.set_pressure, d.uniform_pressure, d.confirmer1, d.confirmer2, d.confirmation_time, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status ,s.dept_name from t_pssr_safety_valve d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -62,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null "> and dept_id = #{deptId}</if>
             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
             <if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
+            <if test="putUse != null "> and put_use = #{putUse}</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
@@ -72,6 +74,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTPssrSafetyValveVo"/>
         where id = #{id}
     </select>
+
+
+    <update id="updateAllBySubId" parameterType="TPssrSafetyValve">
+        update t_pssr_safety_valve
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+        </trim>
+        where sub_id= #{subId} and APPROVE_STATUS=0
+    </update>
         
     <insert id="insertTPssrSafetyValve" parameterType="TPssrSafetyValve">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
@@ -103,6 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">dept_id,</if>
             <if test="remarks != null">remarks,</if>
             <if test="approveStatus != null">approve_status,</if>
+            <if test="putUse != null">put_use,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -129,6 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">#{deptId},</if>
             <if test="remarks != null">#{remarks},</if>
             <if test="approveStatus != null">#{approveStatus},</if>
+            <if test="putUse != null">#{putUse},</if>
          </trim>
     </insert>
 
@@ -158,6 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="remarks != null">remarks = #{remarks},</if>
             <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+            <if test="putUse != null">put_use = #{putUse},</if>
         </trim>
         where id = #{id}
     </update>

+ 91 - 0
ui/src/api/pssr/safety.js

@@ -0,0 +1,91 @@
+import request from '@/utils/request'
+
+// 确认安全设施-紧急泄放阀
+export function handleConfirmBleed(data) {
+  return request({
+    url: '/pssr/safety/confirmBleed',
+    method: 'put',
+    data: data
+  })
+}
+
+// 确认安全设施-呼吸阀
+export function handleConfirmBreath(data) {
+  return request({
+    url: '/pssr/safety/confirmBBrust',
+    method: 'put',
+    data: data
+  })
+}
+
+// 确认安全设施-爆破片
+export function handleConfirmBrust(data) {
+  return request({
+    url: '/pssr/safety/confirmBrust',
+    method: 'put',
+    data: data
+  })
+}
+
+// 确认安全设施-阻火器
+export function handleconfirmFlamearrester(data) {
+  return request({
+    url: '/pssr/safety/confirmFlamearrester',
+    method: 'put',
+    data: data
+  })
+}
+
+// 确认安全设施-安全阀
+export function handleconfirmValve(data) {
+  return request({
+    url: '/pssr/safety/confirmValve',
+    method: 'put',
+    data: data
+  })
+}
+
+// 确认安全设施-紧急泄放阀
+export function handleTurnDownBleed(data) {
+  return request({
+    url: '/pssr/safety/turnDownBleed',
+    method: 'put',
+    data: data
+  })
+}
+
+// 确认安全设施-呼吸阀
+export function handleTurnDownBreath(data) {
+  return request({
+    url: '/pssr/safety/turnDownBBrust',
+    method: 'put',
+    data: data
+  })
+}
+
+// 确认安全设施-爆破片
+export function handleTurnDownBrust(data) {
+  return request({
+    url: '/pssr/safety/turnDownBrust',
+    method: 'put',
+    data: data
+  })
+}
+
+// 确认安全设施-阻火器
+export function handleturnDownFlamearrester(data) {
+  return request({
+    url: '/pssr/safety/turnDownFlamearrester',
+    method: 'put',
+    data: data
+  })
+}
+
+// 确认安全设施-安全阀
+export function handleturnDownValve(data) {
+  return request({
+    url: '/pssr/safety/turnDownValve',
+    method: 'put',
+    data: data
+  })
+}

+ 13 - 6
ui/src/views/approve/approveDetail/pssrApprove-detail.vue

@@ -4,7 +4,7 @@
              :visible.sync="visible"
              :append-to-body="true"
              width="60%" :close="this.$emit('refreshDataList')">
-    <Subitem :sub-id="Number(subId)" :serial-number="sn" :is-approve="isApprove" @refreshHisList="afterConfirm"/>
+    <Subitem  ref="subitem" v-if="subitemVisible" :sub-id="Number(subId)" :serial-number="sn" :is-approve="isApprove" @refreshHisList="afterConfirm"/>
     <span slot="footer" class="dialog-footer">
       <el-button v-if="!this.taskForm.taskId == ''&&isApprove==2" type="primary"
                  @click="dataFormSubmit(0)" >通过</el-button>
@@ -32,10 +32,11 @@ import {getHistorylist} from "@/api/ehs/approvedanger";
 import Subitem from "@/views/pssr/subitem/index.vue";
 import {getSubcontent} from "@/api/pssr/subcontent";
 import {handlePssrApprove, listApprove} from "@/api/pssr/approve";
+import PssrMgrApproveDetail from "@/views/approve/approveDetail/pssrMgrApprove-detail.vue";
 
 export default {
   name: "pssrApprove-detail",
-  components: {Subitem},
+  components: {PssrMgrApproveDetail, Subitem},
   data() {
     return {
       //label样式
@@ -47,6 +48,7 @@ export default {
       submitDisabled: false,
       taskName: '',
       visible: false,
+      subitemVisible: false,
       subId: null,
       sn: '',
       taskForm: {
@@ -67,7 +69,10 @@ export default {
     }
   },
   methods: {
-    init(id, taskId, processId, taskName, processName) {
+    init(id, taskId, processId, taskName,sn) {
+      console.log("11",sn)
+      this.sn = sn;
+      this.subitemVisible = false;
       getSubcontent(id).then(res => {
         if (taskName == '检查内容负责人') {
           this.isApprove = 2;
@@ -82,21 +87,22 @@ export default {
           this.isApprove = 6;
         }
         console.log(res)
-        this.sn = res.data.forShort
         this.subId = id;
         this.taskForm.taskId = taskId
         this.taskForm.processId = processId
         this.taskForm.taskName = taskName
-        this.taskForm.processName = processName
         if (!taskId) {
           this.isApprove = 3;
         }
-        console.log(this.sn)
+        console.log("detail",this.sn)
         this.visible = true;
         this.getHistorylist();
       })
       listApprove({subId: id}).then(res => {
         this.taskForm.tPssrApprove = res.rows[0];
+        this.$nextTick(() => {
+          this.subitemVisible = true;
+        });
         console.log(this.taskForm)
       })
       console.log(this.isApprove)
@@ -109,6 +115,7 @@ export default {
     },
     afterConfirm() {
       this.visible = false;
+      this.subitemVisible=false
       this.$emit('refreshDataList')
     },
     dataFormSubmit(val) {

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

@@ -285,7 +285,7 @@
         } else if (row.processName.includes("PSSR") && !row.processName.includes("PSSR装置经理审批")) {
           this.pssrApproveDetailVisible = true
           this.$nextTick(() => {
-            this.$refs.pssrApproveDetail.init(row.approveObject.subId, row.taskId, row.processId, row.taskName)
+            this.$refs.pssrApproveDetail.init(row.approveObject.subId, row.taskId, row.processId, row.taskName,row.approveObject.sn)
           })
         }else {
           this.approveInfo = row;

+ 1 - 1
ui/src/views/approve/pending/index.vue

@@ -465,7 +465,7 @@ export default {
         } else if (row.processName.includes("PSSR") && !row.processName.includes("PSSR装置经理审批")) {
           this.pssrApproveDetailVisible = true
           this.$nextTick(() => {
-            this.$refs.pssrApproveDetail.init(row.approveObject.subId, row.taskId, row.processId, row.taskName)
+            this.$refs.pssrApproveDetail.init(row.approveObject.subId, row.taskId, row.processId, row.taskName,row.approveObject.sn)
           })
         } else {
           this.approveInfo = row;

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

@@ -300,7 +300,7 @@
         } else if (row.processName.includes("PSSR") && !row.processName.includes("PSSR装置经理审批")) {
           this.pssrApproveDetailVisible = true
           this.$nextTick(() => {
-            this.$refs.pssrApproveDetail.init(row.approveObject.subId, row.taskId, row.processId, row.taskName)
+            this.$refs.pssrApproveDetail.init(row.approveObject.subId, row.taskId, row.processId, row.taskName,row.approveObject.sn)
           })
         }  else {
           this.approveInfo = row;

+ 1 - 1
ui/src/views/pssr/laboratory/index.vue

@@ -519,7 +519,7 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 20,
-        subId: null,
+        subId: this.subId,
         approveId: null,
         instrumentNumber: null,
         name: null,

+ 2 - 2
ui/src/views/pssr/moc/index.vue

@@ -171,7 +171,7 @@
         </template>
       </el-table-column>
       <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
-      <el-table-column label="操作" align="center" width="120" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" v-if="isApprove==0" width="120" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -368,7 +368,7 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 20,
-        subId: null,
+        subId: this.subId,
         approveId: null,
         region: null,
         mocNo: null,

+ 305 - 354
ui/src/views/pssr/safetyBleed/index.vue

@@ -1,24 +1,6 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="从表id" prop="subId">
-        <el-input
-          v-model="queryParams.subId"
-          placeholder="请输入从表id"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="审批id" prop="approveId">
-        <el-input
-          v-model="queryParams.approveId"
-          placeholder="请输入审批id"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item label="单元号" prop="unit">
         <el-input
           v-model="queryParams.unit"
@@ -46,139 +28,6 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="已经校验" prop="verify">
-        <el-input
-          v-model="queryParams.verify"
-          placeholder="请输入已经校验"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="在有效期内" prop="inValidity">
-        <el-input
-          v-model="queryParams.inValidity"
-          placeholder="请输入在有效期内"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="安装位置" prop="installLocation">
-        <el-input
-          v-model="queryParams.installLocation"
-          placeholder="请输入安装位置"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="安装位置准确" prop="installAccuracy">
-        <el-input
-          v-model="queryParams.installAccuracy"
-          placeholder="请输入安装位置准确"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="设定压力" prop="setPressure">
-        <el-input
-          v-model="queryParams.setPressure"
-          placeholder="请输入设定压力"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="校验压力与设定压力一致" prop="uniformPressure">
-        <el-input
-          v-model="queryParams.uniformPressure"
-          placeholder="请输入校验压力与设定压力一致"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="确认人1" prop="confirmer1">
-        <el-input
-          v-model="queryParams.confirmer1"
-          placeholder="请输入确认人1"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="确认人2" prop="confirmer2">
-        <el-input
-          v-model="queryParams.confirmer2"
-          placeholder="请输入确认人2"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="时间" prop="confirmationTime">
-        <el-input
-          v-model="queryParams.confirmationTime"
-          placeholder="请输入时间"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="创建人" prop="createrCode">
-        <el-input
-          v-model="queryParams.createrCode"
-          placeholder="请输入创建人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="创建时间" prop="createdate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.createdate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择创建时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="修改人" prop="updaterCode">
-        <el-input
-          v-model="queryParams.updaterCode"
-          placeholder="请输入修改人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="修改时间" prop="updatedate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.updatedate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择修改时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="部门编号" prop="deptId">
-        <el-input
-          v-model="queryParams.deptId"
-          placeholder="请输入部门编号"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="备注" prop="remarks">
-        <el-input
-          v-model="queryParams.remarks"
-          placeholder="请输入备注"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -193,7 +42,9 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['pssr:safetyBleed:add']"
-        >新增</el-button>
+          v-if="isApprove==0"
+        >新增
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -203,7 +54,9 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['pssr:safetyBleed:edit']"
-        >修改</el-button>
+          v-if="isApprove==0"
+        >修改
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -213,17 +66,21 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['pssr:safetyBleed:remove']"
-        >删除</el-button>
+          v-if="isApprove==0"
+        >删除
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['pssr:safetyBleed:edit']"
+          v-if="isApprove==0"
+        >导入
+        </el-button>
       </el-col>
-        <el-col :span="1.5">
-            <el-button
-                    type="info"
-                    icon="el-icon-upload2"
-                    size="mini"
-                    @click="handleImport"
-                    v-hasPermi="['pssr:safetyBleed:edit']"
-            >导入</el-button>
-        </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -231,43 +88,96 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['pssr:safetyBleed:export']"
-        >导出</el-button>
+          v-if="isApprove==0"
+        >导出
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-s-promotion"
+          size="mini"
+          @click="handleApprove"
+          v-if="isApprove==0"
+          v-hasPermi="['pssr:safetyBleed:edit']"
+        >发起审批
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-check"
+          size="mini"
+          v-if="isApprove==4||isApprove==5"
+          @click="handleConfirmApprove"
+          v-hasPermi="['pssr:safetyBleed:edit']"
+        >确认
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-refresh-left"
+          size="mini"
+          v-if="isApprove==2"
+          :disabled="multiple"
+          @click="handleTurnDown"
+          v-hasPermi="['pssr:safetyBleed:edit']"
+        >驳回
+        </el-button>
       </el-col>
-	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="safetyBleedList" @selection-change="handleSelectionChange" :height="clientHeight" border>
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="唯一标识ID" align="center" prop="id" :show-overflow-tooltip="true"/>
-      <el-table-column label="从表id" align="center" prop="subId" :show-overflow-tooltip="true"/>
-      <el-table-column label="审批id" align="center" prop="approveId" :show-overflow-tooltip="true"/>
-      <el-table-column label="单元号" align="center" prop="unit" :show-overflow-tooltip="true"/>
-      <el-table-column label="P&ID图号" align="center" prop="pidNo" :show-overflow-tooltip="true"/>
-      <el-table-column label="紧急泄放阀位号" align="center" prop="devNo" :show-overflow-tooltip="true"/>
-      <el-table-column label="已经校验" align="center" prop="verify" :show-overflow-tooltip="true"/>
-      <el-table-column label="在有效期内" align="center" prop="inValidity" :show-overflow-tooltip="true"/>
-      <el-table-column label="安装位置" align="center" prop="installLocation" :show-overflow-tooltip="true"/>
-      <el-table-column label="安装位置准确" align="center" prop="installAccuracy" :show-overflow-tooltip="true"/>
-      <el-table-column label="设定压力" align="center" prop="setPressure" :show-overflow-tooltip="true"/>
-      <el-table-column label="校验压力与设定压力一致" align="center" prop="uniformPressure" :show-overflow-tooltip="true"/>
-      <el-table-column label="确认人1" align="center" prop="confirmer1" :show-overflow-tooltip="true"/>
-      <el-table-column label="确认人2" align="center" prop="confirmer2" :show-overflow-tooltip="true"/>
-      <el-table-column label="时间" align="center" prop="confirmationTime" :show-overflow-tooltip="true"/>
-      <el-table-column label="创建人" align="center" prop="createrCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="创建时间" align="center" prop="createdate" width="100">
+    <div style="width: 100%;text-align: center;margin-bottom: 15px">
+      <h2>紧急泄放阀检查清单</h2>
+      <br>
+      <span>检查内容:所有的紧急泄放阀是否已经校验,是否在有效期内,并确认安装位置是否正确,是否投用,核对紧急泄放阀校验压力和设定压力是否一致,是(√),否(×),如有不符合要求的立即联系负责人整改。</span>
+    </div>
+
+
+    <el-table v-loading="loading" :data="safetyBleedList" @selection-change="handleSelectionChange"
+              :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="审批状态" align="center" prop="approveStatus" :show-overflow-tooltip="true" width="105">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.approveStatus==0">未审批</el-tag>
+          <el-tag v-if="scope.row.approveStatus==1" type="warning">待确认</el-tag>
+          <el-tag v-if="scope.row.approveStatus==3" type="success">已确认1</el-tag>
+          <el-tag v-if="scope.row.approveStatus==2" type="success">已确认2</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="单元号" align="center" prop="unit" :show-overflow-tooltip="true" width="125"/>
+      <el-table-column label="P&ID图号" align="center" prop="pidNo" :show-overflow-tooltip="true" width="125"/>
+      <el-table-column label="紧急泄放阀位号" align="center" prop="devNo" :show-overflow-tooltip="true" width="125"/>
+      <el-table-column label="已经校验" align="center" prop="verify" :show-overflow-tooltip="true" width="125"/>
+      <el-table-column label="在有效期内" align="center" prop="inValidity" :show-overflow-tooltip="true" width="125"/>
+      <el-table-column label="安装位置" align="center" prop="installLocation" :show-overflow-tooltip="true"
+                       width="125"/>
+      <el-table-column label="安装位置准确" align="center" prop="installAccuracy" :show-overflow-tooltip="true"
+                       width="125"/>
+      <el-table-column label="投用" align="center" prop="putUse" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="设定压力" align="center" prop="setPressure" :show-overflow-tooltip="true" width="125"/>
+      <el-table-column label="校验压力与设定压力一致" align="center" prop="uniformPressure"
+                       :show-overflow-tooltip="true" width="170"/>
+      <el-table-column label="确认人1" align="center" prop="confirmer1" :show-overflow-tooltip="true" width="125">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>
+          <span>{{ userFormat(scope.row.confirmer1) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="修改人" align="center" prop="updaterCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="修改时间" align="center" prop="updatedate" width="100">
+      <el-table-column label="确认人2" align="center" prop="confirmer2" :show-overflow-tooltip="true" width="125">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.updatedate, '{y}-{m}-{d}') }}</span>
+          <span>{{ userFormat(scope.row.confirmer2) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="部门编号" align="center" prop="deptId" :show-overflow-tooltip="true"/>
-      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
-      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+      <el-table-column label="时间" align="center" prop="confirmationTime" :show-overflow-tooltip="true" width="125">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.confirmationDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" width="125"/>
+      <el-table-column label="操作" align="center" fixed="right" v-if="isApprove==0" width="140"
+                       class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -275,14 +185,16 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['pssr:safetyBleed:edit']"
-          >修改</el-button>
+          >修改
+          </el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['pssr:safetyBleed:remove']"
-          >删除</el-button>
+          >删除
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -298,132 +210,115 @@
     <!-- 添加或修改安全设施-紧急泄放阀对话框 -->
     <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="从表id" prop="subId">
-          <el-input v-model="form.subId" placeholder="请输入从表id" />
-        </el-form-item>
-        <el-form-item label="审批id" prop="approveId">
-          <el-input v-model="form.approveId" placeholder="请输入审批id" />
-        </el-form-item>
         <el-form-item label="单元号" prop="unit">
-          <el-input v-model="form.unit" placeholder="请输入单元号" />
+          <el-input v-model="form.unit" placeholder="请输入单元号"/>
         </el-form-item>
         <el-form-item label="P&ID图号" prop="pidNo">
-          <el-input v-model="form.pidNo" placeholder="请输入P&ID图号" />
+          <el-input v-model="form.pidNo" placeholder="请输入P&ID图号"/>
         </el-form-item>
         <el-form-item label="紧急泄放阀位号" prop="devNo">
-          <el-input v-model="form.devNo" placeholder="请输入紧急泄放阀位号" />
+          <el-input v-model="form.devNo" placeholder="请输入紧急泄放阀位号"/>
         </el-form-item>
         <el-form-item label="已经校验" prop="verify">
-          <el-input v-model="form.verify" placeholder="请输入已经校验" />
+          <el-input v-model="form.verify" placeholder="请输入已经校验"/>
         </el-form-item>
         <el-form-item label="在有效期内" prop="inValidity">
-          <el-input v-model="form.inValidity" placeholder="请输入在有效期内" />
+          <el-input v-model="form.inValidity" placeholder="请输入在有效期内"/>
         </el-form-item>
         <el-form-item label="安装位置" prop="installLocation">
-          <el-input v-model="form.installLocation" placeholder="请输入安装位置" />
+          <el-input v-model="form.installLocation" placeholder="请输入安装位置"/>
         </el-form-item>
         <el-form-item label="安装位置准确" prop="installAccuracy">
-          <el-input v-model="form.installAccuracy" placeholder="请输入安装位置准确" />
+          <el-input v-model="form.installAccuracy" placeholder="请输入安装位置准确"/>
         </el-form-item>
         <el-form-item label="设定压力" prop="setPressure">
-          <el-input v-model="form.setPressure" placeholder="请输入设定压力" />
+          <el-input v-model="form.setPressure" placeholder="请输入设定压力"/>
         </el-form-item>
         <el-form-item label="校验压力与设定压力一致" prop="uniformPressure">
-          <el-input v-model="form.uniformPressure" placeholder="请输入校验压力与设定压力一致" />
+          <el-input v-model="form.uniformPressure" placeholder="请输入校验压力与设定压力一致"/>
         </el-form-item>
         <el-form-item label="确认人1" prop="confirmer1">
-          <el-input v-model="form.confirmer1" placeholder="请输入确认人1" />
+          <el-select v-model="form.confirmer1" filterable placeholder="请选择确认人1">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
         </el-form-item>
         <el-form-item label="确认人2" prop="confirmer2">
-          <el-input v-model="form.confirmer2" placeholder="请输入确认人2" />
-        </el-form-item>
-        <el-form-item label="时间" prop="confirmationTime">
-          <el-input v-model="form.confirmationTime" placeholder="请输入时间" />
-        </el-form-item>
-        <el-form-item label="删除状态" prop="delFlag">
-          <el-input v-model="form.delFlag" placeholder="请输入删除状态" />
-        </el-form-item>
-        <el-form-item label="创建人" prop="createrCode">
-          <el-input v-model="form.createrCode" placeholder="请输入创建人" />
-        </el-form-item>
-        <el-form-item label="创建时间" prop="createdate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.createdate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择创建时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="修改人" prop="updaterCode">
-          <el-input v-model="form.updaterCode" placeholder="请输入修改人" />
-        </el-form-item>
-        <el-form-item label="修改时间" prop="updatedate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.updatedate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择修改时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="部门编号" prop="deptId">
-          <el-input v-model="form.deptId" placeholder="请输入部门编号" />
+          <el-select v-model="form.confirmer2" filterable placeholder="请选择确认人2">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
         </el-form-item>
         <el-form-item label="备注" prop="remarks">
-          <el-input v-model="form.remarks" placeholder="请输入备注" />
+          <el-input v-model="form.remarks" placeholder="请输入备注"/>
         </el-form-item>
-          <el-form-item label="归属部门" prop="deptId">
-              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
-          </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-      <!-- 用户导入对话框 -->
-      <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
-          <el-upload
-                  ref="upload"
-                  :limit="1"
-                  accept=".xlsx, .xls"
-                  :headers="upload.headers"
-                  :action="upload.url + '?updateSupport=' + upload.updateSupport"
-                  :disabled="upload.isUploading"
-                  :on-progress="handleFileUploadProgress"
-                  :on-success="handleFileSuccess"
-                  :auto-upload="false"
-                  drag
-          >
-              <i class="el-icon-upload"></i>
-              <div class="el-upload__text">
-                  将文件拖到此处,或
-                  <em>点击上传</em>
-              </div>
-              <div class="el-upload__tip" slot="tip">
-                  <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
-                  <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
-              </div>
-              <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
-          </el-upload>
-          <div slot="footer" class="dialog-footer">
-              <el-button type="primary" @click="submitFileForm">确 定</el-button>
-              <el-button @click="upload.open = false">取 消</el-button>
-          </div>
-      </el-dialog>
+    <!-- 用户导入对话框 -->
+    <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px"
+               append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <el-checkbox v-model="upload.updateSupport"/>
+          是否更新已经存在的用户数据
+          <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
+        </div>
+        <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { listSafetyBleed, getSafetyBleed, delSafetyBleed, addSafetyBleed, updateSafetyBleed, exportSafetyBleed, importTemplate} from "@/api/pssr/safetyBleed";
-import { treeselect } from "@/api/system/dept";
-import { getToken } from "@/utils/auth";
+import {
+  addSafetyBleed,
+  delSafetyBleed,
+  exportSafetyBleed,
+  getSafetyBleed,
+  importTemplate,
+  listSafetyBleed,
+  updateSafetyBleed
+} from "@/api/pssr/safetyBleed";
+import {treeselect} from "@/api/system/dept";
+import {getToken} from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import {listUserNoPage} from "@/api/system/user";
+import {handleConfirmBleed, handleTurnDownBleed} from "@/api/pssr/safety";
+import {doApprove} from "@/api/pssr/approve";
 
 export default {
-  dicts:['pssr_approve_status'],
+  dicts: ['pssr_approve_status'],
   name: "SafetyBleed",
-  components: { Treeselect },
+  components: {Treeselect},
   props: {
     subId: {
       type: Number,
@@ -436,6 +331,7 @@ export default {
   },
   data() {
     return {
+      userOptions: [],
       // 遮罩层
       loading: true,
       // 选中数组
@@ -454,24 +350,24 @@ export default {
       title: "",
       // 部门树选项
       deptOptions: undefined,
-      clientHeight:300,
+      clientHeight: 300,
       // 是否显示弹出层
       open: false,
-        // 用户导入参数
-        upload: {
-            // 是否显示弹出层(用户导入)
-            open: false,
-            // 弹出层标题(用户导入)
-            title: "",
-            // 是否禁用上传
-            isUploading: false,
-            // 是否更新已经存在的用户数据
-            updateSupport: 0,
-            // 设置上传的请求头部
-            headers: { Authorization: "Bearer " + getToken() },
-            // 上传的地址
-            url: process.env.VUE_APP_BASE_API + "/pssr/safetyBleed/importData"
-        },
+      // 用户导入参数
+      upload: {
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/pssr/safetyBleed/importData"
+      },
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -501,22 +397,31 @@ export default {
       form: {},
       // 表单校验
       rules: {
+        confirmer1: [
+          {required: true, message: "确认人1不能为空", trigger: "change"}
+        ],
+        confirmer2: [
+          {required: true, message: "确认人2不能为空", trigger: "change"}
+        ],
       }
     };
   },
   watch: {
-        // 根据名称筛选部门树
-        deptName(val) {
-            this.$refs.tree.filter(val);
-        }
-   },
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
   created() {
-      //设置表格高度对应屏幕高度
-      this.$nextTick(() => {
-          this.clientHeight = document.body.clientHeight - 350
-      })
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = document.body.clientHeight - 380
+    })
     this.getList();
     this.getTreeselect();
+    listUserNoPage({}).then(res => {
+      this.userOptions = res.data
+    });
   },
   methods: {
     /** 查询安全设施-紧急泄放阀列表 */
@@ -528,12 +433,12 @@ export default {
         this.loading = false;
       });
     },
-     /** 查询部门下拉树结构 */
-     getTreeselect() {
-          treeselect().then(response => {
-              this.deptOptions = response.data;
-          });
-     },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -580,7 +485,7 @@ export default {
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
+      this.single = selection.length !== 1
       this.multiple = !selection.length
     },
     /** 新增按钮操作 */
@@ -623,56 +528,102 @@ export default {
     handleDelete(row) {
       const ids = row.id || this.ids;
       this.$confirm('是否确认删除?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delSafetyBleed(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        })
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return delSafetyBleed(ids);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      })
     },
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;
       this.$confirm('是否确认导出所有安全设施-紧急泄放阀数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportSafetyBleed(queryParams);
-        }).then(response => {
-          this.download(response.msg);
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return exportSafetyBleed(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      })
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "用户导入";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      importTemplate().then(response => {
+        this.download(response.msg);
+      });
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(response.msg, "导入结果", {dangerouslyUseHTMLString: true});
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    //发起审批
+    handleApprove() {
+      doApprove(this.subId).then(res => {
+        this.msgSuccess("已发起确认流程");
+      })
+    },
+    /** 确认按钮操作*/
+    handleConfirmApprove() {
+      let data = {
+        ids: this.ids,
+        subId: this.subId,
+        taskType: this.isApprove
+      }
+      handleConfirmBleed(data).then(res => {
+        this.msgSuccess("确认成功");
+        this.getList()
+        this.$emit('refreshHisList');
+      })
+    },
+    handleTurnDown(val) {
+      this.$prompt('请输入驳回原因', '提示', {
+        confirmButtonText: '确认驳回',
+        cancelButtonText: '取消',
+      }).then(({value}) => {
+        let data = {
+          ids: this.ids,
+          subId: this.subId,
+          remarks: value
+        }
+        handleTurnDownBleed(data).then(res => {
+          this.msgSuccess("驳回成功");
         })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '取消驳回'
+        });
+      });
     },
-      /** 导入按钮操作 */
-      handleImport() {
-          this.upload.title = "用户导入";
-          this.upload.open = true;
-      },
-      /** 下载模板操作 */
-      importTemplate() {
-          importTemplate().then(response => {
-              this.download(response.msg);
-          });
-      },
-      // 文件上传中处理
-      handleFileUploadProgress(event, file, fileList) {
-          this.upload.isUploading = true;
-      },
-      // 文件上传成功处理
-      handleFileSuccess(response, file, fileList) {
-          this.upload.open = false;
-          this.upload.isUploading = false;
-          this.$refs.upload.clearFiles();
-          this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
-          this.getList();
-      },
-      // 提交上传文件
-      submitFileForm() {
-          this.$refs.upload.submit();
+    userFormat(userId) {
+      for (let item of this.userOptions) {
+        if (item.userId == userId) {
+          return item.nickName
+        }
       }
+    },
   }
 };
 </script>

+ 300 - 356
ui/src/views/pssr/safetyBreath/index.vue

@@ -1,24 +1,6 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="从表id" prop="subId">
-        <el-input
-          v-model="queryParams.subId"
-          placeholder="请输入从表id"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="审批id" prop="approveId">
-        <el-input
-          v-model="queryParams.approveId"
-          placeholder="请输入审批id"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item label="单元号" prop="unit">
         <el-input
           v-model="queryParams.unit"
@@ -46,139 +28,6 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="已经校验" prop="verify">
-        <el-input
-          v-model="queryParams.verify"
-          placeholder="请输入已经校验"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="在有效期内" prop="inValidity">
-        <el-input
-          v-model="queryParams.inValidity"
-          placeholder="请输入在有效期内"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="安装位置" prop="installLocation">
-        <el-input
-          v-model="queryParams.installLocation"
-          placeholder="请输入安装位置"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="安装位置准确" prop="installAccuracy">
-        <el-input
-          v-model="queryParams.installAccuracy"
-          placeholder="请输入安装位置准确"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="设定压力" prop="setPressure">
-        <el-input
-          v-model="queryParams.setPressure"
-          placeholder="请输入设定压力"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="校验压力与设定压力一致" prop="uniformPressure">
-        <el-input
-          v-model="queryParams.uniformPressure"
-          placeholder="请输入校验压力与设定压力一致"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="确认人1" prop="confirmer1">
-        <el-input
-          v-model="queryParams.confirmer1"
-          placeholder="请输入确认人1"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="确认人2" prop="confirmer2">
-        <el-input
-          v-model="queryParams.confirmer2"
-          placeholder="请输入确认人2"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="时间" prop="confirmationTime">
-        <el-input
-          v-model="queryParams.confirmationTime"
-          placeholder="请输入时间"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="创建人" prop="createrCode">
-        <el-input
-          v-model="queryParams.createrCode"
-          placeholder="请输入创建人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="创建时间" prop="createdate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.createdate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择创建时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="修改人" prop="updaterCode">
-        <el-input
-          v-model="queryParams.updaterCode"
-          placeholder="请输入修改人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="修改时间" prop="updatedate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.updatedate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择修改时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="部门编号" prop="deptId">
-        <el-input
-          v-model="queryParams.deptId"
-          placeholder="请输入部门编号"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="备注" prop="remarks">
-        <el-input
-          v-model="queryParams.remarks"
-          placeholder="请输入备注"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -193,7 +42,9 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['pssr:safetyBreath:add']"
-        >新增</el-button>
+          v-if="isApprove==0"
+        >新增
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -203,7 +54,9 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['pssr:safetyBreath:edit']"
-        >修改</el-button>
+          v-if="isApprove==0"
+        >修改
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -213,17 +66,21 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['pssr:safetyBreath:remove']"
-        >删除</el-button>
+          v-if="isApprove==0"
+        >删除
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['pssr:safetyBreath:edit']"
+          v-if="isApprove==0"
+        >导入
+        </el-button>
       </el-col>
-        <el-col :span="1.5">
-            <el-button
-                    type="info"
-                    icon="el-icon-upload2"
-                    size="mini"
-                    @click="handleImport"
-                    v-hasPermi="['pssr:safetyBreath:edit']"
-            >导入</el-button>
-        </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -231,43 +88,96 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['pssr:safetyBreath:export']"
-        >导出</el-button>
+          v-if="isApprove==0"
+        >导出
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-s-promotion"
+          size="mini"
+          @click="handleApprove"
+          v-if="isApprove==0"
+          v-hasPermi="['pssr:safetyBreath:edit']"
+        >发起审批
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-check"
+          size="mini"
+          v-if="isApprove==4||isApprove==5"
+          @click="handleConfirmApprove"
+          v-hasPermi="['pssr:safetyBreath:edit']"
+        >确认
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-refresh-left"
+          size="mini"
+          v-if="isApprove==2"
+          :disabled="multiple"
+          @click="handleTurnDown"
+          v-hasPermi="['pssr:safetyBreath:edit']"
+        >驳回
+        </el-button>
       </el-col>
-	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="safetyBreathList" @selection-change="handleSelectionChange" :height="clientHeight" border>
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="唯一标识ID" align="center" prop="id" :show-overflow-tooltip="true"/>
-      <el-table-column label="从表id" align="center" prop="subId" :show-overflow-tooltip="true"/>
-      <el-table-column label="审批id" align="center" prop="approveId" :show-overflow-tooltip="true"/>
-      <el-table-column label="单元号" align="center" prop="unit" :show-overflow-tooltip="true"/>
-      <el-table-column label="P&ID图号" align="center" prop="pidNo" :show-overflow-tooltip="true"/>
-      <el-table-column label="呼吸阀位号" align="center" prop="devNo" :show-overflow-tooltip="true"/>
-      <el-table-column label="已经校验" align="center" prop="verify" :show-overflow-tooltip="true"/>
-      <el-table-column label="在有效期内" align="center" prop="inValidity" :show-overflow-tooltip="true"/>
-      <el-table-column label="安装位置" align="center" prop="installLocation" :show-overflow-tooltip="true"/>
-      <el-table-column label="安装位置准确" align="center" prop="installAccuracy" :show-overflow-tooltip="true"/>
-      <el-table-column label="设定压力" align="center" prop="setPressure" :show-overflow-tooltip="true"/>
-      <el-table-column label="校验压力与设定压力一致" align="center" prop="uniformPressure" :show-overflow-tooltip="true"/>
-      <el-table-column label="确认人1" align="center" prop="confirmer1" :show-overflow-tooltip="true"/>
-      <el-table-column label="确认人2" align="center" prop="confirmer2" :show-overflow-tooltip="true"/>
-      <el-table-column label="时间" align="center" prop="confirmationTime" :show-overflow-tooltip="true"/>
-      <el-table-column label="创建人" align="center" prop="createrCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="创建时间" align="center" prop="createdate" width="100">
+    <div style="width: 100%;text-align: center;margin-bottom: 15px">
+      <h2>呼吸阀检查清单</h2>
+      <br>
+      <span>检查内容:所有的呼吸阀是否已经校验,是否在有效期内,并确认安装位置是否正确,是否投用,核对呼吸阀校验压力和设定压力是否一致,是(√),否(×),如有不符合要求的立即联系负责人整改。</span>
+    </div>
+
+
+    <el-table v-loading="loading" :data="safetyBreathList" @selection-change="handleSelectionChange"
+              :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="审批状态" align="center" prop="approveStatus" :show-overflow-tooltip="true" width="105">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.approveStatus==0">未审批</el-tag>
+          <el-tag v-if="scope.row.approveStatus==1" type="warning">待确认</el-tag>
+          <el-tag v-if="scope.row.approveStatus==3" type="success">已确认1</el-tag>
+          <el-tag v-if="scope.row.approveStatus==2" type="success">已确认2</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="单元号" align="center" prop="unit" :show-overflow-tooltip="true" width="120"/>
+      <el-table-column label="P&ID图号" align="center" prop="pidNo" :show-overflow-tooltip="true" width="120"/>
+      <el-table-column label="呼吸阀位号" align="center" prop="devNo" :show-overflow-tooltip="true" width="120"/>
+      <el-table-column label="已经校验" align="center" prop="verify" :show-overflow-tooltip="true" width="120"/>
+      <el-table-column label="在有效期内" align="center" prop="inValidity" :show-overflow-tooltip="true" width="120"/>
+      <el-table-column label="安装位置" align="center" prop="installLocation" :show-overflow-tooltip="true"
+                       width="120"/>
+      <el-table-column label="安装位置准确" align="center" prop="installAccuracy" :show-overflow-tooltip="true"
+                       width="120"/>
+      <el-table-column label="投用" align="center" prop="putUse" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="设定压力" align="center" prop="setPressure" :show-overflow-tooltip="true" width="120"/>
+      <el-table-column label="校验压力与设定压力一致" align="center" prop="uniformPressure"
+                       :show-overflow-tooltip="true" width="200"/>
+      <el-table-column label="确认人1" align="center" prop="confirmer1" :show-overflow-tooltip="true" width="120">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>
+          <span>{{ userFormat(scope.row.confirmer1) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="修改人" align="center" prop="updaterCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="修改时间" align="center" prop="updatedate" width="100">
+      <el-table-column label="确认人2" align="center" prop="confirmer2" :show-overflow-tooltip="true" width="120">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.updatedate, '{y}-{m}-{d}') }}</span>
+          <span>{{ userFormat(scope.row.confirmer2) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="部门编号" align="center" prop="deptId" :show-overflow-tooltip="true"/>
-      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
-      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+      <el-table-column label="时间" align="center" prop="confirmationTime" :show-overflow-tooltip="true" width="120">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.confirmationDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" width="120"/>
+      <el-table-column label="操作" align="center" fixed="right" v-if="isApprove==0" width="120"
+                       class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -275,14 +185,16 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['pssr:safetyBreath:edit']"
-          >修改</el-button>
+          >修改
+          </el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['pssr:safetyBreath:remove']"
-          >删除</el-button>
+          >删除
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -298,132 +210,115 @@
     <!-- 添加或修改安全设施-呼吸阀对话框 -->
     <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="从表id" prop="subId">
-          <el-input v-model="form.subId" placeholder="请输入从表id" />
-        </el-form-item>
-        <el-form-item label="审批id" prop="approveId">
-          <el-input v-model="form.approveId" placeholder="请输入审批id" />
-        </el-form-item>
         <el-form-item label="单元号" prop="unit">
-          <el-input v-model="form.unit" placeholder="请输入单元号" />
+          <el-input v-model="form.unit" placeholder="请输入单元号"/>
         </el-form-item>
         <el-form-item label="P&ID图号" prop="pidNo">
-          <el-input v-model="form.pidNo" placeholder="请输入P&ID图号" />
+          <el-input v-model="form.pidNo" placeholder="请输入P&ID图号"/>
         </el-form-item>
         <el-form-item label="呼吸阀位号" prop="devNo">
-          <el-input v-model="form.devNo" placeholder="请输入呼吸阀位号" />
+          <el-input v-model="form.devNo" placeholder="请输入呼吸阀位号"/>
         </el-form-item>
         <el-form-item label="已经校验" prop="verify">
-          <el-input v-model="form.verify" placeholder="请输入已经校验" />
+          <el-input v-model="form.verify" placeholder="请输入已经校验"/>
         </el-form-item>
         <el-form-item label="在有效期内" prop="inValidity">
-          <el-input v-model="form.inValidity" placeholder="请输入在有效期内" />
+          <el-input v-model="form.inValidity" placeholder="请输入在有效期内"/>
         </el-form-item>
         <el-form-item label="安装位置" prop="installLocation">
-          <el-input v-model="form.installLocation" placeholder="请输入安装位置" />
+          <el-input v-model="form.installLocation" placeholder="请输入安装位置"/>
         </el-form-item>
         <el-form-item label="安装位置准确" prop="installAccuracy">
-          <el-input v-model="form.installAccuracy" placeholder="请输入安装位置准确" />
+          <el-input v-model="form.installAccuracy" placeholder="请输入安装位置准确"/>
         </el-form-item>
         <el-form-item label="设定压力" prop="setPressure">
-          <el-input v-model="form.setPressure" placeholder="请输入设定压力" />
+          <el-input v-model="form.setPressure" placeholder="请输入设定压力"/>
         </el-form-item>
         <el-form-item label="校验压力与设定压力一致" prop="uniformPressure">
-          <el-input v-model="form.uniformPressure" placeholder="请输入校验压力与设定压力一致" />
+          <el-input v-model="form.uniformPressure" placeholder="请输入校验压力与设定压力一致"/>
         </el-form-item>
         <el-form-item label="确认人1" prop="confirmer1">
-          <el-input v-model="form.confirmer1" placeholder="请输入确认人1" />
+          <el-select v-model="form.confirmer1" filterable placeholder="请选择确认人1">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
         </el-form-item>
         <el-form-item label="确认人2" prop="confirmer2">
-          <el-input v-model="form.confirmer2" placeholder="请输入确认人2" />
-        </el-form-item>
-        <el-form-item label="时间" prop="confirmationTime">
-          <el-input v-model="form.confirmationTime" placeholder="请输入时间" />
-        </el-form-item>
-        <el-form-item label="删除状态" prop="delFlag">
-          <el-input v-model="form.delFlag" placeholder="请输入删除状态" />
-        </el-form-item>
-        <el-form-item label="创建人" prop="createrCode">
-          <el-input v-model="form.createrCode" placeholder="请输入创建人" />
-        </el-form-item>
-        <el-form-item label="创建时间" prop="createdate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.createdate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择创建时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="修改人" prop="updaterCode">
-          <el-input v-model="form.updaterCode" placeholder="请输入修改人" />
-        </el-form-item>
-        <el-form-item label="修改时间" prop="updatedate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.updatedate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择修改时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="部门编号" prop="deptId">
-          <el-input v-model="form.deptId" placeholder="请输入部门编号" />
+          <el-select v-model="form.confirmer2" filterable placeholder="请选择确认人2">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
         </el-form-item>
         <el-form-item label="备注" prop="remarks">
-          <el-input v-model="form.remarks" placeholder="请输入备注" />
+          <el-input v-model="form.remarks" placeholder="请输入备注"/>
         </el-form-item>
-          <el-form-item label="归属部门" prop="deptId">
-              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
-          </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-      <!-- 用户导入对话框 -->
-      <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
-          <el-upload
-                  ref="upload"
-                  :limit="1"
-                  accept=".xlsx, .xls"
-                  :headers="upload.headers"
-                  :action="upload.url + '?updateSupport=' + upload.updateSupport"
-                  :disabled="upload.isUploading"
-                  :on-progress="handleFileUploadProgress"
-                  :on-success="handleFileSuccess"
-                  :auto-upload="false"
-                  drag
-          >
-              <i class="el-icon-upload"></i>
-              <div class="el-upload__text">
-                  将文件拖到此处,或
-                  <em>点击上传</em>
-              </div>
-              <div class="el-upload__tip" slot="tip">
-                  <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
-                  <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
-              </div>
-              <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
-          </el-upload>
-          <div slot="footer" class="dialog-footer">
-              <el-button type="primary" @click="submitFileForm">确 定</el-button>
-              <el-button @click="upload.open = false">取 消</el-button>
-          </div>
-      </el-dialog>
+    <!-- 用户导入对话框 -->
+    <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px"
+               append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <el-checkbox v-model="upload.updateSupport"/>
+          是否更新已经存在的用户数据
+          <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
+        </div>
+        <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { listSafetyBreath, getSafetyBreath, delSafetyBreath, addSafetyBreath, updateSafetyBreath, exportSafetyBreath, importTemplate} from "@/api/pssr/safetyBreath";
-import { treeselect } from "@/api/system/dept";
-import { getToken } from "@/utils/auth";
+import {
+  addSafetyBreath,
+  delSafetyBreath,
+  exportSafetyBreath,
+  getSafetyBreath,
+  importTemplate,
+  listSafetyBreath,
+  updateSafetyBreath
+} from "@/api/pssr/safetyBreath";
+import {treeselect} from "@/api/system/dept";
+import {getToken} from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import {listUserNoPage} from "@/api/system/user";
+import {doApprove} from "@/api/pssr/approve";
+import {handleConfirmBreath, handleTurnDownBreath} from "@/api/pssr/safety";
 
 export default {
-  dicts:['pssr_approve_status'],
+  dicts: ['pssr_approve_status'],
   name: "SafetyBreath",
-  components: { Treeselect },
+  components: {Treeselect},
   props: {
     subId: {
       type: Number,
@@ -436,6 +331,7 @@ export default {
   },
   data() {
     return {
+      userOptions: [],
       // 遮罩层
       loading: true,
       // 选中数组
@@ -454,24 +350,24 @@ export default {
       title: "",
       // 部门树选项
       deptOptions: undefined,
-      clientHeight:300,
+      clientHeight: 300,
       // 是否显示弹出层
       open: false,
-        // 用户导入参数
-        upload: {
-            // 是否显示弹出层(用户导入)
-            open: false,
-            // 弹出层标题(用户导入)
-            title: "",
-            // 是否禁用上传
-            isUploading: false,
-            // 是否更新已经存在的用户数据
-            updateSupport: 0,
-            // 设置上传的请求头部
-            headers: { Authorization: "Bearer " + getToken() },
-            // 上传的地址
-            url: process.env.VUE_APP_BASE_API + "/pssr/safetyBreath/importData"
-        },
+      // 用户导入参数
+      upload: {
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/pssr/safetyBreath/importData"
+      },
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -500,23 +396,25 @@ export default {
       // 表单参数
       form: {},
       // 表单校验
-      rules: {
-      }
+      rules: {}
     };
   },
   watch: {
-        // 根据名称筛选部门树
-        deptName(val) {
-            this.$refs.tree.filter(val);
-        }
-   },
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
   created() {
-      //设置表格高度对应屏幕高度
-      this.$nextTick(() => {
-          this.clientHeight = document.body.clientHeight - 350
-      })
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = document.body.clientHeight - 380
+    })
     this.getList();
     this.getTreeselect();
+    listUserNoPage({}).then(res => {
+      this.userOptions = res.data
+    });
   },
   methods: {
     /** 查询安全设施-呼吸阀列表 */
@@ -528,12 +426,12 @@ export default {
         this.loading = false;
       });
     },
-     /** 查询部门下拉树结构 */
-     getTreeselect() {
-          treeselect().then(response => {
-              this.deptOptions = response.data;
-          });
-     },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -580,7 +478,7 @@ export default {
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
+      this.single = selection.length !== 1
       this.multiple = !selection.length
     },
     /** 新增按钮操作 */
@@ -623,56 +521,102 @@ export default {
     handleDelete(row) {
       const ids = row.id || this.ids;
       this.$confirm('是否确认删除?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delSafetyBreath(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        })
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return delSafetyBreath(ids);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      })
     },
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;
       this.$confirm('是否确认导出所有安全设施-呼吸阀数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportSafetyBreath(queryParams);
-        }).then(response => {
-          this.download(response.msg);
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return exportSafetyBreath(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      })
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "用户导入";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      importTemplate().then(response => {
+        this.download(response.msg);
+      });
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(response.msg, "导入结果", {dangerouslyUseHTMLString: true});
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    //发起审批
+    handleApprove() {
+      doApprove(this.subId).then(res => {
+        this.msgSuccess("已发起确认流程");
+      })
+    },
+    /** 确认按钮操作*/
+    handleConfirmApprove() {
+      let data = {
+        ids: this.ids,
+        subId: this.subId,
+        taskType: this.isApprove
+      }
+      handleConfirmBreath(data).then(res => {
+        this.msgSuccess("确认成功");
+        this.getList()
+        this.$emit('refreshHisList');
+      })
+    },
+    handleTurnDown(val) {
+      this.$prompt('请输入驳回原因', '提示', {
+        confirmButtonText: '确认驳回',
+        cancelButtonText: '取消',
+      }).then(({value}) => {
+        let data = {
+          ids: this.ids,
+          subId: this.subId,
+          remarks: value
+        }
+        handleTurnDownBreath(data).then(res => {
+          this.msgSuccess("驳回成功");
         })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '取消驳回'
+        });
+      });
     },
-      /** 导入按钮操作 */
-      handleImport() {
-          this.upload.title = "用户导入";
-          this.upload.open = true;
-      },
-      /** 下载模板操作 */
-      importTemplate() {
-          importTemplate().then(response => {
-              this.download(response.msg);
-          });
-      },
-      // 文件上传中处理
-      handleFileUploadProgress(event, file, fileList) {
-          this.upload.isUploading = true;
-      },
-      // 文件上传成功处理
-      handleFileSuccess(response, file, fileList) {
-          this.upload.open = false;
-          this.upload.isUploading = false;
-          this.$refs.upload.clearFiles();
-          this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
-          this.getList();
-      },
-      // 提交上传文件
-      submitFileForm() {
-          this.$refs.upload.submit();
+    userFormat(userId) {
+      for (let item of this.userOptions) {
+        if (item.userId == userId) {
+          return item.nickName
+        }
       }
+    },
   }
 };
 </script>

+ 323 - 365
ui/src/views/pssr/safetyBrust/index.vue

@@ -1,24 +1,6 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="从表id" prop="subId">
-        <el-input
-          v-model="queryParams.subId"
-          placeholder="请输入从表id"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="审批id" prop="approveId">
-        <el-input
-          v-model="queryParams.approveId"
-          placeholder="请输入审批id"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item label="单元号" prop="unit">
         <el-input
           v-model="queryParams.unit"
@@ -37,148 +19,6 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="保护设备" prop="safetyDev">
-        <el-input
-          v-model="queryParams.safetyDev"
-          placeholder="请输入保护设备"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="安装位置描述" prop="installLocation">
-        <el-input
-          v-model="queryParams.installLocation"
-          placeholder="请输入安装位置描述"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="爆破片的安装位置正确" prop="installAccuracy">
-        <el-input
-          v-model="queryParams.installAccuracy"
-          placeholder="请输入爆破片的安装位置正确"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="爆破片的安装方向正确" prop="rightDirection">
-        <el-input
-          v-model="queryParams.rightDirection"
-          placeholder="请输入爆破片的安装方向正确"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="设定压力" prop="setPressure">
-        <el-input
-          v-model="queryParams.setPressure"
-          placeholder="请输入设定压力"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="铭牌上压力和设定压力一致" prop="uniformPressure">
-        <el-input
-          v-model="queryParams.uniformPressure"
-          placeholder="请输入铭牌上压力和设定压力一致"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="爆破片与安全阀之间的压力指示为“0kpa”" prop="is0kpa">
-        <el-input
-          v-model="queryParams.is0kpa"
-          placeholder="请输入爆破片与安全阀之间的压力指示为“0kpa”"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="检查人1" prop="confirmer1">
-        <el-input
-          v-model="queryParams.confirmer1"
-          placeholder="请输入检查人1"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="检查人2" prop="confirmer2">
-        <el-input
-          v-model="queryParams.confirmer2"
-          placeholder="请输入检查人2"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="检查日期" prop="confirmationTime">
-        <el-input
-          v-model="queryParams.confirmationTime"
-          placeholder="请输入检查日期"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="创建人" prop="createrCode">
-        <el-input
-          v-model="queryParams.createrCode"
-          placeholder="请输入创建人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="创建时间" prop="createdate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.createdate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择创建时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="修改人" prop="updaterCode">
-        <el-input
-          v-model="queryParams.updaterCode"
-          placeholder="请输入修改人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="修改时间" prop="updatedate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.updatedate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择修改时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="部门编号" prop="deptId">
-        <el-input
-          v-model="queryParams.deptId"
-          placeholder="请输入部门编号"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="备注" prop="remarks">
-        <el-input
-          v-model="queryParams.remarks"
-          placeholder="请输入备注"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -193,7 +33,9 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['pssr:safetyBrust:add']"
-        >新增</el-button>
+          v-if="isApprove==0"
+        >新增
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -203,7 +45,9 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['pssr:safetyBrust:edit']"
-        >修改</el-button>
+          v-if="isApprove==0"
+        >修改
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -213,17 +57,21 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['pssr:safetyBrust:remove']"
-        >删除</el-button>
+          v-if="isApprove==0"
+        >删除
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['pssr:safetyBrust:edit']"
+          v-if="isApprove==0"
+        >导入
+        </el-button>
       </el-col>
-        <el-col :span="1.5">
-            <el-button
-                    type="info"
-                    icon="el-icon-upload2"
-                    size="mini"
-                    @click="handleImport"
-                    v-hasPermi="['pssr:safetyBrust:edit']"
-            >导入</el-button>
-        </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -231,43 +79,105 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['pssr:safetyBrust:export']"
-        >导出</el-button>
+          v-if="isApprove==0"
+        >导出
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-s-promotion"
+          size="mini"
+          @click="handleApprove"
+          v-if="isApprove==0"
+          v-hasPermi="['pssr:safetyBrust:edit']"
+        >发起审批
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-check"
+          size="mini"
+          v-if="isApprove==4||isApprove==5"
+          @click="handleConfirmApprove"
+          v-hasPermi="['pssr:safetyBrust:edit']"
+        >确认
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-refresh-left"
+          size="mini"
+          v-if="isApprove==2"
+          :disabled="multiple"
+          @click="handleTurnDown"
+          v-hasPermi="['pssr:safetyBrust:edit']"
+        >驳回
+        </el-button>
       </el-col>
-	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="safetyBrustList" @selection-change="handleSelectionChange" :height="clientHeight" border>
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="唯一标识ID" align="center" prop="id" :show-overflow-tooltip="true"/>
-      <el-table-column label="从表id" align="center" prop="subId" :show-overflow-tooltip="true"/>
-      <el-table-column label="审批id" align="center" prop="approveId" :show-overflow-tooltip="true"/>
-      <el-table-column label="单元号" align="center" prop="unit" :show-overflow-tooltip="true"/>
-      <el-table-column label="位号" align="center" prop="devNo" :show-overflow-tooltip="true"/>
-      <el-table-column label="保护设备" align="center" prop="safetyDev" :show-overflow-tooltip="true"/>
-      <el-table-column label="安装位置描述" align="center" prop="installLocation" :show-overflow-tooltip="true"/>
-      <el-table-column label="爆破片的安装位置正确" align="center" prop="installAccuracy" :show-overflow-tooltip="true"/>
-      <el-table-column label="爆破片的安装方向正确" align="center" prop="rightDirection" :show-overflow-tooltip="true"/>
-      <el-table-column label="设定压力" align="center" prop="setPressure" :show-overflow-tooltip="true"/>
-      <el-table-column label="铭牌上压力和设定压力一致" align="center" prop="uniformPressure" :show-overflow-tooltip="true"/>
-      <el-table-column label="爆破片与安全阀之间的压力指示为“0kpa”" align="center" prop="is0kpa" :show-overflow-tooltip="true"/>
-      <el-table-column label="检查人1" align="center" prop="confirmer1" :show-overflow-tooltip="true"/>
-      <el-table-column label="检查人2" align="center" prop="confirmer2" :show-overflow-tooltip="true"/>
-      <el-table-column label="检查日期" align="center" prop="confirmationTime" :show-overflow-tooltip="true"/>
-      <el-table-column label="创建人" align="center" prop="createrCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="创建时间" align="center" prop="createdate" width="100">
+    <div style="width: 100%;text-align: center;margin-bottom: 15px">
+      <h2>安全阀检查清单</h2>
+      <br>
+      <span>检查要求:</span><br>
+      <span>1、查看爆破片的安装位置是否正确,是(✔),否(×),不符合要求的,立即联系相关责任人按照要求进行整改;</span><br>
+      <span>2、检查爆破片的安装方向是否正确,是否投用,是(✔),否(×),不符合要求的,立即联系相关责任人按照要求进行整改;</span><br>
+      <span>3、检查爆破片铭牌上压力和设定压力是否一致,是(✔),否(×),不符合要求的,立即联系相关责任人按照要求进行整改;</span><br>
+      <span>4、查看爆破片与安全阀之间的压力指示是否为0kpa,是(✔),否(×);0kpa为正常,如果超过0kpa则视为异常,立即联系相关责任人按照要求进行整改。</span>
+    </div>
+
+
+    <el-table v-loading="loading" :data="safetyBrustList" @selection-change="handleSelectionChange"
+              :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="审批状态" align="center" prop="approveStatus" :show-overflow-tooltip="true" width="105">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>
+          <el-tag v-if="scope.row.approveStatus==0">未审批</el-tag>
+          <el-tag v-if="scope.row.approveStatus==1" type="warning">待确认</el-tag>
+          <el-tag v-if="scope.row.approveStatus==3" type="success">已确认1</el-tag>
+          <el-tag v-if="scope.row.approveStatus==2" type="success">已确认2</el-tag>
         </template>
       </el-table-column>
-      <el-table-column label="修改人" align="center" prop="updaterCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="修改时间" align="center" prop="updatedate" width="100">
+      <el-table-column label="单元号" align="center" prop="unit" :show-overflow-tooltip="true" width="120"/>
+      <el-table-column label="位号" align="center" prop="devNo" :show-overflow-tooltip="true" width="120"/>
+      <el-table-column label="保护设备" align="center" prop="safetyDev" :show-overflow-tooltip="true" width="120"/>
+      <el-table-column label="安装位置描述" align="center" prop="installLocation" :show-overflow-tooltip="true"
+                       width="120"/>
+      <el-table-column label="检查内容" align="center">
+        <el-table-column label="爆破片的安装位置正确" align="center" prop="installAccuracy"
+                         :show-overflow-tooltip="true" width="170"/>
+        <el-table-column label="爆破片的安装方向正确" align="center" prop="rightDirection" :show-overflow-tooltip="true"
+                         width="160"/>
+        <el-table-column label="设定压力" align="center" prop="setPressure" :show-overflow-tooltip="true" width="120"/>
+        <el-table-column label="铭牌上压力和设定压力一致" align="center" prop="uniformPressure"
+                         :show-overflow-tooltip="true" width="200"/>
+        <el-table-column label="爆破片与安全阀之间的压力指示为“0kpa”" align="center" prop="is0kpa"
+                         :show-overflow-tooltip="true" width="270"/>
+        <el-table-column label="投用" align="center" prop="putUse" :show-overflow-tooltip="true" width="180"/>
+      </el-table-column>
+      <el-table-column label="检查人1" align="center" prop="confirmer1" :show-overflow-tooltip="true" width="120">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.updatedate, '{y}-{m}-{d}') }}</span>
+          <span>{{ userFormat(scope.row.confirmer1) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="部门编号" align="center" prop="deptId" :show-overflow-tooltip="true"/>
-      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
-      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+      <el-table-column label="检查人2" align="center" prop="confirmer2" :show-overflow-tooltip="true" width="120">
+        <template slot-scope="scope">
+          <span>{{ userFormat(scope.row.confirmer2) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="检查日期" align="center" prop="confirmationTime" :show-overflow-tooltip="true"
+                       width="120">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.confirmationDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" width="120"/>
+      <el-table-column label="操作" align="center" fixed="right" width="120" v-if="isApprove==0"
+                       class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -275,14 +185,16 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['pssr:safetyBrust:edit']"
-          >修改</el-button>
+          >修改
+          </el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['pssr:safetyBrust:remove']"
-          >删除</el-button>
+          >删除
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -298,132 +210,130 @@
     <!-- 添加或修改安全设施-爆破片对话框 -->
     <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="从表id" prop="subId">
-          <el-input v-model="form.subId" placeholder="请输入从表id" />
-        </el-form-item>
-        <el-form-item label="审批id" prop="approveId">
-          <el-input v-model="form.approveId" placeholder="请输入审批id" />
-        </el-form-item>
         <el-form-item label="单元号" prop="unit">
-          <el-input v-model="form.unit" placeholder="请输入单元号" />
+          <el-input v-model="form.unit" placeholder="请输入单元号"/>
         </el-form-item>
         <el-form-item label="位号" prop="devNo">
-          <el-input v-model="form.devNo" placeholder="请输入位号" />
+          <el-input v-model="form.devNo" placeholder="请输入位号"/>
         </el-form-item>
         <el-form-item label="保护设备" prop="safetyDev">
-          <el-input v-model="form.safetyDev" placeholder="请输入保护设备" />
+          <el-input v-model="form.safetyDev" placeholder="请输入保护设备"/>
         </el-form-item>
         <el-form-item label="安装位置描述" prop="installLocation">
-          <el-input v-model="form.installLocation" placeholder="请输入安装位置描述" />
+          <el-input v-model="form.installLocation" placeholder="请输入安装位置描述"/>
         </el-form-item>
         <el-form-item label="爆破片的安装位置正确" prop="installAccuracy">
-          <el-input v-model="form.installAccuracy" placeholder="请输入爆破片的安装位置正确" />
+          <el-radio-group v-model="form.installAccuracy">
+            <el-radio label="✔" border>✔</el-radio>
+            <el-radio label="✖" border>✖</el-radio>
+          </el-radio-group>
         </el-form-item>
         <el-form-item label="爆破片的安装方向正确" prop="rightDirection">
-          <el-input v-model="form.rightDirection" placeholder="请输入爆破片的安装方向正确" />
+          <el-radio-group v-model="form.rightDirection">
+            <el-radio label="✔" border>✔</el-radio>
+            <el-radio label="✖" border>✖</el-radio>
+          </el-radio-group>
         </el-form-item>
         <el-form-item label="设定压力" prop="setPressure">
-          <el-input v-model="form.setPressure" placeholder="请输入设定压力" />
+          <el-radio-group v-model="form.setPressure">
+            <el-radio label="✔" border>✔</el-radio>
+            <el-radio label="✖" border>✖</el-radio>
+          </el-radio-group>
         </el-form-item>
         <el-form-item label="铭牌上压力和设定压力一致" prop="uniformPressure">
-          <el-input v-model="form.uniformPressure" placeholder="请输入铭牌上压力和设定压力一致" />
+          <el-radio-group v-model="form.uniformPressure">
+            <el-radio label="✔" border>✔</el-radio>
+            <el-radio label="✖" border>✖</el-radio>
+          </el-radio-group>
         </el-form-item>
         <el-form-item label="爆破片与安全阀之间的压力指示为“0kpa”" prop="is0kpa">
-          <el-input v-model="form.is0kpa" placeholder="请输入爆破片与安全阀之间的压力指示为“0kpa”" />
+          <el-radio-group v-model="form.is0kpa">
+            <el-radio label="✔" border>✔</el-radio>
+            <el-radio label="✖" border>✖</el-radio>
+          </el-radio-group>
         </el-form-item>
         <el-form-item label="检查人1" prop="confirmer1">
-          <el-input v-model="form.confirmer1" placeholder="请输入检查人1" />
+          <el-select v-model="form.confirmer1" filterable placeholder="请选择确认人1">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
         </el-form-item>
         <el-form-item label="检查人2" prop="confirmer2">
-          <el-input v-model="form.confirmer2" placeholder="请输入检查人2" />
-        </el-form-item>
-        <el-form-item label="检查日期" prop="confirmationTime">
-          <el-input v-model="form.confirmationTime" placeholder="请输入检查日期" />
-        </el-form-item>
-        <el-form-item label="删除状态" prop="delFlag">
-          <el-input v-model="form.delFlag" placeholder="请输入删除状态" />
-        </el-form-item>
-        <el-form-item label="创建人" prop="createrCode">
-          <el-input v-model="form.createrCode" placeholder="请输入创建人" />
-        </el-form-item>
-        <el-form-item label="创建时间" prop="createdate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.createdate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择创建时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="修改人" prop="updaterCode">
-          <el-input v-model="form.updaterCode" placeholder="请输入修改人" />
-        </el-form-item>
-        <el-form-item label="修改时间" prop="updatedate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.updatedate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择修改时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="部门编号" prop="deptId">
-          <el-input v-model="form.deptId" placeholder="请输入部门编号" />
+          <el-select v-model="form.confirmer2" filterable placeholder="请选择确认人2">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
         </el-form-item>
         <el-form-item label="备注" prop="remarks">
-          <el-input v-model="form.remarks" placeholder="请输入备注" />
+          <el-input v-model="form.remarks" placeholder="请输入备注"/>
         </el-form-item>
-          <el-form-item label="归属部门" prop="deptId">
-              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
-          </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-      <!-- 用户导入对话框 -->
-      <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
-          <el-upload
-                  ref="upload"
-                  :limit="1"
-                  accept=".xlsx, .xls"
-                  :headers="upload.headers"
-                  :action="upload.url + '?updateSupport=' + upload.updateSupport"
-                  :disabled="upload.isUploading"
-                  :on-progress="handleFileUploadProgress"
-                  :on-success="handleFileSuccess"
-                  :auto-upload="false"
-                  drag
-          >
-              <i class="el-icon-upload"></i>
-              <div class="el-upload__text">
-                  将文件拖到此处,或
-                  <em>点击上传</em>
-              </div>
-              <div class="el-upload__tip" slot="tip">
-                  <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
-                  <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
-              </div>
-              <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
-          </el-upload>
-          <div slot="footer" class="dialog-footer">
-              <el-button type="primary" @click="submitFileForm">确 定</el-button>
-              <el-button @click="upload.open = false">取 消</el-button>
-          </div>
-      </el-dialog>
+    <!-- 用户导入对话框 -->
+    <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px"
+               append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <el-checkbox v-model="upload.updateSupport"/>
+          是否更新已经存在的用户数据
+          <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
+        </div>
+        <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { listSafetyBrust, getSafetyBrust, delSafetyBrust, addSafetyBrust, updateSafetyBrust, exportSafetyBrust, importTemplate} from "@/api/pssr/safetyBrust";
-import { treeselect } from "@/api/system/dept";
-import { getToken } from "@/utils/auth";
+import {
+  addSafetyBrust,
+  delSafetyBrust,
+  exportSafetyBrust,
+  getSafetyBrust,
+  importTemplate,
+  listSafetyBrust,
+  updateSafetyBrust
+} from "@/api/pssr/safetyBrust";
+import {treeselect} from "@/api/system/dept";
+import {getToken} from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import {listUserNoPage} from "@/api/system/user";
+import {doApprove} from "@/api/pssr/approve";
+import {handleConfirmBrust, handleTurnDownBrust} from "@/api/pssr/safety";
 
 export default {
-  dicts:['pssr_approve_status'],
+  dicts: ['pssr_approve_status'],
   name: "SafetyBrust",
-  components: { Treeselect },
+  components: {Treeselect},
   props: {
     subId: {
       type: Number,
@@ -436,6 +346,7 @@ export default {
   },
   data() {
     return {
+      userOptions: [],
       // 遮罩层
       loading: true,
       // 选中数组
@@ -454,24 +365,24 @@ export default {
       title: "",
       // 部门树选项
       deptOptions: undefined,
-      clientHeight:300,
+      clientHeight: 300,
       // 是否显示弹出层
       open: false,
-        // 用户导入参数
-        upload: {
-            // 是否显示弹出层(用户导入)
-            open: false,
-            // 弹出层标题(用户导入)
-            title: "",
-            // 是否禁用上传
-            isUploading: false,
-            // 是否更新已经存在的用户数据
-            updateSupport: 0,
-            // 设置上传的请求头部
-            headers: { Authorization: "Bearer " + getToken() },
-            // 上传的地址
-            url: process.env.VUE_APP_BASE_API + "/pssr/safetyBrust/importData"
-        },
+      // 用户导入参数
+      upload: {
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/pssr/safetyBrust/importData"
+      },
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -500,23 +411,25 @@ export default {
       // 表单参数
       form: {},
       // 表单校验
-      rules: {
-      }
+      rules: {}
     };
   },
   watch: {
-        // 根据名称筛选部门树
-        deptName(val) {
-            this.$refs.tree.filter(val);
-        }
-   },
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
   created() {
-      //设置表格高度对应屏幕高度
-      this.$nextTick(() => {
-          this.clientHeight = document.body.clientHeight - 350
-      })
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = document.body.clientHeight - 380
+    })
     this.getList();
     this.getTreeselect();
+    listUserNoPage({}).then(res => {
+      this.userOptions = res.data
+    });
   },
   methods: {
     /** 查询安全设施-爆破片列表 */
@@ -528,12 +441,12 @@ export default {
         this.loading = false;
       });
     },
-     /** 查询部门下拉树结构 */
-     getTreeselect() {
-          treeselect().then(response => {
-              this.deptOptions = response.data;
-          });
-     },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -580,7 +493,7 @@ export default {
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
+      this.single = selection.length !== 1
       this.multiple = !selection.length
     },
     /** 新增按钮操作 */
@@ -623,56 +536,101 @@ export default {
     handleDelete(row) {
       const ids = row.id || this.ids;
       this.$confirm('是否确认删除?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delSafetyBrust(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        })
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return delSafetyBrust(ids);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      })
     },
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;
       this.$confirm('是否确认导出所有安全设施-爆破片数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportSafetyBrust(queryParams);
-        }).then(response => {
-          this.download(response.msg);
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return exportSafetyBrust(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      })
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "用户导入";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      importTemplate().then(response => {
+        this.download(response.msg);
+      });
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(response.msg, "导入结果", {dangerouslyUseHTMLString: true});
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    //发起审批
+    handleApprove() {
+      doApprove(this.subId).then(res => {
+        this.msgSuccess("已发起确认流程");
+      })
+    },
+    handleConfirmApprove() {
+      let data = {
+        ids: this.ids,
+        subId: this.subId,
+        taskType: this.isApprove
+      }
+      handleConfirmBrust(data).then(res => {
+        this.msgSuccess("确认成功");
+        this.getList()
+        this.$emit('refreshHisList');
+      })
+    },
+    handleTurnDown(val) {
+      this.$prompt('请输入驳回原因', '提示', {
+        confirmButtonText: '确认驳回',
+        cancelButtonText: '取消',
+      }).then(({value}) => {
+        let data = {
+          ids: this.ids,
+          subId: this.subId,
+          remarks: value
+        }
+        handleTurnDownBrust(data).then(res => {
+          this.msgSuccess("驳回成功");
         })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '取消驳回'
+        });
+      });
     },
-      /** 导入按钮操作 */
-      handleImport() {
-          this.upload.title = "用户导入";
-          this.upload.open = true;
-      },
-      /** 下载模板操作 */
-      importTemplate() {
-          importTemplate().then(response => {
-              this.download(response.msg);
-          });
-      },
-      // 文件上传中处理
-      handleFileUploadProgress(event, file, fileList) {
-          this.upload.isUploading = true;
-      },
-      // 文件上传成功处理
-      handleFileSuccess(response, file, fileList) {
-          this.upload.open = false;
-          this.upload.isUploading = false;
-          this.$refs.upload.clearFiles();
-          this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
-          this.getList();
-      },
-      // 提交上传文件
-      submitFileForm() {
-          this.$refs.upload.submit();
+    userFormat(userId) {
+      for (let item of this.userOptions) {
+        if (item.userId == userId) {
+          return item.nickName
+        }
       }
+    },
   }
 };
 </script>

+ 305 - 319
ui/src/views/pssr/safetyFlamearrester/index.vue

@@ -1,24 +1,6 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="从表id" prop="subId">
-        <el-input
-          v-model="queryParams.subId"
-          placeholder="请输入从表id"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="审批id" prop="approveId">
-        <el-input
-          v-model="queryParams.approveId"
-          placeholder="请输入审批id"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item label="单元号" prop="unit">
         <el-input
           v-model="queryParams.unit"
@@ -37,112 +19,6 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="安装位置" prop="installLocation">
-        <el-input
-          v-model="queryParams.installLocation"
-          placeholder="请输入安装位置"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="流向标记与介质流向一致" prop="uniformFlow">
-        <el-input
-          v-model="queryParams.uniformFlow"
-          placeholder="请输入流向标记与介质流向一致"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="壳体和螺栓腐蚀" prop="corrosion">
-        <el-input
-          v-model="queryParams.corrosion"
-          placeholder="请输入壳体和螺栓腐蚀"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="检查人1" prop="confirmer1">
-        <el-input
-          v-model="queryParams.confirmer1"
-          placeholder="请输入检查人1"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="检查人2" prop="confirmer2">
-        <el-input
-          v-model="queryParams.confirmer2"
-          placeholder="请输入检查人2"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="检查时间" prop="confirmationTime">
-        <el-input
-          v-model="queryParams.confirmationTime"
-          placeholder="请输入检查时间"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="创建人" prop="createrCode">
-        <el-input
-          v-model="queryParams.createrCode"
-          placeholder="请输入创建人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="创建时间" prop="createdate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.createdate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择创建时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="修改人" prop="updaterCode">
-        <el-input
-          v-model="queryParams.updaterCode"
-          placeholder="请输入修改人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="修改时间" prop="updatedate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.updatedate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择修改时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="部门编号" prop="deptId">
-        <el-input
-          v-model="queryParams.deptId"
-          placeholder="请输入部门编号"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="备注" prop="remarks">
-        <el-input
-          v-model="queryParams.remarks"
-          placeholder="请输入备注"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -157,7 +33,9 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['pssr:safetyFlamearrester:add']"
-        >新增</el-button>
+          v-if="isApprove==0"
+        >新增
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -167,7 +45,9 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['pssr:safetyFlamearrester:edit']"
-        >修改</el-button>
+          v-if="isApprove==0"
+        >修改
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -177,17 +57,21 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['pssr:safetyFlamearrester:remove']"
-        >删除</el-button>
+          v-if="isApprove==0"
+        >删除
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['pssr:safetyFlamearrester:edit']"
+          v-if="isApprove==0"
+        >导入
+        </el-button>
       </el-col>
-        <el-col :span="1.5">
-            <el-button
-                    type="info"
-                    icon="el-icon-upload2"
-                    size="mini"
-                    @click="handleImport"
-                    v-hasPermi="['pssr:safetyFlamearrester:edit']"
-            >导入</el-button>
-        </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -195,39 +79,99 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['pssr:safetyFlamearrester:export']"
-        >导出</el-button>
+          v-if="isApprove==0"
+        >导出
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-s-promotion"
+          size="mini"
+          @click="handleApprove"
+          v-if="isApprove==0"
+          v-hasPermi="['pssr:safetyFlamearrester:edit']"
+        >发起审批
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-check"
+          size="mini"
+          v-if="isApprove==4||isApprove==5"
+          @click="handleConfirmApprove"
+          v-hasPermi="['pssr:safetyFlamearrester:edit']"
+        >确认
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-refresh-left"
+          size="mini"
+          v-if="isApprove==2"
+          :disabled="multiple"
+          @click="handleTurnDown"
+          v-hasPermi="['pssr:safetyFlamearrester:edit']"
+        >驳回
+        </el-button>
       </el-col>
-	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="safetyFlamearresterList" @selection-change="handleSelectionChange" :height="clientHeight" border>
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="唯一标识ID" align="center" prop="id" :show-overflow-tooltip="true"/>
-      <el-table-column label="从表id" align="center" prop="subId" :show-overflow-tooltip="true"/>
-      <el-table-column label="审批id" align="center" prop="approveId" :show-overflow-tooltip="true"/>
-      <el-table-column label="单元号" align="center" prop="unit" :show-overflow-tooltip="true"/>
-      <el-table-column label="紧急泄放阀位号" align="center" prop="devNo" :show-overflow-tooltip="true"/>
-      <el-table-column label="安装位置" align="center" prop="installLocation" :show-overflow-tooltip="true"/>
-      <el-table-column label="流向标记与介质流向一致" align="center" prop="uniformFlow" :show-overflow-tooltip="true"/>
-      <el-table-column label="壳体和螺栓腐蚀" align="center" prop="corrosion" :show-overflow-tooltip="true"/>
-      <el-table-column label="检查人1" align="center" prop="confirmer1" :show-overflow-tooltip="true"/>
-      <el-table-column label="检查人2" align="center" prop="confirmer2" :show-overflow-tooltip="true"/>
-      <el-table-column label="检查时间" align="center" prop="confirmationTime" :show-overflow-tooltip="true"/>
-      <el-table-column label="创建人" align="center" prop="createrCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="创建时间" align="center" prop="createdate" width="100">
+    <div style="width: 100%;text-align: center;margin-bottom: 15px">
+      <h2>阻火器检查表</h2>
+      <br>
+      <span>检查要求:</span><br>
+      <span>1、查看阻火器的流向标记和介质流向是否一致,是(✔),否(×),不符合要求的,立即联系相关责任人按照要求进行整改。</span><br>
+      <span>2、检查阻火器壳体和螺栓是否腐蚀,是(✔),否(×),不符合要求的,立即联系相关责任人按照要求进行整改。</span><br>
+      <span>3、检查阻火器是否投用,是(✔),否(×),不符合要求的,立即联系相关责任人按照要求进行整改。</span>
+    </div>
+
+
+    <el-table v-loading="loading" :data="safetyFlamearresterList" @selection-change="handleSelectionChange"
+              :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="审批状态" align="center" prop="approveStatus" :show-overflow-tooltip="true" width="105">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.approveStatus==0">未审批</el-tag>
+          <el-tag v-if="scope.row.approveStatus==1" type="warning">待确认</el-tag>
+          <el-tag v-if="scope.row.approveStatus==3" type="success">已确认1</el-tag>
+          <el-tag v-if="scope.row.approveStatus==2" type="success">已确认2</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="单元号" align="center" prop="unit" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="紧急泄放阀位号" align="center" prop="devNo" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="安装位置" align="center" prop="installLocation" :show-overflow-tooltip="true"
+                       width="180"/>
+
+      <el-table-column label="检查内容" align="center">
+        <el-table-column label="流向标记与介质流向一致" align="center" prop="uniformFlow" :show-overflow-tooltip="true"
+                         width="180"/>
+        <el-table-column label="壳体和螺栓腐蚀" align="center" prop="corrosion" :show-overflow-tooltip="true"
+                         width="180"/>
+        <el-table-column label="投用" align="center" prop="putUse" :show-overflow-tooltip="true" width="180"/>
+      </el-table-column>
+      <el-table-column label="检查人1" align="center" prop="confirmer1" :show-overflow-tooltip="true" width="180">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>
+          <span>{{ userFormat(scope.row.confirmer1) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="修改人" align="center" prop="updaterCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="修改时间" align="center" prop="updatedate" width="100">
+      <el-table-column label="检查人2" align="center" prop="confirmer2" :show-overflow-tooltip="true" width="180">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.updatedate, '{y}-{m}-{d}') }}</span>
+          <span>{{ userFormat(scope.row.confirmer2) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="部门编号" align="center" prop="deptId" :show-overflow-tooltip="true"/>
-      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
-      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+      <el-table-column label="检查时间" align="center" prop="confirmationTime" :show-overflow-tooltip="true"
+                       width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.confirmationDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="操作" align="center" fixed="right" width="120" v-if="isApprove==0"
+                       class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -235,14 +179,16 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['pssr:safetyFlamearrester:edit']"
-          >修改</el-button>
+          >修改
+          </el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['pssr:safetyFlamearrester:remove']"
-          >删除</el-button>
+          >删除
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -258,120 +204,112 @@
     <!-- 添加或修改安全设施-阻火器对话框 -->
     <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="从表id" prop="subId">
-          <el-input v-model="form.subId" placeholder="请输入从表id" />
-        </el-form-item>
-        <el-form-item label="审批id" prop="approveId">
-          <el-input v-model="form.approveId" placeholder="请输入审批id" />
-        </el-form-item>
         <el-form-item label="单元号" prop="unit">
-          <el-input v-model="form.unit" placeholder="请输入单元号" />
+          <el-input v-model="form.unit" placeholder="请输入单元号"/>
         </el-form-item>
         <el-form-item label="紧急泄放阀位号" prop="devNo">
-          <el-input v-model="form.devNo" placeholder="请输入紧急泄放阀位号" />
+          <el-input v-model="form.devNo" placeholder="请输入紧急泄放阀位号"/>
         </el-form-item>
         <el-form-item label="安装位置" prop="installLocation">
-          <el-input v-model="form.installLocation" placeholder="请输入安装位置" />
+          <el-input v-model="form.installLocation" placeholder="请输入安装位置"/>
         </el-form-item>
         <el-form-item label="流向标记与介质流向一致" prop="uniformFlow">
-          <el-input v-model="form.uniformFlow" placeholder="请输入流向标记与介质流向一致" />
+          <el-radio-group v-model="form.uniformFlow">
+            <el-radio label="✔" border>✔</el-radio>
+            <el-radio label="✖" border>✖</el-radio>
+          </el-radio-group>
         </el-form-item>
         <el-form-item label="壳体和螺栓腐蚀" prop="corrosion">
-          <el-input v-model="form.corrosion" placeholder="请输入壳体和螺栓腐蚀" />
+          <el-radio-group v-model="form.corrosion">
+            <el-radio label="✔" border>✔</el-radio>
+            <el-radio label="✖" border>✖</el-radio>
+          </el-radio-group>
         </el-form-item>
         <el-form-item label="检查人1" prop="confirmer1">
-          <el-input v-model="form.confirmer1" placeholder="请输入检查人1" />
+          <el-select v-model="form.confirmer1" filterable placeholder="请选择确认人1">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
         </el-form-item>
         <el-form-item label="检查人2" prop="confirmer2">
-          <el-input v-model="form.confirmer2" placeholder="请输入检查人2" />
+          <el-select v-model="form.confirmer2" filterable placeholder="请选择确认人2">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
         </el-form-item>
         <el-form-item label="检查时间" prop="confirmationTime">
-          <el-input v-model="form.confirmationTime" placeholder="请输入检查时间" />
-        </el-form-item>
-        <el-form-item label="删除状态" prop="delFlag">
-          <el-input v-model="form.delFlag" placeholder="请输入删除状态" />
-        </el-form-item>
-        <el-form-item label="创建人" prop="createrCode">
-          <el-input v-model="form.createrCode" placeholder="请输入创建人" />
-        </el-form-item>
-        <el-form-item label="创建时间" prop="createdate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.createdate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择创建时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="修改人" prop="updaterCode">
-          <el-input v-model="form.updaterCode" placeholder="请输入修改人" />
-        </el-form-item>
-        <el-form-item label="修改时间" prop="updatedate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.updatedate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择修改时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="部门编号" prop="deptId">
-          <el-input v-model="form.deptId" placeholder="请输入部门编号" />
+          <el-input v-model="form.confirmationTime" placeholder="请输入检查时间"/>
         </el-form-item>
         <el-form-item label="备注" prop="remarks">
-          <el-input v-model="form.remarks" placeholder="请输入备注" />
+          <el-input v-model="form.remarks" placeholder="请输入备注"/>
         </el-form-item>
-          <el-form-item label="归属部门" prop="deptId">
-              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
-          </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-      <!-- 用户导入对话框 -->
-      <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
-          <el-upload
-                  ref="upload"
-                  :limit="1"
-                  accept=".xlsx, .xls"
-                  :headers="upload.headers"
-                  :action="upload.url + '?updateSupport=' + upload.updateSupport"
-                  :disabled="upload.isUploading"
-                  :on-progress="handleFileUploadProgress"
-                  :on-success="handleFileSuccess"
-                  :auto-upload="false"
-                  drag
-          >
-              <i class="el-icon-upload"></i>
-              <div class="el-upload__text">
-                  将文件拖到此处,或
-                  <em>点击上传</em>
-              </div>
-              <div class="el-upload__tip" slot="tip">
-                  <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
-                  <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
-              </div>
-              <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
-          </el-upload>
-          <div slot="footer" class="dialog-footer">
-              <el-button type="primary" @click="submitFileForm">确 定</el-button>
-              <el-button @click="upload.open = false">取 消</el-button>
-          </div>
-      </el-dialog>
+    <!-- 用户导入对话框 -->
+    <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px"
+               append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <el-checkbox v-model="upload.updateSupport"/>
+          是否更新已经存在的用户数据
+          <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
+        </div>
+        <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { listSafetyFlamearrester, getSafetyFlamearrester, delSafetyFlamearrester, addSafetyFlamearrester, updateSafetyFlamearrester, exportSafetyFlamearrester, importTemplate} from "@/api/pssr/safetyFlamearrester";
-import { treeselect } from "@/api/system/dept";
-import { getToken } from "@/utils/auth";
+import {
+  addSafetyFlamearrester,
+  delSafetyFlamearrester,
+  exportSafetyFlamearrester,
+  getSafetyFlamearrester,
+  importTemplate,
+  listSafetyFlamearrester,
+  updateSafetyFlamearrester
+} from "@/api/pssr/safetyFlamearrester";
+import {treeselect} from "@/api/system/dept";
+import {getToken} from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import {listUserNoPage} from "@/api/system/user";
+import {handleconfirmFlamearrester, handleturnDownFlamearrester} from "@/api/pssr/safety";
+import {doApprove} from "@/api/pssr/approve";
 
 export default {
-  dicts:['pssr_approve_status'],
+  dicts: ['pssr_approve_status'],
   name: "SafetyFlamearrester",
-  components: { Treeselect },
+  components: {Treeselect},
   props: {
     subId: {
       type: Number,
@@ -384,6 +322,7 @@ export default {
   },
   data() {
     return {
+      userOptions: [],
       // 遮罩层
       loading: true,
       // 选中数组
@@ -402,24 +341,24 @@ export default {
       title: "",
       // 部门树选项
       deptOptions: undefined,
-      clientHeight:300,
+      clientHeight: 300,
       // 是否显示弹出层
       open: false,
-        // 用户导入参数
-        upload: {
-            // 是否显示弹出层(用户导入)
-            open: false,
-            // 弹出层标题(用户导入)
-            title: "",
-            // 是否禁用上传
-            isUploading: false,
-            // 是否更新已经存在的用户数据
-            updateSupport: 0,
-            // 设置上传的请求头部
-            headers: { Authorization: "Bearer " + getToken() },
-            // 上传的地址
-            url: process.env.VUE_APP_BASE_API + "/pssr/safetyFlamearrester/importData"
-        },
+      // 用户导入参数
+      upload: {
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/pssr/safetyFlamearrester/importData"
+      },
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -444,23 +383,25 @@ export default {
       // 表单参数
       form: {},
       // 表单校验
-      rules: {
-      }
+      rules: {}
     };
   },
   watch: {
-        // 根据名称筛选部门树
-        deptName(val) {
-            this.$refs.tree.filter(val);
-        }
-   },
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
   created() {
-      //设置表格高度对应屏幕高度
-      this.$nextTick(() => {
-          this.clientHeight = document.body.clientHeight - 350
-      })
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = document.body.clientHeight - 380
+    })
     this.getList();
     this.getTreeselect();
+    listUserNoPage({}).then(res => {
+      this.userOptions = res.data
+    });
   },
   methods: {
     /** 查询安全设施-阻火器列表 */
@@ -472,12 +413,12 @@ export default {
         this.loading = false;
       });
     },
-     /** 查询部门下拉树结构 */
-     getTreeselect() {
-          treeselect().then(response => {
-              this.deptOptions = response.data;
-          });
-     },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -520,7 +461,7 @@ export default {
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
+      this.single = selection.length !== 1
       this.multiple = !selection.length
     },
     /** 新增按钮操作 */
@@ -563,56 +504,101 @@ export default {
     handleDelete(row) {
       const ids = row.id || this.ids;
       this.$confirm('是否确认删除?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delSafetyFlamearrester(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        })
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return delSafetyFlamearrester(ids);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      })
     },
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;
       this.$confirm('是否确认导出所有安全设施-阻火器数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportSafetyFlamearrester(queryParams);
-        }).then(response => {
-          this.download(response.msg);
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return exportSafetyFlamearrester(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      })
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "用户导入";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      importTemplate().then(response => {
+        this.download(response.msg);
+      });
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(response.msg, "导入结果", {dangerouslyUseHTMLString: true});
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    //发起审批
+    handleApprove() {
+      doApprove(this.subId).then(res => {
+        this.msgSuccess("已发起确认流程");
+      })
+    },
+    handleConfirmApprove() {
+      let data = {
+        ids: this.ids,
+        subId: this.subId,
+        taskType: this.isApprove
+      }
+      handleconfirmFlamearrester(data).then(res => {
+        this.msgSuccess("确认成功");
+        this.getList()
+        this.$emit('refreshHisList');
+      })
+    },
+    handleTurnDown(val) {
+      this.$prompt('请输入驳回原因', '提示', {
+        confirmButtonText: '确认驳回',
+        cancelButtonText: '取消',
+      }).then(({value}) => {
+        let data = {
+          ids: this.ids,
+          subId: this.subId,
+          remarks: value
+        }
+        handleturnDownFlamearrester(data).then(res => {
+          this.msgSuccess("驳回成功");
         })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '取消驳回'
+        });
+      });
     },
-      /** 导入按钮操作 */
-      handleImport() {
-          this.upload.title = "用户导入";
-          this.upload.open = true;
-      },
-      /** 下载模板操作 */
-      importTemplate() {
-          importTemplate().then(response => {
-              this.download(response.msg);
-          });
-      },
-      // 文件上传中处理
-      handleFileUploadProgress(event, file, fileList) {
-          this.upload.isUploading = true;
-      },
-      // 文件上传成功处理
-      handleFileSuccess(response, file, fileList) {
-          this.upload.open = false;
-          this.upload.isUploading = false;
-          this.$refs.upload.clearFiles();
-          this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
-          this.getList();
-      },
-      // 提交上传文件
-      submitFileForm() {
-          this.$refs.upload.submit();
+    userFormat(userId) {
+      for (let item of this.userOptions) {
+        if (item.userId == userId) {
+          return item.nickName
+        }
       }
+    },
   }
 };
 </script>

+ 300 - 367
ui/src/views/pssr/safetyValve/index.vue

@@ -1,24 +1,6 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="从表id" prop="subId">
-        <el-input
-          v-model="queryParams.subId"
-          placeholder="请输入从表id"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="审批id" prop="approveId">
-        <el-input
-          v-model="queryParams.approveId"
-          placeholder="请输入审批id"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item label="单元号" prop="unit">
         <el-input
           v-model="queryParams.unit"
@@ -46,148 +28,6 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="保护设备" prop="safetyDev">
-        <el-input
-          v-model="queryParams.safetyDev"
-          placeholder="请输入保护设备"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="已经校验" prop="verify">
-        <el-input
-          v-model="queryParams.verify"
-          placeholder="请输入已经校验"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="在有效期内" prop="inValidity">
-        <el-input
-          v-model="queryParams.inValidity"
-          placeholder="请输入在有效期内"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="安装位置" prop="installLocation">
-        <el-input
-          v-model="queryParams.installLocation"
-          placeholder="请输入安装位置"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="安装位置准确" prop="installAccuracy">
-        <el-input
-          v-model="queryParams.installAccuracy"
-          placeholder="请输入安装位置准确"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="设定压力" prop="setPressure">
-        <el-input
-          v-model="queryParams.setPressure"
-          placeholder="请输入设定压力"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="校验压力与设定压力一致" prop="uniformPressure">
-        <el-input
-          v-model="queryParams.uniformPressure"
-          placeholder="请输入校验压力与设定压力一致"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="确认人1" prop="confirmer1">
-        <el-input
-          v-model="queryParams.confirmer1"
-          placeholder="请输入确认人1"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="确认人2" prop="confirmer2">
-        <el-input
-          v-model="queryParams.confirmer2"
-          placeholder="请输入确认人2"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="时间" prop="confirmationTime">
-        <el-input
-          v-model="queryParams.confirmationTime"
-          placeholder="请输入时间"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="创建人" prop="createrCode">
-        <el-input
-          v-model="queryParams.createrCode"
-          placeholder="请输入创建人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="创建时间" prop="createdate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.createdate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择创建时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="修改人" prop="updaterCode">
-        <el-input
-          v-model="queryParams.updaterCode"
-          placeholder="请输入修改人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="修改时间" prop="updatedate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.updatedate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择修改时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="部门编号" prop="deptId">
-        <el-input
-          v-model="queryParams.deptId"
-          placeholder="请输入部门编号"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="备注" prop="remarks">
-        <el-input
-          v-model="queryParams.remarks"
-          placeholder="请输入备注"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -202,7 +42,9 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['pssr:safetyValve:add']"
-        >新增</el-button>
+          v-if="isApprove==0"
+        >新增
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -212,7 +54,9 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['pssr:safetyValve:edit']"
-        >修改</el-button>
+          v-if="isApprove==0"
+        >修改
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -222,17 +66,21 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['pssr:safetyValve:remove']"
-        >删除</el-button>
+          v-if="isApprove==0"
+        >删除
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['pssr:safetyValve:edit']"
+          v-if="isApprove==0"
+        >导入
+        </el-button>
       </el-col>
-        <el-col :span="1.5">
-            <el-button
-                    type="info"
-                    icon="el-icon-upload2"
-                    size="mini"
-                    @click="handleImport"
-                    v-hasPermi="['pssr:safetyValve:edit']"
-            >导入</el-button>
-        </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -240,44 +88,96 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['pssr:safetyValve:export']"
-        >导出</el-button>
+          v-if="isApprove==0"
+        >导出
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-s-promotion"
+          size="mini"
+          @click="handleApprove"
+          v-if="isApprove==0"
+          v-hasPermi="['pssr:safetyValve:edit']"
+        >发起审批
+        </el-button>
       </el-col>
-	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-check"
+          size="mini"
+          v-if="isApprove==4||isApprove==5"
+          @click="handleConfirmApprove"
+          v-hasPermi="['pssr:safetyValve:edit']"
+        >确认
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-refresh-left"
+          size="mini"
+          v-if="isApprove==2"
+          :disabled="multiple"
+          @click="handleTurnDown"
+          v-hasPermi="['pssr:safetyValve:edit']"
+        >驳回
+        </el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="safetyValveList" @selection-change="handleSelectionChange" :height="clientHeight" border>
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="唯一标识ID" align="center" prop="id" :show-overflow-tooltip="true"/>
-      <el-table-column label="从表id" align="center" prop="subId" :show-overflow-tooltip="true"/>
-      <el-table-column label="审批id" align="center" prop="approveId" :show-overflow-tooltip="true"/>
-      <el-table-column label="单元号" align="center" prop="unit" :show-overflow-tooltip="true"/>
-      <el-table-column label="P&ID图号" align="center" prop="pidNo" :show-overflow-tooltip="true"/>
-      <el-table-column label="安全阀位号" align="center" prop="devNo" :show-overflow-tooltip="true"/>
-      <el-table-column label="保护设备" align="center" prop="safetyDev" :show-overflow-tooltip="true"/>
-      <el-table-column label="已经校验" align="center" prop="verify" :show-overflow-tooltip="true"/>
-      <el-table-column label="在有效期内" align="center" prop="inValidity" :show-overflow-tooltip="true"/>
-      <el-table-column label="安装位置" align="center" prop="installLocation" :show-overflow-tooltip="true"/>
-      <el-table-column label="安装位置准确" align="center" prop="installAccuracy" :show-overflow-tooltip="true"/>
-      <el-table-column label="设定压力" align="center" prop="setPressure" :show-overflow-tooltip="true"/>
-      <el-table-column label="校验压力与设定压力一致" align="center" prop="uniformPressure" :show-overflow-tooltip="true"/>
-      <el-table-column label="确认人1" align="center" prop="confirmer1" :show-overflow-tooltip="true"/>
-      <el-table-column label="确认人2" align="center" prop="confirmer2" :show-overflow-tooltip="true"/>
-      <el-table-column label="时间" align="center" prop="confirmationTime" :show-overflow-tooltip="true"/>
-      <el-table-column label="创建人" align="center" prop="createrCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="创建时间" align="center" prop="createdate" width="100">
+    <div style="width: 100%;text-align: center;margin-bottom: 15px">
+      <h2>安全阀检查清单</h2>
+      <br>
+      <span>检查内容:所有的安全阀是否已经校验,是否在有效期内,并确认安装位置是否正确,是否投用,核对安全阀校验压力和设定压力是否一致,是(√),否(×),如有不符合要求的立即联系负责人整改。</span>
+    </div>
+
+    <el-table v-loading="loading" :data="safetyValveList" @selection-change="handleSelectionChange"
+              :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="审批状态" align="center" prop="approveStatus" :show-overflow-tooltip="true" width="105">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.approveStatus==0">未审批</el-tag>
+          <el-tag v-if="scope.row.approveStatus==1" type="warning">待确认</el-tag>
+          <el-tag v-if="scope.row.approveStatus==3" type="success">已确认1</el-tag>
+          <el-tag v-if="scope.row.approveStatus==2" type="success">已确认2</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="单元号" align="center" prop="unit" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="P&ID图号" align="center" prop="pidNo" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="安全阀位号" align="center" prop="devNo" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="保护设备" align="center" prop="safetyDev" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="已经校验" align="center" prop="verify" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="在有效期内" align="center" prop="inValidity" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="安装位置" align="center" prop="installLocation" :show-overflow-tooltip="true"
+                       width="180"/>
+      <el-table-column label="安装位置准确" align="center" prop="installAccuracy" :show-overflow-tooltip="true"
+                       width="180"/>
+      <el-table-column label="投用" align="center" prop="putUse" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="设定压力" align="center" prop="setPressure" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="校验压力与设定压力一致" align="center" prop="uniformPressure"
+                       :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="确认人1" align="center" prop="confirmer1" :show-overflow-tooltip="true" width="180">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>
+          <span>{{ userFormat(scope.row.confirmer1) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="修改人" align="center" prop="updaterCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="修改时间" align="center" prop="updatedate" width="100">
+      <el-table-column label="确认人2" align="center" prop="confirmer2" :show-overflow-tooltip="true" width="180">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.updatedate, '{y}-{m}-{d}') }}</span>
+          <span>{{ userFormat(scope.row.confirmer2) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="部门编号" align="center" prop="deptId" :show-overflow-tooltip="true"/>
-      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
-      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+      <el-table-column label="时间" align="center" prop="confirmationTime" :show-overflow-tooltip="true" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.confirmationDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="操作" align="center" fixed="right" width="120" v-if="isApprove==0"
+                       class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -285,14 +185,16 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['pssr:safetyValve:edit']"
-          >修改</el-button>
+          >修改
+          </el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['pssr:safetyValve:remove']"
-          >删除</el-button>
+          >删除
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -308,135 +210,118 @@
     <!-- 添加或修改安全设施-安全阀对话框 -->
     <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="从表id" prop="subId">
-          <el-input v-model="form.subId" placeholder="请输入从表id" />
-        </el-form-item>
-        <el-form-item label="审批id" prop="approveId">
-          <el-input v-model="form.approveId" placeholder="请输入审批id" />
-        </el-form-item>
         <el-form-item label="单元号" prop="unit">
-          <el-input v-model="form.unit" placeholder="请输入单元号" />
+          <el-input v-model="form.unit" placeholder="请输入单元号"/>
         </el-form-item>
         <el-form-item label="P&ID图号" prop="pidNo">
-          <el-input v-model="form.pidNo" placeholder="请输入P&ID图号" />
+          <el-input v-model="form.pidNo" placeholder="请输入P&ID图号"/>
         </el-form-item>
         <el-form-item label="安全阀位号" prop="devNo">
-          <el-input v-model="form.devNo" placeholder="请输入安全阀位号" />
+          <el-input v-model="form.devNo" placeholder="请输入安全阀位号"/>
         </el-form-item>
         <el-form-item label="保护设备" prop="safetyDev">
-          <el-input v-model="form.safetyDev" placeholder="请输入保护设备" />
+          <el-input v-model="form.safetyDev" placeholder="请输入保护设备"/>
         </el-form-item>
         <el-form-item label="已经校验" prop="verify">
-          <el-input v-model="form.verify" placeholder="请输入已经校验" />
+          <el-input v-model="form.verify" placeholder="请输入已经校验"/>
         </el-form-item>
         <el-form-item label="在有效期内" prop="inValidity">
-          <el-input v-model="form.inValidity" placeholder="请输入在有效期内" />
+          <el-input v-model="form.inValidity" placeholder="请输入在有效期内"/>
         </el-form-item>
         <el-form-item label="安装位置" prop="installLocation">
-          <el-input v-model="form.installLocation" placeholder="请输入安装位置" />
+          <el-input v-model="form.installLocation" placeholder="请输入安装位置"/>
         </el-form-item>
         <el-form-item label="安装位置准确" prop="installAccuracy">
-          <el-input v-model="form.installAccuracy" placeholder="请输入安装位置准确" />
+          <el-input v-model="form.installAccuracy" placeholder="请输入安装位置准确"/>
         </el-form-item>
         <el-form-item label="设定压力" prop="setPressure">
-          <el-input v-model="form.setPressure" placeholder="请输入设定压力" />
+          <el-input v-model="form.setPressure" placeholder="请输入设定压力"/>
         </el-form-item>
         <el-form-item label="校验压力与设定压力一致" prop="uniformPressure">
-          <el-input v-model="form.uniformPressure" placeholder="请输入校验压力与设定压力一致" />
+          <el-input v-model="form.uniformPressure" placeholder="请输入校验压力与设定压力一致"/>
         </el-form-item>
         <el-form-item label="确认人1" prop="confirmer1">
-          <el-input v-model="form.confirmer1" placeholder="请输入确认人1" />
+          <el-select v-model="form.confirmer1" filterable placeholder="请选择确认人1">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
         </el-form-item>
         <el-form-item label="确认人2" prop="confirmer2">
-          <el-input v-model="form.confirmer2" placeholder="请输入确认人2" />
-        </el-form-item>
-        <el-form-item label="时间" prop="confirmationTime">
-          <el-input v-model="form.confirmationTime" placeholder="请输入时间" />
-        </el-form-item>
-        <el-form-item label="删除状态" prop="delFlag">
-          <el-input v-model="form.delFlag" placeholder="请输入删除状态" />
-        </el-form-item>
-        <el-form-item label="创建人" prop="createrCode">
-          <el-input v-model="form.createrCode" placeholder="请输入创建人" />
-        </el-form-item>
-        <el-form-item label="创建时间" prop="createdate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.createdate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择创建时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="修改人" prop="updaterCode">
-          <el-input v-model="form.updaterCode" placeholder="请输入修改人" />
-        </el-form-item>
-        <el-form-item label="修改时间" prop="updatedate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.updatedate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择修改时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="部门编号" prop="deptId">
-          <el-input v-model="form.deptId" placeholder="请输入部门编号" />
+          <el-select v-model="form.confirmer2" filterable placeholder="请选择确认人2">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
         </el-form-item>
         <el-form-item label="备注" prop="remarks">
-          <el-input v-model="form.remarks" placeholder="请输入备注" />
+          <el-input v-model="form.remarks" placeholder="请输入备注"/>
         </el-form-item>
-          <el-form-item label="归属部门" prop="deptId">
-              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
-          </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-      <!-- 用户导入对话框 -->
-      <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
-          <el-upload
-                  ref="upload"
-                  :limit="1"
-                  accept=".xlsx, .xls"
-                  :headers="upload.headers"
-                  :action="upload.url + '?updateSupport=' + upload.updateSupport"
-                  :disabled="upload.isUploading"
-                  :on-progress="handleFileUploadProgress"
-                  :on-success="handleFileSuccess"
-                  :auto-upload="false"
-                  drag
-          >
-              <i class="el-icon-upload"></i>
-              <div class="el-upload__text">
-                  将文件拖到此处,或
-                  <em>点击上传</em>
-              </div>
-              <div class="el-upload__tip" slot="tip">
-                  <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
-                  <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
-              </div>
-              <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
-          </el-upload>
-          <div slot="footer" class="dialog-footer">
-              <el-button type="primary" @click="submitFileForm">确 定</el-button>
-              <el-button @click="upload.open = false">取 消</el-button>
-          </div>
-      </el-dialog>
+    <!-- 用户导入对话框 -->
+    <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px"
+               append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <el-checkbox v-model="upload.updateSupport"/>
+          是否更新已经存在的用户数据
+          <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
+        </div>
+        <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { listSafetyValve, getSafetyValve, delSafetyValve, addSafetyValve, updateSafetyValve, exportSafetyValve, importTemplate} from "@/api/pssr/safetyValve";
-import { treeselect } from "@/api/system/dept";
-import { getToken } from "@/utils/auth";
+import {
+  addSafetyValve,
+  delSafetyValve,
+  exportSafetyValve,
+  getSafetyValve,
+  importTemplate,
+  listSafetyValve,
+  updateSafetyValve
+} from "@/api/pssr/safetyValve";
+import {treeselect} from "@/api/system/dept";
+import {getToken} from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import {listUserNoPage} from "@/api/system/user";
+import {handleconfirmValve, handleturnDownValve} from "@/api/pssr/safety";
+import {doApprove} from "@/api/pssr/approve";
 
 export default {
-  dicts:['pssr_approve_status'],
+  dicts: ['pssr_approve_status'],
   name: "SafetyValve",
-  components: { Treeselect },
+  components: {Treeselect},
   props: {
     subId: {
       type: Number,
@@ -449,6 +334,7 @@ export default {
   },
   data() {
     return {
+      userOptions: [],
       // 遮罩层
       loading: true,
       // 选中数组
@@ -467,24 +353,24 @@ export default {
       title: "",
       // 部门树选项
       deptOptions: undefined,
-      clientHeight:300,
+      clientHeight: 300,
       // 是否显示弹出层
       open: false,
-        // 用户导入参数
-        upload: {
-            // 是否显示弹出层(用户导入)
-            open: false,
-            // 弹出层标题(用户导入)
-            title: "",
-            // 是否禁用上传
-            isUploading: false,
-            // 是否更新已经存在的用户数据
-            updateSupport: 0,
-            // 设置上传的请求头部
-            headers: { Authorization: "Bearer " + getToken() },
-            // 上传的地址
-            url: process.env.VUE_APP_BASE_API + "/pssr/safetyValve/importData"
-        },
+      // 用户导入参数
+      upload: {
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/pssr/safetyValve/importData"
+      },
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -514,23 +400,25 @@ export default {
       // 表单参数
       form: {},
       // 表单校验
-      rules: {
-      }
+      rules: {}
     };
   },
   watch: {
-        // 根据名称筛选部门树
-        deptName(val) {
-            this.$refs.tree.filter(val);
-        }
-   },
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
   created() {
-      //设置表格高度对应屏幕高度
-      this.$nextTick(() => {
-          this.clientHeight = document.body.clientHeight - 350
-      })
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = document.body.clientHeight - 380
+    })
     this.getList();
     this.getTreeselect();
+    listUserNoPage({}).then(res => {
+      this.userOptions = res.data
+    });
   },
   methods: {
     /** 查询安全设施-安全阀列表 */
@@ -542,12 +430,12 @@ export default {
         this.loading = false;
       });
     },
-     /** 查询部门下拉树结构 */
-     getTreeselect() {
-          treeselect().then(response => {
-              this.deptOptions = response.data;
-          });
-     },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -595,7 +483,7 @@ export default {
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
+      this.single = selection.length !== 1
       this.multiple = !selection.length
     },
     /** 新增按钮操作 */
@@ -638,56 +526,101 @@ export default {
     handleDelete(row) {
       const ids = row.id || this.ids;
       this.$confirm('是否确认删除?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delSafetyValve(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        })
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return delSafetyValve(ids);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      })
     },
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;
       this.$confirm('是否确认导出所有安全设施-安全阀数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportSafetyValve(queryParams);
-        }).then(response => {
-          this.download(response.msg);
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return exportSafetyValve(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      })
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "用户导入";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      importTemplate().then(response => {
+        this.download(response.msg);
+      });
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(response.msg, "导入结果", {dangerouslyUseHTMLString: true});
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    //发起审批
+    handleApprove() {
+      doApprove(this.subId).then(res => {
+        this.msgSuccess("已发起确认流程");
+      })
+    },
+    handleConfirmApprove() {
+      let data = {
+        ids: this.ids,
+        subId: this.subId,
+        taskType: this.isApprove
+      }
+      handleconfirmValve(data).then(res => {
+        this.msgSuccess("确认成功");
+        this.getList()
+        this.$emit('refreshHisList');
+      })
+    },
+    handleTurnDown(val) {
+      this.$prompt('请输入驳回原因', '提示', {
+        confirmButtonText: '确认驳回',
+        cancelButtonText: '取消',
+      }).then(({value}) => {
+        let data = {
+          ids: this.ids,
+          subId: this.subId,
+          remarks: value
+        }
+        handleturnDownValve(data).then(res => {
+          this.msgSuccess("驳回成功");
         })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '取消驳回'
+        });
+      });
     },
-      /** 导入按钮操作 */
-      handleImport() {
-          this.upload.title = "用户导入";
-          this.upload.open = true;
-      },
-      /** 下载模板操作 */
-      importTemplate() {
-          importTemplate().then(response => {
-              this.download(response.msg);
-          });
-      },
-      // 文件上传中处理
-      handleFileUploadProgress(event, file, fileList) {
-          this.upload.isUploading = true;
-      },
-      // 文件上传成功处理
-      handleFileSuccess(response, file, fileList) {
-          this.upload.open = false;
-          this.upload.isUploading = false;
-          this.$refs.upload.clearFiles();
-          this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
-          this.getList();
-      },
-      // 提交上传文件
-      submitFileForm() {
-          this.$refs.upload.submit();
+    userFormat(userId) {
+      for (let item of this.userOptions) {
+        if (item.userId == userId) {
+          return item.nickName
+        }
       }
+    },
   }
 };
 </script>

+ 3 - 0
ui/src/views/pssr/subitem/index.vue

@@ -237,6 +237,7 @@ export default {
     }
   },
   created() {
+    this.sn=''
     console.log(this.subId)
     console.log(this.serialNumber)
     const id = this.$route.params.subId
@@ -254,6 +255,8 @@ export default {
     }else{
       this.sn = this.serialNumber
     }
+
+    console.log("item",this.sn)
   },
   methods: {
     handleClick(tab) {