作者 钟来

生成所有业务接口

... ... @@ -5,7 +5,7 @@ import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import org.apache.commons.lang3.ArrayUtils;
import com.ruoyi.common.constant.GenConstants;
import com.ruoyi.common.core.domain.BaseEntity;
import com.zhonglai.luhui.common.util.domain.BaseEntity;
import com.ruoyi.common.utils.StringUtils;
/**
... ... @@ -98,6 +98,20 @@ public class GenTable extends BaseEntity
/** 上级菜单名称字段 */
private String parentMenuName;
/**
* 模块路径
*/
private String modlePath;
public String getModlePath() {
return modlePath;
}
public void setModlePath(String modlePath) {
this.modlePath = modlePath;
}
public Long getTableId()
{
return tableId;
... ...
package com.ruoyi.generator.domain;
import javax.validation.constraints.NotBlank;
import com.ruoyi.common.core.domain.BaseEntity;
import com.zhonglai.luhui.common.util.domain.BaseEntity;
import com.ruoyi.common.utils.StringUtils;
/**
... ...
... ... @@ -22,7 +22,7 @@ public class GenUtils
{
genTable.setClassName(convertClassName(genTable.getTableName()));
genTable.setPackageName(GenConfig.getPackageName());
genTable.setModuleName(getModuleName(GenConfig.getPackageName()));
genTable.setModuleName(getModuleName(genTable.getTableName()));
genTable.setBusinessName(getBusinessName(genTable.getTableName()));
genTable.setFunctionName(replaceText(genTable.getTableComment()));
genTable.setFunctionAuthor(GenConfig.getAuthor());
... ... @@ -70,6 +70,9 @@ public class GenUtils
else if (str != null && str.length == 1 && Integer.parseInt(str[0]) <= 10)
{
column.setJavaType(GenConstants.TYPE_INTEGER);
}else if(column.getColumnType().equals("int"))
{
column.setJavaType(GenConstants.TYPE_INTEGER);
}
// 长整形
else
... ... @@ -150,9 +153,7 @@ public class GenUtils
*/
public static String getModuleName(String packageName)
{
int lastIndex = packageName.lastIndexOf(".");
int nameLength = packageName.length();
return StringUtils.substring(packageName, lastIndex + 1, nameLength);
return packageName.split("_")[0];
}
/**
... ... @@ -163,9 +164,7 @@ public class GenUtils
*/
public static String getBusinessName(String tableName)
{
int lastIndex = tableName.lastIndexOf("_");
int nameLength = tableName.length();
return StringUtils.substring(tableName, lastIndex + 1, nameLength);
return tableName.substring(tableName.indexOf("_")+1);
}
/**
... ...
... ... @@ -41,6 +41,7 @@ public class VelocityUtils
String packageName = genTable.getPackageName();
String tplCategory = genTable.getTplCategory();
String functionName = genTable.getFunctionName();
String modlePath = genTable.getModlePath();
VelocityContext velocityContext = new VelocityContext();
velocityContext.put("tplCategory", genTable.getTplCategory());
... ... @@ -57,10 +58,11 @@ public class VelocityUtils
velocityContext.put("datetime", DateUtils.getDate());
velocityContext.put("pkColumn", genTable.getPkColumn());
velocityContext.put("importList", getImportList(genTable));
velocityContext.put("permissionPrefix", getPermissionPrefix(moduleName, businessName));
velocityContext.put("permissionPrefix", getPermissionPrefix(modlePath,moduleName, businessName));
velocityContext.put("columns", genTable.getColumns());
velocityContext.put("table", genTable);
velocityContext.put("dicts", getDicts(genTable));
velocityContext.put("modlePath", modlePath);
setMenuVelocityContext(velocityContext, genTable);
if (GenConstants.TPL_TREE.equals(tplCategory))
{
... ... @@ -136,11 +138,11 @@ public class VelocityUtils
}
List<String> templates = new ArrayList<String>();
templates.add("vm/java/domain.java.vm");
templates.add("vm/java/mapper.java.vm");
templates.add("vm/java/service.java.vm");
templates.add("vm/java/serviceImpl.java.vm");
// templates.add("vm/java/mapper.java.vm");
// templates.add("vm/java/service.java.vm");
// templates.add("vm/java/serviceImpl.java.vm");
templates.add("vm/java/controller.java.vm");
templates.add("vm/xml/mapper.xml.vm");
// templates.add("vm/xml/mapper.xml.vm");
templates.add("vm/sql/sql.vm");
templates.add("vm/js/api.js.vm");
if (GenConstants.TPL_CRUD.equals(tplCategory))
... ... @@ -175,17 +177,20 @@ public class VelocityUtils
// 业务名称
String businessName = genTable.getBusinessName();
//业务项目的路径
String modlePath = genTable.getModlePath();
String javaPath = PROJECT_PATH + "/" + StringUtils.replace(packageName, ".", "/");
String mybatisPath = MYBATIS_PATH + "/" + moduleName;
String vuePath = "vue";
if (template.contains("domain.java.vm"))
{
fileName = StringUtils.format("{}/domain/{}.java", javaPath, className);
fileName = StringUtils.format("{}/domain/{}/{}.java", javaPath,moduleName, className);
}
if (template.contains("sub-domain.java.vm") && StringUtils.equals(GenConstants.TPL_SUB, genTable.getTplCategory()))
{
fileName = StringUtils.format("{}/domain/{}.java", javaPath, genTable.getSubTable().getClassName());
fileName = StringUtils.format("{}/domain/{}/{}.java", javaPath, moduleName,genTable.getSubTable().getClassName());
}
else if (template.contains("mapper.java.vm"))
{
... ... @@ -201,7 +206,7 @@ public class VelocityUtils
}
else if (template.contains("controller.java.vm"))
{
fileName = StringUtils.format("{}/controller/{}Controller.java", javaPath, className);
fileName = StringUtils.format("{}/{}/controller/{}/{}Controller.java", javaPath,modlePath,moduleName, className);
}
else if (template.contains("mapper.xml.vm"))
{
... ... @@ -313,9 +318,9 @@ public class VelocityUtils
* @param businessName 业务名称
* @return 返回权限前缀
*/
public static String getPermissionPrefix(String moduleName, String businessName)
public static String getPermissionPrefix(String modlePath,String moduleName, String businessName)
{
return StringUtils.format("{}:{}", moduleName, businessName);
return StringUtils.format("{}:{}:{}",modlePath, moduleName, businessName);
}
/**
... ...
# 代码生成
gen:
# 作者
author: ruoyi
author: zhonglai
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
packageName: com.ruoyi.system
packageName: com.zhonglai.luhui
# 自动去除表前缀,默认是false
autoRemovePre: false
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
... ...
package ${packageName}.controller;
package ${packageName}.${modlePath}.controller.${moduleName};
import java.util.List;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
... ... @@ -16,9 +20,10 @@ import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import ${packageName}.domain.${ClassName};
import ${packageName}.service.I${ClassName}Service;
import com.zhonglai.luhui.dao.service.PublicTemplateService;
import ${packageName}.domain.${moduleName}.${ClassName};
import com.ruoyi.common.utils.poi.ExcelUtil;
#if($table.crud || $table.sub)
import com.ruoyi.common.core.page.TableDataInfo;
#elseif($table.tree)
... ... @@ -30,86 +35,91 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @author ${author}
* @date ${datetime}
*/
@Api(tags = "${functionName}")
@RestController
@RequestMapping("/${moduleName}/${businessName}")
@RequestMapping("/${modlePath}/${moduleName}/${businessName}")
public class ${ClassName}Controller extends BaseController
{
@Autowired
private I${ClassName}Service ${className}Service;
private PublicTemplateService publicTemplateService;
/**
* 查询${functionName}列表
*/
@ApiOperation(value ="查询${functionName}列表",notes="\n" +
"公共参数描述:\n" +
"条件参数:\n" +
"timeMap; //时间条件(如:{\"create_time\":[开始时间,结束时间]})\n" +
"keyValue; //模糊匹配的关键字(如:[\"value\",\"name,no\"])\n" +
"queryParams; //字段对应的比较符号(如:{\"id\":\"EQ\"})\n" +
"orderBy; //排序(如:\"id desc,name asc\")\n" +
"\n" +
"分页参数:\n" +
"pageNum; //当前记录起始索引,从1开始\n" +
"pageSize; //每页显示记录数")
@DataSource(DataSourceType.SLAVE)
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:list')")
@GetMapping("/list")
#if($table.crud || $table.sub)
public TableDataInfo list(${ClassName} ${className})
{
startPage();
List<${ClassName}> list = ${className}Service.select${ClassName}List(${className});
List<${ClassName}> list = publicTemplateService.selectTList(${className});
return getDataTable(list);
}
#elseif($table.tree)
public AjaxResult list(${ClassName} ${className})
{
List<${ClassName}> list = ${className}Service.select${ClassName}List(${className});
List<${ClassName}> list = publicTemplateService.selectTList(${className});
return success(list);
}
#end
/**
* 导出${functionName}列表
*/
@ApiOperation("导出${functionName}列表")
@DataSource(DataSourceType.SLAVE)
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:export')")
@Log(title = "${functionName}", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ${ClassName} ${className})
{
List<${ClassName}> list = ${className}Service.select${ClassName}List(${className});
List<${ClassName}> list = publicTemplateService.selectTList(${className});
ExcelUtil<${ClassName}> util = new ExcelUtil<${ClassName}>(${ClassName}.class);
util.exportExcel(response, list, "${functionName}数据");
}
/**
* 获取${functionName}详细信息
*/
@ApiOperation("获取${functionName}详细信息")
@DataSource(DataSourceType.SLAVE)
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:query')")
@GetMapping(value = "/{${pkColumn.javaField}}")
public AjaxResult getInfo(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField})
{
return success(${className}Service.select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField}));
return success(publicTemplateService.getTById(${pkColumn.javaField}, ${ClassName}.class));
}
/**
* 新增${functionName}
*/
@ApiOperation("新增${functionName}")
@DataSource(DataSourceType.SLAVE)
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:add')")
@Log(title = "${functionName}", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ${ClassName} ${className})
{
return toAjax(${className}Service.insert${ClassName}(${className}));
return toAjax(publicTemplateService.add(${className}));
}
/**
* 修改${functionName}
*/
@ApiOperation("修改${functionName}")
@DataSource(DataSourceType.SLAVE)
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:edit')")
@Log(title = "${functionName}", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ${ClassName} ${className})
{
return toAjax(${className}Service.update${ClassName}(${className}));
return toAjax(publicTemplateService.edit((${className})));
}
/**
* 删除${functionName}
*/
@ApiOperation("删除${functionName}")
@DataSource(DataSourceType.SLAVE)
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:remove')")
@Log(title = "${functionName}", businessType = BusinessType.DELETE)
@DeleteMapping("/{${pkColumn.javaField}s}")
public AjaxResult remove(@PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s)
{
return toAjax(${className}Service.delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaField}s));
return toAjax(publicTemplateService.removeByIds(${ClassName}.class,${pkColumn.javaField}s));
}
}
... ...
package ${packageName}.domain;
package ${packageName}.domain.${moduleName};
#foreach ($import in $importList)
import ${import};
#end
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.zhonglai.luhui.common.util.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
#if($table.crud || $table.sub)
import com.ruoyi.common.core.domain.BaseEntity;
import com.zhonglai.luhui.common.util.domain.BaseEntity;
#elseif($table.tree)
import com.ruoyi.common.core.domain.TreeEntity;
#end
/**
... ... @@ -18,6 +19,7 @@ import com.ruoyi.common.core.domain.TreeEntity;
* @author ${author}
* @date ${datetime}
*/
@ApiModel("${functionName}")
#if($table.crud || $table.sub)
#set($Entity="BaseEntity")
#elseif($table.tree)
... ... @@ -28,27 +30,30 @@ public class ${ClassName} extends ${Entity}
private static final long serialVersionUID = 1L;
#foreach ($column in $columns)
#if(!$table.isSuperColumn($column.javaField))
#if(!$table.isSuperColumn($column.javaField))
/** $column.columnComment */
#if($column.list)
#set($parentheseIndex=$column.columnComment.indexOf("("))
#if($parentheseIndex != -1)
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
#else
#set($comment=$column.columnComment)
#end
#if($parentheseIndex != -1)
#if($column.list)
#set($parentheseIndex=$column.columnComment.indexOf("("))
#if($parentheseIndex != -1)
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
#else
#set($comment=$column.columnComment)
#end
#if($parentheseIndex != -1)
@ApiModelProperty(value="${comment}",allowableValues="$column.readConverterExp()")
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
#elseif($column.javaType == 'Date')
#elseif($column.javaType == 'Date')
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value="${comment}")
@Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd")
#else
#else
@ApiModelProperty(value="${comment}")
@Excel(name = "${comment}")
#end
#end
#end
#end
private $column.javaType $column.javaField;
#end
#end
#end
#if($table.sub)
/** $table.subTable.functionName信息 */
... ...
... ... @@ -5,8 +5,8 @@ import ${import};
#end
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.zhonglai.luhui.common.util.annotation.Excel;
import com.zhonglai.luhui.common.util.domain.BaseEntity;
/**
* ${subTable.functionName}对象 ${subTableName}
... ...
... ... @@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询${functionName}列表
export function list${BusinessName}(query) {
return request({
url: '/${moduleName}/${businessName}/list',
url: '/${modlePath}/${moduleName}/${businessName}/list',
method: 'get',
params: query
})
... ... @@ -12,7 +12,7 @@ export function list${BusinessName}(query) {
// 查询${functionName}详细
export function get${BusinessName}(${pkColumn.javaField}) {
return request({
url: '/${moduleName}/${businessName}/' + ${pkColumn.javaField},
url: '/${modlePath}/${moduleName}/${businessName}/' + ${pkColumn.javaField},
method: 'get'
})
}
... ... @@ -20,7 +20,7 @@ export function get${BusinessName}(${pkColumn.javaField}) {
// 新增${functionName}
export function add${BusinessName}(data) {
return request({
url: '/${moduleName}/${businessName}',
url: '/${modlePath}/${moduleName}/${businessName}',
method: 'post',
data: data
})
... ... @@ -29,7 +29,7 @@ export function add${BusinessName}(data) {
// 修改${functionName}
export function update${BusinessName}(data) {
return request({
url: '/${moduleName}/${businessName}',
url: '/${modlePath}/${moduleName}/${businessName}',
method: 'put',
data: data
})
... ... @@ -38,7 +38,7 @@ export function update${BusinessName}(data) {
// 删除${functionName}
export function del${BusinessName}(${pkColumn.javaField}) {
return request({
url: '/${moduleName}/${businessName}/' + ${pkColumn.javaField},
url: '/${modlePath}/${moduleName}/${businessName}/' + ${pkColumn.javaField},
method: 'delete'
})
}
... ...
-- 菜单 SQL
insert into sys_menu (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('${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 'admin', sysdate(), '', null, '${functionName}菜单');
values('${functionName}', 2006, '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 'admin', sysdate(), '', null, '${functionName}菜单');
-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();
... ...
... ... @@ -75,7 +75,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['${moduleName}:${businessName}:add']"
v-hasPermi="['${modlePath}:${moduleName}:${businessName}:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
... ... @@ -144,21 +144,21 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['${moduleName}:${businessName}:edit']"
v-hasPermi="['${modlePath}:${moduleName}:${businessName}:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-plus"
@click="handleAdd(scope.row)"
v-hasPermi="['${moduleName}:${businessName}:add']"
v-hasPermi="['${modlePath}:${moduleName}:${businessName}:add']"
>新增</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['${moduleName}:${businessName}:remove']"
v-hasPermi="['${modlePath}:${moduleName}:${businessName}:remove']"
>删除</el-button>
</template>
</el-table-column>
... ...
... ... @@ -75,7 +75,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['${moduleName}:${businessName}:add']"
v-hasPermi="['${modlePath}:${moduleName}:${businessName}:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
... ... @@ -86,7 +86,7 @@
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['${moduleName}:${businessName}:edit']"
v-hasPermi="['${modlePath}:${moduleName}:${businessName}:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
... ... @@ -97,7 +97,7 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['${moduleName}:${businessName}:remove']"
v-hasPermi="['${modlePath}:${moduleName}:${businessName}:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
... ... @@ -107,7 +107,7 @@
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['${moduleName}:${businessName}:export']"
v-hasPermi="['${modlePath}:${moduleName}:${businessName}:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
... ... @@ -158,14 +158,14 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['${moduleName}:${businessName}:edit']"
v-hasPermi="['${modlePath}:${moduleName}:${businessName}:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['${moduleName}:${businessName}:remove']"
v-hasPermi="['${modlePath}:${moduleName}:${businessName}:remove']"
>删除</el-button>
</template>
</el-table-column>
... ... @@ -593,7 +593,7 @@ export default {
#end
/** 导出按钮操作 */
handleExport() {
this.download('${moduleName}/${businessName}/export', {
this.download('${modlePath}/${moduleName}/${businessName}/export', {
...this.queryParams
}, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`)
}
... ...
... ... @@ -73,7 +73,7 @@
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['${moduleName}:${businessName}:add']"
v-hasPermi="['${modlePath}:${moduleName}:${businessName}:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
... ... @@ -136,9 +136,9 @@
#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>
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${modlePath}:${moduleName}:${businessName}:edit']">修改</el-button>
<el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['${modlePath}:${moduleName}:${businessName}:add']">新增</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${modlePath}:${moduleName}:${businessName}:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
... ...
... ... @@ -73,7 +73,7 @@
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['${moduleName}:${businessName}:add']"
v-hasPermi="['${modlePath}:${moduleName}:${businessName}:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
... ... @@ -83,7 +83,7 @@
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['${moduleName}:${businessName}:edit']"
v-hasPermi="['${modlePath}:${moduleName}:${businessName}:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
... ... @@ -93,7 +93,7 @@
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['${moduleName}:${businessName}:remove']"
v-hasPermi="['${modlePath}:${moduleName}:${businessName}:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
... ... @@ -102,7 +102,7 @@
plain
icon="Download"
@click="handleExport"
v-hasPermi="['${moduleName}:${businessName}:export']"
v-hasPermi="['${modlePath}:${moduleName}:${businessName}:export']"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
... ... @@ -148,8 +148,8 @@
#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>
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${modlePath}:${moduleName}:${businessName}:edit']">修改</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${modlePath}:${moduleName}:${businessName}:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
... ... @@ -581,7 +581,7 @@ function handle${subClassName}SelectionChange(selection) {
#end
/** 导出按钮操作 */
function handleExport() {
proxy.download('${moduleName}/${businessName}/export', {
proxy.download('${modlePath}/${moduleName}/${businessName}/export', {
...queryParams.value
}, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`)
}
... ...