From 647172532ecf8ea31cb6471ce154969bb8747404 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 06 十一月 2025 11:57:05 +0800
Subject: [PATCH] 用印管理分页bug修改

---
 src/views/collaborativeApproval/sealManagement/index.vue |   83 +++++++----------------------------------
 1 files changed, 15 insertions(+), 68 deletions(-)

diff --git a/src/views/collaborativeApproval/sealManagement/index.vue b/src/views/collaborativeApproval/sealManagement/index.vue
index 4c9f2c3..88d33dc 100644
--- a/src/views/collaborativeApproval/sealManagement/index.vue
+++ b/src/views/collaborativeApproval/sealManagement/index.vue
@@ -26,6 +26,7 @@
               <el-col :span="8">
                 <el-button type="primary" @click="searchSealApplications">鎼滅储</el-button>
                 <el-button @click="resetSealSearch">閲嶇疆</el-button>
+                <el-button @click="handleExport">瀵煎嚭</el-button>
                 <el-button type="primary" @click="showSealApplyDialog = true">鐢宠鐢ㄥ嵃
                 </el-button>
               </el-col>
@@ -71,69 +72,10 @@
                 </template>
               </el-table-column>
             </el-table>
+					<pagination v-show="total > 0" :total="total" layout="total, sizes, prev, pager, next, jumper"
+											:page="page.current" :limit="page.size" @pagination="paginationChange" />
         </div> 
     </el-card>
-      
-        
-          
-        
-
-        <!-- 瑙勭珷鍒跺害绠$悊 -->
-        
-          <!-- <div class="tab-content">
-            <el-row :gutter="20" class="mb-20">
-              <el-col :span="6">
-                <el-input v-model="regulationSearchForm.title" placeholder="璇疯緭鍏ュ埗搴︽爣棰�" clearable />
-              </el-col>
-              <el-col :span="4">
-                <el-select v-model="regulationSearchForm.category" placeholder="鍒跺害鍒嗙被" clearable>
-                  <el-option label="浜轰簨鍒跺害" value="hr" />
-                  <el-option label="璐㈠姟鍒跺害" value="finance" />
-                  <el-option label="瀹夊叏鍒跺害" value="safety" />
-                  <el-option label="鎶�鏈埗搴�" value="tech" />
-                </el-select>
-              </el-col>
-              <el-col :span="8">
-                <el-button type="primary" @click="searchRegulations">鎼滅储</el-button>
-                <el-button @click="resetRegulationSearch">閲嶇疆</el-button>
-                <el-button type="success" @click="handleAdd">
-                  鍙戝竷鍒跺害
-                </el-button>
-              </el-col>
-            </el-row>
-
-            <el-table :data="regulations" border v-loading="tableLoading"  style="width: 100%">
-              <el-table-column prop="regulationNum" label="鍒跺害缂栧彿" width="120" />
-              <el-table-column prop="title" label="鍒跺害鏍囬" min-width="200" />
-              <el-table-column prop="category" label="鍒嗙被" width="120">
-                <template #default="scope">
-                  <el-tag>{{ getCategoryText(scope.row.category) }}</el-tag>
-                </template>
-              </el-table-column>
-              <el-table-column prop="version" label="鐗堟湰" width="80" />
-              <el-table-column prop="createUserName" label="鍙戝竷浜�" width="120" />
-              <el-table-column prop="createTime" label="鍙戝竷鏃堕棿" width="180" />
-              <el-table-column prop="status" label="鐘舵��" width="100">
-                <template #default="scope">
-                  <el-tag :type="scope.row.status === 'active' ? 'success' : 'info'">
-                    {{ scope.row.status === 'active' ? '鐢熸晥涓�' : '宸插簾姝�' }}
-                  </el-tag>
-                </template>
-              </el-table-column>
-              <el-table-column prop="readCount" label="宸茶浜烘暟" width="100" />
-              <el-table-column label="鎿嶄綔" width="250" fixed="right">
-                <template #default="scope">
-                  <el-button link @click="viewRegulation(scope.row)">鏌ョ湅</el-button>
-                  <el-button link type="primary" @click="handleEdit(scope.row)">缂栬緫</el-button>
-                  <el-button link type="danger" @click="repealEdit(scope.row)">搴熷純</el-button>
-                  <el-button link type="success" @click="viewVersionHistory(scope.row)">鐗堟湰鍘嗗彶</el-button>
-                  <el-button link type="warning" @click="viewReadStatus(scope.row)">闃呰鐘舵��</el-button>
-                </template>
-              </el-table-column>
-            </el-table>
-                
-          </div> -->
-        
 
     <!-- 鐢ㄥ嵃鐢宠瀵硅瘽妗� -->
     <el-dialog v-model="showSealApplyDialog" title="鐢宠鐢ㄥ嵃" width="600px">
@@ -298,7 +240,7 @@
 </template>
 
 <script setup>
-import { ref, reactive, onMounted } from 'vue'
+import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
 import { Plus } from '@element-plus/icons-vue'
 import { listSealApplication, addSealApplication, updateSealApplication,listRuleManagement,addRuleManagement,updateRuleManagement,delRuleManagement,getReadingStatusByRuleId,getReadingStatusList,addReadingStatus,updateReadingStatus  } from '@/api/collaborativeApproval/sealManagement.js'
@@ -343,7 +285,7 @@
 // 鍒嗛〉鍙傛暟
 const page = reactive({
   current: 1,
-  size: 10,
+  size: 100,
   total: 0
 })
 // 瑙勭珷鍒跺害鐩稿叧
@@ -619,12 +561,11 @@
       currentUser.value = res.data.userName
     }
   })
-  staffJoinListPage({staffState: 1}).then(res => {
+  staffJoinListPage({staffState: 1, ...page}).then(res => {
     tableLoading.value = false;
     // tableData.value = res.data.records
     // //绛涢�夊嚭鍜宑urrentUser鍚屽悕鐨勪汉鍛�
     tableData.value = res.data.records.filter(item => item.staffName === currentUser.value)
-    console.log("tableData",tableData.value) 
     page.total = res.data.total;
       
     if(tableData.value.length == 0){
@@ -723,6 +664,12 @@
   })
 }
 
+// 瀵煎嚭鐢ㄥ嵃鐢宠
+const { proxy } = getCurrentInstance()
+const handleExport = () => {
+  proxy.download('/sealApplicationManagement/export', { ...sealSearchForm }, '鐢ㄥ嵃鐢宠.xlsx')
+}
+
 // 鑾峰彇鍗扮珷鐢宠鍒楄〃鏁版嵁
 const getSealApplicationList = async () => {
   tableLoading.value = true
@@ -735,11 +682,11 @@
       // 鏍规嵁currentFactoryName杩囨护鍑篸epartment鐩稿悓鐨勬暟鎹�
       sealApplications.value = res.data.records.filter(item => item.department === currentFactoryName)
       // 鏇存柊杩囨护鍚庣殑鎬绘暟
-      page.value.total = sealApplications.value.length
+      page.total = sealApplications.value.length
     } else {
       // 濡傛灉娌℃湁currentFactoryName锛屽垯鏄剧ず鎵�鏈夋暟鎹�
       sealApplications.value = res.data.records
-      page.value.total = res.data.total
+      page.total = res.data.total
     }
     // sealApplications.value = res.data.records
     // page.value.total = res.data.total;
@@ -758,7 +705,7 @@
     regulations.value = res.data.records
     // 杩囨护鎺夊凡搴熷純鐨勫埗搴�
     // regulations.value = res.data.records.filter(item => item.status !== 'repealed')
-    page.value.total = res.data.total;
+    page.total = res.data.total;
     tableLoading.value = false;
 
   }).catch(err => {

--
Gitblit v1.9.3