-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
-
-
-
+
@@ -73,6 +97,7 @@ interface EditProps {
path: string;
name: string;
extension: string;
+ imageFiles: [];
}
const open = ref(false);
@@ -81,6 +106,7 @@ const filePath = ref('');
const fileName = ref('');
const fileType = ref('');
const fileUrl = ref('');
+const imageFiles = ref([]);
const fileExtension = ref('');
const isFullscreen = ref(false);
@@ -107,7 +133,15 @@ const toggleFullscreen = () => {
isFullscreen.value = !isFullscreen.value;
};
+const getDownloadUrl = (path: string) => {
+ const baseUrl = `${import.meta.env.VITE_API_URL as string}/files/download`;
+ const encodedPath = encodeURIComponent(path);
+ const timestamp = new Date().getTime();
+ return `${baseUrl}?path=${encodedPath}×tamp=${timestamp}`;
+};
+
const acceptParams = (props: EditProps) => {
+ imageFiles.value = [];
fileExtension.value = props.extension;
fileName.value = props.name;
filePath.value = props.path;
@@ -115,15 +149,22 @@ const acceptParams = (props: EditProps) => {
isFullscreen.value = fileType.value === 'excel';
loading.value = true;
- fileUrl.value = `${import.meta.env.VITE_API_URL as string}/files/download?path=${encodeURIComponent(
- props.path,
- )}×tamp=${new Date().getTime()}`;
+ fileUrl.value = getDownloadUrl(props.path);
+ imageFiles.value = props.imageFiles.map((item) => ({
+ path: item,
+ url: getDownloadUrl(item),
+ }));
open.value = true;
loading.value = false;
};
const onOpen = () => {};
+const changeImg = (path: string) => {
+ filePath.value = path;
+ fileUrl.value = getDownloadUrl(path);
+};
+
defineExpose({ acceptParams });
@@ -135,4 +176,16 @@ defineExpose({ acceptParams });
.dialog-header-icon {
color: var(--el-color-info);
}
+.left-aside {
+ background-color: var(--panel-menu-bg-color);
+ opacity: 85%;
+}
+.left-item {
+ &:hover {
+ background: var(--el-menu-item-bg-color-active) !important;
+ }
+}
+.left-item-default {
+ background: var(--el-menu-item-bg-color-active) !important;
+}