-
+
-

+
+
{{title}}
-
![]()
+
-
+
@@ -295,7 +285,7 @@ $light_gray: #eee;
}
.login-container {
- background: url('../../assets/login/loginbg.jpg') no-repeat;
+ background: url('../../assets/login/beijing.jpg') no-repeat;
background-size: cover;
background-position: center center;
min-height: 100%;
diff --git a/web/src/views/login/木林森登录页面.vue b/web/src/views/login/木林森登录页面.vue
index c4947bc..a023300 100644
--- a/web/src/views/login/木林森登录页面.vue
+++ b/web/src/views/login/木林森登录页面.vue
@@ -287,7 +287,7 @@ $light_gray: #eee;
}
.login-container {
- background: url('../../assets/login/loginbg.jpg') no-repeat;
+ background: url('../../assets/login/beijing.jpg') no-repeat;
background-size: cover;
background-position: center center;
min-height: 100%;
diff --git a/web/src/views/special/document/index.vue b/web/src/views/special/document/index.vue
index fa58169..cdbc659 100644
--- a/web/src/views/special/document/index.vue
+++ b/web/src/views/special/document/index.vue
@@ -9,16 +9,12 @@ import { ref, onMounted, nextTick } from "vue";
import { useAppStore } from '@/store/modules/app';
import { ElMessageBox, ElMessage } from "element-plus";
import Page from '@/components/Pagination/page.vue';
-import { projectList, getNodesTree, addNodes, updateNodes, deleteNodesById } from "@/api/document";
-import uploadFiles from '@/components/uploadFiles/index.vue'
-
-const handleSuccess = (file: any) => {
- console.log('上传成功:', file.name)
-}
-
-const handleError = ({ file, error }) => {
- console.error('上传失败:', file.name, error)
-}
+import { projectList, getNodesTree, addNodes, updateNodes, deleteNodesById,getFilesPage } from "@/api/document";
+import ZUpload from '@/components/file/ZUpload.vue'
+import useFileUpload from "@/components/file/file/useFileUpload";
+import useHeaderStorageList from "@/components/header/useHeaderStorageList";
+const { openUploadDialog, openUploadFolderDialog, uploadProgressInfoStatistics } = useFileUpload();
+const { currentStorageKey } = useHeaderStorageList();
onMounted(() => {
getProject()
});
@@ -71,8 +67,9 @@ function gettreedata() {
treeloading.value = false
})
}
+const pathid = ref()
function handleNodeClick(data: any, node: any) {
-
+ pathid.value = data.id
}
//子项目配置
const frame = ref(false)
@@ -210,7 +207,7 @@ const queryParams: any = ref({
name: ''
});
//定义表格数据
-const tableData: any = ref([{}, {}]);
+const tableData: any = ref([]);
const total = ref(0);
// 表格加载
const loading = ref(false)
@@ -221,12 +218,38 @@ function getdata() {
//上传组件
const upfile = ref(false)
function openFile() {
+ localStorage.setItem('filepath', findPathById(treedata.value,pathid.value));
upfile.value = true
}
function fileClose() {
upfile.value = false
}
-
+function findPathById(array:any, targetId:any) {
+ // 辅助函数,用于递归查找路径
+ function recursiveSearch(items:any, target:any, path:any) {
+ for (let item of items) {
+ // 将当前对象的name添加到路径中
+ let newPath = [...path, item.nodeName];
+
+ // 检查当前对象的id是否匹配目标id
+ if (item.id === target) {
+ return newPath.join('/'); // 找到匹配项,返回路径字符串
+ }
+
+ // 如果没有找到匹配项,继续检查children数组
+ if (item.children && item.children.length > 0) {
+ let result = recursiveSearch(item.children, target, newPath);
+ if (result) { // 如果在children中找到了匹配项,返回结果
+ return result;
+ }
+ }
+ }
+ return null; // 如果没有找到匹配项,返回null
+ }
+ // 从顶层数组开始搜索
+ let patharr = recursiveSearch(array, targetId, [])
+ return '/'+patharr; // 注意这里我们传入了一个空数组作为初始路径
+}
@@ -280,9 +303,10 @@ function fileClose() {
搜索