Browse Source

feat:水肥机-自动控制

allen 3 months atrás
parent
commit
5b81b7c1c2

+ 4 - 5
pages/cb/shuifeizs/automation.vue

@@ -39,6 +39,7 @@
         <rotation-items :formData="formData" :tktype="tktype" />
         <rotation-items :formData="formData" :tktype="tktype" />
         <view class="automation-body-title">灌区选择</view>
         <view class="automation-body-title">灌区选择</view>
         <rotation-bottom
         <rotation-bottom
+          :activeIndex="activeIndex"
           :irrigatedAreaList="irrigatedAreaList"
           :irrigatedAreaList="irrigatedAreaList"
           :alreadyList="alreadyList"
           :alreadyList="alreadyList"
           :tktype="tktype"
           :tktype="tktype"
@@ -167,12 +168,11 @@ export default {
           title: '操作成功',
           title: '操作成功',
         });
         });
         setTimeout(() => {
         setTimeout(() => {
-          uni.navigateTo({
+          uni.redirectTo({
             url: `/pages/cb/shuifeizs/rotationflow?devBid=${this.devBid}`,
             url: `/pages/cb/shuifeizs/rotationflow?devBid=${this.devBid}`,
           });
           });
         }, 1000);
         }, 1000);
       } else {
       } else {
-        //
         uni.showToast({
         uni.showToast({
           icon: 'none',
           icon: 'none',
           title: res.msg,
           title: res.msg,
@@ -248,7 +248,6 @@ export default {
         fqList,
         fqList,
         sfmode: this.tktype !== 1 ? this.formData.sfmode || 1 : '',
         sfmode: this.tktype !== 1 ? this.formData.sfmode || 1 : '',
       };
       };
-      console.log(payload, 'payloadpayload');
       this.postTaskCtl(payload);
       this.postTaskCtl(payload);
     },
     },
   },
   },
@@ -278,7 +277,7 @@ uni-page-wrapper {
       left: 0;
       left: 0;
       right: 0;
       right: 0;
       bottom: 0;
       bottom: 0;
-      background: url('./assets/controlbg.png') no-repeat center center;
+      background: url('./assets/controlbg.png') no-repeat;
       background-size: cover;
       background-size: cover;
     }
     }
   }
   }
@@ -293,7 +292,7 @@ uni-page-wrapper {
       left: 0;
       left: 0;
       right: 0;
       right: 0;
       bottom: 0;
       bottom: 0;
-      background: url('./assets/controlbg.png') no-repeat center center;
+      background: url('./assets/controlbg.png') no-repeat;
       background-size: cover;
       background-size: cover;
       transform: rotateY(180deg);
       transform: rotateY(180deg);
       transform-origin: center center;
       transform-origin: center center;

+ 1 - 1
pages/cb/shuifeizs/components/facilitystate.vue

@@ -247,7 +247,7 @@ export default {
     }
     }
     .facilitystate-item {
     .facilitystate-item {
       height: 230rpx;
       height: 230rpx;
-      margin-top: 120rpx;
+      margin-top: 122rpx;
       margin-left: -4rpx;
       margin-left: -4rpx;
       &__label{
       &__label{
         display: flex;
         display: flex;

+ 32 - 19
pages/cb/shuifeizs/components/rotationBottom.vue

@@ -19,13 +19,21 @@
       >
       >
     </view>
     </view>
     <view class="rotation-wraper-right">
     <view class="rotation-wraper-right">
-      <rotationCard
-        v-for="item in alreadyList"
-        :item="item"
-        :tktype="tktype"
-        :key="item.sfBid"
-        :id="item.sfBid"
-      />
+      <scroll-view
+        scroll-y="true"
+        enable-flex="true"
+        scroll-with-animation
+        class="server-page__list-scroll"
+        :scroll-into-view="activeMenuId"
+      >
+        <rotationCard
+          v-for="item in alreadyList"
+          :item="item"
+          :tktype="tktype"
+          :key="item.sfBid"
+          :id="'tab' + item.sfBid"
+        />
+      </scroll-view>
     </view>
     </view>
   </view>
   </view>
 </template>
 </template>
@@ -42,37 +50,42 @@ export default {
       type: Number,
       type: Number,
       default: 1,
       default: 1,
     },
     },
+    activeIndex: {
+      type: Number,
+      default: 0,
+    },
   },
   },
   data() {
   data() {
     return {
     return {
       currentIndex: 0,
       currentIndex: 0,
       currentItem: {},
       currentItem: {},
+      activeMenuId: '',
     };
     };
   },
   },
+  watch: {
+    activeIndex() {
+      this.currentIndex = 0;
+      const firstItem = this.alreadyList[0];
+      this.activeMenuId = `tab${firstItem?.sfBid}`;
+    },
+  },
   components: {
   components: {
     rotationCard,
     rotationCard,
   },
   },
   methods: {
   methods: {
     clickHandler(item, index) {
     clickHandler(item, index) {
-      let that = this;
       this.currentItem = item;
       this.currentItem = item;
       this.currentIndex = index;
       this.currentIndex = index;
-      // 锚点跳转
-      uni
-        .createSelectorQuery()
-        .select('#' + item.sfBid)
-        .boundingClientRect(function (res) {
-          uni.pageScrollTo({
-            scrollTop: res.top,
-            duration: 300,
-          });
-        })
-        .exec();
+      this.activeMenuId = `tab${item.sfBid}`;
     },
     },
   },
   },
 };
 };
 </script>
 </script>
 <style scoped lang="scss">
 <style scoped lang="scss">
+.server-page__list-scroll {
+  height: 100%;
+  overflow: hidden;
+}
 .rotation-wraper {
 .rotation-wraper {
   display: flex;
   display: flex;
   justify-content: space-between;
   justify-content: space-between;

+ 2 - 1
pages/cb/shuifeizs/components/rotationCard.vue

@@ -25,7 +25,8 @@
       <view class="rotation-card__footer-right">
       <view class="rotation-card__footer-right">
         <u-input
         <u-input
           type="number"
           type="number"
-          maxlength="5"
+          maxlength="6"
+          :max="999999"
           v-model="item.ti"
           v-model="item.ti"
           placeholder="请输入时长"
           placeholder="请输入时长"
           :border="false"
           :border="false"

+ 4 - 1
pages/cb/shuifeizs/components/rotationItems.vue

@@ -9,6 +9,8 @@
         <u-number-box
         <u-number-box
           v-model="item.value"
           v-model="item.value"
           :min="1"
           :min="1"
+          :max="9999"
+          maxlength="4"
           @change="() => valChange(item)"
           @change="() => valChange(item)"
           v-if="item.isNumber"
           v-if="item.isNumber"
         ></u-number-box>
         ></u-number-box>
@@ -16,6 +18,8 @@
           <u-input
           <u-input
             v-model="item.value"
             v-model="item.value"
             type="number"
             type="number"
+            maxlength="6"
+            :max="999999"
             input-align="right"
             input-align="right"
             @blur="valChange(item)"
             @blur="valChange(item)"
             v-if="!item.isNumber && !item.isSelect"
             v-if="!item.isNumber && !item.isSelect"
@@ -150,7 +154,6 @@ export default {
   },
   },
   methods: {
   methods: {
     valChange(item) {
     valChange(item) {
-      console.log(item, 'itemitemitemitem');
       this.formData[item.key] = item.value;
       this.formData[item.key] = item.value;
     },
     },
     actionSheetCallback(index) {
     actionSheetCallback(index) {

+ 2 - 1
pages/cb/shuifeizs/control.vue

@@ -3,7 +3,7 @@
     <custom-card>
     <custom-card>
       <block slot="backText">{{ title }}</block>
       <block slot="backText">{{ title }}</block>
     </custom-card>
     </custom-card>
-    <view class="control-content">
+    <view class="control-content" v-if="leftList.length > 0">
       <view class="control-list-left">
       <view class="control-list-left">
         <view
         <view
           class="control-list-left-item"
           class="control-list-left-item"
@@ -53,6 +53,7 @@
         <u-empty v-if="deviceList.length === 0" text="暂无数据"></u-empty>
         <u-empty v-if="deviceList.length === 0" text="暂无数据"></u-empty>
       </view>
       </view>
     </view>
     </view>
+    <u-empty v-else text="暂无数据"></u-empty>
   </view>
   </view>
 </template>
 </template>
 <script>
 <script>

+ 67 - 7
pages/cb/shuifeizs/detail.vue

@@ -1,7 +1,14 @@
 <template>
 <template>
   <view class="facilitystate-page">
   <view class="facilitystate-page">
     <custom-card>
     <custom-card>
-      <block slot="backText">{{ title }}</block>
+      <block slot="backText">
+        <view class="facilitystate-top__title">
+          <text :class="devStatus == '1' ? 'online' : 'offline'">{{
+            devStatus == '1' ? '在线' : '离线'
+          }}</text>
+          {{ devName }}
+        </view>
+      </block>
     </custom-card>
     </custom-card>
     <view class="facilitystate-top">
     <view class="facilitystate-top">
       <view
       <view
@@ -41,6 +48,8 @@ export default {
       title: '水肥一体机',
       title: '水肥一体机',
       manualControl,
       manualControl,
       devBid: '',
       devBid: '',
+      devName: '',
+      devStatus: '1',
       dataList: [],
       dataList: [],
       irrigatedAreaList: [],
       irrigatedAreaList: [],
       alreadyfertilizerBucketList: [],
       alreadyfertilizerBucketList: [],
@@ -52,7 +61,7 @@ export default {
         },
         },
         {
         {
           icon: wheelIrrigation,
           icon: wheelIrrigation,
-          title: '轮灌控制',
+          title: '自动控制',
           url: '',
           url: '',
         },
         },
         {
         {
@@ -105,17 +114,24 @@ export default {
       6	传感器	无	水肥机上的 温度,压力,流速,PH EC等监测类要素
       6	传感器	无	水肥机上的 温度,压力,流速,PH EC等监测类要素
       7	灌区    无	逻辑区域,电磁阀的分组
       7	灌区    无	逻辑区域,电磁阀的分组
       */
       */
-    const { devBid } = options;
+    const { devBid, devName, devStatus } = options;
     this.devBid = devBid;
     this.devBid = devBid;
+    this.devName = devName;
+    this.devStatus = devStatus;
     this.deviceList[0].url = `/pages/cb/shuifeizs/control?devBid=${options.devBid}`;
     this.deviceList[0].url = `/pages/cb/shuifeizs/control?devBid=${options.devBid}`;
-    this.deviceList[1].url = `/pages/cb/shuifeizs/automation?devBid=${options.devBid}`;
     this.deviceList[
     this.deviceList[
       this.deviceList.length - 1
       this.deviceList.length - 1
     ].url = `/pages/cb/shuifeizs/history?devBid=${options.devBid}`;
     ].url = `/pages/cb/shuifeizs/history?devBid=${options.devBid}`;
-    devBid && this.getdeviceSfStatus();
-    devBid && this.getpeifangRefresh();
+    if (devBid) {
+      this.init();
+    }
   },
   },
   methods: {
   methods: {
+    async init() {
+      this.getdeviceSfStatus();
+      await this.getpeifangRefresh();
+      await this.getRunStatus();
+    },
     // iot/mobile/device/sf/peifang/refresh/
     // iot/mobile/device/sf/peifang/refresh/
     async getpeifangRefresh() {
     async getpeifangRefresh() {
       const res = await this.$myRequest({
       const res = await this.$myRequest({
@@ -126,6 +142,23 @@ export default {
         },
         },
       });
       });
     },
     },
+    async getRunStatus() {
+      const res = await this.$myRequest({
+        url: '/api/v2/iot/mobile/device/sf/zsrf/task/run/status/',
+        method: 'post',
+        data: {
+          devBid: this.devBid,
+        },
+      });
+      const data = JSON.stringify(res?.data || {});
+      if (data == '{}') {
+        this.isRun = true;
+        this.deviceList[1].url = `/pages/cb/shuifeizs/automation?devBid=${this.devBid}`;
+      } else {
+        this.isRun = false;
+        this.deviceList[1].url = `/pages/cb/shuifeizs/rotationflow?devBid=${this.devBid}`;
+      }
+    },
     async getdeviceSfStatus() {
     async getdeviceSfStatus() {
       const res = await this.$myRequest({
       const res = await this.$myRequest({
         url: '/api/v2/iot/mobile/device/sf/status/',
         url: '/api/v2/iot/mobile/device/sf/status/',
@@ -164,7 +197,34 @@ uni-page-body {
   position: relative;
   position: relative;
   height: 100%;
   height: 100%;
 }
 }
-
+.online {
+  height: 32rpx;
+  line-height: 32rpx;
+  padding: 0 8rpx;
+  border-radius: 4rpx;
+  background: #14a478;
+  color: #ffffff;
+  font-family: 'Source Han Sans CN';
+  font-size: 20rpx;
+  font-weight: 500;
+  margin-right: 8rpx;
+  top: -4rpx;
+  position: relative;
+}
+.offline {
+  height: 32rpx;
+  line-height: 32rpx;
+  padding: 0 8rpx;
+  border-radius: 4rpx;
+  background: #ff4d4f;
+  color: #ffffff;
+  font-family: 'Source Han Sans CN';
+  font-size: 20rpx;
+  font-weight: 500;
+  margin-right: 8rpx;
+  top: -4rpx;
+  position: relative;
+}
 .facilitystate-page {
 .facilitystate-page {
   background: linear-gradient(180deg, #ffffff00 0%, #fff 23.64%, #fff 100%),
   background: linear-gradient(180deg, #ffffff00 0%, #fff 23.64%, #fff 100%),
     linear-gradient(102deg, #bfeadd 6.77%, #b8f1e7 40.15%, #b9eef5 84.02%);
     linear-gradient(102deg, #bfeadd 6.77%, #b8f1e7 40.15%, #b9eef5 84.02%);

+ 0 - 4
pages/cb/shuifeizs/history.vue

@@ -64,8 +64,6 @@
     <wu-calendar
     <wu-calendar
       ref="calendar"
       ref="calendar"
       mode="range"
       mode="range"
-      :startDate="startTime"
-      :endDate="endTime"
       :insert="false"
       :insert="false"
       :maskClick="true"
       :maskClick="true"
       :rangeSameDay="true"
       :rangeSameDay="true"
@@ -138,14 +136,12 @@ export default {
       this.show = false;
       this.show = false;
     },
     },
     scrolltolower() {
     scrolltolower() {
-      console.log('scroll');
       if (this.hasMore) {
       if (this.hasMore) {
         this.pageNum++;
         this.pageNum++;
         this.getHistory();
         this.getHistory();
       }
       }
     },
     },
     handleConfirm(e) {
     handleConfirm(e) {
-      console.log(e, 'eeeeeeeeee');
       const range = e.range;
       const range = e.range;
       const { before, after } = range;
       const { before, after } = range;
       if (!before || !after) {
       if (!before || !after) {

+ 172 - 44
pages/cb/shuifeizs/rotationflow.vue

@@ -9,9 +9,9 @@
         <image :src="rotate" class="rotate-rotate" />
         <image :src="rotate" class="rotate-rotate" />
         <image :src="water" class="rotate-water" />
         <image :src="water" class="rotate-water" />
         <view class="rotationflow-time">
         <view class="rotationflow-time">
-          <view class="rotationflow-time-title">2号灌区</view>
+          <view class="rotationflow-time-title">{{ currentFq.name }}</view>
           <view class="rotationflow-time-content"> {{ time }}</view>
           <view class="rotationflow-time-content"> {{ time }}</view>
-          <view class="rotationflow-time-label">灌溉时长</view>
+          <view class="rotationflow-time-label">{{ label }}</view>
         </view>
         </view>
       </view>
       </view>
     </view>
     </view>
@@ -22,44 +22,84 @@
         :key="item.label"
         :key="item.label"
       >
       >
         <view class="rotationflow-middle-item-value">{{ item.value }}</view>
         <view class="rotationflow-middle-item-value">{{ item.value }}</view>
-        <view class="rotationflow-middle-item-title">{{ item.label }}</view>
+        <view class="rotationflow-middle-item-title">{{
+          item.sfDisplayname || item.sfName
+        }}</view>
       </view>
       </view>
     </view>
     </view>
     <view class="rotationflow-content">
     <view class="rotationflow-content">
       <view class="rotationflow-content-top">
       <view class="rotationflow-content-top">
-        <view class="rotationflow-content-top-title">灌溉</view>
+        <view
+          :class="
+            tktype == '0'
+              ? 'rotationflow-content-top-title'
+              : 'rotationflow-content-top-title-rever'
+          "
+        >
+          {{ tktype == '0' ? '灌溉' : '水肥' }}
+        </view>
         <view class="rotationflow-content-top-desc">已选灌区</view>
         <view class="rotationflow-content-top-desc">已选灌区</view>
       </view>
       </view>
       <view class="rotationflow-content-list">
       <view class="rotationflow-content-list">
-        <view class="rotationflow-content-list-wrapper">
+        <view class="rotationflow-content-list-wrapper" v-if="tktype == 0">
           <view class="rotationflow-content-num">
           <view class="rotationflow-content-num">
-            <view class="rotationflow-content-num-title">轮灌次数:1</view>
             <view class="rotationflow-content-num-title"
             <view class="rotationflow-content-num-title"
-              >轮灌间隔:10分钟</view
+              >轮灌次数:{{ currentFq.lgcs || 0 }}</view
+            >
+            <view class="rotationflow-content-num-title"
+              >轮灌间隔:{{ currentFq.lgjg || 0 }} 分钟</view
+            >
+          </view>
+        </view>
+        <view class="rotationflow-content-list-wrapper" v-else>
+          <view class="rotationflow-content-num">
+            <view class="rotationflow-content-num-title"
+              >轮灌次数:{{ currentFq.lgcs || 0 }}</view
+            >
+            <view class="rotationflow-content-num-title"
+              >肥前水:{{ currentFq.fqcx || 0 }} 分钟</view
             > </view
             > </view
           ><view class="rotationflow-content-num">
           ><view class="rotationflow-content-num">
-            <view class="rotationflow-content-num-title">轮灌次数:1</view>
             <view class="rotationflow-content-num-title"
             <view class="rotationflow-content-num-title"
-              >轮灌间隔:10分钟</view
+              >轮灌次数:{{ currentFq.lgjg || 0 }} 分钟</view
+            >
+            <view class="rotationflow-content-num-title"
+              >肥后水:{{ currentFq.fhcx || 0 }} 分钟</view
             > </view
             > </view
           ><view class="rotationflow-content-num">
           ><view class="rotationflow-content-num">
-            <view class="rotationflow-content-num-title">轮灌次数:1</view>
-            <view class="rotationflow-content-num-title">轮灌间隔:10分钟</view>
+            <view class="rotationflow-content-num-title"
+              >模式选择:{{ getsfmode(currentFq.sfmode) }}</view
+            >
+            <view class="rotationflow-content-num-title"></view>
           </view>
           </view>
         </view>
         </view>
         <view
         <view
           class="rotationflow-content-list-item"
           class="rotationflow-content-list-item"
-          v-for="(item, index) in 30"
+          v-for="(item, index) in fqList"
           :class="index === 0 ? 'haveYet' : index === 1 ? 'currentYet' : ''"
           :class="index === 0 ? 'haveYet' : index === 1 ? 'currentYet' : ''"
           :key="index"
           :key="index"
         >
         >
-          <view class="rotationflow-content-list-item-title">1号灌区</view>
-          <view class="rotationflow-content-list-item-desc">已灌溉</view>
+          <view
+            class="rotationflow-content-list-item-title"
+            :class="
+              item.value === '1' ? 'rotationflow-content-list-item-current' : ''
+            "
+            >{{ item.name }}</view
+          >
+          <view
+            class="rotationflow-content-list-item-desc"
+            :class="
+              item.value === '1' ? 'rotationflow-content-list-item-current' : ''
+            "
+            >{{ item.value == '2' ? '已灌溉' : item.lgjg + '分钟' }}</view
+          >
         </view>
         </view>
       </view>
       </view>
     </view>
     </view>
     <view class="rotationflow-footer">
     <view class="rotationflow-footer">
-      <view class="rotationflow-footer-item">结束灌溉</view>
+      <view class="rotationflow-footer-item" @click="rotationflowEnd"
+        >结束灌溉</view
+      >
     </view>
     </view>
   </view>
   </view>
 </template>
 </template>
@@ -67,6 +107,7 @@
 import rotate from './assets/rotate.png';
 import rotate from './assets/rotate.png';
 import water from './assets/water.png';
 import water from './assets/water.png';
 import autoBtn from './assets/autoBtn.png';
 import autoBtn from './assets/autoBtn.png';
+import json from './test.js';
 
 
 export default {
 export default {
   name: 'rotationflow',
   name: 'rotationflow',
@@ -75,34 +116,37 @@ export default {
       rotate,
       rotate,
       water,
       water,
       autoBtn,
       autoBtn,
-      time: '',
-      list: [
-        {
-          value: '0.00',
-          label: 'PH值',
-        },
-        {
-          value: '987 us',
-          label: 'EC值',
-        },
-        {
-          value: '20℃',
-          label: '水温',
-        },
-        {
-          value: '20 Pa',
-          label: '管道压力',
-        },
-      ],
+      time: '-',
+      list: [],
       timer: null,
       timer: null,
       devBid: '',
       devBid: '',
+      tktype: 1,
+      lgcs: 0,
+      lgjg: 0,
+      fqList: [],
+      currentFq: {},
+      label: '灌溉中.',
     };
     };
   },
   },
   components: {},
   components: {},
   methods: {
   methods: {
-    setTime() {
-      let hours = 6 * 60 * 60 * 1000;
-      this.time = '06:00:00';
+    formartTime(time) {
+      if (!time) {
+        return '-';
+      }
+      let hours = time * 60 * 1000;
+      let h = Math.floor(hours / (60 * 60 * 1000));
+      let m = Math.floor((hours % (60 * 60 * 1000)) / (60 * 1000));
+      let s = Math.floor(((hours % (60 * 60 * 1000)) % (60 * 1000)) / 1000);
+      this.time = `${h < 10 ? '0' + h : h}:${m < 10 ? '0' + m : m}:${
+        s < 10 ? '0' + s : s
+      }`;
+    },
+    setTime(time) {
+      if (!time) {
+        return '-';
+      }
+      let hours = time * 60 * 1000;
       this.timer = setInterval(() => {
       this.timer = setInterval(() => {
         if (hours <= 0) {
         if (hours <= 0) {
           clearInterval(this.timer);
           clearInterval(this.timer);
@@ -117,6 +161,20 @@ export default {
         }`;
         }`;
       }, 1000);
       }, 1000);
     },
     },
+    getsfmode(mode) {
+      switch (mode) {
+        case '0':
+          return '定时';
+        case '1':
+          return '定量';
+        case '2':
+          return 'EC调配';
+        case '3':
+          return '混肥比例';
+        default:
+          return '-';
+      }
+    },
     async getRunStatus() {
     async getRunStatus() {
       const res = await this.$myRequest({
       const res = await this.$myRequest({
         url: '/api/v2/iot/mobile/device/sf/zsrf/task/run/status/',
         url: '/api/v2/iot/mobile/device/sf/zsrf/task/run/status/',
@@ -125,16 +183,72 @@ export default {
           devBid: this.devBid,
           devBid: this.devBid,
         },
         },
       });
       });
-      console.log(res, 'resresresres');
+      const data = res.data || {};
+      this.list = data?.sensorList || [];
+      this.tktype = data?.tktype;
+      this.lgjg = data?.lgjg || 0;
+      this.lgcs = data?.lgcs || 0;
+      this.fqList = data?.fqList || [];
+      this.fqList.forEach((item) => {
+        if (item.value === '1') {
+          this.currentFq = item;
+        }
+      });
+      this.formartTime(this.currentFq.lgjg);
+      this.setTime(this.currentFq.lgjg);
+    },
+    rotationflowEnd() {
+      const payload = {
+        devBid: this.devBid,
+        tkid: 0,
+        status: 0,
+        tktype: this.tktype,
+      };
+      this.postTaskCtl(payload);
+    },
+    async postTaskCtl(payload) {
+      uni.showLoading({
+        title: '正在执行',
+      });
+      const res = await this.$myRequest({
+        url: '/api/v2/iot/mobile/device/sf/zsrf/task/ctl/',
+        method: 'post',
+        data: payload,
+        header: {
+          'Content-Type': 'application/json',
+        },
+      });
+      uni.hideLoading();
+      if (res.code === '000000') {
+        uni.showToast({
+          title: '操作成功',
+        });
+        setTimeout(() => {
+          uni.navigateTo({
+            url: `/pages/cb/shuifeizs/detail?devBid=${this.devBid}`,
+          });
+        }, 1000);
+      } else {
+        uni.showToast({
+          icon: 'none',
+          title: res.msg,
+        });
+      }
     },
     },
   },
   },
-  mounted() {
-    this.setTime();
-  },
   onLoad(options) {
   onLoad(options) {
     const { devBid } = options;
     const { devBid } = options;
     this.devBid = devBid;
     this.devBid = devBid;
     this.getRunStatus();
     this.getRunStatus();
+    setInterval(() => {
+      if (this.label === '灌溉中.') {
+        this.label = '灌溉中..';
+      } else if (this.label === '灌溉中..') {
+        this.label = '灌溉中...';
+      } else {
+        this.label = '灌溉中.';
+      }
+    }, 500);
   },
   },
   onUnload() {
   onUnload() {
     clearInterval(this.timer);
     clearInterval(this.timer);
@@ -235,9 +349,9 @@ uni-page-wrapper {
           text-align: center;
           text-align: center;
         }
         }
         .rotationflow-time-label {
         .rotationflow-time-label {
-          width: 200rpx;
+          width: 100rpx;
           color: #687a74;
           color: #687a74;
-          text-align: center;
+          text-align: left;
           font-family: 'Source Han Sans CN VF';
           font-family: 'Source Han Sans CN VF';
           font-size: 24rpx;
           font-size: 24rpx;
           font-weight: 400;
           font-weight: 400;
@@ -304,6 +418,17 @@ uni-page-wrapper {
         line-height: normal;
         line-height: normal;
         padding: 4rpx 16rpx;
         padding: 4rpx 16rpx;
       }
       }
+      .rotationflow-content-top-title-rever {
+        border-radius: 8rpx;
+        background: #f3a72f1a;
+        color: #f3a72f;
+        font-family: 'Source Han Sans CN VF';
+        font-size: 28rpx;
+        font-style: normal;
+        font-weight: 400;
+        line-height: normal;
+        padding: 4rpx 16rpx;
+      }
       .rotationflow-content-top-desc {
       .rotationflow-content-top-desc {
         color: #333333;
         color: #333333;
         font-family: 'Source Han Sans CN VF';
         font-family: 'Source Han Sans CN VF';
@@ -346,6 +471,9 @@ uni-page-wrapper {
         .rotationflow-content-list-item-desc {
         .rotationflow-content-list-item-desc {
           margin-right: 32rpx;
           margin-right: 32rpx;
         }
         }
+        .rotationflow-content-list-item-current {
+          color: #14a478;
+        }
       }
       }
       .haveYet {
       .haveYet {
         color: #9ba6a3;
         color: #9ba6a3;
@@ -385,7 +513,7 @@ uni-page-wrapper {
       font-size: 32rpx;
       font-size: 32rpx;
       font-weight: 500;
       font-weight: 500;
       border-radius: 16rpx;
       border-radius: 16rpx;
-      background: #14a478;
+      background: #ff3546;
     }
     }
   }
   }
 }
 }

+ 103 - 0
pages/cb/shuifeizs/test.js

@@ -0,0 +1,103 @@
+export default {
+  code: '000000',
+  msg: '\u64cd\u4f5c\u6210\u529f',
+  data: {
+    tkid: 0,
+    tktype: 1,
+    status: 0,
+    cufq: 1,
+    cufa: '2,4,6,9,12',
+    nextfq: 1,
+    sensorList: [
+      {
+        sfBid: null,
+        devBid: null,
+        sfType: '6',
+        sfName: '\u4e3b\u7ba1\u9053\u77ac\u65f6\u6d41\u91cf',
+        sfDisplayname: '\u4e3b\u7ba1\u9053\u77ac\u65f6\u6d41\u91cf',
+        sfCode: 'lszg',
+        sfParentBid: null,
+        sfSequence: 0,
+        sfCreatedDate: null,
+        sfCreator: null,
+        sfModifieddate: null,
+        sfModifier: null,
+        sfLat: null,
+        sfLng: null,
+        sfAddress: null,
+        childrenList: null,
+        value: 20.3,
+      },
+      {
+        sfBid: null,
+        devBid: null,
+        sfType: '6',
+        sfName: '\u4e3b\u7ba1\u9053\u7d2f\u8ba1\u6d41\u91cf',
+        sfDisplayname: '\u4e3b\u7ba1\u9053\u7d2f\u8ba1\u6d41\u91cf',
+        sfCode: 'llzg',
+        sfParentBid: null,
+        sfSequence: 0,
+        sfCreatedDate: null,
+        sfCreator: null,
+        sfModifieddate: null,
+        sfModifier: null,
+        sfLat: null,
+        sfLng: null,
+        sfAddress: null,
+        childrenList: null,
+        value: 210.3,
+      },
+      {
+        sfBid: null,
+        devBid: null,
+        sfType: '6',
+        sfName: 'EC',
+        sfDisplayname: 'EC',
+        sfCode: 'ec',
+        sfParentBid: null,
+        sfSequence: 0,
+        sfCreatedDate: null,
+        sfCreator: null,
+        sfModifieddate: null,
+        sfModifier: null,
+        sfLat: null,
+        sfLng: null,
+        sfAddress: null,
+        childrenList: null,
+        value: 23.809,
+      },
+      {
+        sfBid: null,
+        devBid: null,
+        sfType: '6',
+        sfName: 'PH',
+        sfDisplayname: 'PH',
+        sfCode: 'ph',
+        sfParentBid: null,
+        sfSequence: 0,
+        sfCreatedDate: null,
+        sfCreator: null,
+        sfModifieddate: null,
+        sfModifier: null,
+        sfLat: null,
+        sfLng: null,
+        sfAddress: null,
+        childrenList: null,
+        value: 7.5,
+      },
+    ],
+    fqList: [
+      {
+        fqid: '1',
+        name: '1\u533a',
+        lgcs: '',
+        lgjg: 10,
+        value: '1',
+        fqcx: '',
+        fhcx: '',
+        sfmode: '',
+        pfid: 0,
+      },
+    ],
+  },
+};

+ 1 - 1
pages/equipList/index.vue

@@ -571,7 +571,7 @@ export default {
         case 40:
         case 40:
           item.addtime = item.uptime;
           item.addtime = item.uptime;
           uni.navigateTo({
           uni.navigateTo({
-            url: `../cb/shuifeizs/detail?devBid=${item.devBid}`,
+            url: `../cb/shuifeizs/detail?devBid=${item.devBid}&devName=${item.devName}&devStatus=${item.devStatus}`,
           });
           });
           break;
           break;
         default:
         default: