소스 검색

[Feat 0000]风门动画 样式修改

bobo04052021@163.com 11 달 전
부모
커밋
1fb0f44fc9
4개의 변경된 파일504개의 추가작업 그리고 250개의 파일을 삭제
  1. 2 1
      App.vue
  2. 4 1
      api/api.js
  3. 364 117
      pages/home/detail/autodoor/autodoor.vue
  4. 134 131
      pages/home/firstmodel.vue

+ 2 - 1
App.vue

@@ -143,7 +143,8 @@
 		},
 		onHide: function() {
 			console.log('App Hide')
-		}
+				    clearInterval(this.$store.state.timer); // 假设定时器存储在 Vuex 的状态管理中
+		},
 
 	}
 </script>

+ 4 - 1
api/api.js

@@ -39,7 +39,10 @@ const apiService = {
 		const url = '/safety/ventanalyShowColum/list?' + urlParams.toString();
 		return http.get(url);
 	},
-	
+	//设备控制
+	controlDevice(params){
+		return http.put('/ventanaly-device/safety/ventanalyMonitorData/devicecontrol',params)
+	},
 	/**
 	 * 获取文件访问路径
 	 * @param avatar

+ 364 - 117
pages/home/detail/autodoor/autodoor.vue

@@ -1,5 +1,5 @@
 <template>
-  <view class="container">
+  <view style="overflow: auto; height: 100%;">
     <!-- 建议放在外层 -->
     <u-navbar :title="name" @leftClick="backPage" :bgImage="backPic">
       <view class="u-nav-slot" slot="left">
@@ -9,111 +9,212 @@
     <view class="main">
       <view class="u-page container">
         <div class="button-grid flcard" v-if="this.TabCur == 'gate'">
-          <u-button type="primary" shape="circle" text="打开前门"></u-button>
-          <u-button type="primary" shape="circle" text="关闭前门"></u-button>
-          <u-button type="primary" shape="circle" text="打开后门"></u-button>
-          <u-button type="primary" shape="circle" text="关闭后门"></u-button>
-          <u-button type="primary" shape="circle" text="打开前后门"></u-button>
-          <u-button type="primary" shape="circle" text="关闭前后门"></u-button>
-          <!-- <div class="additional-div">
-            <span>控制模式:</span>
-            <u-checkbox-group
-              v-model="checked"
-              iconPlacement="left"
-              placement="row"
-            >
-              <u-checkbox
-                type="primary"
-                shape="circle"
-                label="就地"
-                style="margin-right: 20rpx"
-              ></u-checkbox>
-              <u-checkbox
-                type="primary"
-                shape="circle"
-                label="远程"
-              ></u-checkbox>
-            </u-checkbox-group>
-          </div> -->
+          <u-button
+            type="primary"
+            shape="circle"
+            text="打开前门"
+            @click="showPasswordDialog('frontGateOpen_S')"
+          ></u-button>
+          <u-button
+            type="primary"
+            shape="circle"
+            text="关闭前门"
+            @click="showPasswordDialog('frontGateClose_S')"
+          ></u-button>
+          <u-button
+            type="primary"
+            shape="circle"
+            text="打开后门"
+            @click="showPasswordDialog('rearGateOpen_S')"
+          ></u-button>
+          <u-button
+            type="primary"
+            shape="circle"
+            text="关闭后门"
+            @click="showPasswordDialog('rearGateClose_S')"
+          ></u-button>
+          <u-button
+            type="primary"
+            shape="circle"
+            text="打开前后门"
+            @click="showPasswordDialog('sameTimeOpen')"
+          ></u-button>
+          <u-button
+            type="primary"
+            shape="circle"
+            text="关闭前后门"
+            @click="showPasswordDialog('sameTimeClose')"
+          ></u-button>
         </div>
         <div class="button-grid flcard" v-if="this.TabCur == 'window'">
           <u-button type="primary" shape="circle" text="设定面积"></u-button>
         </div>
-        <div class="flcard door-container" v-if="this.TabCur == 'gate'">
-          <div class="door">
-            <div class="left_door" id="leftdoor"></div>
-            <div class="right_door" id="rightdoor"></div>
-            <div
-              style="
-                position: absolute;
-                top: 30%;
-                left: 25%;
-                transform: translate(-50%);
-                z-index: 5;
-                font-weight: 900px;
-                color: #00ff00;
-              "
-            >
-              <span style="font-size: 30px">前门</span>
-            </div>
-          </div>
+        <div class="flcard" v-if="this.TabCur == 'gate' && this.ndoorcount == 2">
+		<div class="door-container">
+          <div style="">
+			  <div class="door">
+			    <div
+			      class="left_door"
+			      id="leftdoor"
+			      :animation="animationData"
+			    ></div>
+			    <div
+			      class="right_door"
+			      id="rightdoor"
+			     :animation="animationData"
+			    ></div>
+			  </div>
+			  <div>
+				  <video src="" controls></video>
+			  </div>
+		  </div>
           <div class="door">
-            <div class="left_door" id="leftdoor1"></div>
-            <div class="right_door" id="rightdoor2"></div>
-            <div
-              style="
-                position: absolute;
-                top: 30%;
-                right: 13%;
-                transform: translate(-50%);
-                z-index: 5;
-                font-weight: 900px;
-                color: #00ff00;
-              "
-            >
-              <span style="font-size: 30px">后门</span>
-            </div>
-          </div>
-        </div>
-        <div class="flcard door-container" v-if="this.TabCur == 'window'">
-          <div class="autowindow_new">
-            <div
-              class="window_new_1"
-              id="subwindowpic11"
-              :style="`transform: rotateX(${frontAngle}deg)`"
-            ></div>
-            <div
-              class="window_new_2"
-              id="subwindowpic12"
-              :style="`transform: rotateX(${frontAngle}deg)`"
-            ></div>
-            <div
-              class="window_new_3"
-              id="subwindowpic13"
-              :style="`transform: rotateX(${frontAngle}deg)`"
-            ></div>
             <div
-              class="window_new_4"
-              id="subwindowpic14"
-              :style="`transform: rotateX(${frontAngle}deg)`"
+              class="left_door"
+              id="leftdoor1"
+			  :animation="animationData"
             ></div>
             <div
-              class="window_new_5"
-              id="subwindowpic15"
-              :style="`transform: rotateX(${frontAngle}deg)`"
+              class="right_door"
+              id="rightdoor1"
+			  :animation="animationData"
             ></div>
           </div>
-          <div
-            style="
-              position: absolute;
-              top: 34%;
-              left: 25%;
-              transform: translate(-50%);
-              z-index: 5;
-              color: #6a7a9b;
-            "
-          >
-            <span style="font-size: 15px; font-weight: 50px">风窗动画</span>
+		  </div>
+        </div>
+		<div class="flcard" v-if="this.TabCur == 'gate' && this.ndoorcount == 3">
+		<div class="door-container">
+		  <div class="door">
+		    <div
+		      class="left_door"
+		      id="leftdoor"
+		      :animation="animationData"
+		    ></div>
+		    <div
+		      class="right_door"
+		      id="rightdoor"
+		     :animation="animationData"
+		    ></div>
+		  </div>
+		  <div class="door">
+		    <div
+		      class="left_door"
+		      id="leftdoor1"
+			  :animation="animationData"
+		    ></div>
+		    <div
+		      class="right_door"
+		      id="rightdoor1"
+			  :animation="animationData"
+		    ></div>
+		  </div>
+		  <div class="door">
+		    <div
+		      class="left_door"
+		      id="leftdoor1"
+			  :animation="animationData"
+		    ></div>
+		    <div
+		      class="right_door"
+		      id="rightdoor1"
+			  :animation="animationData"
+		    ></div>
+		  </div>
+		  </div>
+		</div>
+        <div
+          class="flcard"
+          v-if="this.TabCur == 'window' && this.nwindownum == 1"
+        >
+          <div class="window-container">
+            <div class="autowindow_new">
+              <div
+                class="window_new_1"
+                id="subwindowpic11"
+                
+              ></div>
+              <div
+                class="window_new_2"
+                id="subwindowpic12"
+                
+              ></div>
+              <div
+                class="window_new_3"
+                id="subwindowpic13"
+                
+              ></div>
+              <div
+                class="window_new_4"
+                id="subwindowpic14"
+                
+              ></div>
+              <div
+                class="window_new_5"
+                id="subwindowpic15"
+                
+              ></div>
+            </div>
+          </div>
+        </div>
+        <div
+          class="flcard"
+          v-if="this.TabCur == 'window' && this.nwindownum == 2"
+        >
+          <div class="window-container">
+            <div class="autowindow_new">
+              <div
+                class="window_new_1"
+                id="subwindowpic11"
+                
+              ></div>
+              <div
+                class="window_new_2"
+                id="subwindowpic12"
+                
+              ></div>
+              <div
+                class="window_new_3"
+                id="subwindowpic13"
+                
+              ></div>
+              <div
+                class="window_new_4"
+                id="subwindowpic14"
+                
+              ></div>
+              <div
+                class="window_new_5"
+                id="subwindowpic15"
+                
+              ></div>
+            </div>
+            <div class="autowindow_new" style="margin-top: 20px">
+              <div
+                class="window_new_1"
+                id="subwindowpic11"
+                
+              ></div>
+              <div
+                class="window_new_2"
+                id="subwindowpic12"
+                
+              ></div>
+              <div
+                class="window_new_3"
+                id="subwindowpic13"
+                
+              ></div>
+              <div
+                class="window_new_4"
+                id="subwindowpic14"
+                
+              ></div>
+              <div
+                class="window_new_5"
+                id="subwindowpic15"
+                
+              ></div>
+            </div>
           </div>
         </div>
         <div class="flcard">
@@ -170,8 +271,11 @@
                         ? 'url(\'../../../../static/model/windM3.png\')'
                         : item.monitorcode === 'fsectarea'
                         ? 'url(\'../../../../static/model/duanArea.png\')'
-						:item.monitorcode === 'incipientWindSpeed1' || item.monitorcode === 'incipientWindSpeed2' || item.monitorcode === 'incipientWindSpeed3'|| item.monitorcode === 'va'
-						? 'url(\'../../../../static/model/fengsu.png\')'
+                        : item.monitorcode === 'incipientWindSpeed1' ||
+                          item.monitorcode === 'incipientWindSpeed2' ||
+                          item.monitorcode === 'incipientWindSpeed3' ||
+                          item.monitorcode === 'va'
+                        ? 'url(\'../../../../static/model/fengsu.png\')'
                         : 'url(\'\')',
                     backgroundSize: '100% 100%',
                   }"
@@ -182,6 +286,27 @@
         </div>
       </view>
     </view>
+    <view class="passwordPopup">
+      <u-popup
+        :show="show"
+        mode="bottom"
+        :round="14"
+        :safeAreaInsetBottom="false"
+      >
+        <view style="margin-top: 15px">请输入密码:</view>
+        <u-input
+          style="margin-top: 15px"
+          v-model="password"
+          type="password"
+        ></u-input>
+        <view class="btns">
+          <u-button type="primary" shape="circle" @click="confirmPassword()"
+            >确认</u-button
+          >
+          <u-button shape="circle" @click="cancelPassword()">取消</u-button>
+        </view>
+      </u-popup>
+    </view>
   </view>
 </template>
 
@@ -198,6 +323,22 @@ export default {
       checked: [],
       backPic: "url(../../../../static/topnavbar.png)",
       frontAngle: "", //风窗打开角度
+      nwindownum: "", //风窗道数
+	  ndoorcount:'',//风门道数
+      deviceType: "", //设备类型
+      show: false, //密码弹窗是否显示
+      password: "", //控制设备密码
+      paramcode: "", //控制字段
+      popupStyle: {
+        // 弹窗样式
+        "background-color": "#fff",
+        padding: "20px",
+        "box-shadow": "0 2px 4px rgba(0, 0, 0, 0.1)",
+      },
+      frontGateStatus: "", //前门状态
+      rearGateStatus: "", //后门状态
+	  animationData:{},
+      animationDuration: 500, // 动画持续时间
     };
   },
   onLoad(query) {
@@ -212,11 +353,39 @@ export default {
     this.getShowList();
   },
   components: {},
-  watch: {},
+  onShow() {
+    var animation = uni.createAnimation({
+      duration: 400,
+      timingFunction: "linear",
+    });
+    this.animation = animation;
+  },
   created() {
     this.getDeviceInfo(this.itemId);
   },
+  mounted() {
+    this.startTimer();
+  },
   methods: {
+    startTimer() {
+      this.timer = setInterval(() => {
+        // 执行定时任务
+        this.getDeviceInfo(this.itemId);
+        console.log("定时任务执行中...");
+      }, 5000);
+    },
+    stopTimer() {
+      // 停止定时器
+      clearInterval(this.timer);
+    },
+    // 返回上一个页面
+    backPage() {
+      this.$destroy();
+      uni.navigateBack({
+        delta: 1,
+      });
+    },
+    //获取app展示字段数据
     getShowList() {
       const params = {
         devicekind: this.TabCur,
@@ -230,17 +399,16 @@ export default {
           .then((response) => {
             if (response.data.code == 200) {
               this.typeList = response.data.result.records;
-              console.log(this.typeList, "返回内容");
             } else {
               resolve(response);
             }
           })
           .catch((error) => {
-            console.log("catch===>response", response);
             reject(error);
           });
       });
     },
+    //获取详情数据
     getDeviceInfo(ID) {
       let IDString = String(ID); // 将 ID 转换为字符串
       new Promise((resolve, reject) => {
@@ -250,39 +418,114 @@ export default {
             if (response.data.code == 200) {
               this.tableData =
                 response.data.result.msgTxt[0].datalist[0].readData;
-              if (this.tableData.frontGateOpen == 1) {
+              if (this.tableData.frontGateOpen == "1") {
                 this.tableData.frontGateOpen = "打开";
               } else {
                 this.tableData.frontGateOpen = "关闭";
               }
-              if (this.tableData.rearGateOpen == 1) {
-                rearGateOpen = "打开";
+              if (this.tableData.rearGateOpen == "1") {
+                this.tableData.rearGateOpen = "打开";
               } else {
                 this.tableData.rearGateOpen = "关闭";
               }
-              this.tableData.push(
-                response.data.result.msgTxt[0].datalist[0].readTime
-              );
+              this.nwindownum =
+                response.data.result.msgTxt[0].datalist[0].nwindownum;
+			  this.ndoorcount = 
+			    response.data.result.msgTxt[0].datalist[0].ndoorcount;
+              this.deviceType =
+                response.data.result.msgTxt[0].datalist[0].deviceType;
+              // this.tableData.push(
+              //   response.data.result.msgTxt[0].datalist[0].readTime
+              // );
+              this.frontGateStatus = this.tableData.frontGateOpen;
+              this.rearGateStatus = this.tableData.rearGateOpen;
             } else {
               resolve(response);
             }
           })
           .catch((error) => {
-            console.log("catch===>response", response);
             reject(error);
           });
       });
     },
-    backPage() {
-      uni.navigateBack({
-        delta: 1,
+    //设备控制
+    ctrlDevice(pass) {
+      let IDString = String(this.itemId); // 将 ID 转换为字符串
+      const params = {
+        deviceid: IDString,
+        devicetype: this.deviceType,
+        paramcode: this.paramcode,
+        password: pass,
+        value: "",
+      };
+      new Promise((resolve, reject) => {
+        api
+          .controlDevice(params)
+          .then((response) => {
+            if (response.data.code == 200) {
+              this.getDeviceInfo(IDString);
+              // console.log("操作成功");
+            } else {
+              resolve(response);
+            }
+          })
+          .catch((error) => {
+            reject(error);
+          });
       });
     },
+    // 显示密码输入弹窗
+    showPasswordDialog(controlCode) {
+      this.paramcode = controlCode;
+      this.show = true;
+    },
+    // 取消密码输入
+    cancelPassword() {
+      this.show = false;
+    },
+    confirmPassword() {
+      this.ctrlDevice(this.password);
+      // 发起请求后关闭密码输入弹窗
+      this.show = false;
+    },
+
+    //风门打开
+    openDoor() {
+      if (!this.frontGateStatus) {
+		this.doorRotate()
+      }else if( !this.rearGateStatus){
+		this.doorRotate()
+	  };
+    },
+    //风门关闭
+    closeDoor() {
+      if (this.frontGateStatus) {
+		this.door1Rotate()
+      }else if (this.rearGateStatus){
+		this.door1Rotate()
+	  };
+    },
+	doorRotate(){
+		this.animation.rotateY(100).step()
+		this.animationData = this.animation.export()
+	},
+	door1Rotate(){
+		this.animation.rotateY(-100).step()
+		this.animationData = this.animation.export()
+	}
+  },
+  destroyed() {
+    // 停止定时器
+    this.stopTimer();
   },
 };
 </script>
 
 <style>
+passwordPopup {
+  height: 300rpx;
+  background-color: #fff;
+}
 .top-nav {
   background-image: url(../../../../static/topnavbar.png);
   background-size: cover; /* 背景图片大小适应 */
@@ -297,7 +540,6 @@ export default {
 .container {
   display: flex;
   flex-direction: column;
-  height: 90vh; /* 设置容器高度为视窗高度 */
 }
 .button-grid {
   display: grid;
@@ -311,20 +553,21 @@ export default {
   margin-bottom: 5rpx;
 }
 .door-container {
-  display: flex;
 }
 .door {
   background-image: url(../../../../static/door.png);
   background-size: 100% 100%;
-  display: inline-block;
+  width: 200px;
+  height: 200px;
+  /* display: inline-block; */
   vertical-align: top;
-  height: 24vh;
+  /* height: 24vh; */
   flex: 1;
   margin-right: 10px; /* 可以根据需要调整间距 */
 }
 .left_door {
   margin-left: 8%;
-  margin-top: 15%;
+  margin-top: 8%;
   width: 42%;
   height: calc(19.5vh + 3px);
   box-sizing: border-box;
@@ -335,7 +578,7 @@ export default {
   background-size: 100% 100%;
 }
 .right_door {
-  margin-top: 15%;
+    margin-top: 8%;
   width: 42%;
   height: calc(19.5vh + 3px);
   box-sizing: border-box;
@@ -518,4 +761,8 @@ div.window_new_5 {
   transition: all 2s ease;
   transform-origin: center center;
 }
+.btns {
+  display: flex;
+  margin-top: 15px;
+}
 </style>

+ 134 - 131
pages/home/firstmodel.vue

@@ -30,38 +30,43 @@
                 </u-col>
               </u-row>
               <u-row gutter="5" customStyle="margin-bottom: 10px">
-                <u-col span="2" style="margin-right: 15rpx;">
-                  <div
-                    v-if="item.netStatus == 0"
-                    class="error-tag1"
-                  >
-				    <img src="'../../../../static/model/connectFalse.svg "alt="" class="icon-style"/>
-				    <span style="float: right; ">断开</span>
-				  </div>
-                  <div
-                    v-else
-					 class="success-tag"
-                  >
-				    <img src="'../../../../static/model/connectTrue.svg "alt="" class="icon-style"/>
-				    <span style="float: right; ">连接</span>
-				  </div>
+                <u-col span="2" style="margin-right: 15rpx">
+                  <div v-if="item.netStatus == 0" class="error-tag1">
+                    <img
+                      src="'../../../../static/model/connectFalse.svg "
+                      alt=""
+                      class="icon-style"
+                    />
+                    <span style="float: right">断开</span>
+                  </div>
+                  <div v-else class="success-tag">
+                    <img
+                      src="'../../../../static/model/connectTrue.svg "
+                      alt=""
+                      class="icon-style"
+                    />
+                    <span style="float: right">连接</span>
+                  </div>
                 </u-col>
                 <u-col span="2">
-                  <div
-                    v-if="item.warnFlag == 0"
-                    class="success-tag"
-                  >
-				  <img src="'../../../../static/model/alarmTrue.svg "alt="" class="icon-style"/>
-				  <span  style="float: right; ">{{item.warnLevel_str}}</span></div>
-                  <div
-                    v-else
-                    class="error-tag"
-                  >
-					<img src="'../../../../static/model/alarmFalse.svg "alt="" class="icon-style"/>
-					<span style="float: right; ">{{item.warnLevel_str}}</span>
-				  </div>
+                  <div v-if="item.warnFlag == 0" class="success-tag">
+                    <img
+                      src="'../../../../static/model/alarmTrue.svg "
+                      alt=""
+                      class="icon-style"
+                    />
+                    <span style="float: right">{{ item.warnLevel_str }}</span>
+                  </div>
+                  <div v-else class="error-tag">
+                    <img
+                      src="'../../../../static/model/alarmFalse.svg "
+                      alt=""
+                      class="icon-style"
+                    />
+                    <span style="float: right">{{ item.warnLevel_str }}</span>
+                  </div>
                 </u-col>
-								 <u-col span="3"> </u-col>
+                <u-col span="3"> </u-col>
                 <u-col span="5">
                   <u--text class="timetext" :text="item.readTime"></u--text>
                 </u-col>
@@ -72,55 +77,63 @@
                   v-for="(showitem, index) in colums[TabCur + '_monitor']"
                   v-show="showitem.appShow == 1"
                 >
-                  <view class="content" :style="{
-                    backgroundImage:
-                      showitem.monitorcode === 'frontRearDP' ||
-                      showitem.monitorcode === 'frontRearDifference'
-                        ? 'url(\'../../../../static/model/Pa.png\')'
-                        : showitem.monitorcode === 'sourcePressure'
-                        ? 'url(\'../../../../static/model/MPa.png\')'
-                        : showitem.monitorcode === 'frontGateOpen'
-                        ? 'url(\'../../../../static/model/doorNet.png\')'
-                        : showitem.monitorcode === 'rearGateOpen'
-                        ? 'url(\'../../../../static/model/doorNet.png\')'
-                        : showitem.monitorcode === 'warnFlag'
-                        ? 'url(\'../../../../static/model/9432.png\')'
-                        : showitem.monitorcode === 'netStatus'
-                        ? 'url(\'../../../../static/model/9431.png\')'
-                        : showitem.monitorcode === 'm3'
-                        ? 'url(\'../../../../static/model/windM3.png\')'
-                        : showitem.monitorcode === 'fsectarea'
-                        ? 'url(\'../../../../static/model/duanArea.png\')'
-						:showitem.monitorcode === 'incipientWindSpeed1' || showitem.monitorcode === 'incipientWindSpeed2' || showitem.monitorcode === 'incipientWindSpeed3'|| showitem.monitorcode === 'va'
-						? 'url(\'../../../../static/model/fengsu.png\')'
-                        : 'url(\'\')',
-                    backgroundSize: '100% 100%',
-                  }">
-                  	<view
-                  	  v-show="
-                  	    showitem.monitorcode != 'strinstallpos' &&
-                  	    showitem.monitorcode != 'netStatus' &&
-                  	    showitem.monitorcode != 'warnFlag' &&
-                  	    showitem.monitorcode != 'readTime'&&
-                  	    showitem.monitorcode != ''
-                  	  "
-                  	>
-                  	  <view
-                  	    v-if="showitem.datatype == 1"
-                  	    class="demo-layout bg-purple-light"
-                  		style="margin-top: 10rpx; color: #3787fe"
-                  	    >{{ item[showitem.monitorcode] }}</view
-                  	  >
-                  	  <view
-                  	    v-if="showitem.datatype == 2"
-                  	    class="demo-layout bg-purple-light"
-                  		style="color: #3787fe"
-                  	    >{{ item.readData[showitem.monitorcode] }}</view
-                  	  >
-                  	  <view class="demo-layout bg-purple-light"  style="margin-top: 10px;color: #677799">{{
-                  	    showitem.des
-                  	  }}</view>
-                  	</view>
+                  <view
+                    class="content"
+                    :style="{
+                      backgroundImage:
+                        showitem.monitorcode === 'frontRearDP' ||
+                        showitem.monitorcode === 'frontRearDifference'
+                          ? 'url(\'../../../../static/model/Pa.png\')'
+                          : showitem.monitorcode === 'sourcePressure'
+                          ? 'url(\'../../../../static/model/MPa.png\')'
+                          : showitem.monitorcode === 'frontGateOpen'
+                          ? 'url(\'../../../../static/model/doorNet.png\')'
+                          : showitem.monitorcode === 'rearGateOpen'
+                          ? 'url(\'../../../../static/model/doorNet.png\')'
+                          : showitem.monitorcode === 'warnFlag'
+                          ? 'url(\'../../../../static/model/9432.png\')'
+                          : showitem.monitorcode === 'netStatus'
+                          ? 'url(\'../../../../static/model/9431.png\')'
+                          : showitem.monitorcode === 'm3'
+                          ? 'url(\'../../../../static/model/windM3.png\')'
+                          : showitem.monitorcode === 'fsectarea'
+                          ? 'url(\'../../../../static/model/duanArea.png\')'
+                          : showitem.monitorcode === 'incipientWindSpeed1' ||
+                            showitem.monitorcode === 'incipientWindSpeed2' ||
+                            showitem.monitorcode === 'incipientWindSpeed3' ||
+                            showitem.monitorcode === 'va'
+                          ? 'url(\'../../../../static/model/fengsu.png\')'
+                          : 'url(\'\')',
+                      backgroundSize: '100% 100%',
+                    }"
+                  >
+                    <view
+                      v-show="
+                        showitem.monitorcode != 'strinstallpos' &&
+                        showitem.monitorcode != 'netStatus' &&
+                        showitem.monitorcode != 'warnFlag' &&
+                        showitem.monitorcode != 'readTime' &&
+                        showitem.monitorcode != ''
+                      "
+                    >
+                      <view
+                        v-if="showitem.datatype == 1"
+                        class="demo-layout bg-purple-light"
+                        style="margin-top: 10rpx; color: #3787fe"
+                        >{{ item[showitem.monitorcode] }}</view
+                      >
+                      <view
+                        v-if="showitem.datatype == 2"
+                        class="demo-layout bg-purple-light"
+                        style="color: #3787fe"
+                        >{{ item.readData[showitem.monitorcode] }}</view
+                      >
+                      <view
+                        class="demo-layout bg-purple-light"
+                        style="margin-top: 10px; color: #677799"
+                        >{{ showitem.des }}</view
+                      >
+                    </view>
                   </view>
                 </view>
               </view>
@@ -161,26 +174,21 @@ export default {
     this.colums = this.showColum;
   },
   mounted() {
-  	this.startTimer()
+    this.startTimer();
   },
   methods: {
-	startTimer() {
-	      // 每隔一段时间执行某个操作
-	      this.timer = setInterval(() => {
-	        // 执行定时任务
-			this.loadData(this.TabCur);
-	        console.log('定时任务执行中...');
-	      }, 5000);
-	    },
-	    stopTimer() {
-	      // 停止定时器
-	      clearInterval(this.timer);
-	    },
-	    restartTimer() {
-	      // 重新启动定时器
-	      this.stopTimer();
-	      this.startTimer();
-	    },
+    startTimer() {
+      // 每隔一段时间执行某个操作
+      this.timer = setInterval(() => {
+        // 执行定时任务
+        this.loadData(this.TabCur);
+        console.log("定时任务执行中...");
+      }, 5000);
+    },
+    stopTimer() {
+      // 停止定时器
+     clearInterval(this.timer);
+    },
     loadData(type) {
       new Promise((resolve, reject) => {
         api
@@ -235,21 +243,16 @@ export default {
       this.menushow = false;
     },
     openNewPage(params) {
+	 this.$destroy();
       uni.navigateTo({
         url: `/pages/home/detail/autodoor/autodoor?id=${params.deviceID}&name=${params.strinstallpos}&type=${this.TabCur}`,
       });
     },
   },
-  onHide() {
-        // 页面隐藏时停止定时器
-        this.stopTimer();
-      },
-    onShow() {
-        // 页面显示时重新启动定时器
-        this.restartTimer();
-   }
-  
-
+  destroyed() {
+    // 停止定时器
+    this.stopTimer()
+  },
 };
 </script>
 
@@ -307,40 +310,40 @@ export default {
   );
 }
 .error-tag {
-	border-radius: 10%;
-	display: inline-block;
-  color:#E90000;
-  	line-height: 50rpx;
-  	font-size: 14px;
-  	text-align: center;
-  	width: 120rpx;
+  border-radius: 10%;
+  display: inline-block;
+  color: #e90000;
+  line-height: 50rpx;
+  font-size: 14px;
+  text-align: center;
+  width: 120rpx;
   height: 50rpx;
   background-color: rgba(233, 0, 0, 0.2);
 }
-.error-tag1{
-	border-radius: 10%;
-		display: inline-block;
- color: #696969;
- 	line-height: 50rpx;
- 	font-size: 14px;
- 	text-align: center;
- 	width: 120rpx;
- height: 50rpx;
+.error-tag1 {
+  border-radius: 10%;
+  display: inline-block;
+  color: #696969;
+  line-height: 50rpx;
+  font-size: 14px;
+  text-align: center;
+  width: 120rpx;
+  height: 50rpx;
   background-color: rgba(105, 105, 105, 0.2);
 }
 .success-tag {
-	border-radius: 10%;
-	color: #42c000;
-	line-height: 50rpx;
-	font-size: 14px;
-	width: 120rpx;
+  border-radius: 10%;
+  color: #42c000;
+  line-height: 50rpx;
+  font-size: 14px;
+  width: 120rpx;
   height: 50rpx;
   display: inline-block;
   background-color: rgba(226, 250, 214);
 }
-.icon-style{
-	margin: 15rpx;
-	width: 14px;
-	height: 14px;
+.icon-style {
+  margin: 15rpx;
+  width: 14px;
+  height: 14px;
 }
 </style>