浏览代码

01设备与FW01设备使用同一个详情页

xiaohaizhao 1 年之前
父节点
当前提交
9414f8c139
共有 3 个文件被更改,包括 21 次插入9 次删除
  1. 1 1
      pages/facility/detail.vue
  2. 2 2
      pages/facility/modules/horizontalDirection.vue
  3. 18 6
      pages/index/modules/patrolScheme.vue

+ 1 - 1
pages/facility/detail.vue

@@ -107,7 +107,7 @@ export default {
             })
         },
         setTabs(prodnum) {
-            if (['FW01'].includes(prodnum)) {
+            if (['FW01', '01'].includes(prodnum)) {
                 this.showTab = '设备日志';
                 this.tabs.shift()
             }

+ 2 - 2
pages/facility/modules/horizontalDirection.vue

@@ -27,7 +27,7 @@ export default {
     methods: {
         getList(w_deviceid, prodnum) {
             return new Promise((resolve, reject) => {
-                let special = ["FW01"].includes(prodnum)
+                let special = ["FW01", '01'].includes(prodnum)
                 console.log("special", special)
                 this.$Http.basic({
                     "id": special ? 20230628084901 : 20230711165702,
@@ -38,7 +38,7 @@ export default {
                     console.log("设备实时数据查询", res)
                     if (this.cutoff(res.msg)) return resolve(0)
                     if (special) {
-                        if (["FW01"].includes(prodnum)) {
+                        if (["FW01", '01'].includes(prodnum)) {
                             const params = res.data.params,
                                 list = [];
                             params.OpenDeg && list.push(params.OpenDeg)

+ 18 - 6
pages/index/modules/patrolScheme.vue

@@ -4,18 +4,18 @@
         <view class="item-box">
             <view hover-class="navigator-hover" class="item">
                 <view class="label">待执行计划</view>
-                <view class="count u-line-1">4</view>
+                <view class="count u-line-1">{{ statistics.plan_start }}</view>
             </view>
 
             <view hover-class="navigator-hover" class="item">
                 <view class="label">进行中计划</view>
-                <view class="count u-line-1">1</view>
+                <view class="count u-line-1">{{ statistics.plan_start }}</view>
             </view>
 
-            <view hover-class="navigator-hover" class="item">
+          <!--   <view hover-class="navigator-hover" class="item">
                 <view class="label">巡检派工</view>
                 <view class="count u-line-1">3</view>
-            </view>
+            </view> -->
         </view>
     </view>
 </template>
@@ -25,6 +25,10 @@ export default {
     name: 'patrolScheme',
     data() {
         return {
+            statistics: {
+                plan_in: 0,
+                plan_start: 0
+            }
         };
     },
     created() {
@@ -32,7 +36,14 @@ export default {
     },
     methods: {
         getDetail() {
-            console.log('巡检计划暂时无接口')
+            this.$Http.basic({
+                "id": 20231027101302,
+                "content": {}
+            }).then(res => {
+                console.log("巡检计划", res)
+                if (this.cutoff(res.msg)) return;
+                this.statistics = res.data;
+            })
         }
     }
 }
@@ -59,7 +70,7 @@ export default {
 
     .item-box {
         display: flex;
-        justify-content: space-between;
+        // justify-content: space-between;
         margin-top: 10px;
 
         .item {
@@ -69,6 +80,7 @@ export default {
             border-radius: 4px;
             padding: 10px;
             box-sizing: border-box;
+            margin-right: 10px;
             .label {
                 line-height: 20px;
                 font-size: 14px;