更新数据维护和查询等功能,适配CIS数据表实体表善事查询。

This commit is contained in:
panx
2025-01-13 22:28:27 +08:00
parent 018322d8c1
commit 2c167222bd
18 changed files with 928 additions and 119 deletions

View File

@@ -142,6 +142,46 @@
<script type="text/html" id="tableButton"></script>
<!-- 文件预览模板 -->
<!-- 内部模板的嵌套 {-{ }-} 会有问题-->
<script type="text/html" id="filepreviewtpl">
{{#
if(d.attachment) {
var fileExt = d.attachment.split('.').pop().toLowerCase();
var imageExts = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp'];
if (imageExts.indexOf(fileExt) !== -1) {
}}
<!-- 图片文件显示图片并链接到原文件 -->
<a href="{{d.attachment}}" target="_blank">
<img class="filesuffix" src="{{d.attachment}}" alt="Image Preview" style="max-width: 100px; height: auto;" />
</a>
{{#
} else if (fileExt === 'pdf') {
}}
<!-- PDF 文件显示 PDF 图标并链接到 PDF 文件 -->
<a href="{{d.attachment}}" target="_blank" style="display: flex; align-items: center;">
<i class="layui-icon layui-icon-file" style="font-size: 24px; color: #e64340; margin-right: 5px;"></i>
<span>PDF{{d.attachment}}</span>
</a>
{{#
} else {
}}
<!-- 其他文件类型显示通用文件图标并链接到文件 -->
<a href="{{d.attachment}}" target="_blank" style="display: flex; align-items: center;">
<i class="layui-icon layui-icon-file" style="font-size: 24px; color: #1E9FFF; margin-right: 5px;"></i>
<span>Other{{d.attachment}}</span>
</a>
{{#
}
}
}}
</script>
<include file="/public/footer" />
@@ -191,12 +231,12 @@
return '<a href="javascript:"><img class="filesuffix" lay-image-click src="' + d.view + '"></a>';
}, title: '{:__("SymbolView")}'
},
{
field: 'attachment', templet: function (d) {
return '<a href="' + d.attachment + '" target="_blank" ><img class="filesuffix" src="' + d.attachment + '"></a>';
}, title: '{:__("Symbol文件")}'
},
// {
// field: 'attachment', templet: function (d) {
// return '<a href="' + d.attachment + '" target="_blank" ><img class="filesuffix" src="' + d.attachment + '"></a>';
// }, title: '{:__("Symbol文件")}'
// },
{ field: 'attachment', width: 160, templet: '#filepreviewtpl', title: '{:__("封装文件")}' },
{ field: 'nickname', title: '{:__("创建者")}' },
{ field: 'content', title: '{:__("注释")}' },
{ field: 'status', templet: '#columnStatus', title: '{:__("状态")}' },