From 598c377924e99b50c0f6fc8706f4da86c509c067 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com>
Date: Sun, 28 Nov 2021 16:19:38 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E6=9F=A5?=
=?UTF-8?q?=E8=AF=A2=E6=A8=A1=E5=9D=97=E6=96=B0=E5=A2=9E=E4=B8=8B=E6=8B=89?=
=?UTF-8?q?=E6=A1=86=E7=BB=84=E4=BB=B6=E7=94=9F=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../wwwroot/CodeGenTemplate/VueTemplate.txt | 2 +-
ZR.CodeGenerator/CodeGenerateTemplate.cs | 14 ++++++++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/VueTemplate.txt b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/VueTemplate.txt
index 1542bd4..59dfa9f 100644
--- a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/VueTemplate.txt
+++ b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/VueTemplate.txt
@@ -117,7 +117,7 @@ export default {
list{ModelTypeName}(this.addDateRange(this.queryParams, this.timeRange)).then(res => {
if (res.code == 200) {
this.dataList = res.data.result;
- this.total = res.data.totalCount;
+ this.total = res.data.totalNum;
}
})
},
diff --git a/ZR.CodeGenerator/CodeGenerateTemplate.cs b/ZR.CodeGenerator/CodeGenerateTemplate.cs
index ae4cc9e..3914017 100644
--- a/ZR.CodeGenerator/CodeGenerateTemplate.cs
+++ b/ZR.CodeGenerator/CodeGenerateTemplate.cs
@@ -260,14 +260,24 @@ namespace ZR.CodeGenerator
if (dbFieldInfo.HtmlType == GenConstants.HTML_DATETIME)
{
sb.AppendLine(" ");
- sb.AppendLine(" ");
+ sb.AppendLine(" ");
+ sb.AppendLine(" ");
+ }
+ else if (dbFieldInfo.HtmlType == GenConstants.HTML_SELECT && !string.IsNullOrEmpty(dbFieldInfo.DictType))
+ {
+ //string value = CodeGeneratorTool.IsNumber(dbFieldInfo.CsharpType) ? "parseInt(item.dictValue)" : "item.dictValue";
+ sb.AppendLine($" ");
+ sb.AppendLine($" ");
+ sb.AppendLine($" ");
+ sb.AppendLine(" ");
sb.AppendLine(" ");
}
else
{
string inputNumTxt = CodeGeneratorTool.IsNumber(dbFieldInfo.CsharpType) ? ".number" : "";
sb.AppendLine($" ");
- sb.AppendLine($" ");
+ sb.AppendLine($" ");
sb.AppendLine(" ");
}