From 1a0e4972f80278bfa9e53283374b745b6c968341 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 13 八月 2024 17:30:57 +0800
Subject: [PATCH] 设备信息管理模块

---
 pages/inspection/scene/info/index.js |   59 +++++++++++++++++------------------------------------------
 1 files changed, 17 insertions(+), 42 deletions(-)

diff --git a/pages/inspection/scene/info/index.js b/pages/inspection/scene/info/index.js
index 9ec8700..b80d78d 100644
--- a/pages/inspection/scene/info/index.js
+++ b/pages/inspection/scene/info/index.js
@@ -1,55 +1,30 @@
-// pages/inspection/scene/info/index.js
-Page({
-  /**
-   * 椤甸潰鐨勫垵濮嬫暟鎹�
-   */
-  data: {},
+import { useDeviceList } from './devicelist-proxy.js';
 
-  /**
-   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
-   */
+Page({
+  behaviors: [useDeviceList],
+  data: {
+    // 鍦烘櫙鍩烘湰淇℃伅
+    scene:{},
+    // 鐩戞祴璁惧淇℃伅
+    monitorDevices:[],
+    // 娌荤悊璁惧淇℃伅
+    treatmentDevices:[],
+    // 鐢熶骇璁惧淇℃伅
+    productionDevices:[],
+  },
+
   onLoad(options) {
     this.getOpenerEventChannel().on('acceptSceneData', data => {
       if (data) {
         this.setData({
           scene: data.scene,
         });
+        [0, 1, 2].forEach(e => {
+          this.fetchDeviceInfo(e);
+        });
       }
     });
   },
 
-  /**
-   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
-   */
-  onReady() {},
-
-  /**
-   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
-   */
-  onShow() {},
-
-  /**
-   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌
-   */
-  onHide() {},
-
-  /**
-   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇
-   */
-  onUnload() {},
-
-  /**
-   * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔
-   */
-  onPullDownRefresh() {},
-
-  /**
-   * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁�
-   */
   onReachBottom() {},
-
-  /**
-   * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜�
-   */
-  onShareAppMessage() {},
 });

--
Gitblit v1.9.3