瀏覽代碼

-新增区域、设备台账
-修改登录框
-修改登录背景
-修改代码生成

jiangbiao 2 年之前
父節點
當前提交
a240862b5a
共有 25 個文件被更改,包括 2574 次插入143 次删除
  1. 5 5
      master/src/main/java/com/ruoyi/generator/util/VelocityUtils.java
  2. 114 0
      master/src/main/java/com/ruoyi/project/base/controller/TBaseDeviceController.java
  3. 109 0
      master/src/main/java/com/ruoyi/project/base/controller/TBaseRegionController.java
  4. 256 0
      master/src/main/java/com/ruoyi/project/base/domain/TBaseDevice.java
  5. 33 5
      master/src/main/java/com/ruoyi/project/base/domain/TBasePoint.java
  6. 267 0
      master/src/main/java/com/ruoyi/project/base/domain/TBaseRegion.java
  7. 62 0
      master/src/main/java/com/ruoyi/project/base/mapper/TBaseDeviceMapper.java
  8. 62 0
      master/src/main/java/com/ruoyi/project/base/mapper/TBaseRegionMapper.java
  9. 62 0
      master/src/main/java/com/ruoyi/project/base/service/ITBaseDeviceService.java
  10. 62 0
      master/src/main/java/com/ruoyi/project/base/service/ITBaseRegionService.java
  11. 98 0
      master/src/main/java/com/ruoyi/project/base/service/impl/TBaseDeviceServiceImpl.java
  12. 98 0
      master/src/main/java/com/ruoyi/project/base/service/impl/TBaseRegionServiceImpl.java
  13. 126 0
      master/src/main/resources/mybatis/base/TBaseDeviceMapper.xml
  14. 42 38
      master/src/main/resources/mybatis/base/TBasePointMapper.xml
  15. 121 0
      master/src/main/resources/mybatis/base/TBaseRegionMapper.xml
  16. 50 0
      ui/src/api/base/device.js
  17. 51 0
      ui/src/api/base/region.js
  18. 二進制
      ui/src/assets/images/login-background.jpg
  19. 二進制
      ui/src/assets/images/profile.jpg
  20. 410 0
      ui/src/views/base/device/index.vue
  21. 1 1
      ui/src/views/base/plant/index.vue
  22. 165 90
      ui/src/views/base/point/index.vue
  23. 374 0
      ui/src/views/base/region/index.vue
  24. 5 3
      ui/src/views/login.vue
  25. 1 1
      ui/src/views/register.vue

+ 5 - 5
master/src/main/java/com/ruoyi/generator/util/VelocityUtils.java

@@ -15,7 +15,7 @@ import com.ruoyi.generator.domain.GenTableColumn;
 
 /**
  * 模板处理工具类
- * 
+ *
  * @author ruoyi
  */
 public class VelocityUtils
@@ -24,7 +24,7 @@ public class VelocityUtils
     private static final String PROJECT_PATH = "main/java";
 
     /** mybatis空间路径 */
-    private static final String MYBATIS_PATH = "main/resources/mapper";
+    private static final String MYBATIS_PATH = "main/resources/mybatis";
 
     /** 默认上级菜单,系统工具 */
     private static final String DEFAULT_PARENT_MENU_ID = "3";
@@ -234,7 +234,7 @@ public class VelocityUtils
 
     /**
      * 根据列类型获取导入包
-     * 
+     *
      * @param genTable 业务表对象
      * @return 返回需要导入的包列表
      */
@@ -264,7 +264,7 @@ public class VelocityUtils
 
     /**
      * 根据列类型获取字典组
-     * 
+     *
      * @param genTable 业务表对象
      * @return 返回字典组
      */
@@ -283,7 +283,7 @@ public class VelocityUtils
 
     /**
      * 添加字典列表
-     * 
+     *
      * @param dicts 字典列表
      * @param columns 列集合
      */

+ 114 - 0
master/src/main/java/com/ruoyi/project/base/controller/TBaseDeviceController.java

@@ -0,0 +1,114 @@
+package com.ruoyi.project.base.controller;
+
+import java.util.Date;
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.project.base.domain.TBaseDevice;
+import com.ruoyi.project.base.service.ITBaseDeviceService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 设备/管线Controller
+ *
+ * @author ruoyi
+ * @date 2022-11-15
+ */
+@RestController
+@RequestMapping("/base/device")
+public class TBaseDeviceController extends BaseController
+{
+    @Autowired
+    private ITBaseDeviceService tBaseDeviceService;
+
+    /**
+     * 查询设备/管线列表
+     */
+    @PreAuthorize("@ss.hasPermi('base:device:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TBaseDevice tBaseDevice)
+    {
+        startPage();
+        List<TBaseDevice> list = tBaseDeviceService.selectTBaseDeviceList(tBaseDevice);
+        return getDataTable(list);
+    }
+    @GetMapping("/allDevice/{regionId}")
+    public AjaxResult allDevice(@PathVariable("regionId") Long regionId)
+    {
+        return AjaxResult.success(tBaseDeviceService.selectAllDeviceByRegionId(regionId));
+    }
+
+    /**
+     * 导出设备/管线列表
+     */
+    @PreAuthorize("@ss.hasPermi('base:device:export')")
+    @Log(title = "设备/管线", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TBaseDevice tBaseDevice)
+    {
+        List<TBaseDevice> list = tBaseDeviceService.selectTBaseDeviceList(tBaseDevice);
+        ExcelUtil<TBaseDevice> util = new ExcelUtil<TBaseDevice>(TBaseDevice.class);
+        util.exportExcel(response, list, "设备/管线数据");
+    }
+
+    /**
+     * 获取设备/管线详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('base:device:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(tBaseDeviceService.selectTBaseDeviceById(id));
+    }
+
+    /**
+     * 新增设备/管线
+     */
+    @PreAuthorize("@ss.hasPermi('base:device:add')")
+    @Log(title = "设备/管线", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TBaseDevice tBaseDevice)
+    {
+        tBaseDevice.setUpdaterCode(getUserId());
+        tBaseDevice.setUpdatedate(new Date());
+        return toAjax(tBaseDeviceService.insertTBaseDevice(tBaseDevice));
+    }
+
+    /**
+     * 修改设备/管线
+     */
+    @PreAuthorize("@ss.hasPermi('base:device:edit')")
+    @Log(title = "设备/管线", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TBaseDevice tBaseDevice)
+    {
+        tBaseDevice.setUpdaterCode(getUserId());
+        tBaseDevice.setUpdatedate(new Date());
+        return toAjax(tBaseDeviceService.updateTBaseDevice(tBaseDevice));
+    }
+
+    /**
+     * 删除设备/管线
+     */
+    @PreAuthorize("@ss.hasPermi('base:device:remove')")
+    @Log(title = "设备/管线", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(tBaseDeviceService.deleteTBaseDeviceByIds(ids));
+    }
+}

+ 109 - 0
master/src/main/java/com/ruoyi/project/base/controller/TBaseRegionController.java

@@ -0,0 +1,109 @@
+package com.ruoyi.project.base.controller;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.project.base.domain.TBaseRegion;
+import com.ruoyi.project.base.service.ITBaseRegionService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 区域Controller
+ *
+ * @author ruoyi
+ * @date 2022-11-14
+ */
+@RestController
+@RequestMapping("/base/region")
+public class TBaseRegionController extends BaseController
+{
+    @Autowired
+    private ITBaseRegionService tBaseRegionService;
+
+    /**
+     * 查询区域列表
+     */
+    @PreAuthorize("@ss.hasPermi('base:region:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TBaseRegion tBaseRegion)
+    {
+        startPage();
+        List<TBaseRegion> list = tBaseRegionService.selectTBaseRegionList(tBaseRegion);
+        return getDataTable(list);
+    }
+
+    @GetMapping("/allRegion/{plantId}")
+    public AjaxResult allRegion(@PathVariable("plantId") Long plantId)
+    {
+        return AjaxResult.success(tBaseRegionService.selectAllRegionByPlantId(plantId));
+    }
+
+    /**
+     * 导出区域列表
+     */
+    @PreAuthorize("@ss.hasPermi('base:region:export')")
+    @Log(title = "区域", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TBaseRegion tBaseRegion)
+    {
+        List<TBaseRegion> list = tBaseRegionService.selectTBaseRegionList(tBaseRegion);
+        ExcelUtil<TBaseRegion> util = new ExcelUtil<TBaseRegion>(TBaseRegion.class);
+        util.exportExcel(response, list, "区域数据");
+    }
+
+    /**
+     * 获取区域详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('base:region:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(tBaseRegionService.selectTBaseRegionById(id));
+    }
+
+    /**
+     * 新增区域
+     */
+    @PreAuthorize("@ss.hasPermi('base:region:add')")
+    @Log(title = "区域", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TBaseRegion tBaseRegion)
+    {
+        tBaseRegion.setUpdaterCode(getUserId());
+        tBaseRegion.setUpdatedate(new Date());
+        return toAjax(tBaseRegionService.insertTBaseRegion(tBaseRegion));
+    }
+
+    /**
+     * 修改区域
+     */
+    @PreAuthorize("@ss.hasPermi('base:region:edit')")
+    @Log(title = "区域", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TBaseRegion tBaseRegion)
+    {
+        tBaseRegion.setUpdaterCode(getUserId());
+        tBaseRegion.setUpdatedate(new Date());
+        return toAjax(tBaseRegionService.updateTBaseRegion(tBaseRegion));
+    }
+
+    /**
+     * 删除区域
+     */
+    @PreAuthorize("@ss.hasPermi('base:region:remove')")
+    @Log(title = "区域", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(tBaseRegionService.deleteTBaseRegionByIds(ids));
+    }
+}

+ 256 - 0
master/src/main/java/com/ruoyi/project/base/domain/TBaseDevice.java

@@ -0,0 +1,256 @@
+package com.ruoyi.project.base.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 设备/管线对象 t_base_device
+ *
+ * @author ruoyi
+ * @date 2022-11-15
+ */
+public class TBaseDevice extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 唯一标识id */
+    private Long id;
+
+    /** 装置id */
+    @Excel(name = "装置id")
+    private Long plantId;
+
+    /** 区域id */
+    @Excel(name = "区域id")
+    private Long regionId;
+
+    /** 设备/管线编号 */
+    @Excel(name = "设备/管线编号")
+    private String code;
+
+    /** 设备/管线描述 */
+    @Excel(name = "设备/管线描述")
+    private String describe;
+
+    /** 审核状态 */
+    @Excel(name = "审核状态")
+    private Long approveStatus;
+
+    /** 最新申请时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "最新申请时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date approveTime;
+
+    /** 部门编号 */
+    @Excel(name = "部门编号")
+    private Long deptId;
+
+    /** 状态 1 :正常 ;0:删除 */
+    private Integer delFlag;
+
+    /** 创建人 */
+    @Excel(name = "创建人")
+    private Long createrCode;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date createdate;
+
+    /** 修改人 */
+    @Excel(name = "修改人")
+    private Long updaterCode;
+
+    /** 修改时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date updatedate;
+
+    private String plantName;
+    private String plantCode;
+    private String regionName;
+    private String regionCode;
+    private String updater;
+
+    public String getPlantName() {
+        return plantName;
+    }
+
+    public void setPlantName(String plantName) {
+        this.plantName = plantName;
+    }
+
+    public String getPlantCode() {
+        return plantCode;
+    }
+
+    public void setPlantCode(String plantCode) {
+        this.plantCode = plantCode;
+    }
+
+    public String getRegionName() {
+        return regionName;
+    }
+
+    public void setRegionName(String regionName) {
+        this.regionName = regionName;
+    }
+
+    public String getRegionCode() {
+        return regionCode;
+    }
+
+    public void setRegionCode(String regionCode) {
+        this.regionCode = regionCode;
+    }
+
+    public String getUpdater() {
+        return updater;
+    }
+
+    public void setUpdater(String updater) {
+        this.updater = updater;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setPlantId(Long plantId)
+    {
+        this.plantId = plantId;
+    }
+
+    public Long getPlantId()
+    {
+        return plantId;
+    }
+    public void setRegionId(Long regionId)
+    {
+        this.regionId = regionId;
+    }
+
+    public Long getRegionId()
+    {
+        return regionId;
+    }
+    public void setCode(String code)
+    {
+        this.code = code;
+    }
+
+    public String getCode()
+    {
+        return code;
+    }
+    public void setDescribe(String describe)
+    {
+        this.describe = describe;
+    }
+
+    public String getDescribe()
+    {
+        return describe;
+    }
+    public void setApproveStatus(Long approveStatus)
+    {
+        this.approveStatus = approveStatus;
+    }
+
+    public Long getApproveStatus()
+    {
+        return approveStatus;
+    }
+    public void setApproveTime(Date approveTime)
+    {
+        this.approveTime = approveTime;
+    }
+
+    public Date getApproveTime()
+    {
+        return approveTime;
+    }
+    public void setDeptId(Long deptId)
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId()
+    {
+        return deptId;
+    }
+    public void setDelFlag(Integer delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public Integer getDelFlag()
+    {
+        return delFlag;
+    }
+    public void setCreaterCode(Long createrCode)
+    {
+        this.createrCode = createrCode;
+    }
+
+    public Long getCreaterCode()
+    {
+        return createrCode;
+    }
+    public void setCreatedate(Date createdate)
+    {
+        this.createdate = createdate;
+    }
+
+    public Date getCreatedate()
+    {
+        return createdate;
+    }
+    public void setUpdaterCode(Long updaterCode)
+    {
+        this.updaterCode = updaterCode;
+    }
+
+    public Long getUpdaterCode()
+    {
+        return updaterCode;
+    }
+    public void setUpdatedate(Date updatedate)
+    {
+        this.updatedate = updatedate;
+    }
+
+    public Date getUpdatedate()
+    {
+        return updatedate;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("plantId", getPlantId())
+            .append("regionId", getRegionId())
+            .append("code", getCode())
+            .append("describe", getDescribe())
+            .append("remark", getRemark())
+            .append("approveStatus", getApproveStatus())
+            .append("approveTime", getApproveTime())
+            .append("deptId", getDeptId())
+            .append("delFlag", getDelFlag())
+            .append("createrCode", getCreaterCode())
+            .append("createdate", getCreatedate())
+            .append("updaterCode", getUpdaterCode())
+            .append("updatedate", getUpdatedate())
+            .toString();
+    }
+}

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

@@ -247,18 +247,30 @@ public class TBasePoint extends BaseEntity {
     @Excel(name = "装置名称")
     @TableField(exist = false)
     private String plantName;
+
     @Excel(name = "装置编码")
     @TableField(exist = false)
     private String plantCode;
+
     @Excel(name = "装置类别")
     @TableField(exist = false)
     private String plantType;
+
+    @Excel(name = "区域编码")
+    @TableField(exist = false)
+    private String regionCode;
+
+    @Excel(name = "区域名称")
+    @TableField(exist = false)
+    private String regionName;
+
     @Excel(name = "设备名称")
     @TableField(exist = false)
     private String devName;
+
     @Excel(name = "设备编码")
     @TableField(exist = false)
-    private String devNum;
+    private String devCode;
 
     /**
      * 修改时间
@@ -267,6 +279,22 @@ public class TBasePoint extends BaseEntity {
     @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date updatedate;
 
+    public String getRegionCode() {
+        return regionCode;
+    }
+
+    public void setRegionCode(String regionCode) {
+        this.regionCode = regionCode;
+    }
+
+    public String getRegionName() {
+        return regionName;
+    }
+
+    public void setRegionName(String regionName) {
+        this.regionName = regionName;
+    }
+
     public String getPlantName() {
         return plantName;
     }
@@ -299,12 +327,12 @@ public class TBasePoint extends BaseEntity {
         this.devName = devName;
     }
 
-    public String getDevNum() {
-        return devNum;
+    public String getDevCode() {
+        return devCode;
     }
 
-    public void setDevNum(String devNum) {
-        this.devNum = devNum;
+    public void setDevCode(String devCode) {
+        this.devCode = devCode;
     }
 
     public String getUpdater() {

+ 267 - 0
master/src/main/java/com/ruoyi/project/base/domain/TBaseRegion.java

@@ -0,0 +1,267 @@
+package com.ruoyi.project.base.domain;
+
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 区域对象 t_base_region
+ *
+ * @author ruoyi
+ * @date 2022-11-14
+ */
+public class TBaseRegion extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 唯一标识id
+     */
+    private Long id;
+
+    /**
+     * 装置id
+     */
+    @Excel(name = "装置id")
+    private Long plantId;
+
+    /**
+     * 区域编码
+     */
+    @Excel(name = "区域编码")
+    private String regionCode;
+
+    /**
+     * 区域名称
+     */
+    @Excel(name = "区域名称")
+    private String regionName;
+
+    /**
+     * 描述
+     */
+    @Excel(name = "描述")
+    private String remarks;
+
+    /**
+     * 审核状态
+     */
+    @Excel(name = "审核状态")
+    private Long approveStatus;
+
+    /**
+     * 最新申请时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "最新申请时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date approveTime;
+
+    /**
+     * 部门编号
+     */
+    @Excel(name = "部门编号")
+    private Long deptId;
+
+    /**
+     * 状态 1 :正常 ;0:删除
+     */
+    private Integer delFlag;
+
+    /**
+     * 创建人
+     */
+    @Excel(name = "创建人")
+    private Long createrCode;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date createdate;
+
+    /**
+     * 修改人
+     */
+    @Excel(name = "修改人")
+    private String updater;
+    private Long updaterCode;
+
+    @Excel(name = "装置名称")
+    @TableField(exist = false)
+    private String plantName;
+
+    @Excel(name = "装置编码")
+    @TableField(exist = false)
+    private String plantCode;
+
+    @Excel(name = "装置类别")
+    @TableField(exist = false)
+    private String plantType;
+
+    public String getUpdater() {
+        return updater;
+    }
+
+    public void setUpdater(String updater) {
+        this.updater = updater;
+    }
+
+    public String getPlantName() {
+        return plantName;
+    }
+
+    public void setPlantName(String plantName) {
+        this.plantName = plantName;
+    }
+
+    public String getPlantCode() {
+        return plantCode;
+    }
+
+    public void setPlantCode(String plantCode) {
+        this.plantCode = plantCode;
+    }
+
+    public String getPlantType() {
+        return plantType;
+    }
+
+    public void setPlantType(String plantType) {
+        this.plantType = plantType;
+    }
+
+    /**
+     * 修改时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date updatedate;
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setPlantId(Long plantId) {
+        this.plantId = plantId;
+    }
+
+    public Long getPlantId() {
+        return plantId;
+    }
+
+    public void setRegionCode(String regionCode) {
+        this.regionCode = regionCode;
+    }
+
+    public String getRegionCode() {
+        return regionCode;
+    }
+
+    public void setRegionName(String regionName) {
+        this.regionName = regionName;
+    }
+
+    public String getRegionName() {
+        return regionName;
+    }
+
+    public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+
+    public String getRemarks() {
+        return remarks;
+    }
+
+    public void setApproveStatus(Long approveStatus) {
+        this.approveStatus = approveStatus;
+    }
+
+    public Long getApproveStatus() {
+        return approveStatus;
+    }
+
+    public void setApproveTime(Date approveTime) {
+        this.approveTime = approveTime;
+    }
+
+    public Date getApproveTime() {
+        return approveTime;
+    }
+
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId() {
+        return deptId;
+    }
+
+    public void setDelFlag(Integer delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public Integer getDelFlag() {
+        return delFlag;
+    }
+
+    public void setCreaterCode(Long createrCode) {
+        this.createrCode = createrCode;
+    }
+
+    public Long getCreaterCode() {
+        return createrCode;
+    }
+
+    public void setCreatedate(Date createdate) {
+        this.createdate = createdate;
+    }
+
+    public Date getCreatedate() {
+        return createdate;
+    }
+
+    public void setUpdaterCode(Long updaterCode) {
+        this.updaterCode = updaterCode;
+    }
+
+    public Long getUpdaterCode() {
+        return updaterCode;
+    }
+
+    public void setUpdatedate(Date updatedate) {
+        this.updatedate = updatedate;
+    }
+
+    public Date getUpdatedate() {
+        return updatedate;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("plantId", getPlantId())
+                .append("regionCode", getRegionCode())
+                .append("regionName", getRegionName())
+                .append("remarks", getRemarks())
+                .append("approveStatus", getApproveStatus())
+                .append("approveTime", getApproveTime())
+                .append("deptId", getDeptId())
+                .append("delFlag", getDelFlag())
+                .append("createrCode", getCreaterCode())
+                .append("createdate", getCreatedate())
+                .append("updaterCode", getUpdaterCode())
+                .append("updatedate", getUpdatedate())
+                .toString();
+    }
+}

+ 62 - 0
master/src/main/java/com/ruoyi/project/base/mapper/TBaseDeviceMapper.java

@@ -0,0 +1,62 @@
+package com.ruoyi.project.base.mapper;
+
+import java.util.List;
+import com.ruoyi.project.base.domain.TBaseDevice;
+
+/**
+ * 设备/管线Mapper接口
+ *
+ * @author ruoyi
+ * @date 2022-11-15
+ */
+public interface TBaseDeviceMapper
+{
+    /**
+     * 查询设备/管线
+     *
+     * @param id 设备/管线主键
+     * @return 设备/管线
+     */
+    public TBaseDevice selectTBaseDeviceById(Long id);
+
+    /**
+     * 查询设备/管线列表
+     *
+     * @param tBaseDevice 设备/管线
+     * @return 设备/管线集合
+     */
+    public List<TBaseDevice> selectTBaseDeviceList(TBaseDevice tBaseDevice);
+    public List<TBaseDevice> selectAllDeviceByRegionId(Long regionId);
+
+    /**
+     * 新增设备/管线
+     *
+     * @param tBaseDevice 设备/管线
+     * @return 结果
+     */
+    public int insertTBaseDevice(TBaseDevice tBaseDevice);
+
+    /**
+     * 修改设备/管线
+     *
+     * @param tBaseDevice 设备/管线
+     * @return 结果
+     */
+    public int updateTBaseDevice(TBaseDevice tBaseDevice);
+
+    /**
+     * 删除设备/管线
+     *
+     * @param id 设备/管线主键
+     * @return 结果
+     */
+    public int deleteTBaseDeviceById(Long id);
+
+    /**
+     * 批量删除设备/管线
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTBaseDeviceByIds(Long[] ids);
+}

+ 62 - 0
master/src/main/java/com/ruoyi/project/base/mapper/TBaseRegionMapper.java

@@ -0,0 +1,62 @@
+package com.ruoyi.project.base.mapper;
+
+import java.util.List;
+import com.ruoyi.project.base.domain.TBaseRegion;
+
+/**
+ * 区域Mapper接口
+ *
+ * @author ruoyi
+ * @date 2022-11-14
+ */
+public interface TBaseRegionMapper
+{
+    /**
+     * 查询区域
+     *
+     * @param id 区域主键
+     * @return 区域
+     */
+    public TBaseRegion selectTBaseRegionById(Long id);
+
+    /**
+     * 查询区域列表
+     *
+     * @param tBaseRegion 区域
+     * @return 区域集合
+     */
+    public List<TBaseRegion> selectTBaseRegionList(TBaseRegion tBaseRegion);
+    public List<TBaseRegion> selectAllRegionByPlantId(Long plantId);
+
+    /**
+     * 新增区域
+     *
+     * @param tBaseRegion 区域
+     * @return 结果
+     */
+    public int insertTBaseRegion(TBaseRegion tBaseRegion);
+
+    /**
+     * 修改区域
+     *
+     * @param tBaseRegion 区域
+     * @return 结果
+     */
+    public int updateTBaseRegion(TBaseRegion tBaseRegion);
+
+    /**
+     * 删除区域
+     *
+     * @param id 区域主键
+     * @return 结果
+     */
+    public int deleteTBaseRegionById(Long id);
+
+    /**
+     * 批量删除区域
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTBaseRegionByIds(Long[] ids);
+}

+ 62 - 0
master/src/main/java/com/ruoyi/project/base/service/ITBaseDeviceService.java

@@ -0,0 +1,62 @@
+package com.ruoyi.project.base.service;
+
+import java.util.List;
+import com.ruoyi.project.base.domain.TBaseDevice;
+
+/**
+ * 设备/管线Service接口
+ *
+ * @author ruoyi
+ * @date 2022-11-15
+ */
+public interface ITBaseDeviceService
+{
+    /**
+     * 查询设备/管线
+     *
+     * @param id 设备/管线主键
+     * @return 设备/管线
+     */
+    public TBaseDevice selectTBaseDeviceById(Long id);
+
+    /**
+     * 查询设备/管线列表
+     *
+     * @param tBaseDevice 设备/管线
+     * @return 设备/管线集合
+     */
+    public List<TBaseDevice> selectTBaseDeviceList(TBaseDevice tBaseDevice);
+    public List<TBaseDevice> selectAllDeviceByRegionId(Long regionId);
+
+    /**
+     * 新增设备/管线
+     *
+     * @param tBaseDevice 设备/管线
+     * @return 结果
+     */
+    public int insertTBaseDevice(TBaseDevice tBaseDevice);
+
+    /**
+     * 修改设备/管线
+     *
+     * @param tBaseDevice 设备/管线
+     * @return 结果
+     */
+    public int updateTBaseDevice(TBaseDevice tBaseDevice);
+
+    /**
+     * 批量删除设备/管线
+     *
+     * @param ids 需要删除的设备/管线主键集合
+     * @return 结果
+     */
+    public int deleteTBaseDeviceByIds(Long[] ids);
+
+    /**
+     * 删除设备/管线信息
+     *
+     * @param id 设备/管线主键
+     * @return 结果
+     */
+    public int deleteTBaseDeviceById(Long id);
+}

+ 62 - 0
master/src/main/java/com/ruoyi/project/base/service/ITBaseRegionService.java

@@ -0,0 +1,62 @@
+package com.ruoyi.project.base.service;
+
+import java.util.List;
+import com.ruoyi.project.base.domain.TBaseRegion;
+
+/**
+ * 区域Service接口
+ *
+ * @author ruoyi
+ * @date 2022-11-14
+ */
+public interface ITBaseRegionService
+{
+    /**
+     * 查询区域
+     *
+     * @param id 区域主键
+     * @return 区域
+     */
+    public TBaseRegion selectTBaseRegionById(Long id);
+
+    /**
+     * 查询区域列表
+     *
+     * @param tBaseRegion 区域
+     * @return 区域集合
+     */
+    public List<TBaseRegion> selectTBaseRegionList(TBaseRegion tBaseRegion);
+    public List<TBaseRegion> selectAllRegionByPlantId(Long plantId);
+
+    /**
+     * 新增区域
+     *
+     * @param tBaseRegion 区域
+     * @return 结果
+     */
+    public int insertTBaseRegion(TBaseRegion tBaseRegion);
+
+    /**
+     * 修改区域
+     *
+     * @param tBaseRegion 区域
+     * @return 结果
+     */
+    public int updateTBaseRegion(TBaseRegion tBaseRegion);
+
+    /**
+     * 批量删除区域
+     *
+     * @param ids 需要删除的区域主键集合
+     * @return 结果
+     */
+    public int deleteTBaseRegionByIds(Long[] ids);
+
+    /**
+     * 删除区域信息
+     *
+     * @param id 区域主键
+     * @return 结果
+     */
+    public int deleteTBaseRegionById(Long id);
+}

+ 98 - 0
master/src/main/java/com/ruoyi/project/base/service/impl/TBaseDeviceServiceImpl.java

@@ -0,0 +1,98 @@
+package com.ruoyi.project.base.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.project.base.mapper.TBaseDeviceMapper;
+import com.ruoyi.project.base.domain.TBaseDevice;
+import com.ruoyi.project.base.service.ITBaseDeviceService;
+
+/**
+ * 设备/管线Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2022-11-15
+ */
+@Service
+public class TBaseDeviceServiceImpl implements ITBaseDeviceService
+{
+    @Autowired
+    private TBaseDeviceMapper tBaseDeviceMapper;
+
+    /**
+     * 查询设备/管线
+     *
+     * @param id 设备/管线主键
+     * @return 设备/管线
+     */
+    @Override
+    public TBaseDevice selectTBaseDeviceById(Long id)
+    {
+        return tBaseDeviceMapper.selectTBaseDeviceById(id);
+    }
+
+    /**
+     * 查询设备/管线列表
+     *
+     * @param tBaseDevice 设备/管线
+     * @return 设备/管线
+     */
+    @Override
+    public List<TBaseDevice> selectTBaseDeviceList(TBaseDevice tBaseDevice)
+    {
+        return tBaseDeviceMapper.selectTBaseDeviceList(tBaseDevice);
+    }
+    @Override
+    public List<TBaseDevice> selectAllDeviceByRegionId(Long regionId)
+    {
+        return tBaseDeviceMapper.selectAllDeviceByRegionId(regionId);
+    }
+
+    /**
+     * 新增设备/管线
+     *
+     * @param tBaseDevice 设备/管线
+     * @return 结果
+     */
+    @Override
+    public int insertTBaseDevice(TBaseDevice tBaseDevice)
+    {
+        return tBaseDeviceMapper.insertTBaseDevice(tBaseDevice);
+    }
+
+    /**
+     * 修改设备/管线
+     *
+     * @param tBaseDevice 设备/管线
+     * @return 结果
+     */
+    @Override
+    public int updateTBaseDevice(TBaseDevice tBaseDevice)
+    {
+        return tBaseDeviceMapper.updateTBaseDevice(tBaseDevice);
+    }
+
+    /**
+     * 批量删除设备/管线
+     *
+     * @param ids 需要删除的设备/管线主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTBaseDeviceByIds(Long[] ids)
+    {
+        return tBaseDeviceMapper.deleteTBaseDeviceByIds(ids);
+    }
+
+    /**
+     * 删除设备/管线信息
+     *
+     * @param id 设备/管线主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTBaseDeviceById(Long id)
+    {
+        return tBaseDeviceMapper.deleteTBaseDeviceById(id);
+    }
+}

+ 98 - 0
master/src/main/java/com/ruoyi/project/base/service/impl/TBaseRegionServiceImpl.java

@@ -0,0 +1,98 @@
+package com.ruoyi.project.base.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.project.base.mapper.TBaseRegionMapper;
+import com.ruoyi.project.base.domain.TBaseRegion;
+import com.ruoyi.project.base.service.ITBaseRegionService;
+
+/**
+ * 区域Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2022-11-14
+ */
+@Service
+public class TBaseRegionServiceImpl implements ITBaseRegionService
+{
+    @Autowired
+    private TBaseRegionMapper tBaseRegionMapper;
+
+    /**
+     * 查询区域
+     *
+     * @param id 区域主键
+     * @return 区域
+     */
+    @Override
+    public TBaseRegion selectTBaseRegionById(Long id)
+    {
+        return tBaseRegionMapper.selectTBaseRegionById(id);
+    }
+
+    /**
+     * 查询区域列表
+     *
+     * @param tBaseRegion 区域
+     * @return 区域
+     */
+    @Override
+    public List<TBaseRegion> selectTBaseRegionList(TBaseRegion tBaseRegion)
+    {
+        return tBaseRegionMapper.selectTBaseRegionList(tBaseRegion);
+    }
+    @Override
+    public List<TBaseRegion> selectAllRegionByPlantId(Long plantId)
+    {
+        return tBaseRegionMapper.selectAllRegionByPlantId(plantId);
+    }
+
+    /**
+     * 新增区域
+     *
+     * @param tBaseRegion 区域
+     * @return 结果
+     */
+    @Override
+    public int insertTBaseRegion(TBaseRegion tBaseRegion)
+    {
+        return tBaseRegionMapper.insertTBaseRegion(tBaseRegion);
+    }
+
+    /**
+     * 修改区域
+     *
+     * @param tBaseRegion 区域
+     * @return 结果
+     */
+    @Override
+    public int updateTBaseRegion(TBaseRegion tBaseRegion)
+    {
+        return tBaseRegionMapper.updateTBaseRegion(tBaseRegion);
+    }
+
+    /**
+     * 批量删除区域
+     *
+     * @param ids 需要删除的区域主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTBaseRegionByIds(Long[] ids)
+    {
+        return tBaseRegionMapper.deleteTBaseRegionByIds(ids);
+    }
+
+    /**
+     * 删除区域信息
+     *
+     * @param id 区域主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTBaseRegionById(Long id)
+    {
+        return tBaseRegionMapper.deleteTBaseRegionById(id);
+    }
+}

+ 126 - 0
master/src/main/resources/mybatis/base/TBaseDeviceMapper.xml

@@ -0,0 +1,126 @@
+<?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">
+<mapper namespace="com.ruoyi.project.base.mapper.TBaseDeviceMapper">
+
+    <resultMap type="TBaseDevice" id="TBaseDeviceResult">
+        <result property="id"    column="id"    />
+        <result property="plantId"    column="plant_id"    />
+        <result property="plantName"    column="plant_name"    />
+        <result property="plantCode"    column="plant_code"    />
+        <result property="regionId"    column="region_id"    />
+        <result property="regionName"    column="region_name"    />
+        <result property="regionCode"    column="region_code"    />
+        <result property="code"    column="code"    />
+        <result property="describe"    column="describe"    />
+        <result property="remark"    column="remark"    />
+        <result property="approveStatus"    column="approve_status"    />
+        <result property="approveTime"    column="approve_time"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createrCode"    column="creater_code"    />
+        <result property="createdate"    column="createdate"    />
+        <result property="updaterCode"    column="updater_code"    />
+        <result property="updater"    column="updater"    />
+        <result property="updatedate"    column="updatedate"    />
+    </resultMap>
+
+    <sql id="selectTBaseDeviceVo">
+        select id, plant_id, region_id, `code`, `describe`, remark, approve_status, approve_time, dept_id, del_flag, creater_code, createdate, updater_code, updatedate from t_base_device
+    </sql>
+
+    <select id="selectTBaseDeviceList" parameterType="TBaseDevice" resultMap="TBaseDeviceResult">
+        select d.id, d.plant_id,bp.plant_name,bp.plant_type,bp.plant_code, d.region_id,br.region_code,br.region_name, d.code, d.describe, d.remark, d.approve_status, d.approve_time, d.dept_id, d.del_flag, d.creater_code, d.createdate, d.updater_code,su.user_name updater, d.updatedate from t_base_device d
+        left join sys_user su on su.user_id = d.updater_code
+        left join t_base_plant bp on bp.id = d.plant_id
+        left join t_base_region br on br.id = d.region_id
+        <where>
+            <if test="plantId != null "> and d.plant_id = #{plantId}</if>
+            <if test="regionId != null  and regionId != ''"> and d.region_id = #{regionId}</if>
+            <if test="code != null  and code != ''"> and d.code = #{code}</if>
+            <if test="describe != null  and describe != ''"> and d.describe = #{describe}</if>
+            <if test="approveStatus != null "> and d.approve_status = #{approveStatus}</if>
+            <if test="approveTime != null "> and d.approve_time = #{approveTime}</if>
+            <if test="deptId != null "> and d.dept_id = #{deptId}</if>
+            <if test="createrCode != null "> and d.creater_code = #{createrCode}</if>
+            <if test="createdate != null "> and d.createdate = #{createdate}</if>
+            <if test="updaterCode != null "> and d.updater_code = #{updaterCode}</if>
+            <if test="updatedate != null "> and d.updatedate = #{updatedate}</if>
+        </where>
+    </select>
+
+    <select id="selectAllDeviceByRegionId" parameterType="long" resultMap="TBaseDeviceResult">
+        select d.id, concat(d.code, '+',d.describe) `describe` from t_base_device d where d.region_id=#{regionId}
+    </select>
+
+    <select id="selectTBaseDeviceById" parameterType="Long" resultMap="TBaseDeviceResult">
+        <include refid="selectTBaseDeviceVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertTBaseDevice" parameterType="TBaseDevice" useGeneratedKeys="true" keyProperty="id">
+        insert into t_base_device
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="plantId != null">plant_id,</if>
+            <if test="regionId != null">region_id,</if>
+            <if test="code != null">`code`,</if>
+            <if test="describe != null">`describe`,</if>
+            <if test="remark != null">remark,</if>
+            <if test="approveStatus != null">approve_status,</if>
+            <if test="approveTime != null">approve_time,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createrCode != null">creater_code,</if>
+            <if test="createdate != null">createdate,</if>
+            <if test="updaterCode != null">updater_code,</if>
+            <if test="updatedate != null">updatedate,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="plantId != null">#{plantId},</if>
+            <if test="regionId != null">#{regionId},</if>
+            <if test="code != null">#{code},</if>
+            <if test="describe != null">#{describe},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="approveStatus != null">#{approveStatus},</if>
+            <if test="approveTime != null">#{approveTime},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createrCode != null">#{createrCode},</if>
+            <if test="createdate != null">#{createdate},</if>
+            <if test="updaterCode != null">#{updaterCode},</if>
+            <if test="updatedate != null">#{updatedate},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTBaseDevice" parameterType="TBaseDevice">
+        update t_base_device
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="plantId != null">plant_id = #{plantId},</if>
+            <if test="regionId != null">region_id = #{regionId},</if>
+            <if test="code != null">`code` = #{code},</if>
+            <if test="describe != null">`describe` = #{describe},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+            <if test="approveTime != null">approve_time = #{approveTime},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createrCode != null">creater_code = #{createrCode},</if>
+            <if test="createdate != null">createdate = #{createdate},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteTBaseDeviceById" parameterType="Long">
+        delete from t_base_device where id = #{id}
+    </delete>
+
+    <delete id="deleteTBaseDeviceByIds" parameterType="String">
+        delete from t_base_device where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 42 - 38
master/src/main/resources/mybatis/base/TBasePointMapper.xml

@@ -13,9 +13,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="plantName"    column="plant_name"    />
         <result property="plantCode"    column="plant_code"    />
         <result property="regionId"    column="region_id"    />
+        <result property="regionName"    column="region_name"    />
+        <result property="regionCode"    column="region_code"    />
         <result property="devId"    column="dev_id"    />
         <result property="devName"    column="dev_name"    />
-        <result property="devNum"    column="dev_num"    />
+        <result property="devCode"    column="dev_code"    />
         <result property="medium"    column="medium"    />
         <result property="mediumType"    column="medium_type"    />
         <result property="pointType"    column="point_type"    />
@@ -56,46 +58,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
 
     <select id="selectTBasePointList" parameterType="TBasePoint" resultMap="TBasePointResult">
-        select d.id, d.ppm, d.leakage_degree, d.plant_id,bp.plant_name,bp.plant_type,bp.plant_code, d.region_id, d.dev_id,d.medium, d.medium_type, d.point_type, d.layer, d.group_position, d.point_position, d.group_code, d.extend_coude, d.sub_point_type, d.dia, d.unarrive, d.unarrive_reason, d.keep_warm, d.temperature, d.pressure, d.run_time, d.pid_no, d.pid_url, d.pic_no, d.pic_url, d.toc_mark, d.methane_mark, d.vocs_mark, d.remarks, d.approve_status, d.approve_time, d.dept_id, d.del_flag, d.creater_code, d.createdate, su.user_name updater, d.updatedate from t_base_point d
+        select d.id, d.ppm, d.leakage_degree, d.plant_id,bp.plant_name,bp.plant_type,bp.plant_code, d.region_id,br.region_code,br.region_name, d.dev_id,bd.code dev_code,bd.`describe` dev_name,d.medium, d.medium_type, d.point_type, d.layer, d.group_position, d.point_position, d.group_code, d.extend_coude, d.sub_point_type, d.dia, d.unarrive, d.unarrive_reason, d.keep_warm, d.temperature, d.pressure, d.run_time, d.pid_no, d.pid_url, d.pic_no, d.pic_url, d.toc_mark, d.methane_mark, d.vocs_mark, d.remarks, d.approve_status, d.approve_time, d.dept_id, d.del_flag, d.creater_code, d.createdate, su.user_name updater, d.updatedate from t_base_point d
         left join sys_user su on su.user_id = d.updater_code
         left join t_base_plant bp on bp.id = d.plant_id
+        left join t_base_region br on br.id = d.region_id
+        left join t_base_device bd on bd.id = d.dev_id
         <where>
-            <if test="ppm != null "> and ppm = #{ppm}</if>
-            <if test="leakageDegree != null  and leakageDegree != ''"> and leakage_degree = #{leakageDegree}</if>
-            <if test="plantId != null "> and plant_id = #{plantId}</if>
-            <if test="regionId != null "> and region_id = #{regionId}</if>
-            <if test="devId != null "> and dev_id = #{devId}</if>
-            <if test="medium != null  and medium != ''"> and medium = #{medium}</if>
-            <if test="mediumType != null  and mediumType != ''"> and medium_type = #{mediumType}</if>
-            <if test="pointType != null  and pointType != ''"> and point_type = #{pointType}</if>
-            <if test="layer != null  and layer != ''"> and layer = #{layer}</if>
-            <if test="groupPosition != null  and groupPosition != ''"> and group_position = #{groupPosition}</if>
-            <if test="pointPosition != null  and pointPosition != ''"> and point_position = #{pointPosition}</if>
-            <if test="groupCode != null  and groupCode != ''"> and group_code = #{groupCode}</if>
-            <if test="extendCoude != null  and extendCoude != ''"> and extend_coude = #{extendCoude}</if>
-            <if test="subPointType != null  and subPointType != ''"> and sub_point_type = #{subPointType}</if>
-            <if test="dia != null  and dia != ''"> and dia = #{dia}</if>
-            <if test="unarrive != null  and unarrive != ''"> and unarrive = #{unarrive}</if>
-            <if test="unarriveReason != null  and unarriveReason != ''"> and unarrive_reason = #{unarriveReason}</if>
-            <if test="keepWarm != null  and keepWarm != ''"> and keep_warm = #{keepWarm}</if>
-            <if test="temperature != null  and temperature != ''"> and temperature = #{temperature}</if>
-            <if test="pressure != null  and pressure != ''"> and pressure = #{pressure}</if>
-            <if test="runTime != null "> and run_time = #{runTime}</if>
-            <if test="pidNo != null  and pidNo != ''"> and pid_no = #{pidNo}</if>
-            <if test="pidUrl != null  and pidUrl != ''"> and pid_url = #{pidUrl}</if>
-            <if test="picNo != null  and picNo != ''"> and pic_no = #{picNo}</if>
-            <if test="picUrl != null  and picUrl != ''"> and pic_url = #{picUrl}</if>
-            <if test="tocMark != null  and tocMark != ''"> and toc_mark = #{tocMark}</if>
-            <if test="methaneMark != null  and methaneMark != ''"> and methane_mark = #{methaneMark}</if>
-            <if test="vocsMark != null  and vocsMark != ''"> and vocs_mark = #{vocsMark}</if>
-            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
-            <if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
-            <if test="approveTime != null "> and approve_time = #{approveTime}</if>
-            <if test="deptId != null "> and dept_id = #{deptId}</if>
-            <if test="createrCode != null "> and creater_code = #{createrCode}</if>
-            <if test="createdate != null "> and createdate = #{createdate}</if>
-            <if test="updaterCode != null "> and updater_code = #{updaterCode}</if>
-            <if test="updatedate != null "> and updatedate = #{updatedate}</if>
+            <if test="ppm != null "> and d.ppm = #{ppm}</if>
+            <if test="leakageDegree != null  and leakageDegree != ''"> and d.leakage_degree = #{leakageDegree}</if>
+            <if test="plantId != null "> and d.plant_id = #{plantId}</if>
+            <if test="regionId != null "> and d.region_id = #{regionId}</if>
+            <if test="devId != null "> and d.dev_id = #{devId}</if>
+            <if test="medium != null  and medium != ''"> and d.medium = #{medium}</if>
+            <if test="mediumType != null  and mediumType != ''"> and d.medium_type = #{mediumType}</if>
+            <if test="pointType != null  and pointType != ''"> and d.point_type = #{pointType}</if>
+            <if test="layer != null  and layer != ''"> and d.layer = #{layer}</if>
+            <if test="groupPosition != null  and groupPosition != ''"> and d.group_position = #{groupPosition}</if>
+            <if test="pointPosition != null  and pointPosition != ''"> and d.point_position = #{pointPosition}</if>
+            <if test="groupCode != null  and groupCode != ''"> and d.group_code = #{groupCode}</if>
+            <if test="extendCoude != null  and extendCoude != ''"> and d.extend_coude = #{extendCoude}</if>
+            <if test="subPointType != null  and subPointType != ''"> and d.sub_point_type = #{subPointType}</if>
+            <if test="dia != null  and dia != ''"> and d.dia = #{dia}</if>
+            <if test="unarrive != null  and unarrive != ''"> and d.unarrive = #{unarrive}</if>
+            <if test="unarriveReason != null  and unarriveReason != ''"> and d.unarrive_reason = #{unarriveReason}</if>
+            <if test="keepWarm != null  and keepWarm != ''"> and d.keep_warm = #{keepWarm}</if>
+            <if test="temperature != null  and temperature != ''"> and d.temperature = #{temperature}</if>
+            <if test="pressure != null  and pressure != ''"> and d.pressure = #{pressure}</if>
+            <if test="runTime != null "> and d.run_time = #{runTime}</if>
+            <if test="pidNo != null  and pidNo != ''"> and d.pid_no = #{pidNo}</if>
+            <if test="pidUrl != null  and pidUrl != ''"> and d.pid_url = #{pidUrl}</if>
+            <if test="picNo != null  and picNo != ''"> and d.pic_no = #{picNo}</if>
+            <if test="picUrl != null  and picUrl != ''"> and d.pic_url = #{picUrl}</if>
+            <if test="tocMark != null  and tocMark != ''"> and d.toc_mark = #{tocMark}</if>
+            <if test="methaneMark != null  and methaneMark != ''"> and d.methane_mark = #{methaneMark}</if>
+            <if test="vocsMark != null  and vocsMark != ''"> and d.vocs_mark = #{vocsMark}</if>
+            <if test="remarks != null  and remarks != ''"> and d.remarks = #{remarks}</if>
+            <if test="approveStatus != null "> and d.approve_status = #{approveStatus}</if>
+            <if test="approveTime != null "> and d.approve_time = #{approveTime}</if>
+            <if test="deptId != null "> and d.dept_id = #{deptId}</if>
+            <if test="createrCode != null "> and d.creater_code = #{createrCode}</if>
+            <if test="createdate != null "> and d.createdate = #{createdate}</if>
+            <if test="updaterCode != null "> and d.updater_code = #{updaterCode}</if>
+            <if test="updatedate != null "> and d.updatedate = #{updatedate}</if>
         </where>
     </select>
 

+ 121 - 0
master/src/main/resources/mybatis/base/TBaseRegionMapper.xml

@@ -0,0 +1,121 @@
+<?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">
+<mapper namespace="com.ruoyi.project.base.mapper.TBaseRegionMapper">
+
+    <resultMap type="TBaseRegion" id="TBaseRegionResult">
+        <result property="id"    column="id"    />
+        <result property="plantId"    column="plant_id"    />
+        <result property="plantType"    column="plant_type"    />
+        <result property="plantName"    column="plant_name"    />
+        <result property="plantCode"    column="plant_code"    />
+        <result property="regionCode"    column="region_code"    />
+        <result property="regionName"    column="region_name"    />
+        <result property="remarks"    column="remarks"    />
+        <result property="approveStatus"    column="approve_status"    />
+        <result property="approveTime"    column="approve_time"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createrCode"    column="creater_code"    />
+        <result property="createdate"    column="createdate"    />
+        <result property="updaterCode"    column="updater_code"    />
+        <result property="updater"    column="updater"    />
+        <result property="updatedate"    column="updatedate"    />
+    </resultMap>
+
+    <sql id="selectTBaseRegionVo">
+        select id, plant_id, region_code, region_name, remarks, approve_status, approve_time, dept_id, del_flag, creater_code, createdate, updater_code, updatedate from t_base_region
+    </sql>
+
+
+
+    <select id="selectTBaseRegionList" parameterType="TBaseRegion" resultMap="TBaseRegionResult">
+        select d.id, d.plant_id,bp.plant_name,bp.plant_type,bp.plant_code,su.user_name updater, d.region_code, d.region_name, d.remarks, d.approve_status, d.approve_time, d.dept_id, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate from t_base_region d
+        left join sys_user su on su.user_id = d.updater_code
+        left join t_base_plant bp on bp.id = d.plant_id
+        <where>
+            <if test="plantId != null "> and plant_id = #{plantId}</if>
+            <if test="regionCode != null  and regionCode != ''"> and region_code = #{regionCode}</if>
+            <if test="regionName != null  and regionName != ''"> and region_name like concat('%', #{regionName}, '%')</if>
+            <if test="remarks != null  and remarks != ''"> and d.remarks = #{remarks}</if>
+            <if test="approveStatus != null "> and d.approve_status = #{approveStatus}</if>
+            <if test="approveTime != null "> and d.approve_time = #{approveTime}</if>
+            <if test="deptId != null "> and d.dept_id = #{deptId}</if>
+            <if test="createrCode != null "> and d.creater_code = #{createrCode}</if>
+            <if test="createdate != null "> and d.createdate = #{createdate}</if>
+            <if test="updaterCode != null "> and d.updater_code = #{updaterCode}</if>
+            <if test="updatedate != null "> and d.updatedate = #{updatedate}</if>
+        </where>
+    </select>
+    <select id="selectAllRegionByPlantId" parameterType="long"  resultMap="TBaseRegionResult">
+        select d.id, d.region_code, d.region_name from t_base_region d where d.plant_id=#{plantId}
+    </select>
+
+    <select id="selectTBaseRegionById" parameterType="Long" resultMap="TBaseRegionResult">
+        <include refid="selectTBaseRegionVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertTBaseRegion" parameterType="TBaseRegion" useGeneratedKeys="true" keyProperty="id">
+        insert into t_base_region
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="plantId != null">plant_id,</if>
+            <if test="regionCode != null">region_code,</if>
+            <if test="regionName != null">region_name,</if>
+            <if test="remarks != null">remarks,</if>
+            <if test="approveStatus != null">approve_status,</if>
+            <if test="approveTime != null">approve_time,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createrCode != null">creater_code,</if>
+            <if test="createdate != null">createdate,</if>
+            <if test="updaterCode != null">updater_code,</if>
+            <if test="updatedate != null">updatedate,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="plantId != null">#{plantId},</if>
+            <if test="regionCode != null">#{regionCode},</if>
+            <if test="regionName != null">#{regionName},</if>
+            <if test="remarks != null">#{remarks},</if>
+            <if test="approveStatus != null">#{approveStatus},</if>
+            <if test="approveTime != null">#{approveTime},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createrCode != null">#{createrCode},</if>
+            <if test="createdate != null">#{createdate},</if>
+            <if test="updaterCode != null">#{updaterCode},</if>
+            <if test="updatedate != null">#{updatedate},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTBaseRegion" parameterType="TBaseRegion">
+        update t_base_region
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="plantId != null">plant_id = #{plantId},</if>
+            <if test="regionCode != null">region_code = #{regionCode},</if>
+            <if test="regionName != null">region_name = #{regionName},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+            <if test="approveTime != null">approve_time = #{approveTime},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createrCode != null">creater_code = #{createrCode},</if>
+            <if test="createdate != null">createdate = #{createdate},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteTBaseRegionById" parameterType="Long">
+        delete from t_base_region where id = #{id}
+    </delete>
+
+    <delete id="deleteTBaseRegionByIds" parameterType="String">
+        delete from t_base_region where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 50 - 0
ui/src/api/base/device.js

@@ -0,0 +1,50 @@
+import request from '@/utils/request'
+
+// 查询设备/管线列表
+export function listDevice(query) {
+  return request({
+    url: '/base/device/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询设备/管线详细
+export function getDevice(id) {
+  return request({
+    url: '/base/device/' + id,
+    method: 'get'
+  })
+}
+export function getAllDeviceByRegionId(regionId) {
+  return request({
+    url: '/base/device/allDevice/' + regionId,
+    method: 'get'
+  })
+}
+
+// 新增设备/管线
+export function addDevice(data) {
+  return request({
+    url: '/base/device',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改设备/管线
+export function updateDevice(data) {
+  return request({
+    url: '/base/device',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除设备/管线
+export function delDevice(id) {
+  return request({
+    url: '/base/device/' + id,
+    method: 'delete'
+  })
+}

+ 51 - 0
ui/src/api/base/region.js

@@ -0,0 +1,51 @@
+import request from '@/utils/request'
+
+// 查询区域列表
+export function listRegion(query) {
+  return request({
+    url: '/base/region/list',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getAllRegion(id) {
+  return request({
+    url: '/base/region/allRegion/'+id,
+    method: 'get',
+  })
+}
+
+// 查询区域详细
+export function getRegion(id) {
+  return request({
+    url: '/base/region/' + id,
+    method: 'get'
+  })
+}
+
+// 新增区域
+export function addRegion(data) {
+  return request({
+    url: '/base/region',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改区域
+export function updateRegion(data) {
+  return request({
+    url: '/base/region',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除区域
+export function delRegion(id) {
+  return request({
+    url: '/base/region/' + id,
+    method: 'delete'
+  })
+}

二進制
ui/src/assets/images/login-background.jpg


二進制
ui/src/assets/images/profile.jpg


+ 410 - 0
ui/src/views/base/device/index.vue

@@ -0,0 +1,410 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="装置" prop="plantId">
+        <el-select v-model="queryParams.plantId" @change="handleQuery"
+                   placeholder="请选择装置" clearable size="small">
+          <el-option
+            v-for="plant in plantOperation"
+            :key="plant.id"
+            :label="plant.plantName"
+            :value="plant.id"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="设备/管线编号" prop="code" label-width="110px">
+        <el-input
+          v-model="queryParams.code"
+          placeholder="请输入设备/管线编号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="设备/管线描述" prop="describe" label-width="110px">
+        <el-input
+          v-model="queryParams.describe"
+          placeholder="请输入设备/管线描述"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['base:device:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['base:device:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['base:device:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['base:device:export']"
+        >导出</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          plain
+          icon="el-icon-position"
+          size="mini"
+          @click="handleToApprove"
+        >送审
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          plain
+          icon="el-icon-s-check"
+          size="mini"
+          @click="handleApprove"
+        >审核
+        </el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="deviceList" :cell-style="tableCellStyle" @selection-change="handleSelectionChange" :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="审核状态" align="center" prop="approveStatus" :formatter="approveStatusFormat" />
+      <el-table-column label="装置名称" align="center" prop="plantName" />
+      <el-table-column label="装置编编码" align="center" prop="plantCode" />
+      <el-table-column label="区域名称" align="center" prop="regionName" />
+      <el-table-column label="区域编号" align="center" prop="regionCode" />
+      <el-table-column label="设备/管线编号" align="center" prop="code" />
+      <el-table-column label="设备/管线描述" align="center" prop="describe" />
+      <el-table-column label="维护人" align="center" prop="updater" />
+      <el-table-column label="维护时间" align="center" prop="updatedate" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.updatedate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remark" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['base:device:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['base:device:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改设备/管线对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="110px">
+        <el-form-item label="装置" prop="plantId">
+          <el-select v-model="form.plantId" placeholder="请选择装置" clearable size="small" style="width: 100%"
+                     @change="getAllRegion(form.plantId)">
+            <el-option
+              v-for="dict in plantOperation"
+              :key="dict.id"
+              :label="dict.plantName"
+              :value="dict.id"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="区域" prop="regionId">
+          <el-select v-model="form.regionId" placeholder="请选择区域" clearable size="small" style="width: 100%">
+            <el-option
+              v-for="dict in regionOperation"
+              :key="dict.id"
+              :label="dict.regionName"
+              :value="dict.id"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="设备/管线编号" prop="code">
+          <el-input v-model="form.code" placeholder="请输入设备/管线编号" />
+        </el-form-item>
+        <el-form-item label="设备/管线描述" prop="describe">
+          <el-input v-model="form.describe" placeholder="请输入设备/管线描述" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" placeholder="请输入备注" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listDevice, getDevice, delDevice, addDevice, updateDevice } from "@/api/base/device";
+import {getAllPlantName} from "@/api/base/plant";
+import {getAllRegion} from "@/api/base/region";
+
+export default {
+  name: "Device",
+  data() {
+    return {
+      plantOperation: [],
+      regionOperation: [],
+      approveStatusOperation:[],
+      clientHeight:300,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 设备/管线表格数据
+      deviceList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        plantId: null,
+        regionId: null,
+        code: null,
+        describe: null,
+        approveStatus: null,
+        approveTime: null,
+        deptId: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        regionId: [
+          {required: true, message: this.$t('区域') + this.$t('不能为空'), trigger: "blur"}
+        ],
+        plantId: [
+          {required: true, message: this.$t('装置') + this.$t('不能为空'), trigger: "blur"}
+        ],
+        describe: [
+          {required: true, message: this.$t('描述') + this.$t('不能为空'), trigger: "blur"}
+        ],
+        code: [
+          {required: true, message: this.$t('编号') + this.$t('不能为空'), trigger: "blur"}
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = (document.body.clientHeight - 80) * 0.8
+    });
+    getAllPlantName().then(response => {
+      this.plantOperation = response.data;
+    })
+    this.getDicts("base_approve_status").then(response => {
+      this.approveStatusOperation = response.data;
+    });
+  },
+  methods: {
+    approveStatusFormat(row, column) {
+      return this.selectDictLabel(this.approveStatusOperation, row.approveStatus);
+    },
+    tableCellStyle({row, column, rowIndex, columnIndex}) {
+      if (columnIndex === 1 && row.approveStatus == 2) {
+        return "color:#00ff00;";
+      }
+      if (columnIndex === 1 && row.approveStatus == 1) {
+        return "color:#0000FF;";
+      }
+      if (columnIndex === 1 && row.approveStatus == 0) {
+        return "color:#ff0000;";
+      }
+    },
+    getAllRegion(val) {
+      this.form.regionId = '';
+      if (val != null && val != '') {
+        getAllRegion(val).then(response => {
+            this.regionOperation = response.data;
+          }
+        )
+      } else {
+        this.regionOperation = [];
+      }
+    },
+    /** 查询设备/管线列表 */
+    getList() {
+      this.loading = true;
+      listDevice(this.queryParams).then(response => {
+        this.deviceList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        plantId: null,
+        regionId: null,
+        code: null,
+        describe: null,
+        remark: null,
+        approveStatus: 0,
+        approveTime: null,
+        deptId: null,
+        delFlag: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null
+      };
+      this.resetForm("form");
+      this.regionOperation=[];
+    },
+    /** 搜索按钮操作 */
+    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
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加设备/管线";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getDevice(id).then(response => {
+        this.form = response.data;
+        getAllRegion(this.form.plantId).then(response => {
+            this.regionOperation = response.data;
+          console.log(this.regionOperation)
+          }
+        )
+        this.open = true;
+        this.title = "修改设备/管线";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateDevice(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addDevice(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除设备/管线编号为"' + ids + '"的数据项?').then(function() {
+        return delDevice(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('base/device/export', {
+        ...this.queryParams
+      }, `device_${new Date().getTime()}.xlsx`)
+    },
+    handleToApprove() {
+      alert("功能开发中......")
+    },
+    handleApprove() {
+      alert("功能开发中......")
+    }
+  }
+};
+</script>

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

@@ -278,7 +278,7 @@ export default {
         return "color:#00ff00;";
       }
       if (columnIndex === 1 && row.approveStatus == 1) {
-        return "color:#FFDF00;";
+        return "color:#0000FF;";
       }
       if (columnIndex === 1 && row.approveStatus == 0) {
         return "color:#ff0000;";

+ 165 - 90
ui/src/views/base/point/index.vue

@@ -2,33 +2,35 @@
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
       <el-form-item label="装置" prop="plantId">
-        <el-select v-model="queryParams.plantId" @change="handleQuery" placeholder="请选择装置" clearable size="small">
-                    <el-option
-                      v-for="plant in plantOperation"
-                      :key="plant.id"
-                      :label="plant.plantName"
-                      :value="plant.id"
-                    />
+        <el-select v-model="queryParams.plantId" @change="handleQuery,getAllRegion(queryParams.plantId)"
+                   placeholder="请选择装置" clearable size="small">
+          <el-option
+            v-for="plant in plantOperation"
+            :key="plant.id"
+            :label="plant.plantName"
+            :value="plant.id"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="区域" prop="regionId">
-        <el-select v-model="queryParams.regionId" @change="handleQuery" placeholder="请选择区域" clearable size="small">
-          <!--          <el-option
-                      v-for="dict in classesOptions"
-                      :key="dict.dictValue"
-                      :label="dict.dictLabel"
-                      :value="dict.dictValue"
-                    />-->
+        <el-select v-model="queryParams.regionId" @change="handleQuery,getAllDeviceByRegionId(queryParams.regionId)"
+                   placeholder="请选择区域" clearable size="small">
+          <el-option
+            v-for="dict in regionOperation"
+            :key="dict.id"
+            :label="dict.regionName"
+            :value="dict.id"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="设备" prop="devId">
         <el-select v-model="queryParams.devId" @change="handleQuery" placeholder="请选择设备" clearable size="small">
-          <!--          <el-option
-                      v-for="dict in classesOptions"
-                      :key="dict.dictValue"
-                      :label="dict.dictLabel"
-                      :value="dict.dictValue"
-                    />-->
+          <el-option
+            v-for="dict in deviceOperation"
+            :key="dict.id"
+            :label="dict.describe"
+            :value="dict.id"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="群组编码" prop="groupCode">
@@ -50,45 +52,45 @@
       <el-form-item label="泄漏程度" prop="leakageDegree">
         <el-select v-model="queryParams.leakageDegree" @change="handleQuery" placeholder="请选择泄漏程度" clearable
                    size="small">
-          <!--          <el-option
-                      v-for="dict in classesOptions"
-                      :key="dict.dictValue"
-                      :label="dict.dictLabel"
-                      :value="dict.dictValue"
-                    />-->
+          <el-option
+            v-for="dict in leakageDegreeOperation"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="是/否不可达点" prop="unarrive">
         <el-select v-model="queryParams.unarrive" @change="handleQuery" placeholder="请选择是/否" clearable
                    size="small">
-                    <el-option
-                      v-for="dict in yesOrNoOperation"
-                      :key="dict.dictValue"
-                      :label="dict.dictLabel"
-                      :value="dict.dictValue"
-                    />
+          <el-option
+            v-for="dict in yesOrNoOperation"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="密封点类型" prop="pointType">
         <el-select v-model="queryParams.pointType" @change="handleQuery" placeholder="请选择密封点类型" clearable
                    size="small">
-          <!--          <el-option
-                      v-for="dict in classesOptions"
-                      :key="dict.dictValue"
-                      :label="dict.dictLabel"
-                      :value="dict.dictValue"
-                    />-->
+          <el-option
+            v-for="dict in pointOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="审核状态" prop="approveStatus">
         <el-select v-model="queryParams.approveStatus" @change="handleQuery" placeholder="请选择审核状态" clearable
                    size="small">
-                    <el-option
-                      v-for="dict in approveStatusOperation"
-                      :key="dict.dictValue"
-                      :label="dict.dictLabel"
-                      :value="dict.dictValue"
-                    />
+          <el-option
+            v-for="dict in approveStatusOperation"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
         </el-select>
       </el-form-item>
       <el-form-item>
@@ -167,20 +169,21 @@
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="pointList" :cell-style="tableCellStyle" @selection-change="handleSelectionChange" :height="clientHeight" border>
+    <el-table v-loading="loading" :data="pointList" :cell-style="tableCellStyle"
+              @selection-change="handleSelectionChange" :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center"/>
       <el-table-column label="检测净值(ppm)" align="center" prop="ppm" width="110" :show-overflow-tooltip="true"/>
       <el-table-column label="泄漏程度" align="center" prop="leakageDegree" :formatter="leakageFormat"/>
-      <el-table-column label="装置名称" align="center" prop="plantName":show-overflow-tooltip="true"/>
+      <el-table-column label="装置名称" align="center" prop="plantName" :show-overflow-tooltip="true"/>
       <el-table-column label="装置编码" align="center" prop="plantCode"/>
       <el-table-column label="装置类别" align="center" prop="plantType" :formatter="plantTypeFormat"/>
       <el-table-column label="区域名称" align="center" prop="regionName"/>
       <el-table-column label="区域编码" align="center" prop="regionCode"/>
-      <el-table-column label="设备/管线名称" align="center" prop="devName" width="110"/>
-      <el-table-column label="设备/管线编码" align="center" prop="devCode" width="110"/>
+      <el-table-column label="设备/管线名称" align="center" prop="devName" width="150" :show-overflow-tooltip="true"/>
+      <el-table-column label="设备/管线编码" align="center" prop="devCode" width="150" :show-overflow-tooltip="true"/>
       <el-table-column label="介质" align="center" prop="medium"/>
-      <el-table-column label="介质状态" align="center" prop="mediumType"/>
-      <el-table-column label="密封点类型" align="center" prop="pointType" width="100"/>
+      <el-table-column label="介质状态" align="center" prop="mediumType" :formatter="mediumTypeFormat"/>
+      <el-table-column label="密封点类型" align="center" prop="pointType" width="100" :formatter="pointFormat"/>
       <el-table-column label="平台(层)" align="center" prop="layer"/>
       <el-table-column label="群组位置" align="center" prop="groupPosition"/>
       <el-table-column label="密封点位置" align="center" prop="pointPosition" width="110"/>
@@ -203,7 +206,8 @@
       <el-table-column label="TOC质量分数" align="center" prop="tocMark" width="110"/>
       <el-table-column label="甲烷质量分数" align="center" prop="methaneMark" width="110"/>
       <el-table-column label="VOCs质量分数" align="center" prop="vocsMark" width="110"/>
-      <el-table-column label="审核状态" align="center" fixed="left" prop="approveStatus" :formatter="approveStatusFormat"/>
+      <el-table-column label="审核状态" align="center" fixed="left" prop="approveStatus"
+                       :formatter="approveStatusFormat"/>
       <el-table-column label="最后维护人" align="center" prop="updater" width="110"/>
       <el-table-column label="最后维护时间" align="center" prop="updatedate" width="180">
         <template slot-scope="scope">
@@ -242,30 +246,32 @@
     />
 
     <!-- 添加或修改密封点对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body :before-close="cleanRegion">
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-row>
           <el-col :span="12">
             <el-form-item label="装置" prop="plantId">
-              <el-select v-model="form.plantId" placeholder="请选择装置" clearable size="small" style="width: 100%">
-                          <el-option
-                            v-for="dict in plantOperation"
-                            :key="dict.id"
-                            :label="dict.plantName"
-                            :value="dict.id"
-                          />
+              <el-select v-model="form.plantId" placeholder="请选择装置" clearable size="small" style="width: 100%"
+                         @change="getAllRegion(form.plantId)">
+                <el-option
+                  v-for="dict in plantOperation"
+                  :key="dict.id"
+                  :label="dict.plantName"
+                  :value="dict.id"
+                />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="区域" prop="regionId">
-              <el-select v-model="form.regionId" placeholder="请选择区域" clearable size="small" style="width: 100%">
-                <!--          <el-option
-                            v-for="dict in classesOptions"
-                            :key="dict.dictValue"
-                            :label="dict.dictLabel"
-                            :value="dict.dictValue"
-                          />-->
+              <el-select v-model="form.regionId" placeholder="请选择区域" clearable size="small" style="width: 100%"
+                         @change="getAllDeviceByRegionId(form.regionId)">
+                <el-option
+                  v-for="dict in regionOperation"
+                  :key="dict.id"
+                  :label="dict.regionName"
+                  :value="dict.id"
+                />
               </el-select>
             </el-form-item>
           </el-col>
@@ -274,12 +280,12 @@
           <el-col :span="12">
             <el-form-item label="设备" prop="devId">
               <el-select v-model="form.devId" placeholder="请选择设备" clearable size="small" style="width: 100%">
-                <!--          <el-option
-                            v-for="dict in classesOptions"
-                            :key="dict.dictValue"
-                            :label="dict.dictLabel"
-                            :value="dict.dictValue"
-                          />-->
+                <el-option
+                  v-for="dict in deviceOperation"
+                  :key="dict.id"
+                  :label="dict.describe"
+                  :value="dict.id"
+                />
               </el-select>
             </el-form-item>
           </el-col>
@@ -292,13 +298,14 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="密封点类型" prop="pointType">
-              <el-select v-model="form.pointType" placeholder="请选择密封点类型" clearable size="small" style="width: 100%">
-                <!--          <el-option
-                            v-for="dict in classesOptions"
-                            :key="dict.dictValue"
-                            :label="dict.dictLabel"
-                            :value="dict.dictValue"
-                          />-->
+              <el-select v-model="form.pointType" placeholder="请选择密封点类型" clearable size="small"
+                         style="width: 100%">
+                <el-option
+                  v-for="dict in pointOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                />
               </el-select>
             </el-form-item>
           </el-col>
@@ -311,13 +318,14 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="介质状态" prop="mediumType">
-              <el-select v-model="form.mediumType" placeholder="请选择介质状态" clearable size="small" style="width: 100%">
-                <!--          <el-option
-                            v-for="dict in classesOptions"
-                            :key="dict.dictValue"
-                            :label="dict.dictLabel"
-                            :value="dict.dictValue"
-                          />-->
+              <el-select v-model="form.mediumType" placeholder="请选择介质状态" clearable size="small"
+                         style="width: 100%">
+                <el-option
+                  v-for="dict in mediumTypeOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                />
               </el-select>
             </el-form-item>
           </el-col>
@@ -462,12 +470,16 @@
 <script>
 import {listPoint, getPoint, delPoint, addPoint, updatePoint} from "@/api/base/point";
 import {getAllPlantName} from "@/api/base/plant";
+import {getAllRegion} from "@/api/base/region";
+import {getAllDeviceByRegionId} from "@/api/base/device";
 
 export default {
   name: "Point",
   data() {
     return {
       plantOperation: [],
+      regionOperation: [],
+      deviceOperation: [],
       plantTypeOptions: [],
       leakageDegreeOperation: [],
       // 遮罩层
@@ -482,6 +494,8 @@ export default {
       // 显示搜索条件
       showSearch: false,
       yesOrNoOperation: [],
+      pointOptions: [],
+      mediumTypeOptions: [],
       approveStatusOperation: [],
       // 总条数
       total: 0,
@@ -539,6 +553,12 @@ export default {
         plantId: [
           {required: true, message: this.$t('装置') + this.$t('不能为空'), trigger: "blur"}
         ],
+        regionId: [
+          {required: true, message: this.$t('装置') + this.$t('不能为空'), trigger: "blur"}
+        ],
+        devId: [
+          {required: true, message: this.$t('装置') + this.$t('不能为空'), trigger: "blur"}
+        ],
       }
     };
   },
@@ -559,18 +579,50 @@ export default {
     this.getDicts("leakage_degree").then(response => {
       this.leakageDegreeOperation = response.data;
     });
+    this.getDicts("point_type").then(response => {
+      this.pointOptions = response.data;
+    });
+    this.getDicts("medium_type").then(response => {
+      this.mediumTypeOptions = response.data;
+    });
     this.getList();
     getAllPlantName().then(response => {
       this.plantOperation = response.data;
     })
   },
   methods: {
+    getAllRegion(val) {
+      this.form.regionId = '';
+      this.queryParams.regionId = '';
+      this.form.devId = '';
+      this.queryParams.devId = '';
+      if (val != null && val != '') {
+        getAllRegion(val).then(response => {
+            this.regionOperation = response.data;
+          }
+        )
+      } else {
+        this.regionOperation = [];
+      }
+    },
+    getAllDeviceByRegionId(val) {
+      this.form.devId = '';
+      this.queryParams.devId = '';
+      if (val != null && val != '') {
+        getAllDeviceByRegionId(val).then(response => {
+            this.deviceOperation = response.data;
+          }
+        )
+      } else {
+        this.deviceOperation = [];
+      }
+    },
     tableCellStyle({row, column, rowIndex, columnIndex}) {
       if (columnIndex === 1 && row.approveStatus == 2) {
         return "color:#00ff00;";
       }
-      if (columnIndex === 1&& row.approveStatus == 1) {
-        return "color:#FFDF00;";
+      if (columnIndex === 1 && row.approveStatus == 1) {
+        return "color:#0000FF;";
       }
       if (columnIndex === 1 && row.approveStatus == 0) {
         return "color:#ff0000;";
@@ -586,7 +638,13 @@ export default {
       }
     },
     leakageFormat(row, column) {
-      return row.leakageDegree?"●":null;
+      return row.leakageDegree ? "●" : null;
+    },
+    pointFormat(row, column) {
+      return this.selectDictLabel(this.pointOptions, row.pointType);
+    },
+    mediumTypeFormat(row, column) {
+      return this.selectDictLabel(this.mediumTypeOptions, row.mediumType);
     },
     unarriveFormat(row, column) {
       return this.selectDictLabel(this.yesOrNoOperation, row.unarrive);
@@ -614,6 +672,10 @@ export default {
       this.open = false;
       this.reset();
     },
+    cleanRegion(done) {
+      this.reset();
+      done(true);
+    },
     // 表单重置
     reset() {
       this.form = {
@@ -657,6 +719,8 @@ export default {
         updatedate: null
       };
       this.resetForm("form");
+      this.regionOperation = [];
+      this.deviceOperation = [];
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -667,6 +731,8 @@ export default {
     resetQuery() {
       this.resetForm("queryForm");
       this.handleQuery();
+      this.regionOperation = [];
+      this.deviceOperation = [];
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
@@ -686,6 +752,14 @@ export default {
       const id = row.id || this.ids
       getPoint(id).then(response => {
         this.form = response.data;
+        getAllRegion(this.form.plantId).then(response => {
+            this.regionOperation = response.data;
+          }
+        );
+        getAllDeviceByRegionId(this.form.regionId).then(response => {
+            this.deviceOperation = response.data;
+          }
+        )
         this.open = true;
         this.title = "修改密封点";
       });
@@ -729,7 +803,8 @@ export default {
     },
     handleToApprove() {
       alert("功能开发中......")
-    },handleApprove() {
+    },
+    handleApprove() {
       alert("功能开发中......")
     }
   }

+ 374 - 0
ui/src/views/base/region/index.vue

@@ -0,0 +1,374 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="区域编号" prop="regionCode">
+        <el-input
+          v-model="queryParams.regionCode"
+          placeholder="请输入区域编号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="区域名称" prop="regionName">
+        <el-input
+          v-model="queryParams.regionName"
+          placeholder="请输入区域名称"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="审核状态" prop="approveStatus">
+        <el-select v-model="queryParams.approveStatus" @change="handleQuery" placeholder="请选择审核状态" clearable
+                   size="small">
+          <el-option
+            v-for="dict in approveStatusOperation"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['base:region:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['base:region:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['base:region:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['base:region:export']"
+        >导出</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          plain
+          icon="el-icon-position"
+          size="mini"
+          @click="handleToApprove"
+        >送审
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          plain
+          icon="el-icon-s-check"
+          size="mini"
+          @click="handleApprove"
+        >审核
+        </el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="regionList" @selection-change="handleSelectionChange" :height="clientHeight" :cell-style="tableCellStyle">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="审核状态" align="center" prop="approveStatus" :formatter="approveStatusFormat"/>
+      <el-table-column label="装置编号" align="center" prop="plantCode" />
+      <el-table-column label="装置名称" align="center" prop="plantName" />
+      <el-table-column label="区域编号" align="center" prop="regionCode" />
+      <el-table-column label="区域名称" align="center" prop="regionName" />
+      <el-table-column label="最后维护人" align="center" prop="updater" />
+      <el-table-column label="维护日期" align="center" prop="updatedate" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.updatedate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="描述" align="center" prop="remarks" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['base:region:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['base:region:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改区域对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="装置名称" prop="plantId">
+          <el-select v-model="form.plantId" placeholder="请选择装置" clearable size="small" style="width: 100%">
+            <el-option
+              v-for="dict in plantOperation"
+              :key="dict.id"
+              :label="dict.plantName"
+              :value="dict.id"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="区域编号" prop="regionCode">
+          <el-input v-model="form.regionCode" placeholder="请输入区域编号" />
+        </el-form-item>
+        <el-form-item label="区域名称" prop="regionName">
+          <el-input v-model="form.regionName" placeholder="请输入区域名称" />
+        </el-form-item>
+        <el-form-item label="描述" prop="remarks">
+          <el-input v-model="form.remarks" placeholder="请输入描述" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listRegion, getRegion, delRegion, addRegion, updateRegion } from "@/api/base/region";
+import {getAllPlantName} from "@/api/base/plant";
+
+export default {
+  name: "Region",
+  data() {
+    return {
+      clientHeight:[],
+      plantOperation:[],
+      approveStatusOperation:[],
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 区域表格数据
+      regionList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        plantId: null,
+        regionCode: null,
+        regionName: null,
+        remarks: null,
+        approveStatus: null,
+        approveTime: null,
+        deptId: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        plantId: [
+          {required: true, message: this.$t('装置名称') + this.$t('不能为空'), trigger: "blur"}
+        ],
+        regionCode: [
+          {required: true, message: this.$t('区域编号') + this.$t('不能为空'), trigger: "blur"}
+        ],
+        regionName: [
+          {required: true, message: this.$t('区域名称') + this.$t('不能为空'), trigger: "blur"}
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = (document.body.clientHeight - 80) * 0.8
+    });
+    getAllPlantName().then(response => {
+      this.plantOperation = response.data;
+    });
+    this.getDicts("base_approve_status").then(response => {
+      this.approveStatusOperation = response.data;
+    });
+  },
+  methods: {
+    tableCellStyle({row, column, rowIndex, columnIndex}) {
+      if (columnIndex === 1 && row.approveStatus == 2) {
+        return "color:#00ff00;";
+      }
+      if (columnIndex === 1 && row.approveStatus == 1) {
+        return "color:#0000FF;";
+      }
+      if (columnIndex === 1 && row.approveStatus == 0) {
+        return "color:#ff0000;";
+      }
+    },
+    approveStatusFormat(row, column) {
+      return this.selectDictLabel(this.approveStatusOperation, row.approveStatus);
+    },
+    /** 查询区域列表 */
+    getList() {
+      this.loading = true;
+      listRegion(this.queryParams).then(response => {
+        this.regionList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        plantId: null,
+        regionCode: null,
+        regionName: null,
+        remarks: null,
+        approveStatus: 0,
+        approveTime: null,
+        deptId: null,
+        delFlag: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: 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
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加区域";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getRegion(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改区域";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateRegion(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addRegion(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除区域编号为"' + ids + '"的数据项?').then(function() {
+        return delRegion(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('base/region/export', {
+        ...this.queryParams
+      }, `region_${new Date().getTime()}.xlsx`)
+    },
+    handleToApprove() {
+      alert("功能开发中......")
+    },
+    handleApprove() {
+      alert("功能开发中......")
+    }
+  }
+};
+</script>

+ 5 - 3
ui/src/views/login.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="login">
     <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
-      <h3 class="title">若依后台管理系统</h3>
+      <h3 class="title">LDAR综合管理系统</h3>
       <el-form-item prop="username">
         <el-input
           v-model="loginForm.username"
@@ -56,7 +56,7 @@
     </el-form>
     <!--  底部  -->
     <div class="el-login-footer">
-      <span>Copyright © 2018-2022 ruoyi.vip All Rights Reserved.</span>
+      <span>Copyright © 2020-2022 Seashore.ept All Rights Reserved.</span>
     </div>
   </div>
 </template>
@@ -172,8 +172,10 @@ export default {
 
 .login-form {
   border-radius: 6px;
-  background: #ffffff;
+  background: #ffffffaa;
   width: 400px;
+  box-sizing:border-box;
+  box-shadow: 0px 15px 25px rgba(0,0,0,.5);
   padding: 25px 25px 5px 25px;
   .el-input {
     height: 38px;

+ 1 - 1
ui/src/views/register.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="register">
     <el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
-      <h3 class="title">若依后台管理系统</h3>
+      <h3 class="title">LDAR综合管理系统</h3>
       <el-form-item prop="username">
         <el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
           <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />