zhugf
2023-03-23 d5eef829f2daf8bf021c9524e2c93312091ba58f
pages/tabBar/monitor.vue
@@ -66,10 +66,9 @@
            <view class="scoreBox">
               <text class="text-green text-xl text-bold">{{$lget(model,'target')}}%<text
                     class="text-gray text-sm">/目标</text> </text>
               <text class="text-gray text-xl text-bold">{{$lget(model,'initial')}}%<text
                     class="text-gray text-sm">/初始</text> </text>
               <text class="text-gray text-sm">目标: <text class="text-green text-xl text-bold">{{$lget(model,'target')}}% </text> </text>
               <text class="text-gray text-sm">初始: <text class="text-gray text-xl text-bold">{{$lget(model,'initial')}}% </text></text>
               <!-- <view class="text-yellow text-xs flex justify-around">
                  <uni-text class="text-yellow cuIcon-favorfill"></uni-text>
                  <uni-text class="text-yellow cuIcon-favorfill"></uni-text>
@@ -200,8 +199,8 @@
               <view class="h-td">干燥时间</view>
            </view>
            <view class="h-tr h-tr-2">
               <view class="h-td">{{$lget(model,'envTemp')}}℃</view>
               <view class="h-td">{{$lget(model,'envHum')}}%</view>
               <view class="h-td">{{$lget(model,'envTemp')  == "" ? "--" :  $lget(model,'envTemp')}}℃</view>
               <view class="h-td">{{$lget(model,'envHum') == "" ? "--" :$lget(model,'envHum') }}%</view>
               <view class="h-td">{{$lget(model,'windTemp')}}℃</view>
               <view class="h-td">{{$lget(model,'delay')}}ms</view>
               <view class="h-td">{{$lget(model,'et')}}min</view>
@@ -330,7 +329,7 @@
         </view>
      </view>
      <view class="chartsMain">
         <qiun-data-charts type="area" :opts="opts" :canvas2d="true" :ontouch="true" :chartData="chartData" />
         <qiun-data-charts type="area" :opts="opts" :animation="false" :canvas2d="true" :ontouch="true" :chartData="chartData" />
      </view>
@@ -378,7 +377,6 @@
               }
            },
            notice: "2023-03-1812:00:001号机台低温报警",
            timer: null,
            model: {},
            queryParam: {
               machineid: "GM001",
@@ -398,10 +396,10 @@
      onShow() {
         console.info("监控页面显示")
         this.getRealData()
         if (!this.timer) {
            this.timer = setInterval(() => {
         if (!this.$monitorTimer) {
            this.$monitorTimer = setInterval(() => {
               console.info("定时器工作")
               console.info(this.timer)
               console.info(this.$monitorTimer)
               this.getRealData()
            }, 1000 * 12)
@@ -413,13 +411,14 @@
      },
      onHide() {
         clearInterval(this.timer)
         clearInterval(this.$monitorTimer)
         this.$monitorTimer = null
         console.info("监控页面隐藏")
         console.info("定时器停止")
         console.info(this.timer)
         console.info(this.$monitorTimer)
      },
      onUnload() {
         clearInterval(this.timer)
      },
      mounted() {