feat: 运营系统-景区管理,设备管理
This commit is contained in:
parent
7c9cbb0f1f
commit
0cdfd2b722
@ -0,0 +1,104 @@
|
||||
package com.god.web.controller.hfhEquipment;
|
||||
|
||||
import com.god.hfhEquipment.domain.HfhEquipmentManage;
|
||||
import com.god.hfhEquipment.service.IHfhEquipmentManageService;
|
||||
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.common.utils.poi.ExcelUtil;
|
||||
import com.god.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备管理Controller
|
||||
*
|
||||
* @author liweijie
|
||||
* @date 2024-06-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/hfhEquipment/manage")
|
||||
public class HfhEquipmentManageController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IHfhEquipmentManageService hfhEquipmentManageService;
|
||||
|
||||
/**
|
||||
* 查询设备管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('hfhEquipment:manage:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HfhEquipmentManage hfhEquipmentManage)
|
||||
{
|
||||
startPage();
|
||||
List<HfhEquipmentManage> list = hfhEquipmentManageService.selectHfhEquipmentManageList(hfhEquipmentManage);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('hfhEquipment:manage:export')")
|
||||
@Log(title = "设备管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HfhEquipmentManage hfhEquipmentManage)
|
||||
{
|
||||
List<HfhEquipmentManage> list = hfhEquipmentManageService.selectHfhEquipmentManageList(hfhEquipmentManage);
|
||||
ExcelUtil<HfhEquipmentManage> util = new ExcelUtil<HfhEquipmentManage>(HfhEquipmentManage.class);
|
||||
util.exportExcel(response, list, "设备管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('hfhEquipment:manage:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(hfhEquipmentManageService.selectHfhEquipmentManageById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('hfhEquipment:manage:add')")
|
||||
@Log(title = "设备管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HfhEquipmentManage hfhEquipmentManage)
|
||||
{
|
||||
return toAjax(hfhEquipmentManageService.insertHfhEquipmentManage(hfhEquipmentManage));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('hfhEquipment:manage:edit')")
|
||||
@Log(title = "设备管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HfhEquipmentManage hfhEquipmentManage)
|
||||
{
|
||||
return toAjax(hfhEquipmentManageService.updateHfhEquipmentManage(hfhEquipmentManage));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('hfhEquipment:manage:remove')")
|
||||
@Log(title = "设备管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(hfhEquipmentManageService.deleteHfhEquipmentManageByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
package com.god.web.controller.hfhScenicSpot;
|
||||
|
||||
import com.god.common.utils.uuid.IdUtils;
|
||||
import com.god.hfhScenicSpot.domain.HfhScenicSpotManage;
|
||||
import com.god.hfhScenicSpot.service.IHfhScenicSpotManageService;
|
||||
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.common.utils.poi.ExcelUtil;
|
||||
import com.god.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 景区管理Controller
|
||||
*
|
||||
* @author lwj
|
||||
* @date 2024-06-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/hfhScenicSpot/manage")
|
||||
public class HfhScenicSpotManageController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IHfhScenicSpotManageService hfhScenicSpotManageService;
|
||||
|
||||
/**
|
||||
* 查询景区管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('hfhScenicSpot:manage:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HfhScenicSpotManage hfhScenicSpotManage)
|
||||
{
|
||||
startPage();
|
||||
List<HfhScenicSpotManage> list = hfhScenicSpotManageService.selectHfhScenicSpotManageList(hfhScenicSpotManage);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出景区管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('hfhScenicSpot:manage:export')")
|
||||
@Log(title = "景区管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HfhScenicSpotManage hfhScenicSpotManage)
|
||||
{
|
||||
List<HfhScenicSpotManage> list = hfhScenicSpotManageService.selectHfhScenicSpotManageList(hfhScenicSpotManage);
|
||||
ExcelUtil<HfhScenicSpotManage> util = new ExcelUtil<HfhScenicSpotManage>(HfhScenicSpotManage.class);
|
||||
util.exportExcel(response, list, "景区管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取景区管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('hfhScenicSpot:manage:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(hfhScenicSpotManageService.selectHfhScenicSpotManageById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增景区管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('hfhScenicSpot:manage:add')")
|
||||
@Log(title = "景区管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HfhScenicSpotManage hfhScenicSpotManage)
|
||||
{
|
||||
hfhScenicSpotManage.setId(IdUtils.fastSimpleUUID());
|
||||
return toAjax(hfhScenicSpotManageService.insertHfhScenicSpotManage(hfhScenicSpotManage));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改景区管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('hfhScenicSpot:manage:edit')")
|
||||
@Log(title = "景区管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HfhScenicSpotManage hfhScenicSpotManage)
|
||||
{
|
||||
return toAjax(hfhScenicSpotManageService.updateHfhScenicSpotManage(hfhScenicSpotManage));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除景区管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('hfhScenicSpot:manage:remove')")
|
||||
@Log(title = "景区管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(hfhScenicSpotManageService.deleteHfhScenicSpotManageByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,138 @@
|
||||
package com.god.hfhEquipment.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.god.common.annotation.Excel;
|
||||
import com.god.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 设备管理对象 hfh_equipment_manage
|
||||
*
|
||||
* @author liweijie
|
||||
* @date 2024-06-11
|
||||
*/
|
||||
public class HfhEquipmentManage extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String id;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/** 设备IP */
|
||||
@Excel(name = "设备IP")
|
||||
private String deviceIp;
|
||||
|
||||
/** 设备状态 */
|
||||
@Excel(name = "设备状态")
|
||||
private String deviceStatus;
|
||||
|
||||
/** 位置 */
|
||||
@Excel(name = "位置")
|
||||
private String location;
|
||||
|
||||
/** 图片 */
|
||||
@Excel(name = "图片")
|
||||
private String image;
|
||||
|
||||
/** 录入时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "录入时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date recordTime;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remarks;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setDeviceName(String deviceName)
|
||||
{
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getDeviceName()
|
||||
{
|
||||
return deviceName;
|
||||
}
|
||||
public void setDeviceIp(String deviceIp)
|
||||
{
|
||||
this.deviceIp = deviceIp;
|
||||
}
|
||||
|
||||
public String getDeviceIp()
|
||||
{
|
||||
return deviceIp;
|
||||
}
|
||||
public void setDeviceStatus(String deviceStatus)
|
||||
{
|
||||
this.deviceStatus = deviceStatus;
|
||||
}
|
||||
|
||||
public String getDeviceStatus()
|
||||
{
|
||||
return deviceStatus;
|
||||
}
|
||||
public void setLocation(String location)
|
||||
{
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getLocation()
|
||||
{
|
||||
return location;
|
||||
}
|
||||
public void setImage(String image)
|
||||
{
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public String getImage()
|
||||
{
|
||||
return image;
|
||||
}
|
||||
public void setRecordTime(Date recordTime)
|
||||
{
|
||||
this.recordTime = recordTime;
|
||||
}
|
||||
|
||||
public Date getRecordTime()
|
||||
{
|
||||
return recordTime;
|
||||
}
|
||||
public void setRemarks(String remarks)
|
||||
{
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getRemarks()
|
||||
{
|
||||
return remarks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("deviceName", getDeviceName())
|
||||
.append("deviceIp", getDeviceIp())
|
||||
.append("deviceStatus", getDeviceStatus())
|
||||
.append("location", getLocation())
|
||||
.append("image", getImage())
|
||||
.append("recordTime", getRecordTime())
|
||||
.append("remarks", getRemarks())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.god.hfhEquipment.mapper;
|
||||
|
||||
import com.god.hfhEquipment.domain.HfhEquipmentManage;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备管理Mapper接口
|
||||
*
|
||||
* @author liweijie
|
||||
* @date 2024-06-11
|
||||
*/
|
||||
public interface HfhEquipmentManageMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备管理
|
||||
*
|
||||
* @param id 设备管理主键
|
||||
* @return 设备管理
|
||||
*/
|
||||
public HfhEquipmentManage selectHfhEquipmentManageById(String id);
|
||||
|
||||
/**
|
||||
* 查询设备管理列表
|
||||
*
|
||||
* @param hfhEquipmentManage 设备管理
|
||||
* @return 设备管理集合
|
||||
*/
|
||||
public List<HfhEquipmentManage> selectHfhEquipmentManageList(HfhEquipmentManage hfhEquipmentManage);
|
||||
|
||||
/**
|
||||
* 新增设备管理
|
||||
*
|
||||
* @param hfhEquipmentManage 设备管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHfhEquipmentManage(HfhEquipmentManage hfhEquipmentManage);
|
||||
|
||||
/**
|
||||
* 修改设备管理
|
||||
*
|
||||
* @param hfhEquipmentManage 设备管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHfhEquipmentManage(HfhEquipmentManage hfhEquipmentManage);
|
||||
|
||||
/**
|
||||
* 删除设备管理
|
||||
*
|
||||
* @param id 设备管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHfhEquipmentManageById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除设备管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHfhEquipmentManageByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.god.hfhEquipment.service;
|
||||
|
||||
import com.god.hfhEquipment.domain.HfhEquipmentManage;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备管理Service接口
|
||||
*
|
||||
* @author liweijie
|
||||
* @date 2024-06-11
|
||||
*/
|
||||
public interface IHfhEquipmentManageService
|
||||
{
|
||||
/**
|
||||
* 查询设备管理
|
||||
*
|
||||
* @param id 设备管理主键
|
||||
* @return 设备管理
|
||||
*/
|
||||
public HfhEquipmentManage selectHfhEquipmentManageById(String id);
|
||||
|
||||
/**
|
||||
* 查询设备管理列表
|
||||
*
|
||||
* @param hfhEquipmentManage 设备管理
|
||||
* @return 设备管理集合
|
||||
*/
|
||||
public List<HfhEquipmentManage> selectHfhEquipmentManageList(HfhEquipmentManage hfhEquipmentManage);
|
||||
|
||||
/**
|
||||
* 新增设备管理
|
||||
*
|
||||
* @param hfhEquipmentManage 设备管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHfhEquipmentManage(HfhEquipmentManage hfhEquipmentManage);
|
||||
|
||||
/**
|
||||
* 修改设备管理
|
||||
*
|
||||
* @param hfhEquipmentManage 设备管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHfhEquipmentManage(HfhEquipmentManage hfhEquipmentManage);
|
||||
|
||||
/**
|
||||
* 批量删除设备管理
|
||||
*
|
||||
* @param ids 需要删除的设备管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHfhEquipmentManageByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除设备管理信息
|
||||
*
|
||||
* @param id 设备管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHfhEquipmentManageById(String id);
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package com.god.hfhEquipment.service.impl;
|
||||
|
||||
import com.god.common.utils.uuid.IdUtils;
|
||||
import com.god.hfhEquipment.domain.HfhEquipmentManage;
|
||||
import com.god.hfhEquipment.mapper.HfhEquipmentManageMapper;
|
||||
import com.god.hfhEquipment.service.IHfhEquipmentManageService;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 设备管理Service业务层处理
|
||||
*
|
||||
* @author liweijie
|
||||
* @date 2024-06-11
|
||||
*/
|
||||
@Service
|
||||
public class HfhEquipmentManageServiceImpl implements IHfhEquipmentManageService
|
||||
{
|
||||
@Autowired
|
||||
private HfhEquipmentManageMapper hfhEquipmentManageMapper;
|
||||
|
||||
/**
|
||||
* 查询设备管理
|
||||
*
|
||||
* @param id 设备管理主键
|
||||
* @return 设备管理
|
||||
*/
|
||||
@Override
|
||||
public HfhEquipmentManage selectHfhEquipmentManageById(String id)
|
||||
{
|
||||
return hfhEquipmentManageMapper.selectHfhEquipmentManageById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备管理列表
|
||||
*
|
||||
* @param hfhEquipmentManage 设备管理
|
||||
* @return 设备管理
|
||||
*/
|
||||
@Override
|
||||
public List<HfhEquipmentManage> selectHfhEquipmentManageList(HfhEquipmentManage hfhEquipmentManage)
|
||||
{
|
||||
return hfhEquipmentManageMapper.selectHfhEquipmentManageList(hfhEquipmentManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备管理
|
||||
*
|
||||
* @param hfhEquipmentManage 设备管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertHfhEquipmentManage(HfhEquipmentManage hfhEquipmentManage)
|
||||
{
|
||||
hfhEquipmentManage.setId(IdUtils.fastSimpleUUID());
|
||||
return hfhEquipmentManageMapper.insertHfhEquipmentManage(hfhEquipmentManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备管理
|
||||
*
|
||||
* @param hfhEquipmentManage 设备管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateHfhEquipmentManage(HfhEquipmentManage hfhEquipmentManage)
|
||||
{
|
||||
return hfhEquipmentManageMapper.updateHfhEquipmentManage(hfhEquipmentManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备管理
|
||||
*
|
||||
* @param ids 需要删除的设备管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHfhEquipmentManageByIds(String[] ids)
|
||||
{
|
||||
return hfhEquipmentManageMapper.deleteHfhEquipmentManageByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备管理信息
|
||||
*
|
||||
* @param id 设备管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHfhEquipmentManageById(String id)
|
||||
{
|
||||
return hfhEquipmentManageMapper.deleteHfhEquipmentManageById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,138 @@
|
||||
package com.god.hfhScenicSpot.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.god.common.annotation.Excel;
|
||||
import com.god.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 景区管理对象 hfh_scenic_spot_manage
|
||||
*
|
||||
* @author lwj
|
||||
* @date 2024-06-11
|
||||
*/
|
||||
public class HfhScenicSpotManage extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private String id;
|
||||
|
||||
/** 公园名称 */
|
||||
@Excel(name = "公园名称")
|
||||
private String parkName;
|
||||
|
||||
/** 位置 */
|
||||
@Excel(name = "位置")
|
||||
private String location;
|
||||
|
||||
/** 捕捉视频对象类型 */
|
||||
@Excel(name = "捕捉视频对象类型")
|
||||
private String capturedVideoObjectType;
|
||||
|
||||
/** 捕捉图片 */
|
||||
@Excel(name = "捕捉图片")
|
||||
private String capturePicture;
|
||||
|
||||
/** 视频 */
|
||||
@Excel(name = "视频")
|
||||
private String video;
|
||||
|
||||
/** 时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date captureTime;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remarks;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setParkName(String parkName)
|
||||
{
|
||||
this.parkName = parkName;
|
||||
}
|
||||
|
||||
public String getParkName()
|
||||
{
|
||||
return parkName;
|
||||
}
|
||||
public void setLocation(String location)
|
||||
{
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getLocation()
|
||||
{
|
||||
return location;
|
||||
}
|
||||
public void setCapturedVideoObjectType(String capturedVideoObjectType)
|
||||
{
|
||||
this.capturedVideoObjectType = capturedVideoObjectType;
|
||||
}
|
||||
|
||||
public String getCapturedVideoObjectType()
|
||||
{
|
||||
return capturedVideoObjectType;
|
||||
}
|
||||
public void setCapturePicture(String capturePicture)
|
||||
{
|
||||
this.capturePicture = capturePicture;
|
||||
}
|
||||
|
||||
public String getCapturePicture()
|
||||
{
|
||||
return capturePicture;
|
||||
}
|
||||
public void setVideo(String video)
|
||||
{
|
||||
this.video = video;
|
||||
}
|
||||
|
||||
public String getVideo()
|
||||
{
|
||||
return video;
|
||||
}
|
||||
public void setCaptureTime(Date captureTime)
|
||||
{
|
||||
this.captureTime = captureTime;
|
||||
}
|
||||
|
||||
public Date getCaptureTime()
|
||||
{
|
||||
return captureTime;
|
||||
}
|
||||
public void setRemarks(String remarks)
|
||||
{
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getRemarks()
|
||||
{
|
||||
return remarks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("parkName", getParkName())
|
||||
.append("location", getLocation())
|
||||
.append("capturedVideoObjectType", getCapturedVideoObjectType())
|
||||
.append("capturePicture", getCapturePicture())
|
||||
.append("video", getVideo())
|
||||
.append("captureTime", getCaptureTime())
|
||||
.append("remarks", getRemarks())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.god.hfhScenicSpot.mapper;
|
||||
|
||||
import com.god.hfhScenicSpot.domain.HfhScenicSpotManage;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 景区管理Mapper接口
|
||||
*
|
||||
* @author lwj
|
||||
* @date 2024-06-11
|
||||
*/
|
||||
public interface HfhScenicSpotManageMapper
|
||||
{
|
||||
/**
|
||||
* 查询景区管理
|
||||
*
|
||||
* @param id 景区管理主键
|
||||
* @return 景区管理
|
||||
*/
|
||||
public HfhScenicSpotManage selectHfhScenicSpotManageById(String id);
|
||||
|
||||
/**
|
||||
* 查询景区管理列表
|
||||
*
|
||||
* @param hfhScenicSpotManage 景区管理
|
||||
* @return 景区管理集合
|
||||
*/
|
||||
public List<HfhScenicSpotManage> selectHfhScenicSpotManageList(HfhScenicSpotManage hfhScenicSpotManage);
|
||||
|
||||
/**
|
||||
* 新增景区管理
|
||||
*
|
||||
* @param hfhScenicSpotManage 景区管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHfhScenicSpotManage(HfhScenicSpotManage hfhScenicSpotManage);
|
||||
|
||||
/**
|
||||
* 修改景区管理
|
||||
*
|
||||
* @param hfhScenicSpotManage 景区管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHfhScenicSpotManage(HfhScenicSpotManage hfhScenicSpotManage);
|
||||
|
||||
/**
|
||||
* 删除景区管理
|
||||
*
|
||||
* @param id 景区管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHfhScenicSpotManageById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除景区管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHfhScenicSpotManageByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.god.hfhScenicSpot.service;
|
||||
|
||||
import com.god.hfhScenicSpot.domain.HfhScenicSpotManage;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 景区管理Service接口
|
||||
*
|
||||
* @author lwj
|
||||
* @date 2024-06-11
|
||||
*/
|
||||
public interface IHfhScenicSpotManageService
|
||||
{
|
||||
/**
|
||||
* 查询景区管理
|
||||
*
|
||||
* @param id 景区管理主键
|
||||
* @return 景区管理
|
||||
*/
|
||||
public HfhScenicSpotManage selectHfhScenicSpotManageById(String id);
|
||||
|
||||
/**
|
||||
* 查询景区管理列表
|
||||
*
|
||||
* @param hfhScenicSpotManage 景区管理
|
||||
* @return 景区管理集合
|
||||
*/
|
||||
public List<HfhScenicSpotManage> selectHfhScenicSpotManageList(HfhScenicSpotManage hfhScenicSpotManage);
|
||||
|
||||
/**
|
||||
* 新增景区管理
|
||||
*
|
||||
* @param hfhScenicSpotManage 景区管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHfhScenicSpotManage(HfhScenicSpotManage hfhScenicSpotManage);
|
||||
|
||||
/**
|
||||
* 修改景区管理
|
||||
*
|
||||
* @param hfhScenicSpotManage 景区管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHfhScenicSpotManage(HfhScenicSpotManage hfhScenicSpotManage);
|
||||
|
||||
/**
|
||||
* 批量删除景区管理
|
||||
*
|
||||
* @param ids 需要删除的景区管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHfhScenicSpotManageByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除景区管理信息
|
||||
*
|
||||
* @param id 景区管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHfhScenicSpotManageById(String id);
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package com.god.hfhScenicSpot.service.impl;
|
||||
|
||||
import com.god.common.utils.uuid.IdUtils;
|
||||
import com.god.hfhScenicSpot.domain.HfhScenicSpotManage;
|
||||
import com.god.hfhScenicSpot.mapper.HfhScenicSpotManageMapper;
|
||||
import com.god.hfhScenicSpot.service.IHfhScenicSpotManageService;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 景区管理Service业务层处理
|
||||
*
|
||||
* @author lwj
|
||||
* @date 2024-06-11
|
||||
*/
|
||||
@Service
|
||||
public class HfhScenicSpotManageServiceImpl implements IHfhScenicSpotManageService
|
||||
{
|
||||
@Autowired
|
||||
private HfhScenicSpotManageMapper hfhScenicSpotManageMapper;
|
||||
|
||||
/**
|
||||
* 查询景区管理
|
||||
*
|
||||
* @param id 景区管理主键
|
||||
* @return 景区管理
|
||||
*/
|
||||
@Override
|
||||
public HfhScenicSpotManage selectHfhScenicSpotManageById(String id)
|
||||
{
|
||||
return hfhScenicSpotManageMapper.selectHfhScenicSpotManageById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询景区管理列表
|
||||
*
|
||||
* @param hfhScenicSpotManage 景区管理
|
||||
* @return 景区管理
|
||||
*/
|
||||
@Override
|
||||
public List<HfhScenicSpotManage> selectHfhScenicSpotManageList(HfhScenicSpotManage hfhScenicSpotManage)
|
||||
{
|
||||
return hfhScenicSpotManageMapper.selectHfhScenicSpotManageList(hfhScenicSpotManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增景区管理
|
||||
*
|
||||
* @param hfhScenicSpotManage 景区管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertHfhScenicSpotManage(HfhScenicSpotManage hfhScenicSpotManage)
|
||||
{
|
||||
hfhScenicSpotManage.setId(IdUtils.simpleUUID());
|
||||
return hfhScenicSpotManageMapper.insertHfhScenicSpotManage(hfhScenicSpotManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改景区管理
|
||||
*
|
||||
* @param hfhScenicSpotManage 景区管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateHfhScenicSpotManage(HfhScenicSpotManage hfhScenicSpotManage)
|
||||
{
|
||||
return hfhScenicSpotManageMapper.updateHfhScenicSpotManage(hfhScenicSpotManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除景区管理
|
||||
*
|
||||
* @param ids 需要删除的景区管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHfhScenicSpotManageByIds(String[] ids)
|
||||
{
|
||||
return hfhScenicSpotManageMapper.deleteHfhScenicSpotManageByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除景区管理信息
|
||||
*
|
||||
* @param id 景区管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHfhScenicSpotManageById(String id)
|
||||
{
|
||||
return hfhScenicSpotManageMapper.deleteHfhScenicSpotManageById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
<?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.hfhEquipment.mapper.HfhEquipmentManageMapper">
|
||||
|
||||
<resultMap type="HfhEquipmentManage" id="HfhEquipmentManageResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
<result property="deviceIp" column="device_ip" />
|
||||
<result property="deviceStatus" column="device_status" />
|
||||
<result property="location" column="location" />
|
||||
<result property="image" column="image" />
|
||||
<result property="recordTime" column="record_time" />
|
||||
<result property="remarks" column="remarks" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHfhEquipmentManageVo">
|
||||
select id, device_name, device_ip, device_status, location, image, record_time, remarks from hfh_equipment_manage
|
||||
</sql>
|
||||
|
||||
<select id="selectHfhEquipmentManageList" parameterType="HfhEquipmentManage" resultMap="HfhEquipmentManageResult">
|
||||
<include refid="selectHfhEquipmentManageVo"/>
|
||||
<where>
|
||||
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
|
||||
<if test="deviceIp != null and deviceIp != ''"> and device_ip like concat('%', #{deviceIp}, '%')</if>
|
||||
<if test="deviceStatus != null and deviceStatus != ''"> and device_status like concat('%', #{deviceStatus}, '%')</if>
|
||||
<if test="location != null and location != ''"> and location like concat('%', #{location}, '%')</if>
|
||||
<if test="image != null and image != ''"> and image like concat('%', #{image}, '%')</if>
|
||||
<if test="params.beginRecordTime != null and params.beginRecordTime != '' and params.endRecordTime != null and params.endRecordTime != ''"> and record_time between #{params.beginRecordTime} and #{params.endRecordTime}</if>
|
||||
<if test="remarks != null and remarks != ''"> and remarks like concat('%', #{remarks}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHfhEquipmentManageById" parameterType="String" resultMap="HfhEquipmentManageResult">
|
||||
<include refid="selectHfhEquipmentManageVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertHfhEquipmentManage" parameterType="HfhEquipmentManage">
|
||||
insert into hfh_equipment_manage
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="deviceName != null">device_name,</if>
|
||||
<if test="deviceIp != null">device_ip,</if>
|
||||
<if test="deviceStatus != null">device_status,</if>
|
||||
<if test="location != null">location,</if>
|
||||
<if test="image != null">image,</if>
|
||||
<if test="recordTime != null">record_time,</if>
|
||||
<if test="remarks != null">remarks,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="deviceName != null">#{deviceName},</if>
|
||||
<if test="deviceIp != null">#{deviceIp},</if>
|
||||
<if test="deviceStatus != null">#{deviceStatus},</if>
|
||||
<if test="location != null">#{location},</if>
|
||||
<if test="image != null">#{image},</if>
|
||||
<if test="recordTime != null">#{recordTime},</if>
|
||||
<if test="remarks != null">#{remarks},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHfhEquipmentManage" parameterType="HfhEquipmentManage">
|
||||
update hfh_equipment_manage
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="deviceName != null">device_name = #{deviceName},</if>
|
||||
<if test="deviceIp != null">device_ip = #{deviceIp},</if>
|
||||
<if test="deviceStatus != null">device_status = #{deviceStatus},</if>
|
||||
<if test="location != null">location = #{location},</if>
|
||||
<if test="image != null">image = #{image},</if>
|
||||
<if test="recordTime != null">record_time = #{recordTime},</if>
|
||||
<if test="remarks != null">remarks = #{remarks},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHfhEquipmentManageById" parameterType="String">
|
||||
delete from hfh_equipment_manage where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHfhEquipmentManageByIds" parameterType="String">
|
||||
delete from hfh_equipment_manage where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,83 @@
|
||||
<?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.hfhScenicSpot.mapper.HfhScenicSpotManageMapper">
|
||||
|
||||
<resultMap type="HfhScenicSpotManage" id="HfhScenicSpotManageResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="parkName" column="park_name" />
|
||||
<result property="location" column="location" />
|
||||
<result property="capturedVideoObjectType" column="captured_video_object_type" />
|
||||
<result property="capturePicture" column="capture_picture" />
|
||||
<result property="captureTime" column="capture_time" />
|
||||
<result property="remarks" column="remarks" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHfhScenicSpotManageVo">
|
||||
select id, park_name, location, captured_video_object_type, capture_picture, capture_time, remarks from hfh_scenic_spot_manage
|
||||
</sql>
|
||||
|
||||
<select id="selectHfhScenicSpotManageList" parameterType="HfhScenicSpotManage" resultMap="HfhScenicSpotManageResult">
|
||||
<include refid="selectHfhScenicSpotManageVo"/>
|
||||
<where>
|
||||
<if test="parkName != null and parkName != ''"> and park_name like concat('%', #{parkName}, '%')</if>
|
||||
<if test="location != null and location != ''"> and location like concat('%', #{location}, '%')</if>
|
||||
<if test="capturedVideoObjectType != null and capturedVideoObjectType != ''"> and captured_video_object_type like concat('%', #{capturedVideoObjectType}, '%')</if>
|
||||
<if test="capturePicture != null and capturePicture != ''"> and capture_picture like concat('%', #{capturePicture}, '%')</if>
|
||||
<if test="params.beginCaptureTime != null and params.beginCaptureTime != '' and params.endCaptureTime != null and params.endCaptureTime != ''"> and capture_time between #{params.beginCaptureTime} and #{params.endCaptureTime}</if>
|
||||
<if test="remarks != null and remarks != ''"> and remarks like concat('%', #{remarks}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHfhScenicSpotManageById" parameterType="String" resultMap="HfhScenicSpotManageResult">
|
||||
<include refid="selectHfhScenicSpotManageVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertHfhScenicSpotManage" parameterType="HfhScenicSpotManage">
|
||||
insert into hfh_scenic_spot_manage
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="parkName != null">park_name,</if>
|
||||
<if test="location != null">location,</if>
|
||||
<if test="capturedVideoObjectType != null">captured_video_object_type,</if>
|
||||
<if test="capturePicture != null">capture_picture,</if>
|
||||
<if test="captureTime != null">capture_time,</if>
|
||||
<if test="remarks != null">remarks,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="parkName != null">#{parkName},</if>
|
||||
<if test="location != null">#{location},</if>
|
||||
<if test="capturedVideoObjectType != null">#{capturedVideoObjectType},</if>
|
||||
<if test="capturePicture != null">#{capturePicture},</if>
|
||||
<if test="captureTime != null">#{captureTime},</if>
|
||||
<if test="remarks != null">#{remarks},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHfhScenicSpotManage" parameterType="HfhScenicSpotManage">
|
||||
update hfh_scenic_spot_manage
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="parkName != null">park_name = #{parkName},</if>
|
||||
<if test="location != null">location = #{location},</if>
|
||||
<if test="capturedVideoObjectType != null">captured_video_object_type = #{capturedVideoObjectType},</if>
|
||||
<if test="capturePicture != null">capture_picture = #{capturePicture},</if>
|
||||
<if test="captureTime != null">capture_time = #{captureTime},</if>
|
||||
<if test="remarks != null">remarks = #{remarks},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHfhScenicSpotManageById" parameterType="String">
|
||||
delete from hfh_scenic_spot_manage where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHfhScenicSpotManageByIds" parameterType="String">
|
||||
delete from hfh_scenic_spot_manage where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
44
god-ui/src/api/hfhEquipment/manage.js
Normal file
44
god-ui/src/api/hfhEquipment/manage.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询设备管理列表
|
||||
export function listManage(query) {
|
||||
return request({
|
||||
url: '/hfhEquipment/manage/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询设备管理详细
|
||||
export function getManage(id) {
|
||||
return request({
|
||||
url: '/hfhEquipment/manage/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增设备管理
|
||||
export function addManage(data) {
|
||||
return request({
|
||||
url: '/hfhEquipment/manage',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改设备管理
|
||||
export function updateManage(data) {
|
||||
return request({
|
||||
url: '/hfhEquipment/manage',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除设备管理
|
||||
export function delManage(id) {
|
||||
return request({
|
||||
url: '/hfhEquipment/manage/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
44
god-ui/src/api/hfhScenicSpot/manage.js
Normal file
44
god-ui/src/api/hfhScenicSpot/manage.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询景区管理列表
|
||||
export function listManage(query) {
|
||||
return request({
|
||||
url: '/hfhScenicSpot/manage/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询景区管理详细
|
||||
export function getManage(id) {
|
||||
return request({
|
||||
url: '/hfhScenicSpot/manage/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增景区管理
|
||||
export function addManage(data) {
|
||||
return request({
|
||||
url: '/hfhScenicSpot/manage',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改景区管理
|
||||
export function updateManage(data) {
|
||||
return request({
|
||||
url: '/hfhScenicSpot/manage',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除景区管理
|
||||
export function delManage(id) {
|
||||
return request({
|
||||
url: '/hfhScenicSpot/manage/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
351
god-ui/src/views/hfhEquipment/manage/index.vue
Normal file
351
god-ui/src/views/hfhEquipment/manage/index.vue
Normal file
@ -0,0 +1,351 @@
|
||||
<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="deviceName">
|
||||
<el-input
|
||||
v-model="queryParams.deviceName"
|
||||
placeholder="请输入设备名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备IP" prop="deviceIp">
|
||||
<el-input
|
||||
v-model="queryParams.deviceIp"
|
||||
placeholder="请输入设备IP"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备状态" prop="deviceStatus">
|
||||
<el-select v-model="queryParams.deviceStatus" placeholder="请选择设备状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.hfh_equipment_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="位置" prop="location">
|
||||
<el-input
|
||||
v-model="queryParams.location"
|
||||
placeholder="请输入位置"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="录入时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeRecordTime"
|
||||
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="['hfhEquipment:manage: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="['hfhEquipment:manage: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="['hfhEquipment:manage: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="['hfhEquipment:manage:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="manageList" @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="deviceName" />
|
||||
<el-table-column label="设备IP" align="center" prop="deviceIp" />
|
||||
<el-table-column label="设备状态" align="center" prop="deviceStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.hfh_equipment_status" :value="scope.row.deviceStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="位置" align="center" prop="location" />
|
||||
<el-table-column label="图片" align="center" prop="image" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.image" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="录入时间" align="center" prop="recordTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.recordTime, '{y}-{m}-{d} {h}:{m}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remarks" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['hfhEquipment:manage:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['hfhEquipment:manage: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="deviceName">
|
||||
<el-input v-model="form.deviceName" placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备IP" prop="deviceIp">
|
||||
<el-input v-model="form.deviceIp" placeholder="请输入设备IP" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备状态" prop="deviceStatus">
|
||||
<el-select v-model="form.deviceStatus" placeholder="请选择设备状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.hfh_equipment_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="位置" prop="location">
|
||||
<el-input v-model="form.location" placeholder="请输入位置" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图片" prop="image">
|
||||
<image-upload v-model="form.image"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="录入时间" prop="recordTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.recordTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd hh:mm:ss"
|
||||
placeholder="请选择录入时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remarks">
|
||||
<el-input v-model="form.remarks" 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 { listManage, getManage, delManage, addManage, updateManage } from "@/api/hfhEquipment/manage";
|
||||
|
||||
export default {
|
||||
name: "Manage",
|
||||
dicts: ['hfh_equipment_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 设备管理表格数据
|
||||
manageList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 备注时间范围
|
||||
daterangeRecordTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
deviceName: null,
|
||||
deviceIp: null,
|
||||
deviceStatus: null,
|
||||
location: null,
|
||||
image: null,
|
||||
recordTime: null,
|
||||
remarks: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询设备管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeRecordTime && '' != this.daterangeRecordTime) {
|
||||
this.queryParams.params["beginRecordTime"] = this.daterangeRecordTime[0];
|
||||
this.queryParams.params["endRecordTime"] = this.daterangeRecordTime[1];
|
||||
}
|
||||
listManage(this.queryParams).then(response => {
|
||||
this.manageList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
deviceName: null,
|
||||
deviceIp: null,
|
||||
deviceStatus: null,
|
||||
location: null,
|
||||
image: null,
|
||||
recordTime: null,
|
||||
remarks: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeRecordTime = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加设备管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getManage(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) {
|
||||
updateManage(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addManage(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 delManage(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('hfhEquipment/manage/export', {
|
||||
...this.queryParams
|
||||
}, `manage_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
323
god-ui/src/views/hfhScenicSpot/manage/index.vue
Normal file
323
god-ui/src/views/hfhScenicSpot/manage/index.vue
Normal file
@ -0,0 +1,323 @@
|
||||
<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="parkName">
|
||||
<el-input
|
||||
v-model="queryParams.parkName"
|
||||
placeholder="请输入公园名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="位置" prop="location">
|
||||
<el-input
|
||||
v-model="queryParams.location"
|
||||
placeholder="请输入位置"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="捕捉对象" prop="capturedVideoObjectType">
|
||||
<el-input
|
||||
v-model="queryParams.capturedVideoObjectType"
|
||||
placeholder="请输入捕捉对象"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeCaptureTime"
|
||||
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="['hfhScenicSpot:manage: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="['hfhScenicSpot:manage: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="['hfhScenicSpot:manage: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="['hfhScenicSpot:manage:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="manageList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="id" align="center" prop="id" /> -->
|
||||
<el-table-column label="公园名称" align="center" prop="parkName" />
|
||||
<el-table-column label="位置" align="center" prop="location" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="捕捉对象" align="center" prop="capturedVideoObjectType" />
|
||||
<el-table-column label="捕捉图片" align="center" prop="capturePicture" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.capturePicture" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="时间" align="center" prop="captureTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.captureTime, '{y}-{m}-{d} {h}:{m}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remarks" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['hfhScenicSpot:manage:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['hfhScenicSpot:manage: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="130px">
|
||||
<el-form-item label="公园名称" prop="parkName">
|
||||
<el-input v-model="form.parkName" placeholder="请输入公园名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="位置" prop="location">
|
||||
<el-input v-model="form.location" placeholder="请输入位置" />
|
||||
</el-form-item>
|
||||
<el-form-item label="捕捉对象" prop="capturedVideoObjectType">
|
||||
<el-input v-model="form.capturedVideoObjectType" placeholder="请输入捕捉视频对象类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="捕捉图片" prop="capturePicture">
|
||||
<image-upload v-model="form.capturePicture"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间" prop="captureTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.captureTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd hh:mm:ss"
|
||||
placeholder="请选择时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remarks">
|
||||
<el-input v-model="form.remarks" 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 { listManage, getManage, delManage, addManage, updateManage } from "@/api/hfhScenicSpot/manage";
|
||||
|
||||
export default {
|
||||
name: "Manage",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 景区管理表格数据
|
||||
manageList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 备注时间范围
|
||||
daterangeCaptureTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
parkName: null,
|
||||
location: null,
|
||||
capturedVideoObjectType: null,
|
||||
capturePicture: null,
|
||||
captureTime: null,
|
||||
remarks: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询景区管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeCaptureTime && '' != this.daterangeCaptureTime) {
|
||||
this.queryParams.params["beginCaptureTime"] = this.daterangeCaptureTime[0];
|
||||
this.queryParams.params["endCaptureTime"] = this.daterangeCaptureTime[1];
|
||||
}
|
||||
listManage(this.queryParams).then(response => {
|
||||
this.manageList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
parkName: null,
|
||||
location: null,
|
||||
capturedVideoObjectType: null,
|
||||
capturePicture: null,
|
||||
captureTime: null,
|
||||
remarks: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeCaptureTime = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加景区管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getManage(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) {
|
||||
updateManage(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addManage(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 delManage(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('hfhScenicSpot/manage/export', {
|
||||
...this.queryParams
|
||||
}, `manage_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user