diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwPortalConfigTypeServiceImpl.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwPortalConfigTypeServiceImpl.java index 5b5fde3..bc2f148 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwPortalConfigTypeServiceImpl.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwPortalConfigTypeServiceImpl.java @@ -1,8 +1,11 @@ package com.ruoyi.portal.service.impl; +import com.ruoyi.common.core.constant.UserConstants; +import com.ruoyi.common.core.exception.ServiceException; import com.ruoyi.common.core.utils.DateUtils; import com.ruoyi.common.core.utils.SpringUtils; import com.ruoyi.common.core.utils.StringUtils; +import com.ruoyi.common.security.utils.SecurityUtils; import com.ruoyi.portal.domain.HwPortalConfigType; import com.ruoyi.portal.domain.vo.TreeSelect; import com.ruoyi.portal.mapper.HwPortalConfigTypeMapper; @@ -61,7 +64,17 @@ public class HwPortalConfigTypeServiceImpl implements IHwPortalConfigTypeService @Override public int insertHwPortalConfigType(HwPortalConfigType hwPortalConfigType) { + if (hwPortalConfigType.getParentId() == null) { + hwPortalConfigType.setParentId(0L); + hwPortalConfigType.setAncestors("0"); + } else { + HwPortalConfigType info = hwPortalConfigTypeMapper.selectHwPortalConfigTypeByConfigTypeId(hwPortalConfigType.getParentId()); + + hwPortalConfigType.setAncestors(info.getAncestors() + "," + hwPortalConfigType.getParentId()); + } + hwPortalConfigType.setCreateTime(DateUtils.getNowDate()); + hwPortalConfigType.setCreateBy(SecurityUtils.getUsername()); return hwPortalConfigTypeMapper.insertHwPortalConfigType(hwPortalConfigType); } diff --git a/ruoyi-ui/src/views/portal/portalConfig/index.vue b/ruoyi-ui/src/views/portal/portalConfig/index.vue index 4bbf274..a83231b 100644 --- a/ruoyi-ui/src/views/portal/portalConfig/index.vue +++ b/ruoyi-ui/src/views/portal/portalConfig/index.vue @@ -84,9 +84,14 @@ - - - + + + + + + + + - + @@ -126,35 +131,44 @@ - + + + + + + + + + + + + + 门户网站配置类型 + + - - - - - - - - - - - + + + + + + + + 配置产品中心和案例的分类,其中顶级类型需配置首页显示的名称,类型备注和显示的图片,子级分类用来配置产品中心和案例与客户中的分类信息 + - - + + + + - - - + + + + + + + + - - + + + + + + + @@ -89,15 +104,22 @@ - - + + - - + + + + - + @@ -108,7 +130,14 @@ - + + + + + + 图标 + + + + + + + + 图片 + +
配置产品中心和案例的分类,其中顶级类型需配置首页显示的名称,类型备注和显示的图片,子级分类用来配置产品中心和案例与客户中的分类信息