From 2288061f2d0afd7bd29660a5b724d8c69cb844a9 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 04 三月 2025 09:11:51 +0800
Subject: [PATCH] 改bug

---
 admin/src/views/Inspection/components/OperaYwPatrolSchemeWindow.vue |    6 +++++-
 admin/src/views/roomStatus/index.vue                                |   21 ++++++++++++++-------
 admin/.env.test                                                     |    4 ++--
 3 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/admin/.env.test b/admin/.env.test
index f5bb07b..da78780 100644
--- a/admin/.env.test
+++ b/admin/.env.test
@@ -4,10 +4,10 @@
 # VUE_APP_API_URL  = 'http://192.168.5.13/gateway_interface'
 
 # 浠诲悍
-# VUE_APP_API_URL  = 'http://192.168.0.133:10010'
+VUE_APP_API_URL  = 'http://192.168.0.133:10010'
 
 # 钀嶅
 # VUE_APP_API_URL  = 'http://192.168.0.108:10010/'
 
 # 娴嬭瘯鏈嶅姟
-VUE_APP_API_URL  = 'https://dmtest.ahapp.net/gateway_interface'
+# VUE_APP_API_URL  = 'https://dmtest.ahapp.net/gateway_interface'
diff --git a/admin/src/views/Inspection/components/OperaYwPatrolSchemeWindow.vue b/admin/src/views/Inspection/components/OperaYwPatrolSchemeWindow.vue
index 343b02b..a5e0fe1 100644
--- a/admin/src/views/Inspection/components/OperaYwPatrolSchemeWindow.vue
+++ b/admin/src/views/Inspection/components/OperaYwPatrolSchemeWindow.vue
@@ -118,6 +118,10 @@
     })
   },
   methods: {
+    open(title) {
+      this.title = title
+      this.visible = true
+    },
     __confirmCreate () {
       this.$refs.form.validate((valid) => {
         if (!valid) {
@@ -201,7 +205,7 @@
       detailById(id).then(res => {
         this.form = res
         if (res.userIds) {
-          this.$set(this.form, 'userIds', Number(res.userIds))
+          this.$set(this.form, 'userIds', [...res.userIds.split(',').map(item => Number(item))])
         }
         if (res.startTime) {
           this.$set(this.form, 'selTime', [res.startTime, res.endTime])
diff --git a/admin/src/views/roomStatus/index.vue b/admin/src/views/roomStatus/index.vue
index ebcc6ef..0bdccb2 100644
--- a/admin/src/views/roomStatus/index.vue
+++ b/admin/src/views/roomStatus/index.vue
@@ -82,7 +82,7 @@
                                     <div class="xm_table">
                                         <div style="display: flex; align-items: center; margin-bottom: 15px;">
                                             <el-input v-model="form.code" style="width: 150px; margin-right: 15px;" placeholder="璇疯緭鍏ュ悎鍚岀紪鍙�"></el-input>
-                                            <el-button type="primary" @click="getFetchList">鎼滅储</el-button>
+                                            <el-button type="primary" @click="getFetchList(1)">鎼滅储</el-button>
                                             <el-button @click="clear">閲嶇疆</el-button>
                                         </div>
                                         <el-table
@@ -197,7 +197,7 @@
                                 <div class="xm_table">
                                     <div style="display: flex; align-items: center; margin-bottom: 15px;">
                                         <el-input v-model="form.code" style="width: 150px; margin-right: 15px;" placeholder="璇疯緭鍏ュ悎鍚岀紪鍙�"></el-input>
-                                        <el-button type="primary" @click="getFetchList">鎼滅储</el-button>
+                                        <el-button type="primary" @click="getFetchList(1)">鎼滅储</el-button>
                                         <el-button @click="clear">閲嶇疆</el-button>
                                     </div>
                                     <el-table
@@ -391,7 +391,7 @@
                                     <div class="xm_table">
                                         <div style="display: flex; align-items: center; margin-bottom: 15px;">
                                             <el-input v-model="form.code" style="width: 150px; margin-right: 15px;" placeholder="璇疯緭鍏ュ悎鍚岀紪鍙�"></el-input>
-                                            <el-button type="primary" @click="getFetchList">鎼滅储</el-button>
+                                            <el-button type="primary" @click="getFetchList(1)">鎼滅储</el-button>
                                             <el-button @click="clear">閲嶇疆</el-button>
                                         </div>
                                         <el-table
@@ -571,13 +571,13 @@
                                     <div class="xm_table">
                                         <div class="xm_table_search">
                                             <div class="xm_table_search_left">
-                                                <el-input v-model="form.name" placeholder="璇疯緭鍏ヨ澶囧悕绉�/缂栫爜" style="width: 150px; margin-right: 15px;"></el-input>
+                                                <el-input v-model="form.name" placeholder="璇疯緭鍏ヨ澶囧悕绉�/缂栫爜" style="width: 200px; margin-right: 15px;"></el-input>
                                                 <el-select v-model="form.status" style="width: 150px; margin-right: 15px;" placeholder="璁惧鐘舵��">
                                                     <el-option label="姝e父" :value="0"></el-option>
                                                     <el-option label="鎹熷潖" :value="1"></el-option>
                                                     <el-option label="鎶ュ簾" :value="2"></el-option>
                                                 </el-select>
-                                                <el-button type="primary" @click="getDevicePage">鏌ヨ</el-button>
+                                                <el-button type="primary" @click="getDevicePage(1)">鏌ヨ</el-button>
                                                 <el-button @click="clear">娓呯┖</el-button>
                                             </div>
                                             <el-button type="primary" @click="handleEdit">鏂板</el-button>
@@ -924,7 +924,10 @@
         })
       },
       // 鑾峰彇璁惧鍒嗛〉
-      getDevicePage() {
+      getDevicePage(type) {
+        if (type === 1) {
+          this.page = 1
+        }
         this.loading = true
         devicePage({
           capacity: this.pageTotal,
@@ -1031,6 +1034,7 @@
         })
       },
       clear() {
+        this.page = 1
         this.form.code = ''
         this.form.name = ''
         this.form.status = ''
@@ -1046,7 +1050,10 @@
         }
       },
       // 鑾峰彇褰撳墠鍦ㄧ鍚堝悓
-      getFetchList() {
+      getFetchList(type) {
+        if (type === 1) {
+          this.page = 1
+        }
         this.loading = true
         fetchList({
           capacity: this.pageSize,

--
Gitblit v1.9.3