Browse Source

refactor(gen): 重构代码生成功能移除VO和BO类

- 移除Controller中的VO和BO类导入及使用,统一使用实体类
- 移除Service层中的VO和BO类相关方法调用
- 移除Mapper层中的VO泛型参数
- 移除代码生成模板中的VO和BO相关模板文件
- 更新代码生成工具类中模板列表配置
- 在用户信息显示区域增加昵称字段支持
- 更新页面组件样式和布局优化
- 优化侧边栏和导航栏界面显示效果
JX.Li 2 weeks ago
parent
commit
02d2dfaaff
28 changed files with 288 additions and 1441 deletions
  1. 4 15
      nexo-modules/nexo-gen/src/main/java/com/nexo/gen/util/VelocityUtils.java
  2. 0 55
      nexo-modules/nexo-gen/src/main/resources/vm/java/bo.java.vm
  3. 13 15
      nexo-modules/nexo-gen/src/main/resources/vm/java/controller.java.vm
  4. 16 0
      nexo-modules/nexo-gen/src/main/resources/vm/java/domain.java.vm
  5. 1 2
      nexo-modules/nexo-gen/src/main/resources/vm/java/mapper.java.vm
  6. 6 8
      nexo-modules/nexo-gen/src/main/resources/vm/java/service.java.vm
  7. 19 23
      nexo-modules/nexo-gen/src/main/resources/vm/java/serviceImpl.java.vm
  8. 0 52
      nexo-modules/nexo-gen/src/main/resources/vm/java/vo.java.vm
  9. 0 19
      nexo-modules/nexo-gen/src/main/resources/vm/sql/oracle/sql.vm
  10. 0 20
      nexo-modules/nexo-gen/src/main/resources/vm/sql/postgres/sql.vm
  11. 0 486
      nexo-modules/nexo-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm
  12. 0 602
      nexo-modules/nexo-gen/src/main/resources/vm/vue/v3/index.vue.vm
  13. 0 1
      nexo-modules/nexo-gen/src/main/resources/vm/vue/v3/readme.txt
  14. BIN
      nexo-ui/src/assets/images/profile.jpg
  15. 2 2
      nexo-ui/src/assets/styles/nexo.scss
  16. 34 11
      nexo-ui/src/assets/styles/sidebar.scss
  17. 8 7
      nexo-ui/src/assets/styles/variables.scss
  18. 2 2
      nexo-ui/src/components/Breadcrumb/index.vue
  19. 1 1
      nexo-ui/src/components/Hamburger/index.vue
  20. 28 32
      nexo-ui/src/components/HeaderSearch/index.vue
  21. 20 3
      nexo-ui/src/layout/components/AppMain.vue
  22. 51 29
      nexo-ui/src/layout/components/Navbar.vue
  23. 69 48
      nexo-ui/src/layout/components/Sidebar/index.vue
  24. 3 3
      nexo-ui/src/settings.js
  25. 4 3
      nexo-ui/src/store/getters.js
  26. 1 1
      nexo-ui/src/store/modules/settings.js
  27. 5 0
      nexo-ui/src/store/modules/user.js
  28. 1 1
      nexo-ui/src/views/system/user/profile/userAvatar.vue

+ 4 - 15
nexo-modules/nexo-gen/src/main/java/com/nexo/gen/util/VelocityUtils.java

@@ -8,7 +8,6 @@ import com.nexo.common.core.constant.GenConstants;
 import com.nexo.common.core.utils.DateUtils;
 import com.nexo.common.core.utils.DateUtils;
 import com.nexo.common.core.utils.JsonUtils;
 import com.nexo.common.core.utils.JsonUtils;
 import com.nexo.common.core.utils.StringUtils;
 import com.nexo.common.core.utils.StringUtils;
-import com.nexo.common.mybatis.helper.DataBaseHelper;
 import com.nexo.gen.domain.GenTable;
 import com.nexo.gen.domain.GenTable;
 import com.nexo.gen.domain.GenTableColumn;
 import com.nexo.gen.domain.GenTableColumn;
 import lombok.AccessLevel;
 import lombok.AccessLevel;
@@ -132,20 +131,13 @@ public class VelocityUtils {
     public static List<String> getTemplateList(String tplCategory) {
     public static List<String> getTemplateList(String tplCategory) {
         List<String> templates = new ArrayList<String>();
         List<String> templates = new ArrayList<String>();
         templates.add("vm/java/domain.java.vm");
         templates.add("vm/java/domain.java.vm");
-        templates.add("vm/java/bo.java.vm");
-        templates.add("vm/java/vo.java.vm");
         templates.add("vm/java/mapper.java.vm");
         templates.add("vm/java/mapper.java.vm");
         templates.add("vm/java/service.java.vm");
         templates.add("vm/java/service.java.vm");
         templates.add("vm/java/serviceImpl.java.vm");
         templates.add("vm/java/serviceImpl.java.vm");
         templates.add("vm/java/controller.java.vm");
         templates.add("vm/java/controller.java.vm");
         templates.add("vm/xml/mapper.xml.vm");
         templates.add("vm/xml/mapper.xml.vm");
-        if (DataBaseHelper.isOracle()) {
-            templates.add("vm/sql/oracle/sql.vm");
-        } else if (DataBaseHelper.isPostgerSql()) {
-            templates.add("vm/sql/postgres/sql.vm");
-        } else {
-            templates.add("vm/sql/sql.vm");
-        }
+
+        templates.add("vm/sql/sql.vm");
         templates.add("vm/js/api.js.vm");
         templates.add("vm/js/api.js.vm");
         if (GenConstants.TPL_CRUD.equals(tplCategory)) {
         if (GenConstants.TPL_CRUD.equals(tplCategory)) {
             templates.add("vm/vue/index.vue.vm");
             templates.add("vm/vue/index.vue.vm");
@@ -269,9 +261,7 @@ public class VelocityUtils {
      */
      */
     public static void addDicts(Set<String> dicts, List<GenTableColumn> columns) {
     public static void addDicts(Set<String> dicts, List<GenTableColumn> columns) {
         for (GenTableColumn column : columns) {
         for (GenTableColumn column : columns) {
-            if (!column.isSuperColumn() && StringUtils.isNotEmpty(column.getDictType()) && StringUtils.equalsAny(
-                    column.getHtmlType(),
-                    new String[] { GenConstants.HTML_SELECT, GenConstants.HTML_RADIO, GenConstants.HTML_CHECKBOX })) {
+            if (!column.isSuperColumn() && StringUtils.isNotEmpty(column.getDictType()) && StringUtils.equalsAny(column.getHtmlType(), new String[]{GenConstants.HTML_SELECT, GenConstants.HTML_RADIO, GenConstants.HTML_CHECKBOX})) {
                 dicts.add("'" + column.getDictType() + "'");
                 dicts.add("'" + column.getDictType() + "'");
             }
             }
         }
         }
@@ -295,8 +285,7 @@ public class VelocityUtils {
      * @return 上级菜单ID字段
      * @return 上级菜单ID字段
      */
      */
     public static String getParentMenuId(Dict paramsObj) {
     public static String getParentMenuId(Dict paramsObj) {
-        if (CollUtil.isNotEmpty(paramsObj) && paramsObj.containsKey(GenConstants.PARENT_MENU_ID)
-                && StringUtils.isNotEmpty(paramsObj.getStr(GenConstants.PARENT_MENU_ID))) {
+        if (CollUtil.isNotEmpty(paramsObj) && paramsObj.containsKey(GenConstants.PARENT_MENU_ID) && StringUtils.isNotEmpty(paramsObj.getStr(GenConstants.PARENT_MENU_ID))) {
             return paramsObj.getStr(GenConstants.PARENT_MENU_ID);
             return paramsObj.getStr(GenConstants.PARENT_MENU_ID);
         }
         }
         return DEFAULT_PARENT_MENU_ID;
         return DEFAULT_PARENT_MENU_ID;

+ 0 - 55
nexo-modules/nexo-gen/src/main/resources/vm/java/bo.java.vm

@@ -1,55 +0,0 @@
-package ${packageName}.domain.bo;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import javax.validation.constraints.*;
-
-#foreach ($import in $importList)
-import ${import};
-#end
-#if($table.crud || $table.sub)
-#elseif($table.tree)
-import com.nexo.common.core.web.domain.TreeEntity;
-#end
-
-/**
- * ${functionName}业务对象
- *
- * @author ${author}
- * @date ${datetime}
- */
-#if($table.crud || $table.sub)
-#set($Entity="BaseEntity")
-#elseif($table.tree)
-#set($Entity="TreeEntity<${ClassName}Bo>")
-#end
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class ${ClassName}Bo extends ${Entity} {
-
-#foreach ($column in $columns)
-#if(!$table.isSuperColumn($column.javaField) && ($column.query || $column.insert || $column.edit))
-    /**
-     * $column.columnComment
-     */
-#if($column.insert && $column.edit)
-#set($Group="AddGroup.class, EditGroup.class")
-#elseif($column.insert)
-#set($Group="AddGroup.class")
-#elseif($column.edit)
-#set($Group="EditGroup.class")
-#end
-#if($column.required)
-#if($column.javaType == 'String')
-    @NotBlank(message = "$column.columnComment不能为空", groups = { $Group })
-#else
-    @NotNull(message = "$column.columnComment不能为空", groups = { $Group })
-#end
-#end
-    private $column.javaType $column.javaField;
-
-#end
-#end
-
-}

+ 13 - 15
nexo-modules/nexo-gen/src/main/resources/vm/java/controller.java.vm

@@ -12,8 +12,6 @@ import com.nexo.common.mybatis.core.page.PageQuery;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
-import ${packageName}.domain.vo.${ClassName}Vo;
-import ${packageName}.domain.bo.${ClassName}Bo;
 import ${packageName}.service.I${ClassName}Service;
 import ${packageName}.service.I${ClassName}Service;
 #if($table.crud || $table.sub)
 #if($table.crud || $table.sub)
 import com.nexo.common.mybatis.core.page.TableDataInfo;
 import com.nexo.common.mybatis.core.page.TableDataInfo;
@@ -47,12 +45,12 @@ public class ${ClassName}Controller extends BaseController {
     @SaCheckPermission("${permissionPrefix}:list")
     @SaCheckPermission("${permissionPrefix}:list")
     @GetMapping("/list")
     @GetMapping("/list")
 #if($table.crud || $table.sub)
 #if($table.crud || $table.sub)
-    public TableDataInfo<${ClassName}Vo> list(${ClassName}Bo bo, PageQuery pageQuery) {
-        return i${ClassName}Service.queryPageList(bo, pageQuery);
+    public TableDataInfo<${ClassName}> list(${ClassName} item, PageQuery pageQuery) {
+        return i${ClassName}Service.queryPageList(item, pageQuery);
     }
     }
 #elseif($table.tree)
 #elseif($table.tree)
-    public R<List<${ClassName}Vo>> list(${ClassName}Bo bo) {
-        List<${ClassName}Vo> list = i${ClassName}Service.queryList(bo);
+    public R<List<${ClassName}>> list(${ClassName} item) {
+        List<${ClassName}> list = i${ClassName}Service.queryList (item);
         return R.ok(list);
         return R.ok(list);
     }
     }
 #end
 #end
@@ -63,9 +61,9 @@ public class ${ClassName}Controller extends BaseController {
     @SaCheckPermission("${permissionPrefix}:export")
     @SaCheckPermission("${permissionPrefix}:export")
     @Log(title = "${functionName}", businessType = BusinessType.EXPORT)
     @Log(title = "${functionName}", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     @PostMapping("/export")
-    public void export(${ClassName}Bo bo, HttpServletResponse response) {
-        List<${ClassName}Vo> list = i${ClassName}Service.queryList(bo);
-        ExcelUtil.exportExcel(list, "${functionName}", ${ClassName}Vo.class, response);
+    public void export(${ClassName} item, HttpServletResponse response) {
+        List<${ClassName}> list = i${ClassName}Service.queryList (item);
+        ExcelUtil.exportExcel(list, "${functionName}", ${ClassName}.class, response);
     }
     }
 
 
     /**
     /**
@@ -75,7 +73,7 @@ public class ${ClassName}Controller extends BaseController {
      */
      */
     @SaCheckPermission("${permissionPrefix}:query")
     @SaCheckPermission("${permissionPrefix}:query")
     @GetMapping("/{${pkColumn.javaField}}")
     @GetMapping("/{${pkColumn.javaField}}")
-    public R<${ClassName}Vo> getInfo(@NotNull(message = "主键不能为空") @PathVariable ${pkColumn.javaType} ${pkColumn.javaField}) {
+    public R<${ClassName}> getInfo(@NotNull(message = "主键不能为空") @PathVariable ${pkColumn.javaType} ${pkColumn.javaField}) {
         return R.ok(i${ClassName}Service.queryById(${pkColumn.javaField}));
         return R.ok(i${ClassName}Service.queryById(${pkColumn.javaField}));
     }
     }
 
 
@@ -85,8 +83,8 @@ public class ${ClassName}Controller extends BaseController {
     @SaCheckPermission("${permissionPrefix}:add")
     @SaCheckPermission("${permissionPrefix}:add")
     @Log(title = "${functionName}", businessType = BusinessType.INSERT)
     @Log(title = "${functionName}", businessType = BusinessType.INSERT)
     @PostMapping()
     @PostMapping()
-    public R<Void> add(@Validated(AddGroup.class) @RequestBody ${ClassName}Bo bo) {
-        return toAjax(i${ClassName}Service.insertByBo(bo));
+    public R<id> add(@Validated(AddGroup.class) @Requestdy ${ClassName} item) {
+        return toAjax(i${ClassName}Service.insertBy (item));
     }
     }
 
 
     /**
     /**
@@ -95,8 +93,8 @@ public class ${ClassName}Controller extends BaseController {
     @SaCheckPermission("${permissionPrefix}:edit")
     @SaCheckPermission("${permissionPrefix}:edit")
     @Log(title = "${functionName}", businessType = BusinessType.UPDATE)
     @Log(title = "${functionName}", businessType = BusinessType.UPDATE)
     @PutMapping()
     @PutMapping()
-    public R<Void> edit(@Validated(EditGroup.class) @RequestBody ${ClassName}Bo bo) {
-        return toAjax(i${ClassName}Service.updateByBo(bo));
+    public R<id> edit(@Validated(EditGroup.class) @Requestdy ${ClassName} item) {
+        return toAjax(i${ClassName}Service.updateBy (item));
     }
     }
 
 
     /**
     /**
@@ -107,7 +105,7 @@ public class ${ClassName}Controller extends BaseController {
     @SaCheckPermission("${permissionPrefix}:remove")
     @SaCheckPermission("${permissionPrefix}:remove")
     @Log(title = "${functionName}", businessType = BusinessType.DELETE)
     @Log(title = "${functionName}", businessType = BusinessType.DELETE)
     @DeleteMapping("/{${pkColumn.javaField}s}")
     @DeleteMapping("/{${pkColumn.javaField}s}")
-    public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s) {
+    public R<id> remove(@NotEmpty(message = "主键不能为空") @PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s) {
         return toAjax(i${ClassName}Service.deleteWithValidByIds(Arrays.asList(${pkColumn.javaField}s), true));
         return toAjax(i${ClassName}Service.deleteWithValidByIds(Arrays.asList(${pkColumn.javaField}s), true));
     }
     }
 }
 }

+ 16 - 0
nexo-modules/nexo-gen/src/main/resources/vm/java/domain.java.vm

@@ -31,6 +31,7 @@ public class ${ClassName} extends ${Entity} {
     private static final long serialVersionUID=1L;
     private static final long serialVersionUID=1L;
 
 
 #foreach ($column in $columns)
 #foreach ($column in $columns)
+
 #if(!$table.isSuperColumn($column.javaField))
 #if(!$table.isSuperColumn($column.javaField))
     /**
     /**
      * $column.columnComment
      * $column.columnComment
@@ -44,6 +45,21 @@ public class ${ClassName} extends ${Entity} {
 #if($column.isPk==1)
 #if($column.isPk==1)
     @TableId(value = "$column.columnName")
     @TableId(value = "$column.columnName")
 #end
 #end
+    #set($parentheseIndex=$column.columnComment.indexOf("("))
+    #if($parentheseIndex != -1)
+        #set($comment=$column.columnComment.substring(0, $parentheseIndex))
+    #else
+        #set($comment=$column.columnComment)
+    #end
+    #if(${column.dictType} && ${column.dictType} != '')
+    @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(dictType = "${column.dictType}")
+    #elseif($parentheseIndex != -1)
+    @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "$column.readConverterExp()")
+    #else
+    @ExcelProperty(value = "${comment}")
+    #end
     private $column.javaType $column.javaField;
     private $column.javaType $column.javaField;
 #end
 #end
 #end
 #end

+ 1 - 2
nexo-modules/nexo-gen/src/main/resources/vm/java/mapper.java.vm

@@ -2,7 +2,6 @@ package ${packageName}.mapper;
 
 
 import com.nexo.common.mybatis.core.mapper.BaseMapperPlus;
 import com.nexo.common.mybatis.core.mapper.BaseMapperPlus;
 import ${packageName}.domain.${ClassName};
 import ${packageName}.domain.${ClassName};
-import ${packageName}.domain.vo.${ClassName}Vo;
 
 
 /**
 /**
  * ${functionName}Mapper接口
  * ${functionName}Mapper接口
@@ -10,6 +9,6 @@ import ${packageName}.domain.vo.${ClassName}Vo;
  * @author ${author}
  * @author ${author}
  * @date ${datetime}
  * @date ${datetime}
  */
  */
-public interface ${ClassName}Mapper extends BaseMapperPlus<${ClassName}Mapper, ${ClassName}, ${ClassName}Vo> {
+public interface ${ClassName}Mapper extends BaseMapperPlus<${ClassName}Mapper, ${ClassName}, ${ClassName}> {
 
 
 }
 }

+ 6 - 8
nexo-modules/nexo-gen/src/main/resources/vm/java/service.java.vm

@@ -1,8 +1,6 @@
 package ${packageName}.service;
 package ${packageName}.service;
 
 
 import ${packageName}.domain.${ClassName};
 import ${packageName}.domain.${ClassName};
-import ${packageName}.domain.vo.${ClassName}Vo;
-import ${packageName}.domain.bo.${ClassName}Bo;
 #if($table.crud || $table.sub)
 #if($table.crud || $table.sub)
 import com.nexo.common.mybatis.core.page.PageQuery;
 import com.nexo.common.mybatis.core.page.PageQuery;
 import com.nexo.common.mybatis.core.page.TableDataInfo;
 import com.nexo.common.mybatis.core.page.TableDataInfo;
@@ -22,32 +20,32 @@ public interface I${ClassName}Service {
     /**
     /**
      * 查询${functionName}
      * 查询${functionName}
      */
      */
-    ${ClassName}Vo queryById(${pkColumn.javaType} ${pkColumn.javaField});
+    ${ClassName} queryById(${pkColumn.javaType} ${pkColumn.javaField});
 
 
 #if($table.crud || $table.sub)
 #if($table.crud || $table.sub)
     /**
     /**
      * 查询${functionName}列表
      * 查询${functionName}列表
      */
      */
-    TableDataInfo<${ClassName}Vo> queryPageList(${ClassName}Bo bo, PageQuery pageQuery);
+    TableDataInfo<${ClassName}> queryPageList(${ClassName} item, PageQuery pageQuery);
 #end
 #end
 
 
     /**
     /**
      * 查询${functionName}列表
      * 查询${functionName}列表
      */
      */
-    List<${ClassName}Vo> queryList(${ClassName}Bo bo);
+    List<${ClassName}> queryList(${ClassName} item);
 
 
     /**
     /**
      * 修改${functionName}
      * 修改${functionName}
      */
      */
-    Boolean insertByBo(${ClassName}Bo bo);
+    Boolean insertBy(${ClassName} item);
 
 
     /**
     /**
      * 修改${functionName}
      * 修改${functionName}
      */
      */
-    Boolean updateByBo(${ClassName}Bo bo);
+    Boolean updateBy(${ClassName} item);
 
 
     /**
     /**
      * 校验并批量删除${functionName}信息
      * 校验并批量删除${functionName}信息
      */
      */
-    Boolean deleteWithValidByIds(Collection<${pkColumn.javaType}> ids, Boolean isValid);
+    Boolean deleteWithValidByIds(Collection<${pkColumn.javaType}> ids, olean isValid);
 }
 }

+ 19 - 23
nexo-modules/nexo-gen/src/main/resources/vm/java/serviceImpl.java.vm

@@ -9,9 +9,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
-import ${packageName}.domain.bo.${ClassName}Bo;
-import ${packageName}.domain.vo.${ClassName}Vo;
 import ${packageName}.domain.${ClassName};
 import ${packageName}.domain.${ClassName};
 import ${packageName}.mapper.${ClassName}Mapper;
 import ${packageName}.mapper.${ClassName}Mapper;
 import ${packageName}.service.I${ClassName}Service;
 import ${packageName}.service.I${ClassName}Service;
@@ -28,6 +27,7 @@ import java.util.Collection;
  */
  */
 @RequiredArgsConstructor
 @RequiredArgsConstructor
 @Service
 @Service
+@Slf4j
 public class ${ClassName}ServiceImpl implements I${ClassName}Service {
 public class ${ClassName}ServiceImpl implements I${ClassName}Service {
 
 
     private final ${ClassName}Mapper baseMapper;
     private final ${ClassName}Mapper baseMapper;
@@ -36,8 +36,8 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service {
      * 查询${functionName}
      * 查询${functionName}
      */
      */
     @Override
     @Override
-    public ${ClassName}Vo queryById(${pkColumn.javaType} ${pkColumn.javaField}){
-        return baseMapper.selectVoById(${pkColumn.javaField});
+    public ${ClassName} queryById(${pkColumn.javaType} ${pkColumn.javaField}){
+        return baseMapper.selectById(${pkColumn.javaField});
     }
     }
 
 
 #if($table.crud || $table.sub)
 #if($table.crud || $table.sub)
@@ -45,9 +45,9 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service {
      * 查询${functionName}列表
      * 查询${functionName}列表
      */
      */
     @Override
     @Override
-    public TableDataInfo<${ClassName}Vo> queryPageList(${ClassName}Bo bo, PageQuery pageQuery) {
-        LambdaQueryWrapper<${ClassName}> lqw = buildQueryWrapper(bo);
-        Page<${ClassName}Vo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+    public TableDataInfo<${ClassName}> queryPageList(${ClassName} item, PageQuery pageQuery) {
+        LambdaQueryWrapper<${ClassName}> lqw = buildQueryWrapper(item);
+        Page<${ClassName}> result = baseMapper.selectPage(pageQuery.build(), lqw);
         return TableDataInfo.build(result);
         return TableDataInfo.build(result);
     }
     }
 #end
 #end
@@ -56,13 +56,13 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service {
      * 查询${functionName}列表
      * 查询${functionName}列表
      */
      */
     @Override
     @Override
-    public List<${ClassName}Vo> queryList(${ClassName}Bo bo) {
-        LambdaQueryWrapper<${ClassName}> lqw = buildQueryWrapper(bo);
-        return baseMapper.selectVoList(lqw);
+    public List<${ClassName}> queryList(${ClassName} item) {
+        LambdaQueryWrapper<${ClassName}> lqw = buildQueryWrapper(item);
+        return baseMapper.selectList(lqw);
     }
     }
 
 
-    private LambdaQueryWrapper<${ClassName}> buildQueryWrapper(${ClassName}Bo bo) {
-        Map<String, Object> params = bo.getParams();
+    private LambdaQueryWrapper<${ClassName}> buildQueryWrapper(${ClassName} item) {
+        Map<String, Object> params = item.getParams();
         LambdaQueryWrapper<${ClassName}> lqw = Wrappers.lambdaQuery();
         LambdaQueryWrapper<${ClassName}> lqw = Wrappers.lambdaQuery();
 #foreach($column in $columns)
 #foreach($column in $columns)
 #if($column.query)
 #if($column.query)
@@ -78,7 +78,7 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service {
 #else
 #else
 #set($condition='bo.get'+$AttrName+'() != null')
 #set($condition='bo.get'+$AttrName+'() != null')
 #end
 #end
-        lqw.$mpMethod($condition, ${ClassName}::get$AttrName, bo.get$AttrName());
+        lqw.$mpMethod($condition, ${ClassName}::get$AttrName, item.get$AttrName());
 #else
 #else
         lqw.between(params.get("begin$AttrName") != null && params.get("end$AttrName") != null,
         lqw.between(params.get("begin$AttrName") != null && params.get("end$AttrName") != null,
             ${ClassName}::get$AttrName ,params.get("begin$AttrName"), params.get("end$AttrName"));
             ${ClassName}::get$AttrName ,params.get("begin$AttrName"), params.get("end$AttrName"));
@@ -92,13 +92,11 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service {
      * 新增${functionName}
      * 新增${functionName}
      */
      */
     @Override
     @Override
-    public Boolean insertByBo(${ClassName}Bo bo) {
-        ${ClassName} add = BeanUtil.toBean(bo, ${ClassName}.class);
-        validEntityBeforeSave(add);
-        boolean flag = baseMapper.insert(add) > 0;
+    public olean insertBy(${ClassName} item) {
+        itemolean flag = baseMapper.insert(item) > 0;
 #set($pk=$pkColumn.javaField.substring(0,1).toUpperCase() + ${pkColumn.javaField.substring(1)})
 #set($pk=$pkColumn.javaField.substring(0,1).toUpperCase() + ${pkColumn.javaField.substring(1)})
         if (flag) {
         if (flag) {
-            bo.set$pk(add.get$pk());
+            item.set$pk(item.get$pk());
         }
         }
         return flag;
         return flag;
     }
     }
@@ -107,10 +105,8 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service {
      * 修改${functionName}
      * 修改${functionName}
      */
      */
     @Override
     @Override
-    public Boolean updateByBo(${ClassName}Bo bo) {
-        ${ClassName} update = BeanUtil.toBean(bo, ${ClassName}.class);
-        validEntityBeforeSave(update);
-        return baseMapper.updateById(update) > 0;
+    public Boolean updateBy(${ClassName} item) {
+        return baseMapper.updateById(item) > 0;
     }
     }
 
 
     /**
     /**
@@ -124,7 +120,7 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service {
      * 批量删除${functionName}
      * 批量删除${functionName}
      */
      */
     @Override
     @Override
-    public Boolean deleteWithValidByIds(Collection<${pkColumn.javaType}> ids, Boolean isValid) {
+    public Boolean deleteWithValidByIds(Collection<${pkColumn.javaType}> ids, olean isValid) {
         if(isValid){
         if(isValid){
             //TODO 做一些业务上的校验,判断是否需要校验
             //TODO 做一些业务上的校验,判断是否需要校验
         }
         }

+ 0 - 52
nexo-modules/nexo-gen/src/main/resources/vm/java/vo.java.vm

@@ -1,52 +0,0 @@
-package ${packageName}.domain.vo;
-
-#foreach ($import in $importList)
-import ${import};
-#end
-import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.nexo.common.excel.annotation.ExcelDictFormat;
-import com.nexo.common.excel.convert.ExcelDictConvert;
-import lombok.Data;
-
-import java.io.Serializable;
-
-
-/**
- * ${functionName}视图对象
- *
- * @author ${author}
- * @date ${datetime}
- */
-@Data
-@ExcelIgnoreUnannotated
-public class ${ClassName}Vo implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-#foreach ($column in $columns)
-#if($column.list)
-    /**
-     * $column.columnComment
-     */
-#set($parentheseIndex=$column.columnComment.indexOf("("))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-#if(${column.dictType} && ${column.dictType} != '')
-    @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class)
-    @ExcelDictFormat(dictType = "${column.dictType}")
-#elseif($parentheseIndex != -1)
-    @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class)
-    @ExcelDictFormat(readConverterExp = "$column.readConverterExp()")
-#else
-    @ExcelProperty(value = "${comment}")
-#end
-    private $column.javaType $column.javaField;
-
-#end
-#end
-
-}

+ 0 - 19
nexo-modules/nexo-gen/src/main/resources/vm/sql/oracle/sql.vm

@@ -1,19 +0,0 @@
--- 菜单 SQL
-insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
-values(${table.menuIds[0]}, '${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 'admin', sysdate, '', null, '${functionName}菜单');
-
--- 按钮 SQL
-insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
-values(${table.menuIds[1]}, '${functionName}查询', ${table.menuIds[0]}, '1',  '#', '', 1,  0, 'F', '0', '0', '${permissionPrefix}:query',        '#', 'admin', sysdate, '', null, '');
-
-insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
-values(${table.menuIds[2]}, '${functionName}新增', ${table.menuIds[0]}, '2',  '#', '', 1,  0, 'F', '0', '0', '${permissionPrefix}:add',          '#', 'admin', sysdate, '', null, '');
-
-insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
-values(${table.menuIds[3]}, '${functionName}修改', ${table.menuIds[0]}, '3',  '#', '', 1,  0, 'F', '0', '0', '${permissionPrefix}:edit',         '#', 'admin', sysdate, '', null, '');
-
-insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
-values(${table.menuIds[4]}, '${functionName}删除', ${table.menuIds[0]}, '4',  '#', '', 1,  0, 'F', '0', '0', '${permissionPrefix}:remove',       '#', 'admin', sysdate, '', null, '');
-
-insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
-values(${table.menuIds[5]}, '${functionName}导出', ${table.menuIds[0]}, '5',  '#', '', 1,  0, 'F', '0', '0', '${permissionPrefix}:export',       '#', 'admin', sysdate, '', null, '');

+ 0 - 20
nexo-modules/nexo-gen/src/main/resources/vm/sql/postgres/sql.vm

@@ -1,20 +0,0 @@
--- 菜单 SQL
-insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
-values(${table.menuIds[0]}, '${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 'admin', now(), '', null, '${functionName}菜单');
-
--- 按钮 SQL
-insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
-values(${table.menuIds[1]}, '${functionName}查询', ${table.menuIds[0]}, '1',  '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:query',        '#', 'admin', now(), '', null, '');
-
-insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
-values(${table.menuIds[2]}, '${functionName}新增', ${table.menuIds[0]}, '2',  '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:add',          '#', 'admin', now(), '', null, '');
-
-insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
-values(${table.menuIds[3]}, '${functionName}修改', ${table.menuIds[0]}, '3',  '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:edit',         '#', 'admin', now(), '', null, '');
-
-insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
-values(${table.menuIds[4]}, '${functionName}删除', ${table.menuIds[0]}, '4',  '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:remove',       '#', 'admin', now(), '', null, '');
-
-insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
-values(${table.menuIds[5]}, '${functionName}导出', ${table.menuIds[0]}, '5',  '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export',       '#', 'admin', now(), '', null, '');
-

+ 0 - 486
nexo-modules/nexo-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm

@@ -1,486 +0,0 @@
-<template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
-#foreach($column in $columns)
-#if($column.query)
-#set($dictType=$column.dictType)
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-#set($parentheseIndex=$column.columnComment.indexOf("("))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-#if($column.htmlType == "input" || $column.htmlType == "textarea")
-      <el-form-item label="${comment}" prop="${column.javaField}">
-        <el-input
-          v-model="queryParams.${column.javaField}"
-          placeholder="请输入${comment}"
-          clearable
-          @keyup.enter="handleQuery"
-        />
-      </el-form-item>
-#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType)
-      <el-form-item label="${comment}" prop="${column.javaField}">
-        <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable>
-          <el-option
-            v-for="dict in ${dictType}"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item>
-#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType)
-      <el-form-item label="${comment}" prop="${column.javaField}">
-        <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable>
-          <el-option label="请选择字典生成" value="" />
-        </el-select>
-      </el-form-item>
-#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN")
-      <el-form-item label="${comment}" prop="${column.javaField}">
-        <el-date-picker clearable
-          v-model="queryParams.${column.javaField}"
-          type="date"
-          value-format="YYYY-MM-DD"
-          placeholder="选择${comment}">
-        </el-date-picker>
-      </el-form-item>
-#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-      <el-form-item label="${comment}" style="width: 308px">
-        <el-date-picker
-          v-model="daterange${AttrName}"
-          value-format="YYYY-MM-DD HH:mm:ss"
-          type="daterange"
-          range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-          :default-time="[new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 1, 1, 23, 59, 59)]"
-        ></el-date-picker>
-      </el-form-item>
-#end
-#end
-#end
-      <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
-        <el-button icon="Refresh" @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="Plus"
-          @click="handleAdd"
-          v-hasPermi="['${moduleName}:${businessName}:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="info"
-          plain
-          icon="Sort"
-          @click="toggleExpandAll"
-        >展开/折叠</el-button>
-      </el-col>
-      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
-    <el-table
-      v-if="refreshTable"
-      v-loading="loading"
-      :data="${businessName}List"
-      row-key="${treeCode}"
-      :default-expand-all="isExpandAll"
-      :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
-    >
-#foreach($column in $columns)
-#set($javaField=$column.javaField)
-#set($parentheseIndex=$column.columnComment.indexOf("("))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-#if($column.pk)
-#elseif($column.list && $column.htmlType == "datetime")
-      <el-table-column label="${comment}" align="center" prop="${javaField}" width="180">
-        <template #default="scope">
-          <span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-#elseif($column.list && $column.htmlType == "imageUpload")
-      <el-table-column label="${comment}" align="center" prop="${javaField}" width="100">
-          <template #default="scope">
-              <image-preview :src="scope.row.${javaField}" :width="50" :height="50"/>
-          </template>
-      </el-table-column>
-#elseif($column.list && $column.dictType && "" != $column.dictType)
-      <el-table-column label="${comment}" align="center" prop="${javaField}">
-        <template #default="scope">
-#if($column.htmlType == "checkbox")
-          <dict-tag :options="${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
-#else
-          <dict-tag :options="${column.dictType}" :value="scope.row.${javaField}"/>
-#end
-        </template>
-      </el-table-column>
-#elseif($column.list && "" != $javaField)
-#if(${foreach.index} == 1)
-      <el-table-column label="${comment}" prop="${javaField}" />
-#else
-      <el-table-column label="${comment}" align="center" prop="${javaField}" />
-#end
-#end
-#end
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-          <template #default="scope">
-              <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']">修改</el-button>
-              <el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['${moduleName}:${businessName}:add']">新增</el-button>
-              <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']">删除</el-button>
-          </template>
-      </el-table-column>
-    </el-table>
-
-    <!-- 添加或修改${functionName}对话框 -->
-    <el-dialog :title="title" v-model="open" width="500px" append-to-body>
-      <el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px">
-#foreach($column in $columns)
-#set($field=$column.javaField)
-#if($column.insert && !$column.pk)
-#set($parentheseIndex=$column.columnComment.indexOf("("))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-#set($dictType=$column.dictType)
-#if("" != $treeParentCode && $column.javaField == $treeParentCode)
-        <el-form-item label="${comment}" prop="${treeParentCode}">
-          <el-tree-select
-            v-model="form.${treeParentCode}"
-            :data="${businessName}Options"
-            :props="{ value: '${treeCode}', label: '${treeName}', children: 'children' }"
-            value-key="${treeCode}"
-            placeholder="请选择${comment}"
-            check-strictly
-          />
-        </el-form-item>
-#elseif($column.htmlType == "input")
-        <el-form-item label="${comment}" prop="${field}">
-          <el-input v-model="form.${field}" placeholder="请输入${comment}" />
-        </el-form-item>
-#elseif($column.htmlType == "imageUpload")
-        <el-form-item label="${comment}" prop="${field}">
-          <image-upload v-model="form.${field}"/>
-        </el-form-item>
-#elseif($column.htmlType == "fileUpload")
-        <el-form-item label="${comment}" prop="${field}">
-          <file-upload v-model="form.${field}"/>
-        </el-form-item>
-#elseif($column.htmlType == "editor")
-        <el-form-item label="${comment}">
-          <editor v-model="form.${field}" :min-height="192"/>
-        </el-form-item>
-#elseif($column.htmlType == "select" && "" != $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-select v-model="form.${field}" placeholder="请选择${comment}">
-            <el-option
-              v-for="dict in ${dictType}"
-              :key="dict.value"
-              :label="dict.label"
-#if($column.javaType == "Integer" || $column.javaType == "Long")
-              :value="parseInt(dict.value)"
-#else
-              :value="dict.value"
-#end
-            ></el-option>
-          </el-select>
-        </el-form-item>
-#elseif($column.htmlType == "select" && $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-select v-model="form.${field}" placeholder="请选择${comment}">
-            <el-option label="请选择字典生成" value="" />
-          </el-select>
-        </el-form-item>
-#elseif($column.htmlType == "checkbox" && "" != $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-checkbox-group v-model="form.${field}">
-            <el-checkbox
-              v-for="dict in ${dictType}"
-              :key="dict.value"
-              :label="dict.value">
-              {{dict.label}}
-            </el-checkbox>
-          </el-checkbox-group>
-        </el-form-item>
-#elseif($column.htmlType == "checkbox" && $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-checkbox-group v-model="form.${field}">
-            <el-checkbox>请选择字典生成</el-checkbox>
-          </el-checkbox-group>
-        </el-form-item>
-#elseif($column.htmlType == "radio" && "" != $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-radio-group v-model="form.${field}">
-            <el-radio
-              v-for="dict in ${dictType}"
-              :key="dict.value"
-#if($column.javaType == "Integer" || $column.javaType == "Long")
-              :label="parseInt(dict.value)"
-#else
-              :label="dict.value"
-#end
-            >{{dict.label}}</el-radio>
-          </el-radio-group>
-        </el-form-item>
-#elseif($column.htmlType == "radio" && $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-radio-group v-model="form.${field}">
-            <el-radio label="1">请选择字典生成</el-radio>
-          </el-radio-group>
-        </el-form-item>
-#elseif($column.htmlType == "datetime")
-        <el-form-item label="${comment}" prop="${field}">
-          <el-date-picker clearable
-            v-model="form.${field}"
-            type="datetime"
-            value-format="YYYY-MM-DD HH:mm:ss"
-            placeholder="选择${comment}">
-          </el-date-picker>
-        </el-form-item>
-#elseif($column.htmlType == "textarea")
-        <el-form-item label="${comment}" prop="${field}">
-          <el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
-        </el-form-item>
-#end
-#end
-#end
-      </el-form>
-      <template #footer>
-        <div class="dialog-footer">
-          <el-button type="primary" @click="submitForm">确 定</el-button>
-          <el-button @click="cancel">取 消</el-button>
-        </div>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-
-<script setup name="${BusinessName}">
-import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
-
-const { proxy } = getCurrentInstance();
-#if(${dicts} != '')
-#set($dictsNoSymbol=$dicts.replace("'", ""))
-const { ${dictsNoSymbol} } = proxy.useDict(${dicts});
-#end
-
-const ${businessName}List = ref([]);
-const ${businessName}Options = ref([]);
-const open = ref(false);
-const buttonLoading = ref(false);
-const loading = ref(true);
-const showSearch = ref(true);
-const title = ref("");
-const isExpandAll = ref(true);
-const refreshTable = ref(true);
-#foreach ($column in $columns)
-#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-const daterange${AttrName} = ref([]);
-#end
-#end
-
-const data = reactive({
-  form: {},
-  queryParams: {
-#foreach ($column in $columns)
-#if($column.query)
-    $column.javaField: undefined#if($foreach.count != $columns.size()),#end
-#end
-#end
-  },
-  rules: {
-#foreach ($column in $columns)
-#if($column.required)
-#set($parentheseIndex=$column.columnComment.indexOf("("))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-    $column.javaField: [
-      { required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end }
-    ]#if($foreach.count != $columns.size()),#end
-#end
-#end
-  }
-});
-
-const { queryParams, form, rules } = toRefs(data);
-
-/** 查询${functionName}列表 */
-function getList() {
-  loading.value = true;
-#foreach ($column in $columns)
-#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-  queryParams.value.params = {};
-#break
-#end
-#end
-#foreach ($column in $columns)
-#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-  if (null != daterange${AttrName} && '' != daterange${AttrName}) {
-    queryParams.value.params["begin${AttrName}"] = daterange${AttrName}.value[0];
-    queryParams.value.params["end${AttrName}"] = daterange${AttrName}.value[1];
-  }
-#end
-#end
-  list${BusinessName}(queryParams.value).then(response => {
-    ${businessName}List.value = proxy.handleTree(response.data, "${treeCode}", "${treeParentCode}");
-    loading.value = false;
-  });
-}
-
-/** 查询${functionName}下拉树结构 */
-function getTreeselect() {
-  list${BusinessName}().then(response => {
-    ${businessName}Options.value = [];
-    const data = { ${treeCode}: 0, ${treeName}: '顶级节点', children: [] };
-    data.children = proxy.handleTree(response.data, "${treeCode}", "${treeParentCode}");
-    ${businessName}Options.value.push(data);
-  });
-}
-
-// 取消按钮
-function cancel() {
-  open.value = false;
-  reset();
-}
-
-// 表单重置
-function reset() {
-  form.value = {
-#foreach ($column in $columns)
-#if($column.htmlType == "checkbox")
-    $column.javaField: []#if($foreach.count != $columns.size()),#end
-#else
-    $column.javaField: null#if($foreach.count != $columns.size()),#end
-#end
-#end
-  };
-  proxy.resetForm("${businessName}Ref");
-}
-
-/** 搜索按钮操作 */
-function handleQuery() {
-  getList();
-}
-
-/** 重置按钮操作 */
-function resetQuery() {
-#foreach ($column in $columns)
-#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-  daterange${AttrName}.value = [];
-#end
-#end
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
-
-/** 新增按钮操作 */
-function handleAdd(row) {
-  reset();
-  getTreeselect();
-  if (row != null && row.${treeCode}) {
-    form.value.${treeParentCode} = row.${treeCode};
-  } else {
-    form.value.${treeParentCode} = 0;
-  }
-  open.value = true;
-  title.value = "添加${functionName}";
-}
-
-/** 展开/折叠操作 */
-function toggleExpandAll() {
-  refreshTable.value = false;
-  isExpandAll.value = !isExpandAll.value;
-  nextTick(() => {
-    refreshTable.value = true;
-  });
-}
-
-/** 修改按钮操作 */
-async function handleUpdate(row) {
-  loading.value = true;
-  reset();
-  await getTreeselect();
-  if (row != null) {
-    form.value.${treeParentCode} = row.${treeParentCode};
-  }
-  get${BusinessName}(row.${pkColumn.javaField}).then(response => {
-    loading.value = false;
-    form.value = response.data;
-#foreach ($column in $columns)
-#if($column.htmlType == "checkbox")
-    form.value.$column.javaField = form.value.${column.javaField}.split(",");
-#end
-#end
-    open.value = true;
-    title.value = "修改${functionName}";
-  });
-}
-
-/** 提交按钮 */
-function submitForm() {
-  proxy.#[[$]]#refs["${businessName}Ref"].validate(valid => {
-    if (valid) {
-      buttonLoading.value = true;
-#foreach ($column in $columns)
-#if($column.htmlType == "checkbox")
-      form.value.$column.javaField = form.value.${column.javaField}.join(",");
-#end
-#end
-      if (form.value.${pkColumn.javaField} != null) {
-        update${BusinessName}(form.value).then(response => {
-          proxy.#[[$modal]]#.msgSuccess("修改成功");
-          open.value = false;
-          getList();
-        }).finally(() => {
-          buttonLoading.value = false;
-        });
-      } else {
-        add${BusinessName}(form.value).then(response => {
-          proxy.#[[$modal]]#.msgSuccess("新增成功");
-          open.value = false;
-          getList();
-        }).finally(() => {
-          buttonLoading.value = false;
-        });
-      }
-    }
-  });
-}
-
-/** 删除按钮操作 */
-function handleDelete(row) {
-  proxy.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + row.${pkColumn.javaField} + '"的数据项?').then(function() {
-    loading.value = true;
-    return del${BusinessName}(row.${pkColumn.javaField});
-  }).then(() => {
-    loading.value = false;
-    getList();
-    proxy.#[[$modal]]#.msgSuccess("删除成功");
-  }).catch(() => {
-  }).finally(() => {
-    loading.value = false;
-  });
-}
-
-getList();
-</script>

+ 0 - 602
nexo-modules/nexo-gen/src/main/resources/vm/vue/v3/index.vue.vm

@@ -1,602 +0,0 @@
-<template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
-#foreach($column in $columns)
-#if($column.query)
-#set($dictType=$column.dictType)
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-#set($parentheseIndex=$column.columnComment.indexOf("("))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-#if($column.htmlType == "input" || $column.htmlType == "textarea")
-      <el-form-item label="${comment}" prop="${column.javaField}">
-        <el-input
-          v-model="queryParams.${column.javaField}"
-          placeholder="请输入${comment}"
-          clearable
-          @keyup.enter="handleQuery"
-        />
-      </el-form-item>
-#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType)
-      <el-form-item label="${comment}" prop="${column.javaField}">
-        <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable>
-          <el-option
-            v-for="dict in ${dictType}"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item>
-#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType)
-      <el-form-item label="${comment}" prop="${column.javaField}">
-        <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable>
-          <el-option label="请选择字典生成" value="" />
-        </el-select>
-      </el-form-item>
-#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN")
-      <el-form-item label="${comment}" prop="${column.javaField}">
-        <el-date-picker clearable
-          v-model="queryParams.${column.javaField}"
-          type="date"
-          value-format="YYYY-MM-DD"
-          placeholder="请选择${comment}">
-        </el-date-picker>
-      </el-form-item>
-#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-      <el-form-item label="${comment}" style="width: 308px">
-        <el-date-picker
-          v-model="daterange${AttrName}"
-          value-format="YYYY-MM-DD HH:mm:ss"
-          type="daterange"
-          range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-          :default-time="[new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 1, 1, 23, 59, 59)]"
-        ></el-date-picker>
-      </el-form-item>
-#end
-#end
-#end
-      <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
-        <el-button icon="Refresh" @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="Plus"
-          @click="handleAdd"
-          v-hasPermi="['${moduleName}:${businessName}:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="Edit"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['${moduleName}:${businessName}:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="Delete"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['${moduleName}:${businessName}:remove']"
-        >删除</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="Download"
-          @click="handleExport"
-          v-hasPermi="['${moduleName}:${businessName}:export']"
-        >导出</el-button>
-      </el-col>
-      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
-    <el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-#foreach($column in $columns)
-#set($javaField=$column.javaField)
-#set($parentheseIndex=$column.columnComment.indexOf("("))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-#if($column.pk)
-      <el-table-column label="${comment}" align="center" prop="${javaField}" v-if="${column.list}"/>
-#elseif($column.list && $column.htmlType == "datetime")
-      <el-table-column label="${comment}" align="center" prop="${javaField}" width="180">
-        <template #default="scope">
-          <span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-#elseif($column.list && $column.htmlType == "imageUpload")
-      <el-table-column label="${comment}" align="center" prop="${javaField}" width="100">
-          <template #default="scope">
-              <image-preview :src="scope.row.${javaField}" :width="50" :height="50"/>
-          </template>
-      </el-table-column>
-#elseif($column.list && $column.dictType && "" != $column.dictType)
-      <el-table-column label="${comment}" align="center" prop="${javaField}">
-        <template #default="scope">
-#if($column.htmlType == "checkbox")
-          <dict-tag :options="${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
-#else
-          <dict-tag :options="${column.dictType}" :value="scope.row.${javaField}"/>
-#end
-        </template>
-      </el-table-column>
-#elseif($column.list && "" != $javaField)
-      <el-table-column label="${comment}" align="center" prop="${javaField}" />
-#end
-#end
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-          <template #default="scope">
-              <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']">修改</el-button>
-              <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']">删除</el-button>
-          </template>
-      </el-table-column>
-    </el-table>
-
-    <pagination
-      v-show="total>0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!-- 添加或修改${functionName}对话框 -->
-    <el-dialog :title="title" v-model="open" width="500px" append-to-body>
-      <el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px">
-#foreach($column in $columns)
-#set($field=$column.javaField)
-#if($column.insert && !$column.pk)
-#set($parentheseIndex=$column.columnComment.indexOf("("))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-#set($dictType=$column.dictType)
-#if($column.htmlType == "input")
-        <el-form-item label="${comment}" prop="${field}">
-          <el-input v-model="form.${field}" placeholder="请输入${comment}" />
-        </el-form-item>
-#elseif($column.htmlType == "imageUpload")
-        <el-form-item label="${comment}" prop="${field}">
-          <image-upload v-model="form.${field}"/>
-        </el-form-item>
-#elseif($column.htmlType == "fileUpload")
-        <el-form-item label="${comment}" prop="${field}">
-          <file-upload v-model="form.${field}"/>
-        </el-form-item>
-#elseif($column.htmlType == "editor")
-        <el-form-item label="${comment}">
-          <editor v-model="form.${field}" :min-height="192"/>
-        </el-form-item>
-#elseif($column.htmlType == "select" && "" != $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-select v-model="form.${field}" placeholder="请选择${comment}">
-            <el-option
-              v-for="dict in ${dictType}"
-              :key="dict.value"
-              :label="dict.label"
-#if($column.javaType == "Integer" || $column.javaType == "Long")
-              :value="parseInt(dict.value)"
-#else
-              :value="dict.value"
-#end
-            ></el-option>
-          </el-select>
-        </el-form-item>
-#elseif($column.htmlType == "select" && $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-select v-model="form.${field}" placeholder="请选择${comment}">
-            <el-option label="请选择字典生成" value="" />
-          </el-select>
-        </el-form-item>
-#elseif($column.htmlType == "checkbox" && "" != $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-checkbox-group v-model="form.${field}">
-            <el-checkbox
-              v-for="dict in ${dictType}"
-              :key="dict.value"
-              :label="dict.value">
-              {{dict.label}}
-            </el-checkbox>
-          </el-checkbox-group>
-        </el-form-item>
-#elseif($column.htmlType == "checkbox" && $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-checkbox-group v-model="form.${field}">
-            <el-checkbox>请选择字典生成</el-checkbox>
-          </el-checkbox-group>
-        </el-form-item>
-#elseif($column.htmlType == "radio" && "" != $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-radio-group v-model="form.${field}">
-            <el-radio
-              v-for="dict in ${dictType}"
-              :key="dict.value"
-#if($column.javaType == "Integer" || $column.javaType == "Long")
-              :label="parseInt(dict.value)"
-#else
-              :label="dict.value"
-#end
-            >{{dict.label}}</el-radio>
-          </el-radio-group>
-        </el-form-item>
-#elseif($column.htmlType == "radio" && $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-radio-group v-model="form.${field}">
-            <el-radio label="1">请选择字典生成</el-radio>
-          </el-radio-group>
-        </el-form-item>
-#elseif($column.htmlType == "datetime")
-        <el-form-item label="${comment}" prop="${field}">
-          <el-date-picker clearable
-            v-model="form.${field}"
-            type="datetime"
-            value-format="YYYY-MM-DD HH:mm:ss"
-            placeholder="请选择${comment}">
-          </el-date-picker>
-        </el-form-item>
-#elseif($column.htmlType == "textarea")
-        <el-form-item label="${comment}" prop="${field}">
-          <el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
-        </el-form-item>
-#end
-#end
-#end
-#if($table.sub)
-        <el-divider content-position="center">${subTable.functionName}信息</el-divider>
-        <el-row :gutter="10" class="mb8">
-          <el-col :span="1.5">
-            <el-button type="primary" icon="Plus" @click="handleAdd${subClassName}">添加</el-button>
-          </el-col>
-          <el-col :span="1.5">
-            <el-button type="danger" icon="Delete" @click="handleDelete${subClassName}">删除</el-button>
-          </el-col>
-        </el-row>
-        <el-table :data="${subclassName}List" :row-class-name="row${subClassName}Index" @selection-change="handle${subClassName}SelectionChange" ref="${subclassName}">
-          <el-table-column type="selection" width="50" align="center" />
-          <el-table-column label="序号" align="center" prop="index" width="50"/>
-#foreach($column in $subTable.columns)
-#set($javaField=$column.javaField)
-#set($parentheseIndex=$column.columnComment.indexOf("("))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-#if($column.pk || $javaField == ${subTableFkclassName})
-#elseif($column.list && $column.htmlType == "input")
-          <el-table-column label="$comment" prop="${javaField}" width="150">
-            <template #default="scope">
-              <el-input v-model="scope.row.$javaField" placeholder="请输入$comment" />
-            </template>
-          </el-table-column>
-#elseif($column.list && $column.htmlType == "datetime")
-          <el-table-column label="$comment" prop="${javaField}" width="240">
-            <template #default="scope">
-              <el-date-picker clearable
-                v-model="scope.row.$javaField"
-                type="date"
-                value-format="YYYY-MM-DD"
-                placeholder="请选择$comment">
-              </el-date-picker>
-            </template>
-          </el-table-column>
-#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" != $column.dictType)
-          <el-table-column label="$comment" prop="${javaField}" width="150">
-            <template #default="scope">
-              <el-select v-model="scope.row.$javaField" placeholder="请选择$comment">
-                <el-option
-                  v-for="dict in $column.dictType"
-                  :key="dict.value"
-                  :label="dict.label"
-                  :value="dict.value"
-                ></el-option>
-              </el-select>
-            </template>
-          </el-table-column>
-#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" == $column.dictType)
-          <el-table-column label="$comment" prop="${javaField}" width="150">
-            <template #default="scope">
-              <el-select v-model="scope.row.$javaField" placeholder="请选择$comment">
-                <el-option label="请选择字典生成" value="" />
-              </el-select>
-            </template>
-          </el-table-column>
-#end
-#end
-        </el-table>
-#end
-      </el-form>
-      <template #footer>
-        <div class="dialog-footer">
-          <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
-          <el-button @click="cancel">取 消</el-button>
-        </div>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-
-<script setup name="${BusinessName}">
-import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
-
-const { proxy } = getCurrentInstance();
-#if(${dicts} != '')
-#set($dictsNoSymbol=$dicts.replace("'", ""))
-const { ${dictsNoSymbol} } = proxy.useDict(${dicts});
-#end
-
-const ${businessName}List = ref([]);
-#if($table.sub)
-const ${subclassName}List = ref([]);
-#end
-const open = ref(false);
-const buttonLoading = ref(false);
-const loading = ref(true);
-const showSearch = ref(true);
-const ids = ref([]);
-#if($table.sub)
-const checked${subClassName} = ref([]);
-#end
-const single = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-const title = ref("");
-#foreach ($column in $columns)
-#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-const daterange${AttrName} = ref([]);
-#end
-#end
-
-const data = reactive({
-  form: {},
-  queryParams: {
-    pageNum: 1,
-    pageSize: 10,
-#foreach ($column in $columns)
-#if($column.query)
-    $column.javaField: undefined#if($foreach.count != $columns.size()),#end
-#end
-#end
-  },
-  rules: {
-#foreach ($column in $columns)
-#if($column.required)
-#set($parentheseIndex=$column.columnComment.indexOf("("))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-    $column.javaField: [
-      { required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end }
-    ]#if($foreach.count != $columns.size()),#end
-#end
-#end
-  }
-});
-
-const { queryParams, form, rules } = toRefs(data);
-
-/** 查询${functionName}列表 */
-function getList() {
-  loading.value = true;
-#foreach ($column in $columns)
-#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-  queryParams.value.params = {};
-#break
-#end
-#end
-#foreach ($column in $columns)
-#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-  if (null != daterange${AttrName} && '' != daterange${AttrName}) {
-    queryParams.value.params["begin${AttrName}"] = daterange${AttrName}.value[0];
-    queryParams.value.params["end${AttrName}"] = daterange${AttrName}.value[1];
-  }
-#end
-#end
-  list${BusinessName}(queryParams.value).then(response => {
-    ${businessName}List.value = response.rows;
-    total.value = response.total;
-    loading.value = false;
-  });
-}
-
-// 取消按钮
-function cancel() {
-  open.value = false;
-  reset();
-}
-
-// 表单重置
-function reset() {
-  form.value = {
-#foreach ($column in $columns)
-#if($column.htmlType == "checkbox")
-    $column.javaField: []#if($foreach.count != $columns.size()),#end
-#else
-    $column.javaField: null#if($foreach.count != $columns.size()),#end
-#end
-#end
-  };
-#if($table.sub)
-  ${subclassName}List.value = [];
-#end
-  proxy.resetForm("${businessName}Ref");
-}
-
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
-
-/** 重置按钮操作 */
-function resetQuery() {
-#foreach ($column in $columns)
-#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-  daterange${AttrName}.value = [];
-#end
-#end
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
-
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map(item => item.${pkColumn.javaField});
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
-
-/** 新增按钮操作 */
-function handleAdd() {
-  reset();
-  open.value = true;
-  title.value = "添加${functionName}";
-}
-
-/** 修改按钮操作 */
-function handleUpdate(row) {
-  loading.value = true
-  reset();
-  const _${pkColumn.javaField} = row.${pkColumn.javaField} || ids.value
-  get${BusinessName}(_${pkColumn.javaField}).then(response => {
-    loading.value = false;
-    form.value = response.data;
-#foreach ($column in $columns)
-#if($column.htmlType == "checkbox")
-    form.value.$column.javaField = form.value.${column.javaField}.split(",");
-#end
-#end
-#if($table.sub)
-    ${subclassName}List.value = response.data.${subclassName}List;
-#end
-    open.value = true;
-    title.value = "修改${functionName}";
-  });
-}
-
-/** 提交按钮 */
-function submitForm() {
-  proxy.#[[$]]#refs["${businessName}Ref"].validate(valid => {
-    if (valid) {
-      buttonLoading.value = true;
-#foreach ($column in $columns)
-#if($column.htmlType == "checkbox")
-      form.value.$column.javaField = form.value.${column.javaField}.join(",");
-#end
-#end
-#if($table.sub)
-      form.value.${subclassName}List = ${subclassName}List.value;
-#end
-      if (form.value.${pkColumn.javaField} != null) {
-        update${BusinessName}(form.value).then(response => {
-          proxy.#[[$modal]]#.msgSuccess("修改成功");
-          open.value = false;
-          getList();
-        }).finally(() => {
-          buttonLoading.value = false;
-        });
-      } else {
-        add${BusinessName}(form.value).then(response => {
-          proxy.#[[$modal]]#.msgSuccess("新增成功");
-          open.value = false;
-          getList();
-        }).finally(() => {
-          buttonLoading.value = false;
-        });
-      }
-    }
-  });
-}
-
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _${pkColumn.javaField}s = row.${pkColumn.javaField} || ids.value;
-  proxy.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + _${pkColumn.javaField}s + '"的数据项?').then(function() {
-    loading.value = true;
-    return del${BusinessName}(_${pkColumn.javaField}s);
-  }).then(() => {
-    loading.value = true;
-    getList();
-    proxy.#[[$modal]]#.msgSuccess("删除成功");
-  }).catch(() => {
-  }).finally(() => {
-    loading.value = false;
-  });
-}
-
-#if($table.sub)
-/** ${subTable.functionName}序号 */
-function row${subClassName}Index({ row, rowIndex }) {
-  row.index = rowIndex + 1;
-}
-
-/** ${subTable.functionName}添加按钮操作 */
-function handleAdd${subClassName}() {
-  let obj = {};
-#foreach($column in $subTable.columns)
-#if($column.pk || $column.javaField == ${subTableFkclassName})
-#elseif($column.list && "" != $javaField)
-  obj.$column.javaField = "";
-#end
-#end
-  ${subclassName}List.value.push(obj);
-}
-
-/** ${subTable.functionName}删除按钮操作 */
-function handleDelete${subClassName}() {
-  if (checked${subClassName}.value.length == 0) {
-    proxy.#[[$modal]]#.msgError("请先选择要删除的${subTable.functionName}数据");
-  } else {
-    const ${subclassName}s = ${subclassName}List.value;
-    const checked${subClassName}s = checked${subClassName}.value;
-    ${subclassName}List.value = ${subclassName}s.filter(function(item) {
-      return checked${subClassName}s.indexOf(item.index) == -1
-    });
-  }
-}
-
-/** 复选框选中数据 */
-function handle${subClassName}SelectionChange(selection) {
-  checked${subClassName}.value = selection.map(item => item.index)
-}
-
-#end
-/** 导出按钮操作 */
-function handleExport() {
-  proxy.download('${moduleName}/${businessName}/export', {
-    ...queryParams.value
-  }, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`)
-}
-
-getList();
-</script>

+ 0 - 1
nexo-modules/nexo-gen/src/main/resources/vm/vue/v3/readme.txt

@@ -1 +0,0 @@
-如果使用的是Vue3前端,那么需要覆盖一下此目录的模板index.vue.vm、index-tree.vue.vm文件到上级vue目录。

BIN
nexo-ui/src/assets/images/profile.jpg


+ 2 - 2
nexo-ui/src/assets/styles/nexo.scss

@@ -244,7 +244,7 @@
 
 
 /* image */
 /* image */
 .img-circle {
 .img-circle {
-	border-radius: 50%;
+	border-radius: 10px;
 }
 }
 
 
 .img-lg {
 .img-lg {
@@ -259,7 +259,7 @@
 	transform: translate(-50%, -50%);
 	transform: translate(-50%, -50%);
 	width: 200px;
 	width: 200px;
 	height: 200px;
 	height: 200px;
-	border-radius: 50%;
+	border-radius: 10px;
 	box-shadow: 0 0 4px #ccc;
 	box-shadow: 0 0 4px #ccc;
 	overflow: hidden;
 	overflow: hidden;
 }
 }

+ 34 - 11
nexo-ui/src/assets/styles/sidebar.scss

@@ -8,7 +8,7 @@
   }
   }
 
 
   .sidebarHide {
   .sidebarHide {
-    margin-left: 0!important;
+    margin-left: 0 !important;
   }
   }
 
 
   .sidebar-container {
   .sidebar-container {
@@ -73,21 +73,34 @@
       overflow: hidden !important;
       overflow: hidden !important;
       text-overflow: ellipsis !important;
       text-overflow: ellipsis !important;
       white-space: nowrap !important;
       white-space: nowrap !important;
+      height: 40px !important;
+      line-height: 40px !important;
+      min-width: calc(#{$base-sidebar-width} - 10px) !important;
+      margin: 0 5px !important;
+      border-radius: 5px !important;
+
+
     }
     }
 
 
     // menu hover
     // menu hover
     .submenu-title-noDropdown,
     .submenu-title-noDropdown,
     .el-submenu__title {
     .el-submenu__title {
+
       &:hover {
       &:hover {
-        background-color: rgba(0, 0, 0, 0.06) !important;
+        background-color: $base-sub-menu-hover !important;
+      }
+
+      &.is-active {
+        color: $base-menu-color-active !important;
+        background-color: $base-sub-menu-active !important;
       }
       }
     }
     }
 
 
     & .theme-dark .is-active > .el-submenu__title {
     & .theme-dark .is-active > .el-submenu__title {
-      color: $base-menu-color-active !important;
+      color: $base-sub-menu-active !important;
     }
     }
 
 
-    & .nest-menu .el-submenu>.el-submenu__title,
+    & .nest-menu .el-submenu > .el-submenu__title,
     & .el-submenu .el-menu-item {
     & .el-submenu .el-menu-item {
       min-width: $base-sidebar-width !important;
       min-width: $base-sidebar-width !important;
 
 
@@ -96,13 +109,23 @@
       }
       }
     }
     }
 
 
-    & .theme-dark .nest-menu .el-submenu>.el-submenu__title,
+    & .theme-dark .nest-menu .el-submenu > .el-submenu__title,
     & .theme-dark .el-submenu .el-menu-item {
     & .theme-dark .el-submenu .el-menu-item {
       background-color: $base-sub-menu-background !important;
       background-color: $base-sub-menu-background !important;
+      min-width: calc(#{$base-sidebar-width} - 10px) !important;
+      margin: 0 5px !important;
+      border-radius: 5px !important;
+      height: 40px !important;
+      line-height: 40px !important;
 
 
       &:hover {
       &:hover {
         background-color: $base-sub-menu-hover !important;
         background-color: $base-sub-menu-hover !important;
       }
       }
+      &.is-active {
+        color: $base-menu-color-active !important;
+        background-color: $base-sub-menu-active !important;
+      }
+
     }
     }
   }
   }
 
 
@@ -131,7 +154,7 @@
     .el-submenu {
     .el-submenu {
       overflow: hidden;
       overflow: hidden;
 
 
-      &>.el-submenu__title {
+      & > .el-submenu__title {
         padding: 0 !important;
         padding: 0 !important;
 
 
         .svg-icon {
         .svg-icon {
@@ -143,8 +166,8 @@
 
 
     .el-menu--collapse {
     .el-menu--collapse {
       .el-submenu {
       .el-submenu {
-        &>.el-submenu__title {
-          &>span {
+        & > .el-submenu__title {
+          & > span {
             height: 0;
             height: 0;
             width: 0;
             width: 0;
             overflow: hidden;
             overflow: hidden;
@@ -191,13 +214,13 @@
 
 
 // when menu collapsed
 // when menu collapsed
 .el-menu--vertical {
 .el-menu--vertical {
-  &>.el-menu {
+  & > .el-menu {
     .svg-icon {
     .svg-icon {
       margin-right: 16px;
       margin-right: 16px;
     }
     }
   }
   }
 
 
-  .nest-menu .el-submenu>.el-submenu__title,
+  .nest-menu .el-submenu > .el-submenu__title,
   .el-menu-item {
   .el-menu-item {
     &:hover {
     &:hover {
       // you can use $subMenuHover
       // you can use $subMenuHover
@@ -206,7 +229,7 @@
   }
   }
 
 
   // the scroll bar appears when the subMenu is too long
   // the scroll bar appears when the subMenu is too long
-  >.el-menu--popup {
+  > .el-menu--popup {
     max-height: 100vh;
     max-height: 100vh;
     overflow-y: auto;
     overflow-y: auto;
 
 

+ 8 - 7
nexo-ui/src/assets/styles/variables.scss

@@ -9,17 +9,18 @@ $yellow:#FEC171;
 $panGreen: #30B08F;
 $panGreen: #30B08F;
 
 
 // 默认菜单主题风格
 // 默认菜单主题风格
-$base-menu-color:#bfcbd9;
-$base-menu-color-active:#f4f4f5;
-$base-menu-background:#1c4a4d;
+$base-menu-color: #ffffff80;
+$base-menu-color-active: #0138c6;
+$base-menu-background: #002786;
 $base-logo-title-color: #ffffff;
 $base-logo-title-color: #ffffff;
 
 
 $base-menu-light-color:rgba(0,0,0,.70);
 $base-menu-light-color:rgba(0,0,0,.70);
 $base-menu-light-background:#ffffff;
 $base-menu-light-background:#ffffff;
-$base-logo-light-title-color: #001529;
+$base-logo-light-title-color: #002786;
 
 
-$base-sub-menu-background:#1c4a4d;
-$base-sub-menu-hover:#1c4a4d;
+$base-sub-menu-background: #002786;
+$base-sub-menu-hover: #ffffff30;
+$base-sub-menu-active: #ffffff;
 
 
 // 自定义暗色菜单风格
 // 自定义暗色菜单风格
 /**
 /**
@@ -36,7 +37,7 @@ $base-sub-menu-background:#000c17;
 $base-sub-menu-hover:#001528;
 $base-sub-menu-hover:#001528;
 */
 */
 
 
-$base-sidebar-width: 200px;
+$base-sidebar-width: 220px;
 
 
 // the :export directive is the magic sauce for webpack
 // the :export directive is the magic sauce for webpack
 // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
 // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass

+ 2 - 2
nexo-ui/src/components/Breadcrumb/index.vue

@@ -68,11 +68,11 @@ export default {
   margin-left: 8px;
   margin-left: 8px;
 
 
   a, .no-redirect {
   a, .no-redirect {
-    color: #937c50 !important;
+    color: #888c93 !important;
     cursor: text;
     cursor: text;
   }
   }
 }
 }
 ::v-deep .el-breadcrumb__separator{
 ::v-deep .el-breadcrumb__separator{
-  color: #937c50 !important;
+  color: #888c93 !important;
 }
 }
 </style>
 </style>

+ 1 - 1
nexo-ui/src/components/Hamburger/index.vue

@@ -3,7 +3,7 @@
     <svg
     <svg
       :class="{'is-active':isActive}"
       :class="{'is-active':isActive}"
       class="hamburger"
       class="hamburger"
-      fill="#937c50"
+      fill="#888c93"
       viewBox="0 0 1024 1024"
       viewBox="0 0 1024 1024"
       xmlns="http://www.w3.org/2000/svg"
       xmlns="http://www.w3.org/2000/svg"
       width="64"
       width="64"

+ 28 - 32
nexo-ui/src/components/HeaderSearch/index.vue

@@ -1,18 +1,23 @@
 <template>
 <template>
-  <div :class="{'show':show}" class="header-search">
-    <svg-icon class-name="search-icon" icon-class="search" @click.stop="click" />
+  <div class="header-search show" :style="{borderBottom:isHeader?'1px solid #0138c6': ''}">
+    <svg-icon class-name="search-icon" icon-class="search" :style="{fill:isHeader?'#0138c6':'#c8c4cc'}"/>
     <el-select
     <el-select
       ref="headerSearchSelect"
       ref="headerSearchSelect"
       v-model="search"
       v-model="search"
       :remote-method="querySearch"
       :remote-method="querySearch"
       filterable
       filterable
       default-first-option
       default-first-option
+      @blur="isHeader = false"
+      @focus="isHeader = true"
       remote
       remote
-      placeholder="Search"
+      placeholder="菜单搜索"
+      size="mini"
       class="header-search-select"
       class="header-search-select"
       @change="change"
       @change="change"
     >
     >
-      <el-option v-for="option in options" :key="option.item.path" :value="option.item" :label="option.item.title.join(' > ')" />
+      <el-option v-for="option in options" :key="option.item.path" :value="option.item"
+                 :label="option.item.title.join(' > ')"
+      />
     </el-select>
     </el-select>
   </div>
   </div>
 </template>
 </template>
@@ -27,10 +32,10 @@ export default {
   name: 'HeaderSearch',
   name: 'HeaderSearch',
   data() {
   data() {
     return {
     return {
+      isHeader: false,
       search: '',
       search: '',
       options: [],
       options: [],
       searchPool: [],
       searchPool: [],
-      show: false,
       fuse: undefined
       fuse: undefined
     }
     }
   },
   },
@@ -45,49 +50,33 @@ export default {
     },
     },
     searchPool(list) {
     searchPool(list) {
       this.initFuse(list)
       this.initFuse(list)
-    },
-    show(value) {
-      if (value) {
-        document.body.addEventListener('click', this.close)
-      } else {
-        document.body.removeEventListener('click', this.close)
-      }
     }
     }
   },
   },
   mounted() {
   mounted() {
     this.searchPool = this.generateRoutes(this.routes)
     this.searchPool = this.generateRoutes(this.routes)
   },
   },
   methods: {
   methods: {
-    click() {
-      this.show = !this.show
-      if (this.show) {
-        this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus()
-      }
-    },
+
     close() {
     close() {
       this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur()
       this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur()
       this.options = []
       this.options = []
-      this.show = false
     },
     },
     change(val) {
     change(val) {
-      const path = val.path;
-      const query = val.query;
-      if(this.ishttp(val.path)) {
+      const path = val.path
+      const query = val.query
+      if (this.ishttp(val.path)) {
         // http(s):// 路径新窗口打开
         // http(s):// 路径新窗口打开
-        const pindex = path.indexOf("http");
-        window.open(path.substr(pindex, path.length), "_blank");
+        const pindex = path.indexOf('http')
+        window.open(path.substr(pindex, path.length), '_blank')
       } else {
       } else {
         if (query) {
         if (query) {
-          this.$router.push({ path: path, query: JSON.parse(query) });
+          this.$router.push({ path: path, query: JSON.parse(query) })
         } else {
         } else {
           this.$router.push(path)
           this.$router.push(path)
         }
         }
       }
       }
       this.search = ''
       this.search = ''
       this.options = []
       this.options = []
-      this.$nextTick(() => {
-        this.show = false
-      })
     },
     },
     initFuse(list) {
     initFuse(list) {
       this.fuse = new Fuse(list, {
       this.fuse = new Fuse(list, {
@@ -112,7 +101,9 @@ export default {
 
 
       for (const router of routes) {
       for (const router of routes) {
         // skip hidden router
         // skip hidden router
-        if (router.hidden) { continue }
+        if (router.hidden) {
+          continue
+        }
 
 
         const data = {
         const data = {
           path: !this.ishttp(router.path) ? path.resolve(basePath, router.path) : router.path,
           path: !this.ishttp(router.path) ? path.resolve(basePath, router.path) : router.path,
@@ -160,10 +151,15 @@ export default {
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 .header-search {
 .header-search {
   font-size: 0 !important;
   font-size: 0 !important;
+  background-color: #07074d50;
+  border-radius: 5px;
+  height: 30px !important;
+  line-height: 30px !important;
 
 
   .search-icon {
   .search-icon {
+    fill: #FFF;
     cursor: pointer;
     cursor: pointer;
-    font-size: 18px;
+    font-size: 14px;
     vertical-align: middle;
     vertical-align: middle;
   }
   }
 
 
@@ -178,13 +174,13 @@ export default {
     vertical-align: middle;
     vertical-align: middle;
 
 
     ::v-deep .el-input__inner {
     ::v-deep .el-input__inner {
+      color: #FFF;
+      background: transparent;
       border-radius: 0;
       border-radius: 0;
       border: 0;
       border: 0;
       padding-left: 0;
       padding-left: 0;
       padding-right: 0;
       padding-right: 0;
       box-shadow: none !important;
       box-shadow: none !important;
-      border-bottom: 1px solid #d9d9d9;
-      vertical-align: middle;
     }
     }
   }
   }
 
 

+ 20 - 3
nexo-ui/src/layout/components/AppMain.vue

@@ -2,15 +2,15 @@
   <section class="app-main">
   <section class="app-main">
     <transition name="fade-transform" mode="out-in">
     <transition name="fade-transform" mode="out-in">
       <keep-alive :include="cachedViews">
       <keep-alive :include="cachedViews">
-        <router-view v-if="!$route.meta.link" :key="key" />
+        <router-view v-if="!$route.meta.link" :key="key"/>
       </keep-alive>
       </keep-alive>
     </transition>
     </transition>
-    <iframe-toggle />
+    <iframe-toggle/>
   </section>
   </section>
 </template>
 </template>
 
 
 <script>
 <script>
-import iframeToggle from "./IframeToggle/index"
+import iframeToggle from './IframeToggle/index'
 
 
 export default {
 export default {
   name: 'AppMain',
   name: 'AppMain',
@@ -33,6 +33,23 @@ export default {
   width: 100%;
   width: 100%;
   position: relative;
   position: relative;
   overflow: hidden;
   overflow: hidden;
+
+
+  &::after {
+    content: "";
+    position: absolute;
+    left: -10px;
+    top: 40px;
+    z-index: 100;
+    width: 20px;
+    height: 20px;
+    background-color: #002786;
+    mask: radial-gradient(circle at 100% 100%, transparent 10px, #f1f1ff 11px);
+    backface-visibility: hidden;
+    transform: scaleX(1) translateZ(0);
+  }
+
+
 }
 }
 
 
 .fixed-header + .app-main {
 .fixed-header + .app-main {

+ 51 - 29
nexo-ui/src/layout/components/Navbar.vue

@@ -1,33 +1,35 @@
 <template>
 <template>
   <div class="navbar">
   <div class="navbar">
-    <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
+    <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container"
+               @toggleClick="toggleSideBar"
+    />
 
 
     <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
     <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
     <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
     <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
 
 
     <div class="right-menu">
     <div class="right-menu">
       <template v-if="device!=='mobile'">
       <template v-if="device!=='mobile'">
-        <search id="header-search" class="right-menu-item" />
-<!--        <screenfull id="screenfull" class="right-menu-item hover-effect" />-->
+        <search id="header-search" class="right-menu-item"/>
+        <!--        <screenfull id="screenfull" class="right-menu-item hover-effect" />-->
 
 
-<!--        <el-tooltip content="布局大小" effect="dark" placement="bottom">-->
-<!--          <size-select id="size-select" class="right-menu-item hover-effect" />-->
-<!--        </el-tooltip>-->
+        <!--        <el-tooltip content="布局大小" effect="dark" placement="bottom">-->
+        <!--          <size-select id="size-select" class="right-menu-item hover-effect" />-->
+        <!--        </el-tooltip>-->
 
 
       </template>
       </template>
 
 
       <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
       <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
         <div class="avatar-wrapper">
         <div class="avatar-wrapper">
           <img :src="avatar" class="user-avatar">
           <img :src="avatar" class="user-avatar">
-          <i class="el-icon-caret-bottom" />
+          <div class="user-info">
+            <span class="user-name">{{ $store.state.user.nickName }}</span>
+            <span style="font-size: 10px">{{time}}</span>
+          </div>
         </div>
         </div>
         <el-dropdown-menu slot="dropdown">
         <el-dropdown-menu slot="dropdown">
           <router-link to="/user/profile">
           <router-link to="/user/profile">
             <el-dropdown-item>个人中心</el-dropdown-item>
             <el-dropdown-item>个人中心</el-dropdown-item>
           </router-link>
           </router-link>
-<!--          <el-dropdown-item @click.native="setting = true">-->
-<!--            <span>布局设置</span>-->
-<!--          </el-dropdown-item>-->
           <el-dropdown-item divided @click.native="logout">
           <el-dropdown-item divided @click.native="logout">
             <span>退出登录</span>
             <span>退出登录</span>
           </el-dropdown-item>
           </el-dropdown-item>
@@ -45,6 +47,7 @@ import Hamburger from '@/components/Hamburger'
 import Screenfull from '@/components/Screenfull'
 import Screenfull from '@/components/Screenfull'
 import SizeSelect from '@/components/SizeSelect'
 import SizeSelect from '@/components/SizeSelect'
 import Search from '@/components/HeaderSearch'
 import Search from '@/components/HeaderSearch'
+import { parseTime } from '@/utils/nexo'
 
 
 export default {
 export default {
   components: {
   components: {
@@ -53,10 +56,16 @@ export default {
     Hamburger,
     Hamburger,
     Screenfull,
     Screenfull,
     SizeSelect,
     SizeSelect,
-    Search,
+    Search
+  },
+  data() {
+    return {
+      time: ''
+    }
   },
   },
   computed: {
   computed: {
     ...mapGetters([
     ...mapGetters([
+      'nickName',
       'sidebar',
       'sidebar',
       'avatar',
       'avatar',
       'device'
       'device'
@@ -78,6 +87,12 @@ export default {
       }
       }
     }
     }
   },
   },
+  created() {
+    this.time = parseTime(new Date(), '{m}-{d} {h}:{i}:{s}')
+    setInterval(() => {
+      this.time = parseTime(new Date(), '{m}-{d} {h}:{i}:{s}')
+    }, 1000)
+  },
   methods: {
   methods: {
     toggleSideBar() {
     toggleSideBar() {
       this.$store.dispatch('app/toggleSideBar')
       this.$store.dispatch('app/toggleSideBar')
@@ -89,9 +104,10 @@ export default {
         type: 'warning'
         type: 'warning'
       }).then(() => {
       }).then(() => {
         this.$store.dispatch('LogOut').then(() => {
         this.$store.dispatch('LogOut').then(() => {
-          location.href = process.env.VUE_APP_CONTEXT_PATH + "index";
+          location.href = process.env.VUE_APP_CONTEXT_PATH + 'index'
         })
         })
-      }).catch(() => {});
+      }).catch(() => {
+      })
     }
     }
   }
   }
 }
 }
@@ -102,13 +118,16 @@ export default {
   height: 50px;
   height: 50px;
   overflow: hidden;
   overflow: hidden;
   position: relative;
   position: relative;
-  //background: #fff;
+  //background: #012588;
   /* https://grabient.com/EwOgDArMA0CMIHYBsZogMywCxxATlllyVjzViXXLBnDyTQgRxAjAA5GwWJsg?angle=135 */
   /* https://grabient.com/EwOgDArMA0CMIHYBsZogMywCxxATlllyVjzViXXLBnDyTQgRxAjAA5GwWJsg?angle=135 */
   /* https://grabient.com/HQFgbA7ANKkxYCcUCMwAMEBMqPZlgKzowronBkgzEoFmmLXCJYhA?angle=270 */
   /* https://grabient.com/HQFgbA7ANKkxYCcUCMwAMEBMqPZlgKzowronBkgzEoFmmLXCJYhA?angle=270 */
   /* https://grabient.com/HQFgrA7ANKCcIzAZjDFrgCZYAYabAyVg0wEZSkA2KJYZPMYKgqM0aoA?angle=45 */
   /* https://grabient.com/HQFgrA7ANKCcIzAZjDFrgCZYAYabAyVg0wEZSkA2KJYZPMYKgqM0aoA?angle=45 */
 
 
-  background: linear-gradient(270deg, #c5a66a 0.000%, #1c4a4d 100.000%);
-  //border-bottom: #4e4e4e 1px solid;
+  //background: linear-gradient(270deg, #c5a66a 0.000%, #1c4a4d 100.000%);
+  /* https://grabient.com/AwGgdAjAbA7CFgExQiUYCsBmK8xYlTGAE45JgtwJgAWNcGU8KRCIA?angle=180 */
+
+  background: linear-gradient(270deg, #b7cff7 0%, #002786 100%);
+  //border-bottom: #f0f0f0 1px solid;
   //box-shadow: 0 1px 4px rgba(0,21,41,.08);
   //box-shadow: 0 1px 4px rgba(0,21,41,.08);
 
 
   .hamburger-container {
   .hamburger-container {
@@ -117,11 +136,12 @@ export default {
     float: left;
     float: left;
     cursor: pointer;
     cursor: pointer;
     transition: background .3s;
     transition: background .3s;
-    -webkit-tap-highlight-color:transparent;
+    -webkit-tap-highlight-color: transparent;
 
 
     &:hover {
     &:hover {
       background: rgba(0, 0, 0, .025)
       background: rgba(0, 0, 0, .025)
     }
     }
+
   }
   }
 
 
   .breadcrumb-container {
   .breadcrumb-container {
@@ -141,7 +161,8 @@ export default {
   .right-menu {
   .right-menu {
     float: right;
     float: right;
     height: 100%;
     height: 100%;
-    line-height: 50px;
+    display: flex;
+    align-items: center;
 
 
     &:focus {
     &:focus {
       outline: none;
       outline: none;
@@ -166,25 +187,26 @@ export default {
     }
     }
 
 
     .avatar-container {
     .avatar-container {
-      margin-right: 30px;
+      margin-right: 10px;
 
 
       .avatar-wrapper {
       .avatar-wrapper {
-        margin-top: 5px;
+        margin-top: 10px;
         position: relative;
         position: relative;
-
+        display: flex;
         .user-avatar {
         .user-avatar {
           cursor: pointer;
           cursor: pointer;
-          width: 40px;
-          height: 40px;
+          width: 29px;
+          height: 29px;
           border-radius: 5px;
           border-radius: 5px;
         }
         }
-
-        .el-icon-caret-bottom {
-          cursor: pointer;
-          position: absolute;
-          right: -20px;
-          top: 25px;
+        .user-info{
+          display: flex;
+          flex-direction: column;
           font-size: 12px;
           font-size: 12px;
+          margin-left: 5px;
+          .user-name{
+            color: #0138c6;
+          }
         }
         }
       }
       }
     }
     }

+ 69 - 48
nexo-ui/src/layout/components/Sidebar/index.vue

@@ -1,57 +1,78 @@
 <template>
 <template>
-    <div :class="{'has-logo':showLogo}" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
-        <logo v-if="showLogo" :collapse="isCollapse" />
-        <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
-            <el-menu
-                :default-active="activeMenu"
-                :collapse="isCollapse"
-                :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground"
-                :text-color="settings.sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor"
-                :unique-opened="true"
-                :active-text-color="settings.theme"
-                :collapse-transition="false"
-                mode="vertical"
-            >
-                <sidebar-item
-                    v-for="(route, index) in sidebarRouters"
-                    :key="route.path  + index"
-                    :item="route"
-                    :base-path="route.path"
-                />
-            </el-menu>
-        </el-scrollbar>
+  <div :class="{'has-logo':showLogo}"
+       :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }"
+  >
+    <logo v-if="showLogo" :collapse="isCollapse"/>
+    <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
+      <el-menu
+        :default-active="activeMenu"
+        :collapse="isCollapse"
+        :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground"
+        :text-color="settings.sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor"
+        :unique-opened="true"
+        :active-text-color="settings.theme"
+        :collapse-transition="false"
+        mode="vertical"
+      >
+        <sidebar-item
+          v-for="(route, index) in sidebarRouters"
+          :key="route.path  + index"
+          :item="route"
+          :base-path="route.path"
+        />
+      </el-menu>
+    </el-scrollbar>
+
+    <div class="copyright">
+      <span>
+      © 2026 云创众享
+      </span>
     </div>
     </div>
+  </div>
 </template>
 </template>
 
 
 <script>
 <script>
-import { mapGetters, mapState } from "vuex";
-import Logo from "./Logo";
-import SidebarItem from "./SidebarItem";
-import variables from "@/assets/styles/variables.scss";
+import { mapGetters, mapState } from 'vuex'
+import Logo from './Logo'
+import SidebarItem from './SidebarItem'
+import variables from '@/assets/styles/variables.scss'
 
 
 export default {
 export default {
-    components: { SidebarItem, Logo },
-    computed: {
-        ...mapState(["settings"]),
-        ...mapGetters(["sidebarRouters", "sidebar"]),
-        activeMenu() {
-            const route = this.$route;
-            const { meta, path } = route;
-            // if set path, the sidebar will highlight the path you set
-            if (meta.activeMenu) {
-                return meta.activeMenu;
-            }
-            return path;
-        },
-        showLogo() {
-            return this.$store.state.settings.sidebarLogo;
-        },
-        variables() {
-            return variables;
-        },
-        isCollapse() {
-            return !this.sidebar.opened;
-        }
+  components: { SidebarItem, Logo },
+  computed: {
+    ...mapState(['settings']),
+    ...mapGetters(['sidebarRouters', 'sidebar']),
+    activeMenu() {
+      const route = this.$route
+      const { meta, path } = route
+      // if set path, the sidebar will highlight the path you set
+      if (meta.activeMenu) {
+        return meta.activeMenu
+      }
+      return path
+    },
+    showLogo() {
+      return this.$store.state.settings.sidebarLogo
+    },
+    variables() {
+      return variables
+    },
+    isCollapse() {
+      return !this.sidebar.opened
     }
     }
-};
+  }
+}
 </script>
 </script>
+
+<style lang="scss" scoped>
+.copyright {
+  position: absolute;
+  bottom: 10px;
+  width: 100%;
+  text-align: center;
+  font-size: 12px;
+  color: #ffffff20;
+  user-select: none;
+
+}
+</style>

+ 3 - 3
nexo-ui/src/settings.js

@@ -17,12 +17,12 @@ module.exports = {
   /**
   /**
    * 是否显示 tagsView
    * 是否显示 tagsView
    */
    */
-  tagsView: true,
+  tagsView: false,
 
 
   /**
   /**
    * 是否固定头部
    * 是否固定头部
    */
    */
-  fixedHeader: false,
+  fixedHeader: true,
 
 
   /**
   /**
    * 是否显示logo
    * 是否显示logo
@@ -32,7 +32,7 @@ module.exports = {
   /**
   /**
    * 是否显示动态标题
    * 是否显示动态标题
    */
    */
-  dynamicTitle: false,
+  dynamicTitle: true,
 
 
   /**
   /**
    * @type {string | array} 'production' | ['production', 'development']
    * @type {string | array} 'production' | ['production', 'development']

+ 4 - 3
nexo-ui/src/store/getters.js

@@ -8,12 +8,13 @@ const getters = {
   token: state => state.user.token,
   token: state => state.user.token,
   avatar: state => state.user.avatar,
   avatar: state => state.user.avatar,
   name: state => state.user.name,
   name: state => state.user.name,
+  nickName: state => state.user.nickName,
   introduction: state => state.user.introduction,
   introduction: state => state.user.introduction,
   roles: state => state.user.roles,
   roles: state => state.user.roles,
   permissions: state => state.user.permissions,
   permissions: state => state.user.permissions,
   permission_routes: state => state.permission.routes,
   permission_routes: state => state.permission.routes,
-  topbarRouters:state => state.permission.topbarRouters,
-  defaultRoutes:state => state.permission.defaultRoutes,
-  sidebarRouters:state => state.permission.sidebarRouters,
+  topbarRouters: state => state.permission.topbarRouters,
+  defaultRoutes: state => state.permission.defaultRoutes,
+  sidebarRouters: state => state.permission.sidebarRouters
 }
 }
 export default getters
 export default getters

+ 1 - 1
nexo-ui/src/store/modules/settings.js

@@ -5,7 +5,7 @@ const { sideTheme, showSettings, topNav, tagsView, fixedHeader, sidebarLogo, dyn
 const storageSetting = JSON.parse(localStorage.getItem('layout-setting')) || ''
 const storageSetting = JSON.parse(localStorage.getItem('layout-setting')) || ''
 const state = {
 const state = {
   title: '',
   title: '',
-  theme: storageSetting.theme || '#A38140',
+  theme: storageSetting.theme || '#0138c6',
   sideTheme: storageSetting.sideTheme || sideTheme,
   sideTheme: storageSetting.sideTheme || sideTheme,
   showSettings: showSettings,
   showSettings: showSettings,
   topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav,
   topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav,

+ 5 - 0
nexo-ui/src/store/modules/user.js

@@ -7,6 +7,7 @@ const user = {
     id: '',
     id: '',
     name: '',
     name: '',
     avatar: '',
     avatar: '',
+    nickName: '',
     roles: [],
     roles: [],
     permissions: []
     permissions: []
   },
   },
@@ -29,6 +30,9 @@ const user = {
     },
     },
     SET_PERMISSIONS: (state, permissions) => {
     SET_PERMISSIONS: (state, permissions) => {
       state.permissions = permissions
       state.permissions = permissions
+    },
+    SET_NICK_NAME: (state, nickName) => {
+      state.nickName = nickName
     }
     }
   },
   },
 
 
@@ -64,6 +68,7 @@ const user = {
           }
           }
           commit('SET_ID', user.userId)
           commit('SET_ID', user.userId)
           commit('SET_NAME', user.userName)
           commit('SET_NAME', user.userName)
+          commit('SET_NICK_NAME', user.nickName)
           commit('SET_AVATAR', avatar)
           commit('SET_AVATAR', avatar)
           resolve(res)
           resolve(res)
         }).catch(error => {
         }).catch(error => {

+ 1 - 1
nexo-ui/src/views/system/user/profile/userAvatar.vue

@@ -180,7 +180,7 @@ export default {
   -moz-osx-font-smoothing: grayscale;
   -moz-osx-font-smoothing: grayscale;
   cursor: pointer;
   cursor: pointer;
   line-height: 110px;
   line-height: 110px;
-  border-radius: 50%;
+  border-radius: 10px;
 }
 }
 </style>
 </style>