Ver código fonte

裂解巡检 - 炉管测温COIL趋势分析
裂解巡检 - 炉管测压COIL趋势分析

wangggziwen 2 semanas atrás
pai
commit
21a91b1e45
18 arquivos alterados com 828 adições e 40 exclusões
  1. 150 4
      master/src/main/java/com/ruoyi/project/production/controller/TFurnancePressureController.java
  2. 153 0
      master/src/main/java/com/ruoyi/project/production/controller/TFurnanceTemperatureController.java
  3. 38 0
      master/src/main/java/com/ruoyi/project/production/controller/vo/FurnancePressureCoilVO.java
  4. 38 0
      master/src/main/java/com/ruoyi/project/production/controller/vo/FurnanceTemperatureCoilVO.java
  5. 10 0
      master/src/main/java/com/ruoyi/project/production/domain/TFurnancePressure.java
  6. 32 0
      master/src/main/java/com/ruoyi/project/production/domain/TFurnanceTemperature.java
  7. 9 0
      master/src/main/java/com/ruoyi/project/production/mapper/TFurnancePressureMapper.java
  8. 8 0
      master/src/main/java/com/ruoyi/project/production/mapper/TFurnanceTemperatureMapper.java
  9. 8 0
      master/src/main/java/com/ruoyi/project/production/service/ITFurnancePressureService.java
  10. 8 0
      master/src/main/java/com/ruoyi/project/production/service/ITFurnanceTemperatureService.java
  11. 5 0
      master/src/main/java/com/ruoyi/project/production/service/impl/TFurnancePressureServiceImpl.java
  12. 5 0
      master/src/main/java/com/ruoyi/project/production/service/impl/TFurnanceTemperatureServiceImpl.java
  13. 8 0
      master/src/main/resources/mybatis/production/TFurnancePressureMapper.xml
  14. 10 0
      master/src/main/resources/mybatis/production/TFurnanceTemperatureMapper.xml
  15. 9 0
      ui/src/api/production/pressure.js
  16. 9 0
      ui/src/api/production/temperature.js
  17. 158 12
      ui/src/views/production/pressure/coil.vue
  18. 170 24
      ui/src/views/production/temperature/coil.vue

+ 150 - 4
master/src/main/java/com/ruoyi/project/production/controller/TFurnancePressureController.java

@@ -21,10 +21,7 @@ import com.ruoyi.project.common.domain.TCommonfile;
 import com.ruoyi.project.common.service.ITCommonfileService;
 import com.ruoyi.project.plant.domain.TStaffmgr;
 import com.ruoyi.project.plant.service.ITStaffmgrService;
-import com.ruoyi.project.production.controller.vo.FurnancePressureFvpVO;
-import com.ruoyi.project.production.controller.vo.FurnancePressureVO;
-import com.ruoyi.project.production.controller.vo.FurnanceSummaryVO;
-import com.ruoyi.project.production.controller.vo.FvpAnalysisQueryVO;
+import com.ruoyi.project.production.controller.vo.*;
 import com.ruoyi.project.production.domain.TFurnanceTemperature;
 import com.ruoyi.project.production.mapper.TFurnancePressureMapper;
 import com.ruoyi.project.production.service.ITFurnanceTemperatureService;
@@ -3533,6 +3530,155 @@ public class TFurnancePressureController extends BaseController {
         return AjaxResult.success(coilList);
     }
 
+    /**
+     * 查询裂解炉炉管测压COIL趋势分析
+     */
+    @PreAuthorize("@ss.hasPermi('production:pressure:list')")
+    @GetMapping("/coilAnalysis")
+    public AjaxResult coilAnalysis(TFurnancePressure tFurnancePressure) {
+        String furnace = tFurnancePressure.getFurnanceName();
+        String pass = "pass" + tFurnancePressure.getPass();
+        Date startDate = tFurnancePressure.getStartDate();
+        Date endDate = tFurnancePressure.getEndDate();
+        TFurnancePressure pressure = new TFurnancePressure();//查询对象
+        pressure.setFurnanceName(furnace);
+        if (startDate == null && endDate == null) {//不包含指定日期
+            Date today = new Date();
+            Calendar addOneDay = Calendar.getInstance();
+            addOneDay.setTime(today);
+            addOneDay.add(Calendar.DAY_OF_MONTH, 1);
+            addOneDay.set(Calendar.HOUR_OF_DAY, 0);
+            addOneDay.set(Calendar.MINUTE, 0);
+            addOneDay.set(Calendar.SECOND, 0);
+            addOneDay.set(Calendar.MILLISECOND, 0);
+            Calendar minusOneMonth = Calendar.getInstance();
+            minusOneMonth.setTime(today);
+            minusOneMonth.add(Calendar.MONTH, -1);
+            minusOneMonth.set(Calendar.HOUR_OF_DAY, 0);
+            minusOneMonth.set(Calendar.MINUTE, 0);
+            minusOneMonth.set(Calendar.SECOND, 0);
+            minusOneMonth.set(Calendar.MILLISECOND, 0);
+            pressure.setStartDate(minusOneMonth.getTime());
+            pressure.setEndDate(addOneDay.getTime());
+        } else {//包含指定日期
+            pressure.setStartDate(startDate);
+            pressure.setEndDate(endDate);
+        }
+        List<TFurnancePressure> tFurnancePressures = tFurnancePressureService.selectCoilAnalysis(pressure);//原始数据列表
+        List<FurnancePressureCoilVO> coilVoList = new ArrayList<FurnancePressureCoilVO>();//返回数据列表
+        //数据组装
+        for (TFurnancePressure obj : tFurnancePressures) {
+            int passMaxValue = 0;//pass最大值
+            switch (furnace) {
+                case "H109":
+                    passMaxValue = this.setPassMaxValueH109(obj, pass);
+                    break;
+                case "H110":
+                case "H111":
+                case "H112":
+                case "H113":
+                case "H114":
+                case "H115":
+                case "H116":
+                case "H117":
+                case "H118":
+                    passMaxValue = this.setPassMaxValueH11x(obj, pass);
+                    break;
+                case "H130":
+                    passMaxValue = this.setPassMaxValueH130(obj, pass);
+                    break;
+            }
+            //插入返回列表
+            FurnancePressureCoilVO vo = new FurnancePressureCoilVO();
+            vo.setRecordTime(obj.getRecordTime());
+            vo.setPassMaxValue(passMaxValue);
+            coilVoList.add(vo);
+        }
+        return AjaxResult.success(coilVoList);
+    }
+
+    public int setPassMaxValueH109(TFurnancePressure pressure, String pass) {
+        String pass1 = this.checkNull(pressure.getPass1());
+        String pass2 = this.checkNull(pressure.getPass2());
+        String pass3 = this.checkNull(pressure.getPass3());
+        String pass4 = this.checkNull(pressure.getPass4());
+        String pass5 = this.checkNull(pressure.getPass5());
+        String pass6 = this.checkNull(pressure.getPass6());
+        String pass7 = this.checkNull(pressure.getPass7());
+        String pass8 = this.checkNull(pressure.getPass8());
+        String pass9 = this.checkNull(pressure.getPass9());
+        String pass10 = this.checkNull(pressure.getPass10());
+        String pass11 = this.checkNull(pressure.getPass11());
+        String pass12 = this.checkNull(pressure.getPass12());
+        String pass13 = this.checkNull(pressure.getPass13());
+        String pass14 = this.checkNull(pressure.getPass14());
+        String pass15 = this.checkNull(pressure.getPass15());
+        String pass16 = this.checkNull(pressure.getPass16());
+        switch (pass) {
+            case "pass1": return this.getMaxValue(pass1 + "," + pass2);
+            case "pass2": return this.getMaxValue(pass3 + "," + pass4);
+            case "pass3": return this.getMaxValue(pass5 + "," + pass6);
+            case "pass4": return this.getMaxValue(pass7 + "," + pass8);
+            case "pass5": return this.getMaxValue(pass9 + "," + pass10);
+            case "pass6": return this.getMaxValue(pass11 + "," + pass12);
+            case "pass7": return this.getMaxValue(pass13 + "," + pass14);
+            case "pass8": return this.getMaxValue(pass15 + "," + pass16);
+        }
+        return 0;
+    }
+
+    public int setPassMaxValueH130(TFurnancePressure pressure, String pass) {
+        String pass1 = this.checkNull(pressure.getPass1());
+        String pass2 = this.checkNull(pressure.getPass2());
+        String pass3 = this.checkNull(pressure.getPass3());
+        String pass4 = this.checkNull(pressure.getPass4());
+        String pass5 = this.checkNull(pressure.getPass5());
+        String pass6 = this.checkNull(pressure.getPass6());
+        String pass7 = this.checkNull(pressure.getPass7());
+        String pass8 = this.checkNull(pressure.getPass8());
+        String pass9 = this.checkNull(pressure.getPass9());
+        String pass10 = this.checkNull(pressure.getPass10());
+        String pass11 = this.checkNull(pressure.getPass11());
+        String pass12 = this.checkNull(pressure.getPass12());
+        switch (pass) {
+            case "pass1": return this.getMaxValue(pass1);
+            case "pass2": return this.getMaxValue(pass2);
+            case "pass3": return this.getMaxValue(pass3);
+            case "pass4": return this.getMaxValue(pass4);
+            case "pass5": return this.getMaxValue(pass5);
+            case "pass6": return this.getMaxValue(pass6);
+            case "pass7": return this.getMaxValue(pass7);
+            case "pass8": return this.getMaxValue(pass8);
+            case "pass9": return this.getMaxValue(pass9);
+            case "pass10": return this.getMaxValue(pass10);
+            case "pass11": return this.getMaxValue(pass11);
+            case "pass12": return this.getMaxValue(pass12);
+        }
+        return 0;
+    }
+
+    public int setPassMaxValueH11x(TFurnancePressure pressure, String pass) {
+        String pass1 = this.checkNull(pressure.getPass1());
+        String pass2 = this.checkNull(pressure.getPass2());
+        String pass3 = this.checkNull(pressure.getPass3());
+        String pass4 = this.checkNull(pressure.getPass4());
+        String pass5 = this.checkNull(pressure.getPass5());
+        String pass6 = this.checkNull(pressure.getPass6());
+        String pass7 = this.checkNull(pressure.getPass7());
+        String pass8 = this.checkNull(pressure.getPass8());
+        switch (pass) {
+            case "pass1": return this.getMaxValue(pass1);
+            case "pass2": return this.getMaxValue(pass2);
+            case "pass3": return this.getMaxValue(pass3);
+            case "pass4": return this.getMaxValue(pass4);
+            case "pass5": return this.getMaxValue(pass5);
+            case "pass6": return this.getMaxValue(pass6);
+            case "pass7": return this.getMaxValue(pass7);
+            case "pass8": return this.getMaxValue(pass8);
+        }
+        return 0;
+    }
+
     public int getMaxValue(String value) {
         if (StringUtils.isNotNull(value) && StringUtils.isNotEmpty(value)) {
             String[] split = value.split(",");

+ 153 - 0
master/src/main/java/com/ruoyi/project/production/controller/TFurnanceTemperatureController.java

@@ -3,6 +3,7 @@ package com.ruoyi.project.production.controller;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
 
@@ -16,7 +17,9 @@ import com.ruoyi.project.plant.domain.TStaffmgr;
 import com.ruoyi.project.plant.service.ITStaffmgrService;
 import com.ruoyi.project.production.controller.vo.FurnancePressureFvpVO;
 import com.ruoyi.project.production.controller.vo.FurnanceSummaryVO;
+import com.ruoyi.project.production.controller.vo.FurnanceTemperatureCoilVO;
 import com.ruoyi.project.production.controller.vo.FurnanceTemperatureVO;
+import com.ruoyi.project.production.domain.TFurnancePressure;
 import com.ruoyi.project.production.domain.TFurnanceTemperature;
 import com.ruoyi.project.production.service.ITFurnancePressureService;
 import com.ruoyi.project.system.domain.SysDictData;
@@ -1269,6 +1272,156 @@ public class TFurnanceTemperatureController extends BaseController
         }
         return AjaxResult.success(coilList);
     }
+
+    /**
+     * 查询裂解炉炉管测温COIL趋势分析
+     */
+    @PreAuthorize("@ss.hasPermi('production:pressure:list')")
+    @GetMapping("/coilAnalysis")
+    public AjaxResult coilAnalysis(TFurnanceTemperature tFurnanceTemperature) {
+        String furnace = tFurnanceTemperature.getFurnanceName();
+        String pass = "pass" + tFurnanceTemperature.getPass();
+        Date startDate = tFurnanceTemperature.getStartDate();
+        Date endDate = tFurnanceTemperature.getEndDate();
+        TFurnanceTemperature temperature = new TFurnanceTemperature();//查询对象
+        temperature.setFurnanceName(furnace);
+        if (startDate == null && endDate == null) {//不包含指定日期
+            Date today = new Date();
+            Calendar addOneDay = Calendar.getInstance();
+            addOneDay.setTime(today);
+            addOneDay.add(Calendar.DAY_OF_MONTH, 1);
+            addOneDay.set(Calendar.HOUR_OF_DAY, 0);
+            addOneDay.set(Calendar.MINUTE, 0);
+            addOneDay.set(Calendar.SECOND, 0);
+            addOneDay.set(Calendar.MILLISECOND, 0);
+            Calendar minusOneMonth = Calendar.getInstance();
+            minusOneMonth.setTime(today);
+            minusOneMonth.add(Calendar.MONTH, -1);
+            minusOneMonth.set(Calendar.HOUR_OF_DAY, 0);
+            minusOneMonth.set(Calendar.MINUTE, 0);
+            minusOneMonth.set(Calendar.SECOND, 0);
+            minusOneMonth.set(Calendar.MILLISECOND, 0);
+            temperature.setStartDate(minusOneMonth.getTime());
+            temperature.setEndDate(addOneDay.getTime());
+        } else {//包含指定日期
+            temperature.setStartDate(startDate);
+            temperature.setEndDate(endDate);
+        }
+        List<TFurnanceTemperature> tFurnanceTemperatures = tFurnanceTemperatureService.selectCoilAnalysis(temperature);//原始数据列表
+        List<FurnanceTemperatureCoilVO> coilVoList = new ArrayList<FurnanceTemperatureCoilVO>();//返回数据列表
+        //数据组装
+        for (TFurnanceTemperature obj : tFurnanceTemperatures) {
+            int passMaxValue = 0;//pass最大值
+            switch (furnace) {
+                case "H109":
+                    passMaxValue = this.setPassMaxValueH109(obj, pass);
+                    break;
+                case "H110":
+                case "H111":
+                case "H112":
+                case "H113":
+                case "H114":
+                case "H115":
+                case "H116":
+                case "H117":
+                case "H118":
+                    passMaxValue = this.setPassMaxValueH11x(obj, pass);
+                    break;
+                case "H130":
+                    passMaxValue = this.setPassMaxValueH130(obj, pass);
+                    break;
+            }
+            //插入返回列表
+            FurnanceTemperatureCoilVO vo = new FurnanceTemperatureCoilVO();
+            vo.setRecordTime(obj.getRecordTime());
+            vo.setPassMaxValue(passMaxValue);
+            coilVoList.add(vo);
+        }
+        return AjaxResult.success(coilVoList);
+    }
+
+    public int setPassMaxValueH109(TFurnanceTemperature temperature, String pass) {
+        String pass1 = this.checkNull(temperature.getPass1());
+        String pass2 = this.checkNull(temperature.getPass2());
+        String pass3 = this.checkNull(temperature.getPass3());
+        String pass4 = this.checkNull(temperature.getPass4());
+        String pass5 = this.checkNull(temperature.getPass5());
+        String pass6 = this.checkNull(temperature.getPass6());
+        String pass7 = this.checkNull(temperature.getPass7());
+        String pass8 = this.checkNull(temperature.getPass8());
+        String pass9 = this.checkNull(temperature.getPass9());
+        String pass10 = this.checkNull(temperature.getPass10());
+        String pass11 = this.checkNull(temperature.getPass11());
+        String pass12 = this.checkNull(temperature.getPass12());
+        String pass13 = this.checkNull(temperature.getPass13());
+        String pass14 = this.checkNull(temperature.getPass14());
+        String pass15 = this.checkNull(temperature.getPass15());
+        String pass16 = this.checkNull(temperature.getPass16());
+        switch (pass) {
+            case "pass1": return this.getMaxValue(pass1 + "," + pass2);
+            case "pass2": return this.getMaxValue(pass3 + "," + pass4);
+            case "pass3": return this.getMaxValue(pass5 + "," + pass6);
+            case "pass4": return this.getMaxValue(pass7 + "," + pass8);
+            case "pass5": return this.getMaxValue(pass9 + "," + pass10);
+            case "pass6": return this.getMaxValue(pass11 + "," + pass12);
+            case "pass7": return this.getMaxValue(pass13 + "," + pass14);
+            case "pass8": return this.getMaxValue(pass15 + "," + pass16);
+        }
+        return 0;
+    }
+
+    public int setPassMaxValueH130(TFurnanceTemperature temperature, String pass) {
+        String pass1 = this.checkNull(temperature.getPass1());
+        String pass2 = this.checkNull(temperature.getPass2());
+        String pass3 = this.checkNull(temperature.getPass3());
+        String pass4 = this.checkNull(temperature.getPass4());
+        String pass5 = this.checkNull(temperature.getPass5());
+        String pass6 = this.checkNull(temperature.getPass6());
+        String pass7 = this.checkNull(temperature.getPass7());
+        String pass8 = this.checkNull(temperature.getPass8());
+        String pass9 = this.checkNull(temperature.getPass9());
+        String pass10 = this.checkNull(temperature.getPass10());
+        String pass11 = this.checkNull(temperature.getPass11());
+        String pass12 = this.checkNull(temperature.getPass12());
+        switch (pass) {
+            case "pass1": return this.getMaxValue(pass1);
+            case "pass2": return this.getMaxValue(pass2);
+            case "pass3": return this.getMaxValue(pass3);
+            case "pass4": return this.getMaxValue(pass4);
+            case "pass5": return this.getMaxValue(pass5);
+            case "pass6": return this.getMaxValue(pass6);
+            case "pass7": return this.getMaxValue(pass7);
+            case "pass8": return this.getMaxValue(pass8);
+            case "pass9": return this.getMaxValue(pass9);
+            case "pass10": return this.getMaxValue(pass10);
+            case "pass11": return this.getMaxValue(pass11);
+            case "pass12": return this.getMaxValue(pass12);
+        }
+        return 0;
+    }
+
+    public int setPassMaxValueH11x(TFurnanceTemperature temperature, String pass) {
+        String pass1 = this.checkNull(temperature.getPass1());
+        String pass2 = this.checkNull(temperature.getPass2());
+        String pass3 = this.checkNull(temperature.getPass3());
+        String pass4 = this.checkNull(temperature.getPass4());
+        String pass5 = this.checkNull(temperature.getPass5());
+        String pass6 = this.checkNull(temperature.getPass6());
+        String pass7 = this.checkNull(temperature.getPass7());
+        String pass8 = this.checkNull(temperature.getPass8());
+        switch (pass) {
+            case "pass1": return this.getMaxValue(pass1);
+            case "pass2": return this.getMaxValue(pass2);
+            case "pass3": return this.getMaxValue(pass3);
+            case "pass4": return this.getMaxValue(pass4);
+            case "pass5": return this.getMaxValue(pass5);
+            case "pass6": return this.getMaxValue(pass6);
+            case "pass7": return this.getMaxValue(pass7);
+            case "pass8": return this.getMaxValue(pass8);
+        }
+        return 0;
+    }
+
     public int getMaxValue(String value) {
         if (StringUtils.isNotNull(value) && StringUtils.isNotEmpty(value)) {
             String[] split = value.split(",");

+ 38 - 0
master/src/main/java/com/ruoyi/project/production/controller/vo/FurnancePressureCoilVO.java

@@ -0,0 +1,38 @@
+package com.ruoyi.project.production.controller.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import com.ruoyi.framework.web.domain.BaseEntity;
+
+import java.util.Date;
+
+/**
+ * 裂解炉管测压COIL VO
+ */
+public class FurnancePressureCoilVO extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "巡检日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date recordTime;
+
+    private int passMaxValue;
+
+    public Date getRecordTime() {
+        return recordTime;
+    }
+
+    public void setRecordTime(Date recordTime) {
+        this.recordTime = recordTime;
+    }
+
+    public int getPassMaxValue() {
+        return passMaxValue;
+    }
+
+    public void setPassMaxValue(int passMaxValue) {
+        this.passMaxValue = passMaxValue;
+    }
+
+}

+ 38 - 0
master/src/main/java/com/ruoyi/project/production/controller/vo/FurnanceTemperatureCoilVO.java

@@ -0,0 +1,38 @@
+package com.ruoyi.project.production.controller.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import com.ruoyi.framework.web.domain.BaseEntity;
+
+import java.util.Date;
+
+/**
+ * 裂解炉管测温COIL VO
+ */
+public class FurnanceTemperatureCoilVO extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "巡检日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date recordTime;
+
+    private int passMaxValue;
+
+    public Date getRecordTime() {
+        return recordTime;
+    }
+
+    public void setRecordTime(Date recordTime) {
+        this.recordTime = recordTime;
+    }
+
+    public int getPassMaxValue() {
+        return passMaxValue;
+    }
+
+    public void setPassMaxValue(int passMaxValue) {
+        this.passMaxValue = passMaxValue;
+    }
+
+}

+ 10 - 0
master/src/main/java/com/ruoyi/project/production/domain/TFurnancePressure.java

@@ -183,6 +183,8 @@ public class TFurnancePressure extends BaseEntity
     @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
     private Date endDate;
 
+    private String pass;
+
     private double progress;
 
     private boolean isPass1Complete;
@@ -233,6 +235,14 @@ public class TFurnancePressure extends BaseEntity
 
     private boolean isPass8RatioExceeded;
 
+    public String getPass() {
+        return pass;
+    }
+
+    public void setPass(String pass) {
+        this.pass = pass;
+    }
+
     public String getRemarks1() {
         return remarks1;
     }

+ 32 - 0
master/src/main/java/com/ruoyi/project/production/domain/TFurnanceTemperature.java

@@ -29,6 +29,14 @@ public class TFurnanceTemperature extends BaseEntity
     @Excel(name = "巡检日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date recordTime;
 
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    private Date startDate;
+
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    private Date endDate;
+
+    private String pass;
+
     /** PASS1 */
     @Excel(name = "PASS1")
     private String pass1;
@@ -141,6 +149,30 @@ public class TFurnanceTemperature extends BaseEntity
 
     private boolean isPass16Complete;
 
+    public String getPass() {
+        return pass;
+    }
+
+    public void setPass(String pass) {
+        this.pass = pass;
+    }
+
+    public Date getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(Date startDate) {
+        this.startDate = startDate;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
     public double getProgress() {
         return progress;
     }

+ 9 - 0
master/src/main/java/com/ruoyi/project/production/mapper/TFurnancePressureMapper.java

@@ -3,6 +3,7 @@ package com.ruoyi.project.production.mapper;
 import java.util.List;
 import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
 import com.ruoyi.project.production.domain.TFurnancePressure;
+import com.ruoyi.project.production.domain.TFurnanceTemperature;
 
 /**
  * 裂解炉炉管测压Mapper接口
@@ -12,6 +13,14 @@ import com.ruoyi.project.production.domain.TFurnancePressure;
  */
 public interface TFurnancePressureMapper 
 {
+    /**
+     * 查询裂解炉炉管测压COIL趋势分析
+     *
+     * @param tFurnancePressure
+     * @return
+     */
+    public List<TFurnancePressure> selectCoilAnalysis(TFurnancePressure tFurnancePressure);
+
     public List<TFurnancePressure> selectTFurnancePressureAnalysis(TFurnancePressure tFurnancePressure);
 
     /**

+ 8 - 0
master/src/main/java/com/ruoyi/project/production/mapper/TFurnanceTemperatureMapper.java

@@ -11,6 +11,14 @@ import com.ruoyi.project.production.domain.TFurnanceTemperature;
  */
 public interface TFurnanceTemperatureMapper 
 {
+    /**
+     * 查询裂解炉炉管测温COIL趋势分析
+     *
+     * @param tFurnanceTemperature
+     * @return
+     */
+    public List<TFurnanceTemperature> selectCoilAnalysis(TFurnanceTemperature tFurnanceTemperature);
+
     /**
      * 查询裂解炉炉管测温
      *

+ 8 - 0
master/src/main/java/com/ruoyi/project/production/service/ITFurnancePressureService.java

@@ -11,6 +11,14 @@ import com.ruoyi.project.production.domain.TFurnancePressure;
  */
 public interface ITFurnancePressureService 
 {
+    /**
+     * 查询裂解炉炉管测压COIL趋势分析
+     *
+     * @param tFurnancePressure
+     * @return
+     */
+    public List<TFurnancePressure> selectCoilAnalysis(TFurnancePressure tFurnancePressure);
+
     /**
      * 查询裂解炉炉管测压
      * 

+ 8 - 0
master/src/main/java/com/ruoyi/project/production/service/ITFurnanceTemperatureService.java

@@ -13,6 +13,14 @@ import com.ruoyi.project.production.domain.TFurnanceTemperature;
  */
 public interface ITFurnanceTemperatureService 
 {
+    /**
+     * 查询裂解炉炉管测温COIL趋势分析
+     *
+     * @param tFurnanceTemperature
+     * @return
+     */
+    public List<TFurnanceTemperature> selectCoilAnalysis(TFurnanceTemperature tFurnanceTemperature);
+
     /**
      * 查询裂解炉炉管测温
      *

+ 5 - 0
master/src/main/java/com/ruoyi/project/production/service/impl/TFurnancePressureServiceImpl.java

@@ -20,6 +20,11 @@ public class TFurnancePressureServiceImpl implements ITFurnancePressureService
     @Autowired
     private TFurnancePressureMapper tFurnancePressureMapper;
 
+    @Override
+    public List<TFurnancePressure> selectCoilAnalysis(TFurnancePressure tFurnancePressure) {
+        return tFurnancePressureMapper.selectCoilAnalysis(tFurnancePressure);
+    }
+
     /**
      * 查询裂解炉炉管测压
      *

+ 5 - 0
master/src/main/java/com/ruoyi/project/production/service/impl/TFurnanceTemperatureServiceImpl.java

@@ -20,6 +20,11 @@ public class TFurnanceTemperatureServiceImpl implements ITFurnanceTemperatureSer
     @Autowired
     private TFurnanceTemperatureMapper tFurnanceTemperatureMapper;
 
+    @Override
+    public List<TFurnanceTemperature> selectCoilAnalysis(TFurnanceTemperature tFurnanceTemperature) {
+        return tFurnanceTemperatureMapper.selectCoilAnalysis(tFurnanceTemperature);
+    }
+
     @Override
     public TFurnanceTemperature selectTFurnanceTemperatureByDate(TFurnanceTemperature tFurnanceTemperature) {
         return tFurnanceTemperatureMapper.selectTFurnanceTemperatureByDate(tFurnanceTemperature);

+ 8 - 0
master/src/main/resources/mybatis/production/TFurnancePressureMapper.xml

@@ -98,6 +98,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         order by record_time asc
     </select>
 
+    <select id="selectCoilAnalysis" parameterType="TFurnancePressure" resultMap="TFurnancePressureResult">
+        <include refid="selectTFurnancePressureVo"/>
+        where d.furnance_name = #{furnanceName}
+        and d.record_time &gt;= #{startDate}
+        and d.record_time &lt;= #{endDate}
+        order by record_time asc
+    </select>
+
     <select id="selectTFurnancePressureAnalysis" parameterType="TFurnancePressure" resultMap="TFurnancePressureResult">
         <include refid="selectTFurnancePressureVo"/>
         <where>

+ 10 - 0
master/src/main/resources/mybatis/production/TFurnanceTemperatureMapper.xml

@@ -8,6 +8,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="id"    column="id"    />
         <result property="furnanceName"    column="furnance_name"    />
         <result property="recordTime"    column="record_time"    />
+        <result property="startDate"    column="start_date"    />
+        <result property="endDate"    column="end_date"    />
         <result property="pass1"    column="pass1"    />
         <result property="pass2"    column="pass2"    />
         <result property="pass3"    column="pass3"    />
@@ -97,6 +99,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTFurnanceTemperatureVo"/>
         where id = #{id}
     </select>
+
+    <select id="selectCoilAnalysis" parameterType="TFurnanceTemperature" resultMap="TFurnanceTemperatureResult">
+        <include refid="selectTFurnanceTemperatureVo"/>
+        where d.furnance_name = #{furnanceName}
+        and d.record_time &gt;= #{startDate}
+        and d.record_time &lt;= #{endDate}
+        order by record_time asc
+    </select>
         
     <insert id="insertTFurnanceTemperature" parameterType="TFurnanceTemperature">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">

+ 9 - 0
ui/src/api/production/pressure.js

@@ -45,6 +45,15 @@ export function listCoil(query) {
   })
 }
 
+// 查询裂解炉炉管测压COIL趋势分析
+export function listCoilAnalysis(query) {
+  return request({
+    url: '/production/pressure/coilAnalysis',
+    method: 'get',
+    params: query
+  })
+}
+
 // 查询裂解炉炉管测压列表
 export function listPressure(query) {
   return request({

+ 9 - 0
ui/src/api/production/temperature.js

@@ -35,6 +35,15 @@ export function listCoil(query) {
   })
 }
 
+// 查询裂解炉炉管测温COIL趋势分析
+export function listCoilAnalysis(query) {
+  return request({
+    url: '/production/temperature/coilAnalysis',
+    method: 'get',
+    params: query
+  })
+}
+
 // 查询裂解炉炉管测温列表
 export function listTemperature(query) {
   return request({

+ 158 - 12
ui/src/views/production/pressure/coil.vue

@@ -24,86 +24,111 @@
       <el-table-column label="H109 OUT" align="center" prop="h109Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span>{{ scope.row.h109Out[index] }}</span>
+            <span @click="handleCoilAnalysis('H109', (index+1).toString())">{{ scope.row.h109Out[index] }}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H110 OUT" align="center" prop="h110Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span>{{ scope.row.h110Out[index] }}</span>
+            <span @click="handleCoilAnalysis('H110', (index+1).toString())">{{ scope.row.h110Out[index] }}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H111 OUT" align="center" prop="h111Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span>{{ scope.row.h111Out[index] }}</span>
+            <span @click="handleCoilAnalysis('H111', (index+1).toString())">{{ scope.row.h111Out[index] }}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H112 OUT" align="center" prop="h112Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span>{{ scope.row.h112Out[index] }}</span>
+            <span @click="handleCoilAnalysis('H112', (index+1).toString())">{{ scope.row.h112Out[index] }}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H113 OUT" align="center" prop="h113Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span>{{ scope.row.h113Out[index] }}</span>
+            <span @click="handleCoilAnalysis('H113', (index+1).toString())">{{ scope.row.h113Out[index] }}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H114 OUT" align="center" prop="h114Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span>{{ scope.row.h114Out[index] }}</span>
+            <span @click="handleCoilAnalysis('H114', (index+1).toString())">{{ scope.row.h114Out[index] }}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H115 OUT" align="center" prop="h115Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span>{{ scope.row.h115Out[index] }}</span>
+            <span @click="handleCoilAnalysis('H115', (index+1).toString())">{{ scope.row.h115Out[index] }}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H116 OUT" align="center" prop="h116Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span>{{ scope.row.h116Out[index] }}</span>
+            <span @click="handleCoilAnalysis('H116', (index+1).toString())">{{ scope.row.h116Out[index] }}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H117 OUT" align="center" prop="h117Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span>{{ scope.row.h117Out[index] }}</span>
+            <span @click="handleCoilAnalysis('H117', (index+1).toString())">{{ scope.row.h117Out[index] }}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H118 OUT" align="center" prop="h118Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span>{{ scope.row.h118Out[index] }}</span>
+            <span @click="handleCoilAnalysis('H118', (index+1).toString())">{{ scope.row.h118Out[index] }}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H130 OUT" align="center" prop="h130Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 12" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span>{{ scope.row.h130Out[index] }}</span>
+            <span @click="handleCoilAnalysis('H130', (index+1).toString())">{{ scope.row.h130Out[index] }}</span>
           </template>
         </el-table-column>
       </el-table-column>
     </el-table>
+    <!-- COIL趋势分析对话框 -->
+    <el-dialog  :close-on-click-modal="false" @close="disposeChart" :title="analysis.title" :visible.sync="analysis.open" width="80%" append-to-body>
+      <el-form :model="analysisQueryParams" ref="queryForm" :inline="true" label-width="68px">
+        <el-form-item label="开始时间" prop="startDate">
+          <el-date-picker
+            v-model="analysisQueryParams.startDate"
+            type="date"
+            placeholder="选择开始时间"
+            value-format="yyyy-MM-dd">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="结束时间" prop="endDate">
+          <el-date-picker
+            v-model="analysisQueryParams.endDate"
+            type="date"
+            placeholder="选择结束时间"
+            value-format="yyyy-MM-dd">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleCoilAnalysis(null, null)">搜索</el-button>
+        </el-form-item>
+      </el-form>
+      <div id="trendChart" style="width:100%; height: 600px;"></div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-  import { listCoil } from "@/api/production/pressure";
+  import { listCoil, listCoilAnalysis } from "@/api/production/pressure";
   import { treeselect } from "@/api/system/dept";
   import { getToken } from "@/utils/auth";
   import Treeselect from "@riophae/vue-treeselect";
@@ -114,6 +139,39 @@
     components: { Treeselect },
     data() {
       return {
+        furnace: null,
+        pass: null,
+        analysisQueryParams: {
+          furnanceName: null,
+          pass: null,
+          startDate: null,
+          endDate: null,
+        },
+        valueList: [],
+        dateList: [],
+        // 对话框控件值
+        analysisDialogElement: {
+          // 开始时间
+          startDate: null,
+          // 结束时间
+          endDate: null,
+        },
+        // 趋势图
+        chart: null,
+        // 对话框控件值
+        analysisDialogElement: {
+          // 开始时间
+          startDate: null,
+          // 结束时间
+          endDate: null,
+        },
+        // 趋势分析参数
+        analysis: {
+          // 是否显示弹出层
+          open: false,
+          // 弹出层标题
+          title: "",
+        },
         // 遮罩层
         loading: true,
         // 选中数组
@@ -211,6 +269,94 @@
       // this.getTreeselect();
     },
     methods: {
+      /** 绘制趋势图 */
+      draw() {
+        this.valueList = [];
+        this.dateList = [];
+        listCoilAnalysis(this.analysisQueryParams).then(response => {
+          let data = response.data;
+          this.maxValue = 0;
+          this.minValue = data[0].passMaxValue;
+          for (let i = 0; i < data.length; i++) {
+            if (data[i].passMaxValue != null) {
+              this.valueList.push(data[i].passMaxValue);
+              this.dateList.push(data[i].recordTime);
+              if (data[i].passMaxValue > this.maxValue) {
+                this.maxValue = data[i].passMaxValue;
+              }
+              if (data[i].passMaxValue < this.minValue) {
+                this.minValue = data[i].passMaxValue;
+              }
+            }
+          }
+          this.chart = this.echarts.init(document.getElementById("trendChart"));
+          let option = {
+            tooltip: {
+              trigger: "item"
+            },
+            grid: {
+              left: 90,
+              right: 80,
+            },
+            xAxis: {
+              data: this.dateList,
+            },
+            yAxis: {
+              max: this.maxValue,
+              min: this.minValue,
+              min: function(value) {  // 取最小值向下取整为最小刻度
+                return Math.floor(value.min)
+              },
+              max: function(value) {  // 取最大值向上取整为最大刻度
+                return  Math.ceil(value.max)
+              },
+              scale: true,
+              type: 'value',
+            },
+            series: [
+              {
+                name: this.fieldNameTitle,
+                label: {
+                  show: true,
+                  position: 'top'
+                },
+                data: this.valueList,
+                type: 'line',
+                smooth: true,
+                symbolSize: 15,
+                color:"#5470c6",
+                lineStyle: {
+                  width: 6
+                }
+              }
+            ],
+          };
+          this.chart.setOption(option);
+        });
+      },
+      /** 销毁趋势图 */
+      disposeChart() {
+        this.echarts.dispose(this.chart);
+        this.analysisQueryParams.furnanceName = null;
+        this.analysisQueryParams.pass = null;
+        this.analysisQueryParams.startDate = null;
+        this.analysisQueryParams.endDate = null;
+        this.furnace = null;
+        this.pass = null;
+      },
+      handleCoilAnalysis(furnace, pass) {
+        if (furnace != null) {
+          this.analysisQueryParams.furnanceName = furnace;
+          this.furnace = furnace;
+        }
+        if (pass != null) {
+          this.analysisQueryParams.pass = pass;
+          this.pass = pass;
+        }
+        this.analysis.title = "炉管测压趋势分析(" + this.analysisQueryParams.furnanceName + " PASS " + this.analysisQueryParams.pass + ")";
+        this.analysis.open = true;
+        this.draw();
+      },
       init() {
         let date = new Date();
         this.queryParams.recordTime = date.getFullYear() + "-" + Number(date.getMonth() + 1);

+ 170 - 24
ui/src/views/production/temperature/coil.vue

@@ -24,97 +24,122 @@
       <el-table-column label="H109 OUT" align="center" prop="h109Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span v-if="scope.row.h109Out[index]>=1080" style="color:red;">{{scope.row.h109Out[index]}}</span>
-            <span v-if="scope.row.h109Out[index]<1080">{{scope.row.h109Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H109', (index+1).toString())" v-if="scope.row.h109Out[index]>=1080" style="color:red;">{{scope.row.h109Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H109', (index+1).toString())" v-if="scope.row.h109Out[index]<1080">{{scope.row.h109Out[index]}}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H110 OUT" align="center" prop="h110Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span v-if="scope.row.h110Out[index]>=1080" style="color:red;">{{scope.row.h110Out[index]}}</span>
-            <span v-if="scope.row.h110Out[index]<1080">{{scope.row.h110Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H110', (index+1).toString())" v-if="scope.row.h110Out[index]>=1080" style="color:red;">{{scope.row.h110Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H110', (index+1).toString())" v-if="scope.row.h110Out[index]<1080">{{scope.row.h110Out[index]}}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H111 OUT" align="center" prop="h111Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span v-if="scope.row.h111Out[index]>=1080" style="color:red;">{{scope.row.h111Out[index]}}</span>
-            <span v-if="scope.row.h111Out[index]<1080">{{scope.row.h111Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H111', (index+1).toString())" v-if="scope.row.h111Out[index]>=1080" style="color:red;">{{scope.row.h111Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H111', (index+1).toString())" v-if="scope.row.h111Out[index]<1080">{{scope.row.h111Out[index]}}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H112 OUT" align="center" prop="h112Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span v-if="scope.row.h112Out[index]>=1080" style="color:red;">{{scope.row.h112Out[index]}}</span>
-            <span v-if="scope.row.h112Out[index]<1080">{{scope.row.h112Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H112', (index+1).toString())" v-if="scope.row.h112Out[index]>=1080" style="color:red;">{{scope.row.h112Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H112', (index+1).toString())" v-if="scope.row.h112Out[index]<1080">{{scope.row.h112Out[index]}}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H113 OUT" align="center" prop="h113Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span v-if="scope.row.h113Out[index]>=1080" style="color:red;">{{scope.row.h113Out[index]}}</span>
-            <span v-if="scope.row.h113Out[index]<1080">{{scope.row.h113Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H113', (index+1).toString())" v-if="scope.row.h113Out[index]>=1080" style="color:red;">{{scope.row.h113Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H113', (index+1).toString())" v-if="scope.row.h113Out[index]<1080">{{scope.row.h113Out[index]}}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H114 OUT" align="center" prop="h114Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span v-if="scope.row.h114Out[index]>=1080" style="color:red;">{{scope.row.h114Out[index]}}</span>
-            <span v-if="scope.row.h114Out[index]<1080">{{scope.row.h114Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H114', (index+1).toString())" v-if="scope.row.h114Out[index]>=1080" style="color:red;">{{scope.row.h114Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H114', (index+1).toString())" v-if="scope.row.h114Out[index]<1080">{{scope.row.h114Out[index]}}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H115 OUT" align="center" prop="h115Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span v-if="scope.row.h115Out[index]>=1080" style="color:red;">{{scope.row.h115Out[index]}}</span>
-            <span v-if="scope.row.h115Out[index]<1080">{{scope.row.h115Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H115', (index+1).toString())" v-if="scope.row.h115Out[index]>=1080" style="color:red;">{{scope.row.h115Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H115', (index+1).toString())" v-if="scope.row.h115Out[index]<1080">{{scope.row.h115Out[index]}}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H116 OUT" align="center" prop="h116Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span v-if="scope.row.h116Out[index]>=1080" style="color:red;">{{scope.row.h116Out[index]}}</span>
-            <span v-if="scope.row.h116Out[index]<1080">{{scope.row.h116Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H116', (index+1).toString())" v-if="scope.row.h116Out[index]>=1080" style="color:red;">{{scope.row.h116Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H116', (index+1).toString())" v-if="scope.row.h116Out[index]<1080">{{scope.row.h116Out[index]}}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H117 OUT" align="center" prop="h117Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span v-if="scope.row.h117Out[index]>=1080" style="color:red;">{{scope.row.h117Out[index]}}</span>
-            <span v-if="scope.row.h117Out[index]<1080">{{scope.row.h117Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H117', (index+1).toString())" v-if="scope.row.h117Out[index]>=1080" style="color:red;">{{scope.row.h117Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H117', (index+1).toString())" v-if="scope.row.h117Out[index]<1080">{{scope.row.h117Out[index]}}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H118 OUT" align="center" prop="h118Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span v-if="scope.row.h118Out[index]>=1080" style="color:red;">{{scope.row.h118Out[index]}}</span>
-            <span v-if="scope.row.h118Out[index]<1080">{{scope.row.h118Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H118', (index+1).toString())" v-if="scope.row.h118Out[index]>=1080" style="color:red;">{{scope.row.h118Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H118', (index+1).toString())" v-if="scope.row.h118Out[index]<1080">{{scope.row.h118Out[index]}}</span>
           </template>
         </el-table-column>
       </el-table-column>
       <el-table-column label="H130 OUT" align="center" prop="h130Out" :show-overflow-tooltip="true">
         <el-table-column v-for="(item,index) in 12" :label="'PASS '+(index+1).toString()" align="center" width="80">
           <template slot-scope="scope">
-            <span v-if="scope.row.h130Out[index]>=1080" style="color:red;">{{scope.row.h130Out[index]}}</span>
-            <span v-if="scope.row.h130Out[index]<1080">{{scope.row.h130Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H130', (index+1).toString())" v-if="scope.row.h130Out[index]>=1080" style="color:red;">{{scope.row.h130Out[index]}}</span>
+            <span @click="handleCoilAnalysis('H130', (index+1).toString())" v-if="scope.row.h130Out[index]<1080">{{scope.row.h130Out[index]}}</span>
           </template>
         </el-table-column>
       </el-table-column>
     </el-table>
+    <!-- COIL趋势分析对话框 -->
+    <el-dialog  :close-on-click-modal="false" @close="disposeChart" :title="analysis.title" :visible.sync="analysis.open" width="80%" append-to-body>
+      <el-form :model="analysisQueryParams" ref="queryForm" :inline="true" label-width="68px">
+        <el-form-item label="开始时间" prop="startDate">
+          <el-date-picker
+            v-model="analysisQueryParams.startDate"
+            type="date"
+            placeholder="选择开始时间"
+            value-format="yyyy-MM-dd">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="结束时间" prop="endDate">
+          <el-date-picker
+            v-model="analysisQueryParams.endDate"
+            type="date"
+            placeholder="选择结束时间"
+            value-format="yyyy-MM-dd">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleCoilAnalysis(null, null)">搜索</el-button>
+        </el-form-item>
+      </el-form>
+      <div id="trendChart" style="width:100%; height: 600px;"></div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-  import { listCoil } from "@/api/production/temperature";
+  import { listCoil, listCoilAnalysis } from "@/api/production/temperature";
   import { treeselect } from "@/api/system/dept";
   import { getToken } from "@/utils/auth";
   import Treeselect from "@riophae/vue-treeselect";
@@ -125,6 +150,39 @@
     components: { Treeselect },
     data() {
       return {
+        furnace: null,
+        pass: null,
+        analysisQueryParams: {
+          furnanceName: null,
+          pass: null,
+          startDate: null,
+          endDate: null,
+        },
+        valueList: [],
+        dateList: [],
+        // 对话框控件值
+        analysisDialogElement: {
+          // 开始时间
+          startDate: null,
+          // 结束时间
+          endDate: null,
+        },
+        // 趋势图
+        chart: null,
+        // 对话框控件值
+        analysisDialogElement: {
+          // 开始时间
+          startDate: null,
+          // 结束时间
+          endDate: null,
+        },
+        // 趋势分析参数
+        analysis: {
+          // 是否显示弹出层
+          open: false,
+          // 弹出层标题
+          title: "",
+        },
         // 遮罩层
         loading: true,
         // 选中数组
@@ -204,7 +262,7 @@
           id: [
             { required: true, message: "主键id不能为空", trigger: "blur" }
           ],
-        }
+        },
       };
     },
     watch: {
@@ -222,6 +280,94 @@
       // this.getTreeselect();
     },
     methods: {
+      /** 绘制趋势图 */
+      draw() {
+        this.valueList = [];
+        this.dateList = [];
+        listCoilAnalysis(this.analysisQueryParams).then(response => {
+          let data = response.data;
+          this.maxValue = 0;
+          this.minValue = data[0].passMaxValue;
+          for (let i = 0; i < data.length; i++) {
+            if (data[i].passMaxValue != null) {
+              this.valueList.push(data[i].passMaxValue);
+              this.dateList.push(data[i].recordTime);
+              if (data[i].passMaxValue > this.maxValue) {
+                this.maxValue = data[i].passMaxValue;
+              }
+              if (data[i].passMaxValue < this.minValue) {
+                this.minValue = data[i].passMaxValue;
+              }
+            }
+          }
+          this.chart = this.echarts.init(document.getElementById("trendChart"));
+          let option = {
+            tooltip: {
+              trigger: "item"
+            },
+            grid: {
+              left: 90,
+              right: 80,
+            },
+            xAxis: {
+              data: this.dateList,
+            },
+            yAxis: {
+              max: this.maxValue,
+              min: this.minValue,
+              min: function(value) {  // 取最小值向下取整为最小刻度
+                return Math.floor(value.min)
+              },
+              max: function(value) {  // 取最大值向上取整为最大刻度
+                return  Math.ceil(value.max)
+              },
+              scale: true,
+              type: 'value',
+            },
+            series: [
+              {
+                name: this.fieldNameTitle,
+                label: {
+                  show: true,
+                  position: 'top'
+                },
+                data: this.valueList,
+                type: 'line',
+                smooth: true,
+                symbolSize: 15,
+                color:"#5470c6",
+                lineStyle: {
+                  width: 6
+                }
+              }
+            ],
+          };
+          this.chart.setOption(option);
+        });
+      },
+      /** 销毁趋势图 */
+      disposeChart() {
+        this.echarts.dispose(this.chart);
+        this.analysisQueryParams.furnanceName = null;
+        this.analysisQueryParams.pass = null;
+        this.analysisQueryParams.startDate = null;
+        this.analysisQueryParams.endDate = null;
+        this.furnace = null;
+        this.pass = null;
+      },
+      handleCoilAnalysis(furnace, pass) {
+        if (furnace != null) {
+          this.analysisQueryParams.furnanceName = furnace;
+          this.furnace = furnace;
+        }
+        if (pass != null) {
+          this.analysisQueryParams.pass = pass;
+          this.pass = pass;
+        }
+        this.analysis.title = "炉管测温趋势分析(" + this.analysisQueryParams.furnanceName + " PASS " + this.analysisQueryParams.pass + ")";
+        this.analysis.open = true;
+        this.draw();
+      },
       init() {
         let date = new Date();
         this.queryParams.recordTime = date.getFullYear() + "-" + Number(date.getMonth() + 1);