3 Angajamente 71ac46ea12 ... 9675190db7

Autor SHA1 Permisiunea de a trimite mesaje. Dacă este dezactivată, utilizatorul nu va putea trimite nici un fel de mesaj Data
  suixueyan 9675190db7 Merge remote-tracking branch 'origin/master' 6 luni în urmă
  suixueyan 3c3c867260 修改体质调查问卷和睡眠调查问卷不能提交bug 6 luni în urmă
  lkg 58f4576d7a 修改体质调查问卷和睡眠调查问卷不能提交bug 10 luni în urmă

+ 15 - 2
app.js

@@ -1,6 +1,8 @@
 
 
 // app.js
+import api from "./utils/api";
+
 const homeApi_empower = "https://aipush.aidsleep.cn";
 App({
   onLaunch() {
@@ -31,7 +33,7 @@ App({
           },
           success: function (loginRes) {
             // 处理服务器返回的结果  
-            console.log('登录获取结果:', loginRes.data);
+            // console.log('登录获取结果:', loginRes.data);
             if (loginRes.data) {
               wx.setStorageSync("openid", loginRes.data.openid);
               wx.setStorageSync("token", loginRes.data.token);
@@ -86,7 +88,18 @@ App({
                   wx.setStorageSync('hasReportAuth', false);
                 }
               });
-
+              api.isManager({
+                params: {},
+                headers: { unionid: wx.getStorageSync("unionid")},
+              })
+                  .then(data =>{
+                    if (data.code === 1) {
+                      wx.setStorageSync('isManager', data.data);
+                    }else{
+                      wx.setStorageSync('isManager', null);
+                    }
+                  })
+                  .catch(err => console.error('IsManager Error:', err));
             }
           }
         })

+ 8 - 0
app.json

@@ -27,6 +27,14 @@
         "testResultA/testResultA",
         "testResultB/testResultB"
       ]
+    },
+    {
+      "root": "subpagesTwo",
+      "name": "subpagesTwo",
+      "pages": [
+        "seeAlso/seeAico",
+        "seeAisoList/seeAicoList"
+      ]
     }
   ],
   "preloadRule": {

+ 146 - 73
pages/index/index.js

@@ -1,6 +1,10 @@
 // pages/mine/mine.js
 const defaultAvatarUrl = "../../static/images/no-login.png"
 const homeApi_empower = "https://aipush.aidsleep.cn";
+import api from '../../utils/api';
+
+
+
 Page({
 
   /**
@@ -10,84 +14,16 @@ Page({
     showAuthorizedDialog: false,
     showTipsA: false,
     showTipsB: false,
+    show1:false,
+    aid:null,
     hasAuth: false,
+    seeAicoList: "/subpagesTwo/seeAisoList/seeAicoList",
     avatarUrl: defaultAvatarUrl,
     nickName: "用户登录",
     phoneNumber: "",
     latitude: null,
     longitude: null,
-    menuCardList: [{
-      icon: "../../static/index/icon/ic_fjkz.png",
-      bgIcon: "../../static/index/bg/bg_fjkz.png",
-      title: "房间控制",
-      type: "navigate",
-      color: "#3C84D9",
-      bgColor: "#EEF4FF",
-      url: "/subpages/main/main"
-    }, {
-      icon: "../../static/index/icon/ic_sm.png",
-      bgIcon: "../../static/index/bg/bg_sm.png",
-      title: "扫码",
-      type: "navigate",
-      color: "#10B09C",
-      bgColor: "#E6FFFC",
-      url: "/subpages/scan/scan"
-    }, {
-      icon: "../../static/index/icon/ic_jrsmbg.png",
-      bgIcon: "../../static/index/bg/bg_jrsmbg.png",
-      title: "最新睡眠报告",
-      type: "navigate",
-      color: "#8658B9",
-      bgColor: "#F6F3FF",
-      url: "/subpages/data/data"
-    }, {
-      icon: "../../static/index/icon/ic_lssmbg.png",
-      bgIcon: "../../static/index/bg/bg_lssmbg.png",
-      title: "历史睡眠报告",
-      type: "navigate",
-      color: "#BB6268",
-      bgColor: "#FFF6F7",
-      url: "/subpages/sleepReport/sleepReport"
-    }, {
-      icon: "../../static/index/icon/ic_wdcd.png",
-      bgIcon: "../../static/index/bg/bg_wdcd.png",
-      title: "我的床垫",
-      type: "navigate",
-      color: "#317A9B",
-      bgColor: "#E6FFFC",
-      url: "/subpages/myMattress/myMattress"
-    }, {
-      icon: "../../static/index/icon/ic_zxsc.png",
-      bgIcon: "../../static/index/bg/bg_zxsc.png",
-      title: "在线商城",
-      type: "miniProgram",
-      color: "#C2714B",
-      bgColor: "#FFF8F4",
-      appId: "wx63f79b3d61ba632b" || "gh_78da4ac5d0cc",
-      url: "pages/home/dashboard/index"
-    }],
-    menuList: [{
-      icon: "../../static/mine/dcwj.png",
-      title: "健康检测",
-      type: "navigate",
-      url: "/subpages/testSAS/testSAS"
-    }, {
-      icon: "../../static/mine/zxkf.png",
-      title: "在线客服",
-      type: "contact",
-      url: ""
-    }, {
-      icon: "../../static/mine/bzzx.png",
-      title: "帮助中心",
-      type: "navigate",
-      url: "/subpages/helpList/helpList"
-    }, {
-      icon: "../../static/mine/gywm.png",
-      title: "关于我们",
-      type: "navigate",
-      url: ""
-    }]
-
+    menuCardList: []
   },
   getLocation() {
     const that = this;
@@ -189,6 +125,45 @@ Page({
     }
 
   },
+  bindAccount(){
+// 调用 /data/api.data/bind
+    api.bind({
+      params: { aid: this.data.aid ||10011},
+      headers: { unionid: wx.getStorageSync("unionid")},
+    })
+        .then(data =>{
+          if (data.code === 1) {
+            wx.showToast({
+              icon: 'none',
+              title: data.info,
+            });
+          }else{
+            wx.showToast({
+              icon: 'none',
+              title: data.info,
+            });
+          }
+          this.isManager()
+        })
+        .catch(err => console.error('Bind Error:', err));
+
+  },
+  isManager(){
+    // 调用 /data/api.data/isManager
+    api.isManager({
+      params: {},
+      headers: { unionid: wx.getStorageSync("unionid")},
+    })
+        .then(data =>{
+          if (data.code === 1) {
+            wx.setStorageSync('isManager', data.data);
+          }else{
+            wx.setStorageSync('isManager', null);
+          }
+          this.initMenuCardList()
+        })
+        .catch(err => console.error('IsManager Error:', err));
+  },
   toPage(index) {
     const type = this.data.menuList[index].type;
     const url = this.data.menuList[index].url;
@@ -384,6 +359,12 @@ Page({
    */
   onLoad(options) {
     wx.hideTabBar()
+    if (options.aid){
+      this.setData({
+        aid:options.aid
+      })
+    }
+    this.initMenuCardList()
     // this.toSubscriptions();
   },
 
@@ -394,7 +375,18 @@ Page({
     wx.hideTabBar()
     this.getLocation();
   },
-
+  bindAccountPopup() {
+    this.bindAccount()
+    this.setData({
+      show1: false,
+      aid:null
+    });
+  },
+  onClose() {
+    this.setData({
+      show1: false,
+    });
+  },
   /**
    * 生命周期函数--监听页面显示
    */
@@ -402,6 +394,7 @@ Page({
 
     wx.hideTabBar()
     this.checkAuth()
+
   },
   showDialog() {
     var hasAuth = wx.getStorageSync("hasAuth");
@@ -424,6 +417,13 @@ Page({
         avatarUrl: userInfo.avatarUrl || defaultAvatarUrl,
         phoneNumber: userInfo.phoneNumber || ""
       })
+      this.initMenuCardList()
+      var storageSync = wx.getStorageSync("unionid");
+      if (storageSync &&this.data.aid) {
+          this.setData({
+            show1: true,
+          })
+      }
       // 判断扫码控制权限
       wx.request({
         url: `${homeApi_empower}/wxstatus`,
@@ -456,6 +456,79 @@ Page({
     }
     return hasAuth;
   },
+  initMenuCardList(){
+    this.setData({menuCardList:[{
+      icon: "../../static/index/icon/ic_fjkz.png",
+      bgIcon: "../../static/index/bg/bg_fjkz.png",
+      title: "房间控制",
+      type: "navigate",
+      color: "#3C84D9",
+      bgColor: "#EEF4FF",
+      url: "/subpages/main/main"
+    }, {
+      icon: "../../static/index/icon/ic_sm.png",
+      bgIcon: "../../static/index/bg/bg_sm.png",
+      title: "扫码",
+      type: "navigate",
+      color: "#10B09C",
+      bgColor: "#E6FFFC",
+      url: "/subpages/scan/scan"
+    }, {
+      icon: "../../static/index/icon/ic_jrsmbg.png",
+      bgIcon: "../../static/index/bg/bg_jrsmbg.png",
+      title: "最新睡眠报告",
+      type: "navigate",
+      color: "#8658B9",
+      bgColor: "#F6F3FF",
+      url: "/subpages/data/data"
+    }, {
+      icon: "../../static/index/icon/ic_lssmbg.png",
+      bgIcon: "../../static/index/bg/bg_lssmbg.png",
+      title: "历史睡眠报告",
+      type: "navigate",
+      color: "#BB6268",
+      bgColor: "#FFF6F7",
+      url: "/subpages/sleepReport/sleepReport"
+    }, {
+      icon: "../../static/index/icon/ic_wdcd.png",
+      bgIcon: "../../static/index/bg/bg_wdcd.png",
+      title: wx.getStorageSync("isManager")?"巡检房间" : "我的床垫",
+      type: "navigate",
+      color: "#317A9B",
+      bgColor: "#E6FFFC",
+      url: wx.getStorageSync("isManager")?this.data.seeAicoList+'?hotel_id='+wx.getStorageSync("isManager")[0]  : "/subpages/myMattress/myMattress"
+    }, {
+      icon: "../../static/index/icon/ic_zxsc.png",
+      bgIcon: "../../static/index/bg/bg_zxsc.png",
+      title: "在线商城",
+      type: "miniProgram",
+      color: "#C2714B",
+      bgColor: "#FFF8F4",
+      appId: "wx63f79b3d61ba632b" || "gh_78da4ac5d0cc",
+      url: "pages/home/dashboard/index"
+    }],
+        menuList: [{
+      icon: "../../static/mine/dcwj.png",
+      title: "健康检测",
+      type: "navigate",
+      url: "/subpages/testSAS/testSAS"
+    }, {
+      icon: "../../static/mine/zxkf.png",
+      title: "在线客服",
+      type: "contact",
+      url: ""
+    }, {
+      icon: "../../static/mine/bzzx.png",
+      title: "帮助中心",
+      type: "navigate",
+      url: "/subpages/helpList/helpList"
+    }, {
+      icon: "../../static/mine/gywm.png",
+      title: "关于我们",
+      type: "navigate",
+      url: ""
+    }]})
+  },
   authorizationSuccessful() {
     console.log("授权成功");
     this.setData({ showAuthorizedDialog: false })

+ 14 - 1
pages/index/index.wxml

@@ -68,6 +68,19 @@
             </view>
         </view>
     </van-popup>
-
+    <van-popup  show="{{ show1 }}"  round bind:close="onClose">
+        <view class="popup-box-1 flex-column flex-level-center">
+            <view class="popup-title-1">巡检人员绑定</view>
+            <view class="popup-text-1 flex-level-center">确定要绑定该微信号为巡检人员吗?</view>
+            <view class="flex-level-center">
+                <view bind:tap="bindAccountPopup" class="popup-btn-b end-see-aico-btn-color-1 flex-vertical-center flex-level-center" style="margin-right: 20rpx">
+                    确定
+                </view >
+                <view  bind:tap="onClose"  class="popup-btn-b end-see-aico-btn-color-2 flex-vertical-center flex-level-center">
+                    关闭
+                </view>
+            </view>
+        </view>
+    </van-popup>
 
 </view>

+ 62 - 0
pages/index/index.wxss

@@ -247,4 +247,66 @@ page {
     margin-bottom: 40rpx;
     color: #6C6970;
     font-size: 24rpx;
+}
+.popup-box-1{
+    width: 572rpx;
+    height: 352rpx;
+    padding:  0 40rpx;
+    background: #FFFFFF;
+    border-radius: 24rpx 24rpx 24rpx 24rpx;
+    box-sizing: border-box;
+}
+
+.popup-title-1{
+    font-weight: 400;
+    font-size: 32rpx;
+    color: #333333;
+    line-height: 40rpx;
+    text-align: center;
+    font-style: normal;
+    text-transform: none;
+}
+.popup-text-1{
+    color: #777777;
+    margin: 40rpx 0;
+    text-align: center;
+    text-overflow: ellipsis;
+}
+.popup-btn-b{
+    width: 236rpx;
+    height: 72rpx;
+    border-radius: 292rpx 292rpx 292rpx 292rpx;
+    font-weight: 400;
+    font-size: 28rpx;
+    color: #FFFFFF;
+    line-height: 40rpx;
+    text-align: center;
+    font-style: normal;
+    text-transform: none;
+}
+
+.popup-abnormal-img {
+    height: 48rpx;
+    width: 48rpx;
+    margin-right: 16rpx;
+}
+.flex-level-center {
+    display: flex;
+    /*水平居中*/
+    justify-content: center;
+}
+.flex-vertical-center {
+    display: flex;
+    /*垂直居中*/
+    align-items: center;
+}
+.end-see-aico-btn-color-1{
+    background: linear-gradient( 315deg, #0ABCA4 0%, rgba(11,195,170,0.8) 100%);
+}
+.end-see-aico-btn-color-2{
+    background: linear-gradient( 315deg, #FF6C2E 0%, #FF9B71 100%);
+}
+.flex-column {
+    display: flex;
+    flex-direction: column;
 }

+ 14 - 0
project.private.config.json

@@ -128,6 +128,20 @@
           "query": "",
           "launchMode": "default",
           "scene": null
+        },
+        {
+          "name": "subpagesTwo/seeAlso/seeAico",
+          "pathName": "subpagesTwo/seeAlso/seeAico",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "subpagesTwo/seeAisoList/seeAicoList",
+          "pathName": "subpagesTwo/seeAisoList/seeAicoList",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
         }
       ]
     }

+ 33 - 20
subpages/addMattresses/addMattresses.js

@@ -4,6 +4,7 @@ const app = getApp();
 const util = require('../../utils/util.js');
 const timeOut = 40; //超时时间
 var timeId = "";
+var showDialog = false;
 var sequenceControl = 0;
 Page({
 
@@ -254,7 +255,7 @@ Page({
                             //       //   item['beOnline'] = 'icon-deng-ok';
                             //       // }
                             //     }
-                                deviceList.push(item);
+                            deviceList.push(item);
                             //   },
                             //   fail: function (error) {
                             //     console.error(error);
@@ -303,7 +304,7 @@ Page({
       deviceId: deviceId,
       sn: nameList[1]
     })
-      wx.offBluetoothDeviceFound()
+    wx.offBluetoothDeviceFound()
   },
   // 开始配网
   bindViewConnect() {
@@ -430,7 +431,7 @@ Page({
     self.onTimeout(0);
     //console.log('deviceId = ' + self.data.deviceId)
     wx.createBLEConnection({
-      // 这里的 deviceId 需要已经通过 createBLEConnection 与对应设备建立链接 
+      // 这里的 deviceId 需要已经通过 createBLEConnection 与对应设备建立链接
       deviceId: self.data.deviceId,
       timeout: 10000,
       success: function (res) {
@@ -462,7 +463,7 @@ Page({
   getDeviceServices: function (deviceId) {
     var self = this;
     wx.getBLEDeviceServices({
-      // 这里的 deviceId 需要已经通过 createBLEConnection 与对应设备建立链接 
+      // 这里的 deviceId 需要已经通过 createBLEConnection 与对应设备建立链接
       deviceId: deviceId,
       success: function (res) {
         self.setProcess(10, util.descSucList[1], 2);
@@ -487,7 +488,7 @@ Page({
     //console.log(" ============== getDeviceCharacteristics =============== ");
     var self = this;
     wx.getBLEDeviceCharacteristics({
-      // 这里的 deviceId 需要已经通过 createBLEConnection 与对应设备建立链接 
+      // 这里的 deviceId 需要已经通过 createBLEConnection 与对应设备建立链接
       deviceId: deviceId,
       serviceId: serviceId,
       success: function (res) {
@@ -522,14 +523,25 @@ Page({
         num++;
       } else {
         clearInterval(timeId);
-        wx.showModal({
-          title: '提示',
-          content: '配网失败,请检查wifi密码或设备是否连接正常',
-          showCancel: false
-        });
-        self.setData({
-          showBluetoothConnected: false
-        });
+        if (!showDialog) {
+          showDialog = true;
+          wx.showModal({
+            title: '提示',
+            content: '配网失败,请检查wifi密码或设备是否连接正常',
+            showCancel: false,
+            success(res) {
+              showDialog = false;
+              if (res.confirm) {
+                console.log('用户点击确定')
+              } else if (res.cancel) {
+                console.log('用户点击取消')
+              }
+            }
+          });
+          self.setData({
+            showBluetoothConnected: false
+          });
+        }
         // self.setFailProcess(true, util.descFailList[4]);
       }
     }, 1000)
@@ -589,7 +601,7 @@ Page({
   writeDevice: function (deviceId, serviceId, characteristicId, data) {
     //console.log("===== writeDevice =====");
     var self = this,
-      obj = {};
+        obj = {};
     self.setProcess(60, util.descSucList[4], 3);
     sequenceControl = parseInt(sequenceControl) + 1;
     if (!util._isEmpty(data)) {
@@ -674,7 +686,7 @@ Page({
   },
   setProcess: function (value, desc, step = 0) {
     var self = this,
-      list = [];
+        list = [];
     list = self.data.processList;
     if (list.indexOf(desc) == -1) {
       list.push(desc);
@@ -706,7 +718,7 @@ Page({
 
   setFailProcess: function (flag, desc) {
     var self = this,
-      list = [];
+        list = [];
     list = self.data.processList;
     list.push(desc);
     self.setData({
@@ -728,10 +740,10 @@ Page({
     wx.authorize({
       scope: 'scope.bluetooth',
       success() {
-        // 用户同意授权后再次获取位置  
+        // 用户同意授权后再次获取位置
       },
       fail() {
-        // 用户拒绝授权  
+        // 用户拒绝授权
       }
     });
     this.getWifiInfo();
@@ -769,6 +781,7 @@ Page({
       data: {
         token: "89835e65993fee4a6a6cbbe4c271da51e5521822934e13769e61cadabaed72c3" || wx.getStorageSync('token'),
         sntram: sntram,
+        udi: wx.getStorageSync('unionid'),
       },
       success: (res) => {
         var incustom = res.data.incustom;
@@ -777,7 +790,7 @@ Page({
         } else {
           wx.showToast({
             icon: 'none',
-            title: "sn 不合法"
+            title: res.data.error || "sn 不合法"
           });
         }
       },
@@ -823,7 +836,7 @@ Page({
     wx.removeStorageSync('deviceList')
     clearInterval(timeId);
     this.closeConnect()
-    
+
   },
 
   /**

+ 21 - 31
subpages/data/data.js

@@ -1274,7 +1274,7 @@ Page({
 
 	getRsleep_arr(list) {
 		if (list) {
-			console.log("getRsleep_arr_list1==" + JSON.stringify(list));
+			// console.log("getRsleep_arr_list1==" + JSON.stringify(list));
 			for (let i = 0; i < list.length; i++) {
 				if (list[i] == '0') {
 					list[i] = '清醒';
@@ -1289,11 +1289,11 @@ Page({
 				}
 			}
 		}
-		console.log("getRsleep_arr_list2==" + JSON.stringify(list));
+		// console.log("getRsleep_arr_list2==" + JSON.stringify(list));
 	},
 	getFrequency(list) {//获取
 		if (list) {
-			console.log("getRsleep_arr_list1==" + JSON.stringify(list));
+			// console.log("getRsleep_arr_list1==" + JSON.stringify(list));
 			for (let i = 0; i < list.length; i++) {
 				if (list[i] == '0') {
 					list[i] = '清醒';
@@ -1308,7 +1308,7 @@ Page({
 				}
 			}
 		}
-		console.log("getRsleep_arr_list2==" + JSON.stringify(list));
+		// console.log("getRsleep_arr_list2==" + JSON.stringify(list));
 	},
 	splitN(originalArray, n) {
 		if (!originalArray) return [];
@@ -1332,7 +1332,7 @@ Page({
 		for (let i = 0; i < list.length; i++) {
 			if (list[i] == o) frequency++;
 		}
-		console.log('frequency=' + frequency);
+		// console.log('frequency=' + frequency);
 		return frequency;
 	},
 	getTimeDiffInHours: function (startTimeStr, endTimeStr) {
@@ -1434,8 +1434,8 @@ Page({
 		// 状态映射  
 		const statusMap = {
 			"0": "清醒",
-			"10": "浅睡",
-			"20": "睡",
+			"10": "REM",
+			"20": "睡",
 			"30": "深睡"
 		};
 		// 状态映射  
@@ -1457,7 +1457,7 @@ Page({
 		let dateString = `${that.data.reportDate.replaceAll("-", "/")} ${that.data.rgobed_time + ":00"}`;
 		let date = new Date(dateString);
 		let startTime = date.getTime(); // 基准时间,这里设为午夜开始 
-		console.log("时间=》", timestampToHHMM(startTime));
+		// console.log("时间=》", timestampToHHMM(startTime));
 
 		let oldTime = startTime;
 		let currentTime = startTime;
@@ -1529,11 +1529,11 @@ Page({
 		});
 		// console.log("睡眠数据最终=>", dateString);
 		// console.log("睡眠数据最终=>", startTime);
-		console.log("睡眠数据最终=>", JSON.stringify(timePeriods));
+		// console.log("睡眠数据最终=>", JSON.stringify(timePeriods));
 	},
 	// 授权成功
 	authorizationSuccessful() {
-		console.log("授权成功");
+		// console.log("授权成功");
 		this.setData({ showAuthorizedDialog: false })
 		this.showData();
 	},
@@ -1590,10 +1590,7 @@ Page({
 	},
 	onTitleChange(event) {
 		const { picker, value, index } = event.detail;
-		console.log(`当前值:${value.rpid}, 当前索引:${index}`);
-		console.log(`当前值:${value.bedname}, 当前索引:${index}`);
-		console.log(`当前值:${value.hotelname}, 当前索引:${index}`);
-		console.log(`当前值:${value.roomname}, 当前索引:${index}`);
+
 		this.setData({
 			reportId: value.rpid,
 			hotelname: value.hotelname,
@@ -1605,7 +1602,6 @@ Page({
 	},
 	onSnChange(event) {
 		const { picker, value, index } = event.detail;
-		console.log(`当前值:${value.sn}, 当前索引:${index}`);
 		this.closePicker();
 		this.getDateData(value.sn);//自动获取日期
 		// 
@@ -1613,13 +1609,11 @@ Page({
 	},
 	onDateChange(event) {
 		const { picker, value, index } = event.detail;
-		console.log(`当前值:${value.rdate}, 当前索引:${index}`);
 		this.closePicker();
 		this.getDateTimeData(value.rdate);//自动获取时间段
 	},
 	onDateTimeChange(event) {
 		const { picker, value, index } = event.detail;
-		console.log(`当前值:${value.rpids}, 当前索引:${index}`);
 		this.setData({
 			reportId: value.rpids
 		});
@@ -1633,7 +1627,6 @@ Page({
 			return
 		}
 		var type = e.currentTarget.dataset.type;
-		console.log(type);
 
 		if (type == 'sn' && this.data.selectTitleList.length) {
 			this.setData({
@@ -1738,11 +1731,8 @@ Page({
 			success(res) {
 				try {
 					if (res && res.data && res.data.data) {
-						console.log("睡眠数据最终33=>", res.data);
 						if (res.data.data.value2) {
-							console.log("睡眠数据最终444=>", res.data.data.value2);
 							var data = JSON.parse(res.data.data.value2);
-							console.log("睡眠数据最终555=>", data);
 
 							var ratingResultsMap = {
 								A: {
@@ -1784,8 +1774,8 @@ Page({
 								}
 							};
 							var key = that.findKeyWithMaxValue(data);
-							console.log("睡眠数据最终555=>", ratingResultsMap[key]);
-							console.log("睡眠数据最终555=>", key);
+							// console.log("睡眠数据最终555=>", ratingResultsMap[key]);
+							// console.log("睡眠数据最终555=>", key);
 							that.setData({
 								tzTitle: ratingResultsMap[key]?.title ?? "健康型",
 								tzSubTitle: ratingResultsMap[key]?.subTitle ?? "太棒了,您的身体非常健康,请继续保持",
@@ -1991,7 +1981,7 @@ Page({
 			success(ress) {
 				try {
 					if (ress && ress.data) {
-						console.log('ress.data-getunionsingle=' + JSON.stringify(ress.data));
+						// console.log('ress.data-getunionsingle=' + JSON.stringify(ress.data));
 
 						if (ress.data == {} || ress.data.data == {} || ress.data.data == [] || !ress.data.data) {
 							// wx.showModal({
@@ -2249,7 +2239,7 @@ Page({
 				rdt_arrNew: rdt_arrTemp,
 				rrh_arrNew: rrh_arrTemp,
 			});
-			console.log("that.data.rdt_arrNew,that.data.rrh_arrNew=" + that.data.rdt_arrNew + "," + that.data.rrh_arrNew);
+			// console.log("that.data.rdt_arrNew,that.data.rrh_arrNew=" + that.data.rdt_arrNew + "," + that.data.rrh_arrNew);
 			updateCardiacSystem(that.data.rdt_arrNew, that.data.rrh_arrNew, that);
 		} catch (error) {
 			console.error(error);
@@ -2287,7 +2277,7 @@ Page({
 		} catch (error) {
 			console.error(error);
 		}
-		console.log("that.data.rsleep_arr=" + that.data.rsleep_arr);
+		// console.log("that.data.rsleep_arr=" + that.data.rsleep_arr);
 
 	},
 	initOutOfBed(ress) {//离床次数
@@ -2310,7 +2300,7 @@ Page({
 		} catch (error) {
 			console.error(error);
 		}
-		console.log("that.data.routbed_arr=" + that.data.routbed_arr);
+		// console.log("that.data.routbed_arr=" + that.data.routbed_arr);
 	},
 	initBodyMovements(ress) {//体动次数
 		var that = this;
@@ -2334,7 +2324,7 @@ Page({
 		} catch (error) {
 			console.error(error);
 		}
-		console.log("c8_that.data.rmove_arr=" + that.data.rmove_arr);
+		// console.log("c8_that.data.rmove_arr=" + that.data.rmove_arr);
 	},
 	initChartRespiratory(ress) {//平均呼吸率
 		var that = this;
@@ -2356,7 +2346,7 @@ Page({
 		} catch (error) {
 			console.error(error);
 		}
-		console.log("c81_that.data.ravg_hx_value=" + that.data.ravg_hx_value);
+		// console.log("c81_that.data.ravg_hx_value=" + that.data.ravg_hx_value);
 	},
 	initChartSnoring(ress) {//打鼾
 		var that = this;
@@ -2378,7 +2368,7 @@ Page({
 		} catch (error) {
 			console.error(error);
 		}
-		console.log("c8_that.data.rmove_arr=" + that.data.rmove_arr);
+		// console.log("c8_that.data.rmove_arr=" + that.data.rmove_arr);
 	},
 	initChartApnea(ress) {//呼吸暂停
 		var that = this;
@@ -2399,7 +2389,7 @@ Page({
 		} catch (error) {
 			console.error(error);
 		}
-		console.log("c8_that.data.rhxstop_arr=" + that.data.rhxstop_arr);
+		// console.log("c8_that.data.rhxstop_arr=" + that.data.rhxstop_arr);
 
 	},
 	mounted() {

+ 4 - 4
subpages/data/data.wxml

@@ -439,7 +439,7 @@
 					<view
 						style="width: 8rpx;height: 24rpx;margin-right: 16rpx; background: linear-gradient( 180deg, #75BDE0 0%, #75BDE0 100%);border-radius: 2rpx">
 					</view>
-					<text class="card-t3">浅睡</text>
+					<text class="card-t3">REM</text>
 				</view>
 				<view class="card-item">
 					<view
@@ -451,7 +451,7 @@
 					<view
 						style="width: 8rpx;height: 24rpx;margin-right: 16rpx;  background: linear-gradient( 180deg, #F7E3BA 0%, #F7E3BA 100%);border-radius: 2rpx">
 					</view>
-					<text class="card-t3">REM</text>
+					<text class="card-t3">浅睡</text>
 				</view>
 			</view>
 			<view class="card-h" style="margin-top: 30rpx;position: relative;">
@@ -487,7 +487,7 @@
 				<view class="card-item2">
 					<view class="card-h" style="justify-content: space-between;align-items: center;">
 						<view
-							style="width: 16rpx;height: 16rpx;background: linear-gradient( 180deg, #75BDE0 0%, #75BDE0 100%);border-radius: 4rpx;">
+							style="width: 16rpx;height: 16rpx;background:linear-gradient( 180deg, #F7E3BA 0%, #F7E3BA 100%); border-radius: 4rpx;">
 						</view>
 						<text style="flex: 1;margin-left: 20rpx;font-size: 28rpx;color: #3E3D44;">浅睡</text>
 						<text style="font-size: 28rpx;color: #3E3D44;font-weight: 700;">{{rin_duration_efficiency ||
@@ -519,7 +519,7 @@
 
 
 						<view
-							style="width: 16rpx;height: 16rpx;background: linear-gradient( 180deg, #F7E3BA 0%, #F7E3BA 100%);border-radius: 4rpx;">
+							style="width: 16rpx;height: 16rpx;background: linear-gradient( 180deg, #75BDE0 0%, #75BDE0 100%);border-radius: 4rpx;">
 						</view>
 
 

BIN
subpagesTwo/images/seeAico/icon-1.png


BIN
subpagesTwo/images/seeAicoDetails/icon-1.png


BIN
subpagesTwo/images/seeAicoDetails/icon-10.png


BIN
subpagesTwo/images/seeAicoDetails/icon-2.png


BIN
subpagesTwo/images/seeAicoDetails/icon-3.png


BIN
subpagesTwo/images/seeAicoDetails/icon-4.png


BIN
subpagesTwo/images/seeAicoDetails/icon-5.png


BIN
subpagesTwo/images/seeAicoDetails/icon-6.png


BIN
subpagesTwo/images/seeAicoDetails/icon-7.png


BIN
subpagesTwo/images/seeAicoDetails/icon-8.png


BIN
subpagesTwo/images/seeAicoDetails/icon-9.png


+ 66 - 0
subpagesTwo/seeAisoList/seeAicoList.js

@@ -0,0 +1,66 @@
+import api from "../../utils/api";
+
+Page({
+    data: {
+        notesInput: '',
+        hotel_id:0,
+        hotel_info:{},
+        boomListInit:[],
+        boomList:[]
+    },
+    onLoad: function (options) {
+        this.setData({
+            hotel_id:options.hotel_id
+        })
+    },
+    onShow: function () {
+        this.getRooms()
+    },
+    bindNotesInput: function (e) {
+        this.setData({
+            notesInput: e.detail.value
+        });
+        if (!this.data.notesInput ||this.data.notesInput.length ===0) {
+
+            this.setData({
+                boomList: this.data.boomListInit
+            });
+         }else{
+            this.setData({
+                boomList: this.data.boomListInit.filter(item => item.room_no.indexOf(this.data.notesInput) > -1)
+            });
+        }
+    },
+    onJump: function (e) {
+        var room = e.currentTarget.dataset.room;
+        if (room.nuc && room.nuc.online ==='yes'){
+            wx.navigateTo({
+                url: '/subpagesTwo/seeAlso/seeAico?room_id='+room.id+"&hotel_name="+this.data.hotel_info.hotel_name+"&room_name="+(room.room_no||'--')
+            })
+        }else{
+            wx.showToast({
+                icon: 'none',
+                title: "房间异常请联系管理员!",
+            });
+        }
+
+    },
+    getRooms: function () {
+        api.getRooms({
+            params: {hotel_id: this.data.hotel_id},
+            headers: { unionid: wx.getStorageSync("unionid")},
+        })
+            .then(data =>{
+                if (data.code ===1){
+                    console.log(data.rooms)
+                    this.setData({
+                        hotel_info:data.data.hotel,
+                        boomList:data.data.rooms,
+                        boomListInit:data.data.rooms
+                    })
+                }
+            })
+            .catch(err => console.error('IsManager Error:', err));
+    },
+
+});

+ 7 - 0
subpagesTwo/seeAisoList/seeAicoList.json

@@ -0,0 +1,7 @@
+{
+  "usingComponents": {
+  },
+  "navigationBarBackgroundColor": "#ffffff",
+  "navigationBarTextStyle": "black",
+  "navigationBarTitleText": "智能设备巡检"
+}

+ 28 - 0
subpagesTwo/seeAisoList/seeAicoList.wxml

@@ -0,0 +1,28 @@
+<view class="content">
+    <view class="see-aico-info flex-vertical-center">
+        <view class="see-aico-item flex-vertical-center">
+            <image src="/subpagesTwo/images/seeAicoDetails/icon-1.png" class="see-aico-img"></image>
+            <view class="see-aico-text">{{hotel_info.hotel_name}}</view>
+        </view>
+        <view class="see-aico-item flex-vertical-center" style="margin-left: 20rpx; width: 100%">
+            <image src="/subpagesTwo/images/seeAico/icon-1.png" class="see-aico-img"></image>
+            <input type="text" class="bindNotesInput" bindinput="bindNotesInput"   value="{{ notesInput }}" placeholder="房间编号搜索"  />
+        </view>
+    </view>
+    <view  bind:tap="onJump" data-room="{{item}}"  class="see-aico-list see-aico-list-tbm-1 flex-vertical-center {{item.nuc && item.nuc.online ==='yes'? item.checked===0 ?'bg-col-3' :  'bg-col-1' : 'bg-col-2' }}" wx:for="{{ boomList }}"
+          wx:key="index">
+        <view class="room-number">
+            <view class="room-number-text">{{item.room_no||'--'}}</view>
+            <view class="item-title">房间号</view>
+        </view>
+        <view class="inspection-date">
+            <view class="inspection-date-text">{{item.checkLog?item.checkLog.updated_date:'--'}}</view>
+            <view class="item-title">上次巡检时间</view>
+        </view>
+        <view class="room-status">
+            <view class="room-status-title">
+            </view>
+            <text class="room-status-text {{item.nuc && item.nuc.online ==='yes'? item.checked===0 ?'status-text-col-3' : 'status-text-col-1' : 'status-text-col-2'  }}">{{item.nuc && item.nuc.online ==='yes'? item.checked===0  ?'需巡检' :'正常' :  '异常'  }}  </text>
+        </view>
+    </view>
+</view>

+ 172 - 0
subpagesTwo/seeAisoList/seeAicoList.wxss

@@ -0,0 +1,172 @@
+page {
+    background: #F8F9FA;
+}
+
+.content {
+    width: 100vw;
+    display: flex;
+    flex-direction: column;
+    padding: 30rpx;
+    position: relative;
+    box-sizing: border-box;
+}
+
+.see-aico-info {
+    width: 100%;
+    height: 84rpx;
+    margin-bottom: 20rpx;
+}
+
+.flex-level-center {
+    display: flex;
+    /*水平居中*/
+    justify-content: center;
+}
+
+.flex-vertical-center {
+    display: flex;
+    /*垂直居中*/
+    align-items: center;
+}
+
+.flex-column {
+    display: flex;
+    flex-direction: column;
+}
+
+.flex-space-between {
+    display: flex;
+    justify-content: space-between;
+}
+
+.see-aico-item {
+    display: flex;
+    height: 100%;
+    padding: 0 30rpx;
+    background: #FFFFFF;
+    box-shadow: 20rpx 8rpx 20rpx 0rpx rgba(219, 225, 231, 0.2);
+    border-radius: 12rpx 12rpx 12rpx 12rpx;
+    white-space: nowrap;
+}
+
+.see-aico-img {
+    width: 36rpx;
+    height: 36rpx;
+    margin-right: 12rpx;
+}
+
+.see-aico-text {
+    height: 36rpx;
+    font-weight: 400;
+    font-size: 30rpx;
+    color: #333333;
+    line-height: 36rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+    align-items: center;
+}
+
+.bindNotesInput {
+    height: 36rpx;
+    width: 100%;
+    font-weight: 400;
+    font-size: 26rpx;
+    color: #888888;
+    line-height: 36rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+}
+
+.see-aico-list {
+    width: 100%;
+    background: #FFFFFF;
+    box-shadow: 20rpx 8rpx 20rpx 0rpx rgba(219, 225, 231, 0.2);
+    border-radius: 12rpx 12rpx 12rpx 12rpx;
+    margin-bottom: 16rpx;
+    box-sizing: border-box;
+    padding: 0 30rpx;
+}
+.bg-col-1{
+    background: #EDFFFD;
+}
+.bg-col-2{
+    background-color: #FFFFFF ;
+}
+.bg-col-3{
+    background: #FFE5E5;
+}
+
+.status-text-col-1{
+    color: #0BC3AA;
+}
+.status-text-col-2{
+   color: #F76666 ;
+}
+.status-text-col-3{
+    color: #F76666 ;
+}
+.see-aico-list-tbm-1 {
+    padding-top: 30rpx;
+    padding-bottom: 30rpx;
+}
+.room-number{
+    flex:3;
+    margin-left: 40rpx;
+    height: 100%;
+}
+.room-number-text{
+    font-weight: 400;
+    font-size: 36rpx;
+    color: #333333;
+    line-height: 48rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+}
+.inspection-date{
+    flex:4;
+    height: 100%;
+}
+.inspection-date-text{
+    font-weight: 400;
+    font-size: 28rpx;
+    color: #333333;
+    line-height: 40rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+    margin-bottom: 8rpx;
+}
+.room-status{
+    flex:2;
+    display: flex;
+    justify-content: flex-end;
+    height: 100%;
+}
+.room-status-title{
+    width: 2rpx;
+    height: 32rpx;
+    background: #DEDEDE;
+    border-radius: 0rpx 0rpx 0rpx 0rpx;
+    margin-right: 30rpx;
+}
+
+.room-status-text{
+    font-weight: 400;
+    font-size: 30rpx;
+    line-height: 36rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+}
+.item-title{
+    font-weight: 400;
+    font-size: 24rpx;
+    color: #777777;
+    line-height: 36rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+}

+ 166 - 0
subpagesTwo/seeAlso/seeAico.js

@@ -0,0 +1,166 @@
+import api from "../../utils/api";
+
+Page({
+    data: {
+        pageStatus: 2,
+        notesInput: '',
+        room_name: '--',
+        hotel_name: '--',
+        count: 0,
+        normal: 0,
+        abnormal: 0,
+        abnormal_d_name: '--',
+        room_id: 0,
+        show1: false,
+        show2: false,
+        show2Text: '',
+        roomInfo: {},
+        logsInfo: {},
+        deviceList: []
+    },
+    onLoad: function (options) {
+        this.setData({
+            room_id: options.room_id
+            , room_name: options.room_name
+            , hotel_name: options.hotel_name,
+            pageStatus: 0
+        })
+
+    },
+    bindNotesInput: function (e) {
+        this.setData({
+            notesInput: e.detail.value
+        });
+        console.log(this.data.notesInput)
+    },
+    onClose() {
+        this.setData({
+            show1: false, show2: false
+        });
+    },
+    onShow() {
+        this.setData({
+            pageStatus: 0
+            , notesInput: ''
+            , deviceList: []
+            , logsInfo: {}
+            , roomInfo:{}
+        });
+    },
+    onShow1() {
+        this.setData({
+            show1: true
+        });
+    },
+    onShow2(text=null) {
+        this.setData({
+            show2: true,
+            show2Text: text
+        });
+    },
+    onStartInspection() {
+        api.startCheck({
+            params: {room_id: this.data.room_id},
+            headers: {unionid: wx.getStorageSync("unionid")},
+        })
+            .then(data => {
+                if (data.code === 1) {
+                    wx.showToast({
+                        icon: 'none',
+                        title: "开始巡检",
+                    });
+                    this.setData({
+                        deviceList:[],
+                        logsInfo: {},
+                        roomInfo:{}
+                    })
+                    this.getNucEquips()
+                    this.setData({pageStatus: 1});
+                } else {
+                    this.onShow2(data.info|| "巡检异常请联系管理员")
+                }
+            })
+            .catch(err => {
+
+                this.onShow2("巡检异常请联系管理员")
+            });
+    }
+    ,
+    getNucEquips() {
+        api.nucEquips({
+            params: {room_id: this.data.room_id},
+            headers: {unionid: wx.getStorageSync("unionid")}
+        }).then(data => {
+            if (data.code === 1) {
+                var logs = data.data.logs|| {};
+                this.setData({
+                    deviceList: logs.inspection || [],
+                    logsInfo:logs,
+                    roomInfo:data.data.room||{}
+                })
+            }else{
+                this.onShow2(data.info|| "获取设备列表失败,请联系管理员!")
+            }
+        }).catch(err => {
+            this.onShow2("获取设备列表失败,请联系管理员!")
+        });
+    },
+    onConfirm() {
+        api.confirm({
+            body: {note: this.data.notesInput,id: this.data.logsInfo.id},
+            headers: {unionid: wx.getStorageSync("unionid")}
+        }).then(data => {
+            if (data.code === 1) {
+                this.setData({
+                     pageStatus: 0
+                    , notesInput: ''
+                    , deviceList: []
+                    , logsInfo: {}
+                    , roomInfo:{}
+                });
+            }else{
+                this.onShow2(data.info|| "提交失败,请联系管理员!")
+            }
+        }).catch(err => {
+            this.onShow2( "提交失败,请联系管理员!")
+        });
+        this.onClose()
+    },
+    onClosePage() {
+        this.onConfirm()
+        wx.navigateBack({
+            delta: 1
+        });
+    },
+    onSubmit() {
+        api.inspect({
+            body: {inspection: this.data.deviceList,id: this.data.logsInfo.id},
+            headers: {unionid: wx.getStorageSync("unionid")}
+        }).then(data => {
+            if (data.code === 1) {
+                let {  count =0,normal=0,abnormal=0, inspection=[]} =data.data||{}
+                wx.showToast({
+                    icon: 'none',
+                    title: data.info|| "提交成功!",
+                });
+                this.setData({
+                    pageStatus: 2,
+                    count,
+                    normal,
+                    abnormal,
+                    abnormal_d_name: inspection.map(item => item.entity_name).join(',') || '--'
+                });
+            }else{
+                this.onShow2(data.info|| "提交失败,请联系管理员!")
+            }
+        }).catch(err => {
+            this.onShow2("提交失败,请联系管理员!")
+        });
+    },
+    setDeviceStats(e) {
+        let {index, status} = e.currentTarget.dataset
+        this.setData({
+            [`deviceList[${index}].checked`]: status
+        })
+    }
+});

+ 7 - 0
subpagesTwo/seeAlso/seeAico.json

@@ -0,0 +1,7 @@
+{
+  "usingComponents": {
+  },
+  "navigationBarBackgroundColor": "#ffffff",
+  "navigationBarTextStyle": "black",
+  "navigationBarTitleText": "智能设备巡检"
+}

+ 112 - 0
subpagesTwo/seeAlso/seeAico.wxml

@@ -0,0 +1,112 @@
+<view class="content">
+    <view class="see-aico-info flex-vertical-center">
+        <view class="see-aico-item flex-vertical-center flex-level-center">
+            <image src="/subpagesTwo/images/seeAicoDetails/icon-1.png" class="see-aico-img"></image>
+            <view class="see-aico-text">{{hotel_name}}</view>
+        </view>
+        <view class="see-aico-item flex-vertical-center flex-level-center">
+            <image src="/subpagesTwo/images/seeAicoDetails/icon-2.png" style="margin-bottom: 5rpx;" class="see-aico-img"></image>
+            <view class="see-aico-text">{{room_name}}</view>
+        </view>
+    </view>
+    <view class="data-box flex-vertical-center  flex-level-center">
+        <view  bind:tap="onStartInspection" class="start-see-aico flex-vertical-center flex-level-center" wx:if="{{pageStatus===0}}" >
+            <image src="/subpagesTwo/images/seeAicoDetails/icon-4.png" class="start-img"></image>
+            <view class="start-text">开始巡检</view>
+        </view>
+        <view class="in-see-aico" wx:if="{{pageStatus===1}}">
+            <view class="in-see-aico-prompt">
+                <image src="/subpagesTwo/images/seeAicoDetails/icon-5.png" class="in-see-aico-img"></image>
+                <view class="in-see-aico-prompt-box">
+                    <view class="in-see-aico-prompt-title">巡检模式进行中。。。</view>
+                    <view class="in-see-aico-prompt-text">巡检模式进行中,设备正在自动启动。请根据设备运行情况填写巡检记录。</view>
+                </view>
+            </view>
+            <view class="in-see-aico-list in-see-aico-list-tbm flex-vertical-center flex-space-between"   wx:for="{{ deviceList }}"
+                  wx:key="index">
+                <view class="flex-vertical-center">
+                    <view class="device-name">
+                        {{item.entity_name}}
+                    </view>
+                    <image src="{{item.status===0? '/subpagesTwo/images/seeAicoDetails/icon-7.png':'/subpagesTwo/images/seeAicoDetails/icon-6.png'}}" class="device-status-img"></image>
+                </view>
+                <view class="flex-vertical-center" >
+                    <view class="in-see-aico-btn flex-vertical-center flex-level-center {{item.checked=== 0 ? 'c-F76666' : 'c-888'}}" style="margin-right: 12rpx"
+                    bind:tap="setDeviceStats" data-index="{{ index }}" data-status="{{ 0 }}">
+                    异常
+                    </view>
+                    <view class="in-see-aico-btn flex-vertical-center flex-level-center {{item.checked=== 1 ? 'c-3AA' : 'c-888'}}"
+                   bind:tap="setDeviceStats" data-index="{{ index }}"  data-status="{{ 1 }}">
+                    正常
+                    </view>
+                </view>
+            </view>
+            <view class="in-see-aico-submit flex-vertical-center flex-level-center" bind:tap="onSubmit" >
+                提交结果
+            </view>
+        </view>
+        <view class="in-see-aico" wx:if="{{pageStatus===2}}">
+            <view class="in-see-aico-prompt flex-vertical-center">
+                <image src="/subpagesTwo/images/seeAicoDetails/icon-8.png" class="end-see-aico-img"></image>
+                <view class="in-see-aico-prompt-box">
+                    <view class="end-see-aico-prompt-title">巡检已完成,确认设备情况</view>
+                </view>
+            </view>
+            <view class="in-see-aico-list end-see-aico-list-tbm-1">
+                <view class="end-see-aico-item mb36">
+                    巡查设备:<text class="see-aico-d-count">{{count}}</text>
+                </view>
+                <view class="end-see-aico-item mb36">
+                    正常设备:<text class="normal-d-count">{{normal}}</text>
+                </view>
+                <view class="end-see-aico-item mb36">
+                    异常设备:<text class="abnormal-d-count">{{abnormal}}</text>
+                </view>
+                <view class="end-see-aico-item">
+                    异常设备为:<text class="abnormal-d-count">{{abnormal_d_name}}</text>
+                </view>
+            </view>
+            <view class="in-see-aico-list end-see-aico-list-tbm-2 flex-vertical-center">
+                <image src="/subpagesTwo/images/seeAicoDetails/icon-9.png" class="input-img"></image>
+                <input type="text" class="bindNotesInput" bindinput="bindNotesInput"   value="{{ notesInput }}" placeholder="请文字输入巡检异常设备情况,如都正常不用填写"  />
+            </view>
+            <view class="end-see-aico-btn-box flex-vertical-center">
+                <view bind:tap="onShow1" class="end-see-aico-btn end-see-aico-btn-color-1 flex-vertical-center flex-level-center" style="margin-right: 24rpx">
+                    重新巡检
+                </view >
+                <view bind:tap="onClosePage"  class="end-see-aico-btn end-see-aico-btn-color-2 flex-vertical-center flex-level-center">
+                    结束巡检
+                </view>
+            </view>
+        </view>
+
+    </view>
+    <van-popup  show="{{ show1 }}"  round bind:close="onClose">
+        <view class="popup-box-1 flex-column flex-level-center">
+            <view class="popup-title-1">重新巡检</view>
+            <view class="popup-text-1 flex-level-center">确定要重新巡检该房间吗?</view>
+            <view class="flex-level-center">
+                <view bind:tap="onConfirm" class="popup-btn-1 end-see-aico-btn-color-1 flex-vertical-center flex-level-center" style="margin-right: 20rpx">
+                    重新巡检
+                </view >
+                <view  bind:tap="onClose"  class="popup-btn-1 end-see-aico-btn-color-2 flex-vertical-center flex-level-center">
+                    关闭
+                </view>
+            </view>
+        </view>
+    </van-popup>
+    <van-popup  show="{{ show2 }}"  round bind:close="onClose">
+        <view class="popup-box-2 flex-column flex-level-center">
+            <view class="flex-level-center">
+                <image src="/subpagesTwo/images/seeAicoDetails/icon-10.png" class="popup-abnormal-img"></image>
+                <view class="popup-title-1">巡检异常</view>
+            </view>
+            <view class="popup-text-1 flex-level-center">{{show2Text||"巡检未完成,请保持房间网络和电源 畅通后,重新巡检"}}</view>
+            <view class="flex-level-center">
+                <view bind:tap="onConfirm" class="popup-btn-2 end-see-aico-btn-color-1 flex-vertical-center flex-level-center">
+                    重新巡检
+                </view >
+            </view>
+        </view>
+    </van-popup>
+</view>

+ 390 - 0
subpagesTwo/seeAlso/seeAico.wxss

@@ -0,0 +1,390 @@
+page {
+    background: #F8F9FA;
+}
+
+.content {
+    width: 100vw;
+    display: flex;
+    flex-direction: column;
+    padding: 30rpx;
+    position: relative;
+    box-sizing: border-box;
+}
+
+.see-aico-info {
+    width: 630rpx;
+    height: 84rpx;
+    padding: 0 30rpx;
+    background: #FFFFFF;
+    box-shadow: 20rpx 8rpx 20rpx 0rpx rgba(219, 225, 231, 0.2);
+    border-radius: 12rpx 12rpx 12rpx 12rpx;
+}
+
+.flex-level-center {
+    display: flex;
+    /*水平居中*/
+    justify-content: center;
+}
+
+.flex-vertical-center {
+    display: flex;
+    /*垂直居中*/
+    align-items: center;
+}
+.flex-column{
+    display: flex;
+    flex-direction: column;
+}
+.flex-space-between {
+    display: flex;
+    justify-content: space-between;
+}
+
+.see-aico-item {
+    display: flex;
+    flex: 1;
+    height: 100%;
+
+}
+
+.see-aico-img {
+    width: 36rpx;
+    height: 36rpx;
+    margin-right: 12rpx;
+}
+
+.see-aico-text {
+    height: 36rpx;
+    font-weight: 400;
+    font-size: 30rpx;
+    color: #333333;
+    line-height: 36rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+    align-items: center;
+}
+
+.data-box {
+    width: 100%;
+}
+
+.start-see-aico {
+    margin-top: 440rpx;
+    width: 436rpx;
+    height: 144rpx;
+    background: #FFFFFF;
+    box-shadow: 0rpx 8rpx 48rpx 0rpx #E3E4E5;
+    border-radius: 40rpx 40rpx 40rpx 40rpx;
+    border: 4rpx solid #F6F9FD;
+}
+
+.in-see-aico {
+    width: 100%;
+}
+
+.in-see-aico-prompt {
+    display: flex;
+    margin: 40rpx 0;
+}
+
+.in-see-aico-img {
+    width: 60rpx;
+    height: 60rpx;
+    margin-right: 16rpx;
+    animation: rotate 2s linear infinite;
+}
+
+.in-see-aico-list {
+    width: 100%;
+    background: #FFFFFF;
+    box-shadow: 20rpx 8rpx 20rpx 0rpx rgba(219, 225, 231, 0.2);
+    border-radius: 12rpx 12rpx 12rpx 12rpx;
+    margin-bottom: 16rpx;
+    box-sizing: border-box;
+    padding: 0 30rpx;
+}
+
+.input-img {
+    height: 30rpx;
+    width: 30rpx;
+    margin-right: 16rpx;
+}
+
+.bindNotesInput {
+    height: 40rpx;
+    width: 100%;
+    font-weight: 400;
+    font-size: 26rpx;
+    color: #888888;
+    line-height: 40rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+}
+
+.in-see-aico-list-tbm {
+    padding-top: 20rpx;
+    padding-bottom: 20rpx;
+}
+
+.device-name {
+    font-weight: 400;
+    font-size: 32rpx;
+    color: #333333;
+    line-height: 36rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+    margin-right: 20rpx;
+}
+
+.device-status-img {
+    width: 32rpx;
+    height: 32rpx;
+}
+
+.in-see-aico-btn {
+    width: 116rpx;
+    height: 56rpx;
+    background: #FFFFFF;
+    border-radius: 8rpx 8rpx 8rpx 8rpx;
+
+    font-weight: 400;
+    font-size: 28rpx;
+    line-height: 36rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+}
+
+.in-see-aico-submit {
+    width: 630rpx;
+    height: 90rpx;
+    background: linear-gradient(315deg, #0ABCA4 0%, rgba(11, 195, 170, 0.8) 100%);
+    border-radius: 292rpx 292rpx 292rpx 292rpx;
+    font-weight: 400;
+    font-size: 32rpx;
+    color: #FFFFFF;
+    line-height: 42rpx;
+    text-align: center;
+    font-style: normal;
+    text-transform: none;
+    margin: 40rpx auto 0;
+}
+
+.c-888 {
+    color: #888888;
+    border: 1rpx solid #888888;
+}
+
+.c-F76666 {
+    color: #F76666;
+    border: 1rpx solid #F76666;
+}
+
+.c-3AA {
+    color: #0BC3AA;
+    border: 1rpx solid #0BC3AA;
+}
+
+/* 定义一个旋转动画 */
+@keyframes rotate {
+    from {
+        transform: rotate(0deg);
+    }
+    to {
+        transform: rotate(360deg);
+    }
+}
+
+
+.in-see-aico-prompt-box {
+    width: 408rpx;
+}
+
+.in-see-aico-prompt-title {
+    font-weight: 400;
+    font-size: 32rpx;
+    color: #333333;
+    line-height: 48rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+}
+
+.in-see-aico-prompt-text {
+    font-weight: 400;
+    font-size: 24rpx;
+    color: #888888;
+    line-height: 36rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+}
+
+.start-img {
+    width: 72rpx;
+    height: 72rpx;
+    margin-right: 30rpx;
+}
+
+.start-text {
+    width: 144rpx;
+    height: 36rpx;
+    font-weight: 400;
+    font-size: 36rpx;
+    color: #0BC3AA;
+    line-height: 36rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+}
+
+.end-see-aico-prompt-title {
+    font-weight: 400;
+    font-size: 32rpx;
+    color: #666666;
+    line-height: 48rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+}
+
+.end-see-aico-img {
+    width: 60rpx;
+    height: 60rpx;
+    margin-right: 20rpx;
+}
+
+.end-see-aico-list-tbm-1 {
+    padding-top: 40rpx;
+    padding-bottom: 40rpx;
+}
+
+.end-see-aico-list-tbm-2 {
+    padding-top: 24rpx;
+    padding-bottom: 24rpx;
+    width: 100%;
+}
+
+.end-see-aico-item {
+    width: 100%;
+    font-weight: 400;
+    font-size: 30rpx;
+    color: #333333;
+    line-height: 40rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+}
+
+.see-aico-d-count {
+    font-size: 36rpx;
+    color: #333333;
+    line-height: 40rpx;
+}
+
+.normal-d-count {
+    font-size: 36rpx;
+    color: #0BC3AA;
+    line-height: 40rpx;
+}
+
+.abnormal-d-count {
+    font-size: 36rpx;
+    color: #F76666;
+    line-height: 40rpx;
+}
+
+.mb36 {
+    margin-bottom: 36rpx;
+}
+
+.end-see-aico-btn-box {
+    margin-top: 80rpx;
+}
+.end-see-aico-btn-1{
+    width: 330rpx;
+    height: 80rpx;
+    background: linear-gradient( 315deg, #0ABCA4 0%, rgba(11,195,170,0.8) 100%);
+    border-radius: 292rpx 292rpx 292rpx 292rpx;
+}
+.end-see-aico-btn-color-1{
+    background: linear-gradient( 315deg, #0ABCA4 0%, rgba(11,195,170,0.8) 100%);
+}
+.end-see-aico-btn-color-2{
+    background: linear-gradient( 315deg, #FF6C2E 0%, #FF9B71 100%);
+}
+.end-see-aico-btn{
+    width: 330rpx;
+    height: 80rpx;
+    border-radius: 292rpx 292rpx 292rpx 292rpx;
+    font-weight: 400;
+    font-size: 30rpx;
+    color: #FFFFFF;
+    line-height: 42rpx;
+    text-align: center;
+    font-style: normal;
+    text-transform: none;
+}
+.popup-box-1{
+    width: 572rpx;
+    height: 352rpx;
+    padding:  0 40rpx;
+    background: #FFFFFF;
+    border-radius: 24rpx 24rpx 24rpx 24rpx;
+    box-sizing: border-box;
+}
+.popup-box-2{
+    width: 572rpx;
+    height: 352rpx;
+    padding:  0 62rpx;
+    background: #FFFFFF;
+    border-radius: 24rpx 24rpx 24rpx 24rpx;
+    box-sizing: border-box;
+}
+.popup-title-1{
+    font-weight: 400;
+    font-size: 32rpx;
+    color: #333333;
+    line-height: 40rpx;
+    text-align: center;
+    font-style: normal;
+    text-transform: none;
+}
+.popup-text-1{
+    color: #777777;
+    margin: 40rpx 0;
+    text-align: center;
+    text-overflow: ellipsis;
+}
+.popup-btn-1{
+    width: 236rpx;
+    height: 72rpx;
+    border-radius: 292rpx 292rpx 292rpx 292rpx;
+    font-weight: 400;
+    font-size: 28rpx;
+    color: #FFFFFF;
+    line-height: 40rpx;
+    text-align: center;
+    font-style: normal;
+    text-transform: none;
+}
+.popup-btn-2{
+    width: 276rpx;
+    height: 72rpx;
+    border-radius: 292rpx 292rpx 292rpx 292rpx;
+    font-weight: 400;
+    font-size: 28rpx;
+    color: #FFFFFF;
+    line-height: 40rpx;
+    text-align: center;
+    font-style: normal;
+    text-transform: none;
+}
+.popup-abnormal-img {
+    height: 48rpx;
+    width: 48rpx;
+    margin-right: 16rpx;
+}

+ 100 - 0
utils/api.js

@@ -0,0 +1,100 @@
+// api.js
+
+const API_BASE_URL = 'https://insts.somnisix.net';
+const API_TOKEN = '268903bf57bdcc2d2433dd31f6d42b9a';
+
+// 封装 wx.request 为 Promise 形式
+function request(url, method = 'GET', data = {}, headers = {}) {
+    return new Promise((resolve, reject) => {
+        wx.request({
+            url,
+            method,
+            data,
+            header: headers,
+            success(res) {
+                if (res.statusCode >= 200 && res.statusCode < 300) {
+                    resolve(res.data);
+                } else {
+                    reject(new Error(`HTTP error! status: ${res.statusCode}`));
+                }
+            },
+            fail(err) {
+                reject(new Error('Network error'));
+            },
+        });
+    });
+}
+
+const apiClient = {
+    get: async (endpoint, { params = {}, headers = {} } = {}) => {
+        let url = `${API_BASE_URL}/${endpoint}`;
+
+        // 手动拼接 query 参数
+        const queryString = Object.keys(params).length > 0
+            ? '?' + Object.entries(params)
+                .map(([key, value]) =>
+                    `${encodeURIComponent(key)}=${encodeURIComponent(value)}`
+                )
+                .join('&')
+            : '';
+
+        url += queryString;
+
+        return await request(url, 'GET', {}, headers);
+    },
+
+    post: async (endpoint, { body = {}, headers = {} } = {}) => {
+        const url = `${API_BASE_URL}/${endpoint}`;
+        return await request(url, 'POST', body, headers);
+    },
+
+    // 特定接口封装
+    bind: async ({ params = {}, headers = {} } = {}) => {
+        if (!headers.token) {
+            headers['api-token'] = API_TOKEN;
+        }
+        return await apiClient.get('data/api.data/bind', { params, headers });
+    },
+
+    isManager: async ({ params = {}, headers = {} } = {}) => {
+        if (!headers.token) {
+            headers['api-token']  = API_TOKEN;
+        }
+        return await apiClient.get('data/api.data/isManager', { params, headers });
+    },
+    getRooms: async ({ params = {}, headers = {} } = {}) => {
+        if (!headers.token) {
+            headers['api-token']  = API_TOKEN;
+        }
+        return await apiClient.get('data/api.data/rooms', { params, headers });
+    },
+
+    startCheck: async ({ params = {}, headers = {} } = {}) => {
+        if (!headers.token) {
+            headers['api-token']  = API_TOKEN;
+        }
+        return await apiClient.get('data/api.data/startCheck', { params, headers });
+    },
+    nucEquips: async ({ params = {}, headers = {} } = {}) => {
+        if (!headers.token) {
+            headers['api-token']  = API_TOKEN;
+        }
+        return await apiClient.get('data/api.data/nucEquips', { params, headers });
+    },
+    inspect: async ({ body = {}, headers = {} } = {}) => {
+        if (!headers.token) {
+            headers['api-token']  = API_TOKEN;
+        }
+
+        return await apiClient.post('data/api.data/inspect', { body, headers });
+    },
+    confirm: async ({ body = {}, headers = {} } = {}) => {
+        if (!headers.token) {
+            headers['api-token']  = API_TOKEN;
+        }
+
+        return await apiClient.post('data/api.data/confirm', { body, headers });
+    },
+};
+
+export default apiClient;