fix(ai): 修复产品点模块中文件显示名称错误问题
- 在productPoint添加页面中将选项显示文本从fileName改为fileSysName
- 在AiProductPointController中为FileInfo对象设置正确的fileSysName属性
- 在FileUploadController中调整fileName和fileSysName的赋值逻辑
- 调整fileUpload列表页面中表格列标题顺序以匹配实际数据结构
- 在productPoint信息页面中同样将选项显示文本从fileName改为fileSysName
| | |
| | | String totalName = path.getFileName().toString(); |
| | | String[] s = totalName.split(":"); |
| | | if (s.length > 1){ |
| | | fileInfo.setFileName(s[1]); |
| | | fileInfo.setFileSysName(s[1]); |
| | | }else{ |
| | | fileInfo.setFileName(totalName); |
| | | fileInfo.setFileSysName(totalName); |
| | | } |
| | | fileInfo.setFileSysName(totalName); |
| | | fileInfo.setFileName(totalName); |
| | | fileInfo.setFileSize(Files.size(path)); |
| | | fileInfo.setUploadTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(Files.getLastModifiedTime(path).toMillis()))); |
| | | fileList.add(fileInfo); |
| | |
| | | if (Files.isRegularFile(path)) { |
| | | try { |
| | | FileUploadController.FileInfo fileInfo = new FileUploadController.FileInfo(); |
| | | String totalName = path.getFileName().toString(); |
| | | String[] s = totalName.split(":"); |
| | | if (s.length > 1){ |
| | | fileInfo.setFileSysName(s[1]); |
| | | }else{ |
| | | fileInfo.setFileSysName(totalName); |
| | | } |
| | | fileInfo.setFileName(path.getFileName().toString()); |
| | | list.add(fileInfo); |
| | | } catch (Exception e) { |
| | |
| | | <table class="layui-table" id="fileList"> |
| | | <thead> |
| | | <tr> |
| | | <th>文件名</th> |
| | | <th>系统文件名</th> |
| | | <th>文件名</th> |
| | | <th>大小</th> |
| | | <th>上传时间</th> |
| | | <th>操作</th> |
| | |
| | | $.get(ctx + 'admin/productPoint/fileList/parent', function (data) { |
| | | for (var k in data) |
| | | { |
| | | $(".video-add-productCategory").append("<option value='" + data[k].fileName + "'>" + data[k].fileName + "</option>"); |
| | | $(".video-add-productCategory").append("<option value='" + data[k].fileName + "'>" + data[k].fileSysName + "</option>"); |
| | | } |
| | | layui.use('form', function () { |
| | | var form = layui.form; |
| | |
| | | $.get(ctx + 'admin/productPoint/fileList/parent', function (data) { |
| | | for (var k in data) |
| | | { |
| | | $(".video-add-productCategory").append("<option value='" + data[k].fileName + "'>" + data[k].fileName + "</option>"); |
| | | $(".video-add-productCategory").append("<option value='" + data[k].fileName + "'>" + data[k].fileSysName + "</option>"); |
| | | } |
| | | layui.use('form', function () { |
| | | var form = layui.form; |