zhuguifei
2025-09-02 9cc59c17892a7e69de54e06b5931e78c9b05551c
packageA/pages/device/control.vue
@@ -3,7 +3,28 @@
      <cu-custom bgColor="bg-gradual-blue" :isBack="true">
         <block slot="content">{{option.name}}</block>
      </cu-custom>
      </cu-custom>
      <view class="fault-box">
         <image style="width: 100%;border-radius: 20rpx; " src="../../../packageA/static/image/ganzaoji-x.png"
            mode="aspectFit">
         </image>
         <view class="fault-inner">
            <view class="fault-info" v-for="(item,index) in realFaults" :style="{
              position: 'absolute',
              top: item.position.top + 'rpx',
              left: item.position.left + 'rpx',
              fontSize: '24rpx'
            }">
               <view :class="['fault-animal', item.type === 1 ? 'fault-marker' : 'warn-marker']"></view>
               <view :class="['fault-tag', item.type === 1 ? 'fault-text' : 'warn-text']">{{item.name}}</view>
            </view>
         </view>
      </view>
      <view class="uni-padding-wrap">
         <!-- <view class="page-section swiper">
            <view class="page-section-spacing">
@@ -19,25 +40,6 @@
            </view>
         </view> -->
         <view class="fault-box">
            <image style="width: 100%;border-radius: 20rpx; " src="../../../packageA/static/image/ganzaoji-x.png"
               mode="aspectFit">
            </image>
            <view class="fault-inner">
               <view class="fault-info" v-for="(item,index) in realFaults" :style="{
                 position: 'absolute',
                 top: item.position.top + 'rpx',
                 left: item.position.left + 'rpx',
                 fontSize: '24rpx'
               }">
                  <view :class="['fault-animal', item.type === 1 ? 'fault-marker' : 'warn-marker']"></view>
                  <view :class="['fault-tag', item.type === 1 ? 'fault-text' : 'warn-text']">{{item.name}}</view>
               </view>
            </view>
         </view>
      </view>
@@ -83,7 +85,7 @@
                     </view>
                     <view class="h-tr h-tr-2">
                        <view class="h-td">{{model.wind ? '开' : '关'}}</view>
                        <view class="h-td">{{$lget(model,'temp2')}}%</view>
                        <view class="h-td">{{$lget(model,'temp2')}}℃</view>
                        <view class="h-td">{{$lget(model,'watt')}}kW·h</view>
                        <view class="h-td">{{$lget(model,'steam')}}m³</view>
                     </view>
@@ -237,11 +239,20 @@
               tenantid: null
            },
            bannerList: [{
               imageUrl: '../../static/image/zcy_gzj1.png'
               imageUrl: '../../static/image/ganzaoji-x.png'
            }],
            timer: null,
            realFaults: [],
            allFaults: [{
                  id: 0,
                  name: '急停报警(总)',
                  type: 1,
                  position: {
                     top: 40,
                     left: 230
                  },
                  show: false
               },{
                  id: 1,
                  name: '设备急停(总)',
                  type: 1,
@@ -621,7 +632,7 @@
                        break;
                        //topic 实时报警
                     case topics.realFaultTopic:
                     case topics.oneceFaultTopic:
                     case topics.oneceFaultTopic:
                        if (!this.model.connected) {
                           return false
                        }
@@ -658,8 +669,6 @@
               };
            }
            console.error(this.model)
         },
         handleEquStatusUpdate(wdata) {
@@ -770,7 +779,7 @@
            }
            this.$mqttTool.publish(opts).then(res => {
               console.error(res)
               //console.error(res)
            })
         },
@@ -873,7 +882,9 @@
   .fault-box {
      width: 100%;
      height: 460rpx;
      position: relative;
      position: relative;
      overflow: hidden;
      .fault-inner {