From d105bd9dd591264a7b1f79f1fdbbf0e764ff073e Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 31 八月 2022 15:39:42 +0800
Subject: [PATCH] 1.修改分页bug

---
 src/views/sbgl/sbqd.vue |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/views/sbgl/sbqd.vue b/src/views/sbgl/sbqd.vue
index 0e390ec..5788568 100644
--- a/src/views/sbgl/sbqd.vue
+++ b/src/views/sbgl/sbqd.vue
@@ -389,6 +389,7 @@
           width="50"
           label="搴忓彿"
           prop="RowNum"
+          fixed
         />
         <el-table-column
           prop="code"
@@ -477,6 +478,7 @@
         <el-table-column
           width="50"
           label="搴忓彿"
+          fixed
           prop="RowNum"
         />
         <el-table-column
@@ -570,7 +572,7 @@
 import Pagination from '@/components/Pagination'
 import {
   AddUpdateDeviceGroup, AddUpdateDeviceManger,
-  AddUpdateDeviceType, DeleteDeviceManger, DeleteDeviceType,
+  AddUpdateDeviceType, DeleteDeviceGroup, DeleteDeviceManger, DeleteDeviceType,
   DeviceGroupSearch,
   DeviceMangerSearch,
   DeviceTypeSearch,
@@ -794,6 +796,9 @@
         DeleteDeviceManger({ devicecode: row.code }).then(res => {
           if (res.code === '200') {
             this.$message.success('鍒犻櫎鎴愬姛!')
+            if (this.form.page > 1 && this.tableData.length === 1) {
+              this.form.page--
+            }
             this.getDeviceMangerSearch()
           }
         })
@@ -927,6 +932,9 @@
         DeleteDeviceType({ devicetypecode: row.code }).then(res => {
           if (res.code === '200') {
             this.$message.success('鍒犻櫎鎴愬姛!')
+            if (this.formDeviceType.page > 1 && this.DeviceTypeArray.length === 1) {
+              this.formDeviceType.page--
+            }
             this.getDeviceTypeSearchDialog()
           }
         })
@@ -1041,6 +1049,9 @@
         DeleteDeviceGroup({ devicegroupcode: row.code }).then(res => {
           if (res.code === '200') {
             this.$message.success('鍒犻櫎鎴愬姛!')
+            if (this.formDeviceGroup.page > 1 && this.DeviceGroupArray.length === 1) {
+              this.formDeviceGroup.page--
+            }
             this.getDeviceGroupSearchDialog()
           }
         })

--
Gitblit v1.9.3