代码优化
This commit is contained in:
parent
3a05ba0b3a
commit
5c1a62b69e
|
|
@ -33,7 +33,7 @@
|
|||
<body>
|
||||
<div class="home-container">
|
||||
<div class="welcome-box">
|
||||
<div class="welcome-title">欢迎使用甘肃分包评价系统</div>
|
||||
<div class="welcome-title">欢迎使用分包评价系统</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -501,25 +501,25 @@
|
|||
|
||||
$(document).on('click', '.layui-table-cell', function (e) {
|
||||
console.log('点击了单元格')
|
||||
// var dataId = $(this).data('id');
|
||||
// var dataIndex = $(this).data('index');
|
||||
// console.log('File icon clicked', {
|
||||
// dataIndex: dataIndex,
|
||||
// dataId: dataId,
|
||||
// rowData: tableRowList[dataIndex]
|
||||
// });
|
||||
var dataId = $(this).data('id');
|
||||
var dataIndex = $(this).data('index');
|
||||
console.log('File icon clicked', {
|
||||
dataIndex: dataIndex,
|
||||
dataId: dataId,
|
||||
rowData: tableRowList[dataIndex]
|
||||
});
|
||||
|
||||
// // 获取文件信息
|
||||
// const fileInfo = tableRowList[dataIndex][`${dataId}-file`];
|
||||
// if (fileInfo && fileInfo.fileName) {
|
||||
// // 这里添加你的文件查看/下载逻辑
|
||||
// layer.msg(`文件名: ${fileInfo.fileName}`);
|
||||
// 获取文件信息
|
||||
const fileInfo = tableRowList[dataIndex][`${dataId}-file`];
|
||||
if (fileInfo && fileInfo.fileName) {
|
||||
// 这里添加你的文件查看/下载逻辑
|
||||
layer.msg(`文件名: ${fileInfo.fileName}`);
|
||||
|
||||
// // 示例:在新窗口打开文件
|
||||
// window.open(ctxPath + '/file/download?path=' + encodeURIComponent(fileInfo.filePath));
|
||||
// } else {
|
||||
// layer.msg('未找到文件');
|
||||
// }
|
||||
// 示例:在新窗口打开文件
|
||||
window.open(ctxPath + '/file/download?path=' + encodeURIComponent(fileInfo.filePath));
|
||||
} else {
|
||||
layer.msg('未找到文件');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue