diff --git a/Admin.NET/Admin.NET.Web.Entry/wwwroot/Template/index.vue.vm b/Admin.NET/Admin.NET.Web.Entry/wwwroot/Template/index.vue.vm
index f228b74b..73374b4e 100644
--- a/Admin.NET/Admin.NET.Web.Entry/wwwroot/Template/index.vue.vm
+++ b/Admin.NET/Admin.NET.Web.Entry/wwwroot/Template/index.vue.vm
@@ -27,21 +27,46 @@
} else if(@column.EffectType == "InputNumber") {
-
+
+
+
+
+
} else if(@column.EffectType == "fk") {
-
+
+
+
+
+
+
+
} else if(@column.EffectType == "Select") {
-
+
+
+
+
+
+
+
} else if(@column.EffectType == "EnumSelector") {
-
-
+
+
} else if(@column.EffectType == "DatePicker") {
-
+
+
+ if(@column.QueryType == "~"){
+
+ }else
+ {
+
+ }
+
+
}
}
}
@@ -71,11 +96,34 @@
@foreach (var column in Model.TableField) {
if(@column.WhetherTable == "Y") {
- if(@column.EffectType == "EnumSelector") {
@:
+ if(@column.EffectType == "Upload") {
+ @:
+ } else if(@column.EffectType == "fk") {
+ @:{{ row.@LowerFirstLetter(@column.PropertyName)@(@column.FkColumnName) }}
+ } else if(@column.EffectType == "ApiTreeSelect") {
+ @:{{ row.@LowerFirstLetter(@column.PropertyName)@(column.DisplayColumn) }}
+ } else if(@column.EffectType == "Switch") {
+ @: 是
+ @: 否
+ } else if(@column.EffectType == "ConstSelector") {
+ @:{{codeToName(row.@(@column.LowerPropertyName), '@(@column.DictTypeCode)')}}
+ } else if(@column.EffectType == "Select") {
+ @: {{dv('@(@column.DictTypeCode)', row.@column.LowerPropertyName)?.name}}
+ } else if(@column.EffectType == "EnumSelector") {
@: {{dv('@(@column.DictTypeCode)', row.@column.LowerPropertyName)?.name}}
- @:
}
+ @:
}
}
@@ -151,7 +199,7 @@ import { getAPI } from '/@@/utils/axios-utils';
import { @(@Model.EntityName)Api } from '/@@/api-services/api';
// 模型
-import { @(@Model.EntityName), @(@Model.EntityName)Input, @(@Model.EntityName)Output } from '/@@/api-services/_lab/models';
+import { @(@Model.EntityName), @(@Model.EntityName)Input, @(@Model.EntityName)Output } from '/@@/api-services/models';
// 子窗口对象
const xGrid = ref();
@@ -189,22 +237,22 @@ const options = useVxeTable<@(@Model.EntityName)>({
if(@column.WhetherTable == "Y") {
if(@column.EffectType == "Upload" || @column.EffectType == "fk" || @column.EffectType == "ApiTreeSelect" || @column.EffectType == "Switch" || @column.EffectType == "ConstSelector") {
if(@column.EffectType == "Upload") {
-
+ @:{ field: '@column.LowerPropertyName', title: '@column.ColumnComment', minWidth: 100, showOverflow: 'tooltip', slots: { default: 'row_@column.LowerPropertyName' } },
} else if(@column.EffectType == "fk") {
-
+ @:{ field: '@column.LowerPropertyName', title: '@column.ColumnComment', minWidth: 100, showOverflow: 'tooltip', slots: { default: 'row_@column.LowerPropertyName' } },
} else if(@column.EffectType == "ApiTreeSelect") {
-
+ @:{ field: '@column.LowerPropertyName', title: '@column.ColumnComment', minWidth: 100, showOverflow: 'tooltip', slots: { default: 'row_@column.LowerPropertyName' } },
} else if(@column.EffectType == "Switch") {
-
+ @:{ field: '@column.LowerPropertyName', title: '@column.ColumnComment', minWidth: 100, showOverflow: 'tooltip', slots: { default: 'row_@column.LowerPropertyName' } },
} else if(@column.EffectType == "ConstSelector") {
-
+ @:{ field: '@column.LowerPropertyName', title: '@column.ColumnComment', minWidth: 100, showOverflow: 'tooltip', slots: { default: 'row_@column.LowerPropertyName' } },
}
} else if(@column.EffectType == "Select") {
-
+ @:{ field: '@column.LowerPropertyName', title: '@column.ColumnComment', minWidth: 100, showOverflow: 'tooltip', slots: { default: 'row_@column.LowerPropertyName' } },
} else if(@column.EffectType == "EnumSelector") {
@:{ field: '@column.LowerPropertyName', title: '@column.ColumnComment', minWidth: 100, showOverflow: 'tooltip', slots: { default: 'row_@column.LowerPropertyName' } },
} else if(@column.EffectType == "DatePicker") {
-
+ @:{ field: '@column.LowerPropertyName', title: '@column.ColumnComment', minWidth: 100, showOverflow: 'tooltip', slots: { default: 'row_@column.LowerPropertyName' } },
} else {
if(@column.LowerPropertyName != "remark") {
@:{ field: '@column.LowerPropertyName', title: '@column.ColumnComment', minWidth: 100, showOverflow: 'tooltip' },
@@ -305,6 +353,21 @@ const handleDelete = (row: any) => {
})
.catch(() => {});
};
+
+@foreach (var column in Model.TableField) {
+ if(@column.WhetherTable == "Y") {
+ if(@column.EffectType == "Upload") {
+// 获取文件地址
+const fetchFileUrl = (row: SysFile): string => {
+ if (row.bucketName == 'Local') {
+ return `/${row.filePath}/${row.id}${row.suffix}`;
+ } else {
+ return row.url!;
+ }
+};
+ }
+ }
+}