Parcourir la source

添加任务风格功能

yangll il y a 3 ans
Parent
commit
0b35577e20
33 fichiers modifiés avec 1861 ajouts et 108 suppressions
  1. 14 10
      tnc-base/tnc-base-core/src/main/java/org/jeecg/common/constant/enums/CgformEnum.java
  2. 1 1
      tnc-generate/src/main/java/org/jeecg/codegen/database/DbReadTableUtil.java
  3. 10 0
      tnc-generate/src/main/java/org/jeecg/codegen/generate/pojo/CgFormColumnExtendVo.java
  4. 4 4
      tnc-generate/src/main/java/org/jeecg/codegen/window/JeecgOneUtil.java
  5. 2 2
      tnc-generate/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue/${entityName}List.vuei
  6. 159 0
      tnc-generate/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/controller/${entityName}TaskController.javai
  7. 52 47
      tnc-generate/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/entity/${entityName}.javai
  8. 95 0
      tnc-generate/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/entity/${entityName}Task.javai
  9. 18 0
      tnc-generate/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/mapper/${entityName}TaskMapper.javai
  10. 5 0
      tnc-generate/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/mapper/xml/${entityName}TaskMapper.xml
  11. 15 0
      tnc-generate/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/service/I${entityName}TaskService.javai
  12. 20 0
      tnc-generate/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/service/impl/${entityName}TaskServiceImpl.javai
  13. 2 2
      tnc-generate/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/vue/${entityName}List.vuei
  14. 33 35
      tnc-online/src/main/java/org/jeecg/modules/online/cgform/controller/OnlCgformHeadController.java
  15. 3 3
      tnc-online/src/main/java/org/jeecg/modules/online/cgform/entity/OnlCgformField.java
  16. 2 2
      tnc-system/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue/${entityName}List.vuei
  17. 159 0
      tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/controller/${entityName}Controller.javai
  18. 159 0
      tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/controller/${entityName}TaskController.javai
  19. 93 0
      tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/entity/${entityName}.javai
  20. 95 0
      tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/entity/${entityName}Task.javai
  21. 18 0
      tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/mapper/${entityName}Mapper.javai
  22. 18 0
      tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/mapper/${entityName}TaskMapper.javai
  23. 5 0
      tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/mapper/xml/${entityName}Mapper.xml
  24. 5 0
      tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/mapper/xml/${entityName}TaskMapper.xml
  25. 15 0
      tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/service/I${entityName}Service.javai
  26. 15 0
      tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/service/I${entityName}TaskService.javai
  27. 20 0
      tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/service/impl/${entityName}ServiceImpl.javai
  28. 20 0
      tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/service/impl/${entityName}TaskServiceImpl.javai
  29. 422 0
      tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/vue/${entityName}List.vuei
  30. 217 0
      tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Form.vuei
  31. 70 0
      tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Modal.vuei
  32. 93 0
      tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Modal__Style#Drawer.vuei
  33. 2 2
      tnc-system/src/main/resources/jeecg/jeecg_database.properties

+ 14 - 10
tnc-base/tnc-base-core/src/main/java/org/jeecg/common/constant/enums/CgformEnum.java

@@ -11,6 +11,10 @@ import java.util.Map;
  */
 public enum CgformEnum {
 
+    /**
+     * 单表
+     */
+    TWO(1, "two", "/jeecg/code-template-online", "default.two", "任务风格"),
     /**
      * 单表
      */
@@ -124,9 +128,9 @@ public enum CgformEnum {
      * @return 枚举
      */
     public static CgformEnum getCgformEnumByConfig(String code) {
-        for (CgformEnum e : CgformEnum.values()) {
-            if (e.code.equals(code)) {
-                return e;
+        for (CgformEnum cgformEnum : CgformEnum.values()) {
+            if (cgformEnum.code.equals(code)) {
+                return cgformEnum;
             }
         }
         return null;
@@ -139,16 +143,16 @@ public enum CgformEnum {
      * @return 所有
      */
     public static List<Map<String, Object>> getJspModelList(int type) {
-        List<Map<String, Object>> ls = new ArrayList<Map<String, Object>>();
-        for (CgformEnum e : CgformEnum.values()) {
-            if (e.type == type) {
+        List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();
+        for (CgformEnum cgformEnum : CgformEnum.values()) {
+            if (cgformEnum.type == type) {
                 Map<String, Object> map = new HashMap<String, Object>();
-                map.put("code", e.code);
-                map.put("note", e.note);
-                ls.add(map);
+                map.put("code", cgformEnum.code);
+                map.put("note", cgformEnum.note);
+                mapList.add(map);
             }
         }
-        return ls;
+        return mapList;
     }
 
 

+ 1 - 1
tnc-generate/src/main/java/org/jeecg/codegen/database/DbReadTableUtil.java

@@ -502,7 +502,7 @@ public class DbReadTableUtil {
             return false;
         }
         for (String filterField : filterFields) {
-            if (filterField.equals(field)) {
+            if (filterField.equalsIgnoreCase(field)) {
                 return true;
             }
         }

+ 10 - 0
tnc-generate/src/main/java/org/jeecg/codegen/generate/pojo/CgFormColumnExtendVo.java

@@ -56,6 +56,16 @@ public class CgFormColumnExtendVo {
      * 填值规则表达式只允许存在一个,且不能和其他规则混用。
      */
     protected String defaultVal;
+    /**
+     * 字段分组
+     * 共通:common;
+     * 任务:task;
+     * 基本:basic;
+     * 规范性:standard;
+     * 附件:file;
+     */
+    protected String fieldGroup = "common";
+    /** 上传顺序 */
     protected String uploadnum;
     /** 扩展参数 */
     protected Map<?, ?> extendParams;

+ 4 - 4
tnc-generate/src/main/java/org/jeecg/codegen/window/JeecgOneUtil.java

@@ -88,13 +88,13 @@ public class JeecgOneUtil {
     private static void genTwo(){
         TableVo tableVo = new TableVo();
         // 表名
-        tableVo.setTableName("test_demo");
+        tableVo.setTableName("check_sms");
         // 实体名
-        tableVo.setEntityName("TestDemo");
+        tableVo.setEntityName("CheckSms");
         // 包名
-        tableVo.setEntityPackage("demo");
+        tableVo.setEntityPackage("checksms");
         // 描述
-        tableVo.setFtlDescription("系统用户");
+        tableVo.setFtlDescription("短信验证");
         // 单表代码生成器
         CodeGenerateOne generate = new CodeGenerateOne(tableVo);
         // 自定义配置 代码生成路径

+ 2 - 2
tnc-generate/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue/${entityName}List.vuei

@@ -149,7 +149,7 @@
       <a-table
         ref="table"
         size="middle"
-        <#if (tableVo.extendParams.scroll)!'0'=='1'>
+        <#if tableVo.extendParams.scroll! == '1'>
         :scroll="{x:true}"
         </#if>
         bordered
@@ -310,7 +310,7 @@
             title: '操作',
             dataIndex: 'action',
             align:"center",
-            <#if (tableVo.extendParams.scroll)!'0'=='1'>
+            <#if (tableVo.extendParams.scroll)! == '1'>
             fixed:"right",
             width:147,
             </#if>

+ 159 - 0
tnc-generate/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/controller/${entityName}TaskController.javai

@@ -0,0 +1,159 @@
+package ${bussiPackage}.${entityPackage}.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import ${bussiPackage}.${entityPackage}.entity.${entityName}Task;
+import ${bussiPackage}.${entityPackage}.service.I${entityName}TaskService;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+
+ /**
+ * ${tableVo.ftlDescription}
+ *
+ * @author tnc-boot
+ * @since ${.now?string["yyyy-MM-dd"]}
+ * @version V1.0
+ */
+@Slf4j
+@Api(tags="${tableVo.ftlDescription}")
+@RestController
+@RequestMapping("/${entityPackage}/${entityName?uncap_first}Task")
+public class ${entityName}TaskController extends JeecgController<${entityName}Task, I${entityName}TaskService> {
+	@Autowired
+	private I${entityName}TaskService ${entityName?uncap_first}TaskService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param ${entityName?uncap_first}Task
+	 * @param pageNo 页码
+	 * @param pageSize 条数
+	 * @param request 请求
+	 * @return 结果
+	 */
+	//@AutoLog(value = "${tableVo.ftlDescription}-分页列表查询")
+	@ApiOperation(value="${tableVo.ftlDescription}-分页列表查询", notes="${tableVo.ftlDescription}-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<${entityName}Task>> queryPageList(${entityName}Task ${entityName?uncap_first}Task,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest request) {
+		QueryWrapper<${entityName}Task> queryWrapper = QueryGenerator.initQueryWrapper(${entityName?uncap_first}Task, request.getParameterMap());
+		Page<${entityName}Task> page = new Page<${entityName}Task>(pageNo, pageSize);
+		IPage<${entityName}Task> pageList = ${entityName?uncap_first}TaskService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 * 添加
+	 *
+	 * @param ${entityName?uncap_first}Task 数据
+	 * @return 结果
+	 */
+	@AutoLog(value = "${tableVo.ftlDescription}-添加")
+	@ApiOperation(value="${tableVo.ftlDescription}-添加", notes="${tableVo.ftlDescription}-添加")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody ${entityName}Task ${entityName?uncap_first}Task) {
+		${entityName?uncap_first}TaskService.save(${entityName?uncap_first}Task);
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 * 编辑
+	 *
+	 * @param ${entityName?uncap_first}Task 数据
+	 * @return 结果
+	 */
+	@AutoLog(value = "${tableVo.ftlDescription}-编辑")
+	@ApiOperation(value="${tableVo.ftlDescription}-编辑", notes="${tableVo.ftlDescription}-编辑")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody ${entityName}Task ${entityName?uncap_first}Task) {
+		${entityName?uncap_first}TaskService.updateById(${entityName?uncap_first}Task);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 * 通过id删除
+	 *
+	 * @param id 主键
+	 * @return 结果
+	 */
+	@AutoLog(value = "${tableVo.ftlDescription}-通过id删除")
+	@ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id") String id) {
+		${entityName?uncap_first}TaskService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids 所有主键(逗号隔开)
+	 * @return 结果
+	 */
+	@AutoLog(value = "${tableVo.ftlDescription}-批量删除")
+	@ApiOperation(value="${tableVo.ftlDescription}-批量删除", notes="${tableVo.ftlDescription}-批量删除")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids") String ids) {
+		this.${entityName?uncap_first}TaskService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id 主键
+	 * @return 结果
+	 */
+	//@AutoLog(value = "${tableVo.ftlDescription}-通过id查询")
+	@ApiOperation(value="${tableVo.ftlDescription}-通过id查询", notes="${tableVo.ftlDescription}-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<${entityName}Task> queryById(@RequestParam(name="id") String id) {
+		${entityName}Task ${entityName?uncap_first}Task = ${entityName?uncap_first}TaskService.getById(id);
+		if(${entityName?uncap_first}Task==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(${entityName?uncap_first}Task);
+	}
+
+    /**
+     * 导出excel
+     *
+     * @param request 请求
+     * @param ${entityName?uncap_first}Task 数据
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, ${entityName}Task ${entityName?uncap_first}Task) {
+        return super.exportXls(request, ${entityName?uncap_first}Task, ${entityName}Task.class, "${tableVo.ftlDescription}");
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request 请求
+     * @param response 响应
+     * @return 结果
+     */
+    @PostMapping(value = "/importExcel")
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, ${entityName}Task.class);
+    }
+
+}

+ 52 - 47
tnc-generate/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/entity/${entityName}.javai

@@ -32,57 +32,62 @@ import lombok.experimental.Accessors;
 public class ${entityName} implements Serializable {
     private static final long serialVersionUID = 1L;
 
-    <#assign excel_ignore_arr=['createBy','createTime','updateBy','updateTime','sysOrgCode']>
-    <#list originalColumns as po>
-    <#-- 生成字典Code -->
-    <#assign list_field_dictCode="">
-    <#if po.classType='sel_user'>
-      <#assign list_field_dictCode=', dictTable = "sys_user", dicText = "realname", dicCode = "username"'>
-    <#elseif po.classType='sel_depart'>
-      <#assign list_field_dictCode=', dictTable = "sys_depart", dicText = "depart_name", dicCode = "id"'>
-    <#elseif po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox'>
-      <#if po.dictTable?default("")?trim?length gt 1>
-        <#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText}", dicCode = "${po.dictField}"'>
-      <#elseif po.dictField?default("")?trim?length gt 1>
-        <#assign list_field_dictCode=', dicCode = "${po.dictField}"'>
-      </#if>
-    <#elseif po.classType=='sel_tree'>
-        <#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText?split(",")[2]}", dicCode = "${po.dictText?split(",")[0]}"'>
+<#-- excel注解 忽略字段 -->
+<#assign excel_ignore_arr=['createBy','createTime','updateBy','updateTime','sysOrgCode']>
+<#list originalColumns as po>
+  <#-- 生成字典Code -->
+  <#assign list_field_dictCode="">
+  <#-- 用户选择框 -->
+  <#if po.classType='sel_user'>
+    <#assign list_field_dictCode=', dictTable = "sys_user", dicText = "realname", dicCode = "username"'>
+  <#-- 部门选择框 -->
+  <#elseif po.classType='sel_depart'>
+    <#assign list_field_dictCode=', dictTable = "sys_depart", dicText = "depart_name", dicCode = "id"'>
+  <#-- 下拉框、下拉多选框、搜索框、单选框、多选框 -->
+  <#elseif po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox'>
+    <#if po.dictTable?default("")?trim?length gt 1>
+      <#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText}", dicCode = "${po.dictField}"'>
+    <#elseif po.dictField?default("")?trim?length gt 1>
+      <#assign list_field_dictCode=', dicCode = "${po.dictField}"'>
     </#if>
-	/**${po.filedComment}*/
-	<#if po.fieldName == primaryKeyField>
-	@TableId(type = IdType.ASSIGN_ID)
-	<#else>
-  		<#if po.fieldDbType =='Date' || po.fieldDbType =='Datetime'>
-			<#if po.classType=='date'>
-    <#if !excel_ignore_arr?seq_contains("${po.fieldName}")>
-	@Excel(name = "${po.filedComment}", width = 15, format = "yyyy-MM-dd")
-	</#if>
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+  <#-- 自定义树控件 -->
+  <#elseif po.classType=='sel_tree'>
+      <#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText?split(",")[2]}", dicCode = "${po.dictText?split(",")[0]}"'>
+  </#if>
+    /** ${po.filedComment} */
+  <#if po.fieldName == primaryKeyField>
+    @TableId(type = IdType.ASSIGN_ID)
+  <#else>
+    <#if po.fieldDbType =='Date' || po.fieldDbType =='Datetime'>
+      <#if po.classType=='date'>
+        <#if !excel_ignore_arr?seq_contains("${po.fieldName}")>
+    @Excel(name = "${po.filedComment}", width = 15, format = "yyyy-MM-dd")
+        </#if>
+  @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
     @DateTimeFormat(pattern="yyyy-MM-dd")
-			<#else>
-    <#if !excel_ignore_arr?seq_contains("${po.fieldName}")>
-	@Excel(name = "${po.filedComment}", width = 20, format = "yyyy-MM-dd HH:mm:ss")
-	</#if>
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+      <#else>
+        <#if !excel_ignore_arr?seq_contains("${po.fieldName}")>
+    @Excel(name = "${po.filedComment}", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+        </#if>
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
-			</#if>
-		<#else>
-    <#if !excel_ignore_arr?seq_contains("${po.fieldName}")>
-	@Excel(name = "${po.filedComment}", width = 15${list_field_dictCode})
-	</#if>
-  		</#if>
-      <#if list_field_dictCode?length gt 1>
-	@Dict(${list_field_dictCode?substring(2)})
       </#if>
-  		<#--  <#if po.classType!='popup'>
-  			<#if po.dictTable?default("")?trim?length gt 1>
-  	@Dict(dicCode="${po.dictField}",dicText="${po.dictText}",dictTable="${po.dictTable}")
-  			<#elseif po.dictField?default("")?trim?length gt 1>
-  	@Dict(dicCode="${po.dictField}")
-  			</#if>
-  		</#if>-->
+    <#else>
+      <#if !excel_ignore_arr?seq_contains("${po.fieldName}")>
+    @Excel(name = "${po.filedComment}", width = 15${list_field_dictCode})
+      </#if>
+    </#if>
+    <#if list_field_dictCode?length gt 1>
+    @Dict(${list_field_dictCode?substring(2)})
     </#if>
+      <#--  <#if po.classType!='popup'>
+        <#if po.dictTable?default("")?trim?length gt 1>
+    @Dict(dicCode="${po.dictField}",dicText="${po.dictText}",dictTable="${po.dictTable}")
+        <#elseif po.dictField?default("")?trim?length gt 1>
+    @Dict(dicCode="${po.dictField}")
+        </#if>
+      </#if>-->
+  </#if>
     <#include "/common/blob.ftl">
-	</#list>
+</#list>
 }

+ 95 - 0
tnc-generate/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/entity/${entityName}Task.javai

@@ -0,0 +1,95 @@
+package ${bussiPackage}.${entityPackage}.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * ${tableVo.ftlDescription}
+ *
+ * @author tnc-boot1
+ * @since ${.now?string["yyyy-MM-dd"]}
+ * @version: V1.0
+ */
+@Data
+@TableName("${tableName}")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="${tableName}对象", description="${tableVo.ftlDescription}")
+public class ${entityName}Task implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+<#-- excel注解 忽略字段 -->
+<#assign excel_ignore_arr=['createBy','createTime','updateBy','updateTime','sysOrgCode']>
+<#list originalColumns as po>
+<#if po.fieldGroup='common'>
+  <#-- 生成字典Code -->
+  <#assign list_field_dictCode="">
+  <#-- 用户选择框 -->
+  <#if po.classType='sel_user'>
+    <#assign list_field_dictCode=', dictTable = "sys_user", dicText = "realname", dicCode = "username"'>
+  <#-- 部门选择框 -->
+  <#elseif po.classType='sel_depart'>
+    <#assign list_field_dictCode=', dictTable = "sys_depart", dicText = "depart_name", dicCode = "id"'>
+  <#-- 下拉框、下拉多选框、搜索框、单选框、多选框 -->
+  <#elseif po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox'>
+    <#if po.dictTable?default("")?trim?length gt 1>
+      <#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText}", dicCode = "${po.dictField}"'>
+    <#elseif po.dictField?default("")?trim?length gt 1>
+      <#assign list_field_dictCode=', dicCode = "${po.dictField}"'>
+    </#if>
+  <#-- 自定义树控件 -->
+  <#elseif po.classType=='sel_tree'>
+      <#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText?split(",")[2]}", dicCode = "${po.dictText?split(",")[0]}"'>
+  </#if>
+    /** ${po.filedComment} */
+  <#if po.fieldName == primaryKeyField>
+    @TableId(type = IdType.ASSIGN_ID)
+  <#else>
+    <#if po.fieldDbType =='Date' || po.fieldDbType =='Datetime'>
+      <#if po.classType=='date'>
+        <#if !excel_ignore_arr?seq_contains("${po.fieldName}")>
+    @Excel(name = "${po.filedComment}", width = 15, format = "yyyy-MM-dd")
+        </#if>
+  @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+      <#else>
+        <#if !excel_ignore_arr?seq_contains("${po.fieldName}")>
+    @Excel(name = "${po.filedComment}", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+        </#if>
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+      </#if>
+    <#else>
+      <#if !excel_ignore_arr?seq_contains("${po.fieldName}")>
+    @Excel(name = "${po.filedComment}", width = 15${list_field_dictCode})
+      </#if>
+    </#if>
+    <#if list_field_dictCode?length gt 1>
+    @Dict(${list_field_dictCode?substring(2)})
+    </#if>
+      <#--  <#if po.classType!='popup'>
+        <#if po.dictTable?default("")?trim?length gt 1>
+    @Dict(dicCode="${po.dictField}",dicText="${po.dictText}",dictTable="${po.dictTable}")
+        <#elseif po.dictField?default("")?trim?length gt 1>
+    @Dict(dicCode="${po.dictField}")
+        </#if>
+      </#if>-->
+  </#if>
+  <#include "/common/blob.ftl">
+</#if>
+</#list>
+}

+ 18 - 0
tnc-generate/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/mapper/${entityName}TaskMapper.javai

@@ -0,0 +1,18 @@
+package ${bussiPackage}.${entityPackage}.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import ${bussiPackage}.${entityPackage}.entity.${entityName}Task;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * ${tableVo.ftlDescription}
+ *
+ * @author tnc-boot
+ * @since ${.now?string["yyyy-MM-dd"]}
+ * @version V1.0
+ */
+public interface ${entityName}TaskMapper extends BaseMapper<${entityName}Task> {
+
+}

+ 5 - 0
tnc-generate/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/mapper/xml/${entityName}TaskMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="${bussiPackage}.${entityPackage}.mapper.${entityName}TaskMapper">
+
+</mapper>

+ 15 - 0
tnc-generate/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/service/I${entityName}TaskService.javai

@@ -0,0 +1,15 @@
+package ${bussiPackage}.${entityPackage}.service;
+
+import ${bussiPackage}.${entityPackage}.entity.${entityName}Task;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * ${tableVo.ftlDescription}
+ *
+ * @author tnc-boot
+ * @since ${.now?string["yyyy-MM-dd"]}
+ * @version V1.0
+ */
+public interface I${entityName}TaskService extends IService<${entityName}Task> {
+
+}

+ 20 - 0
tnc-generate/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/service/impl/${entityName}TaskServiceImpl.javai

@@ -0,0 +1,20 @@
+package ${bussiPackage}.${entityPackage}.service.impl;
+
+import ${bussiPackage}.${entityPackage}.entity.${entityName}Task;
+import ${bussiPackage}.${entityPackage}.mapper.${entityName}TaskMapper;
+import ${bussiPackage}.${entityPackage}.service.I${entityName}TaskService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * ${tableVo.ftlDescription}
+ *
+ * @author tnc-boot
+ * @since ${.now?string["yyyy-MM-dd"]}
+ * @version V1.0
+ */
+@Service
+public class ${entityName}TaskServiceImpl extends ServiceImpl<${entityName}TaskMapper, ${entityName}Task> implements I${entityName}TaskService {
+
+}

+ 2 - 2
tnc-generate/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/vue/${entityName}List.vuei

@@ -181,7 +181,7 @@
       <a-table
         ref="table"
         size="middle"
-        <#if (tableVo.extendParams.scroll)!'0'=='1'>
+        <#if (tableVo.extendParams.scroll)! == '1'>
         :scroll="{x:true}"
         </#if>
         bordered
@@ -336,7 +336,7 @@
             title: '操作',
             dataIndex: 'action',
             align:"center",
-            <#if (tableVo.extendParams.scroll)!'0'=='1'>
+            <#if (tableVo.extendParams.scroll)! == '1'>
             fixed:"right",
             width:147,
             </#if>

+ 33 - 35
tnc-online/src/main/java/org/jeecg/modules/online/cgform/controller/OnlCgformHeadController.java

@@ -71,55 +71,53 @@ public class OnlCgformHeadController {
 
     //region 代码生成->弹窗
     @GetMapping({"/tableInfo"})
-    public Result<?> tableInfo(@RequestParam(name = "code",required = true) String code) {
-        OnlCgformHead var2 = onlCgformHeadService.getById(code);
-        if (var2 == null) {
+    public Result<?> tableInfo(@RequestParam(name = "code") String code) {
+        OnlCgformHead cgformHead = onlCgformHeadService.getById(code);
+        if (cgformHead == null) {
             return Result.error("未找到对应实体");
         } else {
-            HashMap var3 = new HashMap();
-            var3.put("main", var2);
-            if (var2.getTableType() == 2) {
-                String var4 = var2.getSubTableStr();
-                if (oConvertUtils.isNotEmpty(var4)) {
-                    ArrayList var5 = new ArrayList();
-                    String[] var6 = var4.split(",");
-                    String[] var7 = var6;
-                    int var8 = var6.length;
-
-                    for(int var9 = 0; var9 < var8; ++var9) {
-                        String var10 = var7[var9];
-                        LambdaQueryWrapper<OnlCgformHead> var11 = new LambdaQueryWrapper<OnlCgformHead>();
-                        var11.eq(OnlCgformHead::getTableName, var10);
-                        OnlCgformHead var12 = (OnlCgformHead)this.onlCgformHeadService.getOne(var11);
-                        var5.add(var12);
+            Map<String, Object> result = new HashMap<>();
+            result.put("main", cgformHead);
+            if (cgformHead.getTableType() == 2) {
+                String subTableStr = cgformHead.getSubTableStr();
+                if (oConvertUtils.isNotEmpty(subTableStr)) {
+                    List<OnlCgformHead> cgformHeadList = new ArrayList<>();
+                    String[] subTableArr = subTableStr.split(",");
+
+                    for(int i = 0; i < subTableArr.length; i++) {
+                        String subTable = subTableArr[i];
+                        LambdaQueryWrapper<OnlCgformHead> queryWrapper = new LambdaQueryWrapper<OnlCgformHead>();
+                        queryWrapper.eq(OnlCgformHead::getTableName, subTable);
+                        OnlCgformHead dbCgformHead = this.onlCgformHeadService.getOne(queryWrapper);
+                        cgformHeadList.add(dbCgformHead);
                     }
 
-                    Collections.sort(var5, (Comparator<OnlCgformHead>) (var112, var21) -> {
-                        Integer var31 = var112.getTabOrderNum();
-                        if (var31 == null) {
-                            var31 = 0;
+                    Collections.sort(cgformHeadList, (head1, head2) -> {
+                        Integer tabOrderNum1 = head1.getTabOrderNum();
+                        if (tabOrderNum1 == null) {
+                            tabOrderNum1 = 0;
                         }
 
-                        Integer var41 = var21.getTabOrderNum();
-                        if (var41 == null) {
-                            var41 = 0;
+                        Integer tabOrderNum2 = head2.getTabOrderNum();
+                        if (tabOrderNum2 == null) {
+                            tabOrderNum2 = 0;
                         }
 
-                        return var31.compareTo(var41);
+                        return tabOrderNum1.compareTo(tabOrderNum2);
                     });
-                    var3.put("sub", var5);
+                    result.put("sub", cgformHeadList);
                 }
             }
 
-            Integer var13 = var2.getTableType();
-            if ("Y".equals(var2.getIsTree())) {
-                var13 = 3;
+            Integer tableType = cgformHead.getTableType();
+            if ("Y".equals(cgformHead.getIsTree())) {
+                tableType = 3;
             }
 
-            List var14 = CgformEnum.getJspModelList(var13);
-            var3.put("jspModeList", var14);
-            var3.put("projectPath", CodeConfigProperties.getGeneratePath());
-            return Result.ok(var3);
+            List<Map<String, Object>> jspModeList = CgformEnum.getJspModelList(tableType);
+            result.put("jspModeList", jspModeList);
+            result.put("projectPath", CodeConfigProperties.getGeneratePath());
+            return Result.ok(result);
         }
     }
 

+ 3 - 3
tnc-online/src/main/java/org/jeecg/modules/online/cgform/entity/OnlCgformField.java

@@ -120,9 +120,9 @@ public class OnlCgformField implements Serializable {
     /**
      * 字段分组code
      */
-    @Excel(name = "字段分组code", width = 15)
-    @ApiModelProperty(value = "字段分组code")
-    private String fieldGroupCode;
+    @Excel(name = "字段分组", width = 15)
+    @ApiModelProperty(value = "字段分组")
+    private String fieldGroup;
     /** 是否查询条件0否 1是 */
     @Excel(name = "是否查询条件0否 1是", width = 15)
     @ApiModelProperty(value = "是否查询条件0否 1是")

+ 2 - 2
tnc-system/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue/${entityName}List.vuei

@@ -149,7 +149,7 @@
       <a-table
         ref="table"
         size="middle"
-        <#if tableVo.extendParams.scroll=='1'>
+        <#if (tableVo.extendParams.scroll)! == '1'>
         :scroll="{x:true}"
         </#if>
         bordered
@@ -310,7 +310,7 @@
             title: '操作',
             dataIndex: 'action',
             align:"center",
-            <#if tableVo.extendParams.scroll=='1'>
+            <#if (tableVo.extendParams.scroll)! == '1'>
             fixed:"right",
             width:147,
             </#if>

+ 159 - 0
tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/controller/${entityName}Controller.javai

@@ -0,0 +1,159 @@
+package ${bussiPackage}.${entityPackage}.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import ${bussiPackage}.${entityPackage}.entity.${entityName};
+import ${bussiPackage}.${entityPackage}.service.I${entityName}Service;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+
+ /**
+ * ${tableVo.ftlDescription}
+ *
+ * @author tnc-boot
+ * @since ${.now?string["yyyy-MM-dd"]}
+ * @version V1.0
+ */
+@Slf4j
+@Api(tags="${tableVo.ftlDescription}")
+@RestController
+@RequestMapping("/${entityPackage}/${entityName?uncap_first}")
+public class ${entityName}Controller extends JeecgController<${entityName}, I${entityName}Service> {
+	@Autowired
+	private I${entityName}Service ${entityName?uncap_first}Service;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param ${entityName?uncap_first}
+	 * @param pageNo 页码
+	 * @param pageSize 条数
+	 * @param request 请求
+	 * @return 结果
+	 */
+	//@AutoLog(value = "${tableVo.ftlDescription}-分页列表查询")
+	@ApiOperation(value="${tableVo.ftlDescription}-分页列表查询", notes="${tableVo.ftlDescription}-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<${entityName}>> queryPageList(${entityName} ${entityName?uncap_first},
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest request) {
+		QueryWrapper<${entityName}> queryWrapper = QueryGenerator.initQueryWrapper(${entityName?uncap_first}, request.getParameterMap());
+		Page<${entityName}> page = new Page<${entityName}>(pageNo, pageSize);
+		IPage<${entityName}> pageList = ${entityName?uncap_first}Service.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 * 添加
+	 *
+	 * @param ${entityName?uncap_first} 数据
+	 * @return 结果
+	 */
+	@AutoLog(value = "${tableVo.ftlDescription}-添加")
+	@ApiOperation(value="${tableVo.ftlDescription}-添加", notes="${tableVo.ftlDescription}-添加")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody ${entityName} ${entityName?uncap_first}) {
+		${entityName?uncap_first}Service.save(${entityName?uncap_first});
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 * 编辑
+	 *
+	 * @param ${entityName?uncap_first} 数据
+	 * @return 结果
+	 */
+	@AutoLog(value = "${tableVo.ftlDescription}-编辑")
+	@ApiOperation(value="${tableVo.ftlDescription}-编辑", notes="${tableVo.ftlDescription}-编辑")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody ${entityName} ${entityName?uncap_first}) {
+		${entityName?uncap_first}Service.updateById(${entityName?uncap_first});
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 * 通过id删除
+	 *
+	 * @param id 主键
+	 * @return 结果
+	 */
+	@AutoLog(value = "${tableVo.ftlDescription}-通过id删除")
+	@ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id") String id) {
+		${entityName?uncap_first}Service.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids 所有主键(逗号隔开)
+	 * @return 结果
+	 */
+	@AutoLog(value = "${tableVo.ftlDescription}-批量删除")
+	@ApiOperation(value="${tableVo.ftlDescription}-批量删除", notes="${tableVo.ftlDescription}-批量删除")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids") String ids) {
+		this.${entityName?uncap_first}Service.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id 主键
+	 * @return 结果
+	 */
+	//@AutoLog(value = "${tableVo.ftlDescription}-通过id查询")
+	@ApiOperation(value="${tableVo.ftlDescription}-通过id查询", notes="${tableVo.ftlDescription}-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<${entityName}> queryById(@RequestParam(name="id") String id) {
+		${entityName} ${entityName?uncap_first} = ${entityName?uncap_first}Service.getById(id);
+		if(${entityName?uncap_first}==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(${entityName?uncap_first});
+	}
+
+    /**
+     * 导出excel
+     *
+     * @param request 请求
+     * @param ${entityName?uncap_first} 数据
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, ${entityName} ${entityName?uncap_first}) {
+        return super.exportXls(request, ${entityName?uncap_first}, ${entityName}.class, "${tableVo.ftlDescription}");
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request 请求
+     * @param response 响应
+     * @return 结果
+     */
+    @PostMapping(value = "/importExcel")
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, ${entityName}.class);
+    }
+
+}

+ 159 - 0
tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/controller/${entityName}TaskController.javai

@@ -0,0 +1,159 @@
+package ${bussiPackage}.${entityPackage}.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import ${bussiPackage}.${entityPackage}.entity.${entityName}Task;
+import ${bussiPackage}.${entityPackage}.service.I${entityName}TaskService;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+
+ /**
+ * ${tableVo.ftlDescription}
+ *
+ * @author tnc-boot
+ * @since ${.now?string["yyyy-MM-dd"]}
+ * @version V1.0
+ */
+@Slf4j
+@Api(tags="${tableVo.ftlDescription}")
+@RestController
+@RequestMapping("/${entityPackage}/${entityName?uncap_first}Task")
+public class ${entityName}TaskController extends JeecgController<${entityName}Task, I${entityName}TaskService> {
+	@Autowired
+	private I${entityName}TaskService ${entityName?uncap_first}TaskService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param ${entityName?uncap_first}Task
+	 * @param pageNo 页码
+	 * @param pageSize 条数
+	 * @param request 请求
+	 * @return 结果
+	 */
+	//@AutoLog(value = "${tableVo.ftlDescription}-分页列表查询")
+	@ApiOperation(value="${tableVo.ftlDescription}-分页列表查询", notes="${tableVo.ftlDescription}-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<${entityName}Task>> queryPageList(${entityName}Task ${entityName?uncap_first}Task,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest request) {
+		QueryWrapper<${entityName}Task> queryWrapper = QueryGenerator.initQueryWrapper(${entityName?uncap_first}Task, request.getParameterMap());
+		Page<${entityName}Task> page = new Page<${entityName}Task>(pageNo, pageSize);
+		IPage<${entityName}Task> pageList = ${entityName?uncap_first}TaskService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 * 添加
+	 *
+	 * @param ${entityName?uncap_first}Task 数据
+	 * @return 结果
+	 */
+	@AutoLog(value = "${tableVo.ftlDescription}-添加")
+	@ApiOperation(value="${tableVo.ftlDescription}-添加", notes="${tableVo.ftlDescription}-添加")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody ${entityName}Task ${entityName?uncap_first}Task) {
+		${entityName?uncap_first}TaskService.save(${entityName?uncap_first}Task);
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 * 编辑
+	 *
+	 * @param ${entityName?uncap_first}Task 数据
+	 * @return 结果
+	 */
+	@AutoLog(value = "${tableVo.ftlDescription}-编辑")
+	@ApiOperation(value="${tableVo.ftlDescription}-编辑", notes="${tableVo.ftlDescription}-编辑")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody ${entityName}Task ${entityName?uncap_first}Task) {
+		${entityName?uncap_first}TaskService.updateById(${entityName?uncap_first}Task);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 * 通过id删除
+	 *
+	 * @param id 主键
+	 * @return 结果
+	 */
+	@AutoLog(value = "${tableVo.ftlDescription}-通过id删除")
+	@ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id") String id) {
+		${entityName?uncap_first}TaskService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids 所有主键(逗号隔开)
+	 * @return 结果
+	 */
+	@AutoLog(value = "${tableVo.ftlDescription}-批量删除")
+	@ApiOperation(value="${tableVo.ftlDescription}-批量删除", notes="${tableVo.ftlDescription}-批量删除")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids") String ids) {
+		this.${entityName?uncap_first}TaskService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id 主键
+	 * @return 结果
+	 */
+	//@AutoLog(value = "${tableVo.ftlDescription}-通过id查询")
+	@ApiOperation(value="${tableVo.ftlDescription}-通过id查询", notes="${tableVo.ftlDescription}-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<${entityName}Task> queryById(@RequestParam(name="id") String id) {
+		${entityName}Task ${entityName?uncap_first}Task = ${entityName?uncap_first}TaskService.getById(id);
+		if(${entityName?uncap_first}Task==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(${entityName?uncap_first}Task);
+	}
+
+    /**
+     * 导出excel
+     *
+     * @param request 请求
+     * @param ${entityName?uncap_first}Task 数据
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, ${entityName}Task ${entityName?uncap_first}Task) {
+        return super.exportXls(request, ${entityName?uncap_first}Task, ${entityName}Task.class, "${tableVo.ftlDescription}");
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request 请求
+     * @param response 响应
+     * @return 结果
+     */
+    @PostMapping(value = "/importExcel")
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, ${entityName}Task.class);
+    }
+
+}

+ 93 - 0
tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/entity/${entityName}.javai

@@ -0,0 +1,93 @@
+package ${bussiPackage}.${entityPackage}.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * ${tableVo.ftlDescription}
+ *
+ * @author tnc-boot
+ * @since ${.now?string["yyyy-MM-dd"]}
+ * @version: V1.0
+ */
+@Data
+@TableName("${tableName}")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="${tableName}对象", description="${tableVo.ftlDescription}")
+public class ${entityName} implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+<#-- excel注解 忽略字段 -->
+<#assign excel_ignore_arr=['createBy','createTime','updateBy','updateTime','sysOrgCode']>
+<#list originalColumns as po>
+  <#-- 生成字典Code -->
+  <#assign list_field_dictCode="">
+  <#-- 用户选择框 -->
+  <#if po.classType='sel_user'>
+    <#assign list_field_dictCode=', dictTable = "sys_user", dicText = "realname", dicCode = "username"'>
+  <#-- 部门选择框 -->
+  <#elseif po.classType='sel_depart'>
+    <#assign list_field_dictCode=', dictTable = "sys_depart", dicText = "depart_name", dicCode = "id"'>
+  <#-- 下拉框、下拉多选框、搜索框、单选框、多选框 -->
+  <#elseif po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox'>
+    <#if po.dictTable?default("")?trim?length gt 1>
+      <#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText}", dicCode = "${po.dictField}"'>
+    <#elseif po.dictField?default("")?trim?length gt 1>
+      <#assign list_field_dictCode=', dicCode = "${po.dictField}"'>
+    </#if>
+  <#-- 自定义树控件 -->
+  <#elseif po.classType=='sel_tree'>
+      <#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText?split(",")[2]}", dicCode = "${po.dictText?split(",")[0]}"'>
+  </#if>
+    /** ${po.filedComment} */
+  <#if po.fieldName == primaryKeyField>
+    @TableId(type = IdType.ASSIGN_ID)
+  <#else>
+    <#if po.fieldDbType =='Date' || po.fieldDbType =='Datetime'>
+      <#if po.classType=='date'>
+        <#if !excel_ignore_arr?seq_contains("${po.fieldName}")>
+    @Excel(name = "${po.filedComment}", width = 15, format = "yyyy-MM-dd")
+        </#if>
+  @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+      <#else>
+        <#if !excel_ignore_arr?seq_contains("${po.fieldName}")>
+    @Excel(name = "${po.filedComment}", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+        </#if>
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+      </#if>
+    <#else>
+      <#if !excel_ignore_arr?seq_contains("${po.fieldName}")>
+    @Excel(name = "${po.filedComment}", width = 15${list_field_dictCode})
+      </#if>
+    </#if>
+    <#if list_field_dictCode?length gt 1>
+    @Dict(${list_field_dictCode?substring(2)})
+    </#if>
+      <#--  <#if po.classType!='popup'>
+        <#if po.dictTable?default("")?trim?length gt 1>
+    @Dict(dicCode="${po.dictField}",dicText="${po.dictText}",dictTable="${po.dictTable}")
+        <#elseif po.dictField?default("")?trim?length gt 1>
+    @Dict(dicCode="${po.dictField}")
+        </#if>
+      </#if>-->
+  </#if>
+    <#include "/common/blob.ftl">
+</#list>
+}

+ 95 - 0
tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/entity/${entityName}Task.javai

@@ -0,0 +1,95 @@
+package ${bussiPackage}.${entityPackage}.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * ${tableVo.ftlDescription}
+ *
+ * @author tnc-boot1
+ * @since ${.now?string["yyyy-MM-dd"]}
+ * @version: V1.0
+ */
+@Data
+@TableName("${tableName}")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="${tableName}对象", description="${tableVo.ftlDescription}")
+public class ${entityName}Task implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+<#-- excel注解 忽略字段 -->
+<#assign excel_ignore_arr=['createBy','createTime','updateBy','updateTime','sysOrgCode']>
+<#list originalColumns as po>
+<#if po.fieldGroup='common'>
+  <#-- 生成字典Code -->
+  <#assign list_field_dictCode="">
+  <#-- 用户选择框 -->
+  <#if po.classType='sel_user'>
+    <#assign list_field_dictCode=', dictTable = "sys_user", dicText = "realname", dicCode = "username"'>
+  <#-- 部门选择框 -->
+  <#elseif po.classType='sel_depart'>
+    <#assign list_field_dictCode=', dictTable = "sys_depart", dicText = "depart_name", dicCode = "id"'>
+  <#-- 下拉框、下拉多选框、搜索框、单选框、多选框 -->
+  <#elseif po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox'>
+    <#if po.dictTable?default("")?trim?length gt 1>
+      <#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText}", dicCode = "${po.dictField}"'>
+    <#elseif po.dictField?default("")?trim?length gt 1>
+      <#assign list_field_dictCode=', dicCode = "${po.dictField}"'>
+    </#if>
+  <#-- 自定义树控件 -->
+  <#elseif po.classType=='sel_tree'>
+      <#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText?split(",")[2]}", dicCode = "${po.dictText?split(",")[0]}"'>
+  </#if>
+    /** ${po.filedComment} */
+  <#if po.fieldName == primaryKeyField>
+    @TableId(type = IdType.ASSIGN_ID)
+  <#else>
+    <#if po.fieldDbType =='Date' || po.fieldDbType =='Datetime'>
+      <#if po.classType=='date'>
+        <#if !excel_ignore_arr?seq_contains("${po.fieldName}")>
+    @Excel(name = "${po.filedComment}", width = 15, format = "yyyy-MM-dd")
+        </#if>
+  @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+      <#else>
+        <#if !excel_ignore_arr?seq_contains("${po.fieldName}")>
+    @Excel(name = "${po.filedComment}", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+        </#if>
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+      </#if>
+    <#else>
+      <#if !excel_ignore_arr?seq_contains("${po.fieldName}")>
+    @Excel(name = "${po.filedComment}", width = 15${list_field_dictCode})
+      </#if>
+    </#if>
+    <#if list_field_dictCode?length gt 1>
+    @Dict(${list_field_dictCode?substring(2)})
+    </#if>
+      <#--  <#if po.classType!='popup'>
+        <#if po.dictTable?default("")?trim?length gt 1>
+    @Dict(dicCode="${po.dictField}",dicText="${po.dictText}",dictTable="${po.dictTable}")
+        <#elseif po.dictField?default("")?trim?length gt 1>
+    @Dict(dicCode="${po.dictField}")
+        </#if>
+      </#if>-->
+  </#if>
+  <#include "/common/blob.ftl">
+</#if>
+</#list>
+}

+ 18 - 0
tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/mapper/${entityName}Mapper.javai

@@ -0,0 +1,18 @@
+package ${bussiPackage}.${entityPackage}.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import ${bussiPackage}.${entityPackage}.entity.${entityName};
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * ${tableVo.ftlDescription}
+ *
+ * @author tnc-boot
+ * @since ${.now?string["yyyy-MM-dd"]}
+ * @version V1.0
+ */
+public interface ${entityName}Mapper extends BaseMapper<${entityName}> {
+
+}

+ 18 - 0
tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/mapper/${entityName}TaskMapper.javai

@@ -0,0 +1,18 @@
+package ${bussiPackage}.${entityPackage}.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import ${bussiPackage}.${entityPackage}.entity.${entityName}Task;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * ${tableVo.ftlDescription}
+ *
+ * @author tnc-boot
+ * @since ${.now?string["yyyy-MM-dd"]}
+ * @version V1.0
+ */
+public interface ${entityName}TaskMapper extends BaseMapper<${entityName}Task> {
+
+}

+ 5 - 0
tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/mapper/xml/${entityName}Mapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="${bussiPackage}.${entityPackage}.mapper.${entityName}Mapper">
+
+</mapper>

+ 5 - 0
tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/mapper/xml/${entityName}TaskMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="${bussiPackage}.${entityPackage}.mapper.${entityName}TaskMapper">
+
+</mapper>

+ 15 - 0
tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/service/I${entityName}Service.javai

@@ -0,0 +1,15 @@
+package ${bussiPackage}.${entityPackage}.service;
+
+import ${bussiPackage}.${entityPackage}.entity.${entityName};
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * ${tableVo.ftlDescription}
+ *
+ * @author tnc-boot
+ * @since ${.now?string["yyyy-MM-dd"]}
+ * @version V1.0
+ */
+public interface I${entityName}Service extends IService<${entityName}> {
+
+}

+ 15 - 0
tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/service/I${entityName}TaskService.javai

@@ -0,0 +1,15 @@
+package ${bussiPackage}.${entityPackage}.service;
+
+import ${bussiPackage}.${entityPackage}.entity.${entityName}Task;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * ${tableVo.ftlDescription}
+ *
+ * @author tnc-boot
+ * @since ${.now?string["yyyy-MM-dd"]}
+ * @version V1.0
+ */
+public interface I${entityName}TaskService extends IService<${entityName}Task> {
+
+}

+ 20 - 0
tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/service/impl/${entityName}ServiceImpl.javai

@@ -0,0 +1,20 @@
+package ${bussiPackage}.${entityPackage}.service.impl;
+
+import ${bussiPackage}.${entityPackage}.entity.${entityName};
+import ${bussiPackage}.${entityPackage}.mapper.${entityName}Mapper;
+import ${bussiPackage}.${entityPackage}.service.I${entityName}Service;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * ${tableVo.ftlDescription}
+ *
+ * @author tnc-boot
+ * @since ${.now?string["yyyy-MM-dd"]}
+ * @version V1.0
+ */
+@Service
+public class ${entityName}ServiceImpl extends ServiceImpl<${entityName}Mapper, ${entityName}> implements I${entityName}Service {
+
+}

+ 20 - 0
tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/service/impl/${entityName}TaskServiceImpl.javai

@@ -0,0 +1,20 @@
+package ${bussiPackage}.${entityPackage}.service.impl;
+
+import ${bussiPackage}.${entityPackage}.entity.${entityName}Task;
+import ${bussiPackage}.${entityPackage}.mapper.${entityName}TaskMapper;
+import ${bussiPackage}.${entityPackage}.service.I${entityName}TaskService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * ${tableVo.ftlDescription}
+ *
+ * @author tnc-boot
+ * @since ${.now?string["yyyy-MM-dd"]}
+ * @version V1.0
+ */
+@Service
+public class ${entityName}TaskServiceImpl extends ServiceImpl<${entityName}TaskMapper, ${entityName}Task> implements I${entityName}TaskService {
+
+}

+ 422 - 0
tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/vue/${entityName}List.vuei

@@ -0,0 +1,422 @@
+<#include "/common/utils.ftl">
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+<#t>
+<#-- ============== 变量定义 ============== -->
+<#t>
+<#-- 查询字段显示个数,超过隐藏 -->
+<#assign query_field_no=0>
+<#-- 查询条件是否显示 是:"Y";否:"N" -->
+<#assign query_flag=false>
+<#-- 是否需要,字典 -->
+<#assign list_need_dict=false>
+<#-- 是否需要,种类 -->
+<#assign list_need_category=false>
+<#-- 是否需要,省市区 -->
+<#assign list_need_pca=false>
+<#-- 是否需要,开关  -->
+<#assign list_need_switch=false>
+<#-- 是否需要,缩进  -->
+<#assign indent_flag=false>
+<#-- 缩进宏代码  -->
+<#macro indent>
+<#if indent_flag=true>  </#if><#t>
+</#macro>
+
+<#-- 开始-遍历字段 -->
+<#list columns as po>
+<#if po.isQuery=='Y'>
+<#t>
+<#-- 开始-字段一列 -->
+<#assign query_flag=true>
+  <#-- 超过指定查询字段数,折叠剩余查询字段  -->
+  <#if query_field_no==2>
+    <#assign indent_flag=true>
+          <template v-if="toggleSearchStatus">
+  </#if>
+  <#-- 开始-字段的字典值 -->
+  <#assign query_field_dictCode="">
+  <#if po.dictTable?default("")?trim?length gt 1>
+    <#assign query_field_dictCode="${po.dictTable},${po.dictText},${po.dictField}">
+  <#elseif po.dictField?default("")?trim?length gt 1>
+    <#assign query_field_dictCode="${po.dictField}">
+  </#if>
+  <#-- 结束-字段的字典值 -->
+  <#if po.queryMode=='single'>
+          <@indent/><a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <@indent/><a-form-item label="${po.filedComment}">
+            <#if po.classType=='sel_search'>
+              <@indent/><j-search-select-tag placeholder="请选择${po.filedComment}" v-model="queryParam.${po.fieldName}" dict="${po.dictTable},${po.dictText},${po.dictField}"/>
+            <#elseif po.classType=='sel_user'>
+              <@indent/><j-select-user-by-dep placeholder="请选择${po.filedComment}" v-model="queryParam.${po.fieldName}"/>
+            <#elseif po.classType=='switch'>
+              <@indent/><j-switch placeholder="请选择${po.filedComment}" v-model="queryParam.${po.fieldName}" <#if po.dictField!= 'is_open'>:options="${po.dictField}"</#if> query></j-switch>
+            <#elseif po.classType=='sel_depart'>
+              <@indent/><j-select-depart placeholder="请选择${po.filedComment}" v-model="queryParam.${po.fieldName}"/>
+            <#elseif po.classType=='list_multi'>
+              <@indent/><j-multi-select-tag placeholder="请选择${po.filedComment}" dictCode="${query_field_dictCode?default("")}" v-model="queryParam.${po.fieldName}"/>
+            <#elseif po.classType=='cat_tree'>
+              <@indent/><j-category-select placeholder="请选择${po.filedComment}" v-model="queryParam.${po.fieldName}" pcode="${po.dictField?default("")}"/>
+            <#elseif po.classType=='date'>
+              <@indent/><j-date placeholder="请选择${po.filedComment}" v-model="queryParam.${po.fieldName}"></j-date>
+            <#elseif po.classType=='datetime'>
+              <@indent/><j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择${po.filedComment}" v-model="queryParam.${po.fieldName}"></j-date>
+            <#elseif po.classType=='pca'>
+              <@indent/><j-area-linkage type="cascader" v-model="queryParam.${po.fieldName}" placeholder="请选择省市区"/>
+            <#elseif po.classType=='popup'>
+              <@indent/><j-popup placeholder="请选择${po.filedComment}" v-model="queryParam.${po.fieldName}" code="${po.dictTable}" org-fields="${po.dictField}" dest-fields="${po.dictText}" :field="getPopupField('${po.dictText}')" :multi="${po.extendParams.popupMulti?c}"/>
+            <#elseif po.classType=='list' || po.classType=='radio' || po.classType=='checkbox'>
+              <#--  开始-下拉或是单选 判断数据字典是表字典还是普通字典 -->
+              <#if po.dictTable?default("")?trim?length gt 1>
+              <@indent/><j-dict-select-tag placeholder="请选择${po.filedComment}" v-model="queryParam.${po.fieldName}" dictCode="${po.dictTable},${po.dictText},${po.dictField}"/>
+              <#elseif po.dictField?default("")?trim?length gt 1>
+              <@indent/><j-dict-select-tag placeholder="请选择${po.filedComment}" v-model="queryParam.${po.fieldName}" dictCode="${po.dictField}"/>
+              <#else>
+              <@indent/><a-input placeholder="请输入${po.filedComment}" v-model="queryParam.${po.fieldName}"></a-input>
+              </#if>
+              <#--  结束-下拉或是单选 判断数据字典是表字典还是普通字典 -->
+            <#else>
+              <@indent/><a-input placeholder="请输入${po.filedComment}" v-model="queryParam.${po.fieldName}"></a-input>
+            </#if>
+            <@indent/></a-form-item>
+          <@indent/></a-col>
+  <#else>
+          <@indent/><a-col :xl="10" :lg="11" :md="12" :sm="24">
+            <@indent/><a-form-item label="${po.filedComment}">
+      <#if po.classType=='date'>
+              <@indent/><j-date placeholder="请选择开始日期" class="query-group-cust" v-model="queryParam.${po.fieldName}_begin"></j-date>
+              <@indent/><span class="query-group-split-cust"></span>
+              <@indent/><j-date placeholder="请选择结束日期" class="query-group-cust" v-model="queryParam.${po.fieldName}_end"></j-date>
+      <#elseif po.classType=='datetime'>
+              <@indent/><j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.${po.fieldName}_begin"></j-date>
+              <@indent/><span class="query-group-split-cust"></span>
+              <@indent/><j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.${po.fieldName}_end"></j-date>
+      <#else>
+              <@indent/><a-input placeholder="请输入最小值" class="query-group-cust" v-model="queryParam.${po.fieldName}_begin"></a-input>
+              <@indent/><span class="query-group-split-cust"></span>
+              <@indent/><a-input placeholder="请输入最大值" class="query-group-cust" v-model="queryParam.${po.fieldName}_end"></a-input>
+      </#if>
+            <@indent/></a-form-item>
+          <@indent/></a-col>
+  </#if>
+<#assign query_field_no=query_field_no+1>
+</#if>
+<#-- 结束-字段一列 -->
+<#t>
+<#-- 开始-字段字典 -->
+<#if !list_need_dict && po.fieldShowType!='popup' && po.dictField?default("")?trim?length gt 1>
+<#assign list_need_dict=true>
+</#if>
+<#-- 结束-字段字典 -->
+<#-- 开始-字段树形 -->
+<#if po.classType=='cat_tree' && po.dictText?default("")?trim?length == 0>
+<#assign list_need_category=true>
+</#if>
+<#-- 结束-字段树形 -->
+<#-- 开始-字段省市区 -->
+<#if po.classType=='pca'>
+<#assign list_need_pca=true>
+</#if>
+<#-- 结束-字段省市区 -->
+<#-- 开始-字段开关 -->
+<#if po.classType=='switch'>
+<#assign list_need_switch=true>
+</#if>
+<#-- 结束-字段开关 -->
+</#list>
+<#-- 结束-遍历字段 -->
+<#t>
+
+<#if indent_flag=true>
+          </template>
+</#if>
+<#t>
+<#-- 开始-查询按钮 -->
+<#if query_flag>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a>
+            </span>
+          </a-col>
+</#if>
+<#-- 结束-查询按钮 -->
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('${tableVo.ftlDescription}')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload>
+      <!-- 高级查询区域 -->
+      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        <#if (tableVo.extendParams.scroll)! == '1'>
+        :scroll="{x:true}"
+        </#if>
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <#if list_need_pca>
+        <template slot="pcaSlot" slot-scope="text">
+          <div>{{ getPcaText(text) }}</div>
+        </template>
+        </#if>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+    <#-- 使用格式化工具类转换 -->
+    <${Format.humpToShortbar(entityName)}-modal ref="modalForm" @ok="modalFormOk"></${Format.humpToShortbar(entityName)}-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import ${entityName}Modal from './modules/${entityName}Modal'
+
+  <#if list_need_category>
+  import { loadCategoryData } from '@/api/api'
+  </#if>
+  <#if list_need_dict>
+  import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
+  </#if>
+  <#if list_need_pca>
+  import Area from '@/components/_util/Area'
+  </#if>
+
+  export default {
+    name: '${entityName}List',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      ${entityName}Modal
+    },
+    data () {
+      return {
+        description: '${tableVo.ftlDescription}管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+  <#-- 表字段定义 -->
+  <#list columns as po>
+  <#if po.isShowList =='Y' && po.fieldName !='id'>
+          {
+            title:'${po.filedComment}',
+            align:"center",
+            <#-- 排序 -->
+            <#if po.sort=='Y'>
+            sorter: true,
+            </#if>
+            <#if po.classType=='date'>
+            dataIndex: '${po.fieldName}',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            }
+            <#elseif po.fieldDbType=='Blob'>
+            dataIndex: '${po.fieldName}String'
+            <#-- 富文本 -->
+            <#elseif po.classType=='umeditor'>
+            dataIndex: '${po.fieldName}',
+            scopedSlots: {customRender: 'htmlSlot'}
+            <#elseif po.classType=='pca'>
+            dataIndex: '${po.fieldName}',
+            scopedSlots: {customRender: 'pcaSlot'}
+            <#elseif po.classType=='file'>
+            dataIndex: '${po.fieldName}',
+            scopedSlots: {customRender: 'fileSlot'}
+            <#elseif po.classType=='image'>
+            dataIndex: '${po.fieldName}',
+            scopedSlots: {customRender: 'imgSlot'}
+            <#elseif po.classType=='switch'>
+            dataIndex: '${po.fieldName}',
+            customRender: (text) => (text ? filterMultiDictText(this.dictOptions['${po.fieldName}'], text) : ''),
+            <#elseif po.classType == 'sel_tree' || po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart' || po.classType=='sel_user'>
+            dataIndex: '${po.fieldName}_dictText'
+            <#elseif po.classType=='cat_tree'>
+            <#if list_need_category>
+            dataIndex: '${po.fieldName}',
+            customRender: (text) => (text ? filterMultiDictText(this.dictOptions['${po.fieldName}'], text) : '')
+            <#else>
+            dataIndex: '${po.fieldName}',
+            customRender: (text, record) => (text ? record['${dashedToCamel(po.dictText)}'] : '')
+            </#if>
+      <#else>
+            dataIndex: '${po.fieldName}'
+      </#if>
+          },
+     </#if>
+     </#list>
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            <#if (tableVo.extendParams.scroll)! == '1'>
+            fixed:"right",
+            width:147,
+            </#if>
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/${entityPackage}/${entityName?uncap_first}/list",
+          delete: "/${entityPackage}/${entityName?uncap_first}/delete",
+          deleteBatch: "/${entityPackage}/${entityName?uncap_first}/deleteBatch",
+          exportXlsUrl: "/${entityPackage}/${entityName?uncap_first}/exportXls",
+          importExcelUrl: "${entityPackage}/${entityName?uncap_first}/importExcel",
+        },
+        dictOptions:{},
+        <#-- 省市区 -->
+        <#if list_need_pca>
+        pcaData:'',
+        </#if>
+        superFieldList:[],
+      }
+    },
+    created() {
+    <#if list_need_pca>
+      this.pcaData = new Area()
+    </#if>
+    <#if list_need_switch>
+    <#list columns as po>
+    <#if po.classType=='switch'>
+      <#assign switch_extend_arr=['Y','N']>
+      <#if po.dictField?default("")?contains("[")>
+        <#assign switch_extend_arr=po.dictField?eval>
+      </#if>
+      <#list switch_extend_arr as a>
+       <#if a_index == 0>
+       <#assign switch_extend_arr1=a>
+       <#else>
+       <#assign switch_extend_arr2=a>
+       </#if>
+      </#list>
+      this.$set(this.dictOptions, '${po.fieldName}', [{text:'是',value:'${switch_extend_arr1}'},{text:'否',value:'${switch_extend_arr2}'}])
+    </#if>
+    </#list>
+    </#if>
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        <#noparse>return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;</#noparse>
+      },
+    },
+    methods: {
+    <#if list_need_pca>
+      getPcaText(code){
+        return this.pcaData.getText(code);
+      },
+    </#if>
+      initDictConfig(){
+      <#list columns as po>
+      <#if (po.isQuery=='Y' || po.isShowList=='Y') && po.classType!='popup'>
+        <#if po.classType=='cat_tree' && list_need_category==true>
+        loadCategoryData({code:'${po.dictField?default("")}'}).then((res) => {
+          if (res.success) {
+            this.$set(this.dictOptions, '${po.fieldName}', res.result)
+          }
+        })
+        </#if>
+      </#if>
+      </#list>
+      },
+      <#-- 高级查询 -->
+      getSuperFieldList(){
+        let fieldList=[];
+         <#list columns as po>
+        fieldList.push(${superQueryFieldList(po)})
+         </#list>
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 217 - 0
tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Form.vuei

@@ -0,0 +1,217 @@
+
+<#include "/common/utils.ftl">
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+<#-- Popup弹框 -->
+<#assign form_popup = false>
+<#-- 分类字典树 -->
+<#assign form_cat_tree = false>
+<#assign form_cat_back = "">
+<#t>
+<#-- 一行一列 字段所占区域 -->
+<#assign form_span = 24>
+<#if tableVo.fieldRowNum==2>
+<#assign form_span = 12>
+<#elseif tableVo.fieldRowNum==3>
+<#assign form_span = 8>
+<#elseif tableVo.fieldRowNum==4>
+<#assign form_span = 6>
+</#if>
+<#-- 开始-遍历字段 -->
+<#list columns as po>
+<#t>
+<#if po.isShow =='Y' && po.fieldName != 'id'>
+  <#assign form_field_dictCode="">
+  <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1>
+    <#assign form_field_dictCode="${po.dictTable},${po.dictText},${po.dictField}">
+  <#elseif po.dictField?default("")?trim?length gt 1>
+    <#assign form_field_dictCode="${po.dictField}">
+  </#if>
+          <a-col :span="${form_span}">
+            <a-form-model-item label="${po.filedComment}" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="${autoStringSuffixForModel(po)}">
+  <#if po.classType =='date'>
+              <j-date placeholder="请选择${po.filedComment}" v-model="model.${po.fieldName}"  style="width: 100%" <#if po.readonly=='Y'>disabled</#if>/>
+  <#elseif po.classType =='datetime'>
+              <j-date placeholder="请选择${po.filedComment}"  v-model="model.${po.fieldName}" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" <#if po.readonly=='Y'>disabled</#if>/>
+  <#elseif po.classType =='time'>
+              <j-time placeholder="请选择${po.filedComment}"  v-model="model.${po.fieldName}" style="width: 100%" <#if po.readonly=='Y'>disabled</#if>/>
+  <#elseif po.classType =='popup'>
+      <#assign form_popup=true>
+              <j-popup
+                v-model="model.${po.fieldName}"
+                field="${po.fieldName}"
+                org-fields="${po.dictField}"
+                dest-fields="${Format.underlineToHump(po.dictText)}"
+                code="${po.dictTable}"
+                :multi="${po.extendParams.popupMulti?c}"
+                @input="popupCallback"
+                <#if po.readonly=='Y'>disabled</#if>/>
+  <#elseif po.classType =='sel_depart'>
+              <j-select-depart v-model="model.${po.fieldName}" multi <#if po.readonly=='Y'>disabled</#if> />
+  <#elseif po.classType =='switch'>
+              <j-switch v-model="model.${po.fieldName}" <#if po.dictField != 'is_open'>:options="${po.dictField}"</#if> <#if po.readonly=='Y'>disabled</#if>></j-switch>
+  <#elseif po.classType =='pca'>
+             <j-area-linkage type="cascader" v-model="model.${po.fieldName}" placeholder="请输入省市区" <#if po.readonly=='Y'>disabled</#if> />
+  <#elseif po.classType =='markdown'>
+              <j-markdown-editor v-model="model.${autoStringSuffixForModel(po)}" id="${po.fieldName}"></j-markdown-editor>
+  <#elseif po.classType =='password'>
+              <a-input-password v-model="model.${po.fieldName}" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>/>
+  <#elseif po.classType =='sel_user'>
+              <j-select-user-by-dep v-model="model.${po.fieldName}" <#if po.readonly=='Y'>disabled</#if>/>
+  <#elseif po.classType =='textarea'>
+              <a-textarea v-model="model.${autoStringSuffixForModel(po)}" rows="4" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>/>
+  <#elseif po.classType=='list' || po.classType=='radio'>
+              <j-dict-select-tag type="${po.classType}" v-model="model.${po.fieldName}" dictCode="${form_field_dictCode}" placeholder="请选择${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>/>
+  <#elseif po.classType=='list_multi' || po.classType=='checkbox'>
+              <j-multi-select-tag type="${po.classType}" v-model="model.${po.fieldName}" dictCode="${form_field_dictCode}" placeholder="请选择${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>/>
+  <#elseif po.classType=='sel_search'>
+              <j-search-select-tag v-model="model.${po.fieldName}" dict="${form_field_dictCode}" <#if po.readonly=='Y'>disabled</#if> />
+  <#elseif po.classType=='cat_tree'>
+      <#assign form_cat_tree = true>
+              <j-category-select v-model="model.${po.fieldName}" pcode="${po.dictField?default("")}" placeholder="请选择${po.filedComment}" <#if po.dictText?default("")?trim?length gt 1>back="${dashedToCamel(po.dictText)}" @change="handleCategoryChange"</#if> <#if po.readonly=='Y'>disabled</#if>/>
+      <#if po.dictText?default("")?trim?length gt 1>
+        <#assign form_cat_back = "${po.dictText}">
+      </#if>
+  <#elseif po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal'>
+              <a-input-number v-model="model.${po.fieldName}" placeholder="请输入${po.filedComment}" style="width: 100%" <#if po.readonly=='Y'>disabled</#if>/>
+  <#elseif po.classType=='file'>
+              <j-upload v-model="model.${po.fieldName}"  <#if po.readonly=='Y'>disabled</#if> <#if po.uploadnum??>:number=${po.uploadnum}</#if>></j-upload>
+  <#elseif po.classType=='image'>
+              <j-image-upload isMultiple <#if po.uploadnum??>:number=${po.uploadnum}</#if> v-model="model.${po.fieldName}" <#if po.readonly=='Y'>disabled</#if>></j-image-upload>
+  <#elseif po.classType=='umeditor'>
+              <j-editor v-model="model.${autoStringSuffixForModel(po)}" <#if po.readonly=='Y'>disabled</#if>/>
+  <#elseif po.fieldDbType=='Blob'>
+              <a-input v-model="model.${autoStringSuffixForModel(po)}" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>></a-input>
+  <#elseif po.classType == 'sel_tree'>
+              <j-tree-select
+                ref="treeSelect"
+                placeholder="请选择${po.filedComment}"
+                v-model="model.${po.fieldName}"
+                <#if po.dictText??>
+                <#if po.dictText?split(',')[2]?? && po.dictText?split(',')[0]??>
+                dict="${po.dictTable},${po.dictText?split(',')[2]},${po.dictText?split(',')[0]}"
+                <#elseif po.dictText?split(',')[1]??>
+                pidField="${po.dictText?split(',')[1]}"
+                <#elseif po.dictText?split(',')[3]??>
+                hasChildField="${po.dictText?split(',')[3]}"
+                </#if>
+                </#if>
+                pidValue="${po.dictField}"
+                <#if po.readonly=='Y'>disabled</#if>>
+              </j-tree-select>
+  <#else>
+              <a-input v-model="model.${po.fieldName}" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if> ></a-input>
+  </#if>
+            </a-form-model-item>
+          </a-col>
+</#if>
+</#list>
+<#-- 结束-遍历字段 -->
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: '${entityName}Form',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+            <#include "/common/init/initValue.ftl">
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        <#include "/common/validatorRulesTemplate/main.ftl">
+        url: {
+          add: "/${entityPackage}/${entityName?uncap_first}/add",
+          edit: "/${entityPackage}/${entityName?uncap_first}/edit",
+          queryById: "/${entityPackage}/${entityName?uncap_first}/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+       <#if form_popup>
+      popupCallback(value,row){
+         this.model = Object.assign(this.model, row);
+      },
+       </#if>
+      <#if form_cat_tree>
+      handleCategoryChange(value,backObj){
+         this.model = Object.assign(this.model, backObj);
+      }
+      </#if>
+    }
+  }
+</script>

+ 70 - 0
tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Modal.vuei

@@ -0,0 +1,70 @@
+
+<#include "/common/utils.ftl">
+<#assign modal_width = 800>
+<#if tableVo.fieldRowNum==2>
+  <#assign modal_width = 896>
+<#elseif tableVo.fieldRowNum==3>
+  <#assign modal_width = 1024>
+<#elseif tableVo.fieldRowNum==4>
+  <#assign modal_width = 1280>
+</#if>
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <${Format.humpToShortbar(entityName)}-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></${Format.humpToShortbar(entityName)}-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import ${entityName}Form from './${entityName}Form'
+  export default {
+    name: '${entityName}Modal',
+    components: {
+      ${entityName}Form
+    },
+    data () {
+      return {
+        title:'',
+        width:${modal_width},
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 93 - 0
tnc-system/src/main/resources/jeecg/code-template-online/default/two/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Modal__Style#Drawer.vuei

@@ -0,0 +1,93 @@
+<#include "/common/utils.ftl">
+<#assign modal_width = 800>
+<#if tableVo.fieldRowNum==2>
+  <#assign modal_width = 896>
+<#elseif tableVo.fieldRowNum==3>
+  <#assign modal_width = 1024>
+<#elseif tableVo.fieldRowNum==4>
+  <#assign modal_width = 1280>
+</#if>
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <${Format.humpToShortbar(entityName)}-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></${Format.humpToShortbar(entityName)}-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import ${entityName}Form from './${entityName}Form'
+
+  export default {
+    name: '${entityName}Modal',
+    components: {
+      ${entityName}Form
+    },
+    data () {
+      return {
+        title:"操作",
+        width:${modal_width},
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 2 - 2
tnc-system/src/main/resources/jeecg/jeecg_database.properties

@@ -1,8 +1,8 @@
 #mysql
 diver_name=com.mysql.cj.jdbc.Driver
-url=jdbc:mysql://202.85.214.182:3306/tnc?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
+url=jdbc:mysql://127.0.0.1:3306/tnc_use?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
 username=root
-password=webyun
+password=123456
 database_name=tnc
 
 #oracle