Merge branch 'feature_day_1023' into 'main'
环境因素数据 See merge request likehai/ytr-god!12
This commit is contained in:
commit
ed48612919
@ -0,0 +1,98 @@
|
||||
package com.god.web.controller.species;
|
||||
|
||||
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.god.common.annotation.Log;
|
||||
import com.god.common.core.controller.BaseController;
|
||||
import com.god.common.core.domain.AjaxResult;
|
||||
import com.god.common.enums.BusinessType;
|
||||
import com.god.passenger.species.domain.BjdfAmbientFator;
|
||||
import com.god.passenger.species.service.IBjdfAmbientFatorService;
|
||||
import com.god.common.utils.poi.ExcelUtil;
|
||||
import com.god.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 环境因素Controller
|
||||
*
|
||||
* @author wangyan21
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/species/ambient")
|
||||
public class BjdfAmbientFatorController extends BaseController {
|
||||
@Autowired
|
||||
private IBjdfAmbientFatorService bjdfAmbientFatorService;
|
||||
|
||||
/**
|
||||
* 查询环境因素列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('species:ambient:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BjdfAmbientFator bjdfAmbientFator) {
|
||||
startPage();
|
||||
List<BjdfAmbientFator> list = bjdfAmbientFatorService.selectBjdfAmbientFatorList(bjdfAmbientFator);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出环境因素列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('species:ambient:export')")
|
||||
@Log(title = "环境因素", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BjdfAmbientFator bjdfAmbientFator) {
|
||||
List<BjdfAmbientFator> list = bjdfAmbientFatorService.selectBjdfAmbientFatorList(bjdfAmbientFator);
|
||||
ExcelUtil<BjdfAmbientFator> util = new ExcelUtil<BjdfAmbientFator>(BjdfAmbientFator.class);
|
||||
util.exportExcel(response, list, "环境因素数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取环境因素详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('species:ambient:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id) {
|
||||
return success(bjdfAmbientFatorService.selectBjdfAmbientFatorById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增环境因素
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('species:ambient:add')")
|
||||
@Log(title = "环境因素", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BjdfAmbientFator bjdfAmbientFator) {
|
||||
return toAjax(bjdfAmbientFatorService.insertBjdfAmbientFator(bjdfAmbientFator));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改环境因素
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('species:ambient:edit')")
|
||||
@Log(title = "环境因素", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BjdfAmbientFator bjdfAmbientFator) {
|
||||
return toAjax(bjdfAmbientFatorService.updateBjdfAmbientFator(bjdfAmbientFator));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除环境因素
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('species:ambient:remove')")
|
||||
@Log(title = "环境因素", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids) {
|
||||
return toAjax(bjdfAmbientFatorService.deleteBjdfAmbientFatorByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package com.god.web.controller.species;
|
||||
|
||||
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.god.common.annotation.Log;
|
||||
import com.god.common.core.controller.BaseController;
|
||||
import com.god.common.core.domain.AjaxResult;
|
||||
import com.god.common.enums.BusinessType;
|
||||
import com.god.passenger.species.domain.BjdfReserveInfo;
|
||||
import com.god.passenger.species.service.IBjdfReserveInfoService;
|
||||
import com.god.common.utils.poi.ExcelUtil;
|
||||
import com.god.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 保护区信息Controller
|
||||
*
|
||||
* @author wangyan21
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/species/reserve")
|
||||
public class BjdfReserveInfoController extends BaseController {
|
||||
@Autowired
|
||||
private IBjdfReserveInfoService bjdfReserveInfoService;
|
||||
|
||||
/**
|
||||
* 查询保护区信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('species:reserve:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BjdfReserveInfo bjdfReserveInfo) {
|
||||
startPage();
|
||||
List<BjdfReserveInfo> list = bjdfReserveInfoService.selectBjdfReserveInfoList(bjdfReserveInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出保护区信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('species:reserve:export')")
|
||||
@Log(title = "保护区信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BjdfReserveInfo bjdfReserveInfo) {
|
||||
List<BjdfReserveInfo> list = bjdfReserveInfoService.selectBjdfReserveInfoList(bjdfReserveInfo);
|
||||
ExcelUtil<BjdfReserveInfo> util = new ExcelUtil<BjdfReserveInfo>(BjdfReserveInfo.class);
|
||||
util.exportExcel(response, list, "保护区信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取保护区信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('species:reserve:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id) {
|
||||
return success(bjdfReserveInfoService.selectBjdfReserveInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保护区信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('species:reserve:add')")
|
||||
@Log(title = "保护区信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BjdfReserveInfo bjdfReserveInfo) {
|
||||
return toAjax(bjdfReserveInfoService.insertBjdfReserveInfo(bjdfReserveInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保护区信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('species:reserve:edit')")
|
||||
@Log(title = "保护区信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BjdfReserveInfo bjdfReserveInfo) {
|
||||
return toAjax(bjdfReserveInfoService.updateBjdfReserveInfo(bjdfReserveInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除保护区信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('species:reserve:remove')")
|
||||
@Log(title = "保护区信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids) {
|
||||
return toAjax(bjdfReserveInfoService.deleteBjdfReserveInfoByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,172 @@
|
||||
package com.god.passenger.species.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.god.common.annotation.Excel;
|
||||
import com.god.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 环境因素对象 bjdf_ambient_fator
|
||||
*
|
||||
* @author wangyan21
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
public class BjdfAmbientFator extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 市区
|
||||
*/
|
||||
@Excel(name = "市区")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 因素类型
|
||||
*/
|
||||
@Excel(name = "因素类型")
|
||||
private String factorType;
|
||||
|
||||
/**
|
||||
* 因素参数
|
||||
*/
|
||||
@Excel(name = "因素参数")
|
||||
private String parameter;
|
||||
|
||||
/**
|
||||
* 参数值
|
||||
*/
|
||||
@Excel(name = "参数值")
|
||||
private String parameterValue;
|
||||
|
||||
/**
|
||||
* 参数单位
|
||||
*/
|
||||
@Excel(name = "参数单位")
|
||||
private String parameterUnit;
|
||||
|
||||
/**
|
||||
* 采集时间
|
||||
*/
|
||||
@Excel(name = "采集时间")
|
||||
private String settingTime;
|
||||
|
||||
/**
|
||||
* 数据类型
|
||||
*/
|
||||
@Excel(name = "数据类型")
|
||||
private String dataType;
|
||||
|
||||
/**
|
||||
* 添加人
|
||||
*/
|
||||
@Excel(name = "添加人")
|
||||
private String addPerson;
|
||||
|
||||
/**
|
||||
* 添加时间
|
||||
*/
|
||||
@Excel(name = "添加时间")
|
||||
private String addTime;
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setFactorType(String factorType) {
|
||||
this.factorType = factorType;
|
||||
}
|
||||
|
||||
public String getFactorType() {
|
||||
return factorType;
|
||||
}
|
||||
|
||||
public void setParameter(String parameter) {
|
||||
this.parameter = parameter;
|
||||
}
|
||||
|
||||
public String getParameter() {
|
||||
return parameter;
|
||||
}
|
||||
|
||||
public void setParameterValue(String parameterValue) {
|
||||
this.parameterValue = parameterValue;
|
||||
}
|
||||
|
||||
public String getParameterValue() {
|
||||
return parameterValue;
|
||||
}
|
||||
|
||||
public void setParameterUnit(String parameterUnit) {
|
||||
this.parameterUnit = parameterUnit;
|
||||
}
|
||||
|
||||
public String getParameterUnit() {
|
||||
return parameterUnit;
|
||||
}
|
||||
|
||||
public void setSettingTime(String settingTime) {
|
||||
this.settingTime = settingTime;
|
||||
}
|
||||
|
||||
public String getSettingTime() {
|
||||
return settingTime;
|
||||
}
|
||||
|
||||
public void setDataType(String dataType) {
|
||||
this.dataType = dataType;
|
||||
}
|
||||
|
||||
public String getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
|
||||
public void setAddPerson(String addPerson) {
|
||||
this.addPerson = addPerson;
|
||||
}
|
||||
|
||||
public String getAddPerson() {
|
||||
return addPerson;
|
||||
}
|
||||
|
||||
public void setAddTime(String addTime) {
|
||||
this.addTime = addTime;
|
||||
}
|
||||
|
||||
public String getAddTime() {
|
||||
return addTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("city", getCity())
|
||||
.append("factorType", getFactorType())
|
||||
.append("parameter", getParameter())
|
||||
.append("parameterValue", getParameterValue())
|
||||
.append("parameterUnit", getParameterUnit())
|
||||
.append("settingTime", getSettingTime())
|
||||
.append("dataType", getDataType())
|
||||
.append("addPerson", getAddPerson())
|
||||
.append("addTime", getAddTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,202 @@
|
||||
package com.god.passenger.species.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.god.common.annotation.Excel;
|
||||
import com.god.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 保护区信息对象 bjdf_reserve_info
|
||||
*
|
||||
* @author wangyan21
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
public class BjdfReserveInfo extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 保护区名称
|
||||
*/
|
||||
@Excel(name = "保护区名称")
|
||||
private String reserveName;
|
||||
|
||||
/**
|
||||
* 保护区范围
|
||||
*/
|
||||
@Excel(name = "保护区范围")
|
||||
private String reserveScope;
|
||||
|
||||
/**
|
||||
* 保护级别
|
||||
*/
|
||||
@Excel(name = "保护级别")
|
||||
private String reserveLevel;
|
||||
|
||||
/**
|
||||
* 保护措施
|
||||
*/
|
||||
@Excel(name = "保护措施")
|
||||
private String protection;
|
||||
|
||||
/**
|
||||
* 保护物种
|
||||
*/
|
||||
@Excel(name = "保护物种")
|
||||
private String protectedSpecies;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
@Excel(name = "负责人")
|
||||
private String chargePerson;
|
||||
|
||||
/**
|
||||
* 联系方式
|
||||
*/
|
||||
@Excel(name = "联系方式")
|
||||
private String chargePhone;
|
||||
|
||||
/**
|
||||
* 数据类型
|
||||
*/
|
||||
@Excel(name = "数据类型")
|
||||
private String dataType;
|
||||
|
||||
/**
|
||||
* 添加人
|
||||
*/
|
||||
@Excel(name = "添加人")
|
||||
private String addPerson;
|
||||
|
||||
/**
|
||||
* 添加时间
|
||||
*/
|
||||
@Excel(name = "添加时间")
|
||||
private String addTime;
|
||||
|
||||
/**
|
||||
* 成立时间
|
||||
*/
|
||||
@Excel(name = "成立时间")
|
||||
private String settingTime;
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setReserveName(String reserveName) {
|
||||
this.reserveName = reserveName;
|
||||
}
|
||||
|
||||
public String getReserveName() {
|
||||
return reserveName;
|
||||
}
|
||||
|
||||
public void setReserveScope(String reserveScope) {
|
||||
this.reserveScope = reserveScope;
|
||||
}
|
||||
|
||||
public String getReserveScope() {
|
||||
return reserveScope;
|
||||
}
|
||||
|
||||
public void setReserveLevel(String reserveLevel) {
|
||||
this.reserveLevel = reserveLevel;
|
||||
}
|
||||
|
||||
public String getReserveLevel() {
|
||||
return reserveLevel;
|
||||
}
|
||||
|
||||
public void setProtection(String protection) {
|
||||
this.protection = protection;
|
||||
}
|
||||
|
||||
public String getProtection() {
|
||||
return protection;
|
||||
}
|
||||
|
||||
public void setProtectedSpecies(String protectedSpecies) {
|
||||
this.protectedSpecies = protectedSpecies;
|
||||
}
|
||||
|
||||
public String getProtectedSpecies() {
|
||||
return protectedSpecies;
|
||||
}
|
||||
|
||||
public void setChargePerson(String chargePerson) {
|
||||
this.chargePerson = chargePerson;
|
||||
}
|
||||
|
||||
public String getChargePerson() {
|
||||
return chargePerson;
|
||||
}
|
||||
|
||||
public void setChargePhone(String chargePhone) {
|
||||
this.chargePhone = chargePhone;
|
||||
}
|
||||
|
||||
public String getChargePhone() {
|
||||
return chargePhone;
|
||||
}
|
||||
|
||||
public void setDataType(String dataType) {
|
||||
this.dataType = dataType;
|
||||
}
|
||||
|
||||
public String getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
|
||||
public void setAddPerson(String addPerson) {
|
||||
this.addPerson = addPerson;
|
||||
}
|
||||
|
||||
public String getAddPerson() {
|
||||
return addPerson;
|
||||
}
|
||||
|
||||
public void setAddTime(String addTime) {
|
||||
this.addTime = addTime;
|
||||
}
|
||||
|
||||
public String getAddTime() {
|
||||
return addTime;
|
||||
}
|
||||
|
||||
public void setSettingTime(String settingTime) {
|
||||
this.settingTime = settingTime;
|
||||
}
|
||||
|
||||
public String getSettingTime() {
|
||||
return settingTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("reserveName", getReserveName())
|
||||
.append("reserveScope", getReserveScope())
|
||||
.append("reserveLevel", getReserveLevel())
|
||||
.append("protection", getProtection())
|
||||
.append("protectedSpecies", getProtectedSpecies())
|
||||
.append("chargePerson", getChargePerson())
|
||||
.append("chargePhone", getChargePhone())
|
||||
.append("remark", getRemark())
|
||||
.append("dataType", getDataType())
|
||||
.append("addPerson", getAddPerson())
|
||||
.append("addTime", getAddTime())
|
||||
.append("settingTime", getSettingTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.god.passenger.species.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.god.passenger.species.domain.BjdfAmbientFator;
|
||||
|
||||
/**
|
||||
* 环境因素Mapper接口
|
||||
*
|
||||
* @author wangyan21
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
public interface BjdfAmbientFatorMapper
|
||||
{
|
||||
/**
|
||||
* 查询环境因素
|
||||
*
|
||||
* @param id 环境因素主键
|
||||
* @return 环境因素
|
||||
*/
|
||||
public BjdfAmbientFator selectBjdfAmbientFatorById(String id);
|
||||
|
||||
/**
|
||||
* 查询环境因素列表
|
||||
*
|
||||
* @param bjdfAmbientFator 环境因素
|
||||
* @return 环境因素集合
|
||||
*/
|
||||
public List<BjdfAmbientFator> selectBjdfAmbientFatorList(BjdfAmbientFator bjdfAmbientFator);
|
||||
|
||||
/**
|
||||
* 新增环境因素
|
||||
*
|
||||
* @param bjdfAmbientFator 环境因素
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBjdfAmbientFator(BjdfAmbientFator bjdfAmbientFator);
|
||||
|
||||
/**
|
||||
* 修改环境因素
|
||||
*
|
||||
* @param bjdfAmbientFator 环境因素
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBjdfAmbientFator(BjdfAmbientFator bjdfAmbientFator);
|
||||
|
||||
/**
|
||||
* 删除环境因素
|
||||
*
|
||||
* @param id 环境因素主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBjdfAmbientFatorById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除环境因素
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBjdfAmbientFatorByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.god.passenger.species.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.god.passenger.species.domain.BjdfReserveInfo;
|
||||
|
||||
/**
|
||||
* 保护区信息Mapper接口
|
||||
*
|
||||
* @author wangyan21
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
public interface BjdfReserveInfoMapper {
|
||||
/**
|
||||
* 查询保护区信息
|
||||
*
|
||||
* @param id 保护区信息主键
|
||||
* @return 保护区信息
|
||||
*/
|
||||
public BjdfReserveInfo selectBjdfReserveInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询保护区信息列表
|
||||
*
|
||||
* @param bjdfReserveInfo 保护区信息
|
||||
* @return 保护区信息集合
|
||||
*/
|
||||
public List<BjdfReserveInfo> selectBjdfReserveInfoList(BjdfReserveInfo bjdfReserveInfo);
|
||||
|
||||
/**
|
||||
* 新增保护区信息
|
||||
*
|
||||
* @param bjdfReserveInfo 保护区信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBjdfReserveInfo(BjdfReserveInfo bjdfReserveInfo);
|
||||
|
||||
/**
|
||||
* 修改保护区信息
|
||||
*
|
||||
* @param bjdfReserveInfo 保护区信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBjdfReserveInfo(BjdfReserveInfo bjdfReserveInfo);
|
||||
|
||||
/**
|
||||
* 删除保护区信息
|
||||
*
|
||||
* @param id 保护区信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBjdfReserveInfoById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除保护区信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBjdfReserveInfoByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.god.passenger.species.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.god.passenger.species.domain.BjdfAmbientFator;
|
||||
|
||||
/**
|
||||
* 环境因素Service接口
|
||||
*
|
||||
* @author wangyan21
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
public interface IBjdfAmbientFatorService
|
||||
{
|
||||
/**
|
||||
* 查询环境因素
|
||||
*
|
||||
* @param id 环境因素主键
|
||||
* @return 环境因素
|
||||
*/
|
||||
public BjdfAmbientFator selectBjdfAmbientFatorById(String id);
|
||||
|
||||
/**
|
||||
* 查询环境因素列表
|
||||
*
|
||||
* @param bjdfAmbientFator 环境因素
|
||||
* @return 环境因素集合
|
||||
*/
|
||||
public List<BjdfAmbientFator> selectBjdfAmbientFatorList(BjdfAmbientFator bjdfAmbientFator);
|
||||
|
||||
/**
|
||||
* 新增环境因素
|
||||
*
|
||||
* @param bjdfAmbientFator 环境因素
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBjdfAmbientFator(BjdfAmbientFator bjdfAmbientFator);
|
||||
|
||||
/**
|
||||
* 修改环境因素
|
||||
*
|
||||
* @param bjdfAmbientFator 环境因素
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBjdfAmbientFator(BjdfAmbientFator bjdfAmbientFator);
|
||||
|
||||
/**
|
||||
* 批量删除环境因素
|
||||
*
|
||||
* @param ids 需要删除的环境因素主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBjdfAmbientFatorByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除环境因素信息
|
||||
*
|
||||
* @param id 环境因素主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBjdfAmbientFatorById(String id);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.god.passenger.species.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.god.passenger.species.domain.BjdfReserveInfo;
|
||||
|
||||
/**
|
||||
* 保护区信息Service接口
|
||||
*
|
||||
* @author wangyan21
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
public interface IBjdfReserveInfoService
|
||||
{
|
||||
/**
|
||||
* 查询保护区信息
|
||||
*
|
||||
* @param id 保护区信息主键
|
||||
* @return 保护区信息
|
||||
*/
|
||||
public BjdfReserveInfo selectBjdfReserveInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询保护区信息列表
|
||||
*
|
||||
* @param bjdfReserveInfo 保护区信息
|
||||
* @return 保护区信息集合
|
||||
*/
|
||||
public List<BjdfReserveInfo> selectBjdfReserveInfoList(BjdfReserveInfo bjdfReserveInfo);
|
||||
|
||||
/**
|
||||
* 新增保护区信息
|
||||
*
|
||||
* @param bjdfReserveInfo 保护区信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBjdfReserveInfo(BjdfReserveInfo bjdfReserveInfo);
|
||||
|
||||
/**
|
||||
* 修改保护区信息
|
||||
*
|
||||
* @param bjdfReserveInfo 保护区信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBjdfReserveInfo(BjdfReserveInfo bjdfReserveInfo);
|
||||
|
||||
/**
|
||||
* 批量删除保护区信息
|
||||
*
|
||||
* @param ids 需要删除的保护区信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBjdfReserveInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除保护区信息信息
|
||||
*
|
||||
* @param id 保护区信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBjdfReserveInfoById(String id);
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
package com.god.passenger.species.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.god.common.utils.StringUtils;
|
||||
import com.god.common.utils.uuid.IdUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.god.passenger.species.mapper.BjdfAmbientFatorMapper;
|
||||
import com.god.passenger.species.domain.BjdfAmbientFator;
|
||||
import com.god.passenger.species.service.IBjdfAmbientFatorService;
|
||||
|
||||
/**
|
||||
* 环境因素Service业务层处理
|
||||
*
|
||||
* @author wangyan21
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
@Service
|
||||
public class BjdfAmbientFatorServiceImpl implements IBjdfAmbientFatorService {
|
||||
@Autowired
|
||||
private BjdfAmbientFatorMapper bjdfAmbientFatorMapper;
|
||||
|
||||
/**
|
||||
* 查询环境因素
|
||||
*
|
||||
* @param id 环境因素主键
|
||||
* @return 环境因素
|
||||
*/
|
||||
@Override
|
||||
public BjdfAmbientFator selectBjdfAmbientFatorById(String id) {
|
||||
return bjdfAmbientFatorMapper.selectBjdfAmbientFatorById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询环境因素列表
|
||||
*
|
||||
* @param bjdfAmbientFator 环境因素
|
||||
* @return 环境因素
|
||||
*/
|
||||
@Override
|
||||
public List<BjdfAmbientFator> selectBjdfAmbientFatorList(BjdfAmbientFator bjdfAmbientFator) {
|
||||
return bjdfAmbientFatorMapper.selectBjdfAmbientFatorList(bjdfAmbientFator);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增环境因素
|
||||
*
|
||||
* @param bjdfAmbientFator 环境因素
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBjdfAmbientFator(BjdfAmbientFator bjdfAmbientFator) {
|
||||
if (StringUtils.isBlank(bjdfAmbientFator.getId())){
|
||||
bjdfAmbientFator.setId(IdUtils.fastSimpleUUID());
|
||||
}
|
||||
return bjdfAmbientFatorMapper.insertBjdfAmbientFator(bjdfAmbientFator);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改环境因素
|
||||
*
|
||||
* @param bjdfAmbientFator 环境因素
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBjdfAmbientFator(BjdfAmbientFator bjdfAmbientFator) {
|
||||
return bjdfAmbientFatorMapper.updateBjdfAmbientFator(bjdfAmbientFator);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除环境因素
|
||||
*
|
||||
* @param ids 需要删除的环境因素主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBjdfAmbientFatorByIds(String[] ids) {
|
||||
return bjdfAmbientFatorMapper.deleteBjdfAmbientFatorByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除环境因素信息
|
||||
*
|
||||
* @param id 环境因素主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBjdfAmbientFatorById(String id) {
|
||||
return bjdfAmbientFatorMapper.deleteBjdfAmbientFatorById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
package com.god.passenger.species.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.god.common.utils.StringUtils;
|
||||
import com.god.common.utils.uuid.IdUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.god.passenger.species.mapper.BjdfReserveInfoMapper;
|
||||
import com.god.passenger.species.domain.BjdfReserveInfo;
|
||||
import com.god.passenger.species.service.IBjdfReserveInfoService;
|
||||
|
||||
/**
|
||||
* 保护区信息Service业务层处理
|
||||
*
|
||||
* @author wangyan21
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
@Service
|
||||
public class BjdfReserveInfoServiceImpl implements IBjdfReserveInfoService {
|
||||
@Autowired
|
||||
private BjdfReserveInfoMapper bjdfReserveInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询保护区信息
|
||||
*
|
||||
* @param id 保护区信息主键
|
||||
* @return 保护区信息
|
||||
*/
|
||||
@Override
|
||||
public BjdfReserveInfo selectBjdfReserveInfoById(String id) {
|
||||
return bjdfReserveInfoMapper.selectBjdfReserveInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询保护区信息列表
|
||||
*
|
||||
* @param bjdfReserveInfo 保护区信息
|
||||
* @return 保护区信息
|
||||
*/
|
||||
@Override
|
||||
public List<BjdfReserveInfo> selectBjdfReserveInfoList(BjdfReserveInfo bjdfReserveInfo) {
|
||||
return bjdfReserveInfoMapper.selectBjdfReserveInfoList(bjdfReserveInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保护区信息
|
||||
*
|
||||
* @param bjdfReserveInfo 保护区信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBjdfReserveInfo(BjdfReserveInfo bjdfReserveInfo) {
|
||||
if (StringUtils.isBlank(bjdfReserveInfo.getId())) {
|
||||
bjdfReserveInfo.setId(IdUtils.fastSimpleUUID());
|
||||
}
|
||||
return bjdfReserveInfoMapper.insertBjdfReserveInfo(bjdfReserveInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保护区信息
|
||||
*
|
||||
* @param bjdfReserveInfo 保护区信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBjdfReserveInfo(BjdfReserveInfo bjdfReserveInfo) {
|
||||
return bjdfReserveInfoMapper.updateBjdfReserveInfo(bjdfReserveInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除保护区信息
|
||||
*
|
||||
* @param ids 需要删除的保护区信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBjdfReserveInfoByIds(String[] ids) {
|
||||
return bjdfReserveInfoMapper.deleteBjdfReserveInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除保护区信息信息
|
||||
*
|
||||
* @param id 保护区信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBjdfReserveInfoById(String id) {
|
||||
return bjdfReserveInfoMapper.deleteBjdfReserveInfoById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
<?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.god.passenger.species.mapper.BjdfAmbientFatorMapper">
|
||||
|
||||
<resultMap type="BjdfAmbientFator" id="BjdfAmbientFatorResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="city" column="city" />
|
||||
<result property="factorType" column="factor_type" />
|
||||
<result property="parameter" column="parameter" />
|
||||
<result property="parameterValue" column="parameter_value" />
|
||||
<result property="parameterUnit" column="parameter_unit" />
|
||||
<result property="settingTime" column="setting_time" />
|
||||
<result property="dataType" column="data_type" />
|
||||
<result property="addPerson" column="add_person" />
|
||||
<result property="addTime" column="add_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBjdfAmbientFatorVo">
|
||||
select id, city, factor_type, parameter, parameter_value, parameter_unit, setting_time, data_type, add_person, add_time, remark from bjdf_ambient_fator
|
||||
</sql>
|
||||
|
||||
<select id="selectBjdfAmbientFatorList" parameterType="BjdfAmbientFator" resultMap="BjdfAmbientFatorResult">
|
||||
<include refid="selectBjdfAmbientFatorVo"/>
|
||||
<where>
|
||||
<if test="city != null and city != ''"> and city like concat('%', #{city}, '%')</if>
|
||||
<if test="factorType != null and factorType != ''"> and factor_type like concat('%', #{factorType}, '%')</if>
|
||||
<if test="parameter != null and parameter != ''"> and parameter like concat('%', #{parameter}, '%')</if>
|
||||
<if test="parameterValue != null and parameterValue != ''"> and parameter_value like concat('%', #{parameterValue}, '%')</if>
|
||||
<if test="parameterUnit != null and parameterUnit != ''"> and parameter_unit like concat('%', #{parameterUnit}, '%')</if>
|
||||
<if test="params.beginSettingTime != null and params.beginSettingTime != '' and params.endSettingTime != null and params.endSettingTime != ''"> and setting_time between #{params.beginSettingTime} and #{params.endSettingTime}</if>
|
||||
<if test="dataType != null and dataType != ''"> and data_type like concat('%', #{dataType}, '%')</if>
|
||||
<if test="addPerson != null and addPerson != ''"> and add_person like concat('%', #{addPerson}, '%')</if>
|
||||
<if test="addTime != null and addTime != ''"> and add_time >= #{addTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBjdfAmbientFatorById" parameterType="String" resultMap="BjdfAmbientFatorResult">
|
||||
<include refid="selectBjdfAmbientFatorVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBjdfAmbientFator" parameterType="BjdfAmbientFator">
|
||||
insert into bjdf_ambient_fator
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="city != null">city,</if>
|
||||
<if test="factorType != null">factor_type,</if>
|
||||
<if test="parameter != null">parameter,</if>
|
||||
<if test="parameterValue != null">parameter_value,</if>
|
||||
<if test="parameterUnit != null">parameter_unit,</if>
|
||||
<if test="settingTime != null">setting_time,</if>
|
||||
<if test="dataType != null">data_type,</if>
|
||||
<if test="addPerson != null">add_person,</if>
|
||||
<if test="addTime != null">add_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="city != null">#{city},</if>
|
||||
<if test="factorType != null">#{factorType},</if>
|
||||
<if test="parameter != null">#{parameter},</if>
|
||||
<if test="parameterValue != null">#{parameterValue},</if>
|
||||
<if test="parameterUnit != null">#{parameterUnit},</if>
|
||||
<if test="settingTime != null">#{settingTime},</if>
|
||||
<if test="dataType != null">#{dataType},</if>
|
||||
<if test="addPerson != null">#{addPerson},</if>
|
||||
<if test="addTime != null">#{addTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBjdfAmbientFator" parameterType="BjdfAmbientFator">
|
||||
update bjdf_ambient_fator
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="city != null">city = #{city},</if>
|
||||
<if test="factorType != null">factor_type = #{factorType},</if>
|
||||
<if test="parameter != null">parameter = #{parameter},</if>
|
||||
<if test="parameterValue != null">parameter_value = #{parameterValue},</if>
|
||||
<if test="parameterUnit != null">parameter_unit = #{parameterUnit},</if>
|
||||
<if test="settingTime != null">setting_time = #{settingTime},</if>
|
||||
<if test="dataType != null">data_type = #{dataType},</if>
|
||||
<if test="addPerson != null">add_person = #{addPerson},</if>
|
||||
<if test="addTime != null">add_time = #{addTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBjdfAmbientFatorById" parameterType="String">
|
||||
delete from bjdf_ambient_fator where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBjdfAmbientFatorByIds" parameterType="String">
|
||||
delete from bjdf_ambient_fator where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,112 @@
|
||||
<?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.god.passenger.species.mapper.BjdfReserveInfoMapper">
|
||||
|
||||
<resultMap type="BjdfReserveInfo" id="BjdfReserveInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="reserveName" column="reserve_name" />
|
||||
<result property="reserveScope" column="reserve_scope" />
|
||||
<result property="reserveLevel" column="reserve_level" />
|
||||
<result property="protection" column="protection" />
|
||||
<result property="protectedSpecies" column="protected_species" />
|
||||
<result property="chargePerson" column="charge_person" />
|
||||
<result property="chargePhone" column="charge_phone" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="dataType" column="data_type" />
|
||||
<result property="addPerson" column="add_person" />
|
||||
<result property="addTime" column="add_time" />
|
||||
<result property="settingTime" column="setting_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBjdfReserveInfoVo">
|
||||
select id, reserve_name, reserve_scope, reserve_level, protection, protected_species, charge_person, charge_phone, remark, data_type, add_person, add_time, setting_time from bjdf_reserve_info
|
||||
</sql>
|
||||
|
||||
<select id="selectBjdfReserveInfoList" parameterType="BjdfReserveInfo" resultMap="BjdfReserveInfoResult">
|
||||
<include refid="selectBjdfReserveInfoVo"/>
|
||||
<where>
|
||||
<if test="reserveName != null and reserveName != ''"> and reserve_name like concat('%', #{reserveName}, '%')</if>
|
||||
<if test="reserveScope != null and reserveScope != ''"> and reserve_scope like concat('%', #{reserveScope}, '%')</if>
|
||||
<if test="reserveLevel != null and reserveLevel != ''"> and reserve_level like concat('%', #{reserveLevel}, '%')</if>
|
||||
<if test="protection != null and protection != ''"> and protection like concat('%', #{protection}, '%')</if>
|
||||
<if test="protectedSpecies != null and protectedSpecies != ''"> and protected_species like concat('%', #{protectedSpecies}, '%')</if>
|
||||
<if test="chargePerson != null and chargePerson != ''"> and charge_person like concat('%', #{chargePerson}, '%')</if>
|
||||
<if test="chargePhone != null and chargePhone != ''"> and charge_phone like concat('%', #{chargePhone}, '%')</if>
|
||||
<if test="dataType != null and dataType != ''"> and data_type like concat('%', #{dataType}, '%')</if>
|
||||
<if test="addPerson != null and addPerson != ''"> and add_person like concat('%', #{addPerson}, '%')</if>
|
||||
<if test="addTime != null and addTime != ''"> and add_time >= #{addTime}</if>
|
||||
<if test="params.beginSettingTime != null and params.beginSettingTime != '' and params.endSettingTime != null and params.endSettingTime != ''"> and setting_time between #{params.beginSettingTime} and #{params.endSettingTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBjdfReserveInfoById" parameterType="String" resultMap="BjdfReserveInfoResult">
|
||||
<include refid="selectBjdfReserveInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBjdfReserveInfo" parameterType="BjdfReserveInfo">
|
||||
insert into bjdf_reserve_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="reserveName != null">reserve_name,</if>
|
||||
<if test="reserveScope != null">reserve_scope,</if>
|
||||
<if test="reserveLevel != null">reserve_level,</if>
|
||||
<if test="protection != null">protection,</if>
|
||||
<if test="protectedSpecies != null">protected_species,</if>
|
||||
<if test="chargePerson != null">charge_person,</if>
|
||||
<if test="chargePhone != null">charge_phone,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="dataType != null">data_type,</if>
|
||||
<if test="addPerson != null">add_person,</if>
|
||||
<if test="addTime != null">add_time,</if>
|
||||
<if test="settingTime != null">setting_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="reserveName != null">#{reserveName},</if>
|
||||
<if test="reserveScope != null">#{reserveScope},</if>
|
||||
<if test="reserveLevel != null">#{reserveLevel},</if>
|
||||
<if test="protection != null">#{protection},</if>
|
||||
<if test="protectedSpecies != null">#{protectedSpecies},</if>
|
||||
<if test="chargePerson != null">#{chargePerson},</if>
|
||||
<if test="chargePhone != null">#{chargePhone},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="dataType != null">#{dataType},</if>
|
||||
<if test="addPerson != null">#{addPerson},</if>
|
||||
<if test="addTime != null">#{addTime},</if>
|
||||
<if test="settingTime != null">#{settingTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBjdfReserveInfo" parameterType="BjdfReserveInfo">
|
||||
update bjdf_reserve_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="reserveName != null">reserve_name = #{reserveName},</if>
|
||||
<if test="reserveScope != null">reserve_scope = #{reserveScope},</if>
|
||||
<if test="reserveLevel != null">reserve_level = #{reserveLevel},</if>
|
||||
<if test="protection != null">protection = #{protection},</if>
|
||||
<if test="protectedSpecies != null">protected_species = #{protectedSpecies},</if>
|
||||
<if test="chargePerson != null">charge_person = #{chargePerson},</if>
|
||||
<if test="chargePhone != null">charge_phone = #{chargePhone},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="dataType != null">data_type = #{dataType},</if>
|
||||
<if test="addPerson != null">add_person = #{addPerson},</if>
|
||||
<if test="addTime != null">add_time = #{addTime},</if>
|
||||
<if test="settingTime != null">setting_time = #{settingTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBjdfReserveInfoById" parameterType="String">
|
||||
delete from bjdf_reserve_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBjdfReserveInfoByIds" parameterType="String">
|
||||
delete from bjdf_reserve_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
44
god-ui/src/api/species/ambient.js
Normal file
44
god-ui/src/api/species/ambient.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询环境因素列表
|
||||
export function listAmbient(query) {
|
||||
return request({
|
||||
url: '/species/ambient/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询环境因素详细
|
||||
export function getAmbient(id) {
|
||||
return request({
|
||||
url: '/species/ambient/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增环境因素
|
||||
export function addAmbient(data) {
|
||||
return request({
|
||||
url: '/species/ambient',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改环境因素
|
||||
export function updateAmbient(data) {
|
||||
return request({
|
||||
url: '/species/ambient',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除环境因素
|
||||
export function delAmbient(id) {
|
||||
return request({
|
||||
url: '/species/ambient/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
44
god-ui/src/api/species/reserve.js
Normal file
44
god-ui/src/api/species/reserve.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询保护区信息列表
|
||||
export function listReserve(query) {
|
||||
return request({
|
||||
url: '/species/reserve/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询保护区信息详细
|
||||
export function getReserve(id) {
|
||||
return request({
|
||||
url: '/species/reserve/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增保护区信息
|
||||
export function addReserve(data) {
|
||||
return request({
|
||||
url: '/species/reserve',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改保护区信息
|
||||
export function updateReserve(data) {
|
||||
return request({
|
||||
url: '/species/reserve',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除保护区信息
|
||||
export function delReserve(id) {
|
||||
return request({
|
||||
url: '/species/reserve/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
407
god-ui/src/views/species/ambient/index.vue
Normal file
407
god-ui/src/views/species/ambient/index.vue
Normal file
@ -0,0 +1,407 @@
|
||||
<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="city">
|
||||
<el-input
|
||||
v-model="queryParams.city"
|
||||
placeholder="请输入市区"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="因素类型" prop="factorType">
|
||||
<el-select v-model="queryParams.factorType" placeholder="请选择因素类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.bjdf_ambient_factor_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="因素参数" prop="parameter">
|
||||
<el-input
|
||||
v-model="queryParams.parameter"
|
||||
placeholder="请输入因素参数"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="参数值" prop="parameterValue">
|
||||
<el-input
|
||||
v-model="queryParams.parameterValue"
|
||||
placeholder="请输入参数值"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="参数单位" prop="parameterUnit">
|
||||
<el-input
|
||||
v-model="queryParams.parameterUnit"
|
||||
placeholder="请输入参数单位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="采集时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeSettingTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="数据类型" prop="dataType">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.dataType"-->
|
||||
<!-- placeholder="请输入数据类型"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="添加人" prop="addPerson">
|
||||
<el-input
|
||||
v-model="queryParams.addPerson"
|
||||
placeholder="请输入添加人"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="添加时间" prop="addTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.addTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择添加时间">
|
||||
</el-date-picker>
|
||||
</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="['species:ambient: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="['species:ambient: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="['species:ambient: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="['species:ambient:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="ambientList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键" align="center" prop="id" />-->
|
||||
<el-table-column label="市区" align="center" prop="city" />
|
||||
<el-table-column label="因素类型" align="center" prop="factorType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.bjdf_ambient_factor_type" :value="scope.row.factorType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="因素参数" align="center" prop="parameter" />
|
||||
<el-table-column label="参数值" align="center" prop="parameterValue" />
|
||||
<el-table-column label="参数单位" align="center" prop="parameterUnit" />
|
||||
<el-table-column label="采集时间" align="center" prop="settingTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.settingTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="数据类型" align="center" prop="dataType" />-->
|
||||
<el-table-column label="添加人" align="center" prop="addPerson" />
|
||||
<el-table-column label="添加时间" align="center" prop="addTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.addTime, '{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="['species:ambient:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['species:ambient: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="city">
|
||||
<el-input v-model="form.city" placeholder="请输入市区" />
|
||||
</el-form-item>
|
||||
<el-form-item label="因素类型" prop="factorType">
|
||||
<el-select v-model="form.factorType" placeholder="请选择因素类型">
|
||||
<el-option
|
||||
v-for="dict in dict.type.bjdf_ambient_factor_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="因素参数" prop="parameter">
|
||||
<el-input v-model="form.parameter" placeholder="请输入因素参数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="参数值" prop="parameterValue">
|
||||
<el-input v-model="form.parameterValue" placeholder="请输入参数值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="参数单位" prop="parameterUnit">
|
||||
<el-input v-model="form.parameterUnit" placeholder="请输入参数单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="采集时间" prop="settingTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.settingTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择采集时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="数据类型" prop="dataType">-->
|
||||
<!-- <el-input v-model="form.dataType" placeholder="请输入数据类型" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="添加人" prop="addPerson">
|
||||
<el-input v-model="form.addPerson" placeholder="请输入添加人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="添加时间" prop="addTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.addTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择添加时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" 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 { listAmbient, getAmbient, delAmbient, addAmbient, updateAmbient } from "@/api/species/ambient";
|
||||
|
||||
export default {
|
||||
//环境因素数据
|
||||
name: "Ambient",
|
||||
dicts: ['bjdf_ambient_factor_type'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 环境因素表格数据
|
||||
ambientList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 备注时间范围
|
||||
daterangeSettingTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
city: null,
|
||||
factorType: null,
|
||||
parameter: null,
|
||||
parameterValue: null,
|
||||
parameterUnit: null,
|
||||
settingTime: null,
|
||||
dataType: "环境因素",
|
||||
addPerson: null,
|
||||
addTime: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询环境因素列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeSettingTime && '' != this.daterangeSettingTime) {
|
||||
this.queryParams.params["beginSettingTime"] = this.daterangeSettingTime[0];
|
||||
this.queryParams.params["endSettingTime"] = this.daterangeSettingTime[1];
|
||||
}
|
||||
listAmbient(this.queryParams).then(response => {
|
||||
this.ambientList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
city: null,
|
||||
factorType: null,
|
||||
parameter: null,
|
||||
parameterValue: null,
|
||||
parameterUnit: null,
|
||||
settingTime: null,
|
||||
dataType: null,
|
||||
addPerson: null,
|
||||
addTime: null,
|
||||
remark: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeSettingTime = [];
|
||||
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 = "添加环境因素";
|
||||
this.form.dataType = "环境因素";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getAmbient(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) {
|
||||
updateAmbient(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addAmbient(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 delAmbient(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('species/ambient/export', {
|
||||
...this.queryParams
|
||||
}, `ambient_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
440
god-ui/src/views/species/disaster/index.vue
Normal file
440
god-ui/src/views/species/disaster/index.vue
Normal file
@ -0,0 +1,440 @@
|
||||
<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="reserveName">
|
||||
<el-input
|
||||
v-model="queryParams.reserveName"
|
||||
placeholder="请输入灾害名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="处置情况" prop="reserveScope">
|
||||
<el-input
|
||||
v-model="queryParams.reserveScope"
|
||||
placeholder="请输入处置情况"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="影响生物" prop="reserveLevel">
|
||||
<el-input
|
||||
v-model="queryParams.reserveLevel"
|
||||
placeholder="请输入影响生物"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="灾害原因" prop="protection">
|
||||
<el-input
|
||||
v-model="queryParams.protection"
|
||||
placeholder="请输入灾害原因"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="灾害种类" prop="protectedSpecies">
|
||||
<el-input
|
||||
v-model="queryParams.protectedSpecies"
|
||||
placeholder="请输入灾害种类"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="管理单位" prop="chargePerson">
|
||||
<el-input
|
||||
v-model="queryParams.chargePerson"
|
||||
placeholder="请输入管理单位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="联系方式" prop="chargePhone">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.chargePhone"-->
|
||||
<!-- placeholder="请输入联系方式"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="数据类型" prop="dataType">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.dataType"-->
|
||||
<!-- placeholder="请输入数据类型"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="添加人" prop="addPerson">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.addPerson"-->
|
||||
<!-- placeholder="请输入添加人"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="添加时间" prop="addTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.addTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择添加时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="成立时间">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="daterangeSettingTime"-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- range-separator="-"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<!-- </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="['species:reserve: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="['species:reserve: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="['species:reserve: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="['species:reserve:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="reserveList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键" align="center" prop="id" />-->
|
||||
<el-table-column label="灾害名称" align="center" prop="reserveName" />
|
||||
<el-table-column label="灾害时间" align="center" prop="settingTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.settingTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="灾害原因" align="center" prop="protection" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="灾害种类" align="center" prop="protectedSpecies" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="处置情况" align="center" prop="reserveScope" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="影响生物" align="center" prop="reserveLevel" :show-overflow-tooltip="true"/>
|
||||
|
||||
<!-- <el-table-column label="管理单位" align="center" prop="chargePerson" />-->
|
||||
<!-- <el-table-column label="联系方式" align="center" prop="chargePhone" />-->
|
||||
<!-- <el-table-column label="备注" align="center" prop="remark" />-->
|
||||
<!-- <el-table-column label="数据类型" align="center" prop="dataType" />-->
|
||||
<el-table-column label="添加人" align="center" prop="addPerson" />
|
||||
<el-table-column label="添加时间" align="center" prop="addTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.addTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<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="['species:reserve:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['species:reserve: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="reserveName">
|
||||
<el-input v-model="form.reserveName" placeholder="请输入灾害名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="灾害时间" prop="settingTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.settingTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择灾害时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="处置情况" prop="reserveScope">
|
||||
<el-input v-model="form.reserveScope" placeholder="请输入处置情况" type="textarea"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="影响生物" prop="reserveLevel">
|
||||
<el-input v-model="form.reserveLevel" placeholder="请输入影响生物" />
|
||||
</el-form-item>
|
||||
<el-form-item label="灾害原因" prop="protection">
|
||||
<!-- <el-input v-model="form.protection" placeholder="请输入灾害原因" />-->
|
||||
<el-select v-model="form.protection" clearable placeholder="请选择灾害原因">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="灾害种类" prop="protectedSpecies">
|
||||
<el-input v-model="form.protectedSpecies" placeholder="请输入灾害种类" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="管理单位" prop="chargePerson">-->
|
||||
<!-- <el-input v-model="form.chargePerson" placeholder="请输入管理单位" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="联系方式" prop="chargePhone">-->
|
||||
<!-- <el-input v-model="form.chargePhone" placeholder="请输入联系方式" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="备注" prop="remark">-->
|
||||
<!-- <el-input v-model="form.remark" placeholder="请输入备注" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="数据类型" prop="dataType">-->
|
||||
<!-- <el-input v-model="form.dataType" placeholder="请输入数据类型" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="添加人" prop="addPerson">
|
||||
<el-input v-model="form.addPerson" placeholder="请输入添加人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="添加时间" prop="addTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.addTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择添加时间">
|
||||
</el-date-picker>
|
||||
</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 { listReserve, getReserve, delReserve, addReserve, updateReserve } from "@/api/species/reserve";
|
||||
|
||||
export default {
|
||||
//灾害事件信息
|
||||
name: "DisasterReserve",
|
||||
data() {
|
||||
return {
|
||||
options: [{
|
||||
value: '人为原因',
|
||||
label: '人为原因'
|
||||
}, {
|
||||
value: '自然原因',
|
||||
label: '自然原因'
|
||||
}],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 保护区信息表格数据
|
||||
reserveList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 成立时间时间范围
|
||||
daterangeSettingTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
reserveName: null,
|
||||
reserveScope: null,
|
||||
reserveLevel: null,
|
||||
protection: null,
|
||||
protectedSpecies: null,
|
||||
chargePerson: null,
|
||||
chargePhone: null,
|
||||
dataType: "灾害事件",
|
||||
addPerson: null,
|
||||
addTime: null,
|
||||
settingTime: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询保护区信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeSettingTime && '' != this.daterangeSettingTime) {
|
||||
this.queryParams.params["beginSettingTime"] = this.daterangeSettingTime[0];
|
||||
this.queryParams.params["endSettingTime"] = this.daterangeSettingTime[1];
|
||||
}
|
||||
listReserve(this.queryParams).then(response => {
|
||||
this.reserveList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
reserveName: null,
|
||||
reserveScope: null,
|
||||
reserveLevel: null,
|
||||
protection: null,
|
||||
protectedSpecies: null,
|
||||
chargePerson: null,
|
||||
chargePhone: null,
|
||||
remark: null,
|
||||
dataType: null,
|
||||
addPerson: null,
|
||||
addTime: null,
|
||||
settingTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeSettingTime = [];
|
||||
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 = "添加灾害事件信息";
|
||||
this.form.dataType = "灾害事件";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getReserve(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) {
|
||||
updateReserve(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addReserve(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 delReserve(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('species/reserve/export', {
|
||||
...this.queryParams
|
||||
}, `reserve_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
391
god-ui/src/views/species/diversity/index.vue
Normal file
391
god-ui/src/views/species/diversity/index.vue
Normal file
@ -0,0 +1,391 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="88px">
|
||||
<el-form-item label="物种名称" prop="speciesName">
|
||||
<el-input
|
||||
v-model="queryParams.speciesName"
|
||||
placeholder="请输入物种名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物种分类" prop="classification">
|
||||
<el-input
|
||||
v-model="queryParams.classification"
|
||||
placeholder="请输入物种分类"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物种数量" prop="distribution">
|
||||
<el-input
|
||||
v-model="queryParams.distribution"
|
||||
placeholder="请输入物种数量"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="丰富度指数" prop="environment">
|
||||
<el-input
|
||||
v-model="queryParams.environment"
|
||||
placeholder="请输入丰富度指数"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="生活习性" prop="habits">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.habits"-->
|
||||
<!-- placeholder="请输入生活习性"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="香农多样性指数" prop="levelInfo">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.levelInfo"-->
|
||||
<!-- placeholder="请输入香农多样性指数"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="身长大小" prop="height">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.height"-->
|
||||
<!-- placeholder="请输入身长大小"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="繁殖方式" prop="reproduction">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.reproduction"-->
|
||||
<!-- placeholder="请输入繁殖方式"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="添加时间" prop="addTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.addTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择添加时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="添加人" prop="addPerson">
|
||||
<el-input
|
||||
v-model="queryParams.addPerson"
|
||||
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="['species:info: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="['species:info: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="['species:info: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="['species:info:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="物种名称" align="center" prop="speciesName" />
|
||||
<el-table-column label="物种分类" align="center" prop="classification" />
|
||||
<el-table-column label="物种数量" align="center" prop="distribution" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="丰富度指数" align="center" prop="environment" />
|
||||
<el-table-column label="辛普森多样性指数" align="center" prop="habits" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="香农多样性指数" align="center" prop="levelInfo" />
|
||||
<!-- <el-table-column label="身长大小" align="center" prop="height" :show-overflow-tooltip="true"/>-->
|
||||
<!-- <el-table-column label="繁殖方式" align="center" prop="reproduction" />-->
|
||||
<el-table-column label="生物环境质量评估" align="center" prop="remark" :show-overflow-tooltip="true"/>
|
||||
<!-- <el-table-column label="数据类型" align="center" prop="dataType" />-->
|
||||
<el-table-column label="添加时间" align="center" prop="addTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.addTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="添加人" align="center" prop="addPerson" />
|
||||
<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="['species:info:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['species:info: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="speciesName">
|
||||
<el-input v-model="form.speciesName" placeholder="请输入物种名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物种分类" prop="classification">
|
||||
<el-input v-model="form.classification" placeholder="请输入物种分类" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物种数量" prop="distribution">
|
||||
<el-input v-model="form.distribution" placeholder="请输入物种数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="丰富度指数" prop="environment">
|
||||
<el-input v-model="form.environment" placeholder="请输入丰富度指数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="辛普森多样性指数" prop="habits">
|
||||
<el-input v-model="form.habits" placeholder="请输入辛普森多样性指数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="香农多样性指数" prop="levelInfo">
|
||||
<el-input v-model="form.levelInfo" placeholder="请输入香农多样性指数" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="身长大小" prop="height">-->
|
||||
<!-- <el-input v-model="form.height" placeholder="请输入身长大小" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="繁殖方式" prop="reproduction">-->
|
||||
<!-- <el-input v-model="form.reproduction" placeholder="请输入繁殖方式" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="生物环境质量评估" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入生物环境质量评估" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数据类型" prop="dataType">
|
||||
<el-input v-model="form.dataType" placeholder="请输入数据类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="添加时间" prop="addTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.addTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择添加时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="添加人" prop="addPerson">
|
||||
<el-input v-model="form.addPerson" 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 { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/species/info";
|
||||
|
||||
export default {
|
||||
name: "SpeciesInfo",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 物种基本信息表格数据
|
||||
infoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
speciesName: null,
|
||||
classification: null,
|
||||
distribution: null,
|
||||
environment: null,
|
||||
habits: null,
|
||||
levelInfo: null,
|
||||
height: null,
|
||||
reproduction: null,
|
||||
dataType: "生物多样性",
|
||||
addTime: null,
|
||||
addPerson: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询物种基本信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listInfo(this.queryParams).then(response => {
|
||||
this.infoList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
speciesName: null,
|
||||
classification: null,
|
||||
distribution: null,
|
||||
environment: null,
|
||||
habits: null,
|
||||
levelInfo: null,
|
||||
height: null,
|
||||
reproduction: null,
|
||||
remark: null,
|
||||
dataType: null,
|
||||
addTime: null,
|
||||
addPerson: 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 = "添加物种多样性信息";
|
||||
this.form.dataType = "生物多样性";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getInfo(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) {
|
||||
updateInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addInfo(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 delInfo(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('species/info/export', {
|
||||
...this.queryParams
|
||||
}, `info_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
421
god-ui/src/views/species/reserve/index.vue
Normal file
421
god-ui/src/views/species/reserve/index.vue
Normal file
@ -0,0 +1,421 @@
|
||||
<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="reserveName">
|
||||
<el-input
|
||||
v-model="queryParams.reserveName"
|
||||
placeholder="请输入保护区名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="范围" prop="reserveScope">
|
||||
<el-input
|
||||
v-model="queryParams.reserveScope"
|
||||
placeholder="请输入保护区范围"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="保护级别" prop="reserveLevel">
|
||||
<el-input
|
||||
v-model="queryParams.reserveLevel"
|
||||
placeholder="请输入保护级别"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="protection">
|
||||
<el-input
|
||||
v-model="queryParams.protection"
|
||||
placeholder="请输入保护类型"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="保护物种" prop="protectedSpecies">
|
||||
<el-input
|
||||
v-model="queryParams.protectedSpecies"
|
||||
placeholder="请输入保护物种"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="管理单位" prop="chargePerson">
|
||||
<el-input
|
||||
v-model="queryParams.chargePerson"
|
||||
placeholder="请输入管理单位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="联系方式" prop="chargePhone">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.chargePhone"-->
|
||||
<!-- placeholder="请输入联系方式"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="数据类型" prop="dataType">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.dataType"-->
|
||||
<!-- placeholder="请输入数据类型"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="添加人" prop="addPerson">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.addPerson"-->
|
||||
<!-- placeholder="请输入添加人"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="添加时间" prop="addTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.addTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择添加时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="成立时间">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="daterangeSettingTime"-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- range-separator="-"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<!-- </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="['species:reserve: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="['species:reserve: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="['species:reserve: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="['species:reserve:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="reserveList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键" align="center" prop="id" />-->
|
||||
<el-table-column label="保护区名称" align="center" prop="reserveName" />
|
||||
<el-table-column label="保护区范围" align="center" prop="reserveScope" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="保护级别" align="center" prop="reserveLevel" />
|
||||
<el-table-column label="类型" align="center" prop="protection" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="保护物种" align="center" prop="protectedSpecies" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="管理单位" align="center" prop="chargePerson" />
|
||||
<el-table-column label="联系方式" align="center" prop="chargePhone" />
|
||||
<!-- <el-table-column label="备注" align="center" prop="remark" />-->
|
||||
<!-- <el-table-column label="数据类型" align="center" prop="dataType" />-->
|
||||
<!-- <el-table-column label="添加人" align="center" prop="addPerson" />-->
|
||||
<el-table-column label="添加时间" align="center" prop="addTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.addTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="成立时间" align="center" prop="settingTime" width="180">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ parseTime(scope.row.settingTime, '{y}-{m}-{d}') }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<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="['species:reserve:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['species:reserve: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="reserveName">
|
||||
<el-input v-model="form.reserveName" placeholder="请输入保护区名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="范围" prop="reserveScope">
|
||||
<el-input v-model="form.reserveScope" placeholder="请输入保护区范围" type="textarea"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="保护级别" prop="reserveLevel">
|
||||
<el-input v-model="form.reserveLevel" placeholder="请输入保护级别" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="protection">
|
||||
<el-input v-model="form.protection" placeholder="请输入类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="保护物种" prop="protectedSpecies">
|
||||
<el-input v-model="form.protectedSpecies" placeholder="请输入保护物种" />
|
||||
</el-form-item>
|
||||
<el-form-item label="管理单位" prop="chargePerson">
|
||||
<el-input v-model="form.chargePerson" placeholder="请输入管理单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系方式" prop="chargePhone">
|
||||
<el-input v-model="form.chargePhone" placeholder="请输入联系方式" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="备注" prop="remark">-->
|
||||
<!-- <el-input v-model="form.remark" placeholder="请输入备注" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="数据类型" prop="dataType">-->
|
||||
<!-- <el-input v-model="form.dataType" placeholder="请输入数据类型" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="添加人" prop="addPerson">
|
||||
<el-input v-model="form.addPerson" placeholder="请输入添加人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="添加时间" prop="addTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.addTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择添加时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="成立时间" prop="settingTime">-->
|
||||
<!-- <el-date-picker clearable-->
|
||||
<!-- v-model="form.settingTime"-->
|
||||
<!-- type="date"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- placeholder="请选择成立时间">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </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 { listReserve, getReserve, delReserve, addReserve, updateReserve } from "@/api/species/reserve";
|
||||
|
||||
export default {
|
||||
//保护区信息
|
||||
name: "Reserve",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 保护区信息表格数据
|
||||
reserveList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 成立时间时间范围
|
||||
daterangeSettingTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
reserveName: null,
|
||||
reserveScope: null,
|
||||
reserveLevel: null,
|
||||
protection: null,
|
||||
protectedSpecies: null,
|
||||
chargePerson: null,
|
||||
chargePhone: null,
|
||||
dataType: "保护区",
|
||||
addPerson: null,
|
||||
addTime: null,
|
||||
settingTime: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询保护区信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeSettingTime && '' != this.daterangeSettingTime) {
|
||||
this.queryParams.params["beginSettingTime"] = this.daterangeSettingTime[0];
|
||||
this.queryParams.params["endSettingTime"] = this.daterangeSettingTime[1];
|
||||
}
|
||||
listReserve(this.queryParams).then(response => {
|
||||
this.reserveList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
reserveName: null,
|
||||
reserveScope: null,
|
||||
reserveLevel: null,
|
||||
protection: null,
|
||||
protectedSpecies: null,
|
||||
chargePerson: null,
|
||||
chargePhone: null,
|
||||
remark: null,
|
||||
dataType: null,
|
||||
addPerson: null,
|
||||
addTime: null,
|
||||
settingTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeSettingTime = [];
|
||||
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 = "添加保护区信息";
|
||||
this.form.dataType = "保护区";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getReserve(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) {
|
||||
updateReserve(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addReserve(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 delReserve(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('species/reserve/export', {
|
||||
...this.queryParams
|
||||
}, `reserve_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user