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,8 +21,8 @@ public class FilePageReqVO extends PageParam { | ||
| 21 | @ApiModelProperty(value = "文件路径", example = "yudao", notes = "模糊匹配") | 21 | @ApiModelProperty(value = "文件路径", example = "yudao", notes = "模糊匹配") |
| 22 | private String path; | 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 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 27 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 28 | @ApiModelProperty(value = "开始创建时间") | 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,8 +22,11 @@ public class FileRespVO { | ||
| 22 | @ApiModelProperty(value = "文件 URL", required = true, example = "https://www.iocoder.cn/yudao.jpg") | 22 | @ApiModelProperty(value = "文件 URL", required = true, example = "https://www.iocoder.cn/yudao.jpg") |
| 23 | private String url; | 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 | @ApiModelProperty(value = "文件大小", example = "2048", required = true) | 31 | @ApiModelProperty(value = "文件大小", example = "2048", required = true) |
| 29 | private Integer size; | 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,7 +18,7 @@ public interface FileMapper extends BaseMapperX<FileDO> { | ||
| 18 | default PageResult<FileDO> selectPage(FilePageReqVO reqVO) { | 18 | default PageResult<FileDO> selectPage(FilePageReqVO reqVO) { |
| 19 | return selectPage(reqVO, new LambdaQueryWrapperX<FileDO>() | 19 | return selectPage(reqVO, new LambdaQueryWrapperX<FileDO>() |
| 20 | .likeIfPresent(FileDO::getPath, reqVO.getPath()) | 20 | .likeIfPresent(FileDO::getPath, reqVO.getPath()) |
| 21 | - .likeIfPresent(FileDO::getExtName, reqVO.getType()) | 21 | + .likeIfPresent(FileDO::getExtName, reqVO.getExtName()) |
| 22 | .betweenIfPresent(FileDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) | 22 | .betweenIfPresent(FileDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) |
| 23 | .orderByDesc(FileDO::getId)); | 23 | .orderByDesc(FileDO::getId)); |
| 24 | } | 24 | } |
yudao-ui-admin/src/views/infra/file/index.vue
| @@ -26,14 +26,15 @@ | @@ -26,14 +26,15 @@ | ||
| 26 | 26 | ||
| 27 | <!-- 列表 --> | 27 | <!-- 列表 --> |
| 28 | <el-table v-loading="loading" :data="list"> | 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 | <el-table-column label="文件大小" align="center" prop="size" width="120" :formatter="sizeFormat" /> | 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 | <!-- <el-table-column label="文件内容" align="center" prop="content">--> | 35 | <!-- <el-table-column label="文件内容" align="center" prop="content">--> |
| 35 | <!-- <template slot-scope="scope">--> | 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 | <!-- width="200px" :src="getFileUrl + scope.row.id">--> | 38 | <!-- width="200px" :src="getFileUrl + scope.row.id">--> |
| 38 | <!-- <i v-else>非图片,无法预览</i>--> | 39 | <!-- <i v-else>非图片,无法预览</i>--> |
| 39 | <!-- </template>--> | 40 | <!-- </template>--> |
| @@ -101,7 +102,7 @@ export default { | @@ -101,7 +102,7 @@ export default { | ||
| 101 | pageNo: 1, | 102 | pageNo: 1, |
| 102 | pageSize: 10, | 103 | pageSize: 10, |
| 103 | path: null, | 104 | path: null, |
| 104 | - type: null, | 105 | + extName: null, |
| 105 | }, | 106 | }, |
| 106 | // 用户导入参数 | 107 | // 用户导入参数 |
| 107 | upload: { | 108 | upload: { |