Browse Source

ly 测厚

ly 5 months ago
parent
commit
dd31a903b0

+ 77 - 0
master/src/main/java/com/ruoyi/common/utils/document/PDFUtil.java

@@ -0,0 +1,77 @@
+package com.ruoyi.common.utils.document;
+
+import com.itextpdf.text.Document;
+import com.itextpdf.text.pdf.BadPdfFormatException;
+import com.itextpdf.text.pdf.PdfCopy;
+import com.itextpdf.text.pdf.PdfReader;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+public class PDFUtil {
+
+    /**
+     * 合并两个 PDF 文件
+     *
+     * @param pdf1Path   第一个 PDF 文件路径
+     * @param pdf2Path   第二个 PDF 文件路径
+     * @param outputPath 输出文件路径(包括文件名)
+     * @throws IOException 如果文件读取或写入出错
+     */
+    public static void mergeTwoPdfs(String pdf1Path, String pdf2Path, String outputPath) throws IOException {
+        Document document = null;
+        PdfCopy copy = null;
+
+        try {
+            // 创建输出 PDF 的 Document 对象
+            document = new Document();
+            // 创建 PdfCopy 对象
+            copy = new PdfCopy(document, new FileOutputStream(outputPath));
+            document.open();
+
+            // 合并第一个 PDF 文件
+            addPdfToDocument(pdf1Path, copy);
+            // 合并第二个 PDF 文件
+            addPdfToDocument(pdf2Path, copy);
+
+            System.out.println("PDF 合并成功,输出文件:" + outputPath);
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (document != null) {
+                document.close();
+            }
+            if (copy != null) {
+                copy.close();
+            }
+        }
+    }
+
+    /**
+     * 将单个 PDF 文件的所有页面添加到目标文档中
+     *
+     * @param pdfPath PDF 文件路径
+     * @param copy    PdfCopy 对象
+     * @throws IOException 如果读取 PDF 出错
+     */
+    private static void addPdfToDocument(String pdfPath, PdfCopy copy) throws IOException {
+        PdfReader reader = null;
+        try {
+            reader = new PdfReader(pdfPath);
+            int n = reader.getNumberOfPages();
+            // 将每页添加到目标 PDF 中
+            for (int i = 1; i <= n; i++) {
+                copy.addPage(copy.getImportedPage(reader, i));
+            }
+        } catch (BadPdfFormatException e) {
+            e.printStackTrace();
+        } finally {
+            if (reader != null) {
+                reader.close();
+            }
+        }
+    }
+
+
+}

+ 10 - 14
master/src/main/java/com/ruoyi/framework/task/sems/MeasureThicknessTask.java → master/src/main/java/com/ruoyi/framework/task/sems/measure/MeasureThicknessEstTask.java

@@ -1,20 +1,18 @@
-package com.ruoyi.framework.task.sems;
+package com.ruoyi.framework.task.sems.measure;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.ruoyi.common.sendEmail.IMailService;
-import com.ruoyi.common.thread.sems.*;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.framework.config.RuoYiConfig;
 import com.ruoyi.framework.web.controller.BaseController;
-import com.ruoyi.project.sems.domain.*;
-import com.ruoyi.project.sems.service.*;
+import com.ruoyi.project.sems.domain.TMeasureThickness;
+import com.ruoyi.project.sems.service.ITMeasureThicknessService;
 import com.ruoyi.project.system.domain.*;
 import com.ruoyi.project.system.service.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.math.BigDecimal;
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -23,8 +21,8 @@ import java.util.List;
  * 特种设备预警标识定时任务
  */
 
-@Component("measureThicknessTask")
-public class MeasureThicknessTask extends BaseController {
+@Component("measureThicknessEstTask")
+public class MeasureThicknessEstTask extends BaseController {
     //注入发送邮件的接口
     @Autowired
     private IMailService mailService;
@@ -48,12 +46,10 @@ public class MeasureThicknessTask extends BaseController {
     @Autowired
     private RuoYiConfig ruoyiConfig;
 
-    private final String stAlarmType = "定点测厚-短期腐蚀速率高于0.5mm/year";
-    private final String estAlarmType = "定点测厚-预估剩余寿命小于6年";
+    private final String stAlarmType = "定点测厚-预估剩余寿命小于3年";
+    private final String estAlarmType = "定点测厚-预估剩余寿命小于5年";
     private final String glUrlSuffix = "sems/thickness";
 
-
-
     private final Long alarmtype = 1080L;//特种设备预警ID
 
     private final String contentFormat = "(装置名称,单元,单位内编号,侧厚部位)";
@@ -99,13 +95,13 @@ public class MeasureThicknessTask extends BaseController {
                     .in("plant_code", plants)
             );
             for (TMeasureThickness tMeasureThickness : list) {
-                if (tMeasureThickness.getStCorrosion() != null) {
-                    if (new BigDecimal(tMeasureThickness.getStCorrosion()).compareTo(new BigDecimal("0.5")) >= 0) { //速率大于0.5
+                if (tMeasureThickness.getEstRemain() != null) {
+                    if (new BigDecimal(tMeasureThickness.getEstRemain()).compareTo(new BigDecimal("3")) <= 0) { //寿命小于3年
                         stList.add(tMeasureThickness);
                     }
                 }
                 if (tMeasureThickness.getEstRemain() != null) {
-                    if (new BigDecimal(tMeasureThickness.getEstRemain()).compareTo(new BigDecimal("6")) <= 0) { //寿命小于6
+                    if (new BigDecimal(tMeasureThickness.getEstRemain()).compareTo(new BigDecimal("5")) <= 0) { //寿命小于5
                         estList.add(tMeasureThickness);
                     }
                 }

+ 227 - 0
master/src/main/java/com/ruoyi/framework/task/sems/measure/MeasureThicknessNextTask.java

@@ -0,0 +1,227 @@
+package com.ruoyi.framework.task.sems.measure;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.ruoyi.common.sendEmail.IMailService;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.framework.config.RuoYiConfig;
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.project.sems.domain.TMeasureThickness;
+import com.ruoyi.project.sems.service.ITMeasureThicknessService;
+import com.ruoyi.project.system.domain.*;
+import com.ruoyi.project.system.service.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 特种设备预警标识定时任务
+ */
+
+@Component("measureThicknessNextTask")
+public class MeasureThicknessNextTask extends BaseController {
+    //注入发送邮件的接口
+    @Autowired
+    private IMailService mailService;
+    //注入特种设备预警接口
+    @Autowired
+    private ITAlarmtypeService tAlarmtypeService;
+    //注入预警管理负责人接口
+    @Autowired
+    private ITAlarmPrincipalService tAlarmPrincipalService;
+    //注入用户接口
+    @Autowired
+    private ISysUserService sysUserService;
+    //注入报警记录管理的接口
+    @Autowired
+    private ITAlarmhistoryService alarmhistoryService;
+    @Autowired
+    private ISysPlantService sysPlantService;
+    @Autowired
+    private ITMeasureThicknessService measureThicknessService;
+    //系统基础配置
+    @Autowired
+    private RuoYiConfig ruoyiConfig;
+
+    private final String stAlarmType = "定点测厚-下次测厚日期小于3个月";
+    private final String estAlarmType = "定点测厚-下次测厚日期小于1个月";
+    private final String glUrlSuffix = "sems/thickness";
+
+    private final Long alarmtype = 1080L;//特种设备预警ID
+
+    private final String contentFormat = "(装置名称,单元,单位内编号,侧厚部位)";
+
+    /**
+     * 检查预警标识状态
+     * 3天检查一次
+     */
+    public void checkWarnFlag() {
+        //获取动态处理预警级别
+        TAlarmtype tAlarmtype = this.tAlarmtypeService.selectTAlarmtypeById(this.alarmtype);
+        if (tAlarmtype.getIsOpen() == 0) {
+            logger.info("特种设备预警标识定时任务未启用");
+            return;
+        }
+
+        //获取需要发送邮件的人员信息
+        TAlarmPrincipal tAlarmPrincipal = new TAlarmPrincipal();
+        tAlarmPrincipal.setTypeId(this.alarmtype);
+        List<TAlarmPrincipal> userList = this.tAlarmPrincipalService.selectList(tAlarmPrincipal);
+        for (TAlarmPrincipal t : userList) {
+            SysUser user = this.sysUserService.selectUserByStaffId(t.getStaffid());
+            if (user != null) {
+                logger.info("发送人"+user.getNickName() + "--发送邮箱:" + user.getEmail());
+                t.setPrincipalName(user.getNickName());
+                t.setPrincipalEmail(user.getEmail());
+            }
+        }
+        List<TMeasureThickness> stList = new ArrayList<>();
+        List<TMeasureThickness> estList = new ArrayList<>();
+        //
+        for (TAlarmPrincipal o : userList) {
+            //根据装置权限获取数据
+            List<SysPlant> plantList = sysPlantService.selectSysPlantByDeptId(o.getDeptId());
+            logger.info("部门id"+o.getDeptId() + "--部门:" + plantList.toString());
+            List<String> plants = new ArrayList<>();
+            for (SysPlant s : plantList
+            ) {
+                plants.add(s.getName());
+            }
+            List<TMeasureThickness> list = this.measureThicknessService.list(new QueryWrapper<TMeasureThickness>()
+                    .eq("del_flag", 0).eq("is_send" , 0)
+                    .in("plant_code", plants)
+            );
+            for (TMeasureThickness tMeasureThickness : list) {
+                if (tMeasureThickness.getNextWarnDate() != null) {
+                    long now = System.currentTimeMillis();
+                    long diff = tMeasureThickness.getNextWarnDate().getTime() - now;
+                    long nd = 1000 * 24 * 60 * 60;
+                    long day = diff / nd;
+                    if ( day < 90 ) { //3个月
+                        stList.add(tMeasureThickness);
+                    }
+                }
+                if (tMeasureThickness.getNextWarnDate() != null) {
+                    long now = System.currentTimeMillis();
+                    long diff = tMeasureThickness.getNextWarnDate().getTime() - now;
+                    long nd = 1000 * 24 * 60 * 60;
+                    long day = diff / nd;
+                    if (day < 30) { //1个月
+                        estList.add(tMeasureThickness);
+                    }
+                }
+            }
+            sendEmailBySt(stList , o );
+            sendEmailByEst(estList , o );
+        }
+        // 标记 已发送邮件
+        List<TMeasureThickness> sendList = this.measureThicknessService.list(new QueryWrapper<TMeasureThickness>()
+                .eq("del_flag", 0)
+        );
+        for (TMeasureThickness t: sendList
+             ) {
+            t.setIsSend(1);
+//            this.measureThicknessService.updateTMeasureThickness(t);
+        }
+    }
+
+
+    private void sendEmailBySt(List<TMeasureThickness> stList, TAlarmPrincipal o) {
+        String str = "";
+        for (TMeasureThickness t : stList) {
+            str += "<br>" + t.getPlantCode() + "," + t.getUnitCode() + "," + t.getTagno() + "," + t.getPosition();
+        }
+        if (stList.size() > 0) {
+            this.sendEmail(o.getPrincipalName(), o.getPrincipalEmail(), this.stAlarmType, "0",
+                    this.contentFormat, str, this.glUrlSuffix);
+            insertHistory(o, "0", str, this.alarmtype + "", this.stAlarmType);
+        }
+    }
+
+    private void sendEmailByEst(List<TMeasureThickness> estList, TAlarmPrincipal o) {
+        String str = "";
+        for (TMeasureThickness t : estList) {
+            str += "<br>" + t.getPlantCode() + "," + t.getUnitCode() + "," + t.getTagno() + "," + t.getPosition();
+        }
+        if (estList.size() > 0) {
+            this.sendEmail(o.getPrincipalName(), o.getPrincipalEmail(), this.estAlarmType, "0",
+                    this.contentFormat, str, this.glUrlSuffix);
+            insertHistory(o, "0", str, this.alarmtype + "", this.estAlarmType);
+        }
+    }
+
+    /**
+     * 特种设备预警-邮件发送
+     *
+     * @param username       负责人姓名
+     * @param email          负责人邮箱
+     * @param alarmType      预警类型
+     * @param warningLevel   预警等级
+     * @param contenFormat   预警内容
+     * @param warningContent 预警内容详细
+     * @param urlSuffix      链接跳转对应路径
+     */
+    private void sendEmail(String username, String email, String alarmType, String warningLevel, String contenFormat, String warningContent, String urlSuffix) {
+        //写html开始内容
+        String start = "<!DOCTYPE html><html><head><meta charset=\"utf-8\"><title></title></head><body><div style=\"background-color:#ECECEC; padding: 35px;\">" +
+                "<table cellpadding=\"0\" align=\"center\"" +
+                "style=\"width: 600px; margin: 0px auto; text-align: left; position: relative; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; font-size: 14px; font-family:微软雅黑, 黑体; line-height: 1.5; box-shadow: rgb(153, 153, 153) 0px 0px 5px; border-collapse: collapse; background-position: initial initial; background-repeat: initial initial;background:#fff;\">" +
+                "<tbody><tr><th valign=\"middle\" style=\"height: 25px; line-height: 25px; padding: 15px 35px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #42a3d3; background-color: #49bcff; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;\">" +
+                "<font face=\"微软雅黑\" size=\"5\" style=\"color: rgb(255, 255, 255); \">化工装置管理系统 </font><font face=\"微软雅黑\" size=\"3\" style=\"color: rgb(255, 255, 255); \">Chemical Plant Management System(CPMS)</font></th></tr>";
+        //写html结尾内容
+        String end = "</tbody></table></div></body></html>";
+        //表html中间内容
+        String prime = "";
+        String firstcenter = "<tr><td><div style=\"padding:25px 35px 40px; background-color:#fff;\"><h2 style=\"margin: 5px 0px; \">" +
+                "<font color=\"#333333\" style=\"line-height: 20px; \"><font style=\"line-height: 22px; \" size=\"4\">" +
+                "亲爱的 username</font><br><font style=\"line-height: 22px; \" size=\"4\">" +
+                "<p>您有一条预警信息:<br>" +
+                "预警类型:<b>alarmType</b><br>" +
+                "预警内容contenFormat:<b>warningContent</b><br>" +
+                "请前往<a href=\"requestJumpPath/urlSuffix\">alarmType</a>查看。<br>" +
+                "<p align=\"right\">date</p>" +
+                "<div style=\"width:700px;margin:0 auto;\">" +
+                "<div style=\"padding:10px 10px 0;border-top:1px solid #ccc;color:#747474;margin-bottom:20px;line-height:1.3em;font-size:12px;\">" +
+                "<p>此为系统邮件,请勿回复<br>This e-Mail is an automatic reminder sent by CPMS, please do not reply</p>" +
+                "</div></div></div></td></tr>";
+        String one = firstcenter.replaceFirst("username", username);
+        String two = one.replaceFirst("alarmType", alarmType);
+        String three = two.replaceFirst("warningLevel", warningLevel);
+        String four = three.replaceFirst("contenFormat", contenFormat);
+        String five = four.replaceFirst("warningContent", warningContent);
+        String six = five.replaceFirst("urlSuffix", urlSuffix);
+        String seven = six.replaceFirst("alarmType", alarmType);
+        String eight = seven.replace("requestJumpPath", this.ruoyiConfig.getRequestJumpPath());
+        String result = eight.replaceFirst("date", String.valueOf(new Date()));
+        prime = prime + result;
+        //拼接html
+        String html = start + prime + end;
+        this.mailService.sendHtmlMail(email, "CPMS:您有一条预警信息", html);
+    }
+
+    /**
+     * 预警记录管理新增
+     */
+    public void insertHistory(TAlarmPrincipal a, String warningLevel, String warningContent, String typeId, String alarmType) {
+        //预警记录管理新增
+        TAlarmhistory alarmhistory = new TAlarmhistory();
+        alarmhistory.setPlantCode(a.getPlantCode());
+        alarmhistory.setTableName(alarmType);
+        alarmhistory.setStaffid(a.getStaffid());
+        alarmhistory.setDeptId(a.getDeptId());
+        alarmhistory.setTypeId(Long.parseLong(typeId));
+        alarmhistory.setAlarmLevel(warningLevel);
+        alarmhistory.setAlarmContent(StringUtils.remove(warningContent, "<br>"));
+        String[] content = StringUtils.remove(warningContent, "<br>").split(";");
+        if (content.length == 0) {
+            alarmhistory.setAlarmNum(Long.parseLong(String.valueOf("1")));
+        } else {
+            alarmhistory.setAlarmNum(Long.parseLong(String.valueOf(content.length)));
+        }
+        alarmhistory.setSendTime(new Date());
+        alarmhistoryService.insertTAlarmhistory(alarmhistory);
+    }
+}

+ 42 - 18
master/src/main/java/com/ruoyi/project/sems/controller/TMeasureRecordController.java

@@ -53,6 +53,11 @@ public class TMeasureRecordController extends BaseController {
     public TableDataInfo list(TMeasureRecord tMeasureRecord) {
         startPage();
         List<TMeasureRecord> list = tMeasureRecordService.selectTMeasureRecordList(tMeasureRecord);
+        TMeasureThickness thickness = tMeasureThicknessMapper.selectTMeasureThicknessById(Long.valueOf(tMeasureRecord.getMeasureId()));
+        for (TMeasureRecord t : list
+        ) {
+            t.setLoopNo(thickness.getLoopNo());
+        }
         return getDataTable(list);
     }
 
@@ -101,7 +106,7 @@ public class TMeasureRecordController extends BaseController {
         String measureId = tMeasureRecord.getMeasureId();
         try {
             updateMeasure(measureId);
-        }catch (Exception e) {
+        } catch (Exception e) {
             logger.error(JSON.toJSONString(e));
         }
         return toAjax(1);
@@ -115,13 +120,13 @@ public class TMeasureRecordController extends BaseController {
     public AjaxResult remove(@PathVariable Long[] ids) {
         int res = tMeasureRecordService.deleteTMeasureRecordByIds(ids);
         try {
-            for (Long id: ids
+            for (Long id : ids
             ) {
                 TMeasureRecord tMeasureRecord = tMeasureRecordService.selectTMeasureRecordById(id);
                 String measureId = tMeasureRecord.getMeasureId();
                 updateMeasure(measureId);
             }
-        }catch (Exception e) {
+        } catch (Exception e) {
             logger.error(JSON.toJSONString(e));
         }
         return toAjax(res);
@@ -134,7 +139,7 @@ public class TMeasureRecordController extends BaseController {
         List<TMeasureRecord> list = tMeasureRecordService.selectTMeasureRecordList(t);
         logger.info("查询数量" + list.size());
         if (list != null) {
-            if (list.size() > 1 ) {
+            if (list.size() > 1) {
                 logger.info(JSON.toJSONString(list));
                 //短期速率
                 TMeasureRecord r1 = list.get(0);
@@ -167,17 +172,17 @@ public class TMeasureRecordController extends BaseController {
                 }
                 thickness.setLtCorrosion(String.valueOf(lt));
                 //预估寿命
-                if (thickness.getThicknessMin()!= null) {
+                if (thickness.getThicknessMin() != null) {
                     BigDecimal e;
                     if (lt.compareTo(st) > 0) {
                         e = lt;
                     } else {
                         e = st;
                     }
-                    if(e.compareTo(new BigDecimal("0")) == 0) {
+                    if (e.compareTo(new BigDecimal("0")) == 0) {
                         e = new BigDecimal("1");
                     }
-                    BigDecimal cc = new BigDecimal(r1.getMeasureValue()).subtract(new BigDecimal(thickness.getThicknessMin().replaceAll("-","")));
+                    BigDecimal cc = new BigDecimal(r1.getMeasureValue()).subtract(new BigDecimal(thickness.getThicknessMin().replaceAll("-", "")));
                     logger.info(cc + "----cc");
                     BigDecimal est = cc.divide(e, 2, BigDecimal.ROUND_HALF_DOWN);
                     thickness.setEstRemain(String.valueOf(est));
@@ -185,19 +190,19 @@ public class TMeasureRecordController extends BaseController {
             }
             //计算下次侧厚日期
             try {
-                if(list.size() > 0 && StringUtils.isNotEmpty(thickness.getMeasureCycle())) {
+                if (list.size() > 0 && StringUtils.isNotEmpty(thickness.getMeasureCycle())) {
                     int monthCycle = Integer.parseInt(thickness.getMeasureCycle());
-                    int dayCycel = monthCycle * 30 ;
+                    int dayCycel = monthCycle * 30;
                     TMeasureRecord r1 = list.get(0);
                     Calendar calendar = new GregorianCalendar();
                     calendar.setTime(r1.getMeasureDate());
                     calendar.add(calendar.DATE, dayCycel);
-                    logger.info("计算下次侧厚日期" , calendar.getTime());
+                    logger.info("计算下次侧厚日期", calendar.getTime());
                     thickness.setNextWarnDate(calendar.getTime());
                     thickness.setRecorder(r1.getRecorder());
                 }
-            }catch (Exception e) {
-                logger.error("计算下次侧厚日期出错" , JSON.toJSONString(e));
+            } catch (Exception e) {
+                logger.error("计算下次侧厚日期出错", JSON.toJSONString(e));
                 e.printStackTrace();
             }
         }
@@ -231,6 +236,8 @@ public class TMeasureRecordController extends BaseController {
         Long userId = getUserId();
         //报错行数统计
         List<Integer> failRow = new ArrayList<Integer>();
+        //异常
+        List<Integer> abnormalRow = new ArrayList<Integer>();
         Workbook workbook = ExcelUtils.getWorkBook(file);
         Sheet sheet = workbook.getSheetAt(0);
         List<TMeasureRecord> list = new ArrayList<>();
@@ -253,11 +260,11 @@ public class TMeasureRecordController extends BaseController {
                     logger.info("cellValue:" + cellValue);
                     if (j == 0) { //装置
                         entity.setPlantCode(cellValue);
-                    }else if (j == 1) {//单元
+                    } else if (j == 1) {//单元
                         entity.setUnitCode(cellValue);
-                    }else if (j == 2) {//单位内编号
+                    } else if (j == 2) {//单位内编号
                         entity.setTagno(cellValue);
-                    }else if (j == 3) {//侧厚部位
+                    } else if (j == 3) {//侧厚部位
                         entity.setPosition(cellValue);
                     } else if (j == 4) {//检测编号
                         entity.setMeasureNo(cellValue);
@@ -288,11 +295,24 @@ public class TMeasureRecordController extends BaseController {
                 t.setMeasureId(id.toString());
                 this.tMeasureRecordService.deleteTMeasureRecordByDate(t);
                 this.tMeasureRecordService.insertTMeasureRecord(t);
+                //判断波动过大
+                TMeasureRecord param = new TMeasureRecord();
+                param.setMeasureId(id + "");
+                List<TMeasureRecord> recordlist = tMeasureRecordService.selectTMeasureRecordList(param);
+                if (recordlist.size() > 1) {
+                    logger.info("侧厚数据1:", recordlist.get(0).getMeasureValue());
+                    logger.info("侧厚数据2:", recordlist.get(1).getMeasureValue());
+                    if (recordlist.get(0).getMeasureValue() - recordlist.get(1).getMeasureValue() >= 0.1) {
+                        //当本次测厚值比上次测厚值大于等于0.1mm 时,提醒工程师可能存在测量偏差,应进行复验。
+                        abnormalRow.add(failNum + 1);
+                    }
+                }
+
                 try {
-                    logger.info("更新速率id:",id);
+                    logger.info("更新速率id:", id);
 
                     this.updateMeasure(id + "");
-                }catch (Exception e) {
+                } catch (Exception e) {
                     logger.error("更新速率错误e:" + e);
                     e.printStackTrace();
                 }
@@ -308,6 +328,10 @@ public class TMeasureRecordController extends BaseController {
         logger.info("successNumber:" + String.valueOf(successNumber));
         logger.info("failNumber:" + String.valueOf(failNumber));
         logger.info("failRow:" + String.valueOf(failRow));
-        return AjaxResult.success(String.valueOf(successNumber), failRow);
+        logger.info("abnormalRow:" + String.valueOf(abnormalRow));
+        Map map = new HashMap();
+        map.put("failRow" , failRow);
+        map.put("abnormalRow" , abnormalRow);
+        return AjaxResult.success(String.valueOf(successNumber), map);
     }
 }

+ 201 - 0
master/src/main/java/com/ruoyi/project/sems/controller/TMeasureThicknessController.java

@@ -1,10 +1,13 @@
 package com.ruoyi.project.sems.controller;
 
 import com.alibaba.fastjson.JSON;
+import com.deepoove.poi.XWPFTemplate;
+import com.deepoove.poi.data.*;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.document.ChartUtil;
 import com.ruoyi.common.utils.document.DocumentHandler;
 import com.ruoyi.common.utils.document.PDFTemplateUtil;
+import com.ruoyi.common.utils.document.PDFUtil;
 import com.ruoyi.common.utils.file.ExcelUtils;
 import com.ruoyi.common.utils.file.FileUploadUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
@@ -14,11 +17,13 @@ import com.ruoyi.framework.config.RuoYiConfig;
 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.officeConvert.OfficeConvertController;
 import com.ruoyi.project.sems.domain.TMeasureRecord;
 import com.ruoyi.project.sems.domain.TMeasureThickness;
 import com.ruoyi.project.sems.service.ITMeasureRecordService;
 import com.ruoyi.project.sems.service.ITMeasureThicknessService;
 import freemarker.template.Template;
+import io.jsonwebtoken.lang.Assert;
 import org.apache.commons.lang.StringUtils;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -32,9 +37,13 @@ import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.io.File;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.OutputStream;
 import java.math.BigDecimal;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.*;
@@ -53,6 +62,9 @@ public class TMeasureThicknessController extends BaseController
     private ITMeasureThicknessService tMeasureThicknessService;
     @Autowired
     private ITMeasureRecordService tMeasureRecordService;
+    @Autowired
+    private OfficeConvertController officeConvertController;
+
 
     private final Long alarmtype = 1080L;//特种设备预警ID
     /**
@@ -454,4 +466,193 @@ public class TMeasureThicknessController extends BaseController
         int day = (int) ((time - time2) / (24*3600*1000));
         return day;
     }
+    /**
+     * @param id
+     * @return
+     * @throws IOException
+     */
+    @GetMapping("/wordView/{id}")
+    public AjaxResult wordView(@PathVariable Long id) throws IOException {
+        //根据ID查询并生成
+        String url = PreView(id);
+
+        return AjaxResult.success(url);
+    }
+
+
+    /**
+     * @param id 生成文件名
+     * @return
+     * @throws IOException
+     */
+    public String PreView(Long id) throws IOException {
+        //根据ID查询并生成
+        TMeasureThickness t = tMeasureThicknessService.selectTMeasureThicknessById(id);
+        String url = this.createcheck(t);
+        if (StringUtils.isNotEmpty(t.getCheckUrl()) ) {
+            //合并PDF
+            logger.info("url:" + url);
+            // 将路径字符串转换为Path对象
+            Path path = Paths.get(url);
+            // 获取文件名
+            String fileName = path.getFileName().toString();
+            fileName = officeConvertController.wordTransPdf(url);
+            String filePathOne = RuoYiConfig.getProfile() + "/" + fileName.replace("/profile","");
+            String filePathTwo =RuoYiConfig.getProfile() + "/" + t.getCheckUrl().replace("/profile","");
+            String newPdfPath =  "sems/measure/" + t.getId() + ".pdf" ;
+            logger.info("newPdfPath:" + newPdfPath);
+            logger.info("filePathOne:" + filePathOne);
+            logger.info("filePathTwo:" + filePathTwo);
+            PDFUtil.mergeTwoPdfs(filePathOne ,filePathTwo,RuoYiConfig.getProfile() + "/" + newPdfPath);
+            return "/profile/" + newPdfPath;
+        }
+        return url;
+    }
+
+    /**
+     * 生成wordt
+     */
+    public String createcheck(TMeasureThickness tMeasureThickness) throws IOException {
+        //生成word
+        //渲染文本
+        Map<String, Object> params = getWordData(tMeasureThickness);
+        // 模板路径
+        String templatePath = "static/word/sems/measure/cehou.docx";
+        // 生成word的路径
+        String fileDir = RuoYiConfig.getProfile() + "/" + "sems/measure";
+        // 生成word的文件名称
+        String fileName = tMeasureThickness.getPlantCode()+ "_" +tMeasureThickness.getId()  + ".docx";
+        String wordPath = this.createWord(templatePath, fileDir, fileName, params);
+        return wordPath;
+    }
+
+    /**
+     * 获取word数据
+     */
+    public Map<String, Object> getWordData(TMeasureThickness thickness) {
+        Map<String, Object> params = new HashMap<>();
+
+        params.put("plantCode", Texts.of(thickness.getPlantCode()).fontSize(10).create());
+        params.put("unitCode", Texts.of(thickness.getUnitCode()).fontSize(10).create());
+        params.put("tagno", Texts.of(thickness.getTagno()).fontSize(10).create());
+        params.put("position", Texts.of(thickness.getPosition()).fontSize(10).create());
+        params.put("recorder", Texts.of(thickness.getRecorder()).fontSize(10).create());
+        params.put("recorderDate", Texts.of(DateUtils.dateTime(thickness.getRecorderDate())).fontSize(10).create());
+        params.put("loopNo", Texts.of(thickness.getLoopNo()).fontSize(10).create());
+        params.put("installDate", Texts.of(DateUtils.dateTime(thickness.getInstallDate())).fontSize(10).create());
+        params.put("equipmentName", Texts.of(thickness.getEquipmentName()).fontSize(10).create());
+        params.put("material", Texts.of(thickness.getMaterial()).fontSize(10).create());
+
+        params.put("corAllowance", Texts.of(thickness.getCorAllowance()).fontSize(10).create());
+        params.put("originalThickness", Texts.of(thickness.getOriginalThickness()).fontSize(10).create());
+        params.put("medium", Texts.of(thickness.getMedium()).fontSize(10).create());
+        params.put("pressure", Texts.of(thickness.getPressure()).fontSize(10).create());
+        params.put("specification", Texts.of(thickness.getSpecification()).fontSize(10).create());
+        params.put("flowRate", Texts.of(thickness.getFlowRate()).fontSize(10).create());
+        params.put("temperature", Texts.of(thickness.getTemperature()).fontSize(10).create());
+        params.put("corrosionType", Texts.of(thickness.getCorrosionType()).fontSize(10).create());
+        params.put("nominalTickness", Texts.of(thickness.getNominalTickness()).fontSize(10).create());
+        params.put("thicknessMin", Texts.of(thickness.getThicknessMin()).fontSize(10).create());
+        params.put("stCorrosion", Texts.of(thickness.getStCorrosion()).fontSize(10).create());
+        params.put("ltCorrosion", Texts.of(thickness.getLtCorrosion()).fontSize(10).create());
+        params.put("estRemain", Texts.of(thickness.getEstRemain()).fontSize(10).create());
+        params.put("methodCause", Texts.of(thickness.getMethodCause()).fontSize(10).create());
+        params.put("effectTracing", Texts.of(thickness.getEffectTracing()).fontSize(10).create());
+        params.put("raiser", Texts.of(thickness.getRaiser()).fontSize(10).create());
+        params.put("raiserDate", Texts.of(DateUtils.dateTime(thickness.getRaiserDate())).fontSize(10).create());
+        params.put("inspectionMethod", Texts.of(thickness.getInspectionMethod()).fontSize(10).create());
+
+
+        if (StringUtils.isNotEmpty(thickness.getLocationUrl())) {
+            String[] urlArr = thickness.getLocationUrl().split(",");
+            if (urlArr.length > 0) {
+                params.put("location1", Pictures.ofLocal(fileName(urlArr[0])).size(240, 240).create());
+            }
+            if (urlArr.length > 1) {
+                params.put("location2", Pictures.ofLocal(fileName(urlArr[1])).size(240, 240).create());
+            }
+            if (urlArr.length > 2) {
+                params.put("location3", Pictures.ofLocal(fileName(urlArr[2])).size(240, 240).create());
+            }
+        }
+        if (StringUtils.isNotEmpty(thickness.getPhoto())) {
+            String[] pArr = thickness.getPhoto().split(",");
+            if (pArr.length > 0) {
+                params.put("corrosion1", Pictures.ofLocal(fileName(pArr[0])).size(240, 240).create());
+            }
+            if (pArr.length > 1) {
+                params.put("corrosion2", Pictures.ofLocal(fileName(pArr[1])).size(240, 240).create());
+            }
+            if (pArr.length > 2) {
+                params.put("corrosion3", Pictures.ofLocal(fileName(pArr[2])).size(240, 240).create());
+            }
+        }
+        String trendUrl = "/" + getRecordUrl(thickness.getId()+"");
+        logger.info("trendUrl:" + trendUrl);
+        params.put("trend", Pictures.ofLocal(fileName(trendUrl)).size(600, 300).create());
+
+        //测量记录分行
+        List<TMeasureRecord> measureRecords = tMeasureRecordService.queryRecords(thickness.getId()+"");
+        RowRenderData[] rowList = new RowRenderData[measureRecords.size() + 1];
+        rowList[0] = Rows.of("日期Date", "数值Value").textColor("FFFFFF")
+                .bgColor("4472C4").center().create();
+        List rows = new ArrayList();
+        int i = 0;
+        for (TMeasureRecord m: measureRecords
+             ) {
+            i++;
+            rowList[i] = Rows.create(DateUtils.dateTime(m.getMeasureDate()),m.getMeasureValue()+"");
+        }
+
+        params.put("table", Tables.of(rowList).create());
+        // 渲染文本
+        return params;
+    }
+
+    /**
+     * @param templatePath word模板文件路径
+     * @param fileDir      生成的文件存放地址
+     * @param fileName     生成的文件名
+     * @param paramMap     参数集合
+     * @return 返回word生成的路径
+     */
+    public String createWord(String templatePath, String fileDir, String fileName, Map<String, Object> paramMap) throws IOException {
+        Assert.notNull(templatePath, "word模板文件路径不能为空");
+        Assert.notNull(fileDir, "生成的文件存放地址不能为空");
+        Assert.notNull(fileName, "生成的文件名不能为空");
+        File dir = new File(fileDir);
+        if (!dir.exists()) {
+            logger.info("目录不存在,创建文件夹{}!", fileDir);
+            dir.mkdirs();
+        }
+        fileName = fileName.replaceAll("/", "_"); //替换文件中敏感字段
+        logger.info("目录文件{}!", fileName);
+        String filePath = fileDir + "/" + fileName;
+        logger.info("目录{}!", filePath);
+        // 读取模板渲染参数
+        InputStream is = getClass().getClassLoader().getResourceAsStream(templatePath);
+        XWPFTemplate template = XWPFTemplate.compile(is).render(paramMap);
+        try {
+            // 将模板参数写入路径
+            template.writeToFile(filePath);
+            template.close();
+        } catch (Exception e) {
+            logger.error("生成word异常{}", e.getMessage());
+            e.printStackTrace();
+        }
+        String pathFileName = FileUploadUtils.getPathFileName(RuoYiConfig.getFilePath("/" + "sems/measure"), fileName);
+        return pathFileName;
+    }
+
+    /**
+     * @param
+     * @return 映射签名的文件名
+     * @throws IOException
+     */
+    public String fileName(String filepath) {
+        String newFilePath = filepath.replace("/profile", "");
+        String pathName = RuoYiConfig.getProfile() + newFilePath;
+        return pathName;
+    }
+
 }

+ 12 - 0
master/src/main/java/com/ruoyi/project/sems/domain/TMeasureRecord.java

@@ -58,6 +58,10 @@ public class TMeasureRecord extends BaseEntity
     @TableField(exist = false)
     private String plantCode;
 
+    /** 装置名称 */
+    @TableField(exist = false)
+    private String loopNo;
+
     /** 单元名称 */
     @TableField(exist = false)
     private String unitCode;
@@ -207,6 +211,14 @@ public class TMeasureRecord extends BaseEntity
         return measureDate;
     }
 
+    public String getLoopNo() {
+        return loopNo;
+    }
+
+    public void setLoopNo(String loopNo) {
+        this.loopNo = loopNo;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 2 - 2
master/src/main/resources/mybatis/sems/TMeasureLoopMapper.xml

@@ -24,8 +24,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectTMeasureLoopList" parameterType="TMeasureLoop" resultMap="TMeasureLoopResult">
         <include refid="selectTMeasureLoopVo"/>
         <where>
-            <if test="plantCode != null  and plantCode != ''"> and plant_code = #{plantCode}</if>
-            <if test="loopNo != null  and loopNo != ''"> and loop_no = #{loopNo}</if>
+            <if test="plantCode != null  and plantCode != ''"> and plant_code like concat(concat('%', #{plantCode}), '%')</if>
+            <if test="loopNo != null  and loopNo != ''"> and loop_no like concat(concat('%', #{loopNo}), '%')</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->

+ 165 - 104
master/src/main/resources/mybatis/sems/TMeasureThicknessMapper.xml

@@ -1,109 +1,162 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.project.sems.mapper.TMeasureThicknessMapper">
 
     <resultMap type="TMeasureThickness" id="TMeasureThicknessResult">
-        <result property="id"    column="id"    />
-        <result property="plantCode"    column="plant_code"    />
-        <result property="unitCode"    column="unit_code"    />
-        <result property="tagno"    column="tagno"    />
-        <result property="status"    column="status"    />
-        <result property="createdate"    column="createdate"    />
-        <result property="updaterCode"    column="updater_code"    />
-        <result property="updatedate"    column="updatedate"    />
-        <result property="deptId"    column="dept_id"    />
-        <result property="remarks"    column="remarks"    />
-        <result property="position"    column="position"    />
-        <result property="recorder"    column="recorder"    />
-        <result property="recorderDate"    column="recorder_date"    />
-        <result property="equipmentName"    column="equipment_name"    />
-        <result property="material"    column="material"    />
-        <result property="corAllowance"    column="cor_allowance"    />
-        <result property="originalThickness"    column="original_thickness"    />
-        <result property="medium"    column="medium"    />
-        <result property="pressure"    column="pressure"    />
-        <result property="specification"    column="specification"    />
-        <result property="flowRate"    column="flow_rate"    />
-        <result property="temperature"    column="temperature"    />
-        <result property="corrosionType"    column="corrosion_type"    />
-        <result property="inspectionMethod"    column="inspection_method"    />
-        <result property="photo"    column="photo"    />
-        <result property="analysis"    column="analysis"    />
-        <result property="nominalTickness"    column="nominal_tickness"    />
-        <result property="thicknessMin"    column="thickness_min"    />
-        <result property="stCorrosion"    column="st_corrosion"    />
-        <result property="ltCorrosion"    column="lt_corrosion"    />
-        <result property="estRemain"    column="est_remain"    />
-        <result property="methodCause"    column="method_cause"    />
-        <result property="effectTracing"    column="effect_tracing"    />
-        <result property="raiser"    column="raiser"    />
-        <result property="raiserDate"    column="raiser_date"    />
-        <result property="delFlag"    column="del_flag"    />
-        <result property="locationUrl"    column="location_url"    />
-        <result property="analysisUrl"    column="analysis_url"    />
-        <result property="measureCycle"    column="measure_cycle"    />
-        <result property="recordUrl"    column="record_url"    />
-        <result property="otherContent"    column="other_content"    />
-        <result property="measureNo"    column="measure_no"    />
-        <result property="nextWarnDate"    column="next_warn_date"    />
-        <result property="isSend"    column="is_send"    />
-        <result property="deptName" column="dept_name" />
-        <result property="loopNo"    column="loop_no"    />
-        <result property="installDate"    column="install_date"    />
-
-        <result property="checkUrl"    column="check_url"    />
-
-        <result property="singleUrl"    column="single_url"    />
+        <result property="id" column="id"/>
+        <result property="plantCode" column="plant_code"/>
+        <result property="unitCode" column="unit_code"/>
+        <result property="tagno" column="tagno"/>
+        <result property="status" column="status"/>
+        <result property="createdate" column="createdate"/>
+        <result property="updaterCode" column="updater_code"/>
+        <result property="updatedate" column="updatedate"/>
+        <result property="deptId" column="dept_id"/>
+        <result property="remarks" column="remarks"/>
+        <result property="position" column="position"/>
+        <result property="recorder" column="recorder"/>
+        <result property="recorderDate" column="recorder_date"/>
+        <result property="equipmentName" column="equipment_name"/>
+        <result property="material" column="material"/>
+        <result property="corAllowance" column="cor_allowance"/>
+        <result property="originalThickness" column="original_thickness"/>
+        <result property="medium" column="medium"/>
+        <result property="pressure" column="pressure"/>
+        <result property="specification" column="specification"/>
+        <result property="flowRate" column="flow_rate"/>
+        <result property="temperature" column="temperature"/>
+        <result property="corrosionType" column="corrosion_type"/>
+        <result property="inspectionMethod" column="inspection_method"/>
+        <result property="photo" column="photo"/>
+        <result property="analysis" column="analysis"/>
+        <result property="nominalTickness" column="nominal_tickness"/>
+        <result property="thicknessMin" column="thickness_min"/>
+        <result property="stCorrosion" column="st_corrosion"/>
+        <result property="ltCorrosion" column="lt_corrosion"/>
+        <result property="estRemain" column="est_remain"/>
+        <result property="methodCause" column="method_cause"/>
+        <result property="effectTracing" column="effect_tracing"/>
+        <result property="raiser" column="raiser"/>
+        <result property="raiserDate" column="raiser_date"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="locationUrl" column="location_url"/>
+        <result property="analysisUrl" column="analysis_url"/>
+        <result property="measureCycle" column="measure_cycle"/>
+        <result property="recordUrl" column="record_url"/>
+        <result property="otherContent" column="other_content"/>
+        <result property="measureNo" column="measure_no"/>
+        <result property="nextWarnDate" column="next_warn_date"/>
+        <result property="isSend" column="is_send"/>
+        <result property="deptName" column="dept_name"/>
+        <result property="loopNo" column="loop_no"/>
+        <result property="installDate" column="install_date"/>
+        <result property="checkUrl" column="check_url"/>
+        <result property="singleUrl" column="single_url"/>
 
     </resultMap>
 
     <sql id="selectTMeasureThicknessVo">
-        select d.id,d.next_warn_date, d.plant_code, d.unit_code,d.loop_no, d.tagno, d.status, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.position, d.recorder, d.recorder_date, d.equipment_name, d.material, d.cor_allowance, d.original_thickness, d.medium, d.pressure, d.specification, d.flow_rate, d.temperature, d.corrosion_type, d.inspection_method, d.photo, d.analysis, d.nominal_tickness, d.thickness_min, d.st_corrosion, d.lt_corrosion, d.est_remain, d.method_cause, d.effect_tracing, d.raiser, d.raiser_date, d.del_flag, d.location_url, d.analysis_url, d.measure_cycle, d.record_url, d.other_content ,d.measure_no, d.is_send,d.install_date, d.check_url, d.single_url ,s.dept_name from t_measure_thickness d
-      left join sys_dept s on s.dept_id = d.dept_id
+        select d.id,
+               d.next_warn_date,
+               d.plant_code,
+               d.unit_code,
+               d.loop_no,
+               d.tagno,
+               d.status,
+               d.createdate,
+               d.updater_code,
+               d.updatedate,
+               d.dept_id,
+               d.remarks,
+               d.position,
+               d.recorder,
+               d.recorder_date,
+               d.equipment_name,
+               d.material,
+               d.cor_allowance,
+               d.original_thickness,
+               d.medium,
+               d.pressure,
+               d.specification,
+               d.flow_rate,
+               d.temperature,
+               d.corrosion_type,
+               d.inspection_method,
+               d.photo,
+               d.analysis,
+               d.nominal_tickness,
+               d.thickness_min,
+               d.st_corrosion,
+               d.lt_corrosion,
+               d.est_remain,
+               d.method_cause,
+               d.effect_tracing,
+               d.raiser,
+               d.raiser_date,
+               d.del_flag,
+               d.location_url,
+               d.analysis_url,
+               d.measure_cycle,
+               d.record_url,
+               d.other_content,
+               d.measure_no,
+               d.is_send,
+               d.install_date,
+               d.check_url,
+               d.single_url,
+               s.dept_name
+        from t_measure_thickness d
+                 left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
     <select id="selectTMeasureThicknessList" parameterType="TMeasureThickness" resultMap="TMeasureThicknessResult">
         <include refid="selectTMeasureThicknessVo"/>
         <where>
-            <if test="plantCode != null  and plantCode != ''"> and plant_code = #{plantCode}</if>
-            <if test="unitCode != null  and unitCode != ''"> and unit_code = #{unitCode}</if>
-            <if test="tagno != null  and tagno != ''"> and tagno = #{tagno}</if>
-            <if test="status != null "> and status = #{status}</if>
-            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
-            <if test="position != null  and position != ''"> and position = #{position}</if>
-            <if test="recorder != null  and recorder != ''"> and recorder = #{recorder}</if>
-            <if test="recorderDate != null "> and recorder_date = #{recorderDate}</if>
-            <if test="equipmentName != null  and equipmentName != ''"> and equipment_name like concat(concat('%', #{equipmentName}), '%')</if>
-            <if test="material != null  and material != ''"> and material = #{material}</if>
-            <if test="corAllowance != null  and corAllowance != ''"> and cor_allowance = #{corAllowance}</if>
-            <if test="originalThickness != null  and originalThickness != ''"> and original_thickness = #{originalThickness}</if>
-            <if test="medium != null  and medium != ''"> and medium = #{medium}</if>
-            <if test="pressure != null  and pressure != ''"> and pressure = #{pressure}</if>
-            <if test="specification != null  and specification != ''"> and specification = #{specification}</if>
-            <if test="flowRate != null  and flowRate != ''"> and flow_rate = #{flowRate}</if>
-            <if test="temperature != null  and temperature != ''"> and temperature = #{temperature}</if>
-            <if test="corrosionType != null  and corrosionType != ''"> and corrosion_type = #{corrosionType}</if>
-            <if test="inspectionMethod != null  and inspectionMethod != ''"> and inspection_method = #{inspectionMethod}</if>
-            <if test="photo != null  and photo != ''"> and photo = #{photo}</if>
-            <if test="analysis != null  and analysis != ''"> and analysis = #{analysis}</if>
-            <if test="nominalTickness != null  and nominalTickness != ''"> and nominal_tickness = #{nominalTickness}</if>
-            <if test="thicknessMin != null  and thicknessMin != ''"> and thickness_min = #{thicknessMin}</if>
-            <if test="stCorrosion != null  and stCorrosion != ''"> and st_corrosion = #{stCorrosion}</if>
-            <if test="ltCorrosion != null  and ltCorrosion != ''"> and lt_corrosion = #{ltCorrosion}</if>
-            <if test="estRemain != null  and estRemain != ''"> and est_remain = #{estRemain}</if>
-            <if test="methodCause != null  and methodCause != ''"> and method_cause = #{methodCause}</if>
-            <if test="effectTracing != null  and effectTracing != ''"> and effect_tracing = #{effectTracing}</if>
-            <if test="raiser != null  and raiser != ''"> and raiser = #{raiser}</if>
-            <if test="raiserDate != null "> and raiser_date = #{raiserDate}</if>
-            <if test="locationUrl != null  and locationUrl != ''"> and location_url = #{locationUrl}</if>
-            <if test="analysisUrl != null  and analysisUrl != ''"> and analysis_url = #{analysisUrl}</if>
-            <if test="measureCycle != null  and measureCycle != ''"> and measure_cycle = #{measureCycle}</if>
-            <if test="recordUrl != null  and recordUrl != ''"> and record_url = #{recordUrl}</if>
-            <if test="otherContent != null  and otherContent != ''"> and other_content = #{otherContent}</if>
-            <if test="loopNo != null  and loopNo != ''"> and loop_no = #{loopNo}</if>
-            <if test="installDate != null "> and install_date = #{installDate}</if>
+            <if test="plantCode != null  and plantCode != ''">and plant_code = #{plantCode}</if>
+            <if test="unitCode != null  and unitCode != ''">and unit_code = #{unitCode}</if>
+            <if test="tagno != null  and tagno != ''">and tagno = #{tagno}</if>
+            <if test="status != null ">and status = #{status}</if>
+            <if test="remarks != null  and remarks != ''">and remarks = #{remarks}</if>
+            <if test="position != null  and position != ''">and position = #{position}</if>
+            <if test="recorder != null  and recorder != ''">and recorder = #{recorder}</if>
+            <if test="recorderDate != null ">and recorder_date = #{recorderDate}</if>
+            <if test="equipmentName != null  and equipmentName != ''">and equipment_name like concat(concat('%',
+                #{equipmentName}), '%')
+            </if>
+            <if test="material != null  and material != ''">and material = #{material}</if>
+            <if test="corAllowance != null  and corAllowance != ''">and cor_allowance = #{corAllowance}</if>
+            <if test="originalThickness != null  and originalThickness != ''">and original_thickness =
+                #{originalThickness}
+            </if>
+            <if test="medium != null  and medium != ''">and medium = #{medium}</if>
+            <if test="pressure != null  and pressure != ''">and pressure = #{pressure}</if>
+            <if test="specification != null  and specification != ''">and specification = #{specification}</if>
+            <if test="flowRate != null  and flowRate != ''">and flow_rate = #{flowRate}</if>
+            <if test="temperature != null  and temperature != ''">and temperature = #{temperature}</if>
+            <if test="corrosionType != null  and corrosionType != ''">and corrosion_type = #{corrosionType}</if>
+            <if test="inspectionMethod != null  and inspectionMethod != ''">and inspection_method =
+                #{inspectionMethod}
+            </if>
+            <if test="photo != null  and photo != ''">and photo = #{photo}</if>
+            <if test="analysis != null  and analysis != ''">and analysis = #{analysis}</if>
+            <if test="nominalTickness != null  and nominalTickness != ''">and nominal_tickness = #{nominalTickness}</if>
+            <if test="thicknessMin != null  and thicknessMin != ''">and thickness_min = #{thicknessMin}</if>
+            <if test="stCorrosion != null  and stCorrosion != ''">and st_corrosion = #{stCorrosion}</if>
+            <if test="ltCorrosion != null  and ltCorrosion != ''">and lt_corrosion = #{ltCorrosion}</if>
+            <if test="estRemain != null  and estRemain != ''">and est_remain = #{estRemain}</if>
+            <if test="methodCause != null  and methodCause != ''">and method_cause = #{methodCause}</if>
+            <if test="effectTracing != null  and effectTracing != ''">and effect_tracing = #{effectTracing}</if>
+            <if test="raiser != null  and raiser != ''">and raiser = #{raiser}</if>
+            <if test="raiserDate != null ">and raiser_date = #{raiserDate}</if>
+            <if test="locationUrl != null  and locationUrl != ''">and location_url = #{locationUrl}</if>
+            <if test="analysisUrl != null  and analysisUrl != ''">and analysis_url = #{analysisUrl}</if>
+            <if test="measureCycle != null  and measureCycle != ''">and measure_cycle = #{measureCycle}</if>
+            <if test="recordUrl != null  and recordUrl != ''">and record_url = #{recordUrl}</if>
+            <if test="otherContent != null  and otherContent != ''">and other_content = #{otherContent}</if>
+            <if test="loopNo != null  and loopNo != ''">and loop_no = #{loopNo}</if>
+            <if test="installDate != null ">and install_date = #{installDate}</if>
             <if test="searchValue != null  and searchValue != ''">
                 and
                 (plant_code like concat(concat('%', #{searchValue}), '%')
@@ -137,24 +190,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectByTagNo" resultType="Long">
         select id from t_measure_thickness
-            <where>
-                del_flag = 0
-                <if test="tagno != null  and tagno != ''"> and tagno = #{tagno}</if>
-                <if test="position != null  and position != ''"> and position = #{position}</if>
-            </where>
+        <where>
+            del_flag = 0
+            <if test="tagno != null  and tagno != ''">and tagno = #{tagno}</if>
+            <if test="position != null  and position != ''">and position = #{position}</if>
+        </where>
 
     </select>
 
     <select id="selectByRecord" resultType="Long" parameterType="TMeasureRecord">
+        select id from (
         select id from t_measure_thickness
         <where>
             del_flag = 0
-            <if test="plantCode != null  and plantCode != ''"> and plant_code = #{plantCode}</if>
-            <if test="unitCode != null  and unitCode != ''"> and unit_code = #{unitCode}</if>
-            <if test="tagno != null  and tagno != ''"> and tagno = #{tagno}</if>
-            <if test="position != null  and position != ''"> and position = #{position}</if>
+            <if test="plantCode != null  and plantCode != ''">and plant_code = #{plantCode}</if>
+            <if test="unitCode != null  and unitCode != ''">and unit_code = #{unitCode}</if>
+            <if test="tagno != null  and tagno != ''">and tagno = #{tagno}</if>
+            <if test="position != null  and position != ''">and position = #{position}</if>
+            <if test="measureNo != null  and measureNo != ''">and measure_no = #{measureNo}</if>
         </where>
-
+        order by id desc
+        )
+        where rownum = 1
     </select>
 
     <insert id="insertTMeasureThickness" parameterType="TMeasureThickness">
@@ -280,7 +337,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="equipmentName != null and equipmentName != ''">equipment_name = #{equipmentName},</if>
             <if test="material != null and material != ''">material = #{material},</if>
             <if test="corAllowance != null and corAllowance != ''">cor_allowance = #{corAllowance},</if>
-            <if test="originalThickness != null and originalThickness != ''">original_thickness = #{originalThickness},</if>
+            <if test="originalThickness != null and originalThickness != ''">original_thickness =
+                #{originalThickness},
+            </if>
             <if test="medium != null and medium != ''">medium = #{medium},</if>
             <if test="pressure != null and pressure != ''">pressure = #{pressure},</if>
             <if test="specification != null and specification != ''">specification = #{specification},</if>
@@ -317,7 +376,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </update>
 
     <update id="deleteTMeasureThicknessById" parameterType="Long">
-        update t_measure_thickness set del_flag = 2 where id = #{id}
+        update t_measure_thickness
+        set del_flag = 2
+        where id = #{id}
     </update>
 
     <update id="deleteTMeasureThicknessByIds" parameterType="String">

BIN
master/src/main/resources/static/template/sems/thicknessData.xlsx


BIN
master/src/main/resources/static/word/sems/measure/cehou.docx


+ 8 - 0
ui/src/api/sems/thickness.js

@@ -9,6 +9,14 @@ export function listThickness(query) {
   })
 }
 
+//获取word url
+export function wordView(id) {
+  return request({
+    url: '/sems/thickness/wordView/' + id,
+    method: 'get',
+  })
+}
+
 // 查询定点测厚详细
 export function getThickness(id) {
   return request({

+ 1 - 1
ui/src/views/plant/targetmeasures/index.vue

@@ -393,7 +393,7 @@
         },
         //人员表查询参数
         staffmgrQueryParams: {
-          actualposts: "12,14,16,18,20,24,26,36",
+          actualposts: "12,14,16,18,20,22,24,26,36",
           leftYear: null
         },
         staffmgrPrincipal: {

+ 2 - 1596
ui/src/views/sems/thickness/index.vue

@@ -1,1597 +1,3 @@
-<template>
-  <div class="app-container">
-
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px">
-      <el-form-item :label="$t('装置名称')" prop="plantCode">
-        <el-select v-model="queryParams.plantCode" @change="handleLoop" :placeholder="$t('请选择') + $t('装置')" filterable clearable size="small">
-          <el-option
-            v-for="dict in plantOptions"
-            :key="dict.name"
-            :label="dict.name"
-            :value="dict.name"
-          />
-        </el-select>
-      </el-form-item>
-      <el-form-item :label="$t('腐蚀回路图')" prop="loopNo">
-        <el-select v-model="queryParams.loopNo" @change="handleQuery" placeholder="请选择腐蚀回路图号" filterable clearable size="small">
-          <el-option
-            v-for="dict in loopOptions"
-            :key="dict.loopNo"
-            :label="dict.loopNo"
-            :value="dict.loopNo"
-          />
-        </el-select>
-      </el-form-item>
-      <el-form-item :label="$t('单元名称')" prop="unitCode">
-        <el-input
-          v-model="queryParams.unitCode"
-          :placeholder="$t('请输入') + $t('单元名称')"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-
-      <el-form-item :label="$t('单位内编号')" prop="tagno">
-        <el-input
-          v-model="queryParams.tagno"
-          :placeholder="$t('请输入') + $t('单位内编号')"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-
-      <el-form-item :label="$t('测厚部位CML')" prop="position">
-        <el-input
-          v-model="queryParams.position"
-          :placeholder="$t('请输入') + $t('测厚部位CML')"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item :label="$t('关键字')" prop="searchValue" label-width="50">
-        <el-input
-          v-model="queryParams.searchValue"
-          :placeholder="$t('请输入') + $t('关键字')"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item>
-        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('搜索') }}</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('重置') }}</el-button>
-      </el-form-item>
-    </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['sems:thickness:add']"
-        >{{ $t('新增') }}</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['sems:thickness:edit']"
-        >{{ $t('修改') }}</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['sems:thickness:remove']"
-        >{{ $t('删除') }}</el-button>
-      </el-col>
-
-      <el-col :span="1.5">
-        <el-button
-          type="info"
-          icon="el-icon-upload2"
-          size="mini"
-          @click="handleImportData"
-          v-hasPermi="['sems:thickness:add']"
-        >{{$t('导入')}}
-        </el-button>
-      </el-col>
-
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['sems:thickness:export']"
-        >{{ $t('导出') }}</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="info"
-          icon="el-icon-upload2"
-          size="mini"
-          @click="handleImport"
-          v-hasPermi="['sems:thickness:edit']"
-        >{{$t('更新数据')}}
-        </el-button>
-      </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
-
-    <el-table v-loading="loading" :data="thicknessList" @selection-change="handleSelectionChange" :cell-style="tableCellStyle" :height="clientHeight" border>
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column :label="$t('装置名称')" align="center" prop="plantCode" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('单元名称')" align="center" prop="unitCode" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('腐蚀回路图号')" align="center" prop="loopNo" :show-overflow-tooltip="true">
-        <template slot-scope="scope">
-          <a style="text-decoration: underline;" class="link-type" @click="handleSee(scope.row)" > {{ scope.row.loopNo }} </a>
-        </template>
-      </el-table-column>
-
-      <el-table-column :label="$t('单位内编号')" align="center" prop="tagno" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('状态')" align="center" prop="status" :formatter="statusFormat" />
-      <el-table-column :label="$t('测厚部位CML')" align="center" prop="position" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('检测编号')" align="center" prop="measureNo" :show-overflow-tooltip="true"/>
-
-      <!--      <el-table-column label="记录人" align="center" prop="recorder" :show-overflow-tooltip="true"/>-->
-<!--      <el-table-column label="记录时间" align="center" prop="recorderDate" width="100">-->
-<!--        <template slot-scope="scope">-->
-<!--          <span>{{ parseTime(scope.row.recorderDate, '{y}-{m}-{d}') }}</span>-->
-<!--        </template>-->
-<!--      </el-table-column>-->
-      <el-table-column :label="$t('设备/管线名称')" align="center" prop="equipmentName" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('材质')" align="center" prop="material" :show-overflow-tooltip="true"/>
-<!--      <el-table-column label="腐蚀裕度" align="center" prop="corAllowance" :show-overflow-tooltip="true"/>-->
-<!--      <el-table-column label="原始壁厚" align="center" prop="originalThickness" :show-overflow-tooltip="true"/>-->
-<!--      <el-table-column label="介质" align="center" prop="medium" :show-overflow-tooltip="true"/>-->
-<!--      <el-table-column label="压力" align="center" prop="pressure" :show-overflow-tooltip="true"/>-->
-<!--      <el-table-column label="规格" align="center" prop="specification" :show-overflow-tooltip="true"/>-->
-<!--      <el-table-column label="流速" align="center" prop="flowRate" :show-overflow-tooltip="true"/>-->
-<!--      <el-table-column label="温度" align="center" prop="temperature" :show-overflow-tooltip="true"/>-->
-<!--      <el-table-column label="腐蚀类型" align="center" prop="corrosionType" :show-overflow-tooltip="true"/>-->
-<!--      <el-table-column label="腐蚀照片" align="center" prop="photo" :show-overflow-tooltip="true"/>-->
-<!--      <el-table-column label="原因分析" align="center" prop="analysis" :show-overflow-tooltip="true"/>-->
-      <el-table-column :label="$t('公称壁厚(mm)')" align="center" prop="nominalTickness" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('最小允许壁厚(mm)')" align="center" prop="thicknessMin" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('短期腐蚀速率(mm/year)')" align="center" prop="stCorrosion" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('长期腐蚀速率(mm/year)')" align="center" prop="ltCorrosion" :show-overflow-tooltip="true"/>
-      <el-table-column
-        prop="measureCycle"
-        header-align="center"
-        align="center"
-        :label="$t('测厚周期(月)')">
-      </el-table-column>
-      <el-table-column
-        prop="installDate"
-        header-align="center"
-        align="center"
-        :label="$t('安装日期')">
-      </el-table-column>
-      <el-table-column
-        prop="firstMeasureDate"
-        header-align="center"
-        align="center"
-        :label="$t('首次测厚日期')">
-      </el-table-column>
-      <el-table-column
-        prop="newMeasureDate"
-        header-align="center"
-        align="center"
-        :label="$t('最近测厚日期')">
-      </el-table-column>
-<!--      <el-table-column
-        prop="measureCycle"
-        header-align="center"
-        align="center"
-        :label="$t('测厚周期(year)')">
-      </el-table-column>
-      <el-table-column
-        prop="nextMeasureDate"
-        header-align="center"
-        align="center"
-        :label="$t('下次测厚日期')">
-      </el-table-column>-->
-      <el-table-column :label="$t('预估剩余寿命(year)')" align="center" prop="estRemain" :show-overflow-tooltip="true">
-        <template slot-scope="scope">
-          <span v-if="scope.row.estRemain"> {{ scope.row.estRemain }}</span>
-          <span v-else-if="!scope.row.thicknessMin">缺少最小允许壁厚</span>
-        </template>
-      </el-table-column>
-      <el-table-column
-        prop="nextWarnDate"
-        header-align="center"
-        align="center"
-        :label="$t('下次测厚日期')">
-      </el-table-column>
-      <el-table-column :label="$t('检测方法')" align="center" prop="inspectionMethod" :formatter="inspectionMethodFormat" />
-      <el-table-column :label="$t('操作')" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
-        <template slot-scope="scope">
-          <el-button type="text" size="small" @click="handleView(scope.row)">{{ $t('查看') }}</el-button>
-          <el-button type="text" size="small" @click="recordHandle(scope.row)">{{ $t('测厚记录') }}</el-button>
-          <el-button type="text" size="small" @click="downloadHandle(scope.row)">{{ $t('下载报告') }}</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-    <form ref="downloadForm" :action="downloadAction" target="FORMSUBMIT">
-      <input name="id" v-model="downloadForm.id"  hidden  />
-    </form>
-    <pagination
-      v-show="total>0"
-      :total="total"
-             :page.sync="queryParams.pageNum"
-      :page-sizes="[20,100,300,500]"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!-- 添加或修改定点测厚对话框 -->
-    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="open" width="70%" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
-        <el-row>
-          <el-col :span="6">
-          <el-form-item :label="$t('装置名称')" prop="plantCode">
-            <el-select v-model="form.plantCode" :placeholder="$t('请选择') + $t('装置')" filterable clearable size="small">
-              <el-option
-                v-for="dict in plantOptions"
-                :key="dict.name"
-                :label="dict.name"
-                :value="dict.name"
-              />
-            </el-select>
-          </el-form-item>
-          </el-col>
-          <el-col :span="6">
-          <el-form-item :label="$t('单元名称')" prop="unitCode">
-            <el-input v-model="form.unitCode" :placeholder="$t('请输入') + $t('单元名称')" />
-          </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="腐蚀回路图号" prop="loopNo">
-              <el-input v-model="form.loopNo" placeholder="请输入腐蚀回路图号" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-          <el-form-item :label="$t('单位内编号')" prop="tagno">
-            <el-input v-model="form.tagno" :placeholder="$t('请输入') + $t('单位内编号')" />
-          </el-form-item>
-          </el-col>
-      </el-row>
-        <el-row>
-          <el-col :span="6">
-            <el-form-item :label="$t('测厚部位CML')" prop="position">
-              <el-input v-model="form.position" :placeholder="$t('请输入') + $t('测厚部位CML')" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item :label="$t('安装日期')" prop="installDate" >
-              <el-date-picker clearable size="mini"
-                              style="width: 100%;"
-                              v-model="form.installDate"
-                              type="date"
-                              value-format="yyyy-MM-dd"
-                              :placeholder="$t('请选择') + $t('安装日期')">
-              </el-date-picker>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item :label="$t('记录人')" prop="recorder">
-              <el-input v-model="form.recorder" :placeholder="$t('请输入') + $t('记录人')" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item :label="$t('记录时间')" prop="recorderDate" >
-              <el-date-picker clearable size="mini"
-                              v-model="form.recorderDate"
-                              type="date"
-                              style="width: 100%;"
-                              value-format="yyyy-MM-dd"
-                              :placeholder="$t('请选择') + $t('记录时间')">
-              </el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="8">
-        <el-form-item :label="$t('设备/管线名称')" prop="equipmentName">
-          <el-input v-model="form.equipmentName" :placeholder="$t('请输入') + $t('设备/管线名称')" />
-        </el-form-item>
-          </el-col>
-          <el-col :span="8">
-        <el-form-item :label="$t('材质')" prop="material">
-          <el-input v-model="form.material" :placeholder="$t('请输入') + $t('材质')" />
-        </el-form-item>
-          </el-col>
-          <el-col :span="8">
-        <el-form-item :label="$t('腐蚀裕度(mm)')" prop="corAllowance">
-          <el-input v-model="form.corAllowance" :placeholder="$t('请输入') + $t('腐蚀裕度(mm)')" />
-        </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="8">
-        <el-form-item :label="$t('原始壁厚(mm)')" prop="originalThickness">
-          <el-input v-model="form.originalThickness" :placeholder="$t('请输入') + $t('原始壁厚(mm)')" />
-        </el-form-item>
-          </el-col>
-          <el-col :span="8">
-        <el-form-item :label="$t('介质')" prop="medium">
-          <el-input v-model="form.medium" :placeholder="$t('请输入') + $t('介质')" />
-        </el-form-item>
-          </el-col>
-          <el-col :span="8">
-        <el-form-item :label="$t('压力(MPa)')" prop="pressure">
-          <el-input v-model="form.pressure" :placeholder="$t('请输入') + $t('压力(MPa)')" />
-        </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="8">
-        <el-form-item :label="$t('规格')" prop="specification">
-          <el-input v-model="form.specification" :placeholder="$t('请输入') + $t('规格')" />
-        </el-form-item>
-          </el-col>
-          <el-col :span="8">
-        <el-form-item :label="$t('流速(m/s)')" prop="flowRate">
-          <el-input v-model="form.flowRate" :placeholder="$t('请输入') + $t('流速(m/s)')" />
-        </el-form-item>
-          </el-col>
-          <el-col :span="8">
-        <el-form-item :label="$t('温度(℃)')" prop="temperature">
-          <el-input v-model="form.temperature" :placeholder="$t('请输入') + $t('温度(℃)')" />
-        </el-form-item>
-          </el-col>
-        </el-row>
-
-        <el-form-item :label="$t('状态')">
-          <el-radio-group v-model="form.status">
-            <el-radio
-              v-for="dict in statusOptions"
-              :key="dict.dictValue"
-              :label="parseInt(dict.dictValue)"
-            >{{dict.dictLabel}}</el-radio>
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item :label="$t('测厚位置')"  prop="checkUrl">
-          <el-upload
-            :action="check.url"
-            :headers="check.headers"
-            :file-list="locationList"
-            :limit="3"
-            :on-success="handleAvatarSuccess"
-            :on-exceed="handleExceed"
-            :before-upload="beforeAvatarUpload"
-            list-type="picture-card"
-            :on-preview="handlePictureCardPreview"
-            :on-remove="handleRemove">
-            <i class="el-icon-plus"></i>
-          </el-upload>
-          <el-dialog  :close-on-click-modal="false" v-dialogDrag :visible.sync="dialogVisible" append-to-body>
-            <img width="100%" :src="dialogImageUrl" alt="">
-          </el-dialog>
-        </el-form-item>
-        <el-form-item :label="$t('腐蚀位置')"  prop="locationUrl">
-          <el-upload
-            :action="locationpic.url"
-            :headers="locationpic.headers"
-            :file-list="locationList"
-            :limit="3"
-            :on-success="handleAvatarSuccess"
-            :on-exceed="handleExceed"
-            :before-upload="beforeAvatarUpload"
-            list-type="picture-card"
-            :on-preview="handlePictureCardPreview"
-            :on-remove="handleRemove">
-            <i class="el-icon-plus"></i>
-          </el-upload>
-          <el-dialog  :close-on-click-modal="false" v-dialogDrag :visible.sync="dialogVisible" append-to-body>
-            <img width="100%" :src="dialogImageUrl" alt="">
-          </el-dialog>
-        </el-form-item>
-        <el-form-item :label="$t('检测方法')">
-          <el-checkbox-group v-model="form.inspectionMethod">
-            <el-checkbox
-              v-for="dict in inspectionMethodOptions"
-              :key="dict.dictValue"
-              :label="dict.dictValue">
-              {{dict.dictLabel}}
-            </el-checkbox>
-          </el-checkbox-group>
-          <el-input :placeholder="$t('请输入') + $t('其他')+ $t('空格')+ $t('检测方法')" class="otherMethod" v-if="form.inspectionMethod == 5" v-model="form.otherContent"></el-input>
-        </el-form-item>
-        <el-form-item :label="$t('腐蚀照片')"  prop="photo">
-          <el-upload
-            :action="photo.url"
-            :headers="photo.headers"
-            :file-list="photoList"
-            :limit="3"
-            :on-success="handleAvatarSuccess2"
-            :on-exceed="handleExceed"
-            :before-upload="beforeAvatarUpload"
-            list-type="picture-card"
-            :on-preview="handlePictureCardPreview"
-            :on-remove="handleRemove2">
-            <i class="el-icon-plus"></i>
-          </el-upload>
-          <el-dialog  :close-on-click-modal="false" v-dialogDrag :visible.sync="dialogVisible" append-to-body>
-            <img width="100%" :src="dialogImageUrl" alt="">
-          </el-dialog>
-        </el-form-item>
-        <el-form-item :label="$t('原因分析')" prop="analysis">
-          <el-input v-model="form.analysis" :placeholder="$t('请输入') + $t('原因分析')" />
-        </el-form-item>
-        <el-row>
-          <el-col :span="8">
-        <el-form-item :label="$t('公称壁厚(mm)')" prop="nominalTickness">
-          <el-input v-model="form.nominalTickness" :placeholder="$t('请输入') + $t('名义壁厚(mm)')" />
-        </el-form-item>
-            <el-form-item :label="$t('原因分析附件')" prop="analysisUrl">
-              <el-upload
-                ref="analysis"
-                :limit="1"
-                :headers="analysis.headers"
-                :action="analysis.url"
-                :disabled="analysis.isUploading"
-                :on-progress="handleFileDocProgress"
-                :on-success="handleFileDocSuccess"
-                :auto-upload="true"
-                drag
-              >
-                <i class="el-icon-upload"></i>
-                <div class="el-upload__text">
-                  {{ $t('将文件拖到此处,或') }}
-                  <em>{{ $t('点击上传') }}</em>
-                </div>
-              </el-upload>
-            </el-form-item>
-          </el-col>
-          <el-col :span="16">
-        <el-form-item :label="$t('最小允许壁厚(mm)')" label-width="150px" prop="thicknessMin">
-          <el-input v-model="form.thicknessMin" :placeholder="$t('请输入') + $t('最小允许壁厚(mm)')" />
-        </el-form-item>
-          </el-col>
-        </el-row>
-        <el-form-item :label="$t('检测编号')" prop="measureNo">
-          <el-input v-model="form.measureNo" :placeholder="$t('请输入') + $t('检测编号')" />
-        </el-form-item>
-
-      <el-row>
-        <el-col :span="8">
-        <el-form-item :label="$t('短期腐蚀速率(mm/year)')" label-width="180px" prop="stCorrosion">
-          <el-input v-model="form.stCorrosion" :placeholder="$t('请输入') + $t('短期腐蚀速率(mm/year)')" />
-        </el-form-item>
-        </el-col>
-        <el-col :span="8">
-        <el-form-item :label="$t('长期腐蚀速率(mm/year)')" label-width="180px" prop="ltCorrosion">
-          <el-input v-model="form.ltCorrosion" :placeholder="$t('请输入') + $t('长期腐蚀速率(mm/year)')" />
-        </el-form-item>
-        </el-col>
-        <el-col :span="8">
-        <el-form-item :label="$t('预估剩余寿命(year)')" label-width="180px" prop="estRemain">
-          <el-input v-model="form.estRemain" :placeholder="$t('请输入') + $t('预估剩余寿命(year)')" />
-        </el-form-item>
-        </el-col>
-      </el-row>
-        <el-row>
-        <el-form-item :label="$t('治理方法及依据')" prop="methodCause">
-          <el-input v-model="form.methodCause" :placeholder="$t('请输入') + $t('治理方法及依据')" />
-        </el-form-item>
-        </el-row>
-        <el-form-item :label="$t('效果跟踪')" prop="effectTracing">
-          <el-input v-model="form.effectTracing" :placeholder="$t('请输入') + $t('效果跟踪')" />
-        </el-form-item>
-        <el-row>
-          <el-col :span="8">
-        <el-form-item :label="$t('提出人')" prop="raiser">
-          <el-input v-model="form.raiser" :placeholder="$t('请输入') + $t('提出人')" />
-        </el-form-item>
-          </el-col>
-          <el-col :span="16">
-        <el-form-item :label="$t('提出时间')" prop="raiserDate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.raiserDate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            :placeholder="$t('请选择') + $t('提出时间')">
-          </el-date-picker>
-        </el-form-item>
-          </el-col>
-        </el-row>
-
-        <el-row>
-          <el-col :span="12">
-            <el-form-item :label="$t('测厚周期(月)')" prop="remarks">
-              <el-input v-model="form.measureCycle" :placeholder="$t('请输入') + $t('测厚周期(月)')" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-        <el-form-item :label="$t('下次测厚日期')" prop="raiserDate">
-          <el-date-picker clearable size="small" style="width: 200px"
-                          v-model="form.nextWarnDate"
-                          type="date"
-                          value-format="yyyy-MM-dd"
-                          :placeholder="$t('请选择') + $t('下次测厚日期')">
-          </el-date-picker>
-        </el-form-item>
-          </el-col>
-        </el-row>
-        <el-form-item :label="$t('备注')" prop="remarks">
-          <el-input v-model="form.remarks" type="textarea" :placeholder="$t('请输入') + $t('内容')" />
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">{{ $t('确 定') }}</el-button>
-        <el-button @click="cancel">{{ $t('取 消') }}</el-button>
-      </div>
-    </el-dialog>
-    <el-dialog  :close-on-click-modal="false"
-      :title="$t('查看')"
-
-      width="1200px"
-      :visible.sync="visible">
-      <el-descriptions class="margin-top" :column="3" size="medium" border>
-        <el-descriptions-item>
-          <template slot="label">
-            {{ $t('装置名称') }}
-          </template>
-          {{ dataForm.plantCode }}
-        </el-descriptions-item>
-        <el-descriptions-item>
-          <template slot="label">
-            {{ $t('单元名称') }}
-          </template>
-          {{ dataForm.unitCode }}
-        </el-descriptions-item>
-        <el-descriptions-item>
-          <template slot="label">
-            {{ $t('单位内编号') }}
-          </template>
-          {{ dataForm.tagno }}
-        </el-descriptions-item>
-        <el-descriptions-item>
-          <template slot="label">
-            {{ $t('测厚部位CML') }}
-          </template>
-          {{ dataForm.position }}
-        </el-descriptions-item>
-        <el-descriptions-item>
-          <template slot="label">
-            {{ $t('记录人') }}
-          </template>
-          {{ dataForm.recorder }}
-        </el-descriptions-item>
-        <el-descriptions-item>
-          <template slot="label">
-            {{ $t('记录时间') }}
-          </template>
-          {{ dataForm.recorderDate }}
-        </el-descriptions-item>
-        <el-descriptions-item>
-          <template slot="label">
-            {{ $t('设备/管线名称') }}
-          </template>
-          {{ dataForm.equipmentName }}
-        </el-descriptions-item>
-        <el-descriptions-item>
-          <template slot="label">
-            {{ $t('材质') }}
-          </template>
-          {{ dataForm.material }}
-        </el-descriptions-item>
-        <el-descriptions-item>
-          <template slot="label">
-            {{ $t('腐蚀裕度(mm)') }}
-          </template>
-          {{ dataForm.corAllowance }}
-        </el-descriptions-item>
-        <el-descriptions-item>
-          <template slot="label">
-            {{ $t('原始壁厚(mm)') }}
-          </template>
-          {{ dataForm.originalThickness }}
-        </el-descriptions-item>
-        <el-descriptions-item>
-          <template slot="label">
-            {{ $t('介质') }}
-          </template>
-          {{ dataForm.medium }}
-        </el-descriptions-item>
-        <el-descriptions-item>
-          <template slot="label">
-            {{ $t('压力(MPa)') }}
-          </template>
-          {{ dataForm.pressure }}
-        </el-descriptions-item>
-        <el-descriptions-item>
-          <template slot="label">
-            {{ $t('规格') }}
-          </template>
-          {{ dataForm.specification }}
-        </el-descriptions-item>
-        <el-descriptions-item>
-          <template slot="label">
-            {{ $t('流速(m/s)') }}
-          </template>
-          {{ dataForm.flowRate }}
-        </el-descriptions-item>
-        <el-descriptions-item>
-          <template slot="label">
-            {{ $t('温度(℃)') }}
-          </template>
-          {{ dataForm.temperature }}
-        </el-descriptions-item>
-
-        <el-descriptions-item span="3">
-          <template slot="label">
-            {{ $t('腐蚀位置') }}
-          </template>
-          <el-upload
-            :action="locationpic.url"
-            :headers="locationpic.headers"
-            :file-list="locationList"
-            :limit="3"
-            :on-success="handleAvatarSuccess"
-            :on-exceed="handleExceed"
-            :before-upload="beforeAvatarUpload"
-            list-type="picture-card"
-            :on-preview="handlePictureCardPreview"
-            :on-remove="handleRemove">
-            <i class="el-icon-plus"></i>
-          </el-upload>
-        </el-descriptions-item>
-        <el-descriptions-item span="3">
-          <template slot="label">
-            {{ $t('检测方法') }}
-          </template>
-          <el-checkbox-group v-model="dataForm.inspectionMethod">
-            <el-checkbox
-              v-for="dict in inspectionMethodOptions"
-              :key="dict.dictValue"
-              :label="dict.dictValue">
-              {{dict.dictLabel}}
-            </el-checkbox>
-          </el-checkbox-group>
-          {{ dataForm.otherContent }}
-        </el-descriptions-item>
-        <el-descriptions-item span="3">
-          <template slot="label">
-            {{ $t('腐蚀照片') }}
-          </template>
-          <el-upload
-            :action="photo.url"
-            :headers="photo.headers"
-            :file-list="photoList"
-            :limit="3"
-            :on-success="handleAvatarSuccess2"
-            :on-exceed="handleExceed"
-            :before-upload="beforeAvatarUpload"
-            list-type="picture-card"
-            :on-preview="handlePictureCardPreview"
-            :on-remove="handleRemove2">
-            <i class="el-icon-plus"></i>
-          </el-upload>
-        </el-descriptions-item>
-        <el-descriptions-item span="3">
-          <template slot="label">
-            {{ $t('原因分析') }}
-          </template>
-          {{ dataForm.analysis }}
-        </el-descriptions-item>
-        <el-descriptions-item span="1">
-          <template slot="label">
-            {{ $t('公称壁厚(mm)') }}
-          </template>
-          {{ dataForm.nominalTickness }}
-        </el-descriptions-item>
-        <el-descriptions-item span="2">
-          <template slot="label">
-            {{ $t('最小允许壁厚(mm)') }}
-          </template>
-          {{ dataForm.thicknessMin }}
-        </el-descriptions-item>
-        <el-descriptions-item span="1">
-          <template slot="label">
-            {{ $t('短期腐蚀速率(mm/year)') }}
-          </template>
-          {{ dataForm.stCorrosion }}
-        </el-descriptions-item>
-        <el-descriptions-item span="1">
-          <template slot="label">
-            {{ $t('长期腐蚀速率(mm/year)') }}
-          </template>
-          {{ dataForm.ltCorrosion }}
-        </el-descriptions-item>
-        <el-descriptions-item span="1">
-          <template slot="label">
-            {{ $t('预估剩余寿命(year)') }}
-          </template>
-          {{ dataForm.estRemain }}
-        </el-descriptions-item>
-        <el-descriptions-item span="3">
-          <template slot="label">
-            {{ $t('治理方法及依据') }}
-          </template>
-          {{ dataForm.methodCause }}
-        </el-descriptions-item>
-        <el-descriptions-item span="3">
-          <template slot="label">
-            {{ $t('效果跟踪') }}
-          </template>
-          {{ dataForm.effectTracing }}
-        </el-descriptions-item>
-        <el-descriptions-item span="1">
-          <template slot="label">
-            {{ $t('提出人') }}
-          </template>
-          {{ dataForm.raiser }}
-        </el-descriptions-item>
-        <el-descriptions-item span="2">
-          <template slot="label">
-            {{ $t('提出时间') }}
-          </template>
-          {{ dataForm.raiserDate }}
-        </el-descriptions-item>
-        <el-descriptions-item span="1">
-          <template slot="label">
-            {{ $t('测厚周期(月)') }}
-          </template>
-          {{ dataForm.measureCycle }}
-        </el-descriptions-item>
-        <el-descriptions-item span="2">
-          <template slot="label">
-            {{ $t('下次测厚日期') }}
-          </template>
-          {{ dataForm.nextWarnDate }}
-        </el-descriptions-item>
-        <el-descriptions-item span="3">
-          <template slot="label">
-            {{ $t('趋势图') }}
-          </template>
-          <img :src="dataForm.recordUrl" width="900px" />
-        </el-descriptions-item>
-      </el-descriptions>
-          <template slot="label">
-            {{ $t('测厚数据') }}
-          </template>
-         <template>
-           <el-table
-             :data="dataList"
-             border
-             style="width: 100%;">
-             <el-table-column
-               prop="measureValue"
-               header-align="center"
-               align="center"
-               :label="$t('实测记录')">
-               <template slot-scope="scope">
-                 <el-input v-if="scope.row.isEdit" v-model="scope.row.measureValue"></el-input>
-                 <span v-else>{{scope.row.measureValue}}</span>
-               </template>
-             </el-table-column>
-             <el-table-column
-               prop="measureDate"
-               header-align="center"
-               align="center"
-               :label="$t('日期')">
-               <template slot-scope="scope">
-                 <el-date-picker
-                   v-if="scope.row.isEdit"
-                   v-model="scope.row.measureDate"
-                   type="date"
-                   value-format="yyyy-MM-dd"
-                   :placeholder="$t('日期')">
-                 </el-date-picker>
-                 <span v-else>{{scope.row.measureDate}}</span>
-               </template>
-             </el-table-column>
-             <el-table-column
-               prop="recorder"
-               header-align="center"
-               align="center"
-               :label="$t('记录人')">
-               <template slot-scope="scope">
-                 <el-input v-if="scope.row.isEdit" v-model="scope.row.recorder"></el-input>
-                 <span v-else>{{scope.row.recorder}}</span>
-               </template>
-             </el-table-column>
-           </el-table>
-         </template>
-
-      <span slot="footer" class="dialog-footer">
-      <el-button @click="visible = false">{{ $t('取消') }}</el-button>
-    </span>
-    </el-dialog>
-    <!-- 侧厚导入对话框 -->
-    <el-dialog  :close-on-click-modal="false" :title="uploadThickness.title" :visible.sync="uploadThickness.open" width="400px" append-to-body>
-      <el-upload
-        ref="upload"
-        :limit="1"
-        accept=".xlsx, .xls"
-        :headers="uploadThickness.headers"
-        :action="uploadThickness.url + '?updateSupport=' + uploadThickness.updateSupport"
-        :disabled="uploadThickness.isUploading"
-        :on-progress="handleFileUploadProgress2"
-        :on-success="handleFileSuccess2"
-        :auto-upload="false"
-        drag
-      >
-        <i class="el-icon-upload"></i>
-        <div class="el-upload__text">
-          将文件拖到此处,或
-          <em>点击上传</em>
-        </div>
-        <div class="el-upload__tip" slot="tip">
-          <el-link type="info" style="font-size:12px" @click="importTemplateData">下载模板</el-link>
-        </div>
-        <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
-      </el-upload>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitFileForm"
-                   v-loading.fullscreen.lock="fullscreenLoading">确 定</el-button>
-        <el-button @click="uploadThickness.open = false">取 消</el-button>
-      </div>
-      <form ref="downloadFileDataForm" :action="uploadThickness.downloadAction" target="FORMSUBMIT">
-        <input name="type" :value="uploadThickness.type" hidden/>
-      </form>
-    </el-dialog>
-
-    <!-- 用户导入对话框 -->
-    <el-dialog  :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
-      <el-upload
-        ref="upload"
-        :limit="1"
-        accept=".xlsx, .xls"
-        :headers="upload.headers"
-        :action="upload.url + '?updateSupport=' + upload.updateSupport"
-        :disabled="upload.isUploading"
-        :on-progress="handleFileUploadProgress"
-        :on-success="handleFileSuccess"
-        :auto-upload="false"
-        drag
-      >
-        <i class="el-icon-upload"></i>
-        <div class="el-upload__text">
-          将文件拖到此处,或
-          <em>点击上传</em>
-        </div>
-        <div class="el-upload__tip" slot="tip">
-          <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
-        </div>
-        <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
-      </el-upload>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitFileForm"
-                   v-loading.fullscreen.lock="fullscreenLoading">确 定</el-button>
-        <el-button @click="upload.open = false">取 消</el-button>
-      </div>
-      <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
-        <input name="type" :value="upload.type" hidden/>
-      </form>
-    </el-dialog>
-    <el-dialog :close-on-click-modal="false" v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px"
-               append-to-body>
-      <div style="margin-top: -60px;float: right;margin-right: 40px;">
-        <el-button size="mini" type="text" @click="openPdf">{{ $t('新页面打开PDF') }}</el-button>
-      </div>
-      <div style="margin-top: -30px">
-        <iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
-      </div>
-    </el-dialog>
-    <record v-if="recordVisible" ref="record" @refreshDataList="getList" :showFlag="showFlag" @closeChildDialog="closeChildDialog"></record>
-  </div>
+<template >
+  <router-view />
 </template>
-
-<script>
-import { listThickness, getThickness, delThickness, addThickness, updateThickness, exportThickness, importTemplate} from "@/api/sems/thickness";
-import { treeselect } from "@/api/system/dept";
-import { getToken } from "@/utils/auth";
-import Treeselect from "@riophae/vue-treeselect";
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import Editor from '@/components/Editor';
-import request from "@/utils/request";
-import record from './record'
-import {listMeasurerecord} from "@/api/sems/measure-record";
-import {listPlant, mylistPlant} from "@/api/system/plant";
-import {queryUrl ,getLoopByPlant} from "@/api/sems/measure-loop";
-
-export default {
-  name: "Thickness",
-  components: { Treeselect ,record },
-  // components: { Editor },
-  data() {
-    return {
-      fullscreenLoading: false,
-      recordVisible: false,
-      showFlag: false,
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: false,
-      // 总条数
-      total: 0,
-      // 定点测厚表格数据
-      thicknessList: [],
-      dataList: [],
-      // 弹出层标题
-      title: "",
-      // 部门树选项
-      deptOptions: undefined,
-      clientHeight:300,
-      // 是否显示弹出层
-      open: false,
-      visible: false,
-      // 检测方法字典
-      inspectionMethodOptions: [],
-      statusOptions:[],
-      plantOptions: [],
-      loopOptions: [],
-      // 用户导入参数
-      upload: {
-          //模板下载路由
-          downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
-          //模板下载区分
-          type: "thickness",
-          // 是否显示弹出层(用户导入)
-          open: false,
-          // 弹出层标题(用户导入)
-          title: "",
-          // 是否禁用上传
-          isUploading: false,
-          // 是否更新已经存在的用户数据
-          updateSupport: 0,
-          // 设置上传的请求头部
-          headers: { Authorization: "Bearer " + getToken() },
-          // 上传的地址
-          url: process.env.VUE_APP_BASE_API + "/sems/measure-record/importForUpdate"
-      },
-      // 用户导入参数
-      uploadThickness: {
-        //模板下载路由
-        downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
-        //模板下载区分
-        type: "thicknessData",
-        // 是否显示弹出层(用户导入)
-        open: false,
-        // 弹出层标题(用户导入)
-        title: "",
-        // 是否禁用上传
-        isUploading: false,
-        // 是否更新已经存在的用户数据
-        updateSupport: 0,
-        // 设置上传的请求头部
-        headers: { Authorization: "Bearer " + getToken() },
-        // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/sems/thickness/importData"
-      },
-      downloadForm: {
-        id: '',
-        key: ''
-      },
-      downloadAction: process.env.VUE_APP_BASE_API +'/sems/thickness/measure/exportPDF',
-      check: {
-        imageUrl: '',
-        fileList: [],
-        // 设置上传的请求头部
-        headers: { Authorization: "Bearer " + getToken() },
-        // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/sems/thickness/uploadFile",
-      },
-      locationpic: {
-        imageUrl: '',
-        fileList: [],
-        // 设置上传的请求头部
-        headers: { Authorization: "Bearer " + getToken() },
-        // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/sems/thickness/uploadFile",
-      },
-      photo: {
-        imageUrl: '',
-        fileList: [],
-        // 设置上传的请求头部
-        headers: { Authorization: "Bearer " + getToken() },
-        // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/sems/thickness/uploadFile",
-      },
-      analysis: {
-        file: "",
-        // 是否显示弹出层(报告附件)
-        open: false,
-        // 弹出层标题(报告附件)
-        title: "",
-        // 是否禁用上传
-        isUploading: false,
-        // 是否更新已经存在的用户数据
-        updateSupport: 0,
-        // 报告附件上传位置编号
-        ids: 0,
-        // 设置上传的请求头部
-        headers: { Authorization: "Bearer " + getToken() },
-        // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/sems/thickness/uploadFile",
-        commonfileList: null,
-        pType: 'traning',
-        pId: null
-      },
-      pdf: {
-        title: '',
-        pdfUrl: '',
-        numPages: null,
-        open: false,
-        pageNum: 1,
-        pageTotalNum: 1,
-        loadedRatio: 0,
-      },
-      locationList: [],
-      photoList: [],
-      dialogImageUrl: '',
-      dialogVisible: false,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 20,
-        plantCode: null,
-        unitCode: null,
-        tagno: null,
-        status: null,
-        remarks: null,
-        position: null,
-        recorder: null,
-        recorderDate: null,
-        equipmentName: null,
-        material: null,
-        corAllowance: null,
-        originalThickness: null,
-        medium: null,
-        pressure: null,
-        specification: null,
-        flowRate: null,
-        temperature: null,
-        corrosionType: null,
-        inspectionMethod: null,
-        photo: null,
-        analysis: null,
-        nominalTickness: null,
-        thicknessMin: null,
-        stCorrosion: null,
-        ltCorrosion: null,
-        estRemain: null,
-        methodCause: null,
-        effectTracing: null,
-        raiser: null,
-        raiserDate: null,
-        locationUrl: null,
-        analysisUrl: null,
-        measureCycle: null,
-        recordUrl: null,
-        otherContent: null
-      }, // 查询参数
-      recordParams: {
-        pageNum: 1,
-        pageSize: 99,
-
-      },
-      // 表单参数
-      form: {},
-      dataForm: {},
-      // 表单校验
-      rules: {
-        plantCode: [
-          { required: true, message: this.$t('装置名称')+this.$t('不能为空'), trigger: "blur" }
-        ],
-        unitCode: [
-          { required: true, message: this.$t('单元名称')+this.$t('不能为空'), trigger: "blur" }
-        ],
-        position: [
-          { required: true, message: this.$t('测厚部位CML')+this.$t('不能为空'), trigger: "blur" }
-        ],
-        recorder: [
-          { required: true, message: this.$t('记录人')+this.$t('不能为空'), trigger: "blur" }
-        ],
-        recorderDate: [
-          { required: true, message: this.$t('记录时间')+this.$t('不能为空'), trigger: "blur" }
-        ],
-        equipmentName: [
-          { required: true, message: this.$t('设备/管线名称')+this.$t('不能为空'), trigger: "blur" }
-        ],
-        material: [
-          { required: true, message: this.$t('材质')+this.$t('不能为空'), trigger: "blur" }
-        ],
-        corAllowance: [
-          { required: true, message: this.$t('腐蚀裕度(mm)')+this.$t('不能为空'), trigger: "blur" }
-        ],
-        originalThickness: [
-          { required: true, message: this.$t('原始壁厚(mm)')+this.$t('不能为空'), trigger: "blur" }
-        ],
-        medium: [
-          { required: true, message: this.$t('介质')+this.$t('不能为空'), trigger: "blur" }
-        ],
-        pressure: [
-          { required: true, message: this.$t('压力')+this.$t('不能为空'), trigger: "blur" }
-        ],
-        specification: [
-          { required: true, message: this.$t('规格')+this.$t('不能为空'), trigger: "blur" }
-        ],
-/*        flowRate: [
-          { required: true, message: this.$t('流速(m/s)')+this.$t('不能为空'), trigger: "blur" }
-        ],*/
-        temperature: [
-          { required: true, message: this.$t('温度(℃)')+this.$t('不能为空'), trigger: "blur" }
-        ],
-        corrosionType: [
-          { required: true, message: this.$t('腐蚀类型')+this.$t('不能为空'), trigger: "change" }
-        ],
-        /*analysis: [
-          { required: true, message: "原因分析不能为空", trigger: "blur" }
-        ],*/
-        nominalTickness: [
-          { required: true, message: this.$t('公称壁厚(mm)')+this.$t('不能为空'), trigger: "blur" }
-        ],
-        // thicknessMin: [
-        //   { required: true, message: this.$t('最小允许壁厚(mm)')+this.$t('不能为空'), trigger: "blur" }
-        // ],
-        /*stCorrosion: [
-          { required: true, message: "短期腐蚀速率不能为空", trigger: "blur" }
-        ],
-        ltCorrosion: [
-          { required: true, message: "长期腐蚀速率不能为空", trigger: "blur" }
-        ],
-        estRemain: [
-          { required: true, message: "预估剩余寿命不能为空", trigger: "blur" }
-        ],*/
-        /*methodCause: [
-          { required: true, message: "治理方法及依据不能为空", trigger: "blur" }
-        ],
-        effectTracing: [
-          { required: true, message: "效果跟踪不能为空", trigger: "blur" }
-        ],*/
-        /*raiser: [
-          { required: true, message: "提出人不能为空", trigger: "blur" }
-        ],
-        raiserDate: [
-          { required: true, message: "提出时间不能为空", trigger: "blur" }
-        ],
-        locationUrl: [
-          { required: true, message: "腐蚀位置不能为空", trigger: "blur" }
-        ],
-        measureCycle: [
-          { required: true, message: "测厚周期不能为空", trigger: "blur" }
-        ],
-        otherContent: [
-          { required: true, message: "其他检测方法内容不能为空", trigger: "blur" }
-        ]*/
-      }
-    };
-  },
-  watch: {
-        // 根据名称筛选部门树
-        deptName(val) {
-            this.$refs.tree.filter(val);
-        }
-   },
-  created() {
-      //设置表格高度对应屏幕高度
-      this.$nextTick(() => {
-          this.clientHeight = document.body.clientHeight -250
-      })
-    this.getList();
-    this.getTreeselect();
-    this.getDicts("spec_measure_status").then(response => {
-      this.statusOptions = response.data;
-    });
-    this.getDicts("spec_measure_method").then(response => {
-      this.inspectionMethodOptions = response.data;
-    });
-    let plantParams = {
-      pType: 1
-    }
-    mylistPlant(plantParams).then(response => {
-      this.plantOptions = response.data;
-    });
-  },
-  methods: {
-    /** 查询定点测厚列表 */
-    getList() {
-      this.loading = true;
-      listThickness(this.queryParams).then(response => {
-        this.thicknessList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-     /** 查询部门下拉树结构 */
-     getTreeselect() {
-          treeselect().then(response => {
-              this.deptOptions = response.data;
-          });
-     },
-    // 状态字典翻译
-    statusFormat(row, column) {
-      return this.selectDictLabel(this.statusOptions, row.status);
-    },
-    // 检测方法字典翻译
-    inspectionMethodFormat(row, column) {
-      return this.selectDictLabels(this.inspectionMethodOptions, row.inspectionMethod);
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: null,
-        plantCode: null,
-        unitCode: null,
-        tagno: null,
-        status: 0,
-        createdate: null,
-        updaterCode: null,
-        updatedate: null,
-        deptId: null,
-        remarks: null,
-        position: null,
-        recorder: null,
-        recorderDate: null,
-        equipmentName: null,
-        material: null,
-        corAllowance: null,
-        originalThickness: null,
-        medium: null,
-        pressure: null,
-        specification: null,
-        flowRate: null,
-        temperature: null,
-        corrosionType: null,
-        inspectionMethod: [],
-        photo: null,
-        analysis: null,
-        nominalTickness: null,
-        thicknessMin: null,
-        stCorrosion: null,
-        ltCorrosion: null,
-        estRemain: null,
-        methodCause: null,
-        effectTracing: null,
-        raiser: null,
-        raiserDate: null,
-        delFlag: null,
-        locationUrl: null,
-        analysisUrl: null,
-        measureCycle: null,
-        recordUrl: null,
-        otherContent: null,
-        measureNo: null,
-        nextWarnDate: null,
-      };
-      this.resetForm("form");
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
-    },
-    handleLoop(val){
-      let paramLoop = {
-        plantCode: val,
-      }
-      getLoopByPlant(paramLoop).then(response => {
-        this.loopOptions = response.data;
-      });
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = this.$t('添加') + this.$t('定点测厚');
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const id = row.id || this.ids
-      getThickness(id).then(response => {
-        this.form = response.data;
-        if (this.form.inspectionMethod) {
-          this.form.inspectionMethod = this.form.inspectionMethod.split(",");
-        }else {
-          this.form.inspectionMethod = []
-        }
-        this.open = true;
-        this.title = this.$t('修改') + this.$t('定点测厚');
-        if (this.form.photo!= null){
-          this.photoList =[]
-          let fileList = this.form.photo.split(",")
-          for (let i = 0; i < fileList.length; i++) {
-            let item = {url: process.env.VUE_APP_BASE_API +fileList[i],response: {msg: fileList[i]} }
-            this.photoList.push(item)
-          }
-        }
-        if (this.form.locationUrl!= null){
-          this.locationList =[]
-          let fileList = this.form.locationUrl.split(",")
-          for (let i = 0; i < fileList.length; i++) {
-            let item = {url: process.env.VUE_APP_BASE_API +fileList[i],response: {msg: fileList[i]} }
-            this.locationList.push(item)
-          }
-        }
-      });
-    },
-    handleView (row){
-      const id = row.id
-      getThickness(id).then(response => {
-        this.dataForm = response.data;
-        if (this.dataForm.inspectionMethod) {
-          this.dataForm.inspectionMethod = this.dataForm.inspectionMethod.split(",");
-        }else {
-          this.dataForm.inspectionMethod = []
-        }
-        this.visible = true;
-        this.title = this.$t('查看') + this.$t('定点测厚');
-        if (this.dataForm.photo!= null){
-          this.photoList =[]
-          let fileList = this.dataForm.photo.split(",")
-          for (let i = 0; i < fileList.length; i++) {
-            let item = {url: process.env.VUE_APP_BASE_API +fileList[i],response: {msg: fileList[i]} }
-            this.photoList.push(item)
-          }
-        }
-        if (this.dataForm.locationUrl!= null){
-          this.locationList =[]
-          let fileList = this.dataForm.locationUrl.split(",")
-          for (let i = 0; i < fileList.length; i++) {
-            let item = {url: process.env.VUE_APP_BASE_API +fileList[i],response: {msg: fileList[i]} }
-            this.locationList.push(item)
-          }
-        }
-        this.dataForm.recordUrl = process.env.VUE_APP_BASE_API + this.dataForm.recordUrl
-      });
-      this.recordParams.measureId = row.id
-      listMeasurerecord(this.recordParams).then(response => {
-        this.dataList = response.rows;
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.inspectionMethod) {
-            this.form.inspectionMethod = this.form.inspectionMethod.join(",");
-          }else {
-            this.form.inspectionMethod = ''
-          }
-          if (this.form.id != null) {
-            updateThickness(this.form).then(response => {
-              this.msgSuccess(this.$t('修改成功'));
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addThickness(this.form).then(response => {
-              this.msgSuccess(this.$t('新增成功'));
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
-        confirmButtonText: this.$t('确定'),
-        cancelButtonText: this.$t('取消'),
-          type: "warning"
-        }).then(function() {
-          return delThickness(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess(this.$t('删除成功'));
-        })
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm(this.$t('是否确认导出所有定点测厚数据项?'), this.$t('警告'), {
-        confirmButtonText: this.$t('确定'),
-        cancelButtonText: this.$t('取消'),
-          type: "warning"
-        }).then(function() {
-          return exportThickness(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-        })
-    },
-      /** 导入按钮操作 */
-      handleImportData() {
-        this.uploadThickness.title = this.$t('导入数据');
-        this.uploadThickness.open = true;
-      },
-      /** 下载侧厚模板操作 */
-      importTemplateData() {
-        this.$refs['downloadFileDataForm'].submit()
-      },
-      /** 导入按钮操作 */
-      handleImport() {
-          this.upload.title = this.$t('导入更新数据');
-          this.upload.open = true;
-      },
-      /** 下载模板操作 */
-      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.length > 0) {
-          let failrow = ''
-          for (let i = 0; i < response.data.length; i++) {
-            failrow += response.data[i] + ','
-          }
-          this.$alert(this.$t('导入成功条数:') + response.msg + '<br>' + this.$t('失败行数:') + failrow, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
-        } else {
-          this.$alert(this.$t('导入成功条数:') + response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
-        }
-          this.getList();
-      },
-      // 提交上传文件
-      submitFileForm() {
-          this.$refs.upload.submit();
-          this.fullscreenLoading = true;
-      },
-    // 文件上传中处理
-    handleFileUploadProgress2(event, file, fileList) {
-      this.uploadThickness.isUploading = true;
-    },
-    // 文件上传成功处理
-    handleFileSuccess2(response, file, fileList) {
-      this.uploadThickness.open = false;
-      this.uploadThickness.isUploading = false;
-      this.$refs.upload.clearFiles();
-      this.fullscreenLoading = false;
-      if (response.data.length > 0) {
-        let failrow = ''
-        for (let i = 0; i < response.data.length; i++) {
-          failrow += response.data[i] + ','
-        }
-        this.$alert(this.$t('导入成功条数:') + response.msg + '<br>' + this.$t('失败行数:') + failrow, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
-      } else {
-        this.$alert(this.$t('导入成功条数:') + response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
-      }
-      this.getList();
-    },
-    // 提交上传文件
-    submitFileForm2() {
-      this.$refs.uploadThickness.submit();
-      this.fullscreenLoading = true;
-    },
-      //下载报告
-      downloadHandle (row) {
-        this.downloadForm.id = row.id;
-        this.$nextTick(() => {
-          this.$refs['downloadForm'].submit()
-        })
-      },
-    //查询测厚记录
-    recordHandle (row) {
-      this.recordVisible = true
-      this.$nextTick(() => {
-        this.$refs.record.init(row)
-      })
-    },
-    closeChildDialog () {
-      this.showFlag = false
-      this.getList();
-    },
-
-    handleExceed(files, fileList) {
-      this.$message.warning(`当前限制选择 3 个文件`);
-    },
-    handleRemove(file, fileList) {
-      this.form.locationUrl = fileList.map((obj)=>{return obj.response.msg}).join(",");
-      console.log(this.form.locationUrl)
-    },
-    handleAvatarSuccess(res, file, fileList) {
-      console.log(fileList)
-      this.locationList = fileList
-      this.form.locationUrl = fileList.map((obj)=>{return obj.response.msg}).join(",");
-      console.log(this.form.locationUrl)
-    },
-    handleRemove2(file, fileList) {
-      this.form.photo = fileList.map((obj)=>{return obj.response.msg}).join(",");
-    },
-    handleAvatarSuccess2(res, file, fileList) {
-      console.log(fileList)
-      this.photoList = fileList
-      this.form.photo = fileList.map((obj)=>{return obj.response.msg}).join(",");
-    },
-    handlePictureCardPreview(file) {
-      this.dialogImageUrl = file.url;
-      this.dialogVisible = true;
-    },
-    beforeAvatarUpload(file) {
-      const isJPG = file.type === 'image/jpeg' || file.type === 'image/png'
-      const isLt2M = file.size / 1024 / 1024 < 2
-
-      if (!isJPG) {
-        this.$message.error(this.$t('上传图片只能是 JPG/PNG 格式!'));
-      }
-      if (!isLt2M) {
-        this.$message.error(this.$t('上传图片大小不能超过 2MB!'));
-      }
-      return isJPG && isLt2M;
-    },
-    //附件上传中处理
-    handleFileDocProgress(event, file, fileList) {
-      this.analysis.file = file;
-    },
-    //附件上传成功处理
-    handleFileDocSuccess(response, file, fileList) {
-      this.form.analysisUrl = response.msg
-      this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
-    },
-
-    //寿命颜色预警
-    tableCellStyle({ row, column, rowIndex, columnIndex }) {
-     if (columnIndex == 16 && row.warnFlag == 1){
-        return "color: rgba(255, 26, 26, 0.98) "
-      }
-    },
-    handleSee(row) {
-        let paramLoop = {
-          plantCode: row.plantCode,
-          loopNo: row.loopNo
-      }
-      queryUrl(paramLoop).then(response => {
-        this.pdf.open = true
-        this.pdf.title = response.data.loopNo
-        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + response.data.loopUrl
-      });
-    },
-    openPdf() {
-      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
-    },
-  }
-};
-</script>
-<style>
-.otherMethod {
-  width: 40%;
-}
-</style>

+ 1678 - 0
ui/src/views/sems/thickness/thicknessData/index.vue

@@ -0,0 +1,1678 @@
+<template>
+  <div class="app-container">
+
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px">
+      <el-form-item :label="$t('装置名称')" prop="plantCode">
+        <el-select v-model="queryParams.plantCode" @change="handleLoop" :placeholder="$t('请选择') + $t('装置')" filterable clearable size="small">
+          <el-option
+            v-for="dict in plantOptions"
+            :key="dict.name"
+            :label="dict.name"
+            :value="dict.name"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item :label="$t('腐蚀回路图')" prop="loopNo">
+        <el-select v-model="queryParams.loopNo" @change="handleQuery" placeholder="请选择腐蚀回路图号" filterable clearable size="small">
+          <el-option
+            v-for="dict in loopOptions"
+            :key="dict.loopNo"
+            :label="dict.loopNo"
+            :value="dict.loopNo"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item :label="$t('单元名称')" prop="unitCode">
+        <el-input
+          v-model="queryParams.unitCode"
+          :placeholder="$t('请输入') + $t('单元名称')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item :label="$t('单位内编号')" prop="tagno">
+        <el-input
+          v-model="queryParams.tagno"
+          :placeholder="$t('请输入') + $t('单位内编号')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item :label="$t('测厚部位CML')" prop="position">
+        <el-input
+          v-model="queryParams.position"
+          :placeholder="$t('请输入') + $t('测厚部位CML')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item :label="$t('关键字')" prop="searchValue" label-width="50">
+        <el-input
+          v-model="queryParams.searchValue"
+          :placeholder="$t('请输入') + $t('关键字')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('搜索') }}</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('重置') }}</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['sems:thickness:add']"
+        >{{ $t('新增') }}</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['sems:thickness:edit']"
+        >{{ $t('修改') }}</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['sems:thickness:remove']"
+        >{{ $t('删除') }}</el-button>
+      </el-col>
+
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImportData"
+          v-hasPermi="['sems:thickness:add']"
+        >{{$t('导入')}}
+        </el-button>
+      </el-col>
+
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['sems:thickness:export']"
+        >{{ $t('导出') }}</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['sems:thickness:edit']"
+        >{{$t('更新数据')}}
+        </el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+
+    <el-table v-loading="loading" :data="thicknessList" @selection-change="handleSelectionChange" :cell-style="tableCellStyle" :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column :label="$t('装置名称')" align="center" prop="plantCode" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('单元名称')" align="center" prop="unitCode" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('腐蚀回路图号')" align="center" prop="loopNo" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <a style="text-decoration: underline;" class="link-type" @click="handleSeeLoop(scope.row)" > {{ scope.row.loopNo }} </a>
+        </template>
+      </el-table-column>
+
+      <el-table-column :label="$t('单位内编号')" align="center" prop="tagno" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('状态')" align="center" prop="status" :formatter="statusFormat" />
+      <el-table-column :label="$t('测厚部位CML')" align="center" prop="position" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('检测编号')" align="center" prop="measureNo" :show-overflow-tooltip="true"/>
+
+      <!--      <el-table-column label="记录人" align="center" prop="recorder" :show-overflow-tooltip="true"/>-->
+<!--      <el-table-column label="记录时间" align="center" prop="recorderDate" width="100">-->
+<!--        <template slot-scope="scope">-->
+<!--          <span>{{ parseTime(scope.row.recorderDate, '{y}-{m}-{d}') }}</span>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
+      <el-table-column :label="$t('设备/管线名称')" align="center" prop="equipmentName" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('材质')" align="center" prop="material" :show-overflow-tooltip="true"/>
+<!--      <el-table-column label="腐蚀裕度" align="center" prop="corAllowance" :show-overflow-tooltip="true"/>-->
+<!--      <el-table-column label="原始壁厚" align="center" prop="originalThickness" :show-overflow-tooltip="true"/>-->
+<!--      <el-table-column label="介质" align="center" prop="medium" :show-overflow-tooltip="true"/>-->
+<!--      <el-table-column label="压力" align="center" prop="pressure" :show-overflow-tooltip="true"/>-->
+<!--      <el-table-column label="规格" align="center" prop="specification" :show-overflow-tooltip="true"/>-->
+<!--      <el-table-column label="流速" align="center" prop="flowRate" :show-overflow-tooltip="true"/>-->
+<!--      <el-table-column label="温度" align="center" prop="temperature" :show-overflow-tooltip="true"/>-->
+<!--      <el-table-column label="腐蚀类型" align="center" prop="corrosionType" :show-overflow-tooltip="true"/>-->
+<!--      <el-table-column label="腐蚀照片" align="center" prop="photo" :show-overflow-tooltip="true"/>-->
+<!--      <el-table-column label="原因分析" align="center" prop="analysis" :show-overflow-tooltip="true"/>-->
+      <el-table-column :label="$t('公称壁厚(mm)')" align="center" prop="nominalTickness" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('最小允许壁厚(mm)')" align="center" prop="thicknessMin" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('短期腐蚀速率(mm/year)')" align="center" prop="stCorrosion" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('长期腐蚀速率(mm/year)')" align="center" prop="ltCorrosion" :show-overflow-tooltip="true"/>
+      <el-table-column
+        prop="measureCycle"
+        header-align="center"
+        align="center"
+        :label="$t('测厚周期(月)')">
+      </el-table-column>
+      <el-table-column
+        prop="installDate"
+        header-align="center"
+        align="center"
+        label="安装日期"/>
+      <el-table-column
+        prop="firstMeasureDate"
+        header-align="center"
+        align="center"
+        :label="$t('首次测厚日期')"/>
+      <el-table-column
+        prop="newMeasureDate"
+        header-align="center"
+        align="center"
+        :label="$t('最近测厚日期')"/>
+
+      <el-table-column :label="$t('预估剩余寿命(year)')" align="center" prop="estRemain" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span  v-if="scope.row.estRemain"> {{ scope.row.estRemain }}</span>
+          <span v-else-if="!scope.row.thicknessMin">缺少最小允许壁厚</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="nextWarnDate"
+        header-align="center"
+        align="center"
+        :label="$t('下次测厚日期')">
+      </el-table-column>
+      <el-table-column :label="$t('检测方法')" align="center" prop="inspectionMethod" :formatter="inspectionMethodFormat" />
+      <el-table-column :label="$t('操作')" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button type="text" size="small" @click="handleView(scope.row)">{{ $t('查看') }}</el-button>
+          <el-button type="text" size="small" @click="recordHandle(scope.row)">{{ $t('测厚记录') }}</el-button>
+          <el-button type="text" size="small" @click="wordView(scope.row)">{{ $t('报告') }}</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <form ref="downloadForm" :action="downloadAction" target="FORMSUBMIT">
+      <input name="id" v-model="downloadForm.id"  hidden  />
+    </form>
+    <pagination
+      v-show="total>0"
+      :total="total"
+             :page.sync="queryParams.pageNum"
+      :page-sizes="[20,100,300,500]"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改定点测厚对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="open" width="70%" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+        <el-row>
+          <el-col :span="6">
+          <el-form-item :label="$t('装置名称')" prop="plantCode">
+            <el-select v-model="form.plantCode" :placeholder="$t('请选择') + $t('装置')" filterable clearable size="small">
+              <el-option
+                v-for="dict in plantOptions"
+                :key="dict.name"
+                :label="dict.name"
+                :value="dict.name"
+              />
+            </el-select>
+          </el-form-item>
+          </el-col>
+          <el-col :span="6">
+          <el-form-item :label="$t('单元名称')" prop="unitCode">
+            <el-input v-model="form.unitCode" :placeholder="$t('请输入') + $t('单元名称')" />
+          </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="腐蚀回路图号" prop="loopNo">
+              <el-input v-model="form.loopNo" placeholder="请输入腐蚀回路图号" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+          <el-form-item :label="$t('单位内编号')" prop="tagno">
+            <el-input v-model="form.tagno" :placeholder="$t('请输入') + $t('单位内编号')" />
+          </el-form-item>
+          </el-col>
+      </el-row>
+        <el-row>
+          <el-col :span="6">
+            <el-form-item :label="$t('测厚部位CML')" prop="position">
+              <el-input v-model="form.position" :placeholder="$t('请输入') + $t('测厚部位CML')" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item :label="$t('安装日期')" prop="installDate" >
+              <el-date-picker clearable size="mini"
+                              style="width: 100%;"
+                              v-model="form.installDate"
+                              type="date"
+                              value-format="yyyy-MM-dd"
+                              :placeholder="$t('请选择') + $t('安装日期')">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item :label="$t('记录人')" prop="recorder">
+              <el-input v-model="form.recorder" :placeholder="$t('请输入') + $t('记录人')" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item :label="$t('记录时间')" prop="recorderDate" >
+              <el-date-picker clearable size="mini"
+                              v-model="form.recorderDate"
+                              type="date"
+                              style="width: 100%;"
+                              value-format="yyyy-MM-dd"
+                              :placeholder="$t('请选择') + $t('记录时间')">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="8">
+        <el-form-item :label="$t('设备/管线名称')" prop="equipmentName">
+          <el-input v-model="form.equipmentName" :placeholder="$t('请输入') + $t('设备/管线名称')" />
+        </el-form-item>
+          </el-col>
+          <el-col :span="8">
+        <el-form-item :label="$t('材质')" prop="material">
+          <el-input v-model="form.material" :placeholder="$t('请输入') + $t('材质')" />
+        </el-form-item>
+          </el-col>
+          <el-col :span="8">
+        <el-form-item :label="$t('腐蚀裕度(mm)')" prop="corAllowance">
+          <el-input v-model="form.corAllowance" :placeholder="$t('请输入') + $t('腐蚀裕度(mm)')" />
+        </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="8">
+        <el-form-item :label="$t('原始壁厚(mm)')" prop="originalThickness">
+          <el-input v-model="form.originalThickness" :placeholder="$t('请输入') + $t('原始壁厚(mm)')" />
+        </el-form-item>
+          </el-col>
+          <el-col :span="8">
+        <el-form-item :label="$t('介质')" prop="medium">
+          <el-input v-model="form.medium" :placeholder="$t('请输入') + $t('介质')" />
+        </el-form-item>
+          </el-col>
+          <el-col :span="8">
+        <el-form-item :label="$t('工作压力(MPag)')" prop="pressure">
+          <el-input v-model="form.pressure" :placeholder="$t('请输入') + $t('工作压力(MPag)')" />
+        </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="8">
+        <el-form-item :label="$t('规格')" prop="specification">
+          <el-input v-model="form.specification" :placeholder="$t('请输入') + $t('规格')" />
+        </el-form-item>
+          </el-col>
+          <el-col :span="8">
+        <el-form-item :label="$t('流速(m/s)')" prop="flowRate">
+          <el-input v-model="form.flowRate" :placeholder="$t('请输入') + $t('流速(m/s)')" />
+        </el-form-item>
+          </el-col>
+          <el-col :span="8">
+        <el-form-item :label="$t('工作温度(℃)')" prop="temperature">
+          <el-input v-model="form.temperature" :placeholder="$t('请输入') + $t('工作温度(℃)')" />
+        </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-form-item :label="$t('状态')">
+          <el-radio-group v-model="form.status">
+            <el-radio
+              v-for="dict in statusOptions"
+              :key="dict.dictValue"
+              :label="parseInt(dict.dictValue)"
+            >{{dict.dictLabel}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item :label="$t('测厚位置')"  prop="checkUrl">
+            <el-upload
+              ref="analysis"
+              :limit="1"
+              :headers="check.headers"
+              :action="check.url"
+              :disabled="check.isUploading"
+              :on-progress="handleFileDocProgressCheck"
+              :on-success="handleFileDocSuccessCheck"
+              :auto-upload="true"
+              drag
+            >
+              <i class="el-icon-upload"></i>
+              <div class="el-upload__text">
+                {{ $t('将文件拖到此处,或') }}
+                <em>{{ $t('点击上传') }}</em>
+              </div>
+            </el-upload>
+        </el-form-item>
+        <el-form-item :label="$t('腐蚀位置')"  prop="locationUrl">
+          <el-upload
+            :action="locationpic.url"
+            :headers="locationpic.headers"
+            :file-list="locationList"
+            :limit="3"
+            :on-success="handleAvatarSuccess"
+            :on-exceed="handleExceed"
+            :before-upload="beforeAvatarUpload"
+            list-type="picture-card"
+            :on-preview="handlePictureCardPreview"
+            :on-remove="handleRemove">
+            <i class="el-icon-plus"></i>
+          </el-upload>
+          <el-dialog  :close-on-click-modal="false" v-dialogDrag :visible.sync="dialogVisible" append-to-body>
+            <img width="100%" :src="dialogImageUrl" alt="">
+          </el-dialog>
+        </el-form-item>
+        <el-form-item :label="$t('检测方法')">
+          <el-checkbox-group v-model="form.inspectionMethod">
+            <el-checkbox
+              v-for="dict in inspectionMethodOptions"
+              :key="dict.dictValue"
+              :label="dict.dictValue">
+              {{dict.dictLabel}}
+            </el-checkbox>
+          </el-checkbox-group>
+          <el-input :placeholder="$t('请输入') + $t('其他')+ $t('空格')+ $t('检测方法')" class="otherMethod" v-if="form.inspectionMethod == 5" v-model="form.otherContent"></el-input>
+        </el-form-item>
+        <el-form-item :label="$t('腐蚀照片')"  prop="photo">
+          <el-upload
+            :action="photo.url"
+            :headers="photo.headers"
+            :file-list="photoList"
+            :limit="3"
+            :on-success="handleAvatarSuccess2"
+            :on-exceed="handleExceed"
+            :before-upload="beforeAvatarUpload"
+            list-type="picture-card"
+            :on-preview="handlePictureCardPreview"
+            :on-remove="handleRemove2">
+            <i class="el-icon-plus"></i>
+          </el-upload>
+          <el-dialog  :close-on-click-modal="false" v-dialogDrag :visible.sync="dialogVisible" append-to-body>
+            <img width="100%" :src="dialogImageUrl" alt="">
+          </el-dialog>
+        </el-form-item>
+        <el-form-item :label="$t('原因分析')" prop="analysis">
+          <el-input v-model="form.analysis" :placeholder="$t('请输入') + $t('原因分析')" />
+        </el-form-item>
+        <el-row>
+          <el-col :span="8">
+        <el-form-item :label="$t('公称壁厚(mm)')" prop="nominalTickness">
+          <el-input v-model="form.nominalTickness" :placeholder="$t('请输入') + $t('名义壁厚(mm)')" />
+        </el-form-item>
+            <el-form-item :label="$t('原因分析附件')" prop="analysisUrl">
+              <el-upload
+                ref="analysis"
+                :limit="1"
+                :headers="analysis.headers"
+                :action="analysis.url"
+                :disabled="analysis.isUploading"
+                :on-progress="handleFileDocProgress"
+                :on-success="handleFileDocSuccess"
+                :auto-upload="true"
+                drag
+              >
+                <i class="el-icon-upload"></i>
+                <div class="el-upload__text">
+                  {{ $t('将文件拖到此处,或') }}
+                  <em>{{ $t('点击上传') }}</em>
+                </div>
+              </el-upload>
+            </el-form-item>
+          </el-col>
+          <el-col :span="16">
+        <el-form-item :label="$t('最小允许壁厚(mm)')" label-width="150px" prop="thicknessMin">
+          <el-input v-model="form.thicknessMin" :placeholder="$t('请输入') + $t('最小允许壁厚(mm)')" />
+        </el-form-item>
+          </el-col>
+        </el-row>
+        <el-form-item :label="$t('检测编号')" prop="measureNo">
+          <el-input v-model="form.measureNo" :placeholder="$t('请输入') + $t('检测编号')" />
+        </el-form-item>
+
+      <el-row>
+        <el-col :span="8">
+        <el-form-item :label="$t('短期腐蚀速率(mm/year)')" label-width="180px" prop="stCorrosion">
+          <el-input v-model="form.stCorrosion" :placeholder="$t('请输入') + $t('短期腐蚀速率(mm/year)')" />
+        </el-form-item>
+        </el-col>
+        <el-col :span="8">
+        <el-form-item :label="$t('长期腐蚀速率(mm/year)')" label-width="180px" prop="ltCorrosion">
+          <el-input v-model="form.ltCorrosion" :placeholder="$t('请输入') + $t('长期腐蚀速率(mm/year)')" />
+        </el-form-item>
+        </el-col>
+        <el-col :span="8">
+        <el-form-item :label="$t('预估剩余寿命(year)')" label-width="180px" prop="estRemain">
+          <el-input v-model="form.estRemain" :placeholder="$t('请输入') + $t('预估剩余寿命(year)')" />
+        </el-form-item>
+        </el-col>
+      </el-row>
+        <el-row>
+        <el-form-item :label="$t('治理方法及依据')" prop="methodCause">
+          <el-input v-model="form.methodCause" :placeholder="$t('请输入') + $t('治理方法及依据')" />
+        </el-form-item>
+        </el-row>
+        <el-form-item :label="$t('效果跟踪')" prop="effectTracing">
+          <el-input v-model="form.effectTracing" :placeholder="$t('请输入') + $t('效果跟踪')" />
+        </el-form-item>
+        <el-row>
+          <el-col :span="8">
+        <el-form-item :label="$t('提出人')" prop="raiser">
+          <el-input v-model="form.raiser" :placeholder="$t('请输入') + $t('提出人')" />
+        </el-form-item>
+          </el-col>
+          <el-col :span="16">
+        <el-form-item :label="$t('提出时间')" prop="raiserDate">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.raiserDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            :placeholder="$t('请选择') + $t('提出时间')">
+          </el-date-picker>
+        </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="$t('测厚周期(月)')" prop="remarks">
+              <el-input v-model="form.measureCycle" :placeholder="$t('请输入') + $t('测厚周期(月)')" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+        <el-form-item :label="$t('下次测厚日期')" prop="raiserDate">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.nextWarnDate"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          :placeholder="$t('请选择') + $t('下次测厚日期')">
+          </el-date-picker>
+        </el-form-item>
+          </el-col>
+        </el-row>
+        <el-form-item :label="$t('备注')" prop="remarks">
+          <el-input v-model="form.remarks" type="textarea" :placeholder="$t('请输入') + $t('内容')" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">{{ $t('确 定') }}</el-button>
+        <el-button @click="cancel">{{ $t('取 消') }}</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog  :close-on-click-modal="false"
+      :title="$t('查看')"
+
+      width="1200px"
+      :visible.sync="visible">
+      <el-descriptions class="margin-top" :column="3" size="medium" border>
+        <el-descriptions-item>
+          <template slot="label">
+            {{ $t('装置名称') }}
+          </template>
+          {{ dataForm.plantCode }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            {{ $t('单元名称') }}
+          </template>
+          {{ dataForm.unitCode }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            {{ $t('单位内编号') }}
+          </template>
+          {{ dataForm.tagno }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            {{ $t('测厚部位CML') }}
+          </template>
+          {{ dataForm.position }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            {{ $t('记录人') }}
+          </template>
+          {{ dataForm.recorder }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            {{ $t('记录时间') }}
+          </template>
+          {{ dataForm.recorderDate }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            {{ $t('设备/管线名称') }}
+          </template>
+          {{ dataForm.equipmentName }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            {{ $t('材质') }}
+          </template>
+          {{ dataForm.material }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            {{ $t('腐蚀裕度(mm)') }}
+          </template>
+          {{ dataForm.corAllowance }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            {{ $t('原始壁厚(mm)') }}
+          </template>
+          {{ dataForm.originalThickness }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            {{ $t('介质') }}
+          </template>
+          {{ dataForm.medium }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            {{ $t('工作压力(MPag)') }}
+          </template>
+          {{ dataForm.pressure }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            {{ $t('规格') }}
+          </template>
+          {{ dataForm.specification }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            {{ $t('流速(m/s)') }}
+          </template>
+          {{ dataForm.flowRate }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            {{ $t('工作温度(℃)') }}
+          </template>
+          {{ dataForm.temperature }}
+        </el-descriptions-item>
+
+        <el-descriptions-item span="3">
+          <template slot="label">
+            {{ $t('腐蚀位置') }}
+          </template>
+          <el-upload
+            :action="locationpic.url"
+            :headers="locationpic.headers"
+            :file-list="locationList"
+            :limit="3"
+            :on-success="handleAvatarSuccess"
+            :on-exceed="handleExceed"
+            :before-upload="beforeAvatarUpload"
+            list-type="picture-card"
+            :on-preview="handlePictureCardPreview"
+            :on-remove="handleRemove">
+            <i class="el-icon-plus"></i>
+          </el-upload>
+        </el-descriptions-item>
+        <el-descriptions-item span="3">
+          <template slot="label">
+            {{ $t('检测方法') }}
+          </template>
+          <el-checkbox-group v-model="dataForm.inspectionMethod">
+            <el-checkbox
+              v-for="dict in inspectionMethodOptions"
+              :key="dict.dictValue"
+              :label="dict.dictValue">
+              {{dict.dictLabel}}
+            </el-checkbox>
+          </el-checkbox-group>
+          {{ dataForm.otherContent }}
+        </el-descriptions-item>
+        <el-descriptions-item span="3">
+          <template slot="label">
+            {{ $t('腐蚀照片') }}
+          </template>
+          <el-upload
+            :action="photo.url"
+            :headers="photo.headers"
+            :file-list="photoList"
+            :limit="3"
+            :on-success="handleAvatarSuccess2"
+            :on-exceed="handleExceed"
+            :before-upload="beforeAvatarUpload"
+            list-type="picture-card"
+            :on-preview="handlePictureCardPreview"
+            :on-remove="handleRemove2">
+            <i class="el-icon-plus"></i>
+          </el-upload>
+        </el-descriptions-item>
+        <el-descriptions-item span="3">
+          <template slot="label">
+            {{ $t('原因分析') }}
+          </template>
+          {{ dataForm.analysis }}
+        </el-descriptions-item>
+        <el-descriptions-item span="1">
+          <template slot="label">
+            {{ $t('公称壁厚(mm)') }}
+          </template>
+          {{ dataForm.nominalTickness }}
+        </el-descriptions-item>
+        <el-descriptions-item span="2">
+          <template slot="label">
+            {{ $t('最小允许壁厚(mm)') }}
+          </template>
+          {{ dataForm.thicknessMin }}
+        </el-descriptions-item>
+        <el-descriptions-item span="1">
+          <template slot="label">
+            {{ $t('短期腐蚀速率(mm/year)') }}
+          </template>
+          {{ dataForm.stCorrosion }}
+        </el-descriptions-item>
+        <el-descriptions-item span="1">
+          <template slot="label">
+            {{ $t('长期腐蚀速率(mm/year)') }}
+          </template>
+          {{ dataForm.ltCorrosion }}
+        </el-descriptions-item>
+        <el-descriptions-item span="1">
+          <template slot="label">
+            {{ $t('预估剩余寿命(year)') }}
+          </template>
+          {{ dataForm.estRemain }}
+        </el-descriptions-item>
+        <el-descriptions-item span="3">
+          <template slot="label">
+            {{ $t('附件') }}
+          </template>
+          <span style="text-decoration: underline;" class="link-type" @click="handleDownload(dataForm.analysisUrl)">{{ dataForm.analysisUrl }}</span>
+
+        </el-descriptions-item>
+        <el-descriptions-item span="3">
+          <template slot="label">
+            {{ $t('治理方法及依据') }}
+          </template>
+          {{ dataForm.methodCause }}
+        </el-descriptions-item>
+        <el-descriptions-item span="3">
+          <template slot="label">
+            {{ $t('效果跟踪') }}
+          </template>
+          {{ dataForm.effectTracing }}
+        </el-descriptions-item>
+        <el-descriptions-item span="1">
+          <template slot="label">
+            {{ $t('提出人') }}
+          </template>
+          {{ dataForm.raiser }}
+        </el-descriptions-item>
+        <el-descriptions-item span="2">
+          <template slot="label">
+            {{ $t('提出时间') }}
+          </template>
+          {{ dataForm.raiserDate }}
+        </el-descriptions-item>
+        <el-descriptions-item span="1">
+          <template slot="label">
+            {{ $t('测厚周期(月)') }}
+          </template>
+          {{ dataForm.measureCycle }}
+        </el-descriptions-item>
+        <el-descriptions-item span="2">
+          <template slot="label">
+            {{ $t('下次测厚日期') }}
+          </template>
+          {{ dataForm.nextWarnDate }}
+        </el-descriptions-item>
+        <el-descriptions-item span="3">
+          <template slot="label">
+            {{ $t('趋势图') }}
+          </template>
+          <img :src="dataForm.recordUrl" width="900px" />
+        </el-descriptions-item>
+      </el-descriptions>
+          <template slot="label">
+            {{ $t('测厚数据') }}
+          </template>
+         <template>
+           <el-table
+             :data="dataList"
+             border
+             style="width: 100%;">
+             <el-table-column
+               prop="measureValue"
+               header-align="center"
+               align="center"
+               :label="$t('实测记录')">
+               <template slot-scope="scope">
+                 <el-input v-if="scope.row.isEdit" v-model="scope.row.measureValue"></el-input>
+                 <span v-else>{{scope.row.measureValue}}</span>
+               </template>
+             </el-table-column>
+             <el-table-column
+               prop="measureDate"
+               header-align="center"
+               align="center"
+               :label="$t('日期')">
+               <template slot-scope="scope">
+                 <el-date-picker
+                   v-if="scope.row.isEdit"
+                   v-model="scope.row.measureDate"
+                   type="date"
+                   value-format="yyyy-MM-dd"
+                   :placeholder="$t('日期')">
+                 </el-date-picker>
+                 <span v-else>{{scope.row.measureDate}}</span>
+               </template>
+             </el-table-column>
+             <el-table-column
+               prop="recorder"
+               header-align="center"
+               align="center"
+               :label="$t('记录人')">
+               <template slot-scope="scope">
+                 <el-input v-if="scope.row.isEdit" v-model="scope.row.recorder"></el-input>
+                 <span v-else>{{scope.row.recorder}}</span>
+               </template>
+             </el-table-column>
+           </el-table>
+         </template>
+
+      <span slot="footer" class="dialog-footer">
+      <el-button @click="visible = false">{{ $t('取消') }}</el-button>
+    </span>
+    </el-dialog>
+    <!-- 侧厚导入对话框 -->
+    <el-dialog  :close-on-click-modal="false" :title="uploadThickness.title" :visible.sync="uploadThickness.open" width="400px" append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="uploadThickness.headers"
+        :action="uploadThickness.url + '?updateSupport=' + uploadThickness.updateSupport"
+        :disabled="uploadThickness.isUploading"
+        :on-progress="handleFileUploadProgress2"
+        :on-success="handleFileSuccess2"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <el-link type="info" style="font-size:12px" @click="importTemplateData">下载模板</el-link>
+        </div>
+        <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm"
+                   v-loading.fullscreen.lock="fullscreenLoading">确 定</el-button>
+        <el-button @click="uploadThickness.open = false">取 消</el-button>
+      </div>
+      <form ref="downloadFileDataForm" :action="uploadThickness.downloadAction" target="FORMSUBMIT">
+        <input name="type" :value="uploadThickness.type" hidden/>
+      </form>
+    </el-dialog>
+
+    <!-- 用户导入对话框 -->
+    <el-dialog  :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
+        </div>
+        <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm"
+                   v-loading.fullscreen.lock="fullscreenLoading">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+      <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
+        <input name="type" :value="upload.type" hidden/>
+      </form>
+    </el-dialog>
+    <el-dialog :close-on-click-modal="false" v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px"
+               append-to-body>
+      <div style="margin-top: -60px;float: right;margin-right: 40px;">
+        <el-button size="mini" type="text" @click="openPdf">{{ $t('新页面打开PDF') }}</el-button>
+      </div>
+      <div style="margin-top: -30px">
+        <iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
+      </div>
+    </el-dialog>
+    <record v-if="recordVisible" ref="record" @refreshDataList="getList" :showFlag="showFlag" @closeChildDialog="closeChildDialog"></record>
+  </div>
+</template>
+
+<script>
+import {wordView, listThickness, getThickness, delThickness, addThickness, updateThickness, exportThickness, importTemplate} from "@/api/sems/thickness";
+import { treeselect } from "@/api/system/dept";
+import { getToken } from "@/utils/auth";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import Editor from '@/components/Editor';
+import request from "@/utils/request";
+import record from './record'
+import {listMeasurerecord} from "@/api/sems/measure-record";
+import {listPlant, mylistPlant} from "@/api/system/plant";
+import {queryUrl ,getLoopByPlant} from "@/api/sems/measure-loop";
+
+export default {
+  name: "Thickness",
+  components: { Treeselect ,record },
+  // components: { Editor },
+  data() {
+    return {
+      fullscreenLoading: false,
+      recordVisible: false,
+      showFlag: false,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 定点测厚表格数据
+      thicknessList: [],
+      dataList: [],
+      // 弹出层标题
+      title: "",
+      // 部门树选项
+      deptOptions: undefined,
+      clientHeight:300,
+      // 是否显示弹出层
+      open: false,
+      visible: false,
+      // 检测方法字典
+      inspectionMethodOptions: [],
+      statusOptions:[],
+      plantOptions: [],
+      loopOptions: [],
+      // 用户导入参数
+      upload: {
+          //模板下载路由
+          downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+          //模板下载区分
+          type: "thickness",
+          // 是否显示弹出层(用户导入)
+          open: false,
+          // 弹出层标题(用户导入)
+          title: "",
+          // 是否禁用上传
+          isUploading: false,
+          // 是否更新已经存在的用户数据
+          updateSupport: 0,
+          // 设置上传的请求头部
+          headers: { Authorization: "Bearer " + getToken() },
+          // 上传的地址
+          url: process.env.VUE_APP_BASE_API + "/sems/measure-record/importForUpdate"
+      },
+      // 用户导入参数
+      uploadThickness: {
+        //模板下载路由
+        downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+        //模板下载区分
+        type: "thicknessData",
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/sems/thickness/importData"
+      },
+      downloadForm: {
+        id: '',
+        key: ''
+      },
+      downloadAction: process.env.VUE_APP_BASE_API +'/sems/thickness/measure/exportPDF',
+      check: {
+        imageUrl: '',
+        fileList: [],
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/sems/thickness/uploadFile",
+      },
+      locationpic: {
+        imageUrl: '',
+        fileList: [],
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/sems/thickness/uploadFile",
+      },
+      photo: {
+        imageUrl: '',
+        fileList: [],
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/sems/thickness/uploadFile",
+      },
+      analysis: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/sems/thickness/uploadFile",
+        commonfileList: null,
+        pType: 'traning',
+        pId: null
+      },
+      pdf: {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+      },
+      locationList: [],
+      photoList: [],
+      dialogImageUrl: '',
+      dialogVisible: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        plantCode: null,
+        unitCode: null,
+        tagno: null,
+        status: null,
+        remarks: null,
+        position: null,
+        recorder: null,
+        recorderDate: null,
+        equipmentName: null,
+        material: null,
+        corAllowance: null,
+        originalThickness: null,
+        medium: null,
+        pressure: null,
+        specification: null,
+        flowRate: null,
+        temperature: null,
+        corrosionType: null,
+        inspectionMethod: null,
+        photo: null,
+        analysis: null,
+        nominalTickness: null,
+        thicknessMin: null,
+        stCorrosion: null,
+        ltCorrosion: null,
+        estRemain: null,
+        methodCause: null,
+        effectTracing: null,
+        raiser: null,
+        raiserDate: null,
+        locationUrl: null,
+        analysisUrl: null,
+        measureCycle: null,
+        recordUrl: null,
+        otherContent: null
+      }, // 查询参数
+      recordParams: {
+        pageNum: 1,
+        pageSize: 99,
+
+      },
+      // 表单参数
+      form: {},
+      dataForm: {},
+      // 表单校验
+      rules: {
+        plantCode: [
+          { required: true, message: this.$t('装置名称')+this.$t('不能为空'), trigger: "blur" }
+        ],
+        unitCode: [
+          { required: true, message: this.$t('单元名称')+this.$t('不能为空'), trigger: "blur" }
+        ],
+        position: [
+          { required: true, message: this.$t('测厚部位CML')+this.$t('不能为空'), trigger: "blur" }
+        ],
+        equipmentName: [
+          { required: true, message: this.$t('设备/管线名称')+this.$t('不能为空'), trigger: "blur" }
+        ],
+        material: [
+          { required: true, message: this.$t('材质')+this.$t('不能为空'), trigger: "blur" }
+        ],
+        corAllowance: [
+          { required: true, message: this.$t('腐蚀裕度(mm)')+this.$t('不能为空'), trigger: "blur" }
+        ],
+        originalThickness: [
+          { required: true, message: this.$t('原始壁厚(mm)')+this.$t('不能为空'), trigger: "blur" }
+        ],
+        medium: [
+          { required: true, message: this.$t('介质')+this.$t('不能为空'), trigger: "blur" }
+        ],
+        pressure: [
+          { required: true, message: this.$t('工作压力')+this.$t('不能为空'), trigger: "blur" }
+        ],
+        specification: [
+          { required: true, message: this.$t('规格')+this.$t('不能为空'), trigger: "blur" }
+        ],
+/*        flowRate: [
+          { required: true, message: this.$t('流速(m/s)')+this.$t('不能为空'), trigger: "blur" }
+        ],*/
+        temperature: [
+          { required: true, message: this.$t('工作温度(℃)')+this.$t('不能为空'), trigger: "blur" }
+        ],
+        corrosionType: [
+          { required: true, message: this.$t('腐蚀类型')+this.$t('不能为空'), trigger: "change" }
+        ],
+        /*analysis: [
+          { required: true, message: "原因分析不能为空", trigger: "blur" }
+        ],*/
+        nominalTickness: [
+          { required: true, message: this.$t('公称壁厚(mm)')+this.$t('不能为空'), trigger: "blur" }
+        ],
+        // thicknessMin: [
+        //   { required: true, message: this.$t('最小允许壁厚(mm)')+this.$t('不能为空'), trigger: "blur" }
+        // ],
+        /*stCorrosion: [
+          { required: true, message: "短期腐蚀速率不能为空", trigger: "blur" }
+        ],
+        ltCorrosion: [
+          { required: true, message: "长期腐蚀速率不能为空", trigger: "blur" }
+        ],
+        estRemain: [
+          { required: true, message: "预估剩余寿命不能为空", trigger: "blur" }
+        ],*/
+        /*methodCause: [
+          { required: true, message: "治理方法及依据不能为空", trigger: "blur" }
+        ],
+        effectTracing: [
+          { required: true, message: "效果跟踪不能为空", trigger: "blur" }
+        ],*/
+        /*raiser: [
+          { required: true, message: "提出人不能为空", trigger: "blur" }
+        ],
+        raiserDate: [
+          { required: true, message: "提出时间不能为空", trigger: "blur" }
+        ],
+        locationUrl: [
+          { required: true, message: "腐蚀位置不能为空", trigger: "blur" }
+        ],
+        measureCycle: [
+          { required: true, message: "测厚周期不能为空", trigger: "blur" }
+        ],
+        otherContent: [
+          { required: true, message: "其他检测方法内容不能为空", trigger: "blur" }
+        ]*/
+      }
+    };
+  },
+  watch: {
+        // 根据名称筛选部门树
+        deptName(val) {
+            this.$refs.tree.filter(val);
+        }
+   },
+  created() {
+      //设置表格高度对应屏幕高度
+      this.$nextTick(() => {
+          this.clientHeight = document.body.clientHeight -250
+      })
+    this.getList();
+    this.getTreeselect();
+    this.getDicts("spec_measure_status").then(response => {
+      this.statusOptions = response.data;
+    });
+    this.getDicts("spec_measure_method").then(response => {
+      this.inspectionMethodOptions = response.data;
+    });
+    let plantParams = {
+      pType: 1
+    }
+    mylistPlant(plantParams).then(response => {
+      this.plantOptions = response.data;
+    });
+  },
+  methods: {
+    /** 查询定点测厚列表 */
+    getList() {
+      this.loading = true;
+      listThickness(this.queryParams).then(response => {
+        this.thicknessList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+     /** 查询部门下拉树结构 */
+     getTreeselect() {
+          treeselect().then(response => {
+              this.deptOptions = response.data;
+          });
+     },
+    // 状态字典翻译
+    statusFormat(row, column) {
+      return this.selectDictLabel(this.statusOptions, row.status);
+    },
+    // 检测方法字典翻译
+    inspectionMethodFormat(row, column) {
+      return this.selectDictLabels(this.inspectionMethodOptions, row.inspectionMethod);
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        plantCode: null,
+        unitCode: null,
+        tagno: null,
+        status: 0,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        deptId: null,
+        remarks: null,
+        position: null,
+        recorder: null,
+        recorderDate: null,
+        equipmentName: null,
+        material: null,
+        corAllowance: null,
+        originalThickness: null,
+        medium: null,
+        pressure: null,
+        specification: null,
+        flowRate: null,
+        temperature: null,
+        corrosionType: null,
+        inspectionMethod: [],
+        photo: null,
+        analysis: null,
+        nominalTickness: null,
+        thicknessMin: null,
+        stCorrosion: null,
+        ltCorrosion: null,
+        estRemain: null,
+        methodCause: null,
+        effectTracing: null,
+        raiser: null,
+        raiserDate: null,
+        delFlag: null,
+        locationUrl: null,
+        analysisUrl: null,
+        measureCycle: null,
+        recordUrl: null,
+        otherContent: null,
+        measureNo: null,
+        nextWarnDate: null,
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    handleLoop(val){
+      let paramLoop = {
+        plantCode: val,
+      }
+      getLoopByPlant(paramLoop).then(response => {
+        this.loopOptions = response.data;
+      });
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = this.$t('添加') + this.$t('定点测厚');
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getThickness(id).then(response => {
+        this.form = response.data;
+        if (this.form.inspectionMethod) {
+          this.form.inspectionMethod = this.form.inspectionMethod.split(",");
+        }else {
+          this.form.inspectionMethod = []
+        }
+        this.open = true;
+        this.title = this.$t('修改') + this.$t('定点测厚');
+        if (this.form.photo!= null){
+          this.photoList =[]
+          let fileList = this.form.photo.split(",")
+          for (let i = 0; i < fileList.length; i++) {
+            let item = {url: process.env.VUE_APP_BASE_API +fileList[i],response: {msg: fileList[i]} }
+            this.photoList.push(item)
+          }
+        }
+        if (this.form.locationUrl!= null){
+          this.locationList =[]
+          let fileList = this.form.locationUrl.split(",")
+          for (let i = 0; i < fileList.length; i++) {
+            let item = {url: process.env.VUE_APP_BASE_API +fileList[i],response: {msg: fileList[i]} }
+            this.locationList.push(item)
+          }
+        }
+      });
+    },
+    handleView (row){
+      const id = row.id
+      getThickness(id).then(response => {
+        this.dataForm = response.data;
+        if (this.dataForm.inspectionMethod) {
+          this.dataForm.inspectionMethod = this.dataForm.inspectionMethod.split(",");
+        }else {
+          this.dataForm.inspectionMethod = []
+        }
+        this.visible = true;
+        this.title = this.$t('查看') + this.$t('定点测厚');
+        if (this.dataForm.photo!= null){
+          this.photoList =[]
+          let fileList = this.dataForm.photo.split(",")
+          for (let i = 0; i < fileList.length; i++) {
+            let item = {url: process.env.VUE_APP_BASE_API +fileList[i],response: {msg: fileList[i]} }
+            this.photoList.push(item)
+          }
+        }
+        if (this.dataForm.locationUrl!= null){
+          this.locationList =[]
+          let fileList = this.dataForm.locationUrl.split(",")
+          for (let i = 0; i < fileList.length; i++) {
+            let item = {url: process.env.VUE_APP_BASE_API +fileList[i],response: {msg: fileList[i]} }
+            this.locationList.push(item)
+          }
+        }
+        this.dataForm.recordUrl = process.env.VUE_APP_BASE_API + this.dataForm.recordUrl
+      });
+      this.recordParams.measureId = row.id
+      listMeasurerecord(this.recordParams).then(response => {
+        this.dataList = response.rows;
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.inspectionMethod) {
+            this.form.inspectionMethod = this.form.inspectionMethod.join(",");
+          }else {
+            this.form.inspectionMethod = ''
+          }
+          if (this.form.id != null) {
+            updateThickness(this.form).then(response => {
+              this.msgSuccess(this.$t('修改成功'));
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addThickness(this.form).then(response => {
+              this.msgSuccess(this.$t('新增成功'));
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+          type: "warning"
+        }).then(function() {
+          return delThickness(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess(this.$t('删除成功'));
+        })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm(this.$t('是否确认导出所有定点测厚数据项?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+          type: "warning"
+        }).then(function() {
+          return exportThickness(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+    },
+      /** 导入按钮操作 */
+      handleImportData() {
+        this.uploadThickness.title = this.$t('导入数据');
+        this.uploadThickness.open = true;
+      },
+      /** 下载侧厚模板操作 */
+      importTemplateData() {
+        this.$refs['downloadFileDataForm'].submit()
+      },
+      /** 导入按钮操作 */
+      handleImport() {
+          this.upload.title = this.$t('导入更新数据');
+          this.upload.open = true;
+      },
+      /** 下载模板操作 */
+      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.failRow.length > 0) {
+          let failrow = ''
+          for (let i = 0; i < response.data.failRow.length; i++) {
+            failrow += response.data.failRow[i] + ','
+          }
+          this.$alert(this.$t('导入成功条数:') + response.msg + '<br>' + this.$t('失败行数:') + failrow, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+        } else {
+          console.log(response.data.abnormalRow.length)
+          if (response.data.abnormalRow.length > 0) {
+            let abnormalRow = ''
+            for (let i = 0; i < response.data.abnormalRow.length; i++) {
+              abnormalRow += response.data.abnormalRow[i] + ','
+            }
+            this.$alert(this.$t('导入成功条数:') + response.msg + '<br>' + this.$t('数据异常行:') + abnormalRow, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+
+          }else {
+            this.$alert(this.$t('导入成功条数:') + response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+          }
+        }
+
+
+          this.getList();
+      },
+      // 提交上传文件
+      submitFileForm() {
+          this.$refs.upload.submit();
+          this.fullscreenLoading = true;
+      },
+    // 文件上传中处理
+    handleFileUploadProgress2(event, file, fileList) {
+      this.uploadThickness.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess2(response, file, fileList) {
+      this.uploadThickness.open = false;
+      this.uploadThickness.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.fullscreenLoading = false;
+      if (response.data.length > 0) {
+        let failrow = ''
+        for (let i = 0; i < response.data.length; i++) {
+          failrow += response.data[i] + ','
+        }
+        this.$alert(this.$t('导入成功条数:') + response.msg + '<br>' + this.$t('失败行数:') + failrow, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      } else {
+        this.$alert(this.$t('导入成功条数:') + response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      }
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm2() {
+      this.$refs.uploadThickness.submit();
+      this.fullscreenLoading = true;
+    },
+      //下载报告
+      downloadHandle (row) {
+        this.downloadForm.id = row.id;
+        this.$nextTick(() => {
+          this.$refs['downloadForm'].submit()
+        })
+      },
+    //查询测厚记录
+    recordHandle (row) {
+      this.recordVisible = true
+      this.$nextTick(() => {
+        this.$refs.record.init(row)
+      })
+    },
+    closeChildDialog () {
+      this.showFlag = false
+      this.getList();
+    },
+
+    handleExceed(files, fileList) {
+      this.$message.warning(`当前限制选择 3 个文件`);
+    },
+    handleRemove(file, fileList) {
+      this.form.locationUrl = fileList.map((obj)=>{return obj.response.msg}).join(",");
+      console.log(this.form.locationUrl)
+    },
+    handleAvatarSuccess(res, file, fileList) {
+      console.log(fileList)
+      this.locationList = fileList
+      this.form.locationUrl = fileList.map((obj)=>{return obj.response.msg}).join(",");
+      console.log(this.form.locationUrl)
+    },
+    handleRemove2(file, fileList) {
+      this.form.photo = fileList.map((obj)=>{return obj.response.msg}).join(",");
+    },
+    handleAvatarSuccess2(res, file, fileList) {
+      console.log(fileList)
+      this.photoList = fileList
+      this.form.photo = fileList.map((obj)=>{return obj.response.msg}).join(",");
+    },
+    handlePictureCardPreview(file) {
+      this.dialogImageUrl = file.url;
+      this.dialogVisible = true;
+    },
+    beforeAvatarUpload(file) {
+      const isJPG = file.type === 'image/jpeg' || file.type === 'image/png'
+      const isLt2M = file.size / 1024 / 1024 < 2
+
+      if (!isJPG) {
+        this.$message.error(this.$t('上传图片只能是 JPG/PNG 格式!'));
+      }
+      if (!isLt2M) {
+        this.$message.error(this.$t('上传图片大小不能超过 2MB!'));
+      }
+      return isJPG && isLt2M;
+    },
+    //附件上传中处理
+    handleFileDocProgress(event, file, fileList) {
+      this.analysis.file = file;
+    },
+    //附件上传中处理
+    handleFileDocProgressCheck(event, file, fileList) {
+      this.check.file = file;
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      this.form.analysisUrl = response.msg
+      this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+    },
+    //附件上传成功处理
+    handleFileDocSuccessCheck(response, file, fileList) {
+      this.form.checkUrl = response.msg
+      this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+    },
+    // 寿命颜色预警
+    tableCellStyle({ row, column, rowIndex, columnIndex }) {
+        if (row.estRemain) {
+          if (row.estRemain < 1) {
+            return {'background-color': 'rgba(255, 68,68, 0.5)'}
+          }
+          if (row.estRemain < 2) {
+            return {'background-color': 'rgba(255, 255,153, 0.5)'}
+          }
+
+        }
+
+    },
+    handleSeeLoop(row) {
+        let paramLoop = {
+          plantCode: row.plantCode,
+          loopNo: row.loopNo
+      }
+      queryUrl(paramLoop).then(response => {
+        this.pdf.open = true
+        this.pdf.title = response.data.loopNo
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + response.data.loopUrl
+      });
+    },
+    openPdf() {
+      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+    },
+    wordView(row) {
+      wordView(row.id).then(response => {
+        console.log(response.msg)
+        this.handleSee("每周检查记录", response.msg)
+      });
+    },
+    handleSee(fileName, url) {
+      //office预览
+      this.loadingFlash = true
+      this.pdf.open = true
+      this.pdf.title = fileName
+      this.pdf.pdfUrl = ""
+      this.pptView = false
+      this.ppt = true
+      //如果是PDF等直接可以打开的就不调接口,否则调用接口
+      if (fileName.endsWith('pdf')) {
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + url
+        this.loadingFlash = false
+      } else {
+        const formatDate = new FormData();
+        formatDate.append("filepath", url)
+        //调用文件预览api
+        let res = this.officeConvert.bookConvertCommon(formatDate)
+        //查看接受全局方法的返回结果 console.log(res)
+        //利用.then方法接受Promise对象
+        res.then((result) => {
+          //关闭加载中
+          this.loadingFlash = false
+          if (result.msg.includes("csv")) {
+            this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + result.data
+            this.$alert(result.msg, this.$t('检查乱码'), {dangerouslyUseHTMLString: true});
+            //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+          } else if (result.msg.includes("不存在")) {
+            //文件不存在时提示
+            this.pdf.pdfUrl = ""
+            this.$alert(result.msg, this.$t('预览失败'), {dangerouslyUseHTMLString: true});
+            //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+            this.pdf.open = false
+          } else if (result.msg.includes("不支持此格式")) {
+            this.pdf.pdfUrl = ""
+            this.$alert(result.msg, this.$t('预览失败'), {dangerouslyUseHTMLString: true});
+            //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+            this.pdf.open = false
+          } else {
+            //成功时直接给地址
+            this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + result.data
+          }
+        }).catch(result => {
+          //请求失败,关闭loading,pdf地址直接为为空,不显示
+          this.pdf.pdfUrl = ""
+          this.loadingFlash = false;
+        })
+      }
+    },
+// 文件下载处理
+    handleDownload(row) {
+      var name = '附件';
+      var url = row;
+      var suffix = url.substring(url.lastIndexOf("."), url.length);
+      console.log(url)
+      const a = document.createElement('a')
+      a.setAttribute('download', name)
+      a.setAttribute('target', '_blank')
+      a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+      a.click()
+    },
+  }
+};
+</script>
+<style>
+.otherMethod {
+  width: 40%;
+}
+</style>

+ 5 - 0
ui/src/views/sems/thickness/record.vue → ui/src/views/sems/thickness/thicknessData/record.vue

@@ -18,6 +18,11 @@
     </el-row>
 
     <el-table v-loading="loading" :data="measure_recordList" @selection-change="handleSelectionChange" border>
+      <el-table-column label="回路图号" align="center" prop="measureValue" width="120">
+        <template slot-scope="scope">
+          <span >{{scope.row.loopNo}}</span>
+        </template>
+      </el-table-column>
       <el-table-column :label="$t('实测记录')" align="center" prop="measureValue" width="120">
         <template slot-scope="scope">
           <el-input v-if="scope.row.isEdit" v-model="scope.row.measureValue"></el-input>