From 9f5539e53c94e74b52e4b8fe7029cf5fd39d890d Mon Sep 17 00:00:00 2001
From: dy <dingyang@lnfxkj.tech>
Date: 星期一, 14 四月 2025 09:45:21 +0800
Subject: [PATCH] 零件统计表添加更新按钮

---
 src/views/ApsPartRouteStat/index.vue |   25 ++++++++++++++++++++++---
 1 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/src/views/ApsPartRouteStat/index.vue b/src/views/ApsPartRouteStat/index.vue
index 34b457f..737176d 100644
--- a/src/views/ApsPartRouteStat/index.vue
+++ b/src/views/ApsPartRouteStat/index.vue
@@ -7,17 +7,26 @@
           plain
           icon="Download"
           @click="handleExport"
-          v-hasPermi="['apsPartRouteStat:apsPartRouteStat:export']"
+          v-hasPermi="['apsPartRouteStat:export']"
         >瀵煎嚭</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          plain
+          icon="Refresh"
+          @click="handleRefresh"
+          v-hasPermi="['apsPartRouteStat:export']"
+        >鏇存柊</el-button>
       </el-col>
     </el-row>
     
-    <vxe-grid ref="gridRef" v-bind="gridOptions"></vxe-grid>
+    <vxe-grid ref="gridRef" v-bind="gridOptions" :loading="loading"></vxe-grid>
   </div>
 </template>
 
 <script setup name="apsPartRouteStat">
-import { query } from "@/api/apsPartRouteStat/apsPartRouteStat";
+import { query,updateStat } from "@/api/apsPartRouteStat/apsPartRouteStat";
 import { ref } from "vue";
 import * as XLSX from 'xlsx';
 
@@ -170,5 +179,15 @@
   XLSX.writeFile(wb, `apsPartRouteStat_${new Date().getTime()}.xlsx`);
 }
 
+/** 鍒锋柊鎸夐挳鎿嶄綔 */
+function handleRefresh(){
+  updateStat().then(response => {
+    console.log(response);
+    if(response.code == '200'){
+      getList();
+    }
+  });
+}
+
 getList();
 </script>

--
Gitblit v1.9.3