Browse Source

1.疫苗信息功能,牲畜类型和疫苗类型联动选择

2.疫苗预约页面
master
ma-zhongxu 3 weeks ago
parent
commit
9d9ec5ee63
  1. 119
      chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysVacInfoController.java
  2. 104
      chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysVacRegistrationController.java
  3. 223
      chenhai-system/src/main/java/com/chenhai/system/domain/SysVacInfo.java
  4. 227
      chenhai-system/src/main/java/com/chenhai/system/domain/SysVacRegistration.java
  5. 61
      chenhai-system/src/main/java/com/chenhai/system/mapper/SysVacInfoMapper.java
  6. 61
      chenhai-system/src/main/java/com/chenhai/system/mapper/SysVacRegistrationMapper.java
  7. 61
      chenhai-system/src/main/java/com/chenhai/system/service/ISysVacInfoService.java
  8. 61
      chenhai-system/src/main/java/com/chenhai/system/service/ISysVacRegistrationService.java
  9. 96
      chenhai-system/src/main/java/com/chenhai/system/service/impl/SysVacInfoServiceImpl.java
  10. 96
      chenhai-system/src/main/java/com/chenhai/system/service/impl/SysVacRegistrationServiceImpl.java
  11. 2
      chenhai-system/src/main/resources/mapper/system/SysVacCategoryMapper.xml
  12. 129
      chenhai-system/src/main/resources/mapper/system/SysVacInfoMapper.xml
  13. 130
      chenhai-system/src/main/resources/mapper/system/SysVacRegistrationMapper.xml
  14. 44
      chenhai-ui/src/api/system/VacRegistration.js
  15. 53
      chenhai-ui/src/api/system/vacInfo.js
  16. 1
      chenhai-ui/src/assets/icons/svg/vacInfo.svg
  17. 485
      chenhai-ui/src/views/system/VacRegistration/index.vue
  18. 658
      chenhai-ui/src/views/system/vacInfo/index.vue

119
chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysVacInfoController.java

@ -0,0 +1,119 @@
package com.chenhai.web.controller.system;
import java.util.List;
import com.chenhai.system.domain.SysVacCategory;
import com.chenhai.system.service.ISysVacCategoryService;
import jakarta.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.chenhai.common.annotation.Log;
import com.chenhai.common.core.controller.BaseController;
import com.chenhai.common.core.domain.AjaxResult;
import com.chenhai.common.enums.BusinessType;
import com.chenhai.system.domain.SysVacInfo;
import com.chenhai.system.service.ISysVacInfoService;
import com.chenhai.common.utils.poi.ExcelUtil;
import com.chenhai.common.core.page.TableDataInfo;
/**
* 疫苗信息Controller
*
* @author ruoyi
* @date 2026-01-28
*/
@RestController
@RequestMapping("/system/vacInfo")
public class SysVacInfoController extends BaseController
{
@Autowired
private ISysVacInfoService sysVacInfoService;
@Autowired
private ISysVacCategoryService sysVacCategoryService;
/**
* 查询疫苗信息列表
*/
@PreAuthorize("@ss.hasPermi('system:vacInfo:list')")
@GetMapping("/list")
public TableDataInfo list(SysVacInfo sysVacInfo)
{
startPage();
List<SysVacInfo> list = sysVacInfoService.selectSysVacInfoList(sysVacInfo);
return getDataTable(list);
}
@PreAuthorize("@ss.hasPermi('system:vacInfo:list')")
@GetMapping("/getVacCategorylist")
public TableDataInfo list(SysVacCategory sysVacCategory)
{
startPage();
List<SysVacCategory> list = sysVacCategoryService.selectSysVacCategoryList(sysVacCategory);
return getDataTable(list);
}
/**
* 导出疫苗信息列表
*/
@PreAuthorize("@ss.hasPermi('system:vacInfo:export')")
@Log(title = "疫苗信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysVacInfo sysVacInfo)
{
List<SysVacInfo> list = sysVacInfoService.selectSysVacInfoList(sysVacInfo);
ExcelUtil<SysVacInfo> util = new ExcelUtil<SysVacInfo>(SysVacInfo.class);
util.exportExcel(response, list, "疫苗信息数据");
}
/**
* 获取疫苗信息详细信息
*/
@PreAuthorize("@ss.hasPermi('system:vacInfo:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sysVacInfoService.selectSysVacInfoById(id));
}
/**
* 新增疫苗信息
*/
@PreAuthorize("@ss.hasPermi('system:vacInfo:add')")
@Log(title = "疫苗信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysVacInfo sysVacInfo)
{
return toAjax(sysVacInfoService.insertSysVacInfo(sysVacInfo));
}
/**
* 修改疫苗信息
*/
@PreAuthorize("@ss.hasPermi('system:vacInfo:edit')")
@Log(title = "疫苗信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysVacInfo sysVacInfo)
{
return toAjax(sysVacInfoService.updateSysVacInfo(sysVacInfo));
}
/**
* 删除疫苗信息
*/
@PreAuthorize("@ss.hasPermi('system:vacInfo:remove')")
@Log(title = "疫苗信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sysVacInfoService.deleteSysVacInfoByIds(ids));
}
}

104
chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysVacRegistrationController.java

@ -0,0 +1,104 @@
package com.chenhai.web.controller.system;
import java.util.List;
import jakarta.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.chenhai.common.annotation.Log;
import com.chenhai.common.core.controller.BaseController;
import com.chenhai.common.core.domain.AjaxResult;
import com.chenhai.common.enums.BusinessType;
import com.chenhai.system.domain.SysVacRegistration;
import com.chenhai.system.service.ISysVacRegistrationService;
import com.chenhai.common.utils.poi.ExcelUtil;
import com.chenhai.common.core.page.TableDataInfo;
/**
* 疫苗预约Controller
*
* @author ruoyi
* @date 2026-01-28
*/
@RestController
@RequestMapping("/system/VacRegistration")
public class SysVacRegistrationController extends BaseController
{
@Autowired
private ISysVacRegistrationService sysVacRegistrationService;
/**
* 查询疫苗预约列表
*/
@PreAuthorize("@ss.hasPermi('system:VacRegistration:list')")
@GetMapping("/list")
public TableDataInfo list(SysVacRegistration sysVacRegistration)
{
startPage();
List<SysVacRegistration> list = sysVacRegistrationService.selectSysVacRegistrationList(sysVacRegistration);
return getDataTable(list);
}
/**
* 导出疫苗预约列表
*/
@PreAuthorize("@ss.hasPermi('system:VacRegistration:export')")
@Log(title = "疫苗预约", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysVacRegistration sysVacRegistration)
{
List<SysVacRegistration> list = sysVacRegistrationService.selectSysVacRegistrationList(sysVacRegistration);
ExcelUtil<SysVacRegistration> util = new ExcelUtil<SysVacRegistration>(SysVacRegistration.class);
util.exportExcel(response, list, "疫苗预约数据");
}
/**
* 获取疫苗预约详细信息
*/
@PreAuthorize("@ss.hasPermi('system:VacRegistration:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sysVacRegistrationService.selectSysVacRegistrationById(id));
}
/**
* 新增疫苗预约
*/
@PreAuthorize("@ss.hasPermi('system:VacRegistration:add')")
@Log(title = "疫苗预约", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysVacRegistration sysVacRegistration)
{
return toAjax(sysVacRegistrationService.insertSysVacRegistration(sysVacRegistration));
}
/**
* 修改疫苗预约
*/
@PreAuthorize("@ss.hasPermi('system:VacRegistration:edit')")
@Log(title = "疫苗预约", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysVacRegistration sysVacRegistration)
{
return toAjax(sysVacRegistrationService.updateSysVacRegistration(sysVacRegistration));
}
/**
* 删除疫苗预约
*/
@PreAuthorize("@ss.hasPermi('system:VacRegistration:remove')")
@Log(title = "疫苗预约", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sysVacRegistrationService.deleteSysVacRegistrationByIds(ids));
}
}

223
chenhai-system/src/main/java/com/chenhai/system/domain/SysVacInfo.java

@ -0,0 +1,223 @@
package com.chenhai.system.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.chenhai.common.annotation.Excel;
import com.chenhai.common.core.domain.BaseEntity;
/**
* 疫苗信息对象 sys_vac_info
*
* @author ruoyi
* @date 2026-01-28
*/
public class SysVacInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 疫苗信息ID */
private Long id;
/** 疫苗标题 */
@Excel(name = "疫苗标题")
private String title;
/** 牲畜类型 */
@Excel(name = "牲畜类型")
private String livestockType;
/** 疫苗类型(字典:vaccine_type) */
@Excel(name = "疫苗类型", readConverterExp = "字=典:vaccine_type")
private String vaccineType;
/** 详细描述 */
@Excel(name = "详细描述")
private String description;
/** 接种日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "接种日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date vaccinationDate;
/** 接种地点 */
@Excel(name = "接种地点")
private String vaccinationLocation;
/** 可预约数量 */
@Excel(name = "可预约数量")
private Long availableSlots;
/** 总数量 */
@Excel(name = "总数量")
private Long totalSlots;
/** 状态:1-进行中 2-已结束 3-已取消 */
@Excel(name = "状态:1-进行中 2-已结束 3-已取消")
private Integer status;
/** 发布时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date publishTime;
/** 报名截止时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "报名截止时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date endTime;
/** 删除标志(0代表存在 2代表删除) */
private String delFlag;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public String getLivestockType() {
return livestockType;
}
public void setLivestockType(String livestockType) {
this.livestockType = livestockType;
}
public void setVaccineType(String vaccineType)
{
this.vaccineType = vaccineType;
}
public String getVaccineType()
{
return vaccineType;
}
public void setDescription(String description)
{
this.description = description;
}
public String getDescription()
{
return description;
}
public void setVaccinationDate(Date vaccinationDate)
{
this.vaccinationDate = vaccinationDate;
}
public Date getVaccinationDate()
{
return vaccinationDate;
}
public void setVaccinationLocation(String vaccinationLocation)
{
this.vaccinationLocation = vaccinationLocation;
}
public String getVaccinationLocation()
{
return vaccinationLocation;
}
public void setAvailableSlots(Long availableSlots)
{
this.availableSlots = availableSlots;
}
public Long getAvailableSlots()
{
return availableSlots;
}
public void setTotalSlots(Long totalSlots)
{
this.totalSlots = totalSlots;
}
public Long getTotalSlots()
{
return totalSlots;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setPublishTime(Date publishTime)
{
this.publishTime = publishTime;
}
public Date getPublishTime()
{
return publishTime;
}
public void setEndTime(Date endTime)
{
this.endTime = endTime;
}
public Date getEndTime()
{
return endTime;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("title", getTitle())
.append("vaccineType", getVaccineType())
.append("description", getDescription())
.append("vaccinationDate", getVaccinationDate())
.append("vaccinationLocation", getVaccinationLocation())
.append("availableSlots", getAvailableSlots())
.append("totalSlots", getTotalSlots())
.append("status", getStatus())
.append("publishTime", getPublishTime())
.append("endTime", getEndTime())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

227
chenhai-system/src/main/java/com/chenhai/system/domain/SysVacRegistration.java

@ -0,0 +1,227 @@
package com.chenhai.system.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.chenhai.common.annotation.Excel;
import com.chenhai.common.core.domain.BaseEntity;
/**
* 疫苗预约对象 sys_vac_registration
*
* @author ruoyi
* @date 2026-01-28
*/
public class SysVacRegistration extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 预约记录ID */
private Long id;
/** 疫苗信息ID */
@Excel(name = "疫苗信息ID")
private Long vaccineId;
/** 牧户用户ID */
@Excel(name = "牧户用户ID")
private Long userId;
/** 牲畜类型(字典:livestock_type) */
@Excel(name = "牲畜类型", readConverterExp = "字=典:livestock_type")
private String livestockType;
/** 牲畜数量 */
@Excel(name = "牲畜数量")
private Long livestockCount;
/** 联系人姓名 */
@Excel(name = "联系人姓名")
private String contactName;
/** 联系电话 */
@Excel(name = "联系电话")
private String contactPhone;
/** 状态:1-待确认 2-已确认 3-已完成 4-已取消 */
@Excel(name = "状态:1-待确认 2-已确认 3-已完成 4-已取消")
private Integer status;
/** 预约时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "预约时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date registrationTime;
/** 确认时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "确认时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date confirmedTime;
/** 完成时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date completedTime;
/** 取消时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "取消时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date cancelTime;
/** 删除标志(0代表存在 2代表删除) */
private String delFlag;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setVaccineId(Long vaccineId)
{
this.vaccineId = vaccineId;
}
public Long getVaccineId()
{
return vaccineId;
}
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getUserId()
{
return userId;
}
public void setLivestockType(String livestockType)
{
this.livestockType = livestockType;
}
public String getLivestockType()
{
return livestockType;
}
public void setLivestockCount(Long livestockCount)
{
this.livestockCount = livestockCount;
}
public Long getLivestockCount()
{
return livestockCount;
}
public void setContactName(String contactName)
{
this.contactName = contactName;
}
public String getContactName()
{
return contactName;
}
public void setContactPhone(String contactPhone)
{
this.contactPhone = contactPhone;
}
public String getContactPhone()
{
return contactPhone;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setRegistrationTime(Date registrationTime)
{
this.registrationTime = registrationTime;
}
public Date getRegistrationTime()
{
return registrationTime;
}
public void setConfirmedTime(Date confirmedTime)
{
this.confirmedTime = confirmedTime;
}
public Date getConfirmedTime()
{
return confirmedTime;
}
public void setCompletedTime(Date completedTime)
{
this.completedTime = completedTime;
}
public Date getCompletedTime()
{
return completedTime;
}
public void setCancelTime(Date cancelTime)
{
this.cancelTime = cancelTime;
}
public Date getCancelTime()
{
return cancelTime;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("vaccineId", getVaccineId())
.append("userId", getUserId())
.append("livestockType", getLivestockType())
.append("livestockCount", getLivestockCount())
.append("contactName", getContactName())
.append("contactPhone", getContactPhone())
.append("status", getStatus())
.append("registrationTime", getRegistrationTime())
.append("confirmedTime", getConfirmedTime())
.append("completedTime", getCompletedTime())
.append("cancelTime", getCancelTime())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

61
chenhai-system/src/main/java/com/chenhai/system/mapper/SysVacInfoMapper.java

@ -0,0 +1,61 @@
package com.chenhai.system.mapper;
import java.util.List;
import com.chenhai.system.domain.SysVacInfo;
/**
* 疫苗信息Mapper接口
*
* @author ruoyi
* @date 2026-01-28
*/
public interface SysVacInfoMapper
{
/**
* 查询疫苗信息
*
* @param id 疫苗信息主键
* @return 疫苗信息
*/
public SysVacInfo selectSysVacInfoById(Long id);
/**
* 查询疫苗信息列表
*
* @param sysVacInfo 疫苗信息
* @return 疫苗信息集合
*/
public List<SysVacInfo> selectSysVacInfoList(SysVacInfo sysVacInfo);
/**
* 新增疫苗信息
*
* @param sysVacInfo 疫苗信息
* @return 结果
*/
public int insertSysVacInfo(SysVacInfo sysVacInfo);
/**
* 修改疫苗信息
*
* @param sysVacInfo 疫苗信息
* @return 结果
*/
public int updateSysVacInfo(SysVacInfo sysVacInfo);
/**
* 删除疫苗信息
*
* @param id 疫苗信息主键
* @return 结果
*/
public int deleteSysVacInfoById(Long id);
/**
* 批量删除疫苗信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysVacInfoByIds(Long[] ids);
}

61
chenhai-system/src/main/java/com/chenhai/system/mapper/SysVacRegistrationMapper.java

@ -0,0 +1,61 @@
package com.chenhai.system.mapper;
import java.util.List;
import com.chenhai.system.domain.SysVacRegistration;
/**
* 疫苗预约Mapper接口
*
* @author ruoyi
* @date 2026-01-28
*/
public interface SysVacRegistrationMapper
{
/**
* 查询疫苗预约
*
* @param id 疫苗预约主键
* @return 疫苗预约
*/
public SysVacRegistration selectSysVacRegistrationById(Long id);
/**
* 查询疫苗预约列表
*
* @param sysVacRegistration 疫苗预约
* @return 疫苗预约集合
*/
public List<SysVacRegistration> selectSysVacRegistrationList(SysVacRegistration sysVacRegistration);
/**
* 新增疫苗预约
*
* @param sysVacRegistration 疫苗预约
* @return 结果
*/
public int insertSysVacRegistration(SysVacRegistration sysVacRegistration);
/**
* 修改疫苗预约
*
* @param sysVacRegistration 疫苗预约
* @return 结果
*/
public int updateSysVacRegistration(SysVacRegistration sysVacRegistration);
/**
* 删除疫苗预约
*
* @param id 疫苗预约主键
* @return 结果
*/
public int deleteSysVacRegistrationById(Long id);
/**
* 批量删除疫苗预约
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysVacRegistrationByIds(Long[] ids);
}

61
chenhai-system/src/main/java/com/chenhai/system/service/ISysVacInfoService.java

@ -0,0 +1,61 @@
package com.chenhai.system.service;
import java.util.List;
import com.chenhai.system.domain.SysVacInfo;
/**
* 疫苗信息Service接口
*
* @author ruoyi
* @date 2026-01-28
*/
public interface ISysVacInfoService
{
/**
* 查询疫苗信息
*
* @param id 疫苗信息主键
* @return 疫苗信息
*/
public SysVacInfo selectSysVacInfoById(Long id);
/**
* 查询疫苗信息列表
*
* @param sysVacInfo 疫苗信息
* @return 疫苗信息集合
*/
public List<SysVacInfo> selectSysVacInfoList(SysVacInfo sysVacInfo);
/**
* 新增疫苗信息
*
* @param sysVacInfo 疫苗信息
* @return 结果
*/
public int insertSysVacInfo(SysVacInfo sysVacInfo);
/**
* 修改疫苗信息
*
* @param sysVacInfo 疫苗信息
* @return 结果
*/
public int updateSysVacInfo(SysVacInfo sysVacInfo);
/**
* 批量删除疫苗信息
*
* @param ids 需要删除的疫苗信息主键集合
* @return 结果
*/
public int deleteSysVacInfoByIds(Long[] ids);
/**
* 删除疫苗信息信息
*
* @param id 疫苗信息主键
* @return 结果
*/
public int deleteSysVacInfoById(Long id);
}

61
chenhai-system/src/main/java/com/chenhai/system/service/ISysVacRegistrationService.java

@ -0,0 +1,61 @@
package com.chenhai.system.service;
import java.util.List;
import com.chenhai.system.domain.SysVacRegistration;
/**
* 疫苗预约Service接口
*
* @author ruoyi
* @date 2026-01-28
*/
public interface ISysVacRegistrationService
{
/**
* 查询疫苗预约
*
* @param id 疫苗预约主键
* @return 疫苗预约
*/
public SysVacRegistration selectSysVacRegistrationById(Long id);
/**
* 查询疫苗预约列表
*
* @param sysVacRegistration 疫苗预约
* @return 疫苗预约集合
*/
public List<SysVacRegistration> selectSysVacRegistrationList(SysVacRegistration sysVacRegistration);
/**
* 新增疫苗预约
*
* @param sysVacRegistration 疫苗预约
* @return 结果
*/
public int insertSysVacRegistration(SysVacRegistration sysVacRegistration);
/**
* 修改疫苗预约
*
* @param sysVacRegistration 疫苗预约
* @return 结果
*/
public int updateSysVacRegistration(SysVacRegistration sysVacRegistration);
/**
* 批量删除疫苗预约
*
* @param ids 需要删除的疫苗预约主键集合
* @return 结果
*/
public int deleteSysVacRegistrationByIds(Long[] ids);
/**
* 删除疫苗预约信息
*
* @param id 疫苗预约主键
* @return 结果
*/
public int deleteSysVacRegistrationById(Long id);
}

96
chenhai-system/src/main/java/com/chenhai/system/service/impl/SysVacInfoServiceImpl.java

@ -0,0 +1,96 @@
package com.chenhai.system.service.impl;
import java.util.List;
import com.chenhai.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.chenhai.system.mapper.SysVacInfoMapper;
import com.chenhai.system.domain.SysVacInfo;
import com.chenhai.system.service.ISysVacInfoService;
/**
* 疫苗信息Service业务层处理
*
* @author ruoyi
* @date 2026-01-28
*/
@Service
public class SysVacInfoServiceImpl implements ISysVacInfoService
{
@Autowired
private SysVacInfoMapper sysVacInfoMapper;
/**
* 查询疫苗信息
*
* @param id 疫苗信息主键
* @return 疫苗信息
*/
@Override
public SysVacInfo selectSysVacInfoById(Long id)
{
return sysVacInfoMapper.selectSysVacInfoById(id);
}
/**
* 查询疫苗信息列表
*
* @param sysVacInfo 疫苗信息
* @return 疫苗信息
*/
@Override
public List<SysVacInfo> selectSysVacInfoList(SysVacInfo sysVacInfo)
{
return sysVacInfoMapper.selectSysVacInfoList(sysVacInfo);
}
/**
* 新增疫苗信息
*
* @param sysVacInfo 疫苗信息
* @return 结果
*/
@Override
public int insertSysVacInfo(SysVacInfo sysVacInfo)
{
sysVacInfo.setCreateTime(DateUtils.getNowDate());
return sysVacInfoMapper.insertSysVacInfo(sysVacInfo);
}
/**
* 修改疫苗信息
*
* @param sysVacInfo 疫苗信息
* @return 结果
*/
@Override
public int updateSysVacInfo(SysVacInfo sysVacInfo)
{
sysVacInfo.setUpdateTime(DateUtils.getNowDate());
return sysVacInfoMapper.updateSysVacInfo(sysVacInfo);
}
/**
* 批量删除疫苗信息
*
* @param ids 需要删除的疫苗信息主键
* @return 结果
*/
@Override
public int deleteSysVacInfoByIds(Long[] ids)
{
return sysVacInfoMapper.deleteSysVacInfoByIds(ids);
}
/**
* 删除疫苗信息信息
*
* @param id 疫苗信息主键
* @return 结果
*/
@Override
public int deleteSysVacInfoById(Long id)
{
return sysVacInfoMapper.deleteSysVacInfoById(id);
}
}

96
chenhai-system/src/main/java/com/chenhai/system/service/impl/SysVacRegistrationServiceImpl.java

@ -0,0 +1,96 @@
package com.chenhai.system.service.impl;
import java.util.List;
import com.chenhai.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.chenhai.system.mapper.SysVacRegistrationMapper;
import com.chenhai.system.domain.SysVacRegistration;
import com.chenhai.system.service.ISysVacRegistrationService;
/**
* 疫苗预约Service业务层处理
*
* @author ruoyi
* @date 2026-01-28
*/
@Service
public class SysVacRegistrationServiceImpl implements ISysVacRegistrationService
{
@Autowired
private SysVacRegistrationMapper sysVacRegistrationMapper;
/**
* 查询疫苗预约
*
* @param id 疫苗预约主键
* @return 疫苗预约
*/
@Override
public SysVacRegistration selectSysVacRegistrationById(Long id)
{
return sysVacRegistrationMapper.selectSysVacRegistrationById(id);
}
/**
* 查询疫苗预约列表
*
* @param sysVacRegistration 疫苗预约
* @return 疫苗预约
*/
@Override
public List<SysVacRegistration> selectSysVacRegistrationList(SysVacRegistration sysVacRegistration)
{
return sysVacRegistrationMapper.selectSysVacRegistrationList(sysVacRegistration);
}
/**
* 新增疫苗预约
*
* @param sysVacRegistration 疫苗预约
* @return 结果
*/
@Override
public int insertSysVacRegistration(SysVacRegistration sysVacRegistration)
{
sysVacRegistration.setCreateTime(DateUtils.getNowDate());
return sysVacRegistrationMapper.insertSysVacRegistration(sysVacRegistration);
}
/**
* 修改疫苗预约
*
* @param sysVacRegistration 疫苗预约
* @return 结果
*/
@Override
public int updateSysVacRegistration(SysVacRegistration sysVacRegistration)
{
sysVacRegistration.setUpdateTime(DateUtils.getNowDate());
return sysVacRegistrationMapper.updateSysVacRegistration(sysVacRegistration);
}
/**
* 批量删除疫苗预约
*
* @param ids 需要删除的疫苗预约主键
* @return 结果
*/
@Override
public int deleteSysVacRegistrationByIds(Long[] ids)
{
return sysVacRegistrationMapper.deleteSysVacRegistrationByIds(ids);
}
/**
* 删除疫苗预约信息
*
* @param id 疫苗预约主键
* @return 结果
*/
@Override
public int deleteSysVacRegistrationById(Long id)
{
return sysVacRegistrationMapper.deleteSysVacRegistrationById(id);
}
}

2
chenhai-system/src/main/resources/mapper/system/SysVacCategoryMapper.xml

@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="manufacturer != null and manufacturer != ''"> and manufacturer = #{manufacturer}</if>
<if test="manufactureDate != null "> and manufacture_date = #{manufactureDate}</if>
<if test="expiryDate != null "> and expiry_date = #{expiryDate}</if>
<if test="livestockTypes != null and livestockTypes != ''"> and livestock_types = #{livestockTypes}</if>
<if test="livestockTypes != null and livestockTypes != ''"> and livestock_types like concat('%', #{livestockTypes}, '%')</if>
<if test="preventDisease != null and preventDisease != ''"> and prevent_disease = #{preventDisease}</if>
<if test="isMandatory != null and isMandatory != ''"> and is_mandatory = #{isMandatory}</if>
<if test="immunePeriod != null "> and immune_period = #{immunePeriod}</if>

129
chenhai-system/src/main/resources/mapper/system/SysVacInfoMapper.xml

@ -0,0 +1,129 @@
<?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.chenhai.system.mapper.SysVacInfoMapper">
<resultMap type="SysVacInfo" id="SysVacInfoResult">
<result property="id" column="id" />
<result property="title" column="title" />
<result property="livestockType" column="livestock_type" />
<result property="vaccineType" column="vaccine_type" />
<result property="description" column="description" />
<result property="vaccinationDate" column="vaccination_date" />
<result property="vaccinationLocation" column="vaccination_location" />
<result property="availableSlots" column="available_slots" />
<result property="totalSlots" column="total_slots" />
<result property="status" column="status" />
<result property="publishTime" column="publish_time" />
<result property="endTime" column="end_time" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectSysVacInfoVo">
select id, title, livestock_type, vaccine_type, description, vaccination_date, vaccination_location, available_slots, total_slots, status, publish_time, end_time, del_flag, create_by, create_time, update_by, update_time, remark from sys_vac_info
</sql>
<select id="selectSysVacInfoList" parameterType="SysVacInfo" resultMap="SysVacInfoResult">
<include refid="selectSysVacInfoVo"/>
<where>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="vaccineType != null and vaccineType != ''"> and vaccine_type = #{vaccineType}</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="vaccinationDate != null "> and vaccination_date = #{vaccinationDate}</if>
<if test="vaccinationLocation != null and vaccinationLocation != ''"> and vaccination_location = #{vaccinationLocation}</if>
<if test="availableSlots != null "> and available_slots = #{availableSlots}</if>
<if test="totalSlots != null "> and total_slots = #{totalSlots}</if>
<if test="status != null "> and status = #{status}</if>
<if test="publishTime != null "> and publish_time = #{publishTime}</if>
<if test="endTime != null "> and end_time = #{endTime}</if>
</where>
</select>
<select id="selectSysVacInfoById" parameterType="Long" resultMap="SysVacInfoResult">
<include refid="selectSysVacInfoVo"/>
where id = #{id}
</select>
<insert id="insertSysVacInfo" parameterType="SysVacInfo" useGeneratedKeys="true" keyProperty="id">
insert into sys_vac_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null and title != ''">title,</if>
<if test="livestockType != null and livestockType != ''">livestock_type,</if>
<if test="vaccineType != null and vaccineType != ''">vaccine_type,</if>
<if test="description != null and description != ''">description,</if>
<if test="vaccinationDate != null">vaccination_date,</if>
<if test="vaccinationLocation != null and vaccinationLocation != ''">vaccination_location,</if>
<if test="availableSlots != null">available_slots,</if>
<if test="totalSlots != null">total_slots,</if>
<if test="status != null">status,</if>
<if test="publishTime != null">publish_time,</if>
<if test="endTime != null">end_time,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null and title != ''">#{title},</if>
<if test="livestockType != null and livestockType != ''">#{livestockType},</if>
<if test="vaccineType != null and vaccineType != ''">#{vaccineType},</if>
<if test="description != null and description != ''">#{description},</if>
<if test="vaccinationDate != null">#{vaccinationDate},</if>
<if test="vaccinationLocation != null and vaccinationLocation != ''">#{vaccinationLocation},</if>
<if test="availableSlots != null">#{availableSlots},</if>
<if test="totalSlots != null">#{totalSlots},</if>
<if test="status != null">#{status},</if>
<if test="publishTime != null">#{publishTime},</if>
<if test="endTime != null">#{endTime},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateSysVacInfo" parameterType="SysVacInfo">
update sys_vac_info
<trim prefix="SET" suffixOverrides=",">
<if test="title != null and title != ''">title = #{title},</if>
<if test="livestockType != null and livestockType != ''">livestock_type = #{livestockType},</if>
<if test="vaccineType != null and vaccineType != ''">vaccine_type = #{vaccineType},</if>
<if test="description != null and description != ''">description = #{description},</if>
<if test="vaccinationDate != null">vaccination_date = #{vaccinationDate},</if>
<if test="vaccinationLocation != null and vaccinationLocation != ''">vaccination_location = #{vaccinationLocation},</if>
<if test="availableSlots != null">available_slots = #{availableSlots},</if>
<if test="totalSlots != null">total_slots = #{totalSlots},</if>
<if test="status != null">status = #{status},</if>
<if test="publishTime != null">publish_time = #{publishTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSysVacInfoById" parameterType="Long">
delete from sys_vac_info where id = #{id}
</delete>
<delete id="deleteSysVacInfoByIds" parameterType="String">
delete from sys_vac_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

130
chenhai-system/src/main/resources/mapper/system/SysVacRegistrationMapper.xml

@ -0,0 +1,130 @@
<?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.chenhai.system.mapper.SysVacRegistrationMapper">
<resultMap type="SysVacRegistration" id="SysVacRegistrationResult">
<result property="id" column="id" />
<result property="vaccineId" column="vaccine_id" />
<result property="userId" column="user_id" />
<result property="livestockType" column="livestock_type" />
<result property="livestockCount" column="livestock_count" />
<result property="contactName" column="contact_name" />
<result property="contactPhone" column="contact_phone" />
<result property="status" column="status" />
<result property="registrationTime" column="registration_time" />
<result property="confirmedTime" column="confirmed_time" />
<result property="completedTime" column="completed_time" />
<result property="cancelTime" column="cancel_time" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectSysVacRegistrationVo">
select id, vaccine_id, user_id, livestock_type, livestock_count, contact_name, contact_phone, status, registration_time, confirmed_time, completed_time, cancel_time, del_flag, create_by, create_time, update_by, update_time, remark from sys_vac_registration
</sql>
<select id="selectSysVacRegistrationList" parameterType="SysVacRegistration" resultMap="SysVacRegistrationResult">
<include refid="selectSysVacRegistrationVo"/>
<where>
<if test="vaccineId != null "> and vaccine_id = #{vaccineId}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="livestockType != null and livestockType != ''"> and livestock_type = #{livestockType}</if>
<if test="livestockCount != null "> and livestock_count = #{livestockCount}</if>
<if test="contactName != null and contactName != ''"> and contact_name like concat('%', #{contactName}, '%')</if>
<if test="contactPhone != null and contactPhone != ''"> and contact_phone = #{contactPhone}</if>
<if test="status != null "> and status = #{status}</if>
<if test="registrationTime != null "> and registration_time = #{registrationTime}</if>
<if test="confirmedTime != null "> and confirmed_time = #{confirmedTime}</if>
<if test="completedTime != null "> and completed_time = #{completedTime}</if>
<if test="cancelTime != null "> and cancel_time = #{cancelTime}</if>
</where>
</select>
<select id="selectSysVacRegistrationById" parameterType="Long" resultMap="SysVacRegistrationResult">
<include refid="selectSysVacRegistrationVo"/>
where id = #{id}
</select>
<insert id="insertSysVacRegistration" parameterType="SysVacRegistration" useGeneratedKeys="true" keyProperty="id">
insert into sys_vac_registration
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="vaccineId != null">vaccine_id,</if>
<if test="userId != null">user_id,</if>
<if test="livestockType != null and livestockType != ''">livestock_type,</if>
<if test="livestockCount != null">livestock_count,</if>
<if test="contactName != null and contactName != ''">contact_name,</if>
<if test="contactPhone != null and contactPhone != ''">contact_phone,</if>
<if test="status != null">status,</if>
<if test="registrationTime != null">registration_time,</if>
<if test="confirmedTime != null">confirmed_time,</if>
<if test="completedTime != null">completed_time,</if>
<if test="cancelTime != null">cancel_time,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="vaccineId != null">#{vaccineId},</if>
<if test="userId != null">#{userId},</if>
<if test="livestockType != null and livestockType != ''">#{livestockType},</if>
<if test="livestockCount != null">#{livestockCount},</if>
<if test="contactName != null and contactName != ''">#{contactName},</if>
<if test="contactPhone != null and contactPhone != ''">#{contactPhone},</if>
<if test="status != null">#{status},</if>
<if test="registrationTime != null">#{registrationTime},</if>
<if test="confirmedTime != null">#{confirmedTime},</if>
<if test="completedTime != null">#{completedTime},</if>
<if test="cancelTime != null">#{cancelTime},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateSysVacRegistration" parameterType="SysVacRegistration">
update sys_vac_registration
<trim prefix="SET" suffixOverrides=",">
<if test="vaccineId != null">vaccine_id = #{vaccineId},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="livestockType != null and livestockType != ''">livestock_type = #{livestockType},</if>
<if test="livestockCount != null">livestock_count = #{livestockCount},</if>
<if test="contactName != null and contactName != ''">contact_name = #{contactName},</if>
<if test="contactPhone != null and contactPhone != ''">contact_phone = #{contactPhone},</if>
<if test="status != null">status = #{status},</if>
<if test="registrationTime != null">registration_time = #{registrationTime},</if>
<if test="confirmedTime != null">confirmed_time = #{confirmedTime},</if>
<if test="completedTime != null">completed_time = #{completedTime},</if>
<if test="cancelTime != null">cancel_time = #{cancelTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSysVacRegistrationById" parameterType="Long">
delete from sys_vac_registration where id = #{id}
</delete>
<delete id="deleteSysVacRegistrationByIds" parameterType="String">
delete from sys_vac_registration where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

44
chenhai-ui/src/api/system/VacRegistration.js

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询疫苗预约列表
export function listVacRegistration(query) {
return request({
url: '/system/VacRegistration/list',
method: 'get',
params: query
})
}
// 查询疫苗预约详细
export function getVacRegistration(id) {
return request({
url: '/system/VacRegistration/' + id,
method: 'get'
})
}
// 新增疫苗预约
export function addVacRegistration(data) {
return request({
url: '/system/VacRegistration',
method: 'post',
data: data
})
}
// 修改疫苗预约
export function updateVacRegistration(data) {
return request({
url: '/system/VacRegistration',
method: 'put',
data: data
})
}
// 删除疫苗预约
export function delVacRegistration(id) {
return request({
url: '/system/VacRegistration/' + id,
method: 'delete'
})
}

53
chenhai-ui/src/api/system/vacInfo.js

@ -0,0 +1,53 @@
import request from '@/utils/request'
// 查询疫苗信息列表
export function listVacInfo(query) {
return request({
url: '/system/vacInfo/list',
method: 'get',
params: query
})
}
// 查询疫苗类别列表(新增接口)
export function getVacCategorylist(query) {
return request({
url: '/system/vacInfo/getVacCategorylist',
method: 'get',
params: query
})
}
// 查询疫苗信息详细
export function getVacInfo(id) {
return request({
url: '/system/vacInfo/' + id,
method: 'get'
})
}
// 新增疫苗信息
export function addVacInfo(data) {
return request({
url: '/system/vacInfo',
method: 'post',
data: data
})
}
// 修改疫苗信息
export function updateVacInfo(data) {
return request({
url: '/system/vacInfo',
method: 'put',
data: data
})
}
// 删除疫苗信息
export function delVacInfo(id) {
return request({
url: '/system/vacInfo/' + id,
method: 'delete'
})
}

1
chenhai-ui/src/assets/icons/svg/vacInfo.svg

@ -0,0 +1 @@
<svg t="1769679777376" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8002" width="200" height="200"><path d="M959.993 1023.984H64.007a63.999 63.999 0 0 1-63.999-63.999V63.999a63.999 63.999 0 0 1 63.999-63.999h593.398728v383.178013H1023.992V959.985a63.999 63.999 0 0 1-63.999 63.999zM144.00575 783.98775a47.99925 47.99925 0 0 0-47.99925 47.99925 47.99925 47.99925 0 0 0 47.99925 47.99925h735.9885a47.99925 47.99925 0 0 0 47.99925-47.99925 47.99925 47.99925 0 0 0-47.99925-47.99925z m383.994-191.997a47.99925 47.99925 0 0 0-47.99925 47.99925 47.99925 47.99925 0 0 0 47.99925 47.99925h351.9945a47.99925 47.99925 0 0 0 47.99925-47.99925 47.99925 47.99925 0 0 0-47.99925-47.99925zM393.729848 132.093936a63.551007 63.551007 0 0 0-51.1992 25.471602L140.309808 425.897345a63.999 63.999 0 0 0 12.623802 89.5986l12.399807 9.359854-65.470977 86.878643 9.423852 67.19895 94.398525-125.230044 12.399807 9.359854a63.455009 63.455009 0 0 0 38.3994 12.7998 63.519008 63.519008 0 0 0 51.1992-25.455602L507.872064 282.075593a64.190997 64.190997 0 0 0-12.207809-89.374604l11.55182-15.311761 25.183606 18.975704a31.695505 31.695505 0 0 0 19.1997 6.3999 31.727504 31.727504 0 0 0 25.5996-12.7998 31.759504 31.759504 0 0 0 6.143904-23.69563 31.775504 31.775504 0 0 0-12.431805-21.10367L456.640865 59.071077a31.615506 31.615506 0 0 0-19.1997-6.3999 31.727504 31.727504 0 0 0-25.5996 12.7998 31.807503 31.807503 0 0 0-6.143904 23.743629 31.711505 31.711505 0 0 0 12.431806 21.055671l25.167606 18.975704-11.551819 15.32776a63.39101 63.39101 0 0 0-38.063405-12.479805zM279.187638 528.791738a15.887752 15.887752 0 0 1-9.59985-3.19995l-93.854534-70.718895a15.887752 15.887752 0 0 1-6.207903-10.575835 15.855752 15.855752 0 0 1 3.055952-11.839815l56.751114-75.326823a13.327792 13.327792 0 0 0 1.743972 1.503976l38.3994 28.911549a15.871752 15.871752 0 0 0 9.59985 3.19995 15.887752 15.887752 0 0 0 12.7998-6.3999 15.99975 15.99975 0 0 0-3.19995-22.39965l-38.3994-28.879549a17.791722 17.791722 0 0 0-1.90397-1.231981l13.951782-18.54371a15.135764 15.135764 0 0 0 1.743973 1.599975l38.3994 28.79955a15.807753 15.807753 0 0 0 9.59985 3.19995 15.871752 15.871752 0 0 0 12.7998-6.3999 15.99975 15.99975 0 0 0-3.19995-22.39965l-38.3994-28.895549a14.959766 14.959766 0 0 0-1.90397-1.24798l22.191653-29.47154a15.039765 15.039765 0 0 0 1.743973 1.503977l38.3994 28.895548a15.807753 15.807753 0 0 0 9.59985 3.19995 15.871752 15.871752 0 0 0 12.7998-6.3999 15.855752 15.855752 0 0 0 3.071952-11.839815 15.887752 15.887752 0 0 0-6.223903-10.575834l-38.3994-28.895549a14.399775 14.399775 0 0 0-1.93597-1.24798l37.279418-49.471227a15.871752 15.871752 0 0 1 12.7998-6.3999 15.871752 15.871752 0 0 1 9.59985 3.19995l14.239777 10.703832-11.071827 14.671771 63.903002 48.143248 11.039827-14.639771 15.743754 11.823815a15.99975 15.99975 0 0 1 3.19995 22.39965l-187.357072 248.652115a15.903752 15.903752 0 0 1-12.8318 6.591897z m702.021031-209.596725H723.516695V61.487039l257.595975 257.675974z" fill="#6CAB86" p-id="8003"></path></svg>

485
chenhai-ui/src/views/system/VacRegistration/index.vue

@ -0,0 +1,485 @@
<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="疫苗信息ID" prop="vaccineId">
<el-input
v-model="queryParams.vaccineId"
placeholder="请输入疫苗信息ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="牧户用户ID" prop="userId">
<el-input
v-model="queryParams.userId"
placeholder="请输入牧户用户ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="牲畜类型" prop="livestockType">
<el-select v-model="queryParams.livestockType" placeholder="请选择牲畜类型" clearable>
<el-option
v-for="dict in dict.type.livestock_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="牲畜数量" prop="livestockCount">
<el-input
v-model="queryParams.livestockCount"
placeholder="请输入牲畜数量"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="联系人姓名" prop="contactName">
<el-input
v-model="queryParams.contactName"
placeholder="请输入联系人姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="联系电话" prop="contactPhone">
<el-input
v-model="queryParams.contactPhone"
placeholder="请输入联系电话"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态:1-待确认 2-已确认 3-已完成 4-已取消" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态:1-待确认 2-已确认 3-已完成 4-已取消" clearable>
<el-option
v-for="dict in dict.type.vaccine_registration_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="预约时间" prop="registrationTime">
<el-date-picker clearable
v-model="queryParams.registrationTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择预约时间">
</el-date-picker>
</el-form-item>
<el-form-item label="确认时间" prop="confirmedTime">
<el-date-picker clearable
v-model="queryParams.confirmedTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择确认时间">
</el-date-picker>
</el-form-item>
<el-form-item label="完成时间" prop="completedTime">
<el-date-picker clearable
v-model="queryParams.completedTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择完成时间">
</el-date-picker>
</el-form-item>
<el-form-item label="取消时间" prop="cancelTime">
<el-date-picker clearable
v-model="queryParams.cancelTime"
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="['system:VacRegistration: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="['system:VacRegistration: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="['system:VacRegistration: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="['system:VacRegistration:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="VacRegistrationList" @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="疫苗信息ID" align="center" prop="vaccineId" />
<el-table-column label="牧户用户ID" align="center" prop="userId" />
<el-table-column label="牲畜类型" align="center" prop="livestockType">
<template slot-scope="scope">
<dict-tag :options="dict.type.livestock_type" :value="scope.row.livestockType"/>
</template>
</el-table-column>
<el-table-column label="牲畜数量" align="center" prop="livestockCount" />
<el-table-column label="联系人姓名" align="center" prop="contactName" />
<el-table-column label="联系电话" align="center" prop="contactPhone" />
<el-table-column label="状态:1-待确认 2-已确认 3-已完成 4-已取消" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.vaccine_registration_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="预约时间" align="center" prop="registrationTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.registrationTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="确认时间" align="center" prop="confirmedTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.confirmedTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="完成时间" align="center" prop="completedTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.completedTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="取消时间" align="center" prop="cancelTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.cancelTime, '{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="['system:VacRegistration:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:VacRegistration: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="疫苗信息ID" prop="vaccineId">
<el-input v-model="form.vaccineId" placeholder="请输入疫苗信息ID" />
</el-form-item>
<el-form-item label="牧户用户ID" prop="userId">
<el-input v-model="form.userId" placeholder="请输入牧户用户ID" />
</el-form-item>
<el-form-item label="牲畜类型" prop="livestockType">
<el-select v-model="form.livestockType" placeholder="请选择牲畜类型">
<el-option
v-for="dict in dict.type.livestock_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="牲畜数量" prop="livestockCount">
<el-input v-model="form.livestockCount" placeholder="请输入牲畜数量" />
</el-form-item>
<el-form-item label="联系人姓名" prop="contactName">
<el-input v-model="form.contactName" placeholder="请输入联系人姓名" />
</el-form-item>
<el-form-item label="联系电话" prop="contactPhone">
<el-input v-model="form.contactPhone" placeholder="请输入联系电话" />
</el-form-item>
<el-form-item label="状态:1-待确认 2-已确认 3-已完成 4-已取消" prop="status">
<el-select v-model="form.status" placeholder="请选择状态:1-待确认 2-已确认 3-已完成 4-已取消">
<el-option
v-for="dict in dict.type.vaccine_registration_status"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="预约时间" prop="registrationTime">
<el-date-picker clearable
v-model="form.registrationTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择预约时间">
</el-date-picker>
</el-form-item>
<el-form-item label="确认时间" prop="confirmedTime">
<el-date-picker clearable
v-model="form.confirmedTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择确认时间">
</el-date-picker>
</el-form-item>
<el-form-item label="完成时间" prop="completedTime">
<el-date-picker clearable
v-model="form.completedTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择完成时间">
</el-date-picker>
</el-form-item>
<el-form-item label="取消时间" prop="cancelTime">
<el-date-picker clearable
v-model="form.cancelTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择取消时间">
</el-date-picker>
</el-form-item>
<el-form-item label="删除标志" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入删除标志" />
</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 { listVacRegistration, getVacRegistration, delVacRegistration, addVacRegistration, updateVacRegistration } from "@/api/system/VacRegistration"
export default {
name: "VacRegistration",
dicts: ['livestock_type', 'vaccine_registration_status'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
VacRegistrationList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
vaccineId: null,
userId: null,
livestockType: null,
livestockCount: null,
contactName: null,
contactPhone: null,
status: null,
registrationTime: null,
confirmedTime: null,
completedTime: null,
cancelTime: null,
},
//
form: {},
//
rules: {
vaccineId: [
{ required: true, message: "疫苗信息ID不能为空", trigger: "blur" }
],
userId: [
{ required: true, message: "牧户用户ID不能为空", trigger: "blur" }
],
livestockType: [
{ required: true, message: "牲畜类型不能为空", trigger: "change" }
],
livestockCount: [
{ required: true, message: "牲畜数量不能为空", trigger: "blur" }
],
contactName: [
{ required: true, message: "联系人姓名不能为空", trigger: "blur" }
],
contactPhone: [
{ required: true, message: "联系电话不能为空", trigger: "blur" }
],
status: [
{ required: true, message: "状态:1-待确认 2-已确认 3-已完成 4-已取消不能为空", trigger: "change" }
],
registrationTime: [
{ required: true, message: "预约时间不能为空", trigger: "blur" }
],
}
}
},
created() {
this.getList()
},
methods: {
/** 查询疫苗预约列表 */
getList() {
this.loading = true
listVacRegistration(this.queryParams).then(response => {
this.VacRegistrationList = response.rows
this.total = response.total
this.loading = false
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
id: null,
vaccineId: null,
userId: null,
livestockType: null,
livestockCount: null,
contactName: null,
contactPhone: null,
status: null,
registrationTime: null,
confirmedTime: null,
completedTime: null,
cancelTime: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null
}
this.resetForm("form")
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm")
this.handleQuery()
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = "添加疫苗预约"
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const id = row.id || this.ids
getVacRegistration(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) {
updateVacRegistration(this.form).then(response => {
this.$modal.msgSuccess("修改成功")
this.open = false
this.getList()
})
} else {
addVacRegistration(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 delVacRegistration(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
this.download('system/VacRegistration/export', {
...this.queryParams
}, `VacRegistration_${new Date().getTime()}.xlsx`)
}
}
}
</script>

658
chenhai-ui/src/views/system/vacInfo/index.vue

@ -0,0 +1,658 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="疫苗标题" prop="title">
<el-input
v-model="queryParams.title"
placeholder="请输入疫苗标题"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- 新增牲畜类型查询条件 -->
<el-form-item label="牲畜类型" prop="livestockType">
<el-select v-model="queryParams.livestockType" placeholder="请选择牲畜类型" clearable>
<el-option
v-for="dict in dict.type.livestock_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="疫苗类型" prop="vaccineType">
<el-select v-model="queryParams.vaccineType" placeholder="请选择疫苗类型" clearable>
<el-option
v-for="dict in dict.type.vaccine_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="接种日期" prop="vaccinationDate">
<el-date-picker clearable
v-model="queryParams.vaccinationDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择接种日期">
</el-date-picker>
</el-form-item>
<el-form-item label="接种地点" prop="vaccinationLocation">
<el-input
v-model="queryParams.vaccinationLocation"
placeholder="请输入接种地点"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="可预约数量" prop="availableSlots">
<el-input
v-model="queryParams.availableSlots"
placeholder="请输入可预约数量"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="总数量" prop="totalSlots">
<el-input
v-model="queryParams.totalSlots"
placeholder="请输入总数量"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
<el-option
v-for="dict in dict.type.vaccine_info_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="发布时间" prop="publishTime">
<el-date-picker clearable
v-model="queryParams.publishTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择发布时间">
</el-date-picker>
</el-form-item>
<el-form-item label="报名截止时间" prop="endTime">
<el-date-picker clearable
v-model="queryParams.endTime"
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="['system:vacInfo: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="['system:vacInfo: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="['system:vacInfo: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="['system:vacInfo:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="vacInfoList" @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="title" />
<!-- 新增牲畜类型列 -->
<el-table-column label="牲畜类型" align="center" prop="livestockType">
<template slot-scope="scope">
<dict-tag :options="dict.type.livestock_type" :value="scope.row.livestockType"/>
</template>
</el-table-column>
<el-table-column label="疫苗类型" align="center" prop="vaccineType">
<template slot-scope="scope">
<dict-tag :options="dict.type.vaccine_type" :value="scope.row.vaccineType"/>
</template>
</el-table-column>
<el-table-column label="详细描述" align="center" prop="description" />
<el-table-column label="接种日期" align="center" prop="vaccinationDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.vaccinationDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="接种地点" align="center" prop="vaccinationLocation" />
<el-table-column label="可预约数量" align="center" prop="availableSlots" />
<el-table-column label="总数量" align="center" prop="totalSlots" />
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.vaccine_info_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="发布时间" align="center" prop="publishTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.publishTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="报名截止时间" align="center" prop="endTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endTime, '{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="['system:vacInfo:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:vacInfo: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"
/>
<!-- 添加或修改疫苗信息对话框加宽到800px -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="疫苗标题" prop="title">
<el-input v-model="form.title" placeholder="请输入疫苗标题" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="牲畜类型" prop="livestockType">
<el-select v-model="form.livestockType" placeholder="请选择牲畜类型" clearable @change="handleLivestockTypeChange">
<el-option
v-for="dict in dict.type.livestock_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="疫苗类型" prop="vaccineType">
<el-select
v-model="form.vaccineType"
placeholder="请先选择牲畜类型"
clearable
:disabled="!form.livestockType"
@change="handleVaccineTypeChange"
@focus="handleVaccineTypeFocus"
filterable
>
<el-option
v-for="item in vaccineTypeOptions"
:key="item.id"
:label="getVaccineDisplayName(item)"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="状态" prop="status">
<el-select v-model="form.status" placeholder="请选择状态">
<el-option
v-for="dict in dict.type.vaccine_info_status"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="详细描述">
<editor v-model="form.description" :min-height="192"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="接种日期" prop="vaccinationDate">
<el-date-picker clearable
v-model="form.vaccinationDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择接种日期"
style="width: 100%;">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="接种地点" prop="vaccinationLocation">
<el-input v-model="form.vaccinationLocation" placeholder="请输入接种地点" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="可预约数量" prop="availableSlots">
<el-input v-model="form.availableSlots" placeholder="请输入可预约数量" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="总数量" prop="totalSlots">
<el-input v-model="form.totalSlots" placeholder="请输入总数量" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="发布时间" prop="publishTime">
<el-date-picker clearable
v-model="form.publishTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择发布时间"
style="width: 100%;">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报名截止时间" prop="endTime">
<el-date-picker clearable
v-model="form.endTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择报名截止时间"
style="width: 100%;">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<!-- 疫苗详细信息展示当选择了疫苗时显示 -->
<div v-if="selectedVaccine" style="margin: 20px 0; border: 1px solid #ebeef5; border-radius: 4px; padding: 15px;">
<div style="font-weight: bold; margin-bottom: 10px; color: #409EFF;">疫苗详细信息</div>
<el-descriptions :column="2" border size="small">
<el-descriptions-item label="通用名称">{{ selectedVaccine.genericName || '暂无' }}</el-descriptions-item>
<el-descriptions-item label="商品名称">{{ selectedVaccine.tradeName || '暂无' }}</el-descriptions-item>
<el-descriptions-item label="兽药批准文号">{{ selectedVaccine.approvalNumber || '暂无' }}</el-descriptions-item>
<el-descriptions-item label="产品批号">{{ selectedVaccine.batchNumber || '暂无' }}</el-descriptions-item>
<el-descriptions-item label="规格">{{ selectedVaccine.specification || '暂无' }}</el-descriptions-item>
<el-descriptions-item label="生产厂家">{{ selectedVaccine.manufacturer || '暂无' }}</el-descriptions-item>
<el-descriptions-item label="生产日期">{{ parseTime(selectedVaccine.manufactureDate, '{y}-{m}-{d}') || '暂无' }}</el-descriptions-item>
<el-descriptions-item label="有效期至">{{ parseTime(selectedVaccine.expiryDate, '{y}-{m}-{d}') || '暂无' }}</el-descriptions-item>
<el-descriptions-item label="适用动物" :span="2">
<dict-tag :options="dict.type.livestock_type" :value="selectedVaccine.livestockType"/>
</el-descriptions-item>
<el-descriptions-item label="预防疫病">{{ selectedVaccine.preventDisease || '暂无' }}</el-descriptions-item>
<el-descriptions-item label="是否强制免疫">{{ selectedVaccine.isMandatory === '1' ? '是' : '否' }}</el-descriptions-item>
<el-descriptions-item label="免疫期(天)">{{ selectedVaccine.immunePeriod || '暂无' }}</el-descriptions-item>
<el-descriptions-item label="用法用量">{{ selectedVaccine.dosage || '暂无' }}</el-descriptions-item>
<el-descriptions-item label="接种途径">{{ selectedVaccine.administrationRoute || '暂无' }}</el-descriptions-item>
<el-descriptions-item label="贮藏条件">{{ selectedVaccine.storageCondition || '暂无' }}</el-descriptions-item>
<el-descriptions-item label="注意事项">{{ selectedVaccine.precautions || '暂无' }}</el-descriptions-item>
<el-descriptions-item label="库存数量">{{ selectedVaccine.stockQuantity || '暂无' }}</el-descriptions-item>
<el-descriptions-item label="已使用数量">{{ selectedVaccine.usedQuantity || '暂无' }}</el-descriptions-item>
</el-descriptions>
</div>
<el-row>
<el-col :span="12">
<el-form-item label="删除标志" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入删除标志" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="创建者" prop="createBy">
<el-input v-model="form.createBy" placeholder="请输入创建者" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" :rows="3" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listVacInfo, getVacInfo, delVacInfo, addVacInfo, updateVacInfo } from "@/api/system/vacInfo"
import { getVacCategorylist } from "@/api/system/vacInfo"
export default {
name: "VacInfo",
dicts: ['vaccine_type', 'vaccine_info_status', 'livestock_type'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
vacInfoList: [],
//
title: "",
//
open: false,
//
vaccineTypeOptions: [],
//
selectedVaccine: null,
//
queryParams: {
pageNum: 1,
pageSize: 10,
title: null,
livestockType: null,
vaccineType: null,
description: null,
vaccinationDate: null,
vaccinationLocation: null,
availableSlots: null,
totalSlots: null,
status: null,
publishTime: null,
endTime: null,
},
//
form: {},
//
rules: {
title: [
{ required: true, message: "疫苗标题不能为空", trigger: "blur" }
],
livestockType: [
{ required: true, message: "牲畜类型不能为空", trigger: "change" }
],
vaccineType: [
{ required: true, message: "疫苗类型不能为空", trigger: "change" }
],
description: [
{ required: true, message: "详细描述不能为空", trigger: "blur" }
],
vaccinationDate: [
{ required: true, message: "接种日期不能为空", trigger: "blur" }
],
vaccinationLocation: [
{ required: true, message: "接种地点不能为空", trigger: "blur" }
],
availableSlots: [
{ required: true, message: "可预约数量不能为空", trigger: "blur" }
],
totalSlots: [
{ required: true, message: "总数量不能为空", trigger: "blur" }
],
status: [
{ required: true, message: "状态:1-进行中 2-已结束 3-已取消不能为空", trigger: "change" }
],
publishTime: [
{ required: true, message: "发布时间不能为空", trigger: "blur" }
],
endTime: [
{ required: true, message: "报名截止时间不能为空", trigger: "blur" }
],
}
}
},
created() {
this.getList()
},
methods: {
/** 查询疫苗信息列表 */
getList() {
this.loading = true
listVacInfo(this.queryParams).then(response => {
this.vacInfoList = response.rows
this.total = response.total
this.loading = false
})
},
/** 获取疫苗显示名称 */
getVaccineDisplayName(vaccine) {
if (!vaccine) return '';
let displayName = vaccine.genericName || vaccine.tradeName || '未知疫苗';
if (vaccine.approvalNumber) {
displayName += ` (${vaccine.approvalNumber})`;
}
if (vaccine.batchNumber) {
displayName += ` - ${vaccine.batchNumber}`;
}
return displayName;
},
/** 牲畜类型变化时处理 */
handleLivestockTypeChange(livestockType) {
if (livestockType) {
//
this.form.vaccineType = null;
this.selectedVaccine = null;
this.vaccineTypeOptions = [];
} else {
this.form.vaccineType = null;
this.selectedVaccine = null;
this.vaccineTypeOptions = [];
}
},
/** 疫苗类型获得焦点时加载选项 */
handleVaccineTypeFocus() {
if (this.form.livestockType && this.vaccineTypeOptions.length === 0) {
this.loadVaccineOptions(this.form.livestockType);
}
},
/** 疫苗类型变化时更新详细信息 */
handleVaccineTypeChange(vaccineId) {
if (vaccineId) {
this.updateSelectedVaccine(vaccineId);
} else {
this.selectedVaccine = null;
}
},
/** 加载疫苗选项 */
loadVaccineOptions(livestockType) {
const query = { livestockType: livestockType };
getVacCategorylist(query).then(response => {
this.vaccineTypeOptions = response.rows || [];
}).catch(() => {
this.vaccineTypeOptions = [];
this.$message.error('获取疫苗列表失败');
});
},
/** 更新选中的疫苗详细信息 */
updateSelectedVaccine(vaccineId) {
if (vaccineId) {
const vaccine = this.vaccineTypeOptions.find(item => item.id == vaccineId);
this.selectedVaccine = vaccine || null;
} else {
this.selectedVaccine = null;
}
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
id: null,
title: null,
livestockType: null,
vaccineType: null,
description: null,
vaccinationDate: null,
vaccinationLocation: null,
availableSlots: null,
totalSlots: null,
status: null,
publishTime: null,
endTime: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null
}
this.vaccineTypeOptions = [];
this.selectedVaccine = null;
this.resetForm("form")
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm")
this.handleQuery()
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = "添加疫苗信息"
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const id = row.id || this.ids
getVacInfo(id).then(response => {
this.form = response.data
this.open = true
this.title = "修改疫苗信息"
//
if (this.form.livestockType && this.form.vaccineType) {
//
this.loadVaccineOptions(this.form.livestockType).then(() => {
//
this.updateSelectedVaccine(this.form.vaccineType);
});
}
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateVacInfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功")
this.open = false
this.getList()
})
} else {
addVacInfo(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 delVacInfo(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
this.download('system/vacInfo/export', {
...this.queryParams
}, `vacInfo_${new Date().getTime()}.xlsx`)
}
}
}
</script>
Loading…
Cancel
Save