From ea689dd91eaa72425dc01759042c3b4eb2186512 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期三, 17 六月 2026 10:14:44 +0800
Subject: [PATCH] 新增智能电表、空调管理

---
 admin/src/views/business/ywcustomerrecharge.vue |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/admin/src/views/business/ywcustomerrecharge.vue b/admin/src/views/business/ywcustomerrecharge.vue
index c5c0e8a..ca0a0c4 100644
--- a/admin/src/views/business/ywcustomerrecharge.vue
+++ b/admin/src/views/business/ywcustomerrecharge.vue
@@ -65,14 +65,14 @@
         <el-table-column prop="createDate" label="鍒涘缓鏃堕棿" min-width="160" align="center"/>
         <el-table-column label="鎿嶄綔" min-width="180" align="center" fixed="right">
           <template slot-scope="{ row }">
-            <el-button type="text" v-permissions="['business:ywcustomerrecharge:bindDevice']" @click="openDevice(row)">鍏宠仈璁惧</el-button>
+            <el-button type="text" v-permissions="['business:ywcustomerrecharge:query']" @click="openDevice(row)">鍏宠仈璁惧</el-button>
             <el-button type="text" v-permissions="['business:ywcustomerrecharge:recharge']" @click="openRecharge(row)">鍏呭��</el-button>
           </template>
         </el-table-column>
       </el-table>
       <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination"/>
     </template>
-    <YwCustomerDeviceWindow ref="deviceWindow" @success="search"/>
+    <YwCustomerDeviceWindow ref="deviceWindow"/>
     <YwCustomerRechargeWindow ref="rechargeWindow" @success="search"/>
   </TableLayout>
 </template>
@@ -113,14 +113,20 @@
         capacity: this.tableData.pagination.pageSize,
         model: this.buildSearchModel()
       }).then(data => {
-        this.tableData.list = data.records
-        this.tableData.pagination.total = data.total
-      }).catch(() => {}).finally(() => { this.isWorking.search = false })
+        this.tableData.list = (data && data.records) || []
+        this.tableData.pagination.total = (data && data.total) || 0
+      }).catch(e => {
+        this.$tip.apiFailed(e)
+      }).finally(() => { this.isWorking.search = false })
     },
     search () {
       this.tableData.pagination.pageIndex = 1
       this.loadList()
     },
+    handleSizeChange (size) {
+      this.tableData.pagination.pageSize = size
+      this.loadList()
+    },
     buildSearchModel () {
       const model = {}
       if (this.searchForm.nameKeyword) model.nameKeyword = this.searchForm.nameKeyword

--
Gitblit v1.9.3