Browse Source

feat(ps): 新增巡检记录附件绑定功能并优化查询条件

- 在多个巡检控制器中引入TCommonfileService依赖
- 实现巡检记录与附件的关联更新逻辑
- 将前端查询条件中的年月输入框改为日期选择器
- 自动填充年月字段并同步到查询参数
- 重置查询时自动更新年月选择器状态
jiangbiao 3 days ago
parent
commit
0450fe47fd
39 changed files with 711 additions and 310 deletions
  1. 21 4
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionAlarmController.java
  2. 15 0
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionCabinetController.java
  3. 15 0
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionCallsystemController.java
  4. 15 0
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionCofferController.java
  5. 15 0
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionCurtainController.java
  6. 15 0
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionExtinguisherController.java
  7. 15 0
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionEyewashController.java
  8. 15 0
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionFgsController.java
  9. 15 0
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionFiredoorController.java
  10. 15 0
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionHydrantController.java
  11. 15 0
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionLiftController.java
  12. 15 0
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionMonitorController.java
  13. 15 0
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionPitController.java
  14. 15 0
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionRainvalveController.java
  15. 15 0
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionSteamController.java
  16. 15 0
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionSumpController.java
  17. 15 0
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionUtilitystationController.java
  18. 15 0
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionVentvalveController.java
  19. 15 0
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionWardrobeController.java
  20. 22 16
      ui/src/views/ps/inspection/alarm/index.vue
  21. 23 17
      ui/src/views/ps/inspection/cabinet/index.vue
  22. 22 16
      ui/src/views/ps/inspection/callsystem/index.vue
  23. 22 16
      ui/src/views/ps/inspection/coffer/index.vue
  24. 22 16
      ui/src/views/ps/inspection/curtain/index.vue
  25. 22 16
      ui/src/views/ps/inspection/extinguisher/index.vue
  26. 22 16
      ui/src/views/ps/inspection/eyewash/index.vue
  27. 22 16
      ui/src/views/ps/inspection/fgs/index.vue
  28. 22 16
      ui/src/views/ps/inspection/firedoor/index.vue
  29. 22 16
      ui/src/views/ps/inspection/hydrant/index.vue
  30. 22 16
      ui/src/views/ps/inspection/lift/index.vue
  31. 22 16
      ui/src/views/ps/inspection/monitor/index.vue
  32. 22 16
      ui/src/views/ps/inspection/pit/index.vue
  33. 22 16
      ui/src/views/ps/inspection/rainvalve/index.vue
  34. 22 16
      ui/src/views/ps/inspection/steam/index.vue
  35. 22 16
      ui/src/views/ps/inspection/sump/index.vue
  36. 22 16
      ui/src/views/ps/inspection/utilitystation/index.vue
  37. 22 16
      ui/src/views/ps/inspection/ventvalve/index.vue
  38. 22 16
      ui/src/views/ps/inspection/wardrobe/index.vue
  39. 1 1
      ui/src/views/ps/patrol/issues/index.vue

+ 21 - 4
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionAlarmController.java

@@ -6,6 +6,8 @@ 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.framework.web.page.TableDataInfo;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import com.ruoyi.project.ps.inspection.domain.TPsInspectionAlarm;
 import com.ruoyi.project.ps.inspection.service.ITPsInspectionAlarmService;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
@@ -46,6 +48,9 @@ public class TPsInspectionAlarmController extends BaseController {
     @Autowired
     private ITPsPatrolIssuesService tPsPatrolIssuesService;
 
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询手动启动火灾报警器检查记录列表
      */
@@ -176,6 +181,16 @@ public class TPsInspectionAlarmController extends BaseController {
             issues.setDevDescribe(alarm.getDevNo() + "_" + alarm.getPosition());
             issues.setStatus(0L);// 待处理
             tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
+
+            // 修改巡检记录绑定的附件
+            TCommonfile tCommonfile = new TCommonfile();
+            tCommonfile.setpType("ps-alarm");
+            tCommonfile.setpId(tPsInspectionAlarm.getId());
+            for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
+                item.setpId(entity.getId());
+                tCommonfileService.updateTCommonfile(item);
+            }
+
         } else {
             // 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
             if (alarm.getIssuesStatus() == 1) {
@@ -224,18 +239,20 @@ public class TPsInspectionAlarmController extends BaseController {
             String tempUrl = "static/word/ps/alarm.xlsx"; // 模板文件
             InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(tempUrl);
             XSSFWorkbook wb = new XSSFWorkbook(is);
-            XSSFSheet sheet1 = wb.getSheetAt(0);
+            XSSFSheet sheet = wb.getSheetAt(0);
 
             //填充数据
-            int rowIndex1 = 7;
+            int rowIndex1 = 6;
             int num1 = 1;
 
-            Row originalRow1 = sheet1.getRow(7);
+            Row originalRow1 = sheet.getRow(2);
             Cell originalcell1 = originalRow1.getCell(0);
+
+            originalRow1.getCell(0).setCellValue("年度:       年                         检查频率:1次/月(月底前完成)");
             // 获取单元格样式
             CellStyle originalStyle1 = originalcell1.getCellStyle();
             if (!list.isEmpty()) {
-                Row line1 = sheet1.getRow(0);
+                Row line1 = sheet.getRow(rowIndex1);
                 line1.getCell(0).setCellValue(list.get(0).getPlant() + "装置滚动问题清单和行动计划");
             }
         } catch (Exception e) {

+ 15 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionCabinetController.java

@@ -13,6 +13,8 @@ import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolPlan;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolIssuesService;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolPlanService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,6 +42,9 @@ public class TPsInspectionCabinetController extends BaseController {
     @Autowired
     private ITPsPatrolIssuesService tPsPatrolIssuesService;
 
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询玻璃门消火栓箱和泡沫栓箱检查记录列表
      */
@@ -174,6 +179,16 @@ public class TPsInspectionCabinetController extends BaseController {
             issues.setDevDescribe(cabinet.getBoxNo() + "_" + cabinet.getPosition());
             issues.setStatus(0L);// 待处理
             tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
+
+            // 修改巡检记录绑定的附件
+            TCommonfile tCommonfile = new TCommonfile();
+            tCommonfile.setpType("ps-cabinet");
+            tCommonfile.setpId(tPsInspectionCabinet.getId());
+            for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
+                item.setpId(entity.getId());
+                tCommonfileService.updateTCommonfile(item);
+            }
+
         } else {
             // 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
             if (cabinet.getIssuesStatus() == 1) {

+ 15 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionCallsystemController.java

@@ -13,6 +13,8 @@ import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolPlan;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolIssuesService;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolPlanService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,6 +42,9 @@ public class TPsInspectionCallsystemController extends BaseController {
     @Autowired
     private ITPsPatrolIssuesService tPsPatrolIssuesService;
 
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询现场呼叫系统检查记录列表
      */
@@ -168,6 +173,16 @@ public class TPsInspectionCallsystemController extends BaseController {
             issues.setDevDescribe(callsystem.getDevNo() + "_" + callsystem.getPosition());
             issues.setStatus(0L);// 待处理
             tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
+
+            // 修改巡检记录绑定的附件
+            TCommonfile tCommonfile = new TCommonfile();
+            tCommonfile.setpType("ps-callsystem");
+            tCommonfile.setpId(tPsInspectionCallsystem.getId());
+            for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
+                item.setpId(entity.getId());
+                tCommonfileService.updateTCommonfile(item);
+            }
+
         } else {
             // 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
             if (callsystem.getIssuesStatus() == 1) {

+ 15 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionCofferController.java

@@ -13,6 +13,8 @@ import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolPlan;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolIssuesService;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolPlanService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,6 +42,9 @@ public class TPsInspectionCofferController extends BaseController {
     @Autowired
     private ITPsPatrolIssuesService tPsPatrolIssuesService;
 
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询围堰检查记录列表
      */
@@ -168,6 +173,16 @@ public class TPsInspectionCofferController extends BaseController {
             issues.setDevDescribe(coffer.getCofferNo() + "_" + coffer.getPosition());
             issues.setStatus(0L);// 待处理
             tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
+
+            // 修改巡检记录绑定的附件
+            TCommonfile tCommonfile = new TCommonfile();
+            tCommonfile.setpType("ps-coffer");
+            tCommonfile.setpId(tPsInspectionCoffer.getId());
+            for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
+                item.setpId(entity.getId());
+                tCommonfileService.updateTCommonfile(item);
+            }
+
         } else {
             // 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
             if (coffer.getIssuesStatus() == 1) {

+ 15 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionCurtainController.java

@@ -13,6 +13,8 @@ import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolPlan;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolIssuesService;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolPlanService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,6 +42,9 @@ public class TPsInspectionCurtainController extends BaseController {
     @Autowired
     private ITPsPatrolIssuesService tPsPatrolIssuesService;
 
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询现场消防水幕检测记录列表
      */
@@ -168,6 +173,16 @@ public class TPsInspectionCurtainController extends BaseController {
             issues.setDevDescribe(curtain.getCurtainName() + "_" + curtain.getPosition());
             issues.setStatus(0L);// 待处理
             tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
+
+            // 修改巡检记录绑定的附件
+            TCommonfile tCommonfile = new TCommonfile();
+            tCommonfile.setpType("ps-curtain");
+            tCommonfile.setpId(tPsInspectionCurtain.getId());
+            for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
+                item.setpId(entity.getId());
+                tCommonfileService.updateTCommonfile(item);
+            }
+
         } else {
             // 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
             if (curtain.getIssuesStatus() == 1) {

+ 15 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionExtinguisherController.java

@@ -13,6 +13,8 @@ import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolPlan;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolIssuesService;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolPlanService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,6 +42,9 @@ public class TPsInspectionExtinguisherController extends BaseController {
     @Autowired
     private ITPsPatrolIssuesService tPsPatrolIssuesService;
 
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询现场灭火器检查记录列表
      */
@@ -173,6 +178,16 @@ public class TPsInspectionExtinguisherController extends BaseController {
             issues.setDevDescribe(extinguisher.getFireExtinguisherNo() + "_" + extinguisher.getPosition());
             issues.setStatus(0L);// 待处理
             tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
+
+            // 修改巡检记录绑定的附件
+            TCommonfile tCommonfile = new TCommonfile();
+            tCommonfile.setpType("ps-extinguisher");
+            tCommonfile.setpId(tPsInspectionExtinguisher.getId());
+            for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
+                item.setpId(entity.getId());
+                tCommonfileService.updateTCommonfile(item);
+            }
+
         } else {
             // 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
             if (extinguisher.getIssuesStatus() == 1) {

+ 15 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionEyewashController.java

@@ -13,6 +13,8 @@ import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolPlan;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolIssuesService;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolPlanService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,6 +42,9 @@ public class TPsInspectionEyewashController extends BaseController {
     @Autowired
     private ITPsPatrolIssuesService tPsPatrolIssuesService;
 
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询洗眼器巡检记录列表
      */
@@ -176,6 +181,16 @@ public class TPsInspectionEyewashController extends BaseController {
             issues.setDevDescribe(eyewash.getDevNo());
             issues.setStatus(0L);// 待处理
             tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
+
+            // 修改巡检记录绑定的附件
+            TCommonfile tCommonfile = new TCommonfile();
+            tCommonfile.setpType("ps-eyewash");
+            tCommonfile.setpId(tPsInspectionEyewash.getId());
+            for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
+                item.setpId(entity.getId());
+                tCommonfileService.updateTCommonfile(item);
+            }
+
         } else {
             // 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
             if (eyewash.getIssuesStatus() == 1) {

+ 15 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionFgsController.java

@@ -13,6 +13,8 @@ import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolPlan;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolIssuesService;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolPlanService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,6 +42,9 @@ public class TPsInspectionFgsController extends BaseController {
     @Autowired
     private ITPsPatrolIssuesService tPsPatrolIssuesService;
 
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询FGS Mini板检查记录列表
      */
@@ -168,6 +173,16 @@ public class TPsInspectionFgsController extends BaseController {
             issues.setDevDescribe(fgs.getFgsNo() + "_" + fgs.getPosition());
             issues.setStatus(0L);// 待处理
             tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
+
+            // 修改巡检记录绑定的附件
+            TCommonfile tCommonfile = new TCommonfile();
+            tCommonfile.setpType("ps-fgs");
+            tCommonfile.setpId(tPsInspectionFgs.getId());
+            for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
+                item.setpId(entity.getId());
+                tCommonfileService.updateTCommonfile(item);
+            }
+
         } else {
             // 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
             if (fgs.getIssuesStatus() == 1) {

+ 15 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionFiredoorController.java

@@ -13,6 +13,8 @@ import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolPlan;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolIssuesService;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolPlanService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,6 +42,9 @@ public class TPsInspectionFiredoorController extends BaseController {
     @Autowired
     private ITPsPatrolIssuesService tPsPatrolIssuesService;
 
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询安全防火门防爆门检查记录列表
      */
@@ -169,6 +174,16 @@ public class TPsInspectionFiredoorController extends BaseController {
             issues.setDevDescribe(firedoor.getDoorNo() + "_" + firedoor.getPosition());
             issues.setStatus(0L);// 待处理
             tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
+
+            // 修改巡检记录绑定的附件
+            TCommonfile tCommonfile = new TCommonfile();
+            tCommonfile.setpType("ps-firedoor");
+            tCommonfile.setpId(tPsInspectionFiredoor.getId());
+            for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
+                item.setpId(entity.getId());
+                tCommonfileService.updateTCommonfile(item);
+            }
+
         } else {
             // 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
             if (firedoor.getIssuesStatus() == 1) {

+ 15 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionHydrantController.java

@@ -13,6 +13,8 @@ import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolPlan;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolIssuesService;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolPlanService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,6 +42,9 @@ public class TPsInspectionHydrantController extends BaseController {
     @Autowired
     private ITPsPatrolIssuesService tPsPatrolIssuesService;
 
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询地上消火栓和消防水带箱检查记录列表
      */
@@ -172,6 +177,16 @@ public class TPsInspectionHydrantController extends BaseController {
             issues.setDevDescribe(hydrant.getEquipId() + "_" + hydrant.getPosition());
             issues.setStatus(0L);// 待处理
             tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
+
+            // 修改巡检记录绑定的附件
+            TCommonfile tCommonfile = new TCommonfile();
+            tCommonfile.setpType("ps-hydrant");
+            tCommonfile.setpId(tPsInspectionHydrant.getId());
+            for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
+                item.setpId(entity.getId());
+                tCommonfileService.updateTCommonfile(item);
+            }
+
         } else {
             // 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
             if (hydrant.getIssuesStatus() == 1) {

+ 15 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionLiftController.java

@@ -13,6 +13,8 @@ import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolPlan;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolIssuesService;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolPlanService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,6 +42,9 @@ public class TPsInspectionLiftController extends BaseController {
     @Autowired
     private ITPsPatrolIssuesService tPsPatrolIssuesService;
 
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询电梯检查记录列表
      */
@@ -170,6 +175,16 @@ public class TPsInspectionLiftController extends BaseController {
             issues.setDevDescribe(lift.getDevNo() + "_" + lift.getPosition());
             issues.setStatus(0L);// 待处理
             tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
+
+            // 修改巡检记录绑定的附件
+            TCommonfile tCommonfile = new TCommonfile();
+            tCommonfile.setpType("ps-lift");
+            tCommonfile.setpId(tPsInspectionLift.getId());
+            for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
+                item.setpId(entity.getId());
+                tCommonfileService.updateTCommonfile(item);
+            }
+
         } else {
             // 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
             if (lift.getIssuesStatus() == 1) {

+ 15 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionMonitorController.java

@@ -13,6 +13,8 @@ import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolPlan;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolIssuesService;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolPlanService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,6 +42,9 @@ public class TPsInspectionMonitorController extends BaseController {
     @Autowired
     private ITPsPatrolIssuesService tPsPatrolIssuesService;
 
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询现场消防炮检查记录列表
      */
@@ -169,6 +174,16 @@ public class TPsInspectionMonitorController extends BaseController {
             issues.setDevDescribe(monitor.getDevNo() + "_" + monitor.getPosition());
             issues.setStatus(0L);// 待处理
             tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
+
+            // 修改巡检记录绑定的附件
+            TCommonfile tCommonfile = new TCommonfile();
+            tCommonfile.setpType("ps-monitor");
+            tCommonfile.setpId(tPsInspectionMonitor.getId());
+            for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
+                item.setpId(entity.getId());
+                tCommonfileService.updateTCommonfile(item);
+            }
+
         } else {
             // 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
             if (monitor.getIssuesStatus() == 1) {

+ 15 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionPitController.java

@@ -13,6 +13,8 @@ import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolPlan;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolIssuesService;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolPlanService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,6 +42,9 @@ public class TPsInspectionPitController extends BaseController {
     @Autowired
     private ITPsPatrolIssuesService tPsPatrolIssuesService;
 
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询现场地井检查记录列表
      */
@@ -167,6 +172,16 @@ public class TPsInspectionPitController extends BaseController {
             issues.setDevDescribe(pit.getDevNo() + "_" + pit.getPosition());
             issues.setStatus(0L);// 待处理
             tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
+
+            // 修改巡检记录绑定的附件
+            TCommonfile tCommonfile = new TCommonfile();
+            tCommonfile.setpType("ps-pit");
+            tCommonfile.setpId(tPsInspectionPit.getId());
+            for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
+                item.setpId(entity.getId());
+                tCommonfileService.updateTCommonfile(item);
+            }
+
         } else {
             // 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
             if (pit.getIssuesStatus() == 1) {

+ 15 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionRainvalveController.java

@@ -13,6 +13,8 @@ import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolPlan;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolIssuesService;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolPlanService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,6 +42,9 @@ public class TPsInspectionRainvalveController extends BaseController {
     @Autowired
     private ITPsPatrolIssuesService tPsPatrolIssuesService;
 
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询污水/雨排切换阀门检查列表
      */
@@ -167,6 +172,16 @@ public class TPsInspectionRainvalveController extends BaseController {
             issues.setDevDescribe(rainvalve.getValveName() + "_" + rainvalve.getPosition());
             issues.setStatus(0L);// 待处理
             tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
+
+            // 修改巡检记录绑定的附件
+            TCommonfile tCommonfile = new TCommonfile();
+            tCommonfile.setpType("ps-rainvalve");
+            tCommonfile.setpId(tPsInspectionRainvalve.getId());
+            for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
+                item.setpId(entity.getId());
+                tCommonfileService.updateTCommonfile(item);
+            }
+
         } else {
             // 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
             if (rainvalve.getIssuesStatus() == 1) {

+ 15 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionSteamController.java

@@ -13,6 +13,8 @@ import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolPlan;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolIssuesService;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolPlanService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,6 +42,9 @@ public class TPsInspectionSteamController extends BaseController {
     @Autowired
     private ITPsPatrolIssuesService tPsPatrolIssuesService;
 
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询消防蒸汽系统检查记录列表
      */
@@ -168,6 +173,16 @@ public class TPsInspectionSteamController extends BaseController {
             issues.setDevDescribe(steam.getSteamName() + "_" + steam.getPosition());
             issues.setStatus(0L);// 待处理
             tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
+
+            // 修改巡检记录绑定的附件
+            TCommonfile tCommonfile = new TCommonfile();
+            tCommonfile.setpType("ps-steam");
+            tCommonfile.setpId(tPsInspectionSteam.getId());
+            for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
+                item.setpId(entity.getId());
+                tCommonfileService.updateTCommonfile(item);
+            }
+
         } else {
             // 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
             if (steam.getIssuesStatus() == 1) {

+ 15 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionSumpController.java

@@ -13,6 +13,8 @@ import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolPlan;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolIssuesService;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolPlanService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,6 +42,9 @@ public class TPsInspectionSumpController extends BaseController {
     @Autowired
     private ITPsPatrolIssuesService tPsPatrolIssuesService;
 
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询雨排井检查记录列表
      */
@@ -168,6 +173,16 @@ public class TPsInspectionSumpController extends BaseController {
             issues.setDevDescribe(sump.getSumpNo() + "_" + sump.getPosition());
             issues.setStatus(0L);// 待处理
             tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
+
+            // 修改巡检记录绑定的附件
+            TCommonfile tCommonfile = new TCommonfile();
+            tCommonfile.setpType("ps-sump");
+            tCommonfile.setpId(tPsInspectionSump.getId());
+            for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
+                item.setpId(entity.getId());
+                tCommonfileService.updateTCommonfile(item);
+            }
+
         } else {
             // 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
             if (sump.getIssuesStatus() == 1) {

+ 15 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionUtilitystationController.java

@@ -13,6 +13,8 @@ import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolPlan;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolIssuesService;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolPlanService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,6 +42,9 @@ public class TPsInspectionUtilitystationController extends BaseController {
     @Autowired
     private ITPsPatrolIssuesService tPsPatrolIssuesService;
 
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询公用站检查记录列表
      */
@@ -169,6 +174,16 @@ public class TPsInspectionUtilitystationController extends BaseController {
             issues.setDevDescribe(utilitystation.getUtilityStationName() + "_" + utilitystation.getPosition());
             issues.setStatus(0L);// 待处理
             tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
+
+            // 修改巡检记录绑定的附件
+            TCommonfile tCommonfile = new TCommonfile();
+            tCommonfile.setpType("ps-utilitystation");
+            tCommonfile.setpId(tPsInspectionUtilitystation.getId());
+            for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
+                item.setpId(entity.getId());
+                tCommonfileService.updateTCommonfile(item);
+            }
+
         } else {
             // 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
             if (utilitystation.getIssuesStatus() == 1) {

+ 15 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionVentvalveController.java

@@ -13,6 +13,8 @@ import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolPlan;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolIssuesService;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolPlanService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,6 +42,9 @@ public class TPsInspectionVentvalveController extends BaseController {
     @Autowired
     private ITPsPatrolIssuesService tPsPatrolIssuesService;
 
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询余压阀检查记录列表
      */
@@ -168,6 +173,16 @@ public class TPsInspectionVentvalveController extends BaseController {
             issues.setDevDescribe(ventvalve.getVentvalveNo() + "_" + ventvalve.getPosition());
             issues.setStatus(0L);// 待处理
             tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
+
+            // 修改巡检记录绑定的附件
+            TCommonfile tCommonfile = new TCommonfile();
+            tCommonfile.setpType("ps-ventvalve");
+            tCommonfile.setpId(tPsInspectionVentvalve.getId());
+            for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
+                item.setpId(entity.getId());
+                tCommonfileService.updateTCommonfile(item);
+            }
+
         } else {
             // 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
             if (ventvalve.getIssuesStatus() == 1) {

+ 15 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionWardrobeController.java

@@ -13,6 +13,8 @@ import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolPlan;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolIssuesService;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolPlanService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -39,6 +41,9 @@ public class TPsInspectionWardrobeController extends BaseController {
     @Autowired
     private ITPsPatrolIssuesService tPsPatrolIssuesService;
 
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询应急物资柜列表
      */
@@ -170,6 +175,16 @@ public class TPsInspectionWardrobeController extends BaseController {
             issues.setDevDescribe(wardrobe.getPpeType());
             issues.setStatus(0L);// 待处理
             tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
+
+            // 修改巡检记录绑定的附件
+            TCommonfile tCommonfile = new TCommonfile();
+            tCommonfile.setpType("ps-wardrobe");
+            tCommonfile.setpId(tPsInspectionWardrobe.getId());
+            for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
+                item.setpId(entity.getId());
+                tCommonfileService.updateTCommonfile(item);
+            }
+
         } else {
             // 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
             if (wardrobe.getIssuesStatus() == 1) {

+ 22 - 16
ui/src/views/ps/inspection/alarm/index.vue

@@ -19,22 +19,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="月度" prop="month">
-        <el-input
-          v-model="queryParams.month"
-          placeholder="请输入月度"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="年度" prop="year">
-        <el-input
-          v-model="queryParams.year"
-          placeholder="请输入年度"
+      <el-form-item label="年月" prop="yearMonth">
+        <el-date-picker
+          v-model="queryParams.yearMonth"
+          type="month"
+          placeholder="选择年月"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
+          value-format="yyyy-MM"
+          style="width: 150px"
+          @change="handleYearMonthChange"
         />
       </el-form-item>
       <el-form-item label="巡检计划" prop="planId">
@@ -199,8 +193,9 @@ export default {
         confirmer: null,
         checkStatus: null,
         checkDate: null,
-        month: null,
-        year: null,
+        month: String(new Date().getMonth() + 1).padStart(2, '0'),
+        year: String(new Date().getFullYear()),
+        yearMonth: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
         createrCode: null,
         createdate: null,
         updaterCode: null,
@@ -311,6 +306,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.handleYearMonthChange(this.queryParams.yearMonth);
       this.handleQuery();
     },
     // 多选框选中数据
@@ -331,6 +327,16 @@ export default {
       }).then(response => {
         this.download(response.msg);
       })
+    },
+    /** 年月选择器变化事件 */
+    handleYearMonthChange(val) {
+      if (val) {
+        this.queryParams.year = val.substring(0, 4);
+        this.queryParams.month = val.substring(5, 7);
+      } else {
+        this.queryParams.year = null;
+        this.queryParams.month = null;
+      }
     }
   }
 };

+ 23 - 17
ui/src/views/ps/inspection/cabinet/index.vue

@@ -28,22 +28,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="月度" prop="month">
-        <el-input
-          v-model="queryParams.month"
-          placeholder="请输入月度"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="年度" prop="year">
-        <el-input
-          v-model="queryParams.year"
-          placeholder="请输入年度"
+      <el-form-item label="年月" prop="yearMonth">
+        <el-date-picker
+          v-model="queryParams.yearMonth"
+          type="month"
+          placeholder="选择年月"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
+          value-format="yyyy-MM"
+          style="width: 150px"
+          @change="handleYearMonthChange"
         />
       </el-form-item>
       <el-form-item label="巡检计划" prop="planId">
@@ -221,8 +215,9 @@ export default {
         confirmer: null,
         checkStatus: null,
         checkDate: null,
-        month: null,
-        year: null,
+        month: String(new Date().getMonth() + 1).padStart(2, '0'),
+        year: String(new Date().getFullYear()),
+        yearMonth: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
         createrCode: null,
         createdate: null,
         updaterCode: null,
@@ -345,6 +340,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.handleYearMonthChange(this.queryParams.yearMonth);
       this.handleQuery();
     },
     // 多选框选中数据
@@ -366,7 +362,17 @@ export default {
       }).then(response => {
         this.download(response.msg);
       })
-    },
+  },
+    /** 年月选择器变化事件 */
+    handleYearMonthChange(val) {
+      if (val) {
+        this.queryParams.year = val.substring(0, 4);
+        this.queryParams.month = val.substring(5, 7);
+      } else {
+        this.queryParams.year = null;
+        this.queryParams.month = null;
+      }
+    }
 
   }
 };

+ 22 - 16
ui/src/views/ps/inspection/callsystem/index.vue

@@ -19,22 +19,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="月度" prop="month">
-        <el-input
-          v-model="queryParams.month"
-          placeholder="请输入月度"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="年度" prop="year">
-        <el-input
-          v-model="queryParams.year"
-          placeholder="请输入年度"
+      <el-form-item label="年月" prop="yearMonth">
+        <el-date-picker
+          v-model="queryParams.yearMonth"
+          type="month"
+          placeholder="选择年月"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
+          value-format="yyyy-MM"
+          style="width: 150px"
+          @change="handleYearMonthChange"
         />
       </el-form-item>
       <el-form-item label="巡检计划" prop="planId">
@@ -205,8 +199,9 @@ export default {
         confirmer: null,
         checkStatus: null,
         checkDate: null,
-        month: null,
-        year: null,
+        month: String(new Date().getMonth() + 1).padStart(2, '0'),
+        year: String(new Date().getFullYear()),
+        yearMonth: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
         createrCode: null,
         createdate: null,
         updaterCode: null,
@@ -324,6 +319,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.handleYearMonthChange(this.queryParams.yearMonth);
       this.handleQuery();
     },
     // 多选框选中数据
@@ -346,6 +342,16 @@ export default {
         this.download(response.msg);
       })
     },
+    /** 年月选择器变化事件 */
+    handleYearMonthChange(val) {
+      if (val) {
+        this.queryParams.year = val.substring(0, 4);
+        this.queryParams.month = val.substring(5, 7);
+      } else {
+        this.queryParams.year = null;
+        this.queryParams.month = null;
+      }
+    }
 
   }
 };

+ 22 - 16
ui/src/views/ps/inspection/coffer/index.vue

@@ -19,22 +19,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="月度" prop="month">
-        <el-input
-          v-model="queryParams.month"
-          placeholder="请输入月度"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="年度" prop="year">
-        <el-input
-          v-model="queryParams.year"
-          placeholder="请输入年度"
+      <el-form-item label="年月" prop="yearMonth">
+        <el-date-picker
+          v-model="queryParams.yearMonth"
+          type="month"
+          placeholder="选择年月"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
+          value-format="yyyy-MM"
+          style="width: 150px"
+          @change="handleYearMonthChange"
         />
       </el-form-item>
       <el-form-item label="巡检计划" prop="planId">
@@ -205,8 +199,9 @@ export default {
         confirmer: null,
         checkStatus: null,
         checkDate: null,
-        month: null,
-        year: null,
+        month: String(new Date().getMonth() + 1).padStart(2, '0'),
+        year: String(new Date().getFullYear()),
+        yearMonth: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
         createrCode: null,
         createdate: null,
         updaterCode: null,
@@ -324,6 +319,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.handleYearMonthChange(this.queryParams.yearMonth);
       this.handleQuery();
     },
     // 多选框选中数据
@@ -346,6 +342,16 @@ export default {
         this.download(response.msg);
       })
     },
+    /** 年月选择器变化事件 */
+    handleYearMonthChange(val) {
+      if (val) {
+        this.queryParams.year = val.substring(0, 4);
+        this.queryParams.month = val.substring(5, 7);
+      } else {
+        this.queryParams.year = null;
+        this.queryParams.month = null;
+      }
+    }
 
   }
 };

+ 22 - 16
ui/src/views/ps/inspection/curtain/index.vue

@@ -19,22 +19,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="月度" prop="month">
-        <el-input
-          v-model="queryParams.month"
-          placeholder="请输入月度"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="年度" prop="year">
-        <el-input
-          v-model="queryParams.year"
-          placeholder="请输入年度"
+      <el-form-item label="年月" prop="yearMonth">
+        <el-date-picker
+          v-model="queryParams.yearMonth"
+          type="month"
+          placeholder="选择年月"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
+          value-format="yyyy-MM"
+          style="width: 150px"
+          @change="handleYearMonthChange"
         />
       </el-form-item>
       <el-form-item label="巡检计划" prop="planId">
@@ -205,8 +199,9 @@ export default {
         confirmer: null,
         checkStatus: null,
         checkDate: null,
-        month: null,
-        year: null,
+        month: String(new Date().getMonth() + 1).padStart(2, '0'),
+        year: String(new Date().getFullYear()),
+        yearMonth: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
         createrCode: null,
         createdate: null,
         updaterCode: null,
@@ -324,6 +319,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.handleYearMonthChange(this.queryParams.yearMonth);
       this.handleQuery();
     },
     // 多选框选中数据
@@ -346,6 +342,16 @@ export default {
         this.download(response.msg);
       })
     },
+    /** 年月选择器变化事件 */
+    handleYearMonthChange(val) {
+      if (val) {
+        this.queryParams.year = val.substring(0, 4);
+        this.queryParams.month = val.substring(5, 7);
+      } else {
+        this.queryParams.year = null;
+        this.queryParams.month = null;
+      }
+    }
 
   }
 };

+ 22 - 16
ui/src/views/ps/inspection/extinguisher/index.vue

@@ -19,22 +19,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="月度" prop="month">
-        <el-input
-          v-model="queryParams.month"
-          placeholder="请输入月度"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="年度" prop="year">
-        <el-input
-          v-model="queryParams.year"
-          placeholder="请输入年度"
+      <el-form-item label="年月" prop="yearMonth">
+        <el-date-picker
+          v-model="queryParams.yearMonth"
+          type="month"
+          placeholder="选择年月"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
+          value-format="yyyy-MM"
+          style="width: 150px"
+          @change="handleYearMonthChange"
         />
       </el-form-item>
       <el-form-item label="周期" prop="rate">
@@ -245,8 +239,9 @@ export default {
         confirmer: null,
         checkStatus: null,
         checkDate: null,
-        month: null,
-        year: null,
+        month: String(new Date().getMonth() + 1).padStart(2, '0'),
+        year: String(new Date().getFullYear()),
+        yearMonth: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
         createrCode: null,
         createdate: null,
         updaterCode: null,
@@ -363,6 +358,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.handleYearMonthChange(this.queryParams.yearMonth);
       this.handleQuery();
     },
     // 多选框选中数据
@@ -383,6 +379,16 @@ export default {
       }).then(response => {
         this.download(response.msg);
       })
+    },
+    /** 年月选择器变化事件 */
+    handleYearMonthChange(val) {
+      if (val) {
+        this.queryParams.year = val.substring(0, 4);
+        this.queryParams.month = val.substring(5, 7);
+      } else {
+        this.queryParams.year = null;
+        this.queryParams.month = null;
+      }
     }
   }
 };

+ 22 - 16
ui/src/views/ps/inspection/eyewash/index.vue

@@ -10,22 +10,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="月度" prop="month">
-        <el-input
-          v-model="queryParams.month"
-          placeholder="请输入月度"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="年度" prop="year">
-        <el-input
-          v-model="queryParams.year"
-          placeholder="请输入年度"
+      <el-form-item label="年月" prop="yearMonth">
+        <el-date-picker
+          v-model="queryParams.yearMonth"
+          type="month"
+          placeholder="选择年月"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
+          value-format="yyyy-MM"
+          style="width: 150px"
+          @change="handleYearMonthChange"
         />
       </el-form-item>
       <el-form-item label="巡检计划" prop="planId">
@@ -258,8 +252,9 @@ export default {
         confirmer: null,
         checkStatus: null,
         checkDate: null,
-        month: null,
-        year: null,
+        month: String(new Date().getMonth() + 1).padStart(2, '0'),
+        year: String(new Date().getFullYear()),
+        yearMonth: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
         createrCode: null,
         createdate: null,
         updaterCode: null,
@@ -376,6 +371,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.handleYearMonthChange(this.queryParams.yearMonth);
       this.handleQuery();
     },
     // 多选框选中数据
@@ -398,6 +394,16 @@ export default {
         this.download(response.msg);
       })
     },
+    /** 年月选择器变化事件 */
+    handleYearMonthChange(val) {
+      if (val) {
+        this.queryParams.year = val.substring(0, 4);
+        this.queryParams.month = val.substring(5, 7);
+      } else {
+        this.queryParams.year = null;
+        this.queryParams.month = null;
+      }
+    }
 
   }
 };

+ 22 - 16
ui/src/views/ps/inspection/fgs/index.vue

@@ -19,22 +19,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="月度" prop="month">
-        <el-input
-          v-model="queryParams.month"
-          placeholder="请输入月度"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="年度" prop="year">
-        <el-input
-          v-model="queryParams.year"
-          placeholder="请输入年度"
+      <el-form-item label="年月" prop="yearMonth">
+        <el-date-picker
+          v-model="queryParams.yearMonth"
+          type="month"
+          placeholder="选择年月"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
+          value-format="yyyy-MM"
+          style="width: 150px"
+          @change="handleYearMonthChange"
         />
       </el-form-item>
       <el-form-item label="巡检计划" prop="planId">
@@ -201,8 +195,9 @@ export default {
         confirmer: null,
         checkStatus: null,
         checkDate: null,
-        month: null,
-        year: null,
+        month: String(new Date().getMonth() + 1).padStart(2, '0'),
+        year: String(new Date().getFullYear()),
+        yearMonth: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
         createrCode: null,
         createdate: null,
         updaterCode: null,
@@ -319,6 +314,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.handleYearMonthChange(this.queryParams.yearMonth);
       this.handleQuery();
     },
     // 多选框选中数据
@@ -341,6 +337,16 @@ export default {
         this.download(response.msg);
       })
     },
+    /** 年月选择器变化事件 */
+    handleYearMonthChange(val) {
+      if (val) {
+        this.queryParams.year = val.substring(0, 4);
+        this.queryParams.month = val.substring(5, 7);
+      } else {
+        this.queryParams.year = null;
+        this.queryParams.month = null;
+      }
+    }
 
   }
 };

+ 22 - 16
ui/src/views/ps/inspection/firedoor/index.vue

@@ -28,22 +28,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="月度" prop="month">
-        <el-input
-          v-model="queryParams.month"
-          placeholder="请输入月度"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="年度" prop="year">
-        <el-input
-          v-model="queryParams.year"
-          placeholder="请输入年度"
+      <el-form-item label="年月" prop="yearMonth">
+        <el-date-picker
+          v-model="queryParams.yearMonth"
+          type="month"
+          placeholder="选择年月"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
+          value-format="yyyy-MM"
+          style="width: 150px"
+          @change="handleYearMonthChange"
         />
       </el-form-item>
       <el-form-item label="巡检计划" prop="planId">
@@ -215,8 +209,9 @@ export default {
         confirmer: null,
         checkStatus: null,
         checkDate: null,
-        month: null,
-        year: null,
+        month: String(new Date().getMonth() + 1).padStart(2, '0'),
+        year: String(new Date().getFullYear()),
+        yearMonth: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
         createrCode: null,
         createdate: null,
         updaterCode: null,
@@ -333,6 +328,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.handleYearMonthChange(this.queryParams.yearMonth);
       this.handleQuery();
     },
     // 多选框选中数据
@@ -353,6 +349,16 @@ export default {
       }).then(response => {
         this.download(response.msg);
       })
+    },
+    /** 年月选择器变化事件 */
+    handleYearMonthChange(val) {
+      if (val) {
+        this.queryParams.year = val.substring(0, 4);
+        this.queryParams.month = val.substring(5, 7);
+      } else {
+        this.queryParams.year = null;
+        this.queryParams.month = null;
+      }
     }
   }
 };

+ 22 - 16
ui/src/views/ps/inspection/hydrant/index.vue

@@ -19,22 +19,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="月度" prop="month">
-        <el-input
-          v-model="queryParams.month"
-          placeholder="请输入月度"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="年度" prop="year">
-        <el-input
-          v-model="queryParams.year"
-          placeholder="请输入年度"
+      <el-form-item label="年月" prop="yearMonth">
+        <el-date-picker
+          v-model="queryParams.yearMonth"
+          type="month"
+          placeholder="选择年月"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
+          value-format="yyyy-MM"
+          style="width: 150px"
+          @change="handleYearMonthChange"
         />
       </el-form-item>
       <el-form-item label="巡检计划" prop="planId">
@@ -213,8 +207,9 @@ export default {
         confirmer: null,
         checkStatus: null,
         checkDate: null,
-        month: null,
-        year: null,
+        month: String(new Date().getMonth() + 1).padStart(2, '0'),
+        year: String(new Date().getFullYear()),
+        yearMonth: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
         createrCode: null,
         createdate: null,
         updaterCode: null,
@@ -331,6 +326,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.handleYearMonthChange(this.queryParams.yearMonth);
       this.handleQuery();
     },
     // 多选框选中数据
@@ -351,6 +347,16 @@ export default {
       }).then(response => {
         this.download(response.msg);
       })
+    },
+    /** 年月选择器变化事件 */
+    handleYearMonthChange(val) {
+      if (val) {
+        this.queryParams.year = val.substring(0, 4);
+        this.queryParams.month = val.substring(5, 7);
+      } else {
+        this.queryParams.year = null;
+        this.queryParams.month = null;
+      }
     }
   }
 };

+ 22 - 16
ui/src/views/ps/inspection/lift/index.vue

@@ -19,22 +19,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="月度" prop="month">
-        <el-input
-          v-model="queryParams.month"
-          placeholder="请输入月度"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="年度" prop="year">
-        <el-input
-          v-model="queryParams.year"
-          placeholder="请输入年度"
+      <el-form-item label="年月" prop="yearMonth">
+        <el-date-picker
+          v-model="queryParams.yearMonth"
+          type="month"
+          placeholder="选择年月"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
+          value-format="yyyy-MM"
+          style="width: 150px"
+          @change="handleYearMonthChange"
         />
       </el-form-item>
       <el-form-item label="巡检计划" prop="planId">
@@ -216,8 +210,9 @@ export default {
         confirmer: null,
         checkStatus: null,
         checkDate: null,
-        month: null,
-        year: null,
+        month: String(new Date().getMonth() + 1).padStart(2, '0'),
+        year: String(new Date().getFullYear()),
+        yearMonth: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
         createrCode: null,
         createdate: null,
         updaterCode: null,
@@ -334,6 +329,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.handleYearMonthChange(this.queryParams.yearMonth);
       this.handleQuery();
     },
     // 多选框选中数据
@@ -354,6 +350,16 @@ export default {
       }).then(response => {
         this.download(response.msg);
       })
+    },
+    /** 年月选择器变化事件 */
+    handleYearMonthChange(val) {
+      if (val) {
+        this.queryParams.year = val.substring(0, 4);
+        this.queryParams.month = val.substring(5, 7);
+      } else {
+        this.queryParams.year = null;
+        this.queryParams.month = null;
+      }
     }
   }
 };

+ 22 - 16
ui/src/views/ps/inspection/monitor/index.vue

@@ -19,22 +19,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="月度" prop="month">
-        <el-input
-          v-model="queryParams.month"
-          placeholder="请输入月度"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="年度" prop="year">
-        <el-input
-          v-model="queryParams.year"
-          placeholder="请输入年度"
+      <el-form-item label="年月" prop="yearMonth">
+        <el-date-picker
+          v-model="queryParams.yearMonth"
+          type="month"
+          placeholder="选择年月"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
+          value-format="yyyy-MM"
+          style="width: 150px"
+          @change="handleYearMonthChange"
         />
       </el-form-item>
       <el-form-item label="巡检计划" prop="planId">
@@ -207,8 +201,9 @@ export default {
         confirmer: null,
         checkStatus: null,
         checkDate: null,
-        month: null,
-        year: null,
+        month: String(new Date().getMonth() + 1).padStart(2, '0'),
+        year: String(new Date().getFullYear()),
+        yearMonth: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
         createrCode: null,
         createdate: null,
         updaterCode: null,
@@ -325,6 +320,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.handleYearMonthChange(this.queryParams.yearMonth);
       this.handleQuery();
     },
     // 多选框选中数据
@@ -347,6 +343,16 @@ export default {
         this.download(response.msg);
       })
     },
+    /** 年月选择器变化事件 */
+    handleYearMonthChange(val) {
+      if (val) {
+        this.queryParams.year = val.substring(0, 4);
+        this.queryParams.month = val.substring(5, 7);
+      } else {
+        this.queryParams.year = null;
+        this.queryParams.month = null;
+      }
+    }
 
   }
 };

+ 22 - 16
ui/src/views/ps/inspection/pit/index.vue

@@ -19,22 +19,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="月度" prop="month">
-        <el-input
-          v-model="queryParams.month"
-          placeholder="请输入月度"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="年度" prop="year">
-        <el-input
-          v-model="queryParams.year"
-          placeholder="请输入年度"
+      <el-form-item label="年月" prop="yearMonth">
+        <el-date-picker
+          v-model="queryParams.yearMonth"
+          type="month"
+          placeholder="选择年月"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
+          value-format="yyyy-MM"
+          style="width: 150px"
+          @change="handleYearMonthChange"
         />
       </el-form-item>
       <el-form-item label="巡检计划" prop="planId">
@@ -199,8 +193,9 @@ export default {
         confirmer: null,
         checkStatus: null,
         checkDate: null,
-        month: null,
-        year: null,
+        month: String(new Date().getMonth() + 1).padStart(2, '0'),
+        year: String(new Date().getFullYear()),
+        yearMonth: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
         createrCode: null,
         createdate: null,
         updaterCode: null,
@@ -317,6 +312,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.handleYearMonthChange(this.queryParams.yearMonth);
       this.handleQuery();
     },
     // 多选框选中数据
@@ -339,6 +335,16 @@ export default {
         this.download(response.msg);
       })
     },
+    /** 年月选择器变化事件 */
+    handleYearMonthChange(val) {
+      if (val) {
+        this.queryParams.year = val.substring(0, 4);
+        this.queryParams.month = val.substring(5, 7);
+      } else {
+        this.queryParams.year = null;
+        this.queryParams.month = null;
+      }
+    }
 
   }
 };

+ 22 - 16
ui/src/views/ps/inspection/rainvalve/index.vue

@@ -19,22 +19,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="月度" prop="month">
-        <el-input
-          v-model="queryParams.month"
-          placeholder="请输入月度"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="年度" prop="year">
-        <el-input
-          v-model="queryParams.year"
-          placeholder="请输入年度"
+      <el-form-item label="年月" prop="yearMonth">
+        <el-date-picker
+          v-model="queryParams.yearMonth"
+          type="month"
+          placeholder="选择年月"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
+          value-format="yyyy-MM"
+          style="width: 150px"
+          @change="handleYearMonthChange"
         />
       </el-form-item>
       <el-form-item label="巡检计划" prop="planId">
@@ -195,8 +189,9 @@ export default {
         confirmer: null,
         checkStatus: null,
         checkDate: null,
-        month: null,
-        year: null,
+        month: String(new Date().getMonth() + 1).padStart(2, '0'),
+        year: String(new Date().getFullYear()),
+        yearMonth: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
         createrCode: null,
         createdate: null,
         updaterCode: null,
@@ -313,6 +308,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.handleYearMonthChange(this.queryParams.yearMonth);
       this.handleQuery();
     },
     // 多选框选中数据
@@ -335,6 +331,16 @@ export default {
         this.download(response.msg);
       })
     },
+    /** 年月选择器变化事件 */
+    handleYearMonthChange(val) {
+      if (val) {
+        this.queryParams.year = val.substring(0, 4);
+        this.queryParams.month = val.substring(5, 7);
+      } else {
+        this.queryParams.year = null;
+        this.queryParams.month = null;
+      }
+    }
 
   }
 };

+ 22 - 16
ui/src/views/ps/inspection/steam/index.vue

@@ -19,22 +19,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="月度" prop="month">
-        <el-input
-          v-model="queryParams.month"
-          placeholder="请输入月度"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="年度" prop="year">
-        <el-input
-          v-model="queryParams.year"
-          placeholder="请输入年度"
+      <el-form-item label="年月" prop="yearMonth">
+        <el-date-picker
+          v-model="queryParams.yearMonth"
+          type="month"
+          placeholder="选择年月"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
+          value-format="yyyy-MM"
+          style="width: 150px"
+          @change="handleYearMonthChange"
         />
       </el-form-item>
       <el-form-item label="巡检计划" prop="planId">
@@ -205,8 +199,9 @@ export default {
         confirmer: null,
         checkStatus: null,
         checkDate: null,
-        month: null,
-        year: null,
+        month: String(new Date().getMonth() + 1).padStart(2, '0'),
+        year: String(new Date().getFullYear()),
+        yearMonth: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
         createrCode: null,
         createdate: null,
         updaterCode: null,
@@ -323,6 +318,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.handleYearMonthChange(this.queryParams.yearMonth);
       this.handleQuery();
     },
     // 多选框选中数据
@@ -345,6 +341,16 @@ export default {
         this.download(response.msg);
       })
     },
+    /** 年月选择器变化事件 */
+    handleYearMonthChange(val) {
+      if (val) {
+        this.queryParams.year = val.substring(0, 4);
+        this.queryParams.month = val.substring(5, 7);
+      } else {
+        this.queryParams.year = null;
+        this.queryParams.month = null;
+      }
+    }
 
   }
 };

+ 22 - 16
ui/src/views/ps/inspection/sump/index.vue

@@ -19,22 +19,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="月度" prop="month">
-        <el-input
-          v-model="queryParams.month"
-          placeholder="请输入月度"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="年度" prop="year">
-        <el-input
-          v-model="queryParams.year"
-          placeholder="请输入年度"
+      <el-form-item label="年月" prop="yearMonth">
+        <el-date-picker
+          v-model="queryParams.yearMonth"
+          type="month"
+          placeholder="选择年月"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
+          value-format="yyyy-MM"
+          style="width: 150px"
+          @change="handleYearMonthChange"
         />
       </el-form-item>
       <el-form-item label="巡检计划" prop="planId">
@@ -205,8 +199,9 @@ export default {
         confirmer: null,
         checkStatus: null,
         checkDate: null,
-        month: null,
-        year: null,
+        month: String(new Date().getMonth() + 1).padStart(2, '0'),
+        year: String(new Date().getFullYear()),
+        yearMonth: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
         createrCode: null,
         createdate: null,
         updaterCode: null,
@@ -323,6 +318,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.handleYearMonthChange(this.queryParams.yearMonth);
       this.handleQuery();
     },
     // 多选框选中数据
@@ -345,6 +341,16 @@ export default {
         this.download(response.msg);
       })
     },
+    /** 年月选择器变化事件 */
+    handleYearMonthChange(val) {
+      if (val) {
+        this.queryParams.year = val.substring(0, 4);
+        this.queryParams.month = val.substring(5, 7);
+      } else {
+        this.queryParams.year = null;
+        this.queryParams.month = null;
+      }
+    }
 
   }
 };

+ 22 - 16
ui/src/views/ps/inspection/utilitystation/index.vue

@@ -19,22 +19,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="月度" prop="month">
-        <el-input
-          v-model="queryParams.month"
-          placeholder="请输入月度"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="年度" prop="year">
-        <el-input
-          v-model="queryParams.year"
-          placeholder="请输入年度"
+      <el-form-item label="年月" prop="yearMonth">
+        <el-date-picker
+          v-model="queryParams.yearMonth"
+          type="month"
+          placeholder="选择年月"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
+          value-format="yyyy-MM"
+          style="width: 150px"
+          @change="handleYearMonthChange"
         />
       </el-form-item>
       <el-form-item label="巡检计划" prop="planId">
@@ -211,8 +205,9 @@ export default {
         confirmer: null,
         checkStatus: null,
         checkDate: null,
-        month: null,
-        year: null,
+        month: String(new Date().getMonth() + 1).padStart(2, '0'),
+        year: String(new Date().getFullYear()),
+        yearMonth: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
         createrCode: null,
         createdate: null,
         updaterCode: null,
@@ -329,6 +324,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.handleYearMonthChange(this.queryParams.yearMonth);
       this.handleQuery();
     },
     // 多选框选中数据
@@ -351,6 +347,16 @@ export default {
         this.download(response.msg);
       })
     },
+    /** 年月选择器变化事件 */
+    handleYearMonthChange(val) {
+      if (val) {
+        this.queryParams.year = val.substring(0, 4);
+        this.queryParams.month = val.substring(5, 7);
+      } else {
+        this.queryParams.year = null;
+        this.queryParams.month = null;
+      }
+    }
 
   }
 };

+ 22 - 16
ui/src/views/ps/inspection/ventvalve/index.vue

@@ -19,22 +19,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="月度" prop="month">
-        <el-input
-          v-model="queryParams.month"
-          placeholder="请输入月度"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="年度" prop="year">
-        <el-input
-          v-model="queryParams.year"
-          placeholder="请输入年度"
+      <el-form-item label="年月" prop="yearMonth">
+        <el-date-picker
+          v-model="queryParams.yearMonth"
+          type="month"
+          placeholder="选择年月"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
+          value-format="yyyy-MM"
+          style="width: 150px"
+          @change="handleYearMonthChange"
         />
       </el-form-item>
       <el-form-item label="巡检计划" prop="planId">
@@ -205,8 +199,9 @@ export default {
         confirmer: null,
         checkStatus: null,
         checkDate: null,
-        month: null,
-        year: null,
+        month: String(new Date().getMonth() + 1).padStart(2, '0'),
+        year: String(new Date().getFullYear()),
+        yearMonth: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
         createrCode: null,
         createdate: null,
         updaterCode: null,
@@ -323,6 +318,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.handleYearMonthChange(this.queryParams.yearMonth);
       this.handleQuery();
     },
     // 多选框选中数据
@@ -345,6 +341,16 @@ export default {
         this.download(response.msg);
       })
     },
+    /** 年月选择器变化事件 */
+    handleYearMonthChange(val) {
+      if (val) {
+        this.queryParams.year = val.substring(0, 4);
+        this.queryParams.month = val.substring(5, 7);
+      } else {
+        this.queryParams.year = null;
+        this.queryParams.month = null;
+      }
+    }
 
   }
 };

+ 22 - 16
ui/src/views/ps/inspection/wardrobe/index.vue

@@ -10,22 +10,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="月度" prop="month">
-        <el-input
-          v-model="queryParams.month"
-          placeholder="请输入月度"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="年度" prop="year">
-        <el-input
-          v-model="queryParams.year"
-          placeholder="请输入年度"
+      <el-form-item label="年月" prop="yearMonth">
+        <el-date-picker
+          v-model="queryParams.yearMonth"
+          type="month"
+          placeholder="选择年月"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
+          value-format="yyyy-MM"
+          style="width: 150px"
+          @change="handleYearMonthChange"
         />
       </el-form-item>
       <el-form-item label="巡检计划" prop="planId">
@@ -227,8 +221,9 @@ export default {
         pageSize: 20,
         ppeType: null,
         wardrobeType: '1',
-        month: null,
-        year: null,
+        month: String(new Date().getMonth() + 1).padStart(2, '0'),
+        year: String(new Date().getFullYear()),
+        yearMonth: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
         planId: null
       },
       // 表单参数
@@ -355,6 +350,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.handleYearMonthChange(this.queryParams.yearMonth);
       this.handleQuery();
     },
     /** 标签页点击事件 */
@@ -457,6 +453,16 @@ export default {
     // 提交上传文件
     submitFileForm() {
       this.$refs.upload.submit();
+    },
+    /** 年月选择器变化事件 */
+    handleYearMonthChange(val) {
+      if (val) {
+        this.queryParams.year = val.substring(0, 4);
+        this.queryParams.month = val.substring(5, 7);
+      } else {
+        this.queryParams.year = null;
+        this.queryParams.month = null;
+      }
     }
   }
 };

+ 1 - 1
ui/src/views/ps/patrol/issues/index.vue

@@ -266,7 +266,7 @@ export default {
           break;
         case '19':
           this.$router.push({
-            path: '/ps-patrol/inspection/',
+            path: '/ps-patrol/inspection/wardrobe',
             query: {id: id}
           });
           break;