fix:修复上次提交导致的前端页面取值问题

pull/2/head
jiangqiang 2022-07-07 10:51:33 +08:00
parent 7f8cfd4c66
commit b741ed480b
4 changed files with 15 additions and 11 deletions

View File

@ -21,8 +21,8 @@ public class FilePageReqVO extends PageParam {
@ApiModelProperty(value = "文件路径", example = "yudao", notes = "模糊匹配")
private String path;
@ApiModelProperty(value = "文件类型", example = "jpg", notes = "模糊匹配")
private String type;
@ApiModelProperty(value = "文件扩展名", example = "jpg", notes = "模糊匹配")
private String extName;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始创建时间")

View File

@ -22,8 +22,11 @@ public class FileRespVO {
@ApiModelProperty(value = "文件 URL", required = true, example = "https://www.iocoder.cn/yudao.jpg")
private String url;
@ApiModelProperty(value = "文件类型", example = "jpg")
private String type;
@ApiModelProperty(value = "文件扩展名", example = "jpg")
private String extName;
@ApiModelProperty(value = "文件MIME类型", example = "application/octet-stream")
private String mimeType;
@ApiModelProperty(value = "文件大小", example = "2048", required = true)
private Integer size;

View File

@ -18,7 +18,7 @@ public interface FileMapper extends BaseMapperX<FileDO> {
default PageResult<FileDO> selectPage(FilePageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<FileDO>()
.likeIfPresent(FileDO::getPath, reqVO.getPath())
.likeIfPresent(FileDO::getExtName, reqVO.getType())
.likeIfPresent(FileDO::getExtName, reqVO.getExtName())
.betweenIfPresent(FileDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
.orderByDesc(FileDO::getId));
}

View File

@ -26,14 +26,15 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="文件名" align="center" prop="name" />
<el-table-column label="文件路径" align="center" prop="path" />
<el-table-column label="文件 URL" align="center" prop="url" />
<el-table-column label="文件名" :show-overflow-tooltip="true" align="center" min-width="250" prop="name" />
<el-table-column :show-overflow-tooltip="true" label="文件路径" align="center" min-width="300" prop="path" />
<el-table-column :show-overflow-tooltip="true" label="文件 URL" align="center" min-width="400" prop="url" />
<el-table-column label="文件大小" align="center" prop="size" width="120" :formatter="sizeFormat" />
<el-table-column label="文件类型" align="center" prop="type" width="80" />
<el-table-column label="文件类型" align="center" prop="mimeType" width="210" />
<el-table-column label="文件扩展名" align="center" prop="extName" width="80" />
<!-- <el-table-column label="文件内容" align="center" prop="content">-->
<!-- <template slot-scope="scope">-->
<!-- <img v-if="scope.row.type === 'jpg' || scope.row.type === 'png' || scope.row.type === 'gif'"-->
<!-- <img v-if="scope.row.extName === 'jpg' || scope.row.extName === 'png' || scope.row.extName === 'gif'"-->
<!-- width="200px" :src="getFileUrl + scope.row.id">-->
<!-- <i v-else></i>-->
<!-- </template>-->
@ -101,7 +102,7 @@ export default {
pageNo: 1,
pageSize: 10,
path: null,
type: null,
extName: null,
},
//
upload: {