This commit is contained in:
BianLzhaoMin 2025-06-05 10:51:15 +08:00
parent 32b52e0937
commit 32fdf1e05e
1 changed files with 33 additions and 7 deletions

View File

@ -442,13 +442,13 @@
}
});
$(document).on('click', '#baseTable .file-icon', function () {
var dataId = $(this).data('id');
var dataIndex = $(this).data('index');
console.log('dataIndex图标', dataIndex)
console.log('dataId图标', dataId)
console.log('tableRowList图标', tableRowList[dataIndex])
})
// $(document).on('click', '#baseTable .file-icon', function () {
// var dataId = $(this).data('id');
// var dataIndex = $(this).data('index');
// console.log('dataIndex图标', dataIndex)
// console.log('dataId图标', dataId)
// console.log('tableRowList图标', tableRowList[dataIndex])
// })
// 单元格普通编辑事件
// table.on('edit(baseTable)', function (obj) {
// var value = obj.value // 得到修改后的值
@ -500,6 +500,32 @@
// });
}
$(document).on('click', '#baseTable .file-icon', function (e) {
e.stopPropagation(); // 阻止事件冒泡
console.log('点击了文件图标')
// 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}`);
// // 示例:在新窗口打开文件
// window.open(ctxPath + '/file/download?path=' + encodeURIComponent(fileInfo.filePath));
// } else {
// layer.msg('未找到文件');
// }
});
function getTitle() {
let path = getUrlParam("type") == '0' ? '/outsourcer/getTableTitle' : '/outsourcer/getAuditTitleData';