Ver Fonte

调试接口

ZaiZai há 2 anos atrás
pai
commit
44c0145a25
2 ficheiros alterados com 28 adições e 10 exclusões
  1. 13 5
      src/api/modules/using/query.js
  2. 15 5
      src/views/using/query.vue

+ 13 - 5
src/api/modules/using/query.js

@@ -7,7 +7,7 @@ async getarchiveQueryPage(form, msg = true) {
         url: '/api/blade-archive/archivesauto/pageByArchivesAuto',
         method: 'get',
         params: form,
-      
+
     }, msg);
   },
   //获取目录树 /blade-manager/archiveTreeContract/getArchiveTreeByNodeType
@@ -16,7 +16,7 @@ async getarchiveQueryPage(form, msg = true) {
         url: '/api/blade-manager/archiveTreeContract/getArchiveTreeByNodeType',
         method: 'get',
         params: form,
-      
+
     }, msg);
   },
 //获取目录树子节点 GET/blade-manager/archiveTreeContract/getChildrenNodeByNodeId
@@ -25,7 +25,7 @@ async getarchiveQueryPage(form, msg = true) {
         url: '/api/blade-manager/archiveTreeContract/getChildrenNodeByNodeId',
         method: 'get',
         params: form,
-      
+
     }, msg);
   },
   //获取档案查询类别/blade-archive/archivesauto/getCarrierTypeByDict
@@ -34,7 +34,15 @@ async getarchiveQueryPage(form, msg = true) {
         url: '/api/blade-archive/archivesauto/getCarrierTypeByDict',
         method: 'get',
         params: form,
-      
+
     }, msg);
   },
-}
+    //档案柜切换档案查看权限
+    async getArchivesAuthByUser(form, msg = true) {
+        return httpApi({
+            url: '/api/blade-archive/archivesauto/getArchivesAuthByUser',
+            method: 'get',
+            params: form,
+        }, msg);
+    },
+}

+ 15 - 5
src/views/using/query.vue

@@ -1315,11 +1315,21 @@ const tabGuiData = ref([
     {key:'2', name: '施工档案'},
     {key:'3', name: '监理档案'},
 ]);
-const tabGuiChange = ({key}) => {
-    tabGuiKey.value = key;
-    searchForm.value.current = 1
-    searchForm.value.archiveType = tabGuiKey.value
-    getTableData()
+const tabGuiChange = async ({key}) => {
+    const { error, code, msg } = await archiveQueryApi.getArchivesAuthByUser({
+        archiveType: key, //1业主2施工3监理
+        projectId: projectId.value,
+        contractId:contractId.value
+    }, false)
+    //处理返回数据
+    if (!error && code === 200) {
+        tabGuiKey.value = key;
+        searchForm.value.current = 1
+        searchForm.value.archiveType = tabGuiKey.value
+        getTableData().then()
+    } else {
+        window.$message.error(msg)
+    }
 }