Merge pull request '修复 模版 文件类型 生成' (#17) from orzsoft_admin/Admin.NET.Pro:main into main
Reviewed-on: http://101.43.53.74:3000/Admin.NET/Admin.NET.Pro/pulls/17
This commit is contained in:
commit
abf89f65ce
@ -101,7 +101,26 @@
|
||||
if(@column.WhetherTable == "Y") {
|
||||
if(@column.EffectType == "Upload") {
|
||||
@:<template #row_@(@column.LowerPropertyName)="{ row }">
|
||||
@:<el-image style="width: 60px; height: 60px" :src="fetchFileUrl(row)" alt="无法预览" lazy hide-on-click-modal :preview-src-list="[fetchFileUrl(row)]" :initial-index="0" fit="scale-down" preview-teleported></el-image>
|
||||
@:<el-popover
|
||||
@:v-if="row.@column.LowerPropertyName"
|
||||
@:placement="bottom"
|
||||
@::width="60"
|
||||
@::height="60"
|
||||
@:trigger="hover">
|
||||
@:<template #reference>
|
||||
@:<el-tag>查看文件</el-tag>
|
||||
@:</template>
|
||||
@:<template #default>
|
||||
@:<el-image
|
||||
@::src="row.@column.LowerPropertyName"
|
||||
@::hide-on-click-modal="true"
|
||||
@::preview-src-list="[row.@column.LowerPropertyName]"
|
||||
@::initial-index="0"
|
||||
@:fit="scale-down"
|
||||
@:preview-teleported=""/>
|
||||
@:</template>
|
||||
@:</el-popover>
|
||||
@:<el-tag v-else type="info">暂无文件</el-tag>
|
||||
@:</template>
|
||||
} else if(@column.EffectType == "fk") {
|
||||
@:<template #row_@(@column.LowerPropertyName)="{ row }">
|
||||
@ -188,10 +207,6 @@ import { useVxeTable } from '/@@/hooks/vxeTableOptionsHook';
|
||||
@:import { formatDate } from '/@@/utils/formatTime';
|
||||
}
|
||||
|
||||
@if(@Model.TableField.Any(x=>x.EffectType == "Upload")){
|
||||
@:import { SysFile } from '/@@/api-services/models';
|
||||
}
|
||||
|
||||
import { newValue } from '/@@/utils/desensitization';
|
||||
|
||||
@if(@Model.PrintType != "off"){
|
||||
@ -381,21 +396,6 @@ const handleDelete = (row: any) => {
|
||||
@:get@(@column.FkEntityName)@(@column.PropertyName)DropdownList();
|
||||
}
|
||||
}
|
||||
|
||||
@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!;
|
||||
@:}
|
||||
@:};
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user