Browse Source

权限问题

master
maotiantian 15 hours ago
parent
commit
c3370f175c
  1. 15
      chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/CarouselAdsController.java
  2. 14
      chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/DisasterWarningController.java
  3. 18
      chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MerchantMapInfoController.java
  4. 110
      chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuServiceGuideController.java
  5. 26
      chenhai-system/src/main/java/com/chenhai/muhu/domain/MerchantMapInfo.java
  6. 158
      chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuServiceGuide.java
  7. 61
      chenhai-system/src/main/java/com/chenhai/muhu/mapper/MuhuServiceGuideMapper.java
  8. 61
      chenhai-system/src/main/java/com/chenhai/muhu/service/IMuhuServiceGuideService.java
  9. 93
      chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuServiceGuideServiceImpl.java
  10. 39
      chenhai-system/src/main/resources/mapper/muhu/MerchantMapInfoMapper.xml
  11. 91
      chenhai-system/src/main/resources/mapper/muhu/MuhuServiceGuideMapper.xml
  12. 44
      chenhai-ui/src/api/muhu/guide.js
  13. 44
      chenhai-ui/src/api/muhu/info.js
  14. 44
      chenhai-ui/src/api/system/base.js
  15. 304
      chenhai-ui/src/views/muhu/guide/index.vue
  16. 322
      chenhai-ui/src/views/system/base/index.vue
  17. 2
      chenhai-ui/src/views/vet/certificate/index.vue

15
chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/CarouselAdsController.java

@ -44,7 +44,8 @@ public class CarouselAdsController extends BaseController
/**
* 导出轮播广告列表
*/
@PreAuthorize("@ss.hasPermi('muhu:ads:export')")
// @PreAuthorize("@ss.hasPermi('muhu:ads:export')")
@PreAuthorize("@ss.hasRole('muhu')")
@Log(title = "轮播广告", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, CarouselAds carouselAds)
@ -57,7 +58,8 @@ public class CarouselAdsController extends BaseController
/**
* 获取轮播广告详细信息
*/
@PreAuthorize("@ss.hasPermi('muhu:ads:query')")
// @PreAuthorize("@ss.hasPermi('muhu:ads:query')")
@PreAuthorize("@ss.hasRole('muhu')")
@GetMapping(value = "/{carouselId}")
public AjaxResult getInfo(@PathVariable("carouselId") Long carouselId)
{
@ -67,7 +69,8 @@ public class CarouselAdsController extends BaseController
/**
* 新增轮播广告
*/
@PreAuthorize("@ss.hasPermi('muhu:ads:add')")
// @PreAuthorize("@ss.hasPermi('muhu:ads:add')")
@PreAuthorize("@ss.hasRole('muhu')")
@Log(title = "轮播广告", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody CarouselAds carouselAds)
@ -78,7 +81,8 @@ public class CarouselAdsController extends BaseController
/**
* 修改轮播广告
*/
@PreAuthorize("@ss.hasPermi('muhu:ads:edit')")
// @PreAuthorize("@ss.hasPermi('muhu:ads:edit')")
@PreAuthorize("@ss.hasRole('muhu')")
@Log(title = "轮播广告", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody CarouselAds carouselAds)
@ -89,7 +93,8 @@ public class CarouselAdsController extends BaseController
/**
* 删除轮播广告
*/
@PreAuthorize("@ss.hasPermi('muhu:ads:remove')")
// @PreAuthorize("@ss.hasPermi('muhu:ads:remove')")
@PreAuthorize("@ss.hasRole('muhu')")
@Log(title = "轮播广告", businessType = BusinessType.DELETE)
@DeleteMapping("/{carouselIds}")
public AjaxResult remove(@PathVariable Long[] carouselIds)

14
chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/DisasterWarningController.java

@ -37,7 +37,8 @@ public class DisasterWarningController extends BaseController
/**
* 查询灾害预警信息列表
*/
@PreAuthorize("@ss.hasPermi('muhu:warning:list')")
// @PreAuthorize("@ss.hasPermi('muhu:warning:list')")
@PreAuthorize("@ss.hasRole('muhu')")
@GetMapping("/list")
public TableDataInfo list(DisasterWarning disasterWarning)
{
@ -49,7 +50,8 @@ public class DisasterWarningController extends BaseController
/**
* 导出灾害预警信息列表
*/
@PreAuthorize("@ss.hasPermi('muhu:warning:export')")
// @PreAuthorize("@ss.hasPermi('muhu:warning:export')")
@PreAuthorize("@ss.hasRole('muhu')")
@Log(title = "灾害预警信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DisasterWarning disasterWarning)
@ -62,7 +64,8 @@ public class DisasterWarningController extends BaseController
/**
* 获取灾害预警信息详细信息
*/
@PreAuthorize("@ss.hasPermi('muhu:warning:query')")
// @PreAuthorize("@ss.hasPermi('muhu:warning:query')")
@PreAuthorize("@ss.hasRole('muhu')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
@ -72,7 +75,8 @@ public class DisasterWarningController extends BaseController
/**
* 新增灾害预警信息
*/
@PreAuthorize("@ss.hasPermi('muhu:warning:add')")
// @PreAuthorize("@ss.hasPermi('muhu:warning:add')")
@PreAuthorize("@ss.hasRole('muhu')")
@Log(title = "灾害预警信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DisasterWarning disasterWarning)
@ -83,7 +87,7 @@ public class DisasterWarningController extends BaseController
/**
* 修改灾害预警信息
*/
@PreAuthorize("@ss.hasPermi('muhu:warning:edit')")
// @PreAuthorize("@ss.hasPermi('muhu:warning:edit')")
@Log(title = "灾害预警信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DisasterWarning disasterWarning)

18
chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MerchantMapInfoController.java

@ -37,7 +37,8 @@ public class MerchantMapInfoController extends BaseController
/**
* 查询商户地图信息列表
*/
@PreAuthorize("@ss.hasPermi('muhu:info:list')")
// @PreAuthorize("@ss.hasPermi('muhu:info:list')")
@PreAuthorize("@ss.hasRole('muhu')")
@GetMapping("/list")
public TableDataInfo list(MerchantMapInfo merchantMapInfo)
{
@ -49,7 +50,8 @@ public class MerchantMapInfoController extends BaseController
/**
* 导出商户地图信息列表
*/
@PreAuthorize("@ss.hasPermi('muhu:info:export')")
// @PreAuthorize("@ss.hasPermi('muhu:info:export')")
@PreAuthorize("@ss.hasRole('muhu')")
@Log(title = "商户地图信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MerchantMapInfo merchantMapInfo)
@ -62,7 +64,8 @@ public class MerchantMapInfoController extends BaseController
/**
* 获取商户地图信息详细信息
*/
@PreAuthorize("@ss.hasPermi('muhu:info:query')")
// @PreAuthorize("@ss.hasPermi('muhu:info:query')")
@PreAuthorize("@ss.hasRole('muhu')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
@ -72,7 +75,8 @@ public class MerchantMapInfoController extends BaseController
/**
* 新增商户地图信息
*/
@PreAuthorize("@ss.hasPermi('muhu:info:add')")
// @PreAuthorize("@ss.hasPermi('muhu:info:add')")
@PreAuthorize("@ss.hasRole('muhu')")
@Log(title = "商户地图信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MerchantMapInfo merchantMapInfo)
@ -83,7 +87,8 @@ public class MerchantMapInfoController extends BaseController
/**
* 修改商户地图信息
*/
@PreAuthorize("@ss.hasPermi('muhu:info:edit')")
// @PreAuthorize("@ss.hasPermi('muhu:info:edit')")
@PreAuthorize("@ss.hasRole('muhu')")
@Log(title = "商户地图信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MerchantMapInfo merchantMapInfo)
@ -94,7 +99,8 @@ public class MerchantMapInfoController extends BaseController
/**
* 删除商户地图信息
*/
@PreAuthorize("@ss.hasPermi('muhu:info:remove')")
// @PreAuthorize("@ss.hasPermi('muhu:info:remove')")
@PreAuthorize("@ss.hasRole('muhu')")
@Log(title = "商户地图信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)

110
chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuServiceGuideController.java

@ -0,0 +1,110 @@
package com.chenhai.web.controller.muhu;
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.muhu.domain.MuhuServiceGuide;
import com.chenhai.muhu.service.IMuhuServiceGuideService;
import com.chenhai.common.utils.poi.ExcelUtil;
import com.chenhai.common.core.page.TableDataInfo;
/**
* 办事指南Controller
*
* @author ruoyi
* @date 2025-12-31
*/
@RestController
@RequestMapping("/muhu/guide")
public class MuhuServiceGuideController extends BaseController
{
@Autowired
private IMuhuServiceGuideService muhuServiceGuideService;
/**
* 查询办事指南列表
*/
// @PreAuthorize("@ss.hasPermi('muhu:guide:list')")
@PreAuthorize("@ss.hasRole('muhu')")
@GetMapping("/list")
public TableDataInfo list(MuhuServiceGuide muhuServiceGuide)
{
startPage();
List<MuhuServiceGuide> list = muhuServiceGuideService.selectMuhuServiceGuideList(muhuServiceGuide);
return getDataTable(list);
}
/**
* 导出办事指南列表
*/
// @PreAuthorize("@ss.hasPermi('muhu:guide:export')")
@PreAuthorize("@ss.hasRole('muhu')")
@Log(title = "办事指南", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MuhuServiceGuide muhuServiceGuide)
{
List<MuhuServiceGuide> list = muhuServiceGuideService.selectMuhuServiceGuideList(muhuServiceGuide);
ExcelUtil<MuhuServiceGuide> util = new ExcelUtil<MuhuServiceGuide>(MuhuServiceGuide.class);
util.exportExcel(response, list, "办事指南数据");
}
/**
* 获取办事指南详细信息
*/
// @PreAuthorize("@ss.hasPermi('muhu:guide:query')")
@PreAuthorize("@ss.hasRole('muhu')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(muhuServiceGuideService.selectMuhuServiceGuideById(id));
}
/**
* 新增办事指南
*/
// @PreAuthorize("@ss.hasPermi('muhu:guide:add')")
@PreAuthorize("@ss.hasRole('muhu')")
@Log(title = "办事指南", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MuhuServiceGuide muhuServiceGuide)
{
return toAjax(muhuServiceGuideService.insertMuhuServiceGuide(muhuServiceGuide));
}
/**
* 修改办事指南
*/
// @PreAuthorize("@ss.hasPermi('muhu:guide:edit')")
@PreAuthorize("@ss.hasRole('muhu')")
@Log(title = "办事指南", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MuhuServiceGuide muhuServiceGuide)
{
return toAjax(muhuServiceGuideService.updateMuhuServiceGuide(muhuServiceGuide));
}
/**
* 删除办事指南
*/
// @PreAuthorize("@ss.hasPermi('muhu:guide:remove')")
@PreAuthorize("@ss.hasRole('muhu')")
@Log(title = "办事指南", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(muhuServiceGuideService.deleteMuhuServiceGuideByIds(ids));
}
}

26
chenhai-system/src/main/java/com/chenhai/muhu/domain/MerchantMapInfo.java

@ -21,7 +21,7 @@ public class MerchantMapInfo extends BaseEntity
/** 商户名称 */
@Excel(name = "商户名称")
private String merchantName;
private String title;
/** 商户类型:药店/兽医诊所/畜牧站/农牧局/其他 */
@Excel(name = "商户类型:药店/兽医诊所/畜牧站/农牧局/其他")
@ -47,6 +47,19 @@ public class MerchantMapInfo extends BaseEntity
@Excel(name = "经度")
private BigDecimal longitude;
@Excel(name = "图标")
private String iconPath;
public void setIconPath(String iconPath)
{
this.iconPath = iconPath;
}
public String getIconPath()
{
return iconPath;
}
public void setId(Long id)
{
this.id = id;
@ -57,14 +70,14 @@ public class MerchantMapInfo extends BaseEntity
return id;
}
public void setMerchantName(String merchantName)
public void setTitle(String title)
{
this.merchantName = merchantName;
this.title = title;
}
public String getMerchantName()
public String getTitle()
{
return merchantName;
return title;
}
public void setMerchantType(String merchantType)
@ -131,13 +144,14 @@ public class MerchantMapInfo extends BaseEntity
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("merchantName", getMerchantName())
.append("title", getTitle())
.append("merchantType", getMerchantType())
.append("merchantSubtype", getMerchantSubtype())
.append("region", getRegion())
.append("address", getAddress())
.append("latitude", getLatitude())
.append("longitude", getLongitude())
.append("iconPath", getIconPath())
.toString();
}
}

158
chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuServiceGuide.java

@ -0,0 +1,158 @@
package com.chenhai.muhu.domain;
import java.math.BigDecimal;
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;
/**
* 办事指南对象 muhu_service_guide
*
* @author ruoyi
* @date 2025-12-31
*/
public class MuhuServiceGuide extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 商户ID */
private Long id;
/** 图标 */
@Excel(name = "图标")
private String iconPath;
/** 商户名称 */
@Excel(name = "商户名称")
private String title;
/** 商户类型:药店/兽医诊所/畜牧站/农牧局/其他 */
@Excel(name = "商户类型:药店/兽医诊所/畜牧站/农牧局/其他")
private String guideType;
/** 商户子类型(如:药店_兽药、药店_人药) */
@Excel(name = "商户子类型", readConverterExp = "如=:药店_兽药、药店_人药")
private String merchantSubtype;
/** 所在区域 */
@Excel(name = "所在区域")
private String region;
/** 详细地址 */
@Excel(name = "详细地址")
private String address;
/** 纬度 */
@Excel(name = "纬度")
private BigDecimal latitude;
/** 经度 */
@Excel(name = "经度")
private BigDecimal longitude;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setIconPath(String iconPath)
{
this.iconPath = iconPath;
}
public String getIconPath()
{
return iconPath;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public void setGuideType(String guideType)
{
this.guideType = guideType;
}
public String getGuideType()
{
return guideType;
}
public void setMerchantSubtype(String merchantSubtype)
{
this.merchantSubtype = merchantSubtype;
}
public String getMerchantSubtype()
{
return merchantSubtype;
}
public void setRegion(String region)
{
this.region = region;
}
public String getRegion()
{
return region;
}
public void setAddress(String address)
{
this.address = address;
}
public String getAddress()
{
return address;
}
public void setLatitude(BigDecimal latitude)
{
this.latitude = latitude;
}
public BigDecimal getLatitude()
{
return latitude;
}
public void setLongitude(BigDecimal longitude)
{
this.longitude = longitude;
}
public BigDecimal getLongitude()
{
return longitude;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("iconPath", getIconPath())
.append("title", getTitle())
.append("guideType", getGuideType())
.append("merchantSubtype", getMerchantSubtype())
.append("region", getRegion())
.append("address", getAddress())
.append("latitude", getLatitude())
.append("longitude", getLongitude())
.toString();
}
}

61
chenhai-system/src/main/java/com/chenhai/muhu/mapper/MuhuServiceGuideMapper.java

@ -0,0 +1,61 @@
package com.chenhai.muhu.mapper;
import java.util.List;
import com.chenhai.muhu.domain.MuhuServiceGuide;
/**
* 办事指南Mapper接口
*
* @author ruoyi
* @date 2025-12-31
*/
public interface MuhuServiceGuideMapper
{
/**
* 查询办事指南
*
* @param id 办事指南主键
* @return 办事指南
*/
public MuhuServiceGuide selectMuhuServiceGuideById(Long id);
/**
* 查询办事指南列表
*
* @param muhuServiceGuide 办事指南
* @return 办事指南集合
*/
public List<MuhuServiceGuide> selectMuhuServiceGuideList(MuhuServiceGuide muhuServiceGuide);
/**
* 新增办事指南
*
* @param muhuServiceGuide 办事指南
* @return 结果
*/
public int insertMuhuServiceGuide(MuhuServiceGuide muhuServiceGuide);
/**
* 修改办事指南
*
* @param muhuServiceGuide 办事指南
* @return 结果
*/
public int updateMuhuServiceGuide(MuhuServiceGuide muhuServiceGuide);
/**
* 删除办事指南
*
* @param id 办事指南主键
* @return 结果
*/
public int deleteMuhuServiceGuideById(Long id);
/**
* 批量删除办事指南
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteMuhuServiceGuideByIds(Long[] ids);
}

61
chenhai-system/src/main/java/com/chenhai/muhu/service/IMuhuServiceGuideService.java

@ -0,0 +1,61 @@
package com.chenhai.muhu.service;
import java.util.List;
import com.chenhai.muhu.domain.MuhuServiceGuide;
/**
* 办事指南Service接口
*
* @author ruoyi
* @date 2025-12-31
*/
public interface IMuhuServiceGuideService
{
/**
* 查询办事指南
*
* @param id 办事指南主键
* @return 办事指南
*/
public MuhuServiceGuide selectMuhuServiceGuideById(Long id);
/**
* 查询办事指南列表
*
* @param muhuServiceGuide 办事指南
* @return 办事指南集合
*/
public List<MuhuServiceGuide> selectMuhuServiceGuideList(MuhuServiceGuide muhuServiceGuide);
/**
* 新增办事指南
*
* @param muhuServiceGuide 办事指南
* @return 结果
*/
public int insertMuhuServiceGuide(MuhuServiceGuide muhuServiceGuide);
/**
* 修改办事指南
*
* @param muhuServiceGuide 办事指南
* @return 结果
*/
public int updateMuhuServiceGuide(MuhuServiceGuide muhuServiceGuide);
/**
* 批量删除办事指南
*
* @param ids 需要删除的办事指南主键集合
* @return 结果
*/
public int deleteMuhuServiceGuideByIds(Long[] ids);
/**
* 删除办事指南信息
*
* @param id 办事指南主键
* @return 结果
*/
public int deleteMuhuServiceGuideById(Long id);
}

93
chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuServiceGuideServiceImpl.java

@ -0,0 +1,93 @@
package com.chenhai.muhu.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.chenhai.muhu.mapper.MuhuServiceGuideMapper;
import com.chenhai.muhu.domain.MuhuServiceGuide;
import com.chenhai.muhu.service.IMuhuServiceGuideService;
/**
* 办事指南Service业务层处理
*
* @author ruoyi
* @date 2025-12-31
*/
@Service
public class MuhuServiceGuideServiceImpl implements IMuhuServiceGuideService
{
@Autowired
private MuhuServiceGuideMapper muhuServiceGuideMapper;
/**
* 查询办事指南
*
* @param id 办事指南主键
* @return 办事指南
*/
@Override
public MuhuServiceGuide selectMuhuServiceGuideById(Long id)
{
return muhuServiceGuideMapper.selectMuhuServiceGuideById(id);
}
/**
* 查询办事指南列表
*
* @param muhuServiceGuide 办事指南
* @return 办事指南
*/
@Override
public List<MuhuServiceGuide> selectMuhuServiceGuideList(MuhuServiceGuide muhuServiceGuide)
{
return muhuServiceGuideMapper.selectMuhuServiceGuideList(muhuServiceGuide);
}
/**
* 新增办事指南
*
* @param muhuServiceGuide 办事指南
* @return 结果
*/
@Override
public int insertMuhuServiceGuide(MuhuServiceGuide muhuServiceGuide)
{
return muhuServiceGuideMapper.insertMuhuServiceGuide(muhuServiceGuide);
}
/**
* 修改办事指南
*
* @param muhuServiceGuide 办事指南
* @return 结果
*/
@Override
public int updateMuhuServiceGuide(MuhuServiceGuide muhuServiceGuide)
{
return muhuServiceGuideMapper.updateMuhuServiceGuide(muhuServiceGuide);
}
/**
* 批量删除办事指南
*
* @param ids 需要删除的办事指南主键
* @return 结果
*/
@Override
public int deleteMuhuServiceGuideByIds(Long[] ids)
{
return muhuServiceGuideMapper.deleteMuhuServiceGuideByIds(ids);
}
/**
* 删除办事指南信息
*
* @param id 办事指南主键
* @return 结果
*/
@Override
public int deleteMuhuServiceGuideById(Long id)
{
return muhuServiceGuideMapper.deleteMuhuServiceGuideById(id);
}
}

39
chenhai-system/src/main/resources/mapper/muhu/MerchantMapInfoMapper.xml

@ -1,84 +1,89 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.chenhai.muhu.mapper.MerchantMapInfoMapper">
<resultMap type="MerchantMapInfo" id="MerchantMapInfoResult">
<result property="id" column="id" />
<result property="merchantName" column="merchant_name" />
<result property="title" column="title" />
<result property="merchantType" column="merchant_type" />
<result property="merchantSubtype" column="merchant_subtype" />
<result property="region" column="region" />
<result property="address" column="address" />
<result property="latitude" column="latitude" />
<result property="longitude" column="longitude" />
<result property="iconPath" column="icon_path"/> <!-- 改为 icon_path -->
</resultMap>
<sql id="selectMerchantMapInfoVo">
select id, merchant_name, merchant_type, merchant_subtype, region, address, latitude, longitude from merchant_map_info
select id, title, merchant_type, merchant_subtype, region, address, latitude, longitude, icon_path from muhu_merchant_map_info
</sql>
<select id="selectMerchantMapInfoList" parameterType="MerchantMapInfo" resultMap="MerchantMapInfoResult">
<include refid="selectMerchantMapInfoVo"/>
<where>
<if test="merchantName != null and merchantName != ''"> and merchant_name like concat('%', #{merchantName}, '%')</if>
<where>
<if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
<if test="merchantType != null and merchantType != ''"> and merchant_type = #{merchantType}</if>
<if test="merchantSubtype != null and merchantSubtype != ''"> and merchant_subtype = #{merchantSubtype}</if>
<if test="region != null and region != ''"> and region = #{region}</if>
<if test="address != null and address != ''"> and address = #{address}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="iconPath != null "> and icon_path = #{iconPath}</if> <!-- 改为 iconPath -->
</where>
</select>
<select id="selectMerchantMapInfoById" parameterType="Long" resultMap="MerchantMapInfoResult">
<include refid="selectMerchantMapInfoVo"/>
where id = #{id}
</select>
<insert id="insertMerchantMapInfo" parameterType="MerchantMapInfo" useGeneratedKeys="true" keyProperty="id">
insert into merchant_map_info
insert into muhu_merchant_map_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="merchantName != null and merchantName != ''">merchant_name,</if>
<if test="title != null and title != ''">title,</if>
<if test="merchantType != null and merchantType != ''">merchant_type,</if>
<if test="merchantSubtype != null">merchant_subtype,</if>
<if test="region != null and region != ''">region,</if>
<if test="address != null and address != ''">address,</if>
<if test="latitude != null">latitude,</if>
<if test="longitude != null">longitude,</if>
</trim>
<if test="iconPath != null">icon_path,</if> <!-- 改为 iconPath -->
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="merchantName != null and merchantName != ''">#{merchantName},</if>
<if test="title != null and title != ''">#{title},</if>
<if test="merchantType != null and merchantType != ''">#{merchantType},</if>
<if test="merchantSubtype != null">#{merchantSubtype},</if>
<if test="region != null and region != ''">#{region},</if>
<if test="address != null and address != ''">#{address},</if>
<if test="latitude != null">#{latitude},</if>
<if test="longitude != null">#{longitude},</if>
</trim>
<if test="iconPath != null">#{iconPath},</if> <!-- 改为 iconPath -->
</trim>
</insert>
<update id="updateMerchantMapInfo" parameterType="MerchantMapInfo">
update merchant_map_info
update muhu_merchant_map_info
<trim prefix="SET" suffixOverrides=",">
<if test="merchantName != null and merchantName != ''">merchant_name = #{merchantName},</if>
<if test="title != null and title != ''">title = #{title},</if> <!-- 注意:改为 title 而不是 merchant_name -->
<if test="merchantType != null and merchantType != ''">merchant_type = #{merchantType},</if>
<if test="merchantSubtype != null">merchant_subtype = #{merchantSubtype},</if>
<if test="region != null and region != ''">region = #{region},</if>
<if test="address != null and address != ''">address = #{address},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="iconPath != null">icon_path = #{iconPath},</if> <!-- 改为 iconPath -->
</trim>
where id = #{id}
</update>
<delete id="deleteMerchantMapInfoById" parameterType="Long">
delete from merchant_map_info where id = #{id}
delete from muhu_merchant_map_info where id = #{id}
</delete>
<delete id="deleteMerchantMapInfoByIds" parameterType="String">
delete from merchant_map_info where id in
delete from muhu_merchant_map_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

91
chenhai-system/src/main/resources/mapper/muhu/MuhuServiceGuideMapper.xml

@ -0,0 +1,91 @@
<?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.muhu.mapper.MuhuServiceGuideMapper">
<resultMap type="MuhuServiceGuide" id="MuhuServiceGuideResult">
<result property="id" column="id" />
<result property="iconPath" column="iconPath" />
<result property="title" column="title" />
<result property="guideType" column="guide_type" />
<result property="merchantSubtype" column="merchant_subtype" />
<result property="region" column="region" />
<result property="address" column="address" />
<result property="latitude" column="latitude" />
<result property="longitude" column="longitude" />
</resultMap>
<sql id="selectMuhuServiceGuideVo">
select id, iconPath, title, guide_type, merchant_subtype, region, address, latitude, longitude from muhu_service_guide
</sql>
<select id="selectMuhuServiceGuideList" parameterType="MuhuServiceGuide" resultMap="MuhuServiceGuideResult">
<include refid="selectMuhuServiceGuideVo"/>
<where>
<if test="iconPath != null and iconPath != ''"> and iconPath = #{iconPath}</if>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="guideType != null and guideType != ''"> and guide_type = #{guideType}</if>
<if test="merchantSubtype != null and merchantSubtype != ''"> and merchant_subtype = #{merchantSubtype}</if>
<if test="region != null and region != ''"> and region = #{region}</if>
<if test="address != null and address != ''"> and address = #{address}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
</where>
</select>
<select id="selectMuhuServiceGuideById" parameterType="Long" resultMap="MuhuServiceGuideResult">
<include refid="selectMuhuServiceGuideVo"/>
where id = #{id}
</select>
<insert id="insertMuhuServiceGuide" parameterType="MuhuServiceGuide" useGeneratedKeys="true" keyProperty="id">
insert into muhu_service_guide
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="iconPath != null">iconPath,</if>
<if test="title != null">title,</if>
<if test="guideType != null">guide_type,</if>
<if test="merchantSubtype != null">merchant_subtype,</if>
<if test="region != null">region,</if>
<if test="address != null">address,</if>
<if test="latitude != null">latitude,</if>
<if test="longitude != null">longitude,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="iconPath != null">#{iconPath},</if>
<if test="title != null">#{title},</if>
<if test="guideType != null">#{guideType},</if>
<if test="merchantSubtype != null">#{merchantSubtype},</if>
<if test="region != null">#{region},</if>
<if test="address != null">#{address},</if>
<if test="latitude != null">#{latitude},</if>
<if test="longitude != null">#{longitude},</if>
</trim>
</insert>
<update id="updateMuhuServiceGuide" parameterType="MuhuServiceGuide">
update muhu_service_guide
<trim prefix="SET" suffixOverrides=",">
<if test="iconPath != null">iconPath = #{iconPath},</if>
<if test="title != null">title = #{title},</if>
<if test="guideType != null">guide_type = #{guideType},</if>
<if test="merchantSubtype != null">merchant_subtype = #{merchantSubtype},</if>
<if test="region != null">region = #{region},</if>
<if test="address != null">address = #{address},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="longitude != null">longitude = #{longitude},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteMuhuServiceGuideById" parameterType="Long">
delete from muhu_service_guide where id = #{id}
</delete>
<delete id="deleteMuhuServiceGuideByIds" parameterType="String">
delete from muhu_service_guide where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

44
chenhai-ui/src/api/muhu/guide.js

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询办事指南列表
export function listGuide(query) {
return request({
url: '/muhu/guide/list',
method: 'get',
params: query
})
}
// 查询办事指南详细
export function getGuide(id) {
return request({
url: '/muhu/guide/' + id,
method: 'get'
})
}
// 新增办事指南
export function addGuide(data) {
return request({
url: '/muhu/guide',
method: 'post',
data: data
})
}
// 修改办事指南
export function updateGuide(data) {
return request({
url: '/muhu/guide',
method: 'put',
data: data
})
}
// 删除办事指南
export function delGuide(id) {
return request({
url: '/muhu/guide/' + id,
method: 'delete'
})
}

44
chenhai-ui/src/api/muhu/info.js

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询商户地图信息列表
export function listInfo(query) {
return request({
url: '/muhu/info/list',
method: 'get',
params: query
})
}
// 查询商户地图信息详细
export function getInfo(id) {
return request({
url: '/muhu/info/' + id,
method: 'get'
})
}
// 新增商户地图信息
export function addInfo(data) {
return request({
url: '/muhu/info',
method: 'post',
data: data
})
}
// 修改商户地图信息
export function updateInfo(data) {
return request({
url: '/muhu/info',
method: 'put',
data: data
})
}
// 删除商户地图信息
export function delInfo(id) {
return request({
url: '/muhu/info/' + id,
method: 'delete'
})
}

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

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询知识库管理列表
export function listBase(query) {
return request({
url: '/system/base/list',
method: 'get',
params: query
})
}
// 查询知识库管理详细
export function getBase(id) {
return request({
url: '/system/base/' + id,
method: 'get'
})
}
// 新增知识库管理
export function addBase(data) {
return request({
url: '/system/base',
method: 'post',
data: data
})
}
// 修改知识库管理
export function updateBase(data) {
return request({
url: '/system/base',
method: 'put',
data: data
})
}
// 删除知识库管理
export function delBase(id) {
return request({
url: '/system/base/' + id,
method: 'delete'
})
}

304
chenhai-ui/src/views/muhu/guide/index.vue

@ -0,0 +1,304 @@
<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="title">
<el-input
v-model="queryParams.title"
placeholder="请输入商户名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['muhu:guide: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="['muhu:guide: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="['muhu:guide: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="['muhu:guide:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="guideList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="图标" align="center" prop="iconPath" width="100">
<template slot-scope="scope">
<image-preview :src="scope.row.iconPath" :width="50" :height="50" />
</template>
</el-table-column> <el-table-column label="商户名称" align="center" prop="title" />
<el-table-column label="商户类型" align="center" prop="guideType">
<template slot-scope="scope">
<dict-tag :options="dict.type.guide_type" :value="scope.row.guideType" />
</template>
</el-table-column>
<el-table-column label="所在区域" align="center" prop="region" />
<el-table-column label="详细地址" align="center" prop="address" />
<el-table-column label="纬度" align="center" prop="latitude" />
<el-table-column label="经度" align="center" prop="longitude" />
<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="['muhu:guide:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['muhu:guide: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="guideType">
<el-select v-model="form.guideType" placeholder="请选择商户类型" clearable>
<el-option v-for="dict in dict.type.guide_type" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="商户名称" prop="title">
<el-input v-model="form.title" placeholder="请输入商户名称" />
</el-form-item>
<el-form-item label="所在区域" prop="region">
<el-input v-model="form.region" placeholder="请输入所在区域" />
</el-form-item>
<el-form-item label="详细地址" prop="address">
<el-input v-model="form.address" placeholder="请输入详细地址" />
</el-form-item>
<el-form-item label="纬度" prop="latitude">
<el-input v-model="form.latitude" placeholder="请输入纬度" />
</el-form-item>
<el-form-item label="经度" prop="longitude">
<el-input v-model="form.longitude" placeholder="请输入经度" />
</el-form-item>
<el-form-item label="图标" prop="iconPath">
<image-upload v-model="form.iconPath" />
</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 { listGuide, getGuide, delGuide, addGuide, updateGuide } from "@/api/muhu/guide"
export default {
name: "Guide",
dicts: ['guide_type'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
guideList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
iconPath: null,
title: null,
guideType: null,
merchantSubtype: null,
region: null,
address: null,
latitude: null,
longitude: null
},
//
form: {},
//
rules: {
title: [
{ required: true, message: "商户名称不能为空", trigger: "blur" }
],
guideType: [
{ required: true, message: "商户类型不能为空", trigger: "change" }
],
region: [
{ required: true, message: "所在区域不能为空", trigger: "blur" }
],
address: [
{ required: true, message: "详细地址不能为空", trigger: "blur" }
],
}
}
},
created() {
this.getList()
},
methods: {
/** 查询办事指南列表 */
getList() {
this.loading = true
listGuide(this.queryParams).then(response => {
this.guideList = response.rows
this.total = response.total
this.loading = false
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
id: null,
iconPath: null,
title: null,
guideType: null,
merchantSubtype: null,
region: null,
address: null,
latitude: null,
longitude: 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
getGuide(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) {
updateGuide(this.form).then(response => {
this.$modal.msgSuccess("修改成功")
this.open = false
this.getList()
})
} else {
addGuide(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 delGuide(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
this.download('muhu/guide/export', {
...this.queryParams
}, `guide_${new Date().getTime()}.xlsx`)
}
}
}
</script>

322
chenhai-ui/src/views/system/base/index.vue

@ -0,0 +1,322 @@
<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="title">
<el-input
v-model="queryParams.title"
placeholder="请输入知识标题"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="知识类别" prop="category">
<el-input
v-model="queryParams.category"
placeholder="请输入知识类别"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="作者" prop="author">
<el-input
v-model="queryParams.author"
placeholder="请输入作者"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:base: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:base: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:base: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:base:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="baseList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="知识标题" align="center" prop="title" />
<el-table-column label="知识类别" align="center" prop="category" />
<el-table-column label="关键词" align="center" prop="keywords" />
<el-table-column label="知识摘要" align="center" prop="summary" />
<el-table-column label="详细内容" align="center" prop="content" />
<el-table-column label="适用物种" align="center" prop="applicableSpecies" />
<el-table-column label="来源名称" align="center" prop="sourceName" />
<el-table-column label="作者" align="center" prop="author" />
<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" 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:base:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:base: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="title">
<el-input v-model="form.title" placeholder="请输入知识标题" />
</el-form-item>
<el-form-item label="知识类别" prop="category">
<el-input v-model="form.category" placeholder="请输入知识类别" />
</el-form-item>
<el-form-item label="关键词" prop="keywords">
<el-input v-model="form.keywords" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="知识摘要" prop="summary">
<el-input v-model="form.summary" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="详细内容">
<editor v-model="form.content" :min-height="192"/>
</el-form-item>
<el-form-item label="适用物种" prop="applicableSpecies">
<el-input v-model="form.applicableSpecies" placeholder="请输入适用物种,逗号分隔" />
</el-form-item>
<el-form-item label="来源名称" prop="sourceName">
<el-input v-model="form.sourceName" placeholder="请输入来源名称" />
</el-form-item>
<el-form-item label="作者" prop="author">
<el-input v-model="form.author" 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 { listBase, getBase, delBase, addBase, updateBase } from "@/api/system/base"
export default {
name: "Base",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
baseList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
title: null,
category: null,
keywords: null,
summary: null,
content: null,
applicableSpecies: null,
sourceName: null,
author: null,
createdTime: null,
updatedTime: null,
publishTime: null
},
//
form: {},
//
rules: {
title: [
{ required: true, message: "知识标题不能为空", trigger: "blur" }
],
category: [
{ required: true, message: "知识类别不能为空", trigger: "blur" }
],
content: [
{ required: true, message: "详细内容不能为空", trigger: "blur" }
],
}
}
},
created() {
this.getList()
},
methods: {
/** 查询知识库管理列表 */
getList() {
this.loading = true
listBase(this.queryParams).then(response => {
this.baseList = response.rows
this.total = response.total
this.loading = false
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
id: null,
title: null,
category: null,
keywords: null,
summary: null,
content: null,
applicableSpecies: null,
sourceName: null,
author: null,
createdTime: null,
updatedTime: null,
publishTime: 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
getBase(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) {
updateBase(this.form).then(response => {
this.$modal.msgSuccess("修改成功")
this.open = false
this.getList()
})
} else {
addBase(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 delBase(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
this.download('system/base/export', {
...this.queryParams
}, `base_${new Date().getTime()}.xlsx`)
}
}
}
</script>

2
chenhai-ui/src/views/vet/certificate/index.vue

@ -230,7 +230,7 @@
</template>
<script>
import { listCertificate, getCertificate, delCertificate, addCertificate, updateCertificate } from "@/api/system/certificate"
import { listCertificate, getCertificate, delCertificate, addCertificate, updateCertificate } from "@/api/vet/certificate"
export default {
name: "Certificate",

Loading…
Cancel
Save