Browse Source

feat: 更新闸门设备相关页面和功能

refactor: 移除未使用的图片资源和组件

fix: 修复设备列表跳转逻辑和API路径

docs: 更新设备修改页面和新增搜索功能

chore: 清理无用代码和文件

style: 调整页面样式和布局

perf: 优化设备状态显示和操作逻辑

test: 移除测试文件test.js

build: 更新API基础URL配置

ci: 移除无用页面配置

feat(equipList): 新增设备修改和搜索功能

refactor(zhamenzs): 重构闸门控制页面逻辑

fix(control): 修复开关状态变更函数绑定问题

docs(modification): 添加设备修改权限控制

chore: 删除formulaSetting和timingSetting相关文件
allen 2 months ago
parent
commit
e878c67d1f
55 changed files with 2671 additions and 3328 deletions
  1. 1 24
      pages.json
  2. 14 4
      pages/cb/shuifeizsFirst/autoSetting.vue
  3. 1 1
      pages/cb/shuifeizsFirst/automation.vue
  4. 4 4
      pages/cb/shuifeizsFirst/control.vue
  5. 0 562
      pages/cb/shuifeizsFirst/rotationflow.vue
  6. BIN
      pages/cb/zhamenFirst/assets/backwashControl.png
  7. BIN
      pages/cb/zhamenFirst/assets/basicSetting.png
  8. BIN
      pages/cb/zhamenFirst/assets/beijing.png
  9. BIN
      pages/cb/zhamenFirst/assets/bottomLine.png
  10. BIN
      pages/cb/zhamenFirst/assets/bucket.png
  11. BIN
      pages/cb/zhamenFirst/assets/bucketClose.png
  12. BIN
      pages/cb/zhamenFirst/assets/bucketCloseTop.png
  13. BIN
      pages/cb/zhamenFirst/assets/bucketOpen.png
  14. BIN
      pages/cb/zhamenFirst/assets/bucketOpenTop.png
  15. BIN
      pages/cb/zhamenFirst/assets/fan.png
  16. BIN
      pages/cb/zhamenFirst/assets/fanRun.png
  17. BIN
      pages/cb/zhamenFirst/assets/fertTopBottom.png
  18. BIN
      pages/cb/zhamenFirst/assets/fertTopBottomRadius.png
  19. BIN
      pages/cb/zhamenFirst/assets/fertilizationFormula.png
  20. BIN
      pages/cb/zhamenFirst/assets/fertilizationValve.png
  21. BIN
      pages/cb/zhamenFirst/assets/formulaSetting.png
  22. BIN
      pages/cb/zhamenFirst/assets/lastBorder.png
  23. BIN
      pages/cb/zhamenFirst/assets/line.png
  24. BIN
      pages/cb/zhamenFirst/assets/lineBottomBorder.png
  25. BIN
      pages/cb/zhamenFirst/assets/lineBottomBorderLittle.png
  26. BIN
      pages/cb/zhamenFirst/assets/lineHeight.png
  27. BIN
      pages/cb/zhamenFirst/assets/lineOne.png
  28. BIN
      pages/cb/zhamenFirst/assets/lineTopAndBottom.png
  29. BIN
      pages/cb/zhamenFirst/assets/lineTopBorder.png
  30. BIN
      pages/cb/zhamenFirst/assets/lineTopBorderLittle.png
  31. BIN
      pages/cb/zhamenFirst/assets/lineTopBottom.png
  32. BIN
      pages/cb/zhamenFirst/assets/masterStop.png
  33. BIN
      pages/cb/zhamenFirst/assets/solenoidCloseValve.png
  34. BIN
      pages/cb/zhamenFirst/assets/solenoidStopValve.png
  35. 52 121
      pages/cb/zhamenFirst/autoSetting.vue
  36. 4 34
      pages/cb/zhamenFirst/automation.vue
  37. 0 0
      pages/cb/zhamenFirst/common/vendor.js
  38. 0 71
      pages/cb/zhamenFirst/components/base.vue
  39. 0 472
      pages/cb/zhamenFirst/components/facilitystate.vue
  40. 1 9
      pages/cb/zhamenFirst/components/irrigatedArea.vue
  41. 9 17
      pages/cb/zhamenFirst/control.vue
  42. 0 382
      pages/cb/zhamenFirst/formulaSetting.vue
  43. 1 1
      pages/cb/zhamenFirst/history.vue
  44. 0 562
      pages/cb/zhamenFirst/rotationflow.vue
  45. 0 103
      pages/cb/zhamenFirst/test.js
  46. 0 302
      pages/cb/zhamenFirst/timingSetting copy.vue
  47. 201 592
      pages/cb/zhamenFirst/timingSetting.vue
  48. 14 64
      pages/cb/zhamenFirst/zhamenzs.vue
  49. 1 1
      pages/equipList/index.vue
  50. 995 0
      pages/equipList2/index.vue
  51. 241 0
      pages/equipList2/modification.vue
  52. 268 0
      pages/equipList2/seabox/modification.vue
  53. 343 0
      pages/equipList2/seabox/search.vue
  54. 519 0
      pages/equipList2/search.vue
  55. 2 2
      util/api.js

+ 1 - 24
pages.json

@@ -128,14 +128,7 @@
 						"navigationStyle": "custom"
 					}
 				},
-				{
-					"path": "rotationflow",
-					"style": {
-						"navigationBarTitleText": "",
-						"enablePullDownRefresh": false,
-						"navigationStyle": "custom"
-					}
-				},
+				
 				{
 					"path": "autoSetting",
 					"style": {
@@ -198,14 +191,6 @@
 					}
 				},
 				{
-					"path": "rotationflow",
-					"style": {
-						"navigationBarTitleText": "",
-						"enablePullDownRefresh": false,
-						"navigationStyle": "custom"
-					}
-				},
-				{
 					"path": "autoSetting",
 					"style": {
 						"navigationBarTitleText": "",
@@ -214,14 +199,6 @@
 					}
 				},
 				{
-					"path": "formulaSetting",
-					"style": {
-						"navigationBarTitleText": "",
-						"enablePullDownRefresh": false,
-						"navigationStyle": "custom"
-					}
-				},
-				{
 					"path": "timingSetting",
 					"style": {
 						"navigationBarTitleText": "",

+ 14 - 4
pages/cb/shuifeizsFirst/autoSetting.vue

@@ -113,7 +113,7 @@
             <view class="group-detail-item" v-for="(item,index) in group_list" :key="item.group" :id="'group-'+index">
               <view class="group-header">
                 <text class="group-title">{{index + 1}}组</text>
-                <view class="group-check" :class="{ active: item.selected }" @click="changeGroupStatus(item)">
+                <view class="group-check" :class="{ active: item.selected }" @tap="()=>changeGroupStatus(index)">
                   <u-icon class="check-icon" name="checkmark" size="24rpx" />
                 </view>
               </view>
@@ -377,9 +377,19 @@ export default {
         };
       });
     },
-    changeGroupStatus(item) {
-      item.selected = !item.selected;
-      this.editGroupList({group_value: item.group_value});
+    // 实现排除对象中的某些属性的方法
+    excludeObjectKeys(obj, keys) {
+      return Object.keys(obj).reduce((acc, key) => {
+        if (!keys.includes(key)) {
+          acc[key] = obj[key];
+        }
+        return acc;
+      }, {});
+    },
+    changeGroupStatus(index) {
+      const item = this.group_list[index];
+      this.$set(item,'selected',!item.selected);
+      this.editGroupList({group_value: item.selected?1:0});
     },
     selectGroup(index) {
       this.selectedGroup = index;

+ 1 - 1
pages/cb/shuifeizsFirst/automation.vue

@@ -171,7 +171,7 @@ export default {
     async getRunStatus() {
       try {
         const res = await this.$myRequest({
-          url: '/api/v2/iot/mobile/device/sf/zsrf/task/run/status/',
+          url: '/api/v2/iot/mobile/device/sf/task/run/status/',
           method: 'post',
           data: {
             devBid: this.devBid,

+ 4 - 4
pages/cb/shuifeizsFirst/control.vue

@@ -35,7 +35,7 @@
             <view class="control-list-right-item-action">
               <u-switch
                 :value="item.value == 1 ? true : false"
-                @change="changeSwitch(item)"
+                @change="()=>changeSwitch(item)"
                 activeColor="#14A478"
                 size="40"
                 inactiveColor="rgb(230, 230, 230)"
@@ -60,17 +60,17 @@
                 <view
                   class="status-item"
                   :class="item.value == '1'?'status-item-open':''"
-                  @click="changeStatus(item, '1')"
+                  @click="()=>changeStatus(item, '1')"
                 >开</view>
                 <view
                   class="status-item" 
                   :class="item.value == '0'?'status-item-pause':''" 
-                  @click="changeStatus(item, '0')"
+                  @click="()=>changeStatus(item, '0')"
                 >停</view>
                 <view 
                   class="status-item status-item-close-label"
                   :class="item.value == '2'?'status-item-close':''"
-                  @click="changeStatus(item, '2')"
+                  @click="()=>changeStatus(item, '2')"
                 >关</view>
               </view>
             </view>

+ 0 - 562
pages/cb/shuifeizsFirst/rotationflow.vue

@@ -1,562 +0,0 @@
-<template>
-  <view class="rotationflow">
-    <custom-card>
-      <block slot="backText">自动控制</block>
-    </custom-card>
-    <view class="rotationflow-top">
-      <view class="rotationflow-top-list">
-        <image :src="autoBtn" class="rotate-autoBtn" />
-        <image :src="rotate" class="rotate-rotate" />
-        <image :src="water" class="rotate-water" />
-        <view class="rotationflow-time">
-          <view class="rotationflow-time-title" style="font-size: 28px">{{
-            currentFq.name || '--'
-          }}</view>
-          <!-- <view class="rotationflow-time-content"> {{ time }}</view> -->
-          <view class="rotationflow-time-label">{{ label }}</view>
-        </view>
-      </view>
-    </view>
-    <view class="rotationflow-middle">
-      <view
-        class="rotationflow-middle-item"
-        v-for="item in list"
-        :key="item.label"
-      >
-        <view class="rotationflow-middle-item-value">{{ item.value }}</view>
-        <view class="rotationflow-middle-item-title">{{
-          item.sfDisplayname || item.sfName
-        }}</view>
-      </view>
-    </view>
-    <view class="rotationflow-content">
-      <view class="rotationflow-content-top">
-        <view
-          :class="
-            tktype == '1'
-              ? 'rotationflow-content-top-title'
-              : 'rotationflow-content-top-title-rever'
-          "
-        >
-          {{ tktype == '1' ? '灌溉' : '水肥' }}
-        </view>
-        <view class="rotationflow-content-top-desc">已选灌区</view>
-      </view>
-      <view class="rotationflow-content-list">
-        <view class="rotationflow-content-list-wrapper" v-if="tktype == 1">
-          <view class="rotationflow-content-num">
-            <view class="rotationflow-content-num-title"
-              >轮灌次数:{{ 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 class="rotationflow-content-num">
-            <view class="rotationflow-content-num-title"
-              >轮灌间隔:{{ currentFq.lgjg || 0 }} 分钟</view
-            >
-            <view class="rotationflow-content-num-title"
-              >肥后水:{{ currentFq.fhcx || 0 }} 分钟</view
-            > </view
-          ><view class="rotationflow-content-num">
-            <view class="rotationflow-content-num-title"
-              >模式选择:{{ getsfmode(currentFq.sfmode) }}</view
-            >
-            <view class="rotationflow-content-num-title"></view>
-          </view>
-        </view>
-        <view
-          class="rotationflow-content-list-item"
-          v-for="(item, index) in fqList"
-          :class="item.value === '2' ? 'haveYet' : ''"
-          :key="index"
-        >
-          <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.ggsj + '分钟' }}</view
-          >
-        </view>
-      </view>
-    </view>
-    <view class="rotationflow-footer">
-      <view class="rotationflow-footer-item" @click="rotationflowEnd"
-        >结束灌溉</view
-      >
-    </view>
-  </view>
-</template>
-<script>
-import rotate from './assets/rotate.png';
-import water from './assets/water.png';
-import autoBtn from './assets/autoBtn.png';
-import json from './test.js';
-
-export default {
-  name: 'rotationflow',
-  data() {
-    return {
-      rotate,
-      water,
-      autoBtn,
-      time: '-',
-      list: [],
-      timer: null,
-      devBid: '',
-      tktype: 1,
-      lgcs: 0,
-      lgjg: 0,
-      fqList: [],
-      currentFq: {},
-      label: '灌溉中.',
-      devName: '',
-      devStatus: '',
-    };
-  },
-  components: {},
-  methods: {
-    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(() => {
-        if (hours <= 0) {
-          clearInterval(this.timer);
-          return;
-        }
-        hours -= 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
-        }`;
-      }, 1000);
-    },
-    getsfmode(m) {
-      const mode = String(m);
-      switch (mode) {
-        case '1':
-          return '定时';
-        case '2':
-          return '定量';
-        case '3':
-          return 'EC调配';
-        case '4':
-          return '混肥比例';
-        default:
-          return '-';
-      }
-    },
-    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 = res || {};
-      if (data.status === undefined || data.status / 1 !== 1) {
-        clearInterval(this.timer);
-        clearInterval(this.labelTimer);
-        clearInterval(this.taskTimer);
-        uni.showLoading({
-          title: '灌溉任务已结束',
-        });
-
-        setTimeout(() => {
-          uni.hideLoading();
-          uni.redirectTo({
-            url: `/pages/cb/shuifeizsFirst/shuifeizs?devBid=${this.devBid}&devName=${this.devName}&devStatus=${this.devStatus}`,
-          });
-        }, 1000);
-        return;
-      }
-
-      this.list = data?.sensorList || [];
-
-      this.tktype = data?.tktype;
-      this.lgjg = data?.lgjg || 0;
-      this.lgcs = data?.lgcs || 0;
-      this.fqList = data?.fqList || [];
-      // value 0 未灌溉 1 灌溉中 2 灌溉完成
-      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/shuifeizsFirst/shuifeizs?devBid=${this.devBid}&devName=${this.devName}&devStatus=${this.devStatus}`,
-          });
-        }, 1000);
-      } else {
-        uni.showToast({
-          icon: 'none',
-          title: res.msg,
-        });
-      }
-    },
-  },
-  onLoad(options) {
-    const { devBid, devName, devStatus } = options;
-    this.devBid = devBid;
-    this.devName = devName;
-    this.devStatus = devStatus;
-    this.getRunStatus();
-    this.labelTimer = setInterval(() => {
-      if (this.label === '灌溉中.') {
-        this.label = '灌溉中..';
-      } else if (this.label === '灌溉中..') {
-        this.label = '灌溉中...';
-      } else {
-        this.label = '灌溉中.';
-      }
-    }, 500);
-
-    this.taskTimer = setInterval(() => {
-      this.getRunStatus();
-    }, 30000);
-  },
-  onUnload() {
-    clearInterval(this.timer);
-    clearInterval(this.labelTimer);
-    clearInterval(this.taskTimer);
-  },
-  beforeDestroy() {
-    if (this.timer) {
-      clearInterval(this.timer);
-    }
-
-    if (this.taskTimer) {
-      clearInterval(this.taskTimer);
-    }
-
-    if (this.labelTimer) {
-      clearInterval(this.labelTimer);
-    }
-  },
-};
-</script>
-<style scoped lang="scss">
-uni-page-body,
-uni-page-wrapper {
-  position: relative;
-  height: 100%;
-}
-@keyframes rotate {
-  0% {
-    transform: rotate(0deg);
-  }
-  100% {
-    transform: rotate(360deg);
-  }
-}
-.rotationflow {
-  background: linear-gradient(
-      180deg,
-      #f5f6fa00 0%,
-      #f5f6fa 23.64%,
-      #f5f6fa 100%
-    ),
-    linear-gradient(102deg, #bfeadd 6.77%, #b8f1e7 40.15%, #b9eef5 84.02%);
-  width: 100%;
-  height: calc(100vh - 100rpx);
-  overflow: hidden;
-  overflow-y: scroll;
-  margin-bottom: 140rpx;
-  position: relative;
-  .rotationflow-top {
-    height: 500rpx;
-    width: 100%;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    .rotationflow-top-list {
-      display: flex;
-      position: relative;
-      align-items: center;
-      justify-content: center;
-      width: 100%;
-      height: 100%;
-      .rotate-autoBtn {
-        position: absolute;
-        width: 360rpx;
-        height: 360rpx;
-        z-index: 1;
-      }
-      .rotate-rotate {
-        position: absolute;
-        width: 320rpx;
-        height: 320rpx;
-        left: 215rpx;
-        top: 92rpx;
-        z-index: 2;
-        // 循环滚动
-        animation: rotate 20s linear infinite;
-      }
-      .rotate-water {
-        position: absolute;
-        width: 550rpx;
-        height: 600rpx;
-        margin-left: 220rpx;
-        margin-top: 100rpx;
-      }
-      .rotationflow-time {
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-        justify-content: center;
-        position: relative;
-        z-index: 3;
-        top: -5rpx;
-        .rotationflow-time-title {
-          width: 200rpx;
-          color: #042118;
-          text-align: center;
-          font-family: 'Source Han Sans CN VF';
-          font-size: 32rpx;
-          font-weight: 500;
-        }
-        .rotationflow-time-content {
-          width: 200rpx;
-          color: #042118;
-          font-family: 'Source Han Sans CN VF';
-          font-size: 40rpx;
-          font-weight: 700;
-          margin: 8rpx 0;
-          text-align: center;
-        }
-        .rotationflow-time-label {
-          width: 140rpx;
-          color: #687a74;
-          text-align: left;
-          font-family: 'Source Han Sans CN VF';
-          font-size: 32rpx;
-          font-weight: 400;
-        }
-      }
-    }
-  }
-  .rotationflow-middle {
-    display: flex;
-    padding: 0 48rpx;
-    margin: 32rpx 0;
-    .rotationflow-middle-item {
-      width: 25%;
-      text-align: center;
-      .rotationflow-middle-item-value {
-        color: #042118;
-        font-family: 'Source Han Sans CN VF';
-        font-size: 32rpx;
-        font-weight: 500;
-      }
-      .rotationflow-middle-item-title {
-        color: #687a74;
-        font-family: 'Source Han Sans CN VF';
-        font-size: 28rpx;
-        font-style: normal;
-        font-weight: 400;
-        line-height: normal;
-        // 超出隐藏
-        white-space: nowrap;
-        text-overflow: ellipsis;
-        overflow: hidden;
-      }
-    }
-  }
-  .rotationflow-content {
-    border-bottom: none;
-    position: relative;
-    overflow: hidden;
-    background-color: #fff;
-    border-radius: 16rpx;
-    padding: 32rpx;
-    width: calc(100% - 128rpx);
-    margin-left: 32rpx;
-    margin-bottom: 140rpx;
-    &::before {
-      position: absolute;
-      content: '';
-      top: 0;
-      left: 0;
-      right: 0;
-      bottom: 0;
-      background-size: cover;
-    }
-    .rotationflow-content-top {
-      display: flex;
-      .rotationflow-content-top-title {
-        border-radius: 8rpx;
-        background: #1890ff1a;
-        color: #1890ff;
-        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-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 {
-        color: #333333;
-        font-family: 'Source Han Sans CN VF';
-        font-size: 28rpx;
-        font-weight: 700;
-        margin-left: 16rpx;
-      }
-    }
-    .rotationflow-content-list {
-      width: 100%;
-      .rotationflow-content-list-wrapper {
-        width: 100%;
-        border-radius: 8rpx;
-        background: #f5f6fa;
-        padding: 8rpx 0;
-        margin-top: 16rpx;
-      }
-      .rotationflow-content-num {
-        display: flex;
-        padding: 8rpx 16rpx;
-        .rotationflow-content-num-title {
-          width: 50%;
-          color: #687a74;
-          font-family: 'Source Han Sans CN VF';
-          font-size: 28rpx;
-          font-style: normal;
-          font-weight: 400;
-          margin: 0 8rpx;
-        }
-      }
-      .rotationflow-content-list-item {
-        display: flex;
-        justify-content: space-between;
-        margin: 16rpx 0;
-        color: #042118;
-        text-align: right;
-        font-family: 'Source Han Sans CN VF';
-        font-size: 28rpx;
-        font-weight: 400;
-        .rotationflow-content-list-item-desc {
-        }
-        .rotationflow-content-list-item-current {
-          color: #14a478;
-        }
-      }
-      .haveYet {
-        color: #9ba6a3;
-        text-align: right;
-        font-family: 'Source Han Sans CN VF';
-        font-size: 28rpx;
-        font-weight: 400;
-      }
-      .currentYet {
-        color: #14a478;
-        text-align: right;
-        font-family: 'Source Han Sans CN VF';
-        font-size: 28rpx;
-        font-weight: 400;
-      }
-    }
-  }
-  .rotationflow-footer {
-    position: fixed;
-    width: 100%;
-    bottom: 0;
-    left: 0;
-    display: flex;
-    height: 128rpx;
-    align-items: center;
-    background: #fff;
-    box-shadow: 0 -4rpx 8rpx 0 #00000026;
-    z-index: 9999;
-    .rotationflow-footer-item {
-      width: calc(100% - 64rpx);
-      margin: 0 32rpx;
-      text-align: center;
-      font-size: 32rpx;
-      height: 80rpx;
-      line-height: 80rpx;
-      color: #ffffff;
-      font-family: 'PingFang SC';
-      font-size: 32rpx;
-      font-weight: 500;
-      border-radius: 16rpx;
-      background: #ff3546;
-    }
-  }
-}
-</style>

BIN
pages/cb/zhamenFirst/assets/backwashControl.png


BIN
pages/cb/zhamenFirst/assets/basicSetting.png


BIN
pages/cb/zhamenFirst/assets/beijing.png


BIN
pages/cb/zhamenFirst/assets/bottomLine.png


BIN
pages/cb/zhamenFirst/assets/bucket.png


BIN
pages/cb/zhamenFirst/assets/bucketClose.png


BIN
pages/cb/zhamenFirst/assets/bucketCloseTop.png


BIN
pages/cb/zhamenFirst/assets/bucketOpen.png


BIN
pages/cb/zhamenFirst/assets/bucketOpenTop.png


BIN
pages/cb/zhamenFirst/assets/fan.png


BIN
pages/cb/zhamenFirst/assets/fanRun.png


BIN
pages/cb/zhamenFirst/assets/fertTopBottom.png


BIN
pages/cb/zhamenFirst/assets/fertTopBottomRadius.png


BIN
pages/cb/zhamenFirst/assets/fertilizationFormula.png


BIN
pages/cb/zhamenFirst/assets/fertilizationValve.png


BIN
pages/cb/zhamenFirst/assets/formulaSetting.png


BIN
pages/cb/zhamenFirst/assets/lastBorder.png


BIN
pages/cb/zhamenFirst/assets/line.png


BIN
pages/cb/zhamenFirst/assets/lineBottomBorder.png


BIN
pages/cb/zhamenFirst/assets/lineBottomBorderLittle.png


BIN
pages/cb/zhamenFirst/assets/lineHeight.png


BIN
pages/cb/zhamenFirst/assets/lineOne.png


BIN
pages/cb/zhamenFirst/assets/lineTopAndBottom.png


BIN
pages/cb/zhamenFirst/assets/lineTopBorder.png


BIN
pages/cb/zhamenFirst/assets/lineTopBorderLittle.png


BIN
pages/cb/zhamenFirst/assets/lineTopBottom.png


BIN
pages/cb/zhamenFirst/assets/masterStop.png


BIN
pages/cb/zhamenFirst/assets/solenoidCloseValve.png


BIN
pages/cb/zhamenFirst/assets/solenoidStopValve.png


+ 52 - 121
pages/cb/zhamenFirst/autoSetting.vue

@@ -7,7 +7,6 @@
     <view class="content">
       <!-- 灌溉模式 -->
       <view class="setting-top-container">
-
         <!-- 轮灌次数 -->
         <view class="setting-item">
           <text class="setting-label">轮灌次数</text>
@@ -24,12 +23,10 @@
             <text class="time-unit">分钟</text>
           </view>
         </view>
-
       </view>
-      <u-picker v-model="show" mode="selector" :range="selector" range-key="label" @confirm="confirmHandler"></u-picker>
       <!-- 定时轮灌组 -->
       <view class="round-groups-section">
-        <text class="section-title">选择轮灌组</text>
+        <text class="section-title">定时轮灌组</text>
         <view class="round-groups-container">
           <!-- 左侧轮灌组列表 -->
           <view class="round-groups-list">
@@ -48,16 +45,12 @@
             <view class="group-detail-item" v-for="(item,index) in group_list" :key="item.group" :id="'group-'+index">
               <view class="group-header">
                 <text class="group-title">{{index + 1}}组</text>
-                <view class="group-check" :class="{ active: item.selected }" @click="changeGroupStatus(item)">
+                <view class="group-check" :class="item.selected?'active':''" @tap="()=>changeGroupStatus(index)">
                   <u-icon class="check-icon" name="checkmark" size="24rpx" />
                 </view>
               </view>
               <view class="group-settings">
                 <view class="setting-row">
-                  <text class="setting-row-label">施肥配方</text>
-                  <view @click="selectFormula(index)" class="select-group">{{ getTitle(item) }}</view>
-                </view>
-                <view class="setting-row">
                   <text class="setting-row-label">灌溉时长</text>
                   <input
                     type="number"
@@ -66,7 +59,7 @@
                     min="0"
                     max="1440"
                     placeholder="请输入灌溉时长(分钟)"
-                    @change="(item) => PartTimChange(item)"
+                    @change="(e) => PartTimChange(e,index)"
                   />
                   <text class="setting-row-unit">分钟</text>
                 </view>
@@ -79,7 +72,7 @@
                     min="0"
                     max="1440"
                     placeholder="请输入施肥时长(分钟)"
-                    @change="(item) => FertTimChange(item)"
+                    @change="(e) => FertTimChange(e,index)"
                   />
                   <text class="setting-row-unit">分钟</text>
                 </view>
@@ -96,10 +89,7 @@
 export default {
   data() {
     return {
-      show: false,
       devBid:'',
-      title: '选择配方',
-      selector: [],
       selectedGroup: 0,
       FertType: -1,
       FertPidType: -1,
@@ -108,14 +98,12 @@ export default {
       FrontClearWater: 0,
       UnderClearWater: 0,
       group_list:[],
-      currentIndex: -1,
     };
   },
   
   async onLoad(options) {
     const { devBid } = options;
     this.devBid = devBid;
-    await this.getInfoList();
     await this.getConfigInfo();
   },
   methods: {
@@ -124,7 +112,7 @@ export default {
         devBid: this.devBid,
       };
       await this.$myRequest({
-        url:'/api/v2/iot/device/sf/refresh/',
+        url:'/api/v2/iot/device/fkq/refresh/',
         method:'POST',
         data: params,
         header: {
@@ -133,90 +121,36 @@ export default {
         }
       })
     },
-    getTitle(item){
-      let value = '';
-      if(item.labelText){
-        return item.labelText;
-      }
-      for(let key in item){
-        if(key.includes('Formula')){
-          value = item[key];
-          break;
-        }
-      }
-      for(let i = 0;i< this.selector.length;i++){
-        const item = this.selector[i];
-        if(item.Formula == value){
-          return item.label;
-        }
-      }
-      return '选择配方';
-    },
-   confirmHandler(e){
-    const currentItem = this.selector[e];
-    const Formula = currentItem.Formula;
-    const item = this.group_list[this.currentIndex];
-    item.labelText = currentItem.label;
-    if(item.selected){
-      let keyLabel = '';
-      for(let key in item){
-        if(key.includes('Formula')){
-          keyLabel = key
-          break;
-        }
-      }
-      const params = {
-        [keyLabel]: Formula,
-        group_value: 1,
-      }
-      this.editGroupList(params);
-    }
-   },
-   async getInfoList(){
-      this.recipeList = [];
-      const params = {
-        devBid: this.devBid
+    PartTimChange(e,index){
+      const value = e.detail.value;
+      const item = this.group_list[index];
+      const deleteKey = Object.keys(item).find(key => key.endsWith(':Status'));
+      const data = {
+        ...this.excludeObjectKeys(item, ['selected', 'FertTim','PartTim','Formula','group_name',deleteKey]),
       }
-      const res = await this.$myRequest({
-        url:'/api/v2/iot/device/sf/yunshang/peifang/list/',
-        method:'POST',
-        data: params,
-        header: {
-          'Content-Type': 'application/json',
-          'accept': 'application/json, text/plain, */*'
-        }
-      })
-      const list = res?.data || [];
-      list.forEach((item,index)=>{
-        item.label = '配方' + (index + 1);
-      })
-      this.selector = list;
-    },
-    selectFertType(type){
-      this.FertType = type;
-      this.editGroup({
-        FertType: type,
-      });
-    },
-    selectFertPidType(type){
-      this.FertPidType = type;
-      this.editGroup({
-        FertPidType: type,
-      });
-    },
-    underChange(val){
-      this.UnderClearWater = val;
-      this.editGroup({UnderClearWater: val});
-    },
-    PartTimChange(item){
+      // 查找data中的key以:PartTim结尾的
+      const key = Object.keys(data).find(key => key.endsWith(':PartTim'));
+      this.$set(this.group_list[index],key,value);
       if(item.selected){
-        this.editGroupList({group_value: item.group_value, PartTim: item.PartTim});
+        data[key] = value;
+        this.editGroupList(data);
       }
     },
-    FertTimChange(item){
+    FertTimChange(e,index){
+      const value = e.detail.value;
+      const item = this.group_list[index];
+      const deleteKey = Object.keys(item).find(key => key.endsWith(':Status'));
+      const data = {
+        ...this.excludeObjectKeys(item, ['selected','FertTim','PartTim','Formula','group_name',deleteKey]),
+      }
+      const key = Object.keys(data).find(key => key.endsWith(':FertTim'));
+      this.$set(this.group_list[index],key,value);
       if(item.selected){
-        this.editGroupList({group_value: item.group_value, FertTim: item.FertTim});
+        // 查找data中的key以:FertTim结尾的
+        data[key] = value;
+        this.editGroupList(data);
       }
+      
     },
     frontChange(val){
       this.FrontClearWater = val;
@@ -230,17 +164,13 @@ export default {
       this.IrrCnt = val;
       this.editGroup({IrrCnt: val});
     },
-    selectFormula(index){
-      this.show = true;
-      this.currentIndex = index;
-    },
     async editGroupList(data){
       const params = {
         devBid: parseInt(this.devBid),
         data,
       }
       const res = await this.$myRequest({
-        url:'/api/v2/iot/device/sf/yunshang/auto/group/edit/',
+        url:'/api/v2/iot/device/fkq/yunshang/auto/group/edit/',
         method:'POST',
         data: params,
         header: {
@@ -248,7 +178,6 @@ export default {
           'accept': 'application/json, text/plain, */*'
         }
       })
-      console.log(res,'resres')
       if(res?.code === '000000'){
         uni.showToast({
           title: '保存成功',
@@ -257,13 +186,22 @@ export default {
         this.refresh();
       }
     },
+    // 实现排除对象中的某些属性的方法
+    excludeObjectKeys(obj, keys) {
+      return Object.keys(obj).reduce((acc, key) => {
+        if (!keys.includes(key)) {
+          acc[key] = obj[key];
+        }
+        return acc;
+      }, {});
+    },
     async editGroup(data){
       const params = {
         devBid: parseInt(this.devBid),
         data,
       }
       const res = await this.$myRequest({
-        url:'/api/v2/iot/device/sf/yunshang/auto/config/edit/',
+        url:'/api/v2/iot/device/fkq/yunshang/auto/config/edit/',
         method:'POST',
         data: params,
         header: {
@@ -281,7 +219,7 @@ export default {
     },
     async getConfigInfo(){
       const res = await this.$myRequest({
-        url:'/api/v2/iot/device/sf/yunshang/auto/config/info/',
+        url:'/api/v2/iot/device/fkq/yunshang/auto/config/info/',
         method:'post',
         data: {
           devBid: String(this.devBid),
@@ -312,9 +250,17 @@ export default {
         };
       });
     },
-    changeGroupStatus(item) {
-      item.selected = !item.selected;
-      this.editGroupList({group_value: item.group_value});
+    changeGroupStatus(index) {
+      const item = this.group_list[index];
+      this.$set(this.group_list[index],'selected',!item.selected);
+      this.$set(this.group_list[index],'group_value',this.group_list[index].selected? 1 :0);
+      console.log(this.group_list[index],'indexindexdex')
+      const deleteKey = Object.keys(item).find(key => key.endsWith(':Status'));
+      const data = {
+        ...this.excludeObjectKeys(item, ['selected', 'group_value','FertTim','PartTim','Formula','group_name',deleteKey]),
+        group_value: this.group_list[index].selected? 1 :0,
+      }
+      this.editGroupList(data);
     },
     selectGroup(index) {
       this.selectedGroup = index;
@@ -327,21 +273,6 @@ export default {
         }
       }).exec();
     },
-    // 减少轮灌次数
-    decreaseRoundCount() {
-      if (this.roundCount > 1) {
-        this.roundCount--;
-      }
-    },
-    // 增加轮灌次数
-    increaseRoundCount() {
-      this.roundCount++;
-    },
-    // 确认按钮点击事件
-    confirm() {
-      // 这里可以添加确认逻辑
-      console.log('确认设置');
-    }
   }
 };
 </script>

+ 4 - 34
pages/cb/zhamenFirst/automation.vue

@@ -108,19 +108,6 @@ export default {
     this.devName = options.devName;
     this.devStatus = options.devStatus;
 
-    // 检测是否有运行中的任务
-    this.getRunStatus().then((hasRunningTask) => {
-      if (hasRunningTask) {
-        setTimeout(() => {
-          uni.redirectTo({
-            url: `/pages/cb/zhamenFirst/rotationflow?devBid=${this.devBid}&devName=${this.devName}&devStatus=${this.devStatus}`,
-          });
-        }, 1000);
-      } else {
-        this.getdeviceSfStatus();
-        this.getAlreadyList();
-      }
-    });
   },
   methods: {
     updateListHandler(list) {
@@ -131,7 +118,7 @@ export default {
     },
     async getAlreadyList() {
       const res = await this.$myRequest({
-        url: '/api/v2/iot/mobile/device/sf/group/already/list/',
+        url: '/api/v2/iot/mobile/device/fkq/group/already/list/',
         method: 'post',
         data: {
           devBid: this.devBid,
@@ -146,7 +133,7 @@ export default {
     },
     async getdeviceSfStatus() {
       const res = await this.$myRequest({
-        url: '/api/v2/iot/mobile/device/sf/status/',
+        url: '/api/v2/iot/mobile/device/fkq/status/',
         method: 'post',
         data: {
           devBid: this.devBid,
@@ -167,24 +154,7 @@ export default {
       this.activeIndex = index;
       this.tktype = index == 0 ? 1 : 2;
     },
-    // 获取运行状态
-    async getRunStatus() {
-      try {
-        const res = await this.$myRequest({
-          url: '/api/v2/iot/mobile/device/sf/zsrf/task/run/status/',
-          method: 'post',
-          data: {
-            devBid: this.devBid,
-          },
-        });
-        console.log(res, 'resresresres');
-
-        return Promise.resolve(res.status && res.status / 1 === 1);
-      } catch (error) {
-        return Promise.resolve(false);
-      }
-    },
-    // iot/mobile/device/sf/zsrf/task/ctl/
+    // iot/mobile/device/fkq/zsrf/task/ctl/
     async postTaskCtl(payload) {
       // loading
       uni.showLoading({
@@ -192,7 +162,7 @@ export default {
       });
       console.log(payload, 'payloadpayload');
       const res = await this.$myRequest({
-        url: '/api/v2/iot/mobile/device/sf/zsrf/task/ctl/',
+        url: '/api/v2/iot/mobile/device/fkq/zsrf/task/ctl/',
         method: 'post',
         data: payload,
         header: {

+ 0 - 0
pages/cb/zhamenFirst/common/vendor.js


+ 0 - 71
pages/cb/zhamenFirst/components/base.vue

@@ -1,71 +0,0 @@
-<template>
-  <view class="base-container" v-if="dataList.length">
-    <view class="base-list">
-      <view class="base-item" v-for="(item, index) in dataList" :key="index">
-        <view class="base-item-value">{{ item.value }}</view>
-        <view class="base-item-label">{{
-          item.sfDisplayname || item.sfName
-        }}</view>
-      </view>
-    </view>
-  </view>
-</template>
-<script>
-export default {
-  name: 'Base',
-  props: {
-    dataList: {
-      type: Array,
-      default: () => [],
-    },
-  },
-  data() {
-    return {};
-  },
-};
-</script>
-<style scoped lang="scss">
-.base-container {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  padding: 16rpx 0;
-  justify-content: space-between;
-  border-radius: 16rpx;
-  background: linear-gradient(180deg, #edfbfb 0%, #d2f2ed 100%);
-  margin: 30rpx 0;
-  .base-list {
-    width: calc(100% - 32rpx);
-    padding: 0 16px;
-    display: grid;
-    grid-template-columns: repeat(4, 1fr);
-    .base-item {
-      text-align: center;
-      .base-item-value {
-        width: 150rpx;
-        color: #042118;
-        font-family: 'Source Han Sans CN VF';
-        font-size: 32rpx;
-        font-weight: 500;
-        text-align: center;
-        // 超出隐藏
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-      }
-      .base-item-label {
-        width: 150rpx;
-        color: #687a74;
-        font-family: 'Source Han Sans CN VF';
-        text-align: center;
-        font-size: 28rpx;
-        font-weight: 400;
-        // 超出隐藏
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-      }
-    }
-  }
-}
-</style>

+ 0 - 472
pages/cb/zhamenFirst/components/facilitystate.vue

@@ -1,232 +1,20 @@
 <template>
   <view class="facilitystate-container">
-    <!-- <view class="facilitystate-title-warp">
-      <view class="facilitystate-title">
-        <view class="radius-user"></view>使用中
-      </view>
-      <view class="facilitystate-subtitle">
-        <view class="radius-close"></view>
-      已关闭</view>
-    </view> -->
-    <!-- <view class="facilitystate-list">
-      <image :src="ggbCurrent.value == 1?bucketOpenTop:bucketCloseTop" class="bucketOpenTop2" />
-      <image :src="sfbCurrent.value == 1?bucketOpenTop:bucketCloseTop" class="bucketOpenTop"/>
-      <view class="facilitystate-list__left-label">
-        <view class="facilitystate-item__left-label-text" style="margin-bottom: 2rpx;">瞬时 L/min :</view>
-        <view class="facilitystate-item__left-label-text">累计L:</view>
-      </view>
-      <view class="facilitystate-list__left">
-        <view
-          class="facilitystate-item"
-          :style="{width:100/(alreadyfertilizerBucketList.length)+'%'}"
-          :class="index == alreadyfertilizerBucketList.length - 1?'facilitystate-item--last':''"
-          v-for="(item, index) in alreadyfertilizerBucketList"
-          :key="index"
-        >
-          <view class="facilitystate-item__label">
-            <view class="facilitystate-item__label-text">{{getTopDeviceName(item.childrenList)}}</view>
-            <view class="facilitystate-item__label-value">{{getBottomDeviceName(item.childrenList)}}</view>
-          </view>
-          <view class="facilitystate-item__image">
-            <image :src="getJSCurrentValue(item.childrenList)?bucketOpen:bucketClose" class="bucketClose" v-if="isHave"/>
-            <view  v-if="index == alreadyfertilizerBucketList.length - 1? false:true">
-              <image :src="bottomLine" class="facilitystate-item__bg3"/>
-              <image :src="line" class="facilitystate-item-line__bg" v-if="isHaveNextWaterChannel(index)"/>
-              <image :src="lineTopBorder" class="facilitystate-item-line__bg3" v-if="!isHaveNextWaterChannel(index) && isHavewaterChannel(item.childrenList)"/>
-              <image :src="lineHeight" class="facilitystate-item-lineheight__bg" v-if="isHaveNextWaterChannel(index) && isHavewaterChannel(item.childrenList)"/>
-              <image :src="bottomLine" class="facilitystate-item__bg"/>
-              <image :src="lineHeight" class="facilitystate-item__line"/>
-            </view>
-            <view  v-else>
-              <image :src="lineTopBorder" class="facilitystate-item-line__bg2" v-if="isHavewaterChannel(item.childrenList)"/>
-              <image :src="lineBottomBorder" class="facilitystate-item__bg2"/>
-              <image :src="lineBottomBorder" class="facilitystate-item__bg4"/>
-            </view>
-            <view class="facilitystate-item-fan">
-              <view class="fertTopBottom">
-                <text class="fertTopBottom-text">{{item.sfDisplayname || item.sfName}}</text>
-                <image :src="getJBCurrentValue(item.childrenList)? fanRun : fan" class="fan" :class="{'fan-run': getJBCurrentValue(item.childrenList)}" />
-              </view>
-            </view>
-            <image :src="getXSCurrentValue(item.childrenList)?bucketOpen:bucketClose" class="bucketClose1" />
-          </view>
-        </view>
-      </view>
-    </view> -->
     <irrigatedArea :irrigatedAreaList="irrigatedAreaList"/>
   </view>
 </template>
 <script>
-import fertTopBottom from '../assets/fertTopBottom.png';
-import line from '../assets/line.png';
-import lineBottomBorder from '../assets/lineBottomBorder.png';
-import lineBottomBorderLittle from '../assets/lineBottomBorderLittle.png';
-import lineTopBorderLittle from '../assets/lineTopBorderLittle.png';
-import lineHeight from '../assets/lineHeight.png';
-import lineOne from '../assets/lineOne.png';
-import bottomLine from '../assets/bottomLine.png';
-import lineTopBorder from '../assets/lineTopBorder.png';
-import lineTopAndBottom from '../assets/lineTopAndBottom.png';
-import lineTopBottom from '../assets/lineTopBottom.png';
-import fertTopBottomRadius from '../assets/fertTopBottomRadius.png';
-import lastBorder from '../assets/lastBorder.png';
 import irrigatedArea from './irrigatedArea.vue';
-import fan from '../assets/fan.png';
-import fanRun from '../assets/fanRun.png';
-import bucketOpenTop from '../assets/bucketOpenTop.png';
-import bucketCloseTop from '../assets/bucketCloseTop.png';
-import bucketClose from '../assets/bucketClose.png';
-import bucketOpen from '../assets/bucketOpen.png';
-
 export default {
-  name: 'FacilityState',
   props:{
     irrigatedAreaList:{
       type:Array,
       default:()=>[]
     },
-    alreadyfertilizerBucketList:{
-      type:Array,
-      default:()=>[]
-    },
-    ggbCurrent:{
-      type:Object,
-      default:()=>{}
-    },
-    sfbCurrent:{
-      type:Object,
-      default:()=>{}
-    }
   },
   components:{
     irrigatedArea
   },
-  data() {
-    return {
-      fan,
-      line,
-      fanRun,
-      lastBorder,
-      lineTopBottom,
-      fertTopBottom,
-      lineTopBorderLittle,
-      lineBottomBorder,
-      lineHeight,
-      lineBottomBorderLittle,
-      lineOne,
-      bottomLine,
-      lineTopBorder,
-      lineTopAndBottom,
-      bucketOpenTop,
-      bucketOpenTopStatus:false,
-      bucketOpenTopStatus2:false,
-      bucketCloseTop,
-      bucketClose,
-      bucketOpen,
-      fertTopBottomRadius,
-      isHave:false,
-    };
-  },
-  methods:{
-    getTopDeviceName(list){
-      let current = {}
-      list?.forEach(item =>{
-        if(item.sfType === '6'){
-          const name = item.sfDisplayname || item.sfName;
-          if(name.indexOf('瞬时') != -1){
-            current = item
-          }
-        }
-      })
-      return current?.value || '0'
-    },
-    isHavewaterChannel(childList = []){
-      let isHaveWater = false;
-      for(let i = 0;i< childList.length;i++){
-        const item = childList[i];
-        if(item.sfType === '8'){
-          isHaveWater = true
-        }
-      }
-      return isHaveWater;
-    },
-    isHaveNextWaterChannel(currentIndex){
-      let isNextHaveWater;
-      for(let i = currentIndex+1;i< this.alreadyfertilizerBucketList.length;i++){
-        // const item = this.alreadyfertilizerBucketList[i];
-        isNextHaveWater = false;
-        for(let j = i;j< this.alreadyfertilizerBucketList.length;j++){
-          const currentItem = this.alreadyfertilizerBucketList[j];
-          isNextHaveWater = this.isHavewaterChannel(currentItem.childrenList || []);
-          if(isNextHaveWater){
-            return true
-          }
-        }
-      }
-      return isNextHaveWater
-    },
-    getBottomDeviceName(list){
-      let current = {}
-      list?.forEach(item =>{
-        if(item.sfType === '6'){
-          const name = item.sfDisplayname || item.sfName;
-         if(name.indexOf('累计') != -1){
-            current = item
-          }
-        }
-      })
-      return current?.value || '0'
-    },
-    getJSCurrentValue(list){
-      // 进水阀
-      let current = {};
-      list?.forEach(item =>{
-        if(item.sfType === '8'){
-          const name = item.sfCode;
-          current = item;
-          this.isHave = true;
-        }
-      })
-      return current?.value == 1
-    },
-    getJBCurrentValue(list){
-      // 搅拌机
-      let current = {};
-      list?.forEach(item =>{
-        if(item.sfType === '3'){
-          const name = item.sfCode;
-            current = item
-        }
-      })
-      return current?.value == 1
-    },
-    getXSCurrentValue(list){
-      // 吸水泵
-      let current = {};
-      list?.forEach(item =>{
-        if(item.sfType === '2'){
-          const name = item.sfCode;
-            current = item
-        }
-      })
-      return current?.value == 1
-    },
-    handleClick(item){
-      item.fan = !item.fan;
-    },
-    handleOpenClick(){
-      this.bucketOpenTopStatus = !this.bucketOpenTopStatus;
-    },
-    handleOpenClick1(){
-      this.bucketOpenTopStatus2 = !this.bucketOpenTopStatus2;
-    },
-    handleBucketCloseClick(item){
-      item.isTopStatus = !item.isTopStatus;
-    },
-    handleBucketCloseClick1(item){
-      item.isBottomStatus = !item.isBottomStatus;
-    }
-  }
 };
 </script>
 <style scoped lang="scss">
@@ -235,265 +23,5 @@ export default {
   justify-content: space-between;
   border-radius: 16rpx;
   position: relative;
-  .facilitystate-title-warp{
-    position: absolute;
-    right: 32rpx;
-    top: 10rpx;
-    display: flex;
-    align-items: center;
-    color: #374d59;
-    font-family: "Source Han Sans CN VF";
-    font-size: 24rpx;
-    font-weight: 400;
-    .facilitystate-title{
-      display: flex;
-      align-items: center;
-      margin-right: 32rpx;
-      .radius-user{
-        width: 16rpx;
-        height: 16rpx;
-        border-radius: 50%;
-        background: #14A478;
-        margin-right:8rpx;
-      }
-    }
-    .facilitystate-subtitle{
-      display: flex;
-      align-items: center;
-      .radius-close{
-        width: 16rpx;
-        height: 16rpx;
-        border-radius: 50%;
-        background: #7A8291;
-        margin-right:8rpx;
-      }
-    }
-  }
-  .facilitystate-list {
-    background: url('https://webstaticimg.oss-cn-hangzhou.aliyuncs.com/bigdata_app/newindex/beijing.png') no-repeat;
-    background-size: 100%;
-    height: 376rpx;
-    width: 690rpx;
-    display: flex;
-    margin-bottom: 16rpx;
-    position: relative;
-    &__left-label{
-      align-self: stretch;
-      color: #687a74;
-      text-align: right;
-      font-family: "Source Han Sans CN VF";
-      font-size: 24rpx;
-      font-weight: 400;
-      position: absolute;
-      left: 30rpx;
-      top: 120rpx;
-    }
-    .bucketOpenTop{
-      width: 20rpx;
-      height: 20rpx;
-      position: absolute;
-      left: 120rpx;
-      top: 328rpx;
-    }
-    .bucketOpenTop2{
-      width: 20rpx;
-      height: 20rpx;
-      position: absolute;
-      left: 200rpx;
-      top: 72rpx;
-    }
-    &__left{
-      height: 100%;
-      display: flex;
-      margin-left: 160rpx;
-      justify-content: space-between;
-      width: 100%;
-    }
-    .facilitystate-item {
-      display: flex;
-      flex-direction: column;
-      justify-content: center;
-      align-items: center;
-      height: 228rpx;
-      margin-top: 112rpx;
-      position:relative;
-      &__label{
-        display: flex;
-        flex-direction: column;
-        justify-content: center;
-        align-items: center;
-        width: 100%;
-        text-align: center;
-        margin-bottom: 5rpx;
-      }
-      &__label-text,&__label-value {
-        color: #042118;
-        font-family: "Source Han Sans CN VF";
-        font-size: 24rpx;
-        font-weight: 400;
-        height: 36rpx;
-        width:90%;
-        margin: 0 auto;
-        // 超出隐藏
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-      }
-      &__image {
-        width: 100%;
-        height: 140rpx;
-
-        position: relative;
-        .facilitystate-item-fan{
-          position: absolute;
-          top: 20rpx;
-          left:0;
-          bottom:0;
-          right:0;
-          margin: auto;
-          z-index:100;
-        }
-        .bucketClose{
-          position: absolute;
-          width: 20rpx;
-          height: 20rpx;
-          left: 50%;
-          transform: translateX(-25%);
-          top: 6rpx;
-          z-index:100;
-        }
-        .bucketClose1{
-          position: absolute;
-          width: 20rpx;
-          height: 20rpx;
-          left: 50%;
-          transform: translateX(-25%);
-          bottom: -6rpx;
-          z-index:100;
-        }
-      }
-      .facilitystate-item-line__bg{
-        position:absolute;
-        width: 102%;
-        height: 4rpx;
-        top: 0rpx;
-      }
-      &__bg{
-        position:absolute;
-        width: 100%;
-        left:0;
-        height: 36rpx;
-        bottom: -16rpx;
-      }
-      &__bg3{
-        position:absolute;
-        width: 100%;
-        left:0;
-        height: 36rpx;
-        top: 0rpx;
-        // 旋转180度
-        transform: rotate(180deg);
-      }
-      .facilitystate-item-lineheight__bg{
-        height: 32rpx;
-        width: 4rpx;
-        position:absolute;
-        left:0;
-        right: 0;
-        margin: auto;
-      }
-      &__line{
-        position: absolute;
-        width: 8rpx;
-        height: 20rpx;
-        left: 50%;
-        bottom: 0;
-        transform: translateX(-50%);
-      }
-      .facilitystate-item-line__bg2{
-        position:absolute;
-        top: 0;
-        width:50%;
-        height: 32rpx;
-      }
-      .facilitystate-item-line__bg4{
-        position:absolute;
-        top: 0;
-        width:50%;
-        height: 32rpx;
-      }
-      .facilitystate-item-line__bg3{
-        position:absolute;
-        top: 0;
-        width:50%;
-        height: 32rpx;
-      }
-      &__bg2{
-        width: 55%;
-        height: 32rpx;
-        left: -6rpx;
-        position:absolute;
-        bottom: -16rpx;
-      }
-      &__bg4{
-        width: 55%;
-        height: 32rpx;
-        left: -6rpx;
-        position:absolute;
-        top: 0rpx;
-        transform: rotateX(180deg);
-      }
-      &__line2{
-        position: absolute;
-        width: 16rpx;
-        height: 153rpx;
-        top: -1rpx;
-        margin-left: -6rpx;
-        transform: translateX(-50%);
-      }
-      .fertTopBottom{
-        width: 70rpx;
-        height: 94rpx;
-        margin: 0 auto;
-        margin-top: 12rpx;
-        background: url('https://webstaticimg.oss-cn-hangzhou.aliyuncs.com/bigdata_app/newindex/bucket.png')  no-repeat center center;
-        background-size: 100% 100%;
-        display: flex;
-        flex-direction: column;
-        justify-content: center;
-        align-items: center;
-        .fertTopBottom-text{
-          width: 70rpx;
-          font-size: 24rpx;
-          color: #FFB800;
-          text-align: center;
-          // 超出隐藏
-          overflow: hidden;
-          text-overflow: ellipsis;
-          white-space: nowrap;
-        }
-        .fan{
-          width: 40rpx;
-          height:40rpx;
-          margin-left: 10rpx;
-        }
-        .fan-run{
-          animation: rotate .5s linear infinite;
-          @keyframes rotate {
-            from {
-              transform: rotate(0deg);
-            }
-            to {
-              transform: rotate(360deg);
-            }
-          }
-        }
-      }
-    }
-    .facilitystate-item--last{
-      width: 100rpx;
-      display: flex;
-    }
-  }
 }
 </style>

+ 1 - 9
pages/cb/zhamenFirst/components/irrigatedArea.vue

@@ -21,18 +21,12 @@
             <view class="irrigated-area-item-content-item-title">{{
               i.sfDisplayname || i.sfName || '暂无数据'
             }}</view>
-            <view class="irrigated-area-item-content-item-icon" v-if="i.sfType != '10'">
+            <view class="irrigated-area-item-content-item-icon">
               <image
                 :src="i.value != '0' ? bucketOpen1 : bucketClose1"
                 class="bucket-icon"
               />
             </view>
-            <view class="irrigated-area-item-content-item-icon" v-else>
-              <image
-                :src="i.value == '0' ? bucketStop1 : i.value == '1'? bucketOpen1 : bucketClose1"
-                class="bucket-icon"
-              />
-            </view>
           </view>
         </view>
       </view>
@@ -42,7 +36,6 @@
 <script>
 import bucketOpen1 from '../assets/bucketOpen1.png';
 import bucketClose1 from '../assets/bucketClose1.png';
-import bucketStop1 from '../assets/bucketStop1.png';
 
 export default {
   props: {
@@ -55,7 +48,6 @@ export default {
     return {
       bucketOpen1,
       bucketClose1,
-      bucketStop1
     };
   },
   methods: {

+ 9 - 17
pages/cb/zhamenFirst/control.vue

@@ -35,7 +35,7 @@
             <view class="control-list-right-item-action">
               <u-switch
                 :value="item.value == 1 ? true : false"
-                @change="changeSwitch(item)"
+                @change="()=>changeSwitch(item)"
                 activeColor="#14A478"
                 size="40"
                 inactiveColor="rgb(230, 230, 230)"
@@ -60,17 +60,17 @@
                 <view
                   class="status-item"
                   :class="item.value == '1'?'status-item-open':''"
-                  @click="changeStatus(item, '1')"
+                  @click="()=>changeStatus(item, '1')"
                 >开</view>
                 <view
                   class="status-item" 
                   :class="item.value == '0'?'status-item-pause':''" 
-                  @click="changeStatus(item, '0')"
+                  @click="()=>changeStatus(item, '0')"
                 >停</view>
                 <view 
                   class="status-item status-item-close-label"
                   :class="item.value == '2'?'status-item-close':''"
-                  @click="changeStatus(item, '2')"
+                  @click="()=>changeStatus(item, '2')"
                 >关</view>
               </view>
             </view>
@@ -235,7 +235,7 @@ export default {
     },
     async sfDecvtl(data){
       const res = await this.$myRequest({
-        url: '/api/v2/iot/mobile/device/sf/devctl/',
+        url: '/api/v2/iot/mobile/device/fkq/devctl/',
         method: 'post',
         data,
         header: {
@@ -287,7 +287,7 @@ export default {
       */
     async getsfrhinfo() {
       const res = await this.$myRequest({
-        url: '/api/v2/iot/device/sf/info/',
+        url: '/api/v2/iot/device/fkq/info/',
         method: 'post',
         data: {
           devBid: String(this.devBid),
@@ -309,17 +309,9 @@ export default {
     },
     initData(res){
       this.deviceList = [];
-      const sfCurrent = [
-        {
-          sfDisplayname: '水肥机',
-          childrenList: [],
-        },
-      ];
+      const sfCurrent = [];
       const irrigatedAreaList = [];
-      res?.forEach((item) => {
-        if (item.sfType === '0' || item.sfType === '1' || item.sfType === '2') {
-          sfCurrent[0].childrenList.push(item);
-        } else if (item.sfType === '4') {
+      res?.forEach((item) => {if (item.sfType === '4') {
           const childrenList = item?.childrenList || [];
           childrenList.forEach((child) => {
             if (
@@ -339,7 +331,7 @@ export default {
     },
     async getdeviceSfStatus() {
       const res = await this.$myRequest({
-        url: '/api/v2/iot/mobile/device/sf/status/',
+        url: '/api/v2/iot/mobile/device/fkq/status/',
         method: 'post',
         data: {
           devBid: this.devBid,

+ 0 - 382
pages/cb/zhamenFirst/formulaSetting.vue

@@ -1,382 +0,0 @@
-<template>
-  <view class="formula-setting-container">
-    <custom-card>
-      <block slot="backText">{{ title }}</block>
-    </custom-card>
-
-    <!-- 内容区域 -->
-    <view class="content">
-      <!-- 配方列表 -->
-      <view class="formula-list">
-        <!-- 配方1 -->
-        <view class="formula-item" v-for="(recipe,index) in recipeList" :key="recipe.id">
-          <view class="formula-header">
-            <text class="formula-name">配方{{index + 1}}</text>
-          </view>
-          <view class="formula-details">
-            <view class="detail-row">
-              <text class="detail-label">目标EC</text>
-              <view class="detail-value">
-                <input
-                  v-model="recipe.ec"
-                  type="number"
-                  placeholder="请输入EC值"
-                  class="input"
-                  @blur="(e)=>peifangEditHandle(index, -1, 'ec', e.detail.value)"
-                />
-                <text class="detail-unit">us/cm</text>
-              </view>
-            </view>
-            <view class="detail-row">
-              <text class="detail-label">目标PH</text>
-              <view class="detail-value">
-                <input
-                  v-model="recipe.ph"
-                  type="number"
-                  placeholder="请输入PH值"
-                  class="input"
-                  @blur="(e)=>peifangEditHandle(index, -1, 'ph', e.detail.value)"
-                />
-              </view>
-            </view>
-            <view class="detail-row">
-              <text class="detail-label">目标水肥比</text>
-              <view class="detail-value">
-                <input
-                  v-model="recipe.wfratio"
-                  type="number"
-                  placeholder="请输入水肥比值"
-                  class="input" 
-                  @blur="(e)=>peifangEditHandle(index, -1, 'wfratio', e.detail.value)"
-                />
-              </view>
-            </view>
-            <view class="detail-row">
-              <text class="detail-label">吸肥通道比例</text>
-              <view class="detail-value">
-                <input
-                  v-model="channel.percentage"
-                  type="number"
-                  placeholder="请输入吸肥通道比例值"
-                  class="input1"
-                  v-for="(channel,channelIndex) in recipe.channels"
-                  :key="channelIndex"
-                  @blur="(e)=>peifangEditHandle(index, channelIndex, 'fertratio', e.detail.value)"
-                />
-                <text class="detail-unit">%</text>
-              </view>
-            </view>
-          </view>
-        </view>
-      </view>
-    </view>
-  </view>
-</template>
-
-<script>
-export default {
-  data() {
-    return {
-      title: '配方设置',
-      devBid: '',
-      recipeList: [],
-    };
-  },
-  onLoad(options) {
-    const { devBid } = options;
-    this.devBid = devBid;
-    this.getInfoList();
-  },
-  methods: {
-    async peifangEditHandle(index, channelIndex, type, value) {
-      // 判断value 是否是数字
-      if (isNaN(value)) {
-        uni.showToast({
-          title: '请输入数字',
-          icon: 'none',
-        })
-        return;
-      }
-      let key = '';
-      if (type == 'fertratio') {
-        // 4个加一起不能超过100
-        const sum = this.recipeList[index].channels.reduce(
-          (acc, cur) => Number(acc) + Number(cur.percentage),
-          0
-        );
-        if (sum > 100) {
-        uni.showToast({
-          title: '吸肥通道比例加起来不能超过100',
-          icon: 'none',
-        })
-          // 如果超过了100,恢复原来的值
-          this.recipeList[index].channels[channelIndex].percentage = +value;
-          return;
-        }
-      }
-      if (channelIndex == -1) {
-        key = `ValveFormula:VF0${index}:${type}`;
-      } else {
-        key = `ValveFormula:VF0${index}:${type}${channelIndex}`;
-      }
-      const peifang = {
-        [key]: +value
-      };
-      const params = {
-        devBid: Number(this.devBid),
-        peifang: peifang
-      }
-      const res = await this.$myRequest({
-        url:'/api/v2/iot/device/sf/yunshang/peifang/edit/',
-        method:'POST',
-        data: params,
-        header: {
-          'Content-Type': 'application/json',
-          'accept': 'application/json, text/plain, */*'
-        }
-      })
-      const resData = res
-      console.log(resData,'resDataresData')
-      if (resData.code === '000000') {
-        uni.showToast({
-          title: '配方保存成功',
-          icon: 'success',
-        })
-      } else {
-        uni.showToast({
-          title: '配方保存失败',
-          icon: 'none',
-        })
-      }
-    },
-    async getInfoList(){
-      this.recipeList = [];
-      const params = {
-        devBid: this.devBid
-      }
-      const res = await this.$myRequest({
-        url:'/api/v2/iot/device/sf/yunshang/peifang/list/',
-        method:'POST',
-        data: params,
-        header: {
-          'Content-Type': 'application/json',
-          'accept': 'application/json, text/plain, */*'
-        }
-      })
-      const resData = res.data || [];
-      for (let i = 0; i < resData.length; i++) {
-        const item = resData[i];
-        const recipe = {
-          ec: item[`ValveFormula:VF0${i}:ec`],
-          ph: item[`ValveFormula:VF0${i}:ph`],
-          wfratio: item[`ValveFormula:VF0${i}:wfratio`],
-          channels: []
-        };
-        if (
-          item[`ValveFormula:VF0${i}:fertratio0`] !== null &&
-          item[`ValveFormula:VF0${i}:fertratio0`] !== undefined
-        ) {
-          recipe.channels.push({
-            percentage: item[`ValveFormula:VF0${i}:fertratio0`]
-          });
-        }
-        if (
-          item[`ValveFormula:VF0${i}:fertratio1`] !== null &&
-          item[`ValveFormula:VF0${i}:fertratio1`] !== undefined
-        ) {
-          recipe.channels.push({
-            percentage: item[`ValveFormula:VF0${i}:fertratio1`]
-          });
-        }
-        if (
-          item[`ValveFormula:VF0${i}:fertratio2`] !== null &&
-          item[`ValveFormula:VF0${i}:fertratio2`] !== undefined
-        ) {
-          recipe.channels.push({
-            percentage: item[`ValveFormula:VF0${i}:fertratio2`]
-          });
-        }
-        if (
-          item[`ValveFormula:VF0${i}:fertratio3`] !== null &&
-          item[`ValveFormula:VF0${i}:fertratio3`] !== undefined
-        ) {
-          recipe.channels.push({
-            percentage: item[`ValveFormula:VF0${i}:fertratio3`]
-          });
-        }
-        this.recipeList.push(recipe);
-      }
-    },
-    // 确认按钮点击事件
-    confirm() {
-      // 这里可以添加确认逻辑
-      console.log('确认设置');
-    }
-  }
-};
-</script>
-
-<style scoped lang="scss">
-.formula-setting-container {
-  width: 100%;
-  min-height: 100vh;
-  background: linear-gradient(180deg, #f5f6fa00 0%, #F5F6FA 23.64%, #F5F6FA 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
-  font-family: 'Source Han Sans CN';
-  ::v-deep .u-input{
-    text-align:right !important;
-  }
-}
-.input{
-  width: 100%;
-  height: 80rpx;
-  text-align:right;
-  color:#020305;
-}
-.input1{
-  width: 25%;
-  color:#020305;
-}
-/* 顶部导航栏 */
-.nav-bar {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  padding: 20rpx 32rpx;
-  background: linear-gradient(180deg, #14a478 0%, #0f8a64 100%);
-  color: #fff;
-
-  .nav-left {
-    .back-icon {
-      font-size: 32rpx;
-    }
-  }
-
-  .nav-center {
-    .nav-title {
-      font-size: 32rpx;
-      font-weight: 500;
-    }
-  }
-
-  .nav-right {
-    display: flex;
-    gap: 24rpx;
-
-    .nav-icon {
-      font-size: 28rpx;
-    }
-  }
-}
-
-/* 内容区域 */
-.content {
-  padding: 32rpx;
-}
-
-/* 配方管理 */
-.formula-management {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  background: #fff;
-  padding: 24rpx;
-  border-radius: 12rpx;
-  margin-bottom: 24rpx;
-
-  .management-title {
-    font-size: 28rpx;
-    font-weight: 500;
-    color: #042118;
-  }
-
-  .add-formula-btn {
-    width: 40rpx;
-    height: 40rpx;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    background: #14a478;
-    color: #fff;
-    border-radius: 50%;
-    font-size: 28rpx;
-    font-weight: bold;
-  }
-}
-
-/* 配方列表 */
-.formula-list {
-  display: flex;
-  flex-direction: column;
-  gap: 24rpx;
-}
-
-/* 配方项 */
-.formula-item {
-  background: #fff;
-  border-radius: 12rpx;
-  padding: 24rpx;
-
-  .formula-header {
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    margin-bottom: 24rpx;
-
-    .formula-name {
-      font-size: 28rpx;
-      font-weight: 500;
-      color: #020305;
-    }
-
-    .delete-formula-btn {
-      width: 32rpx;
-      height: 32rpx;
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      background: #f5f5f5;
-      color: #666;
-      border-radius: 50%;
-      font-size: 24rpx;
-      font-weight: bold;
-    }
-  }
-
-  .formula-details {
-    .detail-row {
-      display: flex;
-      align-items: center;
-      padding: 16rpx 0;
-      border-bottom: 1rpx solid #f0f0f0;
-
-      &:last-child {
-        border-bottom: none;
-      }
-
-      .detail-label {
-        width: 150rpx;
-        font-size: 26rpx;
-        color: #333333;
-      }
-
-      .detail-value {
-        display: flex;
-        flex:1;
-        align-items: center;
-        justify-content: flex-end;
-        height: 60rpx;
-        font-size: 26rpx;
-        color: #042118;
-        text-align: right;
-      }
-
-      .detail-unit {
-        margin-left: 8rpx;
-        font-size: 24rpx;
-        color: #333333;
-      }
-    }
-  }
-}
-
-</style>

+ 1 - 1
pages/cb/zhamenFirst/history.vue

@@ -106,7 +106,7 @@ export default {
     },
     async getHistory() {
       const res = await this.$myRequest({
-        url: '/api/v2/iot/mobile/device/sf/op/record/list/',
+        url: '/api/v2/iot/mobile/device/fkq/op/record/list/',
         method: 'post',
         header: {
           'Content-Type': 'application/x-www-form-urlencoded',

+ 0 - 562
pages/cb/zhamenFirst/rotationflow.vue

@@ -1,562 +0,0 @@
-<template>
-  <view class="rotationflow">
-    <custom-card>
-      <block slot="backText">自动控制</block>
-    </custom-card>
-    <view class="rotationflow-top">
-      <view class="rotationflow-top-list">
-        <image :src="autoBtn" class="rotate-autoBtn" />
-        <image :src="rotate" class="rotate-rotate" />
-        <image :src="water" class="rotate-water" />
-        <view class="rotationflow-time">
-          <view class="rotationflow-time-title" style="font-size: 28px">{{
-            currentFq.name || '--'
-          }}</view>
-          <!-- <view class="rotationflow-time-content"> {{ time }}</view> -->
-          <view class="rotationflow-time-label">{{ label }}</view>
-        </view>
-      </view>
-    </view>
-    <view class="rotationflow-middle">
-      <view
-        class="rotationflow-middle-item"
-        v-for="item in list"
-        :key="item.label"
-      >
-        <view class="rotationflow-middle-item-value">{{ item.value }}</view>
-        <view class="rotationflow-middle-item-title">{{
-          item.sfDisplayname || item.sfName
-        }}</view>
-      </view>
-    </view>
-    <view class="rotationflow-content">
-      <view class="rotationflow-content-top">
-        <view
-          :class="
-            tktype == '1'
-              ? 'rotationflow-content-top-title'
-              : 'rotationflow-content-top-title-rever'
-          "
-        >
-          {{ tktype == '1' ? '灌溉' : '水肥' }}
-        </view>
-        <view class="rotationflow-content-top-desc">已选灌区</view>
-      </view>
-      <view class="rotationflow-content-list">
-        <view class="rotationflow-content-list-wrapper" v-if="tktype == 1">
-          <view class="rotationflow-content-num">
-            <view class="rotationflow-content-num-title"
-              >轮灌次数:{{ 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 class="rotationflow-content-num">
-            <view class="rotationflow-content-num-title"
-              >轮灌间隔:{{ currentFq.lgjg || 0 }} 分钟</view
-            >
-            <view class="rotationflow-content-num-title"
-              >肥后水:{{ currentFq.fhcx || 0 }} 分钟</view
-            > </view
-          ><view class="rotationflow-content-num">
-            <view class="rotationflow-content-num-title"
-              >模式选择:{{ getsfmode(currentFq.sfmode) }}</view
-            >
-            <view class="rotationflow-content-num-title"></view>
-          </view>
-        </view>
-        <view
-          class="rotationflow-content-list-item"
-          v-for="(item, index) in fqList"
-          :class="item.value === '2' ? 'haveYet' : ''"
-          :key="index"
-        >
-          <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.ggsj + '分钟' }}</view
-          >
-        </view>
-      </view>
-    </view>
-    <view class="rotationflow-footer">
-      <view class="rotationflow-footer-item" @click="rotationflowEnd"
-        >结束灌溉</view
-      >
-    </view>
-  </view>
-</template>
-<script>
-import rotate from './assets/rotate.png';
-import water from './assets/water.png';
-import autoBtn from './assets/autoBtn.png';
-import json from './test.js';
-
-export default {
-  name: 'rotationflow',
-  data() {
-    return {
-      rotate,
-      water,
-      autoBtn,
-      time: '-',
-      list: [],
-      timer: null,
-      devBid: '',
-      tktype: 1,
-      lgcs: 0,
-      lgjg: 0,
-      fqList: [],
-      currentFq: {},
-      label: '灌溉中.',
-      devName: '',
-      devStatus: '',
-    };
-  },
-  components: {},
-  methods: {
-    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(() => {
-        if (hours <= 0) {
-          clearInterval(this.timer);
-          return;
-        }
-        hours -= 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
-        }`;
-      }, 1000);
-    },
-    getsfmode(m) {
-      const mode = String(m);
-      switch (mode) {
-        case '1':
-          return '定时';
-        case '2':
-          return '定量';
-        case '3':
-          return 'EC调配';
-        case '4':
-          return '混肥比例';
-        default:
-          return '-';
-      }
-    },
-    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 = res || {};
-      if (data.status === undefined || data.status / 1 !== 1) {
-        clearInterval(this.timer);
-        clearInterval(this.labelTimer);
-        clearInterval(this.taskTimer);
-        uni.showLoading({
-          title: '灌溉任务已结束',
-        });
-
-        setTimeout(() => {
-          uni.hideLoading();
-          uni.redirectTo({
-            url: `/pages/cb/zhamenFirst/shuifeizs?devBid=${this.devBid}&devName=${this.devName}&devStatus=${this.devStatus}`,
-          });
-        }, 1000);
-        return;
-      }
-
-      this.list = data?.sensorList || [];
-
-      this.tktype = data?.tktype;
-      this.lgjg = data?.lgjg || 0;
-      this.lgcs = data?.lgcs || 0;
-      this.fqList = data?.fqList || [];
-      // value 0 未灌溉 1 灌溉中 2 灌溉完成
-      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/zhamenFirst/shuifeizs?devBid=${this.devBid}&devName=${this.devName}&devStatus=${this.devStatus}`,
-          });
-        }, 1000);
-      } else {
-        uni.showToast({
-          icon: 'none',
-          title: res.msg,
-        });
-      }
-    },
-  },
-  onLoad(options) {
-    const { devBid, devName, devStatus } = options;
-    this.devBid = devBid;
-    this.devName = devName;
-    this.devStatus = devStatus;
-    this.getRunStatus();
-    this.labelTimer = setInterval(() => {
-      if (this.label === '灌溉中.') {
-        this.label = '灌溉中..';
-      } else if (this.label === '灌溉中..') {
-        this.label = '灌溉中...';
-      } else {
-        this.label = '灌溉中.';
-      }
-    }, 500);
-
-    this.taskTimer = setInterval(() => {
-      this.getRunStatus();
-    }, 30000);
-  },
-  onUnload() {
-    clearInterval(this.timer);
-    clearInterval(this.labelTimer);
-    clearInterval(this.taskTimer);
-  },
-  beforeDestroy() {
-    if (this.timer) {
-      clearInterval(this.timer);
-    }
-
-    if (this.taskTimer) {
-      clearInterval(this.taskTimer);
-    }
-
-    if (this.labelTimer) {
-      clearInterval(this.labelTimer);
-    }
-  },
-};
-</script>
-<style scoped lang="scss">
-uni-page-body,
-uni-page-wrapper {
-  position: relative;
-  height: 100%;
-}
-@keyframes rotate {
-  0% {
-    transform: rotate(0deg);
-  }
-  100% {
-    transform: rotate(360deg);
-  }
-}
-.rotationflow {
-  background: linear-gradient(
-      180deg,
-      #f5f6fa00 0%,
-      #f5f6fa 23.64%,
-      #f5f6fa 100%
-    ),
-    linear-gradient(102deg, #bfeadd 6.77%, #b8f1e7 40.15%, #b9eef5 84.02%);
-  width: 100%;
-  height: calc(100vh - 100rpx);
-  overflow: hidden;
-  overflow-y: scroll;
-  margin-bottom: 140rpx;
-  position: relative;
-  .rotationflow-top {
-    height: 500rpx;
-    width: 100%;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    .rotationflow-top-list {
-      display: flex;
-      position: relative;
-      align-items: center;
-      justify-content: center;
-      width: 100%;
-      height: 100%;
-      .rotate-autoBtn {
-        position: absolute;
-        width: 360rpx;
-        height: 360rpx;
-        z-index: 1;
-      }
-      .rotate-rotate {
-        position: absolute;
-        width: 320rpx;
-        height: 320rpx;
-        left: 215rpx;
-        top: 92rpx;
-        z-index: 2;
-        // 循环滚动
-        animation: rotate 20s linear infinite;
-      }
-      .rotate-water {
-        position: absolute;
-        width: 550rpx;
-        height: 600rpx;
-        margin-left: 220rpx;
-        margin-top: 100rpx;
-      }
-      .rotationflow-time {
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-        justify-content: center;
-        position: relative;
-        z-index: 3;
-        top: -5rpx;
-        .rotationflow-time-title {
-          width: 200rpx;
-          color: #042118;
-          text-align: center;
-          font-family: 'Source Han Sans CN VF';
-          font-size: 32rpx;
-          font-weight: 500;
-        }
-        .rotationflow-time-content {
-          width: 200rpx;
-          color: #042118;
-          font-family: 'Source Han Sans CN VF';
-          font-size: 40rpx;
-          font-weight: 700;
-          margin: 8rpx 0;
-          text-align: center;
-        }
-        .rotationflow-time-label {
-          width: 140rpx;
-          color: #687a74;
-          text-align: left;
-          font-family: 'Source Han Sans CN VF';
-          font-size: 32rpx;
-          font-weight: 400;
-        }
-      }
-    }
-  }
-  .rotationflow-middle {
-    display: flex;
-    padding: 0 48rpx;
-    margin: 32rpx 0;
-    .rotationflow-middle-item {
-      width: 25%;
-      text-align: center;
-      .rotationflow-middle-item-value {
-        color: #042118;
-        font-family: 'Source Han Sans CN VF';
-        font-size: 32rpx;
-        font-weight: 500;
-      }
-      .rotationflow-middle-item-title {
-        color: #687a74;
-        font-family: 'Source Han Sans CN VF';
-        font-size: 28rpx;
-        font-style: normal;
-        font-weight: 400;
-        line-height: normal;
-        // 超出隐藏
-        white-space: nowrap;
-        text-overflow: ellipsis;
-        overflow: hidden;
-      }
-    }
-  }
-  .rotationflow-content {
-    border-bottom: none;
-    position: relative;
-    overflow: hidden;
-    background-color: #fff;
-    border-radius: 16rpx;
-    padding: 32rpx;
-    width: calc(100% - 128rpx);
-    margin-left: 32rpx;
-    margin-bottom: 140rpx;
-    &::before {
-      position: absolute;
-      content: '';
-      top: 0;
-      left: 0;
-      right: 0;
-      bottom: 0;
-      background-size: cover;
-    }
-    .rotationflow-content-top {
-      display: flex;
-      .rotationflow-content-top-title {
-        border-radius: 8rpx;
-        background: #1890ff1a;
-        color: #1890ff;
-        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-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 {
-        color: #333333;
-        font-family: 'Source Han Sans CN VF';
-        font-size: 28rpx;
-        font-weight: 700;
-        margin-left: 16rpx;
-      }
-    }
-    .rotationflow-content-list {
-      width: 100%;
-      .rotationflow-content-list-wrapper {
-        width: 100%;
-        border-radius: 8rpx;
-        background: #f5f6fa;
-        padding: 8rpx 0;
-        margin-top: 16rpx;
-      }
-      .rotationflow-content-num {
-        display: flex;
-        padding: 8rpx 16rpx;
-        .rotationflow-content-num-title {
-          width: 50%;
-          color: #687a74;
-          font-family: 'Source Han Sans CN VF';
-          font-size: 28rpx;
-          font-style: normal;
-          font-weight: 400;
-          margin: 0 8rpx;
-        }
-      }
-      .rotationflow-content-list-item {
-        display: flex;
-        justify-content: space-between;
-        margin: 16rpx 0;
-        color: #042118;
-        text-align: right;
-        font-family: 'Source Han Sans CN VF';
-        font-size: 28rpx;
-        font-weight: 400;
-        .rotationflow-content-list-item-desc {
-        }
-        .rotationflow-content-list-item-current {
-          color: #14a478;
-        }
-      }
-      .haveYet {
-        color: #9ba6a3;
-        text-align: right;
-        font-family: 'Source Han Sans CN VF';
-        font-size: 28rpx;
-        font-weight: 400;
-      }
-      .currentYet {
-        color: #14a478;
-        text-align: right;
-        font-family: 'Source Han Sans CN VF';
-        font-size: 28rpx;
-        font-weight: 400;
-      }
-    }
-  }
-  .rotationflow-footer {
-    position: fixed;
-    width: 100%;
-    bottom: 0;
-    left: 0;
-    display: flex;
-    height: 128rpx;
-    align-items: center;
-    background: #fff;
-    box-shadow: 0 -4rpx 8rpx 0 #00000026;
-    z-index: 9999;
-    .rotationflow-footer-item {
-      width: calc(100% - 64rpx);
-      margin: 0 32rpx;
-      text-align: center;
-      font-size: 32rpx;
-      height: 80rpx;
-      line-height: 80rpx;
-      color: #ffffff;
-      font-family: 'PingFang SC';
-      font-size: 32rpx;
-      font-weight: 500;
-      border-radius: 16rpx;
-      background: #ff3546;
-    }
-  }
-}
-</style>

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

@@ -1,103 +0,0 @@
-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,
-      },
-    ],
-  },
-};

+ 0 - 302
pages/cb/zhamenFirst/timingSetting copy.vue

@@ -1,302 +0,0 @@
-<template>
-  <view class="timing-setting-page">
-    <custom-card>
-      <block slot="backText">定时设置</block>
-    </custom-card>
-
-    <view class="timing-content">
-      <!-- 定时卡片列表 -->
-      <view
-        class="timer-card"
-        v-for="(timer, index) in timerList"
-        :key="index"
-      >
-        <!-- 定时标题和开关 -->
-        <view class="timer-header">
-          <text class="timer-title">定时{{ index + 1 }}</text>
-          <u-switch
-            size="40"
-            space="4"
-            activeColor="#0BBC58"
-            inactiveColor="#C3CAD8"
-            v-model="timer.enabled"
-            @change="onSwitchChange($event, index, timer)"
-          />
-        </view>
-
-        <!-- 单选按钮组 -->
-        <view class="radio-group">
-          <view
-            class="radio-item"
-            :class="{ active: timer.frequency === 'once' }"
-            @click="selectFrequency(index, 'once', timer)"
-          >
-            <view class="radio-icon">
-              <view v-if="timer.frequency === 'once'" class="radio-dot"></view>
-            </view>
-            <text class="radio-text">仅一次</text>
-          </view>
-          <view
-            class="radio-item"
-            style="margin-left: 48rpx;"
-            :class="{ active: timer.frequency === 'daily' }"
-            @click="selectFrequency(index, 'daily', timer)"
-          >
-            <view class="radio-icon">
-              <view v-if="timer.frequency === 'daily'" class="radio-dot"></view>
-            </view>
-            <text class="radio-text">每天一次</text>
-          </view>
-        </view>
-        <!-- 时间选择器 -->
-        <picker
-          mode="time"
-          :value="timer.time"
-          @change="onTimeChange($event, index)"
-        >
-          <view class="time-picker">
-            <text class="time-text" :class="{ placeholder: !timer.time }">
-              {{ timer.timeLabel }}
-            </text>
-            <u-icon name="clock" color="#999999" size="32rpx" />
-          </view>
-        </picker>
-      </view>
-
-    </view>
-  </view>
-</template>
-
-<script>
-export default {
-  data() {
-    return {
-      devBid:'',
-      timerList: [],
-    };
-  },
-  onLoad(options) {
-    const { devBid } = options;
-    this.devBid = devBid;
-    this.getTimerList();
-  },
-  methods: {
-    // 编辑
-    async editInfo(data){
-      const params = {
-        devBid: parseInt(this.devBid),
-        data: data,
-      };
-      const resData = await this.$myRequest({
-        url:'/api/v2/iot/device/sf/yunshang/timer/edit/',
-        method:'POST',
-        data: params,
-        header: {
-          'Content-Type': 'application/json',
-          'accept': 'application/json, text/plain, */*'
-        }
-      })
-      console.log(resData,'resDataresData')
-      if(resData.code === '000000'){
-        uni.showToast({
-          title: '保存成功',
-          icon: 'success',
-        })
-      }
-    },
-    async getTimerList(){
-      const resData = await this.$myRequest({
-        url:'/api/v2/iot/device/sf/yunshang/timer/list/',
-        method:'POST',
-        data: {
-          devBid: this.devBid,
-        },
-      })
-      for (let i = 0; i < resData.length; i++) {
-        const item = resData[i];
-        const time = item[`Timer0${i}:TimerHM`];
-        const hour = time.slice(0, 2);
-        const minute = time.slice(2, 4);
-        item.enabled = item[`Timer0${i}:TimerEn`] == 1;
-        item.frequency = item[`Timer0${i}:Mode`] == 1 ? 'daily' : 'once';
-        item.time = hour + ':' + minute;
-        item.timeLabel = hour + ':' + minute;
-      }
-      this.timerList = resData;
-    },
-    // 开关状态改变
-    onSwitchChange(e, index,timer) {
-      console.log(timer,e,'开关状态改变')
-      this.timerList[index].enabled = e;
-      this.editInfo({
-        [`Timer0${index}:TimerEn`]: e ? 1 : 0,
-      });
-    },
-
-    // 选择频率
-    selectFrequency(index, frequency) {
-      this.timerList[index].frequency = frequency;
-      this.editInfo({
-        [`Timer0${index}:Mode`]: frequency === 'daily' ? 1 : 0,
-      });
-    },
-
-    // 时间改变
-    onTimeChange(e, index) {
-      console.log(e.detail.value,'时间改变')
-      this.timerList[index].time = e.detail.value;
-      this.timerList[index].timeLabel = e.detail.value;
-      this.editInfo({
-        [`Timer0${index}:TimerHM`]: e.detail.value.slice(0, 2) + e.detail.value.slice(3, 5),
-      });
-    },
-
-    // 确认按钮
-    handleConfirm() {
-      const enabledTimers = this.timerList.filter((timer, index) => {
-        if (timer.enabled) {
-          if (!timer.time) {
-            uni.showToast({
-              title: `定时${index + 1}请选择时间`,
-              icon: 'none'
-            });
-            return false;
-          }
-          return true;
-        }
-        return false;
-      });
-
-      console.log('保存的定时设置:', enabledTimers);
-
-      uni.showToast({
-        title: '保存成功',
-        icon: 'success'
-      });
-
-      // TODO: 调用接口保存定时设置
-    },
-  },
-};
-</script>
-
-<style scoped lang="scss">
-uni-page-body {
-  position: relative;
-  height: 100%;
-  overflow-y: auto;
-}
-
-.timing-setting-page {
-  min-height: 100%;
-  background: linear-gradient(180deg, #f5f6fa00 0%, #F5F6FA 23.64%, #F5F6FA 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
-  overflow-x: hidden;
-  overflow-y: auto;
-
-  .right-icons {
-    display: flex;
-    align-items: center;
-  }
-
-  .timing-content {
-    height: 100%;
-    padding: 24rpx 32rpx;
-    overflow-y: auto;
-  }
-
-  // 定时卡片
-  .timer-card {
-    background: #ffffff;
-    border-radius: 12rpx;
-    padding: 24rpx;
-    margin-bottom: 20rpx;
-
-    // 卡片头部
-    .timer-header {
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-      margin-bottom: 24rpx;
-
-      .timer-title {
-        font-size: 32rpx;
-        font-weight: 600;
-        color: #333333;
-        font-family: 'Source Han Sans CN';
-      }
-
-      .timer-switch {
-        transform: scale(0.9);
-      }
-    }
-
-    // 单选按钮组
-    .radio-group {
-      display: flex;
-      margin-bottom: 24rpx;
-
-      .radio-item {
-        display: flex;
-        align-items: center;
-        margin-right: 48rpx;
-        cursor: pointer;
-
-        .radio-icon {
-          width: 36rpx;
-          height: 36rpx;
-          border: 4rpx solid #cccccc;
-          border-radius: 50%;
-          display: flex;
-          align-items: center;
-          justify-content: center;
-          margin-right: 12rpx;
-          box-sizing: border-box;
-
-          .radio-dot {
-            width: 18rpx;
-            height: 18rpx;
-            background: #00c853;
-            border-radius: 50%;
-          }
-        }
-
-        &.active {
-          .radio-icon {
-            border-color: #00c853;
-          }
-
-          .radio-text {
-            color: #333333;
-          }
-        }
-
-        .radio-text {
-          font-size: 28rpx;
-          color: #999999;
-          font-family: 'Source Han Sans CN';
-        }
-      }
-    }
-
-    // 时间选择器
-    .time-picker {
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-      padding: 10rpx 24rpx;
-      background: #F5F6FA;
-      border-radius: 8rpx;
-
-      .time-text {
-        font-size: 28rpx;
-        color: #333333;
-        font-family: 'Source Han Sans CN';
-
-        &.placeholder {
-          color: #999999;
-        }
-      }
-    }
-  }
-}
-</style>

+ 201 - 592
pages/cb/zhamenFirst/timingSetting.vue

@@ -1,122 +1,68 @@
 <template>
-  <view class="auto-fertilization-container">
+  <view class="timing-setting-page">
     <custom-card>
       <block slot="backText">定时设置</block>
     </custom-card>
-    <!-- 内容区域 -->
-    <view class="content">
-      
+
+    <view class="timing-content">
+      <!-- 定时卡片列表 -->
       <view
-        class="setting-card"
+        class="timer-card"
+        v-for="(timer, index) in timerList"
+        :key="index"
       >
-        <view class="setting-header">
-          <text class="setting-title">定时设置</text>
+        <!-- 定时标题和开关 -->
+        <view class="timer-header">
+          <text class="timer-title">定时{{ index + 1 }}</text>
           <u-switch
             size="40"
             space="4"
             activeColor="#0BBC58"
             inactiveColor="#C3CAD8"
-            v-model="enabled"
-            @change="onSwitchChange($event)"
+            v-model="timer.enabled"
+            @change="onSwitchChange($event, index, timer)"
           />
         </view>
-        <view class="setting-item">
-          <text class="setting-label">定时类型</text>
-          <view class="number-input">
-            <text style="color:#999999">{{ timeType }}</text>
-            <u-icon name="arrow-right" color="#656565"></u-icon>
-          </view>
-        </view>
-        <view class="setting-item">
-          <text class="setting-label">选择时间</text>
-          <view class="number-input">
-             <text style="color:#999999">{{ selectTime }}</text>
-            <u-icon name="arrow-right" color="#656565"></u-icon>
-          </view>
-        </view>
-      </view>
-      <!-- 灌溉模式 -->
-      <view class="setting-top-container">
-        <!-- 轮灌次数 -->
-        <view class="setting-item">
-          <text class="setting-label">轮灌次数</text>
-          <view class="number-input">
-            <u-number-box v-model="IrrCnt" placeholder="请输入轮灌次数" min="1" max="9999999" @minus="irrChange(IrrCnt)" @plus="irrChange(IrrCnt)"></u-number-box>
-          </view>
-        </view>
-
-        <!-- 轮灌间隔 -->
-        <view class="setting-item">
-          <text class="setting-label">轮灌间隔</text>
-          <view class="time-input">
-            <input type="number" v-model="IdleTim" class="time-input-field" min="0" max="1440" placeholder="请输入轮灌间隔(分钟)" @change="idleChange(IdleTim)" />
-            <text class="time-unit">分钟</text>
-          </view>
-        </view>
 
-      </view>
-      <u-picker v-model="show" mode="selector" :range="selector" range-key="label" @confirm="confirmHandler"></u-picker>
-      <!-- 定时轮灌组 -->
-      <view class="round-groups-section">
-        <text class="section-title">选择轮灌组</text>
-        <view class="round-groups-container">
-          <!-- 左侧轮灌组列表 -->
-          <view class="round-groups-list">
-            <view 
-              v-for="(item,index) in group_list" :key="item.group"
-              class="round-group-item"
-              @click="selectGroup(index)"
-              :class="{ active: selectedGroup === index }"
-            >
-              <text :class="{ 'green-text': selectedGroup === index }">{{ index + 1 }}组</text>
+        <!-- 单选按钮组 -->
+        <view class="radio-group">
+          <view
+            class="radio-item"
+            :class="{ active: timer.frequency === 'once' }"
+            @click="selectFrequency(index, 'once', timer)"
+          >
+            <view class="radio-icon">
+              <view v-if="timer.frequency === 'once'" class="radio-dot"></view>
             </view>
+            <text class="radio-text">仅一次</text>
           </view>
-
-          <!-- 右侧轮灌组详情 -->
-          <view class="round-group-detail">
-            <view class="group-detail-item" v-for="(item,index) in group_list" :key="item.group" :id="'group-'+index">
-              <view class="group-header">
-                <text class="group-title">{{index + 1}}组</text>
-                <view class="group-check" :class="{ active: item.selected }" @click="changeGroupStatus(item)">
-                  <u-icon class="check-icon" name="checkmark" size="24rpx" />
-                </view>
-              </view>
-              <view class="group-settings">
-                <view class="setting-row">
-                  <text class="setting-row-label">施肥配方</text>
-                  <view @click="selectFormula(index)" class="select-group">{{ getTitle(item) }}</view>
-                </view>
-                <view class="setting-row">
-                  <text class="setting-row-label">灌溉时长</text>
-                  <input
-                    type="number"
-                    v-model="item.PartTim"
-                    class="setting-row-input"
-                    min="0"
-                    max="1440"
-                    placeholder="请输入灌溉时长(分钟)"
-                    @change="(item) => PartTimChange(item)"
-                  />
-                  <text class="setting-row-unit">分钟</text>
-                </view>
-                <view class="setting-row">
-                  <text class="setting-row-label">施肥时长</text>
-                  <input
-                    type="number"
-                    v-model="item.FertTim"
-                    class="setting-row-input"
-                    min="0"
-                    max="1440"
-                    placeholder="请输入施肥时长(分钟)"
-                    @change="(item) => FertTimChange(item)"
-                  />
-                  <text class="setting-row-unit">分钟</text>
-                </view>
-              </view>
+          <view
+            class="radio-item"
+            style="margin-left: 48rpx;"
+            :class="{ active: timer.frequency === 'daily' }"
+            @click="selectFrequency(index, 'daily', timer)"
+          >
+            <view class="radio-icon">
+              <view v-if="timer.frequency === 'daily'" class="radio-dot"></view>
             </view>
+            <text class="radio-text">每天一次</text>
           </view>
         </view>
+        <!-- 时间选择器 -->
+        <picker
+          mode="time"
+          :value="timer.time"
+          @change="onTimeChange($event, index)"
+        >
+          <view class="time-picker">
+            <text class="time-text" :class="{ placeholder: !timer.time }">
+              {{ timer.timeLabel }}
+            </text>
+            <u-icon name="clock" color="#999999" size="32rpx" />
+          </view>
+        </picker>
       </view>
+
     </view>
   </view>
 </template>
@@ -125,155 +71,24 @@
 export default {
   data() {
     return {
-      show: false,
       devBid:'',
-      title: '选择配方',
-      selector: [],
-      selectedGroup: 0,
-      FertType: -1,
-      FertPidType: -1,
-      IrrCnt: 0,
-      IdleTim: 0,
-      FrontClearWater: 0,
-      UnderClearWater: 0,
-      group_list:[],
-      enabled: false,
-      currentIndex: -1,
-      timeType: '请选择',
-      selectTime: '请选择',
+      timerList: [],
     };
   },
-  
-  async onLoad(options) {
+  onLoad(options) {
     const { devBid } = options;
     this.devBid = devBid;
-    await this.getInfoList();
-    await this.getConfigInfo();
+    this.getTimerList();
   },
   methods: {
-    onSwitchChange(){},
-    async refresh(){
-      const params = {
-        devBid: this.devBid,
-      };
-      await this.$myRequest({
-        url:'/api/v2/iot/device/sf/refresh/',
-        method:'POST',
-        data: params,
-        header: {
-          'Content-Type': 'application/json',
-          'accept': 'application/json, text/plain, */*'
-        }
-      })
-    },
-    getTitle(item){
-      let value = '';
-      if(item.labelText){
-        return item.labelText;
-      }
-      for(let key in item){
-        if(key.includes('Formula')){
-          value = item[key];
-          break;
-        }
-      }
-      for(let i = 0;i< this.selector.length;i++){
-        const item = this.selector[i];
-        if(item.Formula == value){
-          return item.label;
-        }
-      }
-      return '选择配方';
-    },
-   confirmHandler(e){
-    const currentItem = this.selector[e];
-    const Formula = currentItem.Formula;
-    const item = this.group_list[this.currentIndex];
-    item.labelText = currentItem.label;
-    if(item.selected){
-      let keyLabel = '';
-      for(let key in item){
-        if(key.includes('Formula')){
-          keyLabel = key
-          break;
-        }
-      }
-      const params = {
-        [keyLabel]: Formula,
-        group_value: 1,
-      }
-      this.editGroupList(params);
-    }
-   },
-   async getInfoList(){
-      this.recipeList = [];
-      const params = {
-        devBid: this.devBid
-      }
-      const res = await this.$myRequest({
-        url:'/api/v2/iot/device/sf/yunshang/peifang/list/',
-        method:'POST',
-        data: params,
-        header: {
-          'Content-Type': 'application/json',
-          'accept': 'application/json, text/plain, */*'
-        }
-      })
-      const list = res?.data || [];
-      list.forEach((item,index)=>{
-        item.label = '配方' + (index + 1);
-      })
-      this.selector = list;
-    },
-    selectFertType(type){
-      this.FertType = type;
-      this.editGroup({
-        FertType: type,
-      });
-    },
-    selectFertPidType(type){
-      this.FertPidType = type;
-      this.editGroup({
-        FertPidType: type,
-      });
-    },
-    underChange(val){
-      this.UnderClearWater = val;
-      this.editGroup({UnderClearWater: val});
-    },
-    PartTimChange(item){
-      if(item.selected){
-        this.editGroupList({group_value: item.group_value, PartTim: item.PartTim});
-      }
-    },
-    FertTimChange(item){
-      if(item.selected){
-        this.editGroupList({group_value: item.group_value, FertTim: item.FertTim});
-      }
-    },
-    frontChange(val){
-      this.FrontClearWater = val;
-      this.editGroup({FrontClearWater: val});
-    },
-    idleChange(val){
-      this.IdleTim = val;
-      this.editGroup({IdleTim: val});
-    },
-    irrChange(val){
-      this.IrrCnt = val;
-      this.editGroup({IrrCnt: val});
-    },
-    selectFormula(index){
-      this.show = true;
-      this.currentIndex = index;
-    },
-    async editGroupList(data){
+    // 编辑
+    async editInfo(data){
       const params = {
         devBid: parseInt(this.devBid),
-        data,
-      }
-      const res = await this.$myRequest({
-        url:'/api/v2/iot/device/sf/yunshang/auto/group/edit/',
+        data: data,
+      };
+      const resData = await this.$myRequest({
+        url:'/api/v2/iot/device/fkq/yunshang/timer/edit/',
         method:'POST',
         data: params,
         header: {
@@ -281,412 +96,206 @@ export default {
           'accept': 'application/json, text/plain, */*'
         }
       })
-      console.log(res,'resres')
-      if(res?.code === '000000'){
+      console.log(resData,'resDataresData')
+      if(resData.code === '000000'){
         uni.showToast({
           title: '保存成功',
           icon: 'success',
         })
-        this.refresh();
       }
     },
-    async editGroup(data){
-      const params = {
-        devBid: parseInt(this.devBid),
-        data,
-      }
-      const res = await this.$myRequest({
-        url:'/api/v2/iot/device/sf/yunshang/auto/config/edit/',
+    async getTimerList(){
+      const resData = await this.$myRequest({
+        url:'/api/v2/iot/device/fkq/yunshang/timer/list/',
         method:'POST',
-        data: params,
-        header: {
-          'Content-Type': 'application/json',
-          'accept': 'application/json, text/plain, */*'
-        }
-      })
-      if(res?.code === '000000'){
-        uni.showToast({
-          title: '保存成功',
-          icon: 'success',
-        })
-        this.refresh();
-      }
-    },
-    async getConfigInfo(){
-      const res = await this.$myRequest({
-        url:'/api/v2/iot/device/sf/yunshang/auto/config/info/',
-        method:'post',
         data: {
-          devBid: String(this.devBid),
+          devBid: this.devBid,
         },
       })
-      const resData = res || {};
-      this.FertPidType = resData?.FertPidType;
-      this.FertType = resData?.FertType;
-      this.IrrCnt = resData?.IrrCnt;
-      this.IdleTim = resData?.IdleTim;
-      this.FrontClearWater = resData?.FrontClearWater;
-      this.UnderClearWater = resData?.UnderClearWater;
-      const group_list = resData.group_list || [];
-      this.group_list = group_list.map((item, index) => {
-        const selected = item.group_value == 1 ? true : false;
-        for (let key in item) {
-          if (key.includes('PartTim')) {
-            item.PartTim = item[key];
-          } else if (key.includes('FertTim')) {
-            item.FertTim = item[key];
-          } else if (key.includes('Formula')) {
-            item.Formula = item[key];
-          }
-        }
-        return {
-          ...item,
-          selected
-        };
-      });
+      for (let i = 0; i < resData.length; i++) {
+        const item = resData[i];
+        const time = item[`Timer0${i}:TimerHM`];
+        const hour = time.slice(0, 2);
+        const minute = time.slice(2, 4);
+        item.enabled = item[`Timer0${i}:TimerEn`] == 1;
+        item.frequency = item[`Timer0${i}:Mode`] == 1 ? 'daily' : 'once';
+        item.time = hour + ':' + minute;
+        item.timeLabel = hour + ':' + minute;
+      }
+      this.timerList = resData;
     },
-    changeGroupStatus(item) {
-      item.selected = !item.selected;
-      this.editGroupList({group_value: item.group_value});
+    // 开关状态改变
+    onSwitchChange(e, index,timer) {
+      console.log(timer,e,'开关状态改变')
+      this.timerList[index].enabled = e;
+      this.editInfo({
+        [`Timer0${index}:TimerEn`]: e ? 1 : 0,
+      });
     },
-    selectGroup(index) {
-      this.selectedGroup = index;
-      uni.createSelectorQuery().select('#group-' + index).boundingClientRect((data) => {
-        if (data) {
-          uni.pageScrollTo({
-            scrollTop: data.top,
-            duration: 300
-          });
-        }
-      }).exec();
+
+    // 选择频率
+    selectFrequency(index, frequency) {
+      this.timerList[index].frequency = frequency;
+      this.editInfo({
+        [`Timer0${index}:Mode`]: frequency === 'daily' ? 1 : 0,
+      });
     },
-    // 减少轮灌次数
-    decreaseRoundCount() {
-      if (this.roundCount > 1) {
-        this.roundCount--;
-      }
+
+    // 时间改变
+    onTimeChange(e, index) {
+      console.log(e.detail.value,'时间改变')
+      this.timerList[index].time = e.detail.value;
+      this.timerList[index].timeLabel = e.detail.value;
+      this.editInfo({
+        [`Timer0${index}:TimerHM`]: e.detail.value.slice(0, 2) + e.detail.value.slice(3, 5),
+      });
     },
-    // 增加轮灌次数
-    increaseRoundCount() {
-      this.roundCount++;
+
+    // 确认按钮
+    handleConfirm() {
+      const enabledTimers = this.timerList.filter((timer, index) => {
+        if (timer.enabled) {
+          if (!timer.time) {
+            uni.showToast({
+              title: `定时${index + 1}请选择时间`,
+              icon: 'none'
+            });
+            return false;
+          }
+          return true;
+        }
+        return false;
+      });
+
+      console.log('保存的定时设置:', enabledTimers);
+
+      uni.showToast({
+        title: '保存成功',
+        icon: 'success'
+      });
+
+      // TODO: 调用接口保存定时设置
     },
-    // 确认按钮点击事件
-    confirm() {
-      // 这里可以添加确认逻辑
-      console.log('确认设置');
-    }
-  }
+  },
 };
 </script>
 
 <style scoped lang="scss">
-.auto-fertilization-container {
-  width: 100%;
-  min-height: 100vh;
-  background: linear-gradient(180deg, #f5f6fa00 0%, #F5F6FA 23.64%, #F5F6FA 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
-  font-family: 'Source Han Sans CN';
-}
-.group-check-container{
-  display: flex;
-  width: 120rpx;
-}
-.select-group{
-  text-align:right;
+uni-page-body {
+  position: relative;
+  height: 100%;
+  overflow-y: auto;
 }
-.setting-card {
-  background: #ffffff;
-  border-radius: 12rpx;
-  padding: 24rpx;
-  margin-bottom: 20rpx;
 
-  // 卡片头部
-  .setting-header {
+.timing-setting-page {
+  min-height: 100%;
+  background: linear-gradient(180deg, #f5f6fa00 0%, #F5F6FA 23.64%, #F5F6FA 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
+  overflow-x: hidden;
+  overflow-y: auto;
+
+  .right-icons {
     display: flex;
-    justify-content: space-between;
     align-items: center;
-    margin-bottom: 24rpx;
-
-    .setting-title {
-      font-size: 32rpx;
-      font-weight: 600;
-      color: #333333;
-      font-family: 'Source Han Sans CN';
-    }
-
-    .setting-switch {
-      transform: scale(0.9);
-    }
   }
-}
-.group-check-radius{
-  width: 30rpx;
-  height: 30rpx;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  border-radius: 50%;
-  background: #ffffff;
-  border: 2rpx solid #E4E7ED;
-  font-size: 24rpx;
-  color: #14a478;
-  margin-right: 10rpx;
-}
-.active{
-  border-color: #0BBC58;
-}
-.text{
-  color: #666666;
-  font-family: "Source Han Sans CN VF";
-  font-size: 28rpx;
-}
-.text-active{
-  color: #0BBC58;
-}
-/* 内容区域 */
-.content {
-  overflow-y: auto;
-  width: calc(100% - 64rpx);
-  margin-left: 32rpx;
-  display:flex;
-  flex-direction: column;
-}
-.setting-top-container{
-  border: 2px solid #FFF;
-  border-radius: 8px;
-  padding: 32rpx;
-  background: #FFF;
-}
-/* 设置项 */
-.setting-item {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  padding: 24rpx 0;
-  border-bottom: 1rpx solid #e8e8e8;
 
-  .setting-label {
-    font-size: 28rpx;
-    color: #042118;
+  .timing-content {
+    height: 100%;
+    padding: 24rpx 32rpx;
+    overflow-y: auto;
   }
 
-  /* 单选组 */
-  .radio-group {
-    display: flex;
-    gap: 32rpx;
+  // 定时卡片
+  .timer-card {
+    background: #ffffff;
+    border-radius: 12rpx;
+    padding: 24rpx;
+    margin-bottom: 20rpx;
 
-    .radio-item {
+    // 卡片头部
+    .timer-header {
       display: flex;
+      justify-content: space-between;
       align-items: center;
-      gap: 8rpx;
-      font-size: 26rpx;
-      color: #666;
-      width: 120rpx;
-      &.active {
-        color: #14a478;
+      margin-bottom: 24rpx;
+
+      .timer-title {
+        font-size: 32rpx;
+        font-weight: 600;
+        color: #333333;
+        font-family: 'Source Han Sans CN';
       }
 
-      radio {
-        transform: scale(0.8);
+      .timer-switch {
+        transform: scale(0.9);
       }
     }
-  }
-
-  /* 数字输入 */
-  .number-input {
-    display: flex;
-    align-items: center;
-    gap: 16rpx;
 
-    .number-btn {
-      width: 40rpx;
-      height: 40rpx;
+    // 单选按钮组
+    .radio-group {
       display: flex;
-      align-items: center;
-      justify-content: center;
-      background: #f5f5f5;
-      border-radius: 4rpx;
-      font-size: 28rpx;
-      color: #666;
-    }
-
-    .number-value {
-      min-width: 60rpx;
-      text-align: center;
-      font-size: 26rpx;
-      color: #042118;
-    }
-  }
-
-  /* 时间输入 */
-  .time-input {
-    display: flex;
-    align-items: center;
-    gap: 8rpx;
-
-    .time-input-field {
-      flex:1;
-      height: 52rpx;
-      padding: 0 16rpx;
-      font-size: 26rpx;
-      text-align: right;
-      color: #042118;
-    }
-
-    .time-unit {
-      font-size: 24rpx;
-      color: #666;
-    }
-  }
-}
-
-/* 轮灌组区域 */
-.round-groups-section {
-  margin-top: 40rpx;
-  flex:1;
-  .section-title {
-    font-size: 28rpx;
-    font-weight: 500;
-    color: #042118;
-  }
-
-  .round-groups-container {
-    margin-top: 24rpx;
-    display: flex;
-    border-radius: 12rpx;
-    flex:1;
-    /* 左侧轮灌组列表 */
-    .round-groups-list {
-      width: 120rpx;
-      background: #ffffff;
-      border-radius: 8rpx;
+      margin-bottom: 24rpx;
 
-      .round-group-item {
-        height: 80rpx;
+      .radio-item {
         display: flex;
         align-items: center;
-        justify-content: center;
-        font-size: 26rpx;
-        color: #666;
-        border-left-top-radius: 16rpx;
-        border-left-bottom-radius: 16rpx;
-
-        &.active {
-          background: #0bbc581a;
-          color:#0BBC58;
-          font-weight: 700;
-          color: #0bbc58;
-          font-family: "Source Han Sans CN VF";
-        }
-
-        &:last-child {
-          border-bottom: none;
-        }
-
-        .green-text {
-          color: #14a478;
-          font-weight: 500;
-        }
-      }
-    }
-
-    /* 右侧轮灌组详情 */
-    .round-group-detail {
-      margin-left: 24rpx;
-      border-radius: 16rpx;
-      height: 600rpx;
-      overflow-y: auto;
-      .group-detail-item {
-        margin-bottom: 32rpx;
-        padding: 24rpx;
-        background: #ffffff;
-        border-radius: 8rpx;
-        &:last-child {
-          margin-bottom: 0;
-        }
-
-        .group-header {
+        margin-right: 48rpx;
+        cursor: pointer;
+
+        .radio-icon {
+          width: 36rpx;
+          height: 36rpx;
+          border: 4rpx solid #cccccc;
+          border-radius: 50%;
           display: flex;
           align-items: center;
-          justify-content: space-between;
-          margin-bottom: 24rpx;
-
-          .group-title {
-            font-size: 28rpx;
-            font-weight: 500;
-            color: #042118;
-          }
-
-          .group-check {
-            width: 38rpx;
-            height: 38rpx;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            background: #C9CDD4;
-            color: #ffffff;
+          justify-content: center;
+          margin-right: 12rpx;
+          box-sizing: border-box;
+
+          .radio-dot {
+            width: 18rpx;
+            height: 18rpx;
+            background: #00c853;
             border-radius: 50%;
-            font-size: 24rpx;
-            .check-icon{
-              font-size: 24rpx;
-            }
-            &.active {
-              background: #0BBC58;
-              color: #fff;
-            }
           }
         }
 
-        .group-settings {
-          .setting-row {
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            margin-bottom: 24rpx;
-
-            .setting-row-label {
-              width: 120rpx;
-              font-size: 26rpx;
-              color: #666;
-            }
-
-            .setting-row-input {
-              flex: 1;
-              height: 56rpx;
-              padding: 0 16rpx;
-              font-size: 26rpx;
-              color: #042118;
-              margin-right: 12rpx;
-              text-align: right;
-            }
+        &.active {
+          .radio-icon {
+            border-color: #00c853;
+          }
 
-            .setting-row-unit {
-              font-size: 24rpx;
-              color: #666;
-            }
+          .radio-text {
+            color: #333333;
           }
         }
+
+        .radio-text {
+          font-size: 28rpx;
+          color: #999999;
+          font-family: 'Source Han Sans CN';
+        }
       }
     }
-  }
-}
 
-/* 底部确定按钮 */
-.confirm-btn-container {
-  padding: 32rpx;
+    // 时间选择器
+    .time-picker {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      padding: 10rpx 24rpx;
+      background: #F5F6FA;
+      border-radius: 8rpx;
 
-  .confirm-btn {
-    height: 88rpx;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    background: #14a478;
-    border-radius: 12rpx;
-    box-shadow: 0 4rpx 12rpx rgba(20, 164, 120, 0.3);
+      .time-text {
+        font-size: 28rpx;
+        color: #333333;
+        font-family: 'Source Han Sans CN';
 
-    .confirm-btn-text {
-      font-size: 32rpx;
-      font-weight: 500;
-      color: #fff;
+        &.placeholder {
+          color: #999999;
+        }
+      }
     }
   }
 }

+ 14 - 64
pages/cb/zhamenFirst/zhamenzs.vue

@@ -24,10 +24,6 @@
       </view>
     </view>
     <view class="irrMode">
-      <view class="irrMode__header">
-        <view @click="changeMode('1')" :class="workStatus == '1' ? 'active' : ''">手动模式</view>
-        <view @click="changeMode('0')" :class="workStatus == '0' ? 'active' : ''">自动模式</view>
-      </view>
       <view class="irrMode__content">
         <view class="irrMode__content-header">
           <view class="irrMode__content-header-list">
@@ -61,14 +57,10 @@
         </view>
         </view>
       </view>
-      <Base :dataList="dataList" />
       <facilitystate
         :devBid="devBid"
-        :ggbCurrent="ggbCurrent"
-        :sfbCurrent="sfbCurrent"
         :irrigatedAreaList="irrigatedAreaList"
         :webSockedData="webSockedData"
-        :alreadyfertilizerBucketList="alreadyfertilizerBucketList"
       />
     </view>
   </view>
@@ -85,9 +77,7 @@ import stop from './assets/stop.png';
 import stopFill from './assets/stop-fill.png';
 import wheelIrrigation from './assets/wheelIrrigation.png';
 import time from './assets/timing.png';
-import formulaSetting from './assets/formulaSetting.png';
 import operatingRecord from './assets/operatingRecord.png';
-import Base from './components/base.vue';
 import facilitystate from './components/facilitystate.vue';
 export default {
   data() {
@@ -99,9 +89,7 @@ export default {
       devBid: '',
       devName: '',
       devStatus: '1',
-      dataList: [],
       irrigatedAreaList: [],
-      alreadyfertilizerBucketList: [],
       mediaPause,
       mediaPauseFill,
       mediaPlay,
@@ -133,8 +121,6 @@ export default {
           url: '/pages/cb/zhamenFirst/history?devBid=' + this.devBid,
         },
       ],
-      ggbCurrent: {},
-      sfbCurrent: {},
       sfToken: '',
       entityId: '',
       heartbeatTimer: null,
@@ -146,16 +132,17 @@ export default {
       runStatus: -1,
       workStatus: -1,
       clearIrr: {},
+      dataList: [],
       selectAreaList: [],
       runTitle: '--',
       timer:'--'
     };
   },
   components: {
-    Base,
     facilitystate,
   },
   onLoad(options) {
+    console.log(options,'optionsoptiopns')
     /*
       0	水源	泵类	负责水源进入管道的总泵或者阀
       1	肥料	泵类	负责肥料进入管道的总阀或者泵
@@ -173,11 +160,12 @@ export default {
     this.deviceList[0].url = `/pages/cb/zhamenFirst/control?devBid=${options.devBid}`;
     this.deviceList[1].url = `/pages/cb/zhamenFirst/autoSetting?devBid=${options.devBid}`;
     this.deviceList[2].url = `/pages/cb/zhamenFirst/timingSetting?devBid=${options.devBid}`;
-    this.deviceList[3].url = `/pages/cb/zhamenFirst/formulaSetting?devBid=${options.devBid}`;
     this.deviceList[
       this.deviceList.length - 1
     ].url = `/pages/cb/zhamenFirst/history?devBid=${options.devBid}`;
-    if (devBid) {
+  },
+  onShow(){
+    if (this.devBid) {
       this.init();
     }
   },
@@ -223,7 +211,7 @@ export default {
     async initsfyunshangAutoConfigInfo() {
       const selectAreaList = [];
       const res = await this.$myRequest({
-        url:'/api/v2/iot/device/sf/yunshang/auto/config/info/',
+        url:'/api/v2/iot/device/fkq/yunshang/auto/config/info/',
         method:'post',
         data: {
           devBid: String(this.devBid),
@@ -231,7 +219,7 @@ export default {
       })
       const list = res;
       const group_list = list.group_list || [];
-      group_list?.forEach((item) => {
+      group_list.forEach((item) => {
         if (item.group_value == 1) {
           selectAreaList.push(item);
         }
@@ -244,7 +232,7 @@ export default {
         data,
       };
       const res = await this.$myRequest({
-        url: '/api/v2/iot/mobile/device/sf/devctl/',
+        url: '/api/v2/iot/mobile/device/fkq/devctl/',
         method: 'post',
         data:params,
         header: {
@@ -394,7 +382,7 @@ export default {
     },
     async getsfrhinfo() {
       const res = await this.$myRequest({
-        url: '/api/v2/iot/device/sf/info/',
+        url: '/api/v2/iot/device/fkq/info/',
         method: 'post',
         data: {
           devBid: String(this.devBid),
@@ -408,50 +396,16 @@ export default {
     },
     async init() {
       this.getdeviceSfStatus();
-      await this.getpeifangRefresh();
       this.getsfrhinfo();
       this.initsfyunshangAutoConfigInfo();
-      await this.getRunStatus();
-    },
-    async getpeifangRefresh() {
-      await this.$myRequest({
-        url: '/api/v2/iot/mobile/device/sf/peifang/refresh/',
-        method: 'post',
-        data: {
-          devBid: this.devBid,
-        },
-      });
-    },
-    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 || {});
-
-      if (data == '{}') {
-        this.isRun = true;
-      } else {
-        this.isRun = false;
-      }
     },
     initData(res){
-      this.dataList = [];
       this.irrigatedAreaList = [];
-      this.alreadyfertilizerBucketList = [];
+      this.dataList = [];
       res?.forEach((item) => {
-        if (item.sfType === '0') {
-          this.ggbCurrent = item;
-        } else if (item.sfType === '1') {
-          this.sfbCurrent = item;
-        } else if (item.sfType === '4') {
-          this.alreadyfertilizerBucketList.push(item);
-        } else if (item.sfType === '6') {
+        if (item.sfType === '6') {
           this.dataList.push(item);
-        } else if (item.sfType === '7') {
+        }else if (item.sfType === '7') {
           this.irrigatedAreaList.push(item);
         } else if (item.sfType === '9') {
           if (item.sfCode === 'IrrStatus') {
@@ -466,7 +420,7 @@ export default {
       this.runTitle = '--';
       this.timer = '--';
       if(this.runStatus == '1'){
-        this.irrigatedAreaList?.forEach((item) => {
+        this.irrigatedAreaList.forEach((item) => {
           if (this.isAutoRun(item.childrenList)) {
             this.runTitle = item.sfDisplayname  || item.sfName;
             this.timer = this.isHaveTime(item.childrenList);
@@ -479,7 +433,7 @@ export default {
     },
     async getdeviceSfStatus() {
       const res = await this.$myRequest({
-        url: '/api/v2/iot/mobile/device/sf/status/',
+        url: '/api/v2/iot/mobile/device/fkq/status/',
         method: 'post',
         data: {
           devBid: this.devBid,
@@ -548,7 +502,6 @@ uni-page-body {
     height: 56rpx;
   }
   .irrMode__content{
-    margin-top: 24rpx;
     border-radius: 16rpx;
     padding: 2rpx;
     background: linear-gradient(180deg, #FFF 0%, #F5F6FA 100%);
@@ -661,9 +614,6 @@ uni-page-body {
 .timedSetting{
   background: linear-gradient(335deg, #0BBC58 6.91%, #60D799 89.95%);
 }
-.formulaSetting{
-  background: linear-gradient(147deg, #FE9797 12.77%, #FF6060 92.63%);
-}
 .operatingRecord{
   background: linear-gradient(152deg, #B9B9F6 11.22%, #8080F8 94.92%);
 }

+ 1 - 1
pages/equipList/index.vue

@@ -665,7 +665,7 @@ export default {
             url: `../deviceDetails/weatherStation/index?devBid=${item.imei}&devName=${item.device_name}&devStatus=${item.is_online}&address=${item.address}&uptime=${item.uptime}&d_id=${item.d_id}&deviceType=46`,
           });
           break;
-        case 48:
+        case 47:
           uni.navigateTo({
             url: `../cb/zhamenFirst/zhamenzs?devBid=${item.d_id}&devName=${item.device_name}&devStatus=${item.is_online}`,
           });

+ 995 - 0
pages/equipList2/index.vue

@@ -0,0 +1,995 @@
+<template>
+	<view>
+
+
+		<view class="textbox">
+			<view class="inputs">
+
+				<u-search placeholder="请输入设备ID" v-model="imports" placeholder-color="#909696" :show-action="false"
+					search-icon-color="#909696" @input="searchinput">
+				</u-search>
+
+			</view>
+			
+				<view class="tab">
+					<view class="tab-content">
+						<view class="tab-box">
+							<view v-for="(item,index) in menuList" :key="index" @click="change(index)"
+								:class="['tab-item',currents==index?'active':'']">
+								<image class="img-icon" :src="$imageURL+item.icon" mode=""></image>
+								<view class="text">{{item.name}}</view>
+							</view>
+
+						</view>
+					</view>
+				</view>
+				<view class="listbox">
+				<view class="second-tab">
+					<view class="tab-box">
+						<view v-for="(item,index) in list" :key="index" @click="change(index)"
+							:class="['tab-item',currents==index?'active':'']">
+							<text>{{item.name}}</text>
+
+						</view>
+
+					</view>
+				</view>
+				<view class="third-tab">
+					<view class="third-tab-item">总计</view>
+					<view class="third-tab-item">在线</view>
+					<view class="third-tab-item">离线</view>
+				</view>
+				<scroll-view :scroll-top="0" :scroll-y="true" class="list scroll-Y" @scrolltoupper="upper"
+					@scrolltolower="lower" @scroll="scroll">
+					<view class="list_item" v-for="(item, index) in eqlistdata" :key="index" @click="historys(item)">
+						<view class="list_item_top">
+							<p class="p1"> <span class="title">{{ (item.device_name || '--' )| yfEllipsis(7)}}</span><span class="sub-title">{{ item.only_for_show || item.device_id }}</span></p>
+							
+							<p v-if="![11, 19, 20].includes(type_id)"  class="online-status">
+								<!-- {{ item.is_online ? '在线' : '离线' }} -->
+								<image v-if="item.is_online" :src="$imageURL+'/bigdata_app/newImg/home/online.png'" mode=""></image>
+								<image v-else :src="$imageURL+'/bigdata_app/newImg/home/outline.png'" mode=""></image>
+							</p>
+						</view>
+						<view class="list_item_text">
+							
+							<p v-if="type_id == 40 || type_id == 42">
+								<span class="label">上报时间</span> {{ item.uptime }}
+							</p>
+							<p v-else><span class="label">上报时间</span>{{ item.uptime | timeFormat() }}</p>
+							<p>
+								<span class="label">设备位置</span>{{ (item.address|| '无') | yfEllipsis(16)}}
+							</p>
+						</view>
+					</view>
+				</scroll-view>
+
+				<!-- </view> -->
+			</view>
+		</view>
+
+		<!-- <view class="utabs_box">
+			<view class="utabs">
+				<u-tabs :list="list" :is-scroll="true" :current="currents" @change="change" item-width="140"
+					font-size="24" gutter="20" bar-width="60" active-color="#42b983" v-if="list.length"></u-tabs>
+			</view>
+		</view> -->
+		<view class="loading" v-if="loadingtf">
+			<image src="../../static/images/ajax-loader.gif" mode="" class="img"></image>
+		</view>
+		<view class="top" v-if="isTop" @click="top">
+			<image :src="
+          $imageURL+'/bigdata_app' +
+          '/image/6209a98f0cb3b5086f2ca36152c9269.png'
+        " mode=""></image>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		Debounce,
+		Throttle
+	} from '../../util/anitthro.js';
+	export default {
+		data() {
+			return {
+				list: [],
+				current: 0,
+				currents: 0,
+				page: 1,
+				size: 10,
+				eqlistdata: [],
+				isTop: false,
+				device_model: 0,
+				infoalter: false, // 权限设置,
+				type_id: 0, //设备类型,
+				imgpath: [],
+				loadingtf: false,
+				width: 0, //顶部搜索栏宽度
+				imports: '', //搜索设备ID
+				menuList: [{
+					icon: '/bigdata_app/newImg/home/sqjd.png',
+					name: '四情基地',
+
+				}, {
+					icon: '/bigdata_app/newImg/home/zngg.png',
+					name: '智能灌溉',
+
+				}, {
+					icon: '/bigdata_app/newImg/home/yhgl.png',
+					name: '用户管理',
+				}, {
+					icon: '/bigdata_app/newImg/home/shfw.png',
+					name: '售后服务',
+
+				}, {
+					icon: '/bigdata_app/newImg/home/more.png',
+					name: '更多功能'
+				}, {
+					icon: '/bigdata_app/newImg/home/more.png',
+					name: '更多功能'
+				}]
+			};
+		},
+		methods: {
+			// 大棚
+			async getDpDeviceList(tf) {
+				const res = await this.$myRequest({
+					url: '/api/v2/iot/mobile/device/dpkzg/yf/list/',
+					method: 'post',
+					data: {
+						pageSize: this.size,
+						pageNum: this.page,
+					},
+				});
+				this.loadingtf = false;
+				const eqlistdata = res || [];
+				eqlistdata.forEach((item) => {
+					const newtime = +new Date() / 1000;
+					const days = (newtime - item.addtime) / 60 / 60 / 24;
+					item.days = Math.round(days);
+					item.device_id = item.devCode;
+					item.uptime = item.devUpdateddate;
+					item.addtime = item.devCreateddate;
+					item.device_name = item.devName;
+					item.real_name = item.realName;
+					item.is_online = item.devStatus == 1 ? true : false;
+				});
+				this.eqlistdata = eqlistdata;
+			},
+			// 水肥
+			async getDeviceList(tf) {
+				const res = await this.$myRequest({
+					url: '/api/v2/iot/mobile/device/sf/zsrf/list/',
+					method: 'post',
+					data: {
+						pageSize: this.size,
+						pageNum: this.page,
+					},
+				});
+				this.loadingtf = false;
+				const eqlistdata = res || [];
+				eqlistdata.forEach((item) => {
+					const newtime = +new Date() / 1000;
+					const days = (newtime - item.addtime) / 60 / 60 / 24;
+					item.days = Math.round(days);
+					item.device_id = item.devCode;
+					item.uptime = item.devUpdateddate;
+					item.addtime = item.devCreateddate;
+					item.device_name = item.devName;
+					item.real_name = item.realName;
+					item.is_online = item.devStatus == 1 ? true : false;
+				});
+				this.eqlistdata = eqlistdata;
+			},
+			async eqlist(tf) {
+				//设备列表
+				this.loadingtf = true;
+				console.log(this.type_id, 'type_idtype_id');
+				if (this.type_id == 42) {
+					this.getDpDeviceList(tf);
+					return;
+				}
+				if (this.type_id == 40) {
+					this.getDeviceList(tf);
+					return;
+				}
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
+					data: {
+						device_type_id: this.type_id,
+						page: this.page,
+						page_size: this.size,
+						device_id: this.imports,
+						device_model: this.device_model,
+					},
+				});
+				this.loadingtf = false;
+				if ([11, 19, 20].includes(Number(this.type_id))) {
+					var newtime = +new Date() / 1000;
+				} else {
+					var newtime = +new Date() / 1000;
+				}
+				res.data.forEach((item) => {
+					let {
+						uptime,
+						addtime
+					} = item;
+					item.uptime = addtime;
+					item.addtime = uptime;
+					var days = (newtime - item.addtime) / 60 / 60 / 24;
+					item.days = Math.round(days);
+				});
+				if (tf) {
+					this.eqlistdata = this.eqlistdata.concat(res.data);
+				} else {
+					this.eqlistdata = res.data;
+				}
+				console.log(this.eqlistdata);
+				// for (var i = 0; i < this.eqlistdata.length; i++) {
+				//   var days = (newtime - this.eqlistdata[i].addtime) / 60 / 60 / 24;
+				//   this.eqlistdata[i].days = Math.round(days);
+				// }
+			},
+			async xyeqlist(tf) {
+				//设备列表
+				this.loadingtf = true;
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=sex_lure_nl.sex_lure.nl_device_list',
+					data: {
+						device_type_id: this.type_id,
+						page: this.page,
+						page_size: this.size,
+						device_id: this.imports,
+					},
+				});
+				this.loadingtf = false;
+				var newtime = +new Date() / 1000;
+				if (tf) {
+					this.eqlistdata = this.eqlistdata.concat(res.data);
+				} else {
+					this.eqlistdata = res.data;
+				}
+				for (var i = 0; i < this.eqlistdata.length; i++) {
+					var days = (newtime - this.eqlistdata[i].addtime) / 60 / 60 / 24;
+					this.eqlistdata[i].days = Math.round(days);
+				}
+				console.log(res);
+			},
+			//camera.camera_manage.list_camera
+			async camera() {
+				//监控
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=camera.camera_manage.list_camera',
+					data: {
+						page_size: 1,
+					},
+				});
+				this.accessToken = res.accessToken;
+			},
+			// homes.user_device_type
+			async usertype() {
+				//设备列表
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=home.homes.user_device_type',
+				});
+				console.log(res);
+				for (var i = 0; i < res.length; i++) {
+					if (res[i].type_name == '温室大棚') {
+						continue;
+					}
+					var obj = {
+						name: res[i].type_name,
+						id: res[i].id,
+						device_model: res[i].device_model,
+						pur_id: res[i].pur_id,
+					};
+					this.list.push(obj);
+				}
+				console.log('设备列表11111111111111', this.list);
+				if (res.length) {
+					this.type_id = this.list[0].id;
+					this.device_model = this.list[0].device_model;
+					if (this.list[0].id == 10) {
+						this.xyeqlist();
+					} else {
+						this.eqlist();
+					}
+				}
+			},
+			change(index) {
+				console.log(index);
+				//头部导航栏的点击
+				this.imports = '';
+				this.current = index;
+				this.currents = index;
+				this.page = 1;
+				this.eqlistdata = [];
+				this.type_id = this.list[index].id;
+				this.device_model = this.list[index].device_model;
+				console.log(this.type_id);
+				if (this.list[index].id == 10) {
+					this.xyeqlist();
+				} else {
+					this.eqlist();
+				}
+			},
+			clickRight() {
+				//搜索
+				this.width = '90%';
+			},
+			modification(item) {
+				uni.navigateTo({
+					url: './modification?data=' + JSON.stringify(item) + '&id=' + this.type_id,
+				});
+			},
+			top() {
+				uni.pageScrollTo({
+					scrollTop: 0,
+					duration: 500,
+				});
+			},
+			historys(itemOld) {
+				let item = JSON.parse(JSON.stringify(itemOld));
+				console.log('item', item, this.type_id);
+				item.pur_id = this.list[this.current].pur_id;
+				switch (this.type_id) {
+					// 水肥新设备
+					case 22:
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						obj.lat = item.lat;
+						obj.lng = item.lng;
+						obj.equip_name = item.device_name;
+						obj.uptime = item.uptime;
+						uni.navigateTo({
+							url: '../waterandfernew/details?shebei=' + JSON.stringify(obj),
+						});
+						break;
+						// 病虫害可视监测
+					case 14:
+						item.addtime = item.uptime;
+						uni.navigateTo({
+							url: '../cb/sy/detail?detail=' + JSON.stringify(item),
+						});
+						break;
+					case 2:
+						item.addtime = item.uptime;
+						uni.navigateTo({
+							url: '../prevention/equipmentdetails?shebei=' + JSON.stringify(item),
+						});
+						break;
+					case 38:
+						// console.log(item);
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.equip_id = item.imei;
+						obj.is_online = item.is_online;
+						obj.lat = item.lat;
+						obj.lng = item.lng;
+						obj.equip_name = item.device_name;
+						obj.uptime = item.uptime;
+						uni.navigateTo({
+							url: '../environment/equipment-new?shebei=' + JSON.stringify(obj),
+						});
+						break;
+					case 5:
+						console.log(item);
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.equip_id = item.imei;
+						obj.is_online = item.is_online;
+						obj.lat = item.lat;
+						obj.lng = item.lng;
+						obj.equip_name = item.device_name;
+						obj.uptime = item.uptime;
+						uni.navigateTo({
+							url: '../environment/equipment?shebei=' + JSON.stringify(obj),
+						});
+						break;
+					case 6:
+						uni.navigateTo({
+							url: '/pages/webview/webview?device_id=' +
+								item.imei +
+								'&accessToken=' +
+								this.accessToken,
+						});
+						break;
+					case 3:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: '../cb/equip-detail/equip-detail?info=' + JSON.stringify(item),
+						});
+						break;
+					case 28:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: '../cb/smallPest/smallPest?info=' + JSON.stringify(item),
+						});
+						break;
+					case 4:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: '../cb/equip-detail/equip-detail?info=' + JSON.stringify(item),
+						});
+						break;
+					case 32:
+					case 33:
+					case 34:
+					case 35:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: '../cb/equip-detail/equip-detail-new?info=' +
+								JSON.stringify(item),
+						});
+						break;
+					case 7:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: '../cb/equip-detail/equip-detail?info=' + JSON.stringify(item),
+						});
+						break;
+					case 8:
+						// item.type = this.type_id;
+						uni.navigateTo({
+							url: '../cb/thxydetail/thxydetail?imei=' + item.imei,
+						});
+						break;
+					case 29:
+						// item.type = this.type_id;
+						uni.navigateTo({
+							url: `../cb/nlNewXy/nlNewXy?imei=${item.imei}&showId=${item.only_for_show}`,
+						});
+						break;
+					case 24:
+						// item.type = this.type_id;
+						uni.navigateTo({
+							url: '../cb/zjxydetail/thxydetail?imei=' + item.imei,
+						});
+						break;
+					case 12:
+						console.log(item);
+						item.addtime = item.uptime;
+						uni.navigateTo({
+							url: '../cb/xctdetail/xctdetail?info=' + JSON.stringify(item),
+						});
+						break;
+					case 13:
+						console.log(item);
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						obj.lat = item.lat;
+						obj.lng = item.lng;
+						obj.equip_name = item.device_name;
+						obj.uptime = item.uptime;
+						uni.navigateTo({
+							url: '../waterandfer/datails?shebei=' + JSON.stringify(obj),
+						});
+						break;
+					case 15:
+						console.log(item);
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						obj.lat = item.lat;
+						obj.lng = item.lng;
+						obj.equip_name = item.device_name;
+						obj.uptime = item.uptime;
+						uni.navigateTo({
+							url: '../environment/gsequipment?shebei=' + JSON.stringify(obj),
+						});
+						break;
+					case 17:
+						break;
+					case 18:
+						var obj = {};
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						uni.navigateTo({
+							url: '../cb/shuifeiL/shuifeiL?detail=' + JSON.stringify(obj),
+						});
+						break;
+          case 43:
+            uni.navigateTo({
+              url: "/pages/fmSys/details?info=" + JSON.stringify(item)
+            })
+          break;
+          case 44:
+            uni.navigateTo({
+              url: "/pages/webviewdgp/webview?device_id=" + item.imei + "&accessToken=" + this.accessToken || uni
+                .getStorageSync('session_key') +
+                '&type=dgp'
+            })
+          break;
+					case 11:
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						obj.lat = item.lat;
+						obj.lng = item.lng;
+						obj.equip_name = item.device_name;
+						obj.uptime = item.uptime;
+						obj.location = item.address;
+						obj.type = 11;
+						uni.navigateTo({
+							url: '../disease/cmb?shebei=' + JSON.stringify(obj),
+						});
+						break;
+					case 19:
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						obj.lat = item.lat;
+						obj.lng = item.lng;
+						obj.equip_name = item.device_name;
+						obj.uptime = item.uptime;
+						obj.location = item.address;
+						obj.type = 19;
+						uni.navigateTo({
+							url: '../disease/cmb?shebei=' + JSON.stringify(obj),
+						});
+						break;
+					case 20:
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						obj.lat = item.lat;
+						obj.lng = item.lng;
+						obj.equip_name = item.device_name;
+						obj.uptime = item.uptime;
+						obj.location = item.address;
+						obj.type = 20;
+						uni.navigateTo({
+							url: '../disease/cmb?shebei=' + JSON.stringify(obj),
+						});
+						break;
+					case 21:
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						obj.lat = item.lat;
+						obj.lng = item.lng;
+						obj.equip_name = item.device_name;
+						obj.uptime = item.uptime;
+						obj.location = item.address;
+						obj.type = 21;
+						uni.navigateTo({
+							url: '../disease/cmb?shebei=' + JSON.stringify(obj),
+						});
+						break;
+					case 26:
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						obj.lat = item.lat;
+						obj.lng = item.lng;
+						obj.equip_name = item.device_name;
+						obj.uptime = item.uptime;
+						obj.location = item.address;
+						obj.type = 26;
+						uni.navigateTo({
+							url: '../disease/cmb?shebei=' + JSON.stringify(obj),
+						});
+						break;
+					case 27:
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						obj.lat = item.lat;
+						obj.lng = item.lng;
+						obj.equip_name = item.device_name;
+						obj.uptime = item.uptime;
+						obj.location = item.address;
+						obj.type = 26;
+						uni.navigateTo({
+							url: '../disease/mls/mls?shebei=' + JSON.stringify(obj),
+						});
+						break;
+					case 25:
+						item.addtime = item.uptime;
+						uni.navigateTo({
+							url: '../cb/xylps/detail?detail=' + JSON.stringify(item),
+						});
+						break;
+					default:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: '../cb/xy2.0/particulars?info=' + JSON.stringify(item),
+						});
+						break;
+					case 40:
+						item.addtime = item.uptime;
+						console.log(item, 'itemmtiemtiemtiemtie');
+						uni.navigateTo({
+							url: `../cb/shuifeizs/shuifeizs?devBid=${item.devBid}&devName=${item.devName}&devStatus=${item.devStatus}`,
+						});
+						break;
+					case 42:
+						item.addtime = item.uptime;
+						uni.navigateTo({
+							url: `../cb/wenshizs/wenshizs?devBid=${item.devBid}&devName=${item.device_name}&devStatus=${item.devStatus}`,
+						});
+						break;
+				}
+			},
+			search() {
+				//搜索
+				this.eqlistdata = [];
+				this.page = 1;
+				if (this.list[this.currents].id == 10) {
+					this.xyeqlist();
+				} else {
+					this.eqlist();
+				}
+			},
+			searchinput() {
+				Debounce(() => {
+					this.eqlistdata = [];
+					this.page = 1;
+					if (this.list[this.currents].id == 10) {
+						this.xyeqlist();
+					} else {
+						this.eqlist();
+					}
+				}, 1000)();
+			},
+			scrollTop(e) {
+				console.log(e);
+			},
+			upper() {},
+			lower() {
+				this.page++;
+				if (this.type_id == 10) {
+					this.xyeqlist(true);
+				} else {
+					this.eqlist(true);
+				}
+			},
+			scroll() {},
+		},
+		onLoad() {
+			// this.list = [];
+			// this.camera();
+			// this.current = 0;
+			// this.currents = 0;
+			// this.page = 1;
+			// this.usertype();
+			// this.width = 0;
+		},
+		onTabItemTap(e) {
+			// console.log(e);
+			this.eqlistdata = [];
+			this.list = [];
+			this.camera();
+			this.current = 0;
+			this.currents = 0;
+			this.page = 1;
+			this.usertype();
+			this.width = 0;
+		},
+		onReachBottom() {
+			this.page++;
+			if (this.type_id == 10) {
+				this.xyeqlist(true);
+			} else {
+				this.eqlist(true);
+			}
+		},
+		onPageScroll(e) {
+			//nvue暂不支持滚动监听,可用bindingx代替
+			if (e.scrollTop > 200) {
+				//距离大于200时显示
+				this.isTop = true;
+			} else {
+				//距离小于200时隐藏
+				this.isTop = false;
+			}
+		},
+	};
+</script>
+<style lang="scss">
+	page {
+		background: linear-gradient(180deg, #ffffff00 0%, #F5F6FA 23.64%, #F5F6FA 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
+	}
+
+	/deep/.uni-icons {
+		font-size: 40rpx !important;
+	}
+
+	.textbox {
+		width: 100%;
+		height: 100vh;
+		padding-top: 112rpx;
+		box-sizing: border-box;
+
+	}
+
+	.inputs {
+		width: 55%;
+		margin-left: 12rpx;
+
+		/deep/.u-content {
+			background-color: #fff !important;
+		}
+
+		/deep/.uni-input-wrapper {
+			background-color: #fff !important;
+		}
+
+	}
+
+	.utabs_box {
+		width: 100%;
+		position: fixed;
+		top: 88px;
+		background-color: #ffffff;
+		z-index: 100;
+
+		.utabs {
+			width: 95%;
+			margin: 0 auto;
+		}
+	}
+
+	.loading {
+		position: fixed;
+		top: 440px;
+		width: 95%;
+		left: 2.5%;
+		text-align: center;
+
+		.img {
+			width: 300rpx;
+			height: 40rpx;
+		}
+	}
+
+
+	.listbox{
+		// background: #F1F4F8;
+	}
+
+
+	.tab-box {
+		font-size: 30rpx;
+		// padding: 32rpx;
+		box-sizing: border-box;
+		width: 100%;
+		height: 100%;
+		overflow-y: hidden;
+		overflow-x: auto;
+		white-space: nowrap;
+
+		.tab-item {
+			cursor: pointer;
+			position: relative;
+			text-align: center;
+			display: inline-block;
+			padding: 16rpx 24rpx;
+			box-sizing: border-box;
+
+			span {
+				display: inline-block;
+			}
+		}
+	}
+
+	.tab {
+		// background-color: #0BBC58;
+		margin-top: 42rpx;
+		margin-bottom: 38rpx;
+		padding: 0 32rpx;
+		
+		.img-icon {
+			width: 80rpx;
+			height: 80rpx;
+			margin-bottom: 12rpx;
+		}
+		
+		.text {
+			color: #303133;
+			font-size: 24rpx;
+		}
+		.tab-content {
+			width: 100%;
+		
+			height: 162rpx;
+		
+		}
+
+		.tab-item.active {
+
+			border-radius: 24rpx;
+		
+			background: linear-gradient(0deg, #0bbc580f 0%, #0bbc580f 100%), #00000005;
+
+		}
+		
+	}
+
+	.second-tab {
+		height: 80rpx;
+		.tab-item{
+			font-size: 28rpx;
+			color: #999999;
+		}
+		.tab-item.active {
+			color: #303133;
+			font-weight: 700;
+			
+		}
+		.tab-item.active::after {
+		  content: '';
+		  position: absolute;
+		  bottom: 0;
+		  left: 50%;
+		  transform: translateX(-50%);
+		  width: 18px; /* 比文字略宽 */
+		  height: 18px;
+		  border: 3px solid #0BBC58;
+		  border-radius: 50%;
+			border-color: transparent; /* 隐藏其他部分 */
+
+		    border-bottom-color: #0BBC58; /* 组合成45度角 */
+		    // transform: rotate(0deg); /* 调整角度 */
+		}
+	}
+
+	.third-tab {
+		margin: 8rpx 0;
+		height: 64rpx;
+		line-height: 64rpx;
+		display: flex;
+		justify-content: space-between;
+
+		.third-tab-item {
+			flex: 1;
+			text-align: center;
+		}
+	}
+
+	.list {
+		width: 100%;
+		background-color: #F5F6FA;
+		// margin-bottom: 100rpx;
+		overflow-y: auto;
+		padding: 0 32rpx;
+		box-sizing: border-box;
+
+		.list_item {
+			width: 100%;
+			margin: 0 auto 24rpx;
+			padding: 32rpx;
+			box-sizing: border-box;
+			position: relative;
+			background-color: #ffffff;
+			border-radius: 16rpx;
+
+			.list_item_top {
+		
+
+				.p1 {
+					width: 86%;
+
+					height: 60rpx;
+					line-height: 60rpx;
+					font-size: 28rpx;
+					overflow: hidden;
+
+				
+
+					.title{
+						 color: #333333;
+						 
+						 font-size: 28rpx;
+						
+						 font-weight: 700;
+						margin-right: 8rpx;
+					}
+					
+					.sub-title{
+						 color: #666666;
+						 
+						 font-size: 28rpx;
+						
+						 font-weight: 400;
+						
+					}
+				}
+
+				
+			}
+			.online-status{
+				font-size: 28rpx;
+				position: absolute;
+				top:0rpx;
+				text-align: center;
+				right: 0rpx;
+				width: 76px;
+				height: 28px;
+				// line-height: 28px;
+				// border-radius: 0px 0px 0px 26px;
+				
+				// border: 1px solid #ffffff;
+				image{
+					width: 152rpx;
+					height: 56rpx;
+				}
+	
+			}
+			// .p2 {
+					
+			// 	color: #0BBC58;
+			// 	background: #0bbc581a;
+			// }
+			
+			// .p_out {
+					
+			// 	color: #FB4E52;
+			// 	background: #fb4e521a;
+			// }
+			.list_item_text {
+				margin-top: 20rpx;
+				
+				p {
+					font-size: 24rpx;
+					color: #303133;
+					margin-top: 10rpx;
+					word-break: break-all;
+				}
+				
+
+				.label{
+					 color: #999999;
+					 text-align: right;
+					margin-right: 32rpx;
+					 font-size: 24rpx;
+				}
+			}
+
+			.list_item_btn {
+				width: 126rpx;
+				color: #42b983;
+				height: 40rpx;
+				text-align: center;
+				border: 1rpx solid #42b983;
+				border-radius: 25rpx;
+				font-size: 24rpx;
+				line-height: 35rpx;
+				position: absolute;
+				bottom: 15rpx;
+				right: 20rpx;
+			}
+		}
+	}
+
+	.top {
+		position: fixed;
+		right: 30px;
+		bottom: 100px;
+		z-index: 100;
+
+		image {
+			width: 100rpx;
+			height: 100rpx;
+		}
+	}
+</style>

+ 241 - 0
pages/equipList2/modification.vue

@@ -0,0 +1,241 @@
+<template>
+	<view>
+		<view class="status_bar"></view>
+		<view class="" style="position: relative;top: 64px;">
+			<view style="position: fixed;z-index: 100;">
+				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" title="修改名称"></uni-nav-bar>
+			</view>
+			<view class="mod">
+				<view class="mod_name">
+					<p><span style="color: #ff0000;" v-if="quanxian.namealter">*</span>设备名称</p>
+					<input type="text" v-model="moddata.device_name" :class="quanxian.namealter?'namebg':''" :disabled="!quanxian.namealter"/>
+				</view>
+				<view class="mod_id">
+					<p>设备ID</p>
+					<input type="text" :value="moddata.imei||moddata.device_id" disabled />
+				</view>
+				<view class="mod_user">
+					<p>适配用户</p>
+					<input type="text" :value="moddata.real_name==''?'无':moddata.real_name" disabled />
+				</view>
+				<view class="mod_city" @click="amendcity" v-if="$QueryPermission(109)">
+					<p><span style="color: #ff0000;" v-if="quanxian.cityalter">*</span>设备位置</p>
+					<view style="display: flex;">
+						<input type="text" :value="city" disabled style="width: 400rpx;" />
+						<u-icon name="arrow-right"></u-icon>
+					</view>
+				</view>
+				<view class="mod_time">
+					<p>设备添加时间</p>
+					<input type="text" :value="moddata.addtime|timeFormat()" disabled />
+				</view>
+				<p style="width: 90%;margin: 0 auto;text-align: right;color: #06B535;"><span style="color: #ff0000;">*</span>为可修改</p>
+				<view class="sub" v-if="quanxian.infoalter" @click="btn">
+					提 交
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				moddata: [],
+				city: "",
+				selectcityTF: false,
+				quanxian:{
+					namealter:false,
+					cityalter:false,
+					infoalter:false
+				}
+			}
+		},
+		methods: {
+			async eqlistcity(lat, lng) { //修改设备定位
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.revise_device_lnglat',
+					data: {
+						device_id: this.moddata.imei,
+						lat: lat,
+						lng: lng
+					}
+				})
+				console.log(res)
+				if (res==false) {
+					uni.showModal({
+						title: "修改地址失败",
+						icon: "none"
+					})
+				}
+			},
+			async eqlistname() { //修改设备名称
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.revise_device',
+					data: {
+						device_id: this.moddata.imei,
+						device_name: this.moddata.device_name,
+					}
+				})
+				console.log(res)
+				if (res==false) {
+					uni.showModal({
+						title: "修改名称失败",
+						icon: "none"
+					})
+				}
+			},
+			async eqlistuser(id, imei) { //获取设备信息
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
+					data: {
+						device_type_id: id,
+						device_id: imei,
+					}
+				})
+				this.moddata = res.data[0]
+				console.log(res)
+				this.selectaddress(this.moddata.lng, this.moddata.lat)
+			},
+			async xyeqlistuser(imei) { //获取设备信息
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=sex_lure_nl.sex_lure.nl_device_list',
+					data: {
+						device_id: imei,
+					}
+				})
+				console.log(res)
+				this.moddata = res.data[0]
+				this.selectaddress(this.moddata.lng, this.moddata.lat)
+			},
+			btn() {
+				this.eqlistcity(this.moddata.lat, this.moddata.lng)
+				this.eqlistname()
+				uni.removeStorage({
+					key: "location"
+				})
+				this.clickLeft()
+			},
+			clickLeft() {
+				uni.navigateBack({
+					delta:1
+				})
+			},
+			amendcity() { //修改设备地址
+				if(this.quanxian.cityalter){
+					this.selectcityTF = true
+					uni.navigateTo({
+						url: "../fourBase/city"
+					})
+				}else{
+					uni.showToast({
+						title: "您暂无权限进行此操作,如有需要,请联系管理员",
+						icon: "none"
+					})
+				}
+			},
+			selectaddress(lng, lat) { //获取分布位置
+				uni.request({
+					type: "GET",
+					url: "https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=" + lng + "," + lat +
+						"&key=27273b81090f78759e4057f94474516f&radius=1000&extensions=all",
+					dataType: "json",
+					complete: ress => {
+						// console.log(ress)
+						if (ress.data.regeocode.formatted_address.length == 0) {
+							this.city = "--"
+						} else {
+							this.city = ress.data.regeocode.formatted_address
+						}
+					}
+				});
+			},
+		},
+		onLoad(option) {
+			console.log(option)
+			if(option.id==10){
+				this.xyeqlistuser(JSON.parse(option.data).device_id)
+			}else{
+				this.eqlistuser(option.id, JSON.parse(option.data).imei)
+			}
+			uni.getStorage({
+				key:"jurisdiction",
+				success:(res)=>{
+					console.log(JSON.parse(res.data))
+					let items = JSON.parse(res.data).filter((item)=>{
+						return item.purview_name == "设备管理"
+					})
+					let items2 = items[0].children.filter((item)=>{
+						return item.purview_name == "设备列表"
+					})
+					this.quanxian.namealter = items2[0].children.some((item)=>{
+						return item.purview_name == "修改名称"
+					})
+					this.quanxian.cityalter = items2[0].children.some((item)=>{
+						return item.purview_name == "添加位置"
+					})
+					this.quanxian.infoalter = items2[0].children.some((item)=>{
+						return item.purview_name == "修改名称" || item.purview_name == "添加位置"
+					})
+				},
+			})
+		},
+		onShow(){
+			uni.getStorage({
+				key: "location",
+				success: (res) => {
+					// console.log(res);
+					this.moddata.lat = res.data[1]
+					this.moddata.lng = res.data[0]
+					this.selectaddress(this.moddata.lng, this.moddata.lat)
+				}
+			})
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		background-color: #FAFAFA;
+	}
+	.mod {
+		width: 100%;
+		position: absolute;
+		top: 44px;
+		.mod_name,
+		.mod_id,
+		.mod_user,
+		.mod_time,
+		.mod_city {
+			width: 90%;
+			margin: 30rpx auto;
+			display: flex;
+			justify-content: space-between;
+			background-color: #FFFFFF;
+			padding: 20rpx 10rpx;
+			color: #57C77A;
+			line-height: 50rpx;
+			.namebg{
+				background-color: #FAFAFA;
+			}
+			input {
+				text-align: right;
+				font-size: 28rpx;
+				padding: 10rpx;
+			}
+		}
+	}
+
+	.sub {
+		width: 90%;
+		margin: 30rpx auto;
+		text-align: center;
+		height: 70rpx;
+		line-height: 70rpx;
+		background-color: #57C77A;
+		border-radius: 35rpx;
+		color: #FFFFFF;
+	}
+</style>

+ 268 - 0
pages/equipList2/seabox/modification.vue

@@ -0,0 +1,268 @@
+<template>
+	<view>
+		<view class="status_bar"></view>
+		<view class="" style="position: relative;top: 40px;">
+			<view style="position: fixed;z-index: 100;">
+				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" title="修改名称"></uni-nav-bar>
+			</view>
+			<view class="mod">
+				<view class="mod_name">
+					<p><span style="color: #ff0000;" v-if="quanxian.namealter">*</span>设备名称</p>
+					<input type="text" v-model="moddata.device_name" :class="quanxian.namealter?'namebg':''" :disabled="!quanxian.namealter"/>
+				</view>
+				<view class="mod_id">
+					<p>设备ID</p>
+					<input type="text" :value="moddata.imei || moddata.device_id" disabled />
+				</view>
+				<view class="mod_user">
+					<p>适配用户</p>
+					<input type="text" :value="moddata.real_name==''?'无':moddata.real_name" disabled />
+				</view>
+				<view class="mod_city" @click="amendcity">
+					<view style="width: 90%;">
+						<p><span style="color: #ff0000;" v-if="quanxian.cityalter">*</span>设备位置</p>
+						<input type="text" :value="city" disabled />
+					</view>
+					<u-icon name="arrow-right"></u-icon>
+				</view>
+				<view class="mod_time">
+					<p>设备添加时间</p>
+					<input type="text" :value="moddata.addtime|timeFormat()" disabled />
+				</view>
+				<p style="width: 90%;margin: 0 auto;text-align: right;color: #06B535;"><span style="color: #ff0000;">*</span>为可修改</p>
+				<view class="sub" v-if="quanxian.infoalter" @click="btn">
+					提 交
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				moddata: [],
+				city: "",
+				selectcityTF: false,
+				quanxian:{
+					namealter:false,
+					cityalter:false,
+					infoalter:false
+				}
+			}
+		},
+		methods: {
+			async eqlistcity(lat, lng) { //修改设备定位
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.revise_device',
+					data: {
+						device_id: this.moddata.imei,
+						lat: lat,
+						lng: lng
+					}
+				})
+				console.log(res)
+				if (res==false) {
+					uni.showToast({
+						title: '修改地址失败!',
+						icon: "none"
+					});
+				}else{
+					uni.showToast({
+						title: '修改地址成功!',
+						icon: "none"
+					});
+				}
+			},
+			async eqlistname() { //修改设备名称
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.revise_device',
+					data: {
+						device_id: this.moddata.imei,
+						device_name: this.moddata.device_name,
+					}
+				})
+				console.log(res)
+				if (res==false) {
+					uni.showToast({
+						title: '修改名称失败!',
+						icon: "none"
+					});
+				}else{
+					uni.showToast({
+						title: '修改名称成功!',
+						icon: "none"
+					});
+					uni.removeStorage({
+						key: "location"
+					})
+					this.clickLeft()
+				}
+			},
+			async eqlistuser(id, imei) { //获取设备信息
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
+					data: {
+						device_type_id: id,
+						device_id: imei,
+					}
+				})
+				this.moddata = res.data[0]
+				console.log(res)
+				this.selectaddress(this.moddata.lng, this.moddata.lat)
+			},
+			async xyeqlistuser(imei) { //获取设备信息
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=sex_lure_nl.sex_lure.nl_device_list',
+					data: {
+						device_id: imei,
+					}
+				})
+				console.log(res)
+				this.moddata = res.data[0]
+				this.selectaddress(this.moddata.lng, this.moddata.lat)
+			},
+			btn() {
+				this.eqlistcity(this.moddata.lat, this.moddata.lng)
+				this.eqlistname()
+			},
+			clickLeft() {
+				uni.navigateBack({
+					delta:1
+				})
+			},
+			amendcity() { //修改设备地址
+				if(this.quanxian.cityalter){
+					this.selectcityTF = true
+					uni.navigateTo({
+						url: "../fourBase/city"
+					})
+				}else{
+					uni.showToast({
+						title: "您暂无权限进行此操作,如有需要,请联系管理员",
+						icon: "none"
+					})
+				}
+			},
+			selectaddress(lng, lat) { //获取分布位置
+				uni.request({
+					type: "GET",
+					url: "https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=" + lng + "," + lat +
+						"&key=27273b81090f78759e4057f94474516f&radius=1000&extensions=all",
+					dataType: "json",
+					complete: ress => {
+						// console.log(ress)
+						if (ress.data.regeocode.formatted_address.length == 0) {
+							this.city = "--"
+						} else {
+							this.city = ress.data.regeocode.formatted_address
+						}
+					}
+				});
+			},
+		},
+		onLoad(option) {
+			console.log(option)
+			if(option.id==10){
+				this.xyeqlistuser(JSON.parse(option.data).device_id)
+			}else{
+				this.eqlistuser(option.id, JSON.parse(option.data).imei)
+			}
+			uni.getStorage({
+				key:"jurisdiction",
+				success:(res)=>{
+					console.log(JSON.parse(res.data))
+					let items = JSON.parse(res.data).filter((item)=>{
+						return item.purview_name == "设备管理"
+					})
+					let items2 = items[0].children.filter((item)=>{
+						return item.purview_name == "设备列表"
+					})
+					this.quanxian.namealter = items2[0].children.some((item)=>{
+						return item.purview_name == "修改名称"
+					})
+					this.quanxian.cityalter = items2[0].children.some((item)=>{
+						return item.purview_name == "添加位置"
+					})
+					this.quanxian.infoalter = items2[0].children.some((item)=>{
+						return item.purview_name == "修改名称" || item.purview_name == "添加位置"
+					})
+				},
+			})
+		},
+		onShow(){
+			uni.getStorage({
+				key: "location",
+				success: (res) => {
+					// console.log(res);
+					this.moddata.lat = res.data[1]
+					this.moddata.lng = res.data[0]
+					this.selectaddress(this.moddata.lng, this.moddata.lat)
+				}
+			})
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		background-color: #FAFAFA;
+	}
+	.mod {
+		width: 100%;
+		position: absolute;
+		top: 44px;
+		.mod_name,
+		.mod_id,
+		.mod_user,
+		.mod_time {
+			width: 90%;
+			margin: 30rpx auto;
+			display: flex;
+			justify-content: space-between;
+			background-color: #FFFFFF;
+			padding: 20rpx 10rpx;
+			color: #57C77A;
+			line-height: 50rpx;
+			.namebg{
+				background-color: #FAFAFA;
+			}
+			input {
+				text-align: right;
+				font-size: 28rpx;
+				padding: 10rpx;
+			}
+		}
+		.mod_city{
+			width: 90%;
+			margin: 30rpx auto;
+			background-color: #FFFFFF;
+			padding: 20rpx 10rpx;
+			color: #57C77A;
+			line-height: 50rpx;
+			display: flex;
+			justify-content: space-between;
+			.namebg{
+				background-color: #FAFAFA;
+			}
+			input {
+				width: 90%;
+				font-size: 28rpx;
+				padding: 10rpx;
+			}
+		}
+	}
+
+	.sub {
+		width: 90%;
+		margin: 30rpx auto;
+		text-align: center;
+		height: 70rpx;
+		line-height: 70rpx;
+		background-color: #57C77A;
+		border-radius: 35rpx;
+		color: #FFFFFF;
+	}
+</style>

+ 343 - 0
pages/equipList2/seabox/search.vue

@@ -0,0 +1,343 @@
+<template>
+	<view>
+		<view class="status_bar"></view>
+		<view style="position: fixed;z-index: 100;background-color: #FFFFFF;height: 80px;top: 40px;">
+			<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="设备搜索"></uni-nav-bar>
+			<view class="search_top_input">
+				<input type="text" value="" placeholder="请输入设备ID" v-model="imports" />
+				<u-icon name="search" size="40" class="icon" @click="search"></u-icon>
+			</view>
+		</view>
+		<view class="list">
+			<view class="list_item" v-for="(item,index) in eqlistdata" :key="index" @click="historys(item)">
+				<view class="list_item_top">
+					<p class="p1">
+						<image :src="$imageURL+'/bigdata_app'+ imgpath[0].path" mode=""></image>
+						{{item.device_name==''?"--":item.device_name}}
+					</p>
+					<p :class="[item.is_online?'p2':'p_out']">{{item.is_online?"在线":"离线"}}</p>
+				</view>
+				<view class="list_item_text">
+					<p>设备ID:{{item.imei}}</p>
+					<p>适配用户:{{item.device_user==''?"无":item.device_user}}</p>
+					<p>添加设备时间:{{item.addtime|timeFormat()}}</p>
+					<p>添加设备时间:{{item.uptime|timeFormat()}}</p>
+					<p>设备已运行:{{item.days}}天</p>
+				</view>
+				<view class="list_item_btn" v-if="infoalter" @click.stop="modification(item)">
+					修改名称
+				</view>
+			</view>
+			<view class="none" v-if="eqlistdatatf">
+				暂无数据
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		Debounce,
+		Throttle
+	} from "../../../util/anitthro.js"
+	export default {
+		data() {
+			return {
+				imports: '',
+				eqlistdata: [],
+				images: [{
+						name: "杀虫灯",
+						path: "/image/fourMoodBase/3.png", //
+						id: 2
+					},
+					{
+						name: "测报灯",
+						path: "/image/fourMoodBase/1.png",
+						id: 3
+					}, {
+						name: "性诱测报",
+						path: "/image/fourMoodBase/6.png",
+						id: 4
+					}, {
+						name: "环境监测",
+						path: "/image/fourMoodBase/5.png",
+						id: 5
+					}, {
+						name: "监控设备",
+						path: "/image/fourMoodBase/2.png",
+						id: 6
+					}, {
+						name: "孢子仪",
+						path: "/image/fourMoodBase/4.png",
+						id: 7
+					},
+					{
+						name: "性诱2.0",
+						path: "/image/fourMoodBase/10.png",
+						id: 10
+					}
+				],
+				eqlistdatatf: false, //暂无数据
+				indexs: 2, //设备id
+				page: 1,
+				size: 10,
+				infoalter:false,
+				imgpath:[]
+			}
+		},
+		methods: {
+			async eqlist() { //设备列表
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
+					data: {
+						device_type_id: this.indexs,
+						device_id: this.imports,
+						page: this.page,
+						page_size: this.size,
+					}
+				})
+				this.eqlistdata = this.eqlistdata.concat(res.data)
+				var newtime = +new Date()/1000
+				for(var i=0;i<this.eqlistdata.length;i++){
+					var days = (newtime-this.eqlistdata[i].uptime)/60/60/24
+					this.eqlistdata[i].days = Math.round(days)
+				} 
+				console.log(this.eqlistdata)
+				if (this.eqlistdata.length == 0) {
+					this.eqlistdatatf = true
+				} else {
+					this.eqlistdatatf = false
+				}
+			},
+			clickLeft() { //返回
+				uni.switchTab({
+					url: "./index"
+				})
+			},
+			search() { //搜索
+				// this.eqlistdata = []
+				// this.page = 1
+				// this.eqlist()
+				// console.log(1)
+				this.system(this.imports)
+			},
+			system(str){
+				var arr = str.split(",")
+				console.log(arr)
+			},
+			searchinput() {
+				Debounce(() => {
+					this.eqlistdata = []
+					this.page = 1
+					this.eqlist()
+				}, 1000)()
+			},
+			modification(item) {
+				uni.navigateTo({
+					url: "./modification?data=" + JSON.stringify(item) + "&id=" + (this.indexs)
+				})
+			},
+			historys(item) {
+				switch (Number(this.indexs)) {
+					case 2:
+						uni.navigateTo({
+							url: "../prevention/equipmentdetails?shebei=" + JSON.stringify(item)
+						})
+						break;
+					case 5:
+						console.log(item)
+						var obj = {}
+						obj.d_id = item.d_id
+						obj.equip_id = item.imei
+						obj.is_online = item.is_online
+						obj.lat = item.lat
+						obj.lng = item.lng
+						obj.equip_name = item.device_name
+						obj.uptime = item.addtime
+						uni.navigateTo({
+							url: "../environment/equipment?shebei=" + JSON.stringify(obj)
+						})
+						break;
+					case 6:
+						uni.navigateTo({
+							url: "/pages/webview/webview?device_id=" + item.imei + "&accessToken=" + this.accessToken
+						})
+						break;
+					default:
+						item.type = this.indexs
+						uni.navigateTo({
+							url: "../cb/equip-detail/equip-detail?info=" + JSON.stringify(item)
+						})
+						break;
+				}
+			}
+		},
+		onLoad(option) {
+			this.indexs = option.id
+			this.imgpath = this.images.filter((item)=>{
+				return item.id == option.id
+			})
+			console.log(this.imgpath)
+			uni.getStorage({
+				key:"jurisdiction",
+				success:(res)=>{
+					console.log(JSON.parse(res.data))
+					let items = JSON.parse(res.data).filter((item)=>{
+						return item.purview_name == "设备管理"
+					})
+					let items2 = items[0].children.filter((item)=>{
+						return item.purview_name == "设备列表"
+					})
+					this.infoalter = items2[0].children.some((item)=>{
+						return item.purview_name == "修改名称" || item.purview_name == "添加位置"
+					})
+				},
+			})
+		},
+		onReachBottom() {
+			this.page++
+			this.eqlist()
+		},
+		onBackPress(options) {
+			if (options.from === 'navigateBack') {
+				return false;
+			}
+			this.clickLeft();
+			return true;
+		},
+	}
+</script>
+<style lang="scss">
+	.search_top_input {
+		width: 90%;
+		height: 54rpx;
+		background-color: #E4E4E4;
+		border-radius: 27rpx;
+		position: absolute;
+		top: 100rpx;
+		right: 5%;
+		padding-top: 8rpx;
+		box-sizing: border-box;
+		input {
+			width: 80%;
+			// text-indent: 1rem;
+			font-size: 26rpx;
+			padding-left: 20px;
+		}
+		.icon{
+			position: absolute;
+			top: 8rpx;
+			right: 26rpx;
+		}
+	}
+
+	.search_bot_input {
+		width: 80%;
+		height: 54rpx;
+		background-color: #E4E4E4;
+		border-radius: 27rpx;
+		position: absolute;
+		top: 18px;
+		right: 18rpx;
+		box-sizing: border-box;
+		padding-top: 8rpx;
+
+		input {
+			width: 85%;
+			text-indent: 1rem;
+			font-size: 26rpx;
+		}
+
+		.icon {
+			position: absolute;
+			top: 8rpx;
+			right: 26rpx;
+		}
+	}
+
+	.list {
+		width: 100%;
+		background-color: #FDFDFD;
+		position: absolute;
+		top: 120px;
+
+		.list_item {
+			width: 90%;
+			margin: 20rpx auto;
+			padding: 10rpx 20rpx;
+			position: relative;
+			background-color: #FFFFFF;
+			box-sizing: border-box;
+			box-shadow: 0 0 10rpx #bcb9ca;
+
+			.list_item_top {
+				display: flex;
+				justify-content: space-between;
+
+				.p1 {
+					height: 60rpx;
+					line-height: 60rpx;
+					font-size: 28rpx;
+
+					image {
+						width: 40rpx;
+						height: 40rpx;
+						vertical-align: text-top;
+						margin-right: 20rpx;
+					}
+				}
+
+				.p2 {
+					height: 60rpx;
+					line-height: 60rpx;
+					font-size: 28rpx;
+					color: #42b983;
+				}
+
+				.p_out {
+					height: 60rpx;
+					line-height: 60rpx;
+					font-size: 28rpx;
+					color: red;
+				}
+			}
+
+			.list_item_text {
+				margin-top: 20rpx;
+
+				p {
+					font-size: 24rpx;
+					color: #636363;
+					margin-top: 10rpx;
+				}
+
+				p:first-child {
+					font-size: 28rpx;
+					font-weight: 700;
+				}
+			}
+
+			.list_item_btn {
+				width: 126rpx;
+				color: #42b983;
+				height: 40rpx;
+				text-align: center;
+				border: 1rpx solid #42b983;
+				border-radius: 25rpx;
+				font-size: 24rpx;
+				line-height: 35rpx;
+				position: absolute;
+				top: 136rpx;
+				right: 20rpx;
+			}
+		}
+
+		.none {
+			width: 100%;
+			height: 100rpx;
+			line-height: 100rpx;
+			font-size: 32rpx;
+			text-align: center;
+		}
+	}
+</style>

+ 519 - 0
pages/equipList2/search.vue

@@ -0,0 +1,519 @@
+<template>
+	<view>
+		<view class="status_bar"></view>
+		<view
+			style="position: fixed;top: 44px; z-index: 100;height: 80rpx;background-color: #FFFFFF;padding-top: 10px;">
+			<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回"></uni-nav-bar>
+			<view class="search_bot_input">
+				<input type="text" value="" placeholder="请输入设备ID" v-model="imports" @input="searchinput" />
+				<u-icon name="search" size="40" class="icon" @click="search"></u-icon>
+			</view>
+		</view>
+		<view class="list">
+			<view class="list_item" v-for="(item,index) in eqlistdata" :key="index" @click="historys(item)">
+				<view class="list_item_top">
+					<p class="p1">
+						<image :src=" 'http://static.yfpyx.com/bigdata_app'+images[indexs-2].path" mode=""></image>
+						{{item.device_name==''?"--":item.device_name}}
+					</p>
+					<p :class="[item.is_online?'p2':'p_out']">{{item.is_online?"在线":"离线"}}</p>
+				</view>
+				<view class="list_item_text">
+					<p>设备ID:{{item.imei}}</p>
+					<p>适配用户:{{item.device_user==''?"无":item.device_user}}</p>
+					<p>添加设备时间:{{item.addtime|timeFormat()}}</p>
+					<p>添加设备时间:{{item.uptime|timeFormat()}}</p>
+					<p>设备已运行:{{item.days}}天</p>
+				</view>
+				<view class="list_item_btn" v-if="infoalter" @click.stop="modification(item)">
+					修改名称
+				</view>
+			</view>
+			<view class="none" v-if="eqlistdatatf">
+				暂无数据
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		Debounce,
+		Throttle
+	} from "../../util/anitthro.js"
+	export default {
+		data() {
+			return {
+				imports: '',
+				eqlistdata: [],
+				images: [{
+						path: "/image/fourMoodBase/scd.png",
+						id: 2
+					},
+					{
+						path: "/image/fourMoodBase/cbd.png",
+						id: 3
+					}, {
+						path: "/image/fourMoodBase/xycb.png",
+						id: 4
+					}, {
+						path: "/image/fourMoodBase/qxz.png",
+						id: 5
+					}, {
+						path: "/image/fourMoodBase/jk.png",
+						id: 6
+					}, {
+						path: "/image/fourMoodBase/bzy.png",
+						id: 7
+					}
+				],
+				eqlistdatatf: false, //暂无数据
+				indexs: 2, //设备id
+				page: 1,
+				size: 10,
+				infoalter: false
+			}
+		},
+		methods: {
+			async eqlist() { //设备列表
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
+					data: {
+						device_type_id: this.indexs,
+						device_id: this.imports,
+						page: this.page,
+						page_size: this.size,
+					}
+				})
+				var newtime = +new Date() / 1000
+				res.data.forEach(item => {
+					let {
+						uptime,
+						addtime
+					} = item;
+					item.uptime = addtime;
+					item.addtime = uptime;
+					var days = (newtime - item.addtime) / 60 / 60 / 24;
+					item.days = Math.round(days);
+				})
+				this.eqlistdata = this.eqlistdata.concat(res.data)
+				// for(var i=0;i<this.eqlistdata.length;i++){
+				// 	var days = (newtime-this.eqlistdata[i].uptime)/60/60/24
+				// 	this.eqlistdata[i].days = Math.round(days)
+				// } 
+				console.log(this.eqlistdata)
+				if (this.eqlistdata.length == 0) {
+					this.eqlistdatatf = true
+				} else {
+					this.eqlistdatatf = false
+				}
+			},
+			clickLeft() { //返回
+				uni.switchTab({
+					url: "./index"
+				})
+			},
+			search() { //搜索
+				this.eqlistdata = []
+				this.page = 1
+				this.eqlist()
+			},
+			searchinput() {
+				Debounce(() => {
+					this.eqlistdata = []
+					this.page = 1
+					this.eqlist()
+				}, 1000)()
+			},
+			modification(item) {
+				uni.navigateTo({
+					url: "./modification?data=" + JSON.stringify(item) + "&id=" + (this.indexs)
+				})
+			},
+			historys(itemOld) {
+				let item = JSON.parse(JSON.stringify(itemOld))
+				console.log("item", item);
+				switch (this.type_id) {
+					// 水肥新设备
+					case 22:
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						obj.lat = item.lat;
+						obj.lng = item.lng;
+						obj.equip_name = item.device_name;
+						obj.uptime = item.uptime;
+						uni.navigateTo({
+							url: "../waterandfernew/details?shebei=" + JSON.stringify(obj),
+						});
+						break
+						// 病虫害可视监测
+					case 14:
+						item.addtime = item.uptime;
+						uni.navigateTo({
+							url: "../cb/sy/detail?detail=" + JSON.stringify(item),
+						});
+						break
+					case 2:
+						item.addtime = item.uptime;
+						uni.navigateTo({
+							url: "../prevention/equipmentdetails?shebei=" + JSON.stringify(item),
+						});
+						break;
+					case 5:
+						console.log(item);
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.equip_id = item.imei;
+						obj.is_online = item.is_online;
+						obj.lat = item.lat;
+						obj.lng = item.lng;
+						obj.equip_name = item.device_name;
+						obj.uptime = item.uptime;
+						uni.navigateTo({
+							url: "../environment/equipment?shebei=" + JSON.stringify(obj),
+						});
+						break;
+					case 6:
+						uni.navigateTo({
+							url: "/pages/webview/webview?device_id=" +
+								item.imei +
+								"&accessToken=" +
+								this.accessToken,
+						});
+						break;
+					case 3:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: "../cb/equip-detail/equip-detail?info=" + JSON.stringify(item),
+						});
+						break;
+					case 4:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: "../cb/equip-detail/equip-detail?info=" + JSON.stringify(item),
+						});
+						break;
+					case 7:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: "../cb/equip-detail/equip-detail?info=" + JSON.stringify(item),
+						});
+						break;
+					case 8:
+						// item.type = this.type_id;
+						uni.navigateTo({
+							url: "../cb/thxydetail/thxydetail?imei=" + item.imei
+						});
+						break;
+					case 24:
+						// item.type = this.type_id;
+						uni.navigateTo({
+							url: "../cb/zjxydetail/thxydetail?imei=" + item.imei
+						});
+						break;
+					case 12:
+						console.log(item);
+						item.addtime = item.uptime;
+						uni.navigateTo({
+							url: "../cb/xctdetail/xctdetail?info=" + JSON.stringify(item),
+						});
+						break;
+					case 13:
+						console.log(item);
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						obj.lat = item.lat;
+						obj.lng = item.lng;
+						obj.equip_name = item.device_name;
+						obj.uptime = item.uptime;
+						uni.navigateTo({
+							url: "../waterandfer/datails?shebei=" + JSON.stringify(obj),
+						});
+						break;
+					case 15:
+						console.log(item);
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						obj.lat = item.lat;
+						obj.lng = item.lng;
+						obj.equip_name = item.device_name;
+						obj.uptime = item.uptime;
+						uni.navigateTo({
+							url: "../environment/gsequipment?shebei=" + JSON.stringify(obj),
+						});
+						break;
+					case 17:
+						break;
+					case 18:
+						var obj = {};
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						uni.navigateTo({
+							url: "../cb/shuifeiL/shuifeiL?detail=" + JSON.stringify(obj),
+						});
+						break;
+          case 43:
+            uni.navigateTo({
+              url: "/pages/fmSys/details?info=" + JSON.stringify(item)
+            })
+          break;
+          case 44:
+            uni.navigateTo({
+              url: "/pages/webviewdgp/webview?device_id=" + item.imei + "&accessToken=" + this.accessToken || uni
+                .getStorageSync('session_key') +
+                '&type=dgp'
+            })
+          break;
+					case 11:
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						obj.lat = item.lat;
+						obj.lng = item.lng;
+						obj.equip_name = item.device_name;
+						obj.uptime = item.uptime;
+						obj.location = item.address;
+						obj.type = 11;
+						uni.navigateTo({
+							url: "../disease/cmb?shebei=" + JSON.stringify(obj),
+						});
+						break;
+					case 19:
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						obj.lat = item.lat;
+						obj.lng = item.lng;
+						obj.equip_name = item.device_name;
+						obj.uptime = item.uptime;
+						obj.location = item.address;
+						obj.type = 19;
+						uni.navigateTo({
+							url: "../disease/cmb?shebei=" + JSON.stringify(obj),
+						});
+						break;
+					case 20:
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						obj.lat = item.lat;
+						obj.lng = item.lng;
+						obj.equip_name = item.device_name;
+						obj.uptime = item.uptime;
+						obj.location = item.address;
+						obj.type = 20;
+						uni.navigateTo({
+							url: "../disease/cmb?shebei=" + JSON.stringify(obj),
+						});
+						break;
+					case 21:
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						obj.lat = item.lat;
+						obj.lng = item.lng;
+						obj.equip_name = item.device_name;
+						obj.uptime = item.uptime;
+						obj.location = item.address;
+						obj.type = 20;
+						uni.navigateTo({
+							url: "../disease/cmb?shebei=" + JSON.stringify(obj),
+						});
+						break;
+					case 25:
+						item.addtime = item.uptime;
+						uni.navigateTo({
+							url: "../cb/xylps/detail/detail?detail=" + JSON.stringify(item),
+						});
+						break;
+					default:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: "../cb/xy2.0/particulars?info=" + JSON.stringify(item),
+						});
+						break;
+				}
+			},
+		},
+		onLoad(option) {
+			this.indexs = option.id
+			console.log(this.indexs)
+			uni.getStorage({
+				key: "jurisdiction",
+				success: (res) => {
+					console.log(JSON.parse(res.data))
+					let items = JSON.parse(res.data).filter((item) => {
+						return item.purview_name == "设备管理"
+					})
+					let items2 = items[0].children.filter((item) => {
+						return item.purview_name == "分配设备"
+					})
+					this.infoalter = items2[0].children.some((item) => {
+						return item.purview_name == "修改名称" || item.purview_name == "添加位置"
+					})
+				},
+			})
+		},
+		onReachBottom() {
+			this.page++
+			this.eqlist()
+		},
+		onBackPress(options) {
+			if (options.from === 'navigateBack') {
+				return false;
+			}
+			this.clickLeft();
+			return true;
+		},
+	}
+</script>
+<style lang="scss">
+	.search_top_input {
+		width: 80%;
+		height: 54rpx;
+		background-color: #E4E4E4;
+		border-radius: 27rpx;
+		position: absolute;
+		top: 18rpx;
+		right: 18rpx;
+		padding-top: 8rpx;
+		box-sizing: border-box;
+
+		input {
+			width: 85%;
+			text-indent: 1rem;
+			font-size: 26rpx;
+		}
+
+		.icon {
+			position: absolute;
+			top: 18rpx;
+			right: 32rpx;
+		}
+	}
+
+	.search_bot_input {
+		width: 80%;
+		height: 54rpx;
+		background-color: #E4E4E4;
+		border-radius: 27rpx;
+		position: absolute;
+		top: 18px;
+		right: 18rpx;
+		box-sizing: border-box;
+		padding-top: 8rpx;
+
+		input {
+			width: 85%;
+			// text-indent: 1rem;
+			font-size: 26rpx;
+			padding-left: 20px;
+		}
+
+		.icon {
+			position: absolute;
+			top: 8rpx;
+			right: 26rpx;
+		}
+	}
+
+	.list {
+		width: 100%;
+		background-color: #FDFDFD;
+		position: absolute;
+		top: 100px;
+
+		.list_item {
+			width: 95%;
+			margin: 20rpx auto;
+			padding: 10rpx 20rpx;
+			position: relative;
+			background-color: #FFFFFF;
+			box-sizing: border-box;
+			box-shadow: 0 0 10rpx #bcb9ca;
+
+			.list_item_top {
+				display: flex;
+				justify-content: space-between;
+
+				.p1 {
+					height: 60rpx;
+					line-height: 60rpx;
+					font-size: 28rpx;
+
+					image {
+						width: 40rpx;
+						height: 40rpx;
+						vertical-align: text-top;
+						margin-right: 20rpx;
+					}
+				}
+
+				.p2 {
+					height: 60rpx;
+					line-height: 60rpx;
+					font-size: 28rpx;
+					color: #42b983;
+				}
+
+				.p_out {
+					height: 60rpx;
+					line-height: 60rpx;
+					font-size: 28rpx;
+					color: red;
+				}
+			}
+
+			.list_item_text {
+				margin-top: 20rpx;
+
+				p {
+					font-size: 24rpx;
+					color: #636363;
+					margin-top: 10rpx;
+				}
+
+				p:first-child {
+					font-size: 28rpx;
+					font-weight: 700;
+				}
+			}
+
+			.list_item_btn {
+				width: 126rpx;
+				color: #42b983;
+				height: 40rpx;
+				text-align: center;
+				border: 1rpx solid #42b983;
+				border-radius: 25rpx;
+				font-size: 24rpx;
+				line-height: 35rpx;
+				position: absolute;
+				top: 136rpx;
+				right: 20rpx;
+			}
+		}
+
+		.none {
+			width: 100%;
+			height: 100rpx;
+			line-height: 100rpx;
+			font-size: 32rpx;
+			text-align: center;
+		}
+	}
+</style>

+ 2 - 2
util/api.js

@@ -1,8 +1,8 @@
 // let BASE_URL = 'http://114.55.0.7:8002';
 // const BASE_URL='http://8.136.98.49:8002'
-let BASE_URL = 'http://218.28.198.186:10505'
+// let BASE_URL = 'http://218.28.198.186:10505'
 // let BASE_URL = 'https://wx.hnyfwlw.com'
-// let BASE_URL = 'http://192.168.1.107:8000';
+let BASE_URL = 'http://192.168.1.107:8000';
 // let BASE_URL = 'http://218.28.198.186:10508';
 // let BASE_URL = 'https://uat.hnyfwlw.com'
 export const myRequest = (options) => {