Procházet zdrojové kódy

qhse体系文件优化

yanghao před 1 měsícem
rodič
revize
e0af49c046
2 změnil soubory, kde provedl 8 přidání a 3 odebrání
  1. 1 1
      .env.local
  2. 7 2
      src/views/pms/qhse/data/index.vue

+ 1 - 1
.env.local

@@ -4,7 +4,7 @@ NODE_ENV=development
 VITE_DEV=true
 
 # 请求路径  http://192.168.188.86:48080  https://iot.deepoil.cc:5443  http://172.26.0.56:48080  http://192.168.188.198:48080
-VITE_BASE_URL='https://iot.deepoil.cc:5443'
+VITE_BASE_URL='https://aims.deepoil.cc'
 
 # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
 VITE_UPLOAD_TYPE=server

+ 7 - 2
src/views/pms/qhse/data/index.vue

@@ -273,6 +273,11 @@ const rootDeptOriginId = ref<TreeKey | undefined>(undefined)
 const rootNodeName = ref('')
 const treeOriginIdMap = ref<Record<string, TreeKey | undefined>>({})
 
+const filterFileListMode = (rows: FileRow[] = []) => {
+  if (fileViewMode.value !== 'file') return rows
+  return rows.filter((row) => row.fileType === 'file')
+}
+
 const getCurrentListApi = () => {
   return fileViewMode.value === 'folder'
     ? DataLibraryApi.DataLibraryApi.getChildContentFile
@@ -317,7 +322,7 @@ const searchFolderAndFile = async () => {
   try {
     syncSelectedTreeOriginId()
     const data = await getCurrentListApi()(queryParams)
-    list.value = data
+    list.value = filterFileListMode(data)
   } finally {
     formLoading.value = false
     queryParams.filename = ''
@@ -574,7 +579,7 @@ const getList = async () => {
     syncSelectedTreeOriginId()
     const api = getCurrentListApi()
     const data = await api(queryParams)
-    list.value = data
+    list.value = filterFileListMode(data)
   } finally {
     formLoading.value = false
   }