Browse Source

更新依赖

ZaiZai 1 year ago
parent
commit
a718f84226
45 changed files with 528 additions and 662 deletions
  1. 2 2
      package.json
  2. 2 2
      src/api/modules/api.js
  3. 9 9
      src/api/modules/archiveConfig/appraisal.js
  4. 6 6
      src/api/modules/archiveConfig/archiveConfig.js
  5. 16 16
      src/api/modules/archiveConfig/tuning.js
  6. 30 30
      src/api/modules/archiveFile/archiveFile.js
  7. 9 9
      src/api/modules/archiveFile/archiveFileAuto.js
  8. 5 5
      src/api/modules/backup/backupApi.js
  9. 3 3
      src/api/modules/custody/early.js
  10. 14 14
      src/api/modules/custody/testing.js
  11. 16 16
      src/api/modules/data-fill/division.js
  12. 26 26
      src/api/modules/data-fill/query.js
  13. 23 23
      src/api/modules/initial/initial.js
  14. 12 12
      src/api/modules/menu.js
  15. 12 12
      src/api/modules/oss.js
  16. 22 22
      src/api/modules/other-file/projectScanning.js
  17. 23 23
      src/api/modules/other.js
  18. 6 6
      src/api/modules/project.js
  19. 13 13
      src/api/modules/tasks/data.js
  20. 11 11
      src/api/modules/tasks/flow.js
  21. 9 9
      src/api/modules/tasks/message.js
  22. 14 14
      src/api/modules/transfer/inspects.js
  23. 10 10
      src/api/modules/transfer/write-conclusion.js
  24. 12 12
      src/api/modules/user.js
  25. 6 6
      src/api/modules/userInfo/index.js
  26. 3 3
      src/api/modules/using/bim.js
  27. 10 10
      src/api/modules/using/query.js
  28. 8 8
      src/api/modules/using/stats.js
  29. 0 23
      src/api/request/header.js
  30. 0 84
      src/api/request/httpApi.js
  31. 29 56
      src/api/request/index.js
  32. 23 8
      src/api/util/auth.js
  33. 9 9
      src/global/components/hc-report-modal/index.vue
  34. 3 3
      src/store/modules/user.js
  35. 5 5
      src/test/index.vue
  36. 0 15
      src/utils/tools.js
  37. 2 2
      src/views/file/collection.vue
  38. 30 29
      src/views/file/components/HcFileUpload.vue
  39. 31 30
      src/views/file/components/HcFileUpload1.vue
  40. 49 49
      src/views/file/components/HcFileUploadLarge.vue
  41. 2 2
      src/views/file/records.vue
  42. 0 2
      src/views/login/index.vue
  43. 3 3
      src/views/user/auth.vue
  44. 2 2
      src/views/user/index.vue
  45. 8 8
      yarn.lock

+ 2 - 2
package.json

@@ -18,7 +18,7 @@
         "dayjs": "^1.11.10",
         "echarts": "^5.5.0",
         "element-plus": "^2.6.1",
-        "hc-vue3-ui": "^3.4.0",
+        "hc-vue3-ui": "^3.4.6",
         "js-base64": "^3.7.7",
         "js-cookie": "^3.0.5",
         "js-fast-way": "^0.4.6",
@@ -46,7 +46,7 @@
         "eslint-plugin-vue": "^9.23.0",
         "mitt": "^3.0.1",
         "postcss": "^8.4.35",
-        "sass": "^1.71.1",
+        "sass": "^1.72.0",
         "tailwindcss": "3.4.1",
         "vite": "^4.5.0"
     }

+ 2 - 2
src/api/modules/api.js

@@ -1,2 +1,2 @@
-import {httpApi} from "../request/httpApi";
-export const appApi = (form) => httpApi(form, false);
+import { HcApi } from '../request/index'
+export const appApi = (form) => HcApi(form, false)

+ 9 - 9
src/api/modules/archiveConfig/appraisal.js

@@ -1,36 +1,36 @@
-import {httpApi} from "../../request/httpApi";
+import { HcApi } from '../../request/index'
 
 export default {
   // 分页档案鉴定
   async pageByAuthenticate(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archivesauto/pageByAuthenticate',
         method: 'get',
-        params: form
+        params: form,
     }, msg)
   },
   //获取立卷单位列表
   async getFilingUnitList(form, msg = true) {
-      return httpApi({
+      return HcApi({
           url: '/api/blade-archive/archivesauto/getFilingUnitList',
           method: 'get',
-          params: form
+          params: form,
       }, msg)
   },
     //获取档案销毁账户
     async getArchiveDestroyUser(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api//blade-archive/archivesauto/getArchiveDestroyUser',
             method: 'get',
-            params: form
+            params: form,
         }, msg)
     },
   //批量销毁
   async batchDestroyArchive(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archivesauto/batchDestroyArchive',
         method: 'get',
-        params: form
+        params: form,
     }, msg)
 },
 }

+ 6 - 6
src/api/modules/archiveConfig/archiveConfig.js

@@ -1,21 +1,21 @@
-import {httpApi} from "../../request/httpApi";
+import { HcApi } from '../../request/index'
 
 export default {
 
   async updateConfig(form, msg = true) {
-      return httpApi({
+      return HcApi({
         url: '/api/blade-archive/archiveProjectConfig/update',
         method: 'post',
-        data: form
-      }, msg);
+        data: form,
+      }, msg)
   },
 
   // 根据项目ID获取对应的档案配置信息
   async getConfigByProjectId(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archiveProjectConfig/getByProjectId',
         method: 'get',
-        params: form
+        params: form,
     }, msg)
   },
 

+ 16 - 16
src/api/modules/archiveConfig/tuning.js

@@ -1,9 +1,9 @@
-import { httpApi } from '../../request/httpApi'
+import { HcApi } from '../../request/index'
 
 export default {
   // 分页档案调整
   async pageByArchive(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archivesauto/page',
         method: 'get',
         params: form,
@@ -11,7 +11,7 @@ export default {
   },
   //根据档案获取文件
   async getarchiveFilePage(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveFile/page',
             method: 'post',
             params: form,
@@ -19,7 +19,7 @@ export default {
  },
  //锁定案卷
  async archivesautoLock(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archivesauto/lock',
         method: 'post',
         params: form,
@@ -27,7 +27,7 @@ export default {
 },
 //解锁案卷 /archivesauto/unlock
 async archivesautoUnLock(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archivesauto/unlock',
         method: 'post',
         params: form,
@@ -35,7 +35,7 @@ async archivesautoUnLock(form, msg = true) {
 },
 //预览案卷
 async printArchive(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archivesauto/printArchive',
         method: 'get',
         params: form,
@@ -43,7 +43,7 @@ async printArchive(form, msg = true) {
   },
   //删除案卷里的文件案卷里删除文件/
   async removeFiles(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archivesauto/removeFiles',
         method: 'post',
         params: form,
@@ -51,7 +51,7 @@ async printArchive(form, msg = true) {
   },
 //案卷迁移/archivesauto/move
     async moveArchive(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archivesauto/move',
         method: 'post',
         params: form,
@@ -59,7 +59,7 @@ async printArchive(form, msg = true) {
   },
 //拆卷/archivesauto/split
 async splitArchive(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archivesauto/split',
         method: 'post',
         params: form,
@@ -67,7 +67,7 @@ async splitArchive(form, msg = true) {
   },
   //立即更新立卷/blade-archive/archivesauto/archiveAutoMethod
   async archiveAutoMethod(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archivesauto/archiveAutoMethod',
         method: 'post',
         params: form,
@@ -75,7 +75,7 @@ async splitArchive(form, msg = true) {
   },
   //更新立卷进度接口
   async archiveAutoPercentComplete(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archivesauto/archiveAutoPercentComplete',
         method: 'post',
         params: form,
@@ -83,7 +83,7 @@ async splitArchive(form, msg = true) {
   },
     //档案整理
     async refreshFileNumber(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/refreshFileNumber',
             method: 'post',
             params: form,
@@ -91,7 +91,7 @@ async splitArchive(form, msg = true) {
     },
     //编辑卷内文件/
     async archiveFileBatchUpdate(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveFile/batchUpdate',
             method: 'post',
             data: form,
@@ -99,7 +99,7 @@ async splitArchive(form, msg = true) {
     },
     //获取文件元数据信息/
     async getMetadataFileByid(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveFile/getMetadataFile',
             method: 'get',
             params: form,
@@ -107,7 +107,7 @@ async splitArchive(form, msg = true) {
     },
     //获取案卷元数据信息
     async getArchivesAutoView(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/getArchivesAutoView',
             method: 'post',
             params: form,
@@ -115,7 +115,7 @@ async splitArchive(form, msg = true) {
     },
     //编辑元数据信息/archiveFile/updateMetadata
     async updateMetadata(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveFile/updateMetadata',
             method: 'post',
             data: form,

+ 30 - 30
src/api/modules/archiveFile/archiveFile.js

@@ -1,100 +1,100 @@
-import {httpApi} from "../../request/httpApi";
+import { HcApi } from '../../request/index'
 
 export default {
     //分页
     async getarchiveFilePage(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveFile/page',
             method: 'post',
-            params: form
-        }, msg);
+            params: form,
+        }, msg)
     },
 
     //批量新增
     async batchUploadSave(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveFile/batchSave',
             method: 'post',
-            data: form
+            data: form,
         }, msg)
     },
 
     //批量修改
     async batchUpdateSort(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveFile/batchUpdateSort',
             method: 'post',
-            data: form
+            data: form,
         }, msg)
     },
 
     //获取未分盒的文件列表
     async pageByBoxName(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveFile/pageByBoxName',
             method: 'post',
-            params: form
-        }, msg);
+            params: form,
+        }, msg)
     },
 
     //获取已有盒号和案卷名
     async getBoxNameAndBoxNumber(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveFile/getBoxNameAndBoxNumber',
             method: 'post',
-            params: form
-        }, msg);
+            params: form,
+        }, msg)
     },
 
     //设置分盒
     async allocation(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveFile/allocation',
             method: 'post',
-            data: form
+            data: form,
         }, msg)
     },
 
     //检测案卷名是否重复
     async getIsBoxName(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveFile/getIsBoxName',
             method: 'post',
-            params: form
-        }, msg);
+            params: form,
+        }, msg)
     },
 
     //跨目录移动
     async migrateFile(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveFile/migrateFile',
             method: 'post',
-            params: form
-        }, msg);
+            params: form,
+        }, msg)
     },
 
     //文件收集删除接口
     async removeFile(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveFile/remove',
             method: 'post',
-            params: form
-        }, msg);
+            params: form,
+        }, msg)
     },
       //分盒整理删除接口
     async removeAllocation(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveFile/removeAllocation',
             method: 'post',
-            params: form
-        }, msg);
+            params: form,
+        }, msg)
     },
     //获取责任者
     async getDutyUser(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveFile/getDutyUser',
             method: 'get',
-            params: form
+            params: form,
         }, msg)
       },
 }

+ 9 - 9
src/api/modules/archiveFile/archiveFileAuto.js

@@ -1,9 +1,9 @@
-import { httpApi } from '../../request/httpApi'
+import { HcApi } from '../../request/index'
 
 export default {
   //分页
   async getarchiveFilePage(form, msg = true) {
-      return httpApi({
+      return HcApi({
           url: '/api/blade-archive/archiveFileAuto/page',
           method: 'post',
           params: form,
@@ -12,7 +12,7 @@ export default {
 
   //批量新增
   async batchUploadSave(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archiveFileAuto/batchSave',
         method: 'post',
         data: form,
@@ -21,7 +21,7 @@ export default {
 
     //批量修改
     async batchUpdateSort(form, msg = true) {
-      return httpApi({
+      return HcApi({
           url: '/api/blade-archive/archiveFileAuto/batchSortSave',
           method: 'post',
           data: form,
@@ -29,7 +29,7 @@ export default {
   },
   //跨目录移动
   async migrateFile(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archiveFileAuto/migrateFile',
         method: 'post',
         params: form,
@@ -38,7 +38,7 @@ export default {
 
   //批量下载
   async batchDownloadFileToZip(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archiveFileAuto/batchDownloadFileToZip',
         method: 'post',
         params: form,
@@ -48,7 +48,7 @@ export default {
 
   //删除
   async remove(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archiveFileAuto/remove',
         method: 'post',
         params: form,
@@ -57,11 +57,11 @@ export default {
 
   //获取pdf
   async mergePdf(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archiveFileAuto/mergePdf',
         method: 'post',
         params: form,
     }, msg)
   },
 
-}
+}

+ 5 - 5
src/api/modules/backup/backupApi.js

@@ -1,22 +1,22 @@
-import {httpApi} from "../../request/httpApi";
+import { HcApi } from '../../request/index'
 
 export default {
   //下载脱机载体工具
   async DownloadVersionInfo(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archiveOfflineVersionInfo/getVersionInfo',
         method: 'get',
         params: form,
-    }, msg);
+    }, msg)
   },
   //打包最新数据
   async getpackData(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archiveOfflineVersionInfo/packData',
         method: 'get',
         params: form,
 
-    }, msg);
+    }, msg)
   },
 
 }

+ 3 - 3
src/api/modules/custody/early.js

@@ -1,12 +1,12 @@
-import { httpApi } from '../../request/httpApi'
+import { HcApi } from '../../request/index'
 
 export default {
   //档案预警-分页查询(需要整改的文件)
   async warningPage(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archivesauto/warningPage',
         method: 'post',
         data: form,
     }, msg)
 },
-}
+}

+ 14 - 14
src/api/modules/custody/testing.js

@@ -1,40 +1,40 @@
-import {httpApi} from "../../request/httpApi";
+import { HcApi } from '../../request/index'
 
 export default {
   //获取历史报告
 async getReportList(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archiveExaminingReport/getList',
         method: 'get',
         params: form,
-      
-    }, msg);
+
+    }, msg)
   },
   //一键检测
   async getExamining(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archiveExaminingReport/getExamining',
         method: 'get',
         params: form,
-      
-    }, msg);
+
+    }, msg)
   },
   //获取检测报告状态
   async getReportStatus(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archiveExaminingReport/getReportStatus',
         method: 'get',
         params: form,
-      
-    }, msg);
+
+    }, msg)
   },
   // 获取当前正在检测的报告信息/blade-archive/archiveExaminingReport/getCurrentExaminingInfo
   async getCurrentExaminingInfo(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archiveExaminingReport/getCurrentExaminingInfo',
         method: 'get',
         params: form,
-      
-    }, msg);
+
+    }, msg)
   },
-}
+}

+ 16 - 16
src/api/modules/data-fill/division.js

@@ -1,44 +1,44 @@
-import {httpApi} from "../../request/httpApi";
+import { HcApi } from '../../request/index'
 
 export default {
     //获取关联的合同段树
     async getContractInfoTree(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-manager/contractInfo/tree2',
             method: 'get',
-            params: form
-        },msg);
+            params: form,
+        }, msg)
     },
     //未识别合同段划分节点 手动关联
     async setImportRelation(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-manager/wbsTreeContract/import-relation',
             method: 'post',
-            data: form
-        },msg);
+            data: form,
+        }, msg)
     },
     //标记/取消隐蔽工程节点
     async concealedWorksNnode(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-manager/wbsTreeContract/concealed-works-node',
             method: 'get',
-            params: form
-        },msg);
+            params: form,
+        }, msg)
     },
     //项目级懒加载节点树形结构-表单类型划分树
     async tabTypeLazyTree(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-manager/wbsPrivate/tab-Type-lazy-tree',
             method: 'get',
-            params: form
-        },msg);
+            params: form,
+        }, msg)
     },
     //添加合同段节点树
     async addWbsContractInfo(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-manager/wbsPrivate/add-wbs-contract-info',
             method: 'post',
-            params: form
-        },msg);
+            params: form,
+        }, msg)
     },
 }

+ 26 - 26
src/api/modules/data-fill/query.js

@@ -1,101 +1,101 @@
-import {httpApi} from "../../request/httpApi";
+import { HcApi } from '../../request/index'
 
 export default {
     //获取当前合同段的划分树
     async queryWbsTreeData(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/informationWriteQuery/queryContractWbsTreeByContractIdAndType',
             method: 'get',
-            params: form
-        }, msg);
+            params: form,
+        }, msg)
     },
     //根据合同段ID获取所有填报人
     async getFileUser(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/informationWriteQuery/getFileUserByContractId',
             method: 'get',
-            params: form
+            params: form,
         }, msg)
     },
     //获取当前合同段下所有的上报批次
     async getReportNumber(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/informationWriteQuery/getReportNumberByContractId',
             method: 'get',
-            params: form
+            params: form,
         }, msg)
     },
     //获取流程状态分类和文件类型分类
     async getDictBizClassify(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/informationWriteQuery/getDictBizClassifyByCode',
             method: 'get',
-            params: form
+            params: form,
         }, msg)
     },
     //分页数据
     async getPageData(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/informationWriteQuery/page',
             method: 'post',
-            data: form
+            data: form,
         }, msg)
     },
     //批量废除
     async batchAbolish(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/informationWriteQuery/batchAbolish',
             method: 'post',
-            params: form
+            params: form,
         }, msg)
     },
     //批量下载
     async batchDownloadFileToZip(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/informationWriteQuery/batchDownloadFileToZip',
             method: 'post',
             params: form,
-            responseType: 'blob'
+            responseType: 'blob',
         }, msg)
     },
     //批量打印
     async batchPrint(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/informationWriteQuery/batchPrint',
             method: 'post',
-            params: form
+            params: form,
         }, msg)
     },
     //本地验签
     async localVerify(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/informationWriteQuery/localVerify',
             method: 'post',
-            params: form
+            params: form,
         }, msg)
     },
     //在线验签
     async onlineVerify(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/informationWriteQuery/onlineVerify',
             method: 'post',
-            params: form
+            params: form,
         }, msg)
     },
     //输入框查询合同段树
     async searchContractTree(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/informationWriteQuery/searchContractTree',
             method: 'get',
-            params: form
+            params: form,
         }, msg)
     },
     //获取流程状态
     async getFirstTaskStatus(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/task/query-task-type-status?typeOrStatus=first_task_status',
             method: 'get',
-            params: form
+            params: form,
         }, msg)
     },
 }

+ 23 - 23
src/api/modules/initial/initial.js

@@ -1,9 +1,9 @@
-import { httpApi } from '../../request/httpApi'
+import { HcApi } from '../../request/index'
 
 export default {
     //验收申请-汇总目录
     async getAllUnitArchivesView(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/getAllUnitArchivesView',
             method: 'get',
             params: form,
@@ -11,7 +11,7 @@ export default {
     },
     //验收申请保存
     async saveApply(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/saveApply',
             method: 'post',
             data: form,
@@ -19,7 +19,7 @@ export default {
      },
      //查看申请状态
      async getApplyStatus(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/getApplyStatus',
             method: 'get',
             params: form,
@@ -27,7 +27,7 @@ export default {
     },
     //撤销申请
     async annulApply(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/annulApply',
             method: 'get',
             params: form,
@@ -35,7 +35,7 @@ export default {
     },
     //在线验收-根据单位显示档案
     async getUnitArchivesAutoView(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/getUnitArchivesAutoView',
             method: 'get',
             params: form,
@@ -43,7 +43,7 @@ export default {
     },
     //档案验收返回单位所有节点
     async getUnitAllNode(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-manager/archiveTreeContract/getUnitAllNode',
             method: 'get',
             params: form,
@@ -51,7 +51,7 @@ export default {
     },
     //档案在线验收-确认并进入抽检
     async saveAllSelectNodes(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-manager/archiveTreeContract/saveAllSelectNodes',
             method: 'post',
             data: form,
@@ -59,7 +59,7 @@ export default {
      },
     //档案在线验收-我验收的案卷
     async getlazyTree(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-manager/archiveTreeContract/lazyTree',
             method: 'get',
             params: form,
@@ -67,7 +67,7 @@ export default {
     },
     //档案在线验收-查询节点已经上报的档案
      async getNodeArchives(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/getNodeArchives',
             method: 'get',
             params: form,
@@ -75,7 +75,7 @@ export default {
     },
     //在线验收-抽检统计
       async userInspectStats(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/userInspectStats',
             method: 'get',
             params: form,
@@ -83,7 +83,7 @@ export default {
     },
       //在线验收-修改抽检状态
       async updateInspectStatus(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/updateInspectStatus',
             method: 'get',
             params: form,
@@ -91,7 +91,7 @@ export default {
     },
     //在线验收-保存抽检意见
     async saveInspect(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/saveInspect',
             method: 'post',
             data: form,
@@ -100,7 +100,7 @@ export default {
 
      //档案在线验收-开始抽检
      async startInspect(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-manager/archiveTreeContract/startInspect',
             method: 'get',
             params: form,
@@ -108,7 +108,7 @@ export default {
     },
     //在线验收-专家抽检记录
     async getUserInspectInfo(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/getUserInspectInfo',
             method: 'get',
             params: form,
@@ -116,7 +116,7 @@ export default {
     },
         //在线验收-抽检意见记录汇总:
         async getUserInspectInfo2(form, msg = true) {
-            return httpApi({
+            return HcApi({
                 url: '/api/blade-archive/archivesauto/getUserInspectInfo2',
                 method: 'get',
                 params: form,
@@ -124,7 +124,7 @@ export default {
         },
     //在线验收-项目抽检统计
     async projectInspectStat(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/projectInspectStat',
             method: 'get',
             params: form,
@@ -132,7 +132,7 @@ export default {
     },
     //在线验收-获取档案文件抽检意见
     async getArchiveFileOpinion(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/getArchiveFileOpinion',
             method: 'get',
             params: form,
@@ -140,7 +140,7 @@ export default {
     },
     //在线验收-获取报告
     async getArchiveConclusion(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/getArchiveConclusion',
             method: 'get',
             params: form,
@@ -148,7 +148,7 @@ export default {
     },
     //验收申请-历史验收报告
     async getHistoryTable(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveExpertConclusion/getHistoryTable',
             method: 'get',
             params: form,
@@ -156,7 +156,7 @@ export default {
     },
     //在线验收-预览
     async getAppPreview(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveExpertConclusion/getAppPreview',
             method: 'get',
             params: form,
@@ -164,7 +164,7 @@ export default {
     },
       //在线验收-查看验收报告
       async getTable(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveExpertConclusion/getTable',
             method: 'get',
             params: form,
@@ -172,7 +172,7 @@ export default {
     },
     //在线验收-获取当前期在线验收id
     async getCurrentId(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api//blade-archive/archiveExpertConclusion/getCurrentId',
             method: 'get',
             params: form,

+ 12 - 12
src/api/modules/menu.js

@@ -1,21 +1,21 @@
-import {httpApi} from "../request/httpApi";
-import website from "~src/config/index";
+import { HcApi } from '../request/index'
+import website from '~src/config/index'
 
-export const getRoutes = (msg = true) => httpApi({
+export const getRoutes = (msg = true) => HcApi({
   url: '/api/blade-system/menu/routes',
   method: 'get',
   params: {
-      sysType: website.clientId
-  }
-}, msg);
+      sysType: website.clientId,
+  },
+}, msg)
 
-export const getButtons = (msg = true) => httpApi({
+export const getButtons = (msg = true) => HcApi({
     url: '/api/blade-system/menu/buttons',
-    method: 'get'
-}, msg);
+    method: 'get',
+}, msg)
 
-export const getAazyList = (form, msg = true) => httpApi({
+export const getAazyList = (form, msg = true) => HcApi({
     url: '/api/blade-system/menu/lazy-list',
     method: 'get',
-    params: form
-}, msg);
+    params: form,
+}, msg)

+ 12 - 12
src/api/modules/oss.js

@@ -1,37 +1,37 @@
-import {httpApi} from "../request/httpApi";
+import { HcApi } from '../request/index'
 
 export default {
     //上传文件
     async putFile(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-resource/oss/endpoint/put-file',
             method: 'post',
             data: form,
-        }, msg);
+        }, msg)
     },
     //移除文件
     async removeFile(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-resource/oss/endpoint/remove-file',
             method: 'post',
-            params: form
-        }, msg);
+            params: form,
+        }, msg)
     },
     //上传文件
     async uploadFile(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-resource/oss/endpoint/upload-file',
             method: 'post',
-            data: form
-        }, msg);
+            data: form,
+        }, msg)
     },
 
     //上传文件分片
     async uploadChunk(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-resource/largeFile/endpoint/upload-file',
             method: 'post',
-            data: form
-        }, msg);
+            data: form,
+        }, msg)
     },
 }

+ 22 - 22
src/api/modules/other-file/projectScanning.js

@@ -1,69 +1,69 @@
-import {httpApi} from "../../request/httpApi";
+import { HcApi } from '../../request/index'
 
 export default {
     //获取归档划分树
     async getClassIfyList(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/archiveFile/tree',
             method: 'post',
-            params: form
-        }, msg);
+            params: form,
+        }, msg)
     },
     //分页
     async getarchiveFilePage(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/archiveFile/page',
             method: 'post',
-            params: form
-        }, msg);
+            params: form,
+        }, msg)
     },
     //批量新增
     async batchUploadSave(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/archiveFile/batchSave',
             method: 'post',
-            data: form
+            data: form,
         }, msg)
     },
     //逻辑删除
     async removeArchiveFile(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/archiveFile/remove',
             method: 'post',
-            params: form
-        }, msg);
+            params: form,
+        }, msg)
     },
     //批量编辑
     async batchEditSave(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/archiveFile/batchEdit',
             method: 'post',
-            data: form
-        }, msg);
+            data: form,
+        }, msg)
     },
     //批量废除
     async batchAbolishSave(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/archiveFile/batchAbolish',
             method: 'post',
-            params: form
-        }, msg);
+            params: form,
+        }, msg)
     },
     //批量下载
     async batchDownloadFileToZip(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/archiveFile/batchDownloadFileToZip',
             method: 'post',
             params: form,
-            responseType: 'blob'
+            responseType: 'blob',
         }, msg)
     },
     //批量认证
     async batchCertification(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/archiveFile/batchCertification',
             method: 'post',
-            data: form
+            data: form,
         }, msg)
     },
 }

+ 23 - 23
src/api/modules/other.js

@@ -1,77 +1,77 @@
-import { httpApi } from '../request/httpApi'
+import { HcApi } from '../request/index'
 
 //用户配置保存
-export const userConfigSave = (form, msg = true) => httpApi({
+export const userConfigSave = (form, msg = true) => HcApi({
     url: '/api/blade-business/defaultConfig/saveOrUpdate',
     method: 'post',
     data: form,
 }, msg)
 
 //用户配置详情
-export const userConfigInfo = (form, msg = true) => httpApi({
+export const userConfigInfo = (form, msg = true) => HcApi({
     url: '/api/blade-business/defaultConfig/detail',
     method: 'get',
     params: form,
 }, msg)
 
 //获取类型
-export const getDictionary = (form, msg = true) => httpApi({
+export const getDictionary = (form, msg = true) => HcApi({
     url: '/api/blade-system/dict/dictionary',
     method: 'get',
     params: form,
 }, msg)
 
 //获取用户列表
-export const getContractUserList = (form, msg = true) => httpApi({
+export const getContractUserList = (form, msg = true) => HcApi({
     url: '/api/blade-manager/contractInfo/get-contract-userList',
     method: 'get',
     params: form,
 }, msg)
 
 //获取档案的树
-export const getArchiveTreeLazyTree = (form, msg = true) => httpApi({
+export const getArchiveTreeLazyTree = (form, msg = true) => HcApi({
     url: '/api/blade-manager/archiveTreeContract/lazy-tree',
     method: 'get',
     params: form,
 }, msg)
 
 //初始化档案的树
-export const initTree = (form, msg = true) => httpApi({
+export const initTree = (form, msg = true) => HcApi({
     url: '/api/blade-manager/archiveTreeContract/initTree',
     method: 'post',
     params: form,
 }, msg)
 
 //删除
-export const remove = (form, msg = true) => httpApi({
+export const remove = (form, msg = true) => HcApi({
     url: '/api/blade-manager/archiveTreeContract/remove',
     method: 'post',
     params: form,
 }, msg)
 
 //新增
-export const archiveTreeSave = (form, msg = true) => httpApi({
+export const archiveTreeSave = (form, msg = true) => HcApi({
     url: '/api/blade-manager/archiveTreeContract/save',
     method: 'post',
     data: form,
 }, msg)
 
 //编辑
-export const archiveTreeDetail = (form, msg = true) => httpApi({
+export const archiveTreeDetail = (form, msg = true) => HcApi({
     url: '/api/blade-manager/archiveTreeContract/detail',
     method: 'get',
     params: form,
 }, msg)
 
 //更新
-export const archiveTreeUpdate = (form, msg = true) => httpApi({
+export const archiveTreeUpdate = (form, msg = true) => HcApi({
     url: '/api/blade-manager/archiveTreeContract/update',
     method: 'post',
     data: form,
 }, msg)
 
 //获取归档树同级节点
-export const getSameGradeNode = (form, msg = true) => httpApi({
+export const getSameGradeNode = (form, msg = true) => HcApi({
     url: '/api/blade-manager/archiveTreeContract/get-same-grade-node',
     method: 'post',
     params: form,
@@ -80,32 +80,32 @@ export const getSameGradeNode = (form, msg = true) => httpApi({
 
 
 //排序
-export const submitArchiveTreeSort = (form, msg = true) => httpApi({
+export const submitArchiveTreeSort = (form, msg = true) => HcApi({
     url: '/api/blade-manager/archiveTreeContract/submit-tree-sort',
     method: 'post',
     data: form,
 }, msg)
 
 //同步
-export const syncProjectTree = (form, msg = true) => httpApi({
+export const syncProjectTree = (form, msg = true) => HcApi({
     url: '/api/blade-manager/archiveTreeContract/syncProjectTree',
     method: 'post',
     params: form,
 }, msg)
 //文件同步
-export const syncFileTree = (form, msg = true) => httpApi({
+export const syncFileTree = (form, msg = true) => HcApi({
     url: '/api/blade-manager/archiveTreeContract/syncBusinessData',
     method: 'post',
     params: form,
 }, msg)
 //声像文件同步
-export const syncSoundImageData = (form, msg = true) => httpApi({
+export const syncSoundImageData = (form, msg = true) => HcApi({
     url: '/api/blade-manager/archiveTreeContract/syncSoundImageData',
     method: 'post',
     params: form,
 }, msg)
 //所属角色
-export const roletree = (form, msg = true) => httpApi({
+export const roletree = (form, msg = true) => HcApi({
     url: '/api/blade-system/role/tree',
       method: 'get',
       params: {
@@ -114,7 +114,7 @@ export const roletree = (form, msg = true) => httpApi({
 }, msg)
 
 //获取租户详情
-export const getTenantDetail = (id) => httpApi({
+export const getTenantDetail = (id) => HcApi({
     url: '/api/blade-system/tenant/detail',
     method: 'get',
     params: {
@@ -123,33 +123,33 @@ export const getTenantDetail = (id) => httpApi({
 }, true)
 
 //获取更新信息
-export const getVersionJson = () => httpApi({
+export const getVersionJson = () => HcApi({
     url: 'version.json?time=' + new Date().getTime(),
     method: 'get',
 }, false)
 
 //获取项目下的合同段信息
-export const getContractInfo = (form, msg = true) => httpApi({
+export const getContractInfo = (form, msg = true) => HcApi({
     url: '/api/blade-manager/contractInfo/get-contractInfo',
     method: 'get',
     params: form,
 }, msg)
 //短信验证
-export const sendNotice = (form, msg = true) => httpApi({
+export const sendNotice = (form, msg = true) => HcApi({
     url: '/api/blade-business/task/send-notice',
     method: 'post',
     params: form,
 }, msg)
 
 //短信过期时间
-export const saveSmsTimeout = (form, msg = true) => httpApi({
+export const saveSmsTimeout = (form, msg = true) => HcApi({
     url: '/api/blade-business/task/save-sms-timeout',
     method: 'get',
     params: form,
 }, msg)
 
 //获取脱机离线APP
-export const getLocalArchivesApp = () => httpApi({
+export const getLocalArchivesApp = () => HcApi({
     url: 'local-app.json?time=' + new Date().getTime(),
     method: 'get',
 }, false)

+ 6 - 6
src/api/modules/project.js

@@ -1,9 +1,9 @@
-import { httpApi } from '../request/httpApi'
+import { HcApi } from '../request/index'
 
 export default {
     //获取项目和合同段
     async getProjectAndContract() {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/userViewProjectContract/queryUserViewProjectAndContract',
             method: 'get',
             params: {},
@@ -11,7 +11,7 @@ export default {
     },
     //获取默认项目
     async getDefaultProject(form) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/defaultProject/queryUserDefault',
             method: 'get',
             params: form,
@@ -19,7 +19,7 @@ export default {
     },
     //获取项目详情
     async getProjectInfo(id) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-manager/projectInfo/detail',
             method: 'get',
             params: {
@@ -29,7 +29,7 @@ export default {
     },
     //获取合同段详情
     async getContractInfo(id) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-manager/contractInfo/detail',
             method: 'get',
             params: {
@@ -39,7 +39,7 @@ export default {
     },
     //设置默认项目
     async setDefaultProject(form) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/defaultProject/save',
             method: 'post',
             data: form,

+ 13 - 13
src/api/modules/tasks/data.js

@@ -1,9 +1,9 @@
-import { httpApi } from '../../request/httpApi'
+import { HcApi } from '../../request/index'
 
 export default {
     //获取任务类型或任务状态
     async queryTaskTypeStatus(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/task/query-task-type-status',
             method: 'get',
             params: form,
@@ -11,7 +11,7 @@ export default {
     },
     //获取当前合同段的上报批次
     async queryBatchList(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/task/query-batch-list',
             method: 'get',
             params: form,
@@ -19,7 +19,7 @@ export default {
     },
     //获取当前用户待办流程
     async queryUserToDoTaskList(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/task/user-to-do-task-list',
             method: 'get',
             params: form,
@@ -27,7 +27,7 @@ export default {
     },
     //审批页详情
     async queryApprovalParameter(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/task/query-approval-parameter',
             method: 'get',
             params: form,
@@ -35,7 +35,7 @@ export default {
     },
     //完成任务
     async saveCompleteApprovalTask(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/task/complete-approval-task',
             method: 'post',
             data: form,
@@ -43,7 +43,7 @@ export default {
     },
     //已办任务
     async queryUserDoneTaskList(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/task/query-user-done-task-list',
             method: 'get',
             params: form,
@@ -51,7 +51,7 @@ export default {
     },
     //批量审批
     async batchCompleteApprovalTask(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/task/batch-complete-approval-task',
             method: 'post',
             data: form,
@@ -59,7 +59,7 @@ export default {
     },
     //获取发起
     async queryUserStartFlow(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/task/query-user-start-flow',
             method: 'get',
             params: form,
@@ -68,7 +68,7 @@ export default {
     //批量页详情
     //获取档案审批任务对应业务数据的pdf信息
     async queryTaskInfo(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/task/getArchiveFileTaskPdfs',
             method: 'post',
             params: form,
@@ -76,7 +76,7 @@ export default {
     },
     //校验电签短信验证码
     async checkSmsCode(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/task/check-sms-code',
             method: 'post',
             data: form,
@@ -84,7 +84,7 @@ export default {
     },
     //获取任务列表分页
     async getTaskPage(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveTask/page',
             method: 'post',
             data: form,
@@ -92,7 +92,7 @@ export default {
     },
     //批量审批
     async batchApproval(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/task/batch-complete-approval-task-archive',
             method: 'post',
             data: form,

+ 11 - 11
src/api/modules/tasks/flow.js

@@ -1,9 +1,9 @@
-import { httpApi } from '../../request/httpApi'
+import { HcApi } from '../../request/index'
 
 export default {
     //分页数据
     async getPageData(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/fixedFlow/page',
             method: 'get',
             params: form,
@@ -11,7 +11,7 @@ export default {
     },
     //获取系统所有角色划分
     async queryAllRoleList(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/fixedFlow/queryAllRoleList',
             method: 'get',
             params: form,
@@ -19,7 +19,7 @@ export default {
     },
     //详情
     async queryFixedFlowDetail(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/fixedFlow/detail',
             method: 'get',
             params: form,
@@ -27,7 +27,7 @@ export default {
     },
     //新增
     async addFixedFlowData(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/fixedFlow/save',
             method: 'post',
             data: form,
@@ -35,7 +35,7 @@ export default {
     },
     //修改
     async updateFixedFlowData(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/fixedFlow/update',
             method: 'post',
             data: form,
@@ -43,7 +43,7 @@ export default {
     },
     //删除
     async removeFixedFlowData(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/fixedFlow/remove',
             method: 'post',
             params: form,
@@ -51,7 +51,7 @@ export default {
     },
     //检查任务人是否存在签字证书信息
     async checkTaskUserCertificateInfo(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveTask/checkTaskUserCertificateInfo',
             method: 'post',
             params: form,
@@ -59,7 +59,7 @@ export default {
     },
     //批量上报
     async batchReportTaskArchive(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/task/batch-report-task-archive',
             method: 'post',
             data: form,
@@ -67,7 +67,7 @@ export default {
     },
     //批量认证
     async batchCertification(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveTask/batchCertification',
             method: 'post',
             params: form,
@@ -75,7 +75,7 @@ export default {
     },
     //批量撤销 //数据类型,=1表示档案文件收集处的废除;=2时表示任务审批处的废除
     async batchRepealTaskArchive(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/task/batch-repeal-task-archive',
             method: 'post',
             data: form,

+ 9 - 9
src/api/modules/tasks/message.js

@@ -1,36 +1,36 @@
-import {httpApi} from "../../request/httpApi";
+import { HcApi } from '../../request/index'
 
 export default {
     //分页数据
     async getPageData(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/messageWarning/list',
             method: 'get',
-            params: form
+            params: form,
         }, msg)
     },
     //删除消息
     async removeData(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/messageWarning/remove',
             method: 'post',
-            params: form
+            params: form,
         }, msg)
     },
     //获取当前用户的消息数量
     async queryCurrentUserMessageCount(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/messageWarning/queryCurrentUserMessageCount',
             method: 'get',
-            params: form
+            params: form,
         }, msg)
     },
     //标记已读
     async setMessageWarningRead(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/messageWarning/setMessageWarningRead',
             method: 'post',
-            params: form
+            params: form,
         }, msg)
     },
 }

+ 14 - 14
src/api/modules/transfer/inspects.js

@@ -1,36 +1,36 @@
-import {httpApi} from "../../request/httpApi";
+import { HcApi } from '../../request/index'
 
 export default {
   //案卷设置成已查阅
   async setreview(form, msg = true) {
-      return httpApi({
+      return HcApi({
           url: '/api/blade-archive/archivesauto/review',
           method: 'post',
-          params: form
-      }, msg);
+          params: form,
+      }, msg)
   },
   //获取抽检意见
   async getOpinion(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveInspectionInfo/opinion',
             method: 'get',
-            params: form
-        }, msg);
+            params: form,
+        }, msg)
   },
   //新增抽检意见/archiveInspectionInfo/add
   async addOpinion(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archiveInspectionInfo/submit',
         method: 'post',
-        data: form
-    }, msg);
+        data: form,
+    }, msg)
  },
  //修改抽检意见
  async editOpinion(form, msg = true) {
-    return httpApi({
+    return HcApi({
         url: '/api/blade-archive/archiveInspectionInfo/submit',
         method: 'post',
-        params: form
-    }, msg);
+        params: form,
+    }, msg)
  },
-}
+}

+ 10 - 10
src/api/modules/transfer/write-conclusion.js

@@ -1,9 +1,9 @@
-import { httpApi } from '../../request/httpApi'
+import { HcApi } from '../../request/index'
 
 export default {
       //验收申请-是否生成打分表
       async creatScore(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveExpertConclusion/creatScore',
             method: 'get',
             params: form,
@@ -11,7 +11,7 @@ export default {
     },
     //验收申请-是否生成打分表
     async updateScore(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveExpertConclusion/updateScore',
             method: 'get',
             params: form,
@@ -19,7 +19,7 @@ export default {
     },
     //专家评分-根据单位获取打分项
     async getItemByUnit(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveExpertScore/getItemByUnit',
             method: 'get',
             params: form,
@@ -27,7 +27,7 @@ export default {
     },
       //专家评分-专家评分-编辑
       async updateExpertScore(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveExpertScore/update',
             method: 'post',
             data: form,
@@ -35,7 +35,7 @@ export default {
     },
     //在线验收-下一步编写报告,校验
     async checkTable(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveExpertConclusion/checkTable',
             method: 'get',
             params: form,
@@ -43,7 +43,7 @@ export default {
     },
    //在线验收-确认提交权限
    async checkSubmit(form, msg = true) {
-    return httpApi({
+    return HcApi({
             url: '/api/blade-archive/archiveExpertConclusion/checkSubmit',
             method: 'get',
             params: form,
@@ -51,7 +51,7 @@ export default {
     },
      //在线验收-暂存草稿
    async saveTable(form, msg = true) {
-    return httpApi({
+    return HcApi({
             url: '/api/blade-archive/archiveExpertConclusion/saveTable',
             method: 'post',
             data: form,
@@ -59,7 +59,7 @@ export default {
     },
      //在线验收-确认提交
    async submitTable(form, msg = true) {
-    return httpApi({
+    return HcApi({
             url: '/api/blade-archive/archiveExpertConclusion/submitTable',
             method: 'post',
             data: form,
@@ -67,7 +67,7 @@ export default {
     },
     //编写结论-测回提交
     async repealTable(form, msg = true) {
-        return httpApi({
+        return HcApi({
                 url: '/api/blade-archive/archiveExpertConclusion/repealTable',
                 method: 'get',
                 params: form,

+ 12 - 12
src/api/modules/user.js

@@ -1,8 +1,8 @@
-import { httpApi } from '../request/httpApi'
+import { HcApi } from '../request/index'
 import website from '~src/config/index'
 import md5 from 'js-md5'
 
-export const userLogin = ({ tenantId, deptId, roleId, username, password, type, key, code }, msg = false) => httpApi({
+export const userLogin = ({ tenantId, deptId, roleId, username, password, type, key, code }, msg = false) => HcApi({
     url: '/api/blade-auth/oauth/token',
     method: 'post',
     headers: {
@@ -22,7 +22,7 @@ export const userLogin = ({ tenantId, deptId, roleId, username, password, type,
     },
 }, msg)
 
-export const refreshToken = (refresh_token, tenantId, deptId, roleId, msg = true) => httpApi({
+export const refreshToken = (refresh_token, tenantId, deptId, roleId, msg = true) => HcApi({
     url: '/api/blade-auth/oauth/token',
     method: 'post',
     headers: {
@@ -38,12 +38,12 @@ export const refreshToken = (refresh_token, tenantId, deptId, roleId, msg = true
     },
 }, msg)
 
-export const logout = (msg = true) => httpApi({
+export const logout = (msg = true) => HcApi({
     url: '/api/blade-auth/oauth/logout',
     method: 'get',
 }, msg)
 
-export const registerGuest = (form, oauthId, msg = true) => httpApi({
+export const registerGuest = (form, oauthId, msg = true) => HcApi({
     url: '/api/blade-user/register-guest',
     method: 'post',
     params: {
@@ -55,40 +55,40 @@ export const registerGuest = (form, oauthId, msg = true) => httpApi({
     },
 }, msg)
 
-export const getProjectAndContract = (msg = true) => httpApi({
+export const getProjectAndContract = (msg = true) => HcApi({
     url: '/api/blade-business/userViewProjectContract/queryUserViewProjectAndContract',
     method: 'get',
 }, msg)
 
-export const getCaptcha = (msg = true) => httpApi({
+export const getCaptcha = (msg = true) => HcApi({
     url: '/api/blade-auth/oauth/captcha',
     method: 'get',
 }, msg)
 
-export const getUserInfo = (msg = true) => httpApi({
+export const getUserInfo = (msg = true) => HcApi({
     url: '/api/blade-auth/oauth/user-info',
     method: 'get',
 }, msg)
 
-export const sendLogs = (list, msg = true) => httpApi({
+export const sendLogs = (list, msg = true) => HcApi({
     url: '/api/blade-auth/oauth/logout',
     method: 'post',
     data: list,
 }, msg)
 
-export const clearCache = (msg = true) => httpApi({
+export const clearCache = (msg = true) => HcApi({
     url: '/api/blade-auth/oauth/clear-cache',
     method: 'get',
 }, msg)
 
-export const loginByToken = (form, msg = true) => httpApi({
+export const loginByToken = (form, msg = true) => HcApi({
     url: '/api/blade-user/loginByToken',
     method: 'post',
     params: form,
 }, msg)
 
 //获取租户ID
-export const getTenantID = (domain, msg = true) => httpApi({
+export const getTenantID = (domain, msg = true) => HcApi({
     url: '/api/blade-system/tenant/info',
     method: 'get',
     params: {

+ 6 - 6
src/api/modules/userInfo/index.js

@@ -1,9 +1,9 @@
-import { httpApi } from '../../request/httpApi'
+import { HcApi } from '../../request/index'
 
 export default {
     //修改密码
     async updatePassword(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-user/update-password',
             method: 'post',
             params: form,
@@ -11,7 +11,7 @@ export default {
     },
     //设置默认项目
     async setDefaultProject(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/defaultProject/save',
             method: 'post',
             data: form,
@@ -19,7 +19,7 @@ export default {
     },
     //获取默认项目
     async getDefaultProject(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/defaultProject/queryUserDefault',
             method: 'get',
             params: form,
@@ -27,7 +27,7 @@ export default {
     },
     //更新用户信息
     async updateUserInfo(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-user/update-info',
             method: 'post',
             data: form,
@@ -35,7 +35,7 @@ export default {
     },
     //获取用户信息
     async queryCurrentUserData(form = {}, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-business/userViewProjectContract/queryCurrentUserData',
             method: 'post',
             data: form,

+ 3 - 3
src/api/modules/using/bim.js

@@ -1,12 +1,12 @@
-import {httpApi} from "../../request/httpApi";
+import { HcApi } from '../../request/index'
 
 export default {
     //分页
     async getModelview(form, msg = false) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/getModelview',
             method: 'get',
             params: form,
-        }, msg);
+        }, msg)
     },
 }

+ 10 - 10
src/api/modules/using/query.js

@@ -1,16 +1,16 @@
-import { httpApi } from '../../request/httpApi'
+import { HcApi } from '../../request/index'
 
 export default {
     //分页
     async getarchiveQueryPage(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/pageByArchivesAuto',
             method: 'get',
             params: form,
         }, msg)
     },
     async getarchiveQueryPage2(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/pageByArchivesAuto2',
             method: 'get',
             params: form,
@@ -18,7 +18,7 @@ export default {
     },
     //获取目录树 /blade-manager/archiveTreeContract/getArchiveTreeByNodeType
     async getArchiveTreeByNodeType(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-manager/archiveTreeContract/getArchiveTreeByNodeType',
             method: 'get',
             params: form,
@@ -26,7 +26,7 @@ export default {
     },
     //获取目录树子节点 GET/blade-manager/archiveTreeContract/getChildrenNodeByNodeId
     async getChildrenNodeByNodeId(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-manager/archiveTreeContract/getChildrenNodeByNodeId',
             method: 'get',
             params: form,
@@ -34,7 +34,7 @@ export default {
     },
     //获取档案查询类别/blade-archive/archivesauto/getCarrierTypeByDict
     async getCarrierTypeByDict(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/getCarrierTypeByDict',
             method: 'get',
             params: form,
@@ -42,7 +42,7 @@ export default {
     },
     //档案柜切换档案查看权限
     async getArchivesAuthByUser(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/getArchivesAuthByUser',
             method: 'get',
             params: form,
@@ -50,7 +50,7 @@ export default {
     },
     //语音搜索接口
     async micSearchInfo(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/search-info',
             method: 'post',
             data: form,
@@ -58,7 +58,7 @@ export default {
     },
     //查询案卷里的文件
     async getArchiveFileList(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/getArchiveFileList',
             method: 'get',
             params: form,
@@ -66,7 +66,7 @@ export default {
     },
     //批量下载档案
     async batchDownloadFileToZip(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/batchDownloadFileToZip',
             method: 'get',
             params: form,

+ 8 - 8
src/api/modules/using/stats.js

@@ -1,9 +1,9 @@
-import { httpApi } from '../../request/httpApi'
+import { HcApi } from '../../request/index'
 
 export default {
     //档案统计-已组案卷
     async getallArchiveByContractType(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/allArchiveByContractType',
             method: 'get',
             params: form,
@@ -12,7 +12,7 @@ export default {
     },
     //获取档案年限占比
     async getallArchiveAge(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/allArchiveAgeByContractType',
             method: 'get',
             params: form,
@@ -21,7 +21,7 @@ export default {
     },
     //获取已销毁案卷
     async getallArchiveDestory(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archivesauto/allDeletedArchiveByContractType',
             method: 'get',
             params: form,
@@ -30,7 +30,7 @@ export default {
     },
     //获取原生文件数量getallnativeChartData
     async getallnativeChartData(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveFile/allArchiveFileByContractType',
             method: 'get',
             params: form,
@@ -39,7 +39,7 @@ export default {
     },
     //获取总存储getallArchiveSize
     async getallArchiveSize(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-archive/archiveFile/allArchiveFileSize',
             method: 'get',
             params: form,
@@ -47,7 +47,7 @@ export default {
     },
     //获取归档目录文件夹
     async getArchiveTreeAndArchiveCount(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-manager/archiveTreeContract/getArchiveTreeAndArchiveCount',
             method: 'get',
             params: form,
@@ -56,7 +56,7 @@ export default {
     },
     //获取项目内外页台账完成比例
     async getProjectStat(form, msg = true) {
-        return httpApi({
+        return HcApi({
             url: '/api/blade-manager/wbsTreeContract/getProjectStat',
             method: 'get',
             params: form,

+ 0 - 23
src/api/request/header.js

@@ -1,23 +0,0 @@
-import pinia from '~src/store/init'
-import { useAppStore } from '~src/store'
-import { Base64 } from 'js-base64'
-import website from '~src/config'
-import { getToken } from '~src/api/util/auth'
-
-//初始变量
-const store = useAppStore(pinia)
-
-export function getTokenHeader(text = false) {
-    let headers = {}
-    headers['Authorization'] = `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`
-    headers['Client-Id'] = website.clientId
-    headers['Tenant-Id'] = store.tenantId
-    //让每个请求携带token
-    const token = getToken()
-    if (token) headers[website.tokenHeader] = 'bearer ' + token
-    //headers中配置text请求
-    if (text === true) {
-        headers['Content-Type'] = 'text/plain'
-    }
-    return headers
-}

+ 0 - 84
src/api/request/httpApi.js

@@ -1,84 +0,0 @@
-import request from './index'
-import pinia from '~src/store/init'
-import { useAppStore } from '~src/store'
-import { getObjValue } from 'js-fast-way'
-import { apiErrorMessage, apiWarningMessage } from '~com/message/index.js'
-import website from '~src/config'
-
-//初始变量
-const store = useAppStore(pinia)
-
-//封装的请求
-export const httpApi = async (obj, message = true) => {
-    return new Promise((resolve) => {
-        //处理统一的请求头
-        obj.headers = obj.headers ?? {}
-        obj.headers['Client-Id'] = obj.headers['Client-Id'] ?? website.clientId
-        obj.headers['Tenant-Id'] = obj.headers['Tenant-Id'] ?? store.tenantId
-        //发起请求
-        request(obj).then(async (response) => {
-            resolve(await getResData(response, false))
-        }).catch(async (response) => {
-            if (message) {
-                const msg = getMsgVal(response)
-                if (msg) window.$message?.error(msg)
-            }
-            resolve(await getResData(response, true))
-        })
-    })
-}
-
-//处理数据
-const getResData = async (response, error = false) => {
-    return new Promise((resolve) => {
-        const { headers, data, config } = response
-        const resData = getObjValue(data)
-        const httpData = {
-            response, res: data, data: resData?.data,
-            code: resData?.code, msg: resData?.msg, status: response?.status,
-            headers: headers, disposition: getDisposition(headers),
-            message: getMsgVal(response), error: error,
-        }
-        //处理延迟响应
-        if (!error) {
-            const { startTime, endTime } = config.metadata
-            if (config.isDelay) {
-                const duration = endTime - startTime
-                if (duration < 500) {
-                    setTimeout(() => {
-                        resolve(httpData)
-                    }, 1000 - duration)
-                } else {
-                    resolve(httpData)
-                }
-            } else {
-                resolve(httpData)
-            }
-        } else {
-            resolve(httpData)
-        }
-    })
-}
-
-//获取msg消息内容
-const getMsgVal = (response) => {
-    const { code, msg, error_description } = getObjValue(response.data)
-    if (code === 404) {
-        apiErrorMessage()
-        return ''
-    } else if (code === 500 || code === 503 || code === 504) {
-        apiWarningMessage()
-        return ''
-    } else {
-        return msg || error_description || '未知错误'
-    }
-}
-
-//响应头中获取content-disposition
-const getDisposition = (headers) => {
-    try {
-        return headers['content-disposition']
-    } catch {
-        return ''
-    }
-}

+ 29 - 56
src/api/request/index.js

@@ -1,61 +1,34 @@
-import axios from 'axios'
-import { Base64 } from 'js-base64'
-import website from '~src/config'
+import { httpApi } from 'hc-vue3-ui'
 import router from '~src/router/index'
-import { getToken } from '~src/api/util/auth'
-import { toSerialize } from 'js-fast-way'
+import pinia from '~src/store/init'
+import { useAppStore } from '~src/store'
+import website from '~src/config'
 
-//默认超时时间
-axios.defaults.timeout = 300000
-//返回其他状态码
-axios.defaults.validateStatus = function (status) {
-    return status >= 200 && status <= 500
-}
-//跨域请求,允许保存cookie
-axios.defaults.withCredentials = true
+//初始变量
+const store = useAppStore(pinia)
 
-//http request拦截
-axios.interceptors.request.use(config => {
-    const meta = (config['meta'] || {})
-    const isToken = meta['isToken'] === false
-    config.headers['Authorization'] = `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`
-    //让每个请求携带token
-    const token = getToken()
-    if (token && !isToken) {
-        config.headers[website.tokenHeader] = 'bearer ' + token
-    }
-    //headers中配置text请求
-    if (config['text'] === true) {
-        config.headers['Content-Type'] = 'text/plain'
-    }
-    //headers中配置serialize为true开启序列化
-    if (config.method === 'post' && meta['isSerialize'] === true) {
-        config.data = toSerialize(config.data)
-    }
-    config.metadata = { startTime: new Date() }
-    return config
-}, error => {
-    return Promise.reject(error)
-})
+//封装的请求
+export const HcApi = async (obj, msg) => {
+    return new Promise((resolve) => {
+        //处理统一的请求头
+        obj.headers = obj.headers ?? {}
+        obj.headers['Client-Id'] = obj.headers['Client-Id'] ?? website.clientId
+        obj.headers['Tenant-Id'] = obj.headers['Tenant-Id'] ?? store.tenantId
+        //发起请求
+        httpApi(obj).then((response) => {
+            //console.log(response)
+            resolve(response)
+        }).catch((response) => {
+            getResData(response)
+            resolve(response)
+        })
+    })
+}
 
-//http response 拦截
-axios.interceptors.response.use(res => {
-    //响应时间
-    res.config.metadata.endTime = new Date()
-    //获取状态码
-    const status = res.data?.code || res.status
-    //如果是401则跳转到登录页面
-    if (status === 401) {
-        window.$message?.error('身份失效,请重新登录!')
-        router.push({ path: '/login' })
-    }
-    // 如果请求为非200, 自行catch逻辑处理
-    if (status !== 200) {
-        return Promise.reject(res)
+//处理数据
+const getResData = ({ code }) => {
+    if (code === 401) {
+        window.$message?.error('身份失效,请重新登录!')
+        router.push({ path: '/login' }).then()
     }
-    return res
-}, error => {
-    return Promise.reject(new Error(error))
-})
-
-export default axios
+}

+ 23 - 8
src/api/util/auth.js

@@ -1,26 +1,41 @@
-import Cookies from 'js-cookie'
-import config from "~src/config/index";
+import { calcDate, delStoreData, getStoreData, setStoreData } from 'js-fast-way'
+import website from '~src/config/index'
 
+//处理token
 export const getToken = () => {
-    return Cookies.get(config.tokenKey)
+    getTokenTime(website?.tokenKey)
+    return getStoreData(website?.tokenKey)
 }
 
 export const setToken = (token) => {
-    return Cookies.set(config['tokenKey'], token)
+    setStoreData(website?.tokenKey, token)
 }
 
 export const getRefreshToken = () => {
-    return Cookies.get(config['refreshTokenKey'])
+    getTokenTime(website?.refreshTokenKey)
+    return getStoreData(website?.refreshTokenKey)
 }
 
 export const setRefreshToken = (token) => {
-    return Cookies.set(config['refreshTokenKey'], token)
+    setStoreData(website?.refreshTokenKey, token)
 }
 
 export const removeToken = () => {
-    return Cookies.remove(config['tokenKey'])
+    delStoreData(website?.tokenKey)
 }
 
 export const removeRefreshToken = () => {
-    return Cookies.remove(config['refreshTokenKey'])
+    delStoreData(website?.refreshTokenKey)
+}
+
+//计算token是否过期
+const getTokenTime = (tokenKey) => {
+    const token = getStoreData(tokenKey, true)
+    if (token) {
+        const date = calcDate(token.datetime, new Date().getTime())
+        if (date.seconds > 2000) {
+            removeToken()
+            removeRefreshToken()
+        }
+    }
 }

+ 9 - 9
src/global/components/hc-report-modal/index.vue

@@ -23,7 +23,7 @@
                 <HcFormUpload
                     :src="fileList"
                     :h-props="uploadFormProps"
-             
+
                     @upload="formItemUpload"
                 />
             </el-form-item>
@@ -65,7 +65,7 @@
 import { onMounted, ref, watch } from 'vue'
 import tasksFlowApi from '~api/tasks/flow'
 import { arrIndex, formValidate, getArrValue, isNullES } from 'js-fast-way'
-import { getTokenHeader } from '~src/api/request/header'
+import { getHeader } from 'hc-vue3-ui'
 import initialgApi from '~api/initial/initial'
 
 const props = defineProps({
@@ -175,7 +175,7 @@ watch(() => [
         ...addition,
     }
     reportDatas.value = datas
-   
+
          //判断数据长度有没有9个,有就先添加9个,没有直接获取所有数据
          if (reportDatas.value.length > 9) {
           for (let i = 0;i < needle.value ;i++) {
@@ -184,7 +184,7 @@ watch(() => [
         } else {
           tableData.value = reportDatas.value
         }
- 
+
     if (val) {
         getProcessDatasApi()
     }
@@ -270,7 +270,7 @@ const batchApprovalApi = async () => {
     formReportLoading.value = true
     //发起请求
     const { error, code, data } = await initialgApi.saveApply (formModel.value)
-    
+
     linkUserJoinString.value = ''
     formReportLoading.value = false
     if (!error && code === 200) {
@@ -285,7 +285,7 @@ const batchApprovalApi = async () => {
 //上传配置
 const UploadFileOptions = {
     //此处设置header
-    headers: getTokenHeader(),
+    headers: getHeader(),
     accept:'application/pdf,.doc,.docx,application/msword',
     accept_tip: 'PDF、Word格式文件',
 }
@@ -307,7 +307,7 @@ const fileList = ref([])
 
 // 文件全部上传完成
 const HcUploadFileFinish = () => {
-  
+
     HcUploadFileRef?.value.setModalShow(false)
 }
 // 文件全部上传成功
@@ -325,7 +325,7 @@ const HcUploadFileSuccess = (res) => {
             }]
     }
 
-   
+
   console.log( fileList.value, ' fileList.value ')
 }
 const tableData = ref([])
@@ -347,7 +347,7 @@ const queryData = async ()=>{
           needle.value = needle.value + 10
           return ortab
         }
-      
+
 }
 </script>
 

+ 3 - 3
src/store/modules/user.js

@@ -19,12 +19,12 @@ const store = useAppStore(pinia)
 
 //登录
 export const useAppLogin = async (form) => {
-    const { error, status, res, message } = await userLogin(form)
-    if (!error && status === 200) {
+    const { error, code, res, msg } = await userLogin(form)
+    if (!error && code === 200) {
         const info = await setUserAppInfo(res)
         return { error: info.error, msg: info.msg }
     } else {
-        return { error: true, msg: message }
+        return { error: true, msg: msg }
     }
 }
 

+ 5 - 5
src/test/index.vue

@@ -2,7 +2,7 @@
     <div class="hc-page-box">
         <hc-new-card title="测试">
             <template #extra>
-                <hc-upload-file useFile :options="upFileOpt" @success="upFileSuc" @item="upFileItem">
+                <hc-upload-file use-file :options="upFileOpt" @success="upFileSuc" @item="upFileItem">
                     <el-button type="primary" hc-btn>上传文件</el-button>
                 </hc-upload-file>
             </template>
@@ -11,22 +11,22 @@
 </template>
 
 <script setup>
-import {getTokenHeader} from "~src/api/request/header";
+import { getHeader } from 'hc-vue3-ui'
 
 //上传配置
 const upFileOpt = {
     accept: '*',
     accept_tip: '',
-    headers: getTokenHeader(),
+    headers: getHeader(),
 }
 
 // 文件上传成功的回调
 const upFileSuc = (res) => {
-    console.log('上传成功:',  res?.resData?.link)
+    console.log('上传成功:', res?.resData?.link)
 }
 
 // 点击了使用此文件的事件
-const upFileItem = ({item}) => {
+const upFileItem = ({ item }) => {
     console.log(item?.resData?.link)
 }
 </script>

+ 0 - 15
src/utils/tools.js

@@ -33,21 +33,6 @@ export const rowsToKey = (rows, key) => {
     }).join(',')
 }
 
-//删除提醒
-export const delMessage = (cbk) => {
-    window?.$messageBox?.alert('请谨慎考虑后,确认是否需要删除?', '删除提醒', {
-        showCancelButton: true,
-        confirmButtonText: '确认删除',
-        cancelButtonText: '取消',
-        type: 'warning',
-        callback: (action) => {
-            if (action === 'confirm') {
-                cbk()
-            }
-        },
-    })
-}
-
 //日期格式化
 export const dateFormat = (date, format) => {
     format = format || 'yyyy-MM-dd hh:mm:ss'

+ 2 - 2
src/views/file/collection.vue

@@ -420,7 +420,7 @@ import { delMessageV2 } from '~com/message/index.js'
 import archiveFileApi from '~api/archiveFile/archiveFile'
 import tasksFlowApi from '~api/tasks/flow'
 import { arrKeySort, arrToId, deepClone, getArrValue, getObjVal } from 'js-fast-way'
-import { getTokenHeader } from '~src/api/request/header'
+import { getHeader } from 'hc-vue3-ui'
 import tasksApi from '~api/tasks/data'
 import ossApi from '~api/oss'
 import { toPdfPage } from '~uti/btn-auth'
@@ -463,7 +463,7 @@ const ElTreeMenu = ref([
 ])
 //上传配置
 const UploadFileOptions = {
-    headers: getTokenHeader(),
+    headers: getHeader(),
 }
 
 const dutyUser = ref('')

+ 30 - 29
src/views/file/components/HcFileUpload.vue

@@ -1,37 +1,41 @@
 <template>
-    <el-upload ref="uploadRef" class="hc-file-upload-box" :action="api + action" :headers="getTokenHeader()" :data="uploadData" :accept="accept" :disabled="uploadDisabled" multiple :show-file-list="false"
-               :on-success="uploadSuccess" :on-exceed="uploadExceed" :on-error="uploadError" :before-upload="beforeUpload" :on-progress="uploadprogress">
-        <slot></slot>
+    <el-upload
+        ref="uploadRef" class="hc-file-upload-box" :action="api + action" :headers="getHeader()" :data="uploadData" :accept="accept" :disabled="uploadDisabled" multiple :show-file-list="false"
+        :on-success="uploadSuccess" :on-exceed="uploadExceed" :on-error="uploadError" :before-upload="beforeUpload" :on-progress="uploadprogress"
+    >
+        <slot />
     </el-upload>
 </template>
 
 <script setup>
-import {ref,watch,onMounted} from "vue";
-import {getTokenHeader} from '~src/api/request/header';
-import {isFileSize, deepClone, getObjValue} from "js-fast-way"
+import { onMounted, ref, watch } from 'vue'
+import { getHeader } from 'hc-vue3-ui'
+import { deepClone, getObjValue, isFileSize } from 'js-fast-way'
 const props = defineProps({
     datas: {
         type: Object,
-        default: () => ({})
+        default: () => ({}),
     },
     api: {
         type: String,
-        default: "/api/blade-resource/oss/endpoint/"
+        default: '/api/blade-resource/oss/endpoint/',
     },
     action: {
         type: String,
-        default: "upload-file"
+        default: 'upload-file',
     },
     accept: {
         type: String,
-        default: "image/png,image/jpg,image/jpeg,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/pdf,.doc,.docx,application/msword"
+        default: 'image/png,image/jpg,image/jpeg,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/pdf,.doc,.docx,application/msword',
     },
     size: {
         type: Number,
-        default: 60
-    }
+        default: 60,
+    },
 })
 
+//事件
+const emit = defineEmits(['change', 'progress'])
 //变量
 const uploadRef = ref(null)
 const uploadData = ref(props.datas)
@@ -51,25 +55,22 @@ onMounted(()=> {
     errorFileNum.value = 0
 })
 
-//事件
-const emit = defineEmits(['change', 'progress'])
-
 //上传前
 const beforeFileNum = ref(0)
 const beforeUpload = async (file) => {
     if (isFileSize(file?.size, props.size)) {
-        beforeFileNum.value ++;
-        return true;
+        beforeFileNum.value ++
+        return true
     } else {
-        beforeFileNum.value = 0;
-        window?.$message?.warning(`文件大小, 不能过${props.size}M!`);
-        return false;
+        beforeFileNum.value = 0
+        window?.$message?.warning(`文件大小, 不能过${props.size}M!`)
+        return false
     }
 }
 
 //超出限制时
 const uploadExceed = () => {
-    window?.$message?.warning(`请上传 ${props.accept} 格式的文件,文件大小不超过${props.size}M`);
+    window?.$message?.warning(`请上传 ${props.accept} 格式的文件,文件大小不超过${props.size}M`)
 }
 
 //上传中
@@ -81,25 +82,25 @@ const uploadprogress = () => {
 //上传完成
 const finishFileNum = ref(0)
 const uploadSuccess = (response, uploadFile, uploadFiles) => {
-    finishFileNum.value ++;
+    finishFileNum.value ++
     if (beforeFileNum.value === finishFileNum.value) {
         const fileList = getUploadFile(deepClone(uploadFiles))
         uploadClearFiles()
-        emit('change', {type: 'success', fileList})
+        emit('change', { type: 'success', fileList })
         emit('progress', false)
     }
 }
 
 //上传失败
 const errorFileNum = ref(0)
-const uploadError = (error,uploadFile,uploadFiles) => {
-    errorFileNum.value ++;
-    window?.$message?.error('上传失败');
-    const num = finishFileNum.value + errorFileNum.value;
+const uploadError = (error, uploadFile, uploadFiles) => {
+    errorFileNum.value ++
+    window?.$message?.error('上传失败')
+    const num = finishFileNum.value + errorFileNum.value
     if (beforeFileNum.value === num) {
         const fileList = getUploadFile(deepClone(uploadFiles))
         uploadClearFiles()
-        emit('change', {type: 'error', fileList})
+        emit('change', { type: 'error', fileList })
         emit('progress', false)
     }
 }
@@ -114,7 +115,7 @@ const uploadClearFiles = () => {
 
 //获取文件
 const getUploadFile = (fileList) => {
-    let fileArr = [];
+    let fileArr = []
     for (let i = 0; i < fileList.length; i++) {
         const item = getObjValue(fileList[i]?.response?.data)
         fileArr.push(item)

+ 31 - 30
src/views/file/components/HcFileUpload1.vue

@@ -1,41 +1,45 @@
 <template>
-    <el-upload ref="uploadRef" :accept="accept" :action="api + action" :before-upload="beforeUpload"
-               :data="uploadData" :disabled="uploadDisabled" :headers="getTokenHeader()" :limit="1" :on-error="uploadError"
-               :on-exceed="uploadExceed" :on-progress="uploadprogress" :on-success="uploadSuccess"
-               :show-file-list="false" class="hc-file-upload-box">
-        <slot></slot>
+    <el-upload
+        ref="uploadRef" :accept="accept" :action="api + action" :before-upload="beforeUpload"
+        :data="uploadData" :disabled="uploadDisabled" :headers="getHeader()" :limit="1" :on-error="uploadError"
+        :on-exceed="uploadExceed" :on-progress="uploadprogress" :on-success="uploadSuccess"
+        :show-file-list="false" class="hc-file-upload-box"
+    >
+        <slot />
     </el-upload>
 </template>
 
 <script setup>
-import {ref, watch, onMounted} from "vue";
-import {getTokenHeader} from '~src/api/request/header';
-import {deepClone, getObjValue, isFileSize} from "js-fast-way"
-import {genFileId} from "element-plus";
+import { onMounted, ref, watch } from 'vue'
+import { getHeader } from 'hc-vue3-ui'
+import { deepClone, getObjValue, isFileSize } from 'js-fast-way'
+import { genFileId } from 'element-plus'
 
 const props = defineProps({
     datas: {
         type: Object,
-        default: () => ({})
+        default: () => ({}),
     },
     api: {
         type: String,
-        default: "/api/blade-resource/oss/endpoint/"
+        default: '/api/blade-resource/oss/endpoint/',
     },
     action: {
         type: String,
-        default: "upload-file"
+        default: 'upload-file',
     },
     accept: {
         type: String,
-        default: "image/png,image/jpg,image/jpeg,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/pdf,.doc,.docx,application/msword"
+        default: 'image/png,image/jpg,image/jpeg,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/pdf,.doc,.docx,application/msword',
     },
     size: {
         type: Number,
-        default: 60
-    }
+        default: 60,
+    },
 })
 
+//事件
+const emit = defineEmits(['change', 'progress'])
 //变量
 const uploadRef = ref(null)
 const uploadData = ref(props.datas)
@@ -55,19 +59,16 @@ onMounted(() => {
     errorFileNum.value = 0
 })
 
-//事件
-const emit = defineEmits(['change', 'progress'])
-
 //上传前
 const beforeFileNum = ref(0)
 const beforeUpload = async (file) => {
     if (isFileSize(file?.size, props.size)) {
-        beforeFileNum.value++;
-        return true;
+        beforeFileNum.value++
+        return true
     } else {
-        beforeFileNum.value = 0;
-        window?.$message?.warning(`文件大小, 不能过${props.size}M!`);
-        return false;
+        beforeFileNum.value = 0
+        window?.$message?.warning(`文件大小, 不能过${props.size}M!`)
+        return false
     }
 }
 
@@ -88,11 +89,11 @@ const uploadprogress = () => {
 //上传完成
 const finishFileNum = ref(0)
 const uploadSuccess = (response, uploadFile, uploadFiles) => {
-    finishFileNum.value++;
+    finishFileNum.value++
     if (beforeFileNum.value === finishFileNum.value) {
         const fileList = getUploadFile(deepClone(uploadFiles))
         uploadClearFiles()
-        emit('change', {type: 'success', fileList})
+        emit('change', { type: 'success', fileList })
         emit('progress', false)
     }
 }
@@ -100,13 +101,13 @@ const uploadSuccess = (response, uploadFile, uploadFiles) => {
 //上传失败
 const errorFileNum = ref(0)
 const uploadError = (error, uploadFile, uploadFiles) => {
-    errorFileNum.value++;
-    window?.$message?.error('上传失败');
-    const num = finishFileNum.value + errorFileNum.value;
+    errorFileNum.value++
+    window?.$message?.error('上传失败')
+    const num = finishFileNum.value + errorFileNum.value
     if (beforeFileNum.value === num) {
         const fileList = getUploadFile(deepClone(uploadFiles))
         uploadClearFiles()
-        emit('change', {type: 'error', fileList})
+        emit('change', { type: 'error', fileList })
         emit('progress', false)
     }
 }
@@ -121,7 +122,7 @@ const uploadClearFiles = () => {
 
 //获取文件
 const getUploadFile = (fileList) => {
-    let fileArr = [];
+    let fileArr = []
     for (let i = 0; i < fileList.length; i++) {
         const item = getObjValue(fileList[i]?.response?.data)
         fileArr.push(item)

+ 49 - 49
src/views/file/components/HcFileUploadLarge.vue

@@ -1,43 +1,47 @@
 <template>
-    <el-upload ref="uploadRef" class="hc-file-upload-box"  :headers="getTokenHeader()" :data="uploadData" :disabled="uploadDisabled" multiple :limit="limit" :show-file-list="false" :http-request="uploadFileHandle"
-               :on-success="uploadSuccess" :on-exceed="uploadExceed" :on-error="uploadError" :before-upload="beforeUpload" :on-progress="uploadprogress">
-        <slot></slot>
+    <el-upload
+        ref="uploadRef" class="hc-file-upload-box" :headers="getHeader()" :data="uploadData" :disabled="uploadDisabled" multiple :limit="limit" :show-file-list="false" :http-request="uploadFileHandle"
+        :on-success="uploadSuccess" :on-exceed="uploadExceed" :on-error="uploadError" :before-upload="beforeUpload" :on-progress="uploadprogress"
+    >
+        <slot />
     </el-upload>
 </template>
 
 <script setup>
-import {ref,watch,onMounted} from "vue";
-import {getTokenHeader} from '~src/api/request/header';
-import {isFileSize, deepClone, getObjValue} from "js-fast-way"
+import { onMounted, ref, watch } from 'vue'
+import { getHeader } from 'hc-vue3-ui'
+import { deepClone, getObjValue, isFileSize } from 'js-fast-way'
 import md5 from 'js-md5' //引入MD5加密
-import ossApi from "~api/oss";
+import ossApi from '~api/oss'
 const props = defineProps({
     datas: {
         type: Object,
-        default: () => ({})
+        default: () => ({}),
     },
     api: {
         type: String,
-        default: "/api/blade-resource/oss/endpoint/"
+        default: '/api/blade-resource/oss/endpoint/',
     },
     action: {
         type: String,
-        default: "upload-file2"
+        default: 'upload-file2',
     },
     accept: {
         type: String,
-        default: "image/png,image/jpg,image/jpeg,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/pdf,.doc,.docx,application/msword"
+        default: 'image/png,image/jpg,image/jpeg,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/pdf,.doc,.docx,application/msword',
     },
     size: {
         type: Number,
-        default: 60
+        default: 60,
     },
     limit: {
         type: Number,
-        default: 10
-    }
+        default: 10,
+    },
 })
 
+//事件
+const emit = defineEmits(['change', 'progress'])
 //变量
 const uploadRef = ref(null)
 const uploadData = ref(props.datas)
@@ -57,20 +61,17 @@ onMounted(()=> {
     errorFileNum.value = 0
 })
 
-//事件
-const emit = defineEmits(['change', 'progress'])
-
 //上传前
 const beforeFileNum = ref(0)
 const beforeUpload = async (file) => {
-    beforeFileNum.value ++;
-    return true;
+    beforeFileNum.value ++
+    return true
 }
 
 //超出限制时
 const uploadExceed = () => {
     //window?.$message?.warning(`请上传 ${props.accept} 格式的文件,文件大小不超过${props.size}M`);
-    window?.$message?.warning(`每次请不超过 ${props.limit} 个文件同时上传`);
+    window?.$message?.warning(`每次请不超过 ${props.limit} 个文件同时上传`)
 }
 
 //上传中
@@ -85,26 +86,26 @@ const uploadSuccess = (response, uploadFile, uploadFiles) => {
   //console.log(response)
   //console.log(uploadFile)
   //console.log(uploadFiles)
-    finishFileNum.value ++;
+    finishFileNum.value ++
     if (beforeFileNum.value === finishFileNum.value) {
         const fileList = getUploadFile(deepClone(uploadFiles))
         uploadClearFiles()
-        emit('change', {type: 'success', fileList})
+        emit('change', { type: 'success', fileList })
         emit('progress', false)
     }
 }
 
 //上传失败
 const errorFileNum = ref(0)
-const uploadError = (error,uploadFile,uploadFiles) => {
-    errorFileNum.value ++;
-    window?.$message?.error('上传失败');
+const uploadError = (error, uploadFile, uploadFiles) => {
+    errorFileNum.value ++
+    window?.$message?.error('上传失败')
     console.log(error)
-    const num = finishFileNum.value + errorFileNum.value;
+    const num = finishFileNum.value + errorFileNum.value
     if (beforeFileNum.value === num) {
         const fileList = getUploadFile(deepClone(uploadFiles))
         uploadClearFiles()
-        emit('change', {type: 'error', fileList})
+        emit('change', { type: 'error', fileList })
         emit('progress', false)
     }
 }
@@ -119,7 +120,7 @@ const uploadClearFiles = () => {
 
 //获取文件
 const getUploadFile = (fileList) => {
-    let fileArr = [];
+    let fileArr = []
     for (let i = 0; i < fileList.length; i++) {
         const item = getObjValue(fileList[i]?.response?.data)
         fileArr.push(item)
@@ -147,7 +148,7 @@ const uploadFileHandle = (options) =>{
   concurrent = 3,
   onSuccess:success,
   onProgress:process,
-  onError:error
+  onError:error,
 }) => {
   // 如果文件传入为空直接 return 返回
   if (!file || file.length < 1) {
@@ -216,7 +217,7 @@ const uploadFileHandle = (options) =>{
     return {
       start,
       end,
-      chunk
+      chunk,
     }
   }
   /***
@@ -226,7 +227,7 @@ const uploadFileHandle = (options) =>{
     // 针对单个文件进行chunk上传
     for (var i = 0; i < chunkCount; i++) {
       const {
-        chunk
+        chunk,
       } = getChunkInfo(file, i, chunkSize)
 
       // 判断已经上传的分片中是否包含当前分片
@@ -234,7 +235,7 @@ const uploadFileHandle = (options) =>{
         uploadChunk({
           chunk,
           currentChunk: i,
-          chunkCount
+          chunkCount,
         })
       }
     }
@@ -250,12 +251,12 @@ const uploadFileHandle = (options) =>{
     let inde = chunkInfo.currentChunk + 1
     if (uploaded.indexOf(inde + '') > -1) {
       const {
-        chunk
+        chunk,
       } = getChunkInfo(file, chunkInfo.currentChunk + 1, chunkSize)
       uploadChunk({
         chunk,
         currentChunk: inde,
-        chunkCount
+        chunkCount,
       })
     } else {
       var index = file.name.lastIndexOf('.')
@@ -278,8 +279,8 @@ const uploadFileHandle = (options) =>{
       let config = {
         headers: {
           'Content-Type': 'application/json',
-          'Accept': '*/*'
-        }
+          'Accept': '*/*',
+        },
       }
 
       ossApi.uploadChunk(fetchForm, config).then(res => {
@@ -294,12 +295,12 @@ const uploadFileHandle = (options) =>{
             process(100)
           } else {
             const {
-              chunk
+              chunk,
             } = getChunkInfo(file, chunkInfo.currentChunk + 1, chunkSize)
             uploadChunk({
               chunk,
               currentChunk: chunkInfo.currentChunk + 1,
-              chunkCount
+              chunkCount,
             })
           }
 
@@ -322,12 +323,12 @@ const uploadFileHandle = (options) =>{
    **/
   const sequentialUplode = (currentChunk) => {
     const {
-      chunk
+      chunk,
     } = getChunkInfo(file, currentChunk, chunkSize)
     let chunkInfo = {
       chunk,
       currentChunk,
-      chunkCount
+      chunkCount,
     }
     var sd = parseInt((chunkInfo.currentChunk / chunkInfo.chunkCount) * 100)
     process(sd)
@@ -341,8 +342,8 @@ const uploadFileHandle = (options) =>{
       let config = {
         headers: {
           'Content-Type': 'application/json',
-          'Accept': '*/*'
-        }
+          'Accept': '*/*',
+        },
       }
       // 执行分片上传
       ossApi.uploadChunk(uploadData, config).then(res => {
@@ -378,12 +379,12 @@ const uploadFileHandle = (options) =>{
     concurrentExecution(chunkList, concurrent, (curItem) => {
       return new Promise((resolve, reject) => {
         const {
-          chunk
+          chunk,
         } = getChunkInfo(file, curItem, chunkSize)
         let chunkInfo = {
           chunk,
           currentChunk: curItem,
-          chunkCount
+          chunkCount,
         }
         var sd = parseInt((chunkInfo.currentChunk / chunkInfo.chunkCount) * 100)
         process(sd)
@@ -396,8 +397,8 @@ const uploadFileHandle = (options) =>{
           let config = {
             headers: {
               'Content-Type': 'application/json',
-              'Accept': '*/*'
-            }
+              'Accept': '*/*',
+            },
           }
           ossApi.uploadChunk(uploadData, config).then(res => {
             if (res.code == 200) {
@@ -408,7 +409,7 @@ const uploadFileHandle = (options) =>{
               //   success(res)
               //   process(100)
               // }
-              if(typeof res.data == 'object'){
+              if (typeof res.data == 'object') {
                 success(res)
                 process(100)
               }
@@ -463,7 +464,7 @@ const uploadFileHandle = (options) =>{
  * @params asyncHandle {Function} - 对`list`的每一个项的处理函数,参数为当前处理项,必须 return 一个Promise来确定是否继续进行迭代
  * @return {Promise} - 返回一个 Promise 值来确认所有数据是否迭代完成
  */
-const  concurrentExecution = (list, limit, asyncHandle)=>{
+const concurrentExecution = (list, limit, asyncHandle)=>{
   // 递归执行
   let recursion = (arr) => {
     // 执行方法 arr.shift() 取出并移除第一个数据
@@ -488,7 +489,6 @@ const  concurrentExecution = (list, limit, asyncHandle)=>{
   // 所有并发异步操作都完成后,本次并发控制迭代完成
   return Promise.all(asyncList)
 }
-
 </script>
 
 <style lang="scss">

+ 2 - 2
src/views/file/records.vue

@@ -271,7 +271,7 @@ import { useAppStore } from '~src/store'
 import HcTree from '~src/components/tree/hc-tree.vue'
 import { rowsToId } from '~uti/tools'
 import { delMessageV2 } from '~com/message/index.js'
-import { getTokenHeader } from '~src/api/request/header'
+import { getHeader } from 'hc-vue3-ui'
 import archiveFileApi from '~api/archiveFile/archiveFileAuto.js'
 import { getStoreValue, setStoreValue } from '~src/utils/storage'
 import tasksApi from '~api/tasks/data'
@@ -312,7 +312,7 @@ onMounted(() => {
 
 //上传配置
 const UploadFileOptions = {
-    headers: getTokenHeader(),
+    headers: getHeader(),
 }
 //替换文件
 const newHcUploadFileSuccess = (res, row) => {

+ 0 - 2
src/views/login/index.vue

@@ -154,8 +154,6 @@ const formValidateClick = async () => {
         window?.$message?.error(msg)
         return false
     }
-    //登录成功
-    loading.value = false
     window?.$message?.success('登录成功')
     setTimeout(() => {
         loading.value = false

+ 3 - 3
src/views/user/auth.vue

@@ -18,7 +18,7 @@ import { onMounted, ref } from 'vue'
 import { useAppStore } from '~src/store'
 import { setUserTenantInfo, useAppLogin } from '~sto/user'
 import { useRoute, useRouter } from 'vue-router'
-import { getObjVal, getObjValue, isNullES } from 'js-fast-way'
+import { getObjVal, getObjValue } from 'js-fast-way'
 import svg403 from '~src/assets/view/403.svg'
 import userApi from '~api/userInfo'
 import { getTenantID } from '~api/user'
@@ -84,8 +84,8 @@ const queryCurrentUserData = async (tenant_id) => {
 const useAppLoginApi = async (form) => {
     loading.value = true
     const { error, msg } = await useAppLogin(form)
-    if (error && !isNullES(msg)) {
-        window.$message?.error('授权登录失败')
+    if (error) {
+        window.$message?.error(msg ?? '授权登录失败')
         isErrorShow.value = true
         loading.value = false
         return false

+ 2 - 2
src/views/user/index.vue

@@ -5,7 +5,7 @@
                 <div v-loading="avatarLoading" class="user-avatar">
                     <img :src="userInfo.avatar || avatarPng" alt="">
                     <div class="user-avatar-upload">
-                        <el-upload class="upload-dom" :action="action" :accept="accept" :headers="getTokenHeader()" :data="upData" :show-file-list="false" :on-success="uploadFinish" :on-error="uploadError" :before-upload="beforeUpload">
+                        <el-upload class="upload-dom" :action="action" :accept="accept" :headers="getHeader()" :data="upData" :show-file-list="false" :on-success="uploadFinish" :on-error="uploadError" :before-upload="beforeUpload">
                             <HcIcon name="camera" fill />
                         </el-upload>
                     </div>
@@ -114,7 +114,7 @@ import { useAppStore } from '~src/store'
 import userApi from '~api/userInfo/index'
 import { useRouter } from 'vue-router'
 import avatarPng from '~src/assets/images/avatar.png'
-import { getTokenHeader } from '~src/api/request/header'
+import { getHeader } from 'hc-vue3-ui'
 import { arrIndex, formValidate, isPhone } from 'js-fast-way'
 import { HcIsButton } from '~src/plugins/IsButtons'
 import md5 from 'js-md5'

+ 8 - 8
yarn.lock

@@ -1371,10 +1371,10 @@ hasown@^2.0.0:
   dependencies:
     function-bind "^1.1.2"
 
-hc-vue3-ui@^3.4.0:
-  version "3.4.0"
-  resolved "http://39.108.216.210:9000/hc-vue3-ui/-/hc-vue3-ui-3.4.0.tgz#ed86cc070ca775486815453e96d7f90ff7be06c2"
-  integrity sha512-PugGUa7UMd+ufKzWURJLNzl2d79WwLGGEqWYLX+eUajKanN++ZrXGjxxdxNN1MTZz7BumBePWjXH5/L+PoXHmA==
+hc-vue3-ui@^3.4.6:
+  version "3.4.6"
+  resolved "http://39.108.216.210:9000/hc-vue3-ui/-/hc-vue3-ui-3.4.6.tgz#d590df95852ece36a94553a08c7290ef3dc19145"
+  integrity sha512-usCu5o5AIkSVoSvQdMt7Eu8lzbNlu4xi9toDUVjLmgU5Hdqo1ACfOWiXoupRaepAM4usavXWqhX4JCPFYa3F6Q==
   dependencies:
     axios "^1.6.7"
     dayjs "^1.11.10"
@@ -2282,10 +2282,10 @@ safe-buffer@~5.2.0:
   resolved "http://39.108.216.210:9000/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
   integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
 
-sass@^1.71.1:
-  version "1.71.1"
-  resolved "http://39.108.216.210:9000/sass/-/sass-1.71.1.tgz#dfb09c63ce63f89353777bbd4a88c0a38386ee54"
-  integrity sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg==
+sass@^1.72.0:
+  version "1.72.0"
+  resolved "http://39.108.216.210:9000/sass/-/sass-1.72.0.tgz#5b9978943fcfb32b25a6a5acb102fc9dabbbf41c"
+  integrity sha512-Gpczt3WA56Ly0Mn8Sl21Vj94s1axi9hDIzDFn9Ph9x3C3p4nNyvsqJoQyVXKou6cBlfFWEgRW4rT8Tb4i3XnVA==
   dependencies:
     chokidar ">=3.0.0 <4.0.0"
     immutable "^4.0.0"