diff --git a/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/enums/FileTypeEnum.java b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/enums/FileTypeEnum.java new file mode 100644 index 000000000..384e4475a --- /dev/null +++ b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/enums/FileTypeEnum.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package top.charles7c.continew.admin.system.enums; + +import java.util.Collections; +import java.util.List; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +import top.charles7c.continew.starter.data.mybatis.plus.base.IBaseEnum; + +/** + * 文件分类枚举 + * + * @author Charles7c + * @since 2023/12/23 13:38 + */ +@Getter +@RequiredArgsConstructor +public enum FileTypeEnum implements IBaseEnum { + + /** + * 其他 + */ + UNKNOWN(1, "其他", Collections.emptyList()), + + /** + * 图片 + */ + IMAGE(2, "图片", List.of("jpg", "png", "gif", "bmp", "webp", "ico", "psd", "tiff", "dwg", "jxr", "apng", "xcf")), + + /** + * 文档 + */ + DOC(3, "文档", List.of("txt", "pdf", "doc", "xls", "ppt", "docx", "xlsx", "pptx")), + + /** + * 视频 + */ + VIDEO(4, "视频", List.of("mp4", "avi", "mkv", "flv", "webm", "wmv", "m4v", "mov", "mpg", "rmvb", "3gp")), + + /** + * 音频 + */ + AUDIO(5, "音频", List.of("mp3", "flac", "wav", "ogg", "midi", "m4a", "aac", "amr", "ac3", "aiff")),; + + private final Integer value; + private final String description; + private final List extensions; +} diff --git a/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/mapper/FileMapper.java b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/mapper/FileMapper.java new file mode 100644 index 000000000..93dc6a632 --- /dev/null +++ b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/mapper/FileMapper.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package top.charles7c.continew.admin.system.mapper; + +import top.charles7c.continew.admin.system.model.entity.FileDO; +import top.charles7c.continew.starter.data.mybatis.plus.base.BaseMapper; + +/** + * 文件 Mapper + * + * @author Charles7c + * @since 2023/12/23 10:38 + */ +public interface FileMapper extends BaseMapper {} \ No newline at end of file diff --git a/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/model/entity/FileDO.java b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/model/entity/FileDO.java new file mode 100644 index 000000000..f3d497ce4 --- /dev/null +++ b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/model/entity/FileDO.java @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package top.charles7c.continew.admin.system.model.entity; + +import java.io.Serial; + +import lombok.Data; + +import com.baomidou.mybatisplus.annotation.TableName; + +import top.charles7c.continew.admin.system.enums.FileTypeEnum; +import top.charles7c.continew.starter.extension.crud.base.BaseDO; + +/** + * 文件实体 + * + * @author Charles7c + * @since 2023/12/23 10:38 + */ +@Data +@TableName("sys_file") +public class FileDO extends BaseDO { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 名称 + */ + private String name; + + /** + * 大小(字节) + */ + private Long size; + + /** + * URL + */ + private String url; + + /** + * 扩展名 + */ + private String extension; + + /** + * MIME类型 + */ + private String mimeType; + + /** + * 类型 + */ + private FileTypeEnum type; + + /** + * 存储库ID + */ + private Long storageId; +} \ No newline at end of file diff --git a/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/model/query/FileQuery.java b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/model/query/FileQuery.java new file mode 100644 index 000000000..e926220a9 --- /dev/null +++ b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/model/query/FileQuery.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package top.charles7c.continew.admin.system.model.query; + +import java.io.Serial; +import java.io.Serializable; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +import top.charles7c.continew.starter.data.mybatis.plus.query.Query; +import top.charles7c.continew.starter.data.mybatis.plus.query.QueryType; + +/** + * 文件查询条件 + * + * @author Charles7c + * @since 2023/12/23 10:38 + */ +@Data +@Schema(description = "文件查询条件") +public class FileQuery implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 名称 + */ + @Schema(description = "名称") + @Query(type = QueryType.INNER_LIKE) + private String name; + + /** + * 类型 + */ + @Schema(description = "类型") + @Query(type = QueryType.EQUAL) + private Integer type; +} \ No newline at end of file diff --git a/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/model/req/FileReq.java b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/model/req/FileReq.java new file mode 100644 index 000000000..313ede6a9 --- /dev/null +++ b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/model/req/FileReq.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package top.charles7c.continew.admin.system.model.req; + +import java.io.Serial; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +import top.charles7c.continew.starter.extension.crud.base.BaseReq; + +/** + * 创建或修改文件信息 + * + * @author Charles7c + * @since 2023/12/23 10:38 + */ +@Data +@Schema(description = "创建或修改文件信息") +public class FileReq extends BaseReq { + + @Serial + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/model/resp/FileDetailResp.java b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/model/resp/FileDetailResp.java new file mode 100644 index 000000000..ad8eb9917 --- /dev/null +++ b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/model/resp/FileDetailResp.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package top.charles7c.continew.admin.system.model.resp; + +import java.io.Serial; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; + +import top.charles7c.continew.admin.system.enums.FileTypeEnum; +import top.charles7c.continew.starter.extension.crud.base.BaseDetailResp; + +/** + * 文件详情信息 + * + * @author Charles7c + * @since 2023/12/23 10:38 + */ +@Data +@ExcelIgnoreUnannotated +@Schema(description = "文件详情信息") +public class FileDetailResp extends BaseDetailResp { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 名称 + */ + @Schema(description = "名称") + @ExcelProperty(value = "名称") + private String name; + + /** + * 大小(字节) + */ + @Schema(description = "大小(字节)") + @ExcelProperty(value = "大小(字节)") + private Long size; + + /** + * URL + */ + @Schema(description = "URL") + @ExcelProperty(value = "URL") + private String url; + + /** + * 扩展名 + */ + @Schema(description = "扩展名") + @ExcelProperty(value = "扩展名") + private String extension; + + /** + * MIME类型 + */ + @Schema(description = "MIME类型") + @ExcelProperty(value = "MIME类型") + private String mimeType; + + /** + * 类型 + */ + @Schema(description = "类型") + @ExcelProperty(value = "类型") + private FileTypeEnum type; + + /** + * 存储库ID + */ + @Schema(description = "存储库ID") + @ExcelProperty(value = "存储库ID") + private Long storageId; +} \ No newline at end of file diff --git a/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/model/resp/FileResp.java b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/model/resp/FileResp.java new file mode 100644 index 000000000..188721f26 --- /dev/null +++ b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/model/resp/FileResp.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package top.charles7c.continew.admin.system.model.resp; + +import java.io.Serial; +import java.time.LocalDateTime; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +import top.charles7c.continew.admin.system.enums.FileTypeEnum; +import top.charles7c.continew.starter.extension.crud.base.BaseResp; + +/** + * 文件信息 + * + * @author Charles7c + * @since 2023/12/23 10:38 + */ +@Data +@Schema(description = "文件信息") +public class FileResp extends BaseResp { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 名称 + */ + @Schema(description = "名称") + private String name; + + /** + * 大小(字节) + */ + @Schema(description = "大小(字节)") + private Long size; + + /** + * URL + */ + @Schema(description = "URL") + private String url; + + /** + * 扩展名 + */ + @Schema(description = "扩展名") + private String extension; + + /** + * MIME类型 + */ + @Schema(description = "MIME类型") + private String mimeType; + + /** + * 类型 + */ + @Schema(description = "类型") + private FileTypeEnum type; + + /** + * 存储库ID + */ + @Schema(description = "存储库ID") + private Long storageId; + + /** + * 修改时间 + */ + @Schema(description = "修改时间") + private LocalDateTime updateTime; +} \ No newline at end of file diff --git a/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/service/FileService.java b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/service/FileService.java new file mode 100644 index 000000000..7df686562 --- /dev/null +++ b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/service/FileService.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package top.charles7c.continew.admin.system.service; + +import top.charles7c.continew.admin.system.model.query.FileQuery; +import top.charles7c.continew.admin.system.model.req.FileReq; +import top.charles7c.continew.admin.system.model.resp.FileDetailResp; +import top.charles7c.continew.admin.system.model.resp.FileResp; +import top.charles7c.continew.starter.extension.crud.base.BaseService; + +/** + * 文件业务接口 + * + * @author Charles7c + * @since 2023/12/23 10:38 + */ +public interface FileService extends BaseService {} \ No newline at end of file diff --git a/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/service/impl/FileServiceImpl.java b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/service/impl/FileServiceImpl.java new file mode 100644 index 000000000..7bc9f4117 --- /dev/null +++ b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/service/impl/FileServiceImpl.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package top.charles7c.continew.admin.system.service.impl; + +import lombok.RequiredArgsConstructor; + +import org.springframework.stereotype.Service; + +import top.charles7c.continew.admin.system.mapper.FileMapper; +import top.charles7c.continew.admin.system.model.entity.FileDO; +import top.charles7c.continew.admin.system.model.query.FileQuery; +import top.charles7c.continew.admin.system.model.req.FileReq; +import top.charles7c.continew.admin.system.model.resp.FileDetailResp; +import top.charles7c.continew.admin.system.model.resp.FileResp; +import top.charles7c.continew.admin.system.service.FileService; +import top.charles7c.continew.starter.extension.crud.base.BaseServiceImpl; + +/** + * 文件业务实现 + * + * @author Charles7c + * @since 2023/12/23 10:38 + */ +@Service +@RequiredArgsConstructor +public class FileServiceImpl extends BaseServiceImpl + implements FileService {} \ No newline at end of file diff --git a/continew-admin-ui/src/api/system/file.ts b/continew-admin-ui/src/api/system/file.ts index 9d9b41b8f..0daf502cc 100644 --- a/continew-admin-ui/src/api/system/file.ts +++ b/continew-admin-ui/src/api/system/file.ts @@ -1,24 +1,56 @@ import axios from 'axios'; +import qs from 'query-string'; const BASE_URL = '/system/file'; export interface FileItem { - id: string - type: string - name: string - extendName: string - src: string | null - updateTime: string - isDir: boolean - filePath: string - [propName: string]: any // 一个 interface 中任意属性只能有一个 + id: string; + name: string; + size: number; + url: string; + extension: string; + mimeType?: string; + type?: string; + storageId?: string; + createUser?: string; + createTime?: string; + updateUser?: string; + updateTime: string; + createUserString?: string; + updateUserString?: string; } -interface PageRes { - records: T; +export interface ListParam { + name?: string; + type?: string; + updateTime?: string; + page?: number; + size?: number; + sort?: Array; +} + +export interface PageRes { total: number; + list: T; +} + +export function list(params: ListParam) { + return axios.get>(`${BASE_URL}`, { + params, + paramsSerializer: (obj) => { + return qs.stringify(obj); + }, + }); +} + +export function get(id: string) { + return axios.get(`${BASE_URL}/${id}`); +} + +export function update(req: FileItem, id: string) { + return axios.put(`${BASE_URL}/${id}`, req); } -export function getFileList() { - return axios.get>(`${BASE_URL}/file`); +export function del(ids: string | Array) { + return axios.delete(`${BASE_URL}/${ids}`); } diff --git a/continew-admin-ui/src/assets/icons/svg/menu-about.svg b/continew-admin-ui/src/assets/icons/svg/menu-about.svg new file mode 100644 index 000000000..424adadea --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-about.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-chart.svg b/continew-admin-ui/src/assets/icons/svg/menu-chart.svg new file mode 100644 index 000000000..2a6cb928c --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-chart.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-data.svg b/continew-admin-ui/src/assets/icons/svg/menu-data.svg new file mode 100644 index 000000000..a55d0866e --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-data.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-delete.svg b/continew-admin-ui/src/assets/icons/svg/menu-delete.svg new file mode 100644 index 000000000..9a2e277ee --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-delete.svg @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-detail.svg b/continew-admin-ui/src/assets/icons/svg/menu-detail.svg new file mode 100644 index 000000000..3b50683b6 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-detail.svg @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-download.svg b/continew-admin-ui/src/assets/icons/svg/menu-download.svg new file mode 100644 index 000000000..a473c633d --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-download.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-edit.svg b/continew-admin-ui/src/assets/icons/svg/menu-edit.svg new file mode 100644 index 000000000..9f5d103b6 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-edit.svg @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-error.svg b/continew-admin-ui/src/assets/icons/svg/menu-error.svg new file mode 100644 index 000000000..b078659e0 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-error.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-example.svg b/continew-admin-ui/src/assets/icons/svg/menu-example.svg new file mode 100644 index 000000000..e6336ca94 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-example.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-form.svg b/continew-admin-ui/src/assets/icons/svg/menu-form.svg new file mode 100644 index 000000000..e9c9065f0 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-form.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-gitee.svg b/continew-admin-ui/src/assets/icons/svg/menu-gitee.svg new file mode 100644 index 000000000..0e55b981d --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-gitee.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-home.svg b/continew-admin-ui/src/assets/icons/svg/menu-home.svg new file mode 100644 index 000000000..97ff012a0 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-home.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-move.svg b/continew-admin-ui/src/assets/icons/svg/menu-move.svg new file mode 100644 index 000000000..30583b1f6 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-move.svg @@ -0,0 +1,15 @@ + + + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-nav.svg b/continew-admin-ui/src/assets/icons/svg/menu-nav.svg new file mode 100644 index 000000000..51909da63 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-nav.svg @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-result.svg b/continew-admin-ui/src/assets/icons/svg/menu-result.svg new file mode 100644 index 000000000..186d90db4 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-result.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-system.svg b/continew-admin-ui/src/assets/icons/svg/menu-system.svg new file mode 100644 index 000000000..7d220b308 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-system.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-table.svg b/continew-admin-ui/src/assets/icons/svg/menu-table.svg new file mode 100644 index 000000000..404a0f69d --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-table.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-test.svg b/continew-admin-ui/src/assets/icons/svg/menu-test.svg new file mode 100644 index 000000000..5fe46944f --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-test.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-user.svg b/continew-admin-ui/src/assets/icons/svg/menu-user.svg new file mode 100644 index 000000000..c4275100f --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-user.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/menu-zip.svg b/continew-admin-ui/src/assets/icons/svg/menu-zip.svg new file mode 100644 index 000000000..711617734 --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/menu-zip.svg @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/continew-admin-ui/src/assets/icons/svg/minus-square.svg b/continew-admin-ui/src/assets/icons/svg/minus-square.svg new file mode 100644 index 000000000..69b62ae8c --- /dev/null +++ b/continew-admin-ui/src/assets/icons/svg/minus-square.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/continew-admin-ui/src/components/gi-option-item/index.vue b/continew-admin-ui/src/components/gi-option-item/index.vue new file mode 100644 index 000000000..fbd12db6d --- /dev/null +++ b/continew-admin-ui/src/components/gi-option-item/index.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/continew-admin-ui/src/components/gi-option/index.vue b/continew-admin-ui/src/components/gi-option/index.vue new file mode 100644 index 000000000..85cf36014 --- /dev/null +++ b/continew-admin-ui/src/components/gi-option/index.vue @@ -0,0 +1,20 @@ + + + + + diff --git a/continew-admin-ui/src/constant/file.ts b/continew-admin-ui/src/constant/file.ts index cd35602a3..c5a0b0148 100644 --- a/continew-admin-ui/src/constant/file.ts +++ b/continew-admin-ui/src/constant/file.ts @@ -1,24 +1,24 @@ /** @desc 文件模块-映射 */ export interface fileTypeListItem { - name: string - value: number - menuIcon: string - icon: string + name: string; + value: number; + menuIcon: string; + icon: string; } // 文件分类 export const fileTypeList: fileTypeListItem[] = [ { name: '全部', value: 0, menuIcon: 'menu-file', icon: 'icon-stamp' }, - { name: '图片', value: 1, menuIcon: 'file-image', icon: 'icon-file-image' }, - { name: '文档', value: 2, menuIcon: 'file-txt', icon: 'icon-file' }, - { name: '视频', value: 3, menuIcon: 'file-video', icon: 'icon-video-camera' }, - { name: '音频', value: 4, menuIcon: 'file-music', icon: 'icon-file-audio' }, - { name: '其他', value: 5, menuIcon: 'file-other', icon: 'icon-bulb' } -] + { name: '图片', value: 2, menuIcon: 'file-image', icon: 'icon-file-image' }, + { name: '文档', value: 3, menuIcon: 'file-txt', icon: 'icon-file' }, + { name: '视频', value: 4, menuIcon: 'file-video', icon: 'icon-video-camera' }, + { name: '音频', value: 5, menuIcon: 'file-music', icon: 'icon-file-audio' }, + { name: '其他', value: 1, menuIcon: 'file-other', icon: 'icon-bulb' }, +]; export interface FileExtendNameIconMap { - [key: string]: string + [key: string]: string; } // 文件类型图标 Map 映射 @@ -37,11 +37,11 @@ export const fileExtendNameIconMap: FileExtendNameIconMap = { html: 'file-html', css: 'file-css', js: 'file-js', - other: 'file-other' // 未知文件 -} + other: 'file-other', // 未知文件 +}; // 图片类型 -export const imageTypeList = ['jpg', 'png', 'gif', 'jpeg'] +export const imageTypeList = ['jpg', 'png', 'gif', 'jpeg']; // WPS、Office文件类型 -export const officeFileType = ['ppt', 'pptx', 'doc', 'docx', 'xls', 'xlsx'] +export const officeFileType = ['ppt', 'pptx', 'doc', 'docx', 'xls', 'xlsx']; diff --git a/continew-admin-ui/src/views/system/file/components/FileMoveModal/index.vue b/continew-admin-ui/src/views/system/file/components/FileMoveModal/index.vue deleted file mode 100644 index fbdd56ae9..000000000 --- a/continew-admin-ui/src/views/system/file/components/FileMoveModal/index.vue +++ /dev/null @@ -1,176 +0,0 @@ - - - - - diff --git a/continew-admin-ui/src/views/system/file/components/FileRenameModal/index.vue b/continew-admin-ui/src/views/system/file/components/FileRenameModal/index.vue index 571897b0d..ae58111c3 100644 --- a/continew-admin-ui/src/views/system/file/components/FileRenameModal/index.vue +++ b/continew-admin-ui/src/views/system/file/components/FileRenameModal/index.vue @@ -57,11 +57,10 @@ // 模拟接口 const saveApi = (): Promise => { return new Promise((resolve) => { - setTimeout(() => { - resolve(true); - }, 2000) - } - ); + setTimeout(() => { + resolve(true); + }, 2000); + }); }; const FormRef = ref(null); diff --git a/continew-admin-ui/src/views/system/file/components/PreviewAudioModal/index.vue b/continew-admin-ui/src/views/system/file/components/PreviewAudioModal/index.vue index 809a11a81..bcfd92667 100644 --- a/continew-admin-ui/src/views/system/file/components/PreviewAudioModal/index.vue +++ b/continew-admin-ui/src/views/system/file/components/PreviewAudioModal/index.vue @@ -11,7 +11,7 @@
{{ props.fileInfo?.name }}.{{ props.fileInfo?.extendName }}{{ props.fileInfo?.name }}.{{ props.fileInfo?.extension }}
@@ -42,7 +42,7 @@ const audioHeadRef = ref(null); const audioSrc = computed(() => { - return props.fileInfo?.src || ''; + return props.fileInfo?.url || ''; }); onMounted(() => { diff --git a/continew-admin-ui/src/views/system/file/components/PreviewVideoModal/index.vue b/continew-admin-ui/src/views/system/file/components/PreviewVideoModal/index.vue index 1184479e6..646bcb118 100644 --- a/continew-admin-ui/src/views/system/file/components/PreviewVideoModal/index.vue +++ b/continew-admin-ui/src/views/system/file/components/PreviewVideoModal/index.vue @@ -29,7 +29,7 @@ // eslint-disable-next-line no-new new Player({ id: 'videoId', - url: props.fileInfo?.src || '', + url: props.fileInfo?.url || '', lang: 'zh-cn', autoplay: true, closeVideoClick: true, diff --git a/continew-admin-ui/src/views/system/file/components/index.ts b/continew-admin-ui/src/views/system/file/components/index.ts index 003355381..be82d8289 100644 --- a/continew-admin-ui/src/views/system/file/components/index.ts +++ b/continew-admin-ui/src/views/system/file/components/index.ts @@ -4,7 +4,6 @@ import ArcoVueIcon from '@arco-design/web-vue/es/icon'; import ArcoVue from '@arco-design/web-vue'; import { FileItem } from '@/api/system/file'; -import FileMoveModal from './FileMoveModal/index.vue'; import FileRenameModal from './FileRenameModal/index.vue'; import PreviewVideoModal from './PreviewVideoModal/index.vue'; import PreviewAudioModal from './PreviewAudioModal/index.vue'; @@ -37,11 +36,6 @@ function createModal void }>( type TFileOptions = { fileInfo: FileItem; callback?: () => void }; -/** 打开 文件移动 弹窗 */ -export function openFileMoveModal(fileItem: FileItem) { - return createModal(FileMoveModal, { fileInfo: fileItem }); -} - /** 打开 文件重命名 弹窗 */ export function openFileRenameModal(fileItem: FileItem) { return createModal(FileRenameModal, { fileInfo: fileItem }); diff --git a/continew-admin-ui/src/views/system/file/detail/index.vue b/continew-admin-ui/src/views/system/file/detail/index.vue deleted file mode 100644 index 6c2cdce57..000000000 --- a/continew-admin-ui/src/views/system/file/detail/index.vue +++ /dev/null @@ -1,138 +0,0 @@ - - - - - diff --git a/continew-admin-ui/src/views/system/file/index.vue b/continew-admin-ui/src/views/system/file/index.vue index 20ac5add0..e7554b9f9 100644 --- a/continew-admin-ui/src/views/system/file/index.vue +++ b/continew-admin-ui/src/views/system/file/index.vue @@ -1,30 +1,33 @@ diff --git a/continew-admin-ui/src/views/system/file/main/FileAside.vue b/continew-admin-ui/src/views/system/file/main/FileAside.vue index dbe8ed0ad..729742f12 100644 --- a/continew-admin-ui/src/views/system/file/main/FileAside.vue +++ b/continew-admin-ui/src/views/system/file/main/FileAside.vue @@ -14,6 +14,7 @@