| 
					
				 | 
			
			
				@@ -266,10 +266,10 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </el-form> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <template #footer> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      <span class="dialog-footer"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <el-button @click="folderDialogVisible = false">取消</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <el-button type="primary" @click="submitFolderForm">确定</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <span class="dialog-footer"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-button @click="folderDialogVisible = false">取消</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-button type="primary" @click="submitFolderForm">确定</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </el-dialog> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -319,6 +319,8 @@ import dict from "@/utils/dict"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import {parseTime} from "@/utils/xzl"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import {updateFileStatus} from "@/api/system/file"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import {listDept} from "@/api/system/dept"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import {getUser, getUserProfile} from "@/api/system/user"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import dept from "@/views/system/dept/index.vue"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export default { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -384,6 +386,8 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 是否为新增文件夹操作 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       isAddFolder: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // 当前用户部门ID 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      userDeptId: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 表单参数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       form: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         fileId: null, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -475,6 +479,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.getList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.getFileTree(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.getDeptList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    this.getUserInfo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.getConfigKey("sys.user.initPassword").then(response => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.initPassword = response.msg; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -495,6 +500,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getFileTree() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       folderTreeSelectByDeptId().then(response => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.fileOptions = response.data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.log("获取到的文件夹树:", this.fileOptions); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 筛选节点 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -508,6 +514,11 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.selectedFolderId = data.id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.handleQuery(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+   getUserInfo() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+       getUserProfile().then(response => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.userDeptId = response.data.deptId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 文件状态修改 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleStatusChange(row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const text = row.status === "0" ? "启用" : "停用"; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -612,6 +623,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const formData = new FormData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       formData.append('file', file.raw); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       formData.append('folderId', this.selectedFolderId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      formData.append('deptId', this.userDeptId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.upload.isUploading = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const response = await addFile(formData); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -626,15 +638,6 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleTemplateDownload() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       downloadTemplate().then(blob => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.parseBlob(blob,'模板.doc'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        console.log(blob) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // const url = window.URL.createObjectURL(new Blob([blob])); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // const link = document.createElement('a'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // link.href = url; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // link.setAttribute('download', '模板.doc'); // 下载的文件名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // document.body.appendChild(link); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // link.click(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // link.remove(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // window.URL.revokeObjectURL(url); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 文件上传中处理 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -666,9 +669,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     async getDeptList() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const response = await listDept(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        console.log(response); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.deptOptions = response.data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        console.log(this.deptOptions); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } catch (error) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.$message.error('获取部门列表失败'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -680,7 +681,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.folderForm = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         parentId: data.id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         folderName: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        deptId: null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        deptId: this.userDeptId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.folderDialogVisible = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -727,13 +728,15 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         inputPattern: /.+/, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         inputErrorMessage: '文件夹名称不能为空' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }).then(({value}) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        updateFolder({folderId: data.id, folderName: value}).then(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        getFolder(data.id).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          const deptId = res.data.deptId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        updateFolder({folderId: data.id, folderName: value, deptId: deptId}).then(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.$modal.msgSuccess("修改成功"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.getFileTree(); // 刷新树 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 删除文件夹 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleDeleteFolder(data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$confirm(`是否确认删除文件夹 “${data.label}”?`, '提示', { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -761,11 +764,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               this.getList(); // 刷新文件列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }).catch(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.$message.info("已取消删除"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }).catch(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.$message.info("操作已取消"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleDelete() { 
			 |