jiangbiao 2 роки тому
батько
коміт
6262ad5b38
24 змінених файлів з 781 додано та 76 видалено
  1. 1 1
      master/src/main/java/com/ruoyi/common/utils/file/ExcelUtils.java
  2. 3 3
      master/src/main/java/com/ruoyi/project/base/domain/TBasePoint.java
  3. 203 29
      master/src/main/java/com/ruoyi/project/check/controller/TCheckCheckpointsController.java
  4. 22 3
      master/src/main/java/com/ruoyi/project/check/domain/TCheckCheckpoints.java
  5. 1 0
      master/src/main/java/com/ruoyi/project/check/mapper/TCheckCheckpointsMapper.java
  6. 2 0
      master/src/main/java/com/ruoyi/project/check/mapper/TCheckLawitemsMapper.java
  7. 1 0
      master/src/main/java/com/ruoyi/project/check/service/ITCheckCheckpointsService.java
  8. 1 0
      master/src/main/java/com/ruoyi/project/check/service/ITCheckLawitemsService.java
  9. 5 0
      master/src/main/java/com/ruoyi/project/check/service/impl/TCheckCheckpointsServiceImpl.java
  10. 5 0
      master/src/main/java/com/ruoyi/project/check/service/impl/TCheckLawitemsServiceImpl.java
  11. 6 3
      master/src/main/java/com/ruoyi/project/task/controller/TTaskInspectionPlanController.java
  12. 3 0
      master/src/main/java/com/ruoyi/web/controller/common/CommonController.java
  13. 1 1
      master/src/main/resources/mybatis/base/TBasePlantMapper.xml
  14. 58 1
      master/src/main/resources/mybatis/check/TCheckCheckpointsMapper.xml
  15. 2 0
      master/src/main/resources/mybatis/check/TCheckEnvironmentMapper.xml
  16. 5 0
      master/src/main/resources/mybatis/check/TCheckLawitemsMapper.xml
  17. BIN
      master/src/main/resources/static/template/check/checkPoints.xlsx
  18. 18 1
      ui/src/assets/styles/element-ui.scss
  19. 3 3
      ui/src/views/base/point/index.vue
  20. 4 4
      ui/src/views/check/environment/index.vue
  21. 12 1
      ui/src/views/check/inspectionCheck/index.vue
  22. 406 0
      ui/src/views/check/inspectionCheck/pointEnter.vue
  23. 1 20
      ui/src/views/task/inspection/dividePoint.vue
  24. 18 6
      ui/src/views/task/inspection/index.vue

+ 1 - 1
master/src/main/java/com/ruoyi/common/utils/file/ExcelUtils.java

@@ -86,7 +86,7 @@ public class ExcelUtils {
             case "NUMERIC":
                 logger.info("Excel数据样式:"+ cell.getCellStyle().getDataFormatString());
                 if("General".equals(cell.getCellStyle().getDataFormatString())){
-                    cellValue = new BigDecimal(cell.getNumericCellValue()).toPlainString();
+                    cellValue = new BigDecimal(String.valueOf(cell.getNumericCellValue())).toPlainString();
                 }else if("m/d/yyyy;@".equals(cell.getCellStyle().getDataFormatString())){
                     cellValue =  new SimpleDateFormat("yyyy-MM-dd").format(cell.getDateCellValue());
                 }else if("@".equals(cell.getCellStyle().getDataFormatString())){

+ 3 - 3
master/src/main/java/com/ruoyi/project/base/domain/TBasePoint.java

@@ -27,7 +27,7 @@ public class TBasePoint extends BaseEntity {
      * 检测净值
      */
     @Excel(name = "检测净值")
-    private Integer netTestValue;
+    private String netTestValue;
 
     /**
      * 泄漏程度
@@ -348,11 +348,11 @@ public class TBasePoint extends BaseEntity {
         return pointId;
     }
 
-    public void setNetTestValue(Integer netTestValue) {
+    public void setNetTestValue(String netTestValue) {
         this.netTestValue = netTestValue;
     }
 
-    public Integer getNetTestValue() {
+    public String getNetTestValue() {
         return netTestValue;
     }
 

+ 203 - 29
master/src/main/java/com/ruoyi/project/check/controller/TCheckCheckpointsController.java

@@ -1,25 +1,48 @@
 package com.ruoyi.project.check.controller;
 
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-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.alibaba.fastjson2.JSON;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.file.ExcelUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.project.base.domain.TBasePlant;
+import com.ruoyi.project.base.domain.TBasePoint;
+import com.ruoyi.project.base.service.ITBasePlantService;
+import com.ruoyi.project.base.service.ITBasePointService;
 import com.ruoyi.project.check.domain.TCheckCheckpoints;
+import com.ruoyi.project.check.domain.TCheckEnvironment;
+import com.ruoyi.project.check.domain.TCheckLawitems;
+import com.ruoyi.project.check.mapper.TCheckEnvironmentMapper;
 import com.ruoyi.project.check.service.ITCheckCheckpointsService;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.project.check.service.ITCheckEnvironmentService;
+import com.ruoyi.project.check.service.ITCheckLawitemsService;
+import com.ruoyi.project.task.domain.TTaskInspection;
+import com.ruoyi.project.task.service.ITTaskInspectionService;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.atomic.AtomicInteger;
 
 /**
  * 检测点Controller
@@ -29,18 +52,29 @@ import com.ruoyi.common.core.page.TableDataInfo;
  */
 @RestController
 @RequestMapping("/check/checkpoints")
-public class TCheckCheckpointsController extends BaseController
-{
+public class TCheckCheckpointsController extends BaseController {
     @Autowired
     private ITCheckCheckpointsService tCheckCheckpointsService;
 
+    @Autowired
+    private ITCheckEnvironmentService tCheckEnvironmentService;
+
+    @Autowired
+    private ITBasePointService tBasePointService;
+
+    @Autowired
+    private ITTaskInspectionService taskInspectionService;
+
+    @Autowired
+    private ITCheckLawitemsService tCheckLawitemsService;
+
+
     /**
      * 查询检测点列表
      */
 //    @PreAuthorize("@ss.hasPermi('check:checkpoints:list')")
     @GetMapping("/list")
-    public TableDataInfo list(TCheckCheckpoints tCheckCheckpoints)
-    {
+    public TableDataInfo list(TCheckCheckpoints tCheckCheckpoints) {
         startPage();
         List<TCheckCheckpoints> list = tCheckCheckpointsService.selectTCheckCheckpointsList(tCheckCheckpoints);
         return getDataTable(list);
@@ -52,8 +86,7 @@ public class TCheckCheckpointsController extends BaseController
 //    @PreAuthorize("@ss.hasPermi('check:checkpoints:export')")
     @Log(title = "检测点", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, TCheckCheckpoints tCheckCheckpoints)
-    {
+    public void export(HttpServletResponse response, TCheckCheckpoints tCheckCheckpoints) {
         List<TCheckCheckpoints> list = tCheckCheckpointsService.selectTCheckCheckpointsList(tCheckCheckpoints);
         ExcelUtil<TCheckCheckpoints> util = new ExcelUtil<TCheckCheckpoints>(TCheckCheckpoints.class);
         util.exportExcel(response, list, "检测点数据");
@@ -64,8 +97,7 @@ public class TCheckCheckpointsController extends BaseController
      */
 //    @PreAuthorize("@ss.hasPermi('check:checkpoints:query')")
     @GetMapping(value = "/{checkId}")
-    public AjaxResult getInfo(@PathVariable("checkId") Long checkId)
-    {
+    public AjaxResult getInfo(@PathVariable("checkId") Long checkId) {
         return AjaxResult.success(tCheckCheckpointsService.selectTCheckCheckpointsByCheckId(checkId));
     }
 
@@ -75,8 +107,7 @@ public class TCheckCheckpointsController extends BaseController
 //    @PreAuthorize("@ss.hasPermi('check:checkpoints:add')")
     @Log(title = "检测点", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody TCheckCheckpoints tCheckCheckpoints)
-    {
+    public AjaxResult add(@RequestBody TCheckCheckpoints tCheckCheckpoints) {
         return toAjax(tCheckCheckpointsService.insertTCheckCheckpoints(tCheckCheckpoints));
     }
 
@@ -86,8 +117,7 @@ public class TCheckCheckpointsController extends BaseController
 //    @PreAuthorize("@ss.hasPermi('check:checkpoints:edit')")
     @Log(title = "检测点", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody TCheckCheckpoints tCheckCheckpoints)
-    {
+    public AjaxResult edit(@RequestBody TCheckCheckpoints tCheckCheckpoints) {
         return toAjax(tCheckCheckpointsService.updateTCheckCheckpointsByCheckIds(tCheckCheckpoints));
     }
 
@@ -96,9 +126,153 @@ public class TCheckCheckpointsController extends BaseController
      */
 //    @PreAuthorize("@ss.hasPermi('check:checkpoints:remove')")
     @Log(title = "检测点", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{checkIds}")
-    public AjaxResult remove(@PathVariable Long[] checkIds)
-    {
+    @DeleteMapping("/{checkIds}")
+    public AjaxResult remove(@PathVariable Long[] checkIds) {
         return toAjax(tCheckCheckpointsService.deleteTCheckCheckpointsByCheckIds(checkIds));
     }
+
+    @Log(title = "检测数据录入", businessType = BusinessType.INSERT)
+    @PostMapping("/importData/{inspectionId}")
+    public AjaxResult importData(@RequestParam("file") MultipartFile file, @PathVariable Long inspectionId) throws IOException {
+        //获取操作人员ID
+        Long userId = getUserId();
+        //报错行数统计
+        CopyOnWriteArrayList<Integer> failRow = new CopyOnWriteArrayList<>();
+        Workbook workbook = ExcelUtils.getWorkBook(file);
+        Sheet sheet = workbook.getSheetAt(0);
+        List<TCheckCheckpoints> list = new ArrayList<>();
+        int rowNum = sheet.getPhysicalNumberOfRows();
+        //线程池
+        ExecutorService executorService = Executors.newFixedThreadPool(1);
+        final CountDownLatch latch = new CountDownLatch(rowNum - 1); //相同线程数量的计数
+        AtomicInteger failNumber = new AtomicInteger();
+
+        List<TCheckLawitems> tCheckLawitems = tCheckLawitemsService.selectTCheckLawitemsByLawStatus();
+        AtomicInteger successNumber = new AtomicInteger();
+        for (int i = 1; i < rowNum; i++) {
+            int finalI = i;
+            executorService.execute(() -> {
+                try {
+                    logger.info("读取行数:" + finalI);
+                    Row row = sheet.getRow(finalI);
+                    int cellNum = row.getLastCellNum();
+                    TCheckCheckpoints entity = new TCheckCheckpoints();
+                    for (int j = 0; j < cellNum; j++) {
+                        Cell cell = row.getCell(j);
+                        if (cell == null) {
+                            continue;
+                        }
+                        String cellValue = ExcelUtils.getCellValue(cell);
+                        logger.info("cellValue:" + cellValue);
+                        if (j == 0) {
+                            //装置名称
+                            entity.setPlantName(cellValue);
+                        } else if (j == 1) {
+                            //群组编号
+                            entity.setGroupCode(cellValue);
+                        } else if (j == 2) {
+                            // 密封点扩展编码
+                            entity.setExtendCode(cellValue);
+                        } else if (j == 3) {
+                            //检测值
+                            entity.setTestValue(cellValue);
+                        } else if (j == 4) {
+                            // 泄露部位
+                            entity.setLeakagePosition(cellValue);
+                        } else if (j == 5) {
+                            //检测仪器编号
+                            entity.setInstrumentCode(cellValue);
+                        } else if (j == 6) {
+                            // 检测人员
+                            entity.setChecker(cellValue);
+                        } else if (j == 7) {
+                            // 检测日期
+                            SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
+                            entity.setCheckDate(sdf.parse(cellValue));
+                        }
+                    }
+                    entity.setUpdatedate(new Date());
+                    entity.setUpdaterCode(userId);
+                    TCheckEnvironment environment = new TCheckEnvironment();
+                    environment.setPlantName(entity.getPlantName());
+                    environment.setInstrumentCode(entity.getInstrumentCode());
+                    environment.setTestTime(entity.getCheckDate());
+                    List<TCheckEnvironment> tCheckEnvironments = tCheckEnvironmentService.selectTCheckEnvironmentList(environment);
+                    if (CollectionUtils.isEmpty(tCheckEnvironments)) {
+                        logger.info("环境本底值数据不存在");
+                        failRow.add(finalI + 1);
+                        throw new InterruptedException();//中止线程
+                    } else {
+                        TCheckEnvironment tCheckEnvironment = null;
+                        String netTest = null;
+                        try {
+                            tCheckEnvironment = tCheckEnvironments.get(0);
+                            BigDecimal back = new BigDecimal(tCheckEnvironment.getBackgroundValue());// 当天的环境本底值
+                            BigDecimal test = new BigDecimal(entity.getTestValue());// 当天检测值
+                            // 计算净检测值
+                            netTest = test.subtract(back).setScale(2, RoundingMode.HALF_UP).toString();
+                            entity.setNetTestValue(netTest);
+                        } catch (Exception e) {
+                            logger.info("计算本底值错误");
+                            failRow.add(finalI + 1);
+                            throw new InterruptedException();//中止线程
+                        }
+                        entity.setInstrumentCode(tCheckEnvironment.getInstrumentCode());// 仪器编号
+                        entity.setInstrumentId(tCheckEnvironment.getInstrumentId());// 仪器id
+                        entity.setInspectionId(inspectionId);// 任务id
+                        entity.setApproveStatus(0l);// 任务id
+                        int upload = tCheckCheckpointsService.updateTCheckCheckpointsByUpload(entity); //更新检测点数据
+                        TCheckCheckpoints tCheckCheckpoint = tCheckCheckpointsService.selectTCheckCheckpointsList(entity).get(0);
+                        for (TCheckLawitems tCheckLawitem : tCheckLawitems) {
+                            if (tCheckLawitem.getPlantType().equals(tCheckCheckpoint.getPlantType())
+                                    && tCheckLawitem.getPointType().equals(tCheckCheckpoint.getPointType())
+                                    && tCheckLawitem.getMediumType().equals(tCheckCheckpoint.getMediumType())) {
+                                if (new BigDecimal(netTest).compareTo(new BigDecimal(tCheckLawitem.getSerious())) >= 0) {
+                                    //如果净检测值大于等于当前匹配法规的严重泄漏标准
+                                    entity.setLeakageDegree("3");
+                                } else if (new BigDecimal(netTest).compareTo(new BigDecimal(tCheckLawitem.getGeneral())) >= 0) {
+                                    //如果净检测值大于等于当前匹配法规的一般泄漏标准
+                                    entity.setLeakageDegree("2");
+                                } else {
+                                    //如果净检测值小于当前匹配法规的一般泄漏标准
+                                    entity.setLeakageDegree("1");
+                                }
+                            }
+                        }
+                        upload = tCheckCheckpointsService.updateTCheckCheckpointsByUpload(entity); //更新检测点数据
+                        if (upload == 1) {
+                            TBasePoint tBasePoint = new TBasePoint();
+                            tBasePoint.setPointId(tCheckCheckpoint.getPointId());
+                            tBasePoint.setNetTestValue(netTest);
+                            tBasePoint.setLeakageDegree(entity.getLeakageDegree());
+                            tBasePointService.updateTBasePoint(tBasePoint);// 更新密封点数据
+                            successNumber.getAndIncrement();
+                        } else {
+                            logger.info("数据不存在");
+                            failRow.add(finalI + 1);
+                            throw new InterruptedException();//中止线程
+                        }
+                    }
+                } catch (InterruptedException e) {
+                    logger.info("中止线程" + Thread.currentThread().getName());
+                } catch (Exception e) {
+                    failRow.add(finalI + 1);
+                    e.printStackTrace();
+                } finally {
+                    latch.countDown(); //线程计数
+                }
+            });
+        }
+        try {
+            latch.await(); //线程计数完毕后继续执行
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+        executorService.shutdown();
+        logger.info("list:" + JSON.toJSONString(list));
+        logger.info("successNumber:" + successNumber);
+        logger.info("failNumber:" + failRow.size());
+        logger.info("failRow:" + failRow);
+        return AjaxResult.success(String.valueOf(successNumber.get()), failRow);
+    }
 }

+ 22 - 3
master/src/main/java/com/ruoyi/project/check/domain/TCheckCheckpoints.java

@@ -134,7 +134,7 @@ public class TCheckCheckpoints extends BaseEntity {
      * 校准日期
      */
     @Excel(name = "校准日期")
-    private String checkDate;
+    private Date checkDate;
 
     /**
      * 泄漏程度
@@ -201,9 +201,28 @@ public class TCheckCheckpoints extends BaseEntity {
     @TableField(exist = false)
     private String choose;
 
+    private String plantType;
+    private String mediumType;
+
     @TableField(exist = false)
     private Long[] checkIds;
 
+    public String getMediumType() {
+        return mediumType;
+    }
+
+    public void setMediumType(String mediumType) {
+        this.mediumType = mediumType;
+    }
+
+    public String getPlantType() {
+        return plantType;
+    }
+
+    public void setPlantType(String plantType) {
+        this.plantType = plantType;
+    }
+
     public Long[] getCheckIds() {
         return checkIds;
     }
@@ -380,11 +399,11 @@ public class TCheckCheckpoints extends BaseEntity {
         return checker;
     }
 
-    public void setCheckDate(String checkDate) {
+    public void setCheckDate(Date checkDate) {
         this.checkDate = checkDate;
     }
 
-    public String getCheckDate() {
+    public Date getCheckDate() {
         return checkDate;
     }
 

+ 1 - 0
master/src/main/java/com/ruoyi/project/check/mapper/TCheckCheckpointsMapper.java

@@ -44,6 +44,7 @@ public interface TCheckCheckpointsMapper
      */
     public int updateTCheckCheckpoints(TCheckCheckpoints tCheckCheckpoints);
     public int updateTCheckCheckpointsByCheckIds(TCheckCheckpoints tCheckCheckpoints);
+    public int updateTCheckCheckpointsByUpload(TCheckCheckpoints tCheckCheckpoints);
 
     /**
      * 删除检测点

+ 2 - 0
master/src/main/java/com/ruoyi/project/check/mapper/TCheckLawitemsMapper.java

@@ -18,6 +18,8 @@ public interface TCheckLawitemsMapper
      * @return 法规项
      */
     public TCheckLawitems selectTCheckLawitemsById(Long id);
+    public List<TCheckLawitems> selectTCheckLawitemsByLawStatus();
+
 
     /**
      * 查询法规项列表

+ 1 - 0
master/src/main/java/com/ruoyi/project/check/service/ITCheckCheckpointsService.java

@@ -44,6 +44,7 @@ public interface ITCheckCheckpointsService
      * @return 结果
      */
     public int updateTCheckCheckpoints(TCheckCheckpoints tCheckCheckpoints);
+    public int updateTCheckCheckpointsByUpload(TCheckCheckpoints tCheckCheckpoints);
     public int updateTCheckCheckpointsByCheckIds(TCheckCheckpoints tCheckCheckpoints);
 
     /**

+ 1 - 0
master/src/main/java/com/ruoyi/project/check/service/ITCheckLawitemsService.java

@@ -18,6 +18,7 @@ public interface ITCheckLawitemsService
      * @return 法规项
      */
     public TCheckLawitems selectTCheckLawitemsById(Long id);
+    public List<TCheckLawitems> selectTCheckLawitemsByLawStatus();
 
     /**
      * 查询法规项列表

+ 5 - 0
master/src/main/java/com/ruoyi/project/check/service/impl/TCheckCheckpointsServiceImpl.java

@@ -72,6 +72,11 @@ public class TCheckCheckpointsServiceImpl implements ITCheckCheckpointsService
         return tCheckCheckpointsMapper.updateTCheckCheckpoints(tCheckCheckpoints);
     }
     @Override
+    public int updateTCheckCheckpointsByUpload(TCheckCheckpoints tCheckCheckpoints)
+    {
+        return tCheckCheckpointsMapper.updateTCheckCheckpointsByUpload(tCheckCheckpoints);
+    }
+    @Override
     public int updateTCheckCheckpointsByCheckIds(TCheckCheckpoints tCheckCheckpoints)
     {
         return tCheckCheckpointsMapper.updateTCheckCheckpointsByCheckIds(tCheckCheckpoints);

+ 5 - 0
master/src/main/java/com/ruoyi/project/check/service/impl/TCheckLawitemsServiceImpl.java

@@ -30,6 +30,11 @@ public class TCheckLawitemsServiceImpl implements ITCheckLawitemsService
     {
         return tCheckLawitemsMapper.selectTCheckLawitemsById(id);
     }
+    @Override
+    public List<TCheckLawitems> selectTCheckLawitemsByLawStatus()
+    {
+        return tCheckLawitemsMapper.selectTCheckLawitemsByLawStatus();
+    }
 
     /**
      * 查询法规项列表

+ 6 - 3
master/src/main/java/com/ruoyi/project/task/controller/TTaskInspectionPlanController.java

@@ -169,10 +169,11 @@ public class TTaskInspectionPlanController extends BaseController {
             tTaskInspectionPlan.setStartTime(new Date());
             // 统计当前装置下的所有(动)密封点
             QueryWrapper<TBasePoint> points = new QueryWrapper<TBasePoint>().eq("plant_id", tBasePlant.getPlantId()).eq("del_flag", 0).eq("approve_status", 2);
+
             // TODO: 当1、3季度时需要加上动密封点的判断
-//            if (nowQuarter == 1 && nowQuarter == 3) {
-//                points.in("point_type","");
-//            }
+            if (nowQuarter == 1 && nowQuarter == 3) {
+//                points.in("point_type",);
+            }
             Integer count = tBasePointMapper.selectCount(points);
             tTaskInspectionPlan.setPointNum(count.toString());
             tTaskInspectionPlan.setCreaterCode(getUserId());
@@ -208,6 +209,8 @@ public class TTaskInspectionPlanController extends BaseController {
                 tCheckCheckpoint.setCreatedate(new Date());
                 tCheckCheckpoint.setUpdaterCode(getUserId());
                 tCheckCheckpoint.setUpdatedate(new Date());
+                tCheckCheckpoint.setPlantType(tBasePlant.getPlantType());
+                tCheckCheckpoint.setMediumType(tBasePoint.getMediumType());
                 tCheckCheckpoints.add(tCheckCheckpoint);
             }
             if (CollectionUtils.isNotEmpty(tCheckCheckpoints))

+ 3 - 0
master/src/main/java/com/ruoyi/web/controller/common/CommonController.java

@@ -58,6 +58,9 @@ public class CommonController
         }else if ( type.equals("calibration") ) {
             downloadname = "LDAR仪器校准信息.xlsx";
             url = "static/template/base/calibration.xlsx";
+        }else if ( type.equals("checkPoint") ) {
+            downloadname = "LDAR检测复测信息.xlsx";
+            url = "static/template/check/checkPoints.xlsx";
         }
         InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(url);
 

+ 1 - 1
master/src/main/resources/mybatis/base/TBasePlantMapper.xml

@@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
 
     <select id="selectAllPlantName" resultMap="TBasePlantResult">
-        select d.plant_id,d.plant_name from t_base_plant d where del_flag=0 and approve_status=2
+        select d.plant_id,d.plant_name,d.plant_type from t_base_plant d where del_flag=0 and approve_status=2
     </select>
 
     <select id="selectTBasePlantList" parameterType="TBasePlant" resultMap="TBasePlantResult">

+ 58 - 1
master/src/main/resources/mybatis/check/TCheckCheckpointsMapper.xml

@@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
 
     <select id="selectTCheckCheckpointsList" parameterType="TCheckCheckpoints" resultMap="TCheckCheckpointsResult">
-        select d.check_id,d.point_id, d.instrument_id, d.inspection_id, d.test_value, d.net_test_value, d.plant_id,d.plant_name,
+        select d.medium_type,d.plant_type,d.check_id,d.point_id, d.instrument_id, d.inspection_id, d.test_value, d.net_test_value, d.plant_id,d.plant_name,
         d.region_id, d.layer, d.dev_id, d.group_code, d.extend_code, d.point_type, d.instrument_code,
         leakage_position, d.checker, d.check_date, d.leakage_degree, d.remarks, d.approve_status, d.approve_time, d.dept_id, d.del_flag,
         d.creater_code, d.createdate, d.updater_code, d.updatedate,br.region_name,bd.dev_code,bd.dev_describe as dev_name from t_check_checkpoints d
@@ -51,6 +51,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         left join t_base_device bd on d.dev_id = bd.dev_id
         <where>
             <if test="pointId != null "> and d.point_id = #{pointId}</if>
+            <if test="instrumentId != null "> and d.instrument_id = #{instrumentId}</if>
+            <if test="inspectionId != null "> and d.inspection_id = #{inspectionId}</if>
+            <if test="testValue != null  and testValue != ''"> and d.test_value = #{testValue}</if>
+            <if test="netTestValue != null  and netTestValue != ''"> and d.net_test_value = #{netTestValue}</if>
+            <if test="plantId != null  and plantId != ''"> and d.plant_id = #{plantId}</if>
+            <if test="plantName != null  and plantName != ''"> and d.plant_name like concat('%', #{plantName}, '%')</if>
+            <if test="regionId != null  and regionId != ''"> and d.region_id= #{regionId}</if>
+            <if test="regionName != null  and regionName != ''"> and d.region_name like concat('%', #{regionName}, '%')</if>
+            <if test="layer != null  and layer != ''"> and d.layer = #{layer}</if>
+            <if test="devId != null  and devId != ''"> and d.dev_id =  #{devId}</if>
+            <if test="devName != null  and devName != ''"> and d.dev_name like concat('%', #{devName}, '%')</if>
+            <if test="devCode != null  and devCode != ''"> and d.dev_code = #{devCode}</if>
+            <if test="groupCode != null  and groupCode != ''"> and d.group_code = #{groupCode}</if>
+            <if test="extendCode != null  and extendCode != ''"> and d.extend_code = #{extendCode}</if>
+            <if test="pointType != null  and pointType != ''"> and d.point_type = #{pointType}</if>
+            <if test="instrumentCode != null  and instrumentCode != ''"> and d.instrument_code = #{instrumentCode}</if>
+            <if test="leakagePosition != null  and leakagePosition != ''"> and d.leakage_position = #{leakagePosition}</if>
+            <if test="checker != null  and checker != ''"> and d.checker = #{checker}</if>
+            <if test="checkDate != null "> and d.check_date = #{checkDate}</if>
+            <if test="leakageDegree != null  and leakageDegree != ''"> and d.leakage_degree = #{leakageDegree}</if>
+            <if test="remarks != null  and remarks != ''"> and d.remarks = #{remarks}</if>
+            <if test="approveStatus != null "> and d.approve_status = #{approveStatus}</if>
+            <if test="approveTime != null "> and d.approve_time = #{approveTime}</if>
+            <if test="deptId != null "> and d.dept_id = #{deptId}</if>
+            <if test="choose != null "> and d.inspection_id is null</if>
+        and d.del_flag = 0
+        </where>
+    </select>
+
+    <select id="selectPointsByPlantNameGroupCodeAndExtendCode" parameterType="TCheckCheckpoints" resultMap="TCheckCheckpointsResult">
+        select *from t_check_checkpoints d
+        <where>
             <if test="instrumentId != null "> and d.instrument_id = #{instrumentId}</if>
             <if test="inspectionId != null "> and d.inspection_id = #{inspectionId}</if>
             <if test="testValue != null  and testValue != ''"> and d.test_value = #{testValue}</if>
@@ -122,6 +154,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createdate != null">createdate,</if>
             <if test="updaterCode != null">updater_code,</if>
             <if test="updatedate != null">updatedate,</if>
+            <if test="plantType != null">plant_type,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="pointId != null">#{pointId},</if>
@@ -154,6 +187,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createdate != null">#{createdate},</if>
             <if test="updaterCode != null">#{updaterCode},</if>
             <if test="updatedate != null">#{updatedate},</if>
+            <if test="plantType != null">#{plantType},</if>
          </trim>
     </insert>
 
@@ -173,6 +207,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             createdate,
             updater_code,
             updatedate,
+            plant_type,
+            medium_type,
         </trim>
         values
         <foreach collection="list" index="index" separator="," item="item">
@@ -190,6 +226,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 #{item.createdate},
                 #{item.updaterCode},
                 #{item.updatedate},
+                #{item.plantType},
+                #{item.mediumType},
             </trim>
         </foreach>
     </insert>
@@ -224,10 +262,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createdate != null">createdate = #{createdate},</if>
             <if test="updaterCode != null">updater_code = #{updaterCode},</if>
             <if test="updatedate != null">updatedate = #{updatedate},</if>
+            <if test="plantType != null">plant_type = #{plantType},</if>
         </trim>
         where check_id = #{checkId}
     </update>
 
+    <update id="updateTCheckCheckpointsByUpload" parameterType="TCheckCheckpoints">
+        update t_check_checkpoints
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="testValue != null">test_value = #{testValue},</if>
+            <if test="netTestValue != null">net_test_value = #{netTestValue},</if>
+            <if test="leakagePosition != null">leakage_position = #{leakagePosition},</if>
+            <if test="checker != null">checker = #{checker},</if>
+            <if test="checkDate != null">check_date = #{checkDate},</if>
+            <if test="instrumentCode != null">instrument_code = #{instrumentCode},</if>
+            <if test="instrumentId != null">instrument_id = #{instrumentId},</if>
+            <if test="leakageDegree != null">leakage_degree = #{leakageDegree},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+            <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+        </trim>
+        where plant_name=#{plantName} and group_code=#{groupCode} and extend_code=#{extendCode} and inspection_id=#{inspectionId} and (approve_status is null or approve_status=0)
+    </update>
+
     <delete id="deleteTCheckCheckpointsByCheckId" parameterType="Long">
         update t_check_checkpoints set del_flag=1 where check_id = #{checkId}
     </delete>

+ 2 - 0
master/src/main/resources/mybatis/check/TCheckEnvironmentMapper.xml

@@ -58,6 +58,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createdate != null "> and d.createdate = #{createdate}</if>
             <if test="updaterCode != null "> and d.updater_code = #{updaterCode}</if>
             <if test="updatedate != null "> and d.updatedate = #{updatedate}</if>
+            <if test="instrumentCode != null "> and ci.code = #{instrumentCode}</if>
+            <if test="plantName != null "> and bp.plant_name = #{plantName}</if>
         and d.del_flag = 0
         </where>
     </select>

+ 5 - 0
master/src/main/resources/mybatis/check/TCheckLawitemsMapper.xml

@@ -47,6 +47,11 @@
         left join sys_user su on su.user_id=d.updater_code
     </sql>
 
+    <select id="selectTCheckLawitemsByLawStatus" resultMap="TCheckLawitemsResult">
+        select d.* from  t_check_lawitems d
+        left join t_check_laws cl on cl.id=d.law_id where cl.status=1;
+    </select>
+
     <select id="selectTCheckLawitemsList" parameterType="TCheckLawitems" resultMap="TCheckLawitemsResult">
         <include refid="selectTCheckLawitemsVo"/>
         <where>

BIN
master/src/main/resources/static/template/check/checkPoints.xlsx


+ 18 - 1
ui/src/assets/styles/element-ui.scss

@@ -89,4 +89,21 @@
   > .el-submenu__title
   .el-submenu__icon-arrow {
   display: none;
-}
+}
+
+.el-scrollbar {
+   height: 100%;
+ }
+
+::-webkit-scrollbar {
+  /* 设置竖向滚动条的宽度 */
+  width: 10px;
+  /* 设置横向滚动条的高度 */
+  height: 10px;
+}
+
+::-webkit-scrollbar-thumb {
+  /*滚动条的背景色*/
+  background-color: rgba(144, 147, 153, .3);
+  border-radius: 35px;
+}

+ 3 - 3
ui/src/views/base/point/index.vue

@@ -203,7 +203,7 @@
     <el-table v-loading="loading" :data="pointList" :cell-style="tableCellStyle"
               @selection-change="handleSelectionChange" :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center"/>
-      <el-table-column label="检测净值(ppm)" align="center" prop="ppm" width="110" :show-overflow-tooltip="true"/>
+      <el-table-column label="检测净值(ppm)" align="center" prop="netTestValue" width="110" :show-overflow-tooltip="true"/>
       <el-table-column label="泄漏程度" align="center" prop="leakageDegree" :formatter="leakageFormat"
                        :show-overflow-tooltip="true"/>
       <el-table-column label="装置名称" align="center" prop="plantName" :show-overflow-tooltip="true"/>
@@ -609,7 +609,7 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        ppm: null,
+        netTestValue: null,
         leakageDegree: null,
         plantId: null,
         regionId: null,
@@ -830,7 +830,7 @@ export default {
     reset() {
       this.form = {
         pointId: null,
-        ppm: null,
+        netTestValue: null,
         leakageDegree: null,
         plantId: null,
         regionId: null,

+ 4 - 4
ui/src/views/check/environment/index.vue

@@ -208,13 +208,13 @@
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item label="风" prop="windSpeed">
-              <el-input v-model="form.windSpeed" placeholder="请输入风"/>
+            <el-form-item label="风" prop="windSpeed">
+              <el-input v-model="form.windSpeed" placeholder="请输入风"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="风(m/s)" prop="windDirection">
-              <el-input v-model="form.windDirection" placeholder="请输入风" style="width: 85%"/> m/s
+            <el-form-item label="风(m/s)" prop="windDirection">
+              <el-input v-model="form.windDirection" placeholder="请输入风" style="width: 85%"/> m/s
             </el-form-item>
           </el-col>
         </el-row>

+ 12 - 1
ui/src/views/check/inspectionCheck/index.vue

@@ -95,7 +95,7 @@
             size="mini"
             type="text"
             icon="el-icon-s-order"
-            @click=""
+            @click="openPointVisible(scope.row)"
           >检测点清单
           </el-button>
         </template>
@@ -109,6 +109,7 @@
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
+    <point-enter v-if="pointVisible" ref="pointList"></point-enter>
   </div>
 </template>
 
@@ -122,11 +123,14 @@ import {
   updateInspection
 } from "@/api/task/inspection";
 import {getAllPlan} from "@/api/task/plan";
+import PointEnter from "@/views/check/inspectionCheck/pointEnter";
 
 export default {
   name: "InspectionCheck",
+  components: {PointEnter},
   data() {
     return {
+      pointVisible:false,
       taskTypeOperation: [],
       planOperation: [],
       divideOperation: [],
@@ -198,6 +202,13 @@ export default {
     });
   },
   methods: {
+    openPointVisible(row){
+      row.isEnter=true;
+      this.pointVisible = true;
+      this.$nextTick(() => {
+        this.$refs.pointList.openDialog(row)
+      })
+    },
     tableCellStyle({row, column, rowIndex, columnIndex}) {
       if (columnIndex === 1 && row.timeOut === '是') {
         return "color:#ff0000;";

+ 406 - 0
ui/src/views/check/inspectionCheck/pointEnter.vue

@@ -0,0 +1,406 @@
+<template xmlns="http://www.w3.org/1999/html">
+  <div class="checkTable">
+    <el-dialog :visible.sync="dialog.dialogFormVisible" width="1800px" :close-on-click-modal="false"
+               title='检测点清单'>
+      <el-row>
+        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
+          <el-form-item label="装置" prop="plantId">
+            <el-select v-model="queryParams.plantId" @change="handleQuery"
+                       placeholder="请选择装置" clearable size="small" disabled>
+              <el-option
+                v-for="plant in plantOperation"
+                :key="plant.plantId"
+                :label="plant.plantName"
+                :value="plant.plantId"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="群组编码" prop="groupCode">
+            <el-input
+              v-model="queryParams.groupCode"
+              placeholder="请输入群组编码"
+              clearable
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+          <el-form-item label="密封点类型" prop="pointType" label-width="90px">
+            <el-select v-model="queryParams.pointType" @change="handleQuery" placeholder="请选择密封点类型" clearable
+                       size="small">
+              <el-option
+                v-for="dict in pointOptions"
+                :key="dict.dictValue"
+                :label="dict.dictLabel"
+                :value="dict.dictValue"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+          </el-form-item>
+        </el-form>
+      </el-row>
+      <el-row :gutter="10" class="mb8">
+        <el-col :span="1.5">
+          <el-button
+            type="warning"
+            plain
+            icon="el-icon-download"
+            size="mini"
+            @click="handleExport"
+            v-hasPermi="['check:checkpoints:export']"
+          >导出检测点清单
+          </el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button
+            type="warning"
+            plain
+            icon="el-icon-upload"
+            size="mini"
+            @click="handleImport"
+            v-if="isEnter"
+            v-hasPermi="['check:checkpoints:add']"
+          >导入检测数据
+          </el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button
+            type="info"
+            plain
+            icon="el-icon-position"
+            size="mini"
+            @click="handleToApprove"
+            v-if="isEnter"
+          >送审
+          </el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button
+            type="info"
+            plain
+            icon="el-icon-s-check"
+            size="mini"
+            @click="handleApprove"
+            v-if="isEnter"
+          >审核
+          </el-button>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-table :data="leftData" style="width: 100%;" height="500px" border
+                  @selection-change="saveLeft"
+                  ref="leftData" :cell-style="tableCellStyle">
+          <el-table-column type="selection" align="center" fixed="left"></el-table-column>
+          <el-table-column label="审核状态" fixed="left" align="center" prop="approveStatus" width="80" :formatter="approveStatusFormat"/>
+          <el-table-column label="检测值" align="center" prop="testValue" v-if="!checkAgain" width="80"/>
+          <el-table-column label="复测值" align="center" prop="testValue" v-else width="80"/>
+          <el-table-column label="净检测值" align="center" prop="netTestValue" width="80"/>
+          <el-table-column label="泄露程度" align="center" prop="leakageDegree" width="80" :formatter="leakageFormat"/>
+          <el-table-column label="装置名称" align="center" prop="plantName" width="120"
+                           :show-overflow-tooltip="true"/>
+          <el-table-column label="区域名称" align="center" prop="regionName" width="120"
+                           :show-overflow-tooltip="true"/>
+          <el-table-column label="平台" align="center" prop="layer" width="100" :show-overflow-tooltip="true"/>
+          <el-table-column label="设备/管线名称" align="center" prop="devName" width="130"
+                           :show-overflow-tooltip="true"/>
+          <el-table-column label="设备/管线编号" align="center" prop="devCode" width="130"
+                           :show-overflow-tooltip="true"/>
+          <el-table-column label="群组编码" align="center" prop="groupCode" width="120"
+                           :show-overflow-tooltip="true"/>
+          <el-table-column label="密封点扩展号编码" align="center" prop="extendCode" width="150"
+                           :show-overflow-tooltip="true"/>
+          <el-table-column label="密封点类型" align="center" prop="pointType" width="120"
+                           :show-overflow-tooltip="true"/>
+          <el-table-column label="仪器编号" align="center" prop="instrumentCode" width="120"
+                           :show-overflow-tooltip="true"/>
+          <el-table-column label="泄露部位" align="center" prop="leakagePosition" width="120"
+                           :show-overflow-tooltip="true"/>
+          <el-table-column label="校准人员" align="center" prop="checker" width="120"
+                           :show-overflow-tooltip="true"/>
+          <el-table-column label="校准日期" align="center" prop="checkDate" width="180">
+            <template slot-scope="scope">
+              <span>{{ parseTime(scope.row.checkDate, '{y}-{m}-{d}') }}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination
+          v-show="leftTotal>0"
+          :total="leftTotal"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
+      </el-row>
+      <div slot="footer" class="dialog-footer" style="text-align: center">
+        <el-button @click="cancel">返回</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 用户导入对话框 -->
+    <el-dialog v-dialogDrag :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"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</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">{{ $t('下载模板') }}</el-link>
+        </div>
+        <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
+          <input name="type" :value="upload.type" hidden/>
+        </form>
+        <div class="el-upload__tip" style="color:red" slot="tip">{{ $t('提示:仅允许导入“xls”或“xlsx”格式文件!') }}</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm" v-loading.fullscreen.lock="fullscreenLoading">{{
+            $t('确 定')
+          }}
+        </el-button>
+        <el-button @click="upload.open = false">{{ $t('取 消') }}</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  listCheckpoints, updateCheckpoints,
+} from "@/api/check/checkpoints";
+import {getAllPlantName} from "@/api/base/plant";
+import {getToken} from "@/utils/auth";
+
+export default {
+  name: "pointEnter",
+  data() {
+    return {
+      leftTotal: 0,
+      checkAgain: false,
+      fullscreenLoading: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        pointId: null,
+        inspectionId: null,
+        testValue: null,
+        netTestValue: null,
+        plantId: null,
+        plantName: null,
+        regionId: null,
+        regionName: null,
+        layer: null,
+        devId: null,
+        devName: null,
+        devCode: null,
+        groupCode: null,
+        extendCode: null,
+        pointType: null,
+        inspectionCode: null,
+        leakagePosition: null,
+        checker: null,
+        checkId: null,
+        checkDate: null,
+        leakageDegree: null,
+        remarks: null,
+        approveStatus: null,
+        approveTime: null,
+        deptId: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        choose: null,
+      },
+      row: {},
+      leftData: [],
+      left: [],  //左边选中的数据
+      leftMultiple: true,
+      approveStatusOperation: [],
+      dialog: {
+        dialogFormVisible: false,
+      },
+      inspectionId: 0,
+      pointOptions: [],
+      plantOperation: [],
+      isEnter:false,
+      // 用户导入参数
+      upload: {
+        downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+        //下载模板类型
+        type: "checkPoint",
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/check/checkpoints/importData/",
+      },
+    }
+  },
+  methods: {
+    tableCellStyle({row, column, rowIndex, columnIndex}) {
+      if (columnIndex === 1 && row.approveStatus == 2) {
+        return "color:#00ff00;";
+      }
+      if (columnIndex === 1 && row.approveStatus == 1) {
+        return "color:#0000FF;";
+      }
+      if (columnIndex === 1 && row.approveStatus == 0) {
+        return "color:#ff0000;";
+      }
+      if (columnIndex === 4 && row.leakageDegree == 1) {
+        return "color:#00ff00;font-size:200%";
+      }
+      if (columnIndex === 4 && row.leakageDegree == 2) {
+        return "color:#FFDF00;font-size:200%";
+      }
+      if (columnIndex === 4 && row.leakageDegree == 3) {
+        return "color:#ff0000;font-size:200%";
+      }
+    },
+    leakageFormat(row, column) {
+      return row.leakageDegree ? "●" : null;
+    },
+    approveStatusFormat(row, column) {
+      return this.selectDictLabel(this.approveStatusOperation, row.approveStatus);
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+      this.fullscreenLoading = true;
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = this.$t('用户导入');
+      this.upload.open = true;
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('check/checkpoints/export', {
+        ...this.queryParams
+      }, `checkpoints_${new Date().getTime()}.xlsx`)
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      this.$refs['downloadFileForm'].submit()
+    },
+    // 文件上传中处理
+    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.fullscreenLoading = false;
+      if (response.data === 0) {
+        this.$alert(this.$t('导入失败!') + response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      } else if (response.data[0] != null) {
+        this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据') + "," + this.$t('第') + response.data + this.$t('行数据出现错误导入失败') + "。", this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      } else {
+        this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据'), this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      }
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    pointFormat(row, column) {
+      return this.selectDictLabel(this.pointOptions, row.pointType);
+    },
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    cancel() {
+      this.leftData = [];
+      this.dialog.dialogFormVisible = false;
+    },
+    openDialog(row) {
+      this.leftData = [];
+      this.row = row;
+      this.queryParams.plantId = row.plantId;
+      this.queryParams.inspectionId = row.id;
+      this.upload.url += this.upload.url.endsWith('/') ?   row.id:'';
+      if (row.isEnter&&row.status==1){
+        this.isEnter=true;
+      }
+      this.dialog.dialogFormVisible = true;
+      this.checkAgain = row.taskType == 2 ? true : false;
+      this.getList();
+      this.getDicts("point_type").then(response => {
+        this.pointOptions = response.data;
+      });
+      getAllPlantName().then(response => {
+        this.plantOperation = response.data;
+      })
+
+      this.getDicts("base_approve_status").then(response => {
+        this.approveStatusOperation = response.data;
+      });
+    },
+    /** 查询检测点列表 */
+    getList() {
+      listCheckpoints(this.queryParams).then(response => {
+        this.leftData = response.rows;
+        this.leftTotal = response.total;
+      });
+    },
+    saveLeft(rows) {
+      this.left = [];
+      if (rows) {
+        this.left = rows.map(row => row.checkId);
+        this.leftMultiple = !rows.length;
+      }
+    },
+    handleToApprove() {
+      alert("功能开发中......")
+    },
+    handleApprove() {
+      alert("功能开发中......")
+    }
+  }
+}
+</script>
+
+<style scoped>
+.checkTable .el-scrollbar {
+  height: 100%;
+}
+
+.checkTable ::-webkit-scrollbar {
+  /* 设置竖向滚动条的宽度 */
+  width: 10px;
+  /* 设置横向滚动条的高度 */
+  height: 10px;
+}
+
+.checkTable ::-webkit-scrollbar-thumb {
+  /*滚动条的背景色*/
+  background-color: rgba(144, 147, 153, .3);
+  border-radius: 35px;
+}
+</style>

+ 1 - 20
ui/src/views/task/inspection/dividePoint.vue

@@ -1,5 +1,5 @@
 <template xmlns="http://www.w3.org/1999/html">
-  <div class="checkTable">
+  <div>
       <el-dialog :visible.sync="dialog.dialogFormVisible" width="1800px" :close-on-click-modal="false"
                  title='添加检测点'>
         <el-row>
@@ -378,22 +378,3 @@ export default {
   }
 }
 </script>
-
-<style scoped>
-.checkTable .el-scrollbar {
-  height: 100%;
-}
-
-.checkTable ::-webkit-scrollbar {
-  /* 设置竖向滚动条的宽度 */
-  width: 10px;
-  /* 设置横向滚动条的高度 */
-  height: 10px;
-}
-
-.checkTable ::-webkit-scrollbar-thumb {
-  /*滚动条的背景色*/
-  background-color: rgba(144, 147, 153, .3);
-  border-radius: 35px;
-}
-</style>

+ 18 - 6
ui/src/views/task/inspection/index.vue

@@ -148,6 +148,7 @@
             @click="openCheckPoint(scope.row)"
           >检测点清单
           </el-button>
+          <br>
           <el-button
             size="mini"
             type="text"
@@ -234,6 +235,7 @@
       </div>
     </el-dialog>
     <DividePoint v-if="pointVisible" ref="pointList"></DividePoint>
+    <point-enter v-if="enterVisible" ref="enterList"></point-enter>
   </div>
 </template>
 
@@ -248,13 +250,15 @@ import {
 } from "@/api/task/inspection";
 import {getAllPlan} from "@/api/task/plan";
 import DividePoint from "@/views/task/inspection/dividePoint";
+import PointEnter from "@/views/check/inspectionCheck/pointEnter";
 
 export default {
   name: "Inspection",
-  components: {DividePoint},
+  components: {PointEnter, DividePoint},
   data() {
     return {
       pointVisible: false,
+      enterVisible: false,
       taskTypeOperation: [],
       planOperation: [],
       divideOperation: [],
@@ -321,7 +325,7 @@ export default {
         startTime: [
           {required: true, message: '请选择任务开始时间', trigger: "blur"}
         ],
-        sendTime: [
+        endTime: [
           {required: true, message: '请选择任务结束时间', trigger: "blur"}
         ],
         recipient: [
@@ -348,10 +352,18 @@ export default {
   },
   methods: {
     openCheckPoint(row) {
-      this.pointVisible = true;
-      this.$nextTick(() => {
-        this.$refs.pointList.openDialog(row)
-      })
+      if (row.status == 1) {
+        row.isEnter=false;
+        this.enterVisible = true;
+        this.$nextTick(() => {
+          this.$refs.enterList.openDialog(row)
+        })
+      } else {
+        this.pointVisible = true;
+        this.$nextTick(() => {
+          this.$refs.pointList.openDialog(row)
+        })
+      }
     },
     tableCellStyle({row, column, rowIndex, columnIndex}) {
       if (columnIndex === 1 && row.status == 0) {