zy 1 год назад
Родитель
Сommit
fad128193c
18 измененных файлов с 1153 добавлено и 17 удалено
  1. 2 1
      neim-biz/src/main/java/com/jiayue/biz/controller/FengJiInfoController.java
  2. 66 0
      neim-biz/src/main/java/com/jiayue/biz/controller/PvModuleModelController.java
  3. 82 0
      neim-biz/src/main/java/com/jiayue/biz/controller/WeatherStationInfoController.java
  4. 68 0
      neim-biz/src/main/java/com/jiayue/biz/domain/InverterInfo.java
  5. 68 0
      neim-biz/src/main/java/com/jiayue/biz/domain/PvModuleModel.java
  6. 50 0
      neim-biz/src/main/java/com/jiayue/biz/domain/WeatherStationInfo.java
  7. 15 0
      neim-biz/src/main/java/com/jiayue/biz/mapper/PvModuleModelMapper.java
  8. 16 0
      neim-biz/src/main/java/com/jiayue/biz/mapper/WeatherStationInfoMapper.java
  9. 16 0
      neim-biz/src/main/java/com/jiayue/biz/service/PvModuleModelService.java
  10. 20 0
      neim-biz/src/main/java/com/jiayue/biz/service/WeatherStationInfoService.java
  11. 21 0
      neim-biz/src/main/java/com/jiayue/biz/service/impl/PvModuleModelServiceImpl.java
  12. 30 0
      neim-biz/src/main/java/com/jiayue/biz/service/impl/WeatherStationInfoServiceImpl.java
  13. 38 0
      neim-ui/src/api/biz/dataQuery/pvModuleModel.js
  14. 38 0
      neim-ui/src/api/biz/dataQuery/weatherStationInfo.js
  15. 21 4
      neim-ui/src/views/dataQuery/electrucStation/index.vue
  16. 333 0
      neim-ui/src/views/dataQuery/pvModuleModel/index.vue
  17. 256 0
      neim-ui/src/views/dataQuery/weatherStationInfo/index.vue
  18. 13 12
      neim-ui/src/views/dataQuery/windTowerStatusInfo/index.vue

+ 2 - 1
neim-biz/src/main/java/com/jiayue/biz/controller/FengJiInfoController.java

@@ -37,7 +37,8 @@ public class FengJiInfoController extends BaseController {
     @GetMapping("/getProjectInfo")
     @GetMapping("/getProjectInfo")
     public AjaxResult getProjectInfo() {
     public AjaxResult getProjectInfo() {
         List<Map<String, String>> list = new ArrayList<>();
         List<Map<String, String>> list = new ArrayList<>();
-        List<ProjectInfo> projectInfoList = projectInfoService.getProjectInfoList();
+        List<ProjectInfo> projectInfos = projectInfoService.getProjectInfoList();
+        List<ProjectInfo> projectInfoList = projectInfos.stream().filter(w -> w.getProjectBasicInfo().getProjectType().equals("风")).collect(Collectors.toList());
         for (ProjectInfo projectInfo : projectInfoList) {
         for (ProjectInfo projectInfo : projectInfoList) {
             Map<String, String> map = new HashMap<>();
             Map<String, String> map = new HashMap<>();
             map.put("id", projectInfo.getId());
             map.put("id", projectInfo.getId());

+ 66 - 0
neim-biz/src/main/java/com/jiayue/biz/controller/PvModuleModelController.java

@@ -0,0 +1,66 @@
+package com.jiayue.biz.controller;
+
+import com.jiayue.biz.domain.PvModuleModel;
+import com.jiayue.biz.service.PvModuleModelService;
+import com.jiayue.common.annotation.Log;
+import com.jiayue.common.core.controller.BaseController;
+import com.jiayue.common.core.domain.AjaxResult;
+import com.jiayue.common.core.page.TableDataInfo;
+import com.jiayue.common.enums.BusinessType;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 光伏组件信息Controller
+ *
+ * @author L.ym
+ * @date 2022-05-11
+ */
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
+@RestController
+@RequestMapping("/dataQuery/pvModuleModel")
+public class PvModuleModelController extends BaseController {
+    private final PvModuleModelService pvModuleModelService;
+
+    /**
+     * 查询光伏组件信息列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list() {
+        List<PvModuleModel> pvModuleModels = pvModuleModelService.list();
+        return getDataTable(pvModuleModels);
+    }
+
+
+    /**
+     * 新增光伏组件信息
+     */
+    @Log(title = "光伏组件信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody PvModuleModel pvModuleModel) {
+        return toAjax(pvModuleModelService.save(pvModuleModel) ? 1 : 0);
+    }
+
+    /**
+     * 修改光伏组件信息
+     */
+    @Log(title = "光伏组件信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody PvModuleModel pvModuleModel) {
+        return toAjax(pvModuleModelService.updateById(pvModuleModel) ? 1 : 0);
+    }
+
+    /**
+     * 删除光伏组件信息
+     */
+    @Log(title = "光伏组件信息", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable String ids) {
+        return toAjax(pvModuleModelService.removeById(ids) ? 1 : 0);
+    }
+
+
+}

+ 82 - 0
neim-biz/src/main/java/com/jiayue/biz/controller/WeatherStationInfoController.java

@@ -0,0 +1,82 @@
+package com.jiayue.biz.controller;
+
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jiayue.biz.domain.Project;
+import com.jiayue.biz.domain.StatisticsSituation;
+import com.jiayue.biz.domain.WeatherStationInfo;
+import com.jiayue.biz.domain.WindTowerInfo;
+import com.jiayue.biz.service.ProjectService;
+import com.jiayue.biz.service.StatisticsSituationService;
+import com.jiayue.biz.service.WeatherStationInfoService;
+import com.jiayue.biz.service.WindTowerInfoService;
+import com.jiayue.common.annotation.Log;
+import com.jiayue.common.core.controller.BaseController;
+import com.jiayue.common.core.domain.AjaxResult;
+import com.jiayue.common.core.page.TableDataInfo;
+import com.jiayue.common.enums.BusinessType;
+import com.jiayue.common.utils.poi.ExcelUtil;
+import lombok.RequiredArgsConstructor;
+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.text.SimpleDateFormat;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * 环境监测仪信息Controller
+ *
+ * @author L.ym
+ * @date 2022-05-11
+ */
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
+@RestController
+@RequestMapping("/dataQuery/weatherStationInfo")
+public class WeatherStationInfoController extends BaseController {
+    private final WeatherStationInfoService weatherStationInfoService;
+
+    /**
+     * 查询环境监测仪信息列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list() {
+        List<WeatherStationInfo> weatherStationInfos = weatherStationInfoService.list();
+        return getDataTable(weatherStationInfos);
+    }
+
+
+    /**
+     * 新增环境监测仪信息
+     */
+    @Log(title = "环境监测仪信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody WeatherStationInfo weatherStationInfo) {
+        return toAjax(weatherStationInfoService.save(weatherStationInfo) ? 1 : 0);
+    }
+
+    /**
+     * 修改环境监测仪信息
+     */
+    @Log(title = "环境监测仪信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody WeatherStationInfo weatherStationInfo) {
+        return toAjax(weatherStationInfoService.updateById(weatherStationInfo) ? 1 : 0);
+    }
+
+    /**
+     * 删除环境监测仪信息
+     */
+    @Log(title = "环境监测仪信息", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable String ids) {
+        return toAjax(weatherStationInfoService.removeById(ids) ? 1 : 0);
+    }
+
+
+}

+ 68 - 0
neim-biz/src/main/java/com/jiayue/biz/domain/InverterInfo.java

@@ -0,0 +1,68 @@
+package com.jiayue.biz.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jiayue.common.annotation.Excel;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import javax.validation.constraints.Digits;
+import java.math.BigDecimal;
+
+/**
+ *
+ * 逆变器实体
+ *
+ * */
+@Data
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("inverter_info")
+public class InverterInfo {
+    /**
+     * id
+     */
+    @TableId(type = IdType.ASSIGN_UUID)
+    private String id;
+
+    /**
+     * 名称
+     */
+    @Excel(name = "名称")
+    private String name;
+
+    /**
+     * 型号
+     */
+    @Excel(name = "型号")
+    private String modelNumber;
+    /**
+     * 经度
+     */
+    @Excel(name = "经度")
+    private BigDecimal longitude;
+
+    /**
+     * 纬度
+     */
+    @Excel(name = "纬度")
+    private BigDecimal latitude;
+    /**
+     * 额定功率(KW)
+     */
+    @Excel(name = "额定功率")
+    private BigDecimal capacity;
+    /**
+     * 光伏组件型号
+     */
+    @Excel(name = "光伏组件型号")
+    private String batteryModel;
+
+    /**
+     * 光伏组件数量(个)
+     */
+    @Excel(name = "光伏组件数量")
+    private Integer batteryNumber;
+}

+ 68 - 0
neim-biz/src/main/java/com/jiayue/biz/domain/PvModuleModel.java

@@ -0,0 +1,68 @@
+package com.jiayue.biz.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jiayue.common.annotation.Excel;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import javax.validation.constraints.Digits;
+import java.math.BigDecimal;
+
+/**
+ *
+ * 光伏组件(光伏板)实体
+ *
+ * */
+@Data
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("pv_module_info")
+public class PvModuleModel {
+    /**
+     * id
+     */
+    @TableId(type = IdType.ASSIGN_UUID)
+    private String id;
+    /*型号*/
+    @Excel(name = "型号")
+    private String modelNumber;
+
+    /*单个装机容量*/
+    @Excel(name = "组件容量")
+    private String singleCap;
+
+    /*最大工作电压*/
+    @Excel(name = "最大工作电压")
+    private BigDecimal maximumExcitationVoltage;
+
+    /*最大工作电流*/
+    @Excel(name = "最大工作电流")
+    private BigDecimal maximumPowerCurrent;
+
+    /*开路电压*/
+    @Excel(name = "开路电压")
+    private BigDecimal openCircuitVoltage;
+
+    /*短路电流*/
+    @Excel(name = "短路电流")
+    private BigDecimal shortCircuitCurrent;
+
+    /*组件工作效率*/
+    @Excel(name = "组件工作效率")
+    private BigDecimal efficiencyOfWork;
+
+    /*旋转方式*/
+    @Excel(name = "旋转方式")
+    private String rotationMode;
+
+    /*安装倾斜度*/
+    @Excel(name = "安装倾斜度")
+    private BigDecimal gradient;
+
+    /*单个光伏组件面积*/
+    @Excel(name = "组件面积")
+    private BigDecimal singleArea;
+}

+ 50 - 0
neim-biz/src/main/java/com/jiayue/biz/domain/WeatherStationInfo.java

@@ -0,0 +1,50 @@
+package com.jiayue.biz.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jiayue.common.annotation.Excel;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+/**
+ *
+ * 环境检测仪实体
+ *
+ * */
+@Data
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("weather_station_info")
+public class WeatherStationInfo {
+    /**
+     * id
+     */
+    @TableId(type = IdType.ASSIGN_UUID)
+    private String id;
+
+    /**
+     * 名称
+     */
+    @Excel(name = "名称")
+    private String name;
+
+    /**
+     * 型号
+     */
+    @Excel(name = "型号")
+    private String modelNumber;
+    /**
+     * 经度
+     */
+    @Excel(name = "经度")
+    private BigDecimal longitude;
+
+    /**
+     * 纬度
+     */
+    @Excel(name = "纬度")
+    private BigDecimal latitude;
+}

+ 15 - 0
neim-biz/src/main/java/com/jiayue/biz/mapper/PvModuleModelMapper.java

@@ -0,0 +1,15 @@
+package com.jiayue.biz.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jiayue.biz.domain.PvModuleModel;
+import com.jiayue.biz.domain.WeatherStationInfo;
+
+/**
+ * 光伏组件Mapper接口
+ *
+ * @author L.ym
+ * @date 2022-05-11
+ */
+public interface PvModuleModelMapper extends BaseMapper<PvModuleModel> {
+
+}

+ 16 - 0
neim-biz/src/main/java/com/jiayue/biz/mapper/WeatherStationInfoMapper.java

@@ -0,0 +1,16 @@
+package com.jiayue.biz.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jiayue.biz.domain.WeatherStationInfo;
+import com.jiayue.biz.domain.WindTowerInfo;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 环境监测仪信息Mapper接口
+ *
+ * @author L.ym
+ * @date 2022-05-11
+ */
+public interface WeatherStationInfoMapper extends BaseMapper<WeatherStationInfo> {
+
+}

+ 16 - 0
neim-biz/src/main/java/com/jiayue/biz/service/PvModuleModelService.java

@@ -0,0 +1,16 @@
+package com.jiayue.biz.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.jiayue.biz.domain.PvModuleModel;
+import com.jiayue.biz.domain.WeatherStationInfo;
+
+/**
+ * 光伏组件信息Service接口
+ *
+ * @author L.ym
+ * @date 2022-05-11
+ */
+public interface PvModuleModelService extends IService<PvModuleModel> {
+
+
+}

+ 20 - 0
neim-biz/src/main/java/com/jiayue/biz/service/WeatherStationInfoService.java

@@ -0,0 +1,20 @@
+package com.jiayue.biz.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.jiayue.biz.domain.WeatherStationInfo;
+import com.jiayue.biz.domain.WindTowerInfo;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 环境监测仪信息Service接口
+ *
+ * @author L.ym
+ * @date 2022-05-11
+ */
+public interface WeatherStationInfoService extends IService<WeatherStationInfo> {
+
+
+}

+ 21 - 0
neim-biz/src/main/java/com/jiayue/biz/service/impl/PvModuleModelServiceImpl.java

@@ -0,0 +1,21 @@
+package com.jiayue.biz.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jiayue.biz.domain.PvModuleModel;
+import com.jiayue.biz.domain.WeatherStationInfo;
+import com.jiayue.biz.mapper.PvModuleModelMapper;
+import com.jiayue.biz.mapper.WeatherStationInfoMapper;
+import com.jiayue.biz.service.PvModuleModelService;
+import com.jiayue.biz.service.WeatherStationInfoService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 光伏组件信息Service业务层处理
+ *
+ * @author L.ym
+ * @date 2022-05-11
+ */
+@Service
+public class PvModuleModelServiceImpl extends ServiceImpl<PvModuleModelMapper, PvModuleModel> implements PvModuleModelService {
+
+}

+ 30 - 0
neim-biz/src/main/java/com/jiayue/biz/service/impl/WeatherStationInfoServiceImpl.java

@@ -0,0 +1,30 @@
+package com.jiayue.biz.service.impl;
+
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jiayue.biz.domain.StatisticsSituation;
+import com.jiayue.biz.domain.WeatherStationInfo;
+import com.jiayue.biz.domain.WindTowerInfo;
+import com.jiayue.biz.mapper.WeatherStationInfoMapper;
+import com.jiayue.biz.mapper.WindTowerInfoMapper;
+import com.jiayue.biz.service.WeatherStationInfoService;
+import com.jiayue.biz.service.WindTowerInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * 环境监测仪信息Service业务层处理
+ *
+ * @author L.ym
+ * @date 2022-05-11
+ */
+@Service
+public class WeatherStationInfoServiceImpl extends ServiceImpl<WeatherStationInfoMapper, WeatherStationInfo> implements WeatherStationInfoService {
+
+}

+ 38 - 0
neim-ui/src/api/biz/dataQuery/pvModuleModel.js

@@ -0,0 +1,38 @@
+import request from '@/utils/request'
+
+
+// 查询所有光伏组件信息
+export function list() {
+  return request({
+    url: '/dataQuery/pvModuleModel/list',
+    method: 'get'
+  })
+}
+
+
+// 新增光伏组件信息
+export function addPvModuleModel(data) {
+  return request({
+    url: '/dataQuery/pvModuleModel',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改光伏组件信息
+export function updatePvModuleModel(data) {
+  return request({
+    url: '/dataQuery/pvModuleModel',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除光伏组件信息
+export function delPvModuleModel(id) {
+  return request({
+    url: '/dataQuery/pvModuleModel/' + id,
+    method: 'delete'
+  })
+}
+

+ 38 - 0
neim-ui/src/api/biz/dataQuery/weatherStationInfo.js

@@ -0,0 +1,38 @@
+import request from '@/utils/request'
+
+
+// 查询所有环境监测仪信息
+export function list() {
+  return request({
+    url: '/dataQuery/weatherStationInfo/list',
+    method: 'get'
+  })
+}
+
+
+// 新增环境监测仪信息
+export function addWeatherStationInfo(data) {
+  return request({
+    url: '/dataQuery/weatherStationInfo',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改环境监测仪信息
+export function updateWeatherStationInfo(data) {
+  return request({
+    url: '/dataQuery/weatherStationInfo',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除环境监测仪信息
+export function delWeatherStationInfo(id) {
+  return request({
+    url: '/dataQuery/weatherStationInfo/' + id,
+    method: 'delete'
+  })
+}
+

+ 21 - 4
neim-ui/src/views/dataQuery/electrucStation/index.vue

@@ -95,7 +95,7 @@
           </el-col>
           </el-col>
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="场站类型" prop="stationType">
             <el-form-item label="场站类型" prop="stationType">
-              <el-select v-model="form.stationType" placeholder="请选择" style="width: 100%" clearable>
+              <el-select v-model="form.stationType" placeholder="请选择" style="width: 100%" clearable @change="typeChange">
                 <el-option
                 <el-option
                   v-for="item in terrain"
                   v-for="item in terrain"
                   :key="item.value"
                   :key="item.value"
@@ -107,7 +107,7 @@
           </el-col>
           </el-col>
         </el-row>
         </el-row>
 
 
-        <el-form-item label="关联设备" prop="equipment">
+        <el-form-item label="关联设备" prop="equipment" v-if="eType === '风'">
           <el-select v-model="form.equipment" placeholder="请选择" style="width: 100%" multiple clearable>
           <el-select v-model="form.equipment" placeholder="请选择" style="width: 100%" multiple clearable>
             <el-option
             <el-option
               v-for="item in equipment"
               v-for="item in equipment"
@@ -118,6 +118,17 @@
             </el-option>
             </el-option>
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
+        <el-form-item label="关联设备" prop="equipment" v-if="eType === '光'">
+          <el-select v-model="form.equipment" placeholder="请选择" style="width: 100%" multiple clearable>
+            <el-option
+              v-for="item in gEquipment"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+              :disabled="item.disabled">
+            </el-option>
+          </el-select>
+        </el-form-item>
 
 
       </el-form>
       </el-form>
       <div slot="footer" class="dialog-footer">
       <div slot="footer" class="dialog-footer">
@@ -167,6 +178,7 @@ export default {
       title: "",
       title: "",
       // 是否显示弹出层
       // 是否显示弹出层
       open: false,
       open: false,
+      eType: '风',
       // 查询参数
       // 查询参数
       queryParams: {
       queryParams: {
         pageNum: 1,
         pageNum: 1,
@@ -216,7 +228,8 @@ export default {
         {label: "运行中", value: "Y1"},
         {label: "运行中", value: "Y1"},
         {label: "未运行", value: "Y2"},
         {label: "未运行", value: "Y2"},
       ],
       ],
-      equipment: [],
+      equipment: [],// 风的关联设备
+      gEquipment: [],// 光的关联设备
       heightOption: []
       heightOption: []
     };
     };
   },
   },
@@ -262,6 +275,9 @@ export default {
         this.loading = false;
         this.loading = false;
       })
       })
     },
     },
+    typeChange(){
+      this.eType = this.form.stationType
+    },
     // 取消按钮
     // 取消按钮
     cancel() {
     cancel() {
       this.open = false;
       this.open = false;
@@ -308,7 +324,6 @@ export default {
     /** 修改按钮操作 */
     /** 修改按钮操作 */
     handleUpdate(row) {
     handleUpdate(row) {
       this.equipmentNoDisable = true
       this.equipmentNoDisable = true
-      this.open = true;
       this.reset();
       this.reset();
       var a = null
       var a = null
       const id = row.id || this.ids
       const id = row.id || this.ids
@@ -327,6 +342,8 @@ export default {
         stationType: row.stationType,
         stationType: row.stationType,
         equipment: a
         equipment: a
       };
       };
+      this.eType = this.form.stationType
+      this.open = true;
     },
     },
     /** 提交按钮 */
     /** 提交按钮 */
     submitForm() {
     submitForm() {

+ 333 - 0
neim-ui/src/views/dataQuery/pvModuleModel/index.vue

@@ -0,0 +1,333 @@
+<template>
+  <div class="app-container">
+    <el-card class="box-card">
+      <el-button
+        type="primary"
+        plain
+        icon="el-icon-plus"
+        size="mini"
+        @click="handleAdd"
+      >新增
+      </el-button>
+      <div style="margin-top: 1%">
+        <el-table v-loading="loading" border
+                  :data="tableData.slice((page.currentPage-1)*page.pageSize,page.currentPage*page.pageSize)">
+          <el-table-column type="index" label="序号" width="55" align="center"/>
+          <el-table-column label="型号" align="center" prop="modelNumber"/>
+          <el-table-column label="组件容量" align="center" prop="singleCap"/>
+          <el-table-column label="最大工作电压" align="center" prop="maximumExcitationVoltage"/>
+          <el-table-column label="最大工作电流" align="center" prop="maximumPowerCurrent"/>
+          <el-table-column label="开路电压" align="center" prop="openCircuitVoltage"/>
+          <el-table-column label="短路电流" align="center" prop="shortCircuitCurrent"/>
+          <el-table-column label="组件工作效率" align="center" prop="efficiencyOfWork"/>
+          <el-table-column label="旋转方式" align="center" prop="rotationMode" :formatter="formatRotation"/>
+          <el-table-column label="安装倾斜度" align="center" prop="gradient"/>
+          <el-table-column label="组件面积" align="center" prop="singleArea"/>
+          <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="['dataQuery:windTowerStatusInfo:edit']"
+              >修改
+              </el-button>
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                @click="handleDelete(scope.row)"
+                v-hasPermi="['dataQuery:windTowerStatusInfo:remove']"
+              >删除
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div class="block" style="float: right">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page=page.currentPage
+            :page-sizes="[10, 15, 30, 50]"
+            :page-size=page.pageSize
+            layout="total, sizes, prev, pager, next, jumper"
+            :total=page.total>
+          </el-pagination>
+        </div>
+      </div>
+      <!-- 添加或修改测风塔信息对话框 -->
+      <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
+        <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+          <el-row :gutter="20" class="mb8">
+            <el-col :span="12">
+              <el-form-item label="型号" prop="modelNumber">
+                <el-input v-model="form.modelNumber" placeholder="请输入型号"/>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="组件容量" prop="singleCap">
+                <el-input v-model="form.singleCap" placeholder="请输入型号"/>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20" class="mb8">
+            <el-col :span="12">
+              <el-form-item label="最大工作电压" prop="maximumExcitationVoltage" label-width="110px">
+                <el-input v-model="form.maximumExcitationVoltage" placeholder="请输入最大工作电压"/>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="最大工作电流" prop="maximumPowerCurrent" label-width="110px">
+                <el-input v-model="form.maximumPowerCurrent" placeholder="请输入最大工作电流"/>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20" class="mb8">
+            <el-col :span="12">
+              <el-form-item label="开路电压" prop="efficiencyOfWork">
+                <el-input v-model="form.efficiencyOfWork" placeholder="请输入开路电压"/>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="短路电流" prop="shortCircuitCurrent">
+                <el-input v-model="form.shortCircuitCurrent" placeholder="请输入短路电流"/>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20" class="mb8">
+            <el-col :span="12">
+              <el-form-item label="组件工作效率" prop="openCircuitVoltage" label-width="110px">
+                <el-input v-model="form.openCircuitVoltage" placeholder="请输入组件工作效率"/>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="旋转方式" prop="rotationMode">
+                <el-select v-model="form.rotationMode" placeholder="请输入旋转方式" style="width: 100%" clearable>
+                  <el-option
+                    v-for="item in rotation"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20" class="mb8">
+            <el-col :span="12">
+              <el-form-item label="安装倾斜度" prop="gradient">
+                <el-input v-model="form.gradient" placeholder="请输入安装倾斜度"/>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="组件面积" prop="singleArea">
+                <el-input v-model="form.singleArea" placeholder="请输入组件面积"/>
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+        </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>
+    </el-card>
+  </div>
+</template>
+
+<script>
+import {list,addPvModuleModel,updatePvModuleModel,delPvModuleModel} from "@/api/biz/dataQuery/pvModuleModel";
+export default {
+  name: "index",
+  data() {
+    const checkName = (rule, value, callback) => {
+      var s6 = this.tableData
+      if (value == null || value === '') {
+        callback(new Error('请填写光伏组件型号'))
+      }
+      for (let i = 0; i < s6.length; i++) {
+        if (this.modId == '' || this.modId == undefined) {
+          // 新增
+          if ((value == s6[i].modelNumber)) {
+            callback(new Error('型号不能重复'))
+          }
+        } else {
+          // 修改
+          if (this.modId != s6[i].id) {
+            if ((value == s6[i].modelNumber)) {
+              callback(new Error('型号不能重复'))
+            }
+          }
+        }
+      }
+      callback()
+    }
+    return {
+      tableData: [],
+      loading: false,
+      open:false,
+      title:'新增&保存',
+      modId:'',
+      form: {},
+      // 表单校验
+      rules: {
+        modelNumber: [{required: true, validator: checkName, trigger: 'blur'}],
+        singleCap: [
+          { required: true, message: '请填写组件容量' },
+          {pattern: /^\d+(\.\d+)?$/, message: '只能输入正数数字或带小数点的数字'}
+        ],
+        maximumExcitationVoltage: [
+          { required: true, message: '请填写最大工作电压' },
+          {pattern: /^\d+(\.\d+)?$/, message: '只能输入正数数字或带小数点的数字'}
+        ],
+        maximumPowerCurrent: [
+          { required: true, message: '请填写最大工作电流' },
+          {pattern: /^\d+(\.\d+)?$/, message: '只能输入正数数字或带小数点的数字'}
+        ],
+        openCircuitVoltage: [
+          { required: true, message: '请填写开路电压' },
+          {pattern: /^\d+(\.\d+)?$/, message: '只能输入正数数字或带小数点的数字'}
+        ],
+        shortCircuitCurrent: [
+          { required: true, message: '请填写短路电流' },
+          {pattern: /^\d+(\.\d+)?$/, message: '只能输入正数数字或带小数点的数字'}
+        ],
+        efficiencyOfWork: [
+          { required: true, message: '请填写工作效率' },
+          {pattern: /^\d+(\.\d+)?$/, message: '只能输入正数数字或带小数点的数字'}
+        ],
+        gradient: [
+          { required: true, message: '请填写倾斜角度' },
+          {pattern: /^\d+(\.\d+)?$/, message: '只能输入正数数字或带小数点的数字'}
+        ],
+        rotationMode: [
+          { required: true, message: '请填写旋转模式' }
+        ],
+        singleArea: [
+          { required: true, message: '请填写单片面积' },
+          {pattern: /^\d+(\.\d+)?$/, message: '只能输入正数数字或带小数点的数字'}
+        ]
+      },
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      rotation:[{label:'固定角度',value:'E1'},{label:'水平旋转',value:'E2'},{label:'上下旋转',value:'E3'},{label:'混合旋转',value:'E4'}]
+    }
+  },
+  mounted() {
+    this.getList()
+  },
+  methods: {
+    getList(){
+      this.loading = true
+      list().then(res=>{
+        this.tableData = res.rows
+        this.page.total = res.total
+        this.loading = false
+      }).catch(err=>{
+        this.loading = false
+        console.log('获取光伏组件异常:'+err)
+      })
+    },
+    /*新增按钮*/
+    handleAdd() {
+      this.reset()
+      this.title = "新增&保存";
+      this.open = true;
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      this.modId = row.id
+      this.form = {
+        id: row.id,
+        modelNumber: row.modelNumber,
+        singleCap: row.singleCap,
+        maximumExcitationVoltage: row.maximumExcitationVoltage,
+        maximumPowerCurrent: row.maximumPowerCurrent,
+        openCircuitVoltage: row.openCircuitVoltage,
+        shortCircuitCurrent: row.shortCircuitCurrent,
+        efficiencyOfWork: row.efficiencyOfWork,
+        gradient: row.gradient,
+        rotationMode: row.rotationMode,
+        singleArea: row.singleArea
+      };
+      this.open = true;
+      this.title = "修改&保存";
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id;
+      this.$modal.confirm('是否确认删除光伏组件型号为"' + row.modelNumber + '"信息?').then(function () {
+        return delPvModuleModel(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      // this.form.heights = this.form.heights.toString()
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updatePvModuleModel(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addPvModuleModel(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    formatRotation(row){
+      let option = this.rotation.find(w=>w.value === row.rotationMode)
+      return option !==undefined?option.label:row.rotationMode
+    },
+    reset(){
+      this.form = {
+        id:null,
+        modelNumber: null,
+        singleCap: null,
+        maximumExcitationVoltage: null,
+        maximumPowerCurrent: null,
+        openCircuitVoltage: null,
+        shortCircuitCurrent: null,
+        efficiencyOfWork: null,
+        gradient: null,
+        rotationMode: null,
+        singleArea: null
+      }
+    },
+    /*pageSize改变*/
+    handleSizeChange(val) {
+      this.page.pageSize = val
+      this.page.currentPage = 1
+    },
+    /*currentPage改变*/
+    handleCurrentChange(val) {
+      this.page.currentPage = val
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 256 - 0
neim-ui/src/views/dataQuery/weatherStationInfo/index.vue

@@ -0,0 +1,256 @@
+<template>
+  <div class="app-container">
+    <el-card class="box-card">
+      <el-button
+        type="primary"
+        plain
+        icon="el-icon-plus"
+        size="mini"
+        @click="handleAdd"
+      >新增
+      </el-button>
+      <div style="margin-top: 1%">
+        <el-table v-loading="loading" border
+                  :data="tableData.slice((page.currentPage-1)*page.pageSize,page.currentPage*page.pageSize)">
+          <el-table-column type="index" label="序号" width="55" align="center"/>
+          <el-table-column label="名称" align="center" prop="name"/>
+          <el-table-column label="型号" align="center" prop="modelNumber"/>
+          <el-table-column label="经度" align="center" prop="longitude"/>
+          <el-table-column label="纬度" align="center" prop="latitude"/>
+          <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="['dataQuery:windTowerStatusInfo:edit']"
+              >修改
+              </el-button>
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                @click="handleDelete(scope.row)"
+                v-hasPermi="['dataQuery:windTowerStatusInfo:remove']"
+              >删除
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div class="block" style="float: right">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page=page.currentPage
+            :page-sizes="[10, 15, 30, 50]"
+            :page-size=page.pageSize
+            layout="total, sizes, prev, pager, next, jumper"
+            :total=page.total>
+          </el-pagination>
+        </div>
+      </div>
+      <!-- 添加或修改测风塔信息对话框 -->
+      <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
+        <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+          <el-row :gutter="20" class="mb8">
+            <el-col :span="12">
+              <el-form-item label="名称" prop="name">
+                <el-input v-model="form.name" placeholder="请输入名称"/>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="型号" prop="modelNumber">
+                <el-input v-model="form.modelNumber" placeholder="请输入型号"/>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20" class="mb8">
+            <el-col :span="12">
+              <el-form-item label="经度" prop="longitude">
+                <el-input v-model="form.longitude" placeholder="请输入经度"/>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="纬度" prop="latitude">
+                <el-input v-model="form.latitude" placeholder="请输入纬度"/>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </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>
+    </el-card>
+  </div>
+</template>
+
+<script>
+import {list,addWeatherStationInfo,updateWeatherStationInfo,delWeatherStationInfo} from "@/api/biz/dataQuery/weatherStationInfo";
+export default {
+  name: "index",
+  data() {
+    const checkName = (rule, value, callback) => {
+      var s6 = this.tableData
+      if (value == null || value === '') {
+        callback(new Error('请填写环境监测仪名称'))
+      }
+      for (let i = 0; i < s6.length; i++) {
+        if (this.modId == '') {
+          // 新增
+          if ((value == s6[i].name)) {
+            callback(new Error('名称不能重复'))
+          }
+        } else {
+          // 修改
+          if (this.modId != s6[i].id) {
+            if ((value == s6[i].name)) {
+              callback(new Error('名称不能重复'))
+            }
+          }
+        }
+      }
+      callback()
+    }
+    const reg = /^[\-\+]?(0?\d{1,2}(\.\d{1,5})*|1[0-7]?\d{1}(\.\d{1,5})*|180(\.0{1,5})*)$/
+    const reg1 = /^[\-\+]?([0-8]?\d{1}(\.\d{1,5})*|90(\.0{1,5})*)$/
+    const checkLongitude = (rule, value, callback) => {
+      if (!value) {
+        callback(new Error('不许为空'))
+      }
+      if (reg.test(value) == false) {
+        callback(new Error('请输入正确经度'));
+      } else {
+        callback()
+      }
+    }
+    const checkLatitude = (rule, value, callback) => {
+      if (!value) {
+        callback(new Error('不许为空'))
+      }
+      if (reg1.test(value) == false) {
+        callback(new Error('请输入正确纬度'));
+      } else {
+        callback()
+      }
+    }
+    return {
+      tableData: [],
+      loading: false,
+      open:false,
+      title:'新增&保存',
+      modId:'',
+      form: {},
+      // 表单校验
+      rules: {
+        name: [{required: true, validator: checkName, trigger: 'blur'}],
+        // modelNumber: [{required: true,  message:'请输入型号', trigger: 'blur'}],
+        longitude: [{required: true, validator: checkLongitude, trigger: 'blur'}],
+        latitude: [{required: true, validator: checkLatitude, trigger: 'blur'}],
+      },
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+    }
+  },
+  mounted() {
+    this.getList()
+  },
+  methods: {
+    getList(){
+      this.loading = true
+      list().then(res=>{
+        this.tableData = res.rows
+        this.page.total = res.total
+        this.loading = false
+      }).catch(err=>{
+        this.loading = false
+        console.log('获取环境监测仪异常:'+err)
+      })
+    },
+    /*新增按钮*/
+    handleAdd() {
+      this.reset()
+      this.title = "新增&保存";
+      this.open = true;
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      this.modId = row.id
+      this.form = {
+        id: row.id,
+        name: row.name,
+        modelNumber: row.modelNumber,
+        longitude: row.longitude,
+        latitude: row.latitude
+      };
+      this.open = true;
+      this.title = "修改&保存";
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id;
+      this.$modal.confirm('是否确认删除环境监测仪信息名称为"' + row.name + '"信息及所有数据?').then(function () {
+        return delWeatherStationInfo(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      // this.form.heights = this.form.heights.toString()
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateWeatherStationInfo(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addWeatherStationInfo(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    reset(){
+      this.form = {
+        id:null,
+        name:null,
+        modelNumber: null,
+        longitude: null,
+        latitude: null
+      }
+    },
+    /*pageSize改变*/
+    handleSizeChange(val) {
+      this.page.pageSize = val
+      this.page.currentPage = 1
+    },
+    /*currentPage改变*/
+    handleCurrentChange(val) {
+      this.page.currentPage = val
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 13 - 12
neim-ui/src/views/dataQuery/windTowerStatusInfo/index.vue

@@ -77,7 +77,7 @@
                 :data="tableAllData.slice((page.currentPage-1)*page.pageSize,page.currentPage*page.pageSize)">
                 :data="tableAllData.slice((page.currentPage-1)*page.pageSize,page.currentPage*page.pageSize)">
         <el-table-column type="index" label="序号" width="55" align="center"/>
         <el-table-column type="index" label="序号" width="55" align="center"/>
         <el-table-column label="名称" align="center" prop="name"/>
         <el-table-column label="名称" align="center" prop="name"/>
-        <el-table-column label="所属项目" align="center" prop="projectId" :formatter="formatProjectId"/>
+<!--        <el-table-column label="所属项目" align="center" prop="projectId" :formatter="formatProjectId"/>-->
 <!--        <el-table-column label="型号" align="center" prop="modelNumber"/>-->
 <!--        <el-table-column label="型号" align="center" prop="modelNumber"/>-->
         <el-table-column label="设备编号" align="center" prop="equipmentNo"/>
         <el-table-column label="设备编号" align="center" prop="equipmentNo"/>
         <el-table-column label="记录仪编号" align="center" prop="recorderNo"/>
         <el-table-column label="记录仪编号" align="center" prop="recorderNo"/>
@@ -152,18 +152,19 @@
           </el-col>
           </el-col>
         </el-row>
         </el-row>
         <el-row :gutter="20" class="mb8">
         <el-row :gutter="20" class="mb8">
+<!--          <el-col :span="12">-->
+<!--            <el-form-item label="所属项目" prop="projectId">-->
+<!--              <el-select v-model="form.projectId" placeholder="请选择所属项目" style="width: 100%" clearable>-->
+<!--                <el-option-->
+<!--                  v-for="(item,index) in projectInfo"-->
+<!--                  :key="index"-->
+<!--                  :label="item.projectName"-->
+<!--                  :value="item.id">-->
+<!--                </el-option>-->
+<!--              </el-select>-->
+<!--            </el-form-item>-->
+<!--          </el-col> -->
           <el-col :span="12">
           <el-col :span="12">
-            <el-form-item label="所属项目" prop="projectId">
-              <el-select v-model="form.projectId" placeholder="请选择所属项目" style="width: 100%" clearable>
-                <el-option
-                  v-for="(item,index) in projectInfo"
-                  :key="index"
-                  :label="item.projectName"
-                  :value="item.id">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col> <el-col :span="12">
             <el-form-item label="记录仪编号" prop="recorderNo">
             <el-form-item label="记录仪编号" prop="recorderNo">
               <el-input v-model="form.recorderNo" placeholder="请输入记录仪编号"/>
               <el-input v-model="form.recorderNo" placeholder="请输入记录仪编号"/>
             </el-form-item>
             </el-form-item>