From cc13825bb6b3f4185e3db8aa29e58990ee4e01c0 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期五, 27 二月 2026 17:49:36 +0800
Subject: [PATCH] 巡检模块流程更改

---
 src/views/equipmentManagement/spareParts/index.vue |   61 +++++++++++++++++++++++-------
 1 files changed, 46 insertions(+), 15 deletions(-)

diff --git a/src/views/equipmentManagement/spareParts/index.vue b/src/views/equipmentManagement/spareParts/index.vue
index eb0bdd5..db82a7d 100644
--- a/src/views/equipmentManagement/spareParts/index.vue
+++ b/src/views/equipmentManagement/spareParts/index.vue
@@ -36,9 +36,8 @@
             <el-tag type="success" size="small">{{ row.status }}</el-tag>
           </template>
         </el-table-column>
-        <el-table-column prop="price" label="浠锋牸" width="140"></el-table-column>
         <el-table-column prop="quantity" label="鏁伴噺" width="140"></el-table-column>
-        <el-table-column prop="description" label="鎻忚堪" width="150"></el-table-column>
+        <el-table-column prop="description" label="鎻忚堪"></el-table-column>
         <el-table-column label="鎿嶄綔" width="150" fixed="right" align="center">
           <template #default="{ row }">
             <el-button
@@ -60,6 +59,18 @@
           </template>
         </el-table-column>
       </el-table>
+      <!-- 鍒嗛〉缁勪欢 -->
+      <div class="pagination-container">
+        <el-pagination
+          v-model:current-page="pagination.current"
+          v-model:page-size="pagination.size"
+          :page-sizes="[10, 20, 50, 100]"
+          :total="pagination.total"
+          layout="total, sizes, prev, pager, next, jumper"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+        />
+      </div>
     </div>
     <el-dialog title="鍒嗙被绠$悊" v-model="dialogVisible" width="60%">
       <el-form :model="form" :rules="rules" ref="formRef" label-width="100px">
@@ -99,16 +110,6 @@
         <el-form-item label="鎻忚堪" prop="description">
           <el-input v-model="form.description"></el-input>
         </el-form-item>
-        <el-form-item label="浠锋牸" prop="price">
-          <el-input-number
-            v-model="form.price"
-            placeholder="璇疯緭鍏ヤ环鏍�"
-            :min="0"
-            :step="0.01"
-            :precision="2"
-            style="width: 100%"
-          ></el-input-number>
-        </el-form-item>
       </el-form>
       <template #footer>
         <span class="dialog-footer">
@@ -147,6 +148,12 @@
 const queryParams = reactive({
   name: ''
 });
+// 鍒嗛〉鍙傛暟
+const pagination = reactive({
+  current: 1,
+  size: 10,
+  total: 0
+});
 // 琛ㄥ崟鏁版嵁
 const form = reactive({
   id:'',
@@ -155,7 +162,6 @@
   status: '',
   description: '',
   deviceLedgerIds: [],
-  price: null
 });
 
 // 琛ㄥ崟楠岃瘉瑙勫垯
@@ -215,7 +221,10 @@
 const fetchListData = async () => {
   loading.value = true;
   try {
-    const params = {};
+    const params = {
+      current: pagination.current,
+      size: pagination.size
+    };
     if (queryParams.name) {
       params.name = queryParams.name;
     }
@@ -223,6 +232,7 @@
     if (res.code === 200) {
       renderTableData.value = res.data.records || [];
       categories.value = res.data.records || [];
+      pagination.total = res.data.total || 0;
     }
   } catch (error) {
 		loading.value = false;
@@ -233,12 +243,27 @@
 
 // 鏌ヨ
 const handleQuery = () => {
+  pagination.current = 1;
   fetchListData();
 }
 
 // 閲嶇疆鏌ヨ
 const resetQuery = () => {
   queryParams.name = '';
+  pagination.current = 1;
+  fetchListData();
+}
+
+// 鍒嗛〉澶у皬鏀瑰彉
+const handleSizeChange = (size) => {
+  pagination.size = size;
+  pagination.current = 1;
+  fetchListData();
+}
+
+// 褰撳墠椤垫敼鍙�
+const handleCurrentChange = (current) => {
+  pagination.current = current;
   fetchListData();
 }
 
@@ -261,7 +286,6 @@
   form.status = '';
   form.description = '';
   form.deviceLedgerIds = [];
-  form.price = null;
   operationType.value = 'add'
   dialogVisible.value = true;
 };
@@ -373,6 +397,13 @@
   margin-top: unset;
 }
 
+.pagination-container {
+  margin-top: 20px;
+  display: flex;
+  justify-content: flex-end;
+  padding: 16px 0;
+}
+
 .el-table__header-wrapper th {
   background-color: #f5f7fa;
   font-weight: 600;

--
Gitblit v1.9.3