From 9f5539e53c94e74b52e4b8fe7029cf5fd39d890d Mon Sep 17 00:00:00 2001 From: dy <dingyang@lnfxkj.tech> Date: 星期一, 14 四月 2025 09:45:21 +0800 Subject: [PATCH] 零件统计表添加更新按钮 --- src/api/ApsPartRouteStat/ApsPartRouteStat.js | 8 ++++++++ src/views/ApsPartRouteStat/index.vue | 25 ++++++++++++++++++++++--- .env.production | 8 ++++++-- 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/.env.production b/.env.production index cbabf89..79b1f0a 100644 --- a/.env.production +++ b/.env.production @@ -1,5 +1,5 @@ # 椤甸潰鏍囬 -VITE_APP_TITLE = 鑻ヤ緷绠$悊绯荤粺 +VITE_APP_TITLE = APS # 鐢熶骇鐜閰嶇疆 VITE_APP_ENV = 'production' @@ -8,4 +8,8 @@ VITE_APP_BASE_API = '/prod-api' # 鏄惁鍦ㄦ墦鍖呮椂寮�鍚帇缂╋紝鏀寔 gzip 鍜� brotli -VITE_BUILD_COMPRESS = gzip \ No newline at end of file +VITE_BUILD_COMPRESS = gzip + +# 鏍囪瘑鏈湴寮�鍙戞湇鍔★紝鐢ㄤ簬GateWay杞彂鍒版湰鍦版湇鍔� +# 閰嶅悎鍚庣鏈嶅姟 +VITE_APP_LOCAL = 'int' \ No newline at end of file diff --git a/src/api/ApsPartRouteStat/ApsPartRouteStat.js b/src/api/ApsPartRouteStat/ApsPartRouteStat.js index 6966ad3..79c36b7 100644 --- a/src/api/ApsPartRouteStat/ApsPartRouteStat.js +++ b/src/api/ApsPartRouteStat/ApsPartRouteStat.js @@ -50,3 +50,11 @@ method: 'get' }) } + +// 鏌ヨ闆朵欢缁熻琛ㄥ垪琛� +export function updateStat() { + return request({ + url: '/aps/ApsPartRouteStat/updateStat', + method: 'post' + }) +} \ No newline at end of file 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