Commit b741ed480b0d0df9711d47c1bbe2dd692cfec126
1 parent
7f8cfd4c
fix:修复上次提交导致的前端页面取值问题
Showing
4 changed files
with
15 additions
and
11 deletions
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java
| ... | ... | @@ -21,8 +21,8 @@ public class FilePageReqVO extends PageParam { |
| 21 | 21 | @ApiModelProperty(value = "文件路径", example = "yudao", notes = "模糊匹配") |
| 22 | 22 | private String path; |
| 23 | 23 | |
| 24 | - @ApiModelProperty(value = "文件类型", example = "jpg", notes = "模糊匹配") | |
| 25 | - private String type; | |
| 24 | + @ApiModelProperty(value = "文件扩展名", example = "jpg", notes = "模糊匹配") | |
| 25 | + private String extName; | |
| 26 | 26 | |
| 27 | 27 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 28 | 28 | @ApiModelProperty(value = "开始创建时间") | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileRespVO.java
| ... | ... | @@ -22,8 +22,11 @@ public class FileRespVO { |
| 22 | 22 | @ApiModelProperty(value = "文件 URL", required = true, example = "https://www.iocoder.cn/yudao.jpg") |
| 23 | 23 | private String url; |
| 24 | 24 | |
| 25 | - @ApiModelProperty(value = "文件类型", example = "jpg") | |
| 26 | - private String type; | |
| 25 | + @ApiModelProperty(value = "文件扩展名", example = "jpg") | |
| 26 | + private String extName; | |
| 27 | + | |
| 28 | + @ApiModelProperty(value = "文件MIME类型", example = "application/octet-stream") | |
| 29 | + private String mimeType; | |
| 27 | 30 | |
| 28 | 31 | @ApiModelProperty(value = "文件大小", example = "2048", required = true) |
| 29 | 32 | private Integer size; | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/mysql/file/FileMapper.java
| ... | ... | @@ -18,7 +18,7 @@ public interface FileMapper extends BaseMapperX<FileDO> { |
| 18 | 18 | default PageResult<FileDO> selectPage(FilePageReqVO reqVO) { |
| 19 | 19 | return selectPage(reqVO, new LambdaQueryWrapperX<FileDO>() |
| 20 | 20 | .likeIfPresent(FileDO::getPath, reqVO.getPath()) |
| 21 | - .likeIfPresent(FileDO::getExtName, reqVO.getType()) | |
| 21 | + .likeIfPresent(FileDO::getExtName, reqVO.getExtName()) | |
| 22 | 22 | .betweenIfPresent(FileDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) |
| 23 | 23 | .orderByDesc(FileDO::getId)); |
| 24 | 24 | } | ... | ... |
yudao-ui-admin/src/views/infra/file/index.vue
| ... | ... | @@ -26,14 +26,15 @@ |
| 26 | 26 | |
| 27 | 27 | <!-- 列表 --> |
| 28 | 28 | <el-table v-loading="loading" :data="list"> |
| 29 | - <el-table-column label="文件名" align="center" prop="name" /> | |
| 30 | - <el-table-column label="文件路径" align="center" prop="path" /> | |
| 31 | - <el-table-column label="文件 URL" align="center" prop="url" /> | |
| 29 | + <el-table-column label="文件名" :show-overflow-tooltip="true" align="center" min-width="250" prop="name" /> | |
| 30 | + <el-table-column :show-overflow-tooltip="true" label="文件路径" align="center" min-width="300" prop="path" /> | |
| 31 | + <el-table-column :show-overflow-tooltip="true" label="文件 URL" align="center" min-width="400" prop="url" /> | |
| 32 | 32 | <el-table-column label="文件大小" align="center" prop="size" width="120" :formatter="sizeFormat" /> |
| 33 | - <el-table-column label="文件类型" align="center" prop="type" width="80" /> | |
| 33 | + <el-table-column label="文件类型" align="center" prop="mimeType" width="210" /> | |
| 34 | + <el-table-column label="文件扩展名" align="center" prop="extName" width="80" /> | |
| 34 | 35 | <!-- <el-table-column label="文件内容" align="center" prop="content">--> |
| 35 | 36 | <!-- <template slot-scope="scope">--> |
| 36 | -<!-- <img v-if="scope.row.type === 'jpg' || scope.row.type === 'png' || scope.row.type === 'gif'"--> | |
| 37 | +<!-- <img v-if="scope.row.extName === 'jpg' || scope.row.extName === 'png' || scope.row.extName === 'gif'"--> | |
| 37 | 38 | <!-- width="200px" :src="getFileUrl + scope.row.id">--> |
| 38 | 39 | <!-- <i v-else>非图片,无法预览</i>--> |
| 39 | 40 | <!-- </template>--> |
| ... | ... | @@ -101,7 +102,7 @@ export default { |
| 101 | 102 | pageNo: 1, |
| 102 | 103 | pageSize: 10, |
| 103 | 104 | path: null, |
| 104 | - type: null, | |
| 105 | + extName: null, | |
| 105 | 106 | }, |
| 106 | 107 | // 用户导入参数 |
| 107 | 108 | upload: { | ... | ... |