修改代码生成导出模板

This commit is contained in:
不做码农 2022-12-06 18:33:54 +08:00
parent 297246076f
commit bd033be4d1
2 changed files with 3 additions and 4 deletions

View File

@ -155,7 +155,7 @@ $if(replaceDto.ShowBtnExport)
{ {
return ToResponse(ResultCode.FAIL, "没有要导出的数据"); return ToResponse(ResultCode.FAIL, "没有要导出的数据");
} }
string sFileName = ExportExcel(list, "${replaceDto.ModelTypeName}", "${genTable.FunctionName}"); string sFileName = ExportExcel(list, "${genTable.FunctionName}", "${genTable.FunctionName}");
return ExportExcel("export", sFileName); return ExportExcel("export", sFileName);
} }
$end $end

View File

@ -281,7 +281,6 @@ $end
<script setup name="${genTable.BusinessName.ToLower()}"> <script setup name="${genTable.BusinessName.ToLower()}">
import { list${genTable.BusinessName}, add${genTable.BusinessName}, del${genTable.BusinessName}, update${genTable.BusinessName}, get${genTable.BusinessName}, import { list${genTable.BusinessName}, add${genTable.BusinessName}, del${genTable.BusinessName}, update${genTable.BusinessName}, get${genTable.BusinessName},
$if(replaceDto.ShowBtnExport) export${genTable.BusinessName}, $end
$if(replaceDto.ShowBtnTruncate) clear${genTable.BusinessName}, $end $if(replaceDto.ShowBtnTruncate) clear${genTable.BusinessName}, $end
$if(showCustomInput) changeSort $end } $if(showCustomInput) changeSort $end }
from '@/api/${tool.FirstLowerCase(genTable.ModuleName)}/${genTable.BusinessName.ToLower()}.js' from '@/api/${tool.FirstLowerCase(genTable.ModuleName)}/${genTable.BusinessName.ToLower()}.js'
@ -570,13 +569,13 @@ $if(replaceDto.ShowBtnExport)
// 导出按钮操作 // 导出按钮操作
function handleExport() { function handleExport() {
proxy proxy
.${confirm}confirm("是否确认导出所有${genTable.functionName}数据项?", "警告", { .${confirm}confirm("是否确认导出${genTable.functionName}数据项?", "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(async () => { .then(async () => {
await export${genTable.BusinessName}(queryParams) await proxy.downFile('/${genTable.ModuleName}/${genTable.BusinessName}/export', { ...queryParams })
}) })
} }
$end $end