From 59bef840be5148dc69eb4864528a969d02e50f5e Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期五, 05 十二月 2025 18:46:00 +0800
Subject: [PATCH] 修改了代码

---
 src/views/archiveManager/archiveMaterial/index.vue |   14 ++++++++++++--
 src/api/system/materials.js                        |    8 ++++++++
 src/views/archiveManager/index.vue                 |   14 ++++++++------
 src/router/index.js                                |    2 +-
 4 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/src/api/system/materials.js b/src/api/system/materials.js
index f7d1ee3..af5b1d6 100644
--- a/src/api/system/materials.js
+++ b/src/api/system/materials.js
@@ -80,3 +80,11 @@
     // }
   })
 }
+//鎻掑叆鏂囦欢
+export function insertFile(recordId, maxPageNumber) {
+  return request({
+    url: '/system/materials/addMiddleRecords/'+recordId+'/'+maxPageNumber,
+    method: 'get',
+  
+  })
+}
\ No newline at end of file
diff --git a/src/router/index.js b/src/router/index.js
index 9c62b6e..8728364 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -123,7 +123,7 @@
       },
       //妗堝嵎璇︾粏淇℃伅绠$悊
       {
-        path: 'archiveMaterialManager/:recordId',
+        path: 'archiveMaterialManager/:recordId/:pageCount',
         component: () => import('@/views/archiveManager/archiveMaterial/index'),
         name: 'ArchiveMaterialManager',
         meta: { title: '璇︾粏淇℃伅', activeMenu: '/archiveManager/infoManager' }
diff --git a/src/views/archiveManager/archiveMaterial/index.vue b/src/views/archiveManager/archiveMaterial/index.vue
index 6603f55..49f2e7f 100644
--- a/src/views/archiveManager/archiveMaterial/index.vue
+++ b/src/views/archiveManager/archiveMaterial/index.vue
@@ -796,7 +796,7 @@
   </template>
 
   <script>
-  import { getFileCount,islegal, listMaterials, enload, getMaterials, delMaterials, addMaterials, updateMaterials } from "@/api/system/materials"
+  import {insertFile, getFileCount,islegal, listMaterials, enload, getMaterials, delMaterials, addMaterials, updateMaterials } from "@/api/system/materials"
 import { getToken } from '@/utils/auth'
 import store from '@/store'
 import { updateStatusById } from "@/api/system/records"
@@ -806,6 +806,7 @@
     name: "Materials",
     data() {
       return {
+        totalPageCount: 0,
         // 璁板綍鍏冪礌鍒濆浣嶇疆鍜岀姸鎬�
   originalOffsetLeft: 0,
         originalWidth: 0,
@@ -1000,6 +1001,9 @@
     created() {
       //const roleId = this.$route.params && this.$route.params.roleId
       const recordId = this.$route.params && this.$route.params.recordId
+
+      this.totalPageCount = this.$route.params && this.$route.params.pageCount
+      //alert(this.totalPageCount)
       //alert(recordId)
       this.recordId = recordId;
       this.uploadUrl = process.env.VUE_APP_BASE_API +'/system/materials/upload/'+this.recordId
@@ -1044,6 +1048,11 @@
     },
        // 鎵撳紑瀵煎叆瀵硅瘽妗�
     handleImport() {
+      //鐢熸垚鏂扮殑璁板綍
+      insertFile(this.recordId, this.totalPageCount).then(response => {
+        console.log(response)
+      //  alert(3245)
+        })
       this.importDialogVisible = true
     },
     // 鏂囦欢绉婚櫎
@@ -1073,8 +1082,9 @@
      islegal(this.recordId).then(response => {
        console.log(response.data)
        var res = response.data.res
+
        //alert(response.data.total)
-       if(fileCount!==response.data.total)
+       if(fileCount!=this.totalPageCount)
        {
          this.$modal.msgWarning('璇烽�夋嫨涓庤褰曟暟涓�鑷寸殑鏂囦欢')
          return
diff --git a/src/views/archiveManager/index.vue b/src/views/archiveManager/index.vue
index dcb1fb4..b4187c5 100644
--- a/src/views/archiveManager/index.vue
+++ b/src/views/archiveManager/index.vue
@@ -1133,7 +1133,7 @@
         console.error('鑾峰彇椤圭洰鍚嶇О鍒楄〃澶辫触:', error)
       }
     },
-    
+
     async fetchProjectCompanyOptions() {
       try {
         const response = await listAllProjectName()
@@ -1189,7 +1189,7 @@
       console.log("--------------")
       // 鍒涘缓queryParams鐨勫壇鏈紝閬垮厤鐩存帴淇敼鍘熷璞�
       const queryParams = { ...this.queryParams }
-      
+
       // 澶勭悊绫诲埆鍙锋悳绱�
       if ((queryParams.categoryType || queryParams.categoryZone || queryParams.categoryYear) && (queryParams.categorySeq || queryParams.categorySeqEnd)) {
         // 鏋勫缓鍩虹閮ㄥ垎锛堝墠涓変釜瀛楁淇濇寔涓�鑷达級
@@ -1198,12 +1198,12 @@
         if (queryParams.categoryZone) baseParts.push(queryParams.categoryZone)
         if (queryParams.categoryYear) baseParts.push(queryParams.categoryYear)
         const baseCategory = baseParts.join('-')
-        
+
         // 鏋勫缓寮�濮嬬被鍒彿
         if (queryParams.categorySeq) {
           queryParams.categoryNumberStart = baseCategory + '-' + queryParams.categorySeq
         }
-        
+
         // 鏋勫缓缁撴潫绫诲埆鍙�
         if (queryParams.categorySeqEnd) {
           queryParams.categoryNumberEnd = baseCategory + '-' + queryParams.categorySeqEnd
@@ -1220,7 +1220,7 @@
         delete queryParams.categorySeq
         delete queryParams.categorySeqEnd
       }
-      
+
       listRecords(queryParams).then(response => {
 
         console.log(response)
@@ -1299,9 +1299,11 @@
       var mid = row.id
       const roleId = 2
    //   alert(mid)
+
       var recordId = mid
+      var pageCount = row.pageCount
     //  this.$router.push("/archiveManager/infoManagerAu/user/" + roleId+"/"+recordId)
-      this.$router.push("/archiveManager/infoManagerAu/archiveMaterialManager/" + recordId)
+      this.$router.push("/archiveManager/infoManagerAu/archiveMaterialManager/" + recordId+"/"+pageCount)
 
     },
     //

--
Gitblit v1.9.1