Pārlūkot izejas kodu

改一下格式

zhangsijie 2 gadi atpakaļ
vecāks
revīzija
215d157520
1 mainītis faili ar 49 papildinājumiem un 88 dzēšanām
  1. 49 88
      pages/equipList/index.vue

+ 49 - 88
pages/equipList/index.vue

@@ -8,14 +8,8 @@
     <view class="textbox">
       <view class="inputs">
         <!-- <u-input v-model="imports" type="text" :border="true" /> -->
-        <u-search
-          placeholder="请输入设备ID"
-          v-model="imports"
-          placeholder-color="#909696"
-          :show-action="false"
-          search-icon-color="#909696"
-          @input="searchinput"
-        >
+        <u-search placeholder="请输入设备ID" v-model="imports" placeholder-color="#909696" :show-action="false"
+          search-icon-color="#909696" @input="searchinput">
         </u-search>
         <!-- <input type="text" value="" placeholder="请输入设备ID或设备名称" v-model="imports" @input="searchinput"
 					class="inputbox" :clearable="false" />
@@ -23,50 +17,26 @@
       </view>
       <view class="listbox">
         <view class="listbox_left">
-          <view
-            :class="
-              currents == index
-                ? 'listbox_left_item_act listbox_left_item'
-                : 'listbox_left_item'
-            "
-            v-for="(item, index) in list"
-            :key="index"
-            @click="change(index)"
-          >
+          <view :class="currents == index
+              ? 'listbox_left_item_act listbox_left_item'
+              : 'listbox_left_item'
+            " v-for="(item, index) in list" :key="index" @click="change(index)">
             {{ item.name }}
           </view>
         </view>
         <!-- <view class="list" @scroll='showOut' ref="sollo" id="list"> -->
-        <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)"
-          >
+        <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">
-                <image
-                  :src="
-                    'http://www.hnyfwlw.com:8006/bigdata_app/image/fourMoodBase/' +
-                    type_id +
-                    '.png'
-                  "
-                  mode=""
-                ></image>
+                <image :src="'http://www.hnyfwlw.com:8006/bigdata_app/image/fourMoodBase/' +
+                  type_id +
+                  '.png'
+                  " mode=""></image>
                 <view>{{ item.device_name == "" ? "--" : item.device_name }}</view>
               </p>
-              <p
-                v-if="![11, 19, 20].includes(type_id)"
-                :class="[item.is_online ? 'p2' : 'p_out']"
-              >
+              <p v-if="![11, 19, 20].includes(type_id)" :class="[item.is_online ? 'p2' : 'p_out']">
                 {{ item.is_online ? "在线" : "离线" }}
               </p>
             </view>
@@ -80,11 +50,8 @@
               <p v-else>添加设备时间:{{ item.uptime | timeFormat() }}</p>
               <p>设备已运行:{{ item.days }}天</p>
             </view>
-            <view
-              class="list_item_btn"
-              v-if="$QueryPermission(108) && ![13, 17, 18, 11, 19, 20, 14].includes(type_id)"
-              @click.stop="modification(item)"
-            >
+            <view class="list_item_btn" v-if="$QueryPermission(108) && ![13, 17, 18, 11, 19, 20, 14].includes(type_id)"
+              @click.stop="modification(item)">
               信息修改
             </view>
           </view>
@@ -101,20 +68,12 @@
 			</view>
 		</view> -->
     <view class="loading" v-if="loadingtf">
-      <image
-        src="../../static/images/ajax-loader.gif"
-        mode=""
-        class="img"
-      ></image>
+      <image src="../../static/images/ajax-loader.gif" mode="" class="img"></image>
     </view>
     <view class="top" v-if="isTop" @click="top">
-      <image
-        :src="
-          'http://www.hnyfwlw.com:8006/bigdata_app' +
-          '/image/6209a98f0cb3b5086f2ca36152c9269.png'
-        "
-        mode=""
-      ></image>
+      <image :src="'http://www.hnyfwlw.com:8006/bigdata_app' +
+        '/image/6209a98f0cb3b5086f2ca36152c9269.png'
+        " mode=""></image>
     </view>
   </view>
 </template>
@@ -270,11 +229,11 @@ export default {
       console.log("item", item);
       switch (this.type_id) {
         // 病虫害可视监测
-        case 14: 
+        case 14:
           uni.navigateTo({
             url: "../cb/sy/detail?detail=" + JSON.stringify(item),
           });
-        break
+          break
         case 2:
           uni.navigateTo({
             url:
@@ -322,18 +281,18 @@ export default {
             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 12:
-		  console.log(item);
-		  uni.navigateTo({
-		    url: "../cb/xctdetail/xctdetail?info=" + JSON.stringify(item),
-		  });
-		  break;
+        case 8:
+          // item.type = this.type_id;
+          uni.navigateTo({
+            url: "../cb/thxydetail/thxydetail?imei=" + item.imei
+          });
+          break;
+        case 12:
+          console.log(item);
+          uni.navigateTo({
+            url: "../cb/xctdetail/xctdetail?info=" + JSON.stringify(item),
+          });
+          break;
         case 13:
           console.log(item);
           var obj = {};
@@ -443,7 +402,7 @@ export default {
     scrollTop(e) {
       console.log(e);
     },
-    upper() {},
+    upper() { },
     lower() {
       console.log(11);
       this.page++;
@@ -453,7 +412,7 @@ export default {
         this.eqlist(true);
       }
     },
-    scroll() {},
+    scroll() { },
   },
   onLoad() {
     this.list = [];
@@ -550,6 +509,7 @@ page {
     background-color: #fff;
     padding: 20rpx;
     width: 140rpx;
+
     .listbox_left_item {
       height: 50rpx;
       width: 100%;
@@ -589,14 +549,14 @@ page {
       justify-content: space-between;
 
       .p1 {
-		  width: 87%;
-		  display: flex;
-		  justify-content: space-between;
-		  align-items: center;
+        width: 87%;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
         height: 60rpx;
         line-height: 60rpx;
         font-size: 28rpx;
-		overflow: hidden;
+        overflow: hidden;
 
         image {
           width: 40rpx;
@@ -604,12 +564,13 @@ page {
           vertical-align: text-top;
           margin-right: 20rpx;
         }
-		view{
-			width: calc(100% - 40rpx);
-			overflow: hidden;
-			text-overflow: ellipsis;
-			white-space: nowrap;
-		}
+
+        view {
+          width: calc(100% - 40rpx);
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+        }
       }
 
       .p2 {