From c045666cb9bdcacb2aeb2dba4d806db1cd6b3bed Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 20 三月 2026 11:14:18 +0800
Subject: [PATCH] 金鹰黄金 1.新增劳保台账选择岗位刷新人员列表接口修改 2.设备保养、巡检任务要设备可以多选

---
 src/views/fileManagement/borrow/index.vue |   42 +++++++++++++++++++++++++++++++-----------
 1 files changed, 31 insertions(+), 11 deletions(-)

diff --git a/src/views/fileManagement/borrow/index.vue b/src/views/fileManagement/borrow/index.vue
index 531feb6..41dc3a3 100644
--- a/src/views/fileManagement/borrow/index.vue
+++ b/src/views/fileManagement/borrow/index.vue
@@ -44,6 +44,9 @@
             <el-icon><Plus /></el-icon>
             鏂板鍊熼槄
           </el-button>
+          <el-button @click="handleOut">
+            瀵煎嚭
+          </el-button>
           <el-button
             type="danger"
             @click="handleBatchDelete"
@@ -201,7 +204,7 @@
 const borrowList = ref([]);
 const selectedRows = ref([]);
 const documentList = ref([]); // 鏂囨。鍒楄〃锛岀敤浜庡�熼槄涔︾睄閫夋嫨
-const scanContent = ref('') // 鎵爜鍐呭
+const scanContent = ref() // 鎵爜鍐呭
 // 鍒嗛〉鐩稿叧
 const pagination = reactive({
   currentPage: 1,
@@ -234,7 +237,7 @@
 
 // 琛ㄥ崟楠岃瘉瑙勫垯
 const borrowRules = reactive({
-  documentationId: [{ required: true, message: "璇烽�夋嫨鍊熼槄涔︾睄", trigger: "change" }],
+  
   borrower: [{ required: true, message: "璇疯緭鍏ュ�熼槄浜�", trigger: "blur" }],
   borrowPurpose: [{ required: true, message: "璇疯緭鍏ュ�熼槄鐩殑", trigger: "blur" }],
   borrowDate: [{ required: true, message: "璇烽�夋嫨鍊熼槄鏃ユ湡", trigger: "change" }],
@@ -308,6 +311,7 @@
     const res = await getDocumentList();
     if (res.code === 200) {
       documentList.value = res.data || [];
+      console.log("shuju",documentList.value)
     } else {
       ElMessage.error(res.msg || "鑾峰彇鏂囨。鍒楄〃澶辫触");
       documentList.value = [];
@@ -325,7 +329,7 @@
     
     // 鏋勫缓鏌ヨ鍙傛暟
     const query = {
-      page: pagination.currentPage,
+      current: pagination.currentPage,
       size: pagination.pageSize,
       documentationId: searchForm.documentationId || undefined,
       borrowStatus: searchForm.borrowStatus || undefined,
@@ -389,18 +393,19 @@
 
 // 澶勭悊鎵爜鍐呭
 const handleScanContent = async (value) => {
-if (!value) return;
-  
+  if (!value) return;
   try {
     // 鏌ユ壘鎵弿鍐呭瀵瑰簲鐨勬枃妗�
-    // 鍋囪浜岀淮鐮佸寘鍚殑鏄枃妗D鎴栨枃妗e悕绉�
     const matchedDoc = documentList.value.find(item => 
-      item.documentationId === value 
+      item.id == value 
     );
+    console.log("matchedDoc", matchedDoc);
+
     
     if (matchedDoc) {
+      
       // 鎵惧埌鍖归厤鐨勬枃妗o紝璁剧疆琛ㄥ崟鍊�
-      borrowForm.documentationId = matchedDoc.documentationId;
+      borrowForm.documentationId = matchedDoc.id;
       ElMessage.success(`宸查�夋嫨: ${matchedDoc.docName || matchedDoc.name}`);
     } else {
       // 鏈壘鍒板尮閰嶇殑鏂囨。锛屾彁绀虹敤鎴�
@@ -555,15 +560,30 @@
   });
 };
 
+// 瀵煎嚭
+const handleOut = () => {
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.download("/documentationBorrowManagement/export", {}, "鍊熼槄鐧昏.xlsx");
+    })
+    .catch(() => {
+      ElMessage.info("宸插彇娑�");
+    });
+};
+
 // 閫夋嫨鍙樺寲浜嬩欢
 const handleSelectionChange = (selection) => {
   selectedRows.value = selection;
 };
 
 // 澶勭悊鍒嗛〉鍙樺寲
-const handlePagination = (current, size) => {
-  pagination.currentPage = current;
-  pagination.pageSize = size;
+const handlePagination = (pageInfo) => {
+  pagination.currentPage = pageInfo.current || pageInfo.page;
+  pagination.pageSize = pageInfo.size || pageInfo.limit;
   loadBorrowList();
 };
 

--
Gitblit v1.9.3