Browse Source

4号板子添加页面控制调整

wzh 2 năm trước cách đây
mục cha
commit
da083aba50
1 tập tin đã thay đổi với 23 bổ sung1 xóa
  1. 23 1
      pages/device/detail.vue

+ 23 - 1
pages/device/detail.vue

@@ -8,7 +8,7 @@
           <view v-if="deviceInfo.status == 3" class="online_text online">·在线</view>
           <view v-if="deviceInfo.status == 4" class="online_text">·离线</view>
         </view>
-        <view class="device_info">机器编号: {{deviceInfo.serialNumber}}</view>
+        <view class="device_info">机器名称: {{deviceInfo.deviceName}}</view>
       </view>
       <view style="position: absolute;right:10vw;top:12vh;z-index: 9" @click="showDrawer">
         <image :src="imgUrl+'/detail/setting2.png'" style="width: 50rpx;height: 50rpx;"/>
@@ -763,6 +763,15 @@
               <text class="text-right">{{deviceInfo.qrcodeId==null?"未绑定":deviceInfo.qrcodeId}}</text>
             </view>
           </view>
+          <view class="prop-item">
+            <view class="prop-item-image">
+              <image :src="imgUrl+'/setting/no.png'" style="width: 100%;height:100%;"/>
+            </view>
+            <view class="prop-item-left">设备编号</view>
+            <view class="prop-item-right">
+              <text class="text-right">{{deviceInfo.serialNumber}}</text>
+            </view>
+          </view>
           <view class="prop-item">
             <view class="prop-item-image">
               <image :src="imgUrl+'/setting/learn.png'" style="width: 100%;height:100%;"/>
@@ -1744,6 +1753,10 @@ export default {
 
     toDevicePlan(){
       let self = this;
+      if(this.decoctControlOnOffStatus){
+        this.$modal.showToast('请先关闭煎药后再预约')
+        return;
+      }
       getDevicePlan(this.deviceInfo.serialNumber+"&&"+this.childId).then(res=>{
 
         if(res.data != null){
@@ -2220,6 +2233,15 @@ export default {
     },
     decoctControlOnOffChange(){
       let obj = {};
+      //4号板子预约是无法开启煎药的
+      if(!this.decoctControlOnOffStatus){
+        if(this.boardType == 4){
+          if(this.devicePlanInfo != null){
+            this.$modal.showToast('请先取消预约后再开机');
+            return;
+          }
+        }
+      }
       this.decoctControlOnOffStatus = !this.decoctControlOnOffStatus;
       let arr = [];
       obj.id = "PowerControl";